@owp/core 2.5.35 → 2.5.36

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.
@@ -1,64 +1,44 @@
1
- var Hr = Object.defineProperty;
2
- var i = (e, r) => Hr(e, "name", { value: r, configurable: !0 });
3
- import { jsxs as wr, jsx as V } 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 Sr } from "../../constants/gridTheme.js";
5
- import { DEFAULT_TABLE_RADIUS as kr } from "../../constants/table.js";
6
- import { resolveTreeGridColorNumber as x, TREEGRID_INPUT_CELL_COLOR as Qe, TREEGRID_CELL_HIGHLIGHT_COLOR as er } from "../../constants/treeGrid.js";
7
- import { useGetCurrentSettings as Mr } from "../../hooks/useOwpSettings.js";
1
+ var Or = Object.defineProperty;
2
+ var i = (e, r) => Or(e, "name", { value: r, configurable: !0 });
3
+ import { jsxs as Ar, jsx as V } 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 kr } from "../../constants/gridTheme.js";
5
+ import { DEFAULT_TABLE_RADIUS as Sr } from "../../constants/table.js";
6
+ import { resolveTreeGridColorNumber as H, TREEGRID_INPUT_CELL_COLOR as Qe, TREEGRID_CELL_HIGHLIGHT_COLOR as Xe } from "../../constants/treeGrid.js";
7
+ import { useGetCurrentSettings as Fr } from "../../hooks/useOwpSettings.js";
8
8
  import { useOwpTranslation as Pr } from "../../hooks/useOwpTranslation.js";
9
- import { useGetCurrentLanguage as Nr } from "../../hooks/internal/useCurrentLanguage.js";
10
- import { useConfirm as Vr } from "../../hooks/useConfirm.js";
11
- import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as rr } from "../../utils/internal/treeGridBodyRowsEvent.js";
12
- import { isTreeGridRowAddedById as dr, getTreeGridCellComparableValue as ur, clearTreeGridCellHighlightById as xr, highlightTreeGridCellById as Ur } from "../../utils/treeGridUtil.js";
13
- import { getTreeGridPerfTimestamp as ae, countTreeGridPerf as tr, logTreeGridPerf as or, measureTreeGridPerf as nr } from "./internal/utils/perf.js";
14
- import { useMemo as ir, useRef as t, useState as U, useEffect as $, useLayoutEffect as sr } from "react";
15
- import $r from "@mui/material/GlobalStyles";
16
- import { useOwpTreeGridDatePickerEditor as jr } from "./internal/hooks/useOwpTreeGridDatePickerEditor.js";
17
- import { useOwpTreeGridErrorTooltip as Wr } from "./internal/hooks/useOwpTreeGridErrorTooltip.js";
18
- import { useOwpTreeGridOverlayFrame as qr } from "./internal/hooks/useOwpTreeGridOverlayFrame.js";
19
- import { hasTreeGridExplicitEnterMode as ar, bindTreeGridEvents as Kr, getTreeGridBodyDataCount as ce, buildTreeGridInitializationOptions as Yr, hasTreeGridDisplayDataRows as cr, replaceTreeGridBodyData as zr, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as Jr } from "./internal/treeGridRuntime.js";
20
- import { applyTreeGridLayoutToGrid as Xr } from "./internal/treeGridLayout.js";
21
- import { OwpTreeGridLoadingOverlay as Zr } from "./internal/OwpTreeGridLoadingOverlay.js";
9
+ import { useGetCurrentLanguage as Mr } from "../../hooks/internal/useCurrentLanguage.js";
10
+ import { useConfirm as Nr } from "../../hooks/useConfirm.js";
11
+ import { TREE_GRID_BODY_ROWS_CHANGED_EVENT as Ze } from "../../utils/internal/treeGridBodyRowsEvent.js";
12
+ import { isTreeGridRowAddedById as lr, getTreeGridCellComparableValue as ar, clearTreeGridCellHighlightById as wr, highlightTreeGridCellById as Vr } from "../../utils/treeGridUtil.js";
13
+ import { getTreeGridPerfTimestamp as ne, countTreeGridPerf as er, logTreeGridPerf as rr, measureTreeGridPerf as tr } from "./internal/utils/perf.js";
14
+ import { useMemo as or, useRef as t, useState as ie, useEffect as x, useLayoutEffect as Hr } from "react";
15
+ import xr from "@mui/material/GlobalStyles";
16
+ import { useOwpTreeGridDatePickerEditor as Ur } from "./internal/hooks/useOwpTreeGridDatePickerEditor.js";
17
+ import { useOwpTreeGridErrorTooltip as jr } from "./internal/hooks/useOwpTreeGridErrorTooltip.js";
18
+ import { useOwpTreeGridOverlayFrame as $r } from "./internal/hooks/useOwpTreeGridOverlayFrame.js";
19
+ import { hasTreeGridExplicitEnterMode as nr, bindTreeGridEvents as Wr, getTreeGridBodyDataCount as se, buildTreeGridInitializationOptions as qr, hasTreeGridDisplayDataRows as ir, replaceTreeGridBodyData as Kr, TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS as zr } from "./internal/treeGridRuntime.js";
20
+ import { applyTreeGridLayoutToGrid as Jr } from "./internal/treeGridLayout.js";
21
+ import { OwpTreeGridLoadingOverlay as Yr } from "./internal/OwpTreeGridLoadingOverlay.js";
22
22
  import { OwpTreeGridNoDataOverlay as Qr } from "./internal/OwpTreeGridNoDataOverlay.js";
