@owp/core 2.5.30 → 2.5.32
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/index20.js +2 -2
- package/dist/_virtual/index21.js +2 -2
- package/dist/_virtual/index22.js +2 -2
- package/dist/components/OwpPageContent/OwpPageContent.js +1 -1
- package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +1 -1
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +813 -241
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +266 -252
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js +59 -0
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js +27 -0
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +607 -510
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridSelection.js +61 -0
- package/dist/components/OwpTreeGrid/internal/treeGridSelection.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +157 -154
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/hooks/useMinimumVisibleState.js.map +1 -0
- package/dist/hooks.js +47 -45
- package/dist/hooks.js.map +1 -1
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +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/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +2 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +5 -1
- package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.d.ts +12 -0
- package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.d.ts +17 -0
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridSelection.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useMinimumVisibleState.d.ts +6 -0
- package/dist/types/utils/treeGridUtil.d.ts +6 -1
- package/dist/utils/treeGridUtil.js +299 -251
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/package.json +1 -1
- package/dist/hooks/internal/useMinimumVisibleState.js.map +0 -1
- package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +0 -7
- /package/dist/hooks/{internal/useMinimumVisibleState.js → useMinimumVisibleState.js} +0 -0
|
@@ -1,360 +1,408 @@
|
|
|
1
|
-
var
|
|
2
|
-
var l = (
|
|
3
|
-
import { TREEGRID_CELL_CHANGED_CLASS as
|
|
4
|
-
import { TREEGRID_INPUT_CELL_COLOR as
|
|
5
|
-
import { parseTreeGridXmlToJson as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { isEmpty as
|
|
13
|
-
import { without as
|
|
14
|
-
const
|
|
15
|
-
label:
|
|
16
|
-
}) => `${
|
|
1
|
+
var q = Object.defineProperty;
|
|
2
|
+
var l = (e, t) => q(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { TREEGRID_CELL_CHANGED_CLASS as z, TREEGRID_CELL_HIGHLIGHT_COLOR as O } from "../constants/treeGrid.js";
|
|
4
|
+
import { TREEGRID_INPUT_CELL_COLOR as Tt, TREEGRID_WARNING_CELL_COLOR as Gt } from "../constants/treeGrid.js";
|
|
5
|
+
import { parseTreeGridXmlToJson as N } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
|
|
6
|
+
import { resolveTreeGridSelectedRows as U } from "../components/OwpTreeGrid/internal/treeGridSelection.js";
|
|
7
|
+
import { emitTreeGridBodyRowsChanged as _ } from "./internal/treeGridBodyRowsEvent.js";
|
|
8
|
+
import { isArray as D } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
|
|
9
|
+
import { lowerCase as P } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/lowerCase.js";
|
|
10
|
+
import { isPlainObject as y } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isPlainObject.js";
|
|
11
|
+
import { get as W } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
12
|
+
import { isEmpty as Y } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
13
|
+
import { without as M } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/without.js";
|
|
14
|
+
const X = ["Added", "Changed"], Q = ["OWP", "IPX"], g = /^H{1,2}(?::m{1,2})?(?::s{1,2})?$/, B = "__owpAddedByAddTreeGridRowById", E = "__owpAddedRowHighlightColumns", L = "__owpAddedRowInitialValueKeys", v = "__owpAddedRowBaselineValues", G = "__owpCellStyleBaselineValues", h = "Selected", J = /* @__PURE__ */ l(({
|
|
15
|
+
label: e
|
|
16
|
+
}) => `${e} 필수 입력`, "DEFAULT_TREE_GRID_REQUIRED_CELL_MESSAGE_FACTORY"), Z = [
|
|
17
17
|
"added"
|
|
18
|
-
],
|
|
19
|
-
|
|
20
|
-
}, "markTreeGridRowAddedById"),
|
|
21
|
-
const
|
|
22
|
-
return !!
|
|
23
|
-
}, "isTreeGridRowAddedById"),
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
}, "isTreeGridAddedRow"),
|
|
27
|
-
const
|
|
28
|
-
return !
|
|
29
|
-
}, "isTreeGridChangedRow"),
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
}, "isTreeGridDeletedRow"),
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
|
|
18
|
+
], S = /* @__PURE__ */ l((e) => D(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), A = S, p = /* @__PURE__ */ l((e) => {
|
|
19
|
+
e && (e[B] = 1);
|
|
20
|
+
}, "markTreeGridRowAddedById"), ee = /* @__PURE__ */ l((e) => {
|
|
21
|
+
const t = e == null ? void 0 : e[B];
|
|
22
|
+
return !!e && t !== 0 && t !== !1 && t !== void 0;
|
|
23
|
+
}, "isTreeGridRowAddedById"), m = /* @__PURE__ */ l((e) => {
|
|
24
|
+
const t = e == null ? void 0 : e.Added;
|
|
25
|
+
return t === 1 || t === "1" || t === !0 || ee(e);
|
|
26
|
+
}, "isTreeGridAddedRow"), te = /* @__PURE__ */ l((e) => {
|
|
27
|
+
const t = e == null ? void 0 : e.Changed;
|
|
28
|
+
return !m(e) && (t === 1 || t === "1" || t === !0);
|
|
29
|
+
}, "isTreeGridChangedRow"), k = /* @__PURE__ */ l((e) => {
|
|
30
|
+
const t = e == null ? void 0 : e.Deleted;
|
|
31
|
+
return t === 1 || t === "1" || t === !0;
|
|
32
|
+
}, "isTreeGridDeletedRow"), re = /* @__PURE__ */ l((e) => {
|
|
33
|
+
const t = D(e) ? e : e ? [e] : Z;
|
|
34
|
+
return t.includes("all") ? /* @__PURE__ */ new Set(["all"]) : new Set(
|
|
35
|
+
t.filter(
|
|
36
36
|
(r) => r === "added" || r === "changed"
|
|
37
37
|
)
|
|
38
38
|
);
|
|
39
|
-
}, "normalizeTreeGridRequiredCellTargetRows"),
|
|
40
|
-
|
|
39
|
+
}, "normalizeTreeGridRequiredCellTargetRows"), ne = /* @__PURE__ */ l((e, t) => k(e) ? !1 : t.has("all") ? e.Kind === "Data" || m(e) : t.has("added") && m(e) || t.has("changed") && te(e), "shouldValidateTreeGridRequiredCellRow"), se = /* @__PURE__ */ l((e) => !!e && !k(e) && (e.Kind === "Data" || m(e)), "shouldValidateExplicitTreeGridRequiredCellRow"), le = /* @__PURE__ */ l((e, t) => {
|
|
40
|
+
var r;
|
|
41
|
+
if (t)
|
|
42
|
+
return typeof t.id != "string" ? t : ((r = e.Rows) == null ? void 0 : r[t.id]) ?? t;
|
|
43
|
+
}, "resolveLiveTreeGridRequiredCellRow"), ie = /* @__PURE__ */ l((e, t) => {
|
|
44
|
+
const r = /* @__PURE__ */ new Set(), n = [];
|
|
45
|
+
return t.forEach((s) => {
|
|
46
|
+
const i = le(e, s);
|
|
47
|
+
!se(i) || r.has(i) || (r.add(i), n.push(i));
|
|
48
|
+
}), n;
|
|
49
|
+
}, "normalizeExplicitTreeGridRequiredCellRows"), ae = /* @__PURE__ */ l((e, t) => {
|
|
50
|
+
if (t.rows !== void 0)
|
|
51
|
+
return ie(e, t.rows);
|
|
52
|
+
const r = re(t.targetRows);
|
|
53
|
+
return Object.values(e.Rows ?? {}).filter(
|
|
54
|
+
(n) => ne(n, r)
|
|
55
|
+
);
|
|
56
|
+
}, "getTreeGridRequiredCellRows"), Qe = /* @__PURE__ */ l((e, t) => {
|
|
57
|
+
if (!e || !t)
|
|
41
58
|
return;
|
|
42
|
-
const r =
|
|
43
|
-
r[
|
|
59
|
+
const r = e, n = A(
|
|
60
|
+
r[E]
|
|
44
61
|
);
|
|
45
|
-
n.includes(
|
|
46
|
-
}, "appendTreeGridAddedRowHighlightColumn"),
|
|
47
|
-
if (!
|
|
62
|
+
n.includes(t) || (r[E] = [...n, t]);
|
|
63
|
+
}, "appendTreeGridAddedRowHighlightColumn"), ge = /* @__PURE__ */ l((e, t) => {
|
|
64
|
+
if (!e || !t)
|
|
48
65
|
return;
|
|
49
|
-
const r =
|
|
50
|
-
r[
|
|
51
|
-
).filter((
|
|
66
|
+
const r = e, s = A(
|
|
67
|
+
r[E]
|
|
68
|
+
).filter((i) => i !== t);
|
|
52
69
|
if (s.length) {
|
|
53
|
-
r[
|
|
70
|
+
r[E] = s;
|
|
54
71
|
return;
|
|
55
72
|
}
|
|
56
|
-
delete r[
|
|
57
|
-
}, "removeTreeGridAddedRowHighlightColumn"),
|
|
58
|
-
|
|
59
|
-
), "getTreeGridAddedRowHighlightColumns"),
|
|
60
|
-
var a,
|
|
61
|
-
const n = ((
|
|
73
|
+
delete r[E];
|
|
74
|
+
}, "removeTreeGridAddedRowHighlightColumn"), Je = /* @__PURE__ */ l((e) => A(
|
|
75
|
+
e == null ? void 0 : e[E]
|
|
76
|
+
), "getTreeGridAddedRowHighlightColumns"), F = /* @__PURE__ */ l((e, t, r) => {
|
|
77
|
+
var i, a, c, d, f;
|
|
78
|
+
const n = ((i = e.GetType) == null ? void 0 : i.call(e, t, r)) || ((c = (a = e.Cols) == null ? void 0 : a[r]) == null ? void 0 : c.Type) || "", s = ((d = e.GetValue) == null ? void 0 : d.call(e, t, r)) ?? t[r];
|
|
62
79
|
if (n === "Enum" || n === "Select")
|
|
63
80
|
return s == null ? "" : `${s}`;
|
|
64
81
|
try {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
return `${
|
|
82
|
+
const R = (f = e.GetString) == null ? void 0 : f.call(e, t, r);
|
|
83
|
+
if (R != null)
|
|
84
|
+
return `${R}`;
|
|
68
85
|
} catch {
|
|
69
86
|
}
|
|
70
87
|
return s == null ? "" : `${s}`;
|
|
71
|
-
}, "getTreeGridCellComparableValue"),
|
|
88
|
+
}, "getTreeGridCellComparableValue"), ce = /* @__PURE__ */ l((e, t) => {
|
|
72
89
|
const r = Object.fromEntries(
|
|
73
|
-
Object.keys(
|
|
90
|
+
Object.keys(e.Cols ?? {}).map((n) => [
|
|
74
91
|
n,
|
|
75
|
-
|
|
92
|
+
F(e, t, n)
|
|
76
93
|
])
|
|
77
94
|
);
|
|
78
|
-
|
|
79
|
-
}, "markTreeGridAddedRowBaselineValues"),
|
|
95
|
+
t[v] = r;
|
|
96
|
+
}, "markTreeGridAddedRowBaselineValues"), Ze = /* @__PURE__ */ l((e, t) => {
|
|
80
97
|
var r;
|
|
81
|
-
return (r =
|
|
82
|
-
}, "getTreeGridAddedRowBaselineValue"),
|
|
98
|
+
return (r = e == null ? void 0 : e[v]) == null ? void 0 : r[t];
|
|
99
|
+
}, "getTreeGridAddedRowBaselineValue"), de = /* @__PURE__ */ l((e, t, r) => {
|
|
83
100
|
var s;
|
|
84
|
-
const n =
|
|
85
|
-
n[
|
|
86
|
-
className:
|
|
87
|
-
color:
|
|
101
|
+
const n = t;
|
|
102
|
+
n[G] ?? (n[G] = {}), !((s = n[G]) != null && s[r]) && (n[G][r] = {
|
|
103
|
+
className: e.GetAttribute(t, r, "Class"),
|
|
104
|
+
color: e.GetAttribute(t, r, "Color")
|
|
88
105
|
});
|
|
89
|
-
}, "preserveTreeGridCellStyleBaseline"),
|
|
106
|
+
}, "preserveTreeGridCellStyleBaseline"), oe = /* @__PURE__ */ l((e, t) => {
|
|
90
107
|
var r;
|
|
91
|
-
return (r =
|
|
92
|
-
}, "getTreeGridCellStyleBaseline"),
|
|
93
|
-
const { exportTreeGridExcel:
|
|
94
|
-
return
|
|
95
|
-
}, "loadExportTreeGridExcel"),
|
|
96
|
-
if (typeof
|
|
97
|
-
const n =
|
|
108
|
+
return (r = e[G]) == null ? void 0 : r[t];
|
|
109
|
+
}, "getTreeGridCellStyleBaseline"), ue = /* @__PURE__ */ l(async () => {
|
|
110
|
+
const { exportTreeGridExcel: e } = await import("./treeGridExportExcelUtil.js");
|
|
111
|
+
return e;
|
|
112
|
+
}, "loadExportTreeGridExcel"), fe = /* @__PURE__ */ l((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), Re = /* @__PURE__ */ l((e) => e != null && e.length ? e.map((t) => {
|
|
113
|
+
if (typeof t == "string") {
|
|
114
|
+
const n = t.trim();
|
|
98
115
|
return n ? { key: n } : null;
|
|
99
116
|
}
|
|
100
|
-
if (!
|
|
117
|
+
if (!y(t) || typeof t.key != "string")
|
|
101
118
|
return null;
|
|
102
|
-
const r =
|
|
119
|
+
const r = t.key.trim();
|
|
103
120
|
return r ? {
|
|
104
121
|
key: r,
|
|
105
|
-
label: typeof
|
|
106
|
-
message: typeof
|
|
122
|
+
label: typeof t.label == "string" ? t.label.trim() : void 0,
|
|
123
|
+
message: typeof t.message == "string" ? t.message : void 0
|
|
107
124
|
} : null;
|
|
108
|
-
}).filter((
|
|
125
|
+
}).filter((t) => !!t) : [], "normalizeTreeGridRequiredCellColumns"), $ = /* @__PURE__ */ l((e, t, r) => {
|
|
109
126
|
var s;
|
|
110
|
-
const n = (s =
|
|
127
|
+
const n = (s = e.CanEdit) == null ? void 0 : s.call(e, t, r);
|
|
111
128
|
return n === 1 || n === "1" || n === !0;
|
|
112
|
-
}, "isTreeGridEditableCell"),
|
|
113
|
-
const n =
|
|
129
|
+
}, "isTreeGridEditableCell"), Te = /* @__PURE__ */ l((e, t, r) => {
|
|
130
|
+
const n = Re(r.columns);
|
|
114
131
|
return n.length ? n.filter((s) => {
|
|
115
|
-
var
|
|
116
|
-
return !!((
|
|
117
|
-
}) : r.editableOnly ? Object.keys(
|
|
118
|
-
}, "getTreeGridRequiredCellColumns"),
|
|
119
|
-
var n, s,
|
|
120
|
-
if (
|
|
121
|
-
return
|
|
132
|
+
var i;
|
|
133
|
+
return !!((i = e.Cols) != null && i[s.key]);
|
|
134
|
+
}) : r.editableOnly ? Object.keys(e.Cols ?? {}).filter((s) => ve(e, s) && $(e, t, s)).map((s) => ({ key: s })) : [];
|
|
135
|
+
}, "getTreeGridRequiredCellColumns"), Ge = /* @__PURE__ */ l((e, t) => {
|
|
136
|
+
var n, s, i;
|
|
137
|
+
if (t.label)
|
|
138
|
+
return t.label;
|
|
122
139
|
try {
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
return `${
|
|
140
|
+
const a = (n = e.GetCaption) == null ? void 0 : n.call(e, t.key);
|
|
141
|
+
if (a)
|
|
142
|
+
return `${a}`.trim();
|
|
126
143
|
} catch {
|
|
127
144
|
}
|
|
128
|
-
const r = (
|
|
129
|
-
return r ? `${r}`.trim() :
|
|
130
|
-
}, "getTreeGridRequiredCellLabel"),
|
|
131
|
-
!
|
|
132
|
-
}, "focusFirstTreeGridRequiredCellError"),
|
|
133
|
-
var
|
|
134
|
-
const n =
|
|
135
|
-
return (s == null ? void 0 : s.Type) === "Date" && (
|
|
136
|
-
}, "isTreeGridTimeDateColumn"),
|
|
145
|
+
const r = (i = (s = e.Cols) == null ? void 0 : s[t.key]) == null ? void 0 : i.Caption;
|
|
146
|
+
return r ? `${r}`.trim() : t.key;
|
|
147
|
+
}, "getTreeGridRequiredCellLabel"), Ee = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? J)(e), "getTreeGridRequiredCellMessage"), Ce = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), me = /* @__PURE__ */ l((e, t, r) => {
|
|
148
|
+
!t || r.focusFirstError === !1 || (e.Focus(t.row, t.col), r.startEditFirstError !== !1 && $(e, t.row, t.col) && e.StartEdit(t.row, t.col));
|
|
149
|
+
}, "focusFirstTreeGridRequiredCellError"), C = /* @__PURE__ */ l((e) => typeof e == "string" && g.test(e.trim()), "isTreeGridTimeDateFormat"), x = /* @__PURE__ */ l((e, t, r) => {
|
|
150
|
+
var i;
|
|
151
|
+
const n = t, s = (i = e.Cols) == null ? void 0 : i[r];
|
|
152
|
+
return (s == null ? void 0 : s.Type) === "Date" && (C(n[`${r}EditFormat`]) || C(n[`${r}Format`]) || C(s.EditFormat) || C(s.Format));
|
|
153
|
+
}, "isTreeGridTimeDateColumn"), j = /* @__PURE__ */ l((e, t, r) => {
|
|
137
154
|
var s;
|
|
138
|
-
const n =
|
|
155
|
+
const n = t[r];
|
|
139
156
|
try {
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
return `${
|
|
157
|
+
const i = (s = e.GetString) == null ? void 0 : s.call(e, t, r);
|
|
158
|
+
if (i != null && `${i}` != "")
|
|
159
|
+
return `${i}`;
|
|
143
160
|
} catch {
|
|
144
161
|
}
|
|
145
162
|
return n == null ? "" : `${n}`;
|
|
146
|
-
}, "getTreeGridTimeDateDisplayValue"),
|
|
147
|
-
const r = { ...
|
|
148
|
-
return Object.keys(
|
|
149
|
-
|
|
163
|
+
}, "getTreeGridTimeDateDisplayValue"), ye = /* @__PURE__ */ l((e, t) => {
|
|
164
|
+
const r = { ...t };
|
|
165
|
+
return Object.keys(e.Cols ?? {}).forEach((n) => {
|
|
166
|
+
x(e, t, n) && (r[n] = j(e, t, n));
|
|
150
167
|
}), r;
|
|
151
|
-
}, "normalizeTreeGridExternalRow"),
|
|
152
|
-
|
|
153
|
-
|
|
168
|
+
}, "normalizeTreeGridExternalRow"), w = /* @__PURE__ */ l((e, t) => t.map((r) => ye(e, r)), "normalizeTreeGridExternalRows"), H = /* @__PURE__ */ l((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), he = /* @__PURE__ */ l((e) => H(e.SelectingSingle), "isTreeGridSingleSelectionLayout"), _e = /* @__PURE__ */ l((e) => y(e) ? H(
|
|
169
|
+
e[h]
|
|
170
|
+
) : !1, "isTreeGridSelectedInitialValue"), De = /* @__PURE__ */ l((e) => {
|
|
171
|
+
if (!y(e))
|
|
172
|
+
return e;
|
|
173
|
+
const t = e;
|
|
174
|
+
return h in t ? Object.fromEntries(
|
|
175
|
+
Object.entries(t).filter(
|
|
176
|
+
([r]) => r !== h
|
|
177
|
+
)
|
|
178
|
+
) : e;
|
|
179
|
+
}, "omitTreeGridSelectedInitialValue"), Se = /* @__PURE__ */ l((e, t) => {
|
|
180
|
+
const r = (t == null ? void 0 : t.insertPosition) ?? "top", n = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
|
|
181
|
+
let i = n ?? (s ? s.parentNode : null) ?? e.GetFirst(), a = null;
|
|
154
182
|
switch (r) {
|
|
155
183
|
case "top":
|
|
156
|
-
|
|
184
|
+
a = e.GetFirst();
|
|
157
185
|
break;
|
|
158
186
|
case "last":
|
|
159
|
-
|
|
187
|
+
i = e.GetNext(e.GetLast(), e.RowCount > 0 ? e.RowCount + 1 : 0), a = i;
|
|
160
188
|
break;
|
|
161
189
|
case "above":
|
|
162
|
-
|
|
190
|
+
a = s ?? e.GetFirst();
|
|
163
191
|
break;
|
|
164
192
|
case "below":
|
|
165
|
-
|
|
193
|
+
a = (s == null ? void 0 : s.nextSibling) ?? e.GetFirst();
|
|
166
194
|
break;
|
|
167
195
|
}
|
|
168
|
-
return { resolvedParent:
|
|
169
|
-
}, "resolveRowInsertionTarget"),
|
|
170
|
-
if (!
|
|
196
|
+
return { resolvedParent: i, next: a };
|
|
197
|
+
}, "resolveRowInsertionTarget"), Ae = /* @__PURE__ */ l((e, t, r) => {
|
|
198
|
+
if (!y(r))
|
|
171
199
|
return;
|
|
172
200
|
const n = Object.keys(r).filter(Boolean);
|
|
173
|
-
|
|
174
|
-
var
|
|
175
|
-
if (((
|
|
176
|
-
|
|
201
|
+
t[L] = n, Object.entries(r).forEach(([s, i]) => {
|
|
202
|
+
var a, c;
|
|
203
|
+
if (((c = (a = e.Cols) == null ? void 0 : a[s]) == null ? void 0 : c.Type) === "Date" && typeof i == "string") {
|
|
204
|
+
e.SetString(t, s, i, 0);
|
|
177
205
|
return;
|
|
178
206
|
}
|
|
179
|
-
|
|
207
|
+
t[s] = i;
|
|
180
208
|
});
|
|
181
|
-
}, "assignInitialRowValues"),
|
|
182
|
-
const n =
|
|
209
|
+
}, "assignInitialRowValues"), be = /* @__PURE__ */ l((e, t, r) => {
|
|
210
|
+
const n = S(r);
|
|
183
211
|
if (!n.length)
|
|
184
212
|
return;
|
|
185
|
-
const s =
|
|
186
|
-
n.forEach((
|
|
187
|
-
var
|
|
188
|
-
(
|
|
213
|
+
const s = t;
|
|
214
|
+
n.forEach((i) => {
|
|
215
|
+
var a;
|
|
216
|
+
(a = e.Cols) != null && a[i] && (s[`${i}CanEdit`] = 1);
|
|
189
217
|
});
|
|
190
|
-
}, "assignEditableAddedRowColumns"),
|
|
218
|
+
}, "assignEditableAddedRowColumns"), Ie = /* @__PURE__ */ l((e) => Q.some((t) => e.startsWith(t)), "isTreeGridDataKey"), Ve = /* @__PURE__ */ l((e, t) => {
|
|
219
|
+
var r;
|
|
220
|
+
return !!((r = e == null ? void 0 : e.Cols) != null && r[t]);
|
|
221
|
+
}, "isTreeGridColumnDataKey"), Be = /* @__PURE__ */ l((e) => e != null && e !== "", "hasTreeGridUploadValue"), Le = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), ve = /* @__PURE__ */ l((e, t) => {
|
|
191
222
|
var r, n;
|
|
192
|
-
return !
|
|
193
|
-
}, "isVisibleTreeGridColumn"),
|
|
194
|
-
|
|
195
|
-
).includes(
|
|
223
|
+
return !Le((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
|
|
224
|
+
}, "isVisibleTreeGridColumn"), ke = /* @__PURE__ */ l((e, t) => S(
|
|
225
|
+
e == null ? void 0 : e[L]
|
|
226
|
+
).includes(t), "isTreeGridAddedRowInitialValueKey"), Fe = /* @__PURE__ */ l((e, t) => {
|
|
196
227
|
var r;
|
|
197
|
-
return typeof
|
|
198
|
-
}, "getLiveTreeGridChangedRow"),
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
(
|
|
202
|
-
)
|
|
203
|
-
|
|
228
|
+
return typeof t.id == "string" ? (r = e == null ? void 0 : e.Rows) == null ? void 0 : r[t.id] : null;
|
|
229
|
+
}, "getLiveTreeGridChangedRow"), $e = /* @__PURE__ */ l((e, t, r, n = !1) => Be(t[r]) ? Ve(e, r) || Ie(r) ? !0 : n && ke(Fe(e, t), r) : !1, "shouldIncludeTreeGridChangeDataKey"), V = /* @__PURE__ */ l((e, t, r, n = !1) => Object.fromEntries(
|
|
230
|
+
M(Object.keys(t), ...r).filter(
|
|
231
|
+
(s) => $e(e, t, s, n)
|
|
232
|
+
).map((s) => [s, t[s]])
|
|
233
|
+
), "normalizeTreeGridChangeRow"), xe = /* @__PURE__ */ l((e, t, r) => t.filter((n) => W(n, r) === "1" && n.Deleted !== "1").map(
|
|
234
|
+
(n) => r === "Changed" ? V(e, n, ["id", "Changed"]) : V(e, n, ["id"], !0)
|
|
235
|
+
).filter((n) => !Y(n)), "getChangedRowsByStatus"), je = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
|
|
236
|
+
const n = typeof r.id == "string" ? e.Rows[r.id] : null;
|
|
204
237
|
if (!n)
|
|
205
238
|
return r;
|
|
206
239
|
const s = { ...r };
|
|
207
|
-
return Object.keys(r).forEach((
|
|
208
|
-
|
|
240
|
+
return Object.keys(r).forEach((i) => {
|
|
241
|
+
x(e, n, i) && (s[i] = j(e, n, i));
|
|
209
242
|
}), s;
|
|
210
|
-
}) :
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
243
|
+
}) : t, "normalizeTreeGridChangedRows"), we = /* @__PURE__ */ l((e) => {
|
|
244
|
+
var t;
|
|
245
|
+
try {
|
|
246
|
+
(t = e == null ? void 0 : e.EndEdit) == null || t.call(e, 1);
|
|
247
|
+
} catch {
|
|
248
|
+
}
|
|
249
|
+
}, "commitTreeGridActiveEdit"), u = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById"), pe = /* @__PURE__ */ l((e) => {
|
|
250
|
+
const t = u(e);
|
|
251
|
+
return t ? w(t, fe(t)) : [];
|
|
252
|
+
}, "getTreeGridDataRowsById"), et = /* @__PURE__ */ l((e, t) => {
|
|
253
|
+
const r = u(e);
|
|
215
254
|
if (!r)
|
|
216
255
|
return;
|
|
217
256
|
const n = r.Data.Data;
|
|
218
257
|
r.Data.Data = {
|
|
219
258
|
...n,
|
|
220
|
-
Data: { Body: [
|
|
259
|
+
Data: { Body: [t || []] },
|
|
221
260
|
Url: ""
|
|
222
261
|
}, r.ReloadBody(), window.setTimeout(() => {
|
|
223
|
-
|
|
262
|
+
_(e);
|
|
224
263
|
}, 0);
|
|
225
|
-
}, "reloadTreeGridBodyById"),
|
|
226
|
-
const r = u(
|
|
264
|
+
}, "reloadTreeGridBodyById"), tt = /* @__PURE__ */ l((e, t) => {
|
|
265
|
+
const r = u(e);
|
|
227
266
|
if (!r)
|
|
228
267
|
return;
|
|
229
|
-
const n =
|
|
230
|
-
|
|
231
|
-
|
|
268
|
+
const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, i = t == null ? void 0 : t.editableColumns, a = he(r), c = !!n && a, d = c && _e(s), f = d ? De(s) : s;
|
|
269
|
+
c && b(e);
|
|
270
|
+
const { resolvedParent: R, next: T } = Se(r, t), o = r.AddRow(R, T, 1);
|
|
271
|
+
p(o), Ae(r, o, f), ce(r, o), o.CanEdit = 1, o.CanDelete = 1, o.CanSelect = n ? 1 : 0, be(r, o, i), d && r.SelectRow(o, 1), r.Focus(o), r.RefreshRow(o), r.Calculate(1, 1), window.setTimeout(() => {
|
|
272
|
+
_(e);
|
|
232
273
|
}, 0);
|
|
233
|
-
}, "addTreeGridRowById"),
|
|
234
|
-
const r = u(
|
|
274
|
+
}, "addTreeGridRowById"), rt = /* @__PURE__ */ l((e, t) => {
|
|
275
|
+
const r = u(e);
|
|
235
276
|
if (!r)
|
|
236
277
|
return { valid: !1, errors: [] };
|
|
237
|
-
const n =
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
de(r, c, e).forEach((f) => {
|
|
242
|
-
const o = f.key, R = L(r, c, o), j = ue(r, f), D = {
|
|
278
|
+
const n = ae(r, t), s = [], i = t.refresh === !1 ? 0 : 1;
|
|
279
|
+
n.forEach((c) => {
|
|
280
|
+
Te(r, c, t).forEach((d) => {
|
|
281
|
+
const f = d.key, R = F(r, c, f), T = Ge(r, d), o = {
|
|
243
282
|
grid: r,
|
|
244
283
|
row: c,
|
|
245
|
-
col:
|
|
246
|
-
key:
|
|
247
|
-
label:
|
|
284
|
+
col: f,
|
|
285
|
+
key: f,
|
|
286
|
+
label: T,
|
|
248
287
|
value: R
|
|
249
288
|
};
|
|
250
|
-
if (!
|
|
251
|
-
r.SetAttribute(c,
|
|
289
|
+
if (!Ce(R)) {
|
|
290
|
+
r.SetAttribute(c, f, "Error", "", i);
|
|
252
291
|
return;
|
|
253
292
|
}
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
), K = { ...
|
|
259
|
-
r.SetAttribute(c,
|
|
293
|
+
const I = Ee(
|
|
294
|
+
o,
|
|
295
|
+
d,
|
|
296
|
+
t.messageFactory
|
|
297
|
+
), K = { ...o, message: I };
|
|
298
|
+
r.SetAttribute(c, f, "Error", I, i), s.push(K);
|
|
260
299
|
});
|
|
261
300
|
});
|
|
262
|
-
const
|
|
263
|
-
return
|
|
264
|
-
valid: !
|
|
265
|
-
errors:
|
|
266
|
-
firstError:
|
|
301
|
+
const a = s[0];
|
|
302
|
+
return me(r, a, t), {
|
|
303
|
+
valid: !a,
|
|
304
|
+
errors: s,
|
|
305
|
+
firstError: a
|
|
267
306
|
};
|
|
268
|
-
}, "validateTreeGridRequiredCellsById"),
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
307
|
+
}, "validateTreeGridRequiredCellsById"), nt = /* @__PURE__ */ l((e) => {
|
|
308
|
+
const t = u(e);
|
|
309
|
+
we(t);
|
|
310
|
+
const r = N(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
|
|
311
|
+
return D(r) ? Object.fromEntries(
|
|
312
|
+
X.map((n) => [
|
|
313
|
+
P(n),
|
|
314
|
+
xe(
|
|
315
|
+
t,
|
|
316
|
+
je(t, r),
|
|
276
317
|
n
|
|
277
318
|
)
|
|
278
319
|
])
|
|
279
320
|
) : { added: [], changed: [] };
|
|
280
|
-
}, "getTreeGridRowChangesById"),
|
|
281
|
-
const r = u(
|
|
282
|
-
r &&
|
|
283
|
-
(n) => n(r, { exportName:
|
|
321
|
+
}, "getTreeGridRowChangesById"), st = /* @__PURE__ */ l((e, t) => {
|
|
322
|
+
const r = u(e);
|
|
323
|
+
r && ue().then(
|
|
324
|
+
(n) => n(r, { exportName: t ?? "" })
|
|
325
|
+
);
|
|
326
|
+
}, "exportTreeGridToExcelById"), lt = /* @__PURE__ */ l((e, t) => {
|
|
327
|
+
const r = u(e), n = r == null ? void 0 : r.GetSelRows();
|
|
328
|
+
if (!r || !n)
|
|
329
|
+
return [];
|
|
330
|
+
const s = U(
|
|
331
|
+
r,
|
|
332
|
+
n,
|
|
333
|
+
t
|
|
284
334
|
);
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
const r = u(t);
|
|
290
|
-
if (!r || !(e != null && e.targetKey))
|
|
335
|
+
return w(r, s);
|
|
336
|
+
}, "getTreeGridSelectedRowsById"), it = /* @__PURE__ */ l((e, t) => {
|
|
337
|
+
const r = u(e);
|
|
338
|
+
if (!r || !(t != null && t.targetKey))
|
|
291
339
|
return;
|
|
292
|
-
const n =
|
|
293
|
-
if (
|
|
340
|
+
const n = t == null ? void 0 : t.targetKey;
|
|
341
|
+
if (t == null ? void 0 : t.canVisible) {
|
|
294
342
|
r.ShowCol(n);
|
|
295
343
|
return;
|
|
296
344
|
}
|
|
297
345
|
r.HideCol(n);
|
|
298
|
-
}, "setTreeGridColumnVisibilityById"),
|
|
299
|
-
const r = u(
|
|
300
|
-
!r || !n || !s || (
|
|
301
|
-
}, "highlightTreeGridCellById"),
|
|
302
|
-
const r = u(
|
|
346
|
+
}, "setTreeGridColumnVisibilityById"), at = /* @__PURE__ */ l((e, t) => {
|
|
347
|
+
const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
|
|
348
|
+
!r || !n || !s || (de(r, n, s), r.SetValue(n, `${s}Class`, z), r.SetValue(n, `${s}Color`, t.backgroundColor ?? O), t.refresh !== !1 && r.RefreshCell(n, s));
|
|
349
|
+
}, "highlightTreeGridCellById"), ct = /* @__PURE__ */ l((e, t) => {
|
|
350
|
+
const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
|
|
303
351
|
if (!r || !n || !s)
|
|
304
352
|
return;
|
|
305
|
-
const
|
|
306
|
-
r.SetValue(n, `${s}Class`, (
|
|
307
|
-
}, "clearTreeGridCellHighlightById"),
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
}, "resetTreeGridSelectionById"),
|
|
311
|
-
|
|
312
|
-
}, "resetTreeGridSelectionsByIds"),
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
353
|
+
const i = oe(n, s);
|
|
354
|
+
r.SetValue(n, `${s}Class`, (i == null ? void 0 : i.className) ?? ""), r.SetValue(n, `${s}Color`, (i == null ? void 0 : i.color) ?? ""), r.RefreshCell(n, s);
|
|
355
|
+
}, "clearTreeGridCellHighlightById"), b = /* @__PURE__ */ l((e) => {
|
|
356
|
+
const t = u(e);
|
|
357
|
+
t && t.ActionDeselectAll(1, 0);
|
|
358
|
+
}, "resetTreeGridSelectionById"), dt = /* @__PURE__ */ l((e) => {
|
|
359
|
+
e.forEach(b);
|
|
360
|
+
}, "resetTreeGridSelectionsByIds"), He = /* @__PURE__ */ l((e) => {
|
|
361
|
+
const t = u(e);
|
|
362
|
+
t && (t.ActionUndoAll(1, 0), b(e), t.Calculate(1, 1), window.setTimeout(() => {
|
|
363
|
+
_(e);
|
|
316
364
|
}, 0));
|
|
317
|
-
}, "resetTreeGridChangesById"),
|
|
318
|
-
|
|
319
|
-
}, "resetTreeGridChangesByIds"),
|
|
365
|
+
}, "resetTreeGridChangesById"), ot = /* @__PURE__ */ l((e) => {
|
|
366
|
+
e.forEach(He);
|
|
367
|
+
}, "resetTreeGridChangesByIds"), ut = /* @__PURE__ */ l((e, t, r, n, s) => {
|
|
320
368
|
if (!(r != null && r.length))
|
|
321
369
|
return;
|
|
322
|
-
const
|
|
323
|
-
if (!
|
|
370
|
+
const i = u(e);
|
|
371
|
+
if (!i)
|
|
324
372
|
return;
|
|
325
|
-
const
|
|
326
|
-
const f =
|
|
327
|
-
return `${s.map((
|
|
328
|
-
}).join("|"),
|
|
329
|
-
|
|
373
|
+
const a = r.map((d) => {
|
|
374
|
+
const f = d;
|
|
375
|
+
return `${s.map((T) => f[T]).find((T) => T != null && T !== "") ?? ""}`;
|
|
376
|
+
}).join("|"), c = r.map((d) => `${d[n] ?? ""}`).join("|");
|
|
377
|
+
i.SetAttribute(null, t, "Type", "Enum", 0, 0), i.SetAttribute(null, t, "Enum", `|${a}`, 0, 0), i.SetAttribute(null, t, "EnumKeys", `|${c}`, 1, 0);
|
|
330
378
|
}, "setTreeGridColumnEnumOptionsById");
|
|
331
379
|
export {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
380
|
+
z as TREEGRID_CELL_CHANGED_CLASS,
|
|
381
|
+
O as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
382
|
+
Tt as TREEGRID_INPUT_CELL_COLOR,
|
|
383
|
+
Gt as TREEGRID_WARNING_CELL_COLOR,
|
|
384
|
+
tt as addTreeGridRowById,
|
|
385
|
+
Qe as appendTreeGridAddedRowHighlightColumn,
|
|
386
|
+
ct as clearTreeGridCellHighlightById,
|
|
387
|
+
st as exportTreeGridToExcelById,
|
|
388
|
+
Ze as getTreeGridAddedRowBaselineValue,
|
|
389
|
+
Je as getTreeGridAddedRowHighlightColumns,
|
|
342
390
|
u as getTreeGridById,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
391
|
+
F as getTreeGridCellComparableValue,
|
|
392
|
+
pe as getTreeGridDataRowsById,
|
|
393
|
+
nt as getTreeGridRowChangesById,
|
|
394
|
+
lt as getTreeGridSelectedRowsById,
|
|
395
|
+
at as highlightTreeGridCellById,
|
|
396
|
+
ee as isTreeGridRowAddedById,
|
|
397
|
+
w as normalizeTreeGridExternalRows,
|
|
398
|
+
et as reloadTreeGridBodyById,
|
|
399
|
+
ge as removeTreeGridAddedRowHighlightColumn,
|
|
400
|
+
He as resetTreeGridChangesById,
|
|
401
|
+
ot as resetTreeGridChangesByIds,
|
|
402
|
+
b as resetTreeGridSelectionById,
|
|
403
|
+
dt as resetTreeGridSelectionsByIds,
|
|
404
|
+
ut as setTreeGridColumnEnumOptionsById,
|
|
405
|
+
it as setTreeGridColumnVisibilityById,
|
|
406
|
+
rt as validateTreeGridRequiredCellsById
|
|
359
407
|
};
|
|
360
408
|
//# sourceMappingURL=treeGridUtil.js.map
|