@owp/core 1.24.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.
Files changed (32) hide show
  1. package/dist/{OwpUtils-hi_nUgx5.js → OwpUtils-DemzkaAZ.js} +125 -125
  2. package/dist/{OwpUtils-hi_nUgx5.js.map → OwpUtils-DemzkaAZ.js.map} +1 -1
  3. package/dist/{QuickPanel-tv7rbuFl.js → QuickPanel-Dla59ejy.js} +3 -3
  4. package/dist/{QuickPanel-tv7rbuFl.js.map → QuickPanel-Dla59ejy.js.map} +1 -1
  5. package/dist/constants.js +19 -7
  6. package/dist/constants.js.map +1 -1
  7. package/dist/hooks.js +40 -39
  8. package/dist/hooks.js.map +1 -1
  9. package/dist/{index-BIbSyAVz.js → index-DuATtBay.js} +7770 -7791
  10. package/dist/{index-BIbSyAVz.js.map → index-DuATtBay.js.map} +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/language-CwsGUe4C.js +5 -0
  13. package/dist/language-CwsGUe4C.js.map +1 -0
  14. package/dist/treeGrid-4QKOKXZw.js +46 -0
  15. package/dist/treeGrid-4QKOKXZw.js.map +1 -0
  16. package/dist/{treeGridUtil-DwKt2i7A.js → treeGridUtil-ZdWIjKlK.js} +592 -622
  17. package/dist/{treeGridUtil-DwKt2i7A.js.map → treeGridUtil-ZdWIjKlK.js.map} +1 -1
  18. package/dist/types/constants/excel.d.ts +12 -0
  19. package/dist/types/constants/index.d.ts +3 -0
  20. package/dist/types/constants/language.d.ts +1 -0
  21. package/dist/types/constants/treeGrid.d.ts +4 -0
  22. package/dist/types/hooks/useCurrentLanguage.d.ts +1 -1
  23. package/dist/types/utils/excelUtil.d.ts +2 -8
  24. package/dist/types/utils/treeGridUtil.d.ts +2 -5
  25. package/dist/{useTreeGridExcelExport-CzEJeMqo.js → useTreeGridExcelExport-BumQHnAN.js} +74 -75
  26. package/dist/useTreeGridExcelExport-BumQHnAN.js.map +1 -0
  27. package/dist/utils.js +51 -50
  28. package/dist/utils.js.map +1 -1
  29. package/package.json +3 -2
  30. package/dist/storageKeys-DRzte9LZ.js +0 -15
  31. package/dist/storageKeys-DRzte9LZ.js.map +0 -1
  32. package/dist/useTreeGridExcelExport-CzEJeMqo.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 {};
@@ -1,2 +1,5 @@
1
+ export * from './excel';
2
+ export * from './language';
1
3
  export * from './localStorageKeys';
2
4
  export * from './storageKeys';
5
+ export * from './treeGrid';
@@ -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";
@@ -1,9 +1,9 @@
1
+ export { FALLBACK_LANGUAGE_LIST } from '@/constants/language';
1
2
  export type CurrentLanguage = {
2
3
  id: 'en' | 'kr' | 'lc';
3
4
  title: string;
4
5
  flag: string;
5
6
  };
6
- export declare const FALLBACK_LANGUAGE_LIST: string[];
7
7
  /**
8
8
  * 언어 목록 조회 훅
9
9
  */
@@ -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 {};
@@ -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 {};
@@ -1,15 +1,15 @@
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";
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
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";
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
7
  import { Typography as J, DialogContent as $, DialogActions as Y, Button as R, Dialog as H } from "@mui/material";
8
8
  import { useDialogs as X } from "@toolpad/core/useDialogs";
