@owp/core 1.22.1 → 1.24.0
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/constants.d.ts +1 -0
- package/constants.js +1 -0
- package/dist/OwpUtils-hi_nUgx5.js +628 -0
- package/dist/OwpUtils-hi_nUgx5.js.map +1 -0
- package/dist/{QuickPanel-gMWUy68H.js → QuickPanel-tv7rbuFl.js} +6 -5
- package/dist/{QuickPanel-gMWUy68H.js.map → QuickPanel-tv7rbuFl.js.map} +1 -1
- package/dist/constants.js +12 -0
- package/dist/constants.js.map +1 -0
- package/dist/hooks.js +77 -0
- package/dist/hooks.js.map +1 -0
- package/dist/{index-YHfSppBY.js → index-BIbSyAVz.js} +20163 -31012
- package/dist/index-BIbSyAVz.js.map +1 -0
- package/dist/index.js +131 -225
- package/dist/storageKeys-DRzte9LZ.js +15 -0
- package/dist/storageKeys-DRzte9LZ.js.map +1 -0
- package/dist/treeGridUtil-DwKt2i7A.js +2952 -0
- package/dist/treeGridUtil-DwKt2i7A.js.map +1 -0
- package/dist/types/components/OwpTextField/OwpTextMaskField.d.ts +11 -3
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +5 -5
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants/localStorageKeys.d.ts +9 -0
- package/dist/types/hooks/index.d.ts +19 -0
- package/dist/types/hooks/useCommonCodeList.d.ts +4 -4
- package/dist/types/hooks/useNavigation.d.ts +4 -4
- package/dist/types/index.d.ts +0 -37
- package/dist/types/utils/index.d.ts +18 -0
- package/dist/useTreeGridExcelExport-CzEJeMqo.js +415 -0
- package/dist/useTreeGridExcelExport-CzEJeMqo.js.map +1 -0
- package/dist/utils.js +6961 -0
- package/dist/utils.js.map +1 -0
- package/hooks.d.ts +1 -0
- package/hooks.js +1 -0
- package/package.json +7 -1
- package/utils.d.ts +1 -0
- package/utils.js +1 -0
- package/dist/index-YHfSppBY.js.map +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FormControlProps } from '@mui/material/FormControl';
|
|
2
|
+
import type { InputProps as MuiInputProps } from '@mui/material/Input';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
2
4
|
type TextMaskFieldChangeEvent = {
|
|
3
5
|
target: {
|
|
4
6
|
name: string;
|
|
@@ -7,16 +9,22 @@ type TextMaskFieldChangeEvent = {
|
|
|
7
9
|
unmaskedValue: string;
|
|
8
10
|
};
|
|
9
11
|
interface CustomProps {
|
|
10
|
-
|
|
12
|
+
onMaskChange: (event: TextMaskFieldChangeEvent) => void;
|
|
11
13
|
name?: string;
|
|
12
14
|
mask: string;
|
|
13
15
|
definitions?: Record<string, unknown>;
|
|
14
16
|
}
|
|
17
|
+
type OwpTextMaskFieldProps = Omit<MuiInputProps, 'onChange' | 'inputComponent'> & Omit<CustomProps, 'onMaskChange'> & {
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
helperText?: ReactNode;
|
|
20
|
+
variant?: FormControlProps['variant'];
|
|
21
|
+
onChange: CustomProps['onMaskChange'];
|
|
22
|
+
};
|
|
15
23
|
/**
|
|
16
24
|
* 마스크 텍스트 입력 필드
|
|
17
25
|
* @param mask 입력 마스크 문자열
|
|
18
26
|
* @param definitions 사용자 정의 마스크 정의
|
|
19
27
|
* @param onChange 마스크 변경 이벤트 핸들러
|
|
20
28
|
*/
|
|
21
|
-
export declare function OwpTextMaskField({ className, sx, id: idProp, name, label, value, defaultValue, color, onChange, error, helperText, mask, definitions, variant, fullWidth, disabled, required, placeholder, autoFocus, inputProps, inputRef, }:
|
|
29
|
+
export declare function OwpTextMaskField({ className, sx, id: idProp, name, label, value, defaultValue, color, onChange, error, helperText, mask, definitions, variant, fullWidth, disabled, required, placeholder, autoFocus, inputProps, inputRef, }: OwpTextMaskFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
export {};
|
|
@@ -29,12 +29,12 @@ export interface OwpTreeGridProps<T> {
|
|
|
29
29
|
className?: string;
|
|
30
30
|
containerStyle?: CSSProperties;
|
|
31
31
|
containerClassName?: string;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
layoutUrl?: string;
|
|
33
|
+
dataUrl?: string;
|
|
34
34
|
layoutOverrides?: OwpTreeGridLayoutConfig;
|
|
35
|
-
/** @deprecated use
|
|
35
|
+
/** @deprecated use layoutUrl */
|
|
36
36
|
LayoutUrl?: string;
|
|
37
|
-
/** @deprecated use
|
|
37
|
+
/** @deprecated use dataUrl */
|
|
38
38
|
DataUrl?: string;
|
|
39
39
|
data?: OwpTreeGridBodyData<T>;
|
|
40
40
|
/** @deprecated use layoutOverrides */
|
|
@@ -63,5 +63,5 @@ export interface OwpTreeGridProps<T> {
|
|
|
63
63
|
* @param style 스타일 객체
|
|
64
64
|
* @param height height 값
|
|
65
65
|
*/
|
|
66
|
-
declare const OwpTreeGrid: <T>({ id, containerStyle, containerClassName, className, style, height, width,
|
|
66
|
+
declare const OwpTreeGrid: <T>({ id, containerStyle, containerClassName, className, style, height, width, layoutUrl, dataUrl, layoutOverrides, LayoutUrl, DataUrl, data, layout, useDataUrl, onSelect, onRowClick, onRowAdd, onRowDelete, onRowUndelete, onRowChange, onClickButton, onSave, onReady, onAfterValueChanged, }: OwpTreeGridProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
export { OwpTreeGrid };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 로컬 스토리지 키 목록
|
|
3
|
+
*/
|
|
4
|
+
export declare const LOCAL_STORAGE_KEYS: {
|
|
5
|
+
readonly accessToken: "jwt_access_token";
|
|
6
|
+
readonly currentLanguage: "CurrentLanguage";
|
|
7
|
+
};
|
|
8
|
+
export declare const STORAGE_ACCESS_TOKEN_KEY: "jwt_access_token";
|
|
9
|
+
export declare const CURRENT_LANGUAGE: "CurrentLanguage";
|
|
@@ -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';
|
|
@@ -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';
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var t = (e, n) => z(e, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { S as d } from "./storageKeys-DRzte9LZ.js";
|
|
4
|
+
import { useAtomValue as T, useSetAtom as S } from "jotai";
|
|
5
|
+
import { atomWithStorage as k } from "jotai/utils";
|
|
6
|
+
import { d as C, j as b, k as Q, y as W, z as K, A as q, B as O } from "./treeGridUtil-DwKt2i7A.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 A, 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 = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGetCommonCodeList"), we = /* @__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
|
+
}, _ = /* @__PURE__ */ t((e, n) => e ? {
|
|
59
|
+
color: e,
|
|
60
|
+
...n
|
|
61
|
+
} : n, "mergeOkButtonProps"), be = /* @__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: _("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: _("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: _("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__ */ C(H, { fullWidth: !0, maxWidth: "xs", open: n, onClose: /* @__PURE__ */ t(() => r(!1), "onClose"), children: [
|
|
117
|
+
/* @__PURE__ */ b($, { children: /* @__PURE__ */ b(J, { className: "mb-12", variant: "h6", children: s }) }),
|
|
118
|
+
/* @__PURE__ */ C(Y, { children: [
|
|
119
|
+
!i && /* @__PURE__ */ b(R, { ...o, variant: "outlined", onClick: /* @__PURE__ */ t(() => r(!1), "onClick"), children: p }),
|
|
120
|
+
/* @__PURE__ */ b(
|
|
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"), ve = ["kr", "en", "lc"], B = k(d.currentLanguage, {
|
|
133
|
+
id: "kr",
|
|
134
|
+
title: "한국어",
|
|
135
|
+
flag: "KR"
|
|
136
|
+
}), xe = /* @__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"), Ae = /* @__PURE__ */ t(() => T(B), "useGetCurrentLanguage"), Le = /* @__PURE__ */ t(() => S(B), "useSetCurrentLanguage"), G = k(
|
|
148
|
+
d.currentLogoSrc,
|
|
149
|
+
"assets/images/logo/daedong-door-logo-b.png"
|
|
150
|
+
), _e = /* @__PURE__ */ t(() => T(G), "useGetCurrentLogoSrc"), Ce = /* @__PURE__ */ t(() => S(G), "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(), L();
|
|
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"), L = /* @__PURE__ */ t(() => {
|
|
166
|
+
g(), u = void 0, o = null;
|
|
167
|
+
}, "cancel"), j = /* @__PURE__ */ t(() => {
|
|
168
|
+
a();
|
|
169
|
+
}, "flush"), w = /* @__PURE__ */ t(function(...U) {
|
|
170
|
+
if (r != null && r.aborted)
|
|
171
|
+
return;
|
|
172
|
+
u = this, o = U;
|
|
173
|
+
const F = l == null;
|
|
174
|
+
p(), c && F && a();
|
|
175
|
+
}, "debounced");
|
|
176
|
+
return w.schedule = p, w.cancel = L, w.flush = j, r == null || r.addEventListener("abort", L, { once: !0 }), w;
|
|
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 Ke(e, n) {
|
|
216
|
+
const r = A(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(Ke, "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 P(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(P, "useDeepCompareMemoize");
|
|
251
|
+
function Oe(e, n) {
|
|
252
|
+
return process.env.NODE_ENV !== "production" && se(n), E.useEffect(e, P(n));
|
|
253
|
+
}
|
|
254
|
+
t(Oe, "useDeepCompareEffect");
|
|
255
|
+
function Re(e, n) {
|
|
256
|
+
return E.useEffect(e, P(n));
|
|
257
|
+
}
|
|
258
|
+
t(Re, "useDeepCompareEffectNoCheck");
|
|
259
|
+
const M = k(d.navigationList, void 0), Ve = /* @__PURE__ */ t(() => T(M), "useGetNavigationList"), De = /* @__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 Ie(e) {
|
|
279
|
+
const n = A();
|
|
280
|
+
return h(() => {
|
|
281
|
+
n.current = e;
|
|
282
|
+
}, [e]), n.current;
|
|
283
|
+
}
|
|
284
|
+
t(Ie, "usePrevious");
|
|
285
|
+
const N = k(d.currentShortcuts, []), Be = /* @__PURE__ */ t(() => T(N), "useGetShortcuts"), Ge = /* @__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 K(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 K(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 Me(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(Me, "useThemeMediaQuery");
|
|
360
|
+
function Ne(e, n) {
|
|
361
|
+
const r = A(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(Ne, "useTimeout");
|
|
372
|
+
const je = /* @__PURE__ */ t((e) => {
|
|
373
|
+
const { t: n } = ae(), r = A(!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 O(i, { exportName: c, t: n }) : await O(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
|
+
ve as F,
|
|
391
|
+
we as a,
|
|
392
|
+
be as b,
|
|
393
|
+
xe as c,
|
|
394
|
+
Ae as d,
|
|
395
|
+
Le as e,
|
|
396
|
+
_e as f,
|
|
397
|
+
Ce as g,
|
|
398
|
+
Ke as h,
|
|
399
|
+
P as i,
|
|
400
|
+
Oe as j,
|
|
401
|
+
Re as k,
|
|
402
|
+
Ve as l,
|
|
403
|
+
De as m,
|
|
404
|
+
ae as n,
|
|
405
|
+
Ie as o,
|
|
406
|
+
Be as p,
|
|
407
|
+
Ge as q,
|
|
408
|
+
Pe as r,
|
|
409
|
+
Me as s,
|
|
410
|
+
Ne as t,
|
|
411
|
+
ke as u,
|
|
412
|
+
je as v,
|
|
413
|
+
re as w
|
|
414
|
+
};
|
|
415
|
+
//# sourceMappingURL=useTreeGridExcelExport-CzEJeMqo.js.map
|