@owp/core 2.5.48 → 2.5.50
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/components/OwpTreeGrid/OwpTreeGrid.js +271 -257
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridScrollLoadingOverlay.js +41 -0
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridScrollLoadingOverlay.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridScrollRenderLoading.js +161 -0
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridScrollRenderLoading.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +920 -681
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +431 -353
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.js +1 -1
- package/dist/components/OwpTreeGridResetChangesButton/OwpTreeGridResetChangesButton.js.map +1 -1
- package/dist/exceljs.js +5 -0
- package/dist/exceljs.js.map +1 -0
- 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/EAN_UPC/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/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/types/components/OwpNumberField/OwpNumberField.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
- package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridScrollLoadingOverlay.d.ts +10 -0
- package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridScrollRenderLoading.d.ts +14 -0
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +3 -1
- package/dist/types/exceljs.d.ts +3 -0
- package/dist/types/types/OwpExcelTypes.d.ts +5 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/utils/fetchFile.d.ts +1 -1
- package/dist/types/utils/internal/exceljsBrowser.d.ts +1 -2
- package/dist/utils/internal/exceljsBrowser.js.map +1 -1
- package/exceljs.d.ts +3 -0
- package/exceljs.js +1 -0
- package/package.json +3 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var i = (e, n) =>
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { isTreeGridRowAddedById as
|
|
5
|
-
import { applyTreeGridLayoutToGrid as
|
|
6
|
-
import { resolveTreeGridSelectedRows as
|
|
7
|
-
import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as
|
|
8
|
-
import { countTreeGridPerf as
|
|
9
|
-
import { debounce as
|
|
10
|
-
import { isEmpty as
|
|
11
|
-
import { get as
|
|
12
|
-
const
|
|
1
|
+
var $n = Object.defineProperty;
|
|
2
|
+
var i = (e, n) => $n(e, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { getTreeGridTextResourceUrl as Pn, TREEGRID_CELL_CHANGED_CLASS as Ye, TREEGRID_ADDED_ROW_BACKGROUND_COLOR as Dn } from "../../../constants/treeGrid.js";
|
|
4
|
+
import { isTreeGridRowAddedById as w, getTreeGridAddedRowHighlightColumns as te, getTreeGridAddedRowEditableColumns as xe, getTreeGridCellComparableValue as Ee, clearTreeGridCellHighlightById as Ze, highlightTreeGridCellById as qe, normalizeTreeGridExternalRows as vn, getTreeGridAddedRowBaselineValue as Bn, removeTreeGridAddedRowHighlightColumn as Fn, appendTreeGridAddedRowHighlightColumn as Nn } from "../../../utils/treeGridUtil.js";
|
|
5
|
+
import { applyTreeGridLayoutToGrid as Un } from "./treeGridLayout.js";
|
|
6
|
+
import { resolveTreeGridSelectedRows as kn } from "./treeGridSelection.js";
|
|
7
|
+
import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as Mn, TREE_GRID_SELECT_ALL_CHECKED_CLASS as be, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as Ie, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as we, TREE_GRID_SELECTED_CHANGED_CELL_CLASS as ye, TREE_GRID_THEME_WRAPPER_CLASS as Vn, TREE_GRID_ADDED_ROW_BOX_CELL_CLASS as Xn, TREE_GRID_ERROR_CELL_CLASS as Jn, TREE_GRID_ADDED_ROW_BOX_START_CLASS as Wn, TREE_GRID_ADDED_ROW_BOX_END_CLASS as jn } from "./treeGridTheme.js";
|
|
8
|
+
import { countTreeGridPerf as Qe, logTreeGridPerf as Kn, measureTreeGridPerf as en } from "./utils/perf.js";
|
|
9
|
+
import { debounce as ee } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
10
|
+
import { isEmpty as Hn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
11
|
+
import { get as zn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
12
|
+
const ui = 300, Yn = 3, Zn = {
|
|
13
13
|
1: {
|
|
14
14
|
onEnter: "TabDownEdit",
|
|
15
15
|
onEnterEdit: "AcceptEdit AND TabDownEdit,1"
|
|
@@ -26,37 +26,74 @@ const Br = 300, Vn = 3, Mn = {
|
|
|
26
26
|
onEnter: "TabRightEditAdd",
|
|
27
27
|
onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, qn = [240, 240, 240], Qn = [248, 248, 248], et = [255, 255, 255], nt = [255, 255, 254], tt = [242, 242, 242], rt = [
|
|
30
30
|
[255, 210, 210],
|
|
31
31
|
[249, 209, 209],
|
|
32
32
|
[115, 16, 11]
|
|
33
|
-
],
|
|
33
|
+
], it = "transparent", $e = "Button", st = /* @__PURE__ */ new Set(["Panel"]), Pe = Ye.split(/\s+/).filter(
|
|
34
34
|
Boolean
|
|
35
|
-
),
|
|
35
|
+
), ot = /* @__PURE__ */ new Set([
|
|
36
36
|
"Text",
|
|
37
37
|
"Lines",
|
|
38
38
|
"Int",
|
|
39
39
|
"Float",
|
|
40
40
|
"Date",
|
|
41
41
|
"Pass"
|
|
42
|
-
]),
|
|
42
|
+
]), De = /* @__PURE__ */ i((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), ct = {
|
|
43
|
+
CustomScroll: "1",
|
|
44
|
+
TouchScroll: "1"
|
|
45
|
+
}, lt = {
|
|
43
46
|
Visible: "1",
|
|
44
47
|
CanHide: "0",
|
|
45
48
|
Delete: "1",
|
|
46
49
|
Width: "33"
|
|
47
|
-
},
|
|
50
|
+
}, dt = {
|
|
48
51
|
Spanned: "1"
|
|
49
|
-
},
|
|
52
|
+
}, H = {
|
|
50
53
|
OnClickCell: "Focus"
|
|
51
|
-
},
|
|
54
|
+
}, z = {
|
|
52
55
|
OnClickPanelSelectAll: "SelectAll OR DeselectAll"
|
|
53
|
-
},
|
|
56
|
+
}, I = {
|
|
57
|
+
LoadPage: "",
|
|
58
|
+
RenderPage: "",
|
|
59
|
+
RenderProgressText: ""
|
|
60
|
+
}, ut = {
|
|
61
|
+
EditFrom: "",
|
|
62
|
+
EditTo: "#OwpSoftChange 240ms",
|
|
63
|
+
ChangeFrom: "",
|
|
64
|
+
ChangeTo: "#OwpSoftChange 240ms",
|
|
65
|
+
UndoChangeFrom: "",
|
|
66
|
+
UndoChangeTo: "#OwpSoftRevert 280ms",
|
|
67
|
+
RedoChangeFrom: "",
|
|
68
|
+
RedoChangeTo: "#OwpSoftChange 240ms"
|
|
69
|
+
}, ft = {
|
|
70
|
+
Add: "#OwpSoftRowAdd 220ms",
|
|
71
|
+
AddRows: "#OwpSoftRowAdd 220ms",
|
|
72
|
+
RedoAdd: "#OwpSoftRowAdd 220ms",
|
|
73
|
+
Delete: "#OwpSoftRowRemove 220ms",
|
|
74
|
+
DeleteRows: "#OwpSoftRowRemove 220ms",
|
|
75
|
+
DeleteVisible: "#OwpSoftRowRemove 220ms",
|
|
76
|
+
DeleteVisibleRows: "#OwpSoftRowRemove 220ms",
|
|
77
|
+
UndoAdd: "#OwpSoftRowRemove 220ms",
|
|
78
|
+
RedoDelete: "#OwpSoftRowRemove 220ms",
|
|
79
|
+
RedoDeleteVisible: "#OwpSoftRowRemove 220ms"
|
|
80
|
+
}, U = {
|
|
81
|
+
...ut,
|
|
82
|
+
...ft
|
|
83
|
+
}, nn = "Panel", tn = ["Formula", "FormulaFormula"], at = /<Grid\b[^>]*>/i, Tt = /<\/Grid\s*>/i, Et = /<Toolbar\b[^>]*\/?>/i, pt = [
|
|
84
|
+
"CustomScroll",
|
|
85
|
+
"CustomHScroll",
|
|
54
86
|
"Undo",
|
|
55
87
|
"Deleting",
|
|
56
88
|
"Selecting",
|
|
57
89
|
"SelectingSingle",
|
|
58
|
-
"SuppressCfg"
|
|
59
|
-
|
|
90
|
+
"SuppressCfg",
|
|
91
|
+
"TouchScroll"
|
|
92
|
+
], rn = [
|
|
93
|
+
"CustomScroll",
|
|
94
|
+
"CustomHScroll",
|
|
95
|
+
"TouchScroll"
|
|
96
|
+
], Ct = {
|
|
60
97
|
addRow: ["Add", "AddRows", "AddChildren", "AddRowsChildren"],
|
|
61
98
|
deleteRow: [
|
|
62
99
|
"Delete",
|
|
@@ -77,80 +114,100 @@ const Br = 300, Vn = 3, Mn = {
|
|
|
77
114
|
"UndeleteVisibleRowsChildren"
|
|
78
115
|
],
|
|
79
116
|
selectRow: ["Select", "SelectRows", "Deselect", "DeselectRows"]
|
|
80
|
-
},
|
|
117
|
+
}, re = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ i((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), ve = /* @__PURE__ */ i((e, n) => {
|
|
118
|
+
Object.entries(n).forEach(([t, r]) => {
|
|
119
|
+
t in e || (e[t] = r);
|
|
120
|
+
});
|
|
121
|
+
}, "assignMissingTreeGridJsonRecordFields"), P = /* @__PURE__ */ i((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), ie = /* @__PURE__ */ i((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), St = /* @__PURE__ */ i((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitHiddenConfigValue"), M = /* @__PURE__ */ i((e, n) => String(e ?? "").trim().toLowerCase() === n.toLowerCase(), "isTreeGridConfigValue"), pe = /* @__PURE__ */ i((e, n) => !P(e) && !ie(n), "isTreeGridCheckboxSelectionMode"), sn = /* @__PURE__ */ i((e) => {
|
|
81
122
|
const n = e.Cfg;
|
|
82
|
-
return Array.isArray(n) ? n.filter(
|
|
83
|
-
}, "getTreeGridJsonCfgRecords"),
|
|
123
|
+
return Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [];
|
|
124
|
+
}, "getTreeGridJsonCfgRecords"), Z = /* @__PURE__ */ i((e, n) => {
|
|
84
125
|
let t;
|
|
85
|
-
return
|
|
126
|
+
return sn(e).forEach((r) => {
|
|
86
127
|
n in r && (t = r[n]);
|
|
87
128
|
}), t;
|
|
88
|
-
}, "getTreeGridJsonCfgValue"),
|
|
129
|
+
}, "getTreeGridJsonCfgValue"), Gt = /* @__PURE__ */ i((e, n) => {
|
|
130
|
+
const t = {};
|
|
131
|
+
return n.forEach((r) => {
|
|
132
|
+
const s = Z(e, r);
|
|
133
|
+
s !== void 0 && (t[r] = s);
|
|
134
|
+
}), t;
|
|
135
|
+
}, "getTreeGridJsonCfgValues"), Rt = /* @__PURE__ */ i((e) => String(e).trim() === "1", "isTreeGridStandardScrollbarValue"), gt = /* @__PURE__ */ i((e) => rn.every((n) => {
|
|
136
|
+
const t = e[n];
|
|
137
|
+
return t === void 0 || Rt(t);
|
|
138
|
+
}), "canApplyTreeGridStableScrollbarDefaults"), on = /* @__PURE__ */ i((e) => {
|
|
139
|
+
const n = {};
|
|
140
|
+
return gt(e) && Object.entries(ct).forEach(
|
|
141
|
+
([t, r]) => {
|
|
142
|
+
e[t] === void 0 && (n[t] = r);
|
|
143
|
+
}
|
|
144
|
+
), n;
|
|
145
|
+
}, "getTreeGridStableScrollbarDefaultAttributes"), cn = /* @__PURE__ */ i((e) => Object.keys(e).length > 0, "hasTreeGridDefaultAttributes"), ln = /* @__PURE__ */ i((e, n) => {
|
|
89
146
|
const t = new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i").exec(
|
|
90
147
|
e
|
|
91
148
|
);
|
|
92
149
|
return t == null ? void 0 : t[2];
|
|
93
|
-
}, "getTreeGridXmlTagAttributeValue"),
|
|
150
|
+
}, "getTreeGridXmlTagAttributeValue"), k = /* @__PURE__ */ i((e, n) => new RegExp(`\\b${n}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), dn = /* @__PURE__ */ i((e) => String(e).replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), "escapeTreeGridXmlAttributeValue"), V = /* @__PURE__ */ i((e, n, t) => {
|
|
94
151
|
const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
|
|
95
|
-
return `${e.slice(0, r)} ${n}="${
|
|
152
|
+
return `${e.slice(0, r)} ${n}="${dn(
|
|
96
153
|
t
|
|
97
154
|
)}"${e.slice(r)}`;
|
|
98
|
-
}, "appendTreeGridXmlTagAttribute"),
|
|
155
|
+
}, "appendTreeGridXmlTagAttribute"), se = /* @__PURE__ */ i((e, n, t) => k(e, n) ? e.replace(
|
|
99
156
|
new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i"),
|
|
100
|
-
() => `${n}="${
|
|
101
|
-
) :
|
|
157
|
+
() => `${n}="${dn(t)}"`
|
|
158
|
+
) : V(e, n, t), "setTreeGridXmlTagAttribute"), X = /* @__PURE__ */ i((e, n) => {
|
|
102
159
|
let t = e;
|
|
103
|
-
return Object.entries(n).forEach(([r,
|
|
104
|
-
t =
|
|
160
|
+
return Object.entries(n).forEach(([r, s]) => {
|
|
161
|
+
t = se(t, r, s);
|
|
105
162
|
}), t;
|
|
106
|
-
}, "setTreeGridXmlTagAttributes"),
|
|
163
|
+
}, "setTreeGridXmlTagAttributes"), D = /* @__PURE__ */ i((e, n) => {
|
|
107
164
|
let t = e;
|
|
108
|
-
return Object.entries(n).forEach(([r,
|
|
109
|
-
|
|
165
|
+
return Object.entries(n).forEach(([r, s]) => {
|
|
166
|
+
k(t, r) || (t = V(t, r, s));
|
|
110
167
|
}), t;
|
|
111
|
-
}, "appendMissingTreeGridXmlTagAttributes"),
|
|
112
|
-
var
|
|
168
|
+
}, "appendMissingTreeGridXmlTagAttributes"), L = /* @__PURE__ */ i((e) => {
|
|
169
|
+
var f;
|
|
113
170
|
const n = /<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!\[CDATA\[[\s\S]*?\]\]>|<\/?([A-Za-z][\w:-]*)\b[^>]*>/g, t = {
|
|
114
171
|
cfgValues: {}
|
|
115
172
|
};
|
|
116
|
-
let r,
|
|
173
|
+
let r, s = 0, c = !1;
|
|
117
174
|
for (; r = n.exec(e); ) {
|
|
118
|
-
const
|
|
119
|
-
if (!T ||
|
|
175
|
+
const a = r[0], T = (f = r[1]) == null ? void 0 : f.toLowerCase();
|
|
176
|
+
if (!T || a.startsWith("<!--") || a.startsWith("<?") || a.startsWith("<!"))
|
|
120
177
|
continue;
|
|
121
|
-
!t.hasFastPanel &&
|
|
122
|
-
const G =
|
|
178
|
+
!t.hasFastPanel && k(a, "FastPanel") && (t.hasFastPanel = !0);
|
|
179
|
+
const G = a.startsWith("</"), R = /\/>\s*$/.test(a);
|
|
123
180
|
if (!c) {
|
|
124
|
-
!G && T === "grid" && (c = !0, t.gridOpenTagEndIndex = r.index +
|
|
181
|
+
!G && T === "grid" && (c = !0, t.gridOpenTagEndIndex = r.index + a.length, s = R ? 0 : 1);
|
|
125
182
|
continue;
|
|
126
183
|
}
|
|
127
184
|
if (G) {
|
|
128
|
-
if (
|
|
185
|
+
if (s = Math.max(0, s - 1), T === "grid" && s === 0)
|
|
129
186
|
break;
|
|
130
187
|
continue;
|
|
131
188
|
}
|
|
132
|
-
|
|
189
|
+
s === 1 && (T === "cfg" ? (t.defaultCfgTag || (t.defaultCfgTag = {
|
|
133
190
|
index: r.index,
|
|
134
|
-
tag:
|
|
135
|
-
}),
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
}), t.lastCfgEndIndex = r.index +
|
|
191
|
+
tag: a
|
|
192
|
+
}), pt.forEach((h) => {
|
|
193
|
+
const _ = ln(a, h);
|
|
194
|
+
_ !== void 0 && (t.cfgValues[h] = _);
|
|
195
|
+
}), t.lastCfgEndIndex = r.index + a.length) : T === "actions" && !t.defaultActionsTag ? t.defaultActionsTag = {
|
|
139
196
|
index: r.index,
|
|
140
|
-
tag:
|
|
141
|
-
} : T === "panel" ? (t.hasTopLevelPanelTag = !0, !t.defaultPanelTag &&
|
|
197
|
+
tag: a
|
|
198
|
+
} : T === "panel" ? (t.hasTopLevelPanelTag = !0, !t.defaultPanelTag && ht(a) && (t.defaultPanelTag = {
|
|
142
199
|
index: r.index,
|
|
143
|
-
tag:
|
|
200
|
+
tag: a
|
|
144
201
|
})) : T === "animations" && !t.animationsTag && (t.animationsTag = {
|
|
145
202
|
index: r.index,
|
|
146
|
-
tag:
|
|
147
|
-
})),
|
|
203
|
+
tag: a
|
|
204
|
+
})), R || (s += 1);
|
|
148
205
|
}
|
|
149
206
|
return t;
|
|
150
|
-
}, "scanTreeGridXmlDefaultLayout"),
|
|
151
|
-
const n =
|
|
207
|
+
}, "scanTreeGridXmlDefaultLayout"), ht = /* @__PURE__ */ i((e) => {
|
|
208
|
+
const n = ln(e, "Name");
|
|
152
209
|
return n === void 0 || n === "" || n.toLowerCase() === "panel";
|
|
153
|
-
}, "isTreeGridXmlDefaultPanelTag"),
|
|
210
|
+
}, "isTreeGridXmlDefaultPanelTag"), At = /* @__PURE__ */ i((e) => {
|
|
154
211
|
const n = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, t = [];
|
|
155
212
|
let r;
|
|
156
213
|
for (; r = n.exec(e); ) {
|
|
@@ -165,110 +222,110 @@ const Br = 300, Vn = 3, Mn = {
|
|
|
165
222
|
});
|
|
166
223
|
}
|
|
167
224
|
return t;
|
|
168
|
-
}, "getLeadingTreeGridXmlHeaderTags"),
|
|
169
|
-
const n =
|
|
225
|
+
}, "getLeadingTreeGridXmlHeaderTags"), mt = /* @__PURE__ */ i((e) => {
|
|
226
|
+
const n = At(e);
|
|
170
227
|
if (n.length <= 1)
|
|
171
228
|
return {
|
|
172
229
|
headContent: e,
|
|
173
230
|
isApplied: !1
|
|
174
231
|
};
|
|
175
232
|
const [t, ...r] = n;
|
|
176
|
-
if (
|
|
233
|
+
if (k(t.tag, "PanelRowSpan") || r.some(({ tag: c }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(c)))
|
|
177
234
|
return {
|
|
178
235
|
headContent: e,
|
|
179
236
|
isApplied: !1
|
|
180
237
|
};
|
|
181
|
-
let
|
|
182
|
-
return
|
|
183
|
-
|
|
238
|
+
let s = t.tag;
|
|
239
|
+
return k(s, "Spanned") || (s = V(s, "Spanned", 1)), s = V(
|
|
240
|
+
s,
|
|
184
241
|
"PanelRowSpan",
|
|
185
242
|
n.length
|
|
186
243
|
), {
|
|
187
|
-
headContent: `${e.slice(0, t.index)}${
|
|
244
|
+
headContent: `${e.slice(0, t.index)}${s}${e.slice(
|
|
188
245
|
t.index + t.tag.length
|
|
189
246
|
)}`,
|
|
190
247
|
isApplied: !0
|
|
191
248
|
};
|
|
192
|
-
}, "applyTreeGridXmlHeadPanelRowSpanDefault"),
|
|
193
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
249
|
+
}, "applyTreeGridXmlHeadPanelRowSpanDefault"), _t = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlPanelSpannedInsertionIndex"), un = /* @__PURE__ */ i((e) => pn(e.cfgValues) && (!!e.defaultPanelTag || !e.hasTopLevelPanelTag), "isTreeGridXmlSelectionPanelSpannedDefaultLayout"), fn = /* @__PURE__ */ i((e) => un(e) || Cn(e.cfgValues), "isTreeGridXmlPanelSpannedDefaultLayout"), an = /* @__PURE__ */ i((e, n) => {
|
|
250
|
+
if (n.gridOpenTagEndIndex === void 0 || !fn(n))
|
|
194
251
|
return e;
|
|
195
252
|
const t = n.defaultPanelTag;
|
|
196
253
|
if (t) {
|
|
197
|
-
const
|
|
254
|
+
const s = D(
|
|
198
255
|
t.tag,
|
|
199
|
-
|
|
256
|
+
dt
|
|
200
257
|
);
|
|
201
|
-
return
|
|
258
|
+
return s === t.tag ? e : `${e.slice(0, t.index)}${s}${e.slice(
|
|
202
259
|
t.index + t.tag.length
|
|
203
260
|
)}`;
|
|
204
261
|
}
|
|
205
|
-
const r =
|
|
262
|
+
const r = _t(n);
|
|
206
263
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
207
264
|
<Panel Spanned="1" />${e.slice(
|
|
208
265
|
r
|
|
209
266
|
)}`;
|
|
210
|
-
}, "applyTreeGridXmlDefaultPanelSpannedLayout"),
|
|
267
|
+
}, "applyTreeGridXmlDefaultPanelSpannedLayout"), Lt = /* @__PURE__ */ i((e, n) => un(n) ? an(e, n) : e, "applyTreeGridXmlDefaultSelectionPanelSpannedLayout"), Ot = /* @__PURE__ */ i((e) => {
|
|
211
268
|
const n = e.trim();
|
|
212
|
-
return !n || n.startsWith("{") ? e :
|
|
269
|
+
return !n || n.startsWith("{") ? e : Lt(
|
|
213
270
|
e,
|
|
214
|
-
|
|
271
|
+
L(e)
|
|
215
272
|
);
|
|
216
|
-
}, "applyTreeGridDefaultPanelSpannedLayout"),
|
|
273
|
+
}, "applyTreeGridDefaultPanelSpannedLayout"), xt = /* @__PURE__ */ i((e) => {
|
|
217
274
|
if (!/<Head\b/i.test(e))
|
|
218
275
|
return e;
|
|
219
|
-
const n =
|
|
220
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
276
|
+
const n = L(e);
|
|
277
|
+
if (n.gridOpenTagEndIndex === void 0 || !fn(n))
|
|
221
278
|
return e;
|
|
222
279
|
let t = !1;
|
|
223
280
|
const r = e.replace(
|
|
224
281
|
/(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
|
|
225
|
-
(
|
|
226
|
-
const T =
|
|
227
|
-
return T.isApplied ? (t = !0, `${c}${T.headContent}${
|
|
282
|
+
(s, c, f, a) => {
|
|
283
|
+
const T = mt(f);
|
|
284
|
+
return T.isApplied ? (t = !0, `${c}${T.headContent}${a}`) : s;
|
|
228
285
|
}
|
|
229
286
|
);
|
|
230
|
-
return t ?
|
|
287
|
+
return t ? an(
|
|
231
288
|
r,
|
|
232
|
-
|
|
289
|
+
L(r)
|
|
233
290
|
) : e;
|
|
234
|
-
}, "applyTreeGridDefaultHeaderPanelRowSpanLayout"),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
), "isTreeGridJsonCheckboxSelectionLayout"),
|
|
291
|
+
}, "applyTreeGridDefaultHeaderPanelRowSpanLayout"), Tn = /* @__PURE__ */ i((e) => pe(
|
|
292
|
+
Z(e, "Selecting"),
|
|
293
|
+
Z(e, "SelectingSingle")
|
|
294
|
+
), "isTreeGridJsonCheckboxSelectionLayout"), En = /* @__PURE__ */ i((e) => pe(
|
|
238
295
|
e.Selecting,
|
|
239
296
|
e.SelectingSingle
|
|
240
|
-
), "isTreeGridXmlCheckboxSelectionLayout"),
|
|
241
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
297
|
+
), "isTreeGridXmlCheckboxSelectionLayout"), pn = /* @__PURE__ */ i((e) => !P(e.Selecting), "isTreeGridXmlSelectingLayout"), Cn = /* @__PURE__ */ i((e) => M(e.Undo, "1") && M(e.Deleting, "2") && M(e.Selecting, "0"), "isTreeGridXmlDeletePanelDefaultLayout"), bt = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlCellClickActionInsertionIndex"), It = /* @__PURE__ */ i((e, n) => {
|
|
298
|
+
if (n.gridOpenTagEndIndex === void 0 || !pn(n.cfgValues) || /\bOnClickCell\s*=/i.test(e))
|
|
242
299
|
return e;
|
|
243
300
|
const t = n.defaultActionsTag;
|
|
244
301
|
if (t) {
|
|
245
|
-
const
|
|
302
|
+
const s = D(
|
|
246
303
|
t.tag,
|
|
247
|
-
|
|
304
|
+
H
|
|
248
305
|
);
|
|
249
|
-
return
|
|
306
|
+
return s === t.tag ? e : `${e.slice(0, t.index)}${s}${e.slice(
|
|
250
307
|
t.index + t.tag.length
|
|
251
308
|
)}`;
|
|
252
309
|
}
|
|
253
|
-
const r =
|
|
310
|
+
const r = bt(n);
|
|
254
311
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
255
312
|
<Actions OnClickCell="Focus" />${e.slice(
|
|
256
313
|
r
|
|
257
314
|
)}`;
|
|
258
|
-
}, "applyTreeGridXmlDefaultCellClickActionLayout"),
|
|
259
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
315
|
+
}, "applyTreeGridXmlDefaultCellClickActionLayout"), wt = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlSelectAllPanelActionInsertionIndex"), yt = /* @__PURE__ */ i((e, n) => {
|
|
316
|
+
if (n.gridOpenTagEndIndex === void 0 || !En(n.cfgValues) || /\bOnClickPanelSelectAll\s*=/i.test(e))
|
|
260
317
|
return e;
|
|
261
318
|
const t = n.defaultActionsTag;
|
|
262
319
|
if (t) {
|
|
263
|
-
const
|
|
320
|
+
const s = D(
|
|
264
321
|
t.tag,
|
|
265
|
-
|
|
322
|
+
z
|
|
266
323
|
);
|
|
267
|
-
return
|
|
324
|
+
return s === t.tag ? e : `${e.slice(0, t.index)}${s}${e.slice(
|
|
268
325
|
t.index + t.tag.length
|
|
269
326
|
)}`;
|
|
270
327
|
}
|
|
271
|
-
const r =
|
|
328
|
+
const r = wt(n);
|
|
272
329
|
return r === void 0 ? e : `${e.slice(
|
|
273
330
|
0,
|
|
274
331
|
r
|
|
@@ -276,216 +333,390 @@ const Br = 300, Vn = 3, Mn = {
|
|
|
276
333
|
<Actions OnClickPanelSelectAll="SelectAll OR DeselectAll" />${e.slice(
|
|
277
334
|
r
|
|
278
335
|
)}`;
|
|
279
|
-
}, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"),
|
|
280
|
-
if (n.gridOpenTagEndIndex === void 0 || !
|
|
336
|
+
}, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"), $t = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlDeletePanelInsertionIndex"), Pt = /* @__PURE__ */ i((e, n) => {
|
|
337
|
+
if (n.gridOpenTagEndIndex === void 0 || !Cn(n.cfgValues))
|
|
281
338
|
return e;
|
|
282
339
|
const t = n.defaultPanelTag;
|
|
283
340
|
if (t) {
|
|
284
|
-
const c =
|
|
341
|
+
const c = D(
|
|
285
342
|
t.tag,
|
|
286
|
-
|
|
343
|
+
lt
|
|
287
344
|
);
|
|
288
345
|
return c === t.tag ? e : `${e.slice(0, t.index)}${c}${e.slice(
|
|
289
346
|
t.index + t.tag.length
|
|
290
347
|
)}`;
|
|
291
348
|
}
|
|
292
|
-
const r =
|
|
349
|
+
const r = $t(n);
|
|
293
350
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
294
351
|
<Panel Visible="1" CanHide="0" Delete="1" Width="33" />${e.slice(
|
|
295
352
|
r
|
|
296
353
|
)}`;
|
|
297
|
-
}, "applyTreeGridXmlDefaultDeletePanelLayout"),
|
|
298
|
-
if (n.hasFastPanel || !
|
|
354
|
+
}, "applyTreeGridXmlDefaultDeletePanelLayout"), Dt = /* @__PURE__ */ i((e, n) => {
|
|
355
|
+
if (n.hasFastPanel || !En(n.cfgValues))
|
|
299
356
|
return e;
|
|
300
357
|
const t = n.gridOpenTagEndIndex;
|
|
301
358
|
return t === void 0 ? e : `${e.slice(0, t)}
|
|
302
359
|
<Cfg FastPanel="0" />${e.slice(
|
|
303
360
|
t
|
|
304
361
|
)}`;
|
|
305
|
-
}, "applyTreeGridXmlDefaultFastPanelLayout"),
|
|
362
|
+
}, "applyTreeGridXmlDefaultFastPanelLayout"), vt = /* @__PURE__ */ i((e) => {
|
|
306
363
|
const n = e.Cfg;
|
|
307
364
|
if (Array.isArray(n)) {
|
|
308
|
-
n.some((t) =>
|
|
365
|
+
n.some((t) => S(t) && "FastPanel" in t) || (e.Cfg = [{ FastPanel: 0 }, ...n]);
|
|
309
366
|
return;
|
|
310
367
|
}
|
|
311
|
-
if (
|
|
368
|
+
if (S(n)) {
|
|
312
369
|
"FastPanel" in n || (n.FastPanel = 0);
|
|
313
370
|
return;
|
|
314
371
|
}
|
|
315
372
|
e.Cfg = { FastPanel: 0 };
|
|
316
|
-
}, "applyTreeGridJsonFastPanelDefault"),
|
|
373
|
+
}, "applyTreeGridJsonFastPanelDefault"), Bt = /* @__PURE__ */ i((e) => {
|
|
317
374
|
const n = e.Actions;
|
|
318
375
|
if (Array.isArray(n)) {
|
|
319
376
|
n.some(
|
|
320
|
-
(t) =>
|
|
321
|
-
) || (e.Actions = [{ ...
|
|
377
|
+
(t) => S(t) && "OnClickPanelSelectAll" in t
|
|
378
|
+
) || (e.Actions = [{ ...z }, ...n]);
|
|
322
379
|
return;
|
|
323
380
|
}
|
|
324
|
-
if (
|
|
325
|
-
"OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll =
|
|
381
|
+
if (S(n)) {
|
|
382
|
+
"OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll = z.OnClickPanelSelectAll);
|
|
326
383
|
return;
|
|
327
384
|
}
|
|
328
|
-
n === void 0 && (e.Actions = { ...
|
|
329
|
-
}, "applyTreeGridJsonSelectAllPanelActionDefault"),
|
|
385
|
+
n === void 0 && (e.Actions = { ...z });
|
|
386
|
+
}, "applyTreeGridJsonSelectAllPanelActionDefault"), Ft = /* @__PURE__ */ i((e) => {
|
|
330
387
|
const n = e.Actions;
|
|
331
388
|
if (Array.isArray(n)) {
|
|
332
|
-
n.some((t) =>
|
|
389
|
+
n.some((t) => S(t) && "OnClickCell" in t) || (e.Actions = [{ ...H }, ...n]);
|
|
333
390
|
return;
|
|
334
391
|
}
|
|
335
|
-
if (
|
|
336
|
-
"OnClickCell" in n || (n.OnClickCell =
|
|
392
|
+
if (S(n)) {
|
|
393
|
+
"OnClickCell" in n || (n.OnClickCell = H.OnClickCell);
|
|
337
394
|
return;
|
|
338
395
|
}
|
|
339
|
-
n === void 0 && (e.Actions = { ...
|
|
340
|
-
}, "applyTreeGridJsonCellClickActionDefault"),
|
|
396
|
+
n === void 0 && (e.Actions = { ...H });
|
|
397
|
+
}, "applyTreeGridJsonCellClickActionDefault"), Nt = /* @__PURE__ */ i((e) => {
|
|
341
398
|
try {
|
|
342
399
|
const n = JSON.parse(e);
|
|
343
|
-
return !
|
|
400
|
+
return !S(n) || P(Z(n, "Selecting")) ? e : (Ft(n), JSON.stringify(n));
|
|
344
401
|
} catch {
|
|
345
402
|
return e;
|
|
346
403
|
}
|
|
347
|
-
}, "applyTreeGridJsonDefaultCellClickActionLayout"),
|
|
404
|
+
}, "applyTreeGridJsonDefaultCellClickActionLayout"), Be = /* @__PURE__ */ i((e, n) => {
|
|
348
405
|
const t = e.trim();
|
|
349
|
-
return t ? t.startsWith("{") ?
|
|
406
|
+
return t ? t.startsWith("{") ? Nt(e) : It(
|
|
350
407
|
e,
|
|
351
|
-
n ??
|
|
408
|
+
n ?? L(e)
|
|
352
409
|
) : e;
|
|
353
|
-
}, "applyTreeGridDefaultCellClickActionLayout"),
|
|
410
|
+
}, "applyTreeGridDefaultCellClickActionLayout"), Ut = /* @__PURE__ */ i((e) => {
|
|
354
411
|
try {
|
|
355
412
|
const n = JSON.parse(e);
|
|
356
|
-
return !
|
|
413
|
+
return !S(n) || !Tn(n) ? e : (Bt(n), JSON.stringify(n));
|
|
357
414
|
} catch {
|
|
358
415
|
return e;
|
|
359
416
|
}
|
|
360
|
-
}, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"),
|
|
417
|
+
}, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"), Fe = /* @__PURE__ */ i((e, n) => {
|
|
361
418
|
const t = e.trim();
|
|
362
|
-
return t ? t.startsWith("{") ?
|
|
419
|
+
return t ? t.startsWith("{") ? Ut(e) : yt(
|
|
363
420
|
e,
|
|
364
|
-
n ??
|
|
421
|
+
n ?? L(e)
|
|
365
422
|
) : e;
|
|
366
|
-
}, "applyTreeGridDefaultSelectAllPanelActionLayout"),
|
|
423
|
+
}, "applyTreeGridDefaultSelectAllPanelActionLayout"), kt = /* @__PURE__ */ i((e) => {
|
|
424
|
+
const n = on(
|
|
425
|
+
Gt(e, rn)
|
|
426
|
+
);
|
|
427
|
+
if (!cn(n))
|
|
428
|
+
return;
|
|
429
|
+
const t = e.Cfg;
|
|
430
|
+
if (Array.isArray(t)) {
|
|
431
|
+
const r = t.find(S);
|
|
432
|
+
r ? Object.assign(r, n) : e.Cfg = [n, ...t];
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
if (S(t)) {
|
|
436
|
+
Object.assign(t, n);
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
e.Cfg = n;
|
|
440
|
+
}, "applyTreeGridJsonStableScrollbarDefaults"), Mt = /* @__PURE__ */ i((e) => {
|
|
441
|
+
try {
|
|
442
|
+
const n = JSON.parse(e);
|
|
443
|
+
return S(n) ? (kt(n), JSON.stringify(n)) : e;
|
|
444
|
+
} catch {
|
|
445
|
+
return e;
|
|
446
|
+
}
|
|
447
|
+
}, "applyTreeGridJsonStableScrollbarDefaultLayout"), Vt = /* @__PURE__ */ i((e, n) => {
|
|
448
|
+
const t = on(
|
|
449
|
+
n.cfgValues
|
|
450
|
+
);
|
|
451
|
+
if (!cn(t))
|
|
452
|
+
return e;
|
|
453
|
+
const r = n.defaultCfgTag;
|
|
454
|
+
if (r) {
|
|
455
|
+
const f = D(
|
|
456
|
+
r.tag,
|
|
457
|
+
t
|
|
458
|
+
);
|
|
459
|
+
return `${e.slice(0, r.index)}${f}${e.slice(
|
|
460
|
+
r.index + r.tag.length
|
|
461
|
+
)}`;
|
|
462
|
+
}
|
|
463
|
+
const s = n.gridOpenTagEndIndex;
|
|
464
|
+
if (s === void 0)
|
|
465
|
+
return e;
|
|
466
|
+
const c = D(
|
|
467
|
+
"<Cfg />",
|
|
468
|
+
t
|
|
469
|
+
);
|
|
470
|
+
return `${e.slice(0, s)}
|
|
471
|
+
${c}${e.slice(
|
|
472
|
+
s
|
|
473
|
+
)}`;
|
|
474
|
+
}, "applyTreeGridXmlStableScrollbarDefaultLayout"), Xt = /* @__PURE__ */ i((e) => {
|
|
475
|
+
const n = e.trim();
|
|
476
|
+
return n ? n.startsWith("{") ? Mt(e) : Vt(
|
|
477
|
+
e,
|
|
478
|
+
L(e)
|
|
479
|
+
) : e;
|
|
480
|
+
}, "applyTreeGridStableScrollbarDefaultLayout"), Ne = /* @__PURE__ */ i((e) => {
|
|
481
|
+
const n = e.Text;
|
|
482
|
+
if (Array.isArray(n)) {
|
|
483
|
+
const t = n.find(S);
|
|
484
|
+
t ? Object.assign(t, I) : e.Text = [{ ...I }, ...n];
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
if (S(n)) {
|
|
488
|
+
Object.assign(n, I);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
e.Text = { ...I };
|
|
492
|
+
}, "applyTreeGridJsonLangPageMessageTextDefaults"), Jt = /* @__PURE__ */ i((e) => {
|
|
493
|
+
const n = e.Lang;
|
|
494
|
+
if (Array.isArray(n)) {
|
|
495
|
+
const t = n.find(S);
|
|
496
|
+
t ? Ne(t) : e.Lang = [{ Text: { ...I } }, ...n];
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
if (S(n)) {
|
|
500
|
+
Ne(n);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
e.Lang = { Text: { ...I } };
|
|
504
|
+
}, "applyTreeGridJsonPageMessageTextDefaults"), Wt = /* @__PURE__ */ i((e) => {
|
|
505
|
+
try {
|
|
506
|
+
const n = JSON.parse(e);
|
|
507
|
+
return S(n) ? (Jt(n), JSON.stringify(n)) : e;
|
|
508
|
+
} catch {
|
|
509
|
+
return e;
|
|
510
|
+
}
|
|
511
|
+
}, "applyTreeGridJsonPageMessageTextLayout"), oe = /* @__PURE__ */ i(() => X("<Text />", I), "createTreeGridXmlPageMessageTextTag"), jt = /* @__PURE__ */ i((e) => {
|
|
512
|
+
let n = !1;
|
|
513
|
+
const t = e.replace(
|
|
514
|
+
/(<Lang\b[^>]*>)([\s\S]*?)(<\/Lang>)/i,
|
|
515
|
+
(r, s, c, f) => {
|
|
516
|
+
if (n = !0, /<Text\b/i.test(c)) {
|
|
517
|
+
const a = c.replace(
|
|
518
|
+
/<Text\b[^>]*(?:\/>|>)/i,
|
|
519
|
+
(T) => X(T, I)
|
|
520
|
+
);
|
|
521
|
+
return `${s}${a}${f}`;
|
|
522
|
+
}
|
|
523
|
+
return `${s}
|
|
524
|
+
${oe()}${c}${f}`;
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
return n ? t : e.replace(/<Lang\b[^>]*\/>/i, (r) => (n = !0, `${r.replace(/\s*\/>$/, ">")}
|
|
528
|
+
${oe()}
|
|
529
|
+
</Lang>`));
|
|
530
|
+
}, "applyTreeGridXmlPageMessageTextToLangLayout"), Kt = /* @__PURE__ */ i((e) => {
|
|
531
|
+
const n = jt(e);
|
|
532
|
+
if (n !== e)
|
|
533
|
+
return n;
|
|
534
|
+
const t = L(e), r = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
|
|
535
|
+
return r === void 0 ? e : `${e.slice(0, r)}
|
|
536
|
+
<Lang>
|
|
537
|
+
${oe()}
|
|
538
|
+
</Lang>${e.slice(
|
|
539
|
+
r
|
|
540
|
+
)}`;
|
|
541
|
+
}, "applyTreeGridXmlPageMessageTextLayout"), Ht = /* @__PURE__ */ i((e) => {
|
|
542
|
+
const n = e.trim();
|
|
543
|
+
return n ? n.startsWith("{") ? Wt(e) : Kt(e) : e;
|
|
544
|
+
}, "applyTreeGridPageMessageTextLayout"), zt = /* @__PURE__ */ i((e, n) => {
|
|
367
545
|
if (n === void 0)
|
|
368
546
|
return e;
|
|
369
547
|
try {
|
|
370
548
|
const t = JSON.parse(e);
|
|
371
|
-
if (!
|
|
549
|
+
if (!S(t))
|
|
372
550
|
return e;
|
|
373
|
-
const r =
|
|
374
|
-
return r.some((
|
|
551
|
+
const r = sn(t);
|
|
552
|
+
return r.some((s) => "SuppressCfg" in s) ? e : (r[0] ? r[0].SuppressCfg = n : t.Cfg = { SuppressCfg: n }, JSON.stringify(t));
|
|
375
553
|
} catch {
|
|
376
554
|
return e;
|
|
377
555
|
}
|
|
378
|
-
}, "applyTreeGridJsonDefaultSuppressCfgLayout"),
|
|
556
|
+
}, "applyTreeGridJsonDefaultSuppressCfgLayout"), Yt = /* @__PURE__ */ i((e, n, t) => {
|
|
379
557
|
if (t === void 0 || n.cfgValues.SuppressCfg !== void 0)
|
|
380
558
|
return e;
|
|
381
559
|
const r = n.defaultCfgTag;
|
|
382
560
|
if (r) {
|
|
383
|
-
const c =
|
|
561
|
+
const c = V(r.tag, "SuppressCfg", t);
|
|
384
562
|
return `${e.slice(0, r.index)}${c}${e.slice(
|
|
385
563
|
r.index + r.tag.length
|
|
386
564
|
)}`;
|
|
387
565
|
}
|
|
388
|
-
const
|
|
389
|
-
return
|
|
566
|
+
const s = n.gridOpenTagEndIndex;
|
|
567
|
+
return s === void 0 ? e : `${e.slice(0, s)}
|
|
390
568
|
<Cfg SuppressCfg="${t}" />${e.slice(
|
|
391
|
-
|
|
569
|
+
s
|
|
392
570
|
)}`;
|
|
393
|
-
}, "applyTreeGridXmlDefaultSuppressCfgLayout"),
|
|
571
|
+
}, "applyTreeGridXmlDefaultSuppressCfgLayout"), Zt = /* @__PURE__ */ i((e, n) => {
|
|
394
572
|
const t = e.trim();
|
|
395
|
-
return n === void 0 || !t ? e : t.startsWith("{") ?
|
|
573
|
+
return n === void 0 || !t ? e : t.startsWith("{") ? zt(e, n) : Yt(
|
|
396
574
|
e,
|
|
397
|
-
|
|
575
|
+
L(e),
|
|
398
576
|
n
|
|
399
577
|
);
|
|
400
|
-
}, "applyTreeGridDefaultSuppressCfgLayout"),
|
|
401
|
-
const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(
|
|
402
|
-
(c) =>
|
|
403
|
-
) :
|
|
404
|
-
return [...r, ...
|
|
405
|
-
}, "getTreeGridJsonToolbarRecords"),
|
|
578
|
+
}, "applyTreeGridDefaultSuppressCfgLayout"), qt = /* @__PURE__ */ i((e) => tn.some((n) => n in e), "hasTreeGridToolbarFormulaField"), Qt = /* @__PURE__ */ i((e) => {
|
|
579
|
+
const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [], s = Array.isArray(t) ? t.filter(
|
|
580
|
+
(c) => S(c) && M(c.Kind, "Toolbar")
|
|
581
|
+
) : S(t) && M(t.Kind, "Toolbar") ? [t] : [];
|
|
582
|
+
return [...r, ...s];
|
|
583
|
+
}, "getTreeGridJsonToolbarRecords"), er = /* @__PURE__ */ i((e, n) => {
|
|
406
584
|
if (!n)
|
|
407
585
|
return e;
|
|
408
586
|
try {
|
|
409
587
|
const t = JSON.parse(e);
|
|
410
|
-
if (!
|
|
588
|
+
if (!S(t))
|
|
411
589
|
return e;
|
|
412
|
-
const r =
|
|
413
|
-
return r.some(
|
|
590
|
+
const r = Qt(t);
|
|
591
|
+
return r.some(qt) ? e : (r[0] ? r[0].FormulaFormula = n : t.Toolbar = { FormulaFormula: n }, JSON.stringify(t));
|
|
414
592
|
} catch {
|
|
415
593
|
return e;
|
|
416
594
|
}
|
|
417
|
-
}, "applyTreeGridJsonDefaultToolbarTotalCountLayout"),
|
|
418
|
-
(n) =>
|
|
419
|
-
), "hasTreeGridXmlToolbarFormulaAttribute"),
|
|
595
|
+
}, "applyTreeGridJsonDefaultToolbarTotalCountLayout"), nr = /* @__PURE__ */ i((e) => tn.some(
|
|
596
|
+
(n) => k(e, n)
|
|
597
|
+
), "hasTreeGridXmlToolbarFormulaAttribute"), tr = /* @__PURE__ */ i((e, n) => {
|
|
420
598
|
if (!n)
|
|
421
599
|
return e;
|
|
422
|
-
const t =
|
|
600
|
+
const t = Et.exec(e);
|
|
423
601
|
if (t) {
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
602
|
+
const f = t[0];
|
|
603
|
+
if (nr(f))
|
|
426
604
|
return e;
|
|
427
|
-
const
|
|
428
|
-
|
|
605
|
+
const a = se(
|
|
606
|
+
f,
|
|
429
607
|
"Formula",
|
|
430
608
|
n
|
|
431
609
|
);
|
|
432
|
-
return `${e.slice(0, t.index)}${
|
|
433
|
-
t.index +
|
|
610
|
+
return `${e.slice(0, t.index)}${a}${e.slice(
|
|
611
|
+
t.index + f.length
|
|
434
612
|
)}`;
|
|
435
613
|
}
|
|
436
|
-
const r =
|
|
614
|
+
const r = se(
|
|
437
615
|
"<Toolbar />",
|
|
438
616
|
"Formula",
|
|
439
617
|
n
|
|
440
|
-
),
|
|
441
|
-
if (
|
|
442
|
-
return `${e.slice(0,
|
|
618
|
+
), s = Tt.exec(e);
|
|
619
|
+
if (s)
|
|
620
|
+
return `${e.slice(0, s.index)} ${r}
|
|
443
621
|
${e.slice(
|
|
444
|
-
|
|
622
|
+
s.index
|
|
445
623
|
)}`;
|
|
446
|
-
const c =
|
|
624
|
+
const c = at.exec(e);
|
|
447
625
|
return c ? `${e.slice(
|
|
448
626
|
0,
|
|
449
627
|
c.index + c[0].length
|
|
450
628
|
)}
|
|
451
629
|
${r}${e.slice(c.index + c[0].length)}` : e;
|
|
452
|
-
}, "applyTreeGridXmlDefaultToolbarTotalCountLayout"),
|
|
630
|
+
}, "applyTreeGridXmlDefaultToolbarTotalCountLayout"), rr = /* @__PURE__ */ i((e, n) => {
|
|
453
631
|
const t = e.trim();
|
|
454
|
-
return !n || !t ? e : t.startsWith("{") ?
|
|
632
|
+
return !n || !t ? e : t.startsWith("{") ? er(
|
|
455
633
|
e,
|
|
456
634
|
n
|
|
457
|
-
) :
|
|
458
|
-
}, "applyTreeGridDefaultToolbarTotalCountLayout"),
|
|
635
|
+
) : tr(e, n);
|
|
636
|
+
}, "applyTreeGridDefaultToolbarTotalCountLayout"), ir = /* @__PURE__ */ i((e) => {
|
|
459
637
|
try {
|
|
460
638
|
const n = JSON.parse(e);
|
|
461
|
-
return !
|
|
639
|
+
return !S(n) || !Tn(n) ? e : (vt(n), JSON.stringify(n));
|
|
462
640
|
} catch {
|
|
463
641
|
return e;
|
|
464
642
|
}
|
|
465
|
-
}, "applyTreeGridJsonDefaultFastPanelLayout"),
|
|
643
|
+
}, "applyTreeGridJsonDefaultFastPanelLayout"), Ue = /* @__PURE__ */ i((e, n) => {
|
|
466
644
|
const t = e.trim();
|
|
467
|
-
return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e :
|
|
645
|
+
return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e : ir(e) : Dt(
|
|
468
646
|
e,
|
|
469
|
-
n ??
|
|
647
|
+
n ?? L(e)
|
|
470
648
|
) : e;
|
|
471
|
-
}, "applyTreeGridDefaultFastPanelLayout"),
|
|
649
|
+
}, "applyTreeGridDefaultFastPanelLayout"), sr = /* @__PURE__ */ i((e) => {
|
|
650
|
+
const n = e.Animations;
|
|
651
|
+
if (Array.isArray(n)) {
|
|
652
|
+
const t = n.find(S);
|
|
653
|
+
t ? ve(
|
|
654
|
+
t,
|
|
655
|
+
U
|
|
656
|
+
) : e.Animations = [
|
|
657
|
+
{ ...U },
|
|
658
|
+
...n
|
|
659
|
+
];
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
if (S(n)) {
|
|
663
|
+
ve(
|
|
664
|
+
n,
|
|
665
|
+
U
|
|
666
|
+
);
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
n === void 0 && (e.Animations = { ...U });
|
|
670
|
+
}, "applyTreeGridJsonDefaultAnimationDefaults"), or = /* @__PURE__ */ i((e) => {
|
|
671
|
+
try {
|
|
672
|
+
const n = JSON.parse(e);
|
|
673
|
+
return S(n) ? (sr(n), JSON.stringify(n)) : e;
|
|
674
|
+
} catch {
|
|
675
|
+
return e;
|
|
676
|
+
}
|
|
677
|
+
}, "applyTreeGridJsonDefaultAnimationLayout"), cr = /* @__PURE__ */ i(() => X(
|
|
678
|
+
"<Animations />",
|
|
679
|
+
U
|
|
680
|
+
), "createTreeGridDefaultAnimationsTag"), lr = /* @__PURE__ */ i((e, n) => {
|
|
681
|
+
const t = L(e);
|
|
682
|
+
if (t.gridOpenTagEndIndex === void 0)
|
|
683
|
+
return e;
|
|
684
|
+
const r = t.animationsTag;
|
|
685
|
+
if (r) {
|
|
686
|
+
const c = D(
|
|
687
|
+
r.tag,
|
|
688
|
+
U
|
|
689
|
+
);
|
|
690
|
+
return c === r.tag ? e : `${e.slice(0, r.index)}${c}${e.slice(
|
|
691
|
+
r.index + r.tag.length
|
|
692
|
+
)}`;
|
|
693
|
+
}
|
|
694
|
+
const s = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
|
|
695
|
+
return `${e.slice(0, s)}
|
|
696
|
+
${cr()}${e.slice(
|
|
697
|
+
s
|
|
698
|
+
)}`;
|
|
699
|
+
}, "applyTreeGridXmlDefaultAnimationLayout"), ke = /* @__PURE__ */ i((e, n) => {
|
|
700
|
+
const t = e.trim();
|
|
701
|
+
return t ? t.startsWith("{") ? or(e) : lr(e) : e;
|
|
702
|
+
}, "applyTreeGridDefaultAnimationLayout"), dr = /* @__PURE__ */ i((e) => {
|
|
472
703
|
const n = {};
|
|
473
704
|
return e == null || e.forEach((t) => {
|
|
474
705
|
var r;
|
|
475
|
-
(r =
|
|
476
|
-
n[
|
|
706
|
+
(r = Ct[t]) == null || r.forEach((s) => {
|
|
707
|
+
n[s] = "";
|
|
477
708
|
});
|
|
478
709
|
}), n;
|
|
479
|
-
}, "getTreeGridDisabledAnimationAttributes"),
|
|
710
|
+
}, "getTreeGridDisabledAnimationAttributes"), ur = /* @__PURE__ */ i((e, n) => {
|
|
480
711
|
try {
|
|
481
712
|
const t = JSON.parse(e);
|
|
482
|
-
if (!
|
|
713
|
+
if (!S(t))
|
|
483
714
|
return e;
|
|
484
715
|
const r = t.Animations;
|
|
485
716
|
if (Array.isArray(r)) {
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
} else if (
|
|
717
|
+
const s = r.find(S);
|
|
718
|
+
s ? Object.assign(s, n) : r.unshift({ ...n });
|
|
719
|
+
} else if (S(r))
|
|
489
720
|
Object.assign(r, n);
|
|
490
721
|
else if (r === void 0)
|
|
491
722
|
t.Animations = n;
|
|
@@ -495,167 +726,175 @@ ${e.slice(
|
|
|
495
726
|
} catch {
|
|
496
727
|
return e;
|
|
497
728
|
}
|
|
498
|
-
}, "applyTreeGridJsonDisabledAnimationsLayout"),
|
|
499
|
-
const t =
|
|
729
|
+
}, "applyTreeGridJsonDisabledAnimationsLayout"), fr = /* @__PURE__ */ i((e) => X("<Animations />", e), "createTreeGridDisabledAnimationsTag"), ar = /* @__PURE__ */ i((e, n) => {
|
|
730
|
+
const t = L(e);
|
|
500
731
|
if (t.gridOpenTagEndIndex === void 0)
|
|
501
732
|
return e;
|
|
502
733
|
const r = t.animationsTag;
|
|
503
734
|
if (r) {
|
|
504
|
-
const c =
|
|
735
|
+
const c = X(r.tag, n);
|
|
505
736
|
return c === r.tag ? e : `${e.slice(0, r.index)}${c}${e.slice(
|
|
506
737
|
r.index + r.tag.length
|
|
507
738
|
)}`;
|
|
508
739
|
}
|
|
509
|
-
const
|
|
510
|
-
return `${e.slice(0,
|
|
511
|
-
${
|
|
740
|
+
const s = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
|
|
741
|
+
return `${e.slice(0, s)}
|
|
742
|
+
${fr(
|
|
512
743
|
n
|
|
513
|
-
)}${e.slice(
|
|
514
|
-
}, "applyTreeGridXmlDisabledAnimationsLayout"),
|
|
515
|
-
const t =
|
|
744
|
+
)}${e.slice(s)}`;
|
|
745
|
+
}, "applyTreeGridXmlDisabledAnimationsLayout"), Me = /* @__PURE__ */ i((e, n) => {
|
|
746
|
+
const t = dr(n);
|
|
516
747
|
if (!Object.keys(t).length)
|
|
517
748
|
return e;
|
|
518
749
|
const r = e.trim();
|
|
519
|
-
return r ? r.startsWith("{") ?
|
|
520
|
-
}, "applyTreeGridDisabledAnimationsLayout"),
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
xt(
|
|
750
|
+
return r ? r.startsWith("{") ? ur(e, t) : ar(e, t) : e;
|
|
751
|
+
}, "applyTreeGridDisabledAnimationsLayout"), ce = /* @__PURE__ */ i((e, n, t, r) => {
|
|
752
|
+
const s = rr(
|
|
753
|
+
Ht(
|
|
754
|
+
Ot(
|
|
755
|
+
xt(
|
|
756
|
+
Xt(
|
|
757
|
+
Zt(e, r)
|
|
758
|
+
)
|
|
759
|
+
)
|
|
525
760
|
)
|
|
526
761
|
),
|
|
527
762
|
t
|
|
528
|
-
), c =
|
|
763
|
+
), c = s.trim();
|
|
529
764
|
if (!c || c.startsWith("{"))
|
|
530
|
-
return
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
765
|
+
return Me(
|
|
766
|
+
ke(
|
|
767
|
+
Ue(
|
|
768
|
+
Be(
|
|
769
|
+
Fe(s)
|
|
770
|
+
)
|
|
534
771
|
)
|
|
535
772
|
),
|
|
536
773
|
n
|
|
537
774
|
);
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
), T =
|
|
542
|
-
|
|
775
|
+
const f = L(s), a = Fe(
|
|
776
|
+
s,
|
|
777
|
+
f
|
|
778
|
+
), T = a === s ? f : L(a), G = Be(
|
|
779
|
+
a,
|
|
543
780
|
T
|
|
544
|
-
),
|
|
545
|
-
return
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
781
|
+
), R = G === a ? T : L(G);
|
|
782
|
+
return Me(
|
|
783
|
+
ke(
|
|
784
|
+
Pt(
|
|
785
|
+
Ue(
|
|
786
|
+
G,
|
|
787
|
+
R
|
|
788
|
+
),
|
|
789
|
+
R
|
|
790
|
+
)
|
|
552
791
|
),
|
|
553
792
|
n
|
|
554
793
|
);
|
|
555
|
-
}, "applyTreeGridDefaultLayout"),
|
|
794
|
+
}, "applyTreeGridDefaultLayout"), Tr = /* @__PURE__ */ i((e) => {
|
|
556
795
|
var n;
|
|
557
|
-
return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${
|
|
558
|
-
}, "getTreeGridWrapperElement"),
|
|
559
|
-
if (
|
|
796
|
+
return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${Vn}`)) ?? null;
|
|
797
|
+
}, "getTreeGridWrapperElement"), Er = /* @__PURE__ */ i((e) => {
|
|
798
|
+
if (ie(e.AllSelected))
|
|
560
799
|
return "checked";
|
|
561
|
-
if (
|
|
800
|
+
if (P(e.AllSelected))
|
|
562
801
|
return "unchecked";
|
|
563
802
|
let n = 0, t = 0;
|
|
564
|
-
return
|
|
565
|
-
!A(r) ||
|
|
803
|
+
return J(e).forEach((r) => {
|
|
804
|
+
!A(r) || P(r.CanSelect) || (n += 1, ie(e.IsSelected(r)) && (t += 1));
|
|
566
805
|
}), t ? n > 0 && t >= n ? "checked" : "indeterminate" : "unchecked";
|
|
567
|
-
}, "getTreeGridSelectAllState"),
|
|
568
|
-
const t =
|
|
806
|
+
}, "getTreeGridSelectAllState"), le = /* @__PURE__ */ i((e, n) => {
|
|
807
|
+
const t = Tr(n), r = !P(e.Selecting), s = pe(
|
|
569
808
|
e.Selecting,
|
|
570
809
|
e.SelectingSingle
|
|
571
810
|
), c = e.Header;
|
|
572
811
|
if (t == null || t.classList.toggle(
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
), !
|
|
812
|
+
Mn,
|
|
813
|
+
s
|
|
814
|
+
), !s)
|
|
576
815
|
t == null || t.classList.remove(
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
816
|
+
be,
|
|
817
|
+
Ie,
|
|
818
|
+
we
|
|
580
819
|
);
|
|
581
820
|
else {
|
|
582
|
-
const
|
|
821
|
+
const f = Er(e);
|
|
583
822
|
t == null || t.classList.toggle(
|
|
584
|
-
|
|
585
|
-
|
|
823
|
+
be,
|
|
824
|
+
f === "checked"
|
|
586
825
|
), t == null || t.classList.toggle(
|
|
587
|
-
|
|
588
|
-
|
|
826
|
+
Ie,
|
|
827
|
+
f === "indeterminate"
|
|
589
828
|
), t == null || t.classList.toggle(
|
|
590
|
-
|
|
591
|
-
|
|
829
|
+
we,
|
|
830
|
+
f === "unchecked"
|
|
592
831
|
);
|
|
593
832
|
}
|
|
594
|
-
c && r && (c.CanSelect =
|
|
595
|
-
}, "syncTreeGridSelectionPanelState"),
|
|
833
|
+
c && r && (c.CanSelect = s ? 1 : 0);
|
|
834
|
+
}, "syncTreeGridSelectionPanelState"), ne = /* @__PURE__ */ new Map(), Ve = /* @__PURE__ */ i((e, n) => {
|
|
596
835
|
if (typeof window > "u")
|
|
597
836
|
return;
|
|
598
|
-
const t =
|
|
837
|
+
const t = ne.get(n);
|
|
599
838
|
t !== void 0 && window.clearTimeout(t);
|
|
600
839
|
const r = window.setTimeout(() => {
|
|
601
|
-
|
|
840
|
+
ne.delete(n), le(e, n);
|
|
602
841
|
}, 0);
|
|
603
|
-
|
|
604
|
-
}, "scheduleTreeGridSelectionPanelStateSync"),
|
|
842
|
+
ne.set(n, r);
|
|
843
|
+
}, "scheduleTreeGridSelectionPanelStateSync"), pr = /* @__PURE__ */ i((e, n) => {
|
|
605
844
|
e.EnterMode = n;
|
|
606
|
-
const t =
|
|
845
|
+
const t = Zn[n];
|
|
607
846
|
if (!t)
|
|
608
847
|
return;
|
|
609
848
|
const r = e;
|
|
610
849
|
r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = t.onEnter, r.Actions.OnEnterEdit = t.onEnterEdit;
|
|
611
|
-
}, "applyTreeGridDefaultEnterMode"),
|
|
850
|
+
}, "applyTreeGridDefaultEnterMode"), Sn = /* @__PURE__ */ i((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), Xe = /* @__PURE__ */ new Map(), Cr = /* @__PURE__ */ i((e) => {
|
|
612
851
|
if (!e || !e.startsWith("data:"))
|
|
613
852
|
return e;
|
|
614
|
-
const n =
|
|
853
|
+
const n = Xe.get(e);
|
|
615
854
|
if (n)
|
|
616
855
|
return n;
|
|
617
856
|
try {
|
|
618
|
-
const [t, r = ""] = e.split(",", 2),
|
|
619
|
-
for (let G = 0; G <
|
|
620
|
-
|
|
621
|
-
const T = URL.createObjectURL(new Blob([
|
|
622
|
-
return
|
|
857
|
+
const [t, r = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(t), c = (s == null ? void 0 : s[1]) || "application/octet-stream", f = s != null && s[2] ? atob(r) : decodeURIComponent(r), a = new Uint8Array(f.length);
|
|
858
|
+
for (let G = 0; G < f.length; G += 1)
|
|
859
|
+
a[G] = f.charCodeAt(G);
|
|
860
|
+
const T = URL.createObjectURL(new Blob([a], { type: c }));
|
|
861
|
+
return Xe.set(e, T), T;
|
|
623
862
|
} catch {
|
|
624
863
|
return e;
|
|
625
864
|
}
|
|
626
|
-
}, "resolveTreeGridInlineUrl"),
|
|
627
|
-
if (!e ||
|
|
628
|
-
return
|
|
629
|
-
const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""],
|
|
630
|
-
return `${t}${
|
|
631
|
-
}, "appendNoCacheQuery"),
|
|
865
|
+
}, "resolveTreeGridInlineUrl"), de = /* @__PURE__ */ i((e) => {
|
|
866
|
+
if (!e || Sn(e))
|
|
867
|
+
return Cr(e);
|
|
868
|
+
const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""], s = t.includes("?") ? "&" : "?";
|
|
869
|
+
return `${t}${s}noCache=${Date.now()}${r}`;
|
|
870
|
+
}, "appendNoCacheQuery"), Je = /* @__PURE__ */ i((e, n, t) => {
|
|
632
871
|
if (!e)
|
|
633
872
|
return;
|
|
634
|
-
const r = t.canEdit,
|
|
635
|
-
if (!(r === void 0 && c === void 0 && !
|
|
873
|
+
const r = t.canEdit, s = t.editableColumns ?? [], c = t.editableCanEdit, f = t.highlightColumns ?? [], a = t.highlightBackgroundColor;
|
|
874
|
+
if (!(r === void 0 && c === void 0 && !f.length)) {
|
|
636
875
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
637
876
|
try {
|
|
638
877
|
if (r !== void 0 && (n.CanEdit = r), c !== void 0) {
|
|
639
878
|
const T = n;
|
|
640
|
-
|
|
641
|
-
var
|
|
642
|
-
!G || !((
|
|
879
|
+
s.forEach((G) => {
|
|
880
|
+
var R;
|
|
881
|
+
!G || !((R = e.Cols) != null && R[G]) || (T[`${G}CanEdit`] = c);
|
|
643
882
|
});
|
|
644
883
|
}
|
|
645
|
-
|
|
884
|
+
f.forEach((T) => {
|
|
646
885
|
T && (e.SetValue(
|
|
647
886
|
n,
|
|
648
887
|
`${T}Class`,
|
|
649
|
-
|
|
888
|
+
a ? Ye : "",
|
|
650
889
|
0
|
|
651
|
-
), e.SetValue(n, `${T}Color`,
|
|
890
|
+
), e.SetValue(n, `${T}Color`, a ?? "", 0));
|
|
652
891
|
});
|
|
653
892
|
} finally {
|
|
654
893
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
655
894
|
}
|
|
656
895
|
typeof e.RefreshRow == "function" && e.RefreshRow(n);
|
|
657
896
|
}
|
|
658
|
-
}, "syncTreeGridDeletedRowState"),
|
|
897
|
+
}, "syncTreeGridDeletedRowState"), Sr = /* @__PURE__ */ i((e) => e ? Sn(e) || e.includes("assets") ? de(e) : de(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Gr = /* @__PURE__ */ i((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), Rr = /* @__PURE__ */ i((e, n, t, r) => {
|
|
659
898
|
if (!(!e || t === "cancel")) {
|
|
660
899
|
if (t === "remove") {
|
|
661
900
|
e.RemoveRow(n), r(e);
|
|
@@ -663,37 +902,37 @@ ${e.slice(
|
|
|
663
902
|
}
|
|
664
903
|
e.DeleteRowT(n, 3);
|
|
665
904
|
}
|
|
666
|
-
}, "applyTreeGridBeforeRowUndeleteAction"),
|
|
905
|
+
}, "applyTreeGridBeforeRowUndeleteAction"), gr = /* @__PURE__ */ i((e, n, t) => e ? { Url: Sr(n) } : { Data: { Body: [Hn(t) ? [] : t] } }, "buildTreeGridDataSource"), fi = /* @__PURE__ */ i(({
|
|
667
906
|
id: e,
|
|
668
907
|
layoutUrl: n,
|
|
669
908
|
layoutData: t,
|
|
670
909
|
toolbarTotalCountFormula: r,
|
|
671
|
-
suppressCfg:
|
|
910
|
+
suppressCfg: s,
|
|
672
911
|
disabledAnimations: c,
|
|
673
|
-
dataUrl:
|
|
674
|
-
bodyData:
|
|
912
|
+
dataUrl: f,
|
|
913
|
+
bodyData: a,
|
|
675
914
|
useDataUrl: T,
|
|
676
915
|
width: G,
|
|
677
|
-
height:
|
|
678
|
-
languageId:
|
|
916
|
+
height: R,
|
|
917
|
+
languageId: h
|
|
679
918
|
}) => ({
|
|
680
919
|
id: e,
|
|
681
920
|
Layout: t ? {
|
|
682
|
-
Data:
|
|
921
|
+
Data: ce(
|
|
683
922
|
t,
|
|
684
923
|
c,
|
|
685
924
|
r,
|
|
686
|
-
|
|
925
|
+
s
|
|
687
926
|
)
|
|
688
|
-
} : { Url:
|
|
689
|
-
Data:
|
|
927
|
+
} : { Url: de(n ?? "") },
|
|
928
|
+
Data: gr(T, f, a),
|
|
690
929
|
Text: {
|
|
691
|
-
Url:
|
|
930
|
+
Url: Pn(h)
|
|
692
931
|
},
|
|
693
932
|
width: G,
|
|
694
|
-
height:
|
|
933
|
+
height: R,
|
|
695
934
|
Debug: "Error"
|
|
696
|
-
}), "buildTreeGridInitializationOptions"),
|
|
935
|
+
}), "buildTreeGridInitializationOptions"), We = /* @__PURE__ */ i((e) => zn(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), je = /* @__PURE__ */ i((e) => {
|
|
697
936
|
if (typeof e == "number")
|
|
698
937
|
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
699
938
|
if (typeof e != "string")
|
|
@@ -703,109 +942,109 @@ ${e.slice(
|
|
|
703
942
|
return;
|
|
704
943
|
const t = Number(n);
|
|
705
944
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
706
|
-
}, "parseTreeGridPositiveNumber"),
|
|
945
|
+
}, "parseTreeGridPositiveNumber"), ue = /* @__PURE__ */ i((e, n, t, r) => {
|
|
707
946
|
if (!n || !t)
|
|
708
947
|
return;
|
|
709
|
-
const
|
|
710
|
-
return c !== void 0 ? c :
|
|
948
|
+
const s = e.GetAttribute(n, t, r), c = je(s);
|
|
949
|
+
return c !== void 0 ? c : je(
|
|
711
950
|
n[`${t}${r}`]
|
|
712
951
|
);
|
|
713
|
-
}, "getTreeGridHeaderCellSpanAttribute"),
|
|
952
|
+
}, "getTreeGridHeaderCellSpanAttribute"), hr = /* @__PURE__ */ i((e, n, t) => !n || !t || n.Fixed !== "Head" || (ue(e, n, t, "Span") ?? 1) <= 1 ? !1 : (ue(e, n, t, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), Ke = /* @__PURE__ */ i((e, n, t) => {
|
|
714
953
|
const r = e.get(n);
|
|
715
954
|
if (r) {
|
|
716
955
|
r.add(t);
|
|
717
956
|
return;
|
|
718
957
|
}
|
|
719
958
|
e.set(n, /* @__PURE__ */ new Set([t]));
|
|
720
|
-
}, "addTreeGridHeaderButtonAttributeTarget"),
|
|
721
|
-
const
|
|
722
|
-
return n.forEach((c,
|
|
723
|
-
t.forEach((
|
|
724
|
-
if (!
|
|
959
|
+
}, "addTreeGridHeaderButtonAttributeTarget"), Gn = /* @__PURE__ */ i((e, n, t, r) => {
|
|
960
|
+
const s = /* @__PURE__ */ new Map();
|
|
961
|
+
return n.forEach((c, f) => {
|
|
962
|
+
t.forEach((a, T) => {
|
|
963
|
+
if (!hr(e, c, a) || (Ke(s, c, a), !r))
|
|
725
964
|
return;
|
|
726
|
-
const G = Math.floor(
|
|
727
|
-
for (let
|
|
728
|
-
const
|
|
729
|
-
for (let
|
|
730
|
-
|
|
965
|
+
const G = Math.floor(ue(e, c, a, "Span") ?? 1), R = Math.min(t.length, T + G);
|
|
966
|
+
for (let h = f + 1; h < n.length; h += 1) {
|
|
967
|
+
const _ = n[h];
|
|
968
|
+
for (let O = T; O < R; O += 1)
|
|
969
|
+
Ke(s, _, t[O]);
|
|
731
970
|
}
|
|
732
971
|
});
|
|
733
|
-
}),
|
|
734
|
-
}, "getTreeGridGroupHeaderSortButtonTargets"),
|
|
735
|
-
var
|
|
972
|
+
}), s;
|
|
973
|
+
}, "getTreeGridGroupHeaderSortButtonTargets"), Ar = /* @__PURE__ */ i((e, n, t, r) => {
|
|
974
|
+
var f;
|
|
736
975
|
if (!n || !t || n.Fixed !== "Head")
|
|
737
976
|
return !1;
|
|
738
|
-
const
|
|
739
|
-
return !
|
|
977
|
+
const s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((a) => a.Fixed === "Head") : [], c = typeof e.GetCols == "function" ? e.GetCols() : [];
|
|
978
|
+
return !s.length || !c.length ? !1 : ((f = Gn(
|
|
740
979
|
e,
|
|
741
|
-
|
|
980
|
+
s,
|
|
742
981
|
c,
|
|
743
982
|
r
|
|
744
|
-
).get(n)) == null ? void 0 :
|
|
745
|
-
}, "isTreeGridGroupHeaderSortButtonTarget"),
|
|
746
|
-
const
|
|
747
|
-
if (!c.length || !
|
|
983
|
+
).get(n)) == null ? void 0 : f.has(t)) === !0;
|
|
984
|
+
}, "isTreeGridGroupHeaderSortButtonTarget"), He = /* @__PURE__ */ i((e, n, t = !1, r = !0) => {
|
|
985
|
+
const s = typeof performance < "u" ? performance.now() : Date.now(), c = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((R) => R.Fixed === "Head") : [], f = typeof e.GetCols == "function" ? e.GetCols() : [];
|
|
986
|
+
if (!c.length || !f.length)
|
|
748
987
|
return;
|
|
749
|
-
const
|
|
988
|
+
const a = /* @__PURE__ */ new Set();
|
|
750
989
|
let T = 0;
|
|
751
|
-
const G =
|
|
990
|
+
const G = Gn(
|
|
752
991
|
e,
|
|
753
992
|
c,
|
|
754
|
-
|
|
993
|
+
f,
|
|
755
994
|
r
|
|
756
995
|
);
|
|
757
996
|
if (G.size) {
|
|
758
997
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
759
998
|
try {
|
|
760
|
-
G.forEach((
|
|
761
|
-
|
|
762
|
-
e.GetAttribute(
|
|
999
|
+
G.forEach((R, h) => {
|
|
1000
|
+
R.forEach((_) => {
|
|
1001
|
+
e.GetAttribute(h, _, $e) !== "" && (e.SetAttribute(h, _, $e, "", 0, 0), a.add(h), T += 1);
|
|
763
1002
|
});
|
|
764
1003
|
});
|
|
765
1004
|
} finally {
|
|
766
1005
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
767
1006
|
}
|
|
768
|
-
|
|
769
|
-
typeof e.RefreshRow == "function" && e.RefreshRow(
|
|
770
|
-
}),
|
|
1007
|
+
a.size && (t && a.forEach((R) => {
|
|
1008
|
+
typeof e.RefreshRow == "function" && e.RefreshRow(R);
|
|
1009
|
+
}), Qe(n, "group header button attribute apply"), en(n, "group header button attribute apply", s, {
|
|
771
1010
|
updatedCellCount: T,
|
|
772
|
-
updatedRowCount:
|
|
1011
|
+
updatedRowCount: a.size
|
|
773
1012
|
}));
|
|
774
1013
|
}
|
|
775
|
-
}, "applyTreeGridGroupHeaderSortButtonAttributes"),
|
|
1014
|
+
}, "applyTreeGridGroupHeaderSortButtonAttributes"), mr = /* @__PURE__ */ i((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), _r = /* @__PURE__ */ i((e) => {
|
|
776
1015
|
const n = e == null ? void 0 : e.Visible;
|
|
777
1016
|
return !!e && n !== 0 && n !== !1 && n !== "0";
|
|
778
|
-
}, "isVisibleTreeGridRow"),
|
|
1017
|
+
}, "isVisibleTreeGridRow"), v = /* @__PURE__ */ i((e) => {
|
|
779
1018
|
const n = e == null ? void 0 : e.Added;
|
|
780
1019
|
return !!e && n !== 0 && n !== !1 && n !== "0" && n !== void 0;
|
|
781
|
-
}, "isAddedTreeGridRow"),
|
|
1020
|
+
}, "isAddedTreeGridRow"), Rn = /* @__PURE__ */ i((e) => {
|
|
782
1021
|
const n = e == null ? void 0 : e.Deleted;
|
|
783
1022
|
return !!e && n !== 0 && n !== !1 && n !== "0" && n !== void 0;
|
|
784
|
-
}, "isDeletedTreeGridRow"), A = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !
|
|
1023
|
+
}, "isDeletedTreeGridRow"), A = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !_r(e) ? !1 : e.Kind === "Data" || v(e), "isDisplayTreeGridRow"), q = /* @__PURE__ */ i((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), Lr = /* @__PURE__ */ i((e, n) => {
|
|
785
1024
|
var r;
|
|
786
1025
|
const t = (r = e.Cols) == null ? void 0 : r[n];
|
|
787
|
-
return !!t && !
|
|
788
|
-
}, "isVisibleTreeGridColumn"),
|
|
789
|
-
const n =
|
|
1026
|
+
return !!t && !P(t.Visible) && !St(t.Hidden);
|
|
1027
|
+
}, "isVisibleTreeGridColumn"), K = /* @__PURE__ */ i((e, n) => typeof e == "number" && Number.isFinite(e) ? e : n, "resolveTreeGridColumnOrderValue"), Or = /* @__PURE__ */ i((e) => {
|
|
1028
|
+
const n = re.get(e);
|
|
790
1029
|
if (n)
|
|
791
1030
|
return n;
|
|
792
1031
|
const t = new Map(
|
|
793
|
-
|
|
1032
|
+
q(e).map((c, f) => [c, f])
|
|
794
1033
|
), r = [...t.keys()].filter(
|
|
795
|
-
(c) => !
|
|
796
|
-
).sort((c,
|
|
797
|
-
var
|
|
798
|
-
const
|
|
799
|
-
return
|
|
800
|
-
}),
|
|
1034
|
+
(c) => !st.has(c) && Lr(e, c)
|
|
1035
|
+
).sort((c, f) => {
|
|
1036
|
+
var O, y;
|
|
1037
|
+
const a = (O = e.Cols) == null ? void 0 : O[c], T = (y = e.Cols) == null ? void 0 : y[f], G = t.get(c) ?? 0, R = t.get(f) ?? 0, h = K(a == null ? void 0 : a.Sec, G) - K(T == null ? void 0 : T.Sec, R);
|
|
1038
|
+
return h !== 0 ? h : K(a == null ? void 0 : a.Pos, G) - K(T == null ? void 0 : T.Pos, R) || G - R;
|
|
1039
|
+
}), s = {
|
|
801
1040
|
columnSet: new Set(r),
|
|
802
1041
|
firstColumn: r[0],
|
|
803
1042
|
lastColumn: r[r.length - 1]
|
|
804
1043
|
};
|
|
805
|
-
return
|
|
806
|
-
}, "getTreeGridAddedRowBoxColumnBounds"),
|
|
807
|
-
e &&
|
|
808
|
-
}, "clearTreeGridAddedRowBoxColumnBounds"),
|
|
1044
|
+
return re.set(e, s), s;
|
|
1045
|
+
}, "getTreeGridAddedRowBoxColumnBounds"), F = /* @__PURE__ */ i((e) => {
|
|
1046
|
+
e && re.delete(e);
|
|
1047
|
+
}, "clearTreeGridAddedRowBoxColumnBounds"), J = /* @__PURE__ */ i((e) => {
|
|
809
1048
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
810
1049
|
const n = [];
|
|
811
1050
|
let t = e.GetFirst();
|
|
@@ -814,155 +1053,155 @@ ${e.slice(
|
|
|
814
1053
|
return n;
|
|
815
1054
|
}
|
|
816
1055
|
return Object.values(e.Rows ?? {});
|
|
817
|
-
}, "getTreeGridRows"),
|
|
818
|
-
e &&
|
|
819
|
-
}, "clearTreeGridSelectionRowSpanAnchorRowMap"),
|
|
820
|
-
const t = e, r = t == null ? void 0 : t[`${n}RowSpan`],
|
|
821
|
-
return Number.isFinite(
|
|
822
|
-
}, "getTreeGridRowSpanCount"),
|
|
1056
|
+
}, "getTreeGridRows"), fe = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ i((e) => {
|
|
1057
|
+
e && fe.delete(e);
|
|
1058
|
+
}, "clearTreeGridSelectionRowSpanAnchorRowMap"), gn = /* @__PURE__ */ i((e, n) => {
|
|
1059
|
+
const t = e, r = t == null ? void 0 : t[`${n}RowSpan`], s = typeof r == "number" ? r : Number.parseFloat(String(r ?? ""));
|
|
1060
|
+
return Number.isFinite(s) && s > 1 ? Math.floor(s) : 1;
|
|
1061
|
+
}, "getTreeGridRowSpanCount"), xr = /* @__PURE__ */ i((e) => {
|
|
823
1062
|
const n = /* @__PURE__ */ new WeakMap();
|
|
824
1063
|
let t = null, r = -1;
|
|
825
|
-
return
|
|
826
|
-
if (!A(
|
|
827
|
-
n.set(
|
|
1064
|
+
return J(e).forEach((s, c) => {
|
|
1065
|
+
if (!A(s)) {
|
|
1066
|
+
n.set(s, null);
|
|
828
1067
|
return;
|
|
829
1068
|
}
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
832
|
-
t =
|
|
1069
|
+
const f = gn(s, nn);
|
|
1070
|
+
if (f > 1) {
|
|
1071
|
+
t = s, r = c + f - 1, n.set(s, s);
|
|
833
1072
|
return;
|
|
834
1073
|
}
|
|
835
|
-
n.set(
|
|
1074
|
+
n.set(s, t && c <= r ? t : null), c >= r && (t = null, r = -1);
|
|
836
1075
|
}), n;
|
|
837
|
-
}, "createTreeGridSelectionRowSpanAnchorRowMap"),
|
|
1076
|
+
}, "createTreeGridSelectionRowSpanAnchorRowMap"), Ce = /* @__PURE__ */ i((e, n) => {
|
|
838
1077
|
if (!n || !A(n))
|
|
839
1078
|
return null;
|
|
840
|
-
let t =
|
|
841
|
-
return t != null && t.has(n) || (t =
|
|
842
|
-
}, "getTreeGridSelectionRowSpanAnchorRow"),
|
|
843
|
-
const t =
|
|
1079
|
+
let t = fe.get(e);
|
|
1080
|
+
return t != null && t.has(n) || (t = xr(e), fe.set(e, t)), t.get(n) ?? null;
|
|
1081
|
+
}, "getTreeGridSelectionRowSpanAnchorRow"), hn = /* @__PURE__ */ i((e, n) => {
|
|
1082
|
+
const t = Ce(e, n);
|
|
844
1083
|
if (!t)
|
|
845
1084
|
return [];
|
|
846
|
-
const r =
|
|
1085
|
+
const r = gn(t, nn), s = [];
|
|
847
1086
|
let c = t;
|
|
848
|
-
for (let
|
|
849
|
-
A(c) &&
|
|
850
|
-
return
|
|
851
|
-
}, "getTreeGridSelectionRowSpanRows"),
|
|
1087
|
+
for (let f = 0; c && f < r; f += 1)
|
|
1088
|
+
A(c) && s.push(c), c = typeof e.GetNext == "function" ? e.GetNext(c) : null;
|
|
1089
|
+
return s;
|
|
1090
|
+
}, "getTreeGridSelectionRowSpanRows"), br = /* @__PURE__ */ i((e) => {
|
|
852
1091
|
const n = /* @__PURE__ */ new Set();
|
|
853
1092
|
return (e.GetSelRows() ?? []).forEach((t) => {
|
|
854
|
-
|
|
1093
|
+
hn(e, t).forEach((r) => {
|
|
855
1094
|
n.add(r);
|
|
856
1095
|
});
|
|
857
1096
|
}), [...n];
|
|
858
|
-
}, "getTreeGridSelectedRowSpanRows"),
|
|
1097
|
+
}, "getTreeGridSelectedRowSpanRows"), Ir = /* @__PURE__ */ i((e, n) => {
|
|
859
1098
|
if (!e)
|
|
860
1099
|
return;
|
|
861
|
-
const t =
|
|
862
|
-
|
|
1100
|
+
const t = q(e);
|
|
1101
|
+
J(e).forEach((r) => {
|
|
863
1102
|
A(r) && n.set(
|
|
864
1103
|
r,
|
|
865
|
-
new Map(t.map((
|
|
1104
|
+
new Map(t.map((s) => [s, Ee(e, r, s)]))
|
|
866
1105
|
);
|
|
867
1106
|
});
|
|
868
|
-
}, "captureTreeGridChangeBaselines"),
|
|
1107
|
+
}, "captureTreeGridChangeBaselines"), ae = /* @__PURE__ */ i((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), wr = /* @__PURE__ */ i((e, n, t) => {
|
|
869
1108
|
const r = n;
|
|
870
|
-
return
|
|
871
|
-
}, "hasOtherTreeGridChangedCells"),
|
|
1109
|
+
return q(e).some((s) => s !== t && ae(r[`${s}Changed`]));
|
|
1110
|
+
}, "hasOtherTreeGridChangedCells"), An = /* @__PURE__ */ i((e, n, t) => {
|
|
872
1111
|
const r = n;
|
|
873
|
-
r[`${t}Changed`] = 0, !
|
|
874
|
-
}, "clearTreeGridCellChangedState"),
|
|
1112
|
+
r[`${t}Changed`] = 0, !v(n) && !w(n) && !wr(e, n, t) && (r.Changed = 0);
|
|
1113
|
+
}, "clearTreeGridCellChangedState"), yr = /* @__PURE__ */ i((e, n, t) => {
|
|
875
1114
|
const r = e.get(n);
|
|
876
1115
|
if (r != null && r.has(t))
|
|
877
1116
|
return r.get(t);
|
|
878
|
-
}, "resolveTreeGridCellBaselineValue"),
|
|
1117
|
+
}, "resolveTreeGridCellBaselineValue"), $r = /* @__PURE__ */ i(({
|
|
879
1118
|
gridId: e,
|
|
880
1119
|
grid: n,
|
|
881
1120
|
row: t,
|
|
882
1121
|
col: r,
|
|
883
|
-
backgroundColor:
|
|
1122
|
+
backgroundColor: s,
|
|
884
1123
|
highlightRefresh: c
|
|
885
1124
|
}) => {
|
|
886
|
-
if (!
|
|
1125
|
+
if (!v(t) && !w(t))
|
|
887
1126
|
return !1;
|
|
888
1127
|
if (n.CanEdit(t, r) !== 1)
|
|
889
1128
|
return !0;
|
|
890
|
-
const
|
|
891
|
-
return
|
|
1129
|
+
const f = Bn(t, r), a = te(t).includes(r);
|
|
1130
|
+
return f === void 0 ? !0 : Ee(n, t, r) === f ? (Fn(t, r), a && Ze(e, { row: t, col: r }), An(n, t, r), !0) : (Nn(t, r), qe(e, {
|
|
892
1131
|
row: t,
|
|
893
1132
|
col: r,
|
|
894
|
-
backgroundColor:
|
|
1133
|
+
backgroundColor: s,
|
|
895
1134
|
refresh: c
|
|
896
1135
|
}), !0);
|
|
897
|
-
}, "syncTreeGridAddedRowChangedCellHighlight"),
|
|
1136
|
+
}, "syncTreeGridAddedRowChangedCellHighlight"), Pr = /* @__PURE__ */ i(({
|
|
898
1137
|
gridId: e,
|
|
899
1138
|
grid: n,
|
|
900
1139
|
row: t,
|
|
901
1140
|
col: r,
|
|
902
|
-
backgroundColor:
|
|
1141
|
+
backgroundColor: s,
|
|
903
1142
|
baselineMap: c,
|
|
904
|
-
highlightRefresh:
|
|
1143
|
+
highlightRefresh: f
|
|
905
1144
|
}) => {
|
|
906
|
-
if (!A(t) ||
|
|
1145
|
+
if (!A(t) || $r({
|
|
907
1146
|
gridId: e,
|
|
908
1147
|
grid: n,
|
|
909
1148
|
row: t,
|
|
910
1149
|
col: r,
|
|
911
|
-
backgroundColor:
|
|
912
|
-
highlightRefresh:
|
|
1150
|
+
backgroundColor: s,
|
|
1151
|
+
highlightRefresh: f
|
|
913
1152
|
}))
|
|
914
1153
|
return;
|
|
915
|
-
const
|
|
916
|
-
if (
|
|
917
|
-
|
|
1154
|
+
const a = yr(c, t, r), T = Ee(n, t, r);
|
|
1155
|
+
if (a !== void 0 && T === a) {
|
|
1156
|
+
Ze(e, { row: t, col: r }), An(n, t, r);
|
|
918
1157
|
return;
|
|
919
1158
|
}
|
|
920
|
-
|
|
1159
|
+
qe(e, {
|
|
921
1160
|
row: t,
|
|
922
1161
|
col: r,
|
|
923
|
-
backgroundColor:
|
|
924
|
-
refresh:
|
|
1162
|
+
backgroundColor: s,
|
|
1163
|
+
refresh: f
|
|
925
1164
|
});
|
|
926
|
-
}, "syncTreeGridChangedCellHighlight"),
|
|
1165
|
+
}, "syncTreeGridChangedCellHighlight"), Dr = /* @__PURE__ */ i((e, n, t) => !n || !t || !A(n) ? !1 : e.CanEdit(n, t) === 1, "isEditableTreeGridCell"), mn = /* @__PURE__ */ i((e, n, t) => {
|
|
927
1166
|
const r = e.GetAttribute(n, t, "Color");
|
|
928
1167
|
if (typeof r == "number")
|
|
929
|
-
return
|
|
1168
|
+
return Ln(r);
|
|
930
1169
|
if (typeof r == "string")
|
|
931
1170
|
return r.trim() || void 0;
|
|
932
|
-
}, "getExplicitTreeGridCellColor"),
|
|
1171
|
+
}, "getExplicitTreeGridCellColor"), vr = /* @__PURE__ */ i((e, n, t) => mn(e, n, t) !== void 0, "hasExplicitTreeGridCellColor"), Se = /* @__PURE__ */ i((e, n, t) => {
|
|
933
1172
|
if (!n || !t || !A(n))
|
|
934
1173
|
return !1;
|
|
935
1174
|
const r = typeof e.IsFocused == "function" ? e.IsFocused(n, t) : e.FRow === n && e.FCol === t;
|
|
936
1175
|
return r !== 0 && r !== !1 && r !== void 0 && r !== null;
|
|
937
|
-
}, "isTreeGridFocusedCellState"),
|
|
1176
|
+
}, "isTreeGridFocusedCellState"), W = /* @__PURE__ */ i((e, n, t) => {
|
|
938
1177
|
if (!n || !t || !A(n))
|
|
939
1178
|
return !1;
|
|
940
1179
|
const r = e.IsSelected(n, t);
|
|
941
1180
|
if (r !== 0 && r !== !1 && r !== void 0 && r !== null)
|
|
942
1181
|
return !0;
|
|
943
|
-
const
|
|
944
|
-
if (!
|
|
1182
|
+
const s = Ce(e, n);
|
|
1183
|
+
if (!s || s === n)
|
|
945
1184
|
return !1;
|
|
946
|
-
const c = e.IsSelected(
|
|
1185
|
+
const c = e.IsSelected(s, t);
|
|
947
1186
|
return c !== 0 && c !== !1 && c !== void 0 && c !== null;
|
|
948
|
-
}, "isTreeGridSelectedCellState"),
|
|
949
|
-
if (!
|
|
1187
|
+
}, "isTreeGridSelectedCellState"), Ge = /* @__PURE__ */ i((e) => {
|
|
1188
|
+
if (!Pe.length)
|
|
950
1189
|
return !1;
|
|
951
1190
|
const n = e.split(/\s+/).filter(Boolean);
|
|
952
|
-
return
|
|
1191
|
+
return Pe.every(
|
|
953
1192
|
(t) => n.includes(t)
|
|
954
1193
|
);
|
|
955
|
-
}, "hasTreeGridChangedCellDisplayClass"),
|
|
956
|
-
if (!(!e || e.split(/\s+/).includes(
|
|
957
|
-
return `${e} ${
|
|
958
|
-
}, "appendTreeGridSelectedChangedCellDisplayClass"),
|
|
959
|
-
if (!n || !
|
|
1194
|
+
}, "hasTreeGridChangedCellDisplayClass"), Br = /* @__PURE__ */ i((e) => {
|
|
1195
|
+
if (!(!e || e.split(/\s+/).includes(ye) || !Ge(e)))
|
|
1196
|
+
return `${e} ${ye}`;
|
|
1197
|
+
}, "appendTreeGridSelectedChangedCellDisplayClass"), Fr = /* @__PURE__ */ i((e) => !e || !A(e) ? !1 : Object.entries(e).some(([n, t]) => n.endsWith("Class") && typeof t == "string" && Ge(t)), "hasTreeGridChangedCellDisplayClassInRow"), Nr = /* @__PURE__ */ i((e, n) => {
|
|
1198
|
+
if (!n || !Fr(n) || typeof e.RefreshRow != "function")
|
|
960
1199
|
return;
|
|
961
1200
|
const t = n;
|
|
962
1201
|
window.setTimeout(() => {
|
|
963
1202
|
e.RefreshRow(t);
|
|
964
1203
|
}, 0);
|
|
965
|
-
}, "scheduleTreeGridSelectionChangedClassRefresh"),
|
|
1204
|
+
}, "scheduleTreeGridSelectionChangedClassRefresh"), j = /* @__PURE__ */ i((e, n) => {
|
|
966
1205
|
if (!n.length || typeof window > "u" || typeof e.RefreshRow != "function")
|
|
967
1206
|
return;
|
|
968
1207
|
const t = [...new Set(n)];
|
|
@@ -971,108 +1210,108 @@ ${e.slice(
|
|
|
971
1210
|
e.RefreshRow(r);
|
|
972
1211
|
});
|
|
973
1212
|
}, 0);
|
|
974
|
-
}, "scheduleTreeGridRowsRefresh"),
|
|
1213
|
+
}, "scheduleTreeGridRowsRefresh"), Ur = /* @__PURE__ */ i((e, n) => {
|
|
975
1214
|
if (!n)
|
|
976
1215
|
return;
|
|
977
|
-
const t =
|
|
978
|
-
t.length <= 1 ||
|
|
979
|
-
}, "scheduleTreeGridSelectionRowSpanRefresh"),
|
|
980
|
-
const n =
|
|
981
|
-
|
|
982
|
-
}, "scheduleTreeGridSelectionRowSpanRefreshAll"),
|
|
983
|
-
if (!(!n || r === void 0 || !
|
|
1216
|
+
const t = hn(e, n);
|
|
1217
|
+
t.length <= 1 || j(e, t);
|
|
1218
|
+
}, "scheduleTreeGridSelectionRowSpanRefresh"), kr = /* @__PURE__ */ i((e) => {
|
|
1219
|
+
const n = J(e).filter((t) => A(t) && Ce(e, t));
|
|
1220
|
+
j(e, n);
|
|
1221
|
+
}, "scheduleTreeGridSelectionRowSpanRefreshAll"), _n = /* @__PURE__ */ i((e, n, t, r) => {
|
|
1222
|
+
if (!(!n || r === void 0 || !Dr(e, n, t) || Se(e, n, t) || W(e, n, t) || vr(e, n, t)))
|
|
984
1223
|
return r;
|
|
985
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
986
|
-
(r) =>
|
|
987
|
-
), "isTreeGridNativeErrorBackgroundColor"),
|
|
1224
|
+
}, "getEditableTreeGridCellDefaultColor"), N = /* @__PURE__ */ i((e, n, t, r) => e === r[0] && n === r[1] && t === r[2], "matchesTreeGridRgbColor"), Mr = /* @__PURE__ */ i((e, n, t) => rt.some(
|
|
1225
|
+
(r) => N(e, n, t, r)
|
|
1226
|
+
), "isTreeGridNativeErrorBackgroundColor"), Ln = /* @__PURE__ */ i((e) => {
|
|
988
1227
|
if (!(e === void 0 || !Number.isFinite(e)))
|
|
989
1228
|
return `#${Math.trunc(e).toString(16).padStart(6, "0")}`;
|
|
990
|
-
}, "toTreeGridCssHexColor"),
|
|
1229
|
+
}, "toTreeGridCssHexColor"), Te = /* @__PURE__ */ i((e, n, t) => !n || !t || !A(n) ? "" : e.GetAttribute(n, t, "Error") ?? "", "getTreeGridCellError"), Re = /* @__PURE__ */ i((e, n, t) => Te(e, n, t) !== "", "hasTreeGridCellError"), Vr = /* @__PURE__ */ i((e, n) => {
|
|
991
1230
|
if (!n)
|
|
992
1231
|
return;
|
|
993
1232
|
let t = !1;
|
|
994
|
-
|
|
995
|
-
|
|
1233
|
+
q(e).forEach((r) => {
|
|
1234
|
+
Re(e, n, r) && (e.SetAttribute(n, r, "Error", "", 0), t = !0);
|
|
996
1235
|
}), t && e.RefreshRow(n);
|
|
997
|
-
}, "clearTreeGridRowErrors"),
|
|
1236
|
+
}, "clearTreeGridRowErrors"), Xr = /* @__PURE__ */ i((e) => {
|
|
998
1237
|
const n = e == null ? void 0 : e.target;
|
|
999
1238
|
if (typeof HTMLElement > "u" || typeof Element > "u" || typeof Node > "u")
|
|
1000
1239
|
return null;
|
|
1001
|
-
const t = n instanceof Element ? n : null, r = n instanceof Node ? n.parentElement : null,
|
|
1002
|
-
if (
|
|
1003
|
-
const c =
|
|
1004
|
-
return c instanceof HTMLElement ? c :
|
|
1240
|
+
const t = n instanceof Element ? n : null, r = n instanceof Node ? n.parentElement : null, s = t ?? r;
|
|
1241
|
+
if (s) {
|
|
1242
|
+
const c = s.closest("td,th");
|
|
1243
|
+
return c instanceof HTMLElement ? c : s instanceof HTMLElement ? s : null;
|
|
1005
1244
|
}
|
|
1006
1245
|
return null;
|
|
1007
|
-
}, "getTreeGridMouseEventAnchorElement"),
|
|
1246
|
+
}, "getTreeGridMouseEventAnchorElement"), Jr = /* @__PURE__ */ i((e, n) => {
|
|
1008
1247
|
if (!e || !n || !A(e))
|
|
1009
1248
|
return !1;
|
|
1010
|
-
const t = e, r = t[`${n}Class`],
|
|
1011
|
-
return
|
|
1012
|
-
}, "isChangedTreeGridRowOrCell"),
|
|
1249
|
+
const t = e, r = t[`${n}Class`], s = ae(t[`${n}Changed`]) || typeof r == "string" && Ge(r);
|
|
1250
|
+
return v(e) || w(e) ? s : s || ae(t.Changed);
|
|
1251
|
+
}, "isChangedTreeGridRowOrCell"), Wr = /* @__PURE__ */ i((e, n, t) => ot.has(e.GetType(n, t)), "isTreeGridNativeInputEditType"), jr = /* @__PURE__ */ i((e, n, t) => !n || !t || !A(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 0, "isTreeGridReadonlyHoveredCellState"), Kr = /* @__PURE__ */ i((e, n, t) => !n || !t || !A(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 2, "isTreeGridPreviewHoveredCellState"), Hr = /* @__PURE__ */ i((e, n) => !!n && A(n) && e.FRow === n, "isTreeGridFocusedRowState"), zr = /* @__PURE__ */ i(({
|
|
1013
1252
|
grid: e,
|
|
1014
1253
|
row: n,
|
|
1015
1254
|
col: t,
|
|
1016
1255
|
r,
|
|
1017
|
-
g:
|
|
1256
|
+
g: s,
|
|
1018
1257
|
b: c,
|
|
1019
|
-
focusedCellBackgroundColor:
|
|
1020
|
-
selectedCellBackgroundColor:
|
|
1258
|
+
focusedCellBackgroundColor: f,
|
|
1259
|
+
selectedCellBackgroundColor: a,
|
|
1021
1260
|
hoverCellBackgroundColor: T,
|
|
1022
1261
|
changedCellBackgroundColor: G,
|
|
1023
|
-
editableCellBackgroundColorValue:
|
|
1262
|
+
editableCellBackgroundColorValue: R
|
|
1024
1263
|
}) => {
|
|
1025
|
-
if (
|
|
1026
|
-
return a;
|
|
1027
|
-
if (V(e, n, t))
|
|
1264
|
+
if (Se(e, n, t))
|
|
1028
1265
|
return f;
|
|
1029
|
-
if (
|
|
1266
|
+
if (W(e, n, t))
|
|
1267
|
+
return a;
|
|
1268
|
+
if (jr(e, n, t) && (N(r, s, c, qn) || N(r, s, c, Qn)) || Kr(e, n, t) && (N(r, s, c, et) || N(r, s, c, nt) || N(r, s, c, tt)))
|
|
1030
1269
|
return T;
|
|
1031
|
-
if (
|
|
1270
|
+
if (Rn(n))
|
|
1032
1271
|
return;
|
|
1033
|
-
const
|
|
1034
|
-
if (!
|
|
1272
|
+
const h = v(n) || w(n), _ = Re(e, n, t) && Mr(r, s, c);
|
|
1273
|
+
if (!_ && !h)
|
|
1035
1274
|
return;
|
|
1036
|
-
const
|
|
1037
|
-
if (
|
|
1038
|
-
return
|
|
1039
|
-
if (
|
|
1275
|
+
const O = mn(e, n, t);
|
|
1276
|
+
if (_ && O)
|
|
1277
|
+
return O;
|
|
1278
|
+
if (Jr(n, t))
|
|
1040
1279
|
return G;
|
|
1041
|
-
const
|
|
1280
|
+
const y = _n(
|
|
1042
1281
|
e,
|
|
1043
1282
|
n,
|
|
1044
1283
|
t,
|
|
1045
|
-
|
|
1284
|
+
R
|
|
1046
1285
|
);
|
|
1047
|
-
return
|
|
1048
|
-
}, "resolveTreeGridStateBackgroundColor"),
|
|
1286
|
+
return y !== void 0 ? Ln(y) : h ? O ?? Dn : it;
|
|
1287
|
+
}, "resolveTreeGridStateBackgroundColor"), Y = /* @__PURE__ */ i((e, n) => {
|
|
1049
1288
|
const t = e.split(/\s+/).filter(Boolean);
|
|
1050
1289
|
return t.includes(n) ? e : [...t, n].join(" ");
|
|
1051
|
-
}, "appendTreeGridClassToken"),
|
|
1052
|
-
if (!A(n) ||
|
|
1290
|
+
}, "appendTreeGridClassToken"), Yr = /* @__PURE__ */ i((e, n, t, r) => !Re(e, n, t) || !n ? r : Y(r, Jn), "appendTreeGridErrorCellDisplayClass"), Zr = /* @__PURE__ */ i((e, n, t, r) => {
|
|
1291
|
+
if (!A(n) || Rn(n) || !v(n) && !w(n) || Hr(e, n) || W(e, n, t))
|
|
1053
1292
|
return r;
|
|
1054
|
-
const
|
|
1055
|
-
if (!
|
|
1293
|
+
const s = Or(e);
|
|
1294
|
+
if (!s.columnSet.has(t))
|
|
1056
1295
|
return r;
|
|
1057
|
-
let c =
|
|
1058
|
-
return t ===
|
|
1059
|
-
}, "appendTreeGridAddedRowBoxDisplayClass"),
|
|
1060
|
-
const
|
|
1296
|
+
let c = Y(r, Xn);
|
|
1297
|
+
return t === s.firstColumn && (c = Y(c, Wn)), t === s.lastColumn && (c = Y(c, jn)), c;
|
|
1298
|
+
}, "appendTreeGridAddedRowBoxDisplayClass"), qr = /* @__PURE__ */ i((e, n, t, r) => {
|
|
1299
|
+
const s = Yr(e, n, t, r), c = Zr(
|
|
1061
1300
|
e,
|
|
1062
1301
|
n,
|
|
1063
1302
|
t,
|
|
1064
|
-
|
|
1303
|
+
s
|
|
1065
1304
|
);
|
|
1066
|
-
if (!
|
|
1305
|
+
if (!W(e, n, t))
|
|
1067
1306
|
return c === r ? void 0 : c;
|
|
1068
|
-
const
|
|
1069
|
-
return
|
|
1070
|
-
}, "resolveTreeGridCellDisplayClass"),
|
|
1071
|
-
const t = n.filter(
|
|
1072
|
-
t.length &&
|
|
1073
|
-
}, "scheduleTreeGridAddedRowBoxRowsRefresh"),
|
|
1074
|
-
|
|
1075
|
-
}, "scheduleTreeGridAddedRowBoxRowsRefreshAll"),
|
|
1307
|
+
const f = Br(c) ?? c;
|
|
1308
|
+
return f === r ? void 0 : f;
|
|
1309
|
+
}, "resolveTreeGridCellDisplayClass"), On = /* @__PURE__ */ i((e) => A(e) && (v(e) || w(e)), "isTreeGridAddedRowBoxDisplayRow"), ze = /* @__PURE__ */ i((e, n) => {
|
|
1310
|
+
const t = n.filter(On);
|
|
1311
|
+
t.length && j(e, t);
|
|
1312
|
+
}, "scheduleTreeGridAddedRowBoxRowsRefresh"), Qr = /* @__PURE__ */ i((e) => {
|
|
1313
|
+
j(e, J(e).filter(On));
|
|
1314
|
+
}, "scheduleTreeGridAddedRowBoxRowsRefreshAll"), ai = /* @__PURE__ */ i((e) => {
|
|
1076
1315
|
if (!e)
|
|
1077
1316
|
return !1;
|
|
1078
1317
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
@@ -1085,318 +1324,318 @@ ${e.slice(
|
|
|
1085
1324
|
return !1;
|
|
1086
1325
|
}
|
|
1087
1326
|
return Object.values(e.Rows ?? {}).some((n) => A(n));
|
|
1088
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
1089
|
-
var
|
|
1090
|
-
|
|
1091
|
-
const r = (
|
|
1327
|
+
}, "hasTreeGridDisplayDataRows"), Ti = /* @__PURE__ */ i((e, n, t) => {
|
|
1328
|
+
var s;
|
|
1329
|
+
b(e);
|
|
1330
|
+
const r = (s = e.Data) == null ? void 0 : s.Data;
|
|
1092
1331
|
e.Data.Data = {
|
|
1093
1332
|
...r,
|
|
1094
1333
|
Data: { Body: [n || []] },
|
|
1095
1334
|
Url: ""
|
|
1096
1335
|
}, e.ReloadBody(t);
|
|
1097
|
-
}, "replaceTreeGridBodyData"),
|
|
1336
|
+
}, "replaceTreeGridBodyData"), Ei = /* @__PURE__ */ i(({
|
|
1098
1337
|
id: e,
|
|
1099
1338
|
latestEventHandlersRef: n,
|
|
1100
1339
|
layoutHasExplicitEnterModeRef: t,
|
|
1101
1340
|
highlightEditableCellsRef: r,
|
|
1102
|
-
highlightChangedCellsRef:
|
|
1341
|
+
highlightChangedCellsRef: s,
|
|
1103
1342
|
syncDeletedRowCanEditRef: c,
|
|
1104
|
-
editableCellBackgroundColorValueRef:
|
|
1105
|
-
changedCellBackgroundColorRef:
|
|
1343
|
+
editableCellBackgroundColorValueRef: f,
|
|
1344
|
+
changedCellBackgroundColorRef: a,
|
|
1106
1345
|
focusedCellBackgroundColorRef: T,
|
|
1107
1346
|
selectedCellBackgroundColorRef: G,
|
|
1108
|
-
hoverCellBackgroundColorRef:
|
|
1109
|
-
changedCellBaselineRef:
|
|
1110
|
-
treeGridInstanceRef:
|
|
1111
|
-
treeGridInitStartedAtRef:
|
|
1112
|
-
latestLayoutOverridesRef:
|
|
1113
|
-
latestToolbarTotalCountFormulaRef:
|
|
1114
|
-
latestSuppressCfgRef:
|
|
1115
|
-
latestHideChildHeaderSortButtonsRef:
|
|
1116
|
-
latestSelectionScopeRef:
|
|
1117
|
-
latestDisabledAnimationsRef:
|
|
1118
|
-
appliedLayoutOverridesRef:
|
|
1119
|
-
appliedBodyDataPropRef:
|
|
1120
|
-
hasAppliedInitialLayoutRef:
|
|
1121
|
-
syncHasDisplayDataRows:
|
|
1122
|
-
setIsTreeGridReady:
|
|
1123
|
-
showErrorTooltip:
|
|
1124
|
-
hideErrorTooltip:
|
|
1347
|
+
hoverCellBackgroundColorRef: R,
|
|
1348
|
+
changedCellBaselineRef: h,
|
|
1349
|
+
treeGridInstanceRef: _,
|
|
1350
|
+
treeGridInitStartedAtRef: O,
|
|
1351
|
+
latestLayoutOverridesRef: y,
|
|
1352
|
+
latestToolbarTotalCountFormulaRef: ge,
|
|
1353
|
+
latestSuppressCfgRef: he,
|
|
1354
|
+
latestHideChildHeaderSortButtonsRef: Q,
|
|
1355
|
+
latestSelectionScopeRef: xn,
|
|
1356
|
+
latestDisabledAnimationsRef: Ae,
|
|
1357
|
+
appliedLayoutOverridesRef: bn,
|
|
1358
|
+
appliedBodyDataPropRef: In,
|
|
1359
|
+
hasAppliedInitialLayoutRef: me,
|
|
1360
|
+
syncHasDisplayDataRows: B,
|
|
1361
|
+
setIsTreeGridReady: wn,
|
|
1362
|
+
showErrorTooltip: yn,
|
|
1363
|
+
hideErrorTooltip: $
|
|
1125
1364
|
}) => {
|
|
1126
|
-
const
|
|
1127
|
-
if (window.TGSetEvent("OnRowAdd", e, (
|
|
1365
|
+
const m = n.current;
|
|
1366
|
+
if (window.TGSetEvent("OnRowAdd", e, (o, l) => {
|
|
1128
1367
|
var d, u;
|
|
1129
|
-
|
|
1130
|
-
}), window.TGSetEvent("OnRowAdded", e, (
|
|
1131
|
-
|
|
1132
|
-
}), window.TGSetEvent("OnRowRemove", e, (
|
|
1133
|
-
|
|
1134
|
-
}), window.TGSetEvent("OnColShow", e, (
|
|
1135
|
-
|
|
1136
|
-
}), window.TGSetEvent("OnAfterColumnsChanged", e, (
|
|
1137
|
-
|
|
1138
|
-
}), window.TGSetEvent("OnColMove", e, (
|
|
1139
|
-
|
|
1140
|
-
}), window.TGSetEvent("OnColsAdd", e, (
|
|
1141
|
-
|
|
1142
|
-
}), window.TGSetEvent("OnColDelete", e, (
|
|
1143
|
-
|
|
1144
|
-
}), window.TGSetEvent("OnColUndelete", e, (
|
|
1145
|
-
|
|
1146
|
-
}), window.TGSetEvent("OnMouseOver", e, (
|
|
1147
|
-
const
|
|
1148
|
-
if (!
|
|
1149
|
-
|
|
1368
|
+
b(o), l.CanEdit = 1, l.CanDelete = 1, (u = (d = n.current) == null ? void 0 : d.onRowAdd) == null || u.call(d, o, l);
|
|
1369
|
+
}), window.TGSetEvent("OnRowAdded", e, (o) => {
|
|
1370
|
+
b(o), B(o);
|
|
1371
|
+
}), window.TGSetEvent("OnRowRemove", e, (o) => {
|
|
1372
|
+
b(o), $(), B(o);
|
|
1373
|
+
}), window.TGSetEvent("OnColShow", e, (o) => {
|
|
1374
|
+
F(o);
|
|
1375
|
+
}), window.TGSetEvent("OnAfterColumnsChanged", e, (o) => {
|
|
1376
|
+
F(o);
|
|
1377
|
+
}), window.TGSetEvent("OnColMove", e, (o) => {
|
|
1378
|
+
F(o);
|
|
1379
|
+
}), window.TGSetEvent("OnColsAdd", e, (o) => {
|
|
1380
|
+
F(o);
|
|
1381
|
+
}), window.TGSetEvent("OnColDelete", e, (o) => {
|
|
1382
|
+
F(o);
|
|
1383
|
+
}), window.TGSetEvent("OnColUndelete", e, (o) => {
|
|
1384
|
+
F(o);
|
|
1385
|
+
}), window.TGSetEvent("OnMouseOver", e, (o, l, d, u, E, C) => {
|
|
1386
|
+
const p = Te(o, l, d);
|
|
1387
|
+
if (!p) {
|
|
1388
|
+
$();
|
|
1150
1389
|
return;
|
|
1151
1390
|
}
|
|
1152
|
-
const
|
|
1153
|
-
if (!
|
|
1154
|
-
|
|
1391
|
+
const g = Xr(C);
|
|
1392
|
+
if (!g) {
|
|
1393
|
+
$();
|
|
1155
1394
|
return;
|
|
1156
1395
|
}
|
|
1157
|
-
|
|
1158
|
-
}), window.TGSetEvent("OnFocus", e, (
|
|
1159
|
-
l !== u &&
|
|
1160
|
-
}), window.TGSetEvent("OnTip", e, (
|
|
1161
|
-
var
|
|
1396
|
+
o.HideTip(), yn({ anchorEl: g, row: l, col: d, message: p });
|
|
1397
|
+
}), window.TGSetEvent("OnFocus", e, (o, l, d, u) => {
|
|
1398
|
+
l !== u && ze(o, [l, u]);
|
|
1399
|
+
}), window.TGSetEvent("OnTip", e, (o, l, d, u) => Te(o, l, d) ? "" : u), window.TGSetEvent("OnCanRowDelete", e, (o, l, d) => {
|
|
1400
|
+
var C;
|
|
1162
1401
|
if (d !== 3)
|
|
1163
1402
|
return d;
|
|
1164
|
-
const u = (
|
|
1403
|
+
const u = (C = n.current) == null ? void 0 : C.onBeforeRowUndelete;
|
|
1165
1404
|
if (typeof u != "function")
|
|
1166
1405
|
return d;
|
|
1167
|
-
const
|
|
1406
|
+
const E = /* @__PURE__ */ i((p) => {
|
|
1168
1407
|
window.setTimeout(() => {
|
|
1169
|
-
|
|
1170
|
-
|
|
1408
|
+
Rr(
|
|
1409
|
+
_.current ?? o,
|
|
1171
1410
|
l,
|
|
1172
|
-
|
|
1173
|
-
|
|
1411
|
+
p,
|
|
1412
|
+
B
|
|
1174
1413
|
);
|
|
1175
1414
|
}, 0);
|
|
1176
1415
|
}, "scheduleAction");
|
|
1177
1416
|
try {
|
|
1178
|
-
const
|
|
1179
|
-
return
|
|
1180
|
-
|
|
1181
|
-
}), 0) : (
|
|
1417
|
+
const p = u(o, l);
|
|
1418
|
+
return Gr(p) ? (p.then(E).catch(() => {
|
|
1419
|
+
E("undelete");
|
|
1420
|
+
}), 0) : (E(p), 0);
|
|
1182
1421
|
} catch {
|
|
1183
|
-
return
|
|
1422
|
+
return E("undelete"), 0;
|
|
1184
1423
|
}
|
|
1185
|
-
}), typeof (
|
|
1186
|
-
const
|
|
1187
|
-
var
|
|
1188
|
-
(
|
|
1189
|
-
|
|
1424
|
+
}), typeof (m == null ? void 0 : m.onRowClick) == "function" || typeof (m == null ? void 0 : m.onInternalCellClick) == "function") {
|
|
1425
|
+
const o = ee((l, d, u, E, C, p) => {
|
|
1426
|
+
var g, x;
|
|
1427
|
+
(x = (g = n.current) == null ? void 0 : g.onRowClick) == null || x.call(
|
|
1428
|
+
g,
|
|
1190
1429
|
l,
|
|
1191
1430
|
d,
|
|
1192
1431
|
u,
|
|
1432
|
+
E,
|
|
1193
1433
|
C,
|
|
1194
|
-
p
|
|
1195
|
-
E
|
|
1434
|
+
p
|
|
1196
1435
|
);
|
|
1197
1436
|
}, 300);
|
|
1198
|
-
window.TGSetEvent("OnClick", e, (l, d, u, C, p
|
|
1199
|
-
var
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1437
|
+
window.TGSetEvent("OnClick", e, (l, d, u, E, C, p) => {
|
|
1438
|
+
var x, Le, Oe;
|
|
1439
|
+
const g = (Le = (x = n.current) == null ? void 0 : x.onInternalCellClick) == null ? void 0 : Le.call(
|
|
1440
|
+
x,
|
|
1202
1441
|
l,
|
|
1203
1442
|
d,
|
|
1204
1443
|
u,
|
|
1444
|
+
E,
|
|
1205
1445
|
C,
|
|
1206
|
-
p
|
|
1207
|
-
E
|
|
1446
|
+
p
|
|
1208
1447
|
);
|
|
1209
|
-
if (
|
|
1210
|
-
return
|
|
1211
|
-
typeof ((
|
|
1448
|
+
if (g !== void 0)
|
|
1449
|
+
return g;
|
|
1450
|
+
typeof ((Oe = n.current) == null ? void 0 : Oe.onRowClick) == "function" && o(l, d, u, E, C, p);
|
|
1212
1451
|
});
|
|
1213
1452
|
}
|
|
1214
|
-
(typeof (
|
|
1453
|
+
(typeof (m == null ? void 0 : m.onClickButton) == "function" || typeof (m == null ? void 0 : m.onInternalButtonClick) == "function") && window.TGSetEvent(
|
|
1215
1454
|
"OnClickButton",
|
|
1216
1455
|
e,
|
|
1217
|
-
(
|
|
1218
|
-
var
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
|
|
1456
|
+
(o, l, d, u) => {
|
|
1457
|
+
var C, p, g, x;
|
|
1458
|
+
const E = (p = (C = n.current) == null ? void 0 : C.onInternalButtonClick) == null ? void 0 : p.call(
|
|
1459
|
+
C,
|
|
1460
|
+
o,
|
|
1222
1461
|
l,
|
|
1223
1462
|
d,
|
|
1224
1463
|
u
|
|
1225
1464
|
);
|
|
1226
|
-
if (
|
|
1227
|
-
return
|
|
1228
|
-
(
|
|
1229
|
-
|
|
1230
|
-
|
|
1465
|
+
if (E !== void 0)
|
|
1466
|
+
return E;
|
|
1467
|
+
(x = (g = n.current) == null ? void 0 : g.onClickButton) == null || x.call(
|
|
1468
|
+
g,
|
|
1469
|
+
o,
|
|
1231
1470
|
l,
|
|
1232
1471
|
d,
|
|
1233
1472
|
u
|
|
1234
1473
|
);
|
|
1235
1474
|
}
|
|
1236
|
-
), typeof (
|
|
1475
|
+
), typeof (m == null ? void 0 : m.onInternalKeyDown) == "function" && (window.TGSetEvent(
|
|
1237
1476
|
"OnKeyDown",
|
|
1238
1477
|
e,
|
|
1239
|
-
(
|
|
1240
|
-
var
|
|
1241
|
-
return (
|
|
1478
|
+
(o, l, d, u, E) => {
|
|
1479
|
+
var C, p;
|
|
1480
|
+
return (p = (C = n.current) == null ? void 0 : C.onInternalKeyDown) == null ? void 0 : p.call(C, o, l, d, u, E);
|
|
1242
1481
|
}
|
|
1243
1482
|
), window.TGSetEvent(
|
|
1244
1483
|
"OnKeyPress",
|
|
1245
1484
|
e,
|
|
1246
|
-
(
|
|
1247
|
-
var
|
|
1248
|
-
return (
|
|
1485
|
+
(o, l, d, u, E) => {
|
|
1486
|
+
var C, p;
|
|
1487
|
+
return (p = (C = n.current) == null ? void 0 : C.onInternalKeyDown) == null ? void 0 : p.call(C, o, l, d, u, E);
|
|
1249
1488
|
}
|
|
1250
|
-
)), window.TGSetEvent("OnStartEdit", e, (
|
|
1251
|
-
var u,
|
|
1252
|
-
return
|
|
1489
|
+
)), window.TGSetEvent("OnStartEdit", e, (o, l, d) => {
|
|
1490
|
+
var u, E;
|
|
1491
|
+
return $(), (E = (u = n.current) == null ? void 0 : u.onInternalStartEdit) == null ? void 0 : E.call(
|
|
1253
1492
|
u,
|
|
1254
|
-
|
|
1493
|
+
o,
|
|
1255
1494
|
l,
|
|
1256
1495
|
d
|
|
1257
1496
|
);
|
|
1258
|
-
}), window.TGSetEvent("OnRowDelete", e, (
|
|
1259
|
-
var
|
|
1260
|
-
|
|
1261
|
-
const u =
|
|
1262
|
-
|
|
1263
|
-
canEdit:
|
|
1264
|
-
editableColumns:
|
|
1265
|
-
editableCanEdit:
|
|
1266
|
-
highlightColumns:
|
|
1267
|
-
}),
|
|
1268
|
-
|
|
1269
|
-
|
|
1497
|
+
}), window.TGSetEvent("OnRowDelete", e, (o, l, d) => {
|
|
1498
|
+
var g, x;
|
|
1499
|
+
b(o), $(), Vr(o, l), o.SelectRow(l, 0);
|
|
1500
|
+
const u = w(l), E = u ? te(l) : [], C = u ? xe(l) : [], p = c.current !== !1;
|
|
1501
|
+
Je(o, l, {
|
|
1502
|
+
canEdit: p ? 2 : void 0,
|
|
1503
|
+
editableColumns: C,
|
|
1504
|
+
editableCanEdit: p && C.length ? 2 : void 0,
|
|
1505
|
+
highlightColumns: E
|
|
1506
|
+
}), B(o), (x = (g = n.current) == null ? void 0 : g.onRowDelete) == null || x.call(
|
|
1507
|
+
g,
|
|
1508
|
+
o,
|
|
1270
1509
|
l,
|
|
1271
1510
|
d
|
|
1272
1511
|
);
|
|
1273
|
-
}), window.TGSetEvent("OnRowUndelete", e, (
|
|
1274
|
-
var
|
|
1275
|
-
|
|
1276
|
-
const d =
|
|
1277
|
-
|
|
1278
|
-
canEdit:
|
|
1279
|
-
editableColumns:
|
|
1280
|
-
editableCanEdit:
|
|
1512
|
+
}), window.TGSetEvent("OnRowUndelete", e, (o, l) => {
|
|
1513
|
+
var p, g;
|
|
1514
|
+
b(o), $();
|
|
1515
|
+
const d = w(l), u = d ? te(l) : [], E = d ? xe(l) : [], C = c.current !== !1;
|
|
1516
|
+
Je(o, l, {
|
|
1517
|
+
canEdit: C ? 1 : void 0,
|
|
1518
|
+
editableColumns: E,
|
|
1519
|
+
editableCanEdit: C && E.length ? 1 : void 0,
|
|
1281
1520
|
highlightColumns: u,
|
|
1282
|
-
highlightBackgroundColor: u.length ?
|
|
1283
|
-
}),
|
|
1284
|
-
}), window.TGSetEvent("OnGetDefaultColor", e, (
|
|
1521
|
+
highlightBackgroundColor: u.length ? a.current : void 0
|
|
1522
|
+
}), B(o), (g = (p = n.current) == null ? void 0 : p.onRowUndelete) == null || g.call(p, o, l);
|
|
1523
|
+
}), window.TGSetEvent("OnGetDefaultColor", e, (o, l, d) => {
|
|
1285
1524
|
if (!(!r.current || !A(l)))
|
|
1286
|
-
return
|
|
1287
|
-
|
|
1525
|
+
return _n(
|
|
1526
|
+
o,
|
|
1288
1527
|
l,
|
|
1289
1528
|
d,
|
|
1290
|
-
|
|
1529
|
+
f.current
|
|
1291
1530
|
);
|
|
1292
|
-
}), window.TGSetEvent("OnGetColor", e, (
|
|
1293
|
-
if (!
|
|
1294
|
-
return
|
|
1295
|
-
grid:
|
|
1531
|
+
}), window.TGSetEvent("OnGetColor", e, (o, l, d, u, E, C, p) => {
|
|
1532
|
+
if (!p)
|
|
1533
|
+
return zr({
|
|
1534
|
+
grid: o,
|
|
1296
1535
|
row: l,
|
|
1297
1536
|
col: d,
|
|
1298
1537
|
r: u,
|
|
1299
|
-
g:
|
|
1300
|
-
b:
|
|
1538
|
+
g: E,
|
|
1539
|
+
b: C,
|
|
1301
1540
|
focusedCellBackgroundColor: T.current,
|
|
1302
1541
|
selectedCellBackgroundColor: G.current,
|
|
1303
|
-
hoverCellBackgroundColor:
|
|
1304
|
-
changedCellBackgroundColor:
|
|
1305
|
-
editableCellBackgroundColorValue:
|
|
1542
|
+
hoverCellBackgroundColor: R.current,
|
|
1543
|
+
changedCellBackgroundColor: a.current,
|
|
1544
|
+
editableCellBackgroundColorValue: f.current
|
|
1306
1545
|
});
|
|
1307
|
-
}), window.TGSetEvent("OnGetClass", e, (
|
|
1308
|
-
var
|
|
1309
|
-
if (
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1546
|
+
}), window.TGSetEvent("OnGetClass", e, (o, l, d, u) => qr(o, l, d, typeof u == "string" ? u : "")), window.TGSetEvent("OnAfterValueChanged", e, (o, l, d, u) => {
|
|
1547
|
+
var C, p;
|
|
1548
|
+
if ($(), s.current && A(l)) {
|
|
1549
|
+
const g = !Wr(o, l, d) || W(o, l, d) && !Se(o, l, d);
|
|
1550
|
+
Pr({
|
|
1312
1551
|
gridId: e,
|
|
1313
|
-
grid:
|
|
1552
|
+
grid: o,
|
|
1314
1553
|
row: l,
|
|
1315
1554
|
col: d,
|
|
1316
|
-
backgroundColor:
|
|
1317
|
-
baselineMap:
|
|
1318
|
-
highlightRefresh:
|
|
1555
|
+
backgroundColor: a.current,
|
|
1556
|
+
baselineMap: h.current,
|
|
1557
|
+
highlightRefresh: g
|
|
1319
1558
|
});
|
|
1320
1559
|
}
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1560
|
+
const E = ((C = n.current) == null ? void 0 : C.onAfterValueChanged) ?? ((p = n.current) == null ? void 0 : p.onRowChange);
|
|
1561
|
+
E == null || E(o, l, d, u);
|
|
1323
1562
|
});
|
|
1324
|
-
const
|
|
1325
|
-
var u,
|
|
1326
|
-
const l =
|
|
1327
|
-
selectionScope:
|
|
1563
|
+
const _e = ee((o) => {
|
|
1564
|
+
var u, E;
|
|
1565
|
+
const l = o.GetSelRows() ?? [], d = kn(o, l, {
|
|
1566
|
+
selectionScope: xn.current
|
|
1328
1567
|
});
|
|
1329
|
-
(
|
|
1568
|
+
(E = (u = n.current) == null ? void 0 : u.onSelect) == null || E.call(
|
|
1330
1569
|
u,
|
|
1331
|
-
|
|
1570
|
+
vn(o, d)
|
|
1332
1571
|
);
|
|
1333
1572
|
}, 100);
|
|
1334
|
-
window.TGSetEvent("OnSelect", e, (
|
|
1335
|
-
var
|
|
1336
|
-
if (
|
|
1573
|
+
window.TGSetEvent("OnSelect", e, (o, l, d, u, E) => {
|
|
1574
|
+
var p;
|
|
1575
|
+
if (E)
|
|
1337
1576
|
return;
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1340
|
-
}), window.TGSetEvent("OnSelectAll", e, (
|
|
1341
|
-
var
|
|
1342
|
-
u || (
|
|
1343
|
-
}), typeof (
|
|
1344
|
-
var u,
|
|
1345
|
-
(
|
|
1577
|
+
const C = br(o);
|
|
1578
|
+
Nr(o, l), ze(o, [l]), j(o, C), Ur(o, l), Ve(o, e), typeof ((p = n.current) == null ? void 0 : p.onSelect) == "function" && _e(o);
|
|
1579
|
+
}), window.TGSetEvent("OnSelectAll", e, (o, l, d, u) => {
|
|
1580
|
+
var E;
|
|
1581
|
+
u || (kr(o), Qr(o), Ve(o, e), typeof ((E = n.current) == null ? void 0 : E.onSelect) == "function" && _e(o));
|
|
1582
|
+
}), typeof (m == null ? void 0 : m.onSave) == "function" && window.TGSetEvent("OnSave", e, (o, l, d) => {
|
|
1583
|
+
var u, E;
|
|
1584
|
+
(E = (u = n.current) == null ? void 0 : u.onSave) == null || E.call(
|
|
1346
1585
|
u,
|
|
1347
|
-
|
|
1586
|
+
o,
|
|
1348
1587
|
l,
|
|
1349
1588
|
d
|
|
1350
1589
|
);
|
|
1351
|
-
}), window.TGSetEvent("OnSort", e, (
|
|
1590
|
+
}), window.TGSetEvent("OnSort", e, (o, l) => {
|
|
1352
1591
|
var d;
|
|
1353
|
-
if (!(!l || !
|
|
1354
|
-
|
|
1355
|
-
|
|
1592
|
+
if (!(!l || !Ar(
|
|
1593
|
+
o,
|
|
1594
|
+
o.ARow,
|
|
1356
1595
|
l,
|
|
1357
|
-
|
|
1596
|
+
Q.current !== !1
|
|
1358
1597
|
)))
|
|
1359
|
-
return
|
|
1360
|
-
rowId: (d =
|
|
1598
|
+
return Qe(e, "group header sort blocked"), Kn(e, "group header sort blocked", {
|
|
1599
|
+
rowId: (d = o.ARow) == null ? void 0 : d.id,
|
|
1361
1600
|
col: l
|
|
1362
1601
|
}), -1;
|
|
1363
|
-
}), window.TGSetEvent("OnSortFinish", e, (
|
|
1364
|
-
|
|
1365
|
-
}), window.TGSetEvent("OnFilterFinish", e, (
|
|
1366
|
-
|
|
1367
|
-
}), window.TGSetEvent("OnGroupFinish", e, (
|
|
1368
|
-
|
|
1369
|
-
}), window.TGSetEvent("OnSearchFinish", e, (
|
|
1370
|
-
|
|
1371
|
-
}), window.TGSetEvent("OnRenderStart", e, (
|
|
1372
|
-
|
|
1373
|
-
|
|
1602
|
+
}), window.TGSetEvent("OnSortFinish", e, (o) => {
|
|
1603
|
+
b(o);
|
|
1604
|
+
}), window.TGSetEvent("OnFilterFinish", e, (o) => {
|
|
1605
|
+
b(o);
|
|
1606
|
+
}), window.TGSetEvent("OnGroupFinish", e, (o) => {
|
|
1607
|
+
b(o);
|
|
1608
|
+
}), window.TGSetEvent("OnSearchFinish", e, (o) => {
|
|
1609
|
+
b(o);
|
|
1610
|
+
}), window.TGSetEvent("OnRenderStart", e, (o) => {
|
|
1611
|
+
b(o), le(o, e), He(
|
|
1612
|
+
o,
|
|
1374
1613
|
e,
|
|
1375
1614
|
!1,
|
|
1376
|
-
|
|
1615
|
+
Q.current !== !1
|
|
1377
1616
|
);
|
|
1378
|
-
}), window.TGSetEvent("OnRenderFinish", e, (
|
|
1379
|
-
|
|
1380
|
-
}), window.TGSetEvent("OnDataGet", e, (
|
|
1617
|
+
}), window.TGSetEvent("OnRenderFinish", e, (o) => {
|
|
1618
|
+
le(o, e);
|
|
1619
|
+
}), window.TGSetEvent("OnDataGet", e, (o, l, d) => {
|
|
1381
1620
|
if ((l == null ? void 0 : l.Name) === "Layout" && typeof d == "string") {
|
|
1382
|
-
t.current =
|
|
1383
|
-
const u =
|
|
1621
|
+
t.current = De(d);
|
|
1622
|
+
const u = ce(
|
|
1384
1623
|
d,
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1624
|
+
Ae.current,
|
|
1625
|
+
ge.current,
|
|
1626
|
+
he.current
|
|
1388
1627
|
);
|
|
1389
1628
|
return u === d ? null : u;
|
|
1390
1629
|
}
|
|
1391
1630
|
return null;
|
|
1392
|
-
}), window.TGSetEvent("OnDataParse", e, (
|
|
1631
|
+
}), window.TGSetEvent("OnDataParse", e, (o, l, d) => {
|
|
1393
1632
|
if ((l == null ? void 0 : l.Name) === "Layout" && typeof d == "string") {
|
|
1394
|
-
t.current =
|
|
1395
|
-
const u =
|
|
1633
|
+
t.current = De(d);
|
|
1634
|
+
const u = ce(
|
|
1396
1635
|
d,
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1636
|
+
Ae.current,
|
|
1637
|
+
ge.current,
|
|
1638
|
+
he.current
|
|
1400
1639
|
);
|
|
1401
1640
|
return u === d ? null : u;
|
|
1402
1641
|
}
|
|
@@ -1404,33 +1643,33 @@ ${e.slice(
|
|
|
1404
1643
|
}), window.TGSetEvent(
|
|
1405
1644
|
"OnReady",
|
|
1406
1645
|
e,
|
|
1407
|
-
|
|
1646
|
+
ee((o) => {
|
|
1408
1647
|
var l, d;
|
|
1409
|
-
if (!
|
|
1410
|
-
const u =
|
|
1411
|
-
|
|
1412
|
-
|
|
1648
|
+
if (!me.current) {
|
|
1649
|
+
const u = y.current;
|
|
1650
|
+
me.current = !0, !t.current && (o.EnterMode === void 0 || o.EnterMode === null || o.EnterMode === 0) && pr(o, Yn), Un(o, u), _.current = o, bn.current = u, In.current = We(o), h.current = /* @__PURE__ */ new WeakMap(), Ir(o, h.current), B(o), wn(!0), He(
|
|
1651
|
+
o,
|
|
1413
1652
|
e,
|
|
1414
1653
|
!0,
|
|
1415
|
-
|
|
1416
|
-
),
|
|
1417
|
-
bodyRowCount:
|
|
1418
|
-
|
|
1654
|
+
Q.current !== !1
|
|
1655
|
+
), en(e, "TreeGrid init ready", O.current, {
|
|
1656
|
+
bodyRowCount: mr(
|
|
1657
|
+
We(o)
|
|
1419
1658
|
)
|
|
1420
|
-
}),
|
|
1659
|
+
}), O.current = null, (d = (l = n.current) == null ? void 0 : l.onReady) == null || d.call(l, o);
|
|
1421
1660
|
}
|
|
1422
1661
|
}, 100)
|
|
1423
1662
|
);
|
|
1424
1663
|
}, "bindTreeGridEvents");
|
|
1425
1664
|
export {
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1665
|
+
ui as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
|
|
1666
|
+
Ei as bindTreeGridEvents,
|
|
1667
|
+
fi as buildTreeGridInitializationOptions,
|
|
1668
|
+
Ir as captureTreeGridChangeBaselines,
|
|
1669
|
+
mr as getTreeGridBodyDataCount,
|
|
1670
|
+
ai as hasTreeGridDisplayDataRows,
|
|
1671
|
+
De as hasTreeGridExplicitEnterMode,
|
|
1672
|
+
Ti as replaceTreeGridBodyData,
|
|
1673
|
+
Pr as syncTreeGridChangedCellHighlight
|
|
1435
1674
|
};
|
|
1436
1675
|
//# sourceMappingURL=treeGridRuntime.js.map
|