@owp/core 1.28.0 → 1.29.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.
Files changed (68) hide show
  1. package/dist/{Close-DnXhM4Ms.js → Close-Cm04EulE.js} +307 -321
  2. package/dist/Close-Cm04EulE.js.map +1 -0
  3. package/dist/OwpStoreProvider-CFq963Pl.js +30 -0
  4. package/dist/OwpStoreProvider-CFq963Pl.js.map +1 -0
  5. package/dist/OwpUtils-9lHSCdan.js.map +1 -1
  6. package/dist/{QuickPanel-BOgEYOAw.js → QuickPanel-DlrhsNXW.js} +2 -2
  7. package/dist/{QuickPanel-BOgEYOAw.js.map → QuickPanel-DlrhsNXW.js.map} +1 -1
  8. package/dist/constants.js +17 -18
  9. package/dist/constants.js.map +1 -1
  10. package/dist/context.js +24 -23
  11. package/dist/context.js.map +1 -1
  12. package/dist/hooks.js +97 -67
  13. package/dist/hooks.js.map +1 -1
  14. package/dist/{index-B8tZAW8i.js → index-Dn7pPU3W.js} +11578 -12314
  15. package/dist/index-Dn7pPU3W.js.map +1 -0
  16. package/dist/index.js +74 -111
  17. package/dist/{lazyLoadedSlices-BAbcXcEU.js → lazyLoadedSlices-BYAl2fil.js} +710 -716
  18. package/dist/lazyLoadedSlices-BYAl2fil.js.map +1 -0
  19. package/dist/owp-app.css +1 -1
  20. package/dist/store.js +38 -3
  21. package/dist/store.js.map +1 -1
  22. package/dist/{toUpper-CilZrxEa.js → toUpper-K8I4frC5.js} +2 -2
  23. package/dist/{toUpper-CilZrxEa.js.map → toUpper-K8I4frC5.js.map} +1 -1
  24. package/dist/{treeGrid-CjB04cBq.js → treeGrid-DRAoPLXh.js} +11 -11
  25. package/dist/{treeGrid-CjB04cBq.js.map → treeGrid-DRAoPLXh.js.map} +1 -1
  26. package/dist/{treeGridUtil-_FDvRzzt.js → treeGridUtil-C46Qi5LG.js} +2 -2
  27. package/dist/{treeGridUtil-_FDvRzzt.js.map → treeGridUtil-C46Qi5LG.js.map} +1 -1
  28. package/dist/types/components/OwpErrorBoundary/OwpErrorBoundary.d.ts +1 -1
  29. package/dist/types/components/OwpLayout/OwpLayout.d.ts +1 -1
  30. package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
  31. package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
  32. package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
  33. package/dist/types/components/OwpThemeSelector/SchemePreview.d.ts +1 -1
  34. package/dist/types/components/OwpThemeSelector/ThemePreview.d.ts +1 -1
  35. package/dist/types/components/layouts/shared-components/navigation/store/navigationSlice.d.ts +7 -7
  36. package/dist/types/components/layouts/themeLayoutConfigs.d.ts +1 -1
  37. package/dist/types/context/OwpAppProvider.d.ts +1 -1
  38. package/dist/types/hooks/index.d.ts +1 -0
  39. package/dist/types/hooks/useAccessTokenGuard.d.ts +12 -0
  40. package/dist/types/index.d.ts +0 -5
  41. package/dist/types/store/index.d.ts +1 -0
  42. package/dist/types/{components/OwpSettings → store}/owpSettingsSlice.d.ts +1 -1
  43. package/dist/types/{components/OwpSettings/OwpSettings.d.ts → types/OwpSettingsTypes.d.ts} +0 -12
  44. package/dist/types/utils/common/OwpUtils.d.ts +1 -1
  45. package/dist/useOwpTranslation-CMrtqKkT.js +190 -0
  46. package/dist/useOwpTranslation-CMrtqKkT.js.map +1 -0
  47. package/dist/{useTreeGridExcelExport-QNcWzx5v.js → useTreeGridExcelExport-DLMecvHS.js} +62 -71
  48. package/dist/useTreeGridExcelExport-DLMecvHS.js.map +1 -0
  49. package/dist/utils.js +4 -4
  50. package/package.json +2 -11
  51. package/dist/Close-DnXhM4Ms.js.map +0 -1
  52. package/dist/OwpStoreProvider-B7W25pkq.js +0 -34
  53. package/dist/OwpStoreProvider-B7W25pkq.js.map +0 -1
  54. package/dist/index-B8tZAW8i.js.map +0 -1
  55. package/dist/language-CwsGUe4C.js +0 -5
  56. package/dist/language-CwsGUe4C.js.map +0 -1
  57. package/dist/lazyLoadedSlices-BAbcXcEU.js.map +0 -1
  58. package/dist/types/components/OwpSettings/OwpLayoutConfig.d.ts +0 -16
  59. package/dist/types/components/OwpSettings/OwpLayoutConfigs.d.ts +0 -14
  60. package/dist/types/components/OwpSettings/index.d.ts +0 -1
  61. package/dist/types/components/OwpSettings/palette-generator/PalettePreview.d.ts +0 -14
  62. package/dist/types/components/OwpSettings/palette-generator/PaletteSelector.d.ts +0 -15
  63. package/dist/types/components/OwpSettings/palette-generator/SectionPreview.d.ts +0 -12
  64. package/dist/types/store/apiService.d.ts +0 -6
  65. package/dist/useOwpTranslation-BelpX-fd.js +0 -174
  66. package/dist/useOwpTranslation-BelpX-fd.js.map +0 -1
  67. package/dist/useTreeGridExcelExport-QNcWzx5v.js.map +0 -1
  68. /package/dist/types/{components/OwpSettings → types}/ThemeFormConfigTypes.d.ts +0 -0
@@ -0,0 +1,12 @@
1
+ export interface UseAccessTokenGuardOptions {
2
+ loginPath?: string;
3
+ isEnabled?: boolean;
4
+ snackbarMessageKey?: string;
5
+ }
6
+ /**
7
+ * 액세스 토큰 기반 로그인 가드
8
+ * @param loginPath 로그인 라우트 경로
9
+ * @param isEnabled 가드 활성화 여부
10
+ * @param snackbarMessageKey 로그인 필요 안내 메시지 키
11
+ */
12
+ export declare const useAccessTokenGuard: ({ loginPath, isEnabled, snackbarMessageKey, }?: UseAccessTokenGuardOptions) => boolean;
@@ -52,11 +52,6 @@ export * from './components/OwpScrollbars';
52
52
  export * from './components/OwpSearch';
53
53
  export * from './components/OwpSearchFilter';
54
54
  export * from './components/OwpSection';
55
- export * from './components/OwpSettings';
56
- export * from './components/OwpSettings/OwpLayoutConfig';
57
- export * from './components/OwpSettings/OwpLayoutConfigs';
58
- export * from './components/OwpSettings/owpSettingsSlice';
59
- export * from './components/OwpSettings/ThemeFormConfigTypes';
60
55
  export * from './components/OwpShortcuts';
61
56
  export * from './components/OwpSidePanel';
62
57
  export * from './components/OwpSplashScreen';
@@ -4,3 +4,4 @@
4
4
  export { OwpStoreProvider, type OwpStoreProviderProps } from '../context/OwpStoreProvider';
5
5
  export { createAppSelector, makeStore } from './store';
6
6
  export type { AppAction, AppDispatch, AppStore, AppThunk, RootState } from './store';
7
+ export * from './owpSettingsSlice';
@@ -1,4 +1,4 @@
1
- import { OwpSettingsConfigType, OwpThemesType } from '@/components/OwpSettings/OwpSettings';
1
+ import type { OwpSettingsConfigType, OwpThemesType } from '@/types/OwpSettingsTypes';
2
2
  import { createSelector, PayloadAction } from '@reduxjs/toolkit';
3
3
  import { PartialDeep } from 'type-fest';
