@owp/core 2.2.6 → 2.3.1
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/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +2 -5
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/OwpDialog/OwpDialog.js +30 -32
- package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
- package/dist/components/OwpLayout/OwpLayout.js +29 -30
- package/dist/components/OwpLayout/OwpLayout.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +393 -255
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpScrollbars/OwpScrollbars.js +16 -17
- package/dist/components/OwpScrollbars/OwpScrollbars.js.map +1 -1
- package/dist/components/OwpStyleProvider/OwpStyleProvider.js +28 -29
- package/dist/components/OwpStyleProvider/OwpStyleProvider.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +45 -45
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +6 -6
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/OwpVerticalTable.js +55 -53
- package/dist/components/OwpTable/OwpVerticalTable.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +80 -74
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/constants/storageKeys.js +1 -0
- package/dist/constants/storageKeys.js.map +1 -1
- package/dist/contexts/OwpCoreProvider.js +22 -36
- package/dist/contexts/OwpCoreProvider.js.map +1 -1
- package/dist/contexts/OwpStoreProvider.js +9 -9
- package/dist/contexts/OwpStoreProvider.js.map +1 -1
- package/dist/hooks/useCurrentUserSeq.js +11 -0
- package/dist/hooks/useCurrentUserSeq.js.map +1 -0
- package/dist/hooks/useNavbar.js +24 -0
- package/dist/hooks/useNavbar.js.map +1 -0
- package/dist/hooks/useOwpSettings.js +21 -0
- package/dist/hooks/useOwpSettings.js.map +1 -0
- package/dist/hooks.js +78 -62
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +58 -59
- package/dist/layout/Layout.js +28 -29
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/components/layouts/FooterLayout.js +15 -16
- package/dist/layout/components/layouts/FooterLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js +21 -18
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarWrapperLayout.js +20 -21
- package/dist/layout/components/layouts/NavbarWrapperLayout.js.map +1 -1
- package/dist/layout/components/navbar/NavbarPinToggleButton.js +10 -11
- package/dist/layout/components/navbar/NavbarPinToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/NavbarToggleButton.js +31 -32
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +36 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js +29 -30
- package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
- package/dist/layout/components/navigation/Navigation.js +18 -22
- package/dist/layout/components/navigation/Navigation.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +55 -60
- package/dist/layout/components/toggles/NavigationSearchToggle.js.map +1 -1
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js +44 -49
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
- package/dist/layout/components/toolbar/ToolbarLayout.js +26 -27
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/store/atoms/navbarAtoms.js +84 -0
- package/dist/store/atoms/navbarAtoms.js.map +1 -0
- package/dist/store/atoms/owpSettingsAtoms.js +140 -0
- package/dist/store/atoms/owpSettingsAtoms.js.map +1 -0
- package/dist/store/atoms/owpStore.js +29 -0
- package/dist/store/atoms/owpStore.js.map +1 -0
- package/dist/store.js +44 -39
- package/dist/store.js.map +1 -1
- package/dist/types/components/OwpDialog/OwpDialog.d.ts +1 -9
- package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +9 -0
- package/dist/types/components/OwpPicker/internal/DatePickerInput.d.ts +1 -1
- package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
- package/dist/types/components/OwpTable/OwpVerticalTable.d.ts +3 -1
- package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
- package/dist/types/constants/storageKeys.d.ts +1 -0
- package/dist/types/contexts/OwpCoreProvider.d.ts +2 -2
- package/dist/types/contexts/OwpStoreProvider.d.ts +4 -4
- package/dist/types/hooks/index.d.ts +3 -1
- package/dist/types/hooks/useCurrentUserSeq.d.ts +8 -0
- package/dist/types/hooks/useNavbar.d.ts +19 -0
- package/dist/types/hooks/useOwpSettings.d.ts +79 -0
- package/dist/types/layout/components/navigation/Navigation.d.ts +6 -2
- package/dist/types/layout/components/toggles/NavigationSearchToggle.d.ts +5 -2
- package/dist/types/layout/components/toggles/NavigationShortcutsToggle.d.ts +5 -2
- package/dist/types/store/atoms/index.d.ts +3 -0
- package/dist/types/store/atoms/internal/types.d.ts +29 -0
- package/dist/types/store/atoms/navbarAtoms.d.ts +48 -0
- package/dist/types/store/atoms/owpSettingsAtoms.d.ts +89 -0
- package/dist/types/store/atoms/owpStore.d.ts +13 -0
- package/dist/types/store/index.d.ts +1 -3
- package/dist/types/utils/treeGridExportExcelUtil.d.ts +0 -4
- package/dist/types/utils/treeGridUtil.d.ts +0 -59
- package/dist/utils/treeGridExportExcelUtil.js +57 -58
- package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
- package/dist/utils/treeGridUtil.js +69 -83
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/dist/utils.js +71 -86
- package/package.json +2 -6
- package/dist/hooks/useAppStore.js +0 -8
- package/dist/hooks/useAppStore.js.map +0 -1
- package/dist/store/generateReducersFromSlices.js +0 -18
- package/dist/store/generateReducersFromSlices.js.map +0 -1
- package/dist/store/lazyLoadedSlices.js +0 -16
- package/dist/store/lazyLoadedSlices.js.map +0 -1
- package/dist/store/middleware.js +0 -9
- package/dist/store/middleware.js.map +0 -1
- package/dist/store/navbarSlice.js +0 -71
- package/dist/store/navbarSlice.js.map +0 -1
- package/dist/store/navigationSlice.js +0 -46
- package/dist/store/navigationSlice.js.map +0 -1
- package/dist/store/owpSettingsSlice.js +0 -195
- package/dist/store/owpSettingsSlice.js.map +0 -1
- package/dist/store/store.js +0 -17
- package/dist/store/store.js.map +0 -1
- package/dist/store/withSlices.js +0 -27
- package/dist/store/withSlices.js.map +0 -1
- package/dist/types/hooks/useAppStore.d.ts +0 -7
- package/dist/types/store/generateReducersFromSlices.d.ts +0 -6
- package/dist/types/store/lazyLoadedSlices.d.ts +0 -9
- package/dist/types/store/middleware.d.ts +0 -17
- package/dist/types/store/navbarSlice.d.ts +0 -22
- package/dist/types/store/navigationSlice.d.ts +0 -93
- package/dist/types/store/owpSettingsSlice.d.ts +0 -112
- package/dist/types/store/store.d.ts +0 -13
- package/dist/types/store/withSlices.d.ts +0 -11
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';
|
|
2
|
+
import type { PartialDeep } from 'type-fest';
|
|
3
|
+
/**
|
|
4
|
+
* OWP settings 상태 타입
|
|
5
|
+
*/
|
|
6
|
+
export type OwpSettingsState = {
|
|
7
|
+
initial: OwpSettingsConfigType;
|
|
8
|
+
defaults: OwpSettingsConfigType;
|
|
9
|
+
current: OwpSettingsConfigType;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Navbar 상태 타입
|
|
13
|
+
*/
|
|
14
|
+
export type NavbarState = {
|
|
15
|
+
open: boolean;
|
|
16
|
+
mobileOpen: boolean;
|
|
17
|
+
foldedOpen: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* OWP 전역 상태 타입
|
|
21
|
+
*/
|
|
22
|
+
export type OwpStoreState = {
|
|
23
|
+
owpSettings: OwpSettingsState;
|
|
24
|
+
navbar: NavbarState;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* OWP 전역 상태 초기값 타입
|
|
28
|
+
*/
|
|
29
|
+
export type OwpStorePreloadedState = PartialDeep<OwpStoreState>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { NavbarState } from './internal/types';
|
|
2
|
+
/**
|
|
3
|
+
* Navbar 기본 상태 생성
|
|
4
|
+
*/
|
|
5
|
+
export declare function createNavbarState(overrides?: Partial<NavbarState>): NavbarState;
|
|
6
|
+
export declare const navbarStateAtom: import("jotai").PrimitiveAtom<NavbarState> & {
|
|
7
|
+
init: NavbarState;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Navbar 접기 상태 토글 atom
|
|
11
|
+
*/
|
|
12
|
+
export declare const navbarToggleFoldedAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
13
|
+
/**
|
|
14
|
+
* Navbar 접기 상태 열기 atom
|
|
15
|
+
*/
|
|
16
|
+
export declare const navbarOpenFoldedAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
17
|
+
/**
|
|
18
|
+
* Navbar 접기 상태 닫기 atom
|
|
19
|
+
*/
|
|
20
|
+
export declare const navbarCloseFoldedAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
21
|
+
/**
|
|
22
|
+
* 모바일 navbar 상태 토글 atom
|
|
23
|
+
*/
|
|
24
|
+
export declare const navbarToggleMobileAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
25
|
+
/**
|
|
26
|
+
* 모바일 navbar 열기 atom
|
|
27
|
+
*/
|
|
28
|
+
export declare const navbarOpenMobileAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
29
|
+
/**
|
|
30
|
+
* 모바일 navbar 닫기 atom
|
|
31
|
+
*/
|
|
32
|
+
export declare const navbarCloseMobileAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
33
|
+
/**
|
|
34
|
+
* Navbar 닫기 atom
|
|
35
|
+
*/
|
|
36
|
+
export declare const navbarCloseAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
37
|
+
/**
|
|
38
|
+
* Navbar 열기 atom
|
|
39
|
+
*/
|
|
40
|
+
export declare const navbarOpenAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
41
|
+
/**
|
|
42
|
+
* Navbar 상태 토글 atom
|
|
43
|
+
*/
|
|
44
|
+
export declare const navbarToggleAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
45
|
+
/**
|
|
46
|
+
* Navbar 기본값 복원 atom
|
|
47
|
+
*/
|
|
48
|
+
export declare const resetNavbarAtom: import("jotai").WritableAtom<unknown, [], void>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { OwpSettingsConfigType, OwpThemeType, OwpThemesType } from '@/types/OwpSettingsTypes';
|
|
2
|
+
import { type WritableAtom } from 'jotai';
|
|
3
|
+
import type { PartialDeep } from 'type-fest';
|
|
4
|
+
import type { OwpSettingsState } from './internal/types';
|
|
5
|
+
/**
|
|
6
|
+
* Light theme text palette
|
|
7
|
+
*/
|
|
8
|
+
export declare const lightPaletteText: {
|
|
9
|
+
primary: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
disabled: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Dark theme text palette
|
|
15
|
+
*/
|
|
16
|
+
export declare const darkPaletteText: {
|
|
17
|
+
primary: string;
|
|
18
|
+
secondary: string;
|
|
19
|
+
disabled: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Settings 기본 상태 생성
|
|
23
|
+
*/
|
|
24
|
+
export declare function createSettingsState(initialValue: OwpSettingsConfigType): OwpSettingsState;
|
|
25
|
+
export declare const owpSettingsStateAtom: import("jotai").PrimitiveAtom<OwpSettingsState> & {
|
|
26
|
+
init: OwpSettingsState;
|
|
27
|
+
};
|
|
28
|
+
export declare const owpSettingsAtom: import("jotai").Atom<OwpSettingsState>;
|
|
29
|
+
export declare const defaultSettingsAtom: import("jotai").Atom<OwpSettingsConfigType>;
|
|
30
|
+
export declare const currentSettingsAtom: import("jotai").Atom<OwpSettingsConfigType>;
|
|
31
|
+
export declare const currentLayoutConfigAtom: import("jotai").Atom<{
|
|
32
|
+
mode?: string;
|
|
33
|
+
containerWidth?: string;
|
|
34
|
+
navbar?: {
|
|
35
|
+
display?: boolean;
|
|
36
|
+
style?: string;
|
|
37
|
+
folded?: boolean;
|
|
38
|
+
position?: string;
|
|
39
|
+
open?: boolean;
|
|
40
|
+
};
|
|
41
|
+
toolbar?: {
|
|
42
|
+
display?: boolean;
|
|
43
|
+
style?: string;
|
|
44
|
+
};
|
|
45
|
+
footer?: {
|
|
46
|
+
display?: boolean;
|
|
47
|
+
style?: string;
|
|
48
|
+
};
|
|
49
|
+
leftSidePanel?: {
|
|
50
|
+
display?: boolean;
|
|
51
|
+
};
|
|
52
|
+
rightSidePanel?: {
|
|
53
|
+
display?: boolean;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
export declare const customScrollbarsEnabledAtom: import("jotai").Atom<boolean>;
|
|
57
|
+
export declare const directionAtom: import("jotai").Atom<"rtl" | "ltr">;
|
|
58
|
+
export declare const mainThemeSettingsAtom: import("jotai").Atom<OwpThemeType>;
|
|
59
|
+
export declare const navbarThemeSettingsAtom: import("jotai").Atom<OwpThemeType>;
|
|
60
|
+
export declare const toolbarThemeSettingsAtom: import("jotai").Atom<OwpThemeType>;
|
|
61
|
+
export declare const footerThemeSettingsAtom: import("jotai").Atom<OwpThemeType>;
|
|
62
|
+
export declare const mainThemeAtom: import("jotai").Atom<import("@mui/material").Theme>;
|
|
63
|
+
export declare const mainThemeDarkAtom: import("jotai").Atom<import("@mui/material").Theme>;
|
|
64
|
+
export declare const mainThemeLightAtom: import("jotai").Atom<import("@mui/material").Theme>;
|
|
65
|
+
export declare const navbarThemeAtom: import("jotai").Atom<import("@mui/material").Theme>;
|
|
66
|
+
export declare const toolbarThemeAtom: import("jotai").Atom<import("@mui/material").Theme>;
|
|
67
|
+
export declare const footerThemeAtom: import("jotai").Atom<import("@mui/material").Theme>;
|
|
68
|
+
/**
|
|
69
|
+
* 현재 settings 적용 atom
|
|
70
|
+
*/
|
|
71
|
+
export declare const setSettingsAtom: WritableAtom<unknown, [nextSettings: OwpSettingsConfigType], void>;
|
|
72
|
+
/**
|
|
73
|
+
* 기본 settings 변경 atom
|
|
74
|
+
*/
|
|
75
|
+
export declare const setDefaultSettingsAtom: WritableAtom<null, [
|
|
76
|
+
PartialDeep<OwpSettingsConfigType>
|
|
77
|
+
], OwpSettingsState>;
|
|
78
|
+
/**
|
|
79
|
+
* 초기 settings 복원 atom
|
|
80
|
+
*/
|
|
81
|
+
export declare const setInitialSettingsAtom: WritableAtom<unknown, [], void>;
|
|
82
|
+
/**
|
|
83
|
+
* 현재 defaults 기준 초기화 atom
|
|
84
|
+
*/
|
|
85
|
+
export declare const resetSettingsAtom: WritableAtom<unknown, [], void>;
|
|
86
|
+
/**
|
|
87
|
+
* Theme 설정 변경 atom
|
|
88
|
+
*/
|
|
89
|
+
export declare const changeOwpThemeAtom: WritableAtom<unknown, [theme: OwpThemesType], OwpSettingsState>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OwpSettingsConfigType, OwpThemesType } from '@/types/OwpSettingsTypes';
|
|
2
|
+
import { createStore } from 'jotai/vanilla';
|
|
3
|
+
import type { PartialDeep } from 'type-fest';
|
|
4
|
+
import type { OwpStorePreloadedState, OwpStoreState } from './internal/types';
|
|
5
|
+
export type OwpStore = ReturnType<typeof createStore>;
|
|
6
|
+
/**
|
|
7
|
+
* OWP 전역 상태 초기값 생성
|
|
8
|
+
*/
|
|
9
|
+
export declare function createOwpStoreState(settingsConfig?: PartialDeep<OwpSettingsConfigType>, themesConfig?: PartialDeep<OwpThemesType>, preloadedState?: OwpStorePreloadedState): OwpStoreState;
|
|
10
|
+
/**
|
|
11
|
+
* OWP Jotai store 생성
|
|
12
|
+
*/
|
|
13
|
+
export declare function createOwpStore(initialState: OwpStoreState): OwpStore;
|
|
@@ -2,6 +2,4 @@
|
|
|
2
2
|
* Public store entry exports
|
|
3
3
|
*/
|
|
4
4
|
export { OwpStoreProvider, type OwpStoreProviderProps } from '../contexts/OwpStoreProvider';
|
|
5
|
-
export
|
|
6
|
-
export type { AppAction, AppDispatch, AppStore, AppThunk, RootState } from './store';
|
|
7
|
-
export * from './owpSettingsSlice';
|
|
5
|
+
export * from './atoms';
|
|
@@ -11,8 +11,4 @@ export interface ExportTreeGridExcelOptions {
|
|
|
11
11
|
* @param options 다운로드 옵션
|
|
12
12
|
*/
|
|
13
13
|
export declare const exportTreeGridExcel: (grid: TreeGridLike | null | undefined, options?: ExportTreeGridExcelOptions | string) => Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated `exportTreeGridExcel` 사용
|
|
16
|
-
*/
|
|
17
|
-
export declare const exportExcelByGrid: (grid: TreeGridLike | null | undefined, options?: ExportTreeGridExcelOptions | string) => Promise<void>;
|
|
18
14
|
export {};
|
|
@@ -104,62 +104,3 @@ export declare const resetTreeGridChangesByIds: (gridIds: string[]) => void;
|
|
|
104
104
|
* @param labelKeys Enum 라벨로 사용할 필드 우선순위 목록
|
|
105
105
|
*/
|
|
106
106
|
export declare const setTreeGridColumnEnumOptionsById: <T extends object>(gridId: string, columnName: string, options: T[] | undefined, valueKey: keyof T & string, labelKeys: Array<keyof T & string>) => void;
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated `getTreeGridById` 사용
|
|
109
|
-
*/
|
|
110
|
-
export declare const getGridById: (gridId: string) => TTGrid;
|
|
111
|
-
/**
|
|
112
|
-
* @deprecated `getTreeGridDataRowsById` 사용
|
|
113
|
-
*/
|
|
114
|
-
export declare const getDataRowsById: <T>(gridId: string) => T;
|
|
115
|
-
/**
|
|
116
|
-
* @deprecated `reloadTreeGridBodyById` 사용
|
|
117
|
-
*/
|
|
118
|
-
export declare const reloadBodyById: (gridId: string, rows: unknown) => void;
|
|
119
|
-
/**
|
|
120
|
-
* @deprecated `addTreeGridRowById` 사용
|
|
121
|
-
*/
|
|
122
|
-
export declare const addRowById: <T>(gridId: string, options?: TreeGridAddRowOptions<T>) => void;
|
|
123
|
-
/**
|
|
124
|
-
* @deprecated `getTreeGridRowChangesById` 사용
|
|
125
|
-
*/
|
|
126
|
-
export declare const getChangedDataRowsById: <T>(gridId: string) => {
|
|
127
|
-
added: T[];
|
|
128
|
-
changed: T[];
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* @deprecated `exportTreeGridToExcelById` 사용
|
|
132
|
-
*/
|
|
133
|
-
export declare const exportExcelById: (gridId: string, title?: string) => void;
|
|
134
|
-
/**
|
|
135
|
-
* @deprecated `getTreeGridSelectedRowsById` 사용
|
|
136
|
-
*/
|
|
137
|
-
export declare const getSelectedRowsById: <T>(gridId: string) => any[] | T;
|
|
138
|
-
/**
|
|
139
|
-
* @deprecated `setTreeGridColumnVisibilityById` 사용
|
|
140
|
-
*/
|
|
141
|
-
export declare const changeVisibleCellByGridId: (gridId: string, options: TreeGridColumnVisibilityOptions) => void;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated `highlightTreeGridCellById` 사용
|
|
144
|
-
*/
|
|
145
|
-
export declare const setHighlightTargetCellByGridId: (gridId: string, targetOption: TreeGridHighlightTargetOption) => void;
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated `resetTreeGridSelectionById` 사용
|
|
148
|
-
*/
|
|
149
|
-
export declare const resetGridSelection: (gridId: string) => void;
|
|
150
|
-
/**
|
|
151
|
-
* @deprecated `resetTreeGridSelectionsByIds` 사용
|
|
152
|
-
*/
|
|
153
|
-
export declare const resetGridsSelection: (gridIds: string[]) => void;
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated `resetTreeGridChangesById` 사용
|
|
156
|
-
*/
|
|
157
|
-
export declare const resetGridChanges: (gridId: string) => void;
|
|
158
|
-
/**
|
|
159
|
-
* @deprecated `resetTreeGridChangesByIds` 사용
|
|
160
|
-
*/
|
|
161
|
-
export declare const resetGridsChanges: (gridIds: string[]) => void;
|
|
162
|
-
/**
|
|
163
|
-
* @deprecated `setTreeGridColumnEnumOptionsById` 사용
|
|
164
|
-
*/
|
|
165
|
-
export declare const setGridEnum: <T extends object>(gridId: string, columnName: string, options: T[] | undefined, valueKey: keyof T & string, labelKeys: Array<keyof T & string>) => void;
|
|
@@ -13,7 +13,7 @@ const S = 200, F = /* @__PURE__ */ new Map(), rt = "엑셀 다운로드 중 오
|
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
setTimeout(t, 0);
|
|
16
|
-
}), "yieldToMain"), H = /* @__PURE__ */ l((t, e, o) => (t == null ? void 0 : t(e, { defaultValue: o })) ?? o, "translateText"), at = /* @__PURE__ */ l((t) => t.ColNames ?? [], "getGridColNames"), D = /* @__PURE__ */ l((t) => t.Cols, "getGridCols"), it = /* @__PURE__ */ l((t) => t.Rows, "getGridRows"), lt = /* @__PURE__ */ l((t) => t.Header ?? null, "getGridHeader"),
|
|
16
|
+
}), "yieldToMain"), H = /* @__PURE__ */ l((t, e, o) => (t == null ? void 0 : t(e, { defaultValue: o })) ?? o, "translateText"), at = /* @__PURE__ */ l((t) => t.ColNames ?? [], "getGridColNames"), D = /* @__PURE__ */ l((t) => t.Cols, "getGridCols"), it = /* @__PURE__ */ l((t) => t.Rows, "getGridRows"), lt = /* @__PURE__ */ l((t) => t.Header ?? null, "getGridHeader"), ft = /* @__PURE__ */ l((t) => t.Head ?? null, "getGridHead"), ct = /* @__PURE__ */ l((t) => t.ExportName, "getGridExportName"), dt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.firstChild) ?? null, "getRowFirstChild"), pt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.nextSibling) ?? null, "getRowNextSibling"), Y = /* @__PURE__ */ l((t) => (t ?? "sheet").trim().replace(/[\\/:*?"<>|]/g, "_") || "sheet", "getSafeExportName"), ut = /* @__PURE__ */ l((t) => Y(t).slice(0, 31) || "sheet", "getSafeSheetName"), U = /* @__PURE__ */ l((t) => {
|
|
17
17
|
const e = Number(t);
|
|
18
18
|
return !Number.isFinite(e) || e < 1 ? 1 : Math.floor(e);
|
|
19
19
|
}, "toPositiveInt"), O = /* @__PURE__ */ l((t) => t !== 0 && t !== !1 && t !== "0", "isVisible"), gt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.Type) === "Button" || `${(t == null ? void 0 : t.Button) ?? ""}` == "Button", "isButtonColumn"), wt = /* @__PURE__ */ l((t) => {
|
|
@@ -38,22 +38,22 @@ const S = 200, F = /* @__PURE__ */ new Map(), rt = "엑셀 다운로드 중 오
|
|
|
38
38
|
!r || o.has(r) || r.Kind && r.Kind !== "Header" || (o.add(r), e.push(r));
|
|
39
39
|
}, "appendHeaderRow");
|
|
40
40
|
n(lt(t));
|
|
41
|
-
let s = dt(
|
|
41
|
+
let s = dt(ft(t));
|
|
42
42
|
for (; s; )
|
|
43
43
|
n(s), s = pt(s);
|
|
44
44
|
return e;
|
|
45
|
-
}, "getHeaderRows"),
|
|
45
|
+
}, "getHeaderRows"), V = /* @__PURE__ */ l((t) => !!t && t.Kind === "Data" && O(t.Visible) && t.Fixed !== "Foot", "isExportDataRow");
|
|
46
46
|
function* k(t) {
|
|
47
47
|
if (typeof t.GetFirst == "function" && typeof t.GetNext == "function") {
|
|
48
48
|
let o = t.GetFirst();
|
|
49
49
|
for (; o; )
|
|
50
|
-
|
|
50
|
+
V(o) && (yield o), o = t.GetNext(o);
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
const e = it(t);
|
|
54
54
|
for (const o in e) {
|
|
55
55
|
const n = e[o];
|
|
56
|
-
|
|
56
|
+
V(n) && (yield n);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
l(k, "iterateExportDataRows");
|
|
@@ -63,28 +63,28 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
63
63
|
o && (e += 1);
|
|
64
64
|
return e;
|
|
65
65
|
}, "getExportDataRowCount"), Ct = /* @__PURE__ */ l((t, e) => {
|
|
66
|
-
const o = new Map(t.map((
|
|
67
|
-
e.map((
|
|
66
|
+
const o = new Map(t.map((f, c) => [f, c])), n = new Map(
|
|
67
|
+
e.map((f, c) => [f, c])
|
|
68
68
|
), s = new Array(t.length + 1).fill(0), r = new Array(t.length).fill(-1), i = new Array(t.length).fill(-1);
|
|
69
69
|
let a = -1;
|
|
70
|
-
for (let
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
70
|
+
for (let f = 0; f < t.length; f += 1) {
|
|
71
|
+
const c = t[f];
|
|
72
|
+
if (!c)
|
|
73
73
|
continue;
|
|
74
|
-
const d = n.get(
|
|
75
|
-
r[
|
|
74
|
+
const d = n.get(c) ?? -1;
|
|
75
|
+
r[f] = d, s[f + 1] = s[f] + (d >= 0 ? 1 : 0);
|
|
76
76
|
}
|
|
77
|
-
for (let
|
|
78
|
-
r[
|
|
79
|
-
return (
|
|
80
|
-
const d = o.get(
|
|
77
|
+
for (let f = t.length - 1; f >= 0; f -= 1)
|
|
78
|
+
r[f] >= 0 && (a = f), i[f] = a;
|
|
79
|
+
return (f, c) => {
|
|
80
|
+
const d = o.get(f);
|
|
81
81
|
if (d === void 0)
|
|
82
82
|
return {
|
|
83
83
|
allColSpan: 1,
|
|
84
84
|
visibleColIndex: null,
|
|
85
85
|
visibleColSpan: 0
|
|
86
86
|
};
|
|
87
|
-
const g = U(
|
|
87
|
+
const g = U(c), p = Math.min(t.length - 1, d + g - 1), x = i[d], u = x >= 0 && x <= p ? r[x] : null, w = s[p + 1] - s[d];
|
|
88
88
|
return {
|
|
89
89
|
allColSpan: g,
|
|
90
90
|
visibleColIndex: u !== null && u >= 0 ? u : null,
|
|
@@ -111,7 +111,7 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
111
111
|
return null;
|
|
112
112
|
const n = $(t);
|
|
113
113
|
return n.isValid() ? n.format(o) : null;
|
|
114
|
-
}, "formatDateValue"), b = /* @__PURE__ */ l((t, e) => (e == null ? void 0 : e.Type) !== "Bool" ? null : t == null || t === "" ? "" : t === !0 || t === 1 || t === "1" || t === "Y" || t === "y" || t === "true" || t === "TRUE" ? "Y" : t === !1 || t === 0 || t === "0" || t === "N" || t === "n" || t === "false" || t === "FALSE" ? "N" : null, "formatBoolValue"),
|
|
114
|
+
}, "formatDateValue"), b = /* @__PURE__ */ l((t, e) => (e == null ? void 0 : e.Type) !== "Bool" ? null : t == null || t === "" ? "" : t === !0 || t === 1 || t === "1" || t === "Y" || t === "y" || t === "true" || t === "TRUE" ? "Y" : t === !1 || t === 0 || t === "0" || t === "N" || t === "n" || t === "false" || t === "FALSE" ? "N" : null, "formatBoolValue"), B = /* @__PURE__ */ l((t, e, o) => {
|
|
115
115
|
const n = e == null ? void 0 : e[o];
|
|
116
116
|
return n != null ? String(n) : typeof t.GetCaption == "function" ? t.GetCaption(o) ?? "" : o;
|
|
117
117
|
}, "getHeaderValue"), y = /* @__PURE__ */ l((t, e) => {
|
|
@@ -132,22 +132,22 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
132
132
|
if (_(s))
|
|
133
133
|
return y(s, n);
|
|
134
134
|
if (typeof t.GetValue == "function") {
|
|
135
|
-
const a = t.GetValue(e, o),
|
|
136
|
-
if (c !== null)
|
|
137
|
-
return y(c, n);
|
|
138
|
-
const f = T(a, n);
|
|
135
|
+
const a = t.GetValue(e, o), f = b(a, n);
|
|
139
136
|
if (f !== null)
|
|
140
137
|
return y(f, n);
|
|
138
|
+
const c = T(a, n);
|
|
139
|
+
if (c !== null)
|
|
140
|
+
return y(c, n);
|
|
141
141
|
if (_(a))
|
|
142
142
|
return y(a, n);
|
|
143
143
|
}
|
|
144
144
|
if (typeof t.GetString == "function") {
|
|
145
|
-
const a = t.GetString(e, o),
|
|
146
|
-
if (c !== null)
|
|
147
|
-
return y(c, n);
|
|
148
|
-
const f = T(a, n);
|
|
145
|
+
const a = t.GetString(e, o), f = b(a, n);
|
|
149
146
|
if (f !== null)
|
|
150
147
|
return y(f, n);
|
|
148
|
+
const c = T(a, n);
|
|
149
|
+
if (c !== null)
|
|
150
|
+
return y(c, n);
|
|
151
151
|
if (a != null)
|
|
152
152
|
return y(a, n);
|
|
153
153
|
}
|
|
@@ -162,7 +162,7 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
162
162
|
const r = Math.min(
|
|
163
163
|
U(o[`${t}RowSpan`]),
|
|
164
164
|
Math.max(1, s - n)
|
|
165
|
-
), { allColSpan: i, visibleColIndex: a, visibleColSpan:
|
|
165
|
+
), { allColSpan: i, visibleColIndex: a, visibleColSpan: f } = e(
|
|
166
166
|
t,
|
|
167
167
|
o[`${t}Span`]
|
|
168
168
|
);
|
|
@@ -170,7 +170,7 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
170
170
|
allColSpan: i,
|
|
171
171
|
rowSpan: r,
|
|
172
172
|
visibleColIndex: a,
|
|
173
|
-
visibleColSpan:
|
|
173
|
+
visibleColSpan: f
|
|
174
174
|
};
|
|
175
175
|
}, "getCellSpanInfo"), z = /* @__PURE__ */ l((t, e, o) => {
|
|
176
176
|
var n;
|
|
@@ -193,14 +193,14 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
193
193
|
return [];
|
|
194
194
|
const r = /* @__PURE__ */ new Map(), i = s.map(() => []);
|
|
195
195
|
for (let a = 0; a < s.length; a += 1) {
|
|
196
|
-
const
|
|
197
|
-
if (!(!
|
|
196
|
+
const f = s[a], c = i[a];
|
|
197
|
+
if (!(!f || !c)) {
|
|
198
198
|
for (let d = 0; d < t.length; d += 1) {
|
|
199
199
|
const g = t[d];
|
|
200
200
|
if (!g || z(r, a, d))
|
|
201
201
|
continue;
|
|
202
202
|
const { allColSpan: p, rowSpan: x, visibleColIndex: u, visibleColSpan: w } = q({
|
|
203
|
-
row:
|
|
203
|
+
row: f,
|
|
204
204
|
colName: g,
|
|
205
205
|
rowIndex: a,
|
|
206
206
|
totalRows: s.length,
|
|
@@ -208,8 +208,8 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
208
208
|
});
|
|
209
209
|
if (J(r, a, d, x, p), u === null || w < 1)
|
|
210
210
|
continue;
|
|
211
|
-
const C = e(
|
|
212
|
-
o == null || o(u, C),
|
|
211
|
+
const C = e(f, g);
|
|
212
|
+
o == null || o(u, C), c.push({
|
|
213
213
|
colIndex: u,
|
|
214
214
|
value: C,
|
|
215
215
|
rowSpan: x,
|
|
@@ -228,14 +228,14 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
228
228
|
visibleExportColumns: s
|
|
229
229
|
}) => s.length ? o.length ? mt({
|
|
230
230
|
allExportColumns: t,
|
|
231
|
-
getValue: /* @__PURE__ */ l((r, i) =>
|
|
231
|
+
getValue: /* @__PURE__ */ l((r, i) => B(e, r, i), "getValue"),
|
|
232
232
|
resolveSpan: n,
|
|
233
233
|
rows: o
|
|
234
234
|
}) : [
|
|
235
235
|
s.map((r, i) => ({
|
|
236
236
|
colName: r,
|
|
237
237
|
colIndex: i,
|
|
238
|
-
value:
|
|
238
|
+
value: B(e, null, r),
|
|
239
239
|
rowSpan: 1,
|
|
240
240
|
colSpan: 1
|
|
241
241
|
}))
|
|
@@ -251,22 +251,22 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
251
251
|
const a = t.rowCount + 1;
|
|
252
252
|
if (!i)
|
|
253
253
|
return { startRowIndex: a, rowCount: 0, mergeRanges: [] };
|
|
254
|
-
const
|
|
254
|
+
const f = Rt(n), c = /* @__PURE__ */ new Map(), d = [], g = [];
|
|
255
255
|
let p = 0;
|
|
256
256
|
for (const x of k(n)) {
|
|
257
257
|
const u = new Array(i).fill("");
|
|
258
258
|
for (let w = 0; w < e.length; w += 1) {
|
|
259
259
|
const C = e[w];
|
|
260
|
-
if (!C || z(
|
|
260
|
+
if (!C || z(c, p, w))
|
|
261
261
|
continue;
|
|
262
262
|
const { allColSpan: M, rowSpan: h, visibleColIndex: I, visibleColSpan: E } = q({
|
|
263
263
|
row: x,
|
|
264
264
|
colName: C,
|
|
265
265
|
rowIndex: p,
|
|
266
|
-
totalRows:
|
|
266
|
+
totalRows: f,
|
|
267
267
|
resolveSpan: r
|
|
268
268
|
});
|
|
269
|
-
if (J(
|
|
269
|
+
if (J(c, p, w, h, M), I === null || E < 1)
|
|
270
270
|
continue;
|
|
271
271
|
const A = Et(n, x, C, o[C]);
|
|
272
272
|
s == null || s(I, A), u[I] = A ?? "", !(h === 1 && E === 1) && g.push({
|
|
@@ -276,16 +276,16 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
276
276
|
endColIndex: I + E
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
d.push(u),
|
|
279
|
+
d.push(u), c.delete(p), p += 1, d.length === S ? (t.addRows(d), d.length = 0, await R()) : p % S === 0 && await R();
|
|
280
280
|
}
|
|
281
281
|
return d.length && t.addRows(d), { startRowIndex: a, rowCount: p, mergeRanges: g };
|
|
282
282
|
}, "appendBodyRows"), Tt = /* @__PURE__ */ l(async (t, e, o) => {
|
|
283
283
|
const n = t.rowCount + 1, s = [];
|
|
284
284
|
for (let r = 0; r < e.length; r += 1) {
|
|
285
285
|
const i = e[r] ?? [], a = new Array(o).fill("");
|
|
286
|
-
for (let
|
|
287
|
-
const
|
|
288
|
-
|
|
286
|
+
for (let f = 0; f < i.length; f += 1) {
|
|
287
|
+
const c = i[f];
|
|
288
|
+
c && (a[c.colIndex] = c.value ?? "");
|
|
289
289
|
}
|
|
290
290
|
s.push(a), s.length === S ? (t.addRows(s), s.length = 0, await R()) : (r + 1) % S === 0 && await R();
|
|
291
291
|
}
|
|
@@ -344,13 +344,13 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
344
344
|
const i = o[r];
|
|
345
345
|
if (!i)
|
|
346
346
|
continue;
|
|
347
|
-
const a = e[i],
|
|
348
|
-
if (
|
|
349
|
-
n[r] =
|
|
347
|
+
const a = e[i], f = Gt(a);
|
|
348
|
+
if (f !== null) {
|
|
349
|
+
n[r] = f, s[r] = !0;
|
|
350
350
|
continue;
|
|
351
351
|
}
|
|
352
|
-
const
|
|
353
|
-
n[r] = W(`${
|
|
352
|
+
const c = (typeof t.GetCaption == "function" ? t.GetCaption(i) : "") || i;
|
|
353
|
+
n[r] = W(`${c}`.length);
|
|
354
354
|
}
|
|
355
355
|
return {
|
|
356
356
|
widths: n,
|
|
@@ -360,24 +360,24 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
360
360
|
const a = n[r];
|
|
361
361
|
if (a === void 0)
|
|
362
362
|
return;
|
|
363
|
-
const
|
|
364
|
-
|
|
363
|
+
const f = W(`${i ?? ""}`.length);
|
|
364
|
+
f > a && (n[r] = f);
|
|
365
365
|
}, "updateWidth")
|
|
366
366
|
};
|
|
367
|
-
}, "createColumnWidths"),
|
|
367
|
+
}, "createColumnWidths"), Pt = /* @__PURE__ */ l(async (t, e) => {
|
|
368
368
|
try {
|
|
369
369
|
const o = typeof e == "string" ? { exportName: e } : e, n = o == null ? void 0 : o.t;
|
|
370
370
|
if (!t)
|
|
371
371
|
throw new Error(
|
|
372
372
|
H(n, "Message.TreeGrid 인스턴스가 없습니다.", st)
|
|
373
373
|
);
|
|
374
|
-
const s = tt(), r = D(t), i = ht(t), a = xt(t, i), { widths:
|
|
374
|
+
const s = tt(), r = D(t), i = ht(t), a = xt(t, i), { widths: f, updateWidth: c } = Ft(t, r, a), d = yt(t), g = Ct(i, a), p = await Mt({
|
|
375
375
|
allExportColumns: i,
|
|
376
376
|
grid: t,
|
|
377
377
|
headerRows: d,
|
|
378
378
|
resolveSpan: g,
|
|
379
379
|
visibleExportColumns: a
|
|
380
|
-
}), x = await s, u = new x.Workbook(), w = (o == null ? void 0 : o.exportName) ??
|
|
380
|
+
}), x = await s, u = new x.Workbook(), w = (o == null ? void 0 : o.exportName) ?? ct(t) ?? t.id ?? "sheet", C = o != null && o.useAppendCurrentDateTimeToExportName ? `-${$().format("YYYY-MM-DD-HH-mm-ss")}` : "", M = Y(`${w}${C}`), h = u.addWorksheet(ut(M)), I = await Tt(
|
|
381
381
|
h,
|
|
382
382
|
p,
|
|
383
383
|
a.length
|
|
@@ -390,7 +390,7 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
390
390
|
allExportColumns: i,
|
|
391
391
|
columns: r,
|
|
392
392
|
grid: t,
|
|
393
|
-
onVisibleEntry:
|
|
393
|
+
onVisibleEntry: c,
|
|
394
394
|
resolveSpan: g,
|
|
395
395
|
visibleColumnCount: a.length
|
|
396
396
|
});
|
|
@@ -399,7 +399,7 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
399
399
|
if (!N)
|
|
400
400
|
continue;
|
|
401
401
|
const X = r[N], G = h.getColumn(m + 1);
|
|
402
|
-
G.width =
|
|
402
|
+
G.width = f[m], G.alignment = {
|
|
403
403
|
...L,
|
|
404
404
|
horizontal: St(X)
|
|
405
405
|
};
|
|
@@ -433,9 +433,8 @@ const Rt = /* @__PURE__ */ l((t) => {
|
|
|
433
433
|
}
|
|
434
434
|
);
|
|
435
435
|
}
|
|
436
|
-
}, "exportTreeGridExcel")
|
|
436
|
+
}, "exportTreeGridExcel");
|
|
437
437
|
export {
|
|
438
|
-
|
|
439
|
-
Ht as exportTreeGridExcel
|
|
438
|
+
Pt as exportTreeGridExcel
|
|
440
439
|
};
|
|
441
440
|
//# sourceMappingURL=treeGridExportExcelUtil.js.map
|