@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.
- package/README.md +148 -0
- package/dist/MozGrid.d.ts +136 -0
- package/dist/bridge/ReactRenderer.d.ts +45 -0
- package/dist/bridge/fieldBuilder.d.ts +9 -0
- package/dist/bridge/templateRegistry.d.ts +11 -0
- package/dist/index.cjs +25 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +96086 -0
- package/dist/legacy/components/common/Dragging.d.ts +30 -0
- package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +256 -0
- package/dist/legacy/components/common/custom-cell/FormulaInput.d.ts +25 -0
- package/dist/legacy/components/common/custom-cell/GridCustomCell.d.ts +17 -0
- package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +54 -0
- package/dist/legacy/components/common/excel/ClientExcelUploadPopup.d.ts +6 -0
- package/dist/legacy/components/common/filter/GridFilter.d.ts +13 -0
- package/dist/legacy/components/common/footer/GridFooter.d.ts +17 -0
- package/dist/legacy/components/common/sort/GridSort.d.ts +12 -0
- package/dist/legacy/components/common/toolbar/GridSearchInput.d.ts +26 -0
- package/dist/legacy/components/grid/CellEditor.d.ts +9 -0
- package/dist/legacy/components/grid/CellTemplate.d.ts +21 -0
- package/dist/legacy/components/grid/DetailTemplate.d.ts +8 -0
- package/dist/legacy/components/grid/GroupTemplate.d.ts +8 -0
- package/dist/legacy/components/grid/HeaderTemplate.d.ts +9 -0
- package/dist/legacy/components/grid/MozGridReact.d.ts +12 -0
- package/dist/legacy/components/grid/MozGridReactCore.d.ts +28 -0
- package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.d.ts +11 -0
- package/dist/legacy/components/grid/context-menu/GridContextMenu.d.ts +22 -0
- package/dist/legacy/components/grid/group-panel/GroupPanel.d.ts +5 -0
- package/dist/legacy/components/grid/toolbar/ColumnPicker.d.ts +18 -0
- package/dist/legacy/components/grid/toolbar/GridOptionModal.d.ts +30 -0
- package/dist/legacy/components/grid/toolbar/GridSetupPopover.d.ts +25 -0
- package/dist/legacy/components/grid/toolbar/GridToolBox.d.ts +49 -0
- package/dist/legacy/components/pivot/MozPivotReact.d.ts +47 -0
- package/dist/legacy/components/pivot/PivotContextMenu.d.ts +23 -0
- package/dist/legacy/components/pivot/PivotFieldChip.d.ts +17 -0
- package/dist/legacy/components/pivot/PivotFieldDropZone.d.ts +30 -0
- package/dist/legacy/components/pivot/PivotFieldPanel.d.ts +26 -0
- package/dist/legacy/components/pivot/PivotOptionModal.d.ts +36 -0
- package/dist/legacy/components/pivot/PivotToolBox.d.ts +56 -0
- package/dist/legacy/components/pivot/chart/EChart.d.ts +18 -0
- package/dist/legacy/components/pivot/chart/MozPivotChart.d.ts +23 -0
- package/dist/legacy/components/pivot/chart/PivotChartDetail.d.ts +17 -0
- package/dist/legacy/components/pivot/chart/PivotChartMini.d.ts +19 -0
- package/dist/legacy/components/pivot/chart/PivotChartMultiple.d.ts +16 -0
- package/dist/legacy/components/pivot/chart/PivotChartToolbar.d.ts +32 -0
- package/dist/legacy/components/pivot/chart/chartUtils.d.ts +45 -0
- package/dist/legacy/contexts/index.d.ts +31 -0
- package/dist/legacy/contracts/notification.contract.d.ts +34 -0
- package/dist/legacy/hooks/index.d.ts +16 -0
- package/dist/legacy/hooks/useCellTooltip.d.ts +8 -0
- package/dist/legacy/hooks/useClientExcelExport.d.ts +27 -0
- package/dist/legacy/hooks/useClientExcelStore.d.ts +18 -0
- package/dist/legacy/hooks/useContextMenu.d.ts +62 -0
- package/dist/legacy/hooks/useGridBulkEditor.d.ts +16 -0
- package/dist/legacy/hooks/useGridChanges.d.ts +10 -0
- package/dist/legacy/hooks/useGridColumns.d.ts +11 -0
- package/dist/legacy/hooks/useGridCustomCell.d.ts +32 -0
- package/dist/legacy/hooks/useGridCustomCellModule.d.ts +9 -0
- package/dist/legacy/hooks/useGridEvents.d.ts +13 -0
- package/dist/legacy/hooks/useGridFilter.d.ts +19 -0
- package/dist/legacy/hooks/useGridInstance.d.ts +9 -0
- package/dist/legacy/hooks/useGridSelect.d.ts +10 -0
- package/dist/legacy/hooks/useGridSelection.d.ts +6 -0
- package/dist/legacy/hooks/useGridSort.d.ts +16 -0
- package/dist/legacy/hooks/useGridUndoRedo.d.ts +10 -0
- package/dist/legacy/hooks/useGridValidation.d.ts +9 -0
- package/dist/legacy/hooks/useSearchHighlight.d.ts +9 -0
- package/dist/legacy/icons/index.d.ts +36 -0
- package/dist/legacy/index.d.ts +71 -0
- package/dist/legacy/locale/MozConfigProvider.d.ts +31 -0
- package/dist/legacy/locale/contextWrapper.d.ts +19 -0
- package/dist/legacy/locale/en.d.ts +2 -0
- package/dist/legacy/locale/index.d.ts +8 -0
- package/dist/legacy/locale/ja.d.ts +2 -0
- package/dist/legacy/locale/ko.d.ts +2 -0
- package/dist/legacy/locale/types.d.ts +328 -0
- package/dist/legacy/locale/useMozLocale.d.ts +15 -0
- package/dist/legacy/locale/zh.d.ts +2 -0
- package/dist/legacy/stories/MozGridReact.stories.d.ts +7 -0
- package/dist/legacy/stories/MozPivotReact.stories.d.ts +44 -0
- package/dist/legacy/stories/_helpers/sampleData.d.ts +54 -0
- package/dist/legacy/types/pivot-props.d.ts +62 -0
- package/dist/legacy/types/props.d.ts +118 -0
- package/dist/legacy/types/toolbar.d.ts +117 -0
- package/dist/legacy/ui/button/Button.d.ts +18 -0
- package/dist/legacy/ui/button/index.d.ts +1 -0
- package/dist/legacy/ui/checkbox/CheckBox.d.ts +17 -0
- package/dist/legacy/ui/checkbox/icons.d.ts +9 -0
- package/dist/legacy/ui/checkbox/index.d.ts +1 -0
- package/dist/legacy/ui/context-menu/ContextMenu.d.ts +36 -0
- package/dist/legacy/ui/context-menu/index.d.ts +2 -0
- package/dist/legacy/ui/context-menu/types.d.ts +26 -0
- package/dist/legacy/ui/date-input/DateInput.d.ts +25 -0
- package/dist/legacy/ui/date-input/index.d.ts +1 -0
- package/dist/legacy/ui/empty-state/EmptyState.d.ts +28 -0
- package/dist/legacy/ui/empty-state/index.d.ts +1 -0
- package/dist/legacy/ui/input/Input.d.ts +27 -0
- package/dist/legacy/ui/input/index.d.ts +1 -0
- package/dist/legacy/ui/multi-select/MultiSelect.d.ts +43 -0
- package/dist/legacy/ui/multi-select/index.d.ts +1 -0
- package/dist/legacy/ui/number-input/NumberInput.d.ts +22 -0
- package/dist/legacy/ui/number-input/index.d.ts +1 -0
- package/dist/legacy/ui/popup/Popup.d.ts +50 -0
- package/dist/legacy/ui/popup/index.d.ts +1 -0
- package/dist/legacy/ui/select/Select.d.ts +56 -0
- package/dist/legacy/ui/select/index.d.ts +1 -0
- package/dist/legacy/ui/toggle/Toggle.d.ts +21 -0
- package/dist/legacy/ui/toggle/index.d.ts +1 -0
- package/dist/legacy/utils/cn.d.ts +5 -0
- package/dist/legacy/utils/file.d.ts +17 -0
- package/dist/legacy/utils/index.d.ts +2 -0
- package/dist/legacy/utils/misc.d.ts +17 -0
- package/dist/stories/MozGrid.stories.d.ts +18 -0
- package/dist/style.css +1 -0
- package/dist/types/slots.d.ts +49 -0
- package/docs/manual/examples.md +2385 -0
- package/docs/manual/reference.md +4695 -0
- package/docs/manual/reference_react.md +720 -0
- package/package.json +104 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { PureSheet, FieldDef } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
import { IContextMenuConfig } from '../types/toolbar';
|
|
3
|
+
/** 컨텍스트 메뉴 위치 */
|
|
4
|
+
export interface ContextMenuPosition {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/** 컨텍스트 메뉴 컨텍스트 (우클릭 시 타겟 정보) */
|
|
9
|
+
export interface ContextMenuContext {
|
|
10
|
+
area?: 'cell' | 'header';
|
|
11
|
+
rowIndex: number;
|
|
12
|
+
rowId?: string | number;
|
|
13
|
+
columnId: string;
|
|
14
|
+
groupId?: string;
|
|
15
|
+
field: FieldDef | null;
|
|
16
|
+
cellValue: unknown;
|
|
17
|
+
rowData: Record<string, unknown> | null;
|
|
18
|
+
}
|
|
19
|
+
/** wrapper UI(필터/정렬 팝업 등)와 통신하기 위한 콜백 */
|
|
20
|
+
export interface ContextMenuCallbacks {
|
|
21
|
+
/** 컬럼별 필터 추가 — wrapper가 GridFilter popup을 연다 */
|
|
22
|
+
onOpenFilter?: (field: FieldDef) => void;
|
|
23
|
+
/** 컬럼 표시/숨김 popup 열기 */
|
|
24
|
+
onOpenColumnPicker?: () => void;
|
|
25
|
+
/** 그룹 패널 토글 */
|
|
26
|
+
onToggleGroupPanel?: () => void;
|
|
27
|
+
/** 일괄 편집 popup 열기 */
|
|
28
|
+
onOpenBulkEditor?: (field: FieldDef, cellValue: unknown) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface UseContextMenuReturn {
|
|
31
|
+
/** 메뉴 표시 여부 */
|
|
32
|
+
visible: boolean;
|
|
33
|
+
/** 메뉴 위치 */
|
|
34
|
+
position: ContextMenuPosition;
|
|
35
|
+
/** 현재 컨텍스트 */
|
|
36
|
+
context: ContextMenuContext | null;
|
|
37
|
+
/** 메뉴 표시 */
|
|
38
|
+
show: (event: MouseEvent, ctx: ContextMenuContext) => void;
|
|
39
|
+
/** 메뉴 숨김 */
|
|
40
|
+
hide: () => void;
|
|
41
|
+
/** 그리드 인스턴스 연결 */
|
|
42
|
+
setGrid: (grid: PureSheet | null) => void;
|
|
43
|
+
/** 설정 업데이트 */
|
|
44
|
+
updateConfig: (config: Partial<IContextMenuConfig>) => void;
|
|
45
|
+
/** 메뉴 커맨드 실행 */
|
|
46
|
+
executeCommand: (commandId: string) => void;
|
|
47
|
+
/** 컬럼에 필터가 있는지 */
|
|
48
|
+
hasColumnFilter: (columnId: string) => boolean;
|
|
49
|
+
/** 컬럼에 정렬이 있는지 */
|
|
50
|
+
hasColumnSort: (columnId: string) => boolean;
|
|
51
|
+
/** 정리 */
|
|
52
|
+
destroy: () => void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Vue `useContextMenu` composable 1:1 포팅 (React 버전).
|
|
56
|
+
*
|
|
57
|
+
* Vue의 `modules` 파라미터(filterModule/sortModule/...) 대신 wrapper UI와 통신하는
|
|
58
|
+
* 콜백(`onOpenFilter` 등)을 받는다. 직접 grid API로 처리 가능한 command(`RST_COL_FLT`,
|
|
59
|
+
* `DATA_COPY`, `PIN_UNPIN` 등)는 그리드에 바로 호출하고, popup을 열어야 하는 command
|
|
60
|
+
* (`ADD_FLT`, `COLUMN_VIEW_SELECT`, `GROUP_PANEL`, `BULK_EDIT`)는 콜백으로 위임한다.
|
|
61
|
+
*/
|
|
62
|
+
export declare function useContextMenu(initialConfig?: IContextMenuConfig, callbacks?: ContextMenuCallbacks): UseContextMenuReturn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PureSheet } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
export interface BulkEditorState {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
columnId: string | null;
|
|
5
|
+
rows: Record<string, unknown>[];
|
|
6
|
+
}
|
|
7
|
+
export interface UseGridBulkEditorReturn extends BulkEditorState {
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
open: (columnId: string, rows: Record<string, unknown>[]) => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
apply: (newValue: unknown) => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Vue useGridBulkEditor composable의 React 대응 (일괄 편집 팝업).
|
|
15
|
+
*/
|
|
16
|
+
export declare function useGridBulkEditor(grid?: PureSheet | null): UseGridBulkEditorReturn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColumnState } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
export interface UseGridColumnsReturn {
|
|
3
|
+
columns: ColumnState[];
|
|
4
|
+
refresh: () => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Vue useGridColumns composable의 React 대응.
|
|
8
|
+
*
|
|
9
|
+
* 컬럼 상태(너비/순서/가시성) 변경을 감지해 리렌더링합니다.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useGridColumns(): UseGridColumnsReturn;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PureSheet, FieldDef } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
import { ICustomCellConfig } from '../types/toolbar';
|
|
3
|
+
export interface UseGridCustomCellReturn {
|
|
4
|
+
/** 팝업 표시 여부 */
|
|
5
|
+
showCustomCell: boolean;
|
|
6
|
+
/** 현재 선택된 컬럼 */
|
|
7
|
+
hitColumn: FieldDef | null;
|
|
8
|
+
/** 현재 규칙셋 설정 */
|
|
9
|
+
config: ICustomCellConfig;
|
|
10
|
+
/** 팝업 열기 */
|
|
11
|
+
showCustomCellHandler: (field?: FieldDef) => void;
|
|
12
|
+
/** 팝업 닫기 */
|
|
13
|
+
hideCustomCellHandler: () => void;
|
|
14
|
+
/** 그리드 연결 */
|
|
15
|
+
setGrid: (grid: PureSheet | null) => void;
|
|
16
|
+
/** 설정 교체 */
|
|
17
|
+
setCustomCell: (config: ICustomCellConfig) => void;
|
|
18
|
+
/** 현재 설정 가져오기 */
|
|
19
|
+
getCustomCell: () => ICustomCellConfig;
|
|
20
|
+
/** 스타일 적용 (그리드 다시 렌더링) */
|
|
21
|
+
applyCellStyle: () => void;
|
|
22
|
+
/** 전체 초기화 */
|
|
23
|
+
clearCustomCell: () => void;
|
|
24
|
+
/** 정리 */
|
|
25
|
+
destroy: () => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 그리드 조건부 스타일 모듈 (Vue useGridCustomCell 1:1 포팅).
|
|
29
|
+
*
|
|
30
|
+
* Wijmo formatItem → PureSheet formatRow 기반.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useGridCustomCell(): UseGridCustomCellReturn;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseGridCustomCellReturn } from './useGridCustomCell';
|
|
2
|
+
/**
|
|
3
|
+
* MozGridReact 트리 안에서 wrapper가 생성·주입한 조건부 스타일 모듈을 꺼낸다.
|
|
4
|
+
*
|
|
5
|
+
* Vue 측 `inject(GRID_CUSTOM_CELL_MODULE_KEY)` 대응.
|
|
6
|
+
*
|
|
7
|
+
* Provider 외부에서 호출하면 null을 반환한다 (호스트가 단독 MozGridReactCore 사용 시).
|
|
8
|
+
*/
|
|
9
|
+
export declare function useGridCustomCellModule(): UseGridCustomCellReturn | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PureSheetEventType } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
/**
|
|
3
|
+
* Vue useGridEvents composable의 React 대응.
|
|
4
|
+
*
|
|
5
|
+
* PureSheet 이벤트 listener를 자동 등록/해제합니다.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* useGridEvents({
|
|
9
|
+
* 'row:click': (payload) => console.log(payload),
|
|
10
|
+
* 'cell:change': (payload) => console.log(payload),
|
|
11
|
+
* });
|
|
12
|
+
*/
|
|
13
|
+
export declare function useGridEvents(handlers: Partial<Record<PureSheetEventType, (payload: unknown) => void>>): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PureSheet } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
import { IFilterDef } from '../types/toolbar';
|
|
3
|
+
export interface UseGridFilterReturn {
|
|
4
|
+
filters: IFilterDef[];
|
|
5
|
+
setGrid: (grid: PureSheet | null) => void;
|
|
6
|
+
destroy: () => void;
|
|
7
|
+
addFilter: (filter?: Partial<IFilterDef>) => void;
|
|
8
|
+
removeFilter: (sequence: number) => void;
|
|
9
|
+
updateFilter: (sequence: number, patch: Partial<IFilterDef>) => void;
|
|
10
|
+
applyFilters: () => Promise<void>;
|
|
11
|
+
resetFilters: () => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Vue useGridFilter composable의 React 대응. (state holder)
|
|
15
|
+
*
|
|
16
|
+
* 본격적인 필터 UI는 GridFilter 컴포넌트가 내부 상태로 관리한다.
|
|
17
|
+
* 이 hook은 호스트 쪽에서 필터 상태를 외부에서 관리하고 싶을 때 사용한다.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useGridFilter(): UseGridFilterReturn;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PureSheet } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
/**
|
|
3
|
+
* Vue useGridInstance composable의 React 대응.
|
|
4
|
+
*
|
|
5
|
+
* MozGridReactCore 트리 내부에서 호출. PureSheet 인스턴스를 직접 가져옵니다.
|
|
6
|
+
* 초기화 전(useEffect 첫 실행 전)에는 null을 반환합니다.
|
|
7
|
+
* MozGridReactCore가 grid를 useState로 관리해 mount 시 consumer가 자동 re-render.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useGridInstance(): PureSheet | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue useGridSelect composable의 React 대응.
|
|
3
|
+
*
|
|
4
|
+
* 행 선택/해제 등 셀렉션 명령. selection:changed 이벤트와 분리된 명령 API.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useGridSelect(): {
|
|
7
|
+
selectAll: () => void;
|
|
8
|
+
deselectAll: () => void;
|
|
9
|
+
selectRow: (rowId: string | number) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PureSheet } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
import { ISortDef } from '../types/toolbar';
|
|
3
|
+
export interface UseGridSortReturn {
|
|
4
|
+
sorts: ISortDef[];
|
|
5
|
+
setGrid: (grid: PureSheet | null) => void;
|
|
6
|
+
destroy: () => void;
|
|
7
|
+
addSort: (sort?: Partial<ISortDef>) => void;
|
|
8
|
+
removeSort: (sequence: number) => void;
|
|
9
|
+
updateSort: (sequence: number, patch: Partial<ISortDef>) => void;
|
|
10
|
+
applySorts: () => Promise<void>;
|
|
11
|
+
resetSorts: () => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Vue useGridSort composable의 React 대응. (state holder)
|
|
15
|
+
*/
|
|
16
|
+
export declare function useGridSort(): UseGridSortReturn;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidationError } from '@vmscloud/moz-ui-grid-core';
|
|
2
|
+
export interface UseGridValidationReturn {
|
|
3
|
+
errors: ValidationError[];
|
|
4
|
+
hasErrors: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Vue useGridValidation composable의 React 대응.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useGridValidation(): UseGridValidationReturn;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue 측 useSearchHighlight composable의 React 대응.
|
|
3
|
+
*
|
|
4
|
+
* Core가 `search:highlighted` 이벤트를 발행할 때 매치된 셀(.ps-search-match)의
|
|
5
|
+
* .ps-cell-content 텍스트에서 키워드 부분만 <mark class="ps-search-hl">로 래핑.
|
|
6
|
+
*
|
|
7
|
+
* MozGridReactCore가 mount 시 자동 호출 (Vue MozGridVueCore와 동일).
|
|
8
|
+
*/
|
|
9
|
+
export declare function useSearchHighlight(): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
export type IconSize = '10' | '12' | '14' | '16' | '18' | '20' | '22' | '30';
|
|
3
|
+
interface BaseIconProps extends Omit<SVGProps<SVGSVGElement>, 'color' | 'size'> {
|
|
4
|
+
size?: IconSize | number;
|
|
5
|
+
color?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
thin?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function IconArrowUpCenter({ size, color, thin, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function IconFilter({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function IconResetGridToolbar({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function IconSetting({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function IconSort({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function IconCustomCell({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function IconUndo({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function IconRedo({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function IconDownload({ size, color, disabled, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function IconSearch({ size, color, disabled, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function IconClose({ size, color, disabled, thin, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function IconAdd({ size, color, disabled, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function IconArrowLeft({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function IconArrowRight({ size, color, disabled, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function IconArrowLeftWithTail({ size, color, disabled, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function IconArrowUpWithTail({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function IconArrowDownWithTail({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function IconDragHandler({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function IconReset({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function IconChart({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function IconInfoFilled({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function IconToastWarning({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function IconColorPicker({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function IconDecide({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function IconSettingFilled({ size, color, ...rest }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/** @deprecated 호환용 alias */
|
|
35
|
+
export declare const IconInfo: typeof IconInfoFilled;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vmscloud/moz-ui-grid-react
|
|
3
|
+
*
|
|
4
|
+
* React 18+ wrapping library for @vmscloud/moz-ui-grid-core
|
|
5
|
+
* 고성능 그리드 엔진을 React 컴포넌트로 래핑하여 제공합니다.
|
|
6
|
+
*
|
|
7
|
+
* Vue 버전(@vmscloud/moz-ui-grid-vue)과 외관·동작·API가 동등합니다.
|
|
8
|
+
*/
|
|
9
|
+
export { MozConfigProvider, MozLocaleContext, useMozLocale, useMozContextWrapper, MozContextWrapperContext, koKR, enUS, zhCN, jaJP, type MozConfigProviderProps, type ContextWrapper, type MozLocaleMessages, } from './locale';
|
|
10
|
+
export { cn, generateUUID, pxToRem, uniqueId, shallowEqual, formatMessage } from './utils';
|
|
11
|
+
export { MozGridReact } from './components/grid/MozGridReact';
|
|
12
|
+
export { MozGridReactCore, type MozGridReactCoreHandle } from './components/grid/MozGridReactCore';
|
|
13
|
+
export { CellTemplate } from './components/grid/CellTemplate';
|
|
14
|
+
export { HeaderTemplate } from './components/grid/HeaderTemplate';
|
|
15
|
+
export { CellEditor } from './components/grid/CellEditor';
|
|
16
|
+
export { DetailTemplate } from './components/grid/DetailTemplate';
|
|
17
|
+
export { GroupTemplate } from './components/grid/GroupTemplate';
|
|
18
|
+
export { GridToolBox } from './components/grid/toolbar/GridToolBox';
|
|
19
|
+
export { GridOptionModal } from './components/grid/toolbar/GridOptionModal';
|
|
20
|
+
export { ColumnPicker } from './components/grid/toolbar/ColumnPicker';
|
|
21
|
+
export { GridBulkEditor } from './components/grid/bulk-editor/GridBulkEditor';
|
|
22
|
+
export { GridContextMenu, type GridContextMenuHandle } from './components/grid/context-menu/GridContextMenu';
|
|
23
|
+
export { GridSearchInput } from './components/common/toolbar/GridSearchInput';
|
|
24
|
+
export { GridFilter } from './components/common/filter/GridFilter';
|
|
25
|
+
export { GridSort } from './components/common/sort/GridSort';
|
|
26
|
+
export { GridCustomCell } from './components/common/custom-cell/GridCustomCell';
|
|
27
|
+
export { GridFooter } from './components/common/footer/GridFooter';
|
|
28
|
+
export { Dragging, draggingEventBus } from './components/common/Dragging';
|
|
29
|
+
export { MozPivotReact } from './components/pivot/MozPivotReact';
|
|
30
|
+
export { PivotToolBox } from './components/pivot/PivotToolBox';
|
|
31
|
+
export { PivotOptionModal } from './components/pivot/PivotOptionModal';
|
|
32
|
+
export { PivotFieldPanel } from './components/pivot/PivotFieldPanel';
|
|
33
|
+
export { PivotContextMenu } from './components/pivot/PivotContextMenu';
|
|
34
|
+
export { MozPivotChart, type MozPivotChartHandle, type MozPivotChartProps } from './components/pivot/chart/MozPivotChart';
|
|
35
|
+
export { PivotChartDetail } from './components/pivot/chart/PivotChartDetail';
|
|
36
|
+
export { PivotChartMini } from './components/pivot/chart/PivotChartMini';
|
|
37
|
+
export { PivotChartMultiple } from './components/pivot/chart/PivotChartMultiple';
|
|
38
|
+
export { PivotChartToolbar } from './components/pivot/chart/PivotChartToolbar';
|
|
39
|
+
export { EChart, type EChartHandle, type EChartProps } from './components/pivot/chart/EChart';
|
|
40
|
+
export { toEChartsOption, CHART_TYPE_OPTIONS, type ChartType, type ChartSeriesConfig, type EChartsConfig, } from './components/pivot/chart/chartUtils';
|
|
41
|
+
/** @deprecated PivotGrid → MozPivotReact로 이름 변경됨 */
|
|
42
|
+
export { MozPivotReact as PivotGrid } from './components/pivot/MozPivotReact';
|
|
43
|
+
export { ClientExcelUploadPopup } from './components/common/excel/ClientExcelUploadPopup';
|
|
44
|
+
export { useClientExcelStore, type UseClientExcelStoreReturn, } from './hooks/useClientExcelStore';
|
|
45
|
+
export { runClientExport, exportCsv, generateSessionId, type ClientExcelExportConfig, } from './hooks/useClientExcelExport';
|
|
46
|
+
export { pickFile, downloadBlob } from './utils/file';
|
|
47
|
+
export { GridNotificationProvider, GridNotificationContext, GridNotificationKey, useGridNotificationStore, provideGridNotification, type GridNotificationContract, type NotificationItem, type SSENotificationType, type ExcelNotificationOperationType, } from './contracts/notification.contract';
|
|
48
|
+
export { IconAdd, IconArrowDownWithTail, IconArrowLeft, IconArrowLeftWithTail, IconArrowRight, IconArrowUpCenter, IconArrowUpWithTail, IconChart, IconClose, IconCustomCell, IconDownload, IconDragHandler, IconFilter, IconInfoFilled, IconReset, IconResetGridToolbar, IconSearch, IconSetting, IconSort, IconToastWarning, } from './icons';
|
|
49
|
+
export type { PivotGridProps, PivotFieldItem, AvailableField, PivotFieldPanelConfig, PivotGridSettings, } from './types/pivot-props';
|
|
50
|
+
export { useGridInstance, useGridEvents, useGridSelection, useGridChanges, useGridUndoRedo, useGridValidation, useGridColumns, useGridSelect, useSearchHighlight, useCellTooltip, useGridFilter, useGridSort, useGridCustomCell, useGridBulkEditor, useContextMenu, type UseGridUndoRedoReturn, type UseGridValidationReturn, type UseGridColumnsReturn, type UseGridFilterReturn, type UseGridSortReturn, type UseGridCustomCellReturn, type UseGridBulkEditorReturn, type UseContextMenuReturn, type BulkEditorState, } from './hooks';
|
|
51
|
+
export { ReactRenderer } from '../bridge/ReactRenderer';
|
|
52
|
+
export { createTemplateRegistry } from '../bridge/templateRegistry';
|
|
53
|
+
export { buildFieldDefs } from '../bridge/fieldBuilder';
|
|
54
|
+
export { GridInstanceContext, GridContainerContext, GridRendererContext, GridTemplateRegistryContext, GridFilterModuleContext, GridSortModuleContext, GridCustomCellModuleContext, GridBulkEditorModuleContext, } from './contexts';
|
|
55
|
+
export type { MozGridReactCoreProps, MozGridReactProps, } from './types/props';
|
|
56
|
+
export type { CellSlotProps, HeaderSlotProps, EditorSlotProps, DetailSlotProps, GroupSlotProps, TemplateRegistry, TemplateEntry, } from '../types/slots';
|
|
57
|
+
export type { ComparisonOperator, LogicalOperator, IFilterDef, ISortDef, ICustomCellDef, ICustomCellRuleSet, ICustomCellConfig, IContextMenuItem, IContextMenuConfig, IContextMenuExcelEventArgs, AggregateType, IAggregateValues, } from './types/toolbar';
|
|
58
|
+
export type { PureSheetConfig, FieldDef, PureSheetEventType, SortState, FilterState, FilterOperator, Row, ColumnDef, ColumnState, EditorConfig, GridState, GridActivity, ViewState, RowSelectionMode, CellSelectionMode, RowSelectionTrigger, RowSelectionConfig, CellSelectionConfig, DataType, AggregateFunc, RowState, ValidationRule, ValidationError, ValidationTrigger, GroupConfig, GroupingConfig, TreeConfig, MasterDetailConfig, ColumnGroupDef, FormatRowCallback, PartialTranslationMap, IPivotAPI, PivotState, PivotConfig, PivotRowField, PivotColumnField, PivotValueField, PivotResult, PivotHeaderNode, PivotRow, ShowValueAs, IRowsAPI, IColumnsAPI, IChangesAPI, IUndoManagerAPI, IGroupAPI, ITreeAPI, IMasterDetailAPI, IValidationAPI, IClipboardAPI, IHeadersAPI, } from '@vmscloud/moz-ui-grid-core';
|
|
59
|
+
export { UndoStack } from '@vmscloud/moz-ui-grid-core';
|
|
60
|
+
export { getRowHeaderCell, getCornerCell, ROW_HEADER_COLUMN_ID } from '@vmscloud/moz-ui-grid-core';
|
|
61
|
+
export { CheckBox, type CheckBoxProps } from './ui/checkbox';
|
|
62
|
+
export { Toggle, type ToggleProps } from './ui/toggle';
|
|
63
|
+
export { Button, type ButtonProps, type ButtonType, type ButtonAction } from './ui/button';
|
|
64
|
+
export { Input, type InputProps, type InputHandle } from './ui/input';
|
|
65
|
+
export { NumberInput, type NumberInputProps } from './ui/number-input';
|
|
66
|
+
export { DateInput, type DateInputProps } from './ui/date-input';
|
|
67
|
+
export { EmptyState, type EmptyStateProps, type EmptyStateMessages } from './ui/empty-state';
|
|
68
|
+
export { Popup, type PopupProps, type PopupPreset, type PopupDialogIcon } from './ui/popup';
|
|
69
|
+
export { ContextMenu, type ContextMenuProps, type ContextMenuHandle, type IContextMenu, type ContextPosition } from './ui/context-menu';
|
|
70
|
+
export { Select, type SelectProps, type SelectHandle, type DisplayFormatter } from './ui/select';
|
|
71
|
+
export { MultiSelect, type MultiSelectProps } from './ui/multi-select';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MozLocaleMessages } from './types';
|
|
3
|
+
import { ContextWrapper } from './contextWrapper';
|
|
4
|
+
export interface MozConfigProviderProps {
|
|
5
|
+
/** locale 메시지. 미지정 시 koKR 사용 */
|
|
6
|
+
locale?: MozLocaleMessages;
|
|
7
|
+
/**
|
|
8
|
+
* 셀·헤더·에디터 템플릿과 slot root 를 감쌀 함수. 소비자의 Provider 트리를 그대로 넘긴다.
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const wrap = (node: ReactNode) => <QueryClientProvider client={qc}>{node}</QueryClientProvider>;
|
|
12
|
+
* <MozConfigProvider contextWrapper={wrap}>
|
|
13
|
+
* <MozGridReact ... />
|
|
14
|
+
* </MozConfigProvider>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* **참조 동일성을 유지하세요** — 매 렌더 새 함수를 주면 마운트된 템플릿이 매번 다시
|
|
18
|
+
* 렌더된다. `useCallback` 이나 모듈 상수로 고정하는 것을 권장한다.
|
|
19
|
+
*
|
|
20
|
+
* `@vmscloud/moz-ui-components-react` 의 `MozConfigProvider contextWrapper` 와 같은 계약.
|
|
21
|
+
*/
|
|
22
|
+
contextWrapper?: ContextWrapper;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 다국어 설정 + 템플릿 context wrapper Provider.
|
|
27
|
+
*
|
|
28
|
+
* Vue의 `<MozConfigProvider :locale="..." />`와 동일하게 하위 트리의 모든 컴포넌트에
|
|
29
|
+
* locale을 전달하고, 추가로 템플릿 독립 root 에 주입할 소비자 wrapper 를 전달한다.
|
|
30
|
+
*/
|
|
31
|
+
export declare function MozConfigProvider({ locale, contextWrapper, children }: MozConfigProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ContextWrapper } from '../../bridge/ReactRenderer';
|
|
2
|
+
/**
|
|
3
|
+
* 셀·헤더·에디터 템플릿과 slot 이 렌더될 때 감쌀 소비자 Provider 트리.
|
|
4
|
+
*
|
|
5
|
+
* 템플릿 콘텐츠는 `ReactRenderer.mountInstance` 가 만드는 **독립 React root** 에 렌더되므로
|
|
6
|
+
* 소비자 앱의 React context 가 닿지 않는다. 그동안 `MozGridReactCore` 가 renderer 의
|
|
7
|
+
* `setContextWrapper` 에 `MozLocaleContext.Provider` 하나만 넘겨 locale 은 전파됐지만,
|
|
8
|
+
* 소비자가 자기 Provider(아이콘셋·QueryClient·테마 등)를 끼워 넣을 경로가 없었다.
|
|
9
|
+
*
|
|
10
|
+
* 소비자가 `MozConfigProvider contextWrapper` 로 wrapper 를 주면 각 템플릿 root 가 그 트리
|
|
11
|
+
* 안에서 렌더돼 context 를 되찾는다. Provider 없으면 `null`(기존 동작).
|
|
12
|
+
*
|
|
13
|
+
* `@vmscloud/moz-ui-components-react` 0.1.5 의 `MozConfigProvider contextWrapper` 와 같은
|
|
14
|
+
* 계약이다 — 소비자는 두 패키지에 같은 wrapper 를 넘기면 된다.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MozContextWrapperContext: import('react').Context<ContextWrapper | null>;
|
|
17
|
+
/** 현재 트리에 설정된 템플릿 context wrapper (없으면 `null`). */
|
|
18
|
+
export declare function useMozContextWrapper(): ContextWrapper | null;
|
|
19
|
+
export type { ContextWrapper };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { MozConfigProvider, type MozConfigProviderProps } from './MozConfigProvider';
|
|
2
|
+
export { enUS } from './en';
|
|
3
|
+
export { koKR } from './ko';
|
|
4
|
+
export { zhCN } from './zh';
|
|
5
|
+
export { jaJP } from './ja';
|
|
6
|
+
export { useMozLocale, MozLocaleContext } from './useMozLocale';
|
|
7
|
+
export { useMozContextWrapper, MozContextWrapperContext, type ContextWrapper } from './contextWrapper';
|
|
8
|
+
export type { MozLocaleMessages } from './types';
|