@owp/core 2.5.26 → 2.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js +19 -19
- package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js.map +1 -1
- package/dist/components/OwpPicker/OwpDatePicker.js +251 -243
- package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js +13 -12
- package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +420 -267
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +289 -176
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js +10 -10
- package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js.map +1 -1
- package/dist/layout/components/logo/Logo.js +40 -53
- package/dist/layout/components/logo/Logo.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +27 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js +67 -42
- package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpPicker/internal/useOwpPickerPopperTransition.d.ts +1 -0
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { isTreeGridRowAddedById as
|
|
5
|
-
import { applyTreeGridLayoutToGrid as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
var pe = Object.defineProperty;
|
|
2
|
+
var o = (e, t) => pe(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { getTreeGridTextResourceUrl as Re, TREEGRID_CELL_CHANGED_CLASS as ce, TREEGRID_CELL_HIGHLIGHT_COLOR as _e, resolveTreeGridColorNumber as Ae } from "../../../constants/treeGrid.js";
|
|
4
|
+
import { isTreeGridRowAddedById as y, getTreeGridAddedRowHighlightColumns as V, getTreeGridCellComparableValue as se, clearTreeGridCellHighlightById as be, removeTreeGridAddedRowHighlightColumn as ye, highlightTreeGridCellById as Le, appendTreeGridAddedRowHighlightColumn as ge, normalizeTreeGridExternalRows as me, getTreeGridAddedRowBaselineValue as De } from "../../../utils/treeGridUtil.js";
|
|
5
|
+
import { applyTreeGridLayoutToGrid as we } from "./treeGridLayout.js";
|
|
6
|
+
import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as Ie, TREE_GRID_SELECT_ALL_CHECKED_CLASS as M, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as W, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as K, TREE_GRID_THEME_WRAPPER_CLASS as Oe } from "./treeGridTheme.js";
|
|
7
|
+
import { countTreeGridPerf as ue, logTreeGridPerf as Be, measureTreeGridPerf as de } from "./utils/perf.js";
|
|
8
|
+
import { debounce as D } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
9
|
+
import { isEmpty as Pe } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
10
|
+
import { get as ke } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
11
|
+
const Nt = 300, xe = 3, Ne = {
|
|
11
12
|
1: {
|
|
12
13
|
onEnter: "TabDownEdit",
|
|
13
14
|
onEnterEdit: "AcceptEdit AND TabDownEdit,1"
|
|
@@ -24,56 +25,188 @@ const ut = 300, Ce = 3, he = {
|
|
|
24
25
|
onEnter: "TabRightEditAdd",
|
|
25
26
|
onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
|
|
26
27
|
}
|
|
27
|
-
},
|
|
28
|
+
}, Ue = [255, 255, 166], ve = [240, 240, 240], Fe = [248, 248, 248], $e = [255, 255, 255], Ve = [255, 255, 254], Me = [242, 242, 242], J = "Button", We = 0.75, j = ce.split(/\s+/).filter(
|
|
28
29
|
Boolean
|
|
29
|
-
),
|
|
30
|
+
), X = /* @__PURE__ */ o((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), L = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), g = /* @__PURE__ */ o((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), I = /* @__PURE__ */ o((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), k = /* @__PURE__ */ o((e, t) => !g(e) && !I(t), "isTreeGridCheckboxSelectionMode"), Ke = /* @__PURE__ */ o((e) => {
|
|
31
|
+
const t = e.Cfg;
|
|
32
|
+
return Array.isArray(t) ? t.filter(L) : L(t) ? [t] : [];
|
|
33
|
+
}, "getTreeGridJsonCfgRecords"), z = /* @__PURE__ */ o((e, t) => {
|
|
34
|
+
let n;
|
|
35
|
+
return Ke(e).forEach((r) => {
|
|
36
|
+
t in r && (n = r[t]);
|
|
37
|
+
}), n;
|
|
38
|
+
}, "getTreeGridJsonCfgValue"), H = /* @__PURE__ */ o((e, t) => {
|
|
39
|
+
const n = new RegExp(`\\b${t}\\s*=\\s*(['"])(.*?)\\1`, "gi");
|
|
40
|
+
let r, s;
|
|
41
|
+
for (; r = n.exec(e); )
|
|
42
|
+
s = r[2];
|
|
43
|
+
return s;
|
|
44
|
+
}, "getTreeGridXmlAttributeValue"), Y = /* @__PURE__ */ o((e, t) => new RegExp(`\\b${t}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), Z = /* @__PURE__ */ o((e, t, n) => {
|
|
45
|
+
const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
|
|
46
|
+
return `${e.slice(0, r)} ${t}="${n}"${e.slice(r)}`;
|
|
47
|
+
}, "appendTreeGridXmlTagAttribute"), Je = /* @__PURE__ */ o((e) => {
|
|
48
|
+
const t = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, n = [];
|
|
49
|
+
let r;
|
|
50
|
+
for (; r = t.exec(e); ) {
|
|
51
|
+
if (r[1].toLowerCase() !== "header") {
|
|
52
|
+
if (n.length > 0)
|
|
53
|
+
break;
|
|
54
|
+
return n;
|
|
55
|
+
}
|
|
56
|
+
n.push({
|
|
57
|
+
index: r.index,
|
|
58
|
+
tag: r[0]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return n;
|
|
62
|
+
}, "getLeadingTreeGridXmlHeaderTags"), je = /* @__PURE__ */ o((e) => {
|
|
63
|
+
const t = Je(e);
|
|
64
|
+
if (t.length <= 1)
|
|
65
|
+
return e;
|
|
66
|
+
const [n, ...r] = t;
|
|
67
|
+
if (Y(n.tag, "PanelRowSpan") || r.some(({ tag: f }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(f)))
|
|
68
|
+
return e;
|
|
69
|
+
let s = n.tag;
|
|
70
|
+
return Y(s, "Spanned") || (s = Z(s, "Spanned", 1)), s = Z(
|
|
71
|
+
s,
|
|
72
|
+
"PanelRowSpan",
|
|
73
|
+
t.length
|
|
74
|
+
), `${e.slice(0, n.index)}${s}${e.slice(
|
|
75
|
+
n.index + n.tag.length
|
|
76
|
+
)}`;
|
|
77
|
+
}, "applyTreeGridXmlHeadPanelRowSpanDefault"), Xe = /* @__PURE__ */ o((e) => !/<Head\b/i.test(e) || /\bPanelRowSpan\s*[:=]/i.test(e) ? e : e.replace(
|
|
78
|
+
/(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
|
|
79
|
+
(t, n, r, s) => {
|
|
80
|
+
const f = je(r);
|
|
81
|
+
return f === r ? t : `${n}${f}${s}`;
|
|
82
|
+
}
|
|
83
|
+
), "applyTreeGridDefaultHeaderPanelRowSpanLayout"), ze = /* @__PURE__ */ o((e) => k(
|
|
84
|
+
z(e, "Selecting"),
|
|
85
|
+
z(e, "SelectingSingle")
|
|
86
|
+
), "isTreeGridJsonCheckboxSelectionLayout"), He = /* @__PURE__ */ o((e) => k(
|
|
87
|
+
H(e, "Selecting"),
|
|
88
|
+
H(e, "SelectingSingle")
|
|
89
|
+
), "isTreeGridXmlCheckboxSelectionLayout"), Ye = /* @__PURE__ */ o((e) => {
|
|
90
|
+
const t = e.Cfg;
|
|
91
|
+
if (Array.isArray(t)) {
|
|
92
|
+
t.some((n) => L(n) && "FastPanel" in n) || (e.Cfg = [{ FastPanel: 0 }, ...t]);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (L(t)) {
|
|
96
|
+
"FastPanel" in t || (t.FastPanel = 0);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
e.Cfg = { FastPanel: 0 };
|
|
100
|
+
}, "applyTreeGridJsonFastPanelDefault"), Ze = /* @__PURE__ */ o((e) => {
|
|
101
|
+
try {
|
|
102
|
+
const t = JSON.parse(e);
|
|
103
|
+
return !L(t) || !ze(t) ? e : (Ye(t), JSON.stringify(t));
|
|
104
|
+
} catch {
|
|
105
|
+
return e;
|
|
106
|
+
}
|
|
107
|
+
}, "applyTreeGridJsonDefaultFastPanelLayout"), qe = /* @__PURE__ */ o((e) => {
|
|
108
|
+
const t = e.trim();
|
|
109
|
+
return !t || /\bFastPanel\s*[:=]/i.test(e) ? e : t.startsWith("{") ? Ze(e) : He(e) && /<Grid\b/i.test(e) ? e.replace(/<Grid\b[^>]*>/i, (n) => `${n}
|
|
110
|
+
<Cfg FastPanel="0" />`) : e;
|
|
111
|
+
}, "applyTreeGridDefaultFastPanelLayout"), O = /* @__PURE__ */ o((e) => qe(
|
|
112
|
+
Xe(e)
|
|
113
|
+
), "applyTreeGridDefaultLayout"), Qe = /* @__PURE__ */ o((e) => {
|
|
114
|
+
var t;
|
|
115
|
+
return typeof document > "u" ? null : ((t = document.getElementById(e)) == null ? void 0 : t.closest(`.${Oe}`)) ?? null;
|
|
116
|
+
}, "getTreeGridWrapperElement"), et = /* @__PURE__ */ o((e) => {
|
|
117
|
+
if (I(e.AllSelected))
|
|
118
|
+
return "checked";
|
|
119
|
+
if (g(e.AllSelected))
|
|
120
|
+
return "unchecked";
|
|
121
|
+
let t = 0, n = 0;
|
|
122
|
+
return Te(e).forEach((r) => {
|
|
123
|
+
!p(r) || g(r.CanSelect) || (t += 1, I(e.IsSelected(r)) && (n += 1));
|
|
124
|
+
}), n ? t > 0 && n >= t ? "checked" : "indeterminate" : "unchecked";
|
|
125
|
+
}, "getTreeGridSelectAllState"), B = /* @__PURE__ */ o((e, t) => {
|
|
126
|
+
const n = Qe(t), r = !g(e.Selecting), s = k(
|
|
127
|
+
e.Selecting,
|
|
128
|
+
e.SelectingSingle
|
|
129
|
+
), f = e.Header;
|
|
130
|
+
if (n == null || n.classList.toggle(
|
|
131
|
+
Ie,
|
|
132
|
+
s
|
|
133
|
+
), !s)
|
|
134
|
+
n == null || n.classList.remove(
|
|
135
|
+
M,
|
|
136
|
+
W,
|
|
137
|
+
K
|
|
138
|
+
);
|
|
139
|
+
else {
|
|
140
|
+
const T = et(e);
|
|
141
|
+
n == null || n.classList.toggle(
|
|
142
|
+
M,
|
|
143
|
+
T === "checked"
|
|
144
|
+
), n == null || n.classList.toggle(
|
|
145
|
+
W,
|
|
146
|
+
T === "indeterminate"
|
|
147
|
+
), n == null || n.classList.toggle(
|
|
148
|
+
K,
|
|
149
|
+
T === "unchecked"
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
f && r && (f.CanSelect = s ? 1 : 0);
|
|
153
|
+
}, "syncTreeGridSelectionPanelState"), w = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ o((e, t) => {
|
|
154
|
+
if (typeof window > "u")
|
|
155
|
+
return;
|
|
156
|
+
const n = w.get(t);
|
|
157
|
+
n !== void 0 && window.clearTimeout(n);
|
|
158
|
+
const r = window.setTimeout(() => {
|
|
159
|
+
w.delete(t), B(e, t);
|
|
160
|
+
}, 0);
|
|
161
|
+
w.set(t, r);
|
|
162
|
+
}, "scheduleTreeGridSelectionPanelStateSync"), tt = /* @__PURE__ */ o((e, t) => {
|
|
30
163
|
e.EnterMode = t;
|
|
31
|
-
const n =
|
|
164
|
+
const n = Ne[t];
|
|
32
165
|
if (!n)
|
|
33
166
|
return;
|
|
34
167
|
const r = e;
|
|
35
168
|
r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = n.onEnter, r.Actions.OnEnterEdit = n.onEnterEdit;
|
|
36
|
-
}, "applyTreeGridDefaultEnterMode"),
|
|
169
|
+
}, "applyTreeGridDefaultEnterMode"), le = /* @__PURE__ */ o((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), Q = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ o((e) => {
|
|
37
170
|
if (!e || !e.startsWith("data:"))
|
|
38
171
|
return e;
|
|
39
|
-
const t =
|
|
172
|
+
const t = Q.get(e);
|
|
40
173
|
if (t)
|
|
41
174
|
return t;
|
|
42
175
|
try {
|
|
43
|
-
const [n, r = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(n),
|
|
44
|
-
for (let R = 0; R <
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
return
|
|
176
|
+
const [n, r = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(n), f = (s == null ? void 0 : s[1]) || "application/octet-stream", T = s != null && s[2] ? atob(r) : decodeURIComponent(r), C = new Uint8Array(T.length);
|
|
177
|
+
for (let R = 0; R < T.length; R += 1)
|
|
178
|
+
C[R] = T.charCodeAt(R);
|
|
179
|
+
const h = URL.createObjectURL(new Blob([C], { type: f }));
|
|
180
|
+
return Q.set(e, h), h;
|
|
48
181
|
} catch {
|
|
49
182
|
return e;
|
|
50
183
|
}
|
|
51
|
-
}, "resolveTreeGridInlineUrl"),
|
|
52
|
-
if (!e ||
|
|
53
|
-
return
|
|
184
|
+
}, "resolveTreeGridInlineUrl"), P = /* @__PURE__ */ o((e) => {
|
|
185
|
+
if (!e || le(e))
|
|
186
|
+
return nt(e);
|
|
54
187
|
const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], s = n.includes("?") ? "&" : "?";
|
|
55
188
|
return `${n}${s}noCache=${Date.now()}${r}`;
|
|
56
|
-
}, "appendNoCacheQuery"),
|
|
189
|
+
}, "appendNoCacheQuery"), ee = /* @__PURE__ */ o((e, t, n) => {
|
|
57
190
|
if (!e)
|
|
58
191
|
return;
|
|
59
|
-
const r = n.canEdit, s = n.highlightColumns ?? [],
|
|
192
|
+
const r = n.canEdit, s = n.highlightColumns ?? [], f = n.highlightBackgroundColor;
|
|
60
193
|
if (!(r === void 0 && !s.length)) {
|
|
61
194
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
62
195
|
try {
|
|
63
|
-
r !== void 0 && (t.CanEdit = r), s.forEach((
|
|
64
|
-
|
|
196
|
+
r !== void 0 && (t.CanEdit = r), s.forEach((T) => {
|
|
197
|
+
T && (e.SetValue(
|
|
65
198
|
t,
|
|
66
|
-
`${
|
|
67
|
-
|
|
199
|
+
`${T}Class`,
|
|
200
|
+
f ? ce : "",
|
|
68
201
|
0
|
|
69
|
-
), e.SetValue(t, `${
|
|
202
|
+
), e.SetValue(t, `${T}Color`, f ?? "", 0));
|
|
70
203
|
});
|
|
71
204
|
} finally {
|
|
72
205
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
73
206
|
}
|
|
74
207
|
typeof e.RefreshRow == "function" && e.RefreshRow(t);
|
|
75
208
|
}
|
|
76
|
-
}, "syncTreeGridDeletedRowState"),
|
|
209
|
+
}, "syncTreeGridDeletedRowState"), rt = /* @__PURE__ */ o((e) => e ? le(e) || e.includes("assets") ? P(e) : P(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), ot = /* @__PURE__ */ o((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), it = /* @__PURE__ */ o((e, t, n, r) => {
|
|
77
210
|
if (!(!e || n === "cancel")) {
|
|
78
211
|
if (n === "remove") {
|
|
79
212
|
e.RemoveRow(t), r(e);
|
|
@@ -81,27 +214,27 @@ const ut = 300, Ce = 3, he = {
|
|
|
81
214
|
}
|
|
82
215
|
e.DeleteRowT(t, 3);
|
|
83
216
|
}
|
|
84
|
-
}, "applyTreeGridBeforeRowUndeleteAction"),
|
|
217
|
+
}, "applyTreeGridBeforeRowUndeleteAction"), ct = /* @__PURE__ */ o((e, t, n) => e ? { Url: rt(t) } : { Data: { Body: [Pe(n) ? [] : n] } }, "buildTreeGridDataSource"), Ut = /* @__PURE__ */ o(({
|
|
85
218
|
id: e,
|
|
86
219
|
layoutUrl: t,
|
|
87
220
|
layoutData: n,
|
|
88
221
|
dataUrl: r,
|
|
89
222
|
bodyData: s,
|
|
90
|
-
useDataUrl:
|
|
91
|
-
width:
|
|
92
|
-
height:
|
|
93
|
-
languageId:
|
|
223
|
+
useDataUrl: f,
|
|
224
|
+
width: T,
|
|
225
|
+
height: C,
|
|
226
|
+
languageId: h
|
|
94
227
|
}) => ({
|
|
95
228
|
id: e,
|
|
96
|
-
Layout: n ? { Data: n } : { Url:
|
|
97
|
-
Data:
|
|
229
|
+
Layout: n ? { Data: O(n) } : { Url: P(t ?? "") },
|
|
230
|
+
Data: ct(f, r, s),
|
|
98
231
|
Text: {
|
|
99
|
-
Url:
|
|
232
|
+
Url: Re(h)
|
|
100
233
|
},
|
|
101
|
-
width:
|
|
102
|
-
height:
|
|
234
|
+
width: T,
|
|
235
|
+
height: C,
|
|
103
236
|
Debug: "Error"
|
|
104
|
-
}), "buildTreeGridInitializationOptions"),
|
|
237
|
+
}), "buildTreeGridInitializationOptions"), te = /* @__PURE__ */ o((e) => ke(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), ne = /* @__PURE__ */ o((e) => {
|
|
105
238
|
if (typeof e == "number")
|
|
106
239
|
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
107
240
|
if (typeof e != "string")
|
|
@@ -111,42 +244,42 @@ const ut = 300, Ce = 3, he = {
|
|
|
111
244
|
return;
|
|
112
245
|
const n = Number(t);
|
|
113
246
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
114
|
-
}, "parseTreeGridPositiveNumber"),
|
|
247
|
+
}, "parseTreeGridPositiveNumber"), re = /* @__PURE__ */ o((e, t, n, r) => {
|
|
115
248
|
if (!t || !n)
|
|
116
249
|
return;
|
|
117
|
-
const s = e.GetAttribute(t, n, r),
|
|
118
|
-
return
|
|
250
|
+
const s = e.GetAttribute(t, n, r), f = ne(s);
|
|
251
|
+
return f !== void 0 ? f : ne(
|
|
119
252
|
t[`${n}${r}`]
|
|
120
253
|
);
|
|
121
|
-
}, "getTreeGridHeaderCellSpanAttribute"),
|
|
122
|
-
const r = typeof performance < "u" ? performance.now() : Date.now(), s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((
|
|
123
|
-
if (!s.length || !
|
|
254
|
+
}, "getTreeGridHeaderCellSpanAttribute"), fe = /* @__PURE__ */ o((e, t, n) => !t || !n || t.Fixed !== "Head" || (re(e, t, n, "Span") ?? 1) <= 1 ? !1 : (re(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), oe = /* @__PURE__ */ o((e, t, n = !1) => {
|
|
255
|
+
const r = typeof performance < "u" ? performance.now() : Date.now(), s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((h) => h.Fixed === "Head") : [], f = typeof e.GetCols == "function" ? e.GetCols() : [];
|
|
256
|
+
if (!s.length || !f.length)
|
|
124
257
|
return;
|
|
125
|
-
const
|
|
126
|
-
let
|
|
258
|
+
const T = /* @__PURE__ */ new Set();
|
|
259
|
+
let C = 0;
|
|
127
260
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
128
261
|
try {
|
|
129
|
-
s.forEach((
|
|
130
|
-
|
|
131
|
-
|
|
262
|
+
s.forEach((h) => {
|
|
263
|
+
f.forEach((R) => {
|
|
264
|
+
fe(e, h, R) && e.GetAttribute(h, R, J) !== "" && (e.SetAttribute(h, R, J, "", 0, 0), T.add(h), C += 1);
|
|
132
265
|
});
|
|
133
266
|
});
|
|
134
267
|
} finally {
|
|
135
268
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
136
269
|
}
|
|
137
|
-
|
|
138
|
-
typeof e.RefreshRow == "function" && e.RefreshRow(
|
|
139
|
-
}),
|
|
140
|
-
updatedCellCount:
|
|
141
|
-
updatedRowCount:
|
|
270
|
+
T.size && (n && T.forEach((h) => {
|
|
271
|
+
typeof e.RefreshRow == "function" && e.RefreshRow(h);
|
|
272
|
+
}), ue(t, "group header button attribute apply"), de(t, "group header button attribute apply", r, {
|
|
273
|
+
updatedCellCount: C,
|
|
274
|
+
updatedRowCount: T.size
|
|
142
275
|
}));
|
|
143
|
-
}, "applyTreeGridGroupHeaderSortButtonAttributes"),
|
|
276
|
+
}, "applyTreeGridGroupHeaderSortButtonAttributes"), st = /* @__PURE__ */ o((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), ut = /* @__PURE__ */ o((e) => {
|
|
144
277
|
const t = e == null ? void 0 : e.Visible;
|
|
145
278
|
return !!e && t !== 0 && t !== !1 && t !== "0";
|
|
146
|
-
}, "isVisibleTreeGridRow"),
|
|
279
|
+
}, "isVisibleTreeGridRow"), dt = /* @__PURE__ */ o((e) => {
|
|
147
280
|
const t = e == null ? void 0 : e.Added;
|
|
148
281
|
return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
|
|
149
|
-
}, "isAddedTreeGridRow"),
|
|
282
|
+
}, "isAddedTreeGridRow"), p = /* @__PURE__ */ o((e) => !e || e.Fixed === "Foot" || !ut(e) ? !1 : e.Kind === "Data" || dt(e), "isDisplayTreeGridRow"), ae = /* @__PURE__ */ o((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), Te = /* @__PURE__ */ o((e) => {
|
|
150
283
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
151
284
|
const t = [];
|
|
152
285
|
let n = e.GetFirst();
|
|
@@ -155,125 +288,125 @@ const ut = 300, Ce = 3, he = {
|
|
|
155
288
|
return t;
|
|
156
289
|
}
|
|
157
290
|
return Object.values(e.Rows ?? {});
|
|
158
|
-
}, "getTreeGridRows"),
|
|
291
|
+
}, "getTreeGridRows"), lt = /* @__PURE__ */ o((e, t) => {
|
|
159
292
|
if (!e)
|
|
160
293
|
return;
|
|
161
|
-
const n =
|
|
162
|
-
|
|
163
|
-
|
|
294
|
+
const n = ae(e);
|
|
295
|
+
Te(e).forEach((r) => {
|
|
296
|
+
p(r) && t.set(
|
|
164
297
|
r,
|
|
165
|
-
new Map(n.map((s) => [s,
|
|
298
|
+
new Map(n.map((s) => [s, se(e, r, s)]))
|
|
166
299
|
);
|
|
167
300
|
});
|
|
168
|
-
}, "captureTreeGridChangeBaselines"),
|
|
301
|
+
}, "captureTreeGridChangeBaselines"), ft = /* @__PURE__ */ o((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), at = /* @__PURE__ */ o((e, t, n) => {
|
|
169
302
|
const r = t;
|
|
170
|
-
return
|
|
171
|
-
}, "hasOtherTreeGridChangedCells"),
|
|
303
|
+
return ae(e).some((s) => s !== n && ft(r[`${s}Changed`]));
|
|
304
|
+
}, "hasOtherTreeGridChangedCells"), Tt = /* @__PURE__ */ o((e, t, n) => {
|
|
172
305
|
const r = t;
|
|
173
|
-
r[`${n}Changed`] = 0, !
|
|
174
|
-
}, "clearTreeGridCellChangedState"),
|
|
306
|
+
r[`${n}Changed`] = 0, !y(t) && !at(e, t, n) && (r.Changed = 0);
|
|
307
|
+
}, "clearTreeGridCellChangedState"), Gt = /* @__PURE__ */ o((e, t, n) => {
|
|
175
308
|
const r = e.get(t);
|
|
176
309
|
if (r != null && r.has(n))
|
|
177
310
|
return r.get(n);
|
|
178
|
-
if (
|
|
179
|
-
return
|
|
180
|
-
}, "resolveTreeGridCellBaselineValue"),
|
|
311
|
+
if (y(t))
|
|
312
|
+
return De(t, n) ?? "";
|
|
313
|
+
}, "resolveTreeGridCellBaselineValue"), Et = /* @__PURE__ */ o(({
|
|
181
314
|
gridId: e,
|
|
182
315
|
grid: t,
|
|
183
316
|
row: n,
|
|
184
317
|
col: r,
|
|
185
318
|
backgroundColor: s,
|
|
186
|
-
baselineMap:
|
|
319
|
+
baselineMap: f
|
|
187
320
|
}) => {
|
|
188
|
-
if (!
|
|
321
|
+
if (!p(n))
|
|
189
322
|
return;
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
|
|
323
|
+
const T = Gt(f, n, r), C = se(t, n, r);
|
|
324
|
+
if (T !== void 0 && C === T) {
|
|
325
|
+
be(e, { row: n, col: r }), Tt(t, n, r), y(n) && ye(n, r);
|
|
193
326
|
return;
|
|
194
327
|
}
|
|
195
|
-
|
|
328
|
+
Le(e, {
|
|
196
329
|
row: n,
|
|
197
330
|
col: r,
|
|
198
331
|
backgroundColor: s
|
|
199
|
-
}),
|
|
200
|
-
}, "syncTreeGridChangedCellHighlight"),
|
|
332
|
+
}), y(n) && ge(n, r);
|
|
333
|
+
}, "syncTreeGridChangedCellHighlight"), ht = /* @__PURE__ */ o((e, t, n) => !t || !n || !p(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Ct = /* @__PURE__ */ o((e, t, n) => {
|
|
201
334
|
const r = e.GetAttribute(t, n, "Color");
|
|
202
335
|
return r != null && r !== "";
|
|
203
|
-
}, "hasExplicitTreeGridCellColor"),
|
|
204
|
-
if (!(!t || r === void 0 ||
|
|
336
|
+
}, "hasExplicitTreeGridCellColor"), St = /* @__PURE__ */ o((e, t, n, r) => {
|
|
337
|
+
if (!(!t || r === void 0 || !ht(e, t, n) || Ct(e, t, n)))
|
|
205
338
|
return r;
|
|
206
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
207
|
-
const t = typeof e == "number" ? e : typeof e == "string" ?
|
|
339
|
+
}, "getEditableTreeGridCellDefaultColor"), b = /* @__PURE__ */ o((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), ie = /* @__PURE__ */ o((e) => {
|
|
340
|
+
const t = typeof e == "number" ? e : typeof e == "string" ? Ae(e) : void 0;
|
|
208
341
|
if (!(t === void 0 || !Number.isFinite(t)))
|
|
209
342
|
return [t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
210
|
-
}, "resolveTreeGridColorRgb"),
|
|
211
|
-
const r = /* @__PURE__ */
|
|
212
|
-
s * (1 - n) +
|
|
343
|
+
}, "resolveTreeGridColorRgb"), pt = /* @__PURE__ */ o((e) => `#${e.map((t) => Math.max(0, Math.min(255, t)).toString(16).padStart(2, "0")).join("")}`, "stringifyTreeGridRgbColor"), Rt = /* @__PURE__ */ o((e, t, n) => {
|
|
344
|
+
const r = /* @__PURE__ */ o((s, f) => Math.round(
|
|
345
|
+
s * (1 - n) + f * n
|
|
213
346
|
), "blendChannel");
|
|
214
347
|
return [
|
|
215
348
|
r(e[0], t[0]),
|
|
216
349
|
r(e[1], t[1]),
|
|
217
350
|
r(e[2], t[2])
|
|
218
351
|
];
|
|
219
|
-
}, "blendTreeGridRgbColor"),
|
|
220
|
-
const t = typeof e == "string" ?
|
|
221
|
-
return
|
|
222
|
-
}, "hasTreeGridChangedCellClass"),
|
|
223
|
-
if (!t || !n || !
|
|
352
|
+
}, "blendTreeGridRgbColor"), _t = /* @__PURE__ */ o((e) => (e == null ? void 0 : e.split(/\s+/).filter(Boolean)) ?? [], "getTreeGridClassTokens"), At = /* @__PURE__ */ o((e) => {
|
|
353
|
+
const t = typeof e == "string" ? _t(e) : [];
|
|
354
|
+
return j.length > 0 && j.every((n) => t.includes(n));
|
|
355
|
+
}, "hasTreeGridChangedCellClass"), Ge = /* @__PURE__ */ o((e, t, n) => {
|
|
356
|
+
if (!t || !n || !p(t))
|
|
224
357
|
return !1;
|
|
225
358
|
const r = e.IsSelected(t, n);
|
|
226
359
|
return r !== 0 && r !== !1 && r !== void 0 && r !== null;
|
|
227
|
-
}, "isTreeGridSelectedCellState"),
|
|
228
|
-
if (!t || !
|
|
360
|
+
}, "isTreeGridSelectedCellState"), bt = /* @__PURE__ */ o((e, t, n, r) => {
|
|
361
|
+
if (!t || !Ge(e, t, n) || !At(e.GetAttribute(t, n, "Class")))
|
|
229
362
|
return;
|
|
230
|
-
const s =
|
|
231
|
-
e.GetAttribute(t, n, "Color") ??
|
|
363
|
+
const s = ie(r), f = ie(
|
|
364
|
+
e.GetAttribute(t, n, "Color") ?? _e
|
|
232
365
|
);
|
|
233
|
-
if (!(!s || !
|
|
234
|
-
return
|
|
235
|
-
|
|
366
|
+
if (!(!s || !f))
|
|
367
|
+
return pt(
|
|
368
|
+
Rt(
|
|
236
369
|
s,
|
|
237
|
-
|
|
238
|
-
|
|
370
|
+
f,
|
|
371
|
+
We
|
|
239
372
|
)
|
|
240
373
|
);
|
|
241
|
-
}, "resolveTreeGridSelectedHighlightBackgroundColor"),
|
|
374
|
+
}, "resolveTreeGridSelectedHighlightBackgroundColor"), yt = /* @__PURE__ */ o((e, t, n) => !t || !n || !p(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Lt = /* @__PURE__ */ o((e, t, n) => !t || !n || !p(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), gt = /* @__PURE__ */ o(({
|
|
242
375
|
grid: e,
|
|
243
376
|
row: t,
|
|
244
377
|
col: n,
|
|
245
378
|
r,
|
|
246
379
|
g: s,
|
|
247
|
-
b:
|
|
248
|
-
selectedCellBackgroundColor:
|
|
249
|
-
hoverCellBackgroundColor:
|
|
380
|
+
b: f,
|
|
381
|
+
selectedCellBackgroundColor: T,
|
|
382
|
+
hoverCellBackgroundColor: C
|
|
250
383
|
}) => {
|
|
251
|
-
const
|
|
384
|
+
const h = bt(
|
|
252
385
|
e,
|
|
253
386
|
t,
|
|
254
387
|
n,
|
|
255
|
-
|
|
388
|
+
T
|
|
256
389
|
);
|
|
257
|
-
if (
|
|
258
|
-
return C;
|
|
259
|
-
if (X(e, t, n) && D(r, s, G, pe))
|
|
260
|
-
return E;
|
|
261
|
-
if (Qe(e, t, n) && (D(r, s, G, Re) || D(r, s, G, Se)) || Je(e, t, n) && (D(r, s, G, _e) || D(r, s, G, ye) || D(r, s, G, De)))
|
|
390
|
+
if (h)
|
|
262
391
|
return h;
|
|
263
|
-
|
|
392
|
+
if (Ge(e, t, n) && b(r, s, f, Ue))
|
|
393
|
+
return T;
|
|
394
|
+
if (yt(e, t, n) && (b(r, s, f, ve) || b(r, s, f, Fe)) || Lt(e, t, n) && (b(r, s, f, $e) || b(r, s, f, Ve) || b(r, s, f, Me)))
|
|
395
|
+
return C;
|
|
396
|
+
}, "resolveTreeGridStateBackgroundColor"), vt = /* @__PURE__ */ o((e) => {
|
|
264
397
|
if (!e)
|
|
265
398
|
return !1;
|
|
266
399
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
267
400
|
let t = e.GetFirst();
|
|
268
401
|
for (; t; ) {
|
|
269
|
-
if (
|
|
402
|
+
if (p(t))
|
|
270
403
|
return !0;
|
|
271
404
|
t = e.GetNext(t);
|
|
272
405
|
}
|
|
273
406
|
return !1;
|
|
274
407
|
}
|
|
275
|
-
return Object.values(e.Rows ?? {}).some((t) =>
|
|
276
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
408
|
+
return Object.values(e.Rows ?? {}).some((t) => p(t));
|
|
409
|
+
}, "hasTreeGridDisplayDataRows"), Ft = /* @__PURE__ */ o((e, t, n) => {
|
|
277
410
|
var s;
|
|
278
411
|
const r = (s = e.Data) == null ? void 0 : s.Data;
|
|
279
412
|
e.Data.Data = {
|
|
@@ -281,242 +414,262 @@ const ut = 300, Ce = 3, he = {
|
|
|
281
414
|
Data: { Body: [t || []] },
|
|
282
415
|
Url: ""
|
|
283
416
|
}, e.ReloadBody(n);
|
|
284
|
-
}, "replaceTreeGridBodyData"),
|
|
417
|
+
}, "replaceTreeGridBodyData"), $t = /* @__PURE__ */ o(({
|
|
285
418
|
id: e,
|
|
286
419
|
latestEventHandlersRef: t,
|
|
287
420
|
layoutHasExplicitEnterModeRef: n,
|
|
288
421
|
highlightEditableCellsRef: r,
|
|
289
422
|
highlightChangedCellsRef: s,
|
|
290
|
-
syncDeletedRowCanEditRef:
|
|
291
|
-
editableCellBackgroundColorValueRef:
|
|
292
|
-
changedCellBackgroundColorRef:
|
|
293
|
-
selectedCellBackgroundColorRef:
|
|
423
|
+
syncDeletedRowCanEditRef: f,
|
|
424
|
+
editableCellBackgroundColorValueRef: T,
|
|
425
|
+
changedCellBackgroundColorRef: C,
|
|
426
|
+
selectedCellBackgroundColorRef: h,
|
|
294
427
|
hoverCellBackgroundColorRef: R,
|
|
295
|
-
changedCellBaselineRef:
|
|
296
|
-
treeGridInstanceRef:
|
|
297
|
-
treeGridInitStartedAtRef:
|
|
298
|
-
latestLayoutOverridesRef:
|
|
299
|
-
appliedLayoutOverridesRef:
|
|
300
|
-
appliedBodyDataPropRef:
|
|
301
|
-
hasAppliedInitialLayoutRef:
|
|
302
|
-
syncHasDisplayDataRows:
|
|
303
|
-
setIsTreeGridReady:
|
|
428
|
+
changedCellBaselineRef: m,
|
|
429
|
+
treeGridInstanceRef: x,
|
|
430
|
+
treeGridInitStartedAtRef: N,
|
|
431
|
+
latestLayoutOverridesRef: Ee,
|
|
432
|
+
appliedLayoutOverridesRef: he,
|
|
433
|
+
appliedBodyDataPropRef: Ce,
|
|
434
|
+
hasAppliedInitialLayoutRef: U,
|
|
435
|
+
syncHasDisplayDataRows: A,
|
|
436
|
+
setIsTreeGridReady: Se
|
|
304
437
|
}) => {
|
|
305
|
-
const
|
|
306
|
-
if (window.TGSetEvent("OnRowAdd", e, (
|
|
438
|
+
const E = t.current;
|
|
439
|
+
if (window.TGSetEvent("OnRowAdd", e, (i, c) => {
|
|
307
440
|
var u, d;
|
|
308
|
-
|
|
309
|
-
}), window.TGSetEvent("OnRowAdded", e, (
|
|
310
|
-
|
|
311
|
-
}), window.TGSetEvent("OnRowRemove", e, (
|
|
312
|
-
|
|
313
|
-
}), window.TGSetEvent("OnCanRowDelete", e, (
|
|
441
|
+
c.CanEdit = 1, c.CanDelete = 1, (d = (u = t.current) == null ? void 0 : u.onRowAdd) == null || d.call(u, i, c);
|
|
442
|
+
}), window.TGSetEvent("OnRowAdded", e, (i) => {
|
|
443
|
+
A(i);
|
|
444
|
+
}), window.TGSetEvent("OnRowRemove", e, (i) => {
|
|
445
|
+
A(i);
|
|
446
|
+
}), window.TGSetEvent("OnCanRowDelete", e, (i, c, u) => {
|
|
314
447
|
var a;
|
|
315
448
|
if (u !== 3)
|
|
316
449
|
return u;
|
|
317
450
|
const d = (a = t.current) == null ? void 0 : a.onBeforeRowUndelete;
|
|
318
451
|
if (typeof d != "function")
|
|
319
452
|
return u;
|
|
320
|
-
const
|
|
453
|
+
const l = /* @__PURE__ */ o((G) => {
|
|
321
454
|
window.setTimeout(() => {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
455
|
+
it(
|
|
456
|
+
x.current ?? i,
|
|
457
|
+
c,
|
|
458
|
+
G,
|
|
459
|
+
A
|
|
327
460
|
);
|
|
328
461
|
}, 0);
|
|
329
462
|
}, "scheduleAction");
|
|
330
463
|
try {
|
|
331
|
-
const
|
|
332
|
-
return
|
|
333
|
-
|
|
334
|
-
}), 0) : (
|
|
464
|
+
const G = d(i, c);
|
|
465
|
+
return ot(G) ? (G.then(l).catch(() => {
|
|
466
|
+
l("undelete");
|
|
467
|
+
}), 0) : (l(G), 0);
|
|
335
468
|
} catch {
|
|
336
|
-
return
|
|
469
|
+
return l("undelete"), 0;
|
|
337
470
|
}
|
|
338
|
-
}), typeof (
|
|
339
|
-
const
|
|
340
|
-
var
|
|
341
|
-
(
|
|
342
|
-
|
|
343
|
-
|
|
471
|
+
}), typeof (E == null ? void 0 : E.onRowClick) == "function" || typeof (E == null ? void 0 : E.onInternalCellClick) == "function") {
|
|
472
|
+
const i = D((c, u, d, l, a, G) => {
|
|
473
|
+
var S, _;
|
|
474
|
+
(_ = (S = t.current) == null ? void 0 : S.onRowClick) == null || _.call(
|
|
475
|
+
S,
|
|
476
|
+
c,
|
|
344
477
|
u,
|
|
345
478
|
d,
|
|
346
|
-
|
|
479
|
+
l,
|
|
347
480
|
a,
|
|
348
|
-
|
|
481
|
+
G
|
|
349
482
|
);
|
|
350
483
|
}, 300);
|
|
351
|
-
window.TGSetEvent("OnClick", e, (
|
|
352
|
-
var
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
484
|
+
window.TGSetEvent("OnClick", e, (c, u, d, l, a, G) => {
|
|
485
|
+
var _, F, $;
|
|
486
|
+
const S = (F = (_ = t.current) == null ? void 0 : _.onInternalCellClick) == null ? void 0 : F.call(
|
|
487
|
+
_,
|
|
488
|
+
c,
|
|
356
489
|
u,
|
|
357
490
|
d,
|
|
358
|
-
|
|
491
|
+
l,
|
|
359
492
|
a,
|
|
360
|
-
|
|
493
|
+
G
|
|
361
494
|
);
|
|
362
|
-
if (
|
|
363
|
-
return
|
|
364
|
-
typeof ((
|
|
495
|
+
if (S !== void 0)
|
|
496
|
+
return S;
|
|
497
|
+
typeof (($ = t.current) == null ? void 0 : $.onRowClick) == "function" && i(c, u, d, l, a, G);
|
|
365
498
|
});
|
|
366
499
|
}
|
|
367
|
-
(typeof (
|
|
500
|
+
(typeof (E == null ? void 0 : E.onClickButton) == "function" || typeof (E == null ? void 0 : E.onInternalButtonClick) == "function") && window.TGSetEvent(
|
|
368
501
|
"OnClickButton",
|
|
369
502
|
e,
|
|
370
|
-
(
|
|
371
|
-
var a,
|
|
372
|
-
const
|
|
503
|
+
(i, c, u, d) => {
|
|
504
|
+
var a, G, S, _;
|
|
505
|
+
const l = (G = (a = t.current) == null ? void 0 : a.onInternalButtonClick) == null ? void 0 : G.call(
|
|
373
506
|
a,
|
|
374
|
-
o,
|
|
375
507
|
i,
|
|
508
|
+
c,
|
|
376
509
|
u,
|
|
377
510
|
d
|
|
378
511
|
);
|
|
379
|
-
if (
|
|
380
|
-
return
|
|
381
|
-
(
|
|
382
|
-
|
|
383
|
-
o,
|
|
512
|
+
if (l !== void 0)
|
|
513
|
+
return l;
|
|
514
|
+
(_ = (S = t.current) == null ? void 0 : S.onClickButton) == null || _.call(
|
|
515
|
+
S,
|
|
384
516
|
i,
|
|
517
|
+
c,
|
|
385
518
|
u,
|
|
386
519
|
d
|
|
387
520
|
);
|
|
388
521
|
}
|
|
389
|
-
), typeof (
|
|
522
|
+
), typeof (E == null ? void 0 : E.onInternalKeyDown) == "function" && (window.TGSetEvent(
|
|
390
523
|
"OnKeyDown",
|
|
391
524
|
e,
|
|
392
|
-
(
|
|
393
|
-
var a,
|
|
394
|
-
return (
|
|
525
|
+
(i, c, u, d, l) => {
|
|
526
|
+
var a, G;
|
|
527
|
+
return (G = (a = t.current) == null ? void 0 : a.onInternalKeyDown) == null ? void 0 : G.call(a, i, c, u, d, l);
|
|
395
528
|
}
|
|
396
529
|
), window.TGSetEvent(
|
|
397
530
|
"OnKeyPress",
|
|
398
531
|
e,
|
|
399
|
-
(
|
|
400
|
-
var a,
|
|
401
|
-
return (
|
|
532
|
+
(i, c, u, d, l) => {
|
|
533
|
+
var a, G;
|
|
534
|
+
return (G = (a = t.current) == null ? void 0 : a.onInternalKeyDown) == null ? void 0 : G.call(a, i, c, u, d, l);
|
|
402
535
|
}
|
|
403
|
-
)), typeof (
|
|
536
|
+
)), typeof (E == null ? void 0 : E.onInternalStartEdit) == "function" && window.TGSetEvent(
|
|
404
537
|
"OnStartEdit",
|
|
405
538
|
e,
|
|
406
|
-
(
|
|
407
|
-
var d,
|
|
408
|
-
return (
|
|
539
|
+
(i, c, u) => {
|
|
540
|
+
var d, l;
|
|
541
|
+
return (l = (d = t.current) == null ? void 0 : d.onInternalStartEdit) == null ? void 0 : l.call(
|
|
409
542
|
d,
|
|
410
|
-
o,
|
|
411
543
|
i,
|
|
544
|
+
c,
|
|
412
545
|
u
|
|
413
546
|
);
|
|
414
547
|
}
|
|
415
|
-
), window.TGSetEvent("OnRowDelete", e, (
|
|
416
|
-
var
|
|
417
|
-
const d =
|
|
418
|
-
|
|
419
|
-
canEdit:
|
|
548
|
+
), window.TGSetEvent("OnRowDelete", e, (i, c, u) => {
|
|
549
|
+
var l, a;
|
|
550
|
+
const d = y(c) ? V(c) : [];
|
|
551
|
+
ee(i, c, {
|
|
552
|
+
canEdit: f.current !== !1 ? 2 : void 0,
|
|
420
553
|
highlightColumns: d
|
|
421
|
-
}),
|
|
422
|
-
|
|
423
|
-
o,
|
|
554
|
+
}), A(i), (a = (l = t.current) == null ? void 0 : l.onRowDelete) == null || a.call(
|
|
555
|
+
l,
|
|
424
556
|
i,
|
|
557
|
+
c,
|
|
425
558
|
u
|
|
426
559
|
);
|
|
427
|
-
}), window.TGSetEvent("OnRowUndelete", e, (
|
|
428
|
-
var d,
|
|
429
|
-
const u =
|
|
430
|
-
|
|
431
|
-
canEdit:
|
|
560
|
+
}), window.TGSetEvent("OnRowUndelete", e, (i, c) => {
|
|
561
|
+
var d, l;
|
|
562
|
+
const u = y(c) ? V(c) : [];
|
|
563
|
+
ee(i, c, {
|
|
564
|
+
canEdit: f.current !== !1 ? 1 : void 0,
|
|
432
565
|
highlightColumns: u,
|
|
433
|
-
highlightBackgroundColor: u.length ?
|
|
434
|
-
}),
|
|
435
|
-
}), window.TGSetEvent("OnGetDefaultColor", e, (
|
|
436
|
-
if (!(!r.current || !
|
|
437
|
-
return
|
|
438
|
-
o,
|
|
566
|
+
highlightBackgroundColor: u.length ? C.current : void 0
|
|
567
|
+
}), A(i), (l = (d = t.current) == null ? void 0 : d.onRowUndelete) == null || l.call(d, i, c);
|
|
568
|
+
}), window.TGSetEvent("OnGetDefaultColor", e, (i, c, u) => {
|
|
569
|
+
if (!(!r.current || !p(c)))
|
|
570
|
+
return St(
|
|
439
571
|
i,
|
|
572
|
+
c,
|
|
440
573
|
u,
|
|
441
|
-
|
|
574
|
+
T.current
|
|
442
575
|
);
|
|
443
|
-
}), window.TGSetEvent("OnGetColor", e, (
|
|
444
|
-
if (!
|
|
445
|
-
return
|
|
446
|
-
grid:
|
|
447
|
-
row:
|
|
576
|
+
}), window.TGSetEvent("OnGetColor", e, (i, c, u, d, l, a, G) => {
|
|
577
|
+
if (!G)
|
|
578
|
+
return gt({
|
|
579
|
+
grid: i,
|
|
580
|
+
row: c,
|
|
448
581
|
col: u,
|
|
449
582
|
r: d,
|
|
450
|
-
g:
|
|
583
|
+
g: l,
|
|
451
584
|
b: a,
|
|
452
|
-
selectedCellBackgroundColor:
|
|
585
|
+
selectedCellBackgroundColor: h.current,
|
|
453
586
|
hoverCellBackgroundColor: R.current
|
|
454
587
|
});
|
|
455
|
-
}), window.TGSetEvent("OnAfterValueChanged", e, (
|
|
456
|
-
var a,
|
|
457
|
-
s.current &&
|
|
588
|
+
}), window.TGSetEvent("OnAfterValueChanged", e, (i, c, u, d) => {
|
|
589
|
+
var a, G;
|
|
590
|
+
s.current && p(c) && Et({
|
|
458
591
|
gridId: e,
|
|
459
|
-
grid:
|
|
460
|
-
row:
|
|
592
|
+
grid: i,
|
|
593
|
+
row: c,
|
|
461
594
|
col: u,
|
|
462
|
-
backgroundColor:
|
|
463
|
-
baselineMap:
|
|
595
|
+
backgroundColor: C.current,
|
|
596
|
+
baselineMap: m.current
|
|
464
597
|
});
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
})
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
(
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
598
|
+
const l = ((a = t.current) == null ? void 0 : a.onAfterValueChanged) ?? ((G = t.current) == null ? void 0 : G.onRowChange);
|
|
599
|
+
l == null || l(i, c, u, d);
|
|
600
|
+
});
|
|
601
|
+
const v = D((i) => {
|
|
602
|
+
var u, d;
|
|
603
|
+
const c = i.GetSelRows() ?? [];
|
|
604
|
+
(d = (u = t.current) == null ? void 0 : u.onSelect) == null || d.call(
|
|
605
|
+
u,
|
|
606
|
+
me(i, c)
|
|
607
|
+
);
|
|
608
|
+
}, 100);
|
|
609
|
+
window.TGSetEvent("OnSelect", e, (i, c, u, d, l) => {
|
|
610
|
+
var a;
|
|
611
|
+
l || (q(i, e), typeof ((a = t.current) == null ? void 0 : a.onSelect) == "function" && v(i));
|
|
612
|
+
}), window.TGSetEvent("OnSelectAll", e, (i, c, u, d) => {
|
|
613
|
+
var l;
|
|
614
|
+
d || (q(i, e), typeof ((l = t.current) == null ? void 0 : l.onSelect) == "function" && v(i));
|
|
615
|
+
}), typeof (E == null ? void 0 : E.onSave) == "function" && window.TGSetEvent("OnSave", e, (i, c, u) => {
|
|
616
|
+
var d, l;
|
|
617
|
+
(l = (d = t.current) == null ? void 0 : d.onSave) == null || l.call(
|
|
481
618
|
d,
|
|
482
|
-
o,
|
|
483
619
|
i,
|
|
620
|
+
c,
|
|
484
621
|
u
|
|
485
622
|
);
|
|
486
|
-
}), window.TGSetEvent("OnSort", e, (
|
|
623
|
+
}), window.TGSetEvent("OnSort", e, (i, c) => {
|
|
487
624
|
var u;
|
|
488
|
-
if (!(!
|
|
489
|
-
return
|
|
490
|
-
rowId: (u =
|
|
491
|
-
col:
|
|
625
|
+
if (!(!c || !fe(i, i.ARow, c)))
|
|
626
|
+
return ue(e, "group header sort blocked"), Be(e, "group header sort blocked", {
|
|
627
|
+
rowId: (u = i.ARow) == null ? void 0 : u.id,
|
|
628
|
+
col: c
|
|
492
629
|
}), -1;
|
|
493
|
-
}), window.TGSetEvent("OnRenderStart", e, (
|
|
494
|
-
|
|
495
|
-
}), window.TGSetEvent("
|
|
630
|
+
}), window.TGSetEvent("OnRenderStart", e, (i) => {
|
|
631
|
+
B(i, e), oe(i, e, !1);
|
|
632
|
+
}), window.TGSetEvent("OnRenderFinish", e, (i) => {
|
|
633
|
+
B(i, e);
|
|
634
|
+
}), window.TGSetEvent("OnDataGet", e, (i, c, u) => {
|
|
635
|
+
if ((c == null ? void 0 : c.Name) === "Layout" && typeof u == "string") {
|
|
636
|
+
n.current = X(u);
|
|
637
|
+
const d = O(u);
|
|
638
|
+
return d === u ? null : d;
|
|
639
|
+
}
|
|
640
|
+
return null;
|
|
641
|
+
}), window.TGSetEvent("OnDataParse", e, (i, c, u) => {
|
|
642
|
+
if ((c == null ? void 0 : c.Name) === "Layout" && typeof u == "string") {
|
|
643
|
+
n.current = X(u);
|
|
644
|
+
const d = O(u);
|
|
645
|
+
return d === u ? null : d;
|
|
646
|
+
}
|
|
647
|
+
return null;
|
|
648
|
+
}), window.TGSetEvent(
|
|
496
649
|
"OnReady",
|
|
497
650
|
e,
|
|
498
|
-
|
|
499
|
-
var
|
|
500
|
-
if (!
|
|
501
|
-
const d =
|
|
502
|
-
|
|
503
|
-
bodyRowCount:
|
|
504
|
-
|
|
651
|
+
D((i) => {
|
|
652
|
+
var c, u;
|
|
653
|
+
if (!U.current) {
|
|
654
|
+
const d = Ee.current;
|
|
655
|
+
U.current = !0, !n.current && (i.EnterMode === void 0 || i.EnterMode === null || i.EnterMode === 0) && tt(i, xe), we(i, d), x.current = i, he.current = d, Ce.current = te(i), m.current = /* @__PURE__ */ new WeakMap(), lt(i, m.current), A(i), Se(!0), oe(i, e, !0), de(e, "TreeGrid init ready", N.current, {
|
|
656
|
+
bodyRowCount: st(
|
|
657
|
+
te(i)
|
|
505
658
|
)
|
|
506
|
-
}),
|
|
659
|
+
}), N.current = null, (u = (c = t.current) == null ? void 0 : c.onReady) == null || u.call(c, i);
|
|
507
660
|
}
|
|
508
661
|
}, 100)
|
|
509
662
|
);
|
|
510
663
|
}, "bindTreeGridEvents");
|
|
511
664
|
export {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
665
|
+
Nt as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
|
|
666
|
+
$t as bindTreeGridEvents,
|
|
667
|
+
Ut as buildTreeGridInitializationOptions,
|
|
668
|
+
lt as captureTreeGridChangeBaselines,
|
|
669
|
+
st as getTreeGridBodyDataCount,
|
|
670
|
+
vt as hasTreeGridDisplayDataRows,
|
|
671
|
+
X as hasTreeGridExplicitEnterMode,
|
|
672
|
+
Ft as replaceTreeGridBodyData,
|
|
673
|
+
Et as syncTreeGridChangedCellHighlight
|
|
521
674
|
};
|
|
522
675
|
//# sourceMappingURL=treeGridRuntime.js.map
|