@owp/core 2.5.58 → 2.5.60
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/index3.js +2 -2
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +205 -203
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +667 -642
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +559 -391
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/constants/gridTheme.js +13 -12
- package/dist/constants/gridTheme.js.map +1 -1
- package/dist/constants/treeGrid.js +46 -45
- package/dist/constants/treeGrid.js.map +1 -1
- package/dist/constants.js +26 -25
- package/dist/features/themePreview/configs/grid.js +18 -17
- package/dist/features/themePreview/configs/grid.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewDefinitions.js +4 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
- package/dist/node_modules/.pnpm/inko@1.1.1/node_modules/inko/index.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/constants.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/constants.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/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/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +5 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +5 -1
- package/dist/types/constants/gridTheme.d.ts +2 -0
- package/dist/types/constants/treeGrid.d.ts +2 -0
- package/dist/types/features/themePreview/configs/grid.d.ts +1 -0
- package/dist/types/features/themePreview/configs/settings.d.ts +1 -0
- package/dist/types/types/OwpGridThemeTypes.d.ts +2 -0
- package/dist/types/utils/treeGridUtil.d.ts +17 -11
- package/dist/utils/treeGridUtil.js +137 -133
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Y = Object.defineProperty;
|
|
2
2
|
var l = (e, t) => Y(e, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { TREEGRID_CELL_CHANGED_CLASS as M, TREEGRID_CELL_HIGHLIGHT_COLOR as X } from "../constants/treeGrid.js";
|
|
4
|
-
import { TREEGRID_INPUT_CELL_COLOR as
|
|
4
|
+
import { TREEGRID_INPUT_CELL_COLOR as Lt, TREEGRID_WARNING_CELL_COLOR as vt } from "../constants/treeGrid.js";
|
|
5
5
|
import { parseTreeGridXmlToJson as Q } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
|
|
6
6
|
import { resolveTreeGridSelectedRows as J } from "../components/OwpTreeGrid/internal/treeGridSelection.js";
|
|
7
7
|
import { emitTreeGridBodyRowsChanged as D } from "./internal/treeGridBodyRowsEvent.js";
|
|
@@ -15,12 +15,12 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
15
15
|
label: e
|
|
16
16
|
}) => `${e} 필수 입력`, "DEFAULT_TREE_GRID_REQUIRED_CELL_MESSAGE_FACTORY"), ae = [
|
|
17
17
|
"added"
|
|
18
|
-
], y = /* @__PURE__ */ l((e) => A(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), S = y, ie = y,
|
|
18
|
+
], y = /* @__PURE__ */ l((e) => A(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), S = y, ie = y, de = /* @__PURE__ */ l((e, t, r) => {
|
|
19
19
|
try {
|
|
20
20
|
e.AnimateRow(t, r);
|
|
21
21
|
} catch {
|
|
22
22
|
}
|
|
23
|
-
}, "animateTreeGridRow"),
|
|
23
|
+
}, "animateTreeGridRow"), ce = /* @__PURE__ */ l((e) => {
|
|
24
24
|
e && (e[$] = 1);
|
|
25
25
|
}, "markTreeGridRowAddedById"), oe = /* @__PURE__ */ l((e) => {
|
|
26
26
|
const t = e == null ? void 0 : e[$];
|
|
@@ -34,14 +34,14 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
34
34
|
}, "isTreeGridChangedRow"), w = /* @__PURE__ */ l((e) => {
|
|
35
35
|
const t = e == null ? void 0 : e.Deleted;
|
|
36
36
|
return t === 1 || t === "1" || t === !0;
|
|
37
|
-
}, "isTreeGridDeletedRow"),
|
|
37
|
+
}, "isTreeGridDeletedRow"), fe = /* @__PURE__ */ l((e) => {
|
|
38
38
|
const t = A(e) ? e : e ? [e] : ae;
|
|
39
39
|
return t.includes("all") ? /* @__PURE__ */ new Set(["all"]) : new Set(
|
|
40
40
|
t.filter(
|
|
41
41
|
(r) => r === "added" || r === "changed"
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
|
-
}, "normalizeTreeGridRequiredCellTargetRows"),
|
|
44
|
+
}, "normalizeTreeGridRequiredCellTargetRows"), Re = /* @__PURE__ */ l((e, t) => w(e) ? !1 : t.has("all") ? e.Kind === "Data" || m(e) : t.has("added") && m(e) || t.has("changed") && ue(e), "shouldValidateTreeGridRequiredCellRow"), Te = /* @__PURE__ */ l((e) => !!e && !w(e) && (e.Kind === "Data" || m(e)), "shouldValidateExplicitTreeGridRequiredCellRow"), Ee = /* @__PURE__ */ l((e, t) => {
|
|
45
45
|
var r;
|
|
46
46
|
if (t)
|
|
47
47
|
return typeof t.id != "string" ? t : ((r = e.Rows) == null ? void 0 : r[t.id]) ?? t;
|
|
@@ -54,18 +54,18 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
54
54
|
}, "normalizeExplicitTreeGridRequiredCellRows"), Ce = /* @__PURE__ */ l((e, t) => {
|
|
55
55
|
if (t.rows !== void 0)
|
|
56
56
|
return Ge(e, t.rows);
|
|
57
|
-
const r =
|
|
57
|
+
const r = fe(t.targetRows);
|
|
58
58
|
return Object.values(e.Rows ?? {}).filter(
|
|
59
|
-
(n) =>
|
|
59
|
+
(n) => Re(n, r)
|
|
60
60
|
);
|
|
61
|
-
}, "getTreeGridRequiredCellRows"),
|
|
61
|
+
}, "getTreeGridRequiredCellRows"), it = /* @__PURE__ */ l((e, t) => {
|
|
62
62
|
if (!e || !t)
|
|
63
63
|
return;
|
|
64
64
|
const r = e, n = S(
|
|
65
65
|
r[G]
|
|
66
66
|
);
|
|
67
67
|
n.includes(t) || (r[G] = [...n, t]);
|
|
68
|
-
}, "appendTreeGridAddedRowHighlightColumn"),
|
|
68
|
+
}, "appendTreeGridAddedRowHighlightColumn"), dt = /* @__PURE__ */ l((e, t) => {
|
|
69
69
|
if (!e || !t)
|
|
70
70
|
return;
|
|
71
71
|
const r = e, s = S(
|
|
@@ -78,17 +78,17 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
78
78
|
delete r[G];
|
|
79
79
|
}, "removeTreeGridAddedRowHighlightColumn"), ct = /* @__PURE__ */ l((e) => S(
|
|
80
80
|
e == null ? void 0 : e[G]
|
|
81
|
-
), "getTreeGridAddedRowHighlightColumns"),
|
|
81
|
+
), "getTreeGridAddedRowHighlightColumns"), ot = /* @__PURE__ */ l((e) => ie(
|
|
82
82
|
e == null ? void 0 : e[F]
|
|
83
83
|
), "getTreeGridAddedRowEditableColumns"), O = /* @__PURE__ */ l((e, t, r) => {
|
|
84
|
-
var a, i,
|
|
85
|
-
const n = ((a = e.GetType) == null ? void 0 : a.call(e, t, r)) || ((
|
|
84
|
+
var a, i, d, c, o;
|
|
85
|
+
const n = ((a = e.GetType) == null ? void 0 : a.call(e, t, r)) || ((d = (i = e.Cols) == null ? void 0 : i[r]) == null ? void 0 : d.Type) || "", s = ((c = e.GetValue) == null ? void 0 : c.call(e, t, r)) ?? t[r];
|
|
86
86
|
if (n === "Enum" || n === "Select")
|
|
87
87
|
return s == null ? "" : `${s}`;
|
|
88
88
|
try {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
return `${
|
|
89
|
+
const R = (o = e.GetString) == null ? void 0 : o.call(e, t, r);
|
|
90
|
+
if (R != null)
|
|
91
|
+
return `${R}`;
|
|
92
92
|
} catch {
|
|
93
93
|
}
|
|
94
94
|
return s == null ? "" : `${s}`;
|
|
@@ -100,7 +100,7 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
100
100
|
])
|
|
101
101
|
);
|
|
102
102
|
t[j] = r;
|
|
103
|
-
}, "markTreeGridAddedRowBaselineValues"),
|
|
103
|
+
}, "markTreeGridAddedRowBaselineValues"), ut = /* @__PURE__ */ l((e, t) => {
|
|
104
104
|
var r;
|
|
105
105
|
return (r = e == null ? void 0 : e[j]) == null ? void 0 : r[t];
|
|
106
106
|
}, "getTreeGridAddedRowBaselineValue"), he = /* @__PURE__ */ l((e, t, r) => {
|
|
@@ -127,9 +127,10 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
127
127
|
return r ? {
|
|
128
128
|
key: r,
|
|
129
129
|
label: typeof t.label == "string" ? t.label.trim() : void 0,
|
|
130
|
-
message: typeof t.message == "string" ? t.message : void 0
|
|
130
|
+
message: typeof t.message == "string" ? t.message : void 0,
|
|
131
|
+
validate: typeof t.validate == "function" ? t.validate : void 0
|
|
131
132
|
} : null;
|
|
132
|
-
}).filter((t) => !!t) : [], "normalizeTreeGridRequiredCellColumns"),
|
|
133
|
+
}).filter((t) => !!t) : [], "normalizeTreeGridRequiredCellColumns"), q = /* @__PURE__ */ l((e, t, r) => {
|
|
133
134
|
var s;
|
|
134
135
|
const n = (s = e.CanEdit) == null ? void 0 : s.call(e, t, r);
|
|
135
136
|
return n === 1 || n === "1" || n === !0;
|
|
@@ -138,7 +139,7 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
138
139
|
return n.length ? n.filter((s) => {
|
|
139
140
|
var a;
|
|
140
141
|
return !!((a = e.Cols) != null && a[s.key]);
|
|
141
|
-
}) : r.editableOnly ? Object.keys(e.Cols ?? {}).filter((s) => b(e, s) &&
|
|
142
|
+
}) : r.editableOnly ? Object.keys(e.Cols ?? {}).filter((s) => b(e, s) && q(e, t, s)).map((s) => ({ key: s })) : [];
|
|
142
143
|
}, "getTreeGridRequiredCellColumns"), Se = /* @__PURE__ */ l((e, t) => {
|
|
143
144
|
var n, s, a;
|
|
144
145
|
if (t.label)
|
|
@@ -151,9 +152,12 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
151
152
|
}
|
|
152
153
|
const r = (a = (s = e.Cols) == null ? void 0 : s[t.key]) == null ? void 0 : a.Caption;
|
|
153
154
|
return r ? `${r}`.trim() : t.key;
|
|
154
|
-
}, "getTreeGridRequiredCellLabel"), be = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? le)(e), "getTreeGridRequiredCellMessage"), Ve = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), Be = /* @__PURE__ */ l((e, t
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
}, "getTreeGridRequiredCellLabel"), be = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? le)(e), "getTreeGridRequiredCellMessage"), Ve = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), Be = /* @__PURE__ */ l((e, t) => {
|
|
156
|
+
var r;
|
|
157
|
+
return Ve(e.value) ? !0 : ((r = t.validate) == null ? void 0 : r.call(t, e)) === !1;
|
|
158
|
+
}, "isInvalidTreeGridRequiredCell"), Le = /* @__PURE__ */ l((e, t, r) => {
|
|
159
|
+
!t || r.focusFirstError === !1 || (e.Focus(t.row, t.col), r.startEditFirstError === !0 && q(e, t.row, t.col) && e.StartEdit(t.row, t.col));
|
|
160
|
+
}, "focusFirstTreeGridRequiredCellError"), C = /* @__PURE__ */ l((e) => typeof e == "string" && se.test(e.trim()), "isTreeGridTimeDateFormat"), x = /* @__PURE__ */ l((e, t, r) => {
|
|
157
161
|
var a;
|
|
158
162
|
const n = t, s = (a = e.Cols) == null ? void 0 : a[r];
|
|
159
163
|
return (s == null ? void 0 : s.Type) === "Date" && (C(n[`${r}EditFormat`]) || C(n[`${r}Format`]) || C(s.EditFormat) || C(s.Format));
|
|
@@ -167,14 +171,14 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
167
171
|
} catch {
|
|
168
172
|
}
|
|
169
173
|
return n == null ? "" : `${n}`;
|
|
170
|
-
}, "getTreeGridTimeDateDisplayValue"),
|
|
174
|
+
}, "getTreeGridTimeDateDisplayValue"), ve = /* @__PURE__ */ l((e, t) => {
|
|
171
175
|
const r = { ...t };
|
|
172
176
|
return Object.keys(e.Cols ?? {}).forEach((n) => {
|
|
173
|
-
|
|
177
|
+
x(e, t, n) && (r[n] = z(e, t, n));
|
|
174
178
|
}), r;
|
|
175
|
-
}, "normalizeTreeGridExternalRow"), H = /* @__PURE__ */ l((e, t) => t.map((r) =>
|
|
179
|
+
}, "normalizeTreeGridExternalRow"), H = /* @__PURE__ */ l((e, t) => t.map((r) => ve(e, r)), "normalizeTreeGridExternalRows"), U = /* @__PURE__ */ l((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), $e = /* @__PURE__ */ l((e) => U(e.SelectingSingle), "isTreeGridSingleSelectionLayout"), Fe = /* @__PURE__ */ l((e) => h(e) ? U(
|
|
176
180
|
e[_]
|
|
177
|
-
) : !1, "isTreeGridSelectedInitialValue"),
|
|
181
|
+
) : !1, "isTreeGridSelectedInitialValue"), Ke = /* @__PURE__ */ l((e) => {
|
|
178
182
|
if (!h(e))
|
|
179
183
|
return e;
|
|
180
184
|
const t = e;
|
|
@@ -183,7 +187,7 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
183
187
|
([r]) => r !== _
|
|
184
188
|
)
|
|
185
189
|
) : e;
|
|
186
|
-
}, "omitTreeGridSelectedInitialValue"),
|
|
190
|
+
}, "omitTreeGridSelectedInitialValue"), je = /* @__PURE__ */ l((e, t) => {
|
|
187
191
|
const r = (t == null ? void 0 : t.insertPosition) ?? "top", n = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
|
|
188
192
|
let a = n ?? (s ? s.parentNode : null) ?? e.GetFirst(), i = null;
|
|
189
193
|
switch (r) {
|
|
@@ -201,80 +205,80 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
201
205
|
break;
|
|
202
206
|
}
|
|
203
207
|
return { resolvedParent: a, next: i };
|
|
204
|
-
}, "resolveRowInsertionTarget"),
|
|
208
|
+
}, "resolveRowInsertionTarget"), we = /* @__PURE__ */ l((e, t) => {
|
|
205
209
|
if (!t.length)
|
|
206
210
|
return;
|
|
207
211
|
const r = e;
|
|
208
212
|
t.forEach((n) => {
|
|
209
213
|
r[`${n}Changed`] = 0;
|
|
210
214
|
});
|
|
211
|
-
}, "clearInitialDateValueChangedStates"),
|
|
215
|
+
}, "clearInitialDateValueChangedStates"), Oe = /* @__PURE__ */ l((e, t, r) => {
|
|
212
216
|
if (!h(r))
|
|
213
217
|
return;
|
|
214
218
|
const n = r, s = Object.keys(n).filter(Boolean), a = t;
|
|
215
219
|
a[K] = s, a[I] = Object.fromEntries(
|
|
216
|
-
s.map((
|
|
220
|
+
s.map((d) => [d, n[d]])
|
|
217
221
|
);
|
|
218
222
|
const i = [];
|
|
219
|
-
Object.entries(n).forEach(([
|
|
220
|
-
var o,
|
|
221
|
-
if (((
|
|
222
|
-
e.SetString(t,
|
|
223
|
+
Object.entries(n).forEach(([d, c]) => {
|
|
224
|
+
var o, R;
|
|
225
|
+
if (((R = (o = e.Cols) == null ? void 0 : o[d]) == null ? void 0 : R.Type) === "Date" && typeof c == "string") {
|
|
226
|
+
e.SetString(t, d, c, 0), i.push(d);
|
|
223
227
|
return;
|
|
224
228
|
}
|
|
225
|
-
t[
|
|
226
|
-
}),
|
|
227
|
-
}, "assignInitialRowValues"),
|
|
229
|
+
t[d] = c;
|
|
230
|
+
}), we(t, i);
|
|
231
|
+
}, "assignInitialRowValues"), qe = /* @__PURE__ */ l((e, t, r) => {
|
|
228
232
|
const n = y(r);
|
|
229
233
|
if (!n.length)
|
|
230
234
|
return;
|
|
231
235
|
const s = t, a = [];
|
|
232
236
|
n.forEach((i) => {
|
|
233
|
-
var
|
|
234
|
-
(
|
|
237
|
+
var d;
|
|
238
|
+
(d = e.Cols) != null && d[i] && (s[`${i}CanEdit`] = 1, a.push(i));
|
|
235
239
|
}), a.length && (t[F] = a);
|
|
236
240
|
}, "assignEditableAddedRowColumns"), xe = /* @__PURE__ */ l((e) => ne.some((t) => e.startsWith(t)), "isTreeGridDataKey"), k = /* @__PURE__ */ l((e, t) => {
|
|
237
241
|
var r;
|
|
238
242
|
return !!((r = e == null ? void 0 : e.Cols) != null && r[t]);
|
|
239
|
-
}, "isTreeGridColumnDataKey"),
|
|
243
|
+
}, "isTreeGridColumnDataKey"), ze = /* @__PURE__ */ l((e) => e != null && e !== "", "hasTreeGridUploadValue"), He = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), b = /* @__PURE__ */ l((e, t) => {
|
|
240
244
|
var r, n;
|
|
241
|
-
return !
|
|
245
|
+
return !He((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
|
|
242
246
|
}, "isVisibleTreeGridColumn"), N = /* @__PURE__ */ l((e) => y(
|
|
243
247
|
e == null ? void 0 : e[K]
|
|
244
|
-
), "getTreeGridAddedRowInitialValueKeys"), P = /* @__PURE__ */ l((e, t) => N(e).includes(t), "isTreeGridAddedRowInitialValueKey"),
|
|
248
|
+
), "getTreeGridAddedRowInitialValueKeys"), P = /* @__PURE__ */ l((e, t) => N(e).includes(t), "isTreeGridAddedRowInitialValueKey"), Ue = /* @__PURE__ */ l((e, t) => {
|
|
245
249
|
const r = e == null ? void 0 : e[I];
|
|
246
250
|
return Object.prototype.hasOwnProperty.call(r ?? {}, t);
|
|
247
|
-
}, "hasTreeGridAddedRowInitialValue"),
|
|
251
|
+
}, "hasTreeGridAddedRowInitialValue"), ke = /* @__PURE__ */ l((e, t) => {
|
|
248
252
|
var r;
|
|
249
253
|
return (r = e == null ? void 0 : e[I]) == null ? void 0 : r[t];
|
|
250
|
-
}, "getTreeGridAddedRowInitialValue"),
|
|
254
|
+
}, "getTreeGridAddedRowInitialValue"), Ne = /* @__PURE__ */ l((e, t) => {
|
|
251
255
|
var r;
|
|
252
256
|
return typeof t.id == "string" ? (r = e == null ? void 0 : e.Rows) == null ? void 0 : r[t.id] : null;
|
|
253
|
-
}, "getLiveTreeGridChangedRow"), W = /* @__PURE__ */ l((e, t, r, n) => !n || !k(e, r) || b(e, r) ? !1 : P(t, r), "shouldUseTreeGridAddedRowInitialValue"),
|
|
257
|
+
}, "getLiveTreeGridChangedRow"), W = /* @__PURE__ */ l((e, t, r, n) => !n || !k(e, r) || b(e, r) ? !1 : P(t, r), "shouldUseTreeGridAddedRowInitialValue"), p = /* @__PURE__ */ l((e, t, r, n, s) => W(e, r, n, s) && Ue(r, n) ? ke(r, n) : t[n], "resolveTreeGridChangeDataValue"), Pe = /* @__PURE__ */ l((e, t, r, n = !1) => {
|
|
254
258
|
const s = L(Object.keys(e), ...t);
|
|
255
259
|
return n ? L(
|
|
256
260
|
[.../* @__PURE__ */ new Set([...s, ...N(r)])],
|
|
257
261
|
...t
|
|
258
262
|
) : s;
|
|
259
|
-
}, "getTreeGridChangeDataKeys"),
|
|
263
|
+
}, "getTreeGridChangeDataKeys"), We = /* @__PURE__ */ l((e, t, r, n, s = !1) => {
|
|
260
264
|
const a = W(
|
|
261
265
|
e,
|
|
262
266
|
r,
|
|
263
267
|
n,
|
|
264
268
|
s
|
|
265
|
-
), i =
|
|
269
|
+
), i = p(
|
|
266
270
|
e,
|
|
267
271
|
t,
|
|
268
272
|
r,
|
|
269
273
|
n,
|
|
270
274
|
s
|
|
271
275
|
);
|
|
272
|
-
return !
|
|
276
|
+
return !ze(i) && !(a && i === "") ? !1 : k(e, n) ? !s || b(e, n) || a : xe(n) ? !0 : P(r, n);
|
|
273
277
|
}, "shouldIncludeTreeGridChangeDataKey"), v = /* @__PURE__ */ l((e, t, r, n = !1, s = !1) => {
|
|
274
|
-
const a = n ?
|
|
278
|
+
const a = n ? Ne(e, t) : null;
|
|
275
279
|
return Object.fromEntries(
|
|
276
|
-
|
|
277
|
-
(i) =>
|
|
280
|
+
Pe(t, r, a, n).filter(
|
|
281
|
+
(i) => We(
|
|
278
282
|
e,
|
|
279
283
|
t,
|
|
280
284
|
a,
|
|
@@ -283,10 +287,10 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
283
287
|
)
|
|
284
288
|
).map((i) => [
|
|
285
289
|
i,
|
|
286
|
-
|
|
290
|
+
p(e, t, a, i, s)
|
|
287
291
|
])
|
|
288
292
|
);
|
|
289
|
-
}, "normalizeTreeGridChangeRow"),
|
|
293
|
+
}, "normalizeTreeGridChangeRow"), pe = /* @__PURE__ */ l((e, t, r) => t.filter((n) => ee(n, r) === "1" && n.Deleted !== "1").map(
|
|
290
294
|
(n) => r === "Changed" ? v(e, n, ["id", "Changed"]) : v(e, n, ["id"], !0, !0)
|
|
291
295
|
).filter((n) => !te(n)), "getChangedRowsByStatus"), ge = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
|
|
292
296
|
const n = typeof r.id == "string" ? e.Rows[r.id] : null;
|
|
@@ -294,32 +298,32 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
|
|
|
294
298
|
return r;
|
|
295
299
|
const s = { ...r };
|
|
296
300
|
return Object.keys(r).forEach((a) => {
|
|
297
|
-
|
|
301
|
+
x(e, n, a) && (s[a] = z(e, n, a));
|
|
298
302
|
}), s;
|
|
299
|
-
}) : t, "normalizeTreeGridChangedRows"),
|
|
303
|
+
}) : t, "normalizeTreeGridChangedRows"), Ye = /* @__PURE__ */ l((e) => {
|
|
300
304
|
var t;
|
|
301
305
|
try {
|
|
302
306
|
(t = e == null ? void 0 : e.EndEdit) == null || t.call(e, 1);
|
|
303
307
|
} catch {
|
|
304
308
|
}
|
|
305
|
-
}, "commitTreeGridActiveEdit"),
|
|
306
|
-
function
|
|
307
|
-
const t =
|
|
309
|
+
}, "commitTreeGridActiveEdit"), f = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById");
|
|
310
|
+
function ft(e) {
|
|
311
|
+
const t = f(e);
|
|
308
312
|
return t ? H(
|
|
309
313
|
t,
|
|
310
314
|
De(t)
|
|
311
315
|
) : [];
|
|
312
316
|
}
|
|
313
|
-
l(
|
|
317
|
+
l(ft, "getTreeGridDataRowsById");
|
|
314
318
|
const Rt = /* @__PURE__ */ l((e) => {
|
|
315
|
-
const t =
|
|
319
|
+
const t = f(e);
|
|
316
320
|
return (t == null ? void 0 : t.Rows) ?? {};
|
|
317
|
-
}, "getTreeGridRowsById"),
|
|
321
|
+
}, "getTreeGridRowsById"), Tt = /* @__PURE__ */ l((e, t) => {
|
|
318
322
|
var r;
|
|
319
323
|
if (t != null)
|
|
320
|
-
return (r =
|
|
321
|
-
}, "getTreeGridRowById"),
|
|
322
|
-
const r =
|
|
324
|
+
return (r = f(e)) == null ? void 0 : r.GetRowById(String(t));
|
|
325
|
+
}, "getTreeGridRowById"), Et = /* @__PURE__ */ l((e, t) => {
|
|
326
|
+
const r = f(e);
|
|
323
327
|
if (!r)
|
|
324
328
|
return;
|
|
325
329
|
const n = r.Data.Data;
|
|
@@ -330,71 +334,71 @@ const Rt = /* @__PURE__ */ l((e) => {
|
|
|
330
334
|
}, r.ReloadBody(), window.setTimeout(() => {
|
|
331
335
|
D(e);
|
|
332
336
|
}, 0);
|
|
333
|
-
}, "reloadTreeGridBodyById"),
|
|
334
|
-
const r =
|
|
337
|
+
}, "reloadTreeGridBodyById"), Gt = /* @__PURE__ */ l((e, t) => {
|
|
338
|
+
const r = f(e);
|
|
335
339
|
if (!r)
|
|
336
340
|
return;
|
|
337
|
-
const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, a = t == null ? void 0 : t.editableColumns, i =
|
|
338
|
-
|
|
339
|
-
const { resolvedParent:
|
|
340
|
-
|
|
341
|
+
const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, a = t == null ? void 0 : t.editableColumns, i = $e(r), d = !!n && i, c = d && Fe(s), o = c ? Ke(s) : s;
|
|
342
|
+
d && V(e);
|
|
343
|
+
const { resolvedParent: R, next: T } = je(r, t), u = r.AddRow(R, T, 1);
|
|
344
|
+
ce(u), Oe(r, u, o), me(r, u), u.CanEdit = 1, u.CanDelete = 1, u.CanSelect = n ? 1 : 0, qe(r, u, a), c && r.SelectRow(u, 1), r.Focus(u), r.RefreshRow(u), r.Calculate(1, 1), de(r, u, "Add"), window.setTimeout(() => {
|
|
341
345
|
D(e);
|
|
342
346
|
}, 0);
|
|
343
|
-
}, "addTreeGridRowById"),
|
|
344
|
-
const r =
|
|
347
|
+
}, "addTreeGridRowById"), Ct = /* @__PURE__ */ l((e, t) => {
|
|
348
|
+
const r = f(e);
|
|
345
349
|
if (!r)
|
|
346
350
|
return { valid: !1, errors: [] };
|
|
347
351
|
const n = Ce(r, t), s = [], a = t.refresh === !1 ? 0 : 1;
|
|
348
|
-
n.forEach((
|
|
349
|
-
Ie(r,
|
|
350
|
-
const o =
|
|
352
|
+
n.forEach((d) => {
|
|
353
|
+
Ie(r, d, t).forEach((c) => {
|
|
354
|
+
const o = c.key, R = O(r, d, o), T = Se(r, c), u = {
|
|
351
355
|
grid: r,
|
|
352
|
-
row:
|
|
356
|
+
row: d,
|
|
353
357
|
col: o,
|
|
354
358
|
key: o,
|
|
355
359
|
label: T,
|
|
356
|
-
value:
|
|
360
|
+
value: R
|
|
357
361
|
};
|
|
358
|
-
if (!
|
|
359
|
-
r.SetAttribute(
|
|
362
|
+
if (!Be(u, c)) {
|
|
363
|
+
r.SetAttribute(d, o, "Error", "", a);
|
|
360
364
|
return;
|
|
361
365
|
}
|
|
362
366
|
const B = be(
|
|
363
|
-
|
|
364
|
-
|
|
367
|
+
u,
|
|
368
|
+
c,
|
|
365
369
|
t.messageFactory
|
|
366
|
-
),
|
|
367
|
-
r.SetAttribute(
|
|
370
|
+
), g = { ...u, message: B };
|
|
371
|
+
r.SetAttribute(d, o, "Error", B, a), s.push(g);
|
|
368
372
|
});
|
|
369
373
|
});
|
|
370
374
|
const i = s[0];
|
|
371
|
-
return
|
|
375
|
+
return Le(r, i, t), {
|
|
372
376
|
valid: !i,
|
|
373
377
|
errors: s,
|
|
374
378
|
firstError: i
|
|
375
379
|
};
|
|
376
|
-
}, "validateTreeGridRequiredCellsById"),
|
|
377
|
-
const t =
|
|
378
|
-
|
|
380
|
+
}, "validateTreeGridRequiredCellsById"), mt = /* @__PURE__ */ l((e) => {
|
|
381
|
+
const t = f(e);
|
|
382
|
+
Ye(t);
|
|
379
383
|
const r = Q(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
|
|
380
384
|
return A(r) ? Object.fromEntries(
|
|
381
385
|
re.map((n) => [
|
|
382
386
|
Z(n),
|
|
383
|
-
|
|
387
|
+
pe(
|
|
384
388
|
t,
|
|
385
389
|
ge(t, r),
|
|
386
390
|
n
|
|
387
391
|
)
|
|
388
392
|
])
|
|
389
393
|
) : { added: [], changed: [] };
|
|
390
|
-
}, "getTreeGridRowChangesById"),
|
|
391
|
-
const r =
|
|
394
|
+
}, "getTreeGridRowChangesById"), ht = /* @__PURE__ */ l((e, t) => {
|
|
395
|
+
const r = f(e);
|
|
392
396
|
r && _e().then(
|
|
393
397
|
(n) => n(r, { exportName: t ?? "" })
|
|
394
398
|
);
|
|
395
399
|
}, "exportTreeGridToExcelById");
|
|
396
|
-
function
|
|
397
|
-
const r =
|
|
400
|
+
function yt(e, t) {
|
|
401
|
+
const r = f(e), n = r == null ? void 0 : r.GetSelRows();
|
|
398
402
|
if (!r || !n)
|
|
399
403
|
return [];
|
|
400
404
|
const s = J(
|
|
@@ -404,9 +408,9 @@ function ht(e, t) {
|
|
|
404
408
|
);
|
|
405
409
|
return H(r, s);
|
|
406
410
|
}
|
|
407
|
-
l(
|
|
408
|
-
const
|
|
409
|
-
const r =
|
|
411
|
+
l(yt, "getTreeGridSelectedRowsById");
|
|
412
|
+
const _t = /* @__PURE__ */ l((e, t) => {
|
|
413
|
+
const r = f(e);
|
|
410
414
|
if (!r || !(t != null && t.targetKey))
|
|
411
415
|
return;
|
|
412
416
|
const n = t == null ? void 0 : t.targetKey;
|
|
@@ -415,69 +419,69 @@ const yt = /* @__PURE__ */ l((e, t) => {
|
|
|
415
419
|
return;
|
|
416
420
|
}
|
|
417
421
|
r.HideCol(n);
|
|
418
|
-
}, "setTreeGridColumnVisibilityById"),
|
|
419
|
-
const r =
|
|
422
|
+
}, "setTreeGridColumnVisibilityById"), Dt = /* @__PURE__ */ l((e, t) => {
|
|
423
|
+
const r = f(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
|
|
420
424
|
!r || !n || !s || (he(r, n, s), r.SetValue(n, `${s}Class`, M), r.SetValue(n, `${s}Color`, t.backgroundColor ?? X), t.refresh !== !1 && r.RefreshCell(n, s));
|
|
421
|
-
}, "highlightTreeGridCellById"),
|
|
422
|
-
const r =
|
|
425
|
+
}, "highlightTreeGridCellById"), At = /* @__PURE__ */ l((e, t) => {
|
|
426
|
+
const r = f(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
|
|
423
427
|
if (!r || !n || !s)
|
|
424
428
|
return;
|
|
425
429
|
const a = ye(n, s);
|
|
426
430
|
r.SetValue(n, `${s}Class`, (a == null ? void 0 : a.className) ?? ""), r.SetValue(n, `${s}Color`, (a == null ? void 0 : a.color) ?? ""), r.RefreshCell(n, s);
|
|
427
431
|
}, "clearTreeGridCellHighlightById"), V = /* @__PURE__ */ l((e) => {
|
|
428
|
-
const t =
|
|
432
|
+
const t = f(e);
|
|
429
433
|
t && t.ActionDeselectAll(1, 0);
|
|
430
|
-
}, "resetTreeGridSelectionById"),
|
|
434
|
+
}, "resetTreeGridSelectionById"), It = /* @__PURE__ */ l((e) => {
|
|
431
435
|
e.forEach(V);
|
|
432
|
-
}, "resetTreeGridSelectionsByIds"),
|
|
433
|
-
const t =
|
|
436
|
+
}, "resetTreeGridSelectionsByIds"), Me = /* @__PURE__ */ l((e) => {
|
|
437
|
+
const t = f(e);
|
|
434
438
|
t && (t.ActionUndoAll(1, 0), V(e), t.Calculate(1, 1), window.setTimeout(() => {
|
|
435
439
|
D(e);
|
|
436
440
|
}, 0));
|
|
437
|
-
}, "resetTreeGridChangesById"),
|
|
438
|
-
e.forEach(
|
|
439
|
-
}, "resetTreeGridChangesByIds"),
|
|
441
|
+
}, "resetTreeGridChangesById"), St = /* @__PURE__ */ l((e) => {
|
|
442
|
+
e.forEach(Me);
|
|
443
|
+
}, "resetTreeGridChangesByIds"), bt = /* @__PURE__ */ l((e, t, r, n, s) => {
|
|
440
444
|
if (!(r != null && r.length))
|
|
441
445
|
return;
|
|
442
|
-
const a =
|
|
446
|
+
const a = f(e);
|
|
443
447
|
if (!a)
|
|
444
448
|
return;
|
|
445
|
-
const i = r.map((
|
|
446
|
-
const o =
|
|
449
|
+
const i = r.map((c) => {
|
|
450
|
+
const o = c;
|
|
447
451
|
return `${s.map((T) => o[T]).find((T) => T != null && T !== "") ?? ""}`;
|
|
448
|
-
}).join("|"),
|
|
449
|
-
a.SetAttribute(null, t, "Type", "Enum", 0, 0), a.SetAttribute(null, t, "Enum", `|${i}`, 0, 0), a.SetAttribute(null, t, "EnumKeys", `|${
|
|
452
|
+
}).join("|"), d = r.map((c) => `${c[n] ?? ""}`).join("|");
|
|
453
|
+
a.SetAttribute(null, t, "Type", "Enum", 0, 0), a.SetAttribute(null, t, "Enum", `|${i}`, 0, 0), a.SetAttribute(null, t, "EnumKeys", `|${d}`, 1, 0);
|
|
450
454
|
}, "setTreeGridColumnEnumOptionsById");
|
|
451
455
|
export {
|
|
452
456
|
M as TREEGRID_CELL_CHANGED_CLASS,
|
|
453
457
|
X as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
458
|
+
Lt as TREEGRID_INPUT_CELL_COLOR,
|
|
459
|
+
vt as TREEGRID_WARNING_CELL_COLOR,
|
|
460
|
+
Gt as addTreeGridRowById,
|
|
461
|
+
it as appendTreeGridAddedRowHighlightColumn,
|
|
462
|
+
At as clearTreeGridCellHighlightById,
|
|
463
|
+
ht as exportTreeGridToExcelById,
|
|
464
|
+
ut as getTreeGridAddedRowBaselineValue,
|
|
465
|
+
ot as getTreeGridAddedRowEditableColumns,
|
|
462
466
|
ct as getTreeGridAddedRowHighlightColumns,
|
|
463
|
-
|
|
467
|
+
f as getTreeGridById,
|
|
464
468
|
O as getTreeGridCellComparableValue,
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
469
|
+
ft as getTreeGridDataRowsById,
|
|
470
|
+
Tt as getTreeGridRowById,
|
|
471
|
+
mt as getTreeGridRowChangesById,
|
|
468
472
|
Rt as getTreeGridRowsById,
|
|
469
|
-
|
|
470
|
-
|
|
473
|
+
yt as getTreeGridSelectedRowsById,
|
|
474
|
+
Dt as highlightTreeGridCellById,
|
|
471
475
|
oe as isTreeGridRowAddedById,
|
|
472
476
|
H as normalizeTreeGridExternalRows,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
+
Et as reloadTreeGridBodyById,
|
|
478
|
+
dt as removeTreeGridAddedRowHighlightColumn,
|
|
479
|
+
Me as resetTreeGridChangesById,
|
|
480
|
+
St as resetTreeGridChangesByIds,
|
|
477
481
|
V as resetTreeGridSelectionById,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
+
It as resetTreeGridSelectionsByIds,
|
|
483
|
+
bt as setTreeGridColumnEnumOptionsById,
|
|
484
|
+
_t as setTreeGridColumnVisibilityById,
|
|
485
|
+
Ct as validateTreeGridRequiredCellsById
|
|
482
486
|
};
|
|
483
487
|
//# sourceMappingURL=treeGridUtil.js.map
|