9
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";
10
+ import E, { useRef as C, useEffect as h, useCallback as y, useMemo as Z, useState as D } from "react";
11
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 = {
12
+ const I = w(d.commonCodeList, void 0), we = /* @__PURE__ */ t(() => T(I), "useGetCommonCodeList"), be = /* @__PURE__ */ t(() => S(I), "useSetCommonCodeList"), f = {
13
13
  infoTitle: {
14
14
  primaryKey: "message.would_you_like_to_proceed",
15
15
  fallbackKey: "Message.처리하시겠습니까",
@@ -55,10 +55,10 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
55
55
  fallbackKey: "Button.취소",
56
56
  defaultValue: "취소"
57
57
  }
58
- }, _ = /* @__PURE__ */ t((e, n) => e ? {
58
+ }, O = /* @__PURE__ */ t((e, n) => e ? {
59
59
  color: e,
60
60
  ...n
61
- } : n, "mergeOkButtonProps"), be = /* @__PURE__ */ t(() => {
61
+ } : n, "mergeOkButtonProps"), ke = /* @__PURE__ */ t(() => {
62
62
  const e = X(), { t: n, i18n: r } = x("owp"), s = /* @__PURE__ */ t(({
63
63
  primaryKey: o,
64
64
  fallbackKey: c,
@@ -81,7 +81,7 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
81
81
  title: o ?? s(f.saveTitle),
82
82
  okText: c ?? s(f.saveOk),
83
83
  cancelText: i,
84
- okButtonProps: _("secondary", a)
84
+ okButtonProps: O("secondary", a)
85
85
  }), "confirmSave"),
86
86
  confirmUpdate: /* @__PURE__ */ t(async ({
87
87
  title: o,
@@ -92,7 +92,7 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
92
92
  title: o ?? s(f.updateTitle),
93
93
  okText: c ?? s(f.updateOk),
94
94
  cancelText: i,
95
- okButtonProps: _("secondary", a)
95
+ okButtonProps: O("secondary", a)
96
96
  }), "confirmUpdate"),
97
97
  confirmDelete: /* @__PURE__ */ t(async ({
98
98
  title: o,
@@ -103,7 +103,7 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
103
103
  title: o ?? s(f.deleteTitle),
104
104
  okText: c ?? s(f.deleteOk),
105
105
  cancelText: i,
106
- okButtonProps: _("error", a)
106
+ okButtonProps: O("error", a)
107
107
  }), "confirmDelete")
108
108
  };
109
109
  }, "useConfirm"), te = /* @__PURE__ */ t(({ payload: e, open: n, onClose: r }) => {
@@ -113,11 +113,11 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
113
113
  m.exists(f.cancel.primaryKey) ? f.cancel.primaryKey : f.cancel.fallbackKey,
114
114
  { defaultValue: f.cancel.defaultValue }
115
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(
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
121
  R,
122
122
  {
123
123
  color: c || "primary",
@@ -129,11 +129,11 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
129
129
  )
130
130
  ] })
131
131
  ] });