4
4
  /**
@@ -23,15 +23,3 @@ export type OwpSettingsConfigType = {
23
23
  defaultAuth?: string[];
24
24
  loginRedirectUrl: string;
25
25
  };
26
- /**
27
- * The OwpSettings component is responsible for rendering the settings form for the Owp React application.
28
- * It uses the useForm hook from the react-hook-form library to handle form state and validation.
29
- * It also uses various MUI components to render the form fields and sections.
30
- * The component is memoized to prevent unnecessary re-renders.
31
- */
32
- declare function OwpSettings(): import("react/jsx-runtime").JSX.Element;
33
- /**
34
- * OwpSettingsMemo 메모이징 컴포넌트
35
- */
36
- declare const OwpSettingsMemo: import("react").MemoExoticComponent<typeof OwpSettings>;
37
- export { OwpSettingsMemo as OwpSettings };
@@ -1,5 +1,5 @@
1
1
  import { OwpEventEmitter } from '@/components/OwpEventEmitter';
2
- import { OwpSettingsConfigType } from '@/components/OwpSettings/OwpSettings';
2
+ import type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';
3
3
  import { DeepPartial } from 'react-hook-form';
4
4
  import { RouteObject } from 'react-router-dom';
5
5
  import { PartialDeep } from 'type-fest';
