@vmscloud/moz-ui-grid-react 0.1.19

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.
Files changed (119) hide show
  1. package/README.md +148 -0
  2. package/dist/MozGrid.d.ts +136 -0
  3. package/dist/bridge/ReactRenderer.d.ts +45 -0
  4. package/dist/bridge/fieldBuilder.d.ts +9 -0
  5. package/dist/bridge/templateRegistry.d.ts +11 -0
  6. package/dist/index.cjs +25 -0
  7. package/dist/index.d.ts +10 -0
  8. package/dist/index.js +96086 -0
  9. package/dist/legacy/components/common/Dragging.d.ts +30 -0
  10. package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +256 -0
  11. package/dist/legacy/components/common/custom-cell/FormulaInput.d.ts +25 -0
  12. package/dist/legacy/components/common/custom-cell/GridCustomCell.d.ts +17 -0
  13. package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +54 -0
  14. package/dist/legacy/components/common/excel/ClientExcelUploadPopup.d.ts +6 -0
  15. package/dist/legacy/components/common/filter/GridFilter.d.ts +13 -0
  16. package/dist/legacy/components/common/footer/GridFooter.d.ts +17 -0
  17. package/dist/legacy/components/common/sort/GridSort.d.ts +12 -0
  18. package/dist/legacy/components/common/toolbar/GridSearchInput.d.ts +26 -0
  19. package/dist/legacy/components/grid/CellEditor.d.ts +9 -0
  20. package/dist/legacy/components/grid/CellTemplate.d.ts +21 -0
  21. package/dist/legacy/components/grid/DetailTemplate.d.ts +8 -0
  22. package/dist/legacy/components/grid/GroupTemplate.d.ts +8 -0
  23. package/dist/legacy/components/grid/HeaderTemplate.d.ts +9 -0
  24. package/dist/legacy/components/grid/MozGridReact.d.ts +12 -0
  25. package/dist/legacy/components/grid/MozGridReactCore.d.ts +28 -0
  26. package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.d.ts +11 -0
  27. package/dist/legacy/components/grid/context-menu/GridContextMenu.d.ts +22 -0
  28. package/dist/legacy/components/grid/group-panel/GroupPanel.d.ts +5 -0
  29. package/dist/legacy/components/grid/toolbar/ColumnPicker.d.ts +18 -0
  30. package/dist/legacy/components/grid/toolbar/GridOptionModal.d.ts +30 -0
  31. package/dist/legacy/components/grid/toolbar/GridSetupPopover.d.ts +25 -0
  32. package/dist/legacy/components/grid/toolbar/GridToolBox.d.ts +49 -0
  33. package/dist/legacy/components/pivot/MozPivotReact.d.ts +47 -0
  34. package/dist/legacy/components/pivot/PivotContextMenu.d.ts +23 -0
  35. package/dist/legacy/components/pivot/PivotFieldChip.d.ts +17 -0
  36. package/dist/legacy/components/pivot/PivotFieldDropZone.d.ts +30 -0
  37. package/dist/legacy/components/pivot/PivotFieldPanel.d.ts +26 -0
  38. package/dist/legacy/components/pivot/PivotOptionModal.d.ts +36 -0
  39. package/dist/legacy/components/pivot/PivotToolBox.d.ts +56 -0
  40. package/dist/legacy/components/pivot/chart/EChart.d.ts +18 -0
  41. package/dist/legacy/components/pivot/chart/MozPivotChart.d.ts +23 -0
  42. package/dist/legacy/components/pivot/chart/PivotChartDetail.d.ts +17 -0
  43. package/dist/legacy/components/pivot/chart/PivotChartMini.d.ts +19 -0
  44. package/dist/legacy/components/pivot/chart/PivotChartMultiple.d.ts +16 -0
  45. package/dist/legacy/components/pivot/chart/PivotChartToolbar.d.ts +32 -0
  46. package/dist/legacy/components/pivot/chart/chartUtils.d.ts +45 -0
  47. package/dist/legacy/contexts/index.d.ts +31 -0
  48. package/dist/legacy/contracts/notification.contract.d.ts +34 -0
  49. package/dist/legacy/hooks/index.d.ts +16 -0
  50. package/dist/legacy/hooks/useCellTooltip.d.ts +8 -0
  51. package/dist/legacy/hooks/useClientExcelExport.d.ts +27 -0
  52. package/dist/legacy/hooks/useClientExcelStore.d.ts +18 -0
  53. package/dist/legacy/hooks/useContextMenu.d.ts +62 -0
  54. package/dist/legacy/hooks/useGridBulkEditor.d.ts +16 -0
  55. package/dist/legacy/hooks/useGridChanges.d.ts +10 -0
  56. package/dist/legacy/hooks/useGridColumns.d.ts +11 -0
  57. package/dist/legacy/hooks/useGridCustomCell.d.ts +32 -0
  58. package/dist/legacy/hooks/useGridCustomCellModule.d.ts +9 -0
  59. package/dist/legacy/hooks/useGridEvents.d.ts +13 -0
  60. package/dist/legacy/hooks/useGridFilter.d.ts +19 -0
  61. package/dist/legacy/hooks/useGridInstance.d.ts +9 -0
  62. package/dist/legacy/hooks/useGridSelect.d.ts +10 -0
  63. package/dist/legacy/hooks/useGridSelection.d.ts +6 -0
  64. package/dist/legacy/hooks/useGridSort.d.ts +16 -0
  65. package/dist/legacy/hooks/useGridUndoRedo.d.ts +10 -0
  66. package/dist/legacy/hooks/useGridValidation.d.ts +9 -0
  67. package/dist/legacy/hooks/useSearchHighlight.d.ts +9 -0
  68. package/dist/legacy/icons/index.d.ts +36 -0
  69. package/dist/legacy/index.d.ts +71 -0
  70. package/dist/legacy/locale/MozConfigProvider.d.ts +31 -0
  71. package/dist/legacy/locale/contextWrapper.d.ts +19 -0
  72. package/dist/legacy/locale/en.d.ts +2 -0
  73. package/dist/legacy/locale/index.d.ts +8 -0
  74. package/dist/legacy/locale/ja.d.ts +2 -0
  75. package/dist/legacy/locale/ko.d.ts +2 -0
  76. package/dist/legacy/locale/types.d.ts +328 -0
  77. package/dist/legacy/locale/useMozLocale.d.ts +15 -0
  78. package/dist/legacy/locale/zh.d.ts +2 -0
  79. package/dist/legacy/stories/MozGridReact.stories.d.ts +7 -0
  80. package/dist/legacy/stories/MozPivotReact.stories.d.ts +44 -0
  81. package/dist/legacy/stories/_helpers/sampleData.d.ts +54 -0
  82. package/dist/legacy/types/pivot-props.d.ts +62 -0
  83. package/dist/legacy/types/props.d.ts +118 -0
  84. package/dist/legacy/types/toolbar.d.ts +117 -0
  85. package/dist/legacy/ui/button/Button.d.ts +18 -0
  86. package/dist/legacy/ui/button/index.d.ts +1 -0
  87. package/dist/legacy/ui/checkbox/CheckBox.d.ts +17 -0
  88. package/dist/legacy/ui/checkbox/icons.d.ts +9 -0
  89. package/dist/legacy/ui/checkbox/index.d.ts +1 -0
  90. package/dist/legacy/ui/context-menu/ContextMenu.d.ts +36 -0
  91. package/dist/legacy/ui/context-menu/index.d.ts +2 -0
  92. package/dist/legacy/ui/context-menu/types.d.ts +26 -0
  93. package/dist/legacy/ui/date-input/DateInput.d.ts +25 -0
  94. package/dist/legacy/ui/date-input/index.d.ts +1 -0
  95. package/dist/legacy/ui/empty-state/EmptyState.d.ts +28 -0
  96. package/dist/legacy/ui/empty-state/index.d.ts +1 -0
  97. package/dist/legacy/ui/input/Input.d.ts +27 -0
  98. package/dist/legacy/ui/input/index.d.ts +1 -0
  99. package/dist/legacy/ui/multi-select/MultiSelect.d.ts +43 -0
  100. package/dist/legacy/ui/multi-select/index.d.ts +1 -0
  101. package/dist/legacy/ui/number-input/NumberInput.d.ts +22 -0
  102. package/dist/legacy/ui/number-input/index.d.ts +1 -0
  103. package/dist/legacy/ui/popup/Popup.d.ts +50 -0
  104. package/dist/legacy/ui/popup/index.d.ts +1 -0
  105. package/dist/legacy/ui/select/Select.d.ts +56 -0
  106. package/dist/legacy/ui/select/index.d.ts +1 -0
  107. package/dist/legacy/ui/toggle/Toggle.d.ts +21 -0
  108. package/dist/legacy/ui/toggle/index.d.ts +1 -0
  109. package/dist/legacy/utils/cn.d.ts +5 -0
  110. package/dist/legacy/utils/file.d.ts +17 -0
  111. package/dist/legacy/utils/index.d.ts +2 -0
  112. package/dist/legacy/utils/misc.d.ts +17 -0
  113. package/dist/stories/MozGrid.stories.d.ts +18 -0
  114. package/dist/style.css +1 -0
  115. package/dist/types/slots.d.ts +49 -0
  116. package/docs/manual/examples.md +2385 -0
  117. package/docs/manual/reference.md +4695 -0
  118. package/docs/manual/reference_react.md +720 -0
  119. package/package.json +104 -0
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Vue 측 Dragging.vue + draggingEventBus 포팅.
4
+ *
5
+ * 컬럼/필드를 드래그할 때 마우스를 따라다니는 ghost element를 렌더링.
6
+ * 외부에서 emit('start' | 'end') 호출로 표시 토글.
7
+ */
8
+ type DraggingPayload = {
9
+ visible: boolean;
10
+ label?: string;
11
+ x?: number;
12
+ y?: number;
13
+ } | null;
14
+ type Listener = (payload: DraggingPayload) => void;
15
+ declare class DraggingEventBus {
16
+ private listeners;
17
+ emit(payload: DraggingPayload): void;
18
+ on(listener: Listener): () => void;
19
+ }
20
+ export declare const draggingEventBus: DraggingEventBus;
21
+ interface DraggingProps {
22
+ children?: ReactNode;
23
+ }
24
+ /**
25
+ * 드래그 ghost 컨테이너.
26
+ *
27
+ * App root에 한 번 배치. draggingEventBus.emit({visible, label, x, y})로 표시.
28
+ */
29
+ export declare function Dragging(_props: DraggingProps): import("react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -0,0 +1,256 @@
1
+ /**
2
+ * FormulaEngine - 수식 파서 및 평가기
3
+ *
4
+ * 컬럼 참조: [컬럼헤더] 또는 $binding
5
+ * 비교 연산자: =, ==, !=, ≠, <>, <, >, <=, ≤, >=, ≥
6
+ * 논리 연산자: AND, &&, OR, ||, NOT, !
7
+ * 산술 연산자: +, -, *, /, %
8
+ * 문자열 연산자: CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH
9
+ * NULL 체크: IS_EMPTY, IS_NOT_EMPTY
10
+ * 날짜 리터럴: #2025-09-05# 또는 #2025-09-05 14:30:00#
11
+ * 함수: ABS(), ROUND(), LEN(), UPPER(), LOWER(), TRIM(), NOW(), TODAY(), DAYS(), IF(), COALESCE()
12
+ */
13
+ /** Wijmo DataType 호환 상수 */
14
+ declare const DataType: {
15
+ readonly String: 1;
16
+ readonly Number: 2;
17
+ readonly Boolean: 3;
18
+ readonly Date: 4;
19
+ };
20
+ type DataType = number;
21
+ /** 토큰 타입 */
22
+ export declare enum TokenType {
23
+ NUMBER = "NUMBER",
24
+ STRING = "STRING",
25
+ BOOLEAN = "BOOLEAN",
26
+ NULL = "NULL",
27
+ DATE = "DATE",// #2025-09-05# 형식
28
+ COLUMN_REF = "COLUMN_REF",// [컬럼명]
29
+ BINDING_REF = "BINDING_REF",// $binding
30
+ PLUS = "PLUS",// +
31
+ MINUS = "MINUS",// -
32
+ MULTIPLY = "MULTIPLY",// *
33
+ DIVIDE = "DIVIDE",// /
34
+ MODULO = "MODULO",// % (산술)
35
+ EQ = "EQ",// =, ==
36
+ NEQ = "NEQ",// !=, ≠, <>
37
+ LT = "LT",// <
38
+ GT = "GT",// >
39
+ LTE = "LTE",// <=, ≤
40
+ GTE = "GTE",// >=, ≥
41
+ AND = "AND",
42
+ OR = "OR",
43
+ NOT = "NOT",
44
+ CONTAINS = "CONTAINS",
45
+ NOT_CONTAINS = "NOT_CONTAINS",
46
+ STARTS_WITH = "STARTS_WITH",
47
+ ENDS_WITH = "ENDS_WITH",
48
+ LIKE = "LIKE",// SQL LIKE 스타일
49
+ IS_EMPTY = "IS_EMPTY",
50
+ IS_NOT_EMPTY = "IS_NOT_EMPTY",
51
+ LPAREN = "LPAREN",// (
52
+ RPAREN = "RPAREN",// )
53
+ COMMA = "COMMA",// ,
54
+ FUNCTION = "FUNCTION",
55
+ EOF = "EOF"
56
+ }
57
+ /** 토큰 */
58
+ export interface Token {
59
+ type: TokenType;
60
+ value: any;
61
+ position: number;
62
+ }
63
+ /** AST 노드 타입 */
64
+ export type ASTNode = LiteralNode | ColumnRefNode | BinaryOpNode | UnaryOpNode | FunctionCallNode | PostfixOpNode;
65
+ export interface LiteralNode {
66
+ type: 'Literal';
67
+ value: any;
68
+ dataType: 'number' | 'string' | 'boolean' | 'null' | 'date';
69
+ }
70
+ export interface ColumnRefNode {
71
+ type: 'ColumnRef';
72
+ name: string;
73
+ isBinding: boolean;
74
+ }
75
+ export interface BinaryOpNode {
76
+ type: 'BinaryOp';
77
+ operator: string;
78
+ left: ASTNode;
79
+ right: ASTNode;
80
+ }
81
+ export interface UnaryOpNode {
82
+ type: 'UnaryOp';
83
+ operator: string;
84
+ operand: ASTNode;
85
+ }
86
+ export interface PostfixOpNode {
87
+ type: 'PostfixOp';
88
+ operator: string;
89
+ operand: ASTNode;
90
+ }
91
+ export interface FunctionCallNode {
92
+ type: 'FunctionCall';
93
+ name: string;
94
+ args: ASTNode[];
95
+ }
96
+ /** 파싱 결과 */
97
+ export interface ParseResult {
98
+ success: boolean;
99
+ ast?: ASTNode;
100
+ error?: string;
101
+ errorPosition?: number;
102
+ }
103
+ /** 평가 결과 */
104
+ export interface EvaluateResult {
105
+ success: boolean;
106
+ value?: any;
107
+ error?: string;
108
+ }
109
+ /** 컬럼 정보 */
110
+ export interface ColumnInfo {
111
+ header: string;
112
+ binding: string;
113
+ dataType?: DataType;
114
+ }
115
+ export declare class FormulaLexer {
116
+ private input;
117
+ private position;
118
+ private tokens;
119
+ private static readonly KEYWORDS;
120
+ private static readonly FUNCTIONS;
121
+ constructor(input: string);
122
+ tokenize(): Token[];
123
+ private skipWhitespace;
124
+ private peek;
125
+ private isDigit;
126
+ private isAlpha;
127
+ private isAlphaNumeric;
128
+ private addToken;
129
+ private readColumnRef;
130
+ private readBindingRef;
131
+ private readString;
132
+ private readDateLiteral;
133
+ private readNumber;
134
+ private readIdentifier;
135
+ private readOperator;
136
+ }
137
+ export declare class FormulaParser {
138
+ private tokens;
139
+ private position;
140
+ constructor(tokens: Token[]);
141
+ parse(): ASTNode;
142
+ private current;
143
+ private advance;
144
+ private expect;
145
+ private parseExpression;
146
+ private parseOrExpr;
147
+ private parseAndExpr;
148
+ private parseNotExpr;
149
+ private parseComparison;
150
+ private parseStringOp;
151
+ private parseAdditive;
152
+ private parseMultiplicative;
153
+ private parseUnary;
154
+ private parsePrimary;
155
+ private parseFunctionCall;
156
+ }
157
+ export declare class FormulaEvaluator {
158
+ private columnMap;
159
+ private bindingSet;
160
+ private columnTypeMap;
161
+ constructor(columns: ColumnInfo[]);
162
+ /**
163
+ * 컬럼 참조 노드에서 데이터 타입 가져오기
164
+ */
165
+ private getColumnDataType;
166
+ /**
167
+ * 컬럼 타입에 따라 값을 변환
168
+ * - String 타입: 문자열로 변환
169
+ * - Number 타입: 숫자로 변환 시도
170
+ * - Date 타입: 날짜로 변환 시도
171
+ * - Boolean 타입: 불린으로 변환
172
+ */
173
+ private coerceValueByColumnType;
174
+ evaluate(ast: ASTNode, rowData: Record<string, any>): any;
175
+ private evaluateColumnRef;
176
+ private evaluateBinaryOp;
177
+ private evaluateUnaryOp;
178
+ private evaluatePostfixOp;
179
+ private evaluateFunctionCall;
180
+ private toBoolean;
181
+ private toNumber;
182
+ private toDate;
183
+ /**
184
+ * Date 객체를 YYYY-MM-DD 형식의 문자열로 변환
185
+ */
186
+ private formatDateString;
187
+ /**
188
+ * 값을 날짜 문자열로 변환 (Date 객체면 YYYY-MM-DD 형식, 아니면 그대로 String)
189
+ */
190
+ private toDateString;
191
+ /**
192
+ * 문자열 연산에 사용할 문자열 변환 (Date 객체 또는 Date로 변환 가능한 값은 YYYY-MM-DD 형식)
193
+ */
194
+ private toStringForComparison;
195
+ private isEmpty;
196
+ private isEqual;
197
+ private compare;
198
+ private matchLike;
199
+ }
200
+ export declare class FormulaEngine {
201
+ private columns;
202
+ constructor(columns?: ColumnInfo[]);
203
+ /**
204
+ * 컬럼 정보 업데이트
205
+ */
206
+ setColumns(columns: ColumnInfo[]): void;
207
+ /**
208
+ * 수식 파싱
209
+ */
210
+ parse(formula: string): ParseResult;
211
+ /**
212
+ * 수식 유효성 검사
213
+ */
214
+ validate(formula: string): ParseResult;
215
+ /**
216
+ * 수식 평가 (단일 행)
217
+ */
218
+ evaluate(formula: string, rowData: Record<string, any>): EvaluateResult;
219
+ /**
220
+ * AST 직접 평가 (반복 평가 시 파싱 비용 절약)
221
+ */
222
+ evaluateAST(ast: ASTNode, rowData: Record<string, any>): EvaluateResult;
223
+ /**
224
+ * 수식에서 참조하는 컬럼 목록 추출
225
+ */
226
+ getReferencedColumns(formula: string): string[];
227
+ private validateColumnRefs;
228
+ /**
229
+ * 노드의 의미상 타입 추론
230
+ * - Literal: dataType 기반
231
+ * - ColumnRef: columns 메타데이터 기반
232
+ * - 그 외: 보수적으로 'unknown'
233
+ */
234
+ private inferNodeType;
235
+ /**
236
+ * 타입/연산자 조합 유효성 검사
237
+ * - 비교/문자열 연산자에 대해서만 보수적으로 체크
238
+ * - 규칙과 맞지 않는 경우 에러를 던져 상위 validate에서 잡도록 함
239
+ */
240
+ private validateOperatorTypes;
241
+ private collectColumnRefs;
242
+ private extractPosition;
243
+ /**
244
+ * 내부 파서/렉서 에러 메시지를 사용자 친화적인 한글 메시지로 변환
245
+ */
246
+ private toFriendlyErrorMessage;
247
+ }
248
+ /**
249
+ * 수식 파싱 및 평가 (간단한 사용)
250
+ */
251
+ export declare function evaluateFormula(formula: string, rowData: Record<string, any>, columns?: ColumnInfo[]): EvaluateResult;
252
+ /**
253
+ * 수식 유효성 검사
254
+ */
255
+ export declare function validateFormula(formula: string, columns?: ColumnInfo[]): ParseResult;
256
+ export {};
@@ -0,0 +1,25 @@
1
+ import { ColumnInfo } from './useFormulaAutocomplete';
2
+ export interface FormulaInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onBlur?: () => void;
6
+ columns: ColumnInfo[];
7
+ placeholder?: string;
8
+ hasError?: boolean;
9
+ rows?: number;
10
+ disabled?: boolean;
11
+ /** 포커스 시 자동완성 자동 표시 (기본 true) */
12
+ showSuggestionsOnFocus?: boolean;
13
+ }
14
+ export interface FormulaInputHandle {
15
+ focus: () => void;
16
+ }
17
+ /**
18
+ * Vue 측 FormulaInput.vue 1:1 포팅.
19
+ *
20
+ * - textarea 위에 투명 텍스트 + 색상 강조 오버레이 합성으로 구문 강조
21
+ * - useFormulaAutocomplete로 컨텍스트별 제안 목록 생성, body에 portal로 dropdown 렌더
22
+ * - Up/Down/Enter/Tab/Escape 키 네비, [/"/' 자동 짝맞춤
23
+ * - IME 조합(한글) 안전: composing 텍스트로 오버레이/컨텍스트 동기화
24
+ */
25
+ export declare const FormulaInput: import('react').ForwardRefExoticComponent<FormulaInputProps & import('react').RefAttributes<FormulaInputHandle>>;
@@ -0,0 +1,17 @@
1
+ interface GridCustomCellProps {
2
+ visible: boolean;
3
+ onVisibleChange: (visible: boolean) => void;
4
+ gridKey?: string;
5
+ dateFormat?: string;
6
+ }
7
+ /**
8
+ * Vue 측 GridCustomCell.vue 1:1 포팅.
9
+ *
10
+ * 다중 규칙셋 기반 조건부 셀 스타일 설정 팝업.
11
+ * - 규칙셋 헤더(우선순위 뱃지/이름/이동/삭제)
12
+ * - 수식 모드(FormulaInput) + UI 모드(Select+Select+Input by type)
13
+ * - 적용 컬럼(MultiSelect) + 색상 dropdown(배경/글자색 preset 5개씩 + 커스텀)
14
+ * - 즉시 적용 체크박스, 행 수 ≥ 10만이면 자동 off
15
+ */
16
+ export declare function GridCustomCell({ visible, onVisibleChange, dateFormat }: GridCustomCellProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,54 @@
1
+ /**
2
+ * useFormulaAutocomplete - 수식 자동완성 로직 (Vue useFormulaAutocomplete.ts 1:1 포팅).
3
+ *
4
+ * 컨텍스트 감지:
5
+ * - `[` 입력 시 → 컬럼 목록
6
+ * - 컬럼 뒤 → 연산자 목록 (데이터 타입 기반 필터링)
7
+ * - 산술 연산자 뒤 → 숫자 힌트, 컬럼
8
+ * - 비교 연산자 뒤 → 값 입력 힌트, 컬럼
9
+ * - 값/산술표현식 뒤 → 산술/비교/논리 연산자
10
+ * - AND/OR 뒤 → 컬럼, NOT
11
+ */
12
+ export type ParsedTokenType = 'ColumnRef' | 'Number' | 'String' | 'Date' | 'Boolean' | 'ArithmeticOp' | 'ComparisonOp' | 'StringOp' | 'LogicalOp' | 'PostfixOp' | 'OpenParen' | 'CloseParen' | 'Unknown';
13
+ export interface ParsedToken {
14
+ type: ParsedTokenType;
15
+ value: string;
16
+ start: number;
17
+ end: number;
18
+ }
19
+ export type SuggestionType = 'column' | 'operator' | 'logical' | 'value' | 'function';
20
+ export interface Suggestion {
21
+ type: SuggestionType;
22
+ value: string;
23
+ displayText: string;
24
+ description?: string;
25
+ insertText?: string;
26
+ }
27
+ export interface ColumnInfo {
28
+ header: string;
29
+ binding: string;
30
+ dataType?: number;
31
+ }
32
+ export type ContextState = 'start' | 'in_column' | 'after_column' | 'in_operator' | 'after_arithmetic_op' | 'after_comparison_op' | 'after_string_op' | 'after_postfix_op' | 'after_operator' | 'in_value' | 'after_value' | 'after_arithmetic_expr';
33
+ export interface UseFormulaAutocompleteReturn {
34
+ /** 현재 컨텍스트 상태 */
35
+ contextState: ContextState;
36
+ /** 현재 입력 중인 토큰 (필터링용) */
37
+ currentToken: string;
38
+ /** 현재 제안 목록 */
39
+ suggestions: Suggestion[];
40
+ /** 텍스트/커서 위치 기반으로 컨텍스트 분석 (상태 업데이트) */
41
+ analyzeContext: (text: string, cursorPosition: number) => void;
42
+ /** 제안 항목 선택 시 삽입할 텍스트 계산 */
43
+ getInsertText: (suggestion: Suggestion, currentText: string, cursorPosition: number) => {
44
+ newText: string;
45
+ newCursorPosition: number;
46
+ };
47
+ }
48
+ /**
49
+ * Vue 측 `useFormulaAutocomplete` 컴포저블의 React 대응.
50
+ *
51
+ * 내부 상태(`contextState`, `currentToken`, `tokenStartPosition`)는 `analyzeContext`로
52
+ * 갱신하고, `suggestions`는 그에 따라 useMemo로 자동 재계산된다.
53
+ */
54
+ export declare function useFormulaAutocomplete(columns: ColumnInfo[]): UseFormulaAutocompleteReturn;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Vue 측 ClientExcelUploadPopup.vue 포팅 (클라이언트사이드 엑셀 업로드 팝업).
3
+ *
4
+ * useClientExcelStore.show(grid)로 활성화. grid.io.importXlsx로 데이터 import.
5
+ */
6
+ export declare function ClientExcelUploadPopup(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ interface GridFilterProps {
2
+ visible: boolean;
3
+ onVisibleChange: (visible: boolean) => void;
4
+ dateFormat?: string;
5
+ }
6
+ /**
7
+ * Vue 측 GridFilter.vue 1:1 포팅.
8
+ *
9
+ * 다중 조건 필터 팝업. 드래그 우선순위, 컬럼 타입별 입력 컨트롤, AND/OR 논리 연산자,
10
+ * 바로 적용 체크박스 지원.
11
+ */
12
+ export declare function GridFilter({ visible, onVisibleChange, dateFormat }: GridFilterProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ interface GridFooterProps {
3
+ /** 필터링된 행 수 (외부 주입). 미지정 시 grid의 viewState.visibleRowCount 구독 */
4
+ filteredRowCount?: number;
5
+ /** 총 행 수 (외부 주입). 미지정 시 grid의 viewState.totalRowCount 구독 */
6
+ totalRowCount?: number;
7
+ /** 우측 슬롯 */
8
+ children?: ReactNode;
9
+ }
10
+ /**
11
+ * Vue 측 GridFooter.vue 1:1 포팅.
12
+ *
13
+ * 좌측: 총/필터 행 수, 가운데: 선택 영역 집계(AVG/COUNT/MIN/MAX/SUM), 우측: 자식 슬롯.
14
+ * grid의 selection:changed 이벤트를 구독해 `grid.rows.selectionAggregates()`로 집계 갱신.
15
+ */
16
+ export declare function GridFooter({ filteredRowCount: extFiltered, totalRowCount: extTotal, children }: GridFooterProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ interface GridSortProps {
2
+ visible: boolean;
3
+ onVisibleChange: (visible: boolean) => void;
4
+ width?: number;
5
+ }
6
+ /**
7
+ * Vue 측 GridSort.vue 1:1 포팅.
8
+ *
9
+ * 다중 레벨 정렬 팝업. 드래그앤드롭으로 우선순위 변경, 바로 적용 체크박스 지원.
10
+ */
11
+ export declare function GridSort({ visible, onVisibleChange, width }: GridSortProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Vue 측 GridSearchInput.vue 1:1 포팅.
3
+ *
4
+ * Core PureSheet.search() API에 위임. 좌우 prev/next 버튼, 검색 카운트 popup,
5
+ * 한글 IME 처리, 엔터 키 반복(hold-repeat) 지원.
6
+ */
7
+ export interface GridSearchInputProps {
8
+ label?: string | null;
9
+ isRequired?: boolean;
10
+ isDisabled?: boolean;
11
+ isReadOnly?: boolean;
12
+ value?: string;
13
+ placeholder?: string;
14
+ showSearchIcon?: boolean;
15
+ className?: string;
16
+ onChange?: (value: string) => void;
17
+ onSearch?: (keyword: string) => void;
18
+ onNavigate?: (cell: {
19
+ row: number;
20
+ col: number;
21
+ } | null) => void;
22
+ }
23
+ export interface GridSearchInputHandle {
24
+ resetSearch: () => void;
25
+ }
26
+ export declare const GridSearchInput: import('react').ForwardRefExoticComponent<GridSearchInputProps & import('react').RefAttributes<GridSearchInputHandle>>;
@@ -0,0 +1,9 @@
1
+ import { ComponentType } from 'react';
2
+ import { EditorSlotProps, TemplateRegistry } from '../../../types/slots';
3
+ /** Vue 측 CellEditor.ts의 React 대응 */
4
+ export declare class CellEditor {
5
+ fieldId: string;
6
+ component: ComponentType<EditorSlotProps>;
7
+ constructor(fieldId: string, component: ComponentType<EditorSlotProps>);
8
+ attach(registry: TemplateRegistry): () => void;
9
+ }
@@ -0,0 +1,21 @@
1
+ import { ComponentType } from 'react';
2
+ import { CellSlotProps, TemplateRegistry } from '../../../types/slots';
3
+ /**
4
+ * Vue 측 CellTemplate.ts의 React 대응.
5
+ *
6
+ * 컬럼별 셀 렌더링을 React 컴포넌트로 등록하는 helper class.
7
+ * MozGridReactCore의 templateRegistry에 등록되어 fieldBuilder가 cellRenderer로 변환.
8
+ *
9
+ * @example
10
+ * const registry = useContext(GridTemplateRegistryContext);
11
+ * useEffect(() => {
12
+ * registry.register({ type: 'cell', fieldId: 'status', component: StatusCell });
13
+ * return () => registry.unregister('cell', 'status');
14
+ * }, [registry]);
15
+ */
16
+ export declare class CellTemplate {
17
+ fieldId: string;
18
+ component: ComponentType<CellSlotProps>;
19
+ constructor(fieldId: string, component: ComponentType<CellSlotProps>);
20
+ attach(registry: TemplateRegistry): () => void;
21
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentType } from 'react';
2
+ import { DetailSlotProps, TemplateRegistry } from '../../../types/slots';
3
+ /** Vue 측 DetailTemplate.ts의 React 대응 */
4
+ export declare class DetailTemplate {
5
+ component: ComponentType<DetailSlotProps>;
6
+ constructor(component: ComponentType<DetailSlotProps>);
7
+ attach(registry: TemplateRegistry): () => void;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentType } from 'react';
2
+ import { GroupSlotProps, TemplateRegistry } from '../../../types/slots';
3
+ /** Vue 측 GroupTemplate.ts의 React 대응 */
4
+ export declare class GroupTemplate {
5
+ component: ComponentType<GroupSlotProps>;
6
+ constructor(component: ComponentType<GroupSlotProps>);
7
+ attach(registry: TemplateRegistry): () => void;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { ComponentType } from 'react';
2
+ import { HeaderSlotProps, TemplateRegistry } from '../../../types/slots';
3
+ /** Vue 측 HeaderTemplate.ts의 React 대응 */
4
+ export declare class HeaderTemplate {
5
+ fieldId: string;
6
+ component: ComponentType<HeaderSlotProps>;
7
+ constructor(fieldId: string, component: ComponentType<HeaderSlotProps>);
8
+ attach(registry: TemplateRegistry): () => void;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { MozGridReactCoreHandle } from './MozGridReactCore';
2
+ import { MozGridReactProps } from '../../types/props';
3
+ /**
4
+ * Vue 측 MozGridVue.vue의 React 대응.
5
+ *
6
+ * MozGridReactCore + toolbar(검색/필터/정렬/조건부스타일/설정) + footer + 빈 상태 + 컨텍스트 메뉴.
7
+ *
8
+ * ⚠️ GridInstanceContext는 wrapper 레벨에서도 Provider를 둠. 그래야 MozGridReactCore
9
+ * **외부**에 마운트된 GridToolBox / ColumnPicker / GridFooter 등도 useGridInstance()로
10
+ * grid에 접근할 수 있음. Vue도 동일한 패턴(`provide(GRID_INSTANCE_KEY, gridInstance)`).
11
+ */
12
+ export declare const MozGridReact: import('react').ForwardRefExoticComponent<MozGridReactProps & import('react').RefAttributes<MozGridReactCoreHandle>>;
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { PureSheet, SortState, FilterState } from '@vmscloud/moz-ui-grid-core';
3
+ import { MozGridReactCoreProps } from '../../types/props';
4
+ /**
5
+ * Vue 측 MozGridVueCore.vue의 React 대응.
6
+ *
7
+ * - PureSheet 인스턴스 생성/소멸
8
+ * - ReactRenderer를 통한 React 컴포넌트 ↔ DOM 매핑
9
+ * - templateRegistry 관리
10
+ * - Context로 하위 트리에 PureSheet/Renderer/Registry 노출
11
+ * - PureSheet 이벤트 → onXxx 콜백 fan-out
12
+ */
13
+ export interface MozGridReactCoreHandle {
14
+ /** PureSheet 인스턴스 직접 접근 */
15
+ grid: PureSheet | null;
16
+ /** 그리드 갱신 */
17
+ refresh: () => Promise<void>;
18
+ /** 데이터 로드 */
19
+ loadData: (data: Record<string, unknown>[]) => Promise<void>;
20
+ /** 정렬 */
21
+ sort: (sorts: SortState[]) => Promise<void>;
22
+ /** 필터 */
23
+ filter: (filters: FilterState[]) => Promise<void>;
24
+ /** 그리드 소멸 */
25
+ destroy: () => void;
26
+ }
27
+ export declare const MozGridReactCore: import('react').ForwardRefExoticComponent<MozGridReactCoreProps & import('react').RefAttributes<MozGridReactCoreHandle>>;
28
+ export type { ReactNode };
@@ -0,0 +1,11 @@
1
+ interface GridBulkEditorProps {
2
+ visible: boolean;
3
+ onVisibleChange: (visible: boolean) => void;
4
+ /** 일괄 편집 대상 컬럼 이름 (locale.Grid.contextBulkEdit의 {name} 치환에 사용) */
5
+ columnName?: string;
6
+ }
7
+ /**
8
+ * Vue 측 GridBulkEditor.vue 포팅 (간단한 일괄 편집 팝업).
9
+ */
10
+ export declare function GridBulkEditor({ visible, onVisibleChange, columnName }: GridBulkEditorProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,22 @@
1
+ import { ContextMenuContext, ContextMenuCallbacks } from '../../../hooks/useContextMenu';
2
+ import { IContextMenuConfig } from '../../../types/toolbar';
3
+ interface GridContextMenuProps extends ContextMenuCallbacks {
4
+ config?: IContextMenuConfig;
5
+ }
6
+ export interface GridContextMenuHandle {
7
+ /** 외부 호스트가 직접 메뉴를 띄울 때 */
8
+ open: (ctx: ContextMenuContext, position: {
9
+ left: number;
10
+ top: number;
11
+ }) => void;
12
+ close: () => void;
13
+ }
14
+ /**
15
+ * Vue 측 GridContextMenu.vue 1:1 포팅.
16
+ *
17
+ * PureSheet의 'contextmenu' 이벤트를 구독해 우클릭 시 메뉴를 띄우고,
18
+ * 메뉴 항목을 Vue와 동일한 order 기반(10/20/30/40/50/60) 그룹으로 정렬해 렌더링한다.
19
+ * 셀/그룹 헤더 구분, 컬럼별 필터·정렬 초기화 활성화 등 Vue 로직을 모두 포팅.
20
+ */
21
+ export declare const GridContextMenu: import('react').ForwardRefExoticComponent<GridContextMenuProps & import('react').RefAttributes<GridContextMenuHandle>>;
22
+ export {};
@@ -0,0 +1,5 @@
1
+ interface GroupPanelProps {
2
+ visible?: boolean;
3
+ }
4
+ export declare function GroupPanel({ visible }: GroupPanelProps): import("react/jsx-runtime").JSX.Element | null;
5
+ export {};
@@ -0,0 +1,18 @@
1
+ interface ColumnPickerProps {
2
+ visible: boolean;
3
+ onVisibleChange: (visible: boolean) => void;
4
+ /** 키 필드들은 토글 비활성화 (그리드 정합성) */
5
+ keyFields?: string[];
6
+ dataKey?: string | string[];
7
+ }
8
+ /**
9
+ * Vue 측 ColumnPicker.vue 1:1 포팅 (열 표시/숨김 팝업).
10
+ *
11
+ * - Popup preset='no-footer' (body 안에 actions 영역)
12
+ * - 전체 선택 체크박스 + 초기화 버튼 (변경 사항 있을 때만 enabled)
13
+ * - 2-column grid, 드래그앤드롭으로 순서 변경
14
+ * - keyFields는 체크박스 disabled
15
+ * - core API: grid.columns.getMap / setHidden / setOrder
16
+ */
17
+ export declare function ColumnPicker({ visible, onVisibleChange, keyFields, dataKey }: ColumnPickerProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ export interface GridOptionMenuItem {
3
+ header: string;
4
+ clicked?: () => void;
5
+ isVisibleOnGridOption?: boolean;
6
+ }
7
+ export interface GridOptionModalProps {
8
+ /** popover content이므로 외부 trigger의 open 상태로 제어 */
9
+ onClose?: () => void;
10
+ /** 열 표시/숨김 메뉴 노출 */
11
+ useViewSelectColumn?: boolean;
12
+ customMenu?: GridOptionMenuItem[];
13
+ toolbarVisible?: boolean;
14
+ footerVisible?: boolean;
15
+ groupPanelVisible?: boolean;
16
+ onToolbarVisibleChange?: (v: boolean) => void;
17
+ onFooterVisibleChange?: (v: boolean) => void;
18
+ onGroupPanelVisibleChange?: (v: boolean) => void;
19
+ onClickColumnPicker?: () => void;
20
+ /** 헤더 영역 우측 슬롯 (있으면 close 버튼 옆에 표시) */
21
+ headerRight?: ReactNode;
22
+ }
23
+ /**
24
+ * Vue 측 GridOptionModal.vue 1:1 포팅.
25
+ *
26
+ * Vue는 ContextMenu의 template slot으로 띄웠지만 React는 GridSetupPopover의
27
+ * content로 들어가도록 구성됨. 시각 구조는 동일 (헤더 + separator + 토글 3개 +
28
+ * separator + 열 표시 메뉴 + customMenu).
29
+ */
30
+ export declare function GridOptionModal(props: GridOptionModalProps): import("react/jsx-runtime").JSX.Element;