@owp/core 2.5.14 → 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/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 +145 -137
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +195 -160
- 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/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-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 +2 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -2
- package/dist/types/hooks/useConfirm.d.ts +7 -14
- package/package.json +1 -1
|
@@ -1,75 +1,83 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { isTreeGridRowAddedById as
|
|
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
5
|
import { enqueueSnackbar as ne } from "notistack";
|
|
6
6
|
import { applyTreeGridLayoutToGrid as re } from "./treeGridLayout.js";
|
|
7
7
|
import { resolveTreeGridColumnEditValue as oe, resetTreeGridColumnEditRulesState as ie, syncTreeGridColumnEditRules as ue } from "./treeGridColumnEditRules.js";
|
|
8
8
|
import { countTreeGridPerf as W, logTreeGridPerf as ce, measureTreeGridPerf as M } from "./utils/perf.js";
|
|
9
9
|
import { debounce as _ } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
10
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
|
|
12
|
-
const
|
|
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
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
|
|
23
|
-
return V.set(e,
|
|
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"), A = /* @__PURE__ */
|
|
28
|
-
if (!e ||
|
|
29
|
-
return
|
|
30
|
-
const t = e.indexOf("#"), [n,
|
|
31
|
-
return `${n}${c}noCache=${Date.now()}${
|
|
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
33
|
if (!e)
|
|
34
34
|
return;
|
|
35
|
-
const
|
|
36
|
-
if (!(
|
|
35
|
+
const o = n.canEdit, c = n.highlightColumns ?? [], d = n.highlightBackgroundColor;
|
|
36
|
+
if (!(o === void 0 && !c.length)) {
|
|
37
37
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
o !== void 0 && (t.CanEdit = o), c.forEach((G) => {
|
|
40
40
|
G && (e.SetValue(
|
|
41
41
|
t,
|
|
42
42
|
`${G}Class`,
|
|
43
|
-
|
|
43
|
+
d ? H : "",
|
|
44
44
|
0
|
|
45
|
-
), e.SetValue(t, `${G}Color`,
|
|
45
|
+
), e.SetValue(t, `${G}Color`, d ?? "", 0));
|
|
46
46
|
});
|
|
47
47
|
} finally {
|
|
48
48
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
49
49
|
}
|
|
50
50
|
typeof e.RefreshRow == "function" && e.RefreshRow(t);
|
|
51
51
|
}
|
|
52
|
-
}, "syncTreeGridDeletedRowState"),
|
|
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(({
|
|
53
61
|
id: e,
|
|
54
62
|
layoutUrl: t,
|
|
55
63
|
layoutData: n,
|
|
56
|
-
dataUrl:
|
|
64
|
+
dataUrl: o,
|
|
57
65
|
bodyData: c,
|
|
58
|
-
useDataUrl:
|
|
66
|
+
useDataUrl: d,
|
|
59
67
|
width: G,
|
|
60
|
-
height:
|
|
61
|
-
languageId:
|
|
68
|
+
height: R,
|
|
69
|
+
languageId: p
|
|
62
70
|
}) => ({
|
|
63
71
|
id: e,
|
|
64
72
|
Layout: n ? { Data: n } : { Url: A(t ?? "") },
|
|
65
|
-
Data:
|
|
73
|
+
Data: Se(d, o, c),
|
|
66
74
|
Text: {
|
|
67
|
-
Url:
|
|
75
|
+
Url: g(p)
|
|
68
76
|
},
|
|
69
77
|
width: G,
|
|
70
|
-
height:
|
|
78
|
+
height: R,
|
|
71
79
|
Debug: "Error"
|
|
72
|
-
}), "buildTreeGridInitializationOptions"),
|
|
80
|
+
}), "buildTreeGridInitializationOptions"), N = /* @__PURE__ */ f((e) => se(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), F = /* @__PURE__ */ f((e) => {
|
|
73
81
|
if (typeof e == "number")
|
|
74
82
|
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
75
83
|
if (typeof e != "string")
|
|
@@ -79,67 +87,67 @@ const $e = 300, de = [255, 255, 166], fe = [240, 240, 240], Ge = [248, 248, 248]
|
|
|
79
87
|
return;
|
|
80
88
|
const n = Number(t);
|
|
81
89
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
82
|
-
}, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */
|
|
90
|
+
}, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ f((e, t, n, o) => {
|
|
83
91
|
if (!t || !n)
|
|
84
92
|
return;
|
|
85
|
-
const c = e.GetAttribute(t, n,
|
|
86
|
-
return
|
|
87
|
-
t[`${n}${
|
|
93
|
+
const c = e.GetAttribute(t, n, o), d = F(c);
|
|
94
|
+
return d !== void 0 ? d : F(
|
|
95
|
+
t[`${n}${o}`]
|
|
88
96
|
);
|
|
89
|
-
}, "getTreeGridHeaderCellSpanAttribute"),
|
|
90
|
-
const
|
|
91
|
-
if (!c.length || !
|
|
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)
|
|
92
100
|
return;
|
|
93
101
|
const G = /* @__PURE__ */ new Set();
|
|
94
|
-
let
|
|
102
|
+
let R = 0;
|
|
95
103
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
96
104
|
try {
|
|
97
|
-
c.forEach((
|
|
98
|
-
|
|
99
|
-
|
|
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);
|
|
100
108
|
});
|
|
101
109
|
});
|
|
102
110
|
} finally {
|
|
103
111
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
104
112
|
}
|
|
105
|
-
G.size && (n && G.forEach((
|
|
106
|
-
typeof e.RefreshRow == "function" && e.RefreshRow(
|
|
107
|
-
}), W(t, "group header button attribute apply"), M(t, "group header button attribute apply",
|
|
108
|
-
updatedCellCount:
|
|
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,
|
|
109
117
|
updatedRowCount: G.size
|
|
110
118
|
}));
|
|
111
|
-
}, "applyTreeGridGroupHeaderSortButtonAttributes"),
|
|
119
|
+
}, "applyTreeGridGroupHeaderSortButtonAttributes"), me = /* @__PURE__ */ f((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), ye = /* @__PURE__ */ f((e) => {
|
|
112
120
|
const t = e == null ? void 0 : e.Visible;
|
|
113
121
|
return !!e && t !== 0 && t !== !1 && t !== "0";
|
|
114
|
-
}, "isVisibleTreeGridRow"),
|
|
122
|
+
}, "isVisibleTreeGridRow"), _e = /* @__PURE__ */ f((e) => {
|
|
115
123
|
const t = e == null ? void 0 : e.Added;
|
|
116
124
|
return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
|
|
117
|
-
}, "isAddedTreeGridRow"), E = /* @__PURE__ */
|
|
118
|
-
const
|
|
119
|
-
return
|
|
120
|
-
}, "hasExplicitTreeGridCellColor"),
|
|
121
|
-
if (!(!t ||
|
|
122
|
-
return
|
|
123
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
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) => {
|
|
126
|
+
const o = e.GetAttribute(t, n, "Color");
|
|
127
|
+
return o != null && o !== "";
|
|
128
|
+
}, "hasExplicitTreeGridCellColor"), Ae = /* @__PURE__ */ f((e, t, n, o) => {
|
|
129
|
+
if (!(!t || o === void 0 || !be(e, t, n) || De(e, t, n)))
|
|
130
|
+
return o;
|
|
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) => {
|
|
124
132
|
if (!t || !n || !E(t))
|
|
125
133
|
return !1;
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
}, "isTreeGridSelectedCellState"),
|
|
134
|
+
const o = e.IsSelected(t, n);
|
|
135
|
+
return o !== 0 && o !== !1 && o !== void 0 && o !== null;
|
|
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(({
|
|
129
137
|
grid: e,
|
|
130
138
|
row: t,
|
|
131
139
|
col: n,
|
|
132
|
-
r,
|
|
140
|
+
r: o,
|
|
133
141
|
g: c,
|
|
134
|
-
b:
|
|
142
|
+
b: d,
|
|
135
143
|
selectedCellBackgroundColor: G,
|
|
136
|
-
hoverCellBackgroundColor:
|
|
144
|
+
hoverCellBackgroundColor: R
|
|
137
145
|
}) => {
|
|
138
|
-
if (
|
|
146
|
+
if (ve(e, t, n) && m(o, c, d, ae))
|
|
139
147
|
return G;
|
|
140
|
-
if (
|
|
141
|
-
return
|
|
142
|
-
}, "resolveTreeGridStateBackgroundColor"),
|
|
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) => {
|
|
143
151
|
if (!e)
|
|
144
152
|
return !1;
|
|
145
153
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
@@ -152,172 +160,199 @@ const $e = 300, de = [255, 255, 166], fe = [240, 240, 240], Ge = [248, 248, 248]
|
|
|
152
160
|
return !1;
|
|
153
161
|
}
|
|
154
162
|
return Object.values(e.Rows ?? {}).some((t) => E(t));
|
|
155
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
163
|
+
}, "hasTreeGridDisplayDataRows"), ze = /* @__PURE__ */ f((e, t, n) => {
|
|
156
164
|
var c;
|
|
157
|
-
const
|
|
165
|
+
const o = (c = e.Data) == null ? void 0 : c.Data;
|
|
158
166
|
e.Data.Data = {
|
|
159
|
-
...
|
|
167
|
+
...o,
|
|
160
168
|
Data: { Body: [t || []] },
|
|
161
169
|
Url: ""
|
|
162
170
|
}, e.ReloadBody(n);
|
|
163
|
-
}, "replaceTreeGridBodyData"),
|
|
171
|
+
}, "replaceTreeGridBodyData"), qe = /* @__PURE__ */ f(({
|
|
164
172
|
id: e,
|
|
165
173
|
latestEventHandlersRef: t,
|
|
166
174
|
highlightEditableCellsRef: n,
|
|
167
|
-
highlightChangedCellsRef:
|
|
175
|
+
highlightChangedCellsRef: o,
|
|
168
176
|
syncDeletedRowCanEditRef: c,
|
|
169
|
-
editableCellBackgroundColorValueRef:
|
|
177
|
+
editableCellBackgroundColorValueRef: d,
|
|
170
178
|
changedCellBackgroundColorRef: G,
|
|
171
|
-
selectedCellBackgroundColorRef:
|
|
172
|
-
hoverCellBackgroundColorRef:
|
|
173
|
-
treeGridInstanceRef:
|
|
179
|
+
selectedCellBackgroundColorRef: R,
|
|
180
|
+
hoverCellBackgroundColorRef: p,
|
|
181
|
+
treeGridInstanceRef: C,
|
|
174
182
|
treeGridInitStartedAtRef: v,
|
|
175
183
|
latestLayoutOverridesRef: q,
|
|
176
184
|
appliedLayoutOverridesRef: Y,
|
|
177
185
|
appliedBodyDataPropRef: K,
|
|
178
186
|
latestColumnEditRulesRef: Q,
|
|
179
|
-
latestColumnEditRuleLookupRef:
|
|
180
|
-
appliedColumnEditRulesRef:
|
|
181
|
-
columnEditRulesStateRef:
|
|
187
|
+
latestColumnEditRuleLookupRef: w,
|
|
188
|
+
appliedColumnEditRulesRef: J,
|
|
189
|
+
columnEditRulesStateRef: B,
|
|
182
190
|
hasAppliedInitialLayoutRef: O,
|
|
183
|
-
syncHasDisplayDataRows:
|
|
184
|
-
setIsTreeGridReady:
|
|
191
|
+
syncHasDisplayDataRows: S,
|
|
192
|
+
setIsTreeGridReady: X
|
|
185
193
|
}) => {
|
|
186
|
-
const
|
|
187
|
-
window.TGSetEvent("OnRowAdd", e, (
|
|
194
|
+
const h = t.current;
|
|
195
|
+
window.TGSetEvent("OnRowAdd", e, (r, i) => {
|
|
188
196
|
var u, s;
|
|
189
|
-
|
|
190
|
-
}), window.TGSetEvent("OnRowAdded", e, (
|
|
191
|
-
|
|
192
|
-
}),
|
|
197
|
+
i.CanEdit = 1, i.CanDelete = 1, (s = (u = t.current) == null ? void 0 : u.onRowAdd) == null || s.call(u, r, i);
|
|
198
|
+
}), window.TGSetEvent("OnRowAdded", e, (r) => {
|
|
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(
|
|
193
228
|
"OnClick",
|
|
194
229
|
e,
|
|
195
|
-
_((
|
|
196
|
-
var
|
|
197
|
-
(
|
|
198
|
-
|
|
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,
|
|
234
|
+
r,
|
|
199
235
|
i,
|
|
200
|
-
o,
|
|
201
236
|
u,
|
|
202
237
|
s,
|
|
203
|
-
|
|
238
|
+
a,
|
|
204
239
|
l
|
|
205
240
|
);
|
|
206
241
|
}, 300)
|
|
207
|
-
), typeof (
|
|
242
|
+
), typeof (h == null ? void 0 : h.onClickButton) == "function" && window.TGSetEvent(
|
|
208
243
|
"OnClickButton",
|
|
209
244
|
e,
|
|
210
|
-
_((
|
|
211
|
-
var
|
|
212
|
-
(l = (
|
|
213
|
-
|
|
245
|
+
_((r, i, u, s) => {
|
|
246
|
+
var a, l;
|
|
247
|
+
(l = (a = t.current) == null ? void 0 : a.onClickButton) == null || l.call(
|
|
248
|
+
a,
|
|
249
|
+
r,
|
|
214
250
|
i,
|
|
215
|
-
o,
|
|
216
251
|
u,
|
|
217
252
|
s
|
|
218
253
|
);
|
|
219
254
|
}, 300)
|
|
220
|
-
), window.TGSetEvent("OnRowDelete", e, (
|
|
221
|
-
var
|
|
222
|
-
const s =
|
|
223
|
-
|
|
255
|
+
), window.TGSetEvent("OnRowDelete", e, (r, i, u) => {
|
|
256
|
+
var a, l;
|
|
257
|
+
const s = D(i) ? L(i) : [];
|
|
258
|
+
k(r, i, {
|
|
224
259
|
canEdit: c.current !== !1 ? 2 : void 0,
|
|
225
260
|
highlightColumns: s
|
|
226
|
-
}),
|
|
227
|
-
|
|
261
|
+
}), S(r), (l = (a = t.current) == null ? void 0 : a.onRowDelete) == null || l.call(
|
|
262
|
+
a,
|
|
263
|
+
r,
|
|
228
264
|
i,
|
|
229
|
-
o,
|
|
230
265
|
u
|
|
231
266
|
);
|
|
232
|
-
}), window.TGSetEvent("OnRowUndelete", e, (
|
|
233
|
-
var s,
|
|
234
|
-
const u =
|
|
235
|
-
|
|
267
|
+
}), window.TGSetEvent("OnRowUndelete", e, (r, i) => {
|
|
268
|
+
var s, a;
|
|
269
|
+
const u = D(i) ? L(i) : [];
|
|
270
|
+
k(r, i, {
|
|
236
271
|
canEdit: c.current !== !1 ? 1 : void 0,
|
|
237
272
|
highlightColumns: u,
|
|
238
273
|
highlightBackgroundColor: u.length ? G.current : void 0
|
|
239
|
-
}),
|
|
240
|
-
}), window.TGSetEvent("OnGetDefaultColor", e, (
|
|
241
|
-
if (!(!n.current || !E(
|
|
242
|
-
return
|
|
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(
|
|
278
|
+
r,
|
|
243
279
|
i,
|
|
244
|
-
o,
|
|
245
280
|
u,
|
|
246
|
-
|
|
281
|
+
d.current
|
|
247
282
|
);
|
|
248
|
-
}), window.TGSetEvent("OnGetColor", e, (
|
|
249
|
-
if (!
|
|
250
|
-
return
|
|
251
|
-
grid:
|
|
252
|
-
row:
|
|
283
|
+
}), window.TGSetEvent("OnGetColor", e, (r, i, u, s, a, l, T) => {
|
|
284
|
+
if (!T)
|
|
285
|
+
return Oe({
|
|
286
|
+
grid: r,
|
|
287
|
+
row: i,
|
|
253
288
|
col: u,
|
|
254
289
|
r: s,
|
|
255
|
-
g:
|
|
290
|
+
g: a,
|
|
256
291
|
b: l,
|
|
257
|
-
selectedCellBackgroundColor:
|
|
258
|
-
hoverCellBackgroundColor:
|
|
292
|
+
selectedCellBackgroundColor: R.current,
|
|
293
|
+
hoverCellBackgroundColor: p.current
|
|
259
294
|
});
|
|
260
|
-
}), window.TGSetEvent("OnAfterValueChanged", e, (
|
|
261
|
-
var U,
|
|
262
|
-
const
|
|
263
|
-
l != null && l.invalidText && ne(l.invalidText, { variant: "warning" }),
|
|
264
|
-
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,
|
|
265
300
|
col: u,
|
|
266
301
|
backgroundColor: G.current
|
|
267
|
-
}),
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
}), typeof (
|
|
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(
|
|
271
306
|
"OnSelect",
|
|
272
307
|
e,
|
|
273
|
-
_((
|
|
308
|
+
_((r) => {
|
|
274
309
|
var u, s;
|
|
275
|
-
const
|
|
276
|
-
(s = (u = t.current) == null ? void 0 : u.onSelect) == null || s.call(u,
|
|
310
|
+
const i = r.GetSelRows() ?? [];
|
|
311
|
+
(s = (u = t.current) == null ? void 0 : u.onSelect) == null || s.call(u, i);
|
|
277
312
|
}, 100)
|
|
278
|
-
), typeof (
|
|
279
|
-
var s,
|
|
280
|
-
(
|
|
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(
|
|
281
316
|
s,
|
|
317
|
+
r,
|
|
282
318
|
i,
|
|
283
|
-
o,
|
|
284
319
|
u
|
|
285
320
|
);
|
|
286
|
-
}), window.TGSetEvent("OnSort", e, (
|
|
321
|
+
}), window.TGSetEvent("OnSort", e, (r, i) => {
|
|
287
322
|
var u;
|
|
288
|
-
if (!(!
|
|
323
|
+
if (!(!i || !z(r, r.ARow, i)))
|
|
289
324
|
return W(e, "group header sort blocked"), ce(e, "group header sort blocked", {
|
|
290
|
-
rowId: (u =
|
|
291
|
-
col:
|
|
325
|
+
rowId: (u = r.ARow) == null ? void 0 : u.id,
|
|
326
|
+
col: i
|
|
292
327
|
}), -1;
|
|
293
|
-
}), window.TGSetEvent("OnRenderStart", e, (
|
|
294
|
-
P(
|
|
328
|
+
}), window.TGSetEvent("OnRenderStart", e, (r) => {
|
|
329
|
+
P(r, e, !1);
|
|
295
330
|
}), window.TGSetEvent(
|
|
296
331
|
"OnReady",
|
|
297
332
|
e,
|
|
298
|
-
_((
|
|
299
|
-
var
|
|
333
|
+
_((r) => {
|
|
334
|
+
var i, u;
|
|
300
335
|
if (!O.current) {
|
|
301
336
|
const s = q.current;
|
|
302
|
-
O.current = !0, re(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
),
|
|
307
|
-
bodyRowCount:
|
|
308
|
-
|
|
337
|
+
O.current = !0, re(r, s), ie(B.current), ue(
|
|
338
|
+
r,
|
|
339
|
+
w.current,
|
|
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)
|
|
309
344
|
)
|
|
310
|
-
}), v.current = null, (u = (
|
|
345
|
+
}), v.current = null, (u = (i = t.current) == null ? void 0 : i.onReady) == null || u.call(i, r);
|
|
311
346
|
}
|
|
312
347
|
}, 100)
|
|
313
348
|
);
|
|
314
349
|
}, "bindTreeGridEvents");
|
|
315
350
|
export {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
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
|
|
322
357
|
};
|
|
323
358
|
//# sourceMappingURL=treeGridRuntime.js.map
|