@@ -0,0 +1,190 @@
1
+ var g = Object.defineProperty;
2
+ var r = (e, t) => g(e, "name", { value: t, configurable: !0 });
3
+ import { j as d, a as O } from "./emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js";
4
+ import { u as K } from "./useStorage-BA0D8KA7.js";
5
+ import { createContext as T, useContext as w, useRef as h, useLayoutEffect as v } from "react";
6
+ import { Typography as V, DialogContent as _, DialogActions as B, Button as b, Dialog as P } from "@mui/material";
7
+ import { useDialogs as j } from "@toolpad/core/useDialogs";
8
+ import { useTranslation as k } from "react-i18next";
9
+ import { a as C } from "./isTypedArray-xp-fB7W4.js";
10
+ function D(e, t) {
11
+ if (t === void 0)
12
+ return e.trimEnd();
13
+ let o = e.length;
14
+ switch (typeof t) {
15
+ case "string": {
16
+ if (t.length !== 1)
17
+ throw new Error("The 'chars' parameter should be a single character string.");
18
+ for (; o > 0 && e[o - 1] === t; )
19
+ o--;
20
+ break;
21
+ }
22
+ case "object":
23
+ for (; o > 0 && t.includes(e[o - 1]); )
24
+ o--;
25
+ }
26
+ return e.substring(0, o);
27
+ }
28
+ r(D, "trimEnd$1");
29
+ const x = T(void 0), U = /* @__PURE__ */ r(({ configs: e, slots: t, children: o, env: a }) => {
30
+ const u = h({ ...e, env: a, slots: t }), { setEnv: n } = K();
31
+ return v(() => {
32
+ n(a ?? {});
33
+ }, [a, n]), /* @__PURE__ */ d(x.Provider, { value: u.current, children: o });
34
+ }, "OwpAppProvider"), $ = /* @__PURE__ */ r(() => {
35
+ const e = w(x);
36
+ if (e === void 0)
37
+ throw new Error("useOwpAppContext must be used within a OwpAppProvider");
38
+ return e;
39
+ }, "useOwpAppContext");
40
+ function I(e, t, o) {
41
+ return e == null ? "" : D(e, t.toString().split(""));
42
+ }
43
+ r(I, "trimEnd");
44
+ const s = {
45
+ infoTitle: {
46
+ primaryKey: "message.would_you_like_to_proceed",
47
+ fallbackKey: "Message.처리하시겠습니까",
48
+ defaultValue: "처리하시겠습니까?"
49
+ },
50
+ infoOk: {
51
+ primaryKey: "button.ok",
52
+ fallbackKey: "Button.확인",
53
+ defaultValue: "확인"
54
+ },
55
+ saveTitle: {
56
+ primaryKey: "message.do_you_want_to_save",
57
+ fallbackKey: "Message.저장하시겠습니까?",
58
+ defaultValue: "저장하시겠습니까?"
59
+ },
60
+ saveOk: {
61
+ primaryKey: "button.save",
62
+ fallbackKey: "Button.저장",
63
+ defaultValue: "저장"
64
+ },
65
+ updateTitle: {
66
+ primaryKey: "message.would_you_like_to_edit",
67
+ fallbackKey: "Message.수정하시겠습니까?",
68
+ defaultValue: "수정하시겠습니까?"
69
+ },
70
+ updateOk: {
71
+ primaryKey: "button.edit",
72
+ fallbackKey: "Button.수정",
73
+ defaultValue: "수정"
74
+ },
75
+ deleteTitle: {
76
+ primaryKey: "message.are_you_sure_you_want_to_delete",
77
+ fallbackKey: "Message.삭제하시겠습니까?",
78
+ defaultValue: "삭제하시겠습니까?"
79
+ },
80
+ deleteOk: {
81
+ primaryKey: "button.delete",
82
+ fallbackKey: "Button.삭제",
83
+ defaultValue: "삭제"
84
+ },
85
+ cancel: {
86
+ primaryKey: "button.cancel",
87
+ fallbackKey: "Button.취소",
88
+ defaultValue: "취소"
89
+ }
90
+ }, y = /* @__PURE__ */ r((e, t) => e ? {
91
+ color: e,
92
+ ...t
93
+ } : t, "mergeOkButtonProps"), q = /* @__PURE__ */ r(() => {
94
+ const e = j(), { t, i18n: o } = k("owp"), a = /* @__PURE__ */ r(({
95
+ primaryKey: n,
96
+ fallbackKey: i,
97
+ defaultValue: l
98
+ }) => t(o.exists(n) ? n : i, { defaultValue: l }), "translateConfirmText"), u = /* @__PURE__ */ r((n) => e.open(A, n), "confirmBase");
99
+ return {
100
+ confirm: u,
101
+ confirmInfo: /* @__PURE__ */ r(async ({ title: n, okText: i, severity: l } = {}) => u({
102
+ title: n ?? a(s.infoTitle),
103
+ okText: i ?? a(s.infoOk),
104
+ severity: l ?? "primary",
105
+ useInfo: !0
106
+ }), "confirmInfo"),
107
+ confirmSave: /* @__PURE__ */ r(async ({
108
+ title: n,
109
+ okText: i,
110
+ cancelText: l,
111
+ okButtonProps: c
112
+ } = {}) => u({
113
+ title: n ?? a(s.saveTitle),
114
+ okText: i ?? a(s.saveOk),
115
+ cancelText: l,
116
+ okButtonProps: y("secondary", c)
117
+ }), "confirmSave"),
118
+ confirmUpdate: /* @__PURE__ */ r(async ({
119
+ title: n,
120
+ okText: i,
121
+ cancelText: l,
122
+ okButtonProps: c
123
+ } = {}) => u({
124
+ title: n ?? a(s.updateTitle),
125
+ okText: i ?? a(s.updateOk),
126
+ cancelText: l,
127
+ okButtonProps: y("secondary", c)
128
+ }), "confirmUpdate"),
129
+ confirmDelete: /* @__PURE__ */ r(async ({
130
+ title: n,
131
+ okText: i,
132
+ cancelText: l,
133
+ okButtonProps: c
134
+ } = {}) => u({
135
+ title: n ?? a(s.deleteTitle),
136
+ okText: i ?? a(s.deleteOk),
137
+ cancelText: l,
138
+ okButtonProps: y("error", c)
139
+ }), "confirmDelete")
140
+ };
141
+ }, "useConfirm"), A = /* @__PURE__ */ r(({ payload: e, open: t, onClose: o }) => {
142
+ const { title: a, okButtonProps: u, cancelButtonProps: n, severity: i, useInfo: l } = e, { t: c, i18n: p } = k("owp"), f = (e == null ? void 0 : e.okText) ?? c(p.exists(s.infoOk.primaryKey) ? "button.ok" : "Button.확인", {
143
+ defaultValue: s.infoOk.defaultValue
144
+ }), m = (e == null ? void 0 : e.cancelText) ?? c(
145
+ p.exists(s.cancel.primaryKey) ? s.cancel.primaryKey : s.cancel.fallbackKey,
146
+ { defaultValue: s.cancel.defaultValue }
147
+ );
148
+ return /* @__PURE__ */ O(P, { fullWidth: !0, maxWidth: "xs", open: t, onClose: /* @__PURE__ */ r(() => o(!1), "onClose"), children: [
149
+ /* @__PURE__ */ d(_, { children: /* @__PURE__ */ d(V, { className: "mb-12", variant: "h6", children: a }) }),
150
+ /* @__PURE__ */ O(B, { children: [
151
+ !l && /* @__PURE__ */ d(b, { ...n, variant: "outlined", onClick: /* @__PURE__ */ r(() => o(!1), "onClick"), children: m }),
152
+ /* @__PURE__ */ d(
153
+ b,
154
+ {
155
+ color: i || "primary",
156
+ variant: "contained",
157
+ ...u,
158
+ onClick: /* @__PURE__ */ r(() => o(!0), "onClick"),
159
+ children: f
160
+ }
161
+ )
162
+ ] })
163
+ ] });
164
+ }, "ConfirmDialog"), E = /* @__PURE__ */ r((e) => {
165
+ if (!e.includes("."))
166
+ return;
167
+ const o = I(e, ".").lastIndexOf(".");
168
+ return o < 0 ? e : e.slice(o + 1);
169
+ }, "getDefaultValueFromKey"), G = /* @__PURE__ */ r(() => {
170
+ const { t: e, ...t } = k("owp");
171
+ return { t: /* @__PURE__ */ r((...a) => {
172
+ const [u, n] = a, i = C(n) ? n : void 0, l = !!i, c = l && Object.prototype.hasOwnProperty.call(i, "defaultValue");
173
+ if ((n == null || l) && !c && typeof u == "string") {
174
+ const f = E(u);
175
+ if (f) {
176
+ const m = l ? { ...i, defaultValue: f } : { defaultValue: f };
177
+ return e(u, m, ...a.slice(2));
178
+ }
179
+ }
180
+ return e(...a);
181
+ }, "t"), ...t };
182
+ }, "useOwpTranslation");
183
+ export {
184
+ U as O,
185
+ x as a,
186
+ G as b,
187
+ q as c,
188
+ $ as u
189
+ };
190
+ //# sourceMappingURL=useOwpTranslation-CMrtqKkT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOwpTranslation-CMrtqKkT.js","sources":["../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/string/trimEnd.mjs","../src/context/OwpAppProvider.tsx","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/trimEnd.mjs","../src/hooks/useConfirm.tsx","../src/hooks/useOwpTranslation.ts"],"sourcesContent":["function trimEnd(str, chars) {\n if (chars === undefined) {\n return str.trimEnd();\n }\n let endIndex = str.length;\n switch (typeof chars) {\n case 'string': {\n if (chars.length !== 1) {\n throw new Error(`The 'chars' parameter should be a single character string.`);\n }\n while (endIndex > 0 && str[endIndex - 1] === chars) {\n endIndex--;\n }\n break;\n }\n case 'object': {\n while (endIndex > 0 && chars.includes(str[endIndex - 1])) {\n endIndex--;\n }\n }\n }\n return str.substring(0, endIndex);\n}\n\nexport { trimEnd };\n","import type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';\nimport { useStorage } from '@/hooks/useStorage';\nimport { ComponentType, createContext, ReactNode, useContext, useLayoutEffect, useRef } from 'react';\n\n/**\n * Logo slot props\n */\nexport interface OwpLogoSlotProps {\n className?: string;\n}\n\nexport interface OwpAppConfigs {\n routesConfig: any;\n settingsConfig: OwpSettingsConfigType;\n themesConfig: any;\n navigationConfig: any;\n}\n\n/**\n * App slots\n */\nexport interface OwpAppSlots {\n logo?: ComponentType<OwpLogoSlotProps>;\n}\n\nexport interface OwpAppEnv {\n [key: string]: any;\n}\n\nexport interface OwpAppContextValue extends OwpAppConfigs {\n env?: OwpAppEnv;\n slots?: OwpAppSlots;\n}\n\nexport const OwpAppContext = createContext<OwpAppContextValue | undefined>(undefined);\n\nexport interface OwpAppProviderProps {\n configs: OwpAppConfigs;\n slots?: OwpAppSlots;\n children?: ReactNode;\n env?: OwpAppEnv;\n}\n\nexport const OwpAppProvider = ({ configs, slots, children, env }: OwpAppProviderProps) => {\n const value = useRef<OwpAppContextValue>({ ...configs, env, slots });\n const { setEnv } = useStorage();\n\n useLayoutEffect(() => {\n setEnv(env ?? {});\n }, [env, setEnv]);\n\n return <OwpAppContext.Provider value={value.current}>{children}</OwpAppContext.Provider>;\n};\n\nexport const useOwpAppContext = () => {\n const context = useContext(OwpAppContext);\n\n if (context === undefined) {\n throw new Error('useOwpAppContext must be used within a OwpAppProvider');\n }\n\n return context;\n};\n","import { trimEnd as trimEnd$1 } from '../../string/trimEnd.mjs';\n\nfunction trimEnd(str, chars, guard) {\n if (str == null) {\n return '';\n }\n if (guard != null || chars == null) {\n return str.toString().trimEnd();\n }\n return trimEnd$1(str, chars.toString().split(''));\n}\n\nexport { trimEnd };\n","import {\n Button,\n ButtonProps,\n Dialog,\n DialogActions,\n DialogContent,\n Typography,\n} from '@mui/material';\nimport { DialogProps, useDialogs } from '@toolpad/core/useDialogs';\nimport { ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ConfirmProps {\n title?: ReactNode | string;\n okText?: string;\n cancelText?: string;\n severity?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';\n useInfo?: boolean;\n okButtonProps?: ButtonProps;\n onClose?: (result: boolean) => Promise<void>;\n}\ninterface ConfirmBaseProps extends ConfirmProps {\n okButtonProps?: ButtonProps;\n cancelButtonProps?: ButtonProps;\n}\n\ninterface ConfirmTranslationConfig {\n primaryKey: string;\n fallbackKey: string;\n defaultValue: string;\n}\n\n/**\n * 확인 대화상자 번역 설정\n */\nconst CONFIRM_TRANSLATIONS = {\n infoTitle: {\n primaryKey: 'message.would_you_like_to_proceed',\n fallbackKey: 'Message.처리하시겠습니까',\n defaultValue: '처리하시겠습니까?',\n },\n infoOk: {\n primaryKey: 'button.ok',\n fallbackKey: 'Button.확인',\n defaultValue: '확인',\n },\n saveTitle: {\n primaryKey: 'message.do_you_want_to_save',\n fallbackKey: 'Message.저장하시겠습니까?',\n defaultValue: '저장하시겠습니까?',\n },\n saveOk: {\n primaryKey: 'button.save',\n fallbackKey: 'Button.저장',\n defaultValue: '저장',\n },\n updateTitle: {\n primaryKey: 'message.would_you_like_to_edit',\n fallbackKey: 'Message.수정하시겠습니까?',\n defaultValue: '수정하시겠습니까?',\n },\n updateOk: {\n primaryKey: 'button.edit',\n fallbackKey: 'Button.수정',\n defaultValue: '수정',\n },\n deleteTitle: {\n primaryKey: 'message.are_you_sure_you_want_to_delete',\n fallbackKey: 'Message.삭제하시겠습니까?',\n defaultValue: '삭제하시겠습니까?',\n },\n deleteOk: {\n primaryKey: 'button.delete',\n fallbackKey: 'Button.삭제',\n defaultValue: '삭제',\n },\n cancel: {\n primaryKey: 'button.cancel',\n fallbackKey: 'Button.취소',\n defaultValue: '취소',\n },\n} as const;\n\n/**\n * 확인 버튼 속성 병합\n * @param defaultColor 기본 버튼 색상\n * @param okButtonProps 사용자 버튼 속성\n */\nconst mergeOkButtonProps = (\n defaultColor: ButtonProps['color'] | undefined,\n okButtonProps?: ButtonProps,\n) => {\n if (!defaultColor) {\n return okButtonProps;\n }\n\n return {\n color: defaultColor,\n ...okButtonProps,\n } as ButtonProps;\n};\n/**\n * 확인 대화상자 훅\n */\nexport const useConfirm = () => {\n const dialogs = useDialogs();\n const { t, i18n } = useTranslation('owp');\n\n const translateConfirmText = ({\n primaryKey,\n fallbackKey,\n defaultValue,\n }: ConfirmTranslationConfig) => {\n return t(i18n.exists(primaryKey) ? primaryKey : fallbackKey, { defaultValue });\n };\n\n const confirmBase = (props: ConfirmBaseProps) => dialogs.open(ConfirmDialog, props);\n\n return {\n confirm: confirmBase,\n confirmInfo: async ({ title, okText, severity }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title:\n title ?? translateConfirmText(CONFIRM_TRANSLATIONS.infoTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.infoOk),\n severity: severity ?? 'primary',\n useInfo: true,\n });\n },\n confirmSave: async ({\n title,\n okText,\n cancelText,\n okButtonProps,\n }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title: title ?? translateConfirmText(CONFIRM_TRANSLATIONS.saveTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.saveOk),\n cancelText,\n okButtonProps: mergeOkButtonProps('secondary', okButtonProps),\n });\n },\n confirmUpdate: async ({\n title,\n okText,\n cancelText,\n okButtonProps,\n }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title: title ?? translateConfirmText(CONFIRM_TRANSLATIONS.updateTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.updateOk),\n cancelText,\n okButtonProps: mergeOkButtonProps('secondary', okButtonProps),\n });\n },\n confirmDelete: async ({\n title,\n okText,\n cancelText,\n okButtonProps,\n }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title: title ?? translateConfirmText(CONFIRM_TRANSLATIONS.deleteTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.deleteOk),\n cancelText,\n okButtonProps: mergeOkButtonProps('error', okButtonProps),\n });\n },\n };\n};\n\nconst ConfirmDialog = ({ payload, open, onClose }: DialogProps<ConfirmBaseProps, boolean>) => {\n const { title, okButtonProps, cancelButtonProps, severity, useInfo } = payload;\n\n const { t, i18n } = useTranslation('owp');\n\n const okText =\n payload?.okText ??\n t(i18n.exists(CONFIRM_TRANSLATIONS.infoOk.primaryKey) ? 'button.ok' : 'Button.확인', {\n defaultValue: CONFIRM_TRANSLATIONS.infoOk.defaultValue,\n });\n const cancelText =\n payload?.cancelText ??\n t(\n i18n.exists(CONFIRM_TRANSLATIONS.cancel.primaryKey)\n ? CONFIRM_TRANSLATIONS.cancel.primaryKey\n : CONFIRM_TRANSLATIONS.cancel.fallbackKey,\n { defaultValue: CONFIRM_TRANSLATIONS.cancel.defaultValue },\n );\n\n return (\n <Dialog fullWidth maxWidth=\"xs\" open={open} onClose={() => onClose(false)}>\n <DialogContent>\n <Typography className=\"mb-12\" variant=\"h6\">\n {title}\n </Typography>\n </DialogContent>\n <DialogActions>\n {!useInfo && (\n <Button {...cancelButtonProps} variant=\"outlined\" onClick={() => onClose(false)}>\n {cancelText}\n </Button>\n )}\n <Button\n color={severity ? severity : 'primary'}\n variant=\"contained\"\n {...okButtonProps}\n onClick={() => onClose(true)}\n >\n {okText}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import { isPlainObject, trimEnd } from 'es-toolkit/compat';\nimport { useTranslation } from 'react-i18next';\n\n/**\n * 번역 키 기본 라벨 추출\n * @param key 번역 키\n */\nconst getDefaultValueFromKey = (key: string) => {\n if (!key.includes('.')) {\n return undefined;\n }\n\n const normalizedKey = trimEnd(key, '.');\n const lastSeparatorIndex = normalizedKey.lastIndexOf('.');\n\n if (lastSeparatorIndex < 0) {\n return key;\n }\n\n return key.slice(lastSeparatorIndex + 1);\n};\n\n/**\n * OWP 번역 훅\n */\nexport const useOwpTranslation = () => {\n const { t: i18nT, ...restProps } = useTranslation('owp');\n\n const t: typeof i18nT = ((...args: Parameters<typeof i18nT>) => {\n const [key, options] = args;\n const optionsObject = isPlainObject(options) ? (options as Record<string, unknown>) : undefined;\n const isOptionsObject = Boolean(optionsObject);\n const hasDefaultValue =\n isOptionsObject && Object.prototype.hasOwnProperty.call(optionsObject, 'defaultValue');\n const canInjectDefaultValue = options == null || isOptionsObject;\n\n if (canInjectDefaultValue && !hasDefaultValue && typeof key === 'string') {\n const defaultValue = getDefaultValueFromKey(key);\n\n if (defaultValue) {\n const nextOptions = isOptionsObject ? { ...optionsObject, defaultValue } : { defaultValue };\n\n return i18nT(...([key, nextOptions, ...args.slice(2)] as Parameters<typeof i18nT>));\n }\n }\n\n return i18nT(...args);\n }) as typeof i18nT;\n\n return { t, ...restProps };\n};\n"],"names":["trimEnd","str","chars","endIndex","OwpAppContext","createContext","OwpAppProvider","__name","configs","slots","children","env","value","useRef","setEnv","useStorage","useLayoutEffect","useOwpAppContext","context","useContext","guard","trimEnd$1","CONFIRM_TRANSLATIONS","mergeOkButtonProps","defaultColor","okButtonProps","useConfirm","dialogs","useDialogs","i18n","useTranslation","translateConfirmText","primaryKey","fallbackKey","defaultValue","confirmBase","props","ConfirmDialog","title","okText","severity","cancelText","payload","open","onClose","cancelButtonProps","useInfo","t","jsxs","Dialog","jsx","DialogContent","Typography","DialogActions","Button","getDefaultValueFromKey","key","lastSeparatorIndex","useOwpTranslation","i18nT","restProps","args","options","optionsObject","isPlainObject","isOptionsObject","hasDefaultValue","nextOptions"],"mappings":";;;;;;;;;AAAA,SAASA,EAAQC,GAAKC,GAAO;AACzB,MAAIA,MAAU;AACV,WAAOD,EAAI,QAAO;AAEtB,MAAIE,IAAWF,EAAI;AACnB,UAAQ,OAAOC,GAAK;AAAA,IAChB,KAAK,UAAU;AACX,UAAIA,EAAM,WAAW;AACjB,cAAM,IAAI,MAAM,4DAA4D;AAEhF,aAAOC,IAAW,KAAKF,EAAIE,IAAW,CAAC,MAAMD;AACzC,QAAAC;AAEJ;AAAA,IACJ;AAAA,IACA,KAAK;AACD,aAAOA,IAAW,KAAKD,EAAM,SAASD,EAAIE,IAAW,CAAC,CAAC;AACnD,QA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GAAGoD,GAAO,GAAGC,EAAA,IAAc9B,EAAe,KAAK;AAuBvD,SAAO,EAAE,GArBgB,gBAAAvB,EAAA,IAAIsD,MAAmC;AAC9D,UAAM,CAACL,GAAKM,CAAO,IAAID,GACjBE,IAAgBC,EAAcF,CAAO,IAAKA,IAAsC,QAChFG,IAAkB,EAAQF,GAC1BG,IACJD,KAAmB,OAAO,UAAU,eAAe,KAAKF,GAAe,cAAc;AAGvF,SAF8BD,KAAW,QAAQG,MAEpB,CAACC,KAAmB,OAAOV,KAAQ,UAAU;AACxE,YAAMtB,IAAeqB,EAAuBC,CAAG;AAE/C,UAAItB,GAAc;AAChB,cAAMiC,IAAcF,IAAkB,EAAE,GAAGF,GAAe,cAAA7B,EAAA,IAAiB,EAAE,cAAAA,EAAA;AAE7E,eAAOyB,EAAWH,GAAKW,GAAa,GAAGN,EAAK,MAAM,CAAC,CAA+B;AAAA,MACpF;AAAA,IACF;AAEA,WAAOF,EAAM,GAAGE,CAAI;AAAA,EACtB,GAnByB,MAqBb,GAAGD,EAAA;AACjB,GAzBiC;","x_google_ignoreList":[0,2]}
@@ -1,56 +1,56 @@
1
1
  var _ = Object.defineProperty;
