@owp/core 2.5.12 → 2.5.14
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/index11.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js +78 -0
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js.map +1 -0
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +79 -77
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +105 -103
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +214 -188
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/index.js +68 -65
- package/dist/index.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- 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/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/types/components/OwpCommonCode/OwpCommonCodeQuerySelector.d.ts +32 -0
- package/dist/types/components/OwpCommonCode/index.d.ts +2 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +2 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +2 -1
- package/dist/types/utils/treeGridUtil.d.ts +23 -0
- package/dist/utils/treeGridExportExcelUtil.js +118 -118
- package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
- package/dist/utils/treeGridUtil.js +123 -103
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/dist/utils.js +81 -75
- package/package.json +1 -1
|
@@ -1,55 +1,75 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { highlightTreeGridCellById as
|
|
5
|
-
import { enqueueSnackbar as
|
|
6
|
-
import { applyTreeGridLayoutToGrid as
|
|
7
|
-
import { resolveTreeGridColumnEditValue as
|
|
8
|
-
import { countTreeGridPerf as
|
|
9
|
-
import { debounce as
|
|
10
|
-
import { get as
|
|
11
|
-
import { isEmpty as
|
|
12
|
-
const
|
|
1
|
+
var X = Object.defineProperty;
|
|
2
|
+
var a = (e, t) => X(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { getTreeGridTextResourceUrl as Z, TREEGRID_CELL_HIGHLIGHT_CLASS as H } from "../../../constants/treeGrid.js";
|
|
4
|
+
import { isTreeGridRowAddedById as b, getTreeGridAddedRowHighlightColumns as w, highlightTreeGridCellById as ee, appendTreeGridAddedRowHighlightColumn as te } from "../../../utils/treeGridUtil.js";
|
|
5
|
+
import { enqueueSnackbar as ne } from "notistack";
|
|
6
|
+
import { applyTreeGridLayoutToGrid as re } from "./treeGridLayout.js";
|
|
7
|
+
import { resolveTreeGridColumnEditValue as oe, resetTreeGridColumnEditRulesState as ie, syncTreeGridColumnEditRules as ue } from "./treeGridColumnEditRules.js";
|
|
8
|
+
import { countTreeGridPerf as W, logTreeGridPerf as ce, measureTreeGridPerf as M } from "./utils/perf.js";
|
|
9
|
+
import { debounce as _ } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
10
|
+
import { get as se } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
11
|
+
import { isEmpty as ae } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
12
|
+
const $e = 300, de = [255, 255, 166], fe = [240, 240, 240], Ge = [248, 248, 248], le = [255, 255, 255], Te = [255, 255, 254], pe = [242, 242, 242], x = "Button", z = /* @__PURE__ */ a((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), V = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ a((e) => {
|
|
13
13
|
if (!e || !e.startsWith("data:"))
|
|
14
14
|
return e;
|
|
15
|
-
const t =
|
|
15
|
+
const t = V.get(e);
|
|
16
16
|
if (t)
|
|
17
17
|
return t;
|
|
18
18
|
try {
|
|
19
|
-
const [n,
|
|
20
|
-
for (let
|
|
21
|
-
|
|
22
|
-
const T = URL.createObjectURL(new Blob([
|
|
23
|
-
return
|
|
19
|
+
const [n, r = ""] = e.split(",", 2), c = /^data:([^;]*)(;base64)?$/i.exec(n), f = (c == null ? void 0 : c[1]) || "application/octet-stream", G = c != null && c[2] ? atob(r) : decodeURIComponent(r), p = new Uint8Array(G.length);
|
|
20
|
+
for (let R = 0; R < G.length; R += 1)
|
|
21
|
+
p[R] = G.charCodeAt(R);
|
|
22
|
+
const T = URL.createObjectURL(new Blob([p], { type: f }));
|
|
23
|
+
return V.set(e, T), T;
|
|
24
24
|
} catch {
|
|
25
25
|
return e;
|
|
26
26
|
}
|
|
27
|
-
}, "resolveTreeGridInlineUrl"),
|
|
28
|
-
if (!e ||
|
|
29
|
-
return
|
|
30
|
-
const t = e.indexOf("#"), [n,
|
|
31
|
-
return `${n}${
|
|
32
|
-
}, "appendNoCacheQuery"),
|
|
27
|
+
}, "resolveTreeGridInlineUrl"), A = /* @__PURE__ */ a((e) => {
|
|
28
|
+
if (!e || z(e))
|
|
29
|
+
return Ce(e);
|
|
30
|
+
const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], c = n.includes("?") ? "&" : "?";
|
|
31
|
+
return `${n}${c}noCache=${Date.now()}${r}`;
|
|
32
|
+
}, "appendNoCacheQuery"), N = /* @__PURE__ */ a((e, t, n) => {
|
|
33
|
+
if (!e)
|
|
34
|
+
return;
|
|
35
|
+
const r = n.canEdit, c = n.highlightColumns ?? [], f = n.highlightBackgroundColor;
|
|
36
|
+
if (!(r === void 0 && !c.length)) {
|
|
37
|
+
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
38
|
+
try {
|
|
39
|
+
r !== void 0 && (t.CanEdit = r), c.forEach((G) => {
|
|
40
|
+
G && (e.SetValue(
|
|
41
|
+
t,
|
|
42
|
+
`${G}Class`,
|
|
43
|
+
f ? H : "",
|
|
44
|
+
0
|
|
45
|
+
), e.SetValue(t, `${G}Color`, f ?? "", 0));
|
|
46
|
+
});
|
|
47
|
+
} finally {
|
|
48
|
+
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
49
|
+
}
|
|
50
|
+
typeof e.RefreshRow == "function" && e.RefreshRow(t);
|
|
51
|
+
}
|
|
52
|
+
}, "syncTreeGridDeletedRowState"), Re = /* @__PURE__ */ a((e) => e ? z(e) || e.includes("assets") ? A(e) : A(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), he = /* @__PURE__ */ a((e, t, n) => e ? { Url: Re(t) } : { Data: { Body: [ae(n) ? [] : n] } }, "buildTreeGridDataSource"), Pe = /* @__PURE__ */ a(({
|
|
33
53
|
id: e,
|
|
34
54
|
layoutUrl: t,
|
|
35
55
|
layoutData: n,
|
|
36
|
-
dataUrl:
|
|
37
|
-
bodyData:
|
|
38
|
-
useDataUrl:
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
56
|
+
dataUrl: r,
|
|
57
|
+
bodyData: c,
|
|
58
|
+
useDataUrl: f,
|
|
59
|
+
width: G,
|
|
60
|
+
height: p,
|
|
41
61
|
languageId: T
|
|
42
62
|
}) => ({
|
|
43
63
|
id: e,
|
|
44
|
-
Layout: n ? { Data: n } : { Url:
|
|
45
|
-
Data:
|
|
64
|
+
Layout: n ? { Data: n } : { Url: A(t ?? "") },
|
|
65
|
+
Data: he(f, r, c),
|
|
46
66
|
Text: {
|
|
47
|
-
Url:
|
|
67
|
+
Url: Z(T)
|
|
48
68
|
},
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
69
|
+
width: G,
|
|
70
|
+
height: p,
|
|
51
71
|
Debug: "Error"
|
|
52
|
-
}), "buildTreeGridInitializationOptions"),
|
|
72
|
+
}), "buildTreeGridInitializationOptions"), k = /* @__PURE__ */ a((e) => se(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), F = /* @__PURE__ */ a((e) => {
|
|
53
73
|
if (typeof e == "number")
|
|
54
74
|
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
55
75
|
if (typeof e != "string")
|
|
@@ -59,67 +79,67 @@ const Le = 300, oe = [255, 255, 166], ue = [240, 240, 240], ce = [248, 248, 248]
|
|
|
59
79
|
return;
|
|
60
80
|
const n = Number(t);
|
|
61
81
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
62
|
-
}, "parseTreeGridPositiveNumber"),
|
|
82
|
+
}, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ a((e, t, n, r) => {
|
|
63
83
|
if (!t || !n)
|
|
64
84
|
return;
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
t[`${n}${
|
|
85
|
+
const c = e.GetAttribute(t, n, r), f = F(c);
|
|
86
|
+
return f !== void 0 ? f : F(
|
|
87
|
+
t[`${n}${r}`]
|
|
68
88
|
);
|
|
69
|
-
}, "getTreeGridHeaderCellSpanAttribute"),
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
89
|
+
}, "getTreeGridHeaderCellSpanAttribute"), j = /* @__PURE__ */ a((e, t, n) => !t || !n || t.Fixed !== "Head" || ($(e, t, n, "Span") ?? 1) <= 1 ? !1 : ($(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), P = /* @__PURE__ */ a((e, t, n = !1) => {
|
|
90
|
+
const r = typeof performance < "u" ? performance.now() : Date.now(), c = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((T) => T.Fixed === "Head") : [], f = typeof e.GetCols == "function" ? e.GetCols() : [];
|
|
91
|
+
if (!c.length || !f.length)
|
|
72
92
|
return;
|
|
73
|
-
const
|
|
74
|
-
let
|
|
93
|
+
const G = /* @__PURE__ */ new Set();
|
|
94
|
+
let p = 0;
|
|
75
95
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
76
96
|
try {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
97
|
+
c.forEach((T) => {
|
|
98
|
+
f.forEach((R) => {
|
|
99
|
+
j(e, T, R) && e.GetAttribute(T, R, x) !== "" && (e.SetAttribute(T, R, x, "", 0, 0), G.add(T), p += 1);
|
|
80
100
|
});
|
|
81
101
|
});
|
|
82
102
|
} finally {
|
|
83
103
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
84
104
|
}
|
|
85
|
-
|
|
105
|
+
G.size && (n && G.forEach((T) => {
|
|
86
106
|
typeof e.RefreshRow == "function" && e.RefreshRow(T);
|
|
87
|
-
}),
|
|
88
|
-
updatedCellCount:
|
|
89
|
-
updatedRowCount:
|
|
107
|
+
}), W(t, "group header button attribute apply"), M(t, "group header button attribute apply", r, {
|
|
108
|
+
updatedCellCount: p,
|
|
109
|
+
updatedRowCount: G.size
|
|
90
110
|
}));
|
|
91
|
-
}, "applyTreeGridGroupHeaderSortButtonAttributes"),
|
|
111
|
+
}, "applyTreeGridGroupHeaderSortButtonAttributes"), Ee = /* @__PURE__ */ a((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), Se = /* @__PURE__ */ a((e) => {
|
|
92
112
|
const t = e == null ? void 0 : e.Visible;
|
|
93
113
|
return !!e && t !== 0 && t !== !1 && t !== "0";
|
|
94
|
-
}, "isVisibleTreeGridRow"),
|
|
114
|
+
}, "isVisibleTreeGridRow"), ye = /* @__PURE__ */ a((e) => {
|
|
95
115
|
const t = e == null ? void 0 : e.Added;
|
|
96
116
|
return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
|
|
97
|
-
}, "isAddedTreeGridRow"), E = /* @__PURE__ */
|
|
98
|
-
const
|
|
99
|
-
return
|
|
100
|
-
}, "hasExplicitTreeGridCellColor"),
|
|
101
|
-
if (!(!t ||
|
|
102
|
-
return
|
|
103
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
117
|
+
}, "isAddedTreeGridRow"), E = /* @__PURE__ */ a((e) => !e || e.Fixed === "Foot" || !Se(e) ? !1 : e.Kind === "Data" || ye(e), "isDisplayTreeGridRow"), me = /* @__PURE__ */ a((e, t, n) => !t || !n || !E(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), _e = /* @__PURE__ */ a((e, t, n) => {
|
|
118
|
+
const r = e.GetAttribute(t, n, "Color");
|
|
119
|
+
return r != null && r !== "";
|
|
120
|
+
}, "hasExplicitTreeGridCellColor"), De = /* @__PURE__ */ a((e, t, n, r) => {
|
|
121
|
+
if (!(!t || r === void 0 || !me(e, t, n) || _e(e, t, n)))
|
|
122
|
+
return r;
|
|
123
|
+
}, "getEditableTreeGridCellDefaultColor"), S = /* @__PURE__ */ a((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), be = /* @__PURE__ */ a((e, t, n) => {
|
|
104
124
|
if (!t || !n || !E(t))
|
|
105
125
|
return !1;
|
|
106
|
-
const
|
|
107
|
-
return
|
|
108
|
-
}, "isTreeGridSelectedCellState"),
|
|
126
|
+
const r = e.IsSelected(t, n);
|
|
127
|
+
return r !== 0 && r !== !1 && r !== void 0 && r !== null;
|
|
128
|
+
}, "isTreeGridSelectedCellState"), Ae = /* @__PURE__ */ a((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), ve = /* @__PURE__ */ a((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), Be = /* @__PURE__ */ a(({
|
|
109
129
|
grid: e,
|
|
110
130
|
row: t,
|
|
111
131
|
col: n,
|
|
112
|
-
r
|
|
113
|
-
g:
|
|
114
|
-
b:
|
|
115
|
-
selectedCellBackgroundColor:
|
|
116
|
-
hoverCellBackgroundColor:
|
|
132
|
+
r,
|
|
133
|
+
g: c,
|
|
134
|
+
b: f,
|
|
135
|
+
selectedCellBackgroundColor: G,
|
|
136
|
+
hoverCellBackgroundColor: p
|
|
117
137
|
}) => {
|
|
118
|
-
if (
|
|
138
|
+
if (be(e, t, n) && S(r, c, f, de))
|
|
139
|
+
return G;
|
|
140
|
+
if (Ae(e, t, n) && (S(r, c, f, fe) || S(r, c, f, Ge)) || ve(e, t, n) && (S(r, c, f, le) || S(r, c, f, Te) || S(r, c, f, pe)))
|
|
119
141
|
return p;
|
|
120
|
-
|
|
121
|
-
return l;
|
|
122
|
-
}, "resolveTreeGridStateBackgroundColor"), Ne = /* @__PURE__ */ f((e) => {
|
|
142
|
+
}, "resolveTreeGridStateBackgroundColor"), We = /* @__PURE__ */ a((e) => {
|
|
123
143
|
if (!e)
|
|
124
144
|
return !1;
|
|
125
145
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
@@ -132,166 +152,172 @@ const Le = 300, oe = [255, 255, 166], ue = [240, 240, 240], ce = [248, 248, 248]
|
|
|
132
152
|
return !1;
|
|
133
153
|
}
|
|
134
154
|
return Object.values(e.Rows ?? {}).some((t) => E(t));
|
|
135
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
136
|
-
var
|
|
137
|
-
const
|
|
155
|
+
}, "hasTreeGridDisplayDataRows"), Me = /* @__PURE__ */ a((e, t, n) => {
|
|
156
|
+
var c;
|
|
157
|
+
const r = (c = e.Data) == null ? void 0 : c.Data;
|
|
138
158
|
e.Data.Data = {
|
|
139
|
-
...
|
|
159
|
+
...r,
|
|
140
160
|
Data: { Body: [t || []] },
|
|
141
161
|
Url: ""
|
|
142
162
|
}, e.ReloadBody(n);
|
|
143
|
-
}, "replaceTreeGridBodyData"),
|
|
163
|
+
}, "replaceTreeGridBodyData"), ze = /* @__PURE__ */ a(({
|
|
144
164
|
id: e,
|
|
145
165
|
latestEventHandlersRef: t,
|
|
146
166
|
highlightEditableCellsRef: n,
|
|
147
|
-
highlightChangedCellsRef:
|
|
148
|
-
|
|
149
|
-
|
|
167
|
+
highlightChangedCellsRef: r,
|
|
168
|
+
syncDeletedRowCanEditRef: c,
|
|
169
|
+
editableCellBackgroundColorValueRef: f,
|
|
170
|
+
changedCellBackgroundColorRef: G,
|
|
150
171
|
selectedCellBackgroundColorRef: p,
|
|
151
|
-
hoverCellBackgroundColorRef:
|
|
152
|
-
treeGridInstanceRef:
|
|
153
|
-
treeGridInitStartedAtRef:
|
|
154
|
-
latestLayoutOverridesRef:
|
|
155
|
-
appliedLayoutOverridesRef:
|
|
156
|
-
appliedBodyDataPropRef:
|
|
157
|
-
latestColumnEditRulesRef:
|
|
158
|
-
latestColumnEditRuleLookupRef:
|
|
159
|
-
appliedColumnEditRulesRef:
|
|
160
|
-
columnEditRulesStateRef:
|
|
161
|
-
hasAppliedInitialLayoutRef:
|
|
162
|
-
syncHasDisplayDataRows:
|
|
163
|
-
setIsTreeGridReady:
|
|
172
|
+
hoverCellBackgroundColorRef: T,
|
|
173
|
+
treeGridInstanceRef: R,
|
|
174
|
+
treeGridInitStartedAtRef: v,
|
|
175
|
+
latestLayoutOverridesRef: q,
|
|
176
|
+
appliedLayoutOverridesRef: Y,
|
|
177
|
+
appliedBodyDataPropRef: K,
|
|
178
|
+
latestColumnEditRulesRef: Q,
|
|
179
|
+
latestColumnEditRuleLookupRef: B,
|
|
180
|
+
appliedColumnEditRulesRef: g,
|
|
181
|
+
columnEditRulesStateRef: I,
|
|
182
|
+
hasAppliedInitialLayoutRef: O,
|
|
183
|
+
syncHasDisplayDataRows: y,
|
|
184
|
+
setIsTreeGridReady: J
|
|
164
185
|
}) => {
|
|
165
|
-
const
|
|
166
|
-
window.TGSetEvent("OnRowAdd", e, (
|
|
167
|
-
var u,
|
|
168
|
-
|
|
169
|
-
}), window.TGSetEvent("OnRowAdded", e, (
|
|
170
|
-
|
|
171
|
-
}), typeof (
|
|
186
|
+
const C = t.current;
|
|
187
|
+
window.TGSetEvent("OnRowAdd", e, (i, o) => {
|
|
188
|
+
var u, s;
|
|
189
|
+
o.CanEdit = 1, o.CanDelete = 1, (s = (u = t.current) == null ? void 0 : u.onRowAdd) == null || s.call(u, i, o);
|
|
190
|
+
}), window.TGSetEvent("OnRowAdded", e, (i) => {
|
|
191
|
+
y(i);
|
|
192
|
+
}), typeof (C == null ? void 0 : C.onRowClick) == "function" && window.TGSetEvent(
|
|
172
193
|
"OnClick",
|
|
173
194
|
e,
|
|
174
|
-
|
|
175
|
-
var
|
|
176
|
-
(m = (
|
|
177
|
-
|
|
178
|
-
r,
|
|
179
|
-
c,
|
|
180
|
-
u,
|
|
195
|
+
_((i, o, u, s, d, l) => {
|
|
196
|
+
var h, m;
|
|
197
|
+
(m = (h = t.current) == null ? void 0 : h.onRowClick) == null || m.call(
|
|
198
|
+
h,
|
|
181
199
|
i,
|
|
182
|
-
|
|
183
|
-
|
|
200
|
+
o,
|
|
201
|
+
u,
|
|
202
|
+
s,
|
|
203
|
+
d,
|
|
204
|
+
l
|
|
184
205
|
);
|
|
185
206
|
}, 300)
|
|
186
|
-
), typeof (
|
|
207
|
+
), typeof (C == null ? void 0 : C.onClickButton) == "function" && window.TGSetEvent(
|
|
187
208
|
"OnClickButton",
|
|
188
209
|
e,
|
|
189
|
-
|
|
190
|
-
var
|
|
191
|
-
(
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
210
|
+
_((i, o, u, s) => {
|
|
211
|
+
var d, l;
|
|
212
|
+
(l = (d = t.current) == null ? void 0 : d.onClickButton) == null || l.call(
|
|
213
|
+
d,
|
|
214
|
+
i,
|
|
215
|
+
o,
|
|
195
216
|
u,
|
|
196
|
-
|
|
217
|
+
s
|
|
197
218
|
);
|
|
198
219
|
}, 300)
|
|
199
|
-
),
|
|
200
|
-
var
|
|
201
|
-
|
|
220
|
+
), window.TGSetEvent("OnRowDelete", e, (i, o, u) => {
|
|
221
|
+
var d, l;
|
|
222
|
+
const s = b(o) ? w(o) : [];
|
|
223
|
+
N(i, o, {
|
|
224
|
+
canEdit: c.current !== !1 ? 2 : void 0,
|
|
225
|
+
highlightColumns: s
|
|
226
|
+
}), y(i), (l = (d = t.current) == null ? void 0 : d.onRowDelete) == null || l.call(
|
|
227
|
+
d,
|
|
202
228
|
i,
|
|
203
|
-
|
|
204
|
-
c,
|
|
229
|
+
o,
|
|
205
230
|
u
|
|
206
231
|
);
|
|
207
|
-
})
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
232
|
+
}), window.TGSetEvent("OnRowUndelete", e, (i, o) => {
|
|
233
|
+
var s, d;
|
|
234
|
+
const u = b(o) ? w(o) : [];
|
|
235
|
+
N(i, o, {
|
|
236
|
+
canEdit: c.current !== !1 ? 1 : void 0,
|
|
237
|
+
highlightColumns: u,
|
|
238
|
+
highlightBackgroundColor: u.length ? G.current : void 0
|
|
239
|
+
}), y(i), (d = (s = t.current) == null ? void 0 : s.onRowUndelete) == null || d.call(s, i, o);
|
|
240
|
+
}), window.TGSetEvent("OnGetDefaultColor", e, (i, o, u) => {
|
|
241
|
+
if (!(!n.current || !E(o)))
|
|
242
|
+
return De(
|
|
243
|
+
i,
|
|
244
|
+
o,
|
|
219
245
|
u,
|
|
220
|
-
|
|
246
|
+
f.current
|
|
221
247
|
);
|
|
222
|
-
}), window.TGSetEvent("OnGetColor", e, (
|
|
223
|
-
if (!
|
|
224
|
-
return
|
|
225
|
-
grid:
|
|
226
|
-
row:
|
|
248
|
+
}), window.TGSetEvent("OnGetColor", e, (i, o, u, s, d, l, h) => {
|
|
249
|
+
if (!h)
|
|
250
|
+
return Be({
|
|
251
|
+
grid: i,
|
|
252
|
+
row: o,
|
|
227
253
|
col: u,
|
|
228
|
-
r:
|
|
229
|
-
g:
|
|
230
|
-
b:
|
|
254
|
+
r: s,
|
|
255
|
+
g: d,
|
|
256
|
+
b: l,
|
|
231
257
|
selectedCellBackgroundColor: p.current,
|
|
232
|
-
hoverCellBackgroundColor:
|
|
258
|
+
hoverCellBackgroundColor: T.current
|
|
233
259
|
});
|
|
234
|
-
}), window.TGSetEvent("OnAfterValueChanged", e, (
|
|
235
|
-
var
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
row:
|
|
260
|
+
}), window.TGSetEvent("OnAfterValueChanged", e, (i, o, u, s) => {
|
|
261
|
+
var U, L;
|
|
262
|
+
const d = B.current, l = d ? oe(d, u, s) : void 0, h = l == null ? void 0 : l.value, m = h ?? s;
|
|
263
|
+
l != null && l.invalidText && ne(l.invalidText, { variant: "warning" }), h !== void 0 && i.SetValue(o, u, h, 1), r.current && E(o) && (ee(e, {
|
|
264
|
+
row: o,
|
|
239
265
|
col: u,
|
|
240
|
-
backgroundColor:
|
|
241
|
-
});
|
|
242
|
-
const D = ((
|
|
243
|
-
D == null || D(
|
|
244
|
-
}), typeof (
|
|
266
|
+
backgroundColor: G.current
|
|
267
|
+
}), b(o) && te(o, u));
|
|
268
|
+
const D = ((U = t.current) == null ? void 0 : U.onAfterValueChanged) ?? ((L = t.current) == null ? void 0 : L.onRowChange);
|
|
269
|
+
D == null || D(i, o, u, m);
|
|
270
|
+
}), typeof (C == null ? void 0 : C.onSelect) == "function" && window.TGSetEvent(
|
|
245
271
|
"OnSelect",
|
|
246
272
|
e,
|
|
247
|
-
|
|
248
|
-
var u,
|
|
249
|
-
const
|
|
250
|
-
(
|
|
273
|
+
_((i) => {
|
|
274
|
+
var u, s;
|
|
275
|
+
const o = i.GetSelRows() ?? [];
|
|
276
|
+
(s = (u = t.current) == null ? void 0 : u.onSelect) == null || s.call(u, o);
|
|
251
277
|
}, 100)
|
|
252
|
-
), typeof (
|
|
253
|
-
var
|
|
254
|
-
(
|
|
278
|
+
), typeof (C == null ? void 0 : C.onSave) == "function" && window.TGSetEvent("OnSave", e, (i, o, u) => {
|
|
279
|
+
var s, d;
|
|
280
|
+
(d = (s = t.current) == null ? void 0 : s.onSave) == null || d.call(
|
|
281
|
+
s,
|
|
255
282
|
i,
|
|
256
|
-
|
|
257
|
-
c,
|
|
283
|
+
o,
|
|
258
284
|
u
|
|
259
285
|
);
|
|
260
|
-
}), window.TGSetEvent("OnSort", e, (
|
|
286
|
+
}), window.TGSetEvent("OnSort", e, (i, o) => {
|
|
261
287
|
var u;
|
|
262
|
-
if (!(!
|
|
263
|
-
return
|
|
264
|
-
rowId: (u =
|
|
265
|
-
col:
|
|
288
|
+
if (!(!o || !j(i, i.ARow, o)))
|
|
289
|
+
return W(e, "group header sort blocked"), ce(e, "group header sort blocked", {
|
|
290
|
+
rowId: (u = i.ARow) == null ? void 0 : u.id,
|
|
291
|
+
col: o
|
|
266
292
|
}), -1;
|
|
267
|
-
}), window.TGSetEvent("OnRenderStart", e, (
|
|
268
|
-
|
|
293
|
+
}), window.TGSetEvent("OnRenderStart", e, (i) => {
|
|
294
|
+
P(i, e, !1);
|
|
269
295
|
}), window.TGSetEvent(
|
|
270
296
|
"OnReady",
|
|
271
297
|
e,
|
|
272
|
-
|
|
273
|
-
var
|
|
274
|
-
if (!
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
),
|
|
281
|
-
bodyRowCount:
|
|
282
|
-
|
|
298
|
+
_((i) => {
|
|
299
|
+
var o, u;
|
|
300
|
+
if (!O.current) {
|
|
301
|
+
const s = q.current;
|
|
302
|
+
O.current = !0, re(i, s), ie(I.current), ue(
|
|
303
|
+
i,
|
|
304
|
+
B.current,
|
|
305
|
+
I.current
|
|
306
|
+
), R.current = i, Y.current = s, K.current = k(i), g.current = Q.current, y(i), J(!0), P(i, e, !0), M(e, "TreeGrid init ready", v.current, {
|
|
307
|
+
bodyRowCount: Ee(
|
|
308
|
+
k(i)
|
|
283
309
|
)
|
|
284
|
-
}),
|
|
310
|
+
}), v.current = null, (u = (o = t.current) == null ? void 0 : o.onReady) == null || u.call(o, i);
|
|
285
311
|
}
|
|
286
312
|
}, 100)
|
|
287
313
|
);
|
|
288
314
|
}, "bindTreeGridEvents");
|
|
289
315
|
export {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
316
|
+
$e as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
|
|
317
|
+
ze as bindTreeGridEvents,
|
|
318
|
+
Pe as buildTreeGridInitializationOptions,
|
|
319
|
+
Ee as getTreeGridBodyDataCount,
|
|
320
|
+
We as hasTreeGridDisplayDataRows,
|
|
321
|
+
Me as replaceTreeGridBodyData
|
|
296
322
|
};
|
|
297
323
|
//# sourceMappingURL=treeGridRuntime.js.map
|