@vmscloud/moz-ui-grid-react 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{legacy/locale/contextWrapper.d.ts → contextWrapper.d.ts} +2 -5
- package/dist/index.cjs +1 -25
- package/dist/index.d.ts +3 -7
- package/dist/index.js +54 -95649
- package/dist/locale/MozGridLocaleContext.d.ts +23 -0
- package/dist/style.css +1 -1
- package/package.json +21 -17
- package/dist/legacy/components/common/Dragging.d.ts +0 -30
- package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +0 -256
- package/dist/legacy/components/common/custom-cell/FormulaInput.d.ts +0 -25
- package/dist/legacy/components/common/custom-cell/GridCustomCell.d.ts +0 -17
- package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +0 -54
- package/dist/legacy/components/common/excel/ClientExcelUploadPopup.d.ts +0 -6
- package/dist/legacy/components/common/filter/GridFilter.d.ts +0 -13
- package/dist/legacy/components/common/footer/GridFooter.d.ts +0 -17
- package/dist/legacy/components/common/sort/GridSort.d.ts +0 -12
- package/dist/legacy/components/common/toolbar/GridSearchInput.d.ts +0 -26
- package/dist/legacy/components/grid/CellEditor.d.ts +0 -9
- package/dist/legacy/components/grid/CellTemplate.d.ts +0 -21
- package/dist/legacy/components/grid/DetailTemplate.d.ts +0 -8
- package/dist/legacy/components/grid/GroupTemplate.d.ts +0 -8
- package/dist/legacy/components/grid/HeaderTemplate.d.ts +0 -9
- package/dist/legacy/components/grid/MozGridReact.d.ts +0 -12
- package/dist/legacy/components/grid/MozGridReactCore.d.ts +0 -28
- package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.d.ts +0 -11
- package/dist/legacy/components/grid/context-menu/GridContextMenu.d.ts +0 -22
- package/dist/legacy/components/grid/group-panel/GroupPanel.d.ts +0 -5
- package/dist/legacy/components/grid/toolbar/ColumnPicker.d.ts +0 -18
- package/dist/legacy/components/grid/toolbar/GridOptionModal.d.ts +0 -30
- package/dist/legacy/components/grid/toolbar/GridSetupPopover.d.ts +0 -25
- package/dist/legacy/components/grid/toolbar/GridToolBox.d.ts +0 -49
- package/dist/legacy/components/pivot/MozPivotReact.d.ts +0 -47
- package/dist/legacy/components/pivot/PivotContextMenu.d.ts +0 -23
- package/dist/legacy/components/pivot/PivotFieldChip.d.ts +0 -17
- package/dist/legacy/components/pivot/PivotFieldDropZone.d.ts +0 -30
- package/dist/legacy/components/pivot/PivotFieldPanel.d.ts +0 -26
- package/dist/legacy/components/pivot/PivotOptionModal.d.ts +0 -36
- package/dist/legacy/components/pivot/PivotToolBox.d.ts +0 -56
- package/dist/legacy/components/pivot/chart/EChart.d.ts +0 -18
- package/dist/legacy/components/pivot/chart/MozPivotChart.d.ts +0 -23
- package/dist/legacy/components/pivot/chart/PivotChartDetail.d.ts +0 -17
- package/dist/legacy/components/pivot/chart/PivotChartMini.d.ts +0 -19
- package/dist/legacy/components/pivot/chart/PivotChartMultiple.d.ts +0 -16
- package/dist/legacy/components/pivot/chart/PivotChartToolbar.d.ts +0 -32
- package/dist/legacy/components/pivot/chart/chartUtils.d.ts +0 -45
- package/dist/legacy/contexts/index.d.ts +0 -31
- package/dist/legacy/contracts/notification.contract.d.ts +0 -34
- package/dist/legacy/hooks/index.d.ts +0 -16
- package/dist/legacy/hooks/useCellTooltip.d.ts +0 -8
- package/dist/legacy/hooks/useClientExcelExport.d.ts +0 -27
- package/dist/legacy/hooks/useClientExcelStore.d.ts +0 -18
- package/dist/legacy/hooks/useContextMenu.d.ts +0 -62
- package/dist/legacy/hooks/useGridBulkEditor.d.ts +0 -16
- package/dist/legacy/hooks/useGridChanges.d.ts +0 -10
- package/dist/legacy/hooks/useGridColumns.d.ts +0 -11
- package/dist/legacy/hooks/useGridCustomCell.d.ts +0 -32
- package/dist/legacy/hooks/useGridCustomCellModule.d.ts +0 -9
- package/dist/legacy/hooks/useGridEvents.d.ts +0 -13
- package/dist/legacy/hooks/useGridFilter.d.ts +0 -19
- package/dist/legacy/hooks/useGridInstance.d.ts +0 -9
- package/dist/legacy/hooks/useGridSelect.d.ts +0 -10
- package/dist/legacy/hooks/useGridSelection.d.ts +0 -6
- package/dist/legacy/hooks/useGridSort.d.ts +0 -16
- package/dist/legacy/hooks/useGridUndoRedo.d.ts +0 -10
- package/dist/legacy/hooks/useGridValidation.d.ts +0 -9
- package/dist/legacy/hooks/useSearchHighlight.d.ts +0 -9
- package/dist/legacy/icons/index.d.ts +0 -36
- package/dist/legacy/index.d.ts +0 -71
- package/dist/legacy/locale/MozConfigProvider.d.ts +0 -31
- package/dist/legacy/locale/en.d.ts +0 -2
- package/dist/legacy/locale/index.d.ts +0 -8
- package/dist/legacy/locale/ja.d.ts +0 -2
- package/dist/legacy/locale/ko.d.ts +0 -2
- package/dist/legacy/locale/types.d.ts +0 -330
- package/dist/legacy/locale/useMozLocale.d.ts +0 -15
- package/dist/legacy/locale/zh.d.ts +0 -2
- package/dist/legacy/stories/MozGridReact.stories.d.ts +0 -7
- package/dist/legacy/stories/MozPivotReact.stories.d.ts +0 -44
- package/dist/legacy/types/pivot-props.d.ts +0 -62
- package/dist/legacy/types/props.d.ts +0 -127
- package/dist/legacy/types/toolbar.d.ts +0 -117
- package/dist/legacy/ui/button/Button.d.ts +0 -18
- package/dist/legacy/ui/button/index.d.ts +0 -1
- package/dist/legacy/ui/checkbox/CheckBox.d.ts +0 -17
- package/dist/legacy/ui/checkbox/icons.d.ts +0 -9
- package/dist/legacy/ui/checkbox/index.d.ts +0 -1
- package/dist/legacy/ui/context-menu/ContextMenu.d.ts +0 -36
- package/dist/legacy/ui/context-menu/index.d.ts +0 -2
- package/dist/legacy/ui/context-menu/types.d.ts +0 -26
- package/dist/legacy/ui/date-input/DateInput.d.ts +0 -25
- package/dist/legacy/ui/date-input/index.d.ts +0 -1
- package/dist/legacy/ui/empty-state/EmptyState.d.ts +0 -28
- package/dist/legacy/ui/empty-state/index.d.ts +0 -1
- package/dist/legacy/ui/input/Input.d.ts +0 -27
- package/dist/legacy/ui/input/index.d.ts +0 -1
- package/dist/legacy/ui/multi-select/MultiSelect.d.ts +0 -43
- package/dist/legacy/ui/multi-select/index.d.ts +0 -1
- package/dist/legacy/ui/number-input/NumberInput.d.ts +0 -22
- package/dist/legacy/ui/number-input/index.d.ts +0 -1
- package/dist/legacy/ui/popup/Popup.d.ts +0 -50
- package/dist/legacy/ui/popup/index.d.ts +0 -1
- package/dist/legacy/ui/select/Select.d.ts +0 -56
- package/dist/legacy/ui/select/index.d.ts +0 -1
- package/dist/legacy/ui/toggle/Toggle.d.ts +0 -21
- package/dist/legacy/ui/toggle/index.d.ts +0 -1
- package/dist/legacy/utils/cn.d.ts +0 -5
- package/dist/legacy/utils/file.d.ts +0 -17
- package/dist/legacy/utils/index.d.ts +0 -2
- package/dist/legacy/utils/misc.d.ts +0 -17
- /package/dist/{legacy/stories → stories}/_helpers/sampleData.d.ts +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Grid UI 타입 정의 (Vue 측 types/toolbar.ts 1:1 포팅).
|
|
3
|
-
*
|
|
4
|
-
* ComparisonOperator·LogicalOperator·IFilterDef·ISortDef·ICustomCellRuleSet 등
|
|
5
|
-
* Wijmo 비의존 타입을 그대로 재사용.
|
|
6
|
-
*/
|
|
7
|
-
export type ComparisonOperator = '=' | '≠' | '%' | '!%' | '>' | '≥' | '<' | '≤' | '∅' | '●';
|
|
8
|
-
export type LogicalOperator = 'OR' | 'AND';
|
|
9
|
-
export interface IFilterDef {
|
|
10
|
-
sequence: number;
|
|
11
|
-
header: string;
|
|
12
|
-
binding: string;
|
|
13
|
-
comparison: ComparisonOperator;
|
|
14
|
-
logical?: LogicalOperator;
|
|
15
|
-
type?: 'string' | 'number' | 'boolean' | 'date';
|
|
16
|
-
variable: unknown;
|
|
17
|
-
variable2?: unknown;
|
|
18
|
-
}
|
|
19
|
-
export interface ISortDef {
|
|
20
|
-
sequence: number;
|
|
21
|
-
header: string;
|
|
22
|
-
binding: string;
|
|
23
|
-
ascending: boolean;
|
|
24
|
-
by?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface ICustomCellDef {
|
|
27
|
-
sequence: number;
|
|
28
|
-
header: string;
|
|
29
|
-
binding: string;
|
|
30
|
-
comparison: ComparisonOperator;
|
|
31
|
-
logical?: LogicalOperator;
|
|
32
|
-
type?: number | string;
|
|
33
|
-
variable: any;
|
|
34
|
-
}
|
|
35
|
-
export interface ICustomCellRuleSet {
|
|
36
|
-
id: string;
|
|
37
|
-
name?: string;
|
|
38
|
-
priority: number;
|
|
39
|
-
mode?: 'ui' | 'formula';
|
|
40
|
-
rules: ICustomCellDef[];
|
|
41
|
-
formula?: string;
|
|
42
|
-
formulaError?: string;
|
|
43
|
-
backgroundColor: string;
|
|
44
|
-
textColor: string;
|
|
45
|
-
targetColumns?: string[];
|
|
46
|
-
enabled?: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface ICustomCellConfig {
|
|
49
|
-
ruleSets: ICustomCellRuleSet[];
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* 사용자 정의 메뉴 항목 입력 형식 (Vue 측 IContextMenuItem 1:1).
|
|
53
|
-
*
|
|
54
|
-
* 내부 ContextMenu UI primitive는 별도로 `{text, function}` 형식의 IContextMenu를 쓰며,
|
|
55
|
-
* GridContextMenu가 이 두 형식 간 변환을 담당한다.
|
|
56
|
-
*/
|
|
57
|
-
export interface IContextMenuItem {
|
|
58
|
-
/** 메뉴 ID — executeCommand로 호출 시 식별자 */
|
|
59
|
-
id: string;
|
|
60
|
-
/** 표시 텍스트 */
|
|
61
|
-
label: string;
|
|
62
|
-
/** 아이콘 (옵션, 현재 미사용) */
|
|
63
|
-
icon?: string;
|
|
64
|
-
/** 비활성화 */
|
|
65
|
-
disabled?: boolean;
|
|
66
|
-
/** 구분선 */
|
|
67
|
-
separator?: boolean;
|
|
68
|
-
/** 하위 메뉴 */
|
|
69
|
-
children?: IContextMenuItem[];
|
|
70
|
-
/** 클릭 핸들러 */
|
|
71
|
-
handler?: () => void;
|
|
72
|
-
/** 메뉴 표시 순서 (낮을수록 위) — 미지정 시 50 (커스텀 메뉴 기본) */
|
|
73
|
-
order?: number;
|
|
74
|
-
}
|
|
75
|
-
export interface IContextMenuConfig {
|
|
76
|
-
useViewSelectColumn?: boolean;
|
|
77
|
-
useFixedColumn?: boolean;
|
|
78
|
-
useGroupColumn?: boolean;
|
|
79
|
-
useContextMenu?: boolean;
|
|
80
|
-
useSort?: boolean;
|
|
81
|
-
useFilter?: boolean;
|
|
82
|
-
useCustomCell?: boolean;
|
|
83
|
-
useBulkEditColumn?: boolean;
|
|
84
|
-
useDataCopy?: boolean;
|
|
85
|
-
useDataWithHeaderCopy?: boolean;
|
|
86
|
-
useAutoSizeColumns?: boolean;
|
|
87
|
-
useExportCsv?: boolean;
|
|
88
|
-
useRowPinning?: boolean;
|
|
89
|
-
useExportImport?: boolean;
|
|
90
|
-
useExportExcel?: boolean;
|
|
91
|
-
onImportExcel?: (ctx: IContextMenuExcelEventArgs) => void;
|
|
92
|
-
onImportExcelAppend?: (ctx: IContextMenuExcelEventArgs) => void;
|
|
93
|
-
onExportOriginalData?: (format: 'excel' | 'csv') => void;
|
|
94
|
-
/** 클라이언트 사이드 엑셀 가져오기 메뉴 활성화 */
|
|
95
|
-
useClientExcelImport?: boolean;
|
|
96
|
-
/** 클라이언트 사이드 엑셀 내보내기 메뉴 활성화 */
|
|
97
|
-
useClientExcelExport?: boolean;
|
|
98
|
-
clientImportOptions?: Record<string, unknown>;
|
|
99
|
-
clientExportOptions?: Record<string, unknown>;
|
|
100
|
-
exportFileName?: string;
|
|
101
|
-
onClientImportComplete?: (result: unknown) => void;
|
|
102
|
-
onClientExportComplete?: (blob: Blob) => void;
|
|
103
|
-
/** 사용자 정의 메뉴 항목 — 내장 메뉴와 order로 정렬 */
|
|
104
|
-
customMenu?: IContextMenuItem[];
|
|
105
|
-
}
|
|
106
|
-
export interface IContextMenuExcelEventArgs {
|
|
107
|
-
grid: unknown;
|
|
108
|
-
field?: unknown;
|
|
109
|
-
}
|
|
110
|
-
export type AggregateType = 'SUM' | 'AVERAGE' | 'COUNT' | 'MIN' | 'MAX';
|
|
111
|
-
export interface IAggregateValues {
|
|
112
|
-
SUM?: number;
|
|
113
|
-
AVERAGE?: number;
|
|
114
|
-
COUNT?: number;
|
|
115
|
-
MIN?: number;
|
|
116
|
-
MAX?: number;
|
|
117
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ButtonType = 'contained' | 'contained-large' | 'contained-small' | 'outline' | 'outline-small' | 'outline-icon' | 'ghost' | 'ghost-small' | 'ghost-xsmall' | 'contained-icon' | 'contained-icon-large' | 'contained-icon-small' | 'icon' | 'icon-active' | 'icon-accent' | 'text' | 'no-interaction' | 'default';
|
|
3
|
-
export type ButtonAction = 'Add' | 'Remove' | 'Edit' | 'Save' | 'Search' | 'Run' | 'Copy';
|
|
4
|
-
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
5
|
-
action?: ButtonAction;
|
|
6
|
-
text?: string;
|
|
7
|
-
type?: ButtonType;
|
|
8
|
-
width?: string | number;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
icon?: ReactNode;
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Vue 측 Button.vue 1:1 포팅.
|
|
16
|
-
* type별 6가지 variant + width(px|string) + loading 스피너 + icon prop.
|
|
17
|
-
*/
|
|
18
|
-
export declare function Button(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button, type ButtonProps, type ButtonType, type ButtonAction } from './Button';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface CheckBoxProps {
|
|
2
|
-
label?: string;
|
|
3
|
-
fieldId?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
readonly?: boolean;
|
|
6
|
-
/** controlled 값. 명시되면 controlled 모드로 동작하며 onChange 콜백만 호출 */
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
indeterminate?: boolean;
|
|
9
|
-
/** uncontrolled 초기값. controlled 모드에서는 무시됨 */
|
|
10
|
-
defaultChecked?: boolean;
|
|
11
|
-
onChange?: (value: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Vue 측 CheckBox.vue 1:1 포팅.
|
|
15
|
-
* 크기 12px, 3-state (checked/unchecked/indeterminate), Space/Enter 토글, 3px focus ring.
|
|
16
|
-
*/
|
|
17
|
-
export declare function CheckBox(props: CheckBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface IconProps {
|
|
2
|
-
color?: string;
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function IconCheckBox({ color, disabled, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function IconCheckBoxChecked({ color, disabled, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare function IconCheckboxIndeterminate({ color, disabled, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CheckBox, type CheckBoxProps } from './CheckBox';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { IContextMenu, ContextPosition } from './types';
|
|
3
|
-
export interface ContextMenuProps {
|
|
4
|
-
itemSource?: IContextMenu[];
|
|
5
|
-
beforeClose?: () => void | Promise<void>;
|
|
6
|
-
minWidth?: string;
|
|
7
|
-
/** 'rb' (right-bottom 기본) 등. submenu 방향 힌트 */
|
|
8
|
-
direction?: 'rb' | 'rt' | 'lb' | 'lt';
|
|
9
|
-
/** 고정 위치 (mouse 위치 무시) */
|
|
10
|
-
fixPosition?: ContextPosition;
|
|
11
|
-
toTopCenter?: boolean;
|
|
12
|
-
toBottomCenter?: boolean;
|
|
13
|
-
noPadding?: boolean;
|
|
14
|
-
disableCloseOnClickBackdrop?: boolean;
|
|
15
|
-
onOpen?: () => void;
|
|
16
|
-
onClose?: () => void;
|
|
17
|
-
/** template 키별 커스텀 렌더러. Vue 측 dynamic slot 대응 */
|
|
18
|
-
slots?: Record<string, (props: {
|
|
19
|
-
item: IContextMenu;
|
|
20
|
-
close: () => void;
|
|
21
|
-
}) => ReactNode>;
|
|
22
|
-
}
|
|
23
|
-
export interface ContextMenuHandle {
|
|
24
|
-
open: (setMenuItems?: (menuProps?: unknown) => IContextMenu[], menuProps?: unknown) => void;
|
|
25
|
-
close: () => void;
|
|
26
|
-
toggle: () => void;
|
|
27
|
-
/** 현재 열림 상태 */
|
|
28
|
-
state: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Vue 측 ContextMenu.vue 포팅 (Radix DropdownMenu 기반).
|
|
32
|
-
*
|
|
33
|
-
* Vue 버전은 submenu hover 400ms 디바운스 + corner-aware 위치 자동 계산을 가졌으며,
|
|
34
|
-
* Radix는 이를 자동으로 처리한다. 시각 스타일은 Vue와 동일하게 유지.
|
|
35
|
-
*/
|
|
36
|
-
export declare const ContextMenu: import('react').ForwardRefExoticComponent<ContextMenuProps & import('react').RefAttributes<ContextMenuHandle>>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vue 측 IContextMenu와 동일 스키마.
|
|
3
|
-
* - text: 메뉴 라벨
|
|
4
|
-
* - function: 클릭 핸들러
|
|
5
|
-
* - disabled: 비활성 (bool or 함수)
|
|
6
|
-
* - hidden: 숨김
|
|
7
|
-
* - separator: 구분선
|
|
8
|
-
* - children: 서브메뉴
|
|
9
|
-
*/
|
|
10
|
-
export interface IContextMenu {
|
|
11
|
-
text?: string;
|
|
12
|
-
function?: () => void;
|
|
13
|
-
disabled?: boolean | (() => boolean);
|
|
14
|
-
hidden?: boolean;
|
|
15
|
-
hover?: boolean;
|
|
16
|
-
separator?: boolean;
|
|
17
|
-
template?: string;
|
|
18
|
-
children?: IContextMenu[];
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
export interface ContextPosition {
|
|
22
|
-
left: string | number;
|
|
23
|
-
top: string | number;
|
|
24
|
-
selector?: string;
|
|
25
|
-
useTeleport?: boolean;
|
|
26
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { Dayjs } from 'dayjs';
|
|
3
|
-
export interface DateInputProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
readonly?: boolean;
|
|
10
|
-
format?: string;
|
|
11
|
-
showSpin?: boolean;
|
|
12
|
-
min?: string | Date | Dayjs | null;
|
|
13
|
-
max?: string | Date | Dayjs | null;
|
|
14
|
-
style?: CSSProperties;
|
|
15
|
-
value: Dayjs | Date | null | undefined;
|
|
16
|
-
onChange: (value: Dayjs | Date | null | undefined) => void;
|
|
17
|
-
onClose?: () => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Vue 측 DateInput.vue 포팅 (Calendar popup은 native date input로 단순화).
|
|
21
|
-
* - showSpin: 좌우 일자 ±1 버튼
|
|
22
|
-
* - min/max clamp, format 표시
|
|
23
|
-
* - 완전한 popup-calendar 동작은 추후 Calendar 컴포넌트 포팅 시 추가
|
|
24
|
-
*/
|
|
25
|
-
export declare function DateInput(props: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DateInput, type DateInputProps } from './DateInput';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface EmptyStateMessages {
|
|
3
|
-
customEmptyHeader?: string;
|
|
4
|
-
customEmptyContent?: string;
|
|
5
|
-
dataEmptyHeader?: string;
|
|
6
|
-
dataEmptyContent?: string;
|
|
7
|
-
resultEmptyHeader?: string;
|
|
8
|
-
resultEmptyContent?: string;
|
|
9
|
-
searchEmptyHeader?: string;
|
|
10
|
-
searchEmptyContent?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface EmptyStateProps {
|
|
13
|
-
isReadOnly?: boolean;
|
|
14
|
-
isCustomState?: boolean;
|
|
15
|
-
headerMsg?: string;
|
|
16
|
-
/** HTML 허용. 줄바꿈은 \n으로 표현 */
|
|
17
|
-
contentMsg?: string;
|
|
18
|
-
filterdRowCount?: number;
|
|
19
|
-
totalRowCount?: number;
|
|
20
|
-
useImg?: boolean;
|
|
21
|
-
selectImg?: 'Custom' | 'Result' | 'Data' | 'Search';
|
|
22
|
-
messages?: EmptyStateMessages;
|
|
23
|
-
customState?: ReactNode;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Vue 측 EmptyState.vue 1:1 포팅.
|
|
27
|
-
*/
|
|
28
|
-
export declare function EmptyState(props: EmptyStateProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EmptyState, type EmptyStateProps, type EmptyStateMessages } from './EmptyState';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { InputHTMLAttributes, KeyboardEvent } from 'react';
|
|
2
|
-
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
3
|
-
label?: string;
|
|
4
|
-
value: string;
|
|
5
|
-
onChange: (value: string) => void;
|
|
6
|
-
type?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
isReadOnly?: boolean;
|
|
11
|
-
width?: string | number;
|
|
12
|
-
messagePosition?: 'outside' | 'inside';
|
|
13
|
-
/** 외부에서 계산한 invalid 메시지. 비어 있으면 정상 상태 */
|
|
14
|
-
invalidMessage?: string;
|
|
15
|
-
/** v2: 아이콘 + 툴팁 방식 */
|
|
16
|
-
useInvalidV2?: boolean;
|
|
17
|
-
onEnter?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
18
|
-
}
|
|
19
|
-
export interface InputHandle {
|
|
20
|
-
focus: () => void;
|
|
21
|
-
blur: () => void;
|
|
22
|
-
element: HTMLInputElement | null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Vue 측 Input.vue 1:1 포팅 (validator 시스템은 invalidMessage prop으로 단순화).
|
|
26
|
-
*/
|
|
27
|
-
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<InputHandle>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Input, type InputProps, type InputHandle } from './Input';
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type DisplayFormatter<T = unknown> = (item: T) => string;
|
|
3
|
-
export interface MultiSelectProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
-
itemsSource: T[];
|
|
5
|
-
label?: string;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
readonly?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
keyProp?: string;
|
|
11
|
-
displayProp?: string | DisplayFormatter<T>;
|
|
12
|
-
disabledProp?: string;
|
|
13
|
-
useSelectAll?: boolean;
|
|
14
|
-
useFilter?: boolean;
|
|
15
|
-
/** 헤더 표시 포맷. `{count}` 치환 */
|
|
16
|
-
headerFormat?: string;
|
|
17
|
-
listBoxWidth?: number | string;
|
|
18
|
-
useSpecificSelect?: boolean;
|
|
19
|
-
autoSelectNewItems?: boolean;
|
|
20
|
-
selectAllWhenEmpty?: boolean;
|
|
21
|
-
invalidMessage?: string;
|
|
22
|
-
/** 선택된 key 배열 */
|
|
23
|
-
value: Array<string | number>;
|
|
24
|
-
onChange: (value: Array<string | number>) => void;
|
|
25
|
-
onClose?: () => void;
|
|
26
|
-
listItemSlot?: (props: {
|
|
27
|
-
item: T;
|
|
28
|
-
text: string;
|
|
29
|
-
}) => ReactNode;
|
|
30
|
-
emptySlot?: ReactNode;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Vue 측 MultiSelect.vue 포팅 (Radix Popover + react-virtual).
|
|
34
|
-
*
|
|
35
|
-
* 핵심 기능:
|
|
36
|
-
* - 다중 선택 (Set 기반)
|
|
37
|
-
* - 가상 스크롤 24px, 5 overscan
|
|
38
|
-
* - useSelectAll: "전체 선택" (필터 결과 한정)
|
|
39
|
-
* - useSpecificSelect: per-item "Only" 버튼
|
|
40
|
-
* - indeterminate checkbox
|
|
41
|
-
* - filter + 300ms debounce
|
|
42
|
-
*/
|
|
43
|
-
export declare function MultiSelect<T extends Record<string, unknown> = Record<string, unknown>>(props: MultiSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MultiSelect, type MultiSelectProps } from './MultiSelect';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent } from 'react';
|
|
2
|
-
export interface NumberInputProps {
|
|
3
|
-
label?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
width?: string | number;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
step?: number;
|
|
8
|
-
min?: number;
|
|
9
|
-
max?: number;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
shortMode?: boolean;
|
|
12
|
-
nullable?: boolean;
|
|
13
|
-
value: number;
|
|
14
|
-
onChange: (value: number) => void;
|
|
15
|
-
onEnter?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Vue 측 NumberInput.vue 1:1 포팅.
|
|
19
|
-
* - 좌우 spin 버튼(default mode), shortMode는 input 내부 up/down 화살표
|
|
20
|
-
* - min/max clamp, nullable 옵션
|
|
21
|
-
*/
|
|
22
|
-
export declare function NumberInput(props: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NumberInput, type NumberInputProps } from './NumberInput';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type PopupPreset = 'save-cancel' | 'ok-cancel' | 'ok' | 'cancel' | 'close' | 'no-footer';
|
|
3
|
-
export type PopupDialogIcon = 'info' | 'error' | 'success' | 'warning';
|
|
4
|
-
export interface PopupProps {
|
|
5
|
-
visible: boolean;
|
|
6
|
-
onVisibleChange?: (visible: boolean) => void;
|
|
7
|
-
title?: string;
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
minWidth?: number;
|
|
11
|
-
minHeight?: number;
|
|
12
|
-
maxWidth?: number;
|
|
13
|
-
maxHeight?: number;
|
|
14
|
-
draggable?: boolean;
|
|
15
|
-
resizeable?: boolean;
|
|
16
|
-
keepAspectRatio?: boolean;
|
|
17
|
-
showCloseButton?: boolean;
|
|
18
|
-
closeOnOutsideClick?: boolean;
|
|
19
|
-
preset?: PopupPreset;
|
|
20
|
-
dialogIcon?: PopupDialogIcon;
|
|
21
|
-
dialogMessage?: string;
|
|
22
|
-
loading?: boolean;
|
|
23
|
-
disabledConfirmButton?: boolean;
|
|
24
|
-
contentsPadding?: string | number;
|
|
25
|
-
showFooterBorder?: boolean;
|
|
26
|
-
saveText?: string;
|
|
27
|
-
cancelText?: string;
|
|
28
|
-
okText?: string;
|
|
29
|
-
closeText?: string;
|
|
30
|
-
className?: string;
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
/** 헤더 영역 커스터마이즈 */
|
|
33
|
-
titleSlot?: ReactNode;
|
|
34
|
-
/** 푸터 영역 커스터마이즈 (받은 핸들러로 confirm/cancel 호출) */
|
|
35
|
-
footerSlot?: (handlers: {
|
|
36
|
-
onConfirm: () => void;
|
|
37
|
-
onCancel: () => void;
|
|
38
|
-
}) => ReactNode;
|
|
39
|
-
onOpen?: () => void;
|
|
40
|
-
onClose?: () => void;
|
|
41
|
-
onConfirm?: () => void;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Vue 측 Popup.vue 포팅 (Radix Dialog 기반).
|
|
45
|
-
* - title/body/footer 3-section
|
|
46
|
-
* - preset(save-cancel/ok-cancel/ok/cancel/close/no-footer)
|
|
47
|
-
* - dialogIcon(info/error/success/warning)
|
|
48
|
-
* - drag/resize는 향후 보강 가능
|
|
49
|
-
*/
|
|
50
|
-
export declare function Popup(props: PopupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Popup, type PopupProps, type PopupPreset, type PopupDialogIcon } from './Popup';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type DisplayFormatter<T = unknown> = (item: T) => string;
|
|
3
|
-
export interface SelectProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
-
itemsSource: T[];
|
|
5
|
-
label?: string | null;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
readonly?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
keyProp?: string;
|
|
11
|
-
displayProp?: string | DisplayFormatter<T>;
|
|
12
|
-
useObjBinding?: boolean;
|
|
13
|
-
useFilter?: boolean;
|
|
14
|
-
listWidth?: string | number;
|
|
15
|
-
searchPlaceholder?: string;
|
|
16
|
-
emptyText?: string;
|
|
17
|
-
requiredMessage?: string;
|
|
18
|
-
/** 외부에서 계산한 invalidMessage. 비어 있으면 정상 */
|
|
19
|
-
invalidMessage?: string;
|
|
20
|
-
value: unknown;
|
|
21
|
-
onChange: (value: unknown, item: T | null) => void;
|
|
22
|
-
onClose?: () => void;
|
|
23
|
-
/** 입력란 영역 커스텀 렌더. text/item 받아서 렌더 */
|
|
24
|
-
inputContainerSlot?: (props: {
|
|
25
|
-
text: string;
|
|
26
|
-
item: unknown;
|
|
27
|
-
}) => ReactNode;
|
|
28
|
-
iconSlot?: (props: {
|
|
29
|
-
isOpen: boolean;
|
|
30
|
-
}) => ReactNode;
|
|
31
|
-
listItemSlot?: (props: {
|
|
32
|
-
item: T;
|
|
33
|
-
text: string;
|
|
34
|
-
index: number;
|
|
35
|
-
highlightText?: string;
|
|
36
|
-
}) => ReactNode;
|
|
37
|
-
emptySlot?: ReactNode;
|
|
38
|
-
}
|
|
39
|
-
export interface SelectHandle {
|
|
40
|
-
validate: () => boolean;
|
|
41
|
-
open: () => void;
|
|
42
|
-
close: () => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Vue 측 Select.vue 포팅 (Radix Popover + @tanstack/react-virtual).
|
|
46
|
-
*
|
|
47
|
-
* 핵심 기능:
|
|
48
|
-
* - 24px 가상 스크롤 행, 5-item overscan
|
|
49
|
-
* - 필터 + 300ms debounce + 매칭 텍스트 하이라이트
|
|
50
|
-
* - 선택 항목 자동 중앙 스크롤
|
|
51
|
-
* - keyProp/displayProp/useObjBinding
|
|
52
|
-
* - 키보드: Esc 닫기, Enter 선택 (Radix Popover 기본 제공)
|
|
53
|
-
*/
|
|
54
|
-
export declare const Select: <T extends Record<string, unknown> = Record<string, unknown>>(props: SelectProps<T> & {
|
|
55
|
-
ref?: React.Ref<SelectHandle>;
|
|
56
|
-
}) => React.ReactElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Select, type SelectProps, type SelectHandle, type DisplayFormatter } from './Select';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface ToggleProps {
|
|
2
|
-
label?: string;
|
|
3
|
-
labelPosition?: 'left' | 'right';
|
|
4
|
-
required?: boolean;
|
|
5
|
-
readonly?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
visible?: boolean;
|
|
8
|
-
/** controlled 값 */
|
|
9
|
-
value?: boolean;
|
|
10
|
-
defaultValue?: boolean;
|
|
11
|
-
onChange?: (value: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Vue 측 Toggle.vue 1:1 포팅 (Switch).
|
|
15
|
-
*
|
|
16
|
-
* - 20px box / 16px handler / translate 16px
|
|
17
|
-
* - cubic-bezier(0.65, 0.05, 0.36, 1) 200ms
|
|
18
|
-
* - border-radius 999px (pill)
|
|
19
|
-
* - focus ring 3px @ rgba(69,104,224,0.2)
|
|
20
|
-
*/
|
|
21
|
-
export declare function Toggle(props: ToggleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Toggle, type ToggleProps } from './Toggle';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vue 측 utils/file.ts의 React 대응.
|
|
3
|
-
*
|
|
4
|
-
* 파일 선택 / 다운로드 단순 유틸리티. file-saver를 peer dep로 사용.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* 파일 선택 다이얼로그를 띄우고 사용자가 선택한 File을 반환.
|
|
8
|
-
*
|
|
9
|
-
* @param accept - file input의 accept 속성 (예: ".xlsx,.csv")
|
|
10
|
-
*/
|
|
11
|
-
export declare function pickFile(accept?: string): Promise<File | null>;
|
|
12
|
-
/**
|
|
13
|
-
* Blob을 파일로 다운로드.
|
|
14
|
-
*
|
|
15
|
-
* file-saver가 설치되어 있으면 그것을 사용하고, 없으면 native a 태그로 fallback.
|
|
16
|
-
*/
|
|
17
|
-
export declare function downloadBlob(blob: Blob, fileName: string): void;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UUID 생성 함수 (v4 형식)
|
|
3
|
-
*/
|
|
4
|
-
export declare function generateUUID(): string;
|
|
5
|
-
/**
|
|
6
|
-
* px를 rem으로 변환
|
|
7
|
-
*/
|
|
8
|
-
export declare function pxToRem(px: number, base?: number): number;
|
|
9
|
-
export declare function uniqueId(prefix?: string): string;
|
|
10
|
-
/**
|
|
11
|
-
* 두 객체의 1차원 키-값 쌍을 비교
|
|
12
|
-
*/
|
|
13
|
-
export declare function shallowEqual(object1: Record<string, unknown>, object2: Record<string, unknown>): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* `{label}` 같은 플레이스홀더를 실제 값으로 치환
|
|
16
|
-
*/
|
|
17
|
-
export declare function formatMessage(template: string, params: Record<string, string | number>): string;
|
|
File without changes
|