2
- var t = (e, n) => _(e, "name", { value: n, configurable: !0 });
2
+ var t = (e, r) => _(e, "name", { value: r, configurable: !0 });
3
3
  import { S as h } from "./storageKeys-DRzte9LZ.js";
4
4
  import { useAtomValue as g, useSetAtom as E } from "jotai";
5
5
  import { atomWithStorage as C } from "jotai/utils";
6
6
  import { useTranslation as q } from "react-i18next";
7
- import p, { useRef as T, useEffect as d, useCallback as B, useState as v } from "react";
7
+ import d, { useRef as w, useEffect as p, useCallback as B, useState as b } from "react";
8
8
  import { b as I } from "./isTypedArray-xp-fB7W4.js";
9
9
  import { useTheme as K } from "@mui/material/styles";
10
- import { g as O, e as y } from "./treeGridUtil-_FDvRzzt.js";
11
- import { a as P } from "./useOwpTranslation-BelpX-fd.js";
12
- function j(e, n, { signal: r, edges: o } = {}) {
10
+ import { g as O, e as y } from "./treeGridUtil-C46Qi5LG.js";
11
+ import { b as j } from "./useOwpTranslation-CMrtqKkT.js";
12
+ function k(e, r, { signal: n, edges: o } = {}) {
13
13
  let s, i = null;
14
14
  const u = o != null && o.includes("leading"), c = o == null || o.includes("trailing"), f = /* @__PURE__ */ t(() => {
15
15
  i !== null && (e.apply(s, i), s = void 0, i = null);
16
16
  }, "invoke"), l = /* @__PURE__ */ t(() => {
17
- c && f(), w();
17
+ c && f(), T();
18
18
  }, "onTimerEnd");
19
19
  let a = null;
20
20
  const L = /* @__PURE__ */ t(() => {
21
21
  a != null && clearTimeout(a), a = setTimeout(() => {
22
22
  a = null, l();
23
- }, n);
23
+ }, r);
24
24
  }, "schedule"), m = /* @__PURE__ */ t(() => {
25
25
  a !== null && (clearTimeout(a), a = null);
26
- }, "cancelTimer"), w = /* @__PURE__ */ t(() => {
26
+ }, "cancelTimer"), T = /* @__PURE__ */ t(() => {
27
27
  m(), s = void 0, i = null;
28
28
  }, "cancel"), M = /* @__PURE__ */ t(() => {
29
29
  f();
30
30
  }, "flush"), S = /* @__PURE__ */ t(function(...N) {
31
- if (r != null && r.aborted)
31
+ if (n != null && n.aborted)
32
32
  return;
33
33
  s = this, i = N;
34
34
  const V = a == null;
35
35
  L(), u && V && f();
36
36
  }, "debounced");
