@owp/core 2.1.7 → 2.2.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 (54) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index11.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index15.js +5 -2
  6. package/dist/_virtual/index15.js.map +1 -1
  7. package/dist/_virtual/index16.js +2 -2
  8. package/dist/_virtual/index17.js +2 -2
  9. package/dist/_virtual/index5.js +2 -5
  10. package/dist/_virtual/index5.js.map +1 -1
  11. package/dist/_virtual/index6.js +2 -2
  12. package/dist/_virtual/index7.js +2 -2
  13. package/dist/components/OwpTable/OwpTable.js +21 -21
  14. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  15. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +187 -127
  16. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  17. package/dist/components/OwpTreeGrid/OwpTreeGridLoadingOverlay.js +28 -0
  18. package/dist/components/OwpTreeGrid/OwpTreeGridLoadingOverlay.js.map +1 -0
  19. package/dist/components/OwpTreeGrid/OwpTreeGridNoDataOverlay.js +44 -0
  20. package/dist/components/OwpTreeGrid/OwpTreeGridNoDataOverlay.js.map +1 -0
  21. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js +84 -0
  22. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js.map +1 -0
  23. package/dist/components/OwpTreeGrid/{utils.js → utils/index.js} +2 -2
  24. package/dist/components/OwpTreeGrid/utils/index.js.map +1 -0
  25. package/dist/contexts/OwpAppProvider.js.map +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  37. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  38. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  39. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  40. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
  41. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  42. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  43. package/dist/owp-app.css +1 -1
  44. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +3 -7
  45. package/dist/types/components/OwpTreeGrid/OwpTreeGridLoadingOverlay.d.ts +10 -0
  46. package/dist/types/components/OwpTreeGrid/OwpTreeGridNoDataOverlay.d.ts +14 -0
  47. package/dist/types/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.d.ts +22 -0
  48. package/dist/types/components/OwpTreeGrid/{utils.d.ts → utils/index.d.ts} +1 -1
  49. package/dist/types/contexts/OwpAppProvider.d.ts +1 -0
  50. package/dist/utils/rebuildValue.js +41 -39
  51. package/dist/utils/rebuildValue.js.map +1 -1
  52. package/dist/utils/treeGridUtil.js +1 -1
  53. package/package.json +1 -3
  54. package/dist/components/OwpTreeGrid/utils.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ import { type RefObject } from 'react';
2
+ export type OwpTreeGridOverlayFrame = {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ };
8
+ type UseOwpTreeGridOverlayFrameInput = {
9
+ visible: boolean;
10
+ containerRef: RefObject<HTMLDivElement | null>;
11
+ treeGridInstanceRef: RefObject<TGrid>;
12
+ };
13
+ export declare const TREE_GRID_NO_DATA_OVERLAY_Z_INDEX = 2147483646;
14
+ export declare const TREE_GRID_LOADING_OVERLAY_Z_INDEX = 2147483647;
15
+ /**
16
+ * TreeGrid overlay frame hook
17
+ * @param visible overlay visibility
18
+ * @param containerRef TreeGrid container ref
19
+ * @param treeGridInstanceRef TreeGrid instance ref
20
+ */
21
+ declare const useOwpTreeGridOverlayFrame: ({ visible, containerRef, treeGridInstanceRef, }: UseOwpTreeGridOverlayFrameInput) => OwpTreeGridOverlayFrame;
22
+ export { useOwpTreeGridOverlayFrame };
@@ -1,4 +1,4 @@
1
- import { type OwpTreeGridLayoutConfig } from './OwpTreeGrid';
1
+ import { type OwpTreeGridLayoutConfig } from '../OwpTreeGrid';
2
2
  type TreeGridHeaderLayoutConfig = NonNullable<OwpTreeGridLayoutConfig['Header']>;
3
3
  type TreeGridSectionConfig = Record<string, unknown>;
4
4
  export declare const TREE_GRID_HEADER_SECTION = "Header";
