@owp/core 2.3.1 → 2.4.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 (59) 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 +2 -2
  6. package/dist/_virtual/index16.js +5 -2
  7. package/dist/_virtual/index16.js.map +1 -1
  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/OwpLayout/OwpLayout.js +39 -39
  14. package/dist/components/OwpLayout/OwpLayout.js.map +1 -1
  15. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +169 -148
  16. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  17. package/dist/components/OwpTreeGrid/internal/OwpTreeGridLoadingOverlay.js +1 -1
  18. package/dist/components/OwpTreeGrid/internal/OwpTreeGridLoadingOverlay.js.map +1 -1
  19. package/dist/components/OwpTreeGrid/internal/OwpTreeGridNoDataOverlay.js +1 -1
  20. package/dist/components/OwpTreeGrid/internal/OwpTreeGridNoDataOverlay.js.map +1 -1
  21. package/dist/components/OwpTreeGrid/{hooks → internal/hooks}/useOwpTreeGridOverlayFrame.js +1 -1
  22. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridOverlayFrame.js.map +1 -0
  23. package/dist/components/OwpTreeGrid/internal/treeGridColumnEditRules.js +84 -0
  24. package/dist/components/OwpTreeGrid/internal/treeGridColumnEditRules.js.map +1 -0
  25. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +114 -103
  26. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  27. package/dist/components/OwpTreeGrid/internal/utils/perf.js.map +1 -0
  28. package/dist/layout/Layout.js +24 -24
  29. package/dist/layout/Layout.js.map +1 -1
  30. package/dist/layout/themeLayouts.js.map +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  37. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  38. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  39. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  40. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  41. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  42. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
  43. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  44. 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
  45. package/dist/owp-app.css +1 -1
  46. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +7 -1
  47. package/dist/types/components/OwpTreeGrid/index.d.ts +1 -1
  48. package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridLoadingOverlay.d.ts +1 -1
  49. package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridNoDataOverlay.d.ts +1 -1
  50. package/dist/types/components/OwpTreeGrid/internal/treeGridColumnEditRules.d.ts +60 -0
  51. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +7 -2
  52. package/dist/types/layout/Layout.d.ts +2 -0
  53. package/dist/types/layout/themeLayouts.d.ts +2 -0
  54. package/package.json +2 -2
  55. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js.map +0 -1
  56. package/dist/components/OwpTreeGrid/utils/perf.js.map +0 -1
  57. /package/dist/components/OwpTreeGrid/{utils → internal/utils}/perf.js +0 -0
  58. /package/dist/types/components/OwpTreeGrid/{hooks → internal/hooks}/useOwpTreeGridOverlayFrame.d.ts +0 -0
  59. /package/dist/types/components/OwpTreeGrid/{utils → internal/utils}/perf.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var a = {};
2
2
  export {
3
- r as __exports
3
+ a as __exports
4
4
  };
5
5
  //# sourceMappingURL=index10.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var a = {};
2
2
  export {
3
- r as __exports
3
+ a as __exports
4
4
  };
5
5
  //# sourceMappingURL=index11.js.map
@@ -1,5 +1,5 @@
1
- var a = {};
1
+ var e = {};
2
2
  export {
3
- a as __exports
3
+ e as __exports
4
4
  };
5
5
  //# sourceMappingURL=index13.js.map
@@ -1,5 +1,5 @@
1
- var a = {};
1
+ var r = {};
2
2
  export {
3
- a as __exports
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index14.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index15.js.map
@@ -1,5 +1,8 @@
1
- var e = {};
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as o } from "../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
2
5
  export {
3
- e as __exports
6
+ s as default
4
7
  };
5
8
  //# sourceMappingURL=index16.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index16.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index16.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var p = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ p as __module
4
4
  };
5
5
  //# sourceMappingURL=index17.js.map
@@ -1,8 +1,5 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as o } from "../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js";
3
- var p = /* @__PURE__ */ o();
4
- const s = /* @__PURE__ */ r(p);
1
+ var r = {};
5
2
  export {
6
- s as default
3
+ r as __exports
7
4
  };
8
5
  //# sourceMappingURL=index5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,5 @@