37
- return S.schedule = L, S.cancel = w, S.flush = M, r == null || r.addEventListener("abort", w, { once: !0 }), S;
37
+ return S.schedule = L, S.cancel = T, S.flush = M, n == null || n.addEventListener("abort", T, { once: !0 }), S;
38
38
  }
39
- t(j, "debounce$1");
40
- function k(e, n = 0, r = {}) {
41
- typeof r != "object" && (r = {});
42
- const { leading: o = !1, trailing: s = !0, maxWait: i } = r, u = Array(2);
39
+ t(k, "debounce$1");
40
+ function F(e, r = 0, n = {}) {
41
+ typeof n != "object" && (n = {});
42
+ const { leading: o = !1, trailing: s = !0, maxWait: i } = n, u = Array(2);
43
43
  o && (u[0] = "leading"), s && (u[1] = "trailing");
44
44
  let c, f = null;
45
- const l = j(function(...m) {
45
+ const l = k(function(...m) {
46
46
  c = e.apply(this, m), f = null;
47
- }, n, { edges: u }), a = /* @__PURE__ */ t(function(...m) {
47
+ }, r, { edges: u }), a = /* @__PURE__ */ t(function(...m) {
48
48
  return i != null && (f === null && (f = Date.now()), Date.now() - f >= i) ? (c = e.apply(this, m), f = Date.now(), l.cancel(), l.schedule(), c) : (l.apply(this, m), c);
49
49
  }, "debounced"), L = /* @__PURE__ */ t(() => (l.flush(), c), "flush");
50
50
  return a.cancel = l.cancel, a.flush = L, a;
51
51
  }
52
- t(k, "debounce");
53
- const R = C(h.commonCodeList, void 0), te = /* @__PURE__ */ t(() => g(R), "useGetCommonCodeList"), ne = /* @__PURE__ */ t(() => E(R), "useSetCommonCodeList"), b = C(h.currentLanguage, {
52
+ t(F, "debounce");
53
+ const v = C(h.commonCodeList, void 0), te = /* @__PURE__ */ t(() => g(v), "useGetCommonCodeList"), ne = /* @__PURE__ */ t(() => E(v), "useSetCommonCodeList"), R = C(h.currentLanguage, {
54
54
  id: "kr",
55
55
  title: "한국어",
56
56
  flag: "KR"
@@ -65,27 +65,27 @@ const R = C(h.commonCodeList, void 0), te = /* @__PURE__ */ t(() => g(R), "useGe
65
65
  },
66
66
  { id: "lc", title: e("Common.Etc", { defaultValue: "Etc" }), flag: "LC" }
67
67
  ];
68
- }, "useGetLanguageList"), oe = /* @__PURE__ */ t(() => g(b), "useGetCurrentLanguage"), ue = /* @__PURE__ */ t(() => E(b), "useSetCurrentLanguage"), x = C(
68
+ }, "useGetLanguageList"), oe = /* @__PURE__ */ t(() => g(R), "useGetCurrentLanguage"), ue = /* @__PURE__ */ t(() => E(R), "useSetCurrentLanguage"), x = C(
69
69
  h.currentLogoSrc,
70
70
  "assets/images/logo/daedong-door-logo-b.png"
71
71
  ), se = /* @__PURE__ */ t(() => g(x), "useGetCurrentLogoSrc"), ce = /* @__PURE__ */ t(() => E(x), "useSetCurrentLogoSrc");
72
- function ie(e, n) {
73
- const r = T(e);
74
- d(() => {
75
- r.current = e;
72
+ function ie(e, r) {
73
+ const n = w(e);
74
+ p(() => {
75
+ n.current = e;
76
76
  }, [e]);
77
77
  const o = B(
78
- k((...s) => {
79
- r.current(...s);
80
- }, n),
81
- [n]
78
+ F((...s) => {
79
+ n.current(...s);
80
+ }, r),
81
+ [r]
82
82
  );
83
- return d(() => () => {
83
+ return p(() => () => {
84
84
  o.cancel();
85
85
  }, [o]), o;
86
86
  }
87
87
  t(ie, "useDebounce");
88
- function F(e) {
88
+ function P(e) {
89
89
  if (!e || !e.length)
90
90
  throw new Error(
91
91
  "useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead."
@@ -95,78 +95,70 @@ function F(e) {
95
95
  "useDeepCompareEffect should not be used with dependencies that are all primitive values. Use React.useEffect instead."
96
96
  );
97
97
  }
98
- t(F, "checkDeps");
98
+ t(P, "checkDeps");
99
99
  function Q(e) {
100
100
  return e == null || /^[sbn]/.test(typeof e);
101
101
  }
102
102
  t(Q, "isPrimitive");
103
103
  function G(e) {
104
- const n = p.useRef(e), r = p.useRef(0);
105
- return I(e, n.current) || (n.current = e, r.current += 1), p.useMemo(() => n.current, [r.current]);
104
+ const r = d.useRef(e), n = d.useRef(0);
105
+ return I(e, r.current) || (r.current = e, n.current += 1), d.useMemo(() => r.current, [n.current]);
106
106
  }
107
107
  t(G, "useDeepCompareMemoize");
108
- function ae(e, n) {
109
- return process.env.NODE_ENV !== "production" && F(n), p.useEffect(e, G(n));
108
+ function ae(e, r) {
109
+ return process.env.NODE_ENV !== "production" && P(r), d.useEffect(e, G(r));
110
110
  }
111
111
  t(ae, "useDeepCompareEffect");
112
- function fe(e, n) {
113
- return p.useEffect(e, G(n));
112
+ function fe(e, r) {
113
+ return d.useEffect(e, G(r));
114
114
  }
115
115
  t(fe, "useDeepCompareEffectNoCheck");
116
- const A = C(h.navigationList, void 0), le = /* @__PURE__ */ t(() => g(A), "useGetNavigationList"), me = /* @__PURE__ */ t(() => E(A), "useSetNavigationList");
117
- function de(e) {
118
- const n = T();
119
- return d(() => {
120
- n.current = e;
121
- }, [e]), n.current;
122
- }
123
- t(de, "usePrevious");
124
- const D = C(h.currentShortcuts, []), pe = /* @__PURE__ */ t(() => g(D), "useGetShortcuts"), he = /* @__PURE__ */ t(() => E(D), "useSetShortcuts");
125
- function ge(e) {
126
- const n = K(), r = e(n).replace("@media ", "");
116
+ const A = C(h.navigationList, void 0), le = /* @__PURE__ */ t(() => g(A), "useGetNavigationList"), me = /* @__PURE__ */ t(() => E(A), "useSetNavigationList"), D = C(h.currentShortcuts, []), de = /* @__PURE__ */ t(() => g(D), "useGetShortcuts"), pe = /* @__PURE__ */ t(() => E(D), "useSetShortcuts");
117
+ function he(e) {
118
+ const r = K(), n = e(r).replace("@media ", "");
127
119
  function o(u) {
128
120
  return window.matchMedia(u).matches;
129
121
  }
130
122
  t(o, "getMatches");
131
- const [s, i] = v(o(r));
132
- return d(
123
+ const [s, i] = b(o(n));
124
+ return p(
133
125
  () => {
134
- const u = window.matchMedia(r);
135
- i(o(r));
126
+ const u = window.matchMedia(n);
127
+ i(o(n));
136
128
  const c = /* @__PURE__ */ t((f) => i(f.matches), "handler");
137
129
  return u.addEventListener("change", c), () => u.removeEventListener("change", c);
138
130
  },
139
- [r]
131
+ [n]
140
132
  // Empty array ensures effect is only run on mount and unmount
141
133
  ), s;
142
134
  }
143
- t(ge, "useThemeMediaQuery");
144
- function Ee(e, n) {
145
- const r = T(e);
146
- d(() => {
147
- r.current = e;
148
- }, [e]), d(() => {
135
+ t(he, "useThemeMediaQuery");
136
+ function ge(e, r) {
137
+ const n = w(e);
138
+ p(() => {
139
+ n.current = e;
140
+ }, [e]), p(() => {
149
141
  let o;
150
- return n !== null && e && typeof e == "function" && (o = setTimeout(r.current, n)), () => {
142
+ return r !== null && e && typeof e == "function" && (o = setTimeout(n.current, r)), () => {
151
143
  o && clearTimeout(o);
152
144
  };
153
- }, [e, n]);
145
+ }, [e, r]);
154
146
  }
155
- t(Ee, "useTimeout");
156
- const Ce = /* @__PURE__ */ t((e) => {
157
- const { t: n } = P(), r = T(!1), [o, s] = v(!1);
147
+ t(ge, "useTimeout");
148
+ const Ee = /* @__PURE__ */ t((e) => {
149
+ const { t: r } = j(), n = w(!1), [o, s] = b(!1);
158
150
  return { exportByTreeGrid: /* @__PURE__ */ t(async (u) => {
159
- if (r.current)
151
+ if (n.current)
160
152
  return;
161
- r.current = !0, s(!0);
153
+ n.current = !0, s(!0);
162
154
  const c = O(e);
163
155
  try {
164
- return typeof u == "string" ? await y(c, { exportName: u, t: n }) : await y(c, {
156
+ return typeof u == "string" ? await y(c, { exportName: u, t: r }) : await y(c, {
165
157
  ...u,
166
- t: n
158
+ t: r
167
159
  });
168
160
  } finally {
169
- r.current = !1, s(!1);
161
+ n.current = !1, s(!1);
170
162
  }
171
163
  }, "exportByTreeGrid"), isExporting: o };
172
164
  }, "useTreeGridExcelExport");
@@ -188,8 +180,7 @@ export {
188
180
  he as o,
189
181
  ge as p,
190
182
  Ee as q,
191
- Ce as r,
192
- k as s,
183
+ F as r,
193
184
  te as u
194
185
  };
195
- //# sourceMappingURL=useTreeGridExcelExport-QNcWzx5v.js.map
186
+ //# sourceMappingURL=useTreeGridExcelExport-DLMecvHS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTreeGridExcelExport-DLMecvHS.js","sources":["../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/function/debounce.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.mjs","../src/hooks/useCommonCodeList.ts","../src/hooks/useCurrentLanguage.ts","../src/hooks/useCurrentLogoSrc.ts","../src/hooks/useDebounce.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useNavigation.ts","../src/hooks/useShortcuts.ts","../src/hooks/useThemeMediaQuery.ts","../src/hooks/useTimeout.ts","../src/hooks/useTreeGridExcelExport.ts"],"sourcesContent":["function debounce(func, debounceMs, { signal, edges } = {}) {\n let pendingThis = undefined;\n let pendingArgs = null;\n const leading = edges != null && edges.includes('leading');\n const trailing = edges == null || edges.includes('trailing');\n const invoke = () => {\n if (pendingArgs !== null) {\n func.apply(pendingThis, pendingArgs);\n pendingThis = undefined;\n pendingArgs = null;\n }\n };\n const onTimerEnd = () => {\n if (trailing) {\n invoke();\n }\n cancel();\n };\n let timeoutId = null;\n const schedule = () => {\n if (timeoutId != null) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = null;\n onTimerEnd();\n }, debounceMs);\n };\n const cancelTimer = () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n const cancel = () => {\n cancelTimer();\n pendingThis = undefined;\n pendingArgs = null;\n };\n const flush = () => {\n invoke();\n };\n const debounced = function (...args) {\n if (signal?.aborted) {\n return;\n }\n pendingThis = this;\n pendingArgs = args;\n const isFirstCall = timeoutId == null;\n schedule();\n if (leading && isFirstCall) {\n invoke();\n }\n };\n debounced.schedule = schedule;\n debounced.cancel = cancel;\n debounced.flush = flush;\n signal?.addEventListener('abort', cancel, { once: true });\n return debounced;\n}\n\nexport { debounce };\n","import { debounce as debounce$1 } from '../../function/debounce.mjs';\n\nfunction debounce(func, debounceMs = 0, options = {}) {\n if (typeof options !== 'object') {\n options = {};\n }\n const { leading = false, trailing = true, maxWait } = options;\n const edges = Array(2);\n if (leading) {\n edges[0] = 'leading';\n }\n if (trailing) {\n edges[1] = 'trailing';\n }\n let result = undefined;\n let pendingAt = null;\n const _debounced = debounce$1(function (...args) {\n result = func.apply(this, args);\n pendingAt = null;\n }, debounceMs, { edges });\n const debounced = function (...args) {\n if (maxWait != null) {\n if (pendingAt === null) {\n pendingAt = Date.now();\n }\n if (Date.now() - pendingAt >= maxWait) {\n result = func.apply(this, args);\n pendingAt = Date.now();\n _debounced.cancel();\n _debounced.schedule();\n return result;\n }\n }\n _debounced.apply(this, args);\n return result;\n };\n const flush = () => {\n _debounced.flush();\n return result;\n };\n debounced.cancel = _debounced.cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport { debounce };\n","import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { CommonCode } from '@/utils/commonCodeUtils';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nconst commonCodeAtom = atomWithStorage<\n | {\n [codeId: string]: Array<CommonCode>;\n }\n | undefined\n>(STORAGE_KEYS.commonCodeList, undefined);\n\n/**\n * 공통코드 목록 조회 훅\n */\nexport const useGetCommonCodeList = () => {\n return useAtomValue(commonCodeAtom);\n};\n\n/**\n * 공통코드 목록 설정 훅\n */\nexport const useSetCommonCodeList = () => {\n return useSetAtom(commonCodeAtom);\n};\n","export { FALLBACK_LANGUAGE_LIST } from '@/constants/language';\nimport { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\nimport { useTranslation } from 'react-i18next';\n\nexport type CurrentLanguage = { id: 'en' | 'kr' | 'lc'; title: string; flag: string };\n\nconst currentLanguageAtom = atomWithStorage<CurrentLanguage>(STORAGE_KEYS.currentLanguage, {\n id: 'kr',\n title: '한국어',\n flag: 'KR',\n});\n\n/**\n * 언어 목록 조회 훅\n */\nexport const useGetLanguageList = () => {\n const { t } = useTranslation('owp');\n return [\n { id: 'kr', title: t('Common.한국어', { defaultValue: '한국어' }), flag: 'KR' },\n {\n id: 'en',\n title: t('Common.English', { defaultValue: 'English' }),\n flag: 'EN',\n },\n { id: 'lc', title: t('Common.Etc', { defaultValue: 'Etc' }), flag: 'LC' },\n ];\n};\n\n/**\n * 현재 언어 조회 훅\n */\nexport const useGetCurrentLanguage = () => {\n return useAtomValue(currentLanguageAtom);\n};\n\n/**\n * 현재 언어 설정 훅\n */\nexport const useSetCurrentLanguage = () => {\n return useSetAtom(currentLanguageAtom);\n};\n","import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nconst currentLogoSrcAtom = atomWithStorage<string>(\n STORAGE_KEYS.currentLogoSrc,\n 'assets/images/logo/daedong-door-logo-b.png',\n);\n\n/**\n * 현재 로고 경로 조회 훅\n */\nexport const useGetCurrentLogoSrc = () => {\n return useAtomValue(currentLogoSrcAtom);\n};\n\n/**\n * 현재 로고 경로 설정 훅\n */\nexport const useSetCurrentLogoSrc = () => {\n return useSetAtom(currentLogoSrcAtom);\n};\n","import { debounce } from 'es-toolkit/compat';\nimport { useCallback, useEffect, useRef } from 'react';\n\n/**\n * Debounce hook.\n * @param {T} callback\n * @param {number} delay\n * @returns {T}\n */\nexport function useDebounce<T extends (...args: never[]) => void>(callback: T, delay: number): T {\n const callbackRef = useRef<T>(callback);\n\n // Update the current callback each time it changes.\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useCallback(\n debounce((...args: never[]) => {\n callbackRef.current(...args);\n }, delay),\n [delay],\n );\n\n useEffect(() => {\n // Cleanup function to cancel any pending debounced calls\n return () => {\n debouncedFn.cancel();\n };\n }, [debouncedFn]);\n\n return debouncedFn as unknown as T;\n}\n","import { isEqual as deepEqual } from 'es-toolkit/compat';\nimport React from 'react';\n\ntype UseEffectParamsType = Parameters<typeof React.useEffect>;\ntype EffectCallbackType = UseEffectParamsType[0];\ntype DependencyListType = UseEffectParamsType[1];\n\n// yes, I know it's void, but I like what this communicates about\n// the intent of these functions: It's just like useEffect\ntype UseEffectReturn = ReturnType<typeof React.useEffect>;\n\n/**\n * The checkDeps function checks if the dependency list is valid for use with useDeepCompareEffect.\n * It throws an error if the dependency list is empty or contains only primitive values.\n */\nfunction checkDeps(deps: DependencyListType) {\n if (!deps || !deps.length) {\n throw new Error(\n 'useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.',\n );\n }\n\n if (deps.every(isPrimitive)) {\n throw new Error(\n 'useDeepCompareEffect should not be used with dependencies that are all primitive values. Use React.useEffect instead.',\n );\n }\n}\n\n/**\n * The isPrimitive function checks if a value is a primitive type.\n * It returns true if the value is null, undefined, a string, a boolean, or a number.\n */\nfunction isPrimitive(val: unknown) {\n return val == null || /^[sbn]/.test(typeof val);\n}\n\n/**\n * The isPrimitive function checks if a value is a primitive type.\n * It returns true if the value is null, undefined, a string, a boolean, or a number.\n */\nexport function useDeepCompareMemoize<T>(value: T) {\n const ref = React.useRef<T>(value);\n const signalRef = React.useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return React.useMemo(() => ref.current, [signalRef.current]);\n}\n\n/**\n * The isPrimitive function checks if a value is a primitive type.\n * It returns true if the value is null, undefined, a string, a boolean, or a number.\n */\nexport function useDeepCompareEffect(\n callback: EffectCallbackType,\n dependencies: DependencyListType,\n): UseEffectReturn {\n if (process.env.NODE_ENV !== 'production') {\n checkDeps(dependencies);\n }\n\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\n/**\n * deep compare effect 훅\n * @param callback effect 콜백\n * @param dependencies 의존성 목록\n */\nexport function useDeepCompareEffectNoCheck(\n callback: EffectCallbackType,\n dependencies: DependencyListType,\n): UseEffectReturn {\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\ntype Navigation = {\n id: string;\n title: string;\n translate: string;\n type: string;\n icon: string;\n};\nconst navigationAtom = atomWithStorage<\n Array<Navigation & { children?: Array<Navigation> }> | undefined\n>(STORAGE_KEYS.navigationList, undefined);\n\n/**\n * 내비게이션 목록 조회 훅\n */\nexport const useGetNavigationList = () => {\n return useAtomValue(navigationAtom);\n};\n\n/**\n * 내비게이션 목록 설정 훅\n */\nexport const useSetNavigationList = () => {\n return useSetAtom(navigationAtom);\n};\n","import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nconst currentShortcutsAtom = atomWithStorage<Array<string> | []>(STORAGE_KEYS.currentShortcuts, []);\n\n/**\n * 바로가기 목록 조회 훅\n */\nexport const useGetShortcuts = () => {\n return useAtomValue(currentShortcutsAtom);\n};\n\n/**\n * 바로가기 목록 설정 훅\n */\nexport const useSetShortcuts = () => {\n return useSetAtom(currentShortcutsAtom);\n};\n","import { useTheme } from '@mui/material/styles';\nimport { Theme } from '@mui/system/createTheme/createTheme';\nimport { useEffect, useState } from 'react';\n\n/**\n * The useThemeMediaQuery function is a custom hook that returns a boolean indicating whether the current screen matches the specified media query.\n * It takes in a themeCallbackFunc as a parameter, which is a function that returns a string representing the media query to match.\n * It returns a boolean indicating whether the current screen matches the specified media query.\n */\nexport function useThemeMediaQuery(themeCallbackFunc: (theme: Theme) => string) {\n const theme = useTheme();\n\n const query = themeCallbackFunc(theme).replace('@media ', '');\n\n /**\n * The getMatches function checks if the current screen matches the specified media query.\n * It takes in a media query string as a parameter and returns a boolean indicating whether the screen matches the query.\n *\n */\n function getMatches(q: string) {\n return window.matchMedia(q).matches;\n }\n\n const [matches, setMatches] = useState(getMatches(query));\n\n useEffect(\n () => {\n const mediaQuery = window.matchMedia(query);\n\n // Update the state with the current value\n setMatches(getMatches(query));\n\n // Create an event listener\n const handler = (event: MediaQueryListEvent) => setMatches(event.matches);\n\n // Attach the event listener to know when the matches value changes\n mediaQuery.addEventListener('change', handler);\n\n // Remove the event listener on cleanup\n return () => mediaQuery.removeEventListener('change', handler);\n },\n [query], // Empty array ensures effect is only run on mount and unmount\n );\n\n return matches;\n}\n","import { useEffect, useRef } from 'react';\n\n/**\n * The useTimeout function is a custom hook that sets a timeout for a given callback function.\n * It takes in a callback function and a delay time in milliseconds as parameters.\n * It returns nothing.\n */\nexport function useTimeout(callback: () => void, delay: number) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n useEffect(() => {\n let timer: NodeJS.Timeout | undefined;\n\n if (delay !== null && callback && typeof callback === 'function') {\n timer = setTimeout(callbackRef.current, delay);\n }\n\n return () => {\n if (timer) {\n clearTimeout(timer);\n }\n };\n }, [callback, delay]);\n}\n","import {\n ExportTreeGridExcelOptions,\n exportTreeGridExcel,\n} from '@/utils/treeGridExportExcelUtil';\nimport { getTreeGridById } from '@/utils/treeGridUtil';\nimport { useRef, useState } from 'react';\nimport { useOwpTranslation } from './useOwpTranslation';\n\nexport type UseTreeGridExcelExportOptions = Omit<ExportTreeGridExcelOptions, 't'> | string;\n\n/**\n * TreeGrid 엑셀 내보내기 훅\n * @param gridId TreeGrid 인스턴스 ID\n */\nexport const useTreeGridExcelExport = (gridId: string) => {\n const { t } = useOwpTranslation();\n const exportPendingRef = useRef(false);\n const [isExporting, setIsExporting] = useState(false);\n\n /**\n * TreeGrid 엑셀 내보내기 실행기\n * @param options 다운로드 옵션\n */\n const exportByTreeGrid = async (options?: UseTreeGridExcelExportOptions) => {\n if (exportPendingRef.current) {\n return;\n }\n\n exportPendingRef.current = true;\n setIsExporting(true);\n\n const grid = getTreeGridById(gridId);\n\n try {\n if (typeof options === 'string') {\n return await exportTreeGridExcel(grid, { exportName: options, t });\n }\n\n return await exportTreeGridExcel(grid, {\n ...options,\n t,\n });\n } finally {\n exportPendingRef.current = false;\n setIsExporting(false);\n }\n };\n\n return { exportByTreeGrid, isExporting };\n};\n"],"names":["debounce","func","debounceMs","signal","edges","pendingThis","pendingArgs","leading","trailing","invoke","__name","onTimerEnd","cancel","timeoutId","schedule","cancelTimer","flush","debounced","args","isFirstCall","options","maxWait","result","pendingAt","_debounced","debounce$1","commonCodeAtom","atomWithStorage","STORAGE_KEYS","useGetCommonCodeList","useAtomValue","useSetCommonCodeList","useSetAtom","currentLanguageAtom","useGetLanguageList","t","useTranslation","useGetCurrentLanguage","useSetCurrentLanguage","currentLogoSrcAtom","useGetCurrentLogoSrc","useSetCurrentLogoSrc","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","useCallback","checkDeps","deps","isPrimitive","val","useDeepCompareMemoize","value","ref","React","signalRef","deepEqual","useDeepCompareEffect","dependencies","useDeepCompareEffectNoCheck","navigationAtom","useGetNavigationList","useSetNavigationList","currentShortcutsAtom","useGetShortcuts","useSetShortcuts","useThemeMediaQuery","themeCallbackFunc","theme","useTheme","query","getMatches","q","matches","setMatches","useState","mediaQuery","handler","event","useTimeout","timer","useTreeGridExcelExport","gridId","useOwpTranslation","exportPendingRef","isExporting","setIsExporting","grid","getTreeGridById","exportTreeGridExcel"],"mappings":";;;;;;;;;;;AAAA,SAASA,EAASC,GAAMC,GAAY,EAAE,QAAAC,GAAQ,OAAAC,EAAK,IAAK,IAAI;AACxD,MAAIC,GACAC,IAAc;AAClB,QAAMC,IAAUH,KAAS,QAAQA,EAAM,SAAS,SAAS,GACnDI,IAAWJ,KAAS,QAAQA,EAAM,SAAS,UAAU,GACrDK,IAAS,gBAAAC,EAAA,MAAM;AACjB,IAAIJ,MAAgB,SAChBL,EAAK,MAAMI,GAAaC,CAAW,GACnCD,IAAc,QACdC,IAAc;AAAA,EAEtB,GANe,WAOTK,IAAa,gBAAAD,EAAA,MAAM;AACrB,IAAIF,KACAC,EAAM,GAEVG,EAAM;AAAA,EACV,GALmB;AAMnB,MAAIC,IAAY;AAChB,QAAMC,IAAW,gBAAAJ,EAAA,MAAM;AACnB,IAAIG,KAAa,QACb,aAAaA,CAAS,GAE1BA,IAAY,WAAW,MAAM;AACzB,MAAAA,IAAY,MACZF,EAAU;AAAA,IACd,GAAGT,CAAU;AAAA,EACjB,GARiB,aASXa,IAAc,gBAAAL,EAAA,MAAM;AACtB,IAAIG,MAAc,SACd,aAAaA,CAAS,GACtBA,IAAY;AAAA,EAEpB,GALoB,gBAMdD,IAAS,gBAAAF,EAAA,MAAM;AACjB,IAAAK,EAAW,GACXV,IAAc,QACdC,IAAc;AAAA,EAClB,GAJe,WAKTU,IAAQ,gBAAAN,EAAA,MAAM;AAChB,IA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,aAAaA,CAAK;AAAA,IAEtB;AAAA,EACF,GAAG,CAACxC,GAAUC,CAAK,CAAC;AACtB;AApBgBlC,EAAAwE,IAAA;ACOT,MAAME,KAAyB,gBAAA1E,EAAA,CAAC2E,MAAmB;AACxD,QAAM,EAAE,GAAAlD,EAAA,IAAMmD,EAAA,GACRC,IAAmBzC,EAAO,EAAK,GAC/B,CAAC0C,GAAaC,CAAc,IAAIX,EAAS,EAAK;AA+BpD,SAAO,EAAE,kBAzBgB,gBAAApE,EAAA,OAAOU,MAA4C;AAC1E,QAAImE,EAAiB;AACnB;AAGF,IAAAA,EAAiB,UAAU,IAC3BE,EAAe,EAAI;AAEnB,UAAMC,IAAOC,EAAgBN,CAAM;AAEnC,QAAI;AACF,aAAI,OAAOjE,KAAY,WACd,MAAMwE,EAAoBF,GAAM,EAAE,YAAYtE,GAAS,GAAAe,GAAG,IAG5D,MAAMyD,EAAoBF,GAAM;AAAA,QACrC,GAAGtE;AAAA,QACH,GAAAe;AAAA,MAAA,CACD;AAAA,IACH,UAAA;AACE,MAAAoD,EAAiB,UAAU,IAC3BE,EAAe,EAAK;AAAA,IACtB;AAAA,EACF,GAvByB,qBAyBE,aAAAD,EAAA;AAC7B,GAnCsC;","x_google_ignoreList":[0,1]}
package/dist/utils.js CHANGED
@@ -3,15 +3,15 @@ var a = (e, t) => gi(e, "name", { value: t, configurable: !0 });
3
3
  import { d as lr, e as cr, b as yn, c as de } from "./OwpUtils-9lHSCdan.js";
4
4
  import { O as ch } from "./OwpUtils-9lHSCdan.js";
5
5
  import { d as mi } from "./isTypedArray-xp-fB7W4.js";
6
- import { i as Se, t as ke } from "./treeGridUtil-_FDvRzzt.js";
7
- import { A as dh, k as ph, E as _h, c as gh, h as mh, C as vh, e as yh, m as bh, B as wh, y as Eh, x as Oh, a as kh, b as Sh, D as Ah, g as xh, j as Ch, l as Ih, n as Th, p as Rh, z as Bh, r as Ph, I as Dh, G as $h, J as Mh, H as Lh, v as zh, w as Nh, q as Fh, u as Uh, d as jh, K as Gh, F as Hh, f as Vh, s as Zh, o as Wh } from "./treeGridUtil-_FDvRzzt.js";
6
+ import { i as Se, t as ke } from "./treeGridUtil-C46Qi5LG.js";
7
+ import { A as dh, k as ph, E as _h, c as gh, h as mh, C as vh, e as yh, m as bh, B as wh, y as Eh, x as Oh, a as kh, b as Sh, D as Ah, g as xh, j as Ch, l as Ih, n as Th, p as Rh, z as Bh, r as Ph, I as Dh, G as $h, J as Mh, H as Lh, v as zh, w as Nh, q as Fh, u as Uh, d as jh, K as Gh, F as Hh, f as Vh, s as Zh, o as Wh } from "./treeGridUtil-C46Qi5LG.js";
8
8
  import { S as Jr } from "./storageKeys-DRzte9LZ.js";
9
- import { i as vi, t as yi } from "./toUpper-CilZrxEa.js";
9
+ import { i as vi, t as yi } from "./toUpper-K8I4frC5.js";
10
10
  import { g as bi } from "./useStorage-BA0D8KA7.js";
11
11
  import hr from "dayjs";
12
12
  import { t as wi } from "i18next";
13
13
  import { enqueueSnackbar as Ei } from "notistack";
14
- import { D as Kh, e as Yh, b as qh, d as Jh, c as Qh, a as td, g as ed, h as rd, f as nd, T as id } from "./treeGrid-CjB04cBq.js";
14
+ import { f as Kh, d as Yh, a as qh, c as Jh, D as Qh, b as td, T as ed, e as rd, g as nd, h as id } from "./treeGrid-DRAoPLXh.js";
15
15
  function Oi(e, t) {
16
16
  const r = {};
17
17
  for (let n = 0; n < e.length; n++) {