@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,14 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { isTreeGridRowAddedById as P, getTreeGridAddedRowHighlightColumns as
|
|
5
|
-
import { applyTreeGridLayoutToGrid as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
var dn = Object.defineProperty;
|
|
2
|
+
var o = (e, n) => dn(e, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { getTreeGridTextResourceUrl as un, TREEGRID_CELL_CHANGED_CLASS as Pe } from "../../../constants/treeGrid.js";
|
|
4
|
+
import { isTreeGridRowAddedById as P, getTreeGridAddedRowHighlightColumns as Te, getTreeGridCellComparableValue as $e, clearTreeGridCellHighlightById as fn, highlightTreeGridCellById as an, normalizeTreeGridExternalRows as Tn } from "../../../utils/treeGridUtil.js";
|
|
5
|
+
import { applyTreeGridLayoutToGrid as pn } from "./treeGridLayout.js";
|
|
6
|
+
import { resolveTreeGridSelectedRows as En } from "./treeGridSelection.js";
|
|
7
|
+
import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as Cn, TREE_GRID_SELECT_ALL_CHECKED_CLASS as pe, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as Ee, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as Ce, TREE_GRID_SELECTED_CHANGED_CELL_CLASS as Ge, TREE_GRID_THEME_WRAPPER_CLASS as Gn, TREE_GRID_ERROR_CELL_CLASS as Sn } from "./treeGridTheme.js";
|
|
8
|
+
import { countTreeGridPerf as De, logTreeGridPerf as hn, measureTreeGridPerf as Fe } from "./utils/perf.js";
|
|
9
|
+
import { debounce as W } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
10
|
+
import { isEmpty as gn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
11
|
+
import { get as Rn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
12
|
+
const fr = 300, An = 3, _n = {
|
|
12
13
|
1: {
|
|
13
14
|
onEnter: "TabDownEdit",
|
|
14
15
|
onEnterEdit: "AcceptEdit AND TabDownEdit,1"
|
|
@@ -25,37 +26,37 @@ const jt = 300, dn = 3, un = {
|
|
|
25
26
|
onEnter: "TabRightEditAdd",
|
|
26
27
|
onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
|
|
27
28
|
}
|
|
28
|
-
},
|
|
29
|
+
}, mn = [240, 240, 240], Ln = [248, 248, 248], On = [255, 255, 255], xn = [255, 255, 254], In = [242, 242, 242], bn = [
|
|
29
30
|
[255, 210, 210],
|
|
30
31
|
[249, 209, 209],
|
|
31
32
|
[115, 16, 11]
|
|
32
|
-
],
|
|
33
|
+
], wn = "#D7FFD7", yn = "transparent", Se = "Button", he = Pe.split(/\s+/).filter(
|
|
33
34
|
Boolean
|
|
34
|
-
),
|
|
35
|
+
), Pn = /* @__PURE__ */ new Set([
|
|
35
36
|
"Text",
|
|
36
37
|
"Lines",
|
|
37
38
|
"Int",
|
|
38
39
|
"Float",
|
|
39
40
|
"Date",
|
|
40
41
|
"Pass"
|
|
41
|
-
]),
|
|
42
|
+
]), ge = /* @__PURE__ */ o((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), $n = {
|
|
42
43
|
Visible: "1",
|
|
43
44
|
CanHide: "0",
|
|
44
45
|
Delete: "1",
|
|
45
46
|
Width: "33"
|
|
46
|
-
},
|
|
47
|
+
}, Dn = {
|
|
47
48
|
Spanned: "1"
|
|
48
|
-
}, N = {
|
|
49
|
-
OnClickCell: "Focus"
|
|
50
49
|
}, k = {
|
|
50
|
+
OnClickCell: "Focus"
|
|
51
|
+
}, U = {
|
|
51
52
|
OnClickPanelSelectAll: "SelectAll OR DeselectAll"
|
|
52
|
-
},
|
|
53
|
+
}, Ne = "Panel", ve = ["Formula", "FormulaFormula"], Fn = /<Grid\b[^>]*>/i, Nn = /<\/Grid\s*>/i, vn = /<Toolbar\b[^>]*\/?>/i, kn = [
|
|
53
54
|
"Undo",
|
|
54
55
|
"Deleting",
|
|
55
56
|
"Selecting",
|
|
56
57
|
"SelectingSingle",
|
|
57
58
|
"SuppressCfg"
|
|
58
|
-
],
|
|
59
|
+
], Un = {
|
|
59
60
|
addRow: ["Add", "AddRows", "AddChildren", "AddRowsChildren"],
|
|
60
61
|
deleteRow: [
|
|
61
62
|
"Delete",
|
|
@@ -76,80 +77,80 @@ const jt = 300, dn = 3, un = {
|
|
|
76
77
|
"UndeleteVisibleRowsChildren"
|
|
77
78
|
],
|
|
78
79
|
selectRow: ["Select", "SelectRows", "Deselect", "DeselectRows"]
|
|
79
|
-
}, S = /* @__PURE__ */
|
|
80
|
+
}, S = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), $ = /* @__PURE__ */ o((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), K = /* @__PURE__ */ o((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), F = /* @__PURE__ */ o((e, n) => String(e ?? "").trim().toLowerCase() === n.toLowerCase(), "isTreeGridConfigValue"), te = /* @__PURE__ */ o((e, n) => !$(e) && !K(n), "isTreeGridCheckboxSelectionMode"), ke = /* @__PURE__ */ o((e) => {
|
|
80
81
|
const n = e.Cfg;
|
|
81
82
|
return Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [];
|
|
82
|
-
}, "getTreeGridJsonCfgRecords"),
|
|
83
|
+
}, "getTreeGridJsonCfgRecords"), j = /* @__PURE__ */ o((e, n) => {
|
|
83
84
|
let t;
|
|
84
|
-
return
|
|
85
|
+
return ke(e).forEach((r) => {
|
|
85
86
|
n in r && (t = r[n]);
|
|
86
87
|
}), t;
|
|
87
|
-
}, "getTreeGridJsonCfgValue"),
|
|
88
|
+
}, "getTreeGridJsonCfgValue"), Ue = /* @__PURE__ */ o((e, n) => {
|
|
88
89
|
const t = new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i").exec(
|
|
89
90
|
e
|
|
90
91
|
);
|
|
91
92
|
return t == null ? void 0 : t[2];
|
|
92
|
-
}, "getTreeGridXmlTagAttributeValue"),
|
|
93
|
+
}, "getTreeGridXmlTagAttributeValue"), D = /* @__PURE__ */ o((e, n) => new RegExp(`\\b${n}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), Be = /* @__PURE__ */ o((e) => String(e).replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), "escapeTreeGridXmlAttributeValue"), N = /* @__PURE__ */ o((e, n, t) => {
|
|
93
94
|
const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
|
|
94
|
-
return `${e.slice(0, r)} ${n}="${
|
|
95
|
+
return `${e.slice(0, r)} ${n}="${Be(
|
|
95
96
|
t
|
|
96
97
|
)}"${e.slice(r)}`;
|
|
97
|
-
}, "appendTreeGridXmlTagAttribute"),
|
|
98
|
+
}, "appendTreeGridXmlTagAttribute"), z = /* @__PURE__ */ o((e, n, t) => D(e, n) ? e.replace(
|
|
98
99
|
new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i"),
|
|
99
|
-
() => `${n}="${
|
|
100
|
-
) :
|
|
100
|
+
() => `${n}="${Be(t)}"`
|
|
101
|
+
) : N(e, n, t), "setTreeGridXmlTagAttribute"), Ve = /* @__PURE__ */ o((e, n) => {
|
|
101
102
|
let t = e;
|
|
102
|
-
return Object.entries(n).forEach(([r,
|
|
103
|
-
t =
|
|
103
|
+
return Object.entries(n).forEach(([r, i]) => {
|
|
104
|
+
t = z(t, r, i);
|
|
104
105
|
}), t;
|
|
105
|
-
}, "setTreeGridXmlTagAttributes"),
|
|
106
|
+
}, "setTreeGridXmlTagAttributes"), B = /* @__PURE__ */ o((e, n) => {
|
|
106
107
|
let t = e;
|
|
107
|
-
return Object.entries(n).forEach(([r,
|
|
108
|
-
|
|
108
|
+
return Object.entries(n).forEach(([r, i]) => {
|
|
109
|
+
D(t, r) || (t = N(t, r, i));
|
|
109
110
|
}), t;
|
|
110
|
-
}, "appendMissingTreeGridXmlTagAttributes"), x = /* @__PURE__ */
|
|
111
|
+
}, "appendMissingTreeGridXmlTagAttributes"), x = /* @__PURE__ */ o((e) => {
|
|
111
112
|
var a;
|
|
112
113
|
const n = /<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!\[CDATA\[[\s\S]*?\]\]>|<\/?([A-Za-z][\w:-]*)\b[^>]*>/g, t = {
|
|
113
114
|
cfgValues: {}
|
|
114
115
|
};
|
|
115
|
-
let r,
|
|
116
|
+
let r, i = 0, c = !1;
|
|
116
117
|
for (; r = n.exec(e); ) {
|
|
117
|
-
const f = r[0],
|
|
118
|
-
if (!
|
|
118
|
+
const f = r[0], C = (a = r[1]) == null ? void 0 : a.toLowerCase();
|
|
119
|
+
if (!C || f.startsWith("<!--") || f.startsWith("<?") || f.startsWith("<!"))
|
|
119
120
|
continue;
|
|
120
|
-
!t.hasFastPanel &&
|
|
121
|
+
!t.hasFastPanel && D(f, "FastPanel") && (t.hasFastPanel = !0);
|
|
121
122
|
const G = f.startsWith("</"), h = /\/>\s*$/.test(f);
|
|
122
|
-
if (!
|
|
123
|
-
!G &&
|
|
123
|
+
if (!c) {
|
|
124
|
+
!G && C === "grid" && (c = !0, t.gridOpenTagEndIndex = r.index + f.length, i = h ? 0 : 1);
|
|
124
125
|
continue;
|
|
125
126
|
}
|
|
126
127
|
if (G) {
|
|
127
|
-
if (
|
|
128
|
+
if (i = Math.max(0, i - 1), C === "grid" && i === 0)
|
|
128
129
|
break;
|
|
129
130
|
continue;
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
i === 1 && (C === "cfg" ? (t.defaultCfgTag || (t.defaultCfgTag = {
|
|
132
133
|
index: r.index,
|
|
133
134
|
tag: f
|
|
134
|
-
}),
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
}), t.lastCfgEndIndex = r.index + f.length) :
|
|
135
|
+
}), kn.forEach((g) => {
|
|
136
|
+
const m = Ue(f, g);
|
|
137
|
+
m !== void 0 && (t.cfgValues[g] = m);
|
|
138
|
+
}), t.lastCfgEndIndex = r.index + f.length) : C === "actions" && !t.defaultActionsTag ? t.defaultActionsTag = {
|
|
138
139
|
index: r.index,
|
|
139
140
|
tag: f
|
|
140
|
-
} :
|
|
141
|
+
} : C === "panel" && !t.defaultPanelTag && Bn(f) ? t.defaultPanelTag = {
|
|
141
142
|
index: r.index,
|
|
142
143
|
tag: f
|
|
143
|
-
} :
|
|
144
|
+
} : C === "animations" && !t.animationsTag && (t.animationsTag = {
|
|
144
145
|
index: r.index,
|
|
145
146
|
tag: f
|
|
146
|
-
})), h || (
|
|
147
|
+
})), h || (i += 1);
|
|
147
148
|
}
|
|
148
149
|
return t;
|
|
149
|
-
}, "scanTreeGridXmlDefaultLayout"),
|
|
150
|
-
const n =
|
|
150
|
+
}, "scanTreeGridXmlDefaultLayout"), Bn = /* @__PURE__ */ o((e) => {
|
|
151
|
+
const n = Ue(e, "Name");
|
|
151
152
|
return n === void 0 || n === "" || n.toLowerCase() === "panel";
|
|
152
|
-
}, "isTreeGridXmlDefaultPanelTag"),
|
|
153
|
+
}, "isTreeGridXmlDefaultPanelTag"), Vn = /* @__PURE__ */ o((e) => {
|
|
153
154
|
const n = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, t = [];
|
|
154
155
|
let r;
|
|
155
156
|
for (; r = n.exec(e); ) {
|
|
@@ -164,101 +165,101 @@ const jt = 300, dn = 3, un = {
|
|
|
164
165
|
});
|
|
165
166
|
}
|
|
166
167
|
return t;
|
|
167
|
-
}, "getLeadingTreeGridXmlHeaderTags"),
|
|
168
|
-
const n =
|
|
168
|
+
}, "getLeadingTreeGridXmlHeaderTags"), Mn = /* @__PURE__ */ o((e) => {
|
|
169
|
+
const n = Vn(e);
|
|
169
170
|
if (n.length <= 1)
|
|
170
171
|
return {
|
|
171
172
|
headContent: e,
|
|
172
173
|
isApplied: !1
|
|
173
174
|
};
|
|
174
175
|
const [t, ...r] = n;
|
|
175
|
-
if (
|
|
176
|
+
if (D(t.tag, "PanelRowSpan") || r.some(({ tag: c }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(c)))
|
|
176
177
|
return {
|
|
177
178
|
headContent: e,
|
|
178
179
|
isApplied: !1
|
|
179
180
|
};
|
|
180
|
-
let
|
|
181
|
-
return
|
|
182
|
-
|
|
181
|
+
let i = t.tag;
|
|
182
|
+
return D(i, "Spanned") || (i = N(i, "Spanned", 1)), i = N(
|
|
183
|
+
i,
|
|
183
184
|
"PanelRowSpan",
|
|
184
185
|
n.length
|
|
185
186
|
), {
|
|
186
|
-
headContent: `${e.slice(0, t.index)}${
|
|
187
|
+
headContent: `${e.slice(0, t.index)}${i}${e.slice(
|
|
187
188
|
t.index + t.tag.length
|
|
188
189
|
)}`,
|
|
189
190
|
isApplied: !0
|
|
190
191
|
};
|
|
191
|
-
}, "applyTreeGridXmlHeadPanelRowSpanDefault"),
|
|
192
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
192
|
+
}, "applyTreeGridXmlHeadPanelRowSpanDefault"), Xn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlPanelSpannedInsertionIndex"), Wn = /* @__PURE__ */ o((e) => !!e.defaultPanelTag || We(e.cfgValues) || Je(e.cfgValues), "isTreeGridXmlPanelSpannedDefaultLayout"), Jn = /* @__PURE__ */ o((e, n) => {
|
|
193
|
+
if (n.gridOpenTagEndIndex === void 0 || !Wn(n))
|
|
193
194
|
return e;
|
|
194
195
|
const t = n.defaultPanelTag;
|
|
195
196
|
if (t) {
|
|
196
|
-
const
|
|
197
|
+
const i = B(
|
|
197
198
|
t.tag,
|
|
198
|
-
|
|
199
|
+
Dn
|
|
199
200
|
);
|
|
200
|
-
return
|
|
201
|
+
return i === t.tag ? e : `${e.slice(0, t.index)}${i}${e.slice(
|
|
201
202
|
t.index + t.tag.length
|
|
202
203
|
)}`;
|
|
203
204
|
}
|
|
204
|
-
const r =
|
|
205
|
+
const r = Xn(n);
|
|
205
206
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
206
207
|
<Panel Spanned="1" />${e.slice(
|
|
207
208
|
r
|
|
208
209
|
)}`;
|
|
209
|
-
}, "applyTreeGridXmlDefaultPanelSpannedLayout"),
|
|
210
|
+
}, "applyTreeGridXmlDefaultPanelSpannedLayout"), Kn = /* @__PURE__ */ o((e) => {
|
|
210
211
|
if (!/<Head\b/i.test(e) || /\bPanelRowSpan\s*[:=]/i.test(e))
|
|
211
212
|
return e;
|
|
212
213
|
let n = !1;
|
|
213
214
|
const t = e.replace(
|
|
214
215
|
/(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
|
|
215
|
-
(r,
|
|
216
|
-
const f =
|
|
217
|
-
return f.isApplied ? (n = !0, `${
|
|
216
|
+
(r, i, c, a) => {
|
|
217
|
+
const f = Mn(c);
|
|
218
|
+
return f.isApplied ? (n = !0, `${i}${f.headContent}${a}`) : r;
|
|
218
219
|
}
|
|
219
220
|
);
|
|
220
|
-
return n ?
|
|
221
|
+
return n ? Jn(
|
|
221
222
|
t,
|
|
222
223
|
x(t)
|
|
223
224
|
) : e;
|
|
224
|
-
}, "applyTreeGridDefaultHeaderPanelRowSpanLayout"),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
), "isTreeGridJsonCheckboxSelectionLayout"),
|
|
225
|
+
}, "applyTreeGridDefaultHeaderPanelRowSpanLayout"), Me = /* @__PURE__ */ o((e) => te(
|
|
226
|
+
j(e, "Selecting"),
|
|
227
|
+
j(e, "SelectingSingle")
|
|
228
|
+
), "isTreeGridJsonCheckboxSelectionLayout"), Xe = /* @__PURE__ */ o((e) => te(
|
|
228
229
|
e.Selecting,
|
|
229
230
|
e.SelectingSingle
|
|
230
|
-
), "isTreeGridXmlCheckboxSelectionLayout"),
|
|
231
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
231
|
+
), "isTreeGridXmlCheckboxSelectionLayout"), We = /* @__PURE__ */ o((e) => !$(e.Selecting), "isTreeGridXmlSelectingLayout"), Je = /* @__PURE__ */ o((e) => F(e.Undo, "1") && F(e.Deleting, "2") && F(e.Selecting, "0"), "isTreeGridXmlDeletePanelDefaultLayout"), jn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlCellClickActionInsertionIndex"), zn = /* @__PURE__ */ o((e, n) => {
|
|
232
|
+
if (n.gridOpenTagEndIndex === void 0 || !We(n.cfgValues) || /\bOnClickCell\s*=/i.test(e))
|
|
232
233
|
return e;
|
|
233
234
|
const t = n.defaultActionsTag;
|
|
234
235
|
if (t) {
|
|
235
|
-
const
|
|
236
|
+
const i = B(
|
|
236
237
|
t.tag,
|
|
237
|
-
|
|
238
|
+
k
|
|
238
239
|
);
|
|
239
|
-
return
|
|
240
|
+
return i === t.tag ? e : `${e.slice(0, t.index)}${i}${e.slice(
|
|
240
241
|
t.index + t.tag.length
|
|
241
242
|
)}`;
|
|
242
243
|
}
|
|
243
|
-
const r =
|
|
244
|
+
const r = jn(n);
|
|
244
245
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
245
246
|
<Actions OnClickCell="Focus" />${e.slice(
|
|
246
247
|
r
|
|
247
248
|
)}`;
|
|
248
|
-
}, "applyTreeGridXmlDefaultCellClickActionLayout"),
|
|
249
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
249
|
+
}, "applyTreeGridXmlDefaultCellClickActionLayout"), Hn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlSelectAllPanelActionInsertionIndex"), Yn = /* @__PURE__ */ o((e, n) => {
|
|
250
|
+
if (n.gridOpenTagEndIndex === void 0 || !Xe(n.cfgValues) || /\bOnClickPanelSelectAll\s*=/i.test(e))
|
|
250
251
|
return e;
|
|
251
252
|
const t = n.defaultActionsTag;
|
|
252
253
|
if (t) {
|
|
253
|
-
const
|
|
254
|
+
const i = B(
|
|
254
255
|
t.tag,
|
|
255
|
-
|
|
256
|
+
U
|
|
256
257
|
);
|
|
257
|
-
return
|
|
258
|
+
return i === t.tag ? e : `${e.slice(0, t.index)}${i}${e.slice(
|
|
258
259
|
t.index + t.tag.length
|
|
259
260
|
)}`;
|
|
260
261
|
}
|
|
261
|
-
const r =
|
|
262
|
+
const r = Hn(n);
|
|
262
263
|
return r === void 0 ? e : `${e.slice(
|
|
263
264
|
0,
|
|
264
265
|
r
|
|
@@ -266,33 +267,33 @@ const jt = 300, dn = 3, un = {
|
|
|
266
267
|
<Actions OnClickPanelSelectAll="SelectAll OR DeselectAll" />${e.slice(
|
|
267
268
|
r
|
|
268
269
|
)}`;
|
|
269
|
-
}, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"),
|
|
270
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
270
|
+
}, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"), Zn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlDeletePanelInsertionIndex"), qn = /* @__PURE__ */ o((e, n) => {
|
|
271
|
+
if (n.gridOpenTagEndIndex === void 0 || !Je(n.cfgValues))
|
|
271
272
|
return e;
|
|
272
273
|
const t = n.defaultPanelTag;
|
|
273
274
|
if (t) {
|
|
274
|
-
const
|
|
275
|
+
const c = B(
|
|
275
276
|
t.tag,
|
|
276
|
-
|
|
277
|
+
$n
|
|
277
278
|
);
|
|
278
|
-
return
|
|
279
|
+
return c === t.tag ? e : `${e.slice(0, t.index)}${c}${e.slice(
|
|
279
280
|
t.index + t.tag.length
|
|
280
281
|
)}`;
|
|
281
282
|
}
|
|
282
|
-
const r =
|
|
283
|
+
const r = Zn(n);
|
|
283
284
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
284
285
|
<Panel Visible="1" CanHide="0" Delete="1" Width="33" />${e.slice(
|
|
285
286
|
r
|
|
286
287
|
)}`;
|
|
287
|
-
}, "applyTreeGridXmlDefaultDeletePanelLayout"),
|
|
288
|
-
if (n.hasFastPanel || !
|
|
288
|
+
}, "applyTreeGridXmlDefaultDeletePanelLayout"), Qn = /* @__PURE__ */ o((e, n) => {
|
|
289
|
+
if (n.hasFastPanel || !Xe(n.cfgValues))
|
|
289
290
|
return e;
|
|
290
291
|
const t = n.gridOpenTagEndIndex;
|
|
291
292
|
return t === void 0 ? e : `${e.slice(0, t)}
|
|
292
293
|
<Cfg FastPanel="0" />${e.slice(
|
|
293
294
|
t
|
|
294
295
|
)}`;
|
|
295
|
-
}, "applyTreeGridXmlDefaultFastPanelLayout"),
|
|
296
|
+
}, "applyTreeGridXmlDefaultFastPanelLayout"), et = /* @__PURE__ */ o((e) => {
|
|
296
297
|
const n = e.Cfg;
|
|
297
298
|
if (Array.isArray(n)) {
|
|
298
299
|
n.some((t) => S(t) && "FastPanel" in t) || (e.Cfg = [{ FastPanel: 0 }, ...n]);
|
|
@@ -303,118 +304,118 @@ const jt = 300, dn = 3, un = {
|
|
|
303
304
|
return;
|
|
304
305
|
}
|
|
305
306
|
e.Cfg = { FastPanel: 0 };
|
|
306
|
-
}, "applyTreeGridJsonFastPanelDefault"),
|
|
307
|
+
}, "applyTreeGridJsonFastPanelDefault"), nt = /* @__PURE__ */ o((e) => {
|
|
307
308
|
const n = e.Actions;
|
|
308
309
|
if (Array.isArray(n)) {
|
|
309
310
|
n.some(
|
|
310
311
|
(t) => S(t) && "OnClickPanelSelectAll" in t
|
|
311
|
-
) || (e.Actions = [{ ...
|
|
312
|
+
) || (e.Actions = [{ ...U }, ...n]);
|
|
312
313
|
return;
|
|
313
314
|
}
|
|
314
315
|
if (S(n)) {
|
|
315
|
-
"OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll =
|
|
316
|
+
"OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll = U.OnClickPanelSelectAll);
|
|
316
317
|
return;
|
|
317
318
|
}
|
|
318
|
-
n === void 0 && (e.Actions = { ...
|
|
319
|
-
}, "applyTreeGridJsonSelectAllPanelActionDefault"),
|
|
319
|
+
n === void 0 && (e.Actions = { ...U });
|
|
320
|
+
}, "applyTreeGridJsonSelectAllPanelActionDefault"), tt = /* @__PURE__ */ o((e) => {
|
|
320
321
|
const n = e.Actions;
|
|
321
322
|
if (Array.isArray(n)) {
|
|
322
|
-
n.some((t) => S(t) && "OnClickCell" in t) || (e.Actions = [{ ...
|
|
323
|
+
n.some((t) => S(t) && "OnClickCell" in t) || (e.Actions = [{ ...k }, ...n]);
|
|
323
324
|
return;
|
|
324
325
|
}
|
|
325
326
|
if (S(n)) {
|
|
326
|
-
"OnClickCell" in n || (n.OnClickCell =
|
|
327
|
+
"OnClickCell" in n || (n.OnClickCell = k.OnClickCell);
|
|
327
328
|
return;
|
|
328
329
|
}
|
|
329
|
-
n === void 0 && (e.Actions = { ...
|
|
330
|
-
}, "applyTreeGridJsonCellClickActionDefault"),
|
|
330
|
+
n === void 0 && (e.Actions = { ...k });
|
|
331
|
+
}, "applyTreeGridJsonCellClickActionDefault"), rt = /* @__PURE__ */ o((e) => {
|
|
331
332
|
try {
|
|
332
333
|
const n = JSON.parse(e);
|
|
333
|
-
return !S(n) ||
|
|
334
|
+
return !S(n) || $(j(n, "Selecting")) ? e : (tt(n), JSON.stringify(n));
|
|
334
335
|
} catch {
|
|
335
336
|
return e;
|
|
336
337
|
}
|
|
337
|
-
}, "applyTreeGridJsonDefaultCellClickActionLayout"),
|
|
338
|
+
}, "applyTreeGridJsonDefaultCellClickActionLayout"), Re = /* @__PURE__ */ o((e, n) => {
|
|
338
339
|
const t = e.trim();
|
|
339
|
-
return t ? t.startsWith("{") ?
|
|
340
|
+
return t ? t.startsWith("{") ? rt(e) : zn(
|
|
340
341
|
e,
|
|
341
342
|
n ?? x(e)
|
|
342
343
|
) : e;
|
|
343
|
-
}, "applyTreeGridDefaultCellClickActionLayout"),
|
|
344
|
+
}, "applyTreeGridDefaultCellClickActionLayout"), it = /* @__PURE__ */ o((e) => {
|
|
344
345
|
try {
|
|
345
346
|
const n = JSON.parse(e);
|
|
346
|
-
return !S(n) || !
|
|
347
|
+
return !S(n) || !Me(n) ? e : (nt(n), JSON.stringify(n));
|
|
347
348
|
} catch {
|
|
348
349
|
return e;
|
|
349
350
|
}
|
|
350
|
-
}, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"),
|
|
351
|
+
}, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"), Ae = /* @__PURE__ */ o((e, n) => {
|
|
351
352
|
const t = e.trim();
|
|
352
|
-
return t ? t.startsWith("{") ?
|
|
353
|
+
return t ? t.startsWith("{") ? it(e) : Yn(
|
|
353
354
|
e,
|
|
354
355
|
n ?? x(e)
|
|
355
356
|
) : e;
|
|
356
|
-
}, "applyTreeGridDefaultSelectAllPanelActionLayout"),
|
|
357
|
+
}, "applyTreeGridDefaultSelectAllPanelActionLayout"), ot = /* @__PURE__ */ o((e, n) => {
|
|
357
358
|
if (n === void 0)
|
|
358
359
|
return e;
|
|
359
360
|
try {
|
|
360
361
|
const t = JSON.parse(e);
|
|
361
362
|
if (!S(t))
|
|
362
363
|
return e;
|
|
363
|
-
const r =
|
|
364
|
-
return r.some((
|
|
364
|
+
const r = ke(t);
|
|
365
|
+
return r.some((i) => "SuppressCfg" in i) ? e : (r[0] ? r[0].SuppressCfg = n : t.Cfg = { SuppressCfg: n }, JSON.stringify(t));
|
|
365
366
|
} catch {
|
|
366
367
|
return e;
|
|
367
368
|
}
|
|
368
|
-
}, "applyTreeGridJsonDefaultSuppressCfgLayout"),
|
|
369
|
+
}, "applyTreeGridJsonDefaultSuppressCfgLayout"), st = /* @__PURE__ */ o((e, n, t) => {
|
|
369
370
|
if (t === void 0 || n.cfgValues.SuppressCfg !== void 0)
|
|
370
371
|
return e;
|
|
371
372
|
const r = n.defaultCfgTag;
|
|
372
373
|
if (r) {
|
|
373
|
-
const
|
|
374
|
-
return `${e.slice(0, r.index)}${
|
|
374
|
+
const c = N(r.tag, "SuppressCfg", t);
|
|
375
|
+
return `${e.slice(0, r.index)}${c}${e.slice(
|
|
375
376
|
r.index + r.tag.length
|
|
376
377
|
)}`;
|
|
377
378
|
}
|
|
378
|
-
const
|
|
379
|
-
return
|
|
379
|
+
const i = n.gridOpenTagEndIndex;
|
|
380
|
+
return i === void 0 ? e : `${e.slice(0, i)}
|
|
380
381
|
<Cfg SuppressCfg="${t}" />${e.slice(
|
|
381
|
-
|
|
382
|
+
i
|
|
382
383
|
)}`;
|
|
383
|
-
}, "applyTreeGridXmlDefaultSuppressCfgLayout"),
|
|
384
|
+
}, "applyTreeGridXmlDefaultSuppressCfgLayout"), ct = /* @__PURE__ */ o((e, n) => {
|
|
384
385
|
const t = e.trim();
|
|
385
|
-
return n === void 0 || !t ? e : t.startsWith("{") ?
|
|
386
|
+
return n === void 0 || !t ? e : t.startsWith("{") ? ot(e, n) : st(
|
|
386
387
|
e,
|
|
387
388
|
x(e),
|
|
388
389
|
n
|
|
389
390
|
);
|
|
390
|
-
}, "applyTreeGridDefaultSuppressCfgLayout"),
|
|
391
|
-
const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [],
|
|
392
|
-
(
|
|
393
|
-
) : S(t) &&
|
|
394
|
-
return [...r, ...
|
|
395
|
-
}, "getTreeGridJsonToolbarRecords"),
|
|
391
|
+
}, "applyTreeGridDefaultSuppressCfgLayout"), lt = /* @__PURE__ */ o((e) => ve.some((n) => n in e), "hasTreeGridToolbarFormulaField"), dt = /* @__PURE__ */ o((e) => {
|
|
392
|
+
const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [], i = Array.isArray(t) ? t.filter(
|
|
393
|
+
(c) => S(c) && F(c.Kind, "Toolbar")
|
|
394
|
+
) : S(t) && F(t.Kind, "Toolbar") ? [t] : [];
|
|
395
|
+
return [...r, ...i];
|
|
396
|
+
}, "getTreeGridJsonToolbarRecords"), ut = /* @__PURE__ */ o((e, n) => {
|
|
396
397
|
if (!n)
|
|
397
398
|
return e;
|
|
398
399
|
try {
|
|
399
400
|
const t = JSON.parse(e);
|
|
400
401
|
if (!S(t))
|
|
401
402
|
return e;
|
|
402
|
-
const r =
|
|
403
|
-
return r.some(
|
|
403
|
+
const r = dt(t);
|
|
404
|
+
return r.some(lt) ? e : (r[0] ? r[0].FormulaFormula = n : t.Toolbar = { FormulaFormula: n }, JSON.stringify(t));
|
|
404
405
|
} catch {
|
|
405
406
|
return e;
|
|
406
407
|
}
|
|
407
|
-
}, "applyTreeGridJsonDefaultToolbarTotalCountLayout"),
|
|
408
|
-
(n) =>
|
|
409
|
-
), "hasTreeGridXmlToolbarFormulaAttribute"),
|
|
408
|
+
}, "applyTreeGridJsonDefaultToolbarTotalCountLayout"), ft = /* @__PURE__ */ o((e) => ve.some(
|
|
409
|
+
(n) => D(e, n)
|
|
410
|
+
), "hasTreeGridXmlToolbarFormulaAttribute"), at = /* @__PURE__ */ o((e, n) => {
|
|
410
411
|
if (!n)
|
|
411
412
|
return e;
|
|
412
|
-
const t =
|
|
413
|
+
const t = vn.exec(e);
|
|
413
414
|
if (t) {
|
|
414
415
|
const a = t[0];
|
|
415
|
-
if (
|
|
416
|
+
if (ft(a))
|
|
416
417
|
return e;
|
|
417
|
-
const f =
|
|
418
|
+
const f = z(
|
|
418
419
|
a,
|
|
419
420
|
"Formula",
|
|
420
421
|
n
|
|
@@ -423,58 +424,58 @@ const jt = 300, dn = 3, un = {
|
|
|
423
424
|
t.index + a.length
|
|
424
425
|
)}`;
|
|
425
426
|
}
|
|
426
|
-
const r =
|
|
427
|
+
const r = z(
|
|
427
428
|
"<Toolbar />",
|
|
428
429
|
"Formula",
|
|
429
430
|
n
|
|
430
|
-
),
|
|
431
|
-
if (
|
|
432
|
-
return `${e.slice(0,
|
|
431
|
+
), i = Nn.exec(e);
|
|
432
|
+
if (i)
|
|
433
|
+
return `${e.slice(0, i.index)} ${r}
|
|
433
434
|
${e.slice(
|
|
434
|
-
|
|
435
|
+
i.index
|
|
435
436
|
)}`;
|
|
436
|
-
const
|
|
437
|
-
return
|
|
437
|
+
const c = Fn.exec(e);
|
|
438
|
+
return c ? `${e.slice(
|
|
438
439
|
0,
|
|
439
|
-
|
|
440
|
+
c.index + c[0].length
|
|
440
441
|
)}
|
|
441
|
-
${r}${e.slice(
|
|
442
|
-
}, "applyTreeGridXmlDefaultToolbarTotalCountLayout"),
|
|
442
|
+
${r}${e.slice(c.index + c[0].length)}` : e;
|
|
443
|
+
}, "applyTreeGridXmlDefaultToolbarTotalCountLayout"), Tt = /* @__PURE__ */ o((e, n) => {
|
|
443
444
|
const t = e.trim();
|
|
444
|
-
return !n || !t ? e : t.startsWith("{") ?
|
|
445
|
+
return !n || !t ? e : t.startsWith("{") ? ut(
|
|
445
446
|
e,
|
|
446
447
|
n
|
|
447
|
-
) :
|
|
448
|
-
}, "applyTreeGridDefaultToolbarTotalCountLayout"),
|
|
448
|
+
) : at(e, n);
|
|
449
|
+
}, "applyTreeGridDefaultToolbarTotalCountLayout"), pt = /* @__PURE__ */ o((e) => {
|
|
449
450
|
try {
|
|
450
451
|
const n = JSON.parse(e);
|
|
451
|
-
return !S(n) || !
|
|
452
|
+
return !S(n) || !Me(n) ? e : (et(n), JSON.stringify(n));
|
|
452
453
|
} catch {
|
|
453
454
|
return e;
|
|
454
455
|
}
|
|
455
|
-
}, "applyTreeGridJsonDefaultFastPanelLayout"),
|
|
456
|
+
}, "applyTreeGridJsonDefaultFastPanelLayout"), _e = /* @__PURE__ */ o((e, n) => {
|
|
456
457
|
const t = e.trim();
|
|
457
|
-
return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e :
|
|
458
|
+
return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e : pt(e) : Qn(
|
|
458
459
|
e,
|
|
459
460
|
n ?? x(e)
|
|
460
461
|
) : e;
|
|
461
|
-
}, "applyTreeGridDefaultFastPanelLayout"),
|
|
462
|
+
}, "applyTreeGridDefaultFastPanelLayout"), Et = /* @__PURE__ */ o((e) => {
|
|
462
463
|
const n = {};
|
|
463
464
|
return e == null || e.forEach((t) => {
|
|
464
465
|
var r;
|
|
465
|
-
(r =
|
|
466
|
-
n[
|
|
466
|
+
(r = Un[t]) == null || r.forEach((i) => {
|
|
467
|
+
n[i] = "";
|
|
467
468
|
});
|
|
468
469
|
}), n;
|
|
469
|
-
}, "getTreeGridDisabledAnimationAttributes"),
|
|
470
|
+
}, "getTreeGridDisabledAnimationAttributes"), Ct = /* @__PURE__ */ o((e, n) => {
|
|
470
471
|
try {
|
|
471
472
|
const t = JSON.parse(e);
|
|
472
473
|
if (!S(t))
|
|
473
474
|
return e;
|
|
474
475
|
const r = t.Animations;
|
|
475
476
|
if (Array.isArray(r)) {
|
|
476
|
-
const
|
|
477
|
-
|
|
477
|
+
const i = r.find(S);
|
|
478
|
+
i ? Object.assign(i, n) : r.unshift({ ...n });
|
|
478
479
|
} else if (S(r))
|
|
479
480
|
Object.assign(r, n);
|
|
480
481
|
else if (r === void 0)
|
|
@@ -485,54 +486,54 @@ ${e.slice(
|
|
|
485
486
|
} catch {
|
|
486
487
|
return e;
|
|
487
488
|
}
|
|
488
|
-
}, "applyTreeGridJsonDisabledAnimationsLayout"),
|
|
489
|
+
}, "applyTreeGridJsonDisabledAnimationsLayout"), Gt = /* @__PURE__ */ o((e) => Ve("<Animations />", e), "createTreeGridDisabledAnimationsTag"), St = /* @__PURE__ */ o((e, n) => {
|
|
489
490
|
const t = x(e);
|
|
490
491
|
if (t.gridOpenTagEndIndex === void 0)
|
|
491
492
|
return e;
|
|
492
493
|
const r = t.animationsTag;
|
|
493
494
|
if (r) {
|
|
494
|
-
const
|
|
495
|
-
return
|
|
495
|
+
const c = Ve(r.tag, n);
|
|
496
|
+
return c === r.tag ? e : `${e.slice(0, r.index)}${c}${e.slice(
|
|
496
497
|
r.index + r.tag.length
|
|
497
498
|
)}`;
|
|
498
499
|
}
|
|
499
|
-
const
|
|
500
|
-
return `${e.slice(0,
|
|
501
|
-
${
|
|
500
|
+
const i = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
|
|
501
|
+
return `${e.slice(0, i)}
|
|
502
|
+
${Gt(
|
|
502
503
|
n
|
|
503
|
-
)}${e.slice(
|
|
504
|
-
}, "applyTreeGridXmlDisabledAnimationsLayout"),
|
|
505
|
-
const t =
|
|
504
|
+
)}${e.slice(i)}`;
|
|
505
|
+
}, "applyTreeGridXmlDisabledAnimationsLayout"), me = /* @__PURE__ */ o((e, n) => {
|
|
506
|
+
const t = Et(n);
|
|
506
507
|
if (!Object.keys(t).length)
|
|
507
508
|
return e;
|
|
508
509
|
const r = e.trim();
|
|
509
|
-
return r ? r.startsWith("{") ?
|
|
510
|
-
}, "applyTreeGridDisabledAnimationsLayout"),
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
|
|
510
|
+
return r ? r.startsWith("{") ? Ct(e, t) : St(e, t) : e;
|
|
511
|
+
}, "applyTreeGridDisabledAnimationsLayout"), H = /* @__PURE__ */ o((e, n, t, r) => {
|
|
512
|
+
const i = Tt(
|
|
513
|
+
Kn(
|
|
514
|
+
ct(e, r)
|
|
514
515
|
),
|
|
515
516
|
t
|
|
516
|
-
),
|
|
517
|
-
if (!
|
|
518
|
-
return
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
517
|
+
), c = i.trim();
|
|
518
|
+
if (!c || c.startsWith("{"))
|
|
519
|
+
return me(
|
|
520
|
+
_e(
|
|
521
|
+
Re(
|
|
522
|
+
Ae(i)
|
|
522
523
|
)
|
|
523
524
|
),
|
|
524
525
|
n
|
|
525
526
|
);
|
|
526
|
-
const a = x(
|
|
527
|
-
|
|
527
|
+
const a = x(i), f = Ae(
|
|
528
|
+
i,
|
|
528
529
|
a
|
|
529
|
-
),
|
|
530
|
+
), C = f === i ? a : x(f), G = Re(
|
|
530
531
|
f,
|
|
531
|
-
|
|
532
|
-
), h = G === f ?
|
|
533
|
-
return
|
|
534
|
-
|
|
535
|
-
|
|
532
|
+
C
|
|
533
|
+
), h = G === f ? C : x(G);
|
|
534
|
+
return me(
|
|
535
|
+
qn(
|
|
536
|
+
_e(
|
|
536
537
|
G,
|
|
537
538
|
h
|
|
538
539
|
),
|
|
@@ -540,103 +541,103 @@ ${e.slice(
|
|
|
540
541
|
),
|
|
541
542
|
n
|
|
542
543
|
);
|
|
543
|
-
}, "applyTreeGridDefaultLayout"),
|
|
544
|
+
}, "applyTreeGridDefaultLayout"), ht = /* @__PURE__ */ o((e) => {
|
|
544
545
|
var n;
|
|
545
|
-
return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${
|
|
546
|
-
}, "getTreeGridWrapperElement"),
|
|
547
|
-
if (
|
|
546
|
+
return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${Gn}`)) ?? null;
|
|
547
|
+
}, "getTreeGridWrapperElement"), gt = /* @__PURE__ */ o((e) => {
|
|
548
|
+
if (K(e.AllSelected))
|
|
548
549
|
return "checked";
|
|
549
|
-
if (
|
|
550
|
+
if ($(e.AllSelected))
|
|
550
551
|
return "unchecked";
|
|
551
552
|
let n = 0, t = 0;
|
|
552
|
-
return
|
|
553
|
-
!R(r) ||
|
|
553
|
+
return V(e).forEach((r) => {
|
|
554
|
+
!R(r) || $(r.CanSelect) || (n += 1, K(e.IsSelected(r)) && (t += 1));
|
|
554
555
|
}), t ? n > 0 && t >= n ? "checked" : "indeterminate" : "unchecked";
|
|
555
|
-
}, "getTreeGridSelectAllState"),
|
|
556
|
-
const t =
|
|
556
|
+
}, "getTreeGridSelectAllState"), Y = /* @__PURE__ */ o((e, n) => {
|
|
557
|
+
const t = ht(n), r = !$(e.Selecting), i = te(
|
|
557
558
|
e.Selecting,
|
|
558
559
|
e.SelectingSingle
|
|
559
|
-
),
|
|
560
|
+
), c = e.Header;
|
|
560
561
|
if (t == null || t.classList.toggle(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
), !
|
|
562
|
+
Cn,
|
|
563
|
+
i
|
|
564
|
+
), !i)
|
|
564
565
|
t == null || t.classList.remove(
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
pe,
|
|
567
|
+
Ee,
|
|
568
|
+
Ce
|
|
568
569
|
);
|
|
569
570
|
else {
|
|
570
|
-
const a =
|
|
571
|
+
const a = gt(e);
|
|
571
572
|
t == null || t.classList.toggle(
|
|
572
|
-
|
|
573
|
+
pe,
|
|
573
574
|
a === "checked"
|
|
574
575
|
), t == null || t.classList.toggle(
|
|
575
|
-
|
|
576
|
+
Ee,
|
|
576
577
|
a === "indeterminate"
|
|
577
578
|
), t == null || t.classList.toggle(
|
|
578
|
-
|
|
579
|
+
Ce,
|
|
579
580
|
a === "unchecked"
|
|
580
581
|
);
|
|
581
582
|
}
|
|
582
|
-
|
|
583
|
-
}, "syncTreeGridSelectionPanelState"),
|
|
583
|
+
c && r && (c.CanSelect = i ? 1 : 0);
|
|
584
|
+
}, "syncTreeGridSelectionPanelState"), J = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ o((e, n) => {
|
|
584
585
|
if (typeof window > "u")
|
|
585
586
|
return;
|
|
586
|
-
const t =
|
|
587
|
+
const t = J.get(n);
|
|
587
588
|
t !== void 0 && window.clearTimeout(t);
|
|
588
589
|
const r = window.setTimeout(() => {
|
|
589
|
-
|
|
590
|
+
J.delete(n), Y(e, n);
|
|
590
591
|
}, 0);
|
|
591
|
-
|
|
592
|
-
}, "scheduleTreeGridSelectionPanelStateSync"),
|
|
592
|
+
J.set(n, r);
|
|
593
|
+
}, "scheduleTreeGridSelectionPanelStateSync"), Rt = /* @__PURE__ */ o((e, n) => {
|
|
593
594
|
e.EnterMode = n;
|
|
594
|
-
const t =
|
|
595
|
+
const t = _n[n];
|
|
595
596
|
if (!t)
|
|
596
597
|
return;
|
|
597
598
|
const r = e;
|
|
598
599
|
r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = t.onEnter, r.Actions.OnEnterEdit = t.onEnterEdit;
|
|
599
|
-
}, "applyTreeGridDefaultEnterMode"),
|
|
600
|
+
}, "applyTreeGridDefaultEnterMode"), Ke = /* @__PURE__ */ o((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), Oe = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ o((e) => {
|
|
600
601
|
if (!e || !e.startsWith("data:"))
|
|
601
602
|
return e;
|
|
602
|
-
const n =
|
|
603
|
+
const n = Oe.get(e);
|
|
603
604
|
if (n)
|
|
604
605
|
return n;
|
|
605
606
|
try {
|
|
606
|
-
const [t, r = ""] = e.split(",", 2),
|
|
607
|
+
const [t, r = ""] = e.split(",", 2), i = /^data:([^;]*)(;base64)?$/i.exec(t), c = (i == null ? void 0 : i[1]) || "application/octet-stream", a = i != null && i[2] ? atob(r) : decodeURIComponent(r), f = new Uint8Array(a.length);
|
|
607
608
|
for (let G = 0; G < a.length; G += 1)
|
|
608
609
|
f[G] = a.charCodeAt(G);
|
|
609
|
-
const
|
|
610
|
-
return
|
|
610
|
+
const C = URL.createObjectURL(new Blob([f], { type: c }));
|
|
611
|
+
return Oe.set(e, C), C;
|
|
611
612
|
} catch {
|
|
612
613
|
return e;
|
|
613
614
|
}
|
|
614
|
-
}, "resolveTreeGridInlineUrl"),
|
|
615
|
-
if (!e ||
|
|
616
|
-
return
|
|
617
|
-
const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""],
|
|
618
|
-
return `${t}${
|
|
619
|
-
}, "appendNoCacheQuery"),
|
|
615
|
+
}, "resolveTreeGridInlineUrl"), Z = /* @__PURE__ */ o((e) => {
|
|
616
|
+
if (!e || Ke(e))
|
|
617
|
+
return At(e);
|
|
618
|
+
const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""], i = t.includes("?") ? "&" : "?";
|
|
619
|
+
return `${t}${i}noCache=${Date.now()}${r}`;
|
|
620
|
+
}, "appendNoCacheQuery"), xe = /* @__PURE__ */ o((e, n, t) => {
|
|
620
621
|
if (!e)
|
|
621
622
|
return;
|
|
622
|
-
const r = t.canEdit,
|
|
623
|
-
if (!(r === void 0 && !
|
|
623
|
+
const r = t.canEdit, i = t.highlightColumns ?? [], c = t.highlightBackgroundColor;
|
|
624
|
+
if (!(r === void 0 && !i.length)) {
|
|
624
625
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
625
626
|
try {
|
|
626
|
-
r !== void 0 && (n.CanEdit = r),
|
|
627
|
+
r !== void 0 && (n.CanEdit = r), i.forEach((a) => {
|
|
627
628
|
a && (e.SetValue(
|
|
628
629
|
n,
|
|
629
630
|
`${a}Class`,
|
|
630
|
-
|
|
631
|
+
c ? Pe : "",
|
|
631
632
|
0
|
|
632
|
-
), e.SetValue(n, `${a}Color`,
|
|
633
|
+
), e.SetValue(n, `${a}Color`, c ?? "", 0));
|
|
633
634
|
});
|
|
634
635
|
} finally {
|
|
635
636
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
636
637
|
}
|
|
637
638
|
typeof e.RefreshRow == "function" && e.RefreshRow(n);
|
|
638
639
|
}
|
|
639
|
-
}, "syncTreeGridDeletedRowState"),
|
|
640
|
+
}, "syncTreeGridDeletedRowState"), _t = /* @__PURE__ */ o((e) => e ? Ke(e) || e.includes("assets") ? Z(e) : Z(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), mt = /* @__PURE__ */ o((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), Lt = /* @__PURE__ */ o((e, n, t, r) => {
|
|
640
641
|
if (!(!e || t === "cancel")) {
|
|
641
642
|
if (t === "remove") {
|
|
642
643
|
e.RemoveRow(n), r(e);
|
|
@@ -644,37 +645,37 @@ ${e.slice(
|
|
|
644
645
|
}
|
|
645
646
|
e.DeleteRowT(n, 3);
|
|
646
647
|
}
|
|
647
|
-
}, "applyTreeGridBeforeRowUndeleteAction"),
|
|
648
|
+
}, "applyTreeGridBeforeRowUndeleteAction"), Ot = /* @__PURE__ */ o((e, n, t) => e ? { Url: _t(n) } : { Data: { Body: [gn(t) ? [] : t] } }, "buildTreeGridDataSource"), ar = /* @__PURE__ */ o(({
|
|
648
649
|
id: e,
|
|
649
650
|
layoutUrl: n,
|
|
650
651
|
layoutData: t,
|
|
651
652
|
toolbarTotalCountFormula: r,
|
|
652
|
-
suppressCfg:
|
|
653
|
-
disabledAnimations:
|
|
653
|
+
suppressCfg: i,
|
|
654
|
+
disabledAnimations: c,
|
|
654
655
|
dataUrl: a,
|
|
655
656
|
bodyData: f,
|
|
656
|
-
useDataUrl:
|
|
657
|
+
useDataUrl: C,
|
|
657
658
|
width: G,
|
|
658
659
|
height: h,
|
|
659
|
-
languageId:
|
|
660
|
+
languageId: g
|
|
660
661
|
}) => ({
|
|
661
662
|
id: e,
|
|
662
663
|
Layout: t ? {
|
|
663
|
-
Data:
|
|
664
|
+
Data: H(
|
|
664
665
|
t,
|
|
665
|
-
|
|
666
|
+
c,
|
|
666
667
|
r,
|
|
667
|
-
|
|
668
|
+
i
|
|
668
669
|
)
|
|
669
|
-
} : { Url:
|
|
670
|
-
Data:
|
|
670
|
+
} : { Url: Z(n ?? "") },
|
|
671
|
+
Data: Ot(C, a, f),
|
|
671
672
|
Text: {
|
|
672
|
-
Url:
|
|
673
|
+
Url: un(g)
|
|
673
674
|
},
|
|
674
675
|
width: G,
|
|
675
676
|
height: h,
|
|
676
677
|
Debug: "Error"
|
|
677
|
-
}), "buildTreeGridInitializationOptions"),
|
|
678
|
+
}), "buildTreeGridInitializationOptions"), Ie = /* @__PURE__ */ o((e) => Rn(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), be = /* @__PURE__ */ o((e) => {
|
|
678
679
|
if (typeof e == "number")
|
|
679
680
|
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
680
681
|
if (typeof e != "string")
|
|
@@ -684,63 +685,63 @@ ${e.slice(
|
|
|
684
685
|
return;
|
|
685
686
|
const t = Number(n);
|
|
686
687
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
687
|
-
}, "parseTreeGridPositiveNumber"),
|
|
688
|
+
}, "parseTreeGridPositiveNumber"), q = /* @__PURE__ */ o((e, n, t, r) => {
|
|
688
689
|
if (!n || !t)
|
|
689
690
|
return;
|
|
690
|
-
const
|
|
691
|
-
return
|
|
691
|
+
const i = e.GetAttribute(n, t, r), c = be(i);
|
|
692
|
+
return c !== void 0 ? c : be(
|
|
692
693
|
n[`${t}${r}`]
|
|
693
694
|
);
|
|
694
|
-
}, "getTreeGridHeaderCellSpanAttribute"),
|
|
695
|
+
}, "getTreeGridHeaderCellSpanAttribute"), xt = /* @__PURE__ */ o((e, n, t) => !n || !t || n.Fixed !== "Head" || (q(e, n, t, "Span") ?? 1) <= 1 ? !1 : (q(e, n, t, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), we = /* @__PURE__ */ o((e, n, t) => {
|
|
695
696
|
const r = e.get(n);
|
|
696
697
|
if (r) {
|
|
697
698
|
r.add(t);
|
|
698
699
|
return;
|
|
699
700
|
}
|
|
700
701
|
e.set(n, /* @__PURE__ */ new Set([t]));
|
|
701
|
-
}, "addTreeGridHeaderButtonAttributeTarget"),
|
|
702
|
-
const
|
|
703
|
-
return n.forEach((
|
|
704
|
-
t.forEach((f,
|
|
705
|
-
if (!
|
|
702
|
+
}, "addTreeGridHeaderButtonAttributeTarget"), je = /* @__PURE__ */ o((e, n, t, r) => {
|
|
703
|
+
const i = /* @__PURE__ */ new Map();
|
|
704
|
+
return n.forEach((c, a) => {
|
|
705
|
+
t.forEach((f, C) => {
|
|
706
|
+
if (!xt(e, c, f) || (we(i, c, f), !r))
|
|
706
707
|
return;
|
|
707
|
-
const G = Math.floor(
|
|
708
|
-
for (let
|
|
709
|
-
const
|
|
710
|
-
for (let
|
|
711
|
-
|
|
708
|
+
const G = Math.floor(q(e, c, f, "Span") ?? 1), h = Math.min(t.length, C + G);
|
|
709
|
+
for (let g = a + 1; g < n.length; g += 1) {
|
|
710
|
+
const m = n[g];
|
|
711
|
+
for (let b = C; b < h; b += 1)
|
|
712
|
+
we(i, m, t[b]);
|
|
712
713
|
}
|
|
713
714
|
});
|
|
714
|
-
}),
|
|
715
|
-
}, "getTreeGridGroupHeaderSortButtonTargets"),
|
|
715
|
+
}), i;
|
|
716
|
+
}, "getTreeGridGroupHeaderSortButtonTargets"), It = /* @__PURE__ */ o((e, n, t, r) => {
|
|
716
717
|
var a;
|
|
717
718
|
if (!n || !t || n.Fixed !== "Head")
|
|
718
719
|
return !1;
|
|
719
|
-
const
|
|
720
|
-
return !
|
|
720
|
+
const i = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((f) => f.Fixed === "Head") : [], c = typeof e.GetCols == "function" ? e.GetCols() : [];
|
|
721
|
+
return !i.length || !c.length ? !1 : ((a = je(
|
|
721
722
|
e,
|
|
722
|
-
|
|
723
|
-
|
|
723
|
+
i,
|
|
724
|
+
c,
|
|
724
725
|
r
|
|
725
726
|
).get(n)) == null ? void 0 : a.has(t)) === !0;
|
|
726
|
-
}, "isTreeGridGroupHeaderSortButtonTarget"),
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
727
|
+
}, "isTreeGridGroupHeaderSortButtonTarget"), ye = /* @__PURE__ */ o((e, n, t = !1, r = !0) => {
|
|
728
|
+
const i = typeof performance < "u" ? performance.now() : Date.now(), c = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((h) => h.Fixed === "Head") : [], a = typeof e.GetCols == "function" ? e.GetCols() : [];
|
|
729
|
+
if (!c.length || !a.length)
|
|
729
730
|
return;
|
|
730
731
|
const f = /* @__PURE__ */ new Set();
|
|
731
|
-
let
|
|
732
|
-
const G =
|
|
732
|
+
let C = 0;
|
|
733
|
+
const G = je(
|
|
733
734
|
e,
|
|
734
|
-
|
|
735
|
+
c,
|
|
735
736
|
a,
|
|
736
737
|
r
|
|
737
738
|
);
|
|
738
739
|
if (G.size) {
|
|
739
740
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
740
741
|
try {
|
|
741
|
-
G.forEach((h,
|
|
742
|
-
h.forEach((
|
|
743
|
-
e.GetAttribute(
|
|
742
|
+
G.forEach((h, g) => {
|
|
743
|
+
h.forEach((m) => {
|
|
744
|
+
e.GetAttribute(g, m, Se) !== "" && (e.SetAttribute(g, m, Se, "", 0, 0), f.add(g), C += 1);
|
|
744
745
|
});
|
|
745
746
|
});
|
|
746
747
|
} finally {
|
|
@@ -748,18 +749,18 @@ ${e.slice(
|
|
|
748
749
|
}
|
|
749
750
|
f.size && (t && f.forEach((h) => {
|
|
750
751
|
typeof e.RefreshRow == "function" && e.RefreshRow(h);
|
|
751
|
-
}),
|
|
752
|
-
updatedCellCount:
|
|
752
|
+
}), De(n, "group header button attribute apply"), Fe(n, "group header button attribute apply", i, {
|
|
753
|
+
updatedCellCount: C,
|
|
753
754
|
updatedRowCount: f.size
|
|
754
755
|
}));
|
|
755
756
|
}
|
|
756
|
-
}, "applyTreeGridGroupHeaderSortButtonAttributes"),
|
|
757
|
+
}, "applyTreeGridGroupHeaderSortButtonAttributes"), bt = /* @__PURE__ */ o((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), wt = /* @__PURE__ */ o((e) => {
|
|
757
758
|
const n = e == null ? void 0 : e.Visible;
|
|
758
759
|
return !!e && n !== 0 && n !== !1 && n !== "0";
|
|
759
|
-
}, "isVisibleTreeGridRow"),
|
|
760
|
+
}, "isVisibleTreeGridRow"), v = /* @__PURE__ */ o((e) => {
|
|
760
761
|
const n = e == null ? void 0 : e.Added;
|
|
761
762
|
return !!e && n !== 0 && n !== !1 && n !== "0" && n !== void 0;
|
|
762
|
-
}, "isAddedTreeGridRow"), R = /* @__PURE__ */
|
|
763
|
+
}, "isAddedTreeGridRow"), R = /* @__PURE__ */ o((e) => !e || e.Fixed === "Foot" || !wt(e) ? !1 : e.Kind === "Data" || v(e), "isDisplayTreeGridRow"), ze = /* @__PURE__ */ o((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), V = /* @__PURE__ */ o((e) => {
|
|
763
764
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
764
765
|
const n = [];
|
|
765
766
|
let t = e.GetFirst();
|
|
@@ -768,144 +769,213 @@ ${e.slice(
|
|
|
768
769
|
return n;
|
|
769
770
|
}
|
|
770
771
|
return Object.values(e.Rows ?? {});
|
|
771
|
-
}, "getTreeGridRows"),
|
|
772
|
+
}, "getTreeGridRows"), Q = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ o((e) => {
|
|
773
|
+
e && Q.delete(e);
|
|
774
|
+
}, "clearTreeGridSelectionRowSpanAnchorRowMap"), He = /* @__PURE__ */ o((e, n) => {
|
|
775
|
+
const t = e, r = t == null ? void 0 : t[`${n}RowSpan`], i = typeof r == "number" ? r : Number.parseFloat(String(r ?? ""));
|
|
776
|
+
return Number.isFinite(i) && i > 1 ? Math.floor(i) : 1;
|
|
777
|
+
}, "getTreeGridRowSpanCount"), yt = /* @__PURE__ */ o((e) => {
|
|
778
|
+
const n = /* @__PURE__ */ new WeakMap();
|
|
779
|
+
let t = null, r = -1;
|
|
780
|
+
return V(e).forEach((i, c) => {
|
|
781
|
+
if (!R(i)) {
|
|
782
|
+
n.set(i, null);
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
const a = He(i, Ne);
|
|
786
|
+
if (a > 1) {
|
|
787
|
+
t = i, r = c + a - 1, n.set(i, i);
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
n.set(i, t && c <= r ? t : null), c >= r && (t = null, r = -1);
|
|
791
|
+
}), n;
|
|
792
|
+
}, "createTreeGridSelectionRowSpanAnchorRowMap"), re = /* @__PURE__ */ o((e, n) => {
|
|
793
|
+
if (!n || !R(n))
|
|
794
|
+
return null;
|
|
795
|
+
let t = Q.get(e);
|
|
796
|
+
return t != null && t.has(n) || (t = yt(e), Q.set(e, t)), t.get(n) ?? null;
|
|
797
|
+
}, "getTreeGridSelectionRowSpanAnchorRow"), Ye = /* @__PURE__ */ o((e, n) => {
|
|
798
|
+
const t = re(e, n);
|
|
799
|
+
if (!t)
|
|
800
|
+
return [];
|
|
801
|
+
const r = He(t, Ne), i = [];
|
|
802
|
+
let c = t;
|
|
803
|
+
for (let a = 0; c && a < r; a += 1)
|
|
804
|
+
R(c) && i.push(c), c = typeof e.GetNext == "function" ? e.GetNext(c) : null;
|
|
805
|
+
return i;
|
|
806
|
+
}, "getTreeGridSelectionRowSpanRows"), Pt = /* @__PURE__ */ o((e) => {
|
|
807
|
+
const n = /* @__PURE__ */ new Set();
|
|
808
|
+
return (e.GetSelRows() ?? []).forEach((t) => {
|
|
809
|
+
Ye(e, t).forEach((r) => {
|
|
810
|
+
n.add(r);
|
|
811
|
+
});
|
|
812
|
+
}), [...n];
|
|
813
|
+
}, "getTreeGridSelectedRowSpanRows"), $t = /* @__PURE__ */ o((e, n) => {
|
|
772
814
|
if (!e)
|
|
773
815
|
return;
|
|
774
|
-
const t =
|
|
775
|
-
|
|
816
|
+
const t = ze(e);
|
|
817
|
+
V(e).forEach((r) => {
|
|
776
818
|
R(r) && n.set(
|
|
777
819
|
r,
|
|
778
|
-
new Map(t.map((
|
|
820
|
+
new Map(t.map((i) => [i, $e(e, r, i)]))
|
|
779
821
|
);
|
|
780
822
|
});
|
|
781
|
-
}, "captureTreeGridChangeBaselines"),
|
|
823
|
+
}, "captureTreeGridChangeBaselines"), ee = /* @__PURE__ */ o((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Dt = /* @__PURE__ */ o((e, n, t) => {
|
|
782
824
|
const r = n;
|
|
783
|
-
return
|
|
784
|
-
}, "hasOtherTreeGridChangedCells"),
|
|
825
|
+
return ze(e).some((i) => i !== t && ee(r[`${i}Changed`]));
|
|
826
|
+
}, "hasOtherTreeGridChangedCells"), Ft = /* @__PURE__ */ o((e, n, t) => {
|
|
785
827
|
const r = n;
|
|
786
|
-
r[`${t}Changed`] = 0, !
|
|
787
|
-
}, "clearTreeGridCellChangedState"),
|
|
828
|
+
r[`${t}Changed`] = 0, !v(n) && !P(n) && !Dt(e, n, t) && (r.Changed = 0);
|
|
829
|
+
}, "clearTreeGridCellChangedState"), Nt = /* @__PURE__ */ o((e, n, t) => {
|
|
788
830
|
const r = e.get(n);
|
|
789
831
|
if (r != null && r.has(t))
|
|
790
832
|
return r.get(t);
|
|
791
|
-
}, "resolveTreeGridCellBaselineValue"),
|
|
833
|
+
}, "resolveTreeGridCellBaselineValue"), vt = /* @__PURE__ */ o(({
|
|
792
834
|
gridId: e,
|
|
793
835
|
grid: n,
|
|
794
836
|
row: t,
|
|
795
837
|
col: r,
|
|
796
|
-
backgroundColor:
|
|
797
|
-
baselineMap:
|
|
838
|
+
backgroundColor: i,
|
|
839
|
+
baselineMap: c,
|
|
798
840
|
highlightRefresh: a
|
|
799
841
|
}) => {
|
|
800
|
-
if (!R(t) ||
|
|
842
|
+
if (!R(t) || v(t) || P(t))
|
|
801
843
|
return;
|
|
802
|
-
const f =
|
|
803
|
-
if (f !== void 0 &&
|
|
804
|
-
|
|
844
|
+
const f = Nt(c, t, r), C = $e(n, t, r);
|
|
845
|
+
if (f !== void 0 && C === f) {
|
|
846
|
+
fn(e, { row: t, col: r }), Ft(n, t, r);
|
|
805
847
|
return;
|
|
806
848
|
}
|
|
807
|
-
|
|
849
|
+
an(e, {
|
|
808
850
|
row: t,
|
|
809
851
|
col: r,
|
|
810
|
-
backgroundColor:
|
|
852
|
+
backgroundColor: i,
|
|
811
853
|
refresh: a
|
|
812
854
|
});
|
|
813
|
-
}, "syncTreeGridChangedCellHighlight"),
|
|
855
|
+
}, "syncTreeGridChangedCellHighlight"), kt = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) ? !1 : e.CanEdit(n, t) === 1, "isEditableTreeGridCell"), Ze = /* @__PURE__ */ o((e, n, t) => {
|
|
814
856
|
const r = e.GetAttribute(n, t, "Color");
|
|
815
857
|
if (typeof r == "number")
|
|
816
|
-
return
|
|
858
|
+
return en(r);
|
|
817
859
|
if (typeof r == "string")
|
|
818
860
|
return r.trim() || void 0;
|
|
819
|
-
}, "getExplicitTreeGridCellColor"),
|
|
861
|
+
}, "getExplicitTreeGridCellColor"), Ut = /* @__PURE__ */ o((e, n, t) => Ze(e, n, t) !== void 0, "hasExplicitTreeGridCellColor"), ie = /* @__PURE__ */ o((e, n, t) => {
|
|
820
862
|
if (!n || !t || !R(n))
|
|
821
863
|
return !1;
|
|
822
864
|
const r = typeof e.IsFocused == "function" ? e.IsFocused(n, t) : e.FRow === n && e.FCol === t;
|
|
823
865
|
return r !== 0 && r !== !1 && r !== void 0 && r !== null;
|
|
824
|
-
}, "isTreeGridFocusedCellState"),
|
|
866
|
+
}, "isTreeGridFocusedCellState"), M = /* @__PURE__ */ o((e, n, t) => {
|
|
825
867
|
if (!n || !t || !R(n))
|
|
826
868
|
return !1;
|
|
827
869
|
const r = e.IsSelected(n, t);
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
870
|
+
if (r !== 0 && r !== !1 && r !== void 0 && r !== null)
|
|
871
|
+
return !0;
|
|
872
|
+
const i = re(e, n);
|
|
873
|
+
if (!i || i === n)
|
|
874
|
+
return !1;
|
|
875
|
+
const c = e.IsSelected(i, t);
|
|
876
|
+
return c !== 0 && c !== !1 && c !== void 0 && c !== null;
|
|
877
|
+
}, "isTreeGridSelectedCellState"), qe = /* @__PURE__ */ o((e) => {
|
|
878
|
+
if (!he.length)
|
|
831
879
|
return !1;
|
|
832
880
|
const n = e.split(/\s+/).filter(Boolean);
|
|
833
|
-
return
|
|
881
|
+
return he.every(
|
|
834
882
|
(t) => n.includes(t)
|
|
835
883
|
);
|
|
836
|
-
}, "hasTreeGridChangedCellDisplayClass"),
|
|
837
|
-
if (!(!e || e.split(/\s+/).includes(
|
|
838
|
-
return `${e} ${
|
|
839
|
-
}, "appendTreeGridSelectedChangedCellDisplayClass"),
|
|
840
|
-
if (!n || !
|
|
884
|
+
}, "hasTreeGridChangedCellDisplayClass"), Bt = /* @__PURE__ */ o((e) => {
|
|
885
|
+
if (!(!e || e.split(/\s+/).includes(Ge) || !qe(e)))
|
|
886
|
+
return `${e} ${Ge}`;
|
|
887
|
+
}, "appendTreeGridSelectedChangedCellDisplayClass"), Vt = /* @__PURE__ */ o((e) => !e || !R(e) ? !1 : Object.entries(e).some(([n, t]) => n.endsWith("Class") && typeof t == "string" && qe(t)), "hasTreeGridChangedCellDisplayClassInRow"), Mt = /* @__PURE__ */ o((e, n) => {
|
|
888
|
+
if (!n || !Vt(n) || typeof e.RefreshRow != "function")
|
|
841
889
|
return;
|
|
842
890
|
const t = n;
|
|
843
891
|
window.setTimeout(() => {
|
|
844
892
|
e.RefreshRow(t);
|
|
845
893
|
}, 0);
|
|
846
|
-
}, "scheduleTreeGridSelectionChangedClassRefresh"),
|
|
847
|
-
if (!
|
|
894
|
+
}, "scheduleTreeGridSelectionChangedClassRefresh"), oe = /* @__PURE__ */ o((e, n) => {
|
|
895
|
+
if (!n.length || typeof window > "u" || typeof e.RefreshRow != "function")
|
|
896
|
+
return;
|
|
897
|
+
const t = [...new Set(n)];
|
|
898
|
+
window.setTimeout(() => {
|
|
899
|
+
t.forEach((r) => {
|
|
900
|
+
e.RefreshRow(r);
|
|
901
|
+
});
|
|
902
|
+
}, 0);
|
|
903
|
+
}, "scheduleTreeGridRowsRefresh"), Xt = /* @__PURE__ */ o((e, n) => {
|
|
904
|
+
if (!n)
|
|
905
|
+
return;
|
|
906
|
+
const t = Ye(e, n);
|
|
907
|
+
t.length <= 1 || oe(e, t);
|
|
908
|
+
}, "scheduleTreeGridSelectionRowSpanRefresh"), Wt = /* @__PURE__ */ o((e) => {
|
|
909
|
+
const n = V(e).filter((t) => R(t) && re(e, t));
|
|
910
|
+
oe(e, n);
|
|
911
|
+
}, "scheduleTreeGridSelectionRowSpanRefreshAll"), Qe = /* @__PURE__ */ o((e, n, t, r) => {
|
|
912
|
+
if (!(!n || r === void 0 || !kt(e, n, t) || v(n) || P(n) || ie(e, n, t) || M(e, n, t) || Ut(e, n, t)))
|
|
848
913
|
return r;
|
|
849
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
850
|
-
(r) =>
|
|
851
|
-
), "isTreeGridNativeErrorBackgroundColor"),
|
|
914
|
+
}, "getEditableTreeGridCellDefaultColor"), y = /* @__PURE__ */ o((e, n, t, r) => e === r[0] && n === r[1] && t === r[2], "matchesTreeGridRgbColor"), Jt = /* @__PURE__ */ o((e, n, t) => bn.some(
|
|
915
|
+
(r) => y(e, n, t, r)
|
|
916
|
+
), "isTreeGridNativeErrorBackgroundColor"), en = /* @__PURE__ */ o((e) => {
|
|
852
917
|
if (!(e === void 0 || !Number.isFinite(e)))
|
|
853
918
|
return `#${Math.trunc(e).toString(16).padStart(6, "0")}`;
|
|
854
|
-
}, "toTreeGridCssHexColor"),
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
919
|
+
}, "toTreeGridCssHexColor"), ne = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) ? "" : e.GetAttribute(n, t, "Error") ?? "", "getTreeGridCellError"), nn = /* @__PURE__ */ o((e, n, t) => ne(e, n, t) !== "", "hasTreeGridCellError"), Kt = /* @__PURE__ */ o((e) => {
|
|
920
|
+
const n = e == null ? void 0 : e.target;
|
|
921
|
+
if (typeof HTMLElement > "u" || typeof Element > "u" || typeof Node > "u")
|
|
922
|
+
return null;
|
|
923
|
+
const t = n instanceof Element ? n : null, r = n instanceof Node ? n.parentElement : null, i = t ?? r;
|
|
924
|
+
if (i) {
|
|
925
|
+
const c = i.closest("td,th");
|
|
926
|
+
return c instanceof HTMLElement ? c : i instanceof HTMLElement ? i : null;
|
|
927
|
+
}
|
|
928
|
+
return null;
|
|
929
|
+
}, "getTreeGridMouseEventAnchorElement"), jt = /* @__PURE__ */ o((e, n) => {
|
|
860
930
|
if (!e || !n || !R(e))
|
|
861
931
|
return !1;
|
|
862
932
|
const t = e;
|
|
863
|
-
return
|
|
864
|
-
}, "isChangedTreeGridRowOrCell"),
|
|
933
|
+
return ee(t[`${n}Changed`]) || ee(t.Changed);
|
|
934
|
+
}, "isChangedTreeGridRowOrCell"), zt = /* @__PURE__ */ o((e, n, t) => Pn.has(e.GetType(n, t)), "isTreeGridNativeInputEditType"), Ht = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 0, "isTreeGridReadonlyHoveredCellState"), Yt = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 2, "isTreeGridPreviewHoveredCellState"), Zt = /* @__PURE__ */ o(({
|
|
865
935
|
grid: e,
|
|
866
936
|
row: n,
|
|
867
937
|
col: t,
|
|
868
938
|
r,
|
|
869
|
-
g:
|
|
870
|
-
b:
|
|
939
|
+
g: i,
|
|
940
|
+
b: c,
|
|
871
941
|
focusedCellBackgroundColor: a,
|
|
872
942
|
selectedCellBackgroundColor: f,
|
|
873
|
-
hoverCellBackgroundColor:
|
|
943
|
+
hoverCellBackgroundColor: C,
|
|
874
944
|
changedCellBackgroundColor: G,
|
|
875
945
|
editableCellBackgroundColorValue: h
|
|
876
946
|
}) => {
|
|
877
|
-
if (
|
|
947
|
+
if (ie(e, n, t))
|
|
878
948
|
return a;
|
|
879
|
-
if (
|
|
949
|
+
if (M(e, n, t))
|
|
880
950
|
return f;
|
|
881
|
-
if (
|
|
882
|
-
return
|
|
883
|
-
if (!
|
|
951
|
+
if (Ht(e, n, t) && (y(r, i, c, mn) || y(r, i, c, Ln)) || Yt(e, n, t) && (y(r, i, c, On) || y(r, i, c, xn) || y(r, i, c, In)))
|
|
952
|
+
return C;
|
|
953
|
+
if (!nn(e, n, t) || !Jt(r, i, c))
|
|
884
954
|
return;
|
|
885
|
-
const
|
|
886
|
-
if (
|
|
887
|
-
return
|
|
888
|
-
if (
|
|
889
|
-
return
|
|
890
|
-
if (
|
|
955
|
+
const g = Ze(e, n, t);
|
|
956
|
+
if (g)
|
|
957
|
+
return g;
|
|
958
|
+
if (v(n) || P(n))
|
|
959
|
+
return wn;
|
|
960
|
+
if (jt(n, t))
|
|
891
961
|
return G;
|
|
892
|
-
const
|
|
962
|
+
const m = Qe(
|
|
893
963
|
e,
|
|
894
964
|
n,
|
|
895
965
|
t,
|
|
896
966
|
h
|
|
897
967
|
);
|
|
898
|
-
return
|
|
899
|
-
}, "resolveTreeGridStateBackgroundColor"),
|
|
968
|
+
return en(m) ?? yn;
|
|
969
|
+
}, "resolveTreeGridStateBackgroundColor"), qt = /* @__PURE__ */ o((e, n) => {
|
|
900
970
|
const t = e.split(/\s+/).filter(Boolean);
|
|
901
971
|
return t.includes(n) ? e : [...t, n].join(" ");
|
|
902
|
-
}, "appendTreeGridClassToken"),
|
|
903
|
-
const
|
|
904
|
-
if (!
|
|
905
|
-
return
|
|
906
|
-
const
|
|
907
|
-
return
|
|
908
|
-
}, "resolveTreeGridCellDisplayClass"),
|
|
972
|
+
}, "appendTreeGridClassToken"), Qt = /* @__PURE__ */ o((e, n, t, r) => !nn(e, n, t) || !n ? r : qt(r, Sn), "appendTreeGridErrorCellDisplayClass"), er = /* @__PURE__ */ o((e, n, t, r) => {
|
|
973
|
+
const i = Qt(e, n, t, r);
|
|
974
|
+
if (!M(e, n, t))
|
|
975
|
+
return i === r ? void 0 : i;
|
|
976
|
+
const c = Bt(i) ?? i;
|
|
977
|
+
return c === r ? void 0 : c;
|
|
978
|
+
}, "resolveTreeGridCellDisplayClass"), Tr = /* @__PURE__ */ o((e) => {
|
|
909
979
|
if (!e)
|
|
910
980
|
return !1;
|
|
911
981
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
@@ -918,273 +988,300 @@ ${e.slice(
|
|
|
918
988
|
return !1;
|
|
919
989
|
}
|
|
920
990
|
return Object.values(e.Rows ?? {}).some((n) => R(n));
|
|
921
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
922
|
-
var
|
|
923
|
-
|
|
991
|
+
}, "hasTreeGridDisplayDataRows"), pr = /* @__PURE__ */ o((e, n, t) => {
|
|
992
|
+
var i;
|
|
993
|
+
L(e);
|
|
994
|
+
const r = (i = e.Data) == null ? void 0 : i.Data;
|
|
924
995
|
e.Data.Data = {
|
|
925
996
|
...r,
|
|
926
997
|
Data: { Body: [n || []] },
|
|
927
998
|
Url: ""
|
|
928
999
|
}, e.ReloadBody(t);
|
|
929
|
-
}, "replaceTreeGridBodyData"),
|
|
1000
|
+
}, "replaceTreeGridBodyData"), Er = /* @__PURE__ */ o(({
|
|
930
1001
|
id: e,
|
|
931
1002
|
latestEventHandlersRef: n,
|
|
932
1003
|
layoutHasExplicitEnterModeRef: t,
|
|
933
1004
|
highlightEditableCellsRef: r,
|
|
934
|
-
highlightChangedCellsRef:
|
|
935
|
-
syncDeletedRowCanEditRef:
|
|
1005
|
+
highlightChangedCellsRef: i,
|
|
1006
|
+
syncDeletedRowCanEditRef: c,
|
|
936
1007
|
editableCellBackgroundColorValueRef: a,
|
|
937
1008
|
changedCellBackgroundColorRef: f,
|
|
938
|
-
focusedCellBackgroundColorRef:
|
|
1009
|
+
focusedCellBackgroundColorRef: C,
|
|
939
1010
|
selectedCellBackgroundColorRef: G,
|
|
940
1011
|
hoverCellBackgroundColorRef: h,
|
|
941
|
-
changedCellBaselineRef:
|
|
942
|
-
treeGridInstanceRef:
|
|
943
|
-
treeGridInitStartedAtRef:
|
|
944
|
-
latestLayoutOverridesRef:
|
|
945
|
-
latestToolbarTotalCountFormulaRef:
|
|
946
|
-
latestSuppressCfgRef:
|
|
947
|
-
latestHideChildHeaderSortButtonsRef:
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1012
|
+
changedCellBaselineRef: g,
|
|
1013
|
+
treeGridInstanceRef: m,
|
|
1014
|
+
treeGridInitStartedAtRef: b,
|
|
1015
|
+
latestLayoutOverridesRef: tn,
|
|
1016
|
+
latestToolbarTotalCountFormulaRef: se,
|
|
1017
|
+
latestSuppressCfgRef: ce,
|
|
1018
|
+
latestHideChildHeaderSortButtonsRef: X,
|
|
1019
|
+
latestSelectionScopeRef: rn,
|
|
1020
|
+
latestDisabledAnimationsRef: le,
|
|
1021
|
+
appliedLayoutOverridesRef: on,
|
|
1022
|
+
appliedBodyDataPropRef: sn,
|
|
1023
|
+
hasAppliedInitialLayoutRef: de,
|
|
1024
|
+
syncHasDisplayDataRows: w,
|
|
1025
|
+
setIsTreeGridReady: cn,
|
|
1026
|
+
showErrorTooltip: ln,
|
|
1027
|
+
hideErrorTooltip: I
|
|
954
1028
|
}) => {
|
|
955
|
-
const
|
|
956
|
-
if (window.TGSetEvent("OnRowAdd", e, (s,
|
|
1029
|
+
const A = n.current;
|
|
1030
|
+
if (window.TGSetEvent("OnRowAdd", e, (s, l) => {
|
|
957
1031
|
var d, u;
|
|
958
|
-
|
|
1032
|
+
L(s), l.CanEdit = 1, l.CanDelete = 1, (u = (d = n.current) == null ? void 0 : d.onRowAdd) == null || u.call(d, s, l);
|
|
959
1033
|
}), window.TGSetEvent("OnRowAdded", e, (s) => {
|
|
960
|
-
|
|
1034
|
+
L(s), w(s);
|
|
961
1035
|
}), window.TGSetEvent("OnRowRemove", e, (s) => {
|
|
962
|
-
|
|
963
|
-
}), window.TGSetEvent("
|
|
964
|
-
|
|
1036
|
+
L(s), I(), w(s);
|
|
1037
|
+
}), window.TGSetEvent("OnMouseOver", e, (s, l, d, u, T, p) => {
|
|
1038
|
+
const E = ne(s, l, d);
|
|
1039
|
+
if (!E) {
|
|
1040
|
+
I();
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
const _ = Kt(p);
|
|
1044
|
+
if (!_) {
|
|
1045
|
+
I();
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
s.HideTip(), ln({ anchorEl: _, row: l, col: d, message: E });
|
|
1049
|
+
}), window.TGSetEvent("OnTip", e, (s, l, d, u) => ne(s, l, d) ? "" : u), window.TGSetEvent("OnCanRowDelete", e, (s, l, d) => {
|
|
1050
|
+
var p;
|
|
965
1051
|
if (d !== 3)
|
|
966
1052
|
return d;
|
|
967
|
-
const u = (
|
|
1053
|
+
const u = (p = n.current) == null ? void 0 : p.onBeforeRowUndelete;
|
|
968
1054
|
if (typeof u != "function")
|
|
969
1055
|
return d;
|
|
970
|
-
const T = /* @__PURE__ */
|
|
1056
|
+
const T = /* @__PURE__ */ o((E) => {
|
|
971
1057
|
window.setTimeout(() => {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1058
|
+
Lt(
|
|
1059
|
+
m.current ?? s,
|
|
1060
|
+
l,
|
|
1061
|
+
E,
|
|
1062
|
+
w
|
|
977
1063
|
);
|
|
978
1064
|
}, 0);
|
|
979
1065
|
}, "scheduleAction");
|
|
980
1066
|
try {
|
|
981
|
-
const
|
|
982
|
-
return
|
|
1067
|
+
const E = u(s, l);
|
|
1068
|
+
return mt(E) ? (E.then(T).catch(() => {
|
|
983
1069
|
T("undelete");
|
|
984
|
-
}), 0) : (T(
|
|
1070
|
+
}), 0) : (T(E), 0);
|
|
985
1071
|
} catch {
|
|
986
1072
|
return T("undelete"), 0;
|
|
987
1073
|
}
|
|
988
|
-
}), typeof (
|
|
989
|
-
const s =
|
|
990
|
-
var _,
|
|
991
|
-
(
|
|
1074
|
+
}), typeof (A == null ? void 0 : A.onRowClick) == "function" || typeof (A == null ? void 0 : A.onInternalCellClick) == "function") {
|
|
1075
|
+
const s = W((l, d, u, T, p, E) => {
|
|
1076
|
+
var _, O;
|
|
1077
|
+
(O = (_ = n.current) == null ? void 0 : _.onRowClick) == null || O.call(
|
|
992
1078
|
_,
|
|
993
|
-
|
|
1079
|
+
l,
|
|
994
1080
|
d,
|
|
995
1081
|
u,
|
|
996
1082
|
T,
|
|
997
|
-
|
|
998
|
-
|
|
1083
|
+
p,
|
|
1084
|
+
E
|
|
999
1085
|
);
|
|
1000
1086
|
}, 300);
|
|
1001
|
-
window.TGSetEvent("OnClick", e, (
|
|
1002
|
-
var
|
|
1003
|
-
const _ = (
|
|
1004
|
-
|
|
1005
|
-
|
|
1087
|
+
window.TGSetEvent("OnClick", e, (l, d, u, T, p, E) => {
|
|
1088
|
+
var O, fe, ae;
|
|
1089
|
+
const _ = (fe = (O = n.current) == null ? void 0 : O.onInternalCellClick) == null ? void 0 : fe.call(
|
|
1090
|
+
O,
|
|
1091
|
+
l,
|
|
1006
1092
|
d,
|
|
1007
1093
|
u,
|
|
1008
1094
|
T,
|
|
1009
|
-
|
|
1010
|
-
|
|
1095
|
+
p,
|
|
1096
|
+
E
|
|
1011
1097
|
);
|
|
1012
1098
|
if (_ !== void 0)
|
|
1013
1099
|
return _;
|
|
1014
|
-
typeof ((
|
|
1100
|
+
typeof ((ae = n.current) == null ? void 0 : ae.onRowClick) == "function" && s(l, d, u, T, p, E);
|
|
1015
1101
|
});
|
|
1016
1102
|
}
|
|
1017
|
-
(typeof (
|
|
1103
|
+
(typeof (A == null ? void 0 : A.onClickButton) == "function" || typeof (A == null ? void 0 : A.onInternalButtonClick) == "function") && window.TGSetEvent(
|
|
1018
1104
|
"OnClickButton",
|
|
1019
1105
|
e,
|
|
1020
|
-
(s,
|
|
1021
|
-
var
|
|
1022
|
-
const T = (
|
|
1023
|
-
|
|
1106
|
+
(s, l, d, u) => {
|
|
1107
|
+
var p, E, _, O;
|
|
1108
|
+
const T = (E = (p = n.current) == null ? void 0 : p.onInternalButtonClick) == null ? void 0 : E.call(
|
|
1109
|
+
p,
|
|
1024
1110
|
s,
|
|
1025
|
-
|
|
1111
|
+
l,
|
|
1026
1112
|
d,
|
|
1027
1113
|
u
|
|
1028
1114
|
);
|
|
1029
1115
|
if (T !== void 0)
|
|
1030
1116
|
return T;
|
|
1031
|
-
(
|
|
1117
|
+
(O = (_ = n.current) == null ? void 0 : _.onClickButton) == null || O.call(
|
|
1032
1118
|
_,
|
|
1033
1119
|
s,
|
|
1034
|
-
|
|
1120
|
+
l,
|
|
1035
1121
|
d,
|
|
1036
1122
|
u
|
|
1037
1123
|
);
|
|
1038
1124
|
}
|
|
1039
|
-
), typeof (
|
|
1125
|
+
), typeof (A == null ? void 0 : A.onInternalKeyDown) == "function" && (window.TGSetEvent(
|
|
1040
1126
|
"OnKeyDown",
|
|
1041
1127
|
e,
|
|
1042
|
-
(s,
|
|
1043
|
-
var
|
|
1044
|
-
return (
|
|
1128
|
+
(s, l, d, u, T) => {
|
|
1129
|
+
var p, E;
|
|
1130
|
+
return (E = (p = n.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : E.call(p, s, l, d, u, T);
|
|
1045
1131
|
}
|
|
1046
1132
|
), window.TGSetEvent(
|
|
1047
1133
|
"OnKeyPress",
|
|
1048
1134
|
e,
|
|
1049
|
-
(s,
|
|
1050
|
-
var
|
|
1051
|
-
return (
|
|
1052
|
-
}
|
|
1053
|
-
)), typeof (g == null ? void 0 : g.onInternalStartEdit) == "function" && window.TGSetEvent(
|
|
1054
|
-
"OnStartEdit",
|
|
1055
|
-
e,
|
|
1056
|
-
(s, c, d) => {
|
|
1057
|
-
var u, T;
|
|
1058
|
-
return (T = (u = n.current) == null ? void 0 : u.onInternalStartEdit) == null ? void 0 : T.call(
|
|
1059
|
-
u,
|
|
1060
|
-
s,
|
|
1061
|
-
c,
|
|
1062
|
-
d
|
|
1063
|
-
);
|
|
1135
|
+
(s, l, d, u, T) => {
|
|
1136
|
+
var p, E;
|
|
1137
|
+
return (E = (p = n.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : E.call(p, s, l, d, u, T);
|
|
1064
1138
|
}
|
|
1065
|
-
), window.TGSetEvent("
|
|
1066
|
-
var
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1139
|
+
)), window.TGSetEvent("OnStartEdit", e, (s, l, d) => {
|
|
1140
|
+
var u, T;
|
|
1141
|
+
return I(), (T = (u = n.current) == null ? void 0 : u.onInternalStartEdit) == null ? void 0 : T.call(
|
|
1142
|
+
u,
|
|
1143
|
+
s,
|
|
1144
|
+
l,
|
|
1145
|
+
d
|
|
1146
|
+
);
|
|
1147
|
+
}), window.TGSetEvent("OnRowDelete", e, (s, l, d) => {
|
|
1148
|
+
var T, p;
|
|
1149
|
+
L(s), I();
|
|
1150
|
+
const u = P(l) ? Te(l) : [];
|
|
1151
|
+
xe(s, l, {
|
|
1152
|
+
canEdit: c.current !== !1 ? 2 : void 0,
|
|
1070
1153
|
highlightColumns: u
|
|
1071
|
-
}),
|
|
1154
|
+
}), w(s), (p = (T = n.current) == null ? void 0 : T.onRowDelete) == null || p.call(
|
|
1072
1155
|
T,
|
|
1073
1156
|
s,
|
|
1074
|
-
|
|
1157
|
+
l,
|
|
1075
1158
|
d
|
|
1076
1159
|
);
|
|
1077
|
-
}), window.TGSetEvent("OnRowUndelete", e, (s,
|
|
1160
|
+
}), window.TGSetEvent("OnRowUndelete", e, (s, l) => {
|
|
1078
1161
|
var u, T;
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1162
|
+
L(s), I();
|
|
1163
|
+
const d = P(l) ? Te(l) : [];
|
|
1164
|
+
xe(s, l, {
|
|
1165
|
+
canEdit: c.current !== !1 ? 1 : void 0,
|
|
1082
1166
|
highlightColumns: d,
|
|
1083
1167
|
highlightBackgroundColor: d.length ? f.current : void 0
|
|
1084
|
-
}),
|
|
1085
|
-
}), window.TGSetEvent("OnGetDefaultColor", e, (s,
|
|
1086
|
-
if (!(!r.current || !R(
|
|
1087
|
-
return
|
|
1168
|
+
}), w(s), (T = (u = n.current) == null ? void 0 : u.onRowUndelete) == null || T.call(u, s, l);
|
|
1169
|
+
}), window.TGSetEvent("OnGetDefaultColor", e, (s, l, d) => {
|
|
1170
|
+
if (!(!r.current || !R(l)))
|
|
1171
|
+
return Qe(
|
|
1088
1172
|
s,
|
|
1089
|
-
|
|
1173
|
+
l,
|
|
1090
1174
|
d,
|
|
1091
1175
|
a.current
|
|
1092
1176
|
);
|
|
1093
|
-
}), window.TGSetEvent("OnGetColor", e, (s,
|
|
1094
|
-
if (!
|
|
1095
|
-
return
|
|
1177
|
+
}), window.TGSetEvent("OnGetColor", e, (s, l, d, u, T, p, E) => {
|
|
1178
|
+
if (!E)
|
|
1179
|
+
return Zt({
|
|
1096
1180
|
grid: s,
|
|
1097
|
-
row:
|
|
1181
|
+
row: l,
|
|
1098
1182
|
col: d,
|
|
1099
1183
|
r: u,
|
|
1100
1184
|
g: T,
|
|
1101
|
-
b:
|
|
1102
|
-
focusedCellBackgroundColor:
|
|
1185
|
+
b: p,
|
|
1186
|
+
focusedCellBackgroundColor: C.current,
|
|
1103
1187
|
selectedCellBackgroundColor: G.current,
|
|
1104
1188
|
hoverCellBackgroundColor: h.current,
|
|
1105
1189
|
changedCellBackgroundColor: f.current,
|
|
1106
1190
|
editableCellBackgroundColorValue: a.current
|
|
1107
1191
|
});
|
|
1108
|
-
}), window.TGSetEvent("OnGetClass", e, (s,
|
|
1109
|
-
var
|
|
1110
|
-
if (
|
|
1111
|
-
const _ = !
|
|
1112
|
-
|
|
1192
|
+
}), window.TGSetEvent("OnGetClass", e, (s, l, d, u) => er(s, l, d, typeof u == "string" ? u : "")), window.TGSetEvent("OnAfterValueChanged", e, (s, l, d, u) => {
|
|
1193
|
+
var p, E;
|
|
1194
|
+
if (I(), i.current && R(l)) {
|
|
1195
|
+
const _ = !zt(s, l, d) || M(s, l, d) && !ie(s, l, d);
|
|
1196
|
+
vt({
|
|
1113
1197
|
gridId: e,
|
|
1114
1198
|
grid: s,
|
|
1115
|
-
row:
|
|
1199
|
+
row: l,
|
|
1116
1200
|
col: d,
|
|
1117
1201
|
backgroundColor: f.current,
|
|
1118
|
-
baselineMap:
|
|
1202
|
+
baselineMap: g.current,
|
|
1119
1203
|
highlightRefresh: _
|
|
1120
1204
|
});
|
|
1121
1205
|
}
|
|
1122
|
-
const T = ((
|
|
1123
|
-
T == null || T(s,
|
|
1206
|
+
const T = ((p = n.current) == null ? void 0 : p.onAfterValueChanged) ?? ((E = n.current) == null ? void 0 : E.onRowChange);
|
|
1207
|
+
T == null || T(s, l, d, u);
|
|
1124
1208
|
});
|
|
1125
|
-
const
|
|
1126
|
-
var
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1209
|
+
const ue = W((s) => {
|
|
1210
|
+
var u, T;
|
|
1211
|
+
const l = s.GetSelRows() ?? [], d = En(s, l, {
|
|
1212
|
+
selectionScope: rn.current
|
|
1213
|
+
});
|
|
1214
|
+
(T = (u = n.current) == null ? void 0 : u.onSelect) == null || T.call(
|
|
1215
|
+
u,
|
|
1216
|
+
Tn(s, d)
|
|
1131
1217
|
);
|
|
1132
1218
|
}, 100);
|
|
1133
|
-
window.TGSetEvent("OnSelect", e, (s,
|
|
1134
|
-
var
|
|
1135
|
-
|
|
1136
|
-
|
|
1219
|
+
window.TGSetEvent("OnSelect", e, (s, l, d, u, T) => {
|
|
1220
|
+
var E;
|
|
1221
|
+
if (T)
|
|
1222
|
+
return;
|
|
1223
|
+
const p = Pt(s);
|
|
1224
|
+
Mt(s, l), oe(s, p), Xt(s, l), Le(s, e), typeof ((E = n.current) == null ? void 0 : E.onSelect) == "function" && ue(s);
|
|
1225
|
+
}), window.TGSetEvent("OnSelectAll", e, (s, l, d, u) => {
|
|
1137
1226
|
var T;
|
|
1138
|
-
u || (
|
|
1139
|
-
}), typeof (
|
|
1227
|
+
u || (Wt(s), Le(s, e), typeof ((T = n.current) == null ? void 0 : T.onSelect) == "function" && ue(s));
|
|
1228
|
+
}), typeof (A == null ? void 0 : A.onSave) == "function" && window.TGSetEvent("OnSave", e, (s, l, d) => {
|
|
1140
1229
|
var u, T;
|
|
1141
1230
|
(T = (u = n.current) == null ? void 0 : u.onSave) == null || T.call(
|
|
1142
1231
|
u,
|
|
1143
1232
|
s,
|
|
1144
|
-
|
|
1233
|
+
l,
|
|
1145
1234
|
d
|
|
1146
1235
|
);
|
|
1147
|
-
}), window.TGSetEvent("OnSort", e, (s,
|
|
1236
|
+
}), window.TGSetEvent("OnSort", e, (s, l) => {
|
|
1148
1237
|
var d;
|
|
1149
|
-
if (!(!
|
|
1238
|
+
if (!(!l || !It(
|
|
1150
1239
|
s,
|
|
1151
1240
|
s.ARow,
|
|
1152
|
-
|
|
1153
|
-
|
|
1241
|
+
l,
|
|
1242
|
+
X.current !== !1
|
|
1154
1243
|
)))
|
|
1155
|
-
return
|
|
1244
|
+
return De(e, "group header sort blocked"), hn(e, "group header sort blocked", {
|
|
1156
1245
|
rowId: (d = s.ARow) == null ? void 0 : d.id,
|
|
1157
|
-
col:
|
|
1246
|
+
col: l
|
|
1158
1247
|
}), -1;
|
|
1248
|
+
}), window.TGSetEvent("OnSortFinish", e, (s) => {
|
|
1249
|
+
L(s);
|
|
1250
|
+
}), window.TGSetEvent("OnFilterFinish", e, (s) => {
|
|
1251
|
+
L(s);
|
|
1252
|
+
}), window.TGSetEvent("OnGroupFinish", e, (s) => {
|
|
1253
|
+
L(s);
|
|
1254
|
+
}), window.TGSetEvent("OnSearchFinish", e, (s) => {
|
|
1255
|
+
L(s);
|
|
1159
1256
|
}), window.TGSetEvent("OnRenderStart", e, (s) => {
|
|
1160
|
-
|
|
1257
|
+
L(s), Y(s, e), ye(
|
|
1161
1258
|
s,
|
|
1162
1259
|
e,
|
|
1163
1260
|
!1,
|
|
1164
|
-
|
|
1261
|
+
X.current !== !1
|
|
1165
1262
|
);
|
|
1166
1263
|
}), window.TGSetEvent("OnRenderFinish", e, (s) => {
|
|
1167
|
-
|
|
1168
|
-
}), window.TGSetEvent("OnDataGet", e, (s,
|
|
1169
|
-
if ((
|
|
1170
|
-
t.current =
|
|
1171
|
-
const u =
|
|
1264
|
+
Y(s, e);
|
|
1265
|
+
}), window.TGSetEvent("OnDataGet", e, (s, l, d) => {
|
|
1266
|
+
if ((l == null ? void 0 : l.Name) === "Layout" && typeof d == "string") {
|
|
1267
|
+
t.current = ge(d);
|
|
1268
|
+
const u = H(
|
|
1172
1269
|
d,
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1270
|
+
le.current,
|
|
1271
|
+
se.current,
|
|
1272
|
+
ce.current
|
|
1176
1273
|
);
|
|
1177
1274
|
return u === d ? null : u;
|
|
1178
1275
|
}
|
|
1179
1276
|
return null;
|
|
1180
|
-
}), window.TGSetEvent("OnDataParse", e, (s,
|
|
1181
|
-
if ((
|
|
1182
|
-
t.current =
|
|
1183
|
-
const u =
|
|
1277
|
+
}), window.TGSetEvent("OnDataParse", e, (s, l, d) => {
|
|
1278
|
+
if ((l == null ? void 0 : l.Name) === "Layout" && typeof d == "string") {
|
|
1279
|
+
t.current = ge(d);
|
|
1280
|
+
const u = H(
|
|
1184
1281
|
d,
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1282
|
+
le.current,
|
|
1283
|
+
se.current,
|
|
1284
|
+
ce.current
|
|
1188
1285
|
);
|
|
1189
1286
|
return u === d ? null : u;
|
|
1190
1287
|
}
|
|
@@ -1192,33 +1289,33 @@ ${e.slice(
|
|
|
1192
1289
|
}), window.TGSetEvent(
|
|
1193
1290
|
"OnReady",
|
|
1194
1291
|
e,
|
|
1195
|
-
|
|
1196
|
-
var
|
|
1197
|
-
if (!
|
|
1198
|
-
const u =
|
|
1199
|
-
|
|
1292
|
+
W((s) => {
|
|
1293
|
+
var l, d;
|
|
1294
|
+
if (!de.current) {
|
|
1295
|
+
const u = tn.current;
|
|
1296
|
+
de.current = !0, !t.current && (s.EnterMode === void 0 || s.EnterMode === null || s.EnterMode === 0) && Rt(s, An), pn(s, u), m.current = s, on.current = u, sn.current = Ie(s), g.current = /* @__PURE__ */ new WeakMap(), $t(s, g.current), w(s), cn(!0), ye(
|
|
1200
1297
|
s,
|
|
1201
1298
|
e,
|
|
1202
1299
|
!0,
|
|
1203
|
-
|
|
1204
|
-
),
|
|
1205
|
-
bodyRowCount:
|
|
1206
|
-
|
|
1300
|
+
X.current !== !1
|
|
1301
|
+
), Fe(e, "TreeGrid init ready", b.current, {
|
|
1302
|
+
bodyRowCount: bt(
|
|
1303
|
+
Ie(s)
|
|
1207
1304
|
)
|
|
1208
|
-
}),
|
|
1305
|
+
}), b.current = null, (d = (l = n.current) == null ? void 0 : l.onReady) == null || d.call(l, s);
|
|
1209
1306
|
}
|
|
1210
1307
|
}, 100)
|
|
1211
1308
|
);
|
|
1212
1309
|
}, "bindTreeGridEvents");
|
|
1213
1310
|
export {
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1311
|
+
fr as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
|
|
1312
|
+
Er as bindTreeGridEvents,
|
|
1313
|
+
ar as buildTreeGridInitializationOptions,
|
|
1314
|
+
$t as captureTreeGridChangeBaselines,
|
|
1315
|
+
bt as getTreeGridBodyDataCount,
|
|
1316
|
+
Tr as hasTreeGridDisplayDataRows,
|
|
1317
|
+
ge as hasTreeGridExplicitEnterMode,
|
|
1318
|
+
pr as replaceTreeGridBodyData,
|
|
1319
|
+
vt as syncTreeGridChangedCellHighlight
|
|
1223
1320
|
};
|
|
1224
1321
|
//# sourceMappingURL=treeGridRuntime.js.map
|