@owp/core 2.5.16 → 2.5.18

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 (40) hide show
  1. package/dist/components/OwpPicker/OwpTimePicker.js +186 -208
  2. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  3. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +298 -227
  4. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  5. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +487 -0
  6. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -0
  7. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +369 -248
  8. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  9. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +201 -117
  10. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  11. package/dist/constants/gridTheme.js +7 -6
  12. package/dist/constants/gridTheme.js.map +1 -1
  13. package/dist/constants/treeGrid.js +27 -26
  14. package/dist/constants/treeGrid.js.map +1 -1
  15. package/dist/constants.js +23 -22
  16. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  17. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  18. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  19. package/dist/owp-app.css +1 -1
  20. package/dist/types/components/OwpPicker/OwpTimePicker.d.ts +3 -1
  21. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +14 -6
  22. package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.d.ts +17 -0
  23. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +41 -7
  24. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +1 -1
  25. package/dist/types/constants/gridTheme.d.ts +2 -0
  26. package/dist/types/constants/treeGrid.d.ts +2 -1
  27. package/dist/types/types/OwpGridThemeTypes.d.ts +1 -0
  28. package/dist/types/utils/index.d.ts +0 -1
  29. package/dist/types/utils/treeGridUtil.d.ts +27 -0
  30. package/dist/utils/treeGridUtil.js +172 -112
  31. package/dist/utils/treeGridUtil.js.map +1 -1
  32. package/dist/utils.js +85 -83
  33. package/dist/utils.js.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/components/OwpTreeGrid/internal/treeGridColumnEditRules.js +0 -84
  36. package/dist/components/OwpTreeGrid/internal/treeGridColumnEditRules.js.map +0 -1
  37. package/dist/types/components/OwpTreeGrid/internal/treeGridColumnEditRules.d.ts +0 -60
  38. package/dist/types/utils/normalizeTimeToHourMinute.d.ts +0 -11
  39. package/dist/utils/normalizeTimeToHourMinute.js +0 -34
  40. package/dist/utils/normalizeTimeToHourMinute.js.map +0 -1
