@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,25 @@
1
+ import { ReactNode } from 'react';
2
+ interface GridSetupPopoverProps {
3
+ /** trigger element. 클릭 시 popover 토글 */
4
+ trigger: ReactNode;
5
+ /** popover 내용 */
6
+ children: ReactNode;
7
+ /** 외부 제어 시 사용 (uncontrolled면 내부 상태) */
8
+ open?: boolean;
9
+ onOpenChange?: (open: boolean) => void;
10
+ }
11
+ export interface GridSetupPopoverHandle {
12
+ close: () => void;
13
+ toggle: () => void;
14
+ }
15
+ /**
16
+ * 설정 아이콘 바로 아래에 뜨는 popover.
17
+ *
18
+ * Tool Bar 보기 토글이 꺼져 ToolBox 컨테이너가 숨겨져도 popover 위치가 유지되도록
19
+ * Radix Popover 대신 자체 fixed-position 구현 + React Portal 사용.
20
+ * - trigger 클릭 시점에 좌표 측정 → state에 freeze
21
+ * - popover content는 document.body에 createPortal로 마운트 (ToolBox tree와 분리)
22
+ * - 외부 클릭 / Escape 키 / 리사이즈로 닫힘
23
+ */
24
+ export declare const GridSetupPopover: import('react').ForwardRefExoticComponent<GridSetupPopoverProps & import('react').RefAttributes<GridSetupPopoverHandle>>;
25
+ export {};
@@ -0,0 +1,49 @@
1
+ import { ReactNode } from 'react';
2
+ import { GridOptionMenuItem } from './GridOptionModal';
3
+ export interface GridToolBoxProps {
4
+ itemsLength?: number;
5
+ filterCount?: number;
6
+ sortCount?: number;
7
+ customCellCount?: number;
8
+ expanded?: boolean;
9
+ onExpandedChange?: (v: boolean) => void;
10
+ toolbarVisible?: boolean;
11
+ footerVisible?: boolean;
12
+ groupPanelVisible?: boolean;
13
+ onToolbarVisibleChange?: (v: boolean) => void;
14
+ onFooterVisibleChange?: (v: boolean) => void;
15
+ onGroupPanelVisibleChange?: (v: boolean) => void;
16
+ useToolBoxSetting?: boolean;
17
+ useSort?: boolean;
18
+ useCustomCell?: boolean;
19
+ /** 편집 모드 — Undo/Redo 버튼 표시 */
20
+ editable?: boolean;
21
+ /** CSV 내보내기 버튼 표시 */
22
+ useExportCsv?: boolean;
23
+ /** 열 표시/숨김 메뉴 사용 */
24
+ useViewSelectColumn?: boolean;
25
+ /** GridOptionModal 내 사용자 정의 메뉴 */
26
+ customMenu?: GridOptionMenuItem[];
27
+ onFilterClick?: () => void;
28
+ onSortClick?: () => void;
29
+ onCustomCellClick?: () => void;
30
+ onResetAllClick?: () => void;
31
+ onClickColumnPicker?: () => void;
32
+ onExportCsv?: () => void;
33
+ toolLeft?: ReactNode;
34
+ toolItems?: ReactNode;
35
+ toolItemsRight?: ReactNode;
36
+ toolBottom?: ReactNode;
37
+ }
38
+ /**
39
+ * Vue 측 GridToolBox.vue 1:1 포팅.
40
+ *
41
+ * 레이아웃 (height 50px, padding 8px 10px):
42
+ * ┌───────────────────────────────────────────────────────────────┐
43
+ * │ tool-left ……… [설정][필터][정렬][조건부][리셋] | [검색][△] │
44
+ * └───────────────────────────────────────────────────────────────┘
45
+ *
46
+ * 설정 클릭 시 설정 아이콘 바로 아래에 popover로 표시.
47
+ * 토글 접기 (△ → ▽)는 toolbar 자체를 숨김.
48
+ */
49
+ export declare function GridToolBox(props: GridToolBoxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { PivotValueField, PivotFilterField } from '@vmscloud/moz-ui-grid-core';
2
+ import { MozGridReactCoreHandle } from '../grid/MozGridReactCore';
3
+ import { MozGridReactCoreProps } from '../../types/props';
4
+ import { IContextMenuConfig } from '../../types/toolbar';
5
+ import { PivotRowField, PivotColumnField, PivotFieldPanelConfig, AvailableField, PivotGridSettings } from '../../types/pivot-props';
6
+ export interface PivotGridProps extends MozGridReactCoreProps {
7
+ pivotRowFields: PivotRowField[];
8
+ pivotColumnFields: PivotColumnField[];
9
+ pivotValueFields: PivotValueField[];
10
+ /** 필터 영역 필드 (현재 UI에선 미사용, 패널 라운드트립용) */
11
+ pivotFilterFields?: PivotFilterField[];
12
+ /** 사용 가능한 필드 목록 (PivotFieldPanel 좌측 목록) */
13
+ availableFields?: AvailableField[];
14
+ /** 피벗 설정 */
15
+ pivotSettings?: PivotGridSettings;
16
+ /** 설정 변경 (그리드 설정 popover에서) */
17
+ onUpdatePivotSettings?: (settings: PivotGridSettings) => void;
18
+ /** valueField 변경 (집계/형식/표시 방식) */
19
+ onUpdateValueField?: (payload: {
20
+ field: string;
21
+ changes: Partial<PivotValueField>;
22
+ }) => void;
23
+ /** PivotFieldPanel에서 필드 재배치 완료 — 호스트가 처리하지 않으면 내부에서 grid.pivot.setConfig로 자동 적용 */
24
+ onUpdateFieldPanelConfig?: (config: PivotFieldPanelConfig) => void;
25
+ /** 필드 패널 토글 콜백 (커스텀 동작이 필요하면 override; 미지정 시 내부 fieldPanelRef.show() 호출) */
26
+ onClickFieldPanel?: () => void;
27
+ /** ToolBox 옵션 (Vue PivotToolBox props 대응) */
28
+ useToolBoxSetting?: boolean;
29
+ useFilter?: boolean;
30
+ useSort?: boolean;
31
+ useCustomCell?: boolean;
32
+ useChart?: boolean;
33
+ chartActive?: boolean;
34
+ onClickChart?: () => void;
35
+ /** Multiple 모드 (행별 미니 차트) 활성. 기본 true. */
36
+ useMultipleChart?: boolean;
37
+ /** 차트 데이터에 Grand Total 포함. 기본 false. */
38
+ chartIncludeGrandTotal?: boolean;
39
+ /** 피벗 컨텍스트 메뉴 설정 (가져오기/내보내기 메뉴 등) */
40
+ contextMenuConfig?: IContextMenuConfig;
41
+ }
42
+ /**
43
+ * Vue 측 MozPivotVue.vue의 React 대응.
44
+ *
45
+ * Pivot 모드 MozGridReactCore + PivotToolBox + 설정 popover + 조건부 스타일 popup.
46
+ */
47
+ export declare const MozPivotReact: import('react').ForwardRefExoticComponent<PivotGridProps & import('react').RefAttributes<MozGridReactCoreHandle>>;
@@ -0,0 +1,23 @@
1
+ import { ContextMenuContext, ContextMenuCallbacks } from '../../hooks/useContextMenu';
2
+ import { IContextMenuConfig } from '../../types/toolbar';
3
+ interface PivotContextMenuProps extends ContextMenuCallbacks {
4
+ config?: IContextMenuConfig;
5
+ }
6
+ export interface PivotContextMenuHandle {
7
+ open: (ctx: ContextMenuContext, position: {
8
+ left: number;
9
+ top: number;
10
+ }) => void;
11
+ close: () => void;
12
+ }
13
+ /**
14
+ * Vue 측 PivotContextMenu.vue 1:1 포팅.
15
+ *
16
+ * 피벗 그리드 전용 컨텍스트 메뉴. data cell에서만 표시되며 메뉴는:
17
+ * - 필터 추가 / 선택값으로 필터링 / 열 필터 초기화
18
+ * - 데이터 복사 / 헤더 포함 복사
19
+ * - 가져오기 / 내보내기 (config에 따라 서브메뉴)
20
+ * - 선택 영역 집계 표시 (template 슬롯)
21
+ */
22
+ export declare const PivotContextMenu: import('react').ForwardRefExoticComponent<PivotContextMenuProps & import('react').RefAttributes<PivotContextMenuHandle>>;
23
+ export {};
@@ -0,0 +1,17 @@
1
+ export interface PivotFieldChipProps {
2
+ field: string;
3
+ header?: string;
4
+ area: 'row' | 'column' | 'value' | 'filter';
5
+ aggregate?: string;
6
+ /** 현재 칩이 설정 팝업의 대상인지 (톱니바퀴 색상 활성) */
7
+ settingsActive?: boolean;
8
+ onRemove?: () => void;
9
+ onOpenSettings?: () => void;
10
+ }
11
+ /**
12
+ * Vue 측 PivotFieldChip.vue 1:1 포팅.
13
+ *
14
+ * - value 영역: 드래그 핸들 + 집계 약어 + 라벨 + 설정 톱니바퀴
15
+ * - 그 외 영역(row/column/filter): 드래그 핸들 + 라벨 + 제거 버튼
16
+ */
17
+ export declare function PivotFieldChip(props: PivotFieldChipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { PivotRowField, PivotColumnField, PivotValueField, PivotFilterField } from '@vmscloud/moz-ui-grid-core';
2
+ type AnyPivotField = PivotRowField | PivotColumnField | PivotValueField | PivotFilterField;
3
+ export interface PivotFieldDropZoneProps {
4
+ area: 'row' | 'column' | 'value' | 'filter';
5
+ label: string;
6
+ fields: AnyPivotField[];
7
+ /** v-model:fields 대응 — fields 변경 시 호출 */
8
+ onFieldsChange: (fields: AnyPivotField[]) => void;
9
+ placeholder?: string;
10
+ /** 값 영역 칩의 톱니바퀴 활성화 표시용 (설정 팝업 대상 필드명) */
11
+ settingsActiveField?: string;
12
+ /** 드롭존 안에서 필드가 제거되었을 때 (X 버튼 클릭) */
13
+ onFieldRemoved?: (field: string) => void;
14
+ /** 외부에서 드롭된 아이템 (사용 가능 필드 목록에서 끌어온 경우) */
15
+ onItemDropped?: (item: {
16
+ field: string;
17
+ header?: string;
18
+ }) => void;
19
+ /** 값 영역 칩 설정 톱니바퀴 클릭 */
20
+ onOpenSettings?: (field: PivotValueField) => void;
21
+ }
22
+ /**
23
+ * Vue 측 PivotFieldDropZone.vue 1:1 포팅.
24
+ *
25
+ * Vue의 `<Dragging>` 컴포넌트를 native HTML5 DnD로 대체:
26
+ * - 영역 내부 정렬: index 기반 reorder
27
+ * - 외부 영역에서 드롭: onItemDropped 콜백 (호스트가 다른 영역에서 제거 처리)
28
+ */
29
+ export declare function PivotFieldDropZone(props: PivotFieldDropZoneProps): import("react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -0,0 +1,26 @@
1
+ import { PivotRowField, PivotColumnField, PivotValueField, PivotFilterField } from '@vmscloud/moz-ui-grid-core';
2
+ import { AvailableField, PivotFieldPanelConfig } from '../../types/pivot-props';
3
+ export interface PivotFieldPanelProps {
4
+ availableFields: AvailableField[];
5
+ rowFields?: PivotRowField[];
6
+ columnFields?: PivotColumnField[];
7
+ valueFields?: PivotValueField[];
8
+ filterFields?: PivotFilterField[];
9
+ /** 현재 그리드 행 수 — 10만건 이상이면 '바로 적용' 자동 해제 */
10
+ totalRowCount?: number;
11
+ onUpdateConfig?: (config: PivotFieldPanelConfig) => void;
12
+ }
13
+ export interface PivotFieldPanelHandle {
14
+ show: () => void;
15
+ hide: () => void;
16
+ }
17
+ /**
18
+ * Vue 측 PivotFieldPanel.vue 1:1 포팅.
19
+ *
20
+ * Popup 기반의 피벗 필드 설정 패널:
21
+ * - 왼쪽: 사용 가능한 필드 목록 (검색 + 체크박스 + 드래그)
22
+ * - 오른쪽: 행/열/값 드롭존 (PivotFieldDropZone)
23
+ * - 푸터: 바로 적용 체크박스 + 업데이트 버튼
24
+ * - 값 필드 칩의 톱니바퀴 클릭 시 작은 설정 팝업으로 aggregate 변경
25
+ */
26
+ export declare const PivotFieldPanel: import('react').ForwardRefExoticComponent<PivotFieldPanelProps & import('react').RefAttributes<PivotFieldPanelHandle>>;
@@ -0,0 +1,36 @@
1
+ import { PivotValueField, PivotRowField, PivotColumnField } from '@vmscloud/moz-ui-grid-core';
2
+ import { PivotGridSettings } from '../../types/pivot-props';
3
+ export interface PivotOptionModalProps {
4
+ valueFields?: PivotValueField[];
5
+ rowFields?: PivotRowField[];
6
+ columnFields?: PivotColumnField[];
7
+ showRowSubTotals?: boolean;
8
+ showRowGrandTotals?: boolean;
9
+ showColumnSubTotals?: boolean;
10
+ showColumnGrandTotals?: boolean;
11
+ rowSubTotalFields?: string[];
12
+ columnSubTotalFields?: string[];
13
+ totalsBeforeData?: boolean;
14
+ showZeros?: boolean;
15
+ /** 푸터 표시 여부 (v-model:footerVisible) */
16
+ footerVisible?: boolean;
17
+ onFooterVisibleChange?: (v: boolean) => void;
18
+ /** 닫기 (Popover 호스트가 처리) */
19
+ onClose?: () => void;
20
+ /** 필드 패널 열기 */
21
+ onClickFieldPanel?: () => void;
22
+ /** 그리드 설정 변경 */
23
+ onUpdateGridSettings?: (settings: PivotGridSettings) => void;
24
+ /** 값 필드 설정 변경 */
25
+ onUpdateValueField?: (payload: {
26
+ field: string;
27
+ changes: Partial<PivotValueField>;
28
+ }) => void;
29
+ }
30
+ /**
31
+ * Vue 측 PivotOptionModal.vue 1:1 포팅.
32
+ *
33
+ * 3-level 네비게이션: Main → Grid 설정 / 값 필드 설정.
34
+ * GridSetupPopover 안에서 사용되어 설정 아이콘 바로 아래에 popover로 표시된다.
35
+ */
36
+ export declare function PivotOptionModal(props: PivotOptionModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PivotToolBoxProps {
3
+ /** 설정(톱니바퀴) 표시 */
4
+ useToolBoxSetting?: boolean;
5
+ /** 필터 버튼 표시 */
6
+ useFilter?: boolean;
7
+ /** 정렬 버튼 표시 */
8
+ useSort?: boolean;
9
+ /** 조건부 스타일 버튼 표시 */
10
+ useCustomCell?: boolean;
11
+ /** 차트 버튼 표시 */
12
+ useChart?: boolean;
13
+ /** 차트 활성 상태 */
14
+ chartActive?: boolean;
15
+ /** 데이터 행 수 (0이면 버튼 비활성) */
16
+ itemsLength?: number;
17
+ /** 설정 popover 열림 상태(시각용) */
18
+ optionModalState?: boolean;
19
+ /** 필터·정렬·customCell count override (없으면 grid state에서 직접 구독) */
20
+ filterCount?: number;
21
+ sortCount?: number;
22
+ customCellCount?: number;
23
+ /**
24
+ * 필터 popup controlled prop (선택). 지정하면 외부가 visible 제어.
25
+ * 외부에서 PivotContextMenu 등이 필터를 띄울 수 있도록 노출.
26
+ */
27
+ filterPopupVisible?: boolean;
28
+ onFilterPopupVisibleChange?: (visible: boolean) => void;
29
+ /** 슬롯 영역 */
30
+ toolLeft?: ReactNode;
31
+ toolItems?: ReactNode;
32
+ toolItemsRight?: ReactNode;
33
+ /**
34
+ * 설정 popover 내용 (PivotOptionModal).
35
+ * Render prop으로 받아 popover의 `close()` 제어를 PivotOptionModal까지 전달한다.
36
+ * (예: "필드 설정" 클릭 시 popover를 닫고 PivotFieldPanel을 열기 위해)
37
+ */
38
+ optionPopup?: ReactNode | ((api: {
39
+ close: () => void;
40
+ }) => ReactNode);
41
+ /** 이벤트 (Vue defineEmits 대응) */
42
+ onClickSetting?: () => void;
43
+ onClickFilter?: () => void;
44
+ onClickSort?: () => void;
45
+ onClickCustomCell?: () => void;
46
+ onClickResetAll?: () => void;
47
+ onClickChart?: () => void;
48
+ onChangeSearchValue?: (value: string) => void;
49
+ }
50
+ /**
51
+ * Vue 측 PivotToolBox.vue 1:1 포팅.
52
+ *
53
+ * 레이아웃: 설정 | 필터 | 정렬 | customCell | 차트 | 리셋 ··· 검색 ▽
54
+ * 접기/펼치기 토글로 ToolBox 전체 표시 토글. 접혔을 때 14px 펼치기 바.
55
+ */
56
+ export declare function PivotToolBox(props: PivotToolBoxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { CSSProperties } from 'react';
2
+ import * as echarts from 'echarts';
3
+ /**
4
+ * EChart — echarts 직접 래퍼.
5
+ *
6
+ * Vue 측 EChart.vue 1:1 포팅. echarts-for-react를 쓰지 않고 echarts.init을 직접 호출해
7
+ * setOption 시 `notMerge: true`로 완전 교체. autoresize는 ResizeObserver로 처리.
8
+ */
9
+ export interface EChartProps {
10
+ option: Record<string, unknown>;
11
+ autoresize?: boolean;
12
+ style?: CSSProperties;
13
+ className?: string;
14
+ }
15
+ export interface EChartHandle {
16
+ instance: echarts.ECharts | null;
17
+ }
18
+ export declare const EChart: import('react').ForwardRefExoticComponent<EChartProps & import('react').RefAttributes<EChartHandle>>;
@@ -0,0 +1,23 @@
1
+ import { PureSheet } from '@vmscloud/moz-ui-grid-core';
2
+ /**
3
+ * MozPivotChart — 피벗 차트 최상위 컴포넌트.
4
+ *
5
+ * Vue 측 MozPivotChart.vue 1:1 포팅. PureSheet 코어의 `getSeriesData()` API로
6
+ * 차트 데이터를 가져오고, Multiple 모드(행별 미니 차트)와 Detail 모드(상세 차트)를 전환.
7
+ *
8
+ * 외부(부모)에서 `ref.current.refresh()`로 명시 갱신 가능 — `pivot.setConfig()`이
9
+ * 이벤트를 emit하지 않으므로 필드 설정 변경 시 부모가 setConfig를 await 한 뒤 호출해야 함.
10
+ */
11
+ export interface MozPivotChartProps {
12
+ /** PureSheet 그리드 인스턴스 */
13
+ grid: PureSheet;
14
+ /** Multiple 모드 사용 */
15
+ useMultipleChart?: boolean;
16
+ /** Grand Total 포함 */
17
+ includeGrandTotal?: boolean;
18
+ onClose: () => void;
19
+ }
20
+ export interface MozPivotChartHandle {
21
+ refresh: () => Promise<void>;
22
+ }
23
+ export declare const MozPivotChart: import('react').ForwardRefExoticComponent<MozPivotChartProps & import('react').RefAttributes<MozPivotChartHandle>>;
@@ -0,0 +1,17 @@
1
+ import { ChartType } from './chartUtils';
2
+ /**
3
+ * PivotChartDetail — 상세 차트 (Detail 모드).
4
+ *
5
+ * Vue 측 PivotChartDetail.vue 1:1 포팅. legend·dataZoom 활성화.
6
+ */
7
+ export interface PivotChartDetailProps {
8
+ xLabels: string[];
9
+ seriesData: {
10
+ name: string;
11
+ data: (number | null)[];
12
+ }[];
13
+ chartType: ChartType;
14
+ /** X축 라벨 줄수 — 호출자가 피벗 config 기반으로 계산해 전달 */
15
+ labelLines?: number;
16
+ }
17
+ export declare function PivotChartDetail(props: PivotChartDetailProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { ChartType } from './chartUtils';
2
+ /**
3
+ * PivotChartMini — 미니 차트 (Multiple 모드에서 사용).
4
+ *
5
+ * Vue 측 PivotChartMini.vue 1:1 포팅. sparkline 스타일의 작은 차트.
6
+ */
7
+ export interface PivotChartMiniProps {
8
+ xLabels: string[];
9
+ seriesData: {
10
+ name: string;
11
+ data: (number | null)[];
12
+ }[];
13
+ chartType: ChartType;
14
+ width?: number;
15
+ height?: number;
16
+ /** X축 라벨 줄수 — 미니 차트는 라벨이 숨겨지므로 영향 적지만 일관성 위해 받음 */
17
+ labelLines?: number;
18
+ }
19
+ export declare function PivotChartMini(props: PivotChartMiniProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { PivotSeriesCategory } from '@vmscloud/moz-ui-grid-core';
2
+ import { ChartType } from './chartUtils';
3
+ /**
4
+ * PivotChartMultiple — Multiple 모드 (행별 미니 차트 목록).
5
+ *
6
+ * Vue 측 PivotChartMultiple.vue 1:1 포팅. IntersectionObserver로 lazy 렌더링.
7
+ */
8
+ export interface PivotChartMultipleProps {
9
+ categories: PivotSeriesCategory[];
10
+ xLabels: string[];
11
+ chartType: ChartType;
12
+ /** X축 라벨 줄수 — 자식(PivotChartMini)에 forwarding */
13
+ labelLines?: number;
14
+ onSelect: (categoryName: string) => void;
15
+ }
16
+ export declare function PivotChartMultiple(props: PivotChartMultipleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { ChartType } from './chartUtils';
2
+ /**
3
+ * PivotChartToolbar — 차트 타입/카테고리/시리즈 선택 UI.
4
+ *
5
+ * Vue 측 PivotChartToolbar.vue 1:1 포팅.
6
+ */
7
+ export interface PivotChartToolbarProps {
8
+ chartType: ChartType;
9
+ rowFields: {
10
+ field: string;
11
+ header?: string;
12
+ }[];
13
+ columnFields: {
14
+ field: string;
15
+ header?: string;
16
+ }[];
17
+ valueFields: {
18
+ field: string;
19
+ header?: string;
20
+ }[];
21
+ selectedRowField: string;
22
+ selectedColumnField: string;
23
+ selectedValueFields: string[];
24
+ showBack?: boolean;
25
+ onUpdateChartType: (type: ChartType) => void;
26
+ onUpdateSelectedRowField: (field: string) => void;
27
+ onUpdateSelectedColumnField: (field: string) => void;
28
+ onUpdateSelectedValueFields: (fields: string[]) => void;
29
+ onBack: () => void;
30
+ onClose: () => void;
31
+ }
32
+ export declare function PivotChartToolbar(props: PivotChartToolbarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * chartUtils — ECharts 옵션 생성 유틸
3
+ *
4
+ * 차트 데이터를 ECharts option 객체로 변환합니다.
5
+ * 스타일은 moz-ui-chart 라이브러리 (MozEChartSeriesType) 기준에 맞춤.
6
+ */
7
+ export type ChartType = 'bar' | 'line' | 'lineSymbols' | 'area';
8
+ /** 시리즈별 차트 설정 (chartMap) */
9
+ export interface ChartSeriesConfig {
10
+ type?: ChartType;
11
+ color?: string;
12
+ }
13
+ /** ECharts 옵션 생성 입력 */
14
+ export interface EChartsConfig {
15
+ chartType: ChartType;
16
+ xLabels: string[];
17
+ seriesData: {
18
+ name: string;
19
+ data: (number | null)[];
20
+ }[];
21
+ showTooltip?: boolean;
22
+ showLegend?: boolean;
23
+ showDataZoom?: boolean;
24
+ /** 미니 차트 모드 (축/라벨 최소화) */
25
+ mini?: boolean;
26
+ /** 시리즈별 차트 타입/색상 설정 */
27
+ chartMap?: Record<string, ChartSeriesConfig>;
28
+ /**
29
+ * X축 라벨의 줄수 — 회전·자동생략 계산에 사용.
30
+ *
31
+ * 호출자가 피벗 config에서 직접 계산해 전달 (결정론적):
32
+ * labelLines = (selectedColumnField === 'all' ? columnFields.length : 1)
33
+ * + (selectedValueFields.length > 1 ? 1 : 0)
34
+ *
35
+ * 미지정 시 xLabels의 '\n'을 측정 (fallback).
36
+ */
37
+ labelLines?: number;
38
+ }
39
+ /** ECharts option 생성 */
40
+ export declare function toEChartsOption(config: EChartsConfig): Record<string, unknown>;
41
+ /** 차트 타입 옵션 목록 */
42
+ export declare const CHART_TYPE_OPTIONS: {
43
+ value: ChartType;
44
+ label: string;
45
+ }[];
@@ -0,0 +1,31 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { PureSheet } from '@vmscloud/moz-ui-grid-core';
3
+ import { ReactRenderer } from '../../bridge/ReactRenderer';
4
+ import { TemplateRegistry } from '../../types/slots';
5
+ import { UseGridCustomCellReturn } from '../hooks/useGridCustomCell';
6
+ /**
7
+ * Vue 측 src/types/injection-keys.ts의 React 대응.
8
+ * 각 Context는 MozGridReactCore가 Provider로 값을 주입하고, 하위 컴포넌트가 useContext로 소비.
9
+ */
10
+ /**
11
+ * PureSheet 인스턴스 Context.
12
+ *
13
+ * 값은 인스턴스 자체 (state로 관리). ref가 아니라 state여야 consumer가 mount 시점에
14
+ * re-render된다. (이전엔 MutableRefObject를 넘겨서 ref.current 변경이 React로 전파되지
15
+ * 않아 GridFilter/Sort/ColumnPicker 등이 grid mount 후에도 빈 상태로 남는 버그가 있었음.)
16
+ */
17
+ export declare const GridInstanceContext: import('react').Context<PureSheet | null>;
18
+ /** 그리드 컨테이너 HTMLElement Context (ref는 컨테이너 측정용으로만 사용 — reactivity 불필요) */
19
+ export declare const GridContainerContext: import('react').Context<MutableRefObject<HTMLElement | null> | null>;
20
+ /** ReactRenderer Context */
21
+ export declare const GridRendererContext: import('react').Context<ReactRenderer | null>;
22
+ /** 템플릿 레지스트리 Context */
23
+ export declare const GridTemplateRegistryContext: import('react').Context<TemplateRegistry | null>;
24
+ /** 필터 모듈 Context (Phase 4에서 hook 인터페이스 확정) */
25
+ export declare const GridFilterModuleContext: import('react').Context<unknown>;
26
+ /** 정렬 모듈 Context */
27
+ export declare const GridSortModuleContext: import('react').Context<unknown>;
28
+ /** 조건부 스타일 모듈 Context */
29
+ export declare const GridCustomCellModuleContext: import('react').Context<UseGridCustomCellReturn | null>;
30
+ /** 일괄 편집 모듈 Context */
31
+ export declare const GridBulkEditorModuleContext: import('react').Context<unknown>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Vue 측 contracts/notification.contract.ts의 React 대응.
3
+ *
4
+ * 호스트 앱이 알림 시스템(toast/notification list)을 주입할 수 있도록 Context 계약 정의.
5
+ */
6
+ export type SSENotificationType = 'INFO' | 'WARNING' | 'ERROR' | 'SUCCESS';
7
+ export type ExcelNotificationOperationType = 'IMPORT' | 'EXPORT' | 'EXPORT_CSV';
8
+ export interface NotificationItem {
9
+ id: string;
10
+ type: SSENotificationType;
11
+ operation?: ExcelNotificationOperationType;
12
+ title: string;
13
+ message?: string;
14
+ progress?: number;
15
+ createdAt: number;
16
+ }
17
+ export interface GridNotificationContract {
18
+ show: (item: Omit<NotificationItem, 'id' | 'createdAt'>) => string;
19
+ update: (id: string, patch: Partial<NotificationItem>) => void;
20
+ remove: (id: string) => void;
21
+ list: NotificationItem[];
22
+ }
23
+ export declare const GridNotificationContext: import('react').Context<GridNotificationContract | null>;
24
+ /** Vue측 GridNotificationKey 대응 (Symbol injection key의 React 대응) */
25
+ export declare const GridNotificationKey: unique symbol;
26
+ /**
27
+ * Vue의 `provideGridNotification` 대응.
28
+ *
29
+ * 호스트 앱에서 `<GridNotificationProvider value={...}>...</GridNotificationProvider>`로 사용.
30
+ */
31
+ export declare const GridNotificationProvider: import('react').Provider<GridNotificationContract | null>;
32
+ export declare function useGridNotificationStore(): GridNotificationContract | null;
33
+ /** Vue측 provideGridNotification — React에서는 GridNotificationProvider 사용 권장 */
34
+ export declare function provideGridNotification(contract: GridNotificationContract): GridNotificationContract;
@@ -0,0 +1,16 @@
1
+ export { useGridInstance } from './useGridInstance';
2
+ export { useGridEvents } from './useGridEvents';
3
+ export { useGridSelection } from './useGridSelection';
4
+ export { useGridChanges } from './useGridChanges';
5
+ export { useGridUndoRedo, type UseGridUndoRedoReturn } from './useGridUndoRedo';
6
+ export { useGridValidation, type UseGridValidationReturn } from './useGridValidation';
7
+ export { useGridColumns, type UseGridColumnsReturn } from './useGridColumns';
8
+ export { useGridSelect } from './useGridSelect';
9
+ export { useSearchHighlight } from './useSearchHighlight';
10
+ export { useCellTooltip } from './useCellTooltip';
11
+ export { useGridFilter, type UseGridFilterReturn } from './useGridFilter';
12
+ export { useGridSort, type UseGridSortReturn } from './useGridSort';
13
+ export { useGridCustomCell, type UseGridCustomCellReturn } from './useGridCustomCell';
14
+ export { useGridCustomCellModule } from './useGridCustomCellModule';
15
+ export { useGridBulkEditor, type UseGridBulkEditorReturn, type BulkEditorState } from './useGridBulkEditor';
16
+ export { useContextMenu, type UseContextMenuReturn, type ContextMenuContext, type ContextMenuPosition, type ContextMenuCallbacks, } from './useContextMenu';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Vue useCellTooltip composable의 React 대응 (간단 wrapper).
3
+ *
4
+ * core가 tooltipMode 옵션으로 자동 관리. 별도 호출은 필요 없음.
5
+ */
6
+ export declare function useCellTooltip(): {
7
+ grid: import('@vmscloud/moz-ui-grid-core').PureSheet | null;
8
+ };
@@ -0,0 +1,27 @@
1
+ import { PureSheet } from '@vmscloud/moz-ui-grid-core';
2
+ /**
3
+ * Vue 측 useClientExcelExport composable의 React 대응.
4
+ *
5
+ * PureSheet의 grid.io API를 사용해 클라이언트 단에서 직접 xlsx/csv를 생성.
6
+ * Vue 버전과 동일한 함수 이름 유지: runClientExport, exportCsv, generateSessionId.
7
+ */
8
+ export interface ClientExcelExportConfig {
9
+ fileName?: string;
10
+ /** 헤더 포함 여부 */
11
+ includeHeader?: boolean;
12
+ /** 가시 컬럼만 export */
13
+ visibleOnly?: boolean;
14
+ /** csv 구분자 */
15
+ csvDelimiter?: string;
16
+ /** ISO/UTF8 BOM 추가 */
17
+ withBom?: boolean;
18
+ }
19
+ export declare function generateSessionId(): string;
20
+ /**
21
+ * xlsx 내보내기. core의 grid.io.exportXlsx() API에 위임.
22
+ */
23
+ export declare function runClientExport(grid: PureSheet, config?: ClientExcelExportConfig): Promise<Blob | null>;
24
+ /**
25
+ * csv 내보내기. core의 grid.io.exportCsv() API에 위임.
26
+ */
27
+ export declare function exportCsv(grid: PureSheet, config?: ClientExcelExportConfig): Promise<Blob | null>;
@@ -0,0 +1,18 @@
1
+ import { PureSheet } from '@vmscloud/moz-ui-grid-core';
2
+ /**
3
+ * Vue 측 useClientExcelStore composable의 React 대응.
4
+ *
5
+ * 모듈 레벨 싱글톤 — ContextMenu와 팝업이 같은 상태 공유.
6
+ * useSyncExternalStore로 React 컴포넌트 갱신.
7
+ */
8
+ interface ClientExcelStoreState {
9
+ showPopup: boolean;
10
+ activeGrid: PureSheet | null;
11
+ defaultImportOptions: Record<string, unknown>;
12
+ }
13
+ export interface UseClientExcelStoreReturn extends ClientExcelStoreState {
14
+ show(grid: PureSheet, options?: Record<string, unknown>): void;
15
+ hide(): void;
16
+ }
17
+ export declare function useClientExcelStore(): UseClientExcelStoreReturn;
18
+ export {};