@owp/core 2.5.17 → 2.5.19

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