@owp/core 2.2.2 → 2.2.3

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 (58) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.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 -5
  8. package/dist/_virtual/index16.js.map +1 -1
  9. package/dist/_virtual/index17.js +2 -2
  10. package/dist/components/OwpMrtTable/OwpMrtTable.js +223 -196
  11. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
  12. package/dist/components/OwpMrtTable/OwpMrtTableNoDataOverlay.js +53 -0
  13. package/dist/components/OwpMrtTable/OwpMrtTableNoDataOverlay.js.map +1 -0
  14. package/dist/components/OwpSection/OwpSection.js +35 -35
  15. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  16. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +291 -192
  17. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  18. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js +48 -46
  19. package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js.map +1 -1
  20. package/dist/components/OwpTreeGrid/perf.js +31 -0
  21. package/dist/components/OwpTreeGrid/perf.js.map +1 -0
  22. package/dist/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.js +34 -0
  23. package/dist/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.js.map +1 -0
  24. package/dist/index.js +25 -23
  25. package/dist/index.js.map +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  36. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  37. package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
  38. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  39. 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
  40. package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +2 -0
  41. package/dist/types/components/OwpMrtTable/OwpMrtTableNoDataOverlay.d.ts +14 -0
  42. package/dist/types/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.d.ts +2 -1
  43. package/dist/types/components/OwpTreeGrid/perf.d.ts +30 -0
  44. package/dist/types/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.d.ts +13 -0
  45. package/dist/types/components/OwpTreeGridResetChangesButton/index.d.ts +1 -0
  46. package/dist/types/index.d.ts +1 -0
  47. package/dist/types/utils/index.d.ts +1 -0
  48. package/dist/types/utils/preloadOnIdle.d.ts +7 -0
  49. package/dist/types/utils/treeGridBodyRowsEvent.d.ts +9 -0
  50. package/dist/utils/preloadOnIdle.js +27 -0
  51. package/dist/utils/preloadOnIdle.js.map +1 -0
  52. package/dist/utils/treeGridBodyRowsEvent.js +14 -0
  53. package/dist/utils/treeGridBodyRowsEvent.js.map +1 -0
  54. package/dist/utils/treeGridUtil.js +79 -72
  55. package/dist/utils/treeGridUtil.js.map +1 -1
  56. package/dist/utils.js +64 -62
  57. package/dist/utils.js.map +1 -1
  58. package/package.json +1 -1
