@affino/datagrid-vue-app 0.1.64 → 0.4.0
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/README.md +9 -7
- package/dist/DataGrid.d.ts +1 -3
- package/dist/chunks/DataGridGanttStageEntry-Cypf1c3l.js +12522 -0
- package/dist/chunks/useDataGridAppRowModel-b5bfkfo3.js +5574 -0
- package/dist/gantt.js +1 -1
- package/dist/host/DataGridDefaultRenderer.d.ts +1 -1
- package/dist/index.js +373 -377
- package/dist/internal.js +2 -2
- package/dist/stage/DataGridTableStageCenterPane.vue.d.ts +9 -0
- package/dist/stage/dataGridTableStage.types.d.ts +1 -0
- package/dist/stage/dataGridTableStageA11y.d.ts +4 -0
- package/dist/stage/dataGridTableStageBody.types.d.ts +5 -0
- package/dist/stage/useDataGridStageCellRendering.d.ts +0 -1
- package/dist/stage/useDataGridStagePanes.grouped.d.ts +6 -0
- package/dist/stage/useDataGridStageRenderApis.d.ts +5 -0
- package/dist/stage/useDataGridStageRenderApis.grouped.d.ts +5 -0
- package/dist/stage/useDataGridStageViewportRuntime.d.ts +4 -0
- package/dist/stage/useDataGridTableStageRuntime.d.ts +2 -0
- package/package.json +7 -7
- package/dist/chunks/DataGridGanttStageEntry-DGDFifU8.js +0 -12216
- package/dist/chunks/useDataGridAppRowModel-DF6K2Rd8.js +0 -5409
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as nt, ref as V, provide as Dt, computed as y, watch as C, onBeforeUnmount as Be, h as xe, mergeProps as Ft, nextTick as Ve, unref as Ue, toRef as _e, onMounted as Bt } from "vue";
|
|
2
2
|
import { useDataGridRuntime as Gt, cloneDataGridFilterSnapshot as jt } from "@affino/datagrid-vue";
|
|
3
3
|
import { useDataGridAppSelection as Lt, useDataGridAppRowSelection as Et } from "@affino/datagrid-vue/app";
|
|
4
|
-
import { r as Kt, g as zt, h as Ht, i as Tt, j as kt, b as Vt, n as
|
|
5
|
-
import { a as mo, m as yo, o as vo } from "./chunks/useDataGridAppRowModel-
|
|
4
|
+
import { r as Kt, g as zt, h as Ht, i as Tt, j as kt, b as Vt, n as be, k as Ut, d as _t, c as Wt, l as Nt, u as qt, D as $t } from "./chunks/useDataGridAppRowModel-b5bfkfo3.js";
|
|
5
|
+
import { a as mo, m as yo, o as vo } from "./chunks/useDataGridAppRowModel-b5bfkfo3.js";
|
|
6
6
|
import { r as Jt } from "./chunks/dataGridAdvancedFilter-xnME5bRa.js";
|
|
7
|
-
import { r as Zt } from "./chunks/DataGridGanttStageEntry-
|
|
8
|
-
import { applyGridTheme as Yt, resolveGridThemeTokens as Qt, defaultStyleConfig as ee, sugarTheme as
|
|
7
|
+
import { r as Zt } from "./chunks/DataGridGanttStageEntry-Cypf1c3l.js";
|
|
8
|
+
import { applyGridTheme as Yt, resolveGridThemeTokens as Qt, defaultStyleConfig as ee, sugarTheme as ot, industrialNeutralTheme as We } from "@affino/datagrid-theme";
|
|
9
9
|
import { d as Xt } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
|
|
10
10
|
function Qn() {
|
|
11
11
|
return (e) => e;
|
|
12
12
|
}
|
|
13
13
|
const en = {
|
|
14
14
|
default: ee,
|
|
15
|
-
"industrial-neutral":
|
|
16
|
-
industrialNeutral:
|
|
17
|
-
sugar:
|
|
15
|
+
"industrial-neutral": We,
|
|
16
|
+
industrialNeutral: We,
|
|
17
|
+
sugar: ot
|
|
18
18
|
};
|
|
19
19
|
function tn(e, t) {
|
|
20
20
|
if (!e && !t)
|
|
@@ -29,25 +29,19 @@ function tn(e, t) {
|
|
|
29
29
|
};
|
|
30
30
|
return l;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Re(e, t) {
|
|
33
33
|
return {
|
|
34
34
|
...e,
|
|
35
35
|
...t,
|
|
36
|
-
grid: { ...e.grid ?? {}, ...t.grid ?? {} },
|
|
37
|
-
header: { ...e.header ?? {}, ...t.header ?? {} },
|
|
38
|
-
body: { ...e.body ?? {}, ...t.body ?? {} },
|
|
39
|
-
group: { ...e.group ?? {}, ...t.group ?? {} },
|
|
40
|
-
summary: { ...e.summary ?? {}, ...t.summary ?? {} },
|
|
41
|
-
state: { ...e.state ?? {}, ...t.state ?? {} },
|
|
42
36
|
tokens: { ...e.tokens ?? {}, ...t.tokens ?? {} },
|
|
43
37
|
tokenVariants: tn(e.tokenVariants, t.tokenVariants)
|
|
44
38
|
};
|
|
45
39
|
}
|
|
46
40
|
function nn(e) {
|
|
47
|
-
return !e || typeof e != "object" ? !1 : "tokens" in e || "tokenVariants" in e || "activeTokenVariant" in e || "defaultTokenVariant" in e || "inheritThemeFromDocument" in e || "documentDarkClass" in e
|
|
41
|
+
return !e || typeof e != "object" ? !1 : "tokens" in e || "tokenVariants" in e || "activeTokenVariant" in e || "defaultTokenVariant" in e || "inheritThemeFromDocument" in e || "documentDarkClass" in e;
|
|
48
42
|
}
|
|
49
43
|
function on(e) {
|
|
50
|
-
return e == null ? ee : typeof e == "string" ? e === "sugar" ?
|
|
44
|
+
return e == null ? ee : typeof e == "string" ? e === "sugar" ? Re(ee, ot) : en[e] ?? ee : nn(e) ? Re(ee, e) : Re(ee, {
|
|
51
45
|
tokens: e
|
|
52
46
|
});
|
|
53
47
|
}
|
|
@@ -57,14 +51,14 @@ function rn(e) {
|
|
|
57
51
|
document: typeof document > "u" ? void 0 : document
|
|
58
52
|
});
|
|
59
53
|
}
|
|
60
|
-
function
|
|
54
|
+
function Ne(e, t) {
|
|
61
55
|
const l = rn(t);
|
|
62
56
|
return Yt(e, l), l;
|
|
63
57
|
}
|
|
64
|
-
function
|
|
58
|
+
function qe(e, t) {
|
|
65
59
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
66
60
|
}
|
|
67
|
-
function
|
|
61
|
+
function $e(e, t) {
|
|
68
62
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : t;
|
|
69
63
|
}
|
|
70
64
|
function ln(e) {
|
|
@@ -88,13 +82,13 @@ function an(e, t) {
|
|
|
88
82
|
function un(e, t, l, o) {
|
|
89
83
|
if (t !== "pagination")
|
|
90
84
|
return null;
|
|
91
|
-
const d = 100, i =
|
|
85
|
+
const d = 100, i = $e(l, d), w = qe(o, 0);
|
|
92
86
|
return e === !0 || e === !1 || e == null ? {
|
|
93
87
|
pageSize: i,
|
|
94
|
-
currentPage:
|
|
88
|
+
currentPage: w
|
|
95
89
|
} : {
|
|
96
|
-
pageSize:
|
|
97
|
-
currentPage:
|
|
90
|
+
pageSize: $e(l ?? e.pageSize, d),
|
|
91
|
+
currentPage: qe(o ?? e.currentPage, 0)
|
|
98
92
|
};
|
|
99
93
|
}
|
|
100
94
|
function sn(e) {
|
|
@@ -120,21 +114,21 @@ function dn(e) {
|
|
|
120
114
|
}
|
|
121
115
|
};
|
|
122
116
|
}
|
|
123
|
-
function
|
|
117
|
+
function Je(e) {
|
|
124
118
|
return typeof e == "object" && e !== null ? e : typeof window > "u" ? null : e === "session" ? window.sessionStorage : window.localStorage;
|
|
125
119
|
}
|
|
126
|
-
const Pe = "Search rows",
|
|
120
|
+
const Pe = "Search rows", Ie = "contains", De = "input", Fe = 300;
|
|
127
121
|
function cn(e) {
|
|
128
122
|
return typeof e == "string" && e.trim().length > 0 ? e.trim() : Pe;
|
|
129
123
|
}
|
|
130
124
|
function fn(e) {
|
|
131
|
-
return e === "tokens" ? "tokens" :
|
|
125
|
+
return e === "tokens" ? "tokens" : Ie;
|
|
132
126
|
}
|
|
133
127
|
function mn(e) {
|
|
134
|
-
return e === "debounce" || e === "manual" ? e :
|
|
128
|
+
return e === "debounce" || e === "manual" ? e : De;
|
|
135
129
|
}
|
|
136
130
|
function yn(e) {
|
|
137
|
-
return typeof e != "number" || !Number.isFinite(e) ?
|
|
131
|
+
return typeof e != "number" || !Number.isFinite(e) ? Fe : Math.max(0, Math.trunc(e));
|
|
138
132
|
}
|
|
139
133
|
function vn(e) {
|
|
140
134
|
if (!Array.isArray(e))
|
|
@@ -147,9 +141,9 @@ function pn(e) {
|
|
|
147
141
|
enabled: e,
|
|
148
142
|
placeholder: Pe,
|
|
149
143
|
columns: null,
|
|
150
|
-
mode:
|
|
151
|
-
applyMode:
|
|
152
|
-
debounceMs:
|
|
144
|
+
mode: Ie,
|
|
145
|
+
applyMode: De,
|
|
146
|
+
debounceMs: Fe
|
|
153
147
|
} : e ? {
|
|
154
148
|
enabled: !0,
|
|
155
149
|
placeholder: cn(e.placeholder),
|
|
@@ -161,40 +155,40 @@ function pn(e) {
|
|
|
161
155
|
enabled: !1,
|
|
162
156
|
placeholder: Pe,
|
|
163
157
|
columns: null,
|
|
164
|
-
mode:
|
|
165
|
-
applyMode:
|
|
166
|
-
debounceMs:
|
|
158
|
+
mode: Ie,
|
|
159
|
+
applyMode: De,
|
|
160
|
+
debounceMs: Fe
|
|
167
161
|
});
|
|
168
162
|
}
|
|
169
|
-
const
|
|
170
|
-
function
|
|
163
|
+
const Me = "Find / replace";
|
|
164
|
+
function wn(e) {
|
|
171
165
|
return typeof e == "boolean" ? {
|
|
172
166
|
enabled: e,
|
|
173
|
-
buttonLabel:
|
|
167
|
+
buttonLabel: Me
|
|
174
168
|
} : e ? {
|
|
175
169
|
enabled: e.enabled ?? !0,
|
|
176
|
-
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() :
|
|
170
|
+
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : Me
|
|
177
171
|
} : {
|
|
178
172
|
enabled: !1,
|
|
179
|
-
buttonLabel:
|
|
173
|
+
buttonLabel: Me
|
|
180
174
|
};
|
|
181
175
|
}
|
|
182
|
-
const
|
|
176
|
+
const gn = "all", rt = {
|
|
183
177
|
all: "columns",
|
|
184
178
|
rows: "none",
|
|
185
179
|
columns: "columns",
|
|
186
180
|
none: "none"
|
|
187
181
|
};
|
|
188
|
-
function
|
|
189
|
-
return e === "rows" || e === "columns" || e === "none" || e === "all" ? e :
|
|
182
|
+
function Ze(e) {
|
|
183
|
+
return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : gn;
|
|
190
184
|
}
|
|
191
185
|
function Sn(e, t) {
|
|
192
|
-
return e === "columns" || e === "none" ? e :
|
|
186
|
+
return e === "columns" || e === "none" ? e : rt[t];
|
|
193
187
|
}
|
|
194
|
-
function
|
|
188
|
+
function Ye(e, t) {
|
|
195
189
|
return e !== "none" || t === "columns";
|
|
196
190
|
}
|
|
197
|
-
function
|
|
191
|
+
function Qe(e) {
|
|
198
192
|
const t = e.body === "all" || e.body === "rows", l = e.body === "all" || e.body === "columns", o = e.header === "columns";
|
|
199
193
|
return {
|
|
200
194
|
body: e.body,
|
|
@@ -207,21 +201,21 @@ function Ye(e) {
|
|
|
207
201
|
}
|
|
208
202
|
function hn(e) {
|
|
209
203
|
if (typeof e == "string") {
|
|
210
|
-
const o =
|
|
211
|
-
return
|
|
204
|
+
const o = Ze(e), d = rt[o];
|
|
205
|
+
return Qe({
|
|
212
206
|
body: o,
|
|
213
207
|
header: d,
|
|
214
|
-
pinnedSeparators:
|
|
208
|
+
pinnedSeparators: Ye(o, d)
|
|
215
209
|
});
|
|
216
210
|
}
|
|
217
|
-
const t =
|
|
218
|
-
return
|
|
211
|
+
const t = Ze(e?.body), l = Sn(e?.header, t);
|
|
212
|
+
return Qe({
|
|
219
213
|
body: t,
|
|
220
214
|
header: l,
|
|
221
|
-
pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators :
|
|
215
|
+
pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : Ye(t, l)
|
|
222
216
|
});
|
|
223
217
|
}
|
|
224
|
-
function
|
|
218
|
+
function Xe(e) {
|
|
225
219
|
if (typeof e != "number" || !Number.isFinite(e))
|
|
226
220
|
return null;
|
|
227
221
|
const t = Math.max(0, Math.trunc(e));
|
|
@@ -235,8 +229,8 @@ function bn(e, t, l) {
|
|
|
235
229
|
minRows: null,
|
|
236
230
|
maxRows: null
|
|
237
231
|
};
|
|
238
|
-
const d =
|
|
239
|
-
let i =
|
|
232
|
+
const d = Xe(t);
|
|
233
|
+
let i = Xe(l);
|
|
240
234
|
return d !== null && i !== null && i < d && (i = d), {
|
|
241
235
|
layoutMode: o,
|
|
242
236
|
minRows: d,
|
|
@@ -249,7 +243,7 @@ function Rn(e) {
|
|
|
249
243
|
transaction: null
|
|
250
244
|
};
|
|
251
245
|
}
|
|
252
|
-
function
|
|
246
|
+
function me(e) {
|
|
253
247
|
return {
|
|
254
248
|
...e,
|
|
255
249
|
state: Rn(e.state)
|
|
@@ -258,24 +252,24 @@ function ce(e) {
|
|
|
258
252
|
function Mn(e) {
|
|
259
253
|
return typeof e == "object" && e !== null;
|
|
260
254
|
}
|
|
261
|
-
function
|
|
255
|
+
function lt(e, t, l) {
|
|
262
256
|
const o = Mn(e) ? e : null, d = t(o && "state" in o ? o.state : e, l);
|
|
263
257
|
if (!d)
|
|
264
258
|
return null;
|
|
265
|
-
const i = o?.viewMode,
|
|
266
|
-
return
|
|
259
|
+
const i = o?.viewMode, w = i === "gantt" ? "gantt" : i === "table" ? "table" : void 0;
|
|
260
|
+
return me({
|
|
267
261
|
state: d,
|
|
268
|
-
...
|
|
262
|
+
...w ? { viewMode: w } : {}
|
|
269
263
|
});
|
|
270
264
|
}
|
|
271
265
|
function On(e) {
|
|
272
|
-
return JSON.stringify(
|
|
266
|
+
return JSON.stringify(me(e));
|
|
273
267
|
}
|
|
274
268
|
function Cn(e, t, l) {
|
|
275
269
|
if (typeof e != "string" || e.trim().length === 0)
|
|
276
270
|
return null;
|
|
277
271
|
try {
|
|
278
|
-
return
|
|
272
|
+
return lt(JSON.parse(e), t, l);
|
|
279
273
|
} catch {
|
|
280
274
|
return null;
|
|
281
275
|
}
|
|
@@ -308,23 +302,23 @@ function to(e, t) {
|
|
|
308
302
|
return !1;
|
|
309
303
|
}
|
|
310
304
|
}
|
|
311
|
-
const
|
|
305
|
+
const Oe = "Aggregations";
|
|
312
306
|
function An(e) {
|
|
313
307
|
return typeof e == "boolean" ? {
|
|
314
308
|
enabled: e,
|
|
315
|
-
buttonLabel:
|
|
309
|
+
buttonLabel: Oe
|
|
316
310
|
} : e ? {
|
|
317
311
|
enabled: e.enabled ?? !0,
|
|
318
|
-
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() :
|
|
312
|
+
buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : Oe
|
|
319
313
|
} : {
|
|
320
314
|
enabled: !1,
|
|
321
|
-
buttonLabel:
|
|
315
|
+
buttonLabel: Oe
|
|
322
316
|
};
|
|
323
317
|
}
|
|
324
|
-
function
|
|
318
|
+
function de(e, t) {
|
|
325
319
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
326
320
|
}
|
|
327
|
-
function
|
|
321
|
+
function xn(e, t) {
|
|
328
322
|
const l = {
|
|
329
323
|
rows: !0,
|
|
330
324
|
columns: !1,
|
|
@@ -337,12 +331,12 @@ function Pn(e, t) {
|
|
|
337
331
|
l.rows = !1, l.columns = !1;
|
|
338
332
|
else if (e && typeof e == "object") {
|
|
339
333
|
l.rows = e.rows ?? l.rows, l.columns = e.columns ?? l.columns;
|
|
340
|
-
const o =
|
|
341
|
-
l.rowOverscan =
|
|
334
|
+
const o = de(e.overscan, l.rowOverscan);
|
|
335
|
+
l.rowOverscan = de(e.rowOverscan, o), l.columnOverscan = de(e.columnOverscan, de(e.overscan, l.columnOverscan));
|
|
342
336
|
}
|
|
343
337
|
return t === "pagination" && (l.rows = !1), l;
|
|
344
338
|
}
|
|
345
|
-
function
|
|
339
|
+
function ce(e) {
|
|
346
340
|
if (e == null)
|
|
347
341
|
return e;
|
|
348
342
|
const t = globalThis.structuredClone;
|
|
@@ -357,17 +351,17 @@ function se(e) {
|
|
|
357
351
|
return e;
|
|
358
352
|
}
|
|
359
353
|
}
|
|
360
|
-
function
|
|
354
|
+
function et(e) {
|
|
361
355
|
if (e == null || e.trim().length === 0)
|
|
362
356
|
return null;
|
|
363
357
|
const t = Number(e);
|
|
364
358
|
return Number.isFinite(t) ? Math.max(0, Math.trunc(t)) : null;
|
|
365
359
|
}
|
|
366
|
-
function
|
|
360
|
+
function Ce(e) {
|
|
367
361
|
const t = globalThis.CSS?.escape;
|
|
368
362
|
return typeof t == "function" ? t(e) : e.replace(/["\\]/g, "\\$&");
|
|
369
363
|
}
|
|
370
|
-
const
|
|
364
|
+
const Pn = nt({
|
|
371
365
|
name: "DataGridRuntimeHost",
|
|
372
366
|
inheritAttrs: !1,
|
|
373
367
|
props: {
|
|
@@ -424,7 +418,7 @@ const xn = tt({
|
|
|
424
418
|
setup(e, { attrs: t, slots: l, emit: o, expose: d }) {
|
|
425
419
|
const i = V(null);
|
|
426
420
|
Dt(Xt, i);
|
|
427
|
-
let
|
|
421
|
+
let w = null;
|
|
428
422
|
const s = Gt({
|
|
429
423
|
rows: y(() => e.rows),
|
|
430
424
|
rowModel: e.rowModel,
|
|
@@ -433,7 +427,7 @@ const xn = tt({
|
|
|
433
427
|
services: e.services,
|
|
434
428
|
startupOrder: e.startupOrder,
|
|
435
429
|
autoStart: e.autoStart
|
|
436
|
-
}), A = s,
|
|
430
|
+
}), A = s, P = {
|
|
437
431
|
api: s.api,
|
|
438
432
|
syncBodyRowsInRange: s.syncBodyRowsInRange,
|
|
439
433
|
setViewportRange: s.setViewportRange,
|
|
@@ -451,10 +445,10 @@ const xn = tt({
|
|
|
451
445
|
scrollToCell: s.scrollToCell
|
|
452
446
|
}, k = () => {
|
|
453
447
|
if (e.renderMode === "pagination") {
|
|
454
|
-
const
|
|
448
|
+
const u = e.pagination ?? { pageSize: 100, currentPage: 0 };
|
|
455
449
|
s.api.rows.setPagination({
|
|
456
|
-
pageSize: Math.max(1, Math.trunc(
|
|
457
|
-
currentPage: Math.max(0, Math.trunc(
|
|
450
|
+
pageSize: Math.max(1, Math.trunc(u.pageSize)),
|
|
451
|
+
currentPage: Math.max(0, Math.trunc(u.currentPage))
|
|
458
452
|
});
|
|
459
453
|
return;
|
|
460
454
|
}
|
|
@@ -472,62 +466,62 @@ const xn = tt({
|
|
|
472
466
|
k();
|
|
473
467
|
},
|
|
474
468
|
{ immediate: !0, deep: !0 }
|
|
475
|
-
), typeof document < "u" && (
|
|
476
|
-
const
|
|
477
|
-
|
|
478
|
-
}),
|
|
469
|
+
), typeof document < "u" && (w = new MutationObserver(() => {
|
|
470
|
+
const u = i.value;
|
|
471
|
+
u && Ne(u, e.theme);
|
|
472
|
+
}), w.observe(document.documentElement, {
|
|
479
473
|
attributes: !0,
|
|
480
474
|
attributeFilter: ["class", "data-theme"]
|
|
481
475
|
})), C(
|
|
482
476
|
[() => e.theme, i],
|
|
483
477
|
() => {
|
|
484
|
-
const
|
|
485
|
-
|
|
478
|
+
const u = i.value;
|
|
479
|
+
u && Ne(u, e.theme);
|
|
486
480
|
},
|
|
487
481
|
{ immediate: !0, deep: !0 }
|
|
488
482
|
);
|
|
489
|
-
const F = s.api.events.on("rows:changed", (
|
|
490
|
-
o("cell-change",
|
|
491
|
-
}), I = s.api.events.on("selection:changed", (
|
|
492
|
-
o("selection-change",
|
|
493
|
-
}), E = s.api.events.on("row-selection:changed", (
|
|
494
|
-
o("row-selection-change",
|
|
483
|
+
const F = s.api.events.on("rows:changed", (u) => {
|
|
484
|
+
o("cell-change", u);
|
|
485
|
+
}), I = s.api.events.on("selection:changed", (u) => {
|
|
486
|
+
o("selection-change", u);
|
|
487
|
+
}), E = s.api.events.on("row-selection:changed", (u) => {
|
|
488
|
+
o("row-selection-change", u);
|
|
495
489
|
});
|
|
496
|
-
|
|
497
|
-
F(), I(), E(),
|
|
490
|
+
Be(() => {
|
|
491
|
+
F(), I(), E(), w?.disconnect(), w = null;
|
|
498
492
|
});
|
|
499
|
-
const
|
|
500
|
-
const
|
|
493
|
+
const J = y(() => {
|
|
494
|
+
const u = s.virtualWindow.value;
|
|
501
495
|
return {
|
|
502
|
-
...
|
|
503
|
-
rowTotal:
|
|
496
|
+
...u ?? {},
|
|
497
|
+
rowTotal: u?.rowTotal ?? s.rowPartition.value.bodyRowCount,
|
|
504
498
|
colTotal: s.columnSnapshot.value.visibleColumns.length
|
|
505
499
|
};
|
|
506
|
-
}),
|
|
500
|
+
}), g = () => {
|
|
507
501
|
if (typeof document > "u")
|
|
508
502
|
return null;
|
|
509
|
-
const
|
|
510
|
-
return !
|
|
511
|
-
},
|
|
512
|
-
const S = s.api.selection.getSnapshot(), p = S?.activeCell ?? null, M =
|
|
503
|
+
const u = i.value, S = document.activeElement;
|
|
504
|
+
return !u || !(S instanceof HTMLElement) || !u.contains(S) ? null : S.closest(".grid-cell[data-row-index], .grid-cell[data-row-id]");
|
|
505
|
+
}, Z = (u) => u == null ? null : s.columnSnapshot.value.visibleColumns[u]?.key ?? null, h = (u = {}) => {
|
|
506
|
+
const S = s.api.selection.getSnapshot(), p = S?.activeCell ?? null, M = g(), O = et(M?.getAttribute("data-row-index") ?? null), B = et(M?.getAttribute("data-column-index") ?? null), x = M?.getAttribute("data-column-key") ?? null, G = M?.getAttribute("data-row-id") ?? null, j = O ?? p?.rowIndex ?? null, z = p != null && (O == null && G == null || p.rowIndex === O || p.rowId != null && String(p.rowId) === G), _ = z ? p?.colIndex ?? B : B ?? p?.colIndex ?? null, W = z ? p?.rowId ?? G : G ?? p?.rowId ?? null, Y = typeof W == "string" || typeof W == "number" ? W : null, Q = x ?? Z(_), N = Y != null || j != null || Q != null || _ != null, ne = u.includeSelection !== !1, oe = u.includeRowSelection !== !1;
|
|
513
507
|
return !N && !S && !s.api.rowSelection.getSnapshot() ? null : {
|
|
514
508
|
version: 1,
|
|
515
|
-
rowId:
|
|
509
|
+
rowId: Y,
|
|
516
510
|
rowIndex: j,
|
|
517
|
-
columnKey:
|
|
511
|
+
columnKey: Q,
|
|
518
512
|
columnIndex: _,
|
|
519
|
-
selection: ne ?
|
|
520
|
-
rowSelection: oe ?
|
|
513
|
+
selection: ne ? ce(S) : null,
|
|
514
|
+
rowSelection: oe ? ce(s.api.rowSelection.getSnapshot()) : null
|
|
521
515
|
};
|
|
522
|
-
}, K = (
|
|
516
|
+
}, K = (u, S) => {
|
|
523
517
|
const p = i.value;
|
|
524
518
|
if (!p)
|
|
525
519
|
return !1;
|
|
526
520
|
const M = [];
|
|
527
|
-
if (
|
|
528
|
-
`.grid-cell[data-row-index="${
|
|
529
|
-
),
|
|
530
|
-
`.grid-cell[data-row-id="${
|
|
521
|
+
if (u.rowIndex != null && u.columnKey && M.push(
|
|
522
|
+
`.grid-cell[data-row-index="${u.rowIndex}"][data-column-key="${Ce(u.columnKey)}"]`
|
|
523
|
+
), u.rowIndex != null && u.columnIndex != null && M.push(`.grid-cell[data-row-index="${u.rowIndex}"][data-column-index="${u.columnIndex}"]`), u.rowId != null && u.columnKey && M.push(
|
|
524
|
+
`.grid-cell[data-row-id="${Ce(String(u.rowId))}"][data-column-key="${Ce(u.columnKey)}"]`
|
|
531
525
|
), M.length === 0)
|
|
532
526
|
return !1;
|
|
533
527
|
let O = null;
|
|
@@ -542,34 +536,34 @@ const xn = tt({
|
|
|
542
536
|
O.focus();
|
|
543
537
|
}
|
|
544
538
|
return typeof document > "u" || document.activeElement === O;
|
|
545
|
-
}, te = async (
|
|
546
|
-
if (!
|
|
539
|
+
}, te = async (u, S = {}) => {
|
|
540
|
+
if (!u)
|
|
547
541
|
return !1;
|
|
548
|
-
if (S.applySelection !== !1 &&
|
|
542
|
+
if (S.applySelection !== !1 && u.selection && s.api.selection.setSnapshot(ce(u.selection)), S.applyRowSelection !== !1 && u.rowSelection && s.api.rowSelection.setSnapshot(ce(u.rowSelection)), S.focus === !1)
|
|
549
543
|
return !0;
|
|
550
|
-
const p = typeof
|
|
551
|
-
...
|
|
552
|
-
rowIndex: O != null && O >= 0 ? O :
|
|
553
|
-
columnIndex: B >= 0 ? B :
|
|
544
|
+
const p = typeof u.rowId == "string" || typeof u.rowId == "number" ? u.rowId : null, M = p != null ? A.resolveBodyRowIndexById(p) : -1, O = M >= 0 ? M : u.rowIndex, B = u.columnKey ? s.columnSnapshot.value.visibleColumns.findIndex((j) => j.key === u.columnKey) : -1, x = {
|
|
545
|
+
...u,
|
|
546
|
+
rowIndex: O != null && O >= 0 ? O : u.rowIndex,
|
|
547
|
+
columnIndex: B >= 0 ? B : u.columnIndex
|
|
554
548
|
};
|
|
555
|
-
if (
|
|
549
|
+
if (x.rowIndex == null || x.columnKey == null && x.columnIndex == null)
|
|
556
550
|
return !1;
|
|
557
551
|
S.scrollIntoView !== !1 && s.scrollToCell({
|
|
558
552
|
rowId: p,
|
|
559
|
-
rowIndex:
|
|
560
|
-
columnKey:
|
|
561
|
-
columnIndex:
|
|
553
|
+
rowIndex: x.rowIndex,
|
|
554
|
+
columnKey: x.columnKey,
|
|
555
|
+
columnIndex: x.columnIndex,
|
|
562
556
|
align: "nearest"
|
|
563
557
|
});
|
|
564
558
|
const G = Math.max(0, Math.trunc(S.retries ?? 3));
|
|
565
559
|
for (let j = 0; j <= G; j += 1) {
|
|
566
|
-
if (await
|
|
560
|
+
if (await Ve(), K(x, S))
|
|
567
561
|
return !0;
|
|
568
562
|
typeof window < "u" && await new Promise((z) => window.requestAnimationFrame(() => z()));
|
|
569
563
|
}
|
|
570
564
|
return !1;
|
|
571
565
|
}, U = () => {
|
|
572
|
-
const
|
|
566
|
+
const u = () => {
|
|
573
567
|
const p = i.value?.querySelector(".grid-body-viewport");
|
|
574
568
|
if (!p)
|
|
575
569
|
return !1;
|
|
@@ -580,8 +574,8 @@ const xn = tt({
|
|
|
580
574
|
}
|
|
581
575
|
return typeof document < "u" && document.activeElement === p;
|
|
582
576
|
}, S = (p) => {
|
|
583
|
-
|
|
584
|
-
if (!(
|
|
577
|
+
Ve(() => {
|
|
578
|
+
if (!(u() || p >= 3)) {
|
|
585
579
|
if (typeof window < "u") {
|
|
586
580
|
window.requestAnimationFrame(() => {
|
|
587
581
|
S(p + 1);
|
|
@@ -597,7 +591,7 @@ const xn = tt({
|
|
|
597
591
|
return d({
|
|
598
592
|
api: s.api,
|
|
599
593
|
core: s.core,
|
|
600
|
-
runtime:
|
|
594
|
+
runtime: P,
|
|
601
595
|
rowModel: s.rowModel,
|
|
602
596
|
columnModel: s.columnModel,
|
|
603
597
|
columnSnapshot: s.columnSnapshot,
|
|
@@ -612,7 +606,7 @@ const xn = tt({
|
|
|
612
606
|
restoreFocus: U,
|
|
613
607
|
start: s.start,
|
|
614
608
|
stop: s.stop
|
|
615
|
-
}), () =>
|
|
609
|
+
}), () => xe(
|
|
616
610
|
"div",
|
|
617
611
|
Ft(t, {
|
|
618
612
|
ref: i,
|
|
@@ -631,8 +625,8 @@ const xn = tt({
|
|
|
631
625
|
l.default?.({
|
|
632
626
|
api: s.api,
|
|
633
627
|
core: s.core,
|
|
634
|
-
runtime:
|
|
635
|
-
grid:
|
|
628
|
+
runtime: P,
|
|
629
|
+
grid: P,
|
|
636
630
|
rowModel: s.rowModel,
|
|
637
631
|
columnModel: s.columnModel,
|
|
638
632
|
columnSnapshot: s.columnSnapshot.value,
|
|
@@ -641,12 +635,12 @@ const xn = tt({
|
|
|
641
635
|
syncBodyRowsInRange: s.syncBodyRowsInRange,
|
|
642
636
|
getBodyRowAtIndex: A.getBodyRowAtIndex,
|
|
643
637
|
resolveBodyRowIndexById: A.resolveBodyRowIndexById,
|
|
644
|
-
virtualWindow:
|
|
638
|
+
virtualWindow: J.value
|
|
645
639
|
}) ?? []
|
|
646
640
|
);
|
|
647
641
|
}
|
|
648
642
|
});
|
|
649
|
-
function
|
|
643
|
+
function Ae(e) {
|
|
650
644
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
|
|
651
645
|
}
|
|
652
646
|
function T(e) {
|
|
@@ -663,14 +657,14 @@ function In(e) {
|
|
|
663
657
|
} : null;
|
|
664
658
|
}
|
|
665
659
|
function Dn(e) {
|
|
666
|
-
let t = null, l = null, o = !1, d = null, i = null,
|
|
660
|
+
let t = null, l = null, o = !1, d = null, i = null, w = null, s = null, A = null, P = null, k = null, F = null, I = null;
|
|
667
661
|
const E = () => {
|
|
668
662
|
t?.(), l?.(), t = null, l = null;
|
|
669
|
-
},
|
|
663
|
+
}, J = () => {
|
|
670
664
|
const r = e.gridRef.value;
|
|
671
665
|
return !r || r.api.lifecycle.state === "disposed" ? null : r;
|
|
672
|
-
},
|
|
673
|
-
const r =
|
|
666
|
+
}, g = () => J()?.api ?? null, Z = () => {
|
|
667
|
+
const r = g()?.columns;
|
|
674
668
|
if (!r)
|
|
675
669
|
return null;
|
|
676
670
|
const m = r.getSnapshot(), f = {}, c = {}, b = {};
|
|
@@ -693,10 +687,10 @@ function Dn(e) {
|
|
|
693
687
|
}, h = () => {
|
|
694
688
|
o || (o = !0, queueMicrotask(() => {
|
|
695
689
|
o = !1;
|
|
696
|
-
const r =
|
|
690
|
+
const r = Z(), m = g();
|
|
697
691
|
if (r) {
|
|
698
692
|
const f = T(r);
|
|
699
|
-
|
|
693
|
+
P = f, f !== w && (w = f, e.emit.columnState(r), e.emit.columnOrder(r.order), e.emit.hiddenColumnKeys(
|
|
700
694
|
Object.entries(r.visibility).filter(([, c]) => !c).map(([c]) => c)
|
|
701
695
|
), e.emit.columnWidths(r.widths), e.emit.columnPins(r.pins));
|
|
702
696
|
}
|
|
@@ -708,13 +702,13 @@ function Dn(e) {
|
|
|
708
702
|
}
|
|
709
703
|
}));
|
|
710
704
|
}, K = () => {
|
|
711
|
-
const r =
|
|
705
|
+
const r = g();
|
|
712
706
|
!r || e.props.sortModel === void 0 && e.props.filterModel === void 0 || r.rows.setSortAndFilterModel({
|
|
713
707
|
sortModel: e.props.sortModel ?? [],
|
|
714
708
|
filterModel: e.props.filterModel ?? null
|
|
715
709
|
});
|
|
716
710
|
}, te = () => {
|
|
717
|
-
const r =
|
|
711
|
+
const r = g()?.columns;
|
|
718
712
|
return r ? new Set(r.getSnapshot().columns.map((m) => m.key)) : null;
|
|
719
713
|
}, U = (r) => {
|
|
720
714
|
const m = r, f = /* @__PURE__ */ new Set();
|
|
@@ -735,7 +729,7 @@ function Dn(e) {
|
|
|
735
729
|
for (const c of m?.zoneOrder?.pinnedRight ?? [])
|
|
736
730
|
f.add(c);
|
|
737
731
|
return f;
|
|
738
|
-
},
|
|
732
|
+
}, u = (r) => {
|
|
739
733
|
const m = te();
|
|
740
734
|
if (!m)
|
|
741
735
|
return !1;
|
|
@@ -746,15 +740,15 @@ function Dn(e) {
|
|
|
746
740
|
if (!m.has(c))
|
|
747
741
|
return !1;
|
|
748
742
|
return !0;
|
|
749
|
-
}, S = (r) =>
|
|
750
|
-
const m =
|
|
743
|
+
}, S = (r) => u(r.columns), p = (r) => {
|
|
744
|
+
const m = g();
|
|
751
745
|
if (!m)
|
|
752
746
|
return !1;
|
|
753
747
|
m.columns.setOrder(r.order);
|
|
754
748
|
for (const [c, b] of Object.entries(r.visibility))
|
|
755
749
|
m.columns.setVisibility(c, b);
|
|
756
750
|
for (const [c, b] of Object.entries(r.widths))
|
|
757
|
-
m.columns.setWidth(c,
|
|
751
|
+
m.columns.setWidth(c, Ae(b));
|
|
758
752
|
for (const [c, b] of Object.entries(r.pins))
|
|
759
753
|
m.columns.setPin(c, b);
|
|
760
754
|
const f = r.zoneOrder;
|
|
@@ -765,13 +759,13 @@ function Dn(e) {
|
|
|
765
759
|
return !0;
|
|
766
760
|
}, M = () => {
|
|
767
761
|
if (I) {
|
|
768
|
-
const r = I, m =
|
|
762
|
+
const r = I, m = g();
|
|
769
763
|
if (m) {
|
|
770
764
|
const f = m.state.migrate(r.state, { strict: r.options?.strict });
|
|
771
765
|
f && S(f) && (I = null, m.state.set(f, r.options), i = T(r.state));
|
|
772
766
|
}
|
|
773
767
|
}
|
|
774
|
-
if (F &&
|
|
768
|
+
if (F && u(F.columnState)) {
|
|
775
769
|
const r = F;
|
|
776
770
|
F = null, d = T({
|
|
777
771
|
columnState: r.columnState,
|
|
@@ -782,16 +776,16 @@ function Dn(e) {
|
|
|
782
776
|
}), p(r.columnState);
|
|
783
777
|
}
|
|
784
778
|
}, O = () => {
|
|
785
|
-
const r =
|
|
779
|
+
const r = g();
|
|
786
780
|
!r || e.props.groupBy === void 0 || r.rows.setGroupBy(e.props.groupBy ?? null);
|
|
787
781
|
}, B = () => {
|
|
788
|
-
const r =
|
|
782
|
+
const r = g();
|
|
789
783
|
!r || e.props.aggregationModel === void 0 || r.rows.setAggregationModel(e.props.aggregationModel ?? null);
|
|
790
|
-
},
|
|
791
|
-
const r =
|
|
784
|
+
}, x = () => {
|
|
785
|
+
const r = g();
|
|
792
786
|
!r || e.props.pivotModel === void 0 || r.pivot.setModel(e.props.pivotModel ?? null);
|
|
793
787
|
}, G = () => {
|
|
794
|
-
const r =
|
|
788
|
+
const r = g();
|
|
795
789
|
if (!r || 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)
|
|
796
790
|
return;
|
|
797
791
|
const m = T({
|
|
@@ -802,7 +796,7 @@ function Dn(e) {
|
|
|
802
796
|
columnPins: e.props.columnPins
|
|
803
797
|
});
|
|
804
798
|
if (m !== d) {
|
|
805
|
-
if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && T(e.props.columnState) ===
|
|
799
|
+
if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && T(e.props.columnState) === P) {
|
|
806
800
|
d = m;
|
|
807
801
|
return;
|
|
808
802
|
}
|
|
@@ -811,7 +805,7 @@ function Dn(e) {
|
|
|
811
805
|
for (const [c, b] of Object.entries(e.props.columnState.visibility))
|
|
812
806
|
r.columns.setVisibility(c, b);
|
|
813
807
|
for (const [c, b] of Object.entries(e.props.columnState.widths))
|
|
814
|
-
r.columns.setWidth(c,
|
|
808
|
+
r.columns.setWidth(c, Ae(b));
|
|
815
809
|
for (const [c, b] of Object.entries(e.props.columnState.pins))
|
|
816
810
|
r.columns.setPin(c, b);
|
|
817
811
|
const f = e.props.columnState.zoneOrder;
|
|
@@ -827,14 +821,14 @@ function Dn(e) {
|
|
|
827
821
|
}
|
|
828
822
|
if (e.props.columnWidths)
|
|
829
823
|
for (const [f, c] of Object.entries(e.props.columnWidths))
|
|
830
|
-
r.columns.setWidth(f,
|
|
824
|
+
r.columns.setWidth(f, Ae(c));
|
|
831
825
|
if (e.props.columnPins)
|
|
832
826
|
for (const [f, c] of Object.entries(e.props.columnPins))
|
|
833
827
|
r.columns.setPin(f, c);
|
|
834
828
|
d = m;
|
|
835
829
|
}
|
|
836
830
|
}, j = () => {
|
|
837
|
-
const r =
|
|
831
|
+
const r = g();
|
|
838
832
|
if (!r || e.props.state == null)
|
|
839
833
|
return;
|
|
840
834
|
const m = T(e.props.state);
|
|
@@ -847,34 +841,34 @@ function Dn(e) {
|
|
|
847
841
|
const f = r.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
|
|
848
842
|
f && S(f) && (r.state.set(f, e.props.stateOptions ?? {}), i = m);
|
|
849
843
|
}, z = () => {
|
|
850
|
-
const r =
|
|
844
|
+
const r = g();
|
|
851
845
|
r && (r.view.setRowHeightMode(e.props.rowHeightMode), r.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
|
|
852
846
|
}, _ = () => {
|
|
853
|
-
const r =
|
|
847
|
+
const r = J();
|
|
854
848
|
r && (d = null, i = null, E(), t = r.rowModel.subscribe(() => {
|
|
855
849
|
h();
|
|
856
850
|
}), l = r.columnModel.subscribe(() => {
|
|
857
851
|
h();
|
|
858
|
-
}), j(), G(), K(), O(), B(),
|
|
859
|
-
}, W = () =>
|
|
852
|
+
}), j(), G(), K(), O(), B(), x(), z(), M(), h(), e.emit.ready({ api: r.api }));
|
|
853
|
+
}, W = () => g()?.state.get() ?? null, Y = (r, m) => g()?.state.migrate(r, m) ?? null, Q = (r) => u(r) ? (d = T({
|
|
860
854
|
columnState: r,
|
|
861
855
|
columnOrder: null,
|
|
862
856
|
hiddenColumnKeys: null,
|
|
863
857
|
columnWidths: null,
|
|
864
858
|
columnPins: null
|
|
865
859
|
}), F = null, p(r) ? (h(), !0) : (F = { columnState: r }, !0)) : (F = { columnState: r }, !0), N = (r, m) => {
|
|
866
|
-
const f =
|
|
860
|
+
const f = g();
|
|
867
861
|
if (!f)
|
|
868
862
|
return I = { state: r, options: m }, !0;
|
|
869
863
|
const c = f.state.migrate(r, { strict: m?.strict });
|
|
870
864
|
return c ? S(c) ? (f.state.set(c, m), i = T(r), I = null, h(), !0) : (I = { state: r, options: m }, !0) : !1;
|
|
871
|
-
}, ne = () =>
|
|
872
|
-
const f =
|
|
865
|
+
}, ne = () => g()?.pivot.exportLayout() ?? null, oe = () => g()?.pivot.exportInterop() ?? null, ye = (r, m) => {
|
|
866
|
+
const f = g();
|
|
873
867
|
return f ? (f.pivot.importLayout(r, m), h(), !0) : !1;
|
|
874
|
-
},
|
|
875
|
-
|
|
876
|
-
},
|
|
877
|
-
|
|
868
|
+
}, ae = () => {
|
|
869
|
+
g()?.rows.expandAllGroups(), h();
|
|
870
|
+
}, ve = () => {
|
|
871
|
+
g()?.rows.collapseAllGroups(), h();
|
|
878
872
|
};
|
|
879
873
|
C(
|
|
880
874
|
() => e.gridRef.value,
|
|
@@ -891,7 +885,7 @@ function Dn(e) {
|
|
|
891
885
|
), C(
|
|
892
886
|
() => [e.props.state, e.props.stateOptions],
|
|
893
887
|
() => {
|
|
894
|
-
j(), G(), K(), O(), B(),
|
|
888
|
+
j(), G(), K(), O(), B(), x(), z(), M(), h();
|
|
895
889
|
},
|
|
896
890
|
{ deep: !0 }
|
|
897
891
|
), C(
|
|
@@ -927,7 +921,7 @@ function Dn(e) {
|
|
|
927
921
|
), C(
|
|
928
922
|
() => e.props.pivotModel,
|
|
929
923
|
() => {
|
|
930
|
-
|
|
924
|
+
x(), h();
|
|
931
925
|
},
|
|
932
926
|
{ deep: !0 }
|
|
933
927
|
), C(
|
|
@@ -936,25 +930,25 @@ function Dn(e) {
|
|
|
936
930
|
z(), h();
|
|
937
931
|
}
|
|
938
932
|
);
|
|
939
|
-
const
|
|
933
|
+
const X = () => {
|
|
940
934
|
E();
|
|
941
935
|
};
|
|
942
|
-
return
|
|
943
|
-
|
|
936
|
+
return Be(() => {
|
|
937
|
+
X();
|
|
944
938
|
}), {
|
|
945
939
|
emitSnapshotUpdates: h,
|
|
946
940
|
handleGridReady: _,
|
|
947
|
-
dispose:
|
|
948
|
-
getColumnState:
|
|
941
|
+
dispose: X,
|
|
942
|
+
getColumnState: Z,
|
|
949
943
|
getState: W,
|
|
950
|
-
migrateState:
|
|
951
|
-
applyColumnState:
|
|
944
|
+
migrateState: Y,
|
|
945
|
+
applyColumnState: Q,
|
|
952
946
|
applyState: N,
|
|
953
947
|
exportPivotLayout: ne,
|
|
954
948
|
exportPivotInterop: oe,
|
|
955
|
-
importPivotLayout:
|
|
956
|
-
expandAllGroups:
|
|
957
|
-
collapseAllGroups:
|
|
949
|
+
importPivotLayout: ye,
|
|
950
|
+
expandAllGroups: ae,
|
|
951
|
+
collapseAllGroups: ve
|
|
958
952
|
};
|
|
959
953
|
}
|
|
960
954
|
function Fn(e) {
|
|
@@ -1041,23 +1035,23 @@ function Kn(e, t) {
|
|
|
1041
1035
|
if (!(l.size === 0 && typeof t != "function"))
|
|
1042
1036
|
return (o, d) => {
|
|
1043
1037
|
if (typeof t == "function") {
|
|
1044
|
-
const
|
|
1045
|
-
if (typeof
|
|
1046
|
-
return
|
|
1038
|
+
const P = t(o, d);
|
|
1039
|
+
if (typeof P < "u")
|
|
1040
|
+
return P;
|
|
1047
1041
|
}
|
|
1048
1042
|
const i = l.get(String(d ?? "").trim());
|
|
1049
1043
|
if (!i)
|
|
1050
1044
|
return;
|
|
1051
|
-
const
|
|
1045
|
+
const w = o.data;
|
|
1052
1046
|
if (typeof i.valueGetter == "function")
|
|
1053
|
-
return i.valueGetter(
|
|
1047
|
+
return i.valueGetter(w);
|
|
1054
1048
|
if (typeof i.accessor == "function")
|
|
1055
|
-
return i.accessor(
|
|
1049
|
+
return i.accessor(w);
|
|
1056
1050
|
const s = typeof i.field == "string" ? i.field.trim() : "";
|
|
1057
1051
|
if (!s)
|
|
1058
1052
|
return;
|
|
1059
|
-
const A =
|
|
1060
|
-
return typeof A < "u" ? A : En(
|
|
1053
|
+
const A = w[s];
|
|
1054
|
+
return typeof A < "u" ? A : En(w, s);
|
|
1061
1055
|
};
|
|
1062
1056
|
}
|
|
1063
1057
|
function zn() {
|
|
@@ -1083,7 +1077,7 @@ function zn() {
|
|
|
1083
1077
|
}
|
|
1084
1078
|
};
|
|
1085
1079
|
}
|
|
1086
|
-
function
|
|
1080
|
+
function fe(e, t) {
|
|
1087
1081
|
const l = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
|
|
1088
1082
|
if (l.length !== 0)
|
|
1089
1083
|
return async (o) => {
|
|
@@ -1099,10 +1093,10 @@ function Hn(e) {
|
|
|
1099
1093
|
} = e;
|
|
1100
1094
|
return {
|
|
1101
1095
|
name: "selection",
|
|
1102
|
-
init:
|
|
1103
|
-
start:
|
|
1104
|
-
stop:
|
|
1105
|
-
dispose:
|
|
1096
|
+
init: fe("init", [t, l, o]),
|
|
1097
|
+
start: fe("start", [t, l, o]),
|
|
1098
|
+
stop: fe("stop", [t, l, o]),
|
|
1099
|
+
dispose: fe("dispose", [t, l, o]),
|
|
1106
1100
|
getSelectionSnapshot: l.getSelectionSnapshot,
|
|
1107
1101
|
setSelectionSnapshot: l.setSelectionSnapshot,
|
|
1108
1102
|
clearSelection: l.clearSelection,
|
|
@@ -1119,7 +1113,7 @@ function Hn(e) {
|
|
|
1119
1113
|
clearSelectedRows: o.clearSelectedRows
|
|
1120
1114
|
};
|
|
1121
1115
|
}
|
|
1122
|
-
function
|
|
1116
|
+
function tt(e) {
|
|
1123
1117
|
const t = e?.dataSource;
|
|
1124
1118
|
if (!t || typeof t != "object")
|
|
1125
1119
|
return null;
|
|
@@ -1132,14 +1126,14 @@ function Tn(e, t) {
|
|
|
1132
1126
|
const l = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
|
|
1133
1127
|
if (l.length !== o.length)
|
|
1134
1128
|
return !1;
|
|
1135
|
-
for (let
|
|
1136
|
-
if (l[
|
|
1129
|
+
for (let w = 0; w < l.length; w += 1)
|
|
1130
|
+
if (l[w] !== o[w])
|
|
1137
1131
|
return !1;
|
|
1138
1132
|
const d = e?.excludedRows ?? [], i = t?.excludedRows ?? [];
|
|
1139
1133
|
if (d.length !== i.length)
|
|
1140
1134
|
return !1;
|
|
1141
|
-
for (let
|
|
1142
|
-
if (d[
|
|
1135
|
+
for (let w = 0; w < d.length; w += 1)
|
|
1136
|
+
if (d[w] !== i[w])
|
|
1143
1137
|
return !1;
|
|
1144
1138
|
return !0;
|
|
1145
1139
|
}
|
|
@@ -1451,7 +1445,7 @@ const Un = {
|
|
|
1451
1445
|
type: Function,
|
|
1452
1446
|
default: void 0
|
|
1453
1447
|
}
|
|
1454
|
-
},
|
|
1448
|
+
}, it = nt({
|
|
1455
1449
|
name: "DataGrid",
|
|
1456
1450
|
inheritAttrs: !1,
|
|
1457
1451
|
props: Un,
|
|
@@ -1460,7 +1454,6 @@ const Un = {
|
|
|
1460
1454
|
"cell-edit": (e) => !0,
|
|
1461
1455
|
"selection-change": (e) => !0,
|
|
1462
1456
|
"row-selection-change": (e) => !0,
|
|
1463
|
-
"row-select": (e) => !0,
|
|
1464
1457
|
"update:rowSelectionState": (e) => !0,
|
|
1465
1458
|
"update:columnState": (e) => !0,
|
|
1466
1459
|
"update:columnOrder": (e) => !0,
|
|
@@ -1474,14 +1467,14 @@ const Un = {
|
|
|
1474
1467
|
ready: (e) => !0
|
|
1475
1468
|
},
|
|
1476
1469
|
setup(e, { attrs: t, slots: l, emit: o, expose: d }) {
|
|
1477
|
-
const i = V(null),
|
|
1478
|
-
let k = null, F = !1, I = null, E = !1,
|
|
1479
|
-
const
|
|
1470
|
+
const i = V(null), w = jn(), s = V(null), A = V(null), P = V([]);
|
|
1471
|
+
let k = null, F = !1, I = null, E = !1, J = !1;
|
|
1472
|
+
const g = V(e.viewMode === "gantt" ? "gantt" : "table"), Z = V(e.state ?? null), h = y(() => dn(e.statePersistence)), K = y(() => Ln(e.history)), te = y(() => Kt(e.chrome)), U = y(() => an(e.renderMode, e.pagination)), u = y(() => un(
|
|
1480
1473
|
e.pagination,
|
|
1481
1474
|
U.value,
|
|
1482
1475
|
e.pageSize,
|
|
1483
1476
|
e.currentPage
|
|
1484
|
-
)), S = y(() => zt(e.columnMenu)), p = y(() => Ht(e.cellMenu)), M = y(() => Tt(e.rowIndexMenu)), O = y(() => kt(e.columnLayout)), B = y(() => Vt(e.columnReorder)),
|
|
1477
|
+
)), S = y(() => zt(e.columnMenu)), p = y(() => Ht(e.cellMenu)), M = y(() => Tt(e.rowIndexMenu)), O = y(() => kt(e.columnLayout)), B = y(() => Vt(e.columnReorder)), x = y(() => An(e.aggregations)), G = y(() => Jt(e.advancedFilter)), j = y(() => pn(e.quickFilter)), z = y(() => wn(e.findReplace)), _ = y(() => hn(e.gridLines)), W = y(() => ln(e.groupBy)), Y = y(() => e.state ? be(e.state, e.columns) : e.state), Q = y(() => Ut(e.filterModel ?? null, e.columns)), N = y(() => e.state ? Y.value : Z.value), ne = y(() => e.sortModel !== void 0 ? e.sortModel : N.value?.rows?.snapshot?.sortModel), oe = y(() => e.filterModel !== void 0 ? Q.value : jt(N.value?.rows?.snapshot?.filterModel ?? null)), ye = y(() => e.groupBy !== void 0 ? W.value ?? null : N.value?.rows?.snapshot?.groupBy ?? null), ae = y(() => e.pivotModel !== void 0 ? e.pivotModel : N.value?.rows?.snapshot?.pivotModel ?? null), ve = y(() => xn(e.virtualization, U.value)), X = y(() => bn(e.layoutMode, e.minRows, e.maxRows)), r = y(() => Zt(e.placeholderRows)), m = y(() => _t(e.rowReorder)), f = y(() => {
|
|
1485
1478
|
const n = e.clientRowModelOptions?.readFilterCell;
|
|
1486
1479
|
return Kn(
|
|
1487
1480
|
e.columns,
|
|
@@ -1502,7 +1495,7 @@ const Un = {
|
|
|
1502
1495
|
formulaFunctions: e.formulaFunctions
|
|
1503
1496
|
})), H = y(() => Nt(e.columns)), q = {
|
|
1504
1497
|
get state() {
|
|
1505
|
-
return
|
|
1498
|
+
return Y.value;
|
|
1506
1499
|
},
|
|
1507
1500
|
get stateOptions() {
|
|
1508
1501
|
return e.stateOptions;
|
|
@@ -1526,7 +1519,7 @@ const Un = {
|
|
|
1526
1519
|
return e.sortModel;
|
|
1527
1520
|
},
|
|
1528
1521
|
get filterModel() {
|
|
1529
|
-
return e.filterModel === void 0 ? void 0 :
|
|
1522
|
+
return e.filterModel === void 0 ? void 0 : Q.value;
|
|
1530
1523
|
},
|
|
1531
1524
|
get groupBy() {
|
|
1532
1525
|
return W.value;
|
|
@@ -1546,55 +1539,58 @@ const Un = {
|
|
|
1546
1539
|
get columns() {
|
|
1547
1540
|
return e.columns;
|
|
1548
1541
|
}
|
|
1549
|
-
},
|
|
1542
|
+
}, Ge = y(() => ae.value ? "pivot" : b.value && "initialTreeData" in b.value ? "tree" : "base"), at = y(() => i.value?.api.columns.getSnapshot().visibleColumns ?? []), ut = y(() => {
|
|
1550
1543
|
const n = i.value?.runtime;
|
|
1551
1544
|
if (!n)
|
|
1552
1545
|
return 0;
|
|
1553
|
-
const
|
|
1554
|
-
return Math.max(0,
|
|
1555
|
-
}),
|
|
1556
|
-
const
|
|
1557
|
-
if (!
|
|
1546
|
+
const a = Ue(n.rowPartition);
|
|
1547
|
+
return Math.max(0, a.pinnedTopRows.length + a.bodyRowCount + a.pinnedBottomRows.length);
|
|
1548
|
+
}), st = (n) => {
|
|
1549
|
+
const a = i.value?.runtime;
|
|
1550
|
+
if (!a)
|
|
1558
1551
|
return null;
|
|
1559
|
-
const v =
|
|
1552
|
+
const v = Ue(a.rowPartition), D = v.pinnedTopRows.length;
|
|
1560
1553
|
if (n < D)
|
|
1561
|
-
return
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1554
|
+
return v.pinnedTopRows[n] ?? null;
|
|
1555
|
+
const $ = v.bodyRowCount, le = n - D;
|
|
1556
|
+
if (le < $)
|
|
1557
|
+
return a.getBodyRowAtIndex(le);
|
|
1558
|
+
const ie = le - $;
|
|
1559
|
+
return v.pinnedBottomRows[ie] ?? null;
|
|
1560
|
+
}, dt = {
|
|
1561
|
+
mode: y(() => Ge.value),
|
|
1566
1562
|
resolveRuntime: () => i.value,
|
|
1567
|
-
visibleColumns:
|
|
1568
|
-
totalRows:
|
|
1563
|
+
visibleColumns: at,
|
|
1564
|
+
totalRows: ut,
|
|
1569
1565
|
showRowSelection: y(() => e.rowSelection),
|
|
1570
1566
|
readSelectionCell: e.readSelectionCell,
|
|
1571
|
-
resolveSelectionRowAtIndex:
|
|
1567
|
+
resolveSelectionRowAtIndex: st
|
|
1572
1568
|
}, {
|
|
1573
|
-
selectionSnapshot:
|
|
1574
|
-
selectionAnchor:
|
|
1575
|
-
syncSelectionSnapshotFromRuntime:
|
|
1576
|
-
selectionService:
|
|
1577
|
-
selectionAggregatesLabel:
|
|
1578
|
-
} = Lt(
|
|
1579
|
-
rowSelectionSnapshot:
|
|
1580
|
-
syncRowSelectionSnapshotFromRuntime:
|
|
1581
|
-
reconcileRowSelectionFromRuntime:
|
|
1582
|
-
selectionService:
|
|
1569
|
+
selectionSnapshot: ct,
|
|
1570
|
+
selectionAnchor: ft,
|
|
1571
|
+
syncSelectionSnapshotFromRuntime: mt,
|
|
1572
|
+
selectionService: yt,
|
|
1573
|
+
selectionAggregatesLabel: vt
|
|
1574
|
+
} = Lt(dt), {
|
|
1575
|
+
rowSelectionSnapshot: pe,
|
|
1576
|
+
syncRowSelectionSnapshotFromRuntime: we,
|
|
1577
|
+
reconcileRowSelectionFromRuntime: pt,
|
|
1578
|
+
selectionService: je
|
|
1583
1579
|
} = Et({
|
|
1584
1580
|
resolveRuntime: () => i.value
|
|
1585
|
-
}),
|
|
1581
|
+
}), wt = y(() => e.rowSelection ? je : zn()), gt = y(() => ({
|
|
1586
1582
|
...e.services ?? {},
|
|
1587
1583
|
selection: Hn({
|
|
1588
1584
|
userSelectionService: e.services?.selection,
|
|
1589
|
-
cellSelectionService:
|
|
1590
|
-
rowSelectionService:
|
|
1585
|
+
cellSelectionService: yt,
|
|
1586
|
+
rowSelectionService: wt.value
|
|
1591
1587
|
})
|
|
1592
1588
|
})), {
|
|
1593
|
-
dataGridInstanceKey:
|
|
1589
|
+
dataGridInstanceKey: St,
|
|
1594
1590
|
resolvedRowModel: re
|
|
1595
1591
|
} = qt({
|
|
1596
|
-
rows:
|
|
1597
|
-
rowModel:
|
|
1592
|
+
rows: _e(e, "rows"),
|
|
1593
|
+
rowModel: _e(e, "rowModel"),
|
|
1598
1594
|
clientRowModelOptions: b,
|
|
1599
1595
|
onOwnedRowModelRecreated: () => {
|
|
1600
1596
|
R.dispose();
|
|
@@ -1610,123 +1606,123 @@ const Un = {
|
|
|
1610
1606
|
columnPins: (n) => o("update:columnPins", n),
|
|
1611
1607
|
groupBy: (n) => o("update:groupBy", n),
|
|
1612
1608
|
state: (n) => {
|
|
1613
|
-
|
|
1609
|
+
Z.value = n, o("update:state", n), Le();
|
|
1614
1610
|
},
|
|
1615
1611
|
ready: (n) => {
|
|
1616
|
-
|
|
1612
|
+
J = !0, Ee(), o("ready", {
|
|
1617
1613
|
api: n.api,
|
|
1618
1614
|
rowModel: re.value
|
|
1619
1615
|
});
|
|
1620
1616
|
}
|
|
1621
1617
|
}
|
|
1622
1618
|
});
|
|
1623
|
-
function
|
|
1619
|
+
function ge() {
|
|
1624
1620
|
I != null && (globalThis.clearTimeout(I), I = null);
|
|
1625
1621
|
}
|
|
1626
|
-
function
|
|
1622
|
+
function ue() {
|
|
1627
1623
|
const n = h.value;
|
|
1628
1624
|
if (!n || !E)
|
|
1629
1625
|
return;
|
|
1630
|
-
const
|
|
1631
|
-
if (!
|
|
1626
|
+
const a = Je(n.storage);
|
|
1627
|
+
if (!a)
|
|
1632
1628
|
return;
|
|
1633
1629
|
const D = i.value?.api?.state.get(n.getOptions) ?? R.getState();
|
|
1634
1630
|
if (D)
|
|
1635
1631
|
try {
|
|
1636
|
-
|
|
1632
|
+
a.setItem(n.key, JSON.stringify(D));
|
|
1637
1633
|
} catch {
|
|
1638
1634
|
}
|
|
1639
1635
|
}
|
|
1640
|
-
function
|
|
1636
|
+
function Le() {
|
|
1641
1637
|
const n = h.value;
|
|
1642
|
-
!n || !E || (
|
|
1643
|
-
I = null,
|
|
1638
|
+
!n || !E || (ge(), I = globalThis.setTimeout(() => {
|
|
1639
|
+
I = null, ue();
|
|
1644
1640
|
}, n.debounceMs));
|
|
1645
1641
|
}
|
|
1646
|
-
function
|
|
1642
|
+
function Ee() {
|
|
1647
1643
|
const n = h.value;
|
|
1648
|
-
if (!n || E ||
|
|
1644
|
+
if (!n || E || !J)
|
|
1649
1645
|
return;
|
|
1650
1646
|
if (!n.restoreOnReady) {
|
|
1651
1647
|
E = !0;
|
|
1652
1648
|
return;
|
|
1653
1649
|
}
|
|
1654
1650
|
E = !0;
|
|
1655
|
-
const
|
|
1656
|
-
if (!
|
|
1651
|
+
const a = Je(n.storage);
|
|
1652
|
+
if (!a)
|
|
1657
1653
|
return;
|
|
1658
1654
|
let v;
|
|
1659
1655
|
try {
|
|
1660
|
-
const
|
|
1661
|
-
if (
|
|
1656
|
+
const $ = a.getItem(n.key);
|
|
1657
|
+
if (!$)
|
|
1662
1658
|
return;
|
|
1663
|
-
v = JSON.parse(
|
|
1659
|
+
v = JSON.parse($);
|
|
1664
1660
|
} catch {
|
|
1665
1661
|
return;
|
|
1666
1662
|
}
|
|
1667
1663
|
const D = R.migrateState(v);
|
|
1668
1664
|
D && R.applyState(D, n.setOptions);
|
|
1669
1665
|
}
|
|
1670
|
-
function
|
|
1671
|
-
|
|
1666
|
+
function ht() {
|
|
1667
|
+
Le();
|
|
1672
1668
|
}
|
|
1673
|
-
function
|
|
1674
|
-
|
|
1669
|
+
function se() {
|
|
1670
|
+
ue();
|
|
1675
1671
|
}
|
|
1676
|
-
function
|
|
1677
|
-
typeof document < "u" && document.visibilityState === "hidden" &&
|
|
1672
|
+
function Ke() {
|
|
1673
|
+
typeof document < "u" && document.visibilityState === "hidden" && ue();
|
|
1678
1674
|
}
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1681
|
-
},
|
|
1675
|
+
const bt = (n) => {
|
|
1676
|
+
pt(), o("cell-change", n), R.emitSnapshotUpdates();
|
|
1677
|
+
}, Se = (n) => {
|
|
1682
1678
|
o("cell-edit", n);
|
|
1683
|
-
}, bt = (n) => {
|
|
1684
|
-
o("selection-change", n), R.emitSnapshotUpdates();
|
|
1685
1679
|
}, Rt = (n) => {
|
|
1680
|
+
o("selection-change", n), R.emitSnapshotUpdates();
|
|
1681
|
+
}, Mt = (n) => {
|
|
1686
1682
|
o("row-selection-change", n);
|
|
1687
|
-
},
|
|
1683
|
+
}, ze = () => {
|
|
1688
1684
|
R.emitSnapshotUpdates();
|
|
1689
1685
|
};
|
|
1690
1686
|
C(
|
|
1691
|
-
|
|
1687
|
+
pe,
|
|
1692
1688
|
(n) => {
|
|
1693
|
-
o("
|
|
1689
|
+
o("update:rowSelectionState", n), ze();
|
|
1694
1690
|
},
|
|
1695
1691
|
{ deep: !0 }
|
|
1696
1692
|
), C(
|
|
1697
1693
|
() => [e.rowSelection, e.rowSelectionState, i.value],
|
|
1698
|
-
([n,
|
|
1694
|
+
([n, a]) => {
|
|
1699
1695
|
if (n) {
|
|
1700
|
-
if (
|
|
1696
|
+
if (a !== void 0) {
|
|
1701
1697
|
const v = i.value?.api.rowSelection;
|
|
1702
|
-
Tn(
|
|
1698
|
+
Tn(pe.value, a) || (a ? v?.setSnapshot(a) : v?.clear(), we());
|
|
1703
1699
|
return;
|
|
1704
1700
|
}
|
|
1705
|
-
|
|
1701
|
+
we();
|
|
1706
1702
|
return;
|
|
1707
1703
|
}
|
|
1708
|
-
|
|
1704
|
+
je.clearRowSelection?.();
|
|
1709
1705
|
},
|
|
1710
1706
|
{ immediate: !0 }
|
|
1711
1707
|
), C(
|
|
1712
1708
|
() => e.viewMode,
|
|
1713
1709
|
(n) => {
|
|
1714
|
-
|
|
1710
|
+
g.value = n === "gantt" ? "gantt" : "table";
|
|
1715
1711
|
},
|
|
1716
1712
|
{ immediate: !0 }
|
|
1717
1713
|
);
|
|
1718
|
-
const
|
|
1719
|
-
const
|
|
1720
|
-
|
|
1721
|
-
},
|
|
1714
|
+
const He = (n) => {
|
|
1715
|
+
const a = n === "gantt" ? "gantt" : "table";
|
|
1716
|
+
g.value = a, o("update:viewMode", a);
|
|
1717
|
+
}, Ot = (n) => {
|
|
1722
1718
|
s.value = n;
|
|
1723
|
-
},
|
|
1719
|
+
}, Te = (n) => {
|
|
1724
1720
|
A.value = n;
|
|
1725
|
-
},
|
|
1726
|
-
Vn(
|
|
1721
|
+
}, Ct = (n) => {
|
|
1722
|
+
Vn(P.value, n) || (P.value = n, k = n, !F && (F = !0, Promise.resolve().then(() => {
|
|
1727
1723
|
F = !1;
|
|
1728
|
-
const
|
|
1729
|
-
k = null,
|
|
1724
|
+
const a = k;
|
|
1725
|
+
k = null, a && o("toolbar-modules-change", a);
|
|
1730
1726
|
})));
|
|
1731
1727
|
}, L = V({
|
|
1732
1728
|
canUndo: !1,
|
|
@@ -1734,35 +1730,35 @@ const Un = {
|
|
|
1734
1730
|
});
|
|
1735
1731
|
C(
|
|
1736
1732
|
re,
|
|
1737
|
-
(n,
|
|
1738
|
-
const D =
|
|
1733
|
+
(n, a, v) => {
|
|
1734
|
+
const D = tt(n);
|
|
1739
1735
|
if (L.value = D?.getCachedHistoryStatus?.() ?? {
|
|
1740
1736
|
canUndo: !1,
|
|
1741
1737
|
canRedo: !1
|
|
1742
1738
|
}, !D)
|
|
1743
1739
|
return;
|
|
1744
|
-
let
|
|
1745
|
-
const
|
|
1746
|
-
L.value =
|
|
1740
|
+
let $ = !0;
|
|
1741
|
+
const le = D.subscribeHistoryStatus?.((ie) => {
|
|
1742
|
+
L.value = ie;
|
|
1747
1743
|
});
|
|
1748
|
-
D.getHistoryStatus?.().then((
|
|
1749
|
-
|
|
1744
|
+
D.getHistoryStatus?.().then((ie) => {
|
|
1745
|
+
$ && (L.value = ie);
|
|
1750
1746
|
}).catch(() => {
|
|
1751
1747
|
}), v(() => {
|
|
1752
|
-
|
|
1748
|
+
$ = !1, le?.();
|
|
1753
1749
|
});
|
|
1754
1750
|
},
|
|
1755
1751
|
{ immediate: !0 }
|
|
1756
1752
|
);
|
|
1757
|
-
const
|
|
1758
|
-
const n =
|
|
1759
|
-
return !K.value.enabled || K.value.adapter || !n ?
|
|
1753
|
+
const At = y(() => {
|
|
1754
|
+
const n = tt(re.value);
|
|
1755
|
+
return !K.value.enabled || K.value.adapter || !n ? w : {
|
|
1760
1756
|
canUndo: () => (L.value, L.value.canUndo === !0),
|
|
1761
1757
|
canRedo: () => (L.value, L.value.canRedo === !0),
|
|
1762
|
-
runHistoryAction: async (
|
|
1763
|
-
if (L.value,
|
|
1758
|
+
runHistoryAction: async (a) => {
|
|
1759
|
+
if (L.value, a === "undo" && L.value.canUndo !== !0 || a === "redo" && L.value.canRedo !== !0)
|
|
1764
1760
|
return null;
|
|
1765
|
-
const v =
|
|
1761
|
+
const v = a === "undo" ? await n.undoHistoryStack?.() : await n.redoHistoryStack?.();
|
|
1766
1762
|
return v && (L.value = {
|
|
1767
1763
|
...L.value,
|
|
1768
1764
|
...typeof v.canUndo == "boolean" ? { canUndo: v.canUndo } : {},
|
|
@@ -1770,126 +1766,126 @@ const Un = {
|
|
|
1770
1766
|
...typeof v.latestUndoOperationId < "u" ? { latestUndoOperationId: v.latestUndoOperationId } : {},
|
|
1771
1767
|
...typeof v.latestRedoOperationId < "u" ? { latestRedoOperationId: v.latestRedoOperationId } : {},
|
|
1772
1768
|
...typeof v.datasetVersion < "u" ? { datasetVersion: v.datasetVersion } : {}
|
|
1773
|
-
}), typeof v?.operationId == "string" && v.operationId.length > 0 ? v.operationId :
|
|
1769
|
+
}), typeof v?.operationId == "string" && v.operationId.length > 0 ? v.operationId : a === "undo" ? v?.latestRedoOperationId ?? null : v?.latestUndoOperationId ?? null;
|
|
1774
1770
|
}
|
|
1775
1771
|
};
|
|
1776
|
-
}),
|
|
1772
|
+
}), he = y(() => {
|
|
1777
1773
|
const n = K.value.adapter;
|
|
1778
|
-
return !K.value.enabled || !n ?
|
|
1774
|
+
return !K.value.enabled || !n ? At.value : {
|
|
1779
1775
|
canUndo: () => n.canUndo(),
|
|
1780
1776
|
canRedo: () => n.canRedo(),
|
|
1781
|
-
runHistoryAction: (
|
|
1777
|
+
runHistoryAction: (a) => n.runHistoryAction(a)
|
|
1782
1778
|
};
|
|
1783
|
-
}),
|
|
1784
|
-
canUndo: () => (s.value ??
|
|
1785
|
-
canRedo: () => (s.value ??
|
|
1786
|
-
runHistoryAction: (n) => (s.value ??
|
|
1787
|
-
},
|
|
1779
|
+
}), ke = {
|
|
1780
|
+
canUndo: () => (s.value ?? he.value).canUndo(),
|
|
1781
|
+
canRedo: () => (s.value ?? he.value).canRedo(),
|
|
1782
|
+
runHistoryAction: (n) => (s.value ?? he.value).runHistoryAction(n)
|
|
1783
|
+
}, xt = () => {
|
|
1788
1784
|
const n = R.getState();
|
|
1789
|
-
return n ?
|
|
1785
|
+
return n ? me({
|
|
1790
1786
|
state: n,
|
|
1791
|
-
viewMode:
|
|
1787
|
+
viewMode: g.value
|
|
1792
1788
|
}) : null;
|
|
1793
|
-
}, Pt = (n,
|
|
1794
|
-
const v =
|
|
1789
|
+
}, Pt = (n, a) => lt(n, R.migrateState, a), It = (n, a) => {
|
|
1790
|
+
const v = me(n);
|
|
1795
1791
|
return R.applyState(
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
) ? (v.viewMode &&
|
|
1792
|
+
be(v.state, e.columns),
|
|
1793
|
+
a
|
|
1794
|
+
) ? (v.viewMode && He(v.viewMode), !0) : !1;
|
|
1799
1795
|
};
|
|
1800
1796
|
return C(
|
|
1801
1797
|
h,
|
|
1802
1798
|
() => {
|
|
1803
|
-
|
|
1799
|
+
ge(), E = !1, Ee();
|
|
1804
1800
|
},
|
|
1805
1801
|
{ deep: !0 }
|
|
1806
1802
|
), Bt(() => {
|
|
1807
|
-
typeof window < "u" && (window.addEventListener("pagehide",
|
|
1808
|
-
}),
|
|
1809
|
-
|
|
1803
|
+
typeof window < "u" && (window.addEventListener("pagehide", se), window.addEventListener("beforeunload", se)), typeof document < "u" && document.addEventListener("visibilitychange", Ke);
|
|
1804
|
+
}), Be(() => {
|
|
1805
|
+
ue(), ge(), typeof window < "u" && (window.removeEventListener("pagehide", se), window.removeEventListener("beforeunload", se)), typeof document < "u" && document.removeEventListener("visibilitychange", Ke), R.dispose(), Te(null);
|
|
1810
1806
|
}), d({
|
|
1811
1807
|
grid: i,
|
|
1812
1808
|
rowModel: re,
|
|
1813
|
-
history:
|
|
1814
|
-
getHistory: () =>
|
|
1815
|
-
toolbarModules:
|
|
1816
|
-
getToolbarModules: () =>
|
|
1809
|
+
history: ke,
|
|
1810
|
+
getHistory: () => ke,
|
|
1811
|
+
toolbarModules: P,
|
|
1812
|
+
getToolbarModules: () => P.value,
|
|
1817
1813
|
getApi: () => i.value?.api ?? null,
|
|
1818
1814
|
getRuntime: () => i.value?.runtime ?? null,
|
|
1819
1815
|
getCore: () => i.value?.core ?? null,
|
|
1820
1816
|
captureFocusAnchor: (n) => i.value?.captureFocusAnchor(n) ?? null,
|
|
1821
|
-
restoreFocusAnchor: (n,
|
|
1817
|
+
restoreFocusAnchor: (n, a) => i.value?.restoreFocusAnchor(n, a) ?? Promise.resolve(!1),
|
|
1822
1818
|
restoreFocus: () => {
|
|
1823
1819
|
i.value?.restoreFocus();
|
|
1824
1820
|
},
|
|
1825
1821
|
getColumnState: () => R.getColumnState(),
|
|
1826
1822
|
getColumnSnapshot: () => i.value?.api.columns.getSnapshot() ?? null,
|
|
1827
|
-
getSelectionAggregatesLabel: () =>
|
|
1828
|
-
runStructuralRowAction: (n,
|
|
1823
|
+
getSelectionAggregatesLabel: () => vt.value,
|
|
1824
|
+
runStructuralRowAction: (n, a) => A.value?.(n, a) ?? Promise.resolve(!1),
|
|
1829
1825
|
getSelectionSummary: () => {
|
|
1830
1826
|
const n = i.value?.api.selection.summarize;
|
|
1831
1827
|
if (!n)
|
|
1832
1828
|
return null;
|
|
1833
|
-
const
|
|
1829
|
+
const a = {
|
|
1834
1830
|
readSelectionCell: e.readSelectionCell
|
|
1835
1831
|
};
|
|
1836
|
-
return n(
|
|
1832
|
+
return n(a);
|
|
1837
1833
|
},
|
|
1838
|
-
getView: () =>
|
|
1839
|
-
setView:
|
|
1840
|
-
getSavedView:
|
|
1834
|
+
getView: () => g.value,
|
|
1835
|
+
setView: He,
|
|
1836
|
+
getSavedView: xt,
|
|
1841
1837
|
migrateSavedView: Pt,
|
|
1842
|
-
applySavedView:
|
|
1838
|
+
applySavedView: It,
|
|
1843
1839
|
applyColumnState: R.applyColumnState,
|
|
1844
1840
|
getState: R.getState,
|
|
1845
1841
|
migrateState: R.migrateState,
|
|
1846
|
-
applyState: (n,
|
|
1842
|
+
applyState: (n, a) => n ? R.applyState(be(n, e.columns), a) : !1,
|
|
1847
1843
|
exportPivotLayout: R.exportPivotLayout,
|
|
1848
1844
|
exportPivotInterop: R.exportPivotInterop,
|
|
1849
1845
|
importPivotLayout: R.importPivotLayout,
|
|
1850
1846
|
expandAllGroups: R.expandAllGroups,
|
|
1851
1847
|
collapseAllGroups: R.collapseAllGroups,
|
|
1852
|
-
insertRowsAt: (n,
|
|
1853
|
-
insertRowBefore: (n,
|
|
1854
|
-
insertRowAfter: (n,
|
|
1855
|
-
insertColumnsAt: (n,
|
|
1856
|
-
insertColumnBefore: (n,
|
|
1857
|
-
insertColumnAfter: (n,
|
|
1848
|
+
insertRowsAt: (n, a) => i.value?.api.rows.insertDataAt(n, a) ?? !1,
|
|
1849
|
+
insertRowBefore: (n, a) => i.value?.api.rows.insertDataBefore(n, a) ?? !1,
|
|
1850
|
+
insertRowAfter: (n, a) => i.value?.api.rows.insertDataAfter(n, a) ?? !1,
|
|
1851
|
+
insertColumnsAt: (n, a) => i.value?.api.columns.insertAt(n, a) ?? !1,
|
|
1852
|
+
insertColumnBefore: (n, a) => i.value?.api.columns.insertBefore(n, a) ?? !1,
|
|
1853
|
+
insertColumnAfter: (n, a) => i.value?.api.columns.insertAfter(n, a) ?? !1
|
|
1858
1854
|
}), () => {
|
|
1859
1855
|
const n = {
|
|
1860
|
-
mode:
|
|
1856
|
+
mode: Ge.value,
|
|
1861
1857
|
rows: e.rows,
|
|
1862
1858
|
runtime: i.value?.runtime ?? null,
|
|
1863
1859
|
runtimeRowModel: i.value?.rowModel ?? null,
|
|
1864
|
-
selectionSnapshot:
|
|
1865
|
-
selectionAnchor:
|
|
1866
|
-
rowSelectionSnapshot:
|
|
1867
|
-
syncSelectionSnapshotFromRuntime:
|
|
1868
|
-
syncRowSelectionSnapshotFromRuntime:
|
|
1869
|
-
flushRowSelectionSnapshotUpdates:
|
|
1860
|
+
selectionSnapshot: ct,
|
|
1861
|
+
selectionAnchor: ft,
|
|
1862
|
+
rowSelectionSnapshot: pe,
|
|
1863
|
+
syncSelectionSnapshotFromRuntime: mt,
|
|
1864
|
+
syncRowSelectionSnapshotFromRuntime: we,
|
|
1865
|
+
flushRowSelectionSnapshotUpdates: ze,
|
|
1870
1866
|
sortModel: ne.value,
|
|
1871
1867
|
filterModel: oe.value,
|
|
1872
1868
|
filterModelNormalized: !0,
|
|
1873
1869
|
appColumns: e.columns,
|
|
1874
|
-
groupBy:
|
|
1875
|
-
pivotModel:
|
|
1870
|
+
groupBy: ye.value,
|
|
1871
|
+
pivotModel: ae.value,
|
|
1876
1872
|
renderMode: U.value,
|
|
1877
|
-
virtualization:
|
|
1873
|
+
virtualization: ve.value,
|
|
1878
1874
|
columnMenu: S.value,
|
|
1879
1875
|
cellMenu: p.value,
|
|
1880
1876
|
rowIndexMenu: M.value,
|
|
1881
1877
|
columnLayout: O.value,
|
|
1882
1878
|
columnReorder: B.value,
|
|
1883
|
-
aggregations:
|
|
1879
|
+
aggregations: x.value,
|
|
1884
1880
|
advancedFilter: G.value,
|
|
1885
1881
|
quickFilter: j.value,
|
|
1886
1882
|
findReplace: z.value,
|
|
1887
1883
|
gridLines: _.value,
|
|
1888
1884
|
rowHeightMode: e.rowHeightMode,
|
|
1889
1885
|
baseRowHeight: e.baseRowHeight,
|
|
1890
|
-
layoutMode:
|
|
1891
|
-
minRows:
|
|
1892
|
-
maxRows:
|
|
1886
|
+
layoutMode: X.value.layoutMode,
|
|
1887
|
+
minRows: X.value.minRows,
|
|
1888
|
+
maxRows: X.value.maxRows,
|
|
1893
1889
|
placeholderRows: r.value,
|
|
1894
1890
|
fillHandle: e.fillHandle,
|
|
1895
1891
|
rangeMove: e.rangeMove,
|
|
@@ -1902,48 +1898,48 @@ const Un = {
|
|
|
1902
1898
|
showRowIndex: e.showRowIndex,
|
|
1903
1899
|
rowSelection: e.rowSelection,
|
|
1904
1900
|
rowReorder: m.value,
|
|
1905
|
-
viewMode:
|
|
1901
|
+
viewMode: g.value,
|
|
1906
1902
|
gantt: e.gantt,
|
|
1907
1903
|
history: K.value,
|
|
1908
1904
|
chrome: te.value,
|
|
1909
|
-
registerHistoryController:
|
|
1910
|
-
registerStructuralRowActionRunner:
|
|
1911
|
-
reportToolbarModules:
|
|
1905
|
+
registerHistoryController: Ot,
|
|
1906
|
+
registerStructuralRowActionRunner: Te,
|
|
1907
|
+
reportToolbarModules: Ct,
|
|
1912
1908
|
toolbarModules: e.toolbarModules,
|
|
1913
1909
|
customOverlays: e.customOverlays,
|
|
1914
1910
|
runStructuralRowAction: e.runStructuralRowAction
|
|
1915
1911
|
};
|
|
1916
|
-
return
|
|
1917
|
-
|
|
1912
|
+
return xe(
|
|
1913
|
+
Pn,
|
|
1918
1914
|
{
|
|
1919
1915
|
...t,
|
|
1920
1916
|
ref: i,
|
|
1921
|
-
key:
|
|
1917
|
+
key: St.value,
|
|
1922
1918
|
rows: e.rows,
|
|
1923
|
-
onScrollCapture:
|
|
1919
|
+
onScrollCapture: ht,
|
|
1924
1920
|
rowModel: re.value,
|
|
1925
1921
|
columns: H.value,
|
|
1926
1922
|
theme: e.theme,
|
|
1927
|
-
layoutMode:
|
|
1923
|
+
layoutMode: X.value.layoutMode,
|
|
1928
1924
|
renderMode: U.value,
|
|
1929
|
-
pagination:
|
|
1925
|
+
pagination: u.value,
|
|
1930
1926
|
plugins: e.plugins,
|
|
1931
1927
|
services: gt.value,
|
|
1932
1928
|
startupOrder: e.startupOrder,
|
|
1933
1929
|
autoStart: e.autoStart,
|
|
1934
|
-
onCellChange:
|
|
1935
|
-
onCellEdit:
|
|
1936
|
-
onSelectionChange:
|
|
1937
|
-
onRowSelectionChange:
|
|
1930
|
+
onCellChange: bt,
|
|
1931
|
+
onCellEdit: Se,
|
|
1932
|
+
onSelectionChange: Rt,
|
|
1933
|
+
onRowSelectionChange: Mt
|
|
1938
1934
|
},
|
|
1939
1935
|
l.default ? {
|
|
1940
|
-
default: (
|
|
1941
|
-
...
|
|
1936
|
+
default: (a) => l.default?.({
|
|
1937
|
+
...a,
|
|
1942
1938
|
defaultRendererProps: {
|
|
1943
1939
|
...n,
|
|
1944
|
-
runtime:
|
|
1945
|
-
runtimeRowModel:
|
|
1946
|
-
onCellEdit:
|
|
1940
|
+
runtime: a.runtime,
|
|
1941
|
+
runtimeRowModel: a.rowModel,
|
|
1942
|
+
onCellEdit: Se,
|
|
1947
1943
|
reportFillWarning: e.reportFillWarning,
|
|
1948
1944
|
reportCenterPaneDiagnostics: e.reportCenterPaneDiagnostics,
|
|
1949
1945
|
reportFillPlumbingState: e.reportFillPlumbingState,
|
|
@@ -1951,11 +1947,11 @@ const Un = {
|
|
|
1951
1947
|
}
|
|
1952
1948
|
})
|
|
1953
1949
|
} : {
|
|
1954
|
-
default: (
|
|
1950
|
+
default: (a) => xe($t, {
|
|
1955
1951
|
...n,
|
|
1956
|
-
runtime:
|
|
1957
|
-
runtimeRowModel:
|
|
1958
|
-
onCellEdit:
|
|
1952
|
+
runtime: a.runtime,
|
|
1953
|
+
runtimeRowModel: a.rowModel,
|
|
1954
|
+
onCellEdit: Se,
|
|
1959
1955
|
reportFillWarning: e.reportFillWarning,
|
|
1960
1956
|
reportCenterPaneDiagnostics: e.reportCenterPaneDiagnostics,
|
|
1961
1957
|
reportFillPlumbingState: e.reportFillPlumbingState,
|
|
@@ -1970,14 +1966,14 @@ function ao() {
|
|
|
1970
1966
|
return V(null);
|
|
1971
1967
|
}
|
|
1972
1968
|
function uo() {
|
|
1973
|
-
return
|
|
1969
|
+
return it;
|
|
1974
1970
|
}
|
|
1975
|
-
const so =
|
|
1971
|
+
const so = it;
|
|
1976
1972
|
export {
|
|
1977
1973
|
so as DataGrid,
|
|
1978
1974
|
mo as DataGridModuleHost,
|
|
1979
1975
|
to as clearDataGridSavedViewInStorage,
|
|
1980
|
-
|
|
1976
|
+
it as default,
|
|
1981
1977
|
lo as defineDataGridCellClassResolver,
|
|
1982
1978
|
io as defineDataGridCellStyleResolver,
|
|
1983
1979
|
yo as defineDataGridColumnMenu,
|
|
@@ -1987,9 +1983,9 @@ export {
|
|
|
1987
1983
|
ro as defineDataGridFilterCellStyleReader,
|
|
1988
1984
|
no as defineDataGridSelectionCellReader,
|
|
1989
1985
|
Qn as defineDataGridStructuralRowActionHandler,
|
|
1990
|
-
|
|
1986
|
+
lt as migrateDataGridSavedView,
|
|
1991
1987
|
Ut as normalizeDataGridAppFilterModel,
|
|
1992
|
-
|
|
1988
|
+
be as normalizeDataGridAppUnifiedStateFilters,
|
|
1993
1989
|
Cn as parseDataGridSavedView,
|
|
1994
1990
|
eo as readDataGridSavedViewFromStorage,
|
|
1995
1991
|
On as serializeDataGridSavedView,
|