@owp/core 2.2.4 → 2.2.6

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