@owp/core 2.2.2 → 2.2.4
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.
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/OwpMrtTable/OwpMrtTable.js +252 -201
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTableNoDataOverlay.js +53 -0
- package/dist/components/OwpMrtTable/OwpMrtTableNoDataOverlay.js.map +1 -0
- package/dist/components/OwpPageTitle/OwpPageTitle.js +74 -18
- package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js +44 -29
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +104 -43
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +291 -192
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js +48 -46
- package/dist/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.js.map +1 -1
- package/dist/components/OwpTreeGrid/perf.js +31 -0
- package/dist/components/OwpTreeGrid/perf.js.map +1 -0
- package/dist/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.js +34 -0
- package/dist/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.js.map +1 -0
- package/dist/hooks/useHeaderWrapState.js +48 -0
- package/dist/hooks/useHeaderWrapState.js.map +1 -0
- package/dist/hooks.js +40 -38
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +25 -23
- package/dist/index.js.map +1 -1
- package/dist/layout/components/navigation/vertical/NavVerticalLayout.js +63 -27
- package/dist/layout/components/navigation/vertical/NavVerticalLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +2 -0
- package/dist/types/components/OwpMrtTable/OwpMrtTableNoDataOverlay.d.ts +14 -0
- package/dist/types/components/OwpSection/OwpSection.d.ts +3 -1
- package/dist/types/components/OwpTreeGrid/hooks/useOwpTreeGridOverlayFrame.d.ts +2 -1
- package/dist/types/components/OwpTreeGrid/perf.d.ts +30 -0
- package/dist/types/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.d.ts +13 -0
- package/dist/types/components/OwpTreeGridResetChangesButton/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useHeaderWrapState.d.ts +14 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/preloadOnIdle.d.ts +7 -0
- package/dist/types/utils/treeGridBodyRowsEvent.d.ts +9 -0
- package/dist/utils/preloadOnIdle.js +27 -0
- package/dist/utils/preloadOnIdle.js.map +1 -0
- package/dist/utils/treeGridBodyRowsEvent.js +14 -0
- package/dist/utils/treeGridBodyRowsEvent.js.map +1 -0
- package/dist/utils/treeGridUtil.js +79 -72
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/dist/utils.js +64 -62
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,246 +1,345 @@
|
|
|
1
|
-
var
|
|
2
|
-
var i = (e,
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useOwpTranslation as
|
|
5
|
-
import { useGetCurrentLanguage as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
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";
|
|
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 = {
|
|
18
20
|
en: "/assets/vendors/Grid/TextEN.xml",
|
|
19
21
|
kr: "/assets/vendors/Grid/TextKR.xml"
|
|
20
|
-
},
|
|
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) : (
|
|
21
23
|
// @ts-expect-error - API base URL env is provided by host app
|
|
22
24
|
`undefined/${e}?noCache=${Date.now()}`
|
|
23
|
-
), "resolveTreeGridDataUrl"),
|
|
25
|
+
), "resolveTreeGridDataUrl"), ze = /* @__PURE__ */ i((e, t, a) => e ? { Url: We(t) } : { Data: { Body: [V(a) ? [] : a] } }, "buildTreeGridDataSource"), Qe = /* @__PURE__ */ i(({
|
|
24
26
|
id: e,
|
|
25
|
-
layoutUrl:
|
|
26
|
-
dataUrl:
|
|
27
|
-
bodyData:
|
|
28
|
-
useDataUrl:
|
|
29
|
-
width:
|
|
30
|
-
height:
|
|
31
|
-
languageId:
|
|
27
|
+
layoutUrl: t,
|
|
28
|
+
dataUrl: a,
|
|
29
|
+
bodyData: G,
|
|
30
|
+
useDataUrl: R,
|
|
31
|
+
width: D,
|
|
32
|
+
height: v,
|
|
33
|
+
languageId: b
|
|
32
34
|
}) => ({
|
|
33
35
|
id: e,
|
|
34
|
-
Layout: { Url:
|
|
35
|
-
Data:
|
|
36
|
+
Layout: { Url: Oe(t ?? "") },
|
|
37
|
+
Data: ze(R, a, G),
|
|
36
38
|
Text: {
|
|
37
|
-
Url:
|
|
39
|
+
Url: Ke(b)
|
|
38
40
|
},
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
41
|
+
width: D,
|
|
42
|
+
height: v,
|
|
41
43
|
Debug: "Error"
|
|
42
|
-
}), "buildTreeGridInitializationOptions"),
|
|
43
|
-
|
|
44
|
-
|
|
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;
|
|
45
66
|
e.Data.Data = {
|
|
46
|
-
...
|
|
47
|
-
Data: { Body: [
|
|
67
|
+
...G,
|
|
68
|
+
Data: { Body: [t || []] },
|
|
48
69
|
Url: ""
|
|
49
|
-
}, e.ReloadBody(
|
|
50
|
-
}, "replaceTreeGridBodyData"),
|
|
70
|
+
}, e.ReloadBody(a);
|
|
71
|
+
}, "replaceTreeGridBodyData"), Ze = /* @__PURE__ */ i(({
|
|
51
72
|
id: e,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
onAfterValueChanged: a,
|
|
62
|
-
treeGridInstanceRef: A,
|
|
63
|
-
latestLayoutOverridesRef: M,
|
|
64
|
-
appliedLayoutOverridesRef: k,
|
|
65
|
-
appliedBodyDataPropRef: q,
|
|
66
|
-
hasAppliedInitialLayoutRef: S,
|
|
67
|
-
setIsTreeGridReady: H
|
|
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
|
|
68
82
|
}) => {
|
|
69
|
-
const
|
|
70
|
-
window.TGSetEvent("OnRowAdd", e, (
|
|
71
|
-
|
|
72
|
-
|
|
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(
|
|
73
90
|
"OnClick",
|
|
74
91
|
e,
|
|
75
|
-
|
|
76
|
-
|
|
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
|
+
);
|
|
77
103
|
}, 300)
|
|
78
|
-
), typeof
|
|
104
|
+
), typeof (r == null ? void 0 : r.onClickButton) == "function" && window.TGSetEvent(
|
|
79
105
|
"OnClickButton",
|
|
80
106
|
e,
|
|
81
|
-
|
|
82
|
-
|
|
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
|
+
);
|
|
83
116
|
}, 300)
|
|
84
|
-
), typeof
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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(
|
|
91
137
|
"OnSelect",
|
|
92
138
|
e,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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);
|
|
96
143
|
}, 100)
|
|
97
|
-
), typeof
|
|
98
|
-
|
|
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
|
+
);
|
|
99
152
|
}), window.TGSetEvent(
|
|
100
153
|
"OnReady",
|
|
101
154
|
e,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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);
|
|
106
164
|
}
|
|
107
165
|
}, 100)
|
|
108
166
|
);
|
|
109
|
-
}, "bindTreeGridEvents"),
|
|
167
|
+
}, "bindTreeGridEvents"), Gt = /* @__PURE__ */ i(({
|
|
110
168
|
id: e = "treeGridWrapper",
|
|
111
|
-
containerStyle:
|
|
112
|
-
containerClassName:
|
|
113
|
-
className:
|
|
114
|
-
style:
|
|
115
|
-
height:
|
|
116
|
-
width:
|
|
117
|
-
layoutUrl:
|
|
118
|
-
dataUrl:
|
|
119
|
-
layoutOverrides:
|
|
120
|
-
data:
|
|
121
|
-
useDataUrl:
|
|
122
|
-
onSelect:
|
|
123
|
-
onRowClick:
|
|
124
|
-
onRowAdd:
|
|
125
|
-
onRowDelete:
|
|
126
|
-
onRowUndelete:
|
|
127
|
-
onRowChange:
|
|
128
|
-
onClickButton:
|
|
129
|
-
onSave:
|
|
130
|
-
onReady:
|
|
131
|
-
onAfterValueChanged:
|
|
132
|
-
loading:
|
|
133
|
-
showLoading:
|
|
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
|
|
134
192
|
}) => {
|
|
135
|
-
const { t:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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));
|
|
206
|
+
}, "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
|
|
218
|
+
};
|
|
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);
|
|
145
228
|
}, "clearBodyReloadStartTimeout");
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
229
|
+
$(() => {
|
|
230
|
+
const f = /* @__PURE__ */ i((y) => {
|
|
231
|
+
var E;
|
|
232
|
+
((E = y.detail) == null ? void 0 : E.gridId) === e && de(be(m.current));
|
|
233
|
+
}, "handleBodyRowsChanged");
|
|
234
|
+
return window.addEventListener(ye, f), () => {
|
|
235
|
+
window.removeEventListener(ye, f);
|
|
236
|
+
};
|
|
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({
|
|
152
243
|
id: e,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
appliedLayoutOverridesRef: x,
|
|
166
|
-
appliedBodyDataPropRef: C,
|
|
167
|
-
hasAppliedInitialLayoutRef: pe,
|
|
168
|
-
setIsTreeGridReady: me
|
|
244
|
+
latestEventHandlersRef: se,
|
|
245
|
+
treeGridInstanceRef: m,
|
|
246
|
+
treeGridInitStartedAtRef: ce,
|
|
247
|
+
latestLayoutOverridesRef: K,
|
|
248
|
+
appliedLayoutOverridesRef: P,
|
|
249
|
+
appliedBodyDataPropRef: h,
|
|
250
|
+
hasAppliedInitialLayoutRef: ge,
|
|
251
|
+
syncHasDisplayDataRows: ae,
|
|
252
|
+
setIsTreeGridReady: Ie
|
|
253
|
+
}), ce.current = H(), Ge(e, "init"), Re(e, "TreeGrid init start", {
|
|
254
|
+
useDataUrl: !!o,
|
|
255
|
+
bodyRowCount: j(r)
|
|
169
256
|
}), window.TreeGrid(
|
|
170
|
-
|
|
257
|
+
Qe({
|
|
171
258
|
id: e,
|
|
172
|
-
layoutUrl:
|
|
173
|
-
dataUrl:
|
|
174
|
-
bodyData:
|
|
175
|
-
useDataUrl:
|
|
176
|
-
width:
|
|
177
|
-
height:
|
|
178
|
-
languageId:
|
|
259
|
+
layoutUrl: b,
|
|
260
|
+
dataUrl: w,
|
|
261
|
+
bodyData: r,
|
|
262
|
+
useDataUrl: o,
|
|
263
|
+
width: v,
|
|
264
|
+
height: D,
|
|
265
|
+
languageId: k.id
|
|
179
266
|
}),
|
|
180
267
|
e,
|
|
181
268
|
e
|
|
182
269
|
), () => {
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
(
|
|
270
|
+
Ue(() => {
|
|
271
|
+
var y;
|
|
272
|
+
(y = m.current) == null || y.Dispose();
|
|
186
273
|
}, 200);
|
|
187
274
|
};
|
|
188
|
-
}, []),
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
275
|
+
}, []), Pe(() => {
|
|
276
|
+
const f = m.current, y = K.current, _ = ie.current;
|
|
277
|
+
if (V(f) || !z)
|
|
191
278
|
return;
|
|
192
|
-
const
|
|
193
|
-
if (!(!
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return;
|
|
199
|
-
C.current = J, w.current === J && (w.current = void 0, F.current = !1);
|
|
200
|
-
const se = D.current;
|
|
201
|
-
if (!c || se === null) {
|
|
202
|
-
D.current = null, b(!1);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const ue = Math.max(
|
|
206
|
-
0,
|
|
207
|
-
Le - (Date.now() - se)
|
|
208
|
-
);
|
|
209
|
-
if (N(), ue === 0) {
|
|
210
|
-
D.current = null, b(!1);
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
O.current = window.setTimeout(() => {
|
|
214
|
-
E.current === P && (O.current = void 0, D.current = null, b(!1));
|
|
215
|
-
}, ue);
|
|
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
|
|
216
285
|
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
286
|
+
}
|
|
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)
|
|
294
|
+
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);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const me = Math.max(
|
|
304
|
+
0,
|
|
305
|
+
qe - (Date.now() - Te)
|
|
306
|
+
);
|
|
307
|
+
if (F(), me === 0) {
|
|
308
|
+
B.current = null, x(!1);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
A.current = window.setTimeout(() => {
|
|
312
|
+
I.current === O && (A.current = void 0, B.current = null, x(!1));
|
|
313
|
+
}, me);
|
|
314
|
+
});
|
|
315
|
+
}, "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();
|
|
319
|
+
}
|
|
221
320
|
}
|
|
222
|
-
}, [
|
|
223
|
-
|
|
321
|
+
}, [z, S, r, T, e]), $(() => () => {
|
|
322
|
+
Y(), F();
|
|
224
323
|
}, []);
|
|
225
|
-
const
|
|
226
|
-
height:
|
|
227
|
-
width:
|
|
228
|
-
...
|
|
324
|
+
const J = {
|
|
325
|
+
height: D,
|
|
326
|
+
width: v,
|
|
327
|
+
...t
|
|
229
328
|
};
|
|
230
|
-
return (
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
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,
|
|
234
333
|
{
|
|
235
|
-
visible:
|
|
236
|
-
message:
|
|
237
|
-
overlayFrame:
|
|
334
|
+
visible: X,
|
|
335
|
+
message: Ce("Message.조회된 결과가 없습니다."),
|
|
336
|
+
overlayFrame: le
|
|
238
337
|
}
|
|
239
338
|
),
|
|
240
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ Z(ke, { visible: Q, overlayFrame: le })
|
|
241
340
|
] });
|
|
242
341
|
}, "OwpTreeGrid");
|
|
243
342
|
export {
|
|
244
|
-
|
|
343
|
+
Gt as OwpTreeGrid
|
|
245
344
|
};
|
|
246
345
|
//# sourceMappingURL=OwpTreeGrid.js.map
|