1
- var p = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- p as __module
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index6.js.map
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index7.js.map
@@ -1,47 +1,47 @@
1
- var w = Object.defineProperty;
2
- var g = (s, o) => w(s, "name", { value: o, configurable: !0 });
3
- import { jsx as L } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
- import { themeLayouts as R } from "../../layout/themeLayouts.js";
5
- import { useOwpAppContext as z } from "../../contexts/OwpAppProvider.js";
6
- import { generateSettings as O } from "../../configs/defaultConfig.js";
7
- import { useOwpTranslation as C } from "../../hooks/useOwpTranslation.js";
8
- import { useSetSettings as P, useGetCurrentSettings as x, useGetDefaultSettings as j } from "../../hooks/useOwpSettings.js";
9
- import { useRef as B, useMemo as f, useEffect as S } from "react";
10
- import { useLocation as E, matchRoutes as F } from "react-router-dom";
11
- import { isEqual as G } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
12
- import { merge as M } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.js";
13
- import { OwpLoading as T } from "../OwpLoading/OwpLoading.js";
14
- function Y(s) {
15
- var y;
16
- const { routesConfig: o } = z(), { i18n: r } = C(), { layouts: m = R, children: u } = s, a = P(), t = x(), n = j(), l = (y = t == null ? void 0 : t.layout) == null ? void 0 : y.style, e = E(), { pathname: d } = e, h = B(!1), p = f(
17
- () => b(o, d, "settings", !0),
18
- [d, o]
19
- ), c = f(() => p === void 0 ? n : O(n, p), [n, p]), i = f(
20
- () => t === c || G(c, t),
21
- [c, t]
22
- );
23
- return S(() => {
24
- i || a(c);
25
- }, [c, i, a]), S(() => {
1
+ var O = Object.defineProperty;
2
+ var g = (a, e) => O(a, "name", { value: e, configurable: !0 });
3
+ import { jsx as z } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
+ import { themeLayouts as P } from "../../layout/themeLayouts.js";
5
+ import { useOwpAppContext as v } from "../../contexts/OwpAppProvider.js";
6
+ import { generateSettings as x } from "../../configs/defaultConfig.js";
7
+ import { useOwpTranslation as j } from "../../hooks/useOwpTranslation.js";
8
+ import { useSetSettings as B, useGetCurrentSettings as E, useGetDefaultSettings as F } from "../../hooks/useOwpSettings.js";
9
+ import { useRef as G, useMemo as l, useEffect as h } from "react";
10
+ import { useLocation as M, matchRoutes as T } from "react-router-dom";
11
+ import { isEqual as b } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
12
+ import { merge as k } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.js";
13
+ import { OwpLoading as q } from "../OwpLoading/OwpLoading.js";
14
+ function $(a) {
15
+ var L, w;
16
+ const { routesConfig: e } = v(), { i18n: n } = j(), { layouts: f = P, children: c } = a, m = B(), r = E(), i = F(), d = M(), { pathname: t } = d, y = G(!1), p = l(
17
+ () => A(e, t, "settings", !0),
18
+ [t, e]
19
+ ), s = l(() => p === void 0 ? i : x(i, p), [i, p]), o = l(
20
+ () => r === s || b(s, r),
21
+ [s, r]
22
+ ), u = o ? r : s, S = (L = u == null ? void 0 : u.layout) == null ? void 0 : L.style, I = (w = u == null ? void 0 : u.layout) == null ? void 0 : w.config;
23
+ return h(() => {
24
+ o || m(s);
25
+ }, [s, o, m]), h(() => {
26
26
  window.scrollTo(0, 0);
27
- }, [d]), S(() => {
28
- i && r.isInitialized && (h.current = !0);
29
- }, [r.isInitialized, i]), f(() => !r.isInitialized || !i && !h.current ? /* @__PURE__ */ L(T, {}) : Object.entries(m).map(([I, v]) => I === l ? /* @__PURE__ */ L(v, { children: u }, I) : null), [u, r.isInitialized, i, l, m]);
27
+ }, [t]), h(() => {
28
+ o && n.isInitialized && (y.current = !0);
29
+ }, [n.isInitialized, o]), l(() => !n.isInitialized || !o && !y.current ? /* @__PURE__ */ z(q, {}) : Object.entries(f).map(([R, C]) => R === S ? /* @__PURE__ */ z(C, { layoutConfig: I, children: c }, R) : null), [c, n.isInitialized, o, I, S, f]);
30
30
  }
31
- g(Y, "OwpLayout");
32
- function b(s, o, r, m = !0) {
33
- const u = F(s, o);
34
- if (!u)
31
+ g($, "OwpLayout");
32
+ function A(a, e, n, f = !0) {
33
+ const c = T(a, e);
34
+ if (!c)
35
35
  return;
36
- let a = !1;
37
- const t = u.reduce((n, l) => {
38
- const e = l.route[r];
39
- return e === void 0 ? n : (a = !0, !m || e === null ? e : M(n ?? {}, e));
36
+ let m = !1;
37
+ const r = c.reduce((i, d) => {
38
+ const t = d.route[n];
39
+ return t === void 0 ? i : (m = !0, !f || t === null ? t : k(i ?? {}, t));
40
40
  }, void 0);
41
- return a ? t : void 0;
41
+ return m ? r : void 0;
42
42
  }
43
- g(b, "getRouteParamUtil");
43
+ g(A, "getRouteParamUtil");
44
44
  export {
45
- Y as OwpLayout
45
+ $ as OwpLayout
46
46
  };
47
47
  //# sourceMappingURL=OwpLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OwpLayout.js","sources":["../../../src/components/OwpLayout/OwpLayout.tsx"],"sourcesContent":["import { themeLayouts, themeLayoutsType } from '@/layout/themeLayouts';\nimport { useOwpAppContext } from '@/contexts/OwpAppProvider';\nimport { generateSettings } from '@/configs/defaultConfig';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport {\n useGetCurrentSettings,\n useGetDefaultSettings,\n useSetSettings,\n} from '@/hooks/useOwpSettings';\nimport type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';\nimport { OwpRoutesType } from '@/utils/common/OwpUtils';\nimport { isEqual, merge } from 'es-toolkit/compat';\nimport { type ReactNode, useEffect, useMemo, useRef } from 'react';\nimport { matchRoutes, RouteMatch, RouteObject, useLocation } from 'react-router-dom';\nimport { OwpLoading } from '../OwpLoading';\n\nexport type OwpRouteObjectType = RouteObject & {\n settings?: OwpSettingsConfigType;\n auth?: string[] | [] | null | undefined;\n};\n\nexport type OwpRouteMatchType = RouteMatch & {\n route: OwpRouteObjectType;\n};\n\ntype OwpLayoutProps = {\n layouts?: themeLayoutsType;\n children?: ReactNode;\n};\n\n/**\n * OwpLayout\n * React frontend component in a React project that is used for layouting the user interface. The component\n * handles generating user interface settings related to current routes, merged with default settings, and uses\n * the new settings to generate layouts.\n */\nfunction OwpLayout(props: OwpLayoutProps) {\n const { routesConfig } = useOwpAppContext();\n const { i18n } = useOwpTranslation();\n\n const { layouts = themeLayouts, children } = props;\n const setSettings = useSetSettings();\n const settings = useGetCurrentSettings();\n const defaultSettings = useGetDefaultSettings();\n\n const layoutStyle = settings?.layout?.style;\n const location = useLocation();\n const { pathname } = location;\n const hasCompletedInitialLayoutSyncRef = useRef(false);\n\n const matchedSettings = useMemo(\n () => getRouteParamUtil(routesConfig, pathname, 'settings', true),\n [pathname, routesConfig],\n );\n const currentSettings = useMemo(() => {\n if (matchedSettings === undefined) {\n return defaultSettings;\n }\n\n return generateSettings(defaultSettings, matchedSettings);\n }, [defaultSettings, matchedSettings]);\n const isSettingsSynchronized = useMemo(\n () => settings === currentSettings || isEqual(currentSettings, settings),\n [currentSettings, settings],\n );\n\n useEffect(() => {\n if (isSettingsSynchronized) {\n return;\n }\n\n setSettings(currentSettings);\n }, [currentSettings, isSettingsSynchronized, setSettings]);\n\n useEffect(() => {\n window.scrollTo(0, 0);\n }, [pathname]);\n\n useEffect(() => {\n if (isSettingsSynchronized && i18n.isInitialized) {\n hasCompletedInitialLayoutSyncRef.current = true;\n }\n }, [i18n.isInitialized, isSettingsSynchronized]);\n\n return useMemo(() => {\n const shouldBlockForInitialLoading =\n !i18n.isInitialized ||\n (!isSettingsSynchronized && !hasCompletedInitialLayoutSyncRef.current);\n\n if (shouldBlockForInitialLoading) {\n return <OwpLoading />;\n }\n\n return Object.entries(layouts).map(([key, Layout]) => {\n if (key === layoutStyle) {\n return <Layout key={key}>{children}</Layout>;\n }\n\n return null;\n });\n }, [children, i18n.isInitialized, isSettingsSynchronized, layoutStyle, layouts]);\n}\n\nexport { OwpLayout };\n\n/**\n * Utility function to retrieve and merge or replace a specific route parameter from matched routes.\n *\n * @param pathname The current pathname\n * @param key The key of the parameter to merge or replace (e.g., 'settings', 'auth')\n * @param useMerge Whether to merge the parameter (using es-toolkit merge) or replace it\n * @returns The merged or replaced parameter data of type T\n */\nfunction getRouteParamUtil<T>(\n routes: OwpRoutesType,\n pathname: string,\n key: keyof OwpRouteObjectType,\n useMerge: boolean = true,\n): T | undefined {\n const matchedRoutes = matchRoutes(routes, pathname) as OwpRouteMatchType[] | null;\n\n if (!matchedRoutes) {\n return undefined;\n }\n\n let hasMatchedParam = false;\n\n const resolvedRouteParam = matchedRoutes.reduce<T | undefined>((acc, match) => {\n const routeParam = match.route[key] as T | undefined;\n\n if (routeParam === undefined) {\n return acc;\n }\n\n hasMatchedParam = true;\n\n if (!useMerge) {\n return routeParam;\n }\n\n if (routeParam === null) {\n return routeParam;\n }\n\n return merge(acc ?? {}, routeParam);\n }, undefined);\n\n return hasMatchedParam ? resolvedRouteParam : undefined;\n}\n"],"names":["OwpLayout","props","routesConfig","useOwpAppContext","i18n","useOwpTranslation","layouts","themeLayouts","children","setSettings","useSetSettings","settings","useGetCurrentSettings","defaultSettings","useGetDefaultSettings","layoutStyle","_a","location","useLocation","pathname","hasCompletedInitialLayoutSyncRef","useRef","matchedSettings","useMemo","getRouteParamUtil","currentSettings","generateSettings","isSettingsSynchronized","isEqual","useEffect","OwpLoading","key","Layout","jsx","__name","routes","useMerge","matchedRoutes","matchRoutes","hasMatchedParam","resolvedRouteParam","acc","match","routeParam","merge"],"mappings":";;;;;;;;;;;;;AAoCA,SAASA,EAAUC,GAAuB;;AACxC,QAAM,EAAE,cAAAC,EAAA,IAAiBC,EAAA,GACnB,EAAE,MAAAC,EAAA,IAASC,EAAA,GAEX,EAAE,SAAAC,IAAUC,GAAc,UAAAC,EAAA,IAAaP,GACvCQ,IAAcC,EAAA,GACdC,IAAWC,EAAA,GACXC,IAAkBC,EAAA,GAElBC,KAAcC,IAAAL,KAAA,gBAAAA,EAAU,WAAV,gBAAAK,EAAkB,OAChCC,IAAWC,EAAA,GACX,EAAE,UAAAC,MAAaF,GACfG,IAAmCC,EAAO,EAAK,GAE/CC,IAAkBC;AAAA,IACtB,MAAMC,EAAkBtB,GAAciB,GAAU,YAAY,EAAI;AAAA,IAChE,CAACA,GAAUjB,CAAY;AAAA,EAAA,GAEnBuB,IAAkBF,EAAQ,MAC1BD,MAAoB,SACfT,IAGFa,EAAiBb,GAAiBS,CAAe,GACvD,CAACT,GAAiBS,CAAe,CAAC,GAC/BK,IAAyBJ;AAAA,IAC7B,MAAMZ,MAAac,KAAmBG,EAAQH,GAAiBd,CAAQ;AAAA,IACvE,CAACc,GAAiBd,CAAQ;AAAA,EAAA;AAG5B,SAAAkB,EAAU,MAAM;AACd,IAAIF,KAIJlB,EAAYgB,CAAe;AAAA,EAC7B,GAAG,CAACA,GAAiBE,GAAwBlB,CAAW,CAAC,GAEzDoB,EAAU,MAAM;AACd,WAAO,SAAS,GAAG,CAAC;AAAA,EACtB,GAAG,CAACV,CAAQ,CAAC,GAEbU,EAAU,MAAM;AACd,IAAIF,KAA0BvB,EAAK,kBACjCgB,EAAiC,UAAU;AAAA,EAE/C,GAAG,CAAChB,EAAK,eAAeuB,CAAsB,CAAC,GAExCJ,EAAQ,MAEX,CAACnB,EAAK,iBACL,CAACuB,KAA0B,CAACP,EAAiC,4BAGtDU,GAAA,EAAW,IAGd,OAAO,QAAQxB,CAAO,EAAE,IAAI,CAAC,CAACyB,GAAKC,CAAM,MAC1CD,MAAQhB,IACH,gBAAAkB,EAACD,GAAA,EAAkB,UAAAxB,EAAA,GAANuB,CAAe,IAG9B,IACR,GACA,CAACvB,GAAUJ,EAAK,eAAeuB,GAAwBZ,GAAaT,CAAO,CAAC;AACjF;AAjES4B,EAAAlC,GAAA;AA6ET,SAASwB,EACPW,GACAhB,GACAY,GACAK,IAAoB,IACL;AACf,QAAMC,IAAgBC,EAAYH,GAAQhB,CAAQ;AAElD,MAAI,CAACkB;AACH;AAGF,MAAIE,IAAkB;AAEtB,QAAMC,IAAqBH,EAAc,OAAsB,CAACI,GAAKC,MAAU;AAC7E,UAAMC,IAAaD,EAAM,MAAMX,CAAG;AAElC,WAAIY,MAAe,SACVF,KAGTF,IAAkB,IAEd,CAACH,KAIDO,MAAe,OACVA,IAGFC,EAAMH,KAAO,CAAA,GAAIE,CAAU;AAAA,EACpC,GAAG,MAAS;AAEZ,SAAOJ,IAAkBC,IAAqB;AAChD;AAnCSN,EAAAV,GAAA;"}
1
+ {"version":3,"file":"OwpLayout.js","sources":["../../../src/components/OwpLayout/OwpLayout.tsx"],"sourcesContent":["import { themeLayouts, themeLayoutsType } from '@/layout/themeLayouts';\nimport { useOwpAppContext } from '@/contexts/OwpAppProvider';\nimport { generateSettings } from '@/configs/defaultConfig';\nimport { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport {\n useGetCurrentSettings,\n useGetDefaultSettings,\n useSetSettings,\n} from '@/hooks/useOwpSettings';\nimport type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';\nimport { OwpRoutesType } from '@/utils/common/OwpUtils';\nimport { isEqual, merge } from 'es-toolkit/compat';\nimport { type ReactNode, useEffect, useMemo, useRef } from 'react';\nimport { matchRoutes, RouteMatch, RouteObject, useLocation } from 'react-router-dom';\nimport { OwpLoading } from '../OwpLoading';\n\nexport type OwpRouteObjectType = RouteObject & {\n settings?: OwpSettingsConfigType;\n auth?: string[] | [] | null | undefined;\n};\n\nexport type OwpRouteMatchType = RouteMatch & {\n route: OwpRouteObjectType;\n};\n\ntype OwpLayoutProps = {\n layouts?: themeLayoutsType;\n children?: ReactNode;\n};\n\n/**\n * OwpLayout\n * React frontend component in a React project that is used for layouting the user interface. The component\n * handles generating user interface settings related to current routes, merged with default settings, and uses\n * the new settings to generate layouts.\n */\nfunction OwpLayout(props: OwpLayoutProps) {\n const { routesConfig } = useOwpAppContext();\n const { i18n } = useOwpTranslation();\n\n const { layouts = themeLayouts, children } = props;\n const setSettings = useSetSettings();\n const settings = useGetCurrentSettings();\n const defaultSettings = useGetDefaultSettings();\n const location = useLocation();\n const { pathname } = location;\n const hasCompletedInitialLayoutSyncRef = useRef(false);\n\n const matchedSettings = useMemo(\n () => getRouteParamUtil(routesConfig, pathname, 'settings', true),\n [pathname, routesConfig],\n );\n const currentSettings = useMemo(() => {\n if (matchedSettings === undefined) {\n return defaultSettings;\n }\n\n return generateSettings(defaultSettings, matchedSettings);\n }, [defaultSettings, matchedSettings]);\n const isSettingsSynchronized = useMemo(\n () => settings === currentSettings || isEqual(currentSettings, settings),\n [currentSettings, settings],\n );\n const resolvedSettings = isSettingsSynchronized ? settings : currentSettings;\n const layoutStyle = resolvedSettings?.layout?.style;\n const layoutConfig = resolvedSettings?.layout?.config as LayoutConfigDefaultsType | undefined;\n\n useEffect(() => {\n if (isSettingsSynchronized) {\n return;\n }\n\n setSettings(currentSettings);\n }, [currentSettings, isSettingsSynchronized, setSettings]);\n\n useEffect(() => {\n window.scrollTo(0, 0);\n }, [pathname]);\n\n useEffect(() => {\n if (isSettingsSynchronized && i18n.isInitialized) {\n hasCompletedInitialLayoutSyncRef.current = true;\n }\n }, [i18n.isInitialized, isSettingsSynchronized]);\n\n return useMemo(() => {\n const shouldBlockForInitialLoading =\n !i18n.isInitialized ||\n (!isSettingsSynchronized && !hasCompletedInitialLayoutSyncRef.current);\n\n if (shouldBlockForInitialLoading) {\n return <OwpLoading />;\n }\n\n return Object.entries(layouts).map(([key, Layout]) => {\n if (key === layoutStyle) {\n return (\n <Layout key={key} layoutConfig={layoutConfig}>\n {children}\n </Layout>\n );\n }\n\n return null;\n });\n }, [children, i18n.isInitialized, isSettingsSynchronized, layoutConfig, layoutStyle, layouts]);\n}\n\nexport { OwpLayout };\n\n/**\n * Utility function to retrieve and merge or replace a specific route parameter from matched routes.\n *\n * @param pathname The current pathname\n * @param key The key of the parameter to merge or replace (e.g., 'settings', 'auth')\n * @param useMerge Whether to merge the parameter (using es-toolkit merge) or replace it\n * @returns The merged or replaced parameter data of type T\n */\nfunction getRouteParamUtil<T>(\n routes: OwpRoutesType,\n pathname: string,\n key: keyof OwpRouteObjectType,\n useMerge: boolean = true,\n): T | undefined {\n const matchedRoutes = matchRoutes(routes, pathname) as OwpRouteMatchType[] | null;\n\n if (!matchedRoutes) {\n return undefined;\n }\n\n let hasMatchedParam = false;\n\n const resolvedRouteParam = matchedRoutes.reduce<T | undefined>((acc, match) => {\n const routeParam = match.route[key] as T | undefined;\n\n if (routeParam === undefined) {\n return acc;\n }\n\n hasMatchedParam = true;\n\n if (!useMerge) {\n return routeParam;\n }\n\n if (routeParam === null) {\n return routeParam;\n }\n\n return merge(acc ?? {}, routeParam);\n }, undefined);\n\n return hasMatchedParam ? resolvedRouteParam : undefined;\n}\n"],"names":["OwpLayout","props","routesConfig","useOwpAppContext","i18n","useOwpTranslation","layouts","themeLayouts","children","setSettings","useSetSettings","settings","useGetCurrentSettings","defaultSettings","useGetDefaultSettings","location","useLocation","pathname","hasCompletedInitialLayoutSyncRef","useRef","matchedSettings","useMemo","getRouteParamUtil","currentSettings","generateSettings","isSettingsSynchronized","isEqual","resolvedSettings","layoutStyle","_a","layoutConfig","_b","useEffect","OwpLoading","key","Layout","jsx","__name","routes","useMerge","matchedRoutes","matchRoutes","hasMatchedParam","resolvedRouteParam","acc","match","routeParam","merge"],"mappings":";;;;;;;;;;;;;AAqCA,SAASA,EAAUC,GAAuB;;AACxC,QAAM,EAAE,cAAAC,EAAA,IAAiBC,EAAA,GACnB,EAAE,MAAAC,EAAA,IAASC,EAAA,GAEX,EAAE,SAAAC,IAAUC,GAAc,UAAAC,EAAA,IAAaP,GACvCQ,IAAcC,EAAA,GACdC,IAAWC,EAAA,GACXC,IAAkBC,EAAA,GAClBC,IAAWC,EAAA,GACX,EAAE,UAAAC,MAAaF,GACfG,IAAmCC,EAAO,EAAK,GAE/CC,IAAkBC;AAAA,IACtB,MAAMC,EAAkBpB,GAAce,GAAU,YAAY,EAAI;AAAA,IAChE,CAACA,GAAUf,CAAY;AAAA,EAAA,GAEnBqB,IAAkBF,EAAQ,MAC1BD,MAAoB,SACfP,IAGFW,EAAiBX,GAAiBO,CAAe,GACvD,CAACP,GAAiBO,CAAe,CAAC,GAC/BK,IAAyBJ;AAAA,IAC7B,MAAMV,MAAaY,KAAmBG,EAAQH,GAAiBZ,CAAQ;AAAA,IACvE,CAACY,GAAiBZ,CAAQ;AAAA,EAAA,GAEtBgB,IAAmBF,IAAyBd,IAAWY,GACvDK,KAAcC,IAAAF,KAAA,gBAAAA,EAAkB,WAAlB,gBAAAE,EAA0B,OACxCC,KAAeC,IAAAJ,KAAA,gBAAAA,EAAkB,WAAlB,gBAAAI,EAA0B;AAE/C,SAAAC,EAAU,MAAM;AACd,IAAIP,KAIJhB,EAAYc,CAAe;AAAA,EAC7B,GAAG,CAACA,GAAiBE,GAAwBhB,CAAW,CAAC,GAEzDuB,EAAU,MAAM;AACd,WAAO,SAAS,GAAG,CAAC;AAAA,EACtB,GAAG,CAACf,CAAQ,CAAC,GAEbe,EAAU,MAAM;AACd,IAAIP,KAA0BrB,EAAK,kBACjCc,EAAiC,UAAU;AAAA,EAE/C,GAAG,CAACd,EAAK,eAAeqB,CAAsB,CAAC,GAExCJ,EAAQ,MAEX,CAACjB,EAAK,iBACL,CAACqB,KAA0B,CAACP,EAAiC,4BAGtDe,GAAA,EAAW,IAGd,OAAO,QAAQ3B,CAAO,EAAE,IAAI,CAAC,CAAC4B,GAAKC,CAAM,MAC1CD,MAAQN,IAER,gBAAAQ,EAACD,GAAA,EAAiB,cAAAL,GACf,UAAAtB,EAAA,GADU0B,CAEb,IAIG,IACR,GACA,CAAC1B,GAAUJ,EAAK,eAAeqB,GAAwBK,GAAcF,GAAatB,CAAO,CAAC;AAC/F;AAtES+B,EAAArC,GAAA;AAkFT,SAASsB,EACPgB,GACArB,GACAiB,GACAK,IAAoB,IACL;AACf,QAAMC,IAAgBC,EAAYH,GAAQrB,CAAQ;AAElD,MAAI,CAACuB;AACH;AAGF,MAAIE,IAAkB;AAEtB,QAAMC,IAAqBH,EAAc,OAAsB,CAACI,GAAKC,MAAU;AAC7E,UAAMC,IAAaD,EAAM,MAAMX,CAAG;AAElC,WAAIY,MAAe,SACVF,KAGTF,IAAkB,IAEd,CAACH,KAIDO,MAAe,OACVA,IAGFC,EAAMH,KAAO,CAAA,GAAIE,CAAU;AAAA,EACpC,GAAG,MAAS;AAEZ,SAAOJ,IAAkBC,IAAqB;AAChD;AAnCSN,EAAAf,GAAA;"}
@@ -1,200 +1,221 @@
1
- var Ae = Object.defineProperty;
2
- var a = (r, u) => Ae(r, "name", { value: u, configurable: !0 });
3
- import { jsxs as Ne, jsx as H } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
- import { useOwpTranslation as Pe } from "../../hooks/useOwpTranslation.js";
5
- import { useGetCurrentLanguage as Ve } from "../../hooks/useCurrentLanguage.js";
6
- import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as pe } from "../../utils/treeGridBodyRowsEvent.js";
7
- import { getTreeGridPerfTimestamp as C, countTreeGridPerf as me, logTreeGridPerf as ye, measureTreeGridPerf as Re } from "./utils/perf.js";
8
- import { useRef as e, useState as S, useEffect as I, useLayoutEffect as xe } from "react";
9
- import { useOwpTreeGridOverlayFrame as He } from "./hooks/useOwpTreeGridOverlayFrame.js";
10
- import { bindTreeGridEvents as Ce, getTreeGridBodyDataCount as M, buildTreeGridInitializationOptions as Se, hasTreeGridDisplayDataRows as ve, replaceTreeGridBodyData as Me, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as qe } from "./internal/treeGridRuntime.js";
11
- import { applyTreeGridLayoutToGrid as je } from "./internal/treeGridLayout.js";
12
- import { OwpTreeGridLoadingOverlay as Fe } from "./internal/OwpTreeGridLoadingOverlay.js";
13
- import { OwpTreeGridNoDataOverlay as We } from "./internal/OwpTreeGridNoDataOverlay.js";
14
- import { isEmpty as E } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
15
- import { delay as ze } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
16
- import { isEqual as Ye } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
17
- import { omit as he } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
18
- const cr = /* @__PURE__ */ a(({
1
+ var he = Object.defineProperty;
2
+ var a = (r, u) => he(r, "name", { value: u, configurable: !0 });
3
+ import { jsxs as qe, jsx as q } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
+ import { useOwpTranslation as je } from "../../hooks/useOwpTranslation.js";
5
+ import { useGetCurrentLanguage as Fe } from "../../hooks/useCurrentLanguage.js";
6
+ import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as ge } from "../../utils/treeGridBodyRowsEvent.js";
7
+ import { getTreeGridPerfTimestamp as j, countTreeGridPerf as be, logTreeGridPerf as Ee, measureTreeGridPerf as Be } from "./internal/utils/perf.js";
8
+ import { useRef as e, useState as F, useEffect as L, useLayoutEffect as We } from "react";
9
+ import { useOwpTreeGridOverlayFrame as ze } from "./internal/hooks/useOwpTreeGridOverlayFrame.js";
10
+ import { bindTreeGridEvents as Ye, getTreeGridBodyDataCount as W, buildTreeGridInitializationOptions as ke, hasTreeGridDisplayDataRows as Ie, replaceTreeGridBodyData as Je, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as Ke } from "./internal/treeGridRuntime.js";
11
+ import { applyTreeGridLayoutToGrid as Qe } from "./internal/treeGridLayout.js";
12
+ import { OwpTreeGridLoadingOverlay as Xe } from "./internal/OwpTreeGridLoadingOverlay.js";
13
+ import { OwpTreeGridNoDataOverlay as Ze } from "./internal/OwpTreeGridNoDataOverlay.js";
14
+ import { resolveTreeGridColumnEditRuleLookup as Le, createTreeGridColumnEditRulesState as $e, syncTreeGridColumnEditRules as Ue } from "./internal/treeGridColumnEditRules.js";
15
+ import { isEmpty as w } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
16
+ import { delay as er } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
17
+ import { isEqual as we } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
18
+ import { omit as rr } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
19
+ const Dr = /* @__PURE__ */ a(({
19
20
  id: r = "treeGridWrapper",
20
21
  containerStyle: u,
21
- containerClassName: Te,
22
- className: Ge,
23
- style: De,
24
- height: q = "100%",
25
- width: j = "100%",
26
- layoutUrl: be,
27
- dataUrl: ge,
28
- layoutOverrides: w,
22
+ containerClassName: Oe,
23
+ className: Ce,
24
+ style: Ae,
25
+ height: z = "100%",
26
+ width: Y = "100%",
27
+ layoutUrl: _e,
28
+ dataUrl: He,
29
+ layoutOverrides: O,
29
30
  data: n,
30
- useDataUrl: F,
31
- onSelect: W,
32
- onRowClick: z,
33
- onRowAdd: Y,
34
- onRowDelete: h,
35
- onRowUndelete: J,
36
- onRowChange: K,
37
- onClickButton: Q,
38
- onSave: X,
39
- onReady: Z,
40
- onAfterValueChanged: $,
41
- highlightEditableCells: U = !0,
42
- highlightChangedCells: k = !0,
43
- loading: Be,
31
+ useDataUrl: k,
32
+ onSelect: J,
33
+ onRowClick: K,
34
+ onRowAdd: Q,
35
+ onRowDelete: X,
36
+ onRowUndelete: Z,
37
+ onRowChange: $,
38
+ onClickButton: U,
39
+ onSave: ee,
40
+ onReady: re,
41
+ onAfterValueChanged: te,
42
+ columnEditRules: f,
43
+ highlightEditableCells: ne = !0,
44
+ highlightChangedCells: oe = !0,
45
+ loading: xe,
44
46
  showLoading: o = !0
45
47
  }) => {
46
- const { t: Ie } = Pe(), i = e(null), ee = e(null), re = e(null), L = e(null), O = e(w), te = e(n), ne = e({
47
- onSelect: W,
48
- onRowClick: z,
49
- onRowAdd: Y,
50
- onRowDelete: h,
51
- onRowUndelete: J,
52
- onRowChange: K,
53
- onClickButton: Q,
54
- onSave: X,
55
- onReady: Z,
56
- onAfterValueChanged: $
57
- }), l = e(void 0), _ = e(!1), G = e(void 0), D = e(void 0), Ee = e(!1), f = e(0), c = e(null), p = e(void 0), m = e(void 0), oe = e(U), ie = e(k), [A, we] = S(!1), [Le, y] = S(!1), [Oe, se] = S(!1), b = Ve(), ue = e(b.id), _e = o && n !== void 0 && A && D.current !== n, N = o && Be === !0 || o && (Le || _e), P = !N && n !== void 0 && E(n) && !Oe, ae = /* @__PURE__ */ a((t) => {
58
- se(ve(t));
48
+ const { t: C } = je(), i = e(null), ie = e(null), se = e(null), A = e(null), _ = e(O), ue = e(n), H = e(
49
+ f
50
+ ), x = e(
51
+ Le(f, {
52
+ hourMinuteInvalidText: C("Message.시간은 HH:mm 형식으로 입력해주세요.")
53
+ })
54
+ ), ae = e({
55
+ onSelect: J,
56
+ onRowClick: K,
57
+ onRowAdd: Q,
58
+ onRowDelete: X,
59
+ onRowUndelete: Z,
60
+ onRowChange: $,
61
+ onClickButton: U,
62
+ onSave: ee,
63
+ onReady: re,
64
+ onAfterValueChanged: te
65
+ }), p = e(void 0), N = e(!1), D = e(void 0), g = e(void 0), b = e(
66
+ void 0
67
+ ), ce = e($e()), Ne = e(!1), m = e(0), c = e(null), R = e(void 0), y = e(void 0), de = e(ne), le = e(oe), [P, Pe] = F(!1), [Me, v] = F(!1), [Ve, fe] = F(!1), E = Fe(), pe = e(E.id), Se = o && n !== void 0 && P && g.current !== n, M = o && xe === !0 || o && (Me || Se), V = !M && n !== void 0 && w(n) && !Ve, me = /* @__PURE__ */ a((t) => {
68
+ fe(Ie(t));
59
69
  }, "syncHasDisplayDataRows");
60
- O.current = w, te.current = n, oe.current = U, ie.current = k, ne.current = {
61
- onSelect: W,
62
- onRowClick: z,
63
- onRowAdd: Y,
64
- onRowDelete: h,
65
- onRowUndelete: J,
66
- onRowChange: K,
67
- onClickButton: Q,
68
- onSave: X,
69
- onReady: Z,
70
- onAfterValueChanged: $
70
+ _.current = O, ue.current = n, H.current = f, x.current = Le(f, {
71
+ hourMinuteInvalidText: C("Message.시간은 HH:mm 형식으로 입력해주세요.")
72
+ }), de.current = ne, le.current = oe, ae.current = {
73
+ onSelect: J,
74
+ onRowClick: K,
75
+ onRowAdd: Q,
76
+ onRowDelete: X,
77
+ onRowUndelete: Z,
78
+ onRowChange: $,
79
+ onClickButton: U,
80
+ onSave: ee,
81
+ onReady: re,
82
+ onAfterValueChanged: te
71
83
  };
72
- const ce = He({
73
- visible: N || P,
74
- containerRef: ee,
84
+ const Re = ze({
85
+ visible: M || V,
86
+ containerRef: ie,
75
87
  treeGridInstanceRef: i,
76
88
  debugId: r
77
- }), g = /* @__PURE__ */ a(() => {
78
- p.current !== void 0 && (window.clearTimeout(p.current), p.current = void 0);
79
- }, "clearBindingLoadingHideTimeout"), V = /* @__PURE__ */ a(() => {
80
- m.current !== void 0 && (window.clearTimeout(m.current), m.current = void 0);
89
+ }), B = /* @__PURE__ */ a(() => {
90
+ R.current !== void 0 && (window.clearTimeout(R.current), R.current = void 0);
91
+ }, "clearBindingLoadingHideTimeout"), S = /* @__PURE__ */ a(() => {
92
+ y.current !== void 0 && (window.clearTimeout(y.current), y.current = void 0);
81
93
  }, "clearBodyReloadStartTimeout");
82
- I(() => {
94
+ L(() => {
83
95
  const t = /* @__PURE__ */ a((s) => {
84
- var v;
85
- ((v = s.detail) == null ? void 0 : v.gridId) === r && se(ve(i.current));
96
+ var d;
97
+ ((d = s.detail) == null ? void 0 : d.gridId) === r && fe(Ie(i.current));
86
98
  }, "handleBodyRowsChanged");
87
- return window.addEventListener(pe, t), () => {
88
- window.removeEventListener(pe, t);
99
+ return window.addEventListener(ge, t), () => {
100
+ window.removeEventListener(ge, t);
89
101
  };
90
- }, [r]), I(() => {
91
- o || (V(), g(), c.current = null, y(!1));
92
- }, [o]), I(() => {
102
+ }, [r]), L(() => {
103
+ o || (S(), B(), c.current = null, v(!1));
104
+ }, [o]), L(() => {
93
105
  var t;
94
- if (b.id !== ue.current && !E(i.current) && ((t = i.current) == null || t.Dispose(), i.current = null, ue.current = b.id), !!E(i.current))
95
- return Ce({
106
+ if (E.id !== pe.current && !w(i.current) && ((t = i.current) == null || t.Dispose(), i.current = null, pe.current = E.id), !!w(i.current))
107
+ return Ye({
96
108
  id: r,
97
- latestEventHandlersRef: ne,
98
- highlightEditableCellsRef: oe,
99
- highlightChangedCellsRef: ie,
109
+ latestEventHandlersRef: ae,
110
+ highlightEditableCellsRef: de,
111
+ highlightChangedCellsRef: le,
100
112
  treeGridInstanceRef: i,
101
- treeGridInitStartedAtRef: re,
102
- latestLayoutOverridesRef: O,
103
- appliedLayoutOverridesRef: G,
104
- appliedBodyDataPropRef: D,
105
- hasAppliedInitialLayoutRef: Ee,
106
- syncHasDisplayDataRows: ae,
107
- setIsTreeGridReady: we
108
- }), re.current = C(), me(r, "init"), ye(r, "TreeGrid init start", {
109
- useDataUrl: !!F,
110
- bodyRowCount: M(n)
113
+ treeGridInitStartedAtRef: se,
114
+ latestLayoutOverridesRef: _,
115
+ appliedLayoutOverridesRef: D,
116
+ appliedBodyDataPropRef: g,
117
+ latestColumnEditRulesRef: H,
118
+ latestColumnEditRuleLookupRef: x,
119
+ appliedColumnEditRulesRef: b,
120
+ columnEditRulesStateRef: ce,
121
+ hasAppliedInitialLayoutRef: Ne,
122
+ syncHasDisplayDataRows: me,
123
+ setIsTreeGridReady: Pe
124
+ }), se.current = j(), be(r, "init"), Ee(r, "TreeGrid init start", {
125
+ useDataUrl: !!k,
126
+ bodyRowCount: W(n)
111
127
  }), window.TreeGrid(
112
- Se({
128
+ ke({
113
129
  id: r,
114
- layoutUrl: be,
115
- dataUrl: ge,
130
+ layoutUrl: _e,
131
+ dataUrl: He,
116
132
  bodyData: n,
117
- useDataUrl: F,
118
- width: j,
119
- height: q,
120
- languageId: b.id
133
+ useDataUrl: k,
134
+ width: Y,
135
+ height: z,
136
+ languageId: E.id
121
137
  }),
122
138
  r,
123
139
  r
124
140
  ), () => {
125
- ze(() => {
141
+ er(() => {
126
142
  var s;
127
143
  (s = i.current) == null || s.Dispose();
128
144
  }, 200);
129
145
  };
130
- }, []), xe(() => {
131
- const t = i.current, s = O.current, R = te.current;
132
- if (E(t) || !A)
146
+ }, []), We(() => {
147
+ const t = i.current, s = _.current, T = ue.current, d = H.current;
148
+ if (w(t) || !P)
133
149
  return;
134
- const v = G.current !== s && !Ye(G.current, s), B = D.current !== R && (!_.current || l.current !== R);
135
- if (!(!v && !B)) {
136
- if (v) {
137
- const d = C();
138
- je(t, s, B), G.current = s, Re(r, "apply layout", d, {
139
- disableBodyReload: !!B
150
+ const ye = D.current !== s && !we(D.current, s), I = g.current !== T && (!N.current || p.current !== T), ve = b.current !== d && !we(b.current, d);
151
+ if (!(!ye && !I && !ve)) {
152
+ if (ye) {
153
+ const l = j();
154
+ Qe(t, s, I), D.current = s, Be(r, "apply layout", l, {
155
+ disableBodyReload: !!I
140
156
  });
141
157
  }
142
- if (B) {
143
- const d = f.current + 1, de = /* @__PURE__ */ a(() => {
144
- const T = l.current;
145
- m.current = void 0, L.current = C(), me(r, "reload"), ye(r, "ReloadBody start", {
146
- bodyRowCount: M(T)
147
- }), Me(t, T, () => {
148
- if (f.current !== d)
158
+ if (I) {
159
+ const l = m.current + 1, Te = /* @__PURE__ */ a(() => {
160
+ const G = p.current;
161
+ y.current = void 0, A.current = j(), be(r, "reload"), Ee(r, "ReloadBody start", {
162
+ bodyRowCount: W(G)
163
+ }), Je(t, G, () => {
164
+ if (m.current !== l)
149
165
  return;
150
- D.current = T, ae(t), Re(r, "ReloadBody end", L.current, {
151
- bodyRowCount: M(T)
152
- }), L.current = null, l.current === T && (l.current = void 0, _.current = !1);
153
- const le = c.current;
154
- if (!o || le === null) {
155
- c.current = null, y(!1);
166
+ g.current = G, me(t), Be(r, "ReloadBody end", A.current, {
167
+ bodyRowCount: W(G)
168
+ }), A.current = null, p.current === G && (p.current = void 0, N.current = !1);
169
+ const Ge = c.current;
170
+ if (!o || Ge === null) {
171
+ c.current = null, v(!1);
156
172
  return;
157
173
  }
158
- const fe = Math.max(
174
+ const De = Math.max(
159
175
  0,
160
- qe - (Date.now() - le)
176
+ Ke - (Date.now() - Ge)
161
177
  );
162
- if (g(), fe === 0) {
163
- c.current = null, y(!1);
178
+ if (B(), De === 0) {
179
+ c.current = null, v(!1);
164
180
  return;
165
181
  }
166
- p.current = window.setTimeout(() => {
167
- f.current === d && (p.current = void 0, c.current = null, y(!1));
168
- }, fe);
182
+ R.current = window.setTimeout(() => {
183
+ m.current === l && (R.current = void 0, c.current = null, v(!1));
184
+ }, De);
169
185
  });
170
186
  }, "runBodyReload");
171
- f.current = d, l.current = R, _.current = !0, o && R !== void 0 ? (V(), g(), c.current = Date.now(), y(!0), m.current = window.setTimeout(() => {
172
- f.current === d && de();
173
- }, 0)) : de();
187
+ m.current = l, p.current = T, N.current = !0, o && T !== void 0 ? (S(), B(), c.current = Date.now(), v(!0), y.current = window.setTimeout(() => {
188
+ m.current === l && Te();
189
+ }, 0)) : Te();
174
190
  }
191
+ ve && (Ue(
192
+ t,
193
+ x.current,
194
+ ce.current
195
+ ), b.current = d);
175
196
  }
176
- }, [A, w, n, o, r]), I(() => () => {
177
- V(), g();
197
+ }, [P, O, n, f, o, r]), L(() => () => {
198
+ S(), B();
178
199
  }, []);
179
- const x = {
180
- height: q,
181
- width: j,
200
+ const h = {
201
+ height: z,
202
+ width: Y,
182
203
  ...u
183
204
  };
184
- return (o || P) && (x.position = u != null && u.position && u.position !== "static" ? u.position : "relative", x.isolation = "isolate"), /* @__PURE__ */ Ne("div", { ref: ee, className: Te, style: x, children: [
185
- /* @__PURE__ */ H("div", { id: r, className: Ge, style: he(De, ["height", "width"]) }),
186
- /* @__PURE__ */ H(
187
- We,
205
+ return (o || V) && (h.position = u != null && u.position && u.position !== "static" ? u.position : "relative", h.isolation = "isolate"), /* @__PURE__ */ qe("div", { ref: ie, className: Oe, style: h, children: [
206
+ /* @__PURE__ */ q("div", { id: r, className: Ce, style: rr(Ae, ["height", "width"]) }),
207
+ /* @__PURE__ */ q(
208
+ Ze,
188
209
  {
189
- visible: P,
190
- message: Ie("Message.조회된 결과가 없습니다."),
191
- overlayFrame: ce
210
+ visible: V,
211
+ message: C("Message.조회된 결과가 없습니다."),
212
+ overlayFrame: Re
192
213
  }
193
214
  ),
194
- /* @__PURE__ */ H(Fe, { visible: N, overlayFrame: ce })
215
+ /* @__PURE__ */ q(Xe, { visible: M, overlayFrame: Re })
195
216
  ] });
196
217
  }, "OwpTreeGrid");
197
218
  export {
198
- cr as OwpTreeGrid
219
+ Dr as OwpTreeGrid
199
220
  };
200
221
  //# sourceMappingURL=OwpTreeGrid.js.map