Skip to content

Instantly share code, notes, and snippets.

View thomasJang's full-sized avatar
🎯
Focusing

JANG KI-YOUNG thomasJang

🎯
Focusing
View GitHub Profile
import { create } from "zustand";
import { subscribeWithSelector } from "zustand/middleware";
import { StoreActions } from "@core/stores/types";
import {
BizService,
BizSurvey,
BizTitle,
GetBizSurveyRequest,
GetBizTitleViewRequest,
PutBizSurveyRequest,
@thomasJang
thomasJang / temp.ts
Created April 29, 2020 08:47
temp.ts
const lightColors = {
primary_color: QS_PRIMARY,
primary_color_1: QS_PRIMARY_1,
primary_color_2: QS_PRIMARY_2,
primary_color_3: QS_PRIMARY_3,
primary_color_4: QS_PRIMARY_4,
primary_color_5: QS_PRIMARY_5,
secondary_color: QS_SECONDARY,
@thomasJang
thomasJang / getUniqName.js
Created July 8, 2019 13:00
getUniqName 숫자가 증가되는
function getUniqName(name) {
const re = /\d+(?=\D+$)|\d+$/;
if (re.test(name)) {
return name.replace(re, function(match) {
return ('' + (Number(match) + 1)).padStart(match.length, '0');
});
} else {
return `${name}_1`;
}
}
@thomasJang
thomasJang / alram-confirmButtons.js
Created May 15, 2019 11:47
alram-confirmButtons.js
const confirmButtons = {
[NotificationType.ORG_MEMBER_INVITED]: (
<div data-button-gorup>
<Button
size="small"
type="primary"
onClick={() => {
handleInvitation('acceptInvitation', msg);
}}
>
@thomasJang
thomasJang / Datagrid.d.ts
Created January 29, 2019 10:09
Datagrid.d.ts
import * as React from 'react';
import { IDataGrid } from './common/@types';
interface IProps extends IDataGrid.IProps {
}
interface IState extends IDataGrid.IRootState {
}
declare class DataGrid extends React.Component<IProps, IState> {
static defaultHeight: number;
static defaultColumnKeys: IDataGrid.IColumnKeys;
static defaultHeader: IDataGrid.IOptionHeader;
@thomasJang
thomasJang / datagrid-@types.ts
Last active January 29, 2019 10:05
datagrid-@types.ts
export namespace IDataGrid {
export interface IColumn extends IColPrimitive {
colIndex?: number;
rowIndex?: number;
formatter?: formatterFunction | string;
collector?: collectorFunction | string;
editor?: editorFunction | string | { type?: string };
hidden?: boolean;
columns?: IColumn[];
depth?: number;
@thomasJang
thomasJang / Filter.tsx
Created January 28, 2019 02:21
Filter.tsx
import * as React from "react";
import styled from "styled-components";
import { Input, Icon } from "antd";
const Container = styled.div`
margin: 10px auto;
padding: 0 10px;
`;
export interface IFilterProps {
@thomasJang
thomasJang / onerror.js
Created January 27, 2019 06:15
onerror.js
window.onerror = function (msg, url, lineNo, columnNo, error) {
const string = msg.toLowerCase(), substring = "script error";
if (string.indexOf(substring) > -1) {
axWarningDialog.alert('Script Error: See Browser Console for Detail');
} else {
sqlgate.api.call({
method: "POST",
data: JSON.stringify({
"url": url,
"message": msg,
@thomasJang
thomasJang / DataGrid.tsx
Created January 24, 2019 10:17
DataGrid.tsx getProviderProps 발췌
const {
CTInnerWidth: _CTInnerWidth = 0,
frozenPanelWidth: _frozenPanelWidth = 0,
asidePanelWidth: _asidePanelWidth = 0,
rightPanelWidth: _rightPanelWidth = 0,
} = newStoreProps.styles!;
const { printStartColIndex, printEndColIndex } = getPositionPrintColGroup(
newStoreProps.headerColGroup,
@thomasJang
thomasJang / handleResizerMove.ts
Created January 8, 2019 13:25
handleResizerMove.ts
const prevBoxWidth =
typeof parsedSQL.boxWidth === 'undefined'
? this.resultBoxWidth
: parsedSQL.boxWidth;
const prevResizerLeft = e.currentTarget.getBoundingClientRect().left;
const prevScrollLeft = this.resultRef.current.scrollLeft;
mouseEventSubscribe(
(mpos: IMousePosition) => {
const resizerMoveX = mpos.clientX - prevResizerLeft;