@owp/core 2.5.35 → 2.5.37

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