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