@@ -1,246 +1,345 @@
1
- var ye = Object.defineProperty;
2
- var i = (e, n) => ye(e, "name", { value: n, configurable: !0 });
3
- import { jsxs as Ge, jsx as Y } 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 De } from "../../hooks/useOwpTranslation.js";
5
- import { useGetCurrentLanguage as Re } from "../../hooks/useCurrentLanguage.js";
6
- import { useRef as o, useState as ce, useEffect as Z, useLayoutEffect as we } from "react";
7
- import { useOwpTreeGridOverlayFrame as Ee } from "./hooks/useOwpTreeGridOverlayFrame.js";
8
- import { OwpTreeGridLoadingOverlay as Oe } from "./OwpTreeGridLoadingOverlay.js";
9
- import { OwpTreeGridNoDataOverlay as ge } from "./OwpTreeGridNoDataOverlay.js";
10
- import { applyTreeGridLayoutToGrid as fe } from "./utils/index.js";
11
- import { isEmpty as B } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
12
- import { delay as be } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
13
- import { isEqual as Be } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
14
- import { omit as Ie } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
15
- import { debounce as $ } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
16
- import { get as Se } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
17
- const Le = 300, ae = {
1
+ var _e = Object.defineProperty;
2
+ var i = (e, t) => _e(e, "name", { value: t, configurable: !0 });
3
+ import { jsxs as Ee, 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 { useOwpTranslation as Ne } from "../../hooks/useOwpTranslation.js";
5
+ import { useGetCurrentLanguage as Ve } from "../../hooks/useCurrentLanguage.js";
6
+ import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as ye } from "../../utils/treeGridBodyRowsEvent.js";
7
+ import { getTreeGridPerfTimestamp as H, countTreeGridPerf as Ge, logTreeGridPerf as Re, measureTreeGridPerf as te } from "./perf.js";
8
+ import { useRef as d, useState as ee, useEffect as $, useLayoutEffect as Pe } from "react";
9
+ import { useOwpTreeGridOverlayFrame as he } from "./hooks/useOwpTreeGridOverlayFrame.js";
10
+ import { OwpTreeGridLoadingOverlay as ke } from "./OwpTreeGridLoadingOverlay.js";
11
+ import { OwpTreeGridNoDataOverlay as Fe } from "./OwpTreeGridNoDataOverlay.js";
12
+ import { applyTreeGridLayoutToGrid as Be } from "./utils/index.js";
13
+ import { isEmpty as V } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
14
+ import { delay as Ue } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
15
+ import { isEqual as $e } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
16
+ import { omit as Me } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
17
+ import { debounce as M } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
18
+ import { get as je } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
19
+ const qe = 300, we = {
18
20
  en: "/assets/vendors/Grid/TextEN.xml",
19
21
  kr: "/assets/vendors/Grid/TextKR.xml"
20
- }, de = /* @__PURE__ */ i((e) => `${e}?noCache=${Date.now()}`, "appendNoCacheQuery"), xe = /* @__PURE__ */ i((e) => e === "kr" ? ae.kr : ae.en, "getTreeGridTextResourceUrl"), Ce = /* @__PURE__ */ i((e) => e != null && e.includes("assets") ? de(e) : (
22
+ }, Oe = /* @__PURE__ */ i((e) => `${e}?noCache=${Date.now()}`, "appendNoCacheQuery"), Ke = /* @__PURE__ */ i((e) => e === "kr" ? we.kr : we.en, "getTreeGridTextResourceUrl"), We = /* @__PURE__ */ i((e) => e != null && e.includes("assets") ? Oe(e) : (
21
23
  // @ts-expect-error - API base URL env is provided by host app
22
24
  `undefined/${e}?noCache=${Date.now()}`
23
- ), "resolveTreeGridDataUrl"), _e = /* @__PURE__ */ i((e, n, s) => e ? { Url: Ce(n) } : { Data: { Body: [B(s) ? [] : s] } }, "buildTreeGridDataSource"), Ne = /* @__PURE__ */ i(({
25
+ ), "resolveTreeGridDataUrl"), ze = /* @__PURE__ */ i((e, t, a) => e ? { Url: We(t) } : { Data: { Body: [V(a) ? [] : a] } }, "buildTreeGridDataSource"), Qe = /* @__PURE__ */ i(({
24
26
  id: e,
25
- layoutUrl: n,
26
- dataUrl: s,
27
- bodyData: f,
28
- useDataUrl: d,
29
- width: p,
30
- height: y,
31
- languageId: G
27
+ layoutUrl: t,
28
+ dataUrl: a,
29
+ bodyData: G,
30
+ useDataUrl: R,
31
+ width: D,
32
+ height: v,
33
+ languageId: b
32
34
  }) => ({
33
35
  id: e,
34
- Layout: { Url: de(n ?? "") },
35
- Data: _e(d, s, f),
36
+ Layout: { Url: Oe(t ?? "") },
37
+ Data: ze(R, a, G),
36
38
  Text: {
37
- Url: xe(G)
39
+ Url: Ke(b)
38
40
  },
39
- width: p,
40
- height: y,
41
+ width: D,
42
+ height: v,
41
43
  Debug: "Error"
42
- }), "buildTreeGridInitializationOptions"), Ve = /* @__PURE__ */ i((e) => Se(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), Pe = /* @__PURE__ */ i((e, n, s) => {
43
- var d;
44
- const f = (d = e.Data) == null ? void 0 : d.Data;
44
+ }), "buildTreeGridInitializationOptions"), De = /* @__PURE__ */ i((e) => je(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), j = /* @__PURE__ */ i((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), Xe = /* @__PURE__ */ i((e) => {
45
+ const t = e == null ? void 0 : e.Visible;
46
+ return !!e && t !== 0 && t !== !1 && t !== "0";
47
+ }, "isVisibleTreeGridRow"), Ye = /* @__PURE__ */ i((e) => {
48
+ const t = e == null ? void 0 : e.Added;
49
+ return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
50
+ }, "isAddedTreeGridRow"), ve = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !Xe(e) ? !1 : e.Kind === "Data" || Ye(e), "isDisplayTreeGridRow"), be = /* @__PURE__ */ i((e) => {
51
+ if (!e)
52
+ return !1;
53
+ if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
54
+ let t = e.GetFirst();
55
+ for (; t; ) {
56
+ if (ve(t))
57
+ return !0;
58
+ t = e.GetNext(t);
59
+ }
60
+ return !1;
61
+ }
62
+ return Object.values(e.Rows ?? {}).some((t) => ve(t));
63
+ }, "hasTreeGridDisplayDataRows"), Je = /* @__PURE__ */ i((e, t, a) => {
64
+ var R;
65
+ const G = (R = e.Data) == null ? void 0 : R.Data;
45
66
  e.Data.Data = {
46
- ...f,
47
- Data: { Body: [n || []] },
67
+ ...G,
68
+ Data: { Body: [t || []] },
48
69
  Url: ""
49
- }, e.ReloadBody(s);
50
- }, "replaceTreeGridBodyData"), $e = /* @__PURE__ */ i(({
70
+ }, e.ReloadBody(a);
71
+ }, "replaceTreeGridBodyData"), Ze = /* @__PURE__ */ i(({
51
72
  id: e,
52
- onSelect: n,
53
- onRowClick: s,
54
- onRowAdd: f,
55
- onRowDelete: d,
56
- onRowUndelete: p,
57
- onRowChange: y,
58
- onClickButton: G,
59
- onSave: I,
60
- onReady: m,
61
- onAfterValueChanged: a,
62
- treeGridInstanceRef: A,
63
- latestLayoutOverridesRef: M,
64
- appliedLayoutOverridesRef: k,
65
- appliedBodyDataPropRef: q,
66
- hasAppliedInitialLayoutRef: S,
67
- setIsTreeGridReady: H
73
+ latestEventHandlersRef: t,
74
+ treeGridInstanceRef: a,
75
+ treeGridInitStartedAtRef: G,
76
+ latestLayoutOverridesRef: R,
77
+ appliedLayoutOverridesRef: D,
78
+ appliedBodyDataPropRef: v,
79
+ hasAppliedInitialLayoutRef: b,
80
+ syncHasDisplayDataRows: w,
81
+ setIsTreeGridReady: S
68
82
  }) => {
69
- const L = a ?? y;
70
- window.TGSetEvent("OnRowAdd", e, (t, r) => {
71
- r.CanEdit = 1, r.CanDelete = 1, f == null || f(t, r);
72
- }), typeof s == "function" && window.TGSetEvent(
83
+ const r = t.current;
84
+ window.TGSetEvent("OnRowAdd", e, (o, c) => {
85
+ var n, u;
86
+ c.CanEdit = 1, c.CanDelete = 1, (u = (n = t.current) == null ? void 0 : n.onRowAdd) == null || u.call(n, o, c);
87
+ }), window.TGSetEvent("OnRowAdded", e, (o) => {
88
+ w(o);
89
+ }), typeof (r == null ? void 0 : r.onRowClick) == "function" && window.TGSetEvent(
73
90
  "OnClick",
74
91
  e,
75
- $((t, r, u, v, h, c) => {
76
- s(t, r, u, v, h, c);
92
+ M((o, c, n, u, s, l) => {
93
+ var p, C;
94
+ (C = (p = t.current) == null ? void 0 : p.onRowClick) == null || C.call(
95
+ p,
96
+ o,
97
+ c,
98
+ n,
99
+ u,
100
+ s,
101
+ l
102
+ );
77
103
  }, 300)
78
- ), typeof G == "function" && window.TGSetEvent(
104
+ ), typeof (r == null ? void 0 : r.onClickButton) == "function" && window.TGSetEvent(
79
105
  "OnClickButton",
80
106
  e,
81
- $((t, r, u, v) => {
82
- G(t, r, u, v);
107
+ M((o, c, n, u) => {
108
+ var s, l;
109
+ (l = (s = t.current) == null ? void 0 : s.onClickButton) == null || l.call(
110
+ s,
111
+ o,
112
+ c,
113
+ n,
114
+ u
115
+ );
83
116
  }, 300)
84
- ), typeof d == "function" && window.TGSetEvent("OnRowDelete", e, (t, r, u) => {
85
- d(t, r, u);
86
- }), typeof p == "function" && window.TGSetEvent("OnRowUndelete", e, (t, r) => {
87
- p(t, r);
88
- }), typeof L == "function" && window.TGSetEvent("OnAfterValueChanged", e, (t, r, u, v) => {
89
- L(t, r, u, v);
90
- }), typeof n == "function" && window.TGSetEvent(
117
+ ), typeof (r == null ? void 0 : r.onRowDelete) == "function" ? window.TGSetEvent("OnRowDelete", e, (o, c, n) => {
118
+ var u, s;
119
+ w(o), (s = (u = t.current) == null ? void 0 : u.onRowDelete) == null || s.call(
120
+ u,
121
+ o,
122
+ c,
123
+ n
124
+ );
125
+ }) : window.TGSetEvent("OnRowDelete", e, (o) => {
126
+ w(o);
127
+ }), typeof (r == null ? void 0 : r.onRowUndelete) == "function" ? window.TGSetEvent("OnRowUndelete", e, (o, c) => {
128
+ var n, u;
129
+ w(o), (u = (n = t.current) == null ? void 0 : n.onRowUndelete) == null || u.call(n, o, c);
130
+ }) : window.TGSetEvent("OnRowUndelete", e, (o) => {
131
+ w(o);
132
+ }), (typeof (r == null ? void 0 : r.onAfterValueChanged) == "function" || typeof (r == null ? void 0 : r.onRowChange) == "function") && window.TGSetEvent("OnAfterValueChanged", e, (o, c, n, u) => {
133
+ var l, p;
134
+ const s = ((l = t.current) == null ? void 0 : l.onAfterValueChanged) ?? ((p = t.current) == null ? void 0 : p.onRowChange);
135
+ s == null || s(o, c, n, u);
136
+ }), typeof (r == null ? void 0 : r.onSelect) == "function" && window.TGSetEvent(
91
137
  "OnSelect",
92
138
  e,
93
- $((t) => {
94
- const r = t.GetSelRows() ?? [];
95
- n(r);
139
+ M((o) => {
140
+ var n, u;
141
+ const c = o.GetSelRows() ?? [];
142
+ (u = (n = t.current) == null ? void 0 : n.onSelect) == null || u.call(n, c);
96
143
  }, 100)
97
- ), typeof I == "function" && window.TGSetEvent("OnSave", e, (t, r, u) => {
98
- I(t, r, u);
144
+ ), typeof (r == null ? void 0 : r.onSave) == "function" && window.TGSetEvent("OnSave", e, (o, c, n) => {
145
+ var u, s;
146
+ (s = (u = t.current) == null ? void 0 : u.onSave) == null || s.call(
147
+ u,
148
+ o,
149
+ c,
150
+ n
151
+ );
99
152
  }), window.TGSetEvent(
100
153
  "OnReady",
101
154
  e,
102
- $((t) => {
103
- if (!S.current) {
104
- const r = M.current;
105
- S.current = !0, fe(t, r), A.current = t, k.current = r, q.current = Ve(t), H(!0), m == null || m(t);
155
+ M((o) => {
156
+ var c, n;
157
+ if (!b.current) {
158
+ const u = R.current;
159
+ b.current = !0, Be(o, u), a.current = o, D.current = u, v.current = De(o), w(o), S(!0), te(e, "TreeGrid init ready", G.current, {
160
+ bodyRowCount: j(
161
+ De(o)
162
+ )
163
+ }), G.current = null, (n = (c = t.current) == null ? void 0 : c.onReady) == null || n.call(c, o);
106
164
  }
107
165
  }, 100)
108
166
  );
109
- }, "bindTreeGridEvents"), Ze = /* @__PURE__ */ i(({
167
+ }, "bindTreeGridEvents"), Gt = /* @__PURE__ */ i(({
110
168
  id: e = "treeGridWrapper",
111
- containerStyle: n,
112
- containerClassName: s,
113
- className: f,
114
- style: d,
115
- height: p = "100%",
116
- width: y = "100%",
117
- layoutUrl: G,
118
- dataUrl: I,
119
- layoutOverrides: m,
120
- data: a,
121
- useDataUrl: A,
122
- onSelect: M,
123
- onRowClick: k,
124
- onRowAdd: q,
125
- onRowDelete: S,
126
- onRowUndelete: H,
127
- onRowChange: L,
128
- onClickButton: t,
129
- onSave: r,
130
- onReady: u,
131
- onAfterValueChanged: v,
132
- loading: h,
133
- showLoading: c = !0
169
+ containerStyle: t,
170
+ containerClassName: a,
171
+ className: G,
172
+ style: R,
173
+ height: D = "100%",
174
+ width: v = "100%",
175
+ layoutUrl: b,
176
+ dataUrl: w,
177
+ layoutOverrides: S,
178
+ data: r,
179
+ useDataUrl: o,
180
+ onSelect: c,
181
+ onRowClick: n,
182
+ onRowAdd: u,
183
+ onRowDelete: s,
184
+ onRowUndelete: l,
185
+ onRowChange: p,
186
+ onClickButton: C,
187
+ onSave: re,
188
+ onReady: oe,
189
+ onAfterValueChanged: ne,
190
+ loading: Se,
191
+ showLoading: T = !0
134
192
  }) => {
135
- const { t: le } = De(), l = o(null), ee = o(null), j = o(m), te = o(a), w = o(void 0), F = o(!1), x = o(void 0), C = o(void 0), pe = o(!1), E = o(0), D = o(null), O = o(void 0), g = o(void 0), [U, me] = ce(!1), [ve, b] = ce(!1), _ = Re(), re = o(_.id), Te = c && a !== void 0 && U && C.current !== a, z = c && h === !0 || c && (ve || Te), K = !z && a !== void 0 && B(a);
136
- j.current = m, te.current = a;
137
- const ne = Ee({
138
- visible: z || K,
139
- containerRef: ee,
140
- treeGridInstanceRef: l
141
- }), N = /* @__PURE__ */ i(() => {
142
- O.current !== void 0 && (window.clearTimeout(O.current), O.current = void 0);
143
- }, "clearBindingLoadingHideTimeout"), Q = /* @__PURE__ */ i(() => {
144
- g.current !== void 0 && (window.clearTimeout(g.current), g.current = void 0);
193
+ const { t: Ce } = Ne(), m = d(null), ue = d(null), ce = d(null), q = d(null), K = d(S), ie = d(r), se = d({
194
+ onSelect: c,
195
+ onRowClick: n,
196
+ onRowAdd: u,
197
+ onRowDelete: s,
198
+ onRowUndelete: l,
199
+ onRowChange: p,
200
+ onClickButton: C,
201
+ onSave: re,
202
+ onReady: oe,
203
+ onAfterValueChanged: ne
204
+ }), g = d(void 0), W = d(!1), P = d(void 0), h = d(void 0), ge = d(!1), I = d(0), B = d(null), A = d(void 0), L = d(void 0), [z, Ie] = ee(!1), [Ae, x] = ee(!1), [Le, de] = ee(!1), k = Ve(), fe = d(k.id), xe = T && r !== void 0 && z && h.current !== r, Q = T && Se === !0 || T && (Ae || xe), X = !Q && r !== void 0 && V(r) && !Le, ae = /* @__PURE__ */ i((f) => {
205
+ de(be(f));
206
+ }, "syncHasDisplayDataRows");
207
+ K.current = S, ie.current = r, se.current = {
208
+ onSelect: c,
209
+ onRowClick: n,
210
+ onRowAdd: u,
211
+ onRowDelete: s,
212
+ onRowUndelete: l,
213
+ onRowChange: p,
214
+ onClickButton: C,
215
+ onSave: re,
216
+ onReady: oe,
217
+ onAfterValueChanged: ne
218
+ };
219
+ const le = he({
220
+ visible: Q || X,
221
+ containerRef: ue,
222
+ treeGridInstanceRef: m,
223
+ debugId: e
224
+ }), F = /* @__PURE__ */ i(() => {
225
+ A.current !== void 0 && (window.clearTimeout(A.current), A.current = void 0);
226
+ }, "clearBindingLoadingHideTimeout"), Y = /* @__PURE__ */ i(() => {
227
+ L.current !== void 0 && (window.clearTimeout(L.current), L.current = void 0);
145
228
  }, "clearBodyReloadStartTimeout");
146
- Z(() => {
147
- c || (Q(), N(), D.current = null, b(!1));
148
- }, [c]), Z(() => {
149
- var R;
150
- if (_.id !== re.current && !B(l.current) && ((R = l.current) == null || R.Dispose(), l.current = null, re.current = _.id), !!B(l.current))
151
- return $e({
229
+ $(() => {
230
+ const f = /* @__PURE__ */ i((y) => {
231
+ var E;
232
+ ((E = y.detail) == null ? void 0 : E.gridId) === e && de(be(m.current));
233
+ }, "handleBodyRowsChanged");
234
+ return window.addEventListener(ye, f), () => {
235
+ window.removeEventListener(ye, f);
236
+ };
237
+ }, [e]), $(() => {
238
+ T || (Y(), F(), B.current = null, x(!1));
239
+ }, [T]), $(() => {
240
+ var f;
241
+ if (k.id !== fe.current && !V(m.current) && ((f = m.current) == null || f.Dispose(), m.current = null, fe.current = k.id), !!V(m.current))
242
+ return Ze({
152
243
  id: e,
153
- onSelect: M,
154
- onRowClick: k,
155
- onRowAdd: q,
156
- onRowDelete: S,
157
- onRowUndelete: H,
158
- onRowChange: L,
159
- onClickButton: t,
160
- onSave: r,
161
- onReady: u,
162
- onAfterValueChanged: v,
163
- treeGridInstanceRef: l,
164
- latestLayoutOverridesRef: j,
165
- appliedLayoutOverridesRef: x,
166
- appliedBodyDataPropRef: C,
167
- hasAppliedInitialLayoutRef: pe,
168
- setIsTreeGridReady: me
244
+ latestEventHandlersRef: se,
245
+ treeGridInstanceRef: m,
246
+ treeGridInitStartedAtRef: ce,
247
+ latestLayoutOverridesRef: K,
248
+ appliedLayoutOverridesRef: P,
249
+ appliedBodyDataPropRef: h,
250
+ hasAppliedInitialLayoutRef: ge,
251
+ syncHasDisplayDataRows: ae,
252
+ setIsTreeGridReady: Ie
253
+ }), ce.current = H(), Ge(e, "init"), Re(e, "TreeGrid init start", {
254
+ useDataUrl: !!o,
255
+ bodyRowCount: j(r)
169
256
  }), window.TreeGrid(
170
- Ne({
257
+ Qe({
171
258
  id: e,
172
- layoutUrl: G,
173
- dataUrl: I,
174
- bodyData: a,
175
- useDataUrl: A,
176
- width: y,
177
- height: p,
178
- languageId: _.id
259
+ layoutUrl: b,
260
+ dataUrl: w,
261
+ bodyData: r,
262
+ useDataUrl: o,
263
+ width: v,
264
+ height: D,
265
+ languageId: k.id
179
266
  }),
180
267
  e,
181
268
  e
182
269
  ), () => {
183
- be(() => {
184
- var T;
185
- (T = l.current) == null || T.Dispose();
270
+ Ue(() => {
271
+ var y;
272
+ (y = m.current) == null || y.Dispose();
186
273
  }, 200);
187
274
  };
188
- }, []), we(() => {
189
- const R = l.current, T = j.current, V = te.current;
190
- if (B(R) || !U)
275
+ }, []), Pe(() => {
276
+ const f = m.current, y = K.current, _ = ie.current;
277
+ if (V(f) || !z)
191
278
  return;
192
- const oe = x.current !== T && !Be(x.current, T), X = C.current !== V && (!F.current || w.current !== V);
193
- if (!(!oe && !X) && (oe && (fe(R, T, X), x.current = T), X)) {
194
- const P = E.current + 1, ie = /* @__PURE__ */ i(() => {
195
- const J = w.current;
196
- g.current = void 0, Pe(R, J, () => {
197
- if (E.current !== P)
198
- return;
199
- C.current = J, w.current === J && (w.current = void 0, F.current = !1);
200
- const se = D.current;
201
- if (!c || se === null) {
202
- D.current = null, b(!1);
203
- return;
204
- }
205
- const ue = Math.max(
206
- 0,
207
- Le - (Date.now() - se)
208
- );
209
- if (N(), ue === 0) {
210
- D.current = null, b(!1);
211
- return;
212
- }
213
- O.current = window.setTimeout(() => {
214
- E.current === P && (O.current = void 0, D.current = null, b(!1));
215
- }, ue);
279
+ const E = P.current !== y && !$e(P.current, y), U = h.current !== _ && (!W.current || g.current !== _);
280
+ if (!(!E && !U)) {
281
+ if (E) {
282
+ const O = H();
283
+ Be(f, y, U), P.current = y, te(e, "apply layout", O, {
284
+ disableBodyReload: !!U
216
285
  });
217
- }, "runBodyReload");
218
- E.current = P, w.current = V, F.current = !0, c && V !== void 0 ? (Q(), N(), D.current = Date.now(), b(!0), g.current = window.setTimeout(() => {
219
- E.current === P && ie();
220
- }, 0)) : ie();
286
+ }
287
+ if (U) {
288
+ const O = I.current + 1, pe = /* @__PURE__ */ i(() => {
289
+ const N = g.current;
290
+ L.current = void 0, q.current = H(), Ge(e, "reload"), Re(e, "ReloadBody start", {
291
+ bodyRowCount: j(N)
292
+ }), Je(f, N, () => {
293
+ if (I.current !== O)
294
+ return;
295
+ h.current = N, ae(f), te(e, "ReloadBody end", q.current, {
296
+ bodyRowCount: j(N)
297
+ }), q.current = null, g.current === N && (g.current = void 0, W.current = !1);
298
+ const Te = B.current;
299
+ if (!T || Te === null) {
300
+ B.current = null, x(!1);
301
+ return;
302
+ }
303
+ const me = Math.max(
304
+ 0,
305
+ qe - (Date.now() - Te)
306
+ );
307
+ if (F(), me === 0) {
308
+ B.current = null, x(!1);
309
+ return;
310
+ }
311
+ A.current = window.setTimeout(() => {
312
+ I.current === O && (A.current = void 0, B.current = null, x(!1));
313
+ }, me);
314
+ });
315
+ }, "runBodyReload");
316
+ I.current = O, g.current = _, W.current = !0, T && _ !== void 0 ? (Y(), F(), B.current = Date.now(), x(!0), L.current = window.setTimeout(() => {
317
+ I.current === O && pe();
318
+ }, 0)) : pe();
319
+ }
221
320
  }
222
- }, [U, m, a, c]), Z(() => () => {
223
- Q(), N();
321
+ }, [z, S, r, T, e]), $(() => () => {
322
+ Y(), F();
224
323
  }, []);
225
- const W = {
226
- height: p,
227
- width: y,
228
- ...n
324
+ const J = {
325
+ height: D,
326
+ width: v,
327
+ ...t
229
328
  };
230
- return (c || K) && (W.position = n != null && n.position && n.position !== "static" ? n.position : "relative", W.isolation = "isolate"), /* @__PURE__ */ Ge("div", { ref: ee, className: s, style: W, children: [
231
- /* @__PURE__ */ Y("div", { id: e, className: f, style: Ie(d, ["height", "width"]) }),
232
- /* @__PURE__ */ Y(
233
- ge,
329
+ return (T || X) && (J.position = t != null && t.position && t.position !== "static" ? t.position : "relative", J.isolation = "isolate"), /* @__PURE__ */ Ee("div", { ref: ue, className: a, style: J, children: [
330
+ /* @__PURE__ */ Z("div", { id: e, className: G, style: Me(R, ["height", "width"]) }),
331
+ /* @__PURE__ */ Z(
332
+ Fe,
234
333
  {
235
- visible: K,
236
- message: le("Message.조회된 결과가 없습니다."),
237
- overlayFrame: ne
334
+ visible: X,
335
+ message: Ce("Message.조회된 결과가 없습니다."),
336
+ overlayFrame: le
238
337
  }
239
338
  ),
240
- /* @__PURE__ */ Y(Oe, { visible: z, overlayFrame: ne })
339
+ /* @__PURE__ */ Z(ke, { visible: Q, overlayFrame: le })
241
340
  ] });
242
341
  }, "OwpTreeGrid");
243
342
  export {
244
- Ze as OwpTreeGrid
343
+ Gt as OwpTreeGrid
245
344
  };
246
345
  //# sourceMappingURL=OwpTreeGrid.js.map