132
- }, "ConfirmDialog"), ve = ["kr", "en", "lc"], B = k(d.currentLanguage, {
132
+ }, "ConfirmDialog"), B = w(d.currentLanguage, {
133
133
  id: "kr",
134
134
  title: "한국어",
135
135
  flag: "KR"
136
- }), xe = /* @__PURE__ */ t(() => {
136
+ }), ve = /* @__PURE__ */ t(() => {
137
137
  const { t: e } = x("owp");
138
138
  return [
139
139
  { id: "kr", title: e("Common.한국어", { defaultValue: "한국어" }), flag: "KR" },
@@ -144,16 +144,16 @@ const I = k(d.commonCodeList, void 0), ke = /* @__PURE__ */ t(() => T(I), "useGe
144
144
  },
145
145
  { id: "lc", title: e("Common.Etc", { defaultValue: "Etc" }), flag: "LC" }
146
146
  ];
147
- }, "useGetLanguageList"), Ae = /* @__PURE__ */ t(() => T(B), "useGetCurrentLanguage"), Le = /* @__PURE__ */ t(() => S(B), "useSetCurrentLanguage"), G = k(
147
+ }, "useGetLanguageList"), xe = /* @__PURE__ */ t(() => T(B), "useGetCurrentLanguage"), Ce = /* @__PURE__ */ t(() => S(B), "useSetCurrentLanguage"), P = w(
148
148
  d.currentLogoSrc,
149
149
  "assets/images/logo/daedong-door-logo-b.png"
150
- ), _e = /* @__PURE__ */ t(() => T(G), "useGetCurrentLogoSrc"), Ce = /* @__PURE__ */ t(() => S(G), "useSetCurrentLogoSrc");
150
+ ), Ke = /* @__PURE__ */ t(() => T(P), "useGetCurrentLogoSrc"), Oe = /* @__PURE__ */ t(() => S(P), "useSetCurrentLogoSrc");
151
151
  function ne(e, n, { signal: r, edges: s } = {}) {
152
152
  let u, o = null;
153
153
  const c = s != null && s.includes("leading"), i = s == null || s.includes("trailing"), a = /* @__PURE__ */ t(() => {
154
154
  o !== null && (e.apply(u, o), u = void 0, o = null);
155
155
  }, "invoke"), m = /* @__PURE__ */ t(() => {
156
- i && a(), L();
156
+ i && a(), K();
157
157
  }, "onTimerEnd");
158
158
  let l = null;
159
159
  const p = /* @__PURE__ */ t(() => {
@@ -162,18 +162,18 @@ function ne(e, n, { signal: r, edges: s } = {}) {
162
162
  }, n);
163
163
  }, "schedule"), g = /* @__PURE__ */ t(() => {
164
164
  l !== null && (clearTimeout(l), l = null);
165
- }, "cancelTimer"), L = /* @__PURE__ */ t(() => {
165
+ }, "cancelTimer"), K = /* @__PURE__ */ t(() => {
166
166
  g(), u = void 0, o = null;
167
167
  }, "cancel"), j = /* @__PURE__ */ t(() => {
168
168
  a();
169
- }, "flush"), w = /* @__PURE__ */ t(function(...U) {
169
+ }, "flush"), b = /* @__PURE__ */ t(function(...U) {
170
170
  if (r != null && r.aborted)
171
171
  return;
172
172
  u = this, o = U;
173
- const F = l == null;
174
- p(), c && F && a();
173
+ const z = l == null;
174
+ p(), c && z && a();
175
175
  }, "debounced");
176
- return w.schedule = p, w.cancel = L, w.flush = j, r == null || r.addEventListener("abort", L, { once: !0 }), w;
176
+ return b.schedule = p, b.cancel = K, b.flush = j, r == null || r.addEventListener("abort", K, { once: !0 }), b;
177
177
  }
178
178
  t(ne, "debounce$1");
