@affino/datagrid-vue-app 0.1.37 → 0.1.39
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/DataGrid.d.ts +1 -1
- package/dist/advanced-filter.js +1 -1
- package/dist/aggregations.js +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover-CXT1rG40.js → DataGridAdvancedFilterPopover-BBLSw7c4.js} +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-BshOPOFV.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-BUkG_Bz7.js} +1 -1
- package/dist/chunks/{DataGridAggregationsPopover-BRVx8c_y.js → DataGridAggregationsPopover-C8kdwv0O.js} +1 -1
- package/dist/chunks/{DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-CsQpLONh.js → DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-t6v8MqIT.js} +1 -1
- package/dist/chunks/{DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-Dc5SowKk.js → DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-xry4J3Lx.js} +66 -62
- package/dist/chunks/DataGridGanttStageEntry-o99nyV0i.js +9665 -0
- package/dist/chunks/{useDataGridAppRowModel-JUDjg-Fq.js → useDataGridAppRowModel-Dy5CF0h4.js} +1614 -1597
- package/dist/gantt.js +4 -4
- package/dist/index.js +413 -397
- package/dist/internal.js +28 -29
- package/dist/stage/dataGridTableStage.types.d.ts +2 -2
- package/dist/stage/useDataGridTableStageRuntime.d.ts +12 -12
- package/package.json +4 -4
- package/dist/chunks/DataGridGanttStage.vue_vue_type_script_setup_true_lang-DJ72Tgpd.js +0 -1007
- package/dist/chunks/DataGridGanttStageEntry-C4qhNhnp.js +0 -40
- package/dist/chunks/DataGridTableStage.vue_vue_type_script_setup_true_lang-Q2ri6J1V.js +0 -8604
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useDataGridRuntime as
|
|
3
|
-
import { useDataGridAppSelection as
|
|
4
|
-
import { r as
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { applyGridTheme as
|
|
8
|
-
import { d as
|
|
9
|
-
function
|
|
1
|
+
import { defineComponent as je, ref as P, provide as ot, computed as m, watch as S, onBeforeUnmount as pe, h as we, mergeProps as nt, unref as Ce, toRef as Oe } from "vue";
|
|
2
|
+
import { useDataGridRuntime as rt } from "@affino/datagrid-vue";
|
|
3
|
+
import { useDataGridAppSelection as lt, useDataGridAppRowSelection as at } from "@affino/datagrid-vue/app";
|
|
4
|
+
import { r as it, g as ut, h as st, i as dt, b as ct, d as ft, c as mt, j as yt, u as vt, D as gt } from "./chunks/useDataGridAppRowModel-Dy5CF0h4.js";
|
|
5
|
+
import { a as Ao, k as Bo } from "./chunks/useDataGridAppRowModel-Dy5CF0h4.js";
|
|
6
|
+
import { r as wt } from "./chunks/DataGridGanttStageEntry-o99nyV0i.js";
|
|
7
|
+
import { applyGridTheme as pt, resolveGridThemeTokens as St, defaultStyleConfig as F, sugarTheme as Ie, industrialNeutralTheme as Ae } from "@affino/datagrid-theme";
|
|
8
|
+
import { d as ht } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
|
|
9
|
+
function fo() {
|
|
10
10
|
return (e) => e;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const bt = {
|
|
13
13
|
default: F,
|
|
14
|
-
"industrial-neutral":
|
|
15
|
-
industrialNeutral:
|
|
16
|
-
sugar:
|
|
14
|
+
"industrial-neutral": Ae,
|
|
15
|
+
industrialNeutral: Ae,
|
|
16
|
+
sugar: Ie
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function Rt(e, t) {
|
|
19
19
|
if (!e && !t)
|
|
20
20
|
return;
|
|
21
|
-
const
|
|
21
|
+
const l = {
|
|
22
22
|
...e ?? {}
|
|
23
23
|
};
|
|
24
24
|
for (const [o, u] of Object.entries(t ?? {}))
|
|
25
|
-
|
|
26
|
-
...
|
|
25
|
+
l[o] = {
|
|
26
|
+
...l[o] ?? {},
|
|
27
27
|
...u
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return l;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ce(e, t) {
|
|
32
32
|
return {
|
|
33
33
|
...e,
|
|
34
34
|
...t,
|
|
@@ -39,34 +39,34 @@ function de(e, t) {
|
|
|
39
39
|
summary: { ...e.summary ?? {}, ...t.summary ?? {} },
|
|
40
40
|
state: { ...e.state ?? {}, ...t.state ?? {} },
|
|
41
41
|
tokens: { ...e.tokens ?? {}, ...t.tokens ?? {} },
|
|
42
|
-
tokenVariants:
|
|
42
|
+
tokenVariants: Rt(e.tokenVariants, t.tokenVariants)
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Mt(e) {
|
|
46
46
|
return !e || typeof e != "object" ? !1 : "tokens" in e || "tokenVariants" in e || "activeTokenVariant" in e || "defaultTokenVariant" in e || "inheritThemeFromDocument" in e || "documentDarkClass" in e || "grid" in e || "header" in e || "body" in e || "group" in e || "summary" in e || "state" in e;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return e == null ? F : typeof e == "string" ? e === "sugar" ?
|
|
48
|
+
function Ct(e) {
|
|
49
|
+
return e == null ? F : typeof e == "string" ? e === "sugar" ? ce(F, Ie) : bt[e] ?? F : Mt(e) ? ce(F, e) : ce(F, {
|
|
50
50
|
tokens: e
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const t =
|
|
55
|
-
return
|
|
53
|
+
function Ot(e) {
|
|
54
|
+
const t = Ct(e);
|
|
55
|
+
return St(t ?? F, {
|
|
56
56
|
document: typeof document > "u" ? void 0 : document
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
-
return
|
|
59
|
+
function Be(e, t) {
|
|
60
|
+
const l = Ot(t);
|
|
61
|
+
return pt(e, l), l;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Ge(e, t) {
|
|
64
64
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function De(e, t) {
|
|
67
67
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : t;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function At(e) {
|
|
70
70
|
if (e !== void 0) {
|
|
71
71
|
if (e == null)
|
|
72
72
|
return null;
|
|
@@ -75,102 +75,102 @@ function Rt(e) {
|
|
|
75
75
|
return t ? { fields: [t], expandedByDefault: !0 } : null;
|
|
76
76
|
}
|
|
77
77
|
if (Array.isArray(e)) {
|
|
78
|
-
const t = e.map((
|
|
78
|
+
const t = e.map((l) => l.trim()).filter((l) => l.length > 0);
|
|
79
79
|
return t.length > 0 ? { fields: [...t], expandedByDefault: !0 } : null;
|
|
80
80
|
}
|
|
81
81
|
return e;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Bt(e, t) {
|
|
85
85
|
return t === !0 || t && typeof t == "object" ? "pagination" : e ?? "virtualization";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Gt(e, t, l, o) {
|
|
88
88
|
if (t !== "pagination")
|
|
89
89
|
return null;
|
|
90
|
-
const u = 100, a =
|
|
90
|
+
const u = 100, a = De(l, u), v = Ge(o, 0);
|
|
91
91
|
return e === !0 || e === !1 || e == null ? {
|
|
92
92
|
pageSize: a,
|
|
93
93
|
currentPage: v
|
|
94
94
|
} : {
|
|
95
|
-
pageSize:
|
|
96
|
-
currentPage:
|
|
95
|
+
pageSize: De(l ?? e.pageSize, u),
|
|
96
|
+
currentPage: Ge(o ?? e.currentPage, 0)
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
function
|
|
99
|
+
const fe = "Advanced filter";
|
|
100
|
+
function Dt(e) {
|
|
101
101
|
return typeof e == "boolean" ? {
|
|
102
102
|
enabled: e,
|
|
103
|
-
buttonLabel:
|
|
103
|
+
buttonLabel: fe
|
|
104
104
|
} : e ? {
|
|
105
105
|
enabled: e.enabled ?? !0,
|
|
106
|
-
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() :
|
|
106
|
+
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : fe
|
|
107
107
|
} : {
|
|
108
108
|
enabled: !1,
|
|
109
|
-
buttonLabel:
|
|
109
|
+
buttonLabel: fe
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
112
|
+
const me = "Find / replace";
|
|
113
|
+
function Pt(e) {
|
|
114
114
|
return typeof e == "boolean" ? {
|
|
115
115
|
enabled: e,
|
|
116
|
-
buttonLabel:
|
|
116
|
+
buttonLabel: me
|
|
117
117
|
} : e ? {
|
|
118
118
|
enabled: e.enabled ?? !0,
|
|
119
|
-
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() :
|
|
119
|
+
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : me
|
|
120
120
|
} : {
|
|
121
121
|
enabled: !1,
|
|
122
|
-
buttonLabel:
|
|
122
|
+
buttonLabel: me
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
const
|
|
125
|
+
const Lt = "all", Ke = {
|
|
126
126
|
all: "columns",
|
|
127
127
|
rows: "none",
|
|
128
128
|
columns: "columns",
|
|
129
129
|
none: "none"
|
|
130
130
|
};
|
|
131
|
-
function
|
|
132
|
-
return e === "rows" || e === "columns" || e === "none" || e === "all" ? e :
|
|
131
|
+
function Pe(e) {
|
|
132
|
+
return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : Lt;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return e === "columns" || e === "none" ? e :
|
|
134
|
+
function xt(e, t) {
|
|
135
|
+
return e === "columns" || e === "none" ? e : Ke[t];
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Le(e, t) {
|
|
138
138
|
return e !== "none" || t === "columns";
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
const t = e.body === "all" || e.body === "rows",
|
|
140
|
+
function xe(e) {
|
|
141
|
+
const t = e.body === "all" || e.body === "rows", l = e.body === "all" || e.body === "columns", o = e.header === "columns";
|
|
142
142
|
return {
|
|
143
143
|
body: e.body,
|
|
144
144
|
header: e.header,
|
|
145
145
|
pinnedSeparators: e.pinnedSeparators,
|
|
146
146
|
bodyRows: t,
|
|
147
|
-
bodyColumns:
|
|
147
|
+
bodyColumns: l,
|
|
148
148
|
headerColumns: o
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Ft(e) {
|
|
152
152
|
if (typeof e == "string") {
|
|
153
|
-
const o =
|
|
154
|
-
return
|
|
153
|
+
const o = Pe(e), u = Ke[o];
|
|
154
|
+
return xe({
|
|
155
155
|
body: o,
|
|
156
156
|
header: u,
|
|
157
|
-
pinnedSeparators:
|
|
157
|
+
pinnedSeparators: Le(o, u)
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
const t =
|
|
161
|
-
return
|
|
160
|
+
const t = Pe(e?.body), l = xt(e?.header, t);
|
|
161
|
+
return xe({
|
|
162
162
|
body: t,
|
|
163
|
-
header:
|
|
164
|
-
pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators :
|
|
163
|
+
header: l,
|
|
164
|
+
pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : Le(t, l)
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Fe(e) {
|
|
168
168
|
if (typeof e != "number" || !Number.isFinite(e))
|
|
169
169
|
return null;
|
|
170
170
|
const t = Math.max(0, Math.trunc(e));
|
|
171
171
|
return t > 0 ? t : null;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function jt(e, t, l) {
|
|
174
174
|
const o = e === "auto-height" ? "auto-height" : "fill";
|
|
175
175
|
if (o !== "auto-height")
|
|
176
176
|
return {
|
|
@@ -178,15 +178,15 @@ function Pt(e, t, r) {
|
|
|
178
178
|
minRows: null,
|
|
179
179
|
maxRows: null
|
|
180
180
|
};
|
|
181
|
-
const u =
|
|
182
|
-
let a =
|
|
181
|
+
const u = Fe(t);
|
|
182
|
+
let a = Fe(l);
|
|
183
183
|
return u !== null && a !== null && a < u && (a = u), {
|
|
184
184
|
layoutMode: o,
|
|
185
185
|
minRows: u,
|
|
186
186
|
maxRows: a
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function It(e) {
|
|
190
190
|
return {
|
|
191
191
|
...e,
|
|
192
192
|
transaction: null
|
|
@@ -195,14 +195,14 @@ function Lt(e) {
|
|
|
195
195
|
function X(e) {
|
|
196
196
|
return {
|
|
197
197
|
...e,
|
|
198
|
-
state:
|
|
198
|
+
state: It(e.state)
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Kt(e) {
|
|
202
202
|
return typeof e == "object" && e !== null;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const o =
|
|
204
|
+
function He(e, t, l) {
|
|
205
|
+
const o = Kt(e) ? e : null, u = t(o && "state" in o ? o.state : e, l);
|
|
206
206
|
if (!u)
|
|
207
207
|
return null;
|
|
208
208
|
const a = o?.viewMode, v = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
|
|
@@ -211,38 +211,38 @@ function Ke(e, t, r) {
|
|
|
211
211
|
...v ? { viewMode: v } : {}
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Ht(e) {
|
|
215
215
|
return JSON.stringify(X(e));
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function zt(e, t, l) {
|
|
218
218
|
if (typeof e != "string" || e.trim().length === 0)
|
|
219
219
|
return null;
|
|
220
220
|
try {
|
|
221
|
-
return
|
|
221
|
+
return He(JSON.parse(e), t, l);
|
|
222
222
|
} catch {
|
|
223
223
|
return null;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function mo(e, t, l) {
|
|
227
227
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
228
228
|
return !1;
|
|
229
229
|
try {
|
|
230
|
-
return e.setItem(t,
|
|
230
|
+
return e.setItem(t, Ht(l)), !0;
|
|
231
231
|
} catch {
|
|
232
232
|
return !1;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function yo(e, t, l, o) {
|
|
236
236
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
237
237
|
return null;
|
|
238
238
|
try {
|
|
239
239
|
const u = e.getItem(t);
|
|
240
|
-
return u ?
|
|
240
|
+
return u ? zt(u, l, o) : null;
|
|
241
241
|
} catch {
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function vo(e, t) {
|
|
246
246
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
247
247
|
return !1;
|
|
248
248
|
try {
|
|
@@ -251,54 +251,54 @@ function fo(e, t) {
|
|
|
251
251
|
return !1;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
function
|
|
254
|
+
const ye = "Columns";
|
|
255
|
+
function Tt(e) {
|
|
256
256
|
return typeof e == "boolean" ? {
|
|
257
257
|
enabled: e,
|
|
258
|
-
buttonLabel:
|
|
258
|
+
buttonLabel: ye
|
|
259
259
|
} : e ? {
|
|
260
260
|
enabled: e.enabled ?? !0,
|
|
261
|
-
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() :
|
|
261
|
+
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ye
|
|
262
262
|
} : {
|
|
263
263
|
enabled: !1,
|
|
264
|
-
buttonLabel:
|
|
264
|
+
buttonLabel: ye
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
const
|
|
268
|
-
function
|
|
267
|
+
const ve = "Aggregations";
|
|
268
|
+
function Et(e) {
|
|
269
269
|
return typeof e == "boolean" ? {
|
|
270
270
|
enabled: e,
|
|
271
|
-
buttonLabel:
|
|
271
|
+
buttonLabel: ve
|
|
272
272
|
} : e ? {
|
|
273
273
|
enabled: e.enabled ?? !0,
|
|
274
|
-
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() :
|
|
274
|
+
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ve
|
|
275
275
|
} : {
|
|
276
276
|
enabled: !1,
|
|
277
|
-
buttonLabel:
|
|
277
|
+
buttonLabel: ve
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
280
|
function $(e, t) {
|
|
281
281
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const
|
|
283
|
+
function Vt(e, t) {
|
|
284
|
+
const l = {
|
|
285
285
|
rows: !0,
|
|
286
286
|
columns: !1,
|
|
287
287
|
rowOverscan: 8,
|
|
288
288
|
columnOverscan: 2
|
|
289
289
|
};
|
|
290
290
|
if (e === !0)
|
|
291
|
-
|
|
291
|
+
l.columns = !0;
|
|
292
292
|
else if (e === !1)
|
|
293
|
-
|
|
293
|
+
l.rows = !1, l.columns = !1;
|
|
294
294
|
else if (e && typeof e == "object") {
|
|
295
|
-
|
|
296
|
-
const o = $(e.overscan,
|
|
297
|
-
|
|
295
|
+
l.rows = e.rows ?? l.rows, l.columns = e.columns ?? l.columns;
|
|
296
|
+
const o = $(e.overscan, l.rowOverscan);
|
|
297
|
+
l.rowOverscan = $(e.rowOverscan, o), l.columnOverscan = $(e.columnOverscan, $(e.overscan, l.columnOverscan));
|
|
298
298
|
}
|
|
299
|
-
return t === "pagination" && (
|
|
299
|
+
return t === "pagination" && (l.rows = !1), l;
|
|
300
300
|
}
|
|
301
|
-
const
|
|
301
|
+
const _t = je({
|
|
302
302
|
name: "DataGridRuntimeHost",
|
|
303
303
|
inheritAttrs: !1,
|
|
304
304
|
props: {
|
|
@@ -352,11 +352,11 @@ const zt = Fe({
|
|
|
352
352
|
"selection-change": (e) => !0,
|
|
353
353
|
"row-selection-change": (e) => !0
|
|
354
354
|
},
|
|
355
|
-
setup(e, { attrs: t, slots:
|
|
356
|
-
const a =
|
|
357
|
-
|
|
355
|
+
setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
|
|
356
|
+
const a = P(null);
|
|
357
|
+
ot(ht, a);
|
|
358
358
|
let v = null;
|
|
359
|
-
const s =
|
|
359
|
+
const s = rt({
|
|
360
360
|
rows: m(() => e.rows),
|
|
361
361
|
rowModel: e.rowModel,
|
|
362
362
|
columns: m(() => e.columns),
|
|
@@ -377,10 +377,10 @@ const zt = Fe({
|
|
|
377
377
|
resolveBodyRowIndexById: p.resolveBodyRowIndexById
|
|
378
378
|
}, A = () => {
|
|
379
379
|
if (e.renderMode === "pagination") {
|
|
380
|
-
const
|
|
380
|
+
const f = e.pagination ?? { pageSize: 100, currentPage: 0 };
|
|
381
381
|
s.api.rows.setPagination({
|
|
382
|
-
pageSize: Math.max(1, Math.trunc(
|
|
383
|
-
currentPage: Math.max(0, Math.trunc(
|
|
382
|
+
pageSize: Math.max(1, Math.trunc(f.pageSize)),
|
|
383
|
+
currentPage: Math.max(0, Math.trunc(f.currentPage))
|
|
384
384
|
});
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
@@ -399,34 +399,34 @@ const zt = Fe({
|
|
|
399
399
|
},
|
|
400
400
|
{ immediate: !0, deep: !0 }
|
|
401
401
|
), typeof document < "u" && (v = new MutationObserver(() => {
|
|
402
|
-
const
|
|
403
|
-
|
|
402
|
+
const f = a.value;
|
|
403
|
+
f && Be(f, e.theme);
|
|
404
404
|
}), v.observe(document.documentElement, {
|
|
405
405
|
attributes: !0,
|
|
406
406
|
attributeFilter: ["class", "data-theme"]
|
|
407
407
|
})), S(
|
|
408
408
|
[() => e.theme, a],
|
|
409
409
|
() => {
|
|
410
|
-
const
|
|
411
|
-
|
|
410
|
+
const f = a.value;
|
|
411
|
+
f && Be(f, e.theme);
|
|
412
412
|
},
|
|
413
413
|
{ immediate: !0, deep: !0 }
|
|
414
414
|
);
|
|
415
|
-
const R = s.api.events.on("rows:changed", (
|
|
416
|
-
o("cell-change",
|
|
417
|
-
}), b = s.api.events.on("selection:changed", (
|
|
418
|
-
o("selection-change",
|
|
419
|
-
}),
|
|
420
|
-
o("row-selection-change",
|
|
415
|
+
const R = s.api.events.on("rows:changed", (f) => {
|
|
416
|
+
o("cell-change", f);
|
|
417
|
+
}), b = s.api.events.on("selection:changed", (f) => {
|
|
418
|
+
o("selection-change", f);
|
|
419
|
+
}), L = s.api.events.on("row-selection:changed", (f) => {
|
|
420
|
+
o("row-selection-change", f);
|
|
421
421
|
});
|
|
422
|
-
|
|
423
|
-
R(), b(),
|
|
422
|
+
pe(() => {
|
|
423
|
+
R(), b(), L(), v?.disconnect(), v = null;
|
|
424
424
|
});
|
|
425
|
-
const
|
|
426
|
-
const
|
|
425
|
+
const D = m(() => {
|
|
426
|
+
const f = s.virtualWindow.value;
|
|
427
427
|
return {
|
|
428
|
-
...
|
|
429
|
-
rowTotal:
|
|
428
|
+
...f ?? {},
|
|
429
|
+
rowTotal: f?.rowTotal ?? s.rowPartition.value.bodyRowCount,
|
|
430
430
|
colTotal: s.columnSnapshot.value.visibleColumns.length
|
|
431
431
|
};
|
|
432
432
|
});
|
|
@@ -445,9 +445,9 @@ const zt = Fe({
|
|
|
445
445
|
virtualWindow: s.virtualWindow,
|
|
446
446
|
start: s.start,
|
|
447
447
|
stop: s.stop
|
|
448
|
-
}), () =>
|
|
448
|
+
}), () => we(
|
|
449
449
|
"div",
|
|
450
|
-
|
|
450
|
+
nt(t, {
|
|
451
451
|
ref: a,
|
|
452
452
|
class: [
|
|
453
453
|
"affino-datagrid-app-root",
|
|
@@ -461,7 +461,7 @@ const zt = Fe({
|
|
|
461
461
|
minWidth: "0"
|
|
462
462
|
}
|
|
463
463
|
}),
|
|
464
|
-
|
|
464
|
+
l.default?.({
|
|
465
465
|
api: s.api,
|
|
466
466
|
core: s.core,
|
|
467
467
|
runtime: h,
|
|
@@ -474,72 +474,72 @@ const zt = Fe({
|
|
|
474
474
|
syncBodyRowsInRange: s.syncBodyRowsInRange,
|
|
475
475
|
getBodyRowAtIndex: p.getBodyRowAtIndex,
|
|
476
476
|
resolveBodyRowIndexById: p.resolveBodyRowIndexById,
|
|
477
|
-
virtualWindow:
|
|
477
|
+
virtualWindow: D.value
|
|
478
478
|
}) ?? []
|
|
479
479
|
);
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
|
-
function
|
|
482
|
+
function ge(e) {
|
|
483
483
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function O(e) {
|
|
486
486
|
try {
|
|
487
487
|
return JSON.stringify(e);
|
|
488
488
|
} catch {
|
|
489
489
|
return null;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Wt(e) {
|
|
493
493
|
return e ? {
|
|
494
494
|
fields: [...e.fields],
|
|
495
495
|
expandedByDefault: e.expandedByDefault
|
|
496
496
|
} : null;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
let t = null,
|
|
500
|
-
const
|
|
501
|
-
t?.(),
|
|
502
|
-
},
|
|
498
|
+
function kt(e) {
|
|
499
|
+
let t = null, l = null, o = !1, u = null, a = null, v = null, s = null, p = null, h = null, A = null, R = null, b = null;
|
|
500
|
+
const L = () => {
|
|
501
|
+
t?.(), l?.(), t = null, l = null;
|
|
502
|
+
}, D = () => {
|
|
503
503
|
const n = e.gridRef.value;
|
|
504
504
|
return !n || n.api.lifecycle.state === "disposed" ? null : n;
|
|
505
|
-
},
|
|
506
|
-
const n =
|
|
505
|
+
}, f = () => D()?.api ?? null, x = () => {
|
|
506
|
+
const n = f()?.columns;
|
|
507
507
|
if (!n)
|
|
508
508
|
return null;
|
|
509
|
-
const d = n.getSnapshot(), i = {}, y = {},
|
|
509
|
+
const d = n.getSnapshot(), i = {}, y = {}, C = {};
|
|
510
510
|
for (const M of d.columns)
|
|
511
|
-
i[M.key] = M.visible, y[M.key] = M.width,
|
|
511
|
+
i[M.key] = M.visible, y[M.key] = M.width, C[M.key] = M.pin;
|
|
512
512
|
return {
|
|
513
513
|
order: [...d.order],
|
|
514
514
|
visibility: i,
|
|
515
515
|
widths: y,
|
|
516
|
-
pins:
|
|
516
|
+
pins: C
|
|
517
517
|
};
|
|
518
518
|
}, g = () => {
|
|
519
519
|
o || (o = !0, queueMicrotask(() => {
|
|
520
520
|
o = !1;
|
|
521
|
-
const n =
|
|
521
|
+
const n = x(), d = f();
|
|
522
522
|
if (n) {
|
|
523
|
-
const i =
|
|
523
|
+
const i = O(n);
|
|
524
524
|
h = i, i !== v && (v = i, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
|
|
525
525
|
Object.entries(n.visibility).filter(([, y]) => !y).map(([y]) => y)
|
|
526
526
|
), e.emit.columnWidths(n.widths), e.emit.columnPins(n.pins));
|
|
527
527
|
}
|
|
528
528
|
if (d) {
|
|
529
|
-
const i =
|
|
529
|
+
const i = Wt(d.rows.getSnapshot().groupBy), y = O(i);
|
|
530
530
|
y !== p && (p = y, e.emit.groupBy(i));
|
|
531
|
-
const
|
|
532
|
-
A = M, M !== s && (s = M, e.emit.state(
|
|
531
|
+
const C = d.state.get(), M = O(C);
|
|
532
|
+
A = M, M !== s && (s = M, e.emit.state(C));
|
|
533
533
|
}
|
|
534
534
|
}));
|
|
535
535
|
}, H = () => {
|
|
536
|
-
const n =
|
|
536
|
+
const n = f();
|
|
537
537
|
!n || e.props.sortModel === void 0 && e.props.filterModel === void 0 || n.rows.setSortAndFilterModel({
|
|
538
538
|
sortModel: e.props.sortModel ?? [],
|
|
539
539
|
filterModel: e.props.filterModel ?? null
|
|
540
540
|
});
|
|
541
541
|
}, Z = () => {
|
|
542
|
-
const n =
|
|
542
|
+
const n = f()?.columns;
|
|
543
543
|
return n ? new Set(n.getSnapshot().columns.map((d) => d.key)) : null;
|
|
544
544
|
}, ee = (n) => {
|
|
545
545
|
const d = /* @__PURE__ */ new Set();
|
|
@@ -559,35 +559,35 @@ function Et(e) {
|
|
|
559
559
|
if (!d)
|
|
560
560
|
return !1;
|
|
561
561
|
const i = ee(n);
|
|
562
|
-
if (i.size === 0
|
|
562
|
+
if (i.size === 0)
|
|
563
563
|
return !0;
|
|
564
564
|
for (const y of i)
|
|
565
565
|
if (!d.has(y))
|
|
566
566
|
return !1;
|
|
567
567
|
return !0;
|
|
568
568
|
}, T = (n) => z(n.columns), U = (n) => {
|
|
569
|
-
const d =
|
|
569
|
+
const d = f();
|
|
570
570
|
if (!d)
|
|
571
571
|
return !1;
|
|
572
572
|
d.columns.setOrder(n.order);
|
|
573
573
|
for (const [i, y] of Object.entries(n.visibility))
|
|
574
574
|
d.columns.setVisibility(i, y);
|
|
575
575
|
for (const [i, y] of Object.entries(n.widths))
|
|
576
|
-
d.columns.setWidth(i,
|
|
576
|
+
d.columns.setWidth(i, ge(y));
|
|
577
577
|
for (const [i, y] of Object.entries(n.pins))
|
|
578
578
|
d.columns.setPin(i, y);
|
|
579
579
|
return !0;
|
|
580
|
-
},
|
|
580
|
+
}, j = () => {
|
|
581
581
|
if (b) {
|
|
582
|
-
const n = b, d =
|
|
582
|
+
const n = b, d = f();
|
|
583
583
|
if (d) {
|
|
584
584
|
const i = d.state.migrate(n.state, { strict: n.options?.strict });
|
|
585
|
-
i && T(i) && (b = null, d.state.set(i, n.options), a =
|
|
585
|
+
i && T(i) && (b = null, d.state.set(i, n.options), a = O(n.state));
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
if (R && z(R.columnState)) {
|
|
589
589
|
const n = R;
|
|
590
|
-
R = null, u =
|
|
590
|
+
R = null, u = O({
|
|
591
591
|
columnState: n.columnState,
|
|
592
592
|
columnOrder: null,
|
|
593
593
|
hiddenColumnKeys: null,
|
|
@@ -596,19 +596,19 @@ function Et(e) {
|
|
|
596
596
|
}), U(n.columnState);
|
|
597
597
|
}
|
|
598
598
|
}, E = () => {
|
|
599
|
-
const n =
|
|
599
|
+
const n = f();
|
|
600
600
|
!n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
|
|
601
601
|
}, V = () => {
|
|
602
|
-
const n =
|
|
602
|
+
const n = f();
|
|
603
603
|
!n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
|
|
604
|
-
},
|
|
605
|
-
const n =
|
|
604
|
+
}, I = () => {
|
|
605
|
+
const n = f();
|
|
606
606
|
!n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
|
|
607
607
|
}, B = () => {
|
|
608
|
-
const n =
|
|
608
|
+
const n = f();
|
|
609
609
|
if (!n || e.props.columnState === void 0 && e.props.columnOrder === void 0 && e.props.hiddenColumnKeys === void 0 && e.props.columnWidths === void 0 && e.props.columnPins === void 0)
|
|
610
610
|
return;
|
|
611
|
-
const d =
|
|
611
|
+
const d = O({
|
|
612
612
|
columnState: e.props.columnState,
|
|
613
613
|
columnOrder: e.props.columnOrder,
|
|
614
614
|
hiddenColumnKeys: e.props.hiddenColumnKeys,
|
|
@@ -616,7 +616,7 @@ function Et(e) {
|
|
|
616
616
|
columnPins: e.props.columnPins
|
|
617
617
|
});
|
|
618
618
|
if (d !== u) {
|
|
619
|
-
if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins &&
|
|
619
|
+
if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && O(e.props.columnState) === h) {
|
|
620
620
|
u = d;
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
@@ -625,28 +625,28 @@ function Et(e) {
|
|
|
625
625
|
for (const [i, y] of Object.entries(e.props.columnState.visibility))
|
|
626
626
|
n.columns.setVisibility(i, y);
|
|
627
627
|
for (const [i, y] of Object.entries(e.props.columnState.widths))
|
|
628
|
-
n.columns.setWidth(i,
|
|
628
|
+
n.columns.setWidth(i, ge(y));
|
|
629
629
|
for (const [i, y] of Object.entries(e.props.columnState.pins))
|
|
630
630
|
n.columns.setPin(i, y);
|
|
631
631
|
}
|
|
632
632
|
if (e.props.columnOrder && n.columns.setOrder(e.props.columnOrder), e.props.hiddenColumnKeys) {
|
|
633
633
|
const i = new Set(e.props.hiddenColumnKeys), y = n.columns.getSnapshot();
|
|
634
|
-
for (const
|
|
635
|
-
n.columns.setVisibility(
|
|
634
|
+
for (const C of y.columns)
|
|
635
|
+
n.columns.setVisibility(C.key, !i.has(C.key));
|
|
636
636
|
}
|
|
637
637
|
if (e.props.columnWidths)
|
|
638
638
|
for (const [i, y] of Object.entries(e.props.columnWidths))
|
|
639
|
-
n.columns.setWidth(i,
|
|
639
|
+
n.columns.setWidth(i, ge(y));
|
|
640
640
|
if (e.props.columnPins)
|
|
641
641
|
for (const [i, y] of Object.entries(e.props.columnPins))
|
|
642
642
|
n.columns.setPin(i, y);
|
|
643
643
|
u = d;
|
|
644
644
|
}
|
|
645
645
|
}, _ = () => {
|
|
646
|
-
const n =
|
|
646
|
+
const n = f();
|
|
647
647
|
if (!n || e.props.state == null)
|
|
648
648
|
return;
|
|
649
|
-
const d =
|
|
649
|
+
const d = O(e.props.state);
|
|
650
650
|
if (d === a)
|
|
651
651
|
return;
|
|
652
652
|
if (d === A) {
|
|
@@ -656,34 +656,34 @@ function Et(e) {
|
|
|
656
656
|
const i = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
|
|
657
657
|
i && T(i) && (n.state.set(i, e.props.stateOptions ?? {}), a = d);
|
|
658
658
|
}, W = () => {
|
|
659
|
-
const n =
|
|
659
|
+
const n = f();
|
|
660
660
|
n && (n.view.setRowHeightMode(e.props.rowHeightMode), n.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
|
|
661
661
|
}, N = () => {
|
|
662
|
-
const n =
|
|
663
|
-
n && (u = null, a = null,
|
|
662
|
+
const n = D();
|
|
663
|
+
n && (u = null, a = null, L(), t = n.rowModel.subscribe(() => {
|
|
664
664
|
g();
|
|
665
|
-
}),
|
|
665
|
+
}), l = n.columnModel.subscribe(() => {
|
|
666
666
|
g();
|
|
667
|
-
}), _(), B(), H(), E(), V(),
|
|
668
|
-
}, q = () =>
|
|
667
|
+
}), _(), B(), H(), E(), V(), I(), W(), j(), g(), e.emit.ready({ api: n.api }));
|
|
668
|
+
}, q = () => f()?.state.get() ?? null, te = (n, d) => f()?.state.migrate(n, d) ?? null, K = (n) => z(n) ? (u = O({
|
|
669
669
|
columnState: n,
|
|
670
670
|
columnOrder: null,
|
|
671
671
|
hiddenColumnKeys: null,
|
|
672
672
|
columnWidths: null,
|
|
673
673
|
columnPins: null
|
|
674
674
|
}), R = null, U(n) ? (g(), !0) : (R = { columnState: n }, !0)) : (R = { columnState: n }, !0), oe = (n, d) => {
|
|
675
|
-
const i =
|
|
675
|
+
const i = f();
|
|
676
676
|
if (!i)
|
|
677
677
|
return b = { state: n, options: d }, !0;
|
|
678
678
|
const y = i.state.migrate(n, { strict: d?.strict });
|
|
679
|
-
return y ? T(y) ? (i.state.set(y, d), a =
|
|
680
|
-
}, ne = () =>
|
|
681
|
-
const i =
|
|
679
|
+
return y ? T(y) ? (i.state.set(y, d), a = O(n), b = null, g(), !0) : (b = { state: n, options: d }, !0) : !1;
|
|
680
|
+
}, ne = () => f()?.pivot.exportLayout() ?? null, J = () => f()?.pivot.exportInterop() ?? null, re = (n, d) => {
|
|
681
|
+
const i = f();
|
|
682
682
|
return i ? (i.pivot.importLayout(n, d), g(), !0) : !1;
|
|
683
683
|
}, k = () => {
|
|
684
|
-
|
|
684
|
+
f()?.rows.expandAllGroups(), g();
|
|
685
685
|
}, le = () => {
|
|
686
|
-
|
|
686
|
+
f()?.rows.collapseAllGroups(), g();
|
|
687
687
|
};
|
|
688
688
|
S(
|
|
689
689
|
() => e.gridRef.value,
|
|
@@ -694,13 +694,13 @@ function Et(e) {
|
|
|
694
694
|
), S(
|
|
695
695
|
() => e.props.columns,
|
|
696
696
|
() => {
|
|
697
|
-
u = null, a = null, _(), B(),
|
|
697
|
+
u = null, a = null, _(), B(), j(), g();
|
|
698
698
|
},
|
|
699
699
|
{ deep: !0 }
|
|
700
700
|
), S(
|
|
701
701
|
() => [e.props.state, e.props.stateOptions],
|
|
702
702
|
() => {
|
|
703
|
-
_(), B(), H(), E(), V(),
|
|
703
|
+
_(), B(), H(), E(), V(), I(), W(), j(), g();
|
|
704
704
|
},
|
|
705
705
|
{ deep: !0 }
|
|
706
706
|
), S(
|
|
@@ -712,7 +712,7 @@ function Et(e) {
|
|
|
712
712
|
e.props.columnPins
|
|
713
713
|
],
|
|
714
714
|
() => {
|
|
715
|
-
B(),
|
|
715
|
+
B(), j(), g();
|
|
716
716
|
},
|
|
717
717
|
{ deep: !0 }
|
|
718
718
|
), S(
|
|
@@ -736,7 +736,7 @@ function Et(e) {
|
|
|
736
736
|
), S(
|
|
737
737
|
() => e.props.pivotModel,
|
|
738
738
|
() => {
|
|
739
|
-
|
|
739
|
+
I(), g();
|
|
740
740
|
},
|
|
741
741
|
{ deep: !0 }
|
|
742
742
|
), S(
|
|
@@ -746,15 +746,15 @@ function Et(e) {
|
|
|
746
746
|
}
|
|
747
747
|
);
|
|
748
748
|
const Y = () => {
|
|
749
|
-
|
|
749
|
+
L();
|
|
750
750
|
};
|
|
751
|
-
return
|
|
751
|
+
return pe(() => {
|
|
752
752
|
Y();
|
|
753
753
|
}), {
|
|
754
754
|
emitSnapshotUpdates: g,
|
|
755
755
|
handleGridReady: N,
|
|
756
756
|
dispose: Y,
|
|
757
|
-
getColumnState:
|
|
757
|
+
getColumnState: x,
|
|
758
758
|
getState: q,
|
|
759
759
|
migrateState: te,
|
|
760
760
|
applyColumnState: K,
|
|
@@ -766,26 +766,26 @@ function Et(e) {
|
|
|
766
766
|
collapseAllGroups: le
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function Ut(e) {
|
|
770
770
|
if (!Number.isFinite(e))
|
|
771
771
|
return;
|
|
772
772
|
const t = Math.trunc(e);
|
|
773
773
|
return t > 0 ? t : void 0;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Nt(e) {
|
|
776
776
|
return e === !1 ? !1 : e === "window" ? "window" : "grid";
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function qt(e) {
|
|
779
779
|
return e === !0 || e === "toolbar" ? "toolbar" : e === "external-only" ? "external-only" : !1;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Jt() {
|
|
782
782
|
return {
|
|
783
783
|
canUndo: () => !1,
|
|
784
784
|
canRedo: () => !1,
|
|
785
785
|
runHistoryAction: async () => null
|
|
786
786
|
};
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Yt(e) {
|
|
789
789
|
if (e === !1)
|
|
790
790
|
return {
|
|
791
791
|
enabled: !1,
|
|
@@ -796,9 +796,9 @@ function Ut(e) {
|
|
|
796
796
|
const t = typeof e == "object" && e !== null ? e : {};
|
|
797
797
|
return e === void 0 || e === !0 || t.enabled !== !1 ? {
|
|
798
798
|
enabled: !0,
|
|
799
|
-
depth:
|
|
800
|
-
shortcuts:
|
|
801
|
-
controls:
|
|
799
|
+
depth: Ut(t.depth),
|
|
800
|
+
shortcuts: Nt(t.shortcuts),
|
|
801
|
+
controls: qt(t.controls),
|
|
802
802
|
adapter: t.adapter
|
|
803
803
|
} : {
|
|
804
804
|
enabled: !1,
|
|
@@ -807,27 +807,27 @@ function Ut(e) {
|
|
|
807
807
|
controls: !1
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function go() {
|
|
811
811
|
return (e) => e;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function wo() {
|
|
814
814
|
return (e) => e;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function po() {
|
|
817
817
|
return (e) => e;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function So() {
|
|
820
820
|
return (e) => e;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function ho() {
|
|
823
823
|
return (e) => e;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function $t(e, t) {
|
|
826
826
|
if (!t || typeof e != "object" || e === null)
|
|
827
827
|
return;
|
|
828
|
-
const
|
|
828
|
+
const l = t.split(".").filter(Boolean);
|
|
829
829
|
let o = e;
|
|
830
|
-
for (const u of
|
|
830
|
+
for (const u of l) {
|
|
831
831
|
if (Array.isArray(o)) {
|
|
832
832
|
const a = Number(u);
|
|
833
833
|
if (!Number.isInteger(a) || a < 0 || a >= o.length)
|
|
@@ -841,20 +841,20 @@ function Nt(e, t) {
|
|
|
841
841
|
}
|
|
842
842
|
return o;
|
|
843
843
|
}
|
|
844
|
-
function
|
|
845
|
-
const
|
|
844
|
+
function Qt(e, t) {
|
|
845
|
+
const l = /* @__PURE__ */ new Map();
|
|
846
846
|
for (const o of e ?? []) {
|
|
847
847
|
const u = String(o.key ?? "").trim();
|
|
848
|
-
u &&
|
|
848
|
+
u && l.set(u, o);
|
|
849
849
|
}
|
|
850
|
-
if (!(
|
|
850
|
+
if (!(l.size === 0 && typeof t != "function"))
|
|
851
851
|
return (o, u) => {
|
|
852
852
|
if (typeof t == "function") {
|
|
853
853
|
const h = t(o, u);
|
|
854
854
|
if (typeof h < "u")
|
|
855
855
|
return h;
|
|
856
856
|
}
|
|
857
|
-
const a =
|
|
857
|
+
const a = l.get(String(u ?? "").trim());
|
|
858
858
|
if (!a)
|
|
859
859
|
return;
|
|
860
860
|
const v = o.data;
|
|
@@ -866,10 +866,10 @@ function qt(e, t) {
|
|
|
866
866
|
if (!s)
|
|
867
867
|
return;
|
|
868
868
|
const p = v[s];
|
|
869
|
-
return typeof p < "u" ? p :
|
|
869
|
+
return typeof p < "u" ? p : $t(v, s);
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function Xt() {
|
|
873
873
|
return {
|
|
874
874
|
name: "selection",
|
|
875
875
|
getRowSelectionSnapshot: () => null,
|
|
@@ -893,28 +893,28 @@ function Jt() {
|
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
895
|
function Q(e, t) {
|
|
896
|
-
const
|
|
897
|
-
if (
|
|
896
|
+
const l = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
|
|
897
|
+
if (l.length !== 0)
|
|
898
898
|
return async (o) => {
|
|
899
|
-
for (const u of
|
|
899
|
+
for (const u of l)
|
|
900
900
|
await u(o);
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Zt(e) {
|
|
904
904
|
const {
|
|
905
905
|
userSelectionService: t,
|
|
906
|
-
cellSelectionService:
|
|
906
|
+
cellSelectionService: l,
|
|
907
907
|
rowSelectionService: o
|
|
908
908
|
} = e;
|
|
909
909
|
return {
|
|
910
910
|
name: "selection",
|
|
911
|
-
init: Q("init", [t,
|
|
912
|
-
start: Q("start", [t,
|
|
913
|
-
stop: Q("stop", [t,
|
|
914
|
-
dispose: Q("dispose", [t,
|
|
915
|
-
getSelectionSnapshot:
|
|
916
|
-
setSelectionSnapshot:
|
|
917
|
-
clearSelection:
|
|
911
|
+
init: Q("init", [t, l, o]),
|
|
912
|
+
start: Q("start", [t, l, o]),
|
|
913
|
+
stop: Q("stop", [t, l, o]),
|
|
914
|
+
dispose: Q("dispose", [t, l, o]),
|
|
915
|
+
getSelectionSnapshot: l.getSelectionSnapshot,
|
|
916
|
+
setSelectionSnapshot: l.setSelectionSnapshot,
|
|
917
|
+
clearSelection: l.clearSelection,
|
|
918
918
|
getRowSelectionSnapshot: o.getRowSelectionSnapshot,
|
|
919
919
|
setRowSelectionSnapshot: o.setRowSelectionSnapshot,
|
|
920
920
|
clearRowSelection: o.clearRowSelection,
|
|
@@ -928,41 +928,41 @@ function Yt(e) {
|
|
|
928
928
|
clearSelectedRows: o.clearSelectedRows
|
|
929
929
|
};
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function eo(e, t) {
|
|
932
932
|
if (e?.focusedRow !== t?.focusedRow)
|
|
933
933
|
return !1;
|
|
934
|
-
const
|
|
935
|
-
if (
|
|
934
|
+
const l = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
|
|
935
|
+
if (l.length !== o.length)
|
|
936
936
|
return !1;
|
|
937
|
-
for (let u = 0; u <
|
|
938
|
-
if (
|
|
937
|
+
for (let u = 0; u < l.length; u += 1)
|
|
938
|
+
if (l[u] !== o[u])
|
|
939
939
|
return !1;
|
|
940
940
|
return !0;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function to(e, t) {
|
|
943
943
|
if (e === t)
|
|
944
944
|
return !0;
|
|
945
|
-
const
|
|
946
|
-
if (
|
|
945
|
+
const l = Object.entries(e ?? {}), o = Object.entries(t ?? {});
|
|
946
|
+
if (l.length !== o.length)
|
|
947
947
|
return !1;
|
|
948
|
-
for (const [u, a] of
|
|
948
|
+
for (const [u, a] of l)
|
|
949
949
|
if (!Object.is(a, t?.[u]))
|
|
950
950
|
return !1;
|
|
951
951
|
return !0;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function oo(e, t) {
|
|
954
954
|
if (e === t)
|
|
955
955
|
return !0;
|
|
956
956
|
if (e.length !== t.length)
|
|
957
957
|
return !1;
|
|
958
|
-
for (let
|
|
959
|
-
const o = e[
|
|
960
|
-
if (!o || !u || o.key !== u.key || o.component !== u.component || !
|
|
958
|
+
for (let l = 0; l < e.length; l += 1) {
|
|
959
|
+
const o = e[l], u = t[l];
|
|
960
|
+
if (!o || !u || o.key !== u.key || o.component !== u.component || !to(o.props, u.props))
|
|
961
961
|
return !1;
|
|
962
962
|
}
|
|
963
963
|
return !0;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const no = {
|
|
966
966
|
rows: {
|
|
967
967
|
type: Array,
|
|
968
968
|
default: () => []
|
|
@@ -1223,10 +1223,10 @@ const Zt = {
|
|
|
1223
1223
|
type: Array,
|
|
1224
1224
|
default: void 0
|
|
1225
1225
|
}
|
|
1226
|
-
},
|
|
1226
|
+
}, ze = je({
|
|
1227
1227
|
name: "DataGrid",
|
|
1228
1228
|
inheritAttrs: !1,
|
|
1229
|
-
props:
|
|
1229
|
+
props: no,
|
|
1230
1230
|
emits: {
|
|
1231
1231
|
"cell-change": (e) => !0,
|
|
1232
1232
|
"selection-change": (e) => !0,
|
|
@@ -1244,34 +1244,34 @@ const Zt = {
|
|
|
1244
1244
|
"toolbar-modules-change": (e) => !0,
|
|
1245
1245
|
ready: (e) => !0
|
|
1246
1246
|
},
|
|
1247
|
-
setup(e, { attrs: t, slots:
|
|
1248
|
-
const a =
|
|
1247
|
+
setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
|
|
1248
|
+
const a = P(null), v = Jt(), s = P(null), p = P(null), h = P([]);
|
|
1249
1249
|
let A = null, R = !1;
|
|
1250
|
-
const b =
|
|
1250
|
+
const b = P(e.viewMode === "gantt" ? "gantt" : "table"), L = P(e.state ?? null), D = m(() => Yt(e.history)), f = m(() => it(e.chrome)), x = m(() => Bt(e.renderMode, e.pagination)), g = m(() => Gt(
|
|
1251
1251
|
e.pagination,
|
|
1252
|
-
|
|
1252
|
+
x.value,
|
|
1253
1253
|
e.pageSize,
|
|
1254
1254
|
e.currentPage
|
|
1255
|
-
)), H = m(() =>
|
|
1256
|
-
const
|
|
1257
|
-
return
|
|
1255
|
+
)), H = m(() => ut(e.columnMenu)), Z = m(() => st(e.cellMenu)), ee = m(() => dt(e.rowIndexMenu)), z = m(() => Tt(e.columnLayout)), T = m(() => ct(e.columnReorder)), U = m(() => Et(e.aggregations)), j = m(() => Dt(e.advancedFilter)), E = m(() => Pt(e.findReplace)), V = m(() => Ft(e.gridLines)), I = m(() => At(e.groupBy)), B = m(() => e.state ?? L.value), _ = m(() => e.sortModel !== void 0 ? e.sortModel : B.value?.rows?.snapshot?.sortModel), W = m(() => e.filterModel !== void 0 ? e.filterModel : B.value?.rows?.snapshot?.filterModel ?? null), N = m(() => e.groupBy !== void 0 ? I.value ?? null : B.value?.rows?.snapshot?.groupBy ?? null), q = m(() => e.pivotModel !== void 0 ? e.pivotModel : B.value?.rows?.snapshot?.pivotModel ?? null), te = m(() => Vt(e.virtualization, x.value)), K = m(() => jt(e.layoutMode, e.minRows, e.maxRows)), oe = m(() => wt(e.placeholderRows)), ne = m(() => ft(e.rowReorder)), J = m(() => {
|
|
1256
|
+
const r = e.clientRowModelOptions?.readFilterCell;
|
|
1257
|
+
return Qt(
|
|
1258
1258
|
e.columns,
|
|
1259
|
-
e.readFilterCell ??
|
|
1259
|
+
e.readFilterCell ?? r
|
|
1260
1260
|
);
|
|
1261
1261
|
}), re = m(() => {
|
|
1262
|
-
const
|
|
1263
|
-
return !J.value && !
|
|
1262
|
+
const r = e.readFilterCellStyle ?? e.clientRowModelOptions?.readFilterCellStyle;
|
|
1263
|
+
return !J.value && !r ? e.clientRowModelOptions : {
|
|
1264
1264
|
...e.clientRowModelOptions ?? {},
|
|
1265
1265
|
readFilterCell: J.value,
|
|
1266
|
-
readFilterCellStyle:
|
|
1266
|
+
readFilterCellStyle: r
|
|
1267
1267
|
};
|
|
1268
|
-
}), k = m(() =>
|
|
1268
|
+
}), k = m(() => mt({
|
|
1269
1269
|
columns: e.columns,
|
|
1270
1270
|
clientRowModelOptions: re.value,
|
|
1271
1271
|
computedFields: e.computedFields,
|
|
1272
1272
|
formulas: e.formulas,
|
|
1273
1273
|
formulaFunctions: e.formulaFunctions
|
|
1274
|
-
})), le = m(() =>
|
|
1274
|
+
})), le = m(() => yt(e.columns)), Y = {
|
|
1275
1275
|
get state() {
|
|
1276
1276
|
return e.state;
|
|
1277
1277
|
},
|
|
@@ -1300,7 +1300,7 @@ const Zt = {
|
|
|
1300
1300
|
return e.filterModel;
|
|
1301
1301
|
},
|
|
1302
1302
|
get groupBy() {
|
|
1303
|
-
return
|
|
1303
|
+
return I.value;
|
|
1304
1304
|
},
|
|
1305
1305
|
get aggregationModel() {
|
|
1306
1306
|
return e.aggregationModel;
|
|
@@ -1317,139 +1317,155 @@ const Zt = {
|
|
|
1317
1317
|
get columns() {
|
|
1318
1318
|
return e.columns;
|
|
1319
1319
|
}
|
|
1320
|
-
}, n = m(() => q.value ? "pivot" : k.value && "initialTreeData" in k.value ? "tree" : "base"), d = m(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), i = m(() =>
|
|
1320
|
+
}, n = m(() => q.value ? "pivot" : k.value && "initialTreeData" in k.value ? "tree" : "base"), d = m(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), i = m(() => {
|
|
1321
|
+
const r = a.value?.runtime;
|
|
1322
|
+
if (!r)
|
|
1323
|
+
return 0;
|
|
1324
|
+
const c = Ce(r.rowPartition);
|
|
1325
|
+
return Math.max(0, c.bodyRowCount + c.pinnedBottomRows.length);
|
|
1326
|
+
}), y = (r) => {
|
|
1327
|
+
const c = a.value?.runtime;
|
|
1328
|
+
if (!c)
|
|
1329
|
+
return null;
|
|
1330
|
+
const G = Ce(c.rowPartition), de = G.bodyRowCount;
|
|
1331
|
+
if (r < de)
|
|
1332
|
+
return c.getBodyRowAtIndex(r);
|
|
1333
|
+
const tt = r - de;
|
|
1334
|
+
return G.pinnedBottomRows[tt] ?? null;
|
|
1335
|
+
}, C = {
|
|
1321
1336
|
mode: m(() => n.value),
|
|
1322
1337
|
resolveRuntime: () => a.value,
|
|
1323
1338
|
visibleColumns: d,
|
|
1324
1339
|
totalRows: i,
|
|
1325
1340
|
showRowSelection: m(() => e.rowSelection),
|
|
1326
|
-
readSelectionCell: e.readSelectionCell
|
|
1341
|
+
readSelectionCell: e.readSelectionCell,
|
|
1342
|
+
resolveSelectionRowAtIndex: y
|
|
1327
1343
|
}, {
|
|
1328
|
-
selectionSnapshot:
|
|
1329
|
-
selectionAnchor:
|
|
1330
|
-
syncSelectionSnapshotFromRuntime:
|
|
1331
|
-
selectionService:
|
|
1332
|
-
selectionAggregatesLabel:
|
|
1333
|
-
} =
|
|
1344
|
+
selectionSnapshot: M,
|
|
1345
|
+
selectionAnchor: Te,
|
|
1346
|
+
syncSelectionSnapshotFromRuntime: Ee,
|
|
1347
|
+
selectionService: Ve,
|
|
1348
|
+
selectionAggregatesLabel: _e
|
|
1349
|
+
} = lt(C), {
|
|
1334
1350
|
rowSelectionSnapshot: ae,
|
|
1335
1351
|
syncRowSelectionSnapshotFromRuntime: ie,
|
|
1336
|
-
reconcileRowSelectionFromRuntime:
|
|
1337
|
-
selectionService:
|
|
1338
|
-
} =
|
|
1352
|
+
reconcileRowSelectionFromRuntime: We,
|
|
1353
|
+
selectionService: Se
|
|
1354
|
+
} = at({
|
|
1339
1355
|
resolveRuntime: () => a.value
|
|
1340
|
-
}),
|
|
1356
|
+
}), ke = m(() => e.rowSelection ? Se : Xt()), Ue = m(() => ({
|
|
1341
1357
|
...e.services ?? {},
|
|
1342
|
-
selection:
|
|
1358
|
+
selection: Zt({
|
|
1343
1359
|
userSelectionService: e.services?.selection,
|
|
1344
|
-
cellSelectionService:
|
|
1345
|
-
rowSelectionService:
|
|
1360
|
+
cellSelectionService: Ve,
|
|
1361
|
+
rowSelectionService: ke.value
|
|
1346
1362
|
})
|
|
1347
1363
|
})), {
|
|
1348
|
-
dataGridInstanceKey:
|
|
1364
|
+
dataGridInstanceKey: Ne,
|
|
1349
1365
|
resolvedRowModel: ue
|
|
1350
|
-
} =
|
|
1351
|
-
rows:
|
|
1352
|
-
rowModel:
|
|
1366
|
+
} = vt({
|
|
1367
|
+
rows: Oe(e, "rows"),
|
|
1368
|
+
rowModel: Oe(e, "rowModel"),
|
|
1353
1369
|
clientRowModelOptions: k,
|
|
1354
1370
|
onOwnedRowModelRecreated: () => {
|
|
1355
1371
|
w.dispose();
|
|
1356
1372
|
}
|
|
1357
|
-
}), w =
|
|
1373
|
+
}), w = kt({
|
|
1358
1374
|
gridRef: a,
|
|
1359
1375
|
props: Y,
|
|
1360
1376
|
emit: {
|
|
1361
|
-
columnState: (
|
|
1362
|
-
columnOrder: (
|
|
1363
|
-
hiddenColumnKeys: (
|
|
1364
|
-
columnWidths: (
|
|
1365
|
-
columnPins: (
|
|
1366
|
-
groupBy: (
|
|
1367
|
-
state: (
|
|
1368
|
-
|
|
1377
|
+
columnState: (r) => o("update:columnState", r),
|
|
1378
|
+
columnOrder: (r) => o("update:columnOrder", r),
|
|
1379
|
+
hiddenColumnKeys: (r) => o("update:hiddenColumnKeys", r),
|
|
1380
|
+
columnWidths: (r) => o("update:columnWidths", r),
|
|
1381
|
+
columnPins: (r) => o("update:columnPins", r),
|
|
1382
|
+
groupBy: (r) => o("update:groupBy", r),
|
|
1383
|
+
state: (r) => {
|
|
1384
|
+
L.value = r, o("update:state", r);
|
|
1369
1385
|
},
|
|
1370
|
-
ready: (
|
|
1371
|
-
api:
|
|
1386
|
+
ready: (r) => o("ready", {
|
|
1387
|
+
api: r.api,
|
|
1372
1388
|
rowModel: ue.value
|
|
1373
1389
|
})
|
|
1374
1390
|
}
|
|
1375
|
-
}),
|
|
1376
|
-
|
|
1377
|
-
},
|
|
1378
|
-
o("selection-change",
|
|
1379
|
-
},
|
|
1380
|
-
o("row-selection-change",
|
|
1381
|
-
},
|
|
1391
|
+
}), qe = (r) => {
|
|
1392
|
+
We(), o("cell-change", r), w.emitSnapshotUpdates();
|
|
1393
|
+
}, Je = (r) => {
|
|
1394
|
+
o("selection-change", r);
|
|
1395
|
+
}, Ye = (r) => {
|
|
1396
|
+
o("row-selection-change", r);
|
|
1397
|
+
}, he = () => {
|
|
1382
1398
|
w.emitSnapshotUpdates();
|
|
1383
1399
|
};
|
|
1384
1400
|
S(
|
|
1385
1401
|
ae,
|
|
1386
|
-
(
|
|
1387
|
-
o("row-select",
|
|
1402
|
+
(r) => {
|
|
1403
|
+
o("row-select", r), o("update:rowSelectionState", r), he();
|
|
1388
1404
|
},
|
|
1389
1405
|
{ deep: !0 }
|
|
1390
1406
|
), S(
|
|
1391
1407
|
() => [e.rowSelection, e.rowSelectionState, a.value],
|
|
1392
|
-
([
|
|
1393
|
-
if (
|
|
1394
|
-
if (
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1408
|
+
([r, c]) => {
|
|
1409
|
+
if (r) {
|
|
1410
|
+
if (c !== void 0) {
|
|
1411
|
+
const G = a.value?.api.rowSelection;
|
|
1412
|
+
eo(ae.value, c) || (c ? G?.setSnapshot(c) : G?.clear(), ie());
|
|
1397
1413
|
return;
|
|
1398
1414
|
}
|
|
1399
1415
|
ie();
|
|
1400
1416
|
return;
|
|
1401
1417
|
}
|
|
1402
|
-
|
|
1418
|
+
Se.clearRowSelection?.();
|
|
1403
1419
|
},
|
|
1404
1420
|
{ immediate: !0 }
|
|
1405
1421
|
), S(
|
|
1406
1422
|
() => e.viewMode,
|
|
1407
|
-
(
|
|
1408
|
-
b.value =
|
|
1423
|
+
(r) => {
|
|
1424
|
+
b.value = r === "gantt" ? "gantt" : "table";
|
|
1409
1425
|
},
|
|
1410
1426
|
{ immediate: !0 }
|
|
1411
1427
|
);
|
|
1412
|
-
const
|
|
1413
|
-
const
|
|
1414
|
-
b.value =
|
|
1415
|
-
},
|
|
1416
|
-
s.value =
|
|
1417
|
-
},
|
|
1418
|
-
p.value =
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1428
|
+
const be = (r) => {
|
|
1429
|
+
const c = r === "gantt" ? "gantt" : "table";
|
|
1430
|
+
b.value = c, o("update:viewMode", c);
|
|
1431
|
+
}, $e = (r) => {
|
|
1432
|
+
s.value = r;
|
|
1433
|
+
}, Re = (r) => {
|
|
1434
|
+
p.value = r;
|
|
1435
|
+
}, Qe = (r) => {
|
|
1436
|
+
oo(h.value, r) || (h.value = r, A = r, !R && (R = !0, Promise.resolve().then(() => {
|
|
1421
1437
|
R = !1;
|
|
1422
|
-
const
|
|
1423
|
-
A = null,
|
|
1438
|
+
const c = A;
|
|
1439
|
+
A = null, c && o("toolbar-modules-change", c);
|
|
1424
1440
|
})));
|
|
1425
1441
|
}, se = m(() => {
|
|
1426
|
-
const
|
|
1427
|
-
return !
|
|
1428
|
-
canUndo: () =>
|
|
1429
|
-
canRedo: () =>
|
|
1430
|
-
runHistoryAction: (
|
|
1442
|
+
const r = D.value.adapter;
|
|
1443
|
+
return !D.value.enabled || !r ? v : {
|
|
1444
|
+
canUndo: () => r.canUndo(),
|
|
1445
|
+
canRedo: () => r.canRedo(),
|
|
1446
|
+
runHistoryAction: (c) => r.runHistoryAction(c)
|
|
1431
1447
|
};
|
|
1432
|
-
}),
|
|
1448
|
+
}), Me = {
|
|
1433
1449
|
canUndo: () => (s.value ?? se.value).canUndo(),
|
|
1434
1450
|
canRedo: () => (s.value ?? se.value).canRedo(),
|
|
1435
|
-
runHistoryAction: (
|
|
1436
|
-
},
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1439
|
-
state:
|
|
1451
|
+
runHistoryAction: (r) => (s.value ?? se.value).runHistoryAction(r)
|
|
1452
|
+
}, Xe = () => {
|
|
1453
|
+
const r = w.getState();
|
|
1454
|
+
return r ? X({
|
|
1455
|
+
state: r,
|
|
1440
1456
|
viewMode: b.value
|
|
1441
1457
|
}) : null;
|
|
1442
|
-
},
|
|
1443
|
-
const
|
|
1444
|
-
return w.applyState(
|
|
1458
|
+
}, Ze = (r, c) => He(r, w.migrateState, c), et = (r, c) => {
|
|
1459
|
+
const G = X(r);
|
|
1460
|
+
return w.applyState(G.state, c) ? (G.viewMode && be(G.viewMode), !0) : !1;
|
|
1445
1461
|
};
|
|
1446
|
-
return
|
|
1447
|
-
w.dispose(),
|
|
1462
|
+
return pe(() => {
|
|
1463
|
+
w.dispose(), Re(null);
|
|
1448
1464
|
}), u({
|
|
1449
1465
|
grid: a,
|
|
1450
1466
|
rowModel: ue,
|
|
1451
|
-
history:
|
|
1452
|
-
getHistory: () =>
|
|
1467
|
+
history: Me,
|
|
1468
|
+
getHistory: () => Me,
|
|
1453
1469
|
toolbarModules: h,
|
|
1454
1470
|
getToolbarModules: () => h.value,
|
|
1455
1471
|
getApi: () => a.value?.api ?? null,
|
|
@@ -1457,22 +1473,22 @@ const Zt = {
|
|
|
1457
1473
|
getCore: () => a.value?.core ?? null,
|
|
1458
1474
|
getColumnState: () => w.getColumnState(),
|
|
1459
1475
|
getColumnSnapshot: () => a.value?.api.columns.getSnapshot() ?? null,
|
|
1460
|
-
getSelectionAggregatesLabel: () =>
|
|
1461
|
-
runStructuralRowAction: (
|
|
1476
|
+
getSelectionAggregatesLabel: () => _e.value,
|
|
1477
|
+
runStructuralRowAction: (r, c) => p.value?.(r, c) ?? Promise.resolve(!1),
|
|
1462
1478
|
getSelectionSummary: () => {
|
|
1463
|
-
const
|
|
1464
|
-
if (!
|
|
1479
|
+
const r = a.value?.api.selection.summarize;
|
|
1480
|
+
if (!r)
|
|
1465
1481
|
return null;
|
|
1466
|
-
const
|
|
1482
|
+
const c = {
|
|
1467
1483
|
readSelectionCell: e.readSelectionCell
|
|
1468
1484
|
};
|
|
1469
|
-
return
|
|
1485
|
+
return r(c);
|
|
1470
1486
|
},
|
|
1471
1487
|
getView: () => b.value,
|
|
1472
|
-
setView:
|
|
1473
|
-
getSavedView:
|
|
1474
|
-
migrateSavedView:
|
|
1475
|
-
applySavedView:
|
|
1488
|
+
setView: be,
|
|
1489
|
+
getSavedView: Xe,
|
|
1490
|
+
migrateSavedView: Ze,
|
|
1491
|
+
applySavedView: et,
|
|
1476
1492
|
applyColumnState: w.applyColumnState,
|
|
1477
1493
|
getState: w.getState,
|
|
1478
1494
|
migrateState: w.migrateState,
|
|
@@ -1482,29 +1498,29 @@ const Zt = {
|
|
|
1482
1498
|
importPivotLayout: w.importPivotLayout,
|
|
1483
1499
|
expandAllGroups: w.expandAllGroups,
|
|
1484
1500
|
collapseAllGroups: w.collapseAllGroups,
|
|
1485
|
-
insertRowsAt: (
|
|
1486
|
-
insertRowBefore: (
|
|
1487
|
-
insertRowAfter: (
|
|
1488
|
-
insertColumnsAt: (
|
|
1489
|
-
insertColumnBefore: (
|
|
1490
|
-
insertColumnAfter: (
|
|
1501
|
+
insertRowsAt: (r, c) => a.value?.api.rows.insertDataAt(r, c) ?? !1,
|
|
1502
|
+
insertRowBefore: (r, c) => a.value?.api.rows.insertDataBefore(r, c) ?? !1,
|
|
1503
|
+
insertRowAfter: (r, c) => a.value?.api.rows.insertDataAfter(r, c) ?? !1,
|
|
1504
|
+
insertColumnsAt: (r, c) => a.value?.api.columns.insertAt(r, c) ?? !1,
|
|
1505
|
+
insertColumnBefore: (r, c) => a.value?.api.columns.insertBefore(r, c) ?? !1,
|
|
1506
|
+
insertColumnAfter: (r, c) => a.value?.api.columns.insertAfter(r, c) ?? !1
|
|
1491
1507
|
}), () => {
|
|
1492
|
-
const
|
|
1508
|
+
const r = {
|
|
1493
1509
|
mode: n.value,
|
|
1494
1510
|
rows: e.rows,
|
|
1495
1511
|
runtime: a.value?.runtime ?? null,
|
|
1496
1512
|
runtimeRowModel: a.value?.rowModel ?? null,
|
|
1497
|
-
selectionSnapshot:
|
|
1498
|
-
selectionAnchor:
|
|
1513
|
+
selectionSnapshot: M,
|
|
1514
|
+
selectionAnchor: Te,
|
|
1499
1515
|
rowSelectionSnapshot: ae,
|
|
1500
|
-
syncSelectionSnapshotFromRuntime:
|
|
1516
|
+
syncSelectionSnapshotFromRuntime: Ee,
|
|
1501
1517
|
syncRowSelectionSnapshotFromRuntime: ie,
|
|
1502
|
-
flushRowSelectionSnapshotUpdates:
|
|
1518
|
+
flushRowSelectionSnapshotUpdates: he,
|
|
1503
1519
|
sortModel: _.value,
|
|
1504
1520
|
filterModel: W.value,
|
|
1505
1521
|
groupBy: N.value,
|
|
1506
1522
|
pivotModel: q.value,
|
|
1507
|
-
renderMode:
|
|
1523
|
+
renderMode: x.value,
|
|
1508
1524
|
virtualization: te.value,
|
|
1509
1525
|
columnMenu: H.value,
|
|
1510
1526
|
cellMenu: Z.value,
|
|
@@ -1512,7 +1528,7 @@ const Zt = {
|
|
|
1512
1528
|
columnLayout: z.value,
|
|
1513
1529
|
columnReorder: T.value,
|
|
1514
1530
|
aggregations: U.value,
|
|
1515
|
-
advancedFilter:
|
|
1531
|
+
advancedFilter: j.value,
|
|
1516
1532
|
findReplace: E.value,
|
|
1517
1533
|
gridLines: V.value,
|
|
1518
1534
|
rowHeightMode: e.rowHeightMode,
|
|
@@ -1534,80 +1550,80 @@ const Zt = {
|
|
|
1534
1550
|
rowReorder: ne.value,
|
|
1535
1551
|
viewMode: b.value,
|
|
1536
1552
|
gantt: e.gantt,
|
|
1537
|
-
history:
|
|
1538
|
-
chrome:
|
|
1539
|
-
registerHistoryController:
|
|
1540
|
-
registerStructuralRowActionRunner:
|
|
1541
|
-
reportToolbarModules:
|
|
1553
|
+
history: D.value,
|
|
1554
|
+
chrome: f.value,
|
|
1555
|
+
registerHistoryController: $e,
|
|
1556
|
+
registerStructuralRowActionRunner: Re,
|
|
1557
|
+
reportToolbarModules: Qe,
|
|
1542
1558
|
toolbarModules: e.toolbarModules,
|
|
1543
1559
|
customOverlays: e.customOverlays,
|
|
1544
1560
|
runStructuralRowAction: e.runStructuralRowAction
|
|
1545
1561
|
};
|
|
1546
|
-
return
|
|
1547
|
-
|
|
1562
|
+
return we(
|
|
1563
|
+
_t,
|
|
1548
1564
|
{
|
|
1549
1565
|
...t,
|
|
1550
1566
|
ref: a,
|
|
1551
|
-
key:
|
|
1567
|
+
key: Ne.value,
|
|
1552
1568
|
rows: e.rows,
|
|
1553
1569
|
rowModel: ue.value,
|
|
1554
1570
|
columns: le.value,
|
|
1555
1571
|
theme: e.theme,
|
|
1556
1572
|
layoutMode: K.value.layoutMode,
|
|
1557
|
-
renderMode:
|
|
1573
|
+
renderMode: x.value,
|
|
1558
1574
|
pagination: g.value,
|
|
1559
1575
|
plugins: e.plugins,
|
|
1560
|
-
services:
|
|
1576
|
+
services: Ue.value,
|
|
1561
1577
|
startupOrder: e.startupOrder,
|
|
1562
1578
|
autoStart: e.autoStart,
|
|
1563
|
-
onCellChange:
|
|
1564
|
-
onSelectionChange:
|
|
1565
|
-
onRowSelectionChange:
|
|
1579
|
+
onCellChange: qe,
|
|
1580
|
+
onSelectionChange: Je,
|
|
1581
|
+
onRowSelectionChange: Ye
|
|
1566
1582
|
},
|
|
1567
|
-
|
|
1568
|
-
default: (
|
|
1569
|
-
...
|
|
1583
|
+
l.default ? {
|
|
1584
|
+
default: (c) => l.default?.({
|
|
1585
|
+
...c,
|
|
1570
1586
|
defaultRendererProps: {
|
|
1571
|
-
...
|
|
1572
|
-
runtime:
|
|
1573
|
-
runtimeRowModel:
|
|
1587
|
+
...r,
|
|
1588
|
+
runtime: c.runtime,
|
|
1589
|
+
runtimeRowModel: c.rowModel
|
|
1574
1590
|
}
|
|
1575
1591
|
})
|
|
1576
1592
|
} : {
|
|
1577
|
-
default: (
|
|
1578
|
-
...
|
|
1579
|
-
runtime:
|
|
1580
|
-
runtimeRowModel:
|
|
1593
|
+
default: (c) => we(gt, {
|
|
1594
|
+
...r,
|
|
1595
|
+
runtime: c.runtime,
|
|
1596
|
+
runtimeRowModel: c.rowModel
|
|
1581
1597
|
})
|
|
1582
1598
|
}
|
|
1583
1599
|
);
|
|
1584
1600
|
};
|
|
1585
1601
|
}
|
|
1586
1602
|
});
|
|
1587
|
-
function
|
|
1588
|
-
return
|
|
1603
|
+
function bo() {
|
|
1604
|
+
return P(null);
|
|
1589
1605
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return
|
|
1606
|
+
function Ro() {
|
|
1607
|
+
return ze;
|
|
1592
1608
|
}
|
|
1593
|
-
const
|
|
1609
|
+
const Mo = ze;
|
|
1594
1610
|
export {
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1611
|
+
Mo as DataGrid,
|
|
1612
|
+
Ao as DataGridModuleHost,
|
|
1613
|
+
vo as clearDataGridSavedViewInStorage,
|
|
1614
|
+
ze as default,
|
|
1615
|
+
So as defineDataGridCellClassResolver,
|
|
1616
|
+
ho as defineDataGridCellStyleResolver,
|
|
1617
|
+
Bo as defineDataGridColumns,
|
|
1618
|
+
Ro as defineDataGridComponent,
|
|
1619
|
+
wo as defineDataGridFilterCellReader,
|
|
1620
|
+
po as defineDataGridFilterCellStyleReader,
|
|
1621
|
+
go as defineDataGridSelectionCellReader,
|
|
1622
|
+
fo as defineDataGridStructuralRowActionHandler,
|
|
1623
|
+
He as migrateDataGridSavedView,
|
|
1624
|
+
zt as parseDataGridSavedView,
|
|
1625
|
+
yo as readDataGridSavedViewFromStorage,
|
|
1626
|
+
Ht as serializeDataGridSavedView,
|
|
1627
|
+
bo as useDataGridRef,
|
|
1628
|
+
mo as writeDataGridSavedViewToStorage
|
|
1613
1629
|
};
|