@owp/core 1.23.0 → 1.24.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/OwpUtils-DemzkaAZ.js +628 -0
- package/dist/OwpUtils-DemzkaAZ.js.map +1 -0
- package/dist/{QuickPanel-th8vPfoY.js → QuickPanel-Dla59ejy.js} +6 -5
- package/dist/{QuickPanel-th8vPfoY.js.map → QuickPanel-Dla59ejy.js.map} +1 -1
- package/dist/constants.js +19 -7
- package/dist/constants.js.map +1 -1
- package/dist/hooks.js +78 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index-DuATtBay.js +52475 -0
- package/dist/index-DuATtBay.js.map +1 -0
- package/dist/index.js +131 -225
- package/dist/language-CwsGUe4C.js +5 -0
- package/dist/language-CwsGUe4C.js.map +1 -0
- package/dist/treeGrid-4QKOKXZw.js +46 -0
- package/dist/treeGrid-4QKOKXZw.js.map +1 -0
- package/dist/treeGridUtil-ZdWIjKlK.js +2922 -0
- package/dist/treeGridUtil-ZdWIjKlK.js.map +1 -0
- package/dist/types/constants/excel.d.ts +12 -0
- package/dist/types/constants/index.d.ts +3 -0
- package/dist/types/constants/language.d.ts +1 -0
- package/dist/types/constants/treeGrid.d.ts +4 -0
- package/dist/types/hooks/index.d.ts +19 -0
- package/dist/types/hooks/useCommonCodeList.d.ts +4 -4
- package/dist/types/hooks/useCurrentLanguage.d.ts +1 -1
- package/dist/types/hooks/useNavigation.d.ts +4 -4
- package/dist/types/index.d.ts +0 -37
- package/dist/types/utils/excelUtil.d.ts +2 -8
- package/dist/types/utils/index.d.ts +18 -0
- package/dist/types/utils/treeGridUtil.d.ts +2 -5
- package/dist/useTreeGridExcelExport-BumQHnAN.js +414 -0
- package/dist/useTreeGridExcelExport-BumQHnAN.js.map +1 -0
- package/dist/utils.js +6962 -0
- package/dist/utils.js.map +1 -0
- package/hooks.d.ts +1 -0
- package/hooks.js +1 -0
- package/package.json +7 -2
- package/utils.d.ts +1 -0
- package/utils.js +1 -0
- package/dist/index-DOKXEOMh.js +0 -63356
- package/dist/index-DOKXEOMh.js.map +0 -1
- package/dist/storageKeys-DRzte9LZ.js +0 -15
- package/dist/storageKeys-DRzte9LZ.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type ExcelJS from 'exceljs';
|
|
2
|
+
type ExcelCellFont = ExcelJS.Cell['font'];
|
|
3
|
+
type ExcelCellAlignment = ExcelJS.Cell['alignment'];
|
|
4
|
+
type ExcelCellFill = ExcelJS.Cell['fill'];
|
|
5
|
+
type ExcelCellBorder = ExcelJS.Cell['border'];
|
|
6
|
+
export declare const DEFAULT_CELL_ALIGNMENT: ExcelCellAlignment;
|
|
7
|
+
export declare const DEFAULT_WRAP_CELL_ALIGNMENT: ExcelCellAlignment;
|
|
8
|
+
export declare const DEFAULT_HEADER_FONT: ExcelCellFont;
|
|
9
|
+
export declare const DEFAULT_VALUE_FONT: ExcelCellFont;
|
|
10
|
+
export declare const DEFAULT_THIN_BORDER: ExcelCellBorder;
|
|
11
|
+
export declare const DEFAULT_HEADER_FILL: ExcelCellFill;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FALLBACK_LANGUAGE_LIST: string[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TREEGRID_WARNING_CELL_COLOR = "#f44336";
|
|
2
|
+
export declare const TREEGRID_INPUT_CELL_COLOR = "#ffd6a8";
|
|
3
|
+
export declare const TREEGRID_CELL_HIGHLIGHT_CLASS = "text-white text-xl font-semibold";
|
|
4
|
+
export declare const TREEGRID_CELL_HIGHLIGHT_COLOR = "#ff8904";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './useCommonCodeList';
|
|
2
|
+
export * from './useConfirm';
|
|
3
|
+
export * from './useCurrentLanguage';
|
|
4
|
+
export * from './useCurrentLogoSrc';
|
|
5
|
+
export * from './useCurrentUser';
|
|
6
|
+
export * from './useCurrentUserId';
|
|
7
|
+
export * from './useDebounce';
|
|
8
|
+
export * from './useDeepCompareEffect';
|
|
9
|
+
export * from './useNavigation';
|
|
10
|
+
export * from './useOwpTranslation';
|
|
11
|
+
export * from './usePageLockLoading';
|
|
12
|
+
export * from './usePrevious';
|
|
13
|
+
export * from './useShortcuts';
|
|
14
|
+
export * from './useStorage';
|
|
15
|
+
export * from './useThemeMediaQuery';
|
|
16
|
+
export * from './useTimeout';
|
|
17
|
+
export * from './useTreeGridCommonCodeEnum';
|
|
18
|
+
export * from './useTreeGridCommonCodeEnums';
|
|
19
|
+
export * from './useTreeGridExcelExport';
|
|
@@ -8,10 +8,10 @@ export declare const useGetCommonCodeList: () => {
|
|
|
8
8
|
/**
|
|
9
9
|
* 공통코드 목록 설정 훅
|
|
10
10
|
*/
|
|
11
|
-
export declare const useSetCommonCodeList: () => (args_0: {
|
|
11
|
+
export declare const useSetCommonCodeList: () => (args_0: typeof import("jotai/utils").RESET | {
|
|
12
12
|
[codeId: string]: CommonCode[];
|
|
13
|
-
} |
|
|
13
|
+
} | ((prev: {
|
|
14
14
|
[codeId: string]: CommonCode[];
|
|
15
|
-
}) => {
|
|
15
|
+
}) => typeof import("jotai/utils").RESET | {
|
|
16
16
|
[codeId: string]: CommonCode[];
|
|
17
|
-
}
|
|
17
|
+
})) => void;
|
|
@@ -14,11 +14,11 @@ export declare const useGetNavigationList: () => (Navigation & {
|
|
|
14
14
|
/**
|
|
15
15
|
* 내비게이션 목록 설정 훅
|
|
16
16
|
*/
|
|
17
|
-
export declare const useSetNavigationList: () => (args_0:
|
|
17
|
+
export declare const useSetNavigationList: () => (args_0: (Navigation & {
|
|
18
18
|
children?: Array<Navigation>;
|
|
19
|
-
})[] | ((prev: (Navigation & {
|
|
19
|
+
})[] | typeof import("jotai/utils").RESET | ((prev: (Navigation & {
|
|
20
20
|
children?: Array<Navigation>;
|
|
21
|
-
})[]) =>
|
|
21
|
+
})[]) => (Navigation & {
|
|
22
22
|
children?: Array<Navigation>;
|
|
23
|
-
})[])) => void;
|
|
23
|
+
})[] | typeof import("jotai/utils").RESET)) => void;
|
|
24
24
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,44 +3,7 @@ export * from './colors/owpDark';
|
|
|
3
3
|
export * from './colors/skyBlue';
|
|
4
4
|
export { DialogsProvider } from '@toolpad/core/useDialogs';
|
|
5
5
|
export * from './context/OwpAppProvider';
|
|
6
|
-
export * from './hooks/useCommonCodeList';
|
|
7
|
-
export * from './hooks/useConfirm';
|
|
8
|
-
export * from './hooks/useCurrentLanguage';
|
|
9
|
-
export * from './hooks/useCurrentLogoSrc';
|
|
10
|
-
export * from './hooks/useCurrentUser';
|
|
11
|
-
export * from './hooks/useCurrentUserId';
|
|
12
|
-
export * from './hooks/useDebounce';
|
|
13
|
-
export * from './hooks/useNavigation';
|
|
14
|
-
export * from './hooks/usePageLockLoading';
|
|
15
|
-
export * from './hooks/usePrevious';
|
|
16
|
-
export * from './hooks/useOwpTranslation';
|
|
17
|
-
export * from './hooks/useDeepCompareEffect';
|
|
18
|
-
export * from './hooks/useShortcuts';
|
|
19
|
-
export * from './hooks/useStorage';
|
|
20
|
-
export * from './hooks/useThemeMediaQuery';
|
|
21
|
-
export * from './hooks/useTimeout';
|
|
22
|
-
export * from './hooks/useTreeGridCommonCodeEnum';
|
|
23
|
-
export * from './hooks/useTreeGridCommonCodeEnums';
|
|
24
|
-
export * from './hooks/useTreeGridExcelExport';
|
|
25
6
|
export * from './store/store';
|
|
26
|
-
export * from './utils/barcodeUtil';
|
|
27
|
-
export * from './utils/commonCodeUtils';
|
|
28
|
-
export * from './utils/common';
|
|
29
|
-
export * from './utils/createJsonBody';
|
|
30
|
-
export * from './utils/createJsonString';
|
|
31
|
-
export * from './utils/excelUtil';
|
|
32
|
-
export * from './utils/errors';
|
|
33
|
-
export * from './utils/events';
|
|
34
|
-
export * from './utils/formatDateToYmd';
|
|
35
|
-
export * from './utils/formatNumber';
|
|
36
|
-
export * from './utils/getDisplayValue';
|
|
37
|
-
export * from './utils/getFormDefaultValues';
|
|
38
|
-
export * from './utils/isEnterKeyEvent';
|
|
39
|
-
export * from './utils/qrCodeUtil';
|
|
40
|
-
export * from './utils/rebuildValue';
|
|
41
|
-
export * from './utils/treeGridExportExcelUtil';
|
|
42
|
-
export * from './utils/treeGridUtil';
|
|
43
|
-
export * from './utils/zipUtil';
|
|
44
7
|
export * from './components/layouts/themeLayouts';
|
|
45
8
|
export * from './components/layouts/shared-components/OwpLanguageSwitcherSelect';
|
|
46
9
|
export * from './components/layouts/shared-components/OwpSettingsViewerDialog';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { DEFAULT_CELL_ALIGNMENT, DEFAULT_HEADER_FILL, DEFAULT_HEADER_FONT, DEFAULT_THIN_BORDER, DEFAULT_VALUE_FONT, DEFAULT_WRAP_CELL_ALIGNMENT } from '@/constants/excel';
|
|
1
2
|
import ExcelJS from 'exceljs';
|
|
3
|
+
export { DEFAULT_CELL_ALIGNMENT, DEFAULT_HEADER_FILL, DEFAULT_HEADER_FONT, DEFAULT_THIN_BORDER, DEFAULT_VALUE_FONT, DEFAULT_WRAP_CELL_ALIGNMENT, };
|
|
2
4
|
type ExcelCellValue = string | number | boolean | Date | ExcelJS.CellValue | null;
|
|
3
5
|
type ExcelCellFont = ExcelJS.Cell['font'];
|
|
4
6
|
type ExcelCellAlignment = ExcelJS.Cell['alignment'];
|
|
5
7
|
type ExcelCellFill = ExcelJS.Cell['fill'];
|
|
6
|
-
type ExcelCellBorder = ExcelJS.Cell['border'];
|
|
7
8
|
type ExcelCellOptions = {
|
|
8
9
|
key: string;
|
|
9
10
|
value?: ExcelCellValue;
|
|
@@ -15,12 +16,6 @@ type ExcelCellOptions = {
|
|
|
15
16
|
type ExcelMergeCellOptions = Omit<ExcelCellOptions, 'key'> & {
|
|
16
17
|
range: string;
|
|
17
18
|
};
|
|
18
|
-
export declare const DEFAULT_CELL_ALIGNMENT: ExcelCellAlignment;
|
|
19
|
-
export declare const DEFAULT_WRAP_CELL_ALIGNMENT: ExcelCellAlignment;
|
|
20
|
-
export declare const DEFAULT_HEADER_FONT: ExcelCellFont;
|
|
21
|
-
export declare const DEFAULT_VALUE_FONT: ExcelCellFont;
|
|
22
|
-
export declare const DEFAULT_THIN_BORDER: ExcelCellBorder;
|
|
23
|
-
export declare const DEFAULT_HEADER_FILL: ExcelCellFill;
|
|
24
19
|
/**
|
|
25
20
|
* 엑셀 컬럼 문자 인덱스 변환
|
|
26
21
|
* @param letters 엑셀 컬럼 문자
|
|
@@ -59,4 +54,3 @@ export declare const setCellValue: (ws: ExcelJS.Worksheet, { key, value, font, a
|
|
|
59
54
|
* @param isHeader 헤더 셀 여부
|
|
60
55
|
*/
|
|
61
56
|
export declare const setMergeCells: (ws: ExcelJS.Worksheet, { range, value, font, alignment, fill, isHeader }: ExcelMergeCellOptions) => void;
|
|
62
|
-
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './barcodeUtil';
|
|
2
|
+
export * from './commonCodeUtils';
|
|
3
|
+
export * from './common';
|
|
4
|
+
export * from './createJsonBody';
|
|
5
|
+
export * from './createJsonString';
|
|
6
|
+
export * from './excelUtil';
|
|
7
|
+
export * from './errors';
|
|
8
|
+
export * from './events';
|
|
9
|
+
export * from './formatDateToYmd';
|
|
10
|
+
export * from './formatNumber';
|
|
11
|
+
export * from './getDisplayValue';
|
|
12
|
+
export * from './getFormDefaultValues';
|
|
13
|
+
export * from './isEnterKeyEvent';
|
|
14
|
+
export * from './qrCodeUtil';
|
|
15
|
+
export * from './rebuildValue';
|
|
16
|
+
export * from './treeGridExportExcelUtil';
|
|
17
|
+
export * from './treeGridUtil';
|
|
18
|
+
export * from './zipUtil';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TREEGRID_CELL_HIGHLIGHT_CLASS, TREEGRID_CELL_HIGHLIGHT_COLOR, TREEGRID_INPUT_CELL_COLOR, TREEGRID_WARNING_CELL_COLOR } from '@/constants/treeGrid';
|
|
2
|
+
export { TREEGRID_CELL_HIGHLIGHT_CLASS, TREEGRID_CELL_HIGHLIGHT_COLOR, TREEGRID_INPUT_CELL_COLOR, TREEGRID_WARNING_CELL_COLOR, };
|
|
1
3
|
type TreeGridInsertPosition = 'above' | 'below' | 'top' | 'last';
|
|
2
4
|
type TreeGridAddRowOptions<T> = {
|
|
3
5
|
canSelect?: boolean;
|
|
@@ -14,10 +16,6 @@ type TreeGridHighlightTargetOption = {
|
|
|
14
16
|
row: TRow;
|
|
15
17
|
col: string;
|
|
16
18
|
};
|
|
17
|
-
export declare const TREEGRID_WARNING_CELL_COLOR = "#f44336";
|
|
18
|
-
export declare const TREEGRID_INPUT_CELL_COLOR = "#ffd6a8";
|
|
19
|
-
export declare const TREEGRID_CELL_HIGHLIGHT_CLASS = "text-white text-xl font-semibold";
|
|
20
|
-
export declare const TREEGRID_CELL_HIGHLIGHT_COLOR = "#ff8904";
|
|
21
19
|
/**
|
|
22
20
|
* TreeGrid 인스턴스 ID 조회
|
|
23
21
|
* @param gridId TreeGrid 인스턴스 ID
|
|
@@ -165,4 +163,3 @@ export declare const resetGridsChanges: (gridIds: string[]) => void;
|
|
|
165
163
|
* @deprecated `setTreeGridColumnEnumOptionsById` 사용
|
|
166
164
|
*/
|
|
167
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;
|
|
168
|
-
export {};
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var t = (e, n) => F(e, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { S as d } from "./treeGrid-4QKOKXZw.js";
|
|
4
|
+
import { useAtomValue as T, useSetAtom as S } from "jotai";
|
|
5
|
+
import { atomWithStorage as w } from "jotai/utils";
|
|
6
|
+
import { d as _, j as k, k as Q, y as W, z as A, A as q, B as L } from "./treeGridUtil-ZdWIjKlK.js";
|
|
7
|
+
import { Typography as J, DialogContent as $, DialogActions as Y, Button as R, Dialog as H } from "@mui/material";
|
|
8
|
+
import { useDialogs as X } from "@toolpad/core/useDialogs";
|
|
9
|
+
import { useTranslation as x } from "react-i18next";
|
|
10
|
+
import E, { useRef as C, useEffect as h, useCallback as y, useMemo as Z, useState as D } from "react";
|
|
11
|
+
import { useTheme as ee } from "@mui/material/styles";
|
|
12
|
+
const I = w(d.commonCodeList, void 0), we = /* @__PURE__ */ t(() => T(I), "useGetCommonCodeList"), be = /* @__PURE__ */ t(() => S(I), "useSetCommonCodeList"), f = {
|
|
13
|
+
infoTitle: {
|
|
14
|
+
primaryKey: "message.would_you_like_to_proceed",
|
|
15
|
+
fallbackKey: "Message.처리하시겠습니까",
|
|
16
|
+
defaultValue: "처리하시겠습니까?"
|
|
17
|
+
},
|
|
18
|
+
infoOk: {
|
|
19
|
+
primaryKey: "button.ok",
|
|
20
|
+
fallbackKey: "Button.확인",
|
|
21
|
+
defaultValue: "확인"
|
|
22
|
+
},
|
|
23
|
+
saveTitle: {
|
|
24
|
+
primaryKey: "message.do_you_want_to_save",
|
|
25
|
+
fallbackKey: "Message.저장하시겠습니까?",
|
|
26
|
+
defaultValue: "저장하시겠습니까?"
|
|
27
|
+
},
|
|
28
|
+
saveOk: {
|
|
29
|
+
primaryKey: "button.save",
|
|
30
|
+
fallbackKey: "Button.저장",
|
|
31
|
+
defaultValue: "저장"
|
|
32
|
+
},
|
|
33
|
+
updateTitle: {
|
|
34
|
+
primaryKey: "message.would_you_like_to_edit",
|
|
35
|
+
fallbackKey: "Message.수정하시겠습니까?",
|
|
36
|
+
defaultValue: "수정하시겠습니까?"
|
|
37
|
+
},
|
|
38
|
+
updateOk: {
|
|
39
|
+
primaryKey: "button.edit",
|
|
40
|
+
fallbackKey: "Button.수정",
|
|
41
|
+
defaultValue: "수정"
|
|
42
|
+
},
|
|
43
|
+
deleteTitle: {
|
|
44
|
+
primaryKey: "message.are_you_sure_you_want_to_delete",
|
|
45
|
+
fallbackKey: "Message.삭제하시겠습니까?",
|
|
46
|
+
defaultValue: "삭제하시겠습니까?"
|
|
47
|
+
},
|
|
48
|
+
deleteOk: {
|
|
49
|
+
primaryKey: "button.delete",
|
|
50
|
+
fallbackKey: "Button.삭제",
|
|
51
|
+
defaultValue: "삭제"
|
|
52
|
+
},
|
|
53
|
+
cancel: {
|
|
54
|
+
primaryKey: "button.cancel",
|
|
55
|
+
fallbackKey: "Button.취소",
|
|
56
|
+
defaultValue: "취소"
|
|
57
|
+
}
|
|
58
|
+
}, O = /* @__PURE__ */ t((e, n) => e ? {
|
|
59
|
+
color: e,
|
|
60
|
+
...n
|
|
61
|
+
} : n, "mergeOkButtonProps"), ke = /* @__PURE__ */ t(() => {
|
|
62
|
+
const e = X(), { t: n, i18n: r } = x("owp"), s = /* @__PURE__ */ t(({
|
|
63
|
+
primaryKey: o,
|
|
64
|
+
fallbackKey: c,
|
|
65
|
+
defaultValue: i
|
|
66
|
+
}) => n(r.exists(o) ? o : c, { defaultValue: i }), "translateConfirmText"), u = /* @__PURE__ */ t((o) => e.open(te, o), "confirmBase");
|
|
67
|
+
return {
|
|
68
|
+
confirm: u,
|
|
69
|
+
confirmInfo: /* @__PURE__ */ t(async ({ title: o, okText: c, severity: i } = {}) => u({
|
|
70
|
+
title: o ?? s(f.infoTitle),
|
|
71
|
+
okText: c ?? s(f.infoOk),
|
|
72
|
+
severity: i ?? "primary",
|
|
73
|
+
useInfo: !0
|
|
74
|
+
}), "confirmInfo"),
|
|
75
|
+
confirmSave: /* @__PURE__ */ t(async ({
|
|
76
|
+
title: o,
|
|
77
|
+
okText: c,
|
|
78
|
+
cancelText: i,
|
|
79
|
+
okButtonProps: a
|
|
80
|
+
} = {}) => u({
|
|
81
|
+
title: o ?? s(f.saveTitle),
|
|
82
|
+
okText: c ?? s(f.saveOk),
|
|
83
|
+
cancelText: i,
|
|
84
|
+
okButtonProps: O("secondary", a)
|
|
85
|
+
}), "confirmSave"),
|
|
86
|
+
confirmUpdate: /* @__PURE__ */ t(async ({
|
|
87
|
+
title: o,
|
|
88
|
+
okText: c,
|
|
89
|
+
cancelText: i,
|
|
90
|
+
okButtonProps: a
|
|
91
|
+
} = {}) => u({
|
|
92
|
+
title: o ?? s(f.updateTitle),
|
|
93
|
+
okText: c ?? s(f.updateOk),
|
|
94
|
+
cancelText: i,
|
|
95
|
+
okButtonProps: O("secondary", a)
|
|
96
|
+
}), "confirmUpdate"),
|
|
97
|
+
confirmDelete: /* @__PURE__ */ t(async ({
|
|
98
|
+
title: o,
|
|
99
|
+
okText: c,
|
|
100
|
+
cancelText: i,
|
|
101
|
+
okButtonProps: a
|
|
102
|
+
} = {}) => u({
|
|
103
|
+
title: o ?? s(f.deleteTitle),
|
|
104
|
+
okText: c ?? s(f.deleteOk),
|
|
105
|
+
cancelText: i,
|
|
106
|
+
okButtonProps: O("error", a)
|
|
107
|
+
}), "confirmDelete")
|
|
108
|
+
};
|
|
109
|
+
}, "useConfirm"), te = /* @__PURE__ */ t(({ payload: e, open: n, onClose: r }) => {
|
|
110
|
+
const { title: s, okButtonProps: u, cancelButtonProps: o, severity: c, useInfo: i } = e, { t: a, i18n: m } = x("owp"), l = (e == null ? void 0 : e.okText) ?? a(m.exists(f.infoOk.primaryKey) ? "button.ok" : "Button.확인", {
|
|
111
|
+
defaultValue: f.infoOk.defaultValue
|
|
112
|
+
}), p = (e == null ? void 0 : e.cancelText) ?? a(
|
|
113
|
+
m.exists(f.cancel.primaryKey) ? f.cancel.primaryKey : f.cancel.fallbackKey,
|
|
114
|
+
{ defaultValue: f.cancel.defaultValue }
|
|
115
|
+
);
|
|
116
|
+
return /* @__PURE__ */ _(H, { fullWidth: !0, maxWidth: "xs", open: n, onClose: /* @__PURE__ */ t(() => r(!1), "onClose"), children: [
|
|
117
|
+
/* @__PURE__ */ k($, { children: /* @__PURE__ */ k(J, { className: "mb-12", variant: "h6", children: s }) }),
|
|
118
|
+
/* @__PURE__ */ _(Y, { children: [
|
|
119
|
+
!i && /* @__PURE__ */ k(R, { ...o, variant: "outlined", onClick: /* @__PURE__ */ t(() => r(!1), "onClick"), children: p }),
|
|
120
|
+
/* @__PURE__ */ k(
|
|
121
|
+
R,
|
|
122
|
+
{
|
|
123
|
+
color: c || "primary",
|
|
124
|
+
variant: "contained",
|
|
125
|
+
...u,
|
|
126
|
+
onClick: /* @__PURE__ */ t(() => r(!0), "onClick"),
|
|
127
|
+
children: l
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] })
|
|
131
|
+
] });
|
|
132
|
+
}, "ConfirmDialog"), B = w(d.currentLanguage, {
|
|
133
|
+
id: "kr",
|
|
134
|
+
title: "한국어",
|
|
135
|
+
flag: "KR"
|
|
136
|
+
}), ve = /* @__PURE__ */ t(() => {
|
|
137
|
+
const { t: e } = x("owp");
|
|
138
|
+
return [
|
|
139
|
+
{ id: "kr", title: e("Common.한국어", { defaultValue: "한국어" }), flag: "KR" },
|
|
140
|
+
{
|
|
141
|
+
id: "en",
|
|
142
|
+
title: e("Common.English", { defaultValue: "English" }),
|
|
143
|
+
flag: "EN"
|
|
144
|
+
},
|
|
145
|
+
{ id: "lc", title: e("Common.Etc", { defaultValue: "Etc" }), flag: "LC" }
|
|
146
|
+
];
|
|
147
|
+
}, "useGetLanguageList"), xe = /* @__PURE__ */ t(() => T(B), "useGetCurrentLanguage"), Ce = /* @__PURE__ */ t(() => S(B), "useSetCurrentLanguage"), P = w(
|
|
148
|
+
d.currentLogoSrc,
|
|
149
|
+
"assets/images/logo/daedong-door-logo-b.png"
|
|
150
|
+
), Ke = /* @__PURE__ */ t(() => T(P), "useGetCurrentLogoSrc"), Oe = /* @__PURE__ */ t(() => S(P), "useSetCurrentLogoSrc");
|
|
151
|
+
function ne(e, n, { signal: r, edges: s } = {}) {
|
|
152
|
+
let u, o = null;
|
|
153
|
+
const c = s != null && s.includes("leading"), i = s == null || s.includes("trailing"), a = /* @__PURE__ */ t(() => {
|
|
154
|
+
o !== null && (e.apply(u, o), u = void 0, o = null);
|
|
155
|
+
}, "invoke"), m = /* @__PURE__ */ t(() => {
|
|
156
|
+
i && a(), K();
|
|
157
|
+
}, "onTimerEnd");
|
|
158
|
+
let l = null;
|
|
159
|
+
const p = /* @__PURE__ */ t(() => {
|
|
160
|
+
l != null && clearTimeout(l), l = setTimeout(() => {
|
|
161
|
+
l = null, m();
|
|
162
|
+
}, n);
|
|
163
|
+
}, "schedule"), g = /* @__PURE__ */ t(() => {
|
|
164
|
+
l !== null && (clearTimeout(l), l = null);
|
|
165
|
+
}, "cancelTimer"), K = /* @__PURE__ */ t(() => {
|
|
166
|
+
g(), u = void 0, o = null;
|
|
167
|
+
}, "cancel"), j = /* @__PURE__ */ t(() => {
|
|
168
|
+
a();
|
|
169
|
+
}, "flush"), b = /* @__PURE__ */ t(function(...U) {
|
|
170
|
+
if (r != null && r.aborted)
|
|
171
|
+
return;
|
|
172
|
+
u = this, o = U;
|
|
173
|
+
const z = l == null;
|
|
174
|
+
p(), c && z && a();
|
|
175
|
+
}, "debounced");
|
|
176
|
+
return b.schedule = p, b.cancel = K, b.flush = j, r == null || r.addEventListener("abort", K, { once: !0 }), b;
|
|
177
|
+
}
|
|
178
|
+
t(ne, "debounce$1");
|
|
179
|
+
function re(e, n = 0, r = {}) {
|
|
180
|
+
typeof r != "object" && (r = {});
|
|
181
|
+
const { leading: s = !1, trailing: u = !0, maxWait: o } = r, c = Array(2);
|
|
182
|
+
s && (c[0] = "leading"), u && (c[1] = "trailing");
|
|
183
|
+
let i, a = null;
|
|
184
|
+
const m = ne(function(...g) {
|
|
185
|
+
i = e.apply(this, g), a = null;
|
|
186
|
+
}, n, { edges: c }), l = /* @__PURE__ */ t(function(...g) {
|
|
187
|
+
return o != null && (a === null && (a = Date.now()), Date.now() - a >= o) ? (i = e.apply(this, g), a = Date.now(), m.cancel(), m.schedule(), i) : (m.apply(this, g), i);
|
|
188
|
+
}, "debounced"), p = /* @__PURE__ */ t(() => (m.flush(), i), "flush");
|
|
189
|
+
return l.cancel = m.cancel, l.flush = p, l;
|
|
190
|
+
}
|
|
191
|
+
t(re, "debounce");
|
|
192
|
+
function oe(e, n) {
|
|
193
|
+
if (n === void 0)
|
|
194
|
+
return e.trimEnd();
|
|
195
|
+
let r = e.length;
|
|
196
|
+
switch (typeof n) {
|
|
197
|
+
case "string": {
|
|
198
|
+
if (n.length !== 1)
|
|
199
|
+
throw new Error("The 'chars' parameter should be a single character string.");
|
|
200
|
+
for (; r > 0 && e[r - 1] === n; )
|
|
201
|
+
r--;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
case "object":
|
|
205
|
+
for (; r > 0 && n.includes(e[r - 1]); )
|
|
206
|
+
r--;
|
|
207
|
+
}
|
|
208
|
+
return e.substring(0, r);
|
|
209
|
+
}
|
|
210
|
+
t(oe, "trimEnd$1");
|
|
211
|
+
function ue(e, n, r) {
|
|
212
|
+
return e == null ? "" : oe(e, n.toString().split(""));
|
|
213
|
+
}
|
|
214
|
+
t(ue, "trimEnd");
|
|
215
|
+
function _e(e, n) {
|
|
216
|
+
const r = C(e);
|
|
217
|
+
h(() => {
|
|
218
|
+
r.current = e;
|
|
219
|
+
}, [e]);
|
|
220
|
+
const s = y(
|
|
221
|
+
re((...u) => {
|
|
222
|
+
r.current(...u);
|
|
223
|
+
}, n),
|
|
224
|
+
[n]
|
|
225
|
+
);
|
|
226
|
+
return h(() => () => {
|
|
227
|
+
s.cancel();
|
|
228
|
+
}, [s]), s;
|
|
229
|
+
}
|
|
230
|
+
t(_e, "useDebounce");
|
|
231
|
+
function se(e) {
|
|
232
|
+
if (!e || !e.length)
|
|
233
|
+
throw new Error(
|
|
234
|
+
"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead."
|
|
235
|
+
);
|
|
236
|
+
if (e.every(ce))
|
|
237
|
+
throw new Error(
|
|
238
|
+
"useDeepCompareEffect should not be used with dependencies that are all primitive values. Use React.useEffect instead."
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
t(se, "checkDeps");
|
|
242
|
+
function ce(e) {
|
|
243
|
+
return e == null || /^[sbn]/.test(typeof e);
|
|
244
|
+
}
|
|
245
|
+
t(ce, "isPrimitive");
|
|
246
|
+
function G(e) {
|
|
247
|
+
const n = E.useRef(e), r = E.useRef(0);
|
|
248
|
+
return Q(e, n.current) || (n.current = e, r.current += 1), E.useMemo(() => n.current, [r.current]);
|
|
249
|
+
}
|
|
250
|
+
t(G, "useDeepCompareMemoize");
|
|
251
|
+
function Ae(e, n) {
|
|
252
|
+
return process.env.NODE_ENV !== "production" && se(n), E.useEffect(e, G(n));
|
|
253
|
+
}
|
|
254
|
+
t(Ae, "useDeepCompareEffect");
|
|
255
|
+
function Le(e, n) {
|
|
256
|
+
return E.useEffect(e, G(n));
|
|
257
|
+
}
|
|
258
|
+
t(Le, "useDeepCompareEffectNoCheck");
|
|
259
|
+
const M = w(d.navigationList, void 0), Re = /* @__PURE__ */ t(() => T(M), "useGetNavigationList"), Ve = /* @__PURE__ */ t(() => S(M), "useSetNavigationList"), ie = /* @__PURE__ */ t((e) => {
|
|
260
|
+
if (!e.includes("."))
|
|
261
|
+
return;
|
|
262
|
+
const r = ue(e, ".").lastIndexOf(".");
|
|
263
|
+
return r < 0 ? e : e.slice(r + 1);
|
|
264
|
+
}, "getDefaultValueFromKey"), ae = /* @__PURE__ */ t(() => {
|
|
265
|
+
const { t: e, ...n } = x("owp");
|
|
266
|
+
return { t: /* @__PURE__ */ t((...s) => {
|
|
267
|
+
const [u, o] = s, c = W(o) ? o : void 0, i = !!c, a = i && Object.prototype.hasOwnProperty.call(c, "defaultValue");
|
|
268
|
+
if ((o == null || i) && !a && typeof u == "string") {
|
|
269
|
+
const l = ie(u);
|
|
270
|
+
if (l) {
|
|
271
|
+
const p = i ? { ...c, defaultValue: l } : { defaultValue: l };
|
|
272
|
+
return e(u, p, ...s.slice(2));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return e(...s);
|
|
276
|
+
}, "t"), ...n };
|
|
277
|
+
}, "useOwpTranslation");
|
|
278
|
+
function De(e) {
|
|
279
|
+
const n = C();
|
|
280
|
+
return h(() => {
|
|
281
|
+
n.current = e;
|
|
282
|
+
}, [e]), n.current;
|
|
283
|
+
}
|
|
284
|
+
t(De, "usePrevious");
|
|
285
|
+
const N = w(d.currentShortcuts, []), Ie = /* @__PURE__ */ t(() => T(N), "useGetShortcuts"), Be = /* @__PURE__ */ t(() => S(N), "useSetShortcuts"), le = [
|
|
286
|
+
d.currentLanguage,
|
|
287
|
+
d.currentShortcuts,
|
|
288
|
+
d.currentUserId,
|
|
289
|
+
d.currentLogoSrc,
|
|
290
|
+
d.owpEnv
|
|
291
|
+
], v = /* @__PURE__ */ t(() => typeof window > "u" ? null : window.localStorage, "getLocalStorage"), V = /* @__PURE__ */ t((e, n) => {
|
|
292
|
+
if (!e)
|
|
293
|
+
return n;
|
|
294
|
+
try {
|
|
295
|
+
return JSON.parse(e);
|
|
296
|
+
} catch {
|
|
297
|
+
return n;
|
|
298
|
+
}
|
|
299
|
+
}, "safeParseJson"), Pe = /* @__PURE__ */ t(() => {
|
|
300
|
+
const e = y(() => {
|
|
301
|
+
const u = v();
|
|
302
|
+
if (!u)
|
|
303
|
+
return;
|
|
304
|
+
const o = le.map((c) => [c, u.getItem(c)]);
|
|
305
|
+
u.clear(), o.forEach(([c, i]) => {
|
|
306
|
+
i !== null && u.setItem(c, i);
|
|
307
|
+
});
|
|
308
|
+
}, []), n = y(() => {
|
|
309
|
+
const u = v(), o = V(
|
|
310
|
+
(u == null ? void 0 : u.getItem(d.currentUser)) ?? null,
|
|
311
|
+
null
|
|
312
|
+
);
|
|
313
|
+
return A(o) ? {
|
|
314
|
+
role: ["admin"],
|
|
315
|
+
data: {
|
|
316
|
+
displayName: o.USERNAME,
|
|
317
|
+
email: o.EMAIL,
|
|
318
|
+
MES_STARTPAGE: o.MES_STARTPAGE,
|
|
319
|
+
STARTPAGE: o.STARTPAGE,
|
|
320
|
+
USERSEQ: o.USERSEQ,
|
|
321
|
+
photoURL: ""
|
|
322
|
+
}
|
|
323
|
+
} : null;
|
|
324
|
+
}, []), r = y((u) => {
|
|
325
|
+
const o = v();
|
|
326
|
+
o && o.setItem(d.owpEnv, JSON.stringify(u ?? {}));
|
|
327
|
+
}, []), s = y(() => {
|
|
328
|
+
const u = v(), o = V((u == null ? void 0 : u.getItem(d.owpEnv)) ?? null, {});
|
|
329
|
+
return A(o) ? o : {};
|
|
330
|
+
}, []);
|
|
331
|
+
return Z(
|
|
332
|
+
() => ({
|
|
333
|
+
resetStorage: e,
|
|
334
|
+
getCurrentUser: n,
|
|
335
|
+
setEnv: r,
|
|
336
|
+
getEnv: s
|
|
337
|
+
}),
|
|
338
|
+
[n, s, e, r]
|
|
339
|
+
);
|
|
340
|
+
}, "useStorage");
|
|
341
|
+
function Ge(e) {
|
|
342
|
+
const n = ee(), r = e(n).replace("@media ", "");
|
|
343
|
+
function s(c) {
|
|
344
|
+
return window.matchMedia(c).matches;
|
|
345
|
+
}
|
|
346
|
+
t(s, "getMatches");
|
|
347
|
+
const [u, o] = D(s(r));
|
|
348
|
+
return h(
|
|
349
|
+
() => {
|
|
350
|
+
const c = window.matchMedia(r);
|
|
351
|
+
o(s(r));
|
|
352
|
+
const i = /* @__PURE__ */ t((a) => o(a.matches), "handler");
|
|
353
|
+
return c.addEventListener("change", i), () => c.removeEventListener("change", i);
|
|
354
|
+
},
|
|
355
|
+
[r]
|
|
356
|
+
// Empty array ensures effect is only run on mount and unmount
|
|
357
|
+
), u;
|
|
358
|
+
}
|
|
359
|
+
t(Ge, "useThemeMediaQuery");
|
|
360
|
+
function Me(e, n) {
|
|
361
|
+
const r = C(e);
|
|
362
|
+
h(() => {
|
|
363
|
+
r.current = e;
|
|
364
|
+
}, [e]), h(() => {
|
|
365
|
+
let s;
|
|
366
|
+
return n !== null && e && typeof e == "function" && (s = setTimeout(r.current, n)), () => {
|
|
367
|
+
s && clearTimeout(s);
|
|
368
|
+
};
|
|
369
|
+
}, [e, n]);
|
|
370
|
+
}
|
|
371
|
+
t(Me, "useTimeout");
|
|
372
|
+
const Ne = /* @__PURE__ */ t((e) => {
|
|
373
|
+
const { t: n } = ae(), r = C(!1), [s, u] = D(!1);
|
|
374
|
+
return { exportByTreeGrid: /* @__PURE__ */ t(async (c) => {
|
|
375
|
+
if (r.current)
|
|
376
|
+
return;
|
|
377
|
+
r.current = !0, u(!0);
|
|
378
|
+
const i = q(e);
|
|
379
|
+
try {
|
|
380
|
+
return typeof c == "string" ? await L(i, { exportName: c, t: n }) : await L(i, {
|
|
381
|
+
...c,
|
|
382
|
+
t: n
|
|
383
|
+
});
|
|
384
|
+
} finally {
|
|
385
|
+
r.current = !1, u(!1);
|
|
386
|
+
}
|
|
387
|
+
}, "exportByTreeGrid"), isExporting: s };
|
|
388
|
+
}, "useTreeGridExcelExport");
|
|
389
|
+
export {
|
|
390
|
+
be as a,
|
|
391
|
+
ke as b,
|
|
392
|
+
ve as c,
|
|
393
|
+
xe as d,
|
|
394
|
+
Ce as e,
|
|
395
|
+
Ke as f,
|
|
396
|
+
Oe as g,
|
|
397
|
+
_e as h,
|
|
398
|
+
G as i,
|
|
399
|
+
Ae as j,
|
|
400
|
+
Le as k,
|
|
401
|
+
Re as l,
|
|
402
|
+
Ve as m,
|
|
403
|
+
ae as n,
|
|
404
|
+
De as o,
|
|
405
|
+
Ie as p,
|
|
406
|
+
Be as q,
|
|
407
|
+
Pe as r,
|
|
408
|
+
Ge as s,
|
|
409
|
+
Me as t,
|
|
410
|
+
we as u,
|
|
411
|
+
Ne as v,
|
|
412
|
+
re as w
|
|
413
|
+
};
|
|
414
|
+
//# sourceMappingURL=useTreeGridExcelExport-BumQHnAN.js.map
|