23
- import { createTreeGridThemeContainerStyle as et, TREE_GRID_THEME_WRAPPER_CLASS as rt, TREE_GRID_THEME_READY_CLASS as tt, TREE_GRID_THEME_TABLE_RADIUS_CLASS as ot, treeGridThemeStyles as nt } from "./internal/treeGridTheme.js";
24
- import { isEmpty as j } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
25
- import { delay as it } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
26
- import { isEqual as st } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
27
- import { omit as at } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
28
- import { isPlainObject as ct } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";
29
- const lt = "NumberToString(count(5),',0')", dt = ["Formula", "FormulaFormula"], ut = /^[A-Z]{2}HeaderRow$/, ft = 6, mt = Object.prototype.hasOwnProperty, lr = /* @__PURE__ */ i((e) => JSON.stringify(e) ?? '""', "toTreeGridFormulaStringLiteral"), Rt = /* @__PURE__ */ i((e) => {
30
- if (!e)
31
- return;
32
- const r = Array.from(e.querySelectorAll('[class*="HeaderRow"]')), o = /* @__PURE__ */ new Map();
33
- for (const c of r) {
34
- if (!Array.from(c.classList).some(
35
- (y) => ut.test(y)
36
- ))
37
- continue;
38
- const f = c.getBoundingClientRect();
39
- if (f.width <= 0 || f.height <= 0)
40
- continue;
41
- const G = Math.round(f.top), E = o.get(G) ?? 0;
42
- o.set(G, Math.max(E, f.height));
43
- }
44
- const n = Array.from(o.values()).reduce(
45
- (c, f) => c + f,
46
- 0
47
- );
48
- return n > 0 ? `${n}px` : void 0;
49
- }, "getRenderedTreeGridHeaderFrameHeight"), Tt = /* @__PURE__ */ i((e, r) => `${lr(
23
+ import { createTreeGridThemeContainerStyle as Xr, TREE_GRID_THEME_WRAPPER_CLASS as Zr, TREE_GRID_THEME_TABLE_RADIUS_CLASS as et, treeGridThemeStyles as rt } from "./internal/treeGridTheme.js";
24
+ import { isEmpty as U } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
25
+ import { delay as tt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/delay.js";
26
+ import { isEqual as ot } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
27
+ import { omit as nt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
28
+ import { isPlainObject as it } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";
29
+ const st = "NumberToString(count(5),',0')", lt = ["Formula", "FormulaFormula"], at = Object.prototype.hasOwnProperty, sr = /* @__PURE__ */ i((e) => JSON.stringify(e) ?? '""', "toTreeGridFormulaStringLiteral"), ct = /* @__PURE__ */ i((e, r) => `${sr(
50
30
  `${e} : `
51
- )}+${lt}+${lr(
31
+ )}+${st}+${sr(
52
32
  ` ${r}`
53
- )}`, "buildTreeGridTotalCountToolbarFormula"), pt = /* @__PURE__ */ i((e) => ct(e) ? dt.some(
54
- (r) => mt.call(e, r)
55
- ) : !1, "hasTreeGridToolbarFormulaField"), gt = /* @__PURE__ */ i((e) => {
33
+ )}`, "buildTreeGridTotalCountToolbarFormula"), ut = /* @__PURE__ */ i((e) => it(e) ? lt.some(
34
+ (r) => at.call(e, r)
35
+ ) : !1, "hasTreeGridToolbarFormulaField"), dt = /* @__PURE__ */ i((e) => {
56
36
  const r = e == null ? void 0 : e.Visible;
57
37
  return !!e && r !== 0 && r !== !1 && r !== "0";
58
38
  }, "isVisibleTreeGridRow"), le = /* @__PURE__ */ i((e) => {
59
39
  const r = e == null ? void 0 : e.Added;
60
40
  return !!e && r !== 0 && r !== !1 && r !== "0" && r !== void 0;
61
- }, "isAddedTreeGridRow"), fr = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !gt(e) ? !1 : e.Kind === "Data" || le(e), "isDisplayTreeGridRow"), Et = /* @__PURE__ */ i((e) => {
41
+ }, "isAddedTreeGridRow"), cr = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !dt(e) ? !1 : e.Kind === "Data" || le(e), "isDisplayTreeGridRow"), ft = /* @__PURE__ */ i((e) => {
62
42
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
63
43
  const r = [];
64
44
  let o = e.GetFirst();
@@ -67,363 +47,341 @@ const lt = "NumberToString(count(5),',0')", dt = ["Formula", "FormulaFormula"],
67
47
  return r;
68
48
  }
69
49
  return Object.values(e.Rows ?? {});
70
- }, "getTreeGridRows"), ht = /* @__PURE__ */ i((e, r) => {
50
+ }, "getTreeGridRows"), mt = /* @__PURE__ */ i((e, r) => {
71
51
  if (!e)
72
52
  return;
73
53
  const o = Object.keys(e.Cols ?? {}).filter(Boolean);
74
- Et(e).forEach((n) => {
75
- fr(n) && r.set(
54
+ ft(e).forEach((n) => {
55
+ cr(n) && r.set(
76
56
  n,
77
- new Map(o.map((c) => [c, ur(e, n, c)]))
57
+ new Map(o.map((d) => [d, ar(e, n, d)]))
78
58
  );
79
59
  });
80
- }, "captureTreeGridChangeBaselines"), Ct = /* @__PURE__ */ i((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Gt = /* @__PURE__ */ i((e, r, o) => {
60
+ }, "captureTreeGridChangeBaselines"), Tt = /* @__PURE__ */ i((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Rt = /* @__PURE__ */ i((e, r, o) => {
81
61
  const n = r;
82
- return Object.keys(e.Cols ?? {}).some((c) => c !== o && Ct(n[`${c}Changed`]));
83
- }, "hasOtherTreeGridChangedCells"), yt = /* @__PURE__ */ i((e, r, o) => {
62
+ return Object.keys(e.Cols ?? {}).some((d) => d !== o && Tt(n[`${d}Changed`]));
63
+ }, "hasOtherTreeGridChangedCells"), pt = /* @__PURE__ */ i((e, r, o) => {
84
64
  const n = r;
85
- n[`${o}Changed`] = 0, !le(r) && !dr(r) && !Gt(e, r, o) && (n.Changed = 0);
86
- }, "clearTreeGridCellChangedState"), Dt = /* @__PURE__ */ i((e, r, o) => {
65
+ n[`${o}Changed`] = 0, !le(r) && !lr(r) && !Rt(e, r, o) && (n.Changed = 0);
66
+ }, "clearTreeGridCellChangedState"), Ct = /* @__PURE__ */ i((e, r, o) => {
87
67
  const n = e.get(r);
88
68
  if (n != null && n.has(o))
89
69
  return n.get(o);
90
- }, "resolveTreeGridCellBaselineValue"), _t = /* @__PURE__ */ i(({
70
+ }, "resolveTreeGridCellBaselineValue"), gt = /* @__PURE__ */ i(({
91
71
  gridId: e,
92
72
  grid: r,
93
73
  row: o,
94
74
  col: n,
95
- backgroundColor: c,
96
- baselineMap: f,
97
- highlightRefresh: G
75
+ backgroundColor: d,
76
+ baselineMap: j,
77
+ highlightRefresh: L
98
78
  }) => {
99
- if (!fr(o) || le(o) || dr(o))
79
+ if (!cr(o) || le(o) || lr(o))
100
80
  return;
101
- const E = Dt(f, o, n), y = ur(r, o, n);
102
- if (E !== void 0 && y === E) {
103
- xr(e, { row: o, col: n }), yt(r, o, n);
81
+ const h = Ct(j, o, n), O = ar(r, o, n);
82
+ if (h !== void 0 && O === h) {
83
+ wr(e, { row: o, col: n }), pt(r, o, n);
104
84
  return;
105
85
  }
106
- Ur(e, {
86
+ Vr(e, {
107
87
  row: o,
108
88
  col: n,
109
- backgroundColor: c,
110
- refresh: G
89
+ backgroundColor: d,
90
+ refresh: L
111
91
  });
112
- }, "syncTreeGridChangedCellHighlightById"), Bt = [
92
+ }, "syncTreeGridChangedCellHighlightById"), Gt = [
113
93
  "addRow",
114
94
  "deleteRow",
115
95
  "selectRow"
116
- ], eo = /* @__PURE__ */ i(({
96
+ ], zt = /* @__PURE__ */ i(({
117
97
  id: e = "treeGridWrapper",
118
98
  containerStyle: r,
119
99
  containerClassName: o,
120
100
  toolbarRowBackgroundColor: n,
121
- className: c,
122
- style: f,
123
- height: G = "100%",
124
- width: E = "100%",
125
- canUseTableRadius: y = !1,
126
- tableBorderRadius: mr = kr,
127
- suppressCfg: W = 3,
128
- showToolbarTotalCount: de = !0,
129
- hideChildHeaderSortButtons: ue = !0,
130
- selectionScope: fe = "native",
131
- layoutUrl: Rr,
132
- layoutData: q,
133
- disabledAnimations: K = Bt,
134
- dataUrl: Tr,
135
- layoutOverrides: h,
136
- data: p,
137
- useDataUrl: me,
138
- onSelect: Re,
139
- onRowClick: Te,
140
- onRowAdd: pe,
141
- onRowDelete: ge,
142
- onRowUndelete: Ee,
143
- onRowChange: he,
144
- onClickButton: Ce,
101
+ className: d,
102
+ style: j,
103
+ height: L = "100%",
104
+ width: h = "100%",
105
+ canUseTableRadius: O = !1,
106
+ tableBorderRadius: ur = Sr,
107
+ suppressCfg: $ = 3,
108
+ showToolbarTotalCount: ae = !0,
109
+ hideChildHeaderSortButtons: ce = !0,
110
+ selectionScope: ue = "native",
111
+ layoutUrl: dr,
112
+ layoutData: W,
113
+ disabledAnimations: q = Gt,
114
+ dataUrl: fr,
115
+ layoutOverrides: C,
116
+ data: f,
117
+ useDataUrl: de,
118
+ onSelect: fe,
119
+ onRowClick: me,
120
+ onRowAdd: Te,
121
+ onRowDelete: Re,
122
+ onRowUndelete: pe,
123
+ onRowChange: Ce,
124
+ onClickButton: ge,
145
125
  onSave: Ge,
146
- onReady: ye,
147
- onAfterValueChanged: De,
148
- datePickerEditor: pr,
149
- highlightEditableCells: _e = !0,
150
- highlightChangedCells: Be = !0,
151
- syncDeletedRowCanEdit: be = !0,
152
- confirmDeletedRowRemoval: gr = !0,
153
- loading: Er,
154
- showLoading: g = !0
126
+ onReady: Ee,
127
+ onAfterValueChanged: ye,
128
+ datePickerEditor: mr,
129
+ highlightEditableCells: he = !0,
130
+ highlightChangedCells: be = !0,
131
+ syncDeletedRowCanEdit: Be = !0,
132
+ confirmDeletedRowRemoval: Tr = !0,
133
+ loading: Rr,
134
+ showLoading: m = !0
155
135
  }) => {
156
- var ze, Je;
157
- const { t: D } = Pr(), { confirmDelete: hr } = Vr(), Y = Mr(), z = (Je = (ze = Y == null ? void 0 : Y.theme) == null ? void 0 : ze.main) == null ? void 0 : Je.grid, ve = D("Common.전체"), Ae = D("Common.건"), J = ir(
158
- () => de && !pt(h == null ? void 0 : h.Toolbar) ? Tt(ve, Ae) : void 0,
136
+ var Ke, ze;
137
+ const { t: G } = Pr(), { confirmDelete: pr } = Nr(), K = Fr(), z = (ze = (Ke = K == null ? void 0 : K.theme) == null ? void 0 : Ke.main) == null ? void 0 : ze.grid, De = G("Common.전체"), Ie = G("Common.건"), J = or(
138
+ () => ae && !ut(C == null ? void 0 : C.Toolbar) ? ct(De, Ie) : void 0,
159
139
  [
160
- h,
161
- Ae,
162
- ve,
163
- de
140
+ C,
141
+ Ie,
142
+ De,
143
+ ae
164
144
  ]
165
- ), m = t(null), X = t(null), Ie = t(null), Z = t(null), Q = t(h), Le = t(J), Oe = t(W), Fe = t(ue), He = t(
166
- fe
167
- ), we = t(K), Se = t(p), ke = t(ar(q)), Me = gr ? async () => await hr({
168
- title: D("Message.삭제된 항목을 완전히 삭제하시겠습니까?"),
169
- description: D("Message.취소하면 삭제 상태가 해제됩니다."),
170
- okText: D("Button.완전 삭제")
171
- }) ? "remove" : "undelete" : void 0, w = t({
172
- onSelect: Re,
173
- onRowClick: Te,
174
- onRowAdd: pe,
175
- onRowDelete: ge,
145
+ ), c = t(null), _e = t(null), ve = t(null), Y = t(null), Q = t(C), Le = t(J), Oe = t($), Ae = t(ce), ke = t(
146
+ ue
147
+ ), Se = t(q), Fe = t(f), Pe = t(nr(W)), Me = Tr ? async () => await pr({
148
+ title: G("Message.삭제된 항목을 완전히 삭제하시겠습니까?"),
149
+ description: G("Message.취소하면 삭제 상태가 해제됩니다."),
150
+ okText: G("Button.완전 삭제")
151
+ }) ? "remove" : "undelete" : void 0, A = t({
152
+ onSelect: fe,
153
+ onRowClick: me,
154
+ onRowAdd: Te,
155
+ onRowDelete: Re,
176
156
  onBeforeRowUndelete: Me,
177
- onRowUndelete: Ee,
178
- onRowChange: he,
179
- onClickButton: Ce,
157
+ onRowUndelete: pe,
158
+ onRowChange: Ce,
159
+ onClickButton: ge,
180
160
  onSave: Ge,
181
- onReady: ye,
182
- onAfterValueChanged: De
183
- }), v = t(void 0), ee = t(!1), S = t(void 0), k = t(void 0), Cr = t(!1), A = t(0), _ = t(null), I = t(void 0), L = t(void 0), Pe = t(_e), re = t(Be), Ne = t(be), [B, Gr] = U(!1), [te, Ve] = U(void 0), [yr, O] = U(!1), [Dr, xe] = U(!1), M = Nr(), d = ir(
184
- () => Sr(z),
161
+ onReady: Ee,
162
+ onAfterValueChanged: ye
163
+ }), b = t(void 0), X = t(!1), k = t(void 0), S = t(void 0), Cr = t(!1), B = t(0), E = t(null), D = t(void 0), I = t(void 0), Ne = t(he), Z = t(be), we = t(Be), [F, gr] = ie(!1), [Gr, _] = ie(!1), [Er, Ve] = ie(!1), P = Mr(), a = or(
164
+ () => kr(z),
185
165
  [z]
186
- ), Ue = t(
187
- x(d.editable.backgroundColor) ?? x(Qe)
188
- ), oe = t(
189
- d.changed.backgroundColor ?? er
190
- ), P = t(/* @__PURE__ */ new WeakMap()), $e = t(d.state.focusedCellBackgroundColor), je = t(d.state.selectedCellBackgroundColor), We = t(d.state.hoverCellBackgroundColor), qe = t(M.id), _r = g && p !== void 0 && B && k.current !== p, ne = g && Er === !0 || g && (yr || _r), ie = !ne && p !== void 0 && j(p) && !Dr, Ke = /* @__PURE__ */ i((s) => {
191
- xe(cr(s));
192
- }, "syncHasDisplayDataRows"), Br = /* @__PURE__ */ i((s, a, R, T, u) => {
193
- var H, C;
194
- re.current && a.Fixed !== "Foot" && _t({
166
+ ), He = t(
167
+ H(a.editable.backgroundColor) ?? H(Qe)
168
+ ), ee = t(
169
+ a.changed.backgroundColor ?? Xe
170
+ ), M = t(/* @__PURE__ */ new WeakMap()), xe = t(a.state.focusedCellBackgroundColor), Ue = t(a.state.selectedCellBackgroundColor), je = t(a.state.hoverCellBackgroundColor), $e = t(P.id), yr = m && f !== void 0 && F && S.current !== f, re = m && Rr === !0 || m && (Gr || yr), te = !re && f !== void 0 && U(f) && !Er, We = /* @__PURE__ */ i((s) => {
171
+ Ve(ir(s));
172
+ }, "syncHasDisplayDataRows"), hr = /* @__PURE__ */ i((s, l, T, g, R) => {
173
+ var v, p;
174
+ Z.current && l.Fixed !== "Foot" && gt({
195
175
  gridId: e,
196
176
  grid: s,
197
- row: a,
198
- col: R,
199
- backgroundColor: oe.current,
200
- baselineMap: P.current,
201
- highlightRefresh: u == null ? void 0 : u.highlightRefresh
177
+ row: l,
178
+ col: T,
179
+ backgroundColor: ee.current,
180
+ baselineMap: M.current,
181
+ highlightRefresh: R == null ? void 0 : R.highlightRefresh
202
182
  });
203
- const l = ((H = w.current) == null ? void 0 : H.onAfterValueChanged) ?? ((C = w.current) == null ? void 0 : C.onRowChange);
204
- l == null || l(s, a, R, T);
183
+ const u = ((v = A.current) == null ? void 0 : v.onAfterValueChanged) ?? ((p = A.current) == null ? void 0 : p.onRowChange);
184
+ u == null || u(s, l, T, g);
205
185
  }, "handleDatePickerEditorValueChange");
206
- Q.current = h, Le.current = J, Oe.current = W, Fe.current = ue, He.current = fe, we.current = K, Se.current = p, ke.current = ar(q), Pe.current = _e, re.current = Be, Ne.current = be, Ue.current = x(d.editable.backgroundColor) ?? x(Qe), oe.current = d.changed.backgroundColor ?? er, $e.current = d.state.focusedCellBackgroundColor, je.current = d.state.selectedCellBackgroundColor, We.current = d.state.hoverCellBackgroundColor;
186
+ Q.current = C, Le.current = J, Oe.current = $, Ae.current = ce, ke.current = ue, Se.current = q, Fe.current = f, Pe.current = nr(W), Ne.current = he, Z.current = be, we.current = Be, He.current = H(a.editable.backgroundColor) ?? H(Qe), ee.current = a.changed.backgroundColor ?? Xe, xe.current = a.state.focusedCellBackgroundColor, Ue.current = a.state.selectedCellBackgroundColor, je.current = a.state.hoverCellBackgroundColor;
207
187
  const {
208
188
  datePickerEditorElement: br,
209
- handleDatePickerEditorButtonClick: vr,
210
- handleDatePickerEditorCellClick: Ar,
189
+ handleDatePickerEditorButtonClick: Br,
190
+ handleDatePickerEditorCellClick: Dr,
211
191
  handleDatePickerEditorKeyDown: Ir,
212
- handleDatePickerEditorStartEdit: Lr
213
- } = jr({
214
- config: pr,
215
- treeGridInstanceRef: m,
216
- isTreeGridReady: B,
217
- onValueChange: Br
218
- }), { errorTooltipElement: Or, showErrorTooltip: Fr, hideErrorTooltip: b } = Wr();
219
- w.current = {
220
- onSelect: Re,
221
- onRowClick: Te,
222
- onRowAdd: pe,
223
- onRowDelete: ge,
192
+ handleDatePickerEditorStartEdit: _r
193
+ } = Ur({
194
+ config: mr,
195
+ treeGridInstanceRef: c,
196
+ isTreeGridReady: F,
197
+ onValueChange: hr
198
+ }), { errorTooltipElement: vr, showErrorTooltip: Lr, hideErrorTooltip: y } = jr();
199
+ A.current = {
200
+ onSelect: fe,
201
+ onRowClick: me,
202
+ onRowAdd: Te,
203
+ onRowDelete: Re,
224
204
  onBeforeRowUndelete: Me,
225
- onRowUndelete: Ee,
226
- onRowChange: he,
227
- onClickButton: Ce,
205
+ onRowUndelete: pe,
206
+ onRowChange: Ce,
207
+ onClickButton: ge,
228
208
  onSave: Ge,
229
- onReady: ye,
230
- onAfterValueChanged: De,
231
- onInternalButtonClick: vr,
232
- onInternalCellClick: Ar,
209
+ onReady: Ee,
210
+ onAfterValueChanged: ye,
211
+ onInternalButtonClick: Br,
212
+ onInternalCellClick: Dr,
233
213
  onInternalKeyDown: Ir,
234
- onInternalStartEdit: Lr
214
+ onInternalStartEdit: _r
235
215
  };
236
- const Ye = qr({
237
- visible: ne || ie,
238
- containerRef: X,
239
- treeGridInstanceRef: m,
216
+ const qe = $r({
217
+ visible: re || te,
218
+ containerRef: _e,
219
+ treeGridInstanceRef: c,
240
220
  debugId: e
241
221
  }), N = /* @__PURE__ */ i(() => {
222
+ D.current !== void 0 && (window.clearTimeout(D.current), D.current = void 0);
223
+ }, "clearBindingLoadingHideTimeout"), oe = /* @__PURE__ */ i(() => {
242
224
  I.current !== void 0 && (window.clearTimeout(I.current), I.current = void 0);
243
- }, "clearBindingLoadingHideTimeout"), se = /* @__PURE__ */ i(() => {
244
- L.current !== void 0 && (window.clearTimeout(L.current), L.current = void 0);
245
225
  }, "clearBodyReloadStartTimeout");
246
- $(() => {
247
- const s = /* @__PURE__ */ i((a) => {
248
- var T;
249
- ((T = a.detail) == null ? void 0 : T.gridId) === e && xe(cr(m.current));
226
+ x(() => {
227
+ const s = /* @__PURE__ */ i((l) => {
228
+ var g;
229
+ ((g = l.detail) == null ? void 0 : g.gridId) === e && Ve(ir(c.current));
250
230
  }, "handleBodyRowsChanged");
251
- return window.addEventListener(rr, s), () => {
252
- window.removeEventListener(rr, s);
253
- };
254
- }, [e]), $(() => {
255
- g || (se(), N(), _.current = null, O(!1));
256
- }, [g]), sr(() => {
257
- if (!B) {
258
- Ve(void 0);
259
- return;
260
- }
261
- let s, a = 0;
262
- const R = /* @__PURE__ */ i(() => {
263
- const u = Rt(
264
- X.current
265
- );
266
- return u === void 0 ? !1 : (Ve(
267
- (l) => l === u ? l : u
268
- ), !0);
269
- }, "measureHeaderFrameHeight"), T = /* @__PURE__ */ i(() => {
270
- s === void 0 && (s = window.requestAnimationFrame(() => {
271
- s = void 0, a += 1, !R() && a < ft && T();
272
- }));
273
- }, "scheduleHeaderFrameHeightMeasure");
274
- return T(), () => {
275
- s !== void 0 && window.cancelAnimationFrame(s);
231
+ return window.addEventListener(Ze, s), () => {
232
+ window.removeEventListener(Ze, s);
276
233
  };
277
- }, [B, h, E, d.header.height]), $(() => {
234
+ }, [e]), x(() => {
235
+ m || (oe(), N(), E.current = null, _(!1));
236
+ }, [m]), x(() => {
278
237
  var s;
279
- if (M.id !== qe.current && !j(m.current) && ((s = m.current) == null || s.Dispose(), m.current = null, qe.current = M.id), !!j(m.current))
280
- return Kr({
238
+ if (P.id !== $e.current && !U(c.current) && ((s = c.current) == null || s.Dispose(), c.current = null, $e.current = P.id), !!U(c.current))
239
+ return Wr({
281
240
  id: e,
282
- latestEventHandlersRef: w,
283
- layoutHasExplicitEnterModeRef: ke,
284
- highlightEditableCellsRef: Pe,
285
- highlightChangedCellsRef: re,
286
- syncDeletedRowCanEditRef: Ne,
287
- editableCellBackgroundColorValueRef: Ue,
288
- changedCellBackgroundColorRef: oe,
289
- focusedCellBackgroundColorRef: $e,
290
- selectedCellBackgroundColorRef: je,
291
- hoverCellBackgroundColorRef: We,
292
- changedCellBaselineRef: P,
293
- treeGridInstanceRef: m,
294
- treeGridInitStartedAtRef: Ie,
241
+ latestEventHandlersRef: A,
242
+ layoutHasExplicitEnterModeRef: Pe,
243
+ highlightEditableCellsRef: Ne,
244
+ highlightChangedCellsRef: Z,
245
+ syncDeletedRowCanEditRef: we,
246
+ editableCellBackgroundColorValueRef: He,
247
+ changedCellBackgroundColorRef: ee,
248
+ focusedCellBackgroundColorRef: xe,
249
+ selectedCellBackgroundColorRef: Ue,
250
+ hoverCellBackgroundColorRef: je,
251
+ changedCellBaselineRef: M,
252
+ treeGridInstanceRef: c,
253
+ treeGridInitStartedAtRef: ve,
295
254
  latestLayoutOverridesRef: Q,
296
255
  latestToolbarTotalCountFormulaRef: Le,
297
256
  latestSuppressCfgRef: Oe,
298
- latestHideChildHeaderSortButtonsRef: Fe,
299
- latestSelectionScopeRef: He,
300
- latestDisabledAnimationsRef: we,
301
- appliedLayoutOverridesRef: S,
302
- appliedBodyDataPropRef: k,
257
+ latestHideChildHeaderSortButtonsRef: Ae,
258
+ latestSelectionScopeRef: ke,
259
+ latestDisabledAnimationsRef: Se,
260
+ appliedLayoutOverridesRef: k,
261
+ appliedBodyDataPropRef: S,
303
262
  hasAppliedInitialLayoutRef: Cr,
304
- syncHasDisplayDataRows: Ke,
305
- setIsTreeGridReady: Gr,
306
- showErrorTooltip: Fr,
307
- hideErrorTooltip: b
308
- }), Ie.current = ae(), tr(e, "init"), or(e, "TreeGrid init start", {
309
- useDataUrl: !!me,
310
- bodyRowCount: ce(p)
263
+ syncHasDisplayDataRows: We,
264
+ setIsTreeGridReady: gr,
265
+ showErrorTooltip: Lr,
266
+ hideErrorTooltip: y
267
+ }), ve.current = ne(), er(e, "init"), rr(e, "TreeGrid init start", {
268
+ useDataUrl: !!de,
269
+ bodyRowCount: se(f)
311
270
  }), window.TreeGrid(
312
- Yr({
271
+ qr({
313
272
  id: e,
314
- layoutUrl: Rr,
315
- layoutData: q,
273
+ layoutUrl: dr,
274
+ layoutData: W,
316
275
  toolbarTotalCountFormula: J,
317
- suppressCfg: W,
318
- disabledAnimations: K,
319
- dataUrl: Tr,
320
- bodyData: p,
321
- useDataUrl: me,
322
- width: E,
323
- height: G,
324
- languageId: M.id
276
+ suppressCfg: $,
277
+ disabledAnimations: q,
278
+ dataUrl: fr,
279
+ bodyData: f,
280
+ useDataUrl: de,
281
+ width: h,
282
+ height: L,
283
+ languageId: P.id
325
284
  }),
326
285
  e,
327
286
  e
328
287
  ), () => {
329
- b(), it(() => {
330
- var a;
331
- (a = m.current) == null || a.Dispose();
288
+ y(), tt(() => {
289
+ var l;
290
+ (l = c.current) == null || l.Dispose();
332
291
  }, 200);
333
292
  };
334
- }, []), sr(() => {
335
- const s = m.current, a = Q.current, R = Se.current;
336
- if (j(s) || !B)
293
+ }, []), Hr(() => {
294
+ const s = c.current, l = Q.current, T = Fe.current;
295
+ if (U(s) || !F)
337
296
  return;
338
- const T = S.current !== a && !st(S.current, a), u = k.current !== R && (!ee.current || v.current !== R);
339
- if (!(!T && !u)) {
340
- if (b(), T) {
341
- const l = ae();
342
- Xr(s, a, u), S.current = a, nr(e, "apply layout", l, {
343
- disableBodyReload: !!u
297
+ const g = k.current !== l && !ot(k.current, l), R = S.current !== T && (!X.current || b.current !== T);
298
+ if (!(!g && !R)) {
299
+ if (y(), g) {
300
+ const u = ne();
301
+ Jr(s, l, R), k.current = l, tr(e, "apply layout", u, {
302
+ disableBodyReload: !!R
344
303
  });
345
304
  }
346
- if (u) {
347
- const l = A.current + 1, H = /* @__PURE__ */ i(() => {
348
- const C = v.current;
349
- L.current = void 0, Z.current = ae(), tr(e, "reload"), or(e, "ReloadBody start", {
350
- bodyRowCount: ce(C)
351
- }), zr(s, C, () => {
352
- if (A.current !== l)
305
+ if (R) {
306
+ const u = B.current + 1, v = /* @__PURE__ */ i(() => {
307
+ const p = b.current;
308
+ I.current = void 0, Y.current = ne(), er(e, "reload"), rr(e, "ReloadBody start", {
309
+ bodyRowCount: se(p)
310
+ }), Kr(s, p, () => {
311
+ if (B.current !== u)
353
312
  return;
354
- k.current = C, P.current = /* @__PURE__ */ new WeakMap(), ht(s, P.current), Ke(s), nr(e, "ReloadBody end", Z.current, {
355
- bodyRowCount: ce(C)
356
- }), Z.current = null, v.current === C && (v.current = void 0, ee.current = !1);
357
- const Xe = _.current;
358
- if (!g || Xe === null) {
359
- _.current = null, O(!1);
313
+ S.current = p, M.current = /* @__PURE__ */ new WeakMap(), mt(s, M.current), We(s), tr(e, "ReloadBody end", Y.current, {
314
+ bodyRowCount: se(p)
315
+ }), Y.current = null, b.current === p && (b.current = void 0, X.current = !1);
316
+ const Je = E.current;
317
+ if (!m || Je === null) {
318
+ E.current = null, _(!1);
360
319
  return;
361
320
  }
362
- const Ze = Math.max(
321
+ const Ye = Math.max(
363
322
  0,
364
- Jr - (Date.now() - Xe)
323
+ zr - (Date.now() - Je)
365
324
  );
366
- if (N(), Ze === 0) {
367
- _.current = null, O(!1);
325
+ if (N(), Ye === 0) {
326
+ E.current = null, _(!1);
368
327
  return;
369
328
  }
370
- I.current = window.setTimeout(() => {
371
- A.current === l && (I.current = void 0, _.current = null, O(!1));
372
- }, Ze);
329
+ D.current = window.setTimeout(() => {
330
+ B.current === u && (D.current = void 0, E.current = null, _(!1));
331
+ }, Ye);
373
332
  });
374
333
  }, "runBodyReload");
375
- A.current = l, v.current = R, ee.current = !0, g && R !== void 0 ? (se(), N(), _.current = Date.now(), O(!0), L.current = window.setTimeout(() => {
376
- A.current === l && H();
377
- }, 0)) : H();
334
+ B.current = u, b.current = T, X.current = !0, m && T !== void 0 ? (oe(), N(), E.current = Date.now(), _(!0), I.current = window.setTimeout(() => {
335
+ B.current === u && v();
336
+ }, 0)) : v();
378
337
  }
379
338
  }
380
- }, [B, h, p, g, e, b]), $(() => () => {
381
- b(), se(), N();
382
- }, [b]);
383
- const F = et({
384
- width: E,
385
- height: G,
386
- treeGridTheme: d,
339
+ }, [F, C, f, m, e, y]), x(() => () => {
340
+ y(), oe(), N();
341
+ }, [y]);
342
+ const w = Xr({
343
+ width: h,
344
+ height: L,
345
+ treeGridTheme: a,
387
346
  gridThemeConfig: z,
388
347
  containerStyle: r,
389
- tableBorderRadius: y ? mr : void 0
348
+ tableBorderRadius: O ? ur : void 0
390
349
  });
391
- return n !== void 0 && (F["--owp-tree-grid-toolbar-row-background-color"] = String(n)), te !== void 0 && (F["--owp-tree-grid-header-frame-height"] = te), (g || ie) && (F.position = r != null && r.position && r.position !== "static" ? r.position : "relative", F.isolation = "isolate"), /* @__PURE__ */ wr(
350
+ return n !== void 0 && (w["--owp-tree-grid-toolbar-row-background-color"] = String(n)), (m || te) && (w.position = r != null && r.position && r.position !== "static" ? r.position : "relative", w.isolation = "isolate"), /* @__PURE__ */ Ar(
392
351
  "div",
393
352
  {
394
- ref: X,
353
+ ref: _e,
395
354
  className: [
396
- rt,
397
- te !== void 0 && tt,
398
- y && ot,
355
+ Zr,
356
+ O && et,
399
357
  o
400
358
  ].filter(Boolean).join(" "),
401
- style: F,
359
+ style: w,
402
360
  children: [
403
- /* @__PURE__ */ V($r, { styles: nt }),
404
- /* @__PURE__ */ V("div", { id: e, className: c, style: at(f, ["height", "width"]) }),
361
+ /* @__PURE__ */ V(xr, { styles: rt }),
362
+ /* @__PURE__ */ V("div", { id: e, className: d, style: nt(j, ["height", "width"]) }),
405
363
  /* @__PURE__ */ V(
406
364
  Qr,
407
365
  {
408
- visible: ie,
409
- message: D("Message.조회된 결과가 없습니다."),
410
- overlayFrame: Ye
366
+ visible: te,
367
+ message: G("Message.조회된 결과가 없습니다."),
368
+ overlayFrame: qe
411
369
  }
412
370
  ),
413
371
  /* @__PURE__ */ V(
414
- Zr,
372
+ Yr,
415
373
  {
416
- visible: ne,
417
- overlayFrame: Ye
374
+ visible: re,
375
+ overlayFrame: qe
418
376
  }
419
377
  ),
420
378
  br,
421
- Or
379
+ vr
422
380
  ]
423
381
  }
424
382
  );
425
383
  }, "OwpTreeGrid");
426
384
  export {
427
- eo as OwpTreeGrid
385
+ zt as OwpTreeGrid
428
386
  };
429
387
  //# sourceMappingURL=OwpTreeGrid.js.map