@@ -1,269 +1,340 @@
1
- var sr = Object.defineProperty;
2
- var a = (r, l) => sr(r, "name", { value: l, configurable: !0 });
3
- import { jsxs as ur, jsx as w } 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 { resolveOwpGridTheme as lr } from "../../constants/gridTheme.js";
5
- import { resolveTreeGridColorNumber as O, TREEGRID_INPUT_CELL_COLOR as Me, TREEGRID_CELL_HIGHLIGHT_COLOR as Pe } from "../../constants/treeGrid.js";
6
- import { useGetCurrentSettings as ar } from "../../hooks/useOwpSettings.js";
7
- import { useOwpTranslation as cr } from "../../hooks/useOwpTranslation.js";
8
- import { useGetCurrentLanguage as dr } from "../../hooks/useCurrentLanguage.js";
9
- import { useConfirm as fr } from "../../hooks/useConfirm.js";
10
- import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as Ne } from "../../utils/treeGridBodyRowsEvent.js";
11
- import { getTreeGridPerfTimestamp as F, countTreeGridPerf as xe, logTreeGridPerf as Ve, measureTreeGridPerf as je } from "./internal/utils/perf.js";
12
- import { useRef as e, useState as z, useMemo as mr, useEffect as h, useLayoutEffect as pr } from "react";
13
- import Rr from "@mui/material/GlobalStyles";
14
- import { useOwpTreeGridOverlayFrame as Tr } from "./internal/hooks/useOwpTreeGridOverlayFrame.js";
15
- import { bindTreeGridEvents as yr, getTreeGridBodyDataCount as Y, buildTreeGridInitializationOptions as gr, hasTreeGridDisplayDataRows as qe, replaceTreeGridBodyData as vr, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as Gr } from "./internal/treeGridRuntime.js";
16
- import { applyTreeGridLayoutToGrid as Cr } from "./internal/treeGridLayout.js";
17
- import { OwpTreeGridLoadingOverlay as Er } from "./internal/OwpTreeGridLoadingOverlay.js";
18
- import { OwpTreeGridNoDataOverlay as Br } from "./internal/OwpTreeGridNoDataOverlay.js";
19
- import { resolveTreeGridColumnEditRuleLookup as Ue, createTreeGridColumnEditRulesState as Dr, syncTreeGridColumnEditRules as br } from "./internal/treeGridColumnEditRules.js";
20
- import { createTreeGridThemeContainerStyle as Ir, TREE_GRID_THEME_WRAPPER_CLASS as Lr, TREE_GRID_THEME_TABLE_RADIUS_CLASS as _r, treeGridThemeStyles as wr } from "./internal/treeGridTheme.js";
21
- import { isEmpty as A } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
22
- import { delay as Or } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
23
- import { isEqual as We } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
24
- import { omit as hr } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
25
- const tt = /* @__PURE__ */ a(({
26
- id: r = "treeGridWrapper",
27
- containerStyle: l,
28
- containerClassName: Fe,
29
- toolbarRowBackgroundColor: J,
30
- className: ze,
31
- style: Ye,
32
- height: K = "100%",
33
- width: Q = "100%",
34
- canUseTableRadius: X = !1,
35
- tableBorderRadius: Je = ".8rem",
36
- layoutUrl: Ke,
37
- layoutData: Qe,
38
- dataUrl: Xe,
39
- layoutOverrides: S,
40
- data: o,
41
- useDataUrl: Z,
42
- onSelect: $,
43
- onRowClick: ee,
44
- onRowAdd: re,
45
- onRowDelete: te,
46
- onRowUndelete: oe,
47
- onRowChange: ne,
48
- onClickButton: ie,
49
- onSave: se,
50
- onReady: ue,
51
- onAfterValueChanged: le,
52
- columnEditRules: p,
53
- highlightEditableCells: ae = !0,
54
- highlightChangedCells: ce = !0,
55
- syncDeletedRowCanEdit: de = !0,
56
- confirmDeletedRowRemoval: Ze = !0,
57
- loading: $e,
58
- showLoading: n = !0
1
+ var cr = Object.defineProperty;
2
+ var i = (e, r) => cr(e, "name", { value: r, configurable: !0 });
3
+ import { jsxs as ur, 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 { resolveOwpGridTheme as fr } from "../../constants/gridTheme.js";
5
+ import { resolveTreeGridColorNumber as M, TREEGRID_INPUT_CELL_COLOR as He, TREEGRID_CELL_HIGHLIGHT_COLOR as Me } from "../../constants/treeGrid.js";
6
+ import { useGetCurrentSettings as mr } from "../../hooks/useOwpSettings.js";
7
+ import { useOwpTranslation as pr } from "../../hooks/useOwpTranslation.js";
8
+ import { useGetCurrentLanguage as Rr } from "../../hooks/useCurrentLanguage.js";
9
+ import { useConfirm as Tr } from "../../hooks/useConfirm.js";
10
+ import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as xe } from "../../utils/treeGridBodyRowsEvent.js";
11
+ import { getTreeGridCellComparableValue as qe, clearTreeGridCellHighlightById as gr, isTreeGridRowAddedById as w, removeTreeGridAddedRowHighlightColumn as Cr, highlightTreeGridCellById as Gr, appendTreeGridAddedRowHighlightColumn as yr, getTreeGridAddedRowBaselineValue as hr } from "../../utils/treeGridUtil.js";
12
+ import { getTreeGridPerfTimestamp as ee, countTreeGridPerf as Ne, logTreeGridPerf as we, measureTreeGridPerf as Fe } from "./internal/utils/perf.js";
13
+ import { useRef as n, useState as re, useMemo as Er, useEffect as x, useLayoutEffect as Br } from "react";
14
+ import vr from "@mui/material/GlobalStyles";
15
+ import { useOwpTreeGridDatePickerEditor as br } from "./internal/hooks/useOwpTreeGridDatePickerEditor.js";
16
+ import { useOwpTreeGridOverlayFrame as Dr } from "./internal/hooks/useOwpTreeGridOverlayFrame.js";
17
+ import { hasTreeGridExplicitEnterMode as je, bindTreeGridEvents as Ir, getTreeGridBodyDataCount as te, buildTreeGridInitializationOptions as kr, hasTreeGridDisplayDataRows as We, replaceTreeGridBodyData as _r, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as Lr } from "./internal/treeGridRuntime.js";
18
+ import { applyTreeGridLayoutToGrid as Or } from "./internal/treeGridLayout.js";
19
+ import { OwpTreeGridLoadingOverlay as Ar } from "./internal/OwpTreeGridLoadingOverlay.js";
20
+ import { OwpTreeGridNoDataOverlay as Pr } from "./internal/OwpTreeGridNoDataOverlay.js";
21
+ import { createTreeGridThemeContainerStyle as Vr, TREE_GRID_THEME_WRAPPER_CLASS as Sr, TREE_GRID_THEME_TABLE_RADIUS_CLASS as Hr, treeGridThemeStyles as Mr } from "./internal/treeGridTheme.js";
22
+ import { isEmpty as N } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
23
+ import { delay as xr } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
24
+ import { isEqual as Nr } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
25
+ import { omit as wr } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
26
+ const Fr = /* @__PURE__ */ i((e) => {
27
+ const r = e == null ? void 0 : e.Visible;
28
+ return !!e && r !== 0 && r !== !1 && r !== "0";
29
+ }, "isVisibleTreeGridRow"), jr = /* @__PURE__ */ i((e) => {
30
+ const r = e == null ? void 0 : e.Added;
31
+ return !!e && r !== 0 && r !== !1 && r !== "0" && r !== void 0;
32
+ }, "isAddedTreeGridRow"), Ke = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !Fr(e) ? !1 : e.Kind === "Data" || jr(e), "isDisplayTreeGridRow"), Wr = /* @__PURE__ */ i((e) => {
33
+ if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
34
+ const r = [];
35
+ let t = e.GetFirst();
36
+ for (; t; )
37
+ r.push(t), t = e.GetNext(t);
38
+ return r;
39
+ }
40
+ return Object.values(e.Rows ?? {});
41
+ }, "getTreeGridRows"), qr = /* @__PURE__ */ i((e, r) => {
42
+ if (!e)
43
+ return;
44
+ const t = Object.keys(e.Cols ?? {}).filter(Boolean);
45
+ Wr(e).forEach((o) => {
46
+ Ke(o) && r.set(
47
+ o,
48
+ new Map(t.map((l) => [l, qe(e, o, l)]))
49
+ );
50
+ });
51
+ }, "captureTreeGridChangeBaselines"), Kr = /* @__PURE__ */ i((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Ur = /* @__PURE__ */ i((e, r, t) => {
52
+ const o = r;
53
+ return Object.keys(e.Cols ?? {}).some((l) => l !== t && Kr(o[`${l}Changed`]));
54
+ }, "hasOtherTreeGridChangedCells"), $r = /* @__PURE__ */ i((e, r, t) => {
55
+ const o = r;
56
+ o[`${t}Changed`] = 0, !w(r) && !Ur(e, r, t) && (o.Changed = 0);
57
+ }, "clearTreeGridCellChangedState"), zr = /* @__PURE__ */ i((e, r, t) => {
58
+ const o = e.get(r);
59
+ if (o != null && o.has(t))
60
+ return o.get(t);
61
+ if (w(r))
62
+ return hr(r, t) ?? "";
63
+ }, "resolveTreeGridCellBaselineValue"), Yr = /* @__PURE__ */ i(({
64
+ gridId: e,
65
+ grid: r,
66
+ row: t,
67
+ col: o,
68
+ backgroundColor: l,
69
+ baselineMap: F
70
+ }) => {
71
+ if (!Ke(t))
72
+ return;
73
+ const C = zr(F, t, o), D = qe(r, t, o);
74
+ if (C !== void 0 && D === C) {
75
+ gr(e, { row: t, col: o }), $r(r, t, o), w(t) && Cr(t, o);
76
+ return;
77
+ }
78
+ Gr(e, {
79
+ row: t,
80
+ col: o,
81
+ backgroundColor: l
82
+ }), w(t) && yr(t, o);
83
+ }, "syncTreeGridChangedCellHighlightById"), ht = /* @__PURE__ */ i(({
84
+ id: e = "treeGridWrapper",
85
+ containerStyle: r,
86
+ containerClassName: t,
87
+ toolbarRowBackgroundColor: o,
88
+ className: l,
89
+ style: F,
90
+ height: C = "100%",
91
+ width: D = "100%",
92
+ canUseTableRadius: ne = !1,
93
+ tableBorderRadius: Ue = ".8rem",
94
+ layoutUrl: $e,
95
+ layoutData: j,
96
+ dataUrl: ze,
97
+ layoutOverrides: W,
98
+ data: c,
99
+ useDataUrl: oe,
100
+ onSelect: ie,
101
+ onRowClick: se,
102
+ onRowAdd: ae,
103
+ onRowDelete: de,
104
+ onRowUndelete: le,
105
+ onRowChange: ce,
106
+ onClickButton: ue,
107
+ onSave: fe,
108
+ onReady: me,
109
+ onAfterValueChanged: pe,
110
+ datePickerEditor: Ye,
111
+ highlightEditableCells: Re = !0,
112
+ highlightChangedCells: Te = !0,
113
+ syncDeletedRowCanEdit: ge = !0,
114
+ confirmDeletedRowRemoval: Je = !0,
115
+ loading: Qe,
116
+ showLoading: u = !0
59
117
  }) => {
60
- var we, Oe;
61
- const { t: c } = cr(), { confirmDelete: er } = fr(), H = ar(), k = (Oe = (we = H == null ? void 0 : H.theme) == null ? void 0 : we.main) == null ? void 0 : Oe.grid, i = e(null), fe = e(null), me = e(null), M = e(null), P = e(S), pe = e(o), N = e(
62
- p
63
- ), x = e(
64
- Ue(p, {
65
- hourMinuteInvalidText: c("Message.시간은 HH:mm 형식으로 입력해주세요.")
66
- })
67
- ), Re = Ze ? async () => await er({
68
- title: c("Message.삭제된 항목을 완전히 삭제하시겠습니까?"),
69
- description: c("Message.취소하면 삭제 상태가 해제됩니다."),
70
- okText: c("Button.완전 삭제")
71
- }) ? "remove" : "undelete" : void 0, Te = e({
72
- onSelect: $,
73
- onRowClick: ee,
74
- onRowAdd: re,
75
- onRowDelete: te,
76
- onBeforeRowUndelete: Re,
77
- onRowUndelete: oe,
78
- onRowChange: ne,
79
- onClickButton: ie,
80
- onSave: se,
81
- onReady: ue,
82
- onAfterValueChanged: le
83
- }), R = e(void 0), V = e(!1), E = e(void 0), B = e(void 0), D = e(
84
- void 0
85
- ), ye = e(Dr()), rr = e(!1), T = e(0), d = e(null), y = e(void 0), g = e(void 0), ge = e(ae), ve = e(ce), Ge = e(de), [j, tr] = z(!1), [or, v] = z(!1), [nr, Ce] = z(!1), b = dr(), s = mr(
86
- () => lr(k),
87
- [k]
88
- ), Ee = e(
89
- O(s.editable.backgroundColor) ?? O(Me)
90
- ), Be = e(
91
- s.changed.backgroundColor ?? Pe
92
- ), De = e(s.state.selectedCellBackgroundColor), be = e(s.state.hoverCellBackgroundColor), Ie = e(b.id), ir = n && o !== void 0 && j && B.current !== o, q = n && $e === !0 || n && (or || ir), U = !q && o !== void 0 && A(o) && !nr, Le = /* @__PURE__ */ a((t) => {
93
- Ce(qe(t));
94
- }, "syncHasDisplayDataRows");
95
- P.current = S, pe.current = o, N.current = p, x.current = Ue(p, {
96
- hourMinuteInvalidText: c("Message.시간은 HH:mm 형식으로 입력해주세요.")
97
- }), ge.current = ae, ve.current = ce, Ge.current = de, Ee.current = O(s.editable.backgroundColor) ?? O(Me), Be.current = s.changed.backgroundColor ?? Pe, De.current = s.state.selectedCellBackgroundColor, be.current = s.state.hoverCellBackgroundColor, Te.current = {
98
- onSelect: $,
99
- onRowClick: ee,
100
- onRowAdd: re,
101
- onRowDelete: te,
102
- onBeforeRowUndelete: Re,
103
- onRowUndelete: oe,
104
- onRowChange: ne,
105
- onClickButton: ie,
106
- onSave: se,
107
- onReady: ue,
108
- onAfterValueChanged: le
118
+ var Ae, Pe;
119
+ const { t: I } = pr(), { confirmDelete: Xe } = Tr(), q = mr(), K = (Pe = (Ae = q == null ? void 0 : q.theme) == null ? void 0 : Ae.main) == null ? void 0 : Pe.grid, d = n(null), Ce = n(null), Ge = n(null), U = n(null), $ = n(W), ye = n(c), he = n(je(j)), Ee = Je ? async () => await Xe({
120
+ title: I("Message.삭제된 항목을 완전히 삭제하시겠습니까?"),
121
+ description: I("Message.취소하면 삭제 상태가 해제됩니다."),
122
+ okText: I("Button.완전 삭제")
123
+ }) ? "remove" : "undelete" : void 0, k = n({
124
+ onSelect: ie,
125
+ onRowClick: se,
126
+ onRowAdd: ae,
127
+ onRowDelete: de,
128
+ onBeforeRowUndelete: Ee,
129
+ onRowUndelete: le,
130
+ onRowChange: ce,
131
+ onClickButton: ue,
132
+ onSave: fe,
133
+ onReady: me,
134
+ onAfterValueChanged: pe
135
+ }), G = n(void 0), z = n(!1), _ = n(void 0), L = n(void 0), Ze = n(!1), y = n(0), g = n(null), h = n(void 0), E = n(void 0), Be = n(Re), Y = n(Te), ve = n(ge), [O, er] = re(!1), [rr, B] = re(!1), [tr, be] = re(!1), A = Rr(), f = Er(
136
+ () => fr(K),
137
+ [K]
138
+ ), De = n(
139
+ M(f.editable.backgroundColor) ?? M(He)
140
+ ), J = n(
141
+ f.changed.backgroundColor ?? Me
142
+ ), P = n(/* @__PURE__ */ new WeakMap()), Ie = n(f.state.selectedCellBackgroundColor), ke = n(f.state.hoverCellBackgroundColor), _e = n(A.id), nr = u && c !== void 0 && O && L.current !== c, Q = u && Qe === !0 || u && (rr || nr), X = !Q && c !== void 0 && N(c) && !tr, Le = /* @__PURE__ */ i((s) => {
143
+ be(We(s));
144
+ }, "syncHasDisplayDataRows"), or = /* @__PURE__ */ i((s, a, p, T) => {
145
+ var m, v;
146
+ Y.current && a.Fixed !== "Foot" && Yr({
147
+ gridId: e,
148
+ grid: s,
149
+ row: a,
150
+ col: p,
151
+ backgroundColor: J.current,
152
+ baselineMap: P.current
153
+ });
154
+ const R = ((m = k.current) == null ? void 0 : m.onAfterValueChanged) ?? ((v = k.current) == null ? void 0 : v.onRowChange);
155
+ R == null || R(s, a, p, T);
156
+ }, "handleDatePickerEditorValueChange");
157
+ $.current = W, ye.current = c, he.current = je(j), Be.current = Re, Y.current = Te, ve.current = ge, De.current = M(f.editable.backgroundColor) ?? M(He), J.current = f.changed.backgroundColor ?? Me, Ie.current = f.state.selectedCellBackgroundColor, ke.current = f.state.hoverCellBackgroundColor;
158
+ const {
159
+ datePickerEditorElement: ir,
160
+ handleDatePickerEditorButtonClick: sr,
161
+ handleDatePickerEditorCellClick: ar,
162
+ handleDatePickerEditorKeyDown: dr,
163
+ handleDatePickerEditorStartEdit: lr
164
+ } = br({
165
+ config: Ye,
166
+ treeGridInstanceRef: d,
167
+ isTreeGridReady: O,
168
+ onValueChange: or
169
+ });
170
+ k.current = {
171
+ onSelect: ie,
172
+ onRowClick: se,
173
+ onRowAdd: ae,
174
+ onRowDelete: de,
175
+ onBeforeRowUndelete: Ee,
176
+ onRowUndelete: le,
177
+ onRowChange: ce,
178
+ onClickButton: ue,
179
+ onSave: fe,
180
+ onReady: me,
181
+ onAfterValueChanged: pe,
182
+ onInternalButtonClick: sr,
183
+ onInternalCellClick: ar,
184
+ onInternalKeyDown: dr,
185
+ onInternalStartEdit: lr
109
186
  };
110
- const _e = Tr({
111
- visible: q || U,
112
- containerRef: fe,
113
- treeGridInstanceRef: i,
114
- debugId: r
115
- }), I = /* @__PURE__ */ a(() => {
116
- y.current !== void 0 && (window.clearTimeout(y.current), y.current = void 0);
117
- }, "clearBindingLoadingHideTimeout"), W = /* @__PURE__ */ a(() => {
118
- g.current !== void 0 && (window.clearTimeout(g.current), g.current = void 0);
187
+ const Oe = Dr({
188
+ visible: Q || X,
189
+ containerRef: Ce,
190
+ treeGridInstanceRef: d,
191
+ debugId: e
192
+ }), V = /* @__PURE__ */ i(() => {
193
+ h.current !== void 0 && (window.clearTimeout(h.current), h.current = void 0);
194
+ }, "clearBindingLoadingHideTimeout"), Z = /* @__PURE__ */ i(() => {
195
+ E.current !== void 0 && (window.clearTimeout(E.current), E.current = void 0);
119
196
  }, "clearBodyReloadStartTimeout");
120
- h(() => {
121
- const t = /* @__PURE__ */ a((u) => {
122
- var f;
123
- ((f = u.detail) == null ? void 0 : f.gridId) === r && Ce(qe(i.current));
197
+ x(() => {
198
+ const s = /* @__PURE__ */ i((a) => {
199
+ var T;
200
+ ((T = a.detail) == null ? void 0 : T.gridId) === e && be(We(d.current));
124
201
  }, "handleBodyRowsChanged");
125
- return window.addEventListener(Ne, t), () => {
126
- window.removeEventListener(Ne, t);
202
+ return window.addEventListener(xe, s), () => {
203
+ window.removeEventListener(xe, s);
127
204
  };
128
- }, [r]), h(() => {
129
- n || (W(), I(), d.current = null, v(!1));
130
- }, [n]), h(() => {
131
- var t;
132
- if (b.id !== Ie.current && !A(i.current) && ((t = i.current) == null || t.Dispose(), i.current = null, Ie.current = b.id), !!A(i.current))
133
- return yr({
134
- id: r,
135
- latestEventHandlersRef: Te,
136
- highlightEditableCellsRef: ge,
137
- highlightChangedCellsRef: ve,
138
- syncDeletedRowCanEditRef: Ge,
139
- editableCellBackgroundColorValueRef: Ee,
140
- changedCellBackgroundColorRef: Be,
141
- selectedCellBackgroundColorRef: De,
142
- hoverCellBackgroundColorRef: be,
143
- treeGridInstanceRef: i,
144
- treeGridInitStartedAtRef: me,
145
- latestLayoutOverridesRef: P,
146
- appliedLayoutOverridesRef: E,
147
- appliedBodyDataPropRef: B,
148
- latestColumnEditRulesRef: N,
149
- latestColumnEditRuleLookupRef: x,
150
- appliedColumnEditRulesRef: D,
151
- columnEditRulesStateRef: ye,
152
- hasAppliedInitialLayoutRef: rr,
205
+ }, [e]), x(() => {
206
+ u || (Z(), V(), g.current = null, B(!1));
207
+ }, [u]), x(() => {
208
+ var s;
209
+ if (A.id !== _e.current && !N(d.current) && ((s = d.current) == null || s.Dispose(), d.current = null, _e.current = A.id), !!N(d.current))
210
+ return Ir({
211
+ id: e,
212
+ latestEventHandlersRef: k,
213
+ layoutHasExplicitEnterModeRef: he,
214
+ highlightEditableCellsRef: Be,
215
+ highlightChangedCellsRef: Y,
216
+ syncDeletedRowCanEditRef: ve,
217
+ editableCellBackgroundColorValueRef: De,
218
+ changedCellBackgroundColorRef: J,
219
+ selectedCellBackgroundColorRef: Ie,
220
+ hoverCellBackgroundColorRef: ke,
221
+ changedCellBaselineRef: P,
222
+ treeGridInstanceRef: d,
223
+ treeGridInitStartedAtRef: Ge,
224
+ latestLayoutOverridesRef: $,
225
+ appliedLayoutOverridesRef: _,
226
+ appliedBodyDataPropRef: L,
227
+ hasAppliedInitialLayoutRef: Ze,
153
228
  syncHasDisplayDataRows: Le,
154
- setIsTreeGridReady: tr
155
- }), me.current = F(), xe(r, "init"), Ve(r, "TreeGrid init start", {
156
- useDataUrl: !!Z,
157
- bodyRowCount: Y(o)
229
+ setIsTreeGridReady: er
230
+ }), Ge.current = ee(), Ne(e, "init"), we(e, "TreeGrid init start", {
231
+ useDataUrl: !!oe,
232
+ bodyRowCount: te(c)
158
233
  }), window.TreeGrid(
159
- gr({
160
- id: r,
161
- layoutUrl: Ke,
162
- layoutData: Qe,
163
- dataUrl: Xe,
164
- bodyData: o,
165
- useDataUrl: Z,
166
- width: Q,
167
- height: K,
168
- languageId: b.id
234
+ kr({
235
+ id: e,
236
+ layoutUrl: $e,
237
+ layoutData: j,
238
+ dataUrl: ze,
239
+ bodyData: c,
240
+ useDataUrl: oe,
241
+ width: D,
242
+ height: C,
243
+ languageId: A.id
169
244
  }),
170
- r,
171
- r
245
+ e,
246
+ e
172
247
  ), () => {
173
- Or(() => {
174
- var u;
175
- (u = i.current) == null || u.Dispose();
248
+ xr(() => {
249
+ var a;
250
+ (a = d.current) == null || a.Dispose();
176
251
  }, 200);
177
252
  };
178
- }, []), pr(() => {
179
- const t = i.current, u = P.current, G = pe.current, f = N.current;
180
- if (A(t) || !j)
253
+ }, []), Br(() => {
254
+ const s = d.current, a = $.current, p = ye.current;
255
+ if (N(s) || !O)
181
256
  return;
182
- const he = E.current !== u && !We(E.current, u), _ = B.current !== G && (!V.current || R.current !== G), Ae = D.current !== f && !We(D.current, f);
183
- if (!(!he && !_ && !Ae)) {
184
- if (he) {
185
- const m = F();
186
- Cr(t, u, _), E.current = u, je(r, "apply layout", m, {
187
- disableBodyReload: !!_
257
+ const T = _.current !== a && !Nr(_.current, a), R = L.current !== p && (!z.current || G.current !== p);
258
+ if (!(!T && !R)) {
259
+ if (T) {
260
+ const m = ee();
261
+ Or(s, a, R), _.current = a, Fe(e, "apply layout", m, {
262
+ disableBodyReload: !!R
188
263
  });
189
264
  }
190
- if (_) {
191
- const m = T.current + 1, Se = /* @__PURE__ */ a(() => {
192
- const C = R.current;
193
- g.current = void 0, M.current = F(), xe(r, "reload"), Ve(r, "ReloadBody start", {
194
- bodyRowCount: Y(C)
195
- }), vr(t, C, () => {
196
- if (T.current !== m)
265
+ if (R) {
266
+ const m = y.current + 1, v = /* @__PURE__ */ i(() => {
267
+ const b = G.current;
268
+ E.current = void 0, U.current = ee(), Ne(e, "reload"), we(e, "ReloadBody start", {
269
+ bodyRowCount: te(b)
270
+ }), _r(s, b, () => {
271
+ if (y.current !== m)
197
272
  return;
198
- B.current = C, Le(t), je(r, "ReloadBody end", M.current, {
199
- bodyRowCount: Y(C)
200
- }), M.current = null, R.current === C && (R.current = void 0, V.current = !1);
201
- const He = d.current;
202
- if (!n || He === null) {
203
- d.current = null, v(!1);
273
+ L.current = b, P.current = /* @__PURE__ */ new WeakMap(), qr(s, P.current), Le(s), Fe(e, "ReloadBody end", U.current, {
274
+ bodyRowCount: te(b)
275
+ }), U.current = null, G.current === b && (G.current = void 0, z.current = !1);
276
+ const Ve = g.current;
277
+ if (!u || Ve === null) {
278
+ g.current = null, B(!1);
204
279
  return;
205
280
  }
206
- const ke = Math.max(
281
+ const Se = Math.max(
207
282
  0,
208
- Gr - (Date.now() - He)
283
+ Lr - (Date.now() - Ve)
209
284
  );
210
- if (I(), ke === 0) {
211
- d.current = null, v(!1);
285
+ if (V(), Se === 0) {
286
+ g.current = null, B(!1);
212
287
  return;
213
288
  }
214
- y.current = window.setTimeout(() => {
215
- T.current === m && (y.current = void 0, d.current = null, v(!1));
216
- }, ke);
289
+ h.current = window.setTimeout(() => {
290
+ y.current === m && (h.current = void 0, g.current = null, B(!1));
291
+ }, Se);
217
292
  });
218
293
  }, "runBodyReload");
219
- T.current = m, R.current = G, V.current = !0, n && G !== void 0 ? (W(), I(), d.current = Date.now(), v(!0), g.current = window.setTimeout(() => {
220
- T.current === m && Se();
221
- }, 0)) : Se();
294
+ y.current = m, G.current = p, z.current = !0, u && p !== void 0 ? (Z(), V(), g.current = Date.now(), B(!0), E.current = window.setTimeout(() => {
295
+ y.current === m && v();
296
+ }, 0)) : v();
222
297
  }
223
- Ae && (br(
224
- t,
225
- x.current,
226
- ye.current
227
- ), D.current = f);
228
298
  }
229
- }, [j, S, o, p, n, r]), h(() => () => {
230
- W(), I();
299
+ }, [O, W, c, u, e]), x(() => () => {
300
+ Z(), V();
231
301
  }, []);
232
- const L = Ir({
233
- width: Q,
234
- height: K,
235
- treeGridTheme: s,
236
- gridThemeConfig: k,
237
- containerStyle: l,
238
- tableBorderRadius: X ? Je : void 0
302
+ const S = Vr({
303
+ width: D,
304
+ height: C,
305
+ treeGridTheme: f,
306
+ gridThemeConfig: K,
307
+ containerStyle: r,
308
+ tableBorderRadius: ne ? Ue : void 0
239
309
  });
240
- return J !== void 0 && (L["--owp-tree-grid-toolbar-row-background-color"] = String(J)), (n || U) && (L.position = l != null && l.position && l.position !== "static" ? l.position : "relative", L.isolation = "isolate"), /* @__PURE__ */ ur(
310
+ return o !== void 0 && (S["--owp-tree-grid-toolbar-row-background-color"] = String(o)), (u || X) && (S.position = r != null && r.position && r.position !== "static" ? r.position : "relative", S.isolation = "isolate"), /* @__PURE__ */ ur(
241
311
  "div",
242
312
  {
243
- ref: fe,
313
+ ref: Ce,
244
314
  className: [
245
- Lr,
246
- X && _r,
247
- Fe
315
+ Sr,
316
+ ne && Hr,
317
+ t
248
318
  ].filter(Boolean).join(" "),
249
- style: L,
319
+ style: S,
250
320
  children: [
251
- /* @__PURE__ */ w(Rr, { styles: wr }),
252
- /* @__PURE__ */ w("div", { id: r, className: ze, style: hr(Ye, ["height", "width"]) }),
253
- /* @__PURE__ */ w(
254
- Br,
321
+ /* @__PURE__ */ H(vr, { styles: Mr }),
322
+ /* @__PURE__ */ H("div", { id: e, className: l, style: wr(F, ["height", "width"]) }),
323
+ /* @__PURE__ */ H(
324
+ Pr,
255
325
  {
256
- visible: U,
257
- message: c("Message.조회된 결과가 없습니다."),
258
- overlayFrame: _e
326
+ visible: X,
327
+ message: I("Message.조회된 결과가 없습니다."),
328
+ overlayFrame: Oe
259
329
  }
260
330
  ),
261
- /* @__PURE__ */ w(Er, { visible: q, overlayFrame: _e })
331
+ /* @__PURE__ */ H(Ar, { visible: Q, overlayFrame: Oe }),
332
+ ir
262
333
  ]
263
334
  }
264
335
  );
265
336
  }, "OwpTreeGrid");
266
337
  export {
267
- tt as OwpTreeGrid
338
+ ht as OwpTreeGrid
268
339
  };
269
340
  //# sourceMappingURL=OwpTreeGrid.js.map