179
179
  function re(e, n = 0, r = {}) {
@@ -212,8 +212,8 @@ function ue(e, n, r) {
212
212
  return e == null ? "" : oe(e, n.toString().split(""));
213
213
  }
214
214
  t(ue, "trimEnd");
215
- function Ke(e, n) {
216
- const r = A(e);
215
+ function _e(e, n) {
216
+ const r = C(e);
217
217
  h(() => {
218
218
  r.current = e;
219
219
  }, [e]);
@@ -227,7 +227,7 @@ function Ke(e, n) {
227
227
  s.cancel();
228
228
  }, [s]), s;
229
229
  }
230
- t(Ke, "useDebounce");
230
+ t(_e, "useDebounce");
231
231
  function se(e) {
232
232
  if (!e || !e.length)
233
233
  throw new Error(
@@ -243,20 +243,20 @@ function ce(e) {
243
243
  return e == null || /^[sbn]/.test(typeof e);
244
244
  }
245
245
  t(ce, "isPrimitive");
246
- function P(e) {
246
+ function G(e) {
247
247
  const n = E.useRef(e), r = E.useRef(0);
248
248
  return Q(e, n.current) || (n.current = e, r.current += 1), E.useMemo(() => n.current, [r.current]);
249
249
  }
250
- t(P, "useDeepCompareMemoize");
251
- function Oe(e, n) {
252
- return process.env.NODE_ENV !== "production" && se(n), E.useEffect(e, P(n));
250
+ t(G, "useDeepCompareMemoize");
251
+ function Ae(e, n) {
252
+ return process.env.NODE_ENV !== "production" && se(n), E.useEffect(e, G(n));
253
253
  }
254
- t(Oe, "useDeepCompareEffect");
255
- function Re(e, n) {
256
- return E.useEffect(e, P(n));
254
+ t(Ae, "useDeepCompareEffect");
255
+ function Le(e, n) {
256
+ return E.useEffect(e, G(n));
257
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) => {
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
260
  if (!e.includes("."))
261
261
  return;
262
262
  const r = ue(e, ".").lastIndexOf(".");
@@ -275,14 +275,14 @@ const M = k(d.navigationList, void 0), Ve = /* @__PURE__ */ t(() => T(M), "useGe
275
275
  return e(...s);
276
276
  }, "t"), ...n };
277
277
  }, "useOwpTranslation");
278
- function Ie(e) {
279
- const n = A();
278
+ function De(e) {
279
+ const n = C();
280
280
  return h(() => {
281
281
  n.current = e;
282
282
  }, [e]), n.current;
283
283
  }
284
- t(Ie, "usePrevious");
285
- const N = k(d.currentShortcuts, []), Be = /* @__PURE__ */ t(() => T(N), "useGetShortcuts"), Ge = /* @__PURE__ */ t(() => S(N), "useSetShortcuts"), le = [
284
+ t(De, "usePrevious");
285
+ const N = w(d.currentShortcuts, []), Ie = /* @__PURE__ */ t(() => T(N), "useGetShortcuts"), Be = /* @__PURE__ */ t(() => S(N), "useSetShortcuts"), le = [
286
286
  d.currentLanguage,
287
287
  d.currentShortcuts,
288
288
  d.currentUserId,
@@ -310,7 +310,7 @@ const N = k(d.currentShortcuts, []), Be = /* @__PURE__ */ t(() => T(N), "useGetS
310
310
  (u == null ? void 0 : u.getItem(d.currentUser)) ?? null,
311
311
  null
312
312
  );
313
- return K(o) ? {
313
+ return A(o) ? {
314
314
  role: ["admin"],
315
315
  data: {
316
316
  displayName: o.USERNAME,
@@ -326,7 +326,7 @@ const N = k(d.currentShortcuts, []), Be = /* @__PURE__ */ t(() => T(N), "useGetS
326
326
  o && o.setItem(d.owpEnv, JSON.stringify(u ?? {}));
327
327
  }, []), s = y(() => {
328
328
  const u = v(), o = V((u == null ? void 0 : u.getItem(d.owpEnv)) ?? null, {});
329
- return K(o) ? o : {};
329
+ return A(o) ? o : {};
330
330
  }, []);
331
331
  return Z(
332
332
  () => ({
@@ -338,7 +338,7 @@ const N = k(d.currentShortcuts, []), Be = /* @__PURE__ */ t(() => T(N), "useGetS
338
338
  [n, s, e, r]
339
339
  );
340
340
  }, "useStorage");
341
- function Me(e) {
341
+ function Ge(e) {
342
342
  const n = ee(), r = e(n).replace("@media ", "");
343
343
  function s(c) {
344
344
  return window.matchMedia(c).matches;
@@ -356,9 +356,9 @@ function Me(e) {
356
356
  // Empty array ensures effect is only run on mount and unmount
357
357
  ), u;
358
358
  }
359
- t(Me, "useThemeMediaQuery");
360
- function Ne(e, n) {
361
- const r = A(e);
359
+ t(Ge, "useThemeMediaQuery");
360
+ function Me(e, n) {
361
+ const r = C(e);
362
362
  h(() => {
363
363
  r.current = e;
364
364
  }, [e]), h(() => {
@@ -368,16 +368,16 @@ function Ne(e, n) {
368
368
  };
369
369
  }, [e, n]);
370
370
  }
371
- t(Ne, "useTimeout");
372
- const je = /* @__PURE__ */ t((e) => {
373
- const { t: n } = ae(), r = A(!1), [s, u] = D(!1);
371
+ t(Me, "useTimeout");
372
+ const Ne = /* @__PURE__ */ t((e) => {
373
+ const { t: n } = ae(), r = C(!1), [s, u] = D(!1);
374
374
  return { exportByTreeGrid: /* @__PURE__ */ t(async (c) => {
375
375
  if (r.current)
376
376
  return;
377
377
  r.current = !0, u(!0);
378
378
  const i = q(e);
379
379
  try {
380
- return typeof c == "string" ? await O(i, { exportName: c, t: n }) : await O(i, {
380
+ return typeof c == "string" ? await L(i, { exportName: c, t: n }) : await L(i, {
381
381
  ...c,
382
382
  t: n
383
383
  });
@@ -387,29 +387,28 @@ const je = /* @__PURE__ */ t((e) => {
387
387
  }, "exportByTreeGrid"), isExporting: s };
388
388
  }, "useTreeGridExcelExport");
389
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,
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,
404
403
  ae as n,
405
- Ie as o,
406
- Be as p,
407
- Ge as q,
404
+ De as o,
405
+ Ie as p,
406
+ Be as q,
408
407
  Pe as r,
409
- Me as s,
410
- Ne as t,
411
- ke as u,
412
- je as v,
408
+ Ge as s,
409
+ Me as t,
410
+ we as u,
411
+ Ne as v,
413
412
  re as w
414
413
  };
415
- //# sourceMappingURL=useTreeGridExcelExport-CzEJeMqo.js.map
414
+ //# sourceMappingURL=useTreeGridExcelExport-BumQHnAN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTreeGridExcelExport-BumQHnAN.js","sources":["../src/hooks/useCommonCodeList.ts","../src/hooks/useConfirm.tsx","../src/hooks/useCurrentLanguage.ts","../src/hooks/useCurrentLogoSrc.ts","../../../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","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/string/trimEnd.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/trimEnd.mjs","../src/hooks/useDebounce.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useNavigation.ts","../src/hooks/useOwpTranslation.ts","../src/hooks/usePrevious.ts","../src/hooks/useShortcuts.ts","../src/hooks/useStorage.ts","../src/hooks/useThemeMediaQuery.ts","../src/hooks/useTimeout.ts","../src/hooks/useTreeGridExcelExport.ts"],"sourcesContent":["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","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","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","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","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 { 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 { 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 { 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","import { useEffect, useRef } from 'react';\n\n/**\n * The usePrevious function is a custom hook that returns the previous value of a variable.\n * It takes in a value as a parameter and returns the previous value.\n */\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>();\n\n // Store current value in ref\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\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 { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { isPlainObject } from 'es-toolkit';\nimport { useCallback, useMemo } from 'react';\n\ntype StorageEnv = { [key: string]: any };\n\ntype StoredCurrentUserRaw = {\n USERNAME?: string;\n EMAIL?: string;\n MES_STARTPAGE?: string;\n STARTPAGE?: string;\n USERSEQ?: any;\n};\n\ntype StoredCurrentUser = {\n role: string[];\n data: {\n displayName?: string;\n email?: string;\n MES_STARTPAGE?: string;\n STARTPAGE?: string;\n USERSEQ?: any;\n photoURL: string;\n };\n};\n\nconst PRESERVED_STORAGE_KEYS = [\n STORAGE_KEYS.currentLanguage,\n STORAGE_KEYS.currentShortcuts,\n STORAGE_KEYS.currentUserId,\n STORAGE_KEYS.currentLogoSrc,\n STORAGE_KEYS.owpEnv,\n] as const;\n\n/**\n * 브라우저 스토리지 조회\n */\nconst getLocalStorage = () => {\n if (typeof window === 'undefined') {\n return null;\n }\n\n return window.localStorage;\n};\n\n/**\n * 스토리지 문자열 안전 파싱\n * @param raw 스토리지 원본 문자열\n * @param fallback 파싱 실패 시 기본값\n */\nconst safeParseJson = <T>(raw: string | null, fallback: T): T => {\n if (!raw) {\n return fallback;\n }\n\n try {\n return JSON.parse(raw) as T;\n } catch {\n return fallback;\n }\n};\n\n/**\n * 스토리지 유틸 훅\n */\nexport const useStorage = () => {\n const resetStorage = useCallback(() => {\n const storage = getLocalStorage();\n\n if (!storage) {\n return;\n }\n\n const preservedEntries = PRESERVED_STORAGE_KEYS.map((key) => [key, storage.getItem(key)] as const);\n\n storage.clear();\n\n preservedEntries.forEach(([key, value]) => {\n if (value === null) {\n return;\n }\n\n storage.setItem(key, value);\n });\n }, []);\n\n const getCurrentUser = useCallback((): StoredCurrentUser | null => {\n const storage = getLocalStorage();\n const userData = safeParseJson<StoredCurrentUserRaw | null>(\n storage?.getItem(STORAGE_KEYS.currentUser) ?? null,\n null,\n );\n\n if (!isPlainObject(userData)) {\n return null;\n }\n\n return {\n role: ['admin'],\n data: {\n displayName: userData.USERNAME,\n email: userData.EMAIL,\n MES_STARTPAGE: userData.MES_STARTPAGE,\n STARTPAGE: userData.STARTPAGE,\n USERSEQ: userData.USERSEQ,\n photoURL: '',\n },\n };\n }, []);\n\n const setEnv = useCallback((env: StorageEnv) => {\n const storage = getLocalStorage();\n\n if (!storage) {\n return;\n }\n\n storage.setItem(STORAGE_KEYS.owpEnv, JSON.stringify(env ?? {}));\n }, []);\n\n const getEnv = useCallback((): StorageEnv => {\n const storage = getLocalStorage();\n const envData = safeParseJson<StorageEnv | null>(storage?.getItem(STORAGE_KEYS.owpEnv) ?? null, {});\n\n return isPlainObject(envData) ? envData : {};\n }, []);\n\n return useMemo(\n () => ({\n resetStorage,\n getCurrentUser,\n setEnv,\n getEnv,\n }),\n [getCurrentUser, getEnv, resetStorage, setEnv],\n );\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":["commonCodeAtom","atomWithStorage","STORAGE_KEYS","useGetCommonCodeList","__name","useAtomValue","useSetCommonCodeList","useSetAtom","CONFIRM_TRANSLATIONS","mergeOkButtonProps","defaultColor","okButtonProps","useConfirm","dialogs","useDialogs","t","i18n","useTranslation","translateConfirmText","primaryKey","fallbackKey","defaultValue","confirmBase","props","ConfirmDialog","title","okText","severity","cancelText","payload","open","onClose","cancelButtonProps","useInfo","jsxs","Dialog","jsx","DialogContent","Typography","DialogActions","Button","currentLanguageAtom","useGetLanguageList","useGetCurrentLanguage","useSetCurrentLanguage","currentLogoSrcAtom","useGetCurrentLogoSrc","useSetCurrentLogoSrc","debounce","func","debounceMs","signal","edges","pendingThis","pendingArgs","leading","trailing","invoke","onTimerEnd","cancel","timeoutId","schedule","cancelTimer","flush","debounced","args","isFirstCall","options","maxWait","result","pendingAt","_debounced","debounce$1","trimEnd","str","chars","endIndex","guard","trimEnd$1","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","useCallback","checkDeps","deps","isPrimitive","val","useDeepCompareMemoize","value","ref","React","signalRef","deepEqual","useDeepCompareEffect","dependencies","useDeepCompareEffectNoCheck","navigationAtom","useGetNavigationList","useSetNavigationList","getDefaultValueFromKey","key","lastSeparatorIndex","useOwpTranslation","i18nT","restProps","optionsObject","isPlainObject","isOptionsObject","hasDefaultValue","nextOptions","usePrevious","currentShortcutsAtom","useGetShortcuts","useSetShortcuts","PRESERVED_STORAGE_KEYS","getLocalStorage","safeParseJson","raw","fallback","useStorage","resetStorage","storage","preservedEntries","getCurrentUser","userData","setEnv","env","getEnv","envData","useMemo","useThemeMediaQuery","themeCallbackFunc","theme","useTheme","query","getMatches","q","matches","setMatches","useState","mediaQuery","handler","event","useTimeout","timer","useTreeGridExcelExport","gridId","exportPendingRef","isExporting","setIsExporting","grid","getTreeGridById","exportTreeGridExcel"],"mappings":";;;;;;;;;;;AAKA,MAAMA,IAAiBC,EAKrBC,EAAa,gBAAgB,MAAS,GAK3BC,KAAuB,gBAAAC,EAAA,MAC3BC,EAAaL,CAAc,GADA,yBAOvBM,KAAuB,gBAAAF,EAAA,MAC3BG,EAAWP,CAAc,GADE,yBCa9BQ,IAAuB;AAAA,EAC3B,WAAW;AAAA,IACT,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,cAAc;AAAA,EAAA;AAAA,EAEhB,QAAQ;AAAA,IACN,YAAY;AAA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