@@ -61,6 +61,7 @@ export interface OwpAppEnv {
61
61
  isI18nEnabled?: boolean;
62
62
  isI18nLanguageSwitcherEnabled?: boolean;
63
63
  isPasswordChangeEnabled?: boolean;
64
+ isRequestLogPayloadEnabled?: boolean;
64
65
  [key: string]: unknown;
65
66
  }
66
67
  export interface OwpAppContextValue extends OwpAppConfigs {
@@ -1,13 +1,14 @@
1
- var s = Object.defineProperty;
2
- var i = (r, t) => s(r, "name", { value: t, configurable: !0 });
1
+ var S = Object.defineProperty;
2
+ var i = (r, t) => S(r, "name", { value: t, configurable: !0 });
3
3
  import { STORAGE_KEYS as f } from "../constants/storageKeys.js";
4
- import { isArray as u } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
5
- import { toString as c } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/toString.js";
6
- import { mapValues as S } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/mapValues.js";
7
- import { mapKeys as L } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/mapKeys.js";
4
+ import { getEnv as L } from "../hooks/useStorage.js";
5
+ import { isArray as c } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
6
+ import { toString as a } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/toString.js";
7
+ import { mapValues as y } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/mapValues.js";
8
+ import { mapKeys as E } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/mapKeys.js";
8
9
  import { isNull as w } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNull.js";
9
10
  import { toUpper as U } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/toUpper.js";
10
- const l = /* @__PURE__ */ i((r, t) => {
11
+ const g = /* @__PURE__ */ i((r, t) => {
11
12
  if (!r)
12
13
  return t;
13
14
  try {
@@ -15,66 +16,67 @@ const l = /* @__PURE__ */ i((r, t) => {
15
16
  } catch {
16
17
  return t;
17
18
  }
18
- }, "parseStorageValue"), E = /* @__PURE__ */ i(() => {
19
+ }, "parseStorageValue"), b = /* @__PURE__ */ i(() => {
19
20
  if (typeof window > "u")
20
21
  return {
21
22
  navigationList: [],
22
23
  currentUser: {}
23
24
  };
24
- const r = l(
25
+ const r = g(
25
26
  window.localStorage.getItem(f.navigationList),
26
27
  []
27
- ), t = l(
28
+ ), t = g(
28
29
  window.localStorage.getItem(f.currentUser),
29
30
  {}
30
31
  );
31
32
  return {
32
- navigationList: u(r) ? r : [],
33
- currentUser: typeof t == "object" && t !== null && !u(t) ? t : {}
33
+ navigationList: c(r) ? r : [],
34
+ currentUser: typeof t == "object" && t !== null && !c(t) ? t : {}
34
35
  };
35
- }, "getLogStorageValues"), m = /* @__PURE__ */ i((r, t) => {
36
- var n;
37
- for (const e of r) {
38
- if (e.id === t)
39
- return e;
40
- if ((n = e.children) != null && n.length) {
41
- const o = m(e.children, t);
42
- if (o)
43
- return o;
36
+ }, "getLogStorageValues"), s = /* @__PURE__ */ i((r, t) => {
37
+ var e;
38
+ for (const o of r) {
39
+ if (o.id === t)
40
+ return o;
41
+ if ((e = o.children) != null && e.length) {
42
+ const n = s(o.children, t);
43
+ if (n)
44
+ return n;
44
45
  }
45
46
  }
46
47
  }, "findNavigationItem"), R = /* @__PURE__ */ i(() => {
47
- var o;
48
+ var n;
48
49
  if (typeof window > "u")
49
50
  return;
50
- const r = ((o = window.location.pathname.split("/")) == null ? void 0 : o[2]) ?? "", { navigationList: t, currentUser: n } = E(), e = r ? m(t, r) : void 0;
51
+ const r = ((n = window.location.pathname.split("/")) == null ? void 0 : n[2]) ?? "", { navigationList: t, currentUser: e } = b(), o = r ? s(t, r) : void 0;
51
52
  return {
52
53
  LOG_PAGEID: r,
53
- LOG_WUSERSEQ: c(n.USERSEQ ?? 1),
54
- LOG_REMARK: (e == null ? void 0 : e.title) ?? ""
54
+ LOG_WUSERSEQ: a(e.USERSEQ ?? 1),
55
+ LOG_REMARK: (o == null ? void 0 : o.title) ?? ""
55
56
  };
56
- }, "buildLogPayload"), g = /* @__PURE__ */ i((r, t, n) => {
57
- if (u(r))
58
- return r.map((e) => typeof e == "object" && e !== null ? g(e, t, n) : c(e));
57
+ }, "buildLogPayload"), h = /* @__PURE__ */ i((r) => typeof (r == null ? void 0 : r.includeLogPayload) == "boolean" ? r.includeLogPayload : L().isRequestLogPayloadEnabled === !0, "shouldIncludeLogPayload"), m = /* @__PURE__ */ i((r, t, e) => {
58
+ const o = h(e);
59
+ if (c(r))
60
+ return r.map((n) => typeof n == "object" && n !== null ? m(n, t, { ...e, includeLogPayload: o }) : a(n));
59
61
  if (typeof r == "object" && r !== null) {
60
- const e = S(
62
+ const n = y(
61
63
  r,
62
- (d) => g(d, t, n)
63
- ), o = n != null && n.includeLogPayload ? R() : void 0;
64
+ (l) => m(l, t, { ...e, includeLogPayload: o })
65
+ ), d = o ? R() : void 0;
64
66
  return t ? {
65
- ...o,
66
- ...L(
67
- e,
68
- (d, a) => !(n != null && n.forceRebuildAll) && U(String(a)) === "STATUS" ? String(a) : `${t}.${String(a)}`
67
+ ...d,
68
+ ...E(
69
+ n,
70
+ (l, u) => !(e != null && e.forceRebuildAll) && U(String(u)) === "STATUS" ? String(u) : `${t}.${String(u)}`
69
71
  )
70
72
  } : {
71
- ...o,
72
- ...e
73
+ ...d,
74
+ ...n
73
75
  };
74
76
  }
75
- return n != null && n.forceRebuildNull ? w(r) ? r : c(r) : c(r);
77
+ return e != null && e.forceRebuildNull ? w(r) ? r : a(r) : a(r);
76
78
  }, "rebuildValue");
77
79
  export {
78
- g as rebuildValue
80
+ m as rebuildValue
79
81
  };
80
82
  //# sourceMappingURL=rebuildValue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rebuildValue.js","sources":["../../src/utils/rebuildValue.ts"],"sourcesContent":["import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport {\n isArray,\n isNull,\n mapKeys,\n mapValues,\n toString,\n toUpper,\n} from 'es-toolkit/compat';\n\nexport interface RebuildValueOptions {\n forceRebuildAll?: boolean;\n forceRebuildNull?: boolean;\n includeLogPayload?: boolean;\n}\n\ntype NavigationItem = {\n id?: string;\n title?: string;\n children?: NavigationItem[];\n};\n\n/**\n * 스토리지 JSON 값 파싱\n * @param raw 스토리지 원본 값\n * @param fallback 파싱 실패 기본값\n */\nconst parseStorageValue = <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 */\nconst getLogStorageValues = () => {\n if (typeof window === 'undefined') {\n return {\n navigationList: [] as NavigationItem[],\n currentUser: {} as Record<string, unknown>,\n };\n }\n\n const navigationList = parseStorageValue<unknown[]>(\n window.localStorage.getItem(STORAGE_KEYS.navigationList),\n [],\n );\n const currentUser = parseStorageValue<Record<string, unknown>>(\n window.localStorage.getItem(STORAGE_KEYS.currentUser),\n {},\n );\n\n return {\n navigationList: isArray(navigationList) ? (navigationList as NavigationItem[]) : [],\n currentUser:\n typeof currentUser === 'object' && currentUser !== null && !isArray(currentUser) ? currentUser : {},\n };\n};\n\n/**\n * 내비게이션 항목 조회\n * @param navigationList 내비게이션 목록\n * @param pageId 페이지 ID\n */\nconst findNavigationItem = (\n navigationList: NavigationItem[],\n pageId: string,\n): NavigationItem | undefined => {\n for (const navigationItem of navigationList) {\n if (navigationItem.id === pageId) {\n return navigationItem;\n }\n\n if (navigationItem.children?.length) {\n const matchedItem = findNavigationItem(navigationItem.children, pageId);\n\n if (matchedItem) {\n return matchedItem;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * 로그 페이로드 생성\n */\nconst buildLogPayload = () => {\n if (typeof window === 'undefined') {\n return undefined;\n }\n\n const pageId = window.location.pathname.split('/')?.[2] ?? '';\n const { navigationList, currentUser } = getLogStorageValues();\n const currentNavigation = pageId ? findNavigationItem(navigationList, pageId) : undefined;\n\n return {\n LOG_PAGEID: pageId,\n LOG_WUSERSEQ: toString(currentUser.USERSEQ ?? 1),\n LOG_REMARK: currentNavigation?.title ?? '',\n };\n};\n\n/**\n * JSON 직렬화용 값 재구성\n * @param value 원본 값\n * @param keyPrefix 키 접두사\n * @param options 값 재구성 옵션\n */\nexport const rebuildValue = <T>(\n value: T,\n keyPrefix?: string,\n options?: RebuildValueOptions,\n): T => {\n if (isArray(value)) {\n return value.map((item) => {\n if (typeof item === 'object' && item !== null) {\n return rebuildValue(item, keyPrefix, options);\n }\n\n return toString(item);\n }) as T;\n }\n\n if (typeof value === 'object' && value !== null) {\n const transformedValue = mapValues(value as Record<string, unknown>, (itemValue) =>\n rebuildValue(itemValue, keyPrefix, options),\n );\n const logPayload = options?.includeLogPayload ? buildLogPayload() : undefined;\n\n if (keyPrefix) {\n return {\n ...logPayload,\n ...mapKeys(transformedValue, (_, key) =>\n !options?.forceRebuildAll && toUpper(String(key)) === 'STATUS'\n ? String(key)\n : `${keyPrefix}.${String(key)}`,\n ),\n } as T;\n }\n\n return {\n ...logPayload,\n ...transformedValue,\n } as T;\n }\n\n return (options?.forceRebuildNull ? (isNull(value) ? value : toString(value)) : toString(value)) as T;\n};\n"],"names":["parseStorageValue","__name","raw","fallback","getLogStorageValues","navigationList","STORAGE_KEYS","currentUser","isArray","findNavigationItem","pageId","navigationItem","_a","matchedItem","buildLogPayload","currentNavigation","toString","rebuildValue","value","keyPrefix","options","item","transformedValue","mapValues","itemValue","logPayload","mapKeys","_","key","toUpper","isNull"],"mappings":";;;;;;;;;AA2BA,MAAMA,IAAoB,gBAAAC,EAAA,CAAIC,GAAoBC,MAAmB;AACnE,MAAI,CAACD;AACH,WA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AAAA,IAC/C,aAAYQ,KAAA,gBAAAA,EAAmB,UAAS;AAAA,EAAA;AAE5C,GAdwB,oBAsBXE,IAAe,gBAAAhB,EAAA,CAC1BiB,GACAC,GACAC,MACM;AACN,MAAIZ,EAAQU,CAAK;AACf,WAAOA,EAAM,IAAI,CAACG,MACZ,OAAOA,KAAS,YAAYA,MAAS,OAChCJ,EAAaI,GAAMF,GAAWC,CAAO,IAGvCJ,EAASK,CAAI,CACrB;AAGH,MAAI,OAAOH,KAAU,YAAYA,MAAU,MAAM;AAC/C,UAAMI,IAAmBC;AAAA,MAAUL;AAAA,MAAkC,CAACM,MACpEP,EAAaO,GAAWL,GAAWC,CAAO;AAAA,IAAA,GAEtCK,IAAaL,KAAA,QAAAA,EAAS,oBAAoBN,EAAA,IAAoB;AAEpE,WAAIK,IACK;AAAA,MACL,GAAGM;AAAA,MACH,GAAGC;AAAA,QAAQJ;AAAA,QAAkB,CAACK,GAAGC,MAC/B,EAACR,KAAA,QAAAA,EAAS,oBAAmBS,EAAQ,OAAOD,CAAG,CAAC,MAAM,WAClD,OAAOA,CAAG,IACV,GAAGT,CAAS,IAAI,OAAOS,CAAG,CAAC;AAAA,MAAA;AAAA,IACjC,IAIG;AAAA,MACL,GAAGH;AAAA,MACH,GAAGH;AAAA,IAAA;AAAA,EAEP;AAEA,SAAQF,KAAA,QAAAA,EAAS,mBAAoBU,EAAOZ,CAAK,IAAIA,IAAQF,EAASE,CAAK,IAAKF,EAASE,CAAK;AAChG,GAvC4B;"}
1
+ {"version":3,"file":"rebuildValue.js","sources":["../../src/utils/rebuildValue.ts"],"sourcesContent":["import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { getEnv } from '@/hooks/useStorage';\nimport {\n isArray,\n isNull,\n mapKeys,\n mapValues,\n toString,\n toUpper,\n} from 'es-toolkit/compat';\n\nexport interface RebuildValueOptions {\n forceRebuildAll?: boolean;\n forceRebuildNull?: boolean;\n includeLogPayload?: boolean;\n}\n\ntype NavigationItem = {\n id?: string;\n title?: string;\n children?: NavigationItem[];\n};\n\n/**\n * 스토리지 JSON 값 파싱\n * @param raw 스토리지 원본 값\n * @param fallback 파싱 실패 기본값\n */\nconst parseStorageValue = <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 */\nconst getLogStorageValues = () => {\n if (typeof window === 'undefined') {\n return {\n navigationList: [] as NavigationItem[],\n currentUser: {} as Record<string, unknown>,\n };\n }\n\n const navigationList = parseStorageValue<unknown[]>(\n window.localStorage.getItem(STORAGE_KEYS.navigationList),\n [],\n );\n const currentUser = parseStorageValue<Record<string, unknown>>(\n window.localStorage.getItem(STORAGE_KEYS.currentUser),\n {},\n );\n\n return {\n navigationList: isArray(navigationList) ? (navigationList as NavigationItem[]) : [],\n currentUser:\n typeof currentUser === 'object' && currentUser !== null && !isArray(currentUser) ? currentUser : {},\n };\n};\n\n/**\n * 내비게이션 항목 조회\n * @param navigationList 내비게이션 목록\n * @param pageId 페이지 ID\n */\nconst findNavigationItem = (\n navigationList: NavigationItem[],\n pageId: string,\n): NavigationItem | undefined => {\n for (const navigationItem of navigationList) {\n if (navigationItem.id === pageId) {\n return navigationItem;\n }\n\n if (navigationItem.children?.length) {\n const matchedItem = findNavigationItem(navigationItem.children, pageId);\n\n if (matchedItem) {\n return matchedItem;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * 로그 페이로드 생성\n */\nconst buildLogPayload = () => {\n if (typeof window === 'undefined') {\n return undefined;\n }\n\n const pageId = window.location.pathname.split('/')?.[2] ?? '';\n const { navigationList, currentUser } = getLogStorageValues();\n const currentNavigation = pageId ? findNavigationItem(navigationList, pageId) : undefined;\n\n return {\n LOG_PAGEID: pageId,\n LOG_WUSERSEQ: toString(currentUser.USERSEQ ?? 1),\n LOG_REMARK: currentNavigation?.title ?? '',\n };\n};\n\n/**\n * 로그 페이로드 포함 여부 결정\n * @param options 값 재구성 옵션\n */\nconst shouldIncludeLogPayload = (options?: RebuildValueOptions) => {\n if (typeof options?.includeLogPayload === 'boolean') {\n return options.includeLogPayload;\n }\n\n return getEnv().isRequestLogPayloadEnabled === true;\n};\n\n/**\n * JSON 직렬화용 값 재구성\n * @param value 원본 값\n * @param keyPrefix 키 접두사\n * @param options 값 재구성 옵션\n */\nexport const rebuildValue = <T>(\n value: T,\n keyPrefix?: string,\n options?: RebuildValueOptions,\n): T => {\n const includeLogPayload = shouldIncludeLogPayload(options);\n\n if (isArray(value)) {\n return value.map((item) => {\n if (typeof item === 'object' && item !== null) {\n return rebuildValue(item, keyPrefix, { ...options, includeLogPayload });\n }\n\n return toString(item);\n }) as T;\n }\n\n if (typeof value === 'object' && value !== null) {\n const transformedValue = mapValues(value as Record<string, unknown>, (itemValue) =>\n rebuildValue(itemValue, keyPrefix, { ...options, includeLogPayload }),\n );\n const logPayload = includeLogPayload ? buildLogPayload() : undefined;\n\n if (keyPrefix) {\n return {\n ...logPayload,\n ...mapKeys(transformedValue, (_, key) =>\n !options?.forceRebuildAll && toUpper(String(key)) === 'STATUS'\n ? String(key)\n : `${keyPrefix}.${String(key)}`,\n ),\n } as T;\n }\n\n return {\n ...logPayload,\n ...transformedValue,\n } as T;\n }\n\n return (options?.forceRebuildNull ? (isNull(value) ? value : toString(value)) : toString(value)) as T;\n};\n"],"names":["parseStorageValue","__name","raw","fallback","getLogStorageValues","navigationList","STORAGE_KEYS","currentUser","isArray","findNavigationItem","pageId","navigationItem","_a","matchedItem","buildLogPayload","currentNavigation","toString","shouldIncludeLogPayload","options","getEnv","rebuildValue","value","keyPrefix","includeLogPayload","item","transformedValue","mapValues","itemValue","logPayload","mapKeys","_","key","toUpper","isNull"],"mappings":";;;;;;;;;;AA4BA,MAAMA,IAAoB,gBAAAC,EAAA,CAAIC,GAAoBC,MAAmB;AACnE,MAAI,CAACD;AACH,WAAOC;AAGT,MAAI;AACF,WAAO,KAAK,MAAMD,CAAG;AA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_HIGHLIGHT_COLOR as C } from "../constants/treeGrid.js";
4
4
  import { TREEGRID_INPUT_CELL_COLOR as Te, TREEGRID_WARNING_CELL_COLOR as fe } from "../constants/treeGrid.js";
5
- import { parseTreeGridXmlToJson as T } from "../components/OwpTreeGrid/utils.js";
5
+ import { parseTreeGridXmlToJson as T } from "../components/OwpTreeGrid/utils/index.js";
6
6
  import { isArray as f } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
7
7
  import { lowerCase as h } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/lowerCase.js";
8
8
  import { isPlainObject as B } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isPlainObject.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@owp/core",
3
3
  "private": false,
4
- "version": "2.1.7",
4
+ "version": "2.2.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -22,7 +22,6 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@mui/icons-material": "^7.3.2",
25
- "@popperjs/core": "^2.11.8",
26
25
  "autosuggest-highlight": "^3.3.4",
27
26
  "clsx": "^2.1.1",
28
27
  "date-fns": "^4.1.0",
@@ -42,7 +41,6 @@
42
41
  "react-imask": "^7.6.1",
43
42
  "react-number-format": "^5.4.4",
44
43
  "react-overlays": "^5.2.1",
45
- "react-popper": "^2.3.0",
46
44
  "type-fest": "^4.41.0"
47
45
  },
48
46
  "peerDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/components/OwpTreeGrid/utils.ts"],"sourcesContent":["import { isPlainObject } from 'es-toolkit/compat';\nimport { type OwpTreeGridLayoutConfig } from './OwpTreeGrid';\n\ntype TreeGridHeaderLayoutConfig = NonNullable<OwpTreeGridLayoutConfig['Header']>;\ntype TreeGridSectionConfig = Record<string, unknown>;\ntype TreeGridLayoutNode = TreeGridSectionConfig & { nextSibling?: TreeGridLayoutNode };\n\nexport const TREE_GRID_HEADER_SECTION = 'Header';\nexport const TREE_GRID_TOOLBAR_SECTION = 'Toolbar';\nexport const TREE_GRID_FOOT_SECTION = 'Foot';\nexport const TREE_GRID_NEXT_SIBLING_KEY = 'nextSibling';\nexport const TREE_GRID_LAYOUT_SECTION_KEYS = [\n TREE_GRID_HEADER_SECTION,\n TREE_GRID_TOOLBAR_SECTION,\n TREE_GRID_FOOT_SECTION,\n] as const;\n\nexport const HEADER = TREE_GRID_HEADER_SECTION;\nexport const TOOLBAR = TREE_GRID_TOOLBAR_SECTION;\nexport const FOOTER = TREE_GRID_FOOT_SECTION;\nexport const NEXT_SIBLING = TREE_GRID_NEXT_SIBLING_KEY;\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nlet treeGridXmlParser: DOMParser | undefined;\n\nconst assignTreeGridSectionFields = (\n targetSection: TRow,\n sectionConfig: TreeGridSectionConfig,\n) => {\n const mutableTargetSection = targetSection as unknown as TreeGridSectionConfig;\n\n for (const fieldName in sectionConfig) {\n if (!hasOwnProperty.call(sectionConfig, fieldName) || fieldName === TREE_GRID_NEXT_SIBLING_KEY) {\n continue;\n }\n\n const fieldValue = sectionConfig[fieldName];\n\n if (fieldValue === undefined) {\n continue;\n }\n\n mutableTargetSection[fieldName] = fieldValue;\n }\n};\n\n/**\n * applyTreeGridSubHeaderLayoutText 적용 함수\n * @param grid TreeGrid 인스턴스\n * @param headerLayout headerLayout 값\n */\nexport const applyTreeGridSubHeaderLayoutText = (\n grid: TTGrid,\n headerLayout?: TreeGridHeaderLayoutConfig,\n) => {\n if (!headerLayout || !grid?.Header) {\n return;\n }\n\n let currentHeaderLayout = headerLayout[TREE_GRID_NEXT_SIBLING_KEY] as TreeGridLayoutNode | undefined;\n let currentGridHeader = grid.Header.nextSibling;\n\n while (currentHeaderLayout && currentGridHeader) {\n assignTreeGridSectionFields(currentGridHeader, currentHeaderLayout);\n currentHeaderLayout = currentHeaderLayout.nextSibling;\n currentGridHeader = currentGridHeader.nextSibling;\n }\n};\n\nexport const applySubHeaderLayoutTextToGrid = applyTreeGridSubHeaderLayoutText;\nexport const changeSubHeaderLayoutTextByGrid = applyTreeGridSubHeaderLayoutText;\n\n/**\n * parseTreeGridXmlToJson 파싱 함수\n * @param xmlString XML 문자열\n */\nexport const parseTreeGridXmlToJson = (xmlString?: string) => {\n try {\n if (!xmlString || typeof DOMParser !== 'function') {\n return undefined;\n }\n\n treeGridXmlParser ??= new DOMParser();\n\n const parsedXml = treeGridXmlParser.parseFromString(xmlString, 'text/xml');\n const childElements = parsedXml.documentElement?.children;\n\n if (!childElements?.length) {\n return undefined;\n }\n\n const parsedItems = new Array<TreeGridSectionConfig>(childElements.length);\n\n for (let nodeIndex = 0; nodeIndex < childElements.length; nodeIndex += 1) {\n const attributes = childElements[nodeIndex].attributes;\n const item: TreeGridSectionConfig = {};\n\n for (let attrIndex = 0; attrIndex < attributes.length; attrIndex += 1) {\n const attribute = attributes[attrIndex];\n item[attribute.name] = attribute.value;\n }\n\n parsedItems[nodeIndex] = item;\n }\n\n return parsedItems;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\nexport const convertXmlToJson = parseTreeGridXmlToJson;\n\n/**\n * applyTreeGridLayoutToGrid 적용 함수\n * @param grid TreeGrid 인스턴스\n * @param layoutConfig 레이아웃 설정\n * @param disableBodyReload disableBodyReload 값\n */\nexport const applyTreeGridLayoutToGrid = (\n grid: TTGrid | TGrid,\n layoutConfig?: OwpTreeGridLayoutConfig,\n disableBodyReload?: boolean,\n) => {\n if (!layoutConfig || !grid) {\n return;\n }\n\n // @ts-expect-error - TreeGrid header block metadata is not declared in bundled types\n const hasSubHeaderBlock = (grid?.Header?.Block ?? 0) > 0;\n const headerLayout = layoutConfig.Header;\n const footerRow = grid.Foot?.lastChild;\n\n if (hasSubHeaderBlock && headerLayout && isPlainObject(headerLayout)) {\n applyTreeGridSubHeaderLayoutText(grid, headerLayout);\n }\n\n for (const sectionKey of TREE_GRID_LAYOUT_SECTION_KEYS) {\n const sectionLayout = layoutConfig[sectionKey] as TreeGridSectionConfig | undefined;\n\n if (!sectionLayout || !isPlainObject(sectionLayout)) {\n continue;\n }\n\n if (sectionKey === TREE_GRID_FOOT_SECTION && footerRow) {\n assignTreeGridSectionFields(footerRow, sectionLayout);\n continue;\n }\n\n const sectionTarget = grid[sectionKey];\n\n if (!sectionTarget) {\n continue;\n }\n\n assignTreeGridSectionFields(sectionTarget, sectionLayout);\n }\n\n if (!disableBodyReload) {\n grid.ReloadBody();\n }\n};\n\nexport const updateLayoutByGrid = applyTreeGridLayoutToGrid;\nexport const applyTreeGridLayoutByGrid = applyTreeGridLayoutToGrid;\n"],"names":["TREE_GRID_HEADER_SECTION","TREE_GRID_TOOLBAR_SECTION","TREE_GRID_FOOT_SECTION","TREE_GRID_NEXT_SIBLING_KEY","TREE_GRID_LAYOUT_SECTION_KEYS","hasOwnProperty","treeGridXmlParser","assignTreeGridSectionFields","__name","targetSection","sectionConfig","mutableTargetSection","fieldName","fieldValue","applyTreeGridSubHeaderLayoutText","grid","headerLayout","currentHeaderLayout","currentGridHeader","parseTreeGridXmlToJson","xmlString","childElements","_a","parsedItems","nodeIndex","attributes","item","attrIndex","attribute","error","applyTreeGridLayoutToGrid","layoutConfig","disableBodyReload","hasSubHeaderBlock","footerRow","_b","isPlainObject","sectionKey","sectionLayout","sectionTarget"],"mappings":";;;AAOO,MAAMA,IAA2B,UAC3BC,IAA4B,WAC5BC,IAAyB,QACzBC,IAA6B,eAC7BC,IAAgC;AAAA,EAC3CJ;AAAA,EACAC;AAAA,EACAC;AACF,GAOMG,IAAiB,OAAO,UAAU;AACxC,IAAIC;AAEJ,MAAMC,IAA8B,gBAAAC,EAAA,CAClCC,GACAC,MACG;AACH,QAAMC,IAAuBF;AAE7B,aAAWG,KAAaF,GAAe;AACrC,QAAI,CAACL,EAAe,KAAKK,GAAeE,CAAS,KAAKA,MAAc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