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