@affino/datagrid-vue-app 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/dist/DataGrid.d.ts +45 -14
- package/dist/advanced-filter.js +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover-Bak_CkaO.js → DataGridAdvancedFilterPopover-CabJ-Ztk.js} +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-DixN56Qv.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-x-cfVm5j.js} +92 -72
- package/dist/chunks/{DataGridGanttStage.vue_vue_type_script_setup_true_lang-BY-MSNPc.js → DataGridGanttStage.vue_vue_type_script_setup_true_lang-DPozU5Z5.js} +1 -1
- package/dist/chunks/{DataGridGanttStageEntry-DgXw3IJw.js → DataGridGanttStageEntry-BnzXZ_y8.js} +1 -1
- package/dist/chunks/{DataGridTableStage.vue_vue_type_script_setup_true_lang-Cec3mpHC.js → DataGridTableStage.vue_vue_type_script_setup_true_lang-C9CKLdfN.js} +22 -0
- package/dist/chunks/useDataGridAppRowModel-Bxzexir6.js +2877 -0
- package/dist/gantt.js +1 -1
- package/dist/host/DataGridDefaultRenderer.d.ts +9 -0
- package/dist/host/DataGridRuntimeHost.d.ts +18 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +324 -306
- package/dist/internal.js +4 -4
- package/dist/overlays/DataGridAdvancedFilterPopover.vue.d.ts +4 -0
- package/dist/stage/useDataGridTableStageRowSelection.d.ts +4 -2
- package/dist/stage/useDataGridTableStageRuntime.d.ts +1 -0
- package/package.json +3 -3
- package/dist/chunks/useDataGridAppRowModel-DJYtqvD0.js +0 -2854
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useDataGridRuntime as
|
|
3
|
-
import { useDataGridAppSelection as
|
|
4
|
-
import { d as
|
|
5
|
-
import { applyGridTheme as
|
|
6
|
-
import { d as
|
|
7
|
-
const
|
|
8
|
-
default:
|
|
9
|
-
"industrial-neutral":
|
|
10
|
-
industrialNeutral:
|
|
11
|
-
sugar:
|
|
1
|
+
import { defineComponent as se, ref as Y, provide as we, computed as g, watch as w, onBeforeUnmount as ee, h as Z, mergeProps as Se, toRef as ne } from "vue";
|
|
2
|
+
import { useDataGridRuntime as he } from "@affino/datagrid-vue";
|
|
3
|
+
import { useDataGridAppSelection as Re, useDataGridAppRowSelection as be } from "@affino/datagrid-vue/app";
|
|
4
|
+
import { d as Me, e as Oe, f as Be, r as Ae, g as Ce, u as xe, D as Pe } from "./chunks/useDataGridAppRowModel-Bxzexir6.js";
|
|
5
|
+
import { applyGridTheme as Ge, resolveGridThemeTokens as De, defaultStyleConfig as x, sugarTheme as de, industrialNeutralTheme as re } from "@affino/datagrid-theme";
|
|
6
|
+
import { d as Le } from "./chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js";
|
|
7
|
+
const Ie = {
|
|
8
|
+
default: x,
|
|
9
|
+
"industrial-neutral": re,
|
|
10
|
+
industrialNeutral: re,
|
|
11
|
+
sugar: de
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function je(e, t) {
|
|
14
14
|
if (!e && !t)
|
|
15
15
|
return;
|
|
16
16
|
const r = {
|
|
17
17
|
...e ?? {}
|
|
18
18
|
};
|
|
19
|
-
for (const [
|
|
20
|
-
r[
|
|
21
|
-
...r[
|
|
19
|
+
for (const [o, c] of Object.entries(t ?? {}))
|
|
20
|
+
r[o] = {
|
|
21
|
+
...r[o] ?? {},
|
|
22
22
|
...c
|
|
23
23
|
};
|
|
24
24
|
return r;
|
|
@@ -34,34 +34,34 @@ function J(e, t) {
|
|
|
34
34
|
summary: { ...e.summary ?? {}, ...t.summary ?? {} },
|
|
35
35
|
state: { ...e.state ?? {}, ...t.state ?? {} },
|
|
36
36
|
tokens: { ...e.tokens ?? {}, ...t.tokens ?? {} },
|
|
37
|
-
tokenVariants:
|
|
37
|
+
tokenVariants: je(e.tokenVariants, t.tokenVariants)
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Ke(e) {
|
|
41
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 || "grid" in e || "header" in e || "body" in e || "group" in e || "summary" in e || "state" in e;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return e == null ?
|
|
43
|
+
function Fe(e) {
|
|
44
|
+
return e == null ? x : typeof e == "string" ? e === "sugar" ? J(x, de) : Ie[e] ?? x : Ke(e) ? J(x, e) : J(x, {
|
|
45
45
|
tokens: e
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
const t =
|
|
50
|
-
return
|
|
48
|
+
function Te(e) {
|
|
49
|
+
const t = Fe(e);
|
|
50
|
+
return De(t ?? x, {
|
|
51
51
|
document: typeof document > "u" ? void 0 : document
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function re(e, t) {
|
|
55
|
-
const r = Ke(t);
|
|
56
|
-
return xe(e, r), r;
|
|
57
|
-
}
|
|
58
54
|
function le(e, t) {
|
|
59
|
-
|
|
55
|
+
const r = Te(t);
|
|
56
|
+
return Ge(e, r), r;
|
|
60
57
|
}
|
|
61
58
|
function ae(e, t) {
|
|
59
|
+
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
60
|
+
}
|
|
61
|
+
function ie(e, t) {
|
|
62
62
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : t;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ze(e) {
|
|
65
65
|
if (e !== void 0) {
|
|
66
66
|
if (e == null)
|
|
67
67
|
return null;
|
|
@@ -76,23 +76,23 @@ function Fe(e) {
|
|
|
76
76
|
return e;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function He(e, t) {
|
|
80
80
|
return t === !0 || t && typeof t == "object" ? "pagination" : e ?? "virtualization";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function We(e, t, r, o) {
|
|
83
83
|
if (t !== "pagination")
|
|
84
84
|
return null;
|
|
85
|
-
const c = 100, a =
|
|
85
|
+
const c = 100, a = ie(r, c), v = ae(o, 0);
|
|
86
86
|
return e === !0 || e === !1 || e == null ? {
|
|
87
87
|
pageSize: a,
|
|
88
|
-
currentPage:
|
|
88
|
+
currentPage: v
|
|
89
89
|
} : {
|
|
90
|
-
pageSize:
|
|
91
|
-
currentPage:
|
|
90
|
+
pageSize: ie(r ?? e.pageSize, c),
|
|
91
|
+
currentPage: ae(o ?? e.currentPage, 0)
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const $ = "Advanced filter";
|
|
95
|
-
function
|
|
95
|
+
function Ve(e) {
|
|
96
96
|
return typeof e == "boolean" ? {
|
|
97
97
|
enabled: e,
|
|
98
98
|
buttonLabel: $
|
|
@@ -104,73 +104,73 @@ function He(e) {
|
|
|
104
104
|
buttonLabel: $
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function ue(e) {
|
|
108
108
|
if (typeof e != "number" || !Number.isFinite(e))
|
|
109
109
|
return null;
|
|
110
110
|
const t = Math.max(0, Math.trunc(e));
|
|
111
111
|
return t > 0 ? t : null;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
113
|
+
function _e(e, t, r) {
|
|
114
|
+
const o = e === "auto-height" ? "auto-height" : "fill";
|
|
115
|
+
if (o !== "auto-height")
|
|
116
116
|
return {
|
|
117
|
-
layoutMode:
|
|
117
|
+
layoutMode: o,
|
|
118
118
|
minRows: null,
|
|
119
119
|
maxRows: null
|
|
120
120
|
};
|
|
121
|
-
const c =
|
|
122
|
-
let a =
|
|
121
|
+
const c = ue(t);
|
|
122
|
+
let a = ue(r);
|
|
123
123
|
return c !== null && a !== null && a < c && (a = c), {
|
|
124
|
-
layoutMode:
|
|
124
|
+
layoutMode: o,
|
|
125
125
|
minRows: c,
|
|
126
126
|
maxRows: a
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ee(e) {
|
|
130
130
|
return typeof e == "object" && e !== null;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
const
|
|
132
|
+
function ce(e, t, r) {
|
|
133
|
+
const o = Ee(e) ? e : null, c = t(o && "state" in o ? o.state : e, r);
|
|
134
134
|
if (!c)
|
|
135
135
|
return null;
|
|
136
|
-
const a =
|
|
136
|
+
const a = o?.viewMode, v = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
|
|
137
137
|
return {
|
|
138
138
|
state: c,
|
|
139
|
-
...
|
|
139
|
+
...v ? { viewMode: v } : {}
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function ke(e) {
|
|
143
143
|
return JSON.stringify(e);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Ne(e, t, r) {
|
|
146
146
|
if (typeof e != "string" || e.trim().length === 0)
|
|
147
147
|
return null;
|
|
148
148
|
try {
|
|
149
|
-
return
|
|
149
|
+
return ce(JSON.parse(e), t, r);
|
|
150
150
|
} catch {
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function ut(e, t, r) {
|
|
155
155
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
156
156
|
return !1;
|
|
157
157
|
try {
|
|
158
|
-
return e.setItem(t,
|
|
158
|
+
return e.setItem(t, ke(r)), !0;
|
|
159
159
|
} catch {
|
|
160
160
|
return !1;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function st(e, t, r, o) {
|
|
164
164
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
165
165
|
return null;
|
|
166
166
|
try {
|
|
167
167
|
const c = e.getItem(t);
|
|
168
|
-
return c ?
|
|
168
|
+
return c ? Ne(c, r, o) : null;
|
|
169
169
|
} catch {
|
|
170
170
|
return null;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function dt(e, t) {
|
|
174
174
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
175
175
|
return !1;
|
|
176
176
|
try {
|
|
@@ -180,7 +180,7 @@ function ut(e, t) {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
const q = "Columns";
|
|
183
|
-
function
|
|
183
|
+
function Ue(e) {
|
|
184
184
|
return typeof e == "boolean" ? {
|
|
185
185
|
enabled: e,
|
|
186
186
|
buttonLabel: q
|
|
@@ -193,7 +193,7 @@ function Ne(e) {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
const Q = "Aggregations";
|
|
196
|
-
function
|
|
196
|
+
function Je(e) {
|
|
197
197
|
return typeof e == "boolean" ? {
|
|
198
198
|
enabled: e,
|
|
199
199
|
buttonLabel: Q
|
|
@@ -208,7 +208,7 @@ function Ue(e) {
|
|
|
208
208
|
function T(e, t) {
|
|
209
209
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function $e(e, t) {
|
|
212
212
|
const r = {
|
|
213
213
|
rows: !0,
|
|
214
214
|
columns: !1,
|
|
@@ -221,12 +221,12 @@ function _e(e, t) {
|
|
|
221
221
|
r.rows = !1, r.columns = !1;
|
|
222
222
|
else if (e && typeof e == "object") {
|
|
223
223
|
r.rows = e.rows ?? r.rows, r.columns = e.columns ?? r.columns;
|
|
224
|
-
const
|
|
225
|
-
r.rowOverscan = T(e.rowOverscan,
|
|
224
|
+
const o = T(e.overscan, r.rowOverscan);
|
|
225
|
+
r.rowOverscan = T(e.rowOverscan, o), r.columnOverscan = T(e.columnOverscan, T(e.overscan, r.columnOverscan));
|
|
226
226
|
}
|
|
227
227
|
return t === "pagination" && (r.rows = !1), r;
|
|
228
228
|
}
|
|
229
|
-
const
|
|
229
|
+
const qe = se({
|
|
230
230
|
name: "DataGridRuntimeHost",
|
|
231
231
|
inheritAttrs: !1,
|
|
232
232
|
props: {
|
|
@@ -275,15 +275,19 @@ const Je = ue({
|
|
|
275
275
|
default: null
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
emits:
|
|
279
|
-
|
|
278
|
+
emits: {
|
|
279
|
+
"cell-change": (e) => !0,
|
|
280
|
+
"selection-change": (e) => !0,
|
|
281
|
+
"row-selection-change": (e) => !0
|
|
282
|
+
},
|
|
283
|
+
setup(e, { attrs: t, slots: r, emit: o, expose: c }) {
|
|
280
284
|
const a = Y(null);
|
|
281
|
-
|
|
282
|
-
let
|
|
283
|
-
const i =
|
|
284
|
-
rows:
|
|
285
|
+
we(Le, a);
|
|
286
|
+
let v = null;
|
|
287
|
+
const i = he({
|
|
288
|
+
rows: g(() => e.rows),
|
|
285
289
|
rowModel: e.rowModel,
|
|
286
|
-
columns:
|
|
290
|
+
columns: g(() => e.columns),
|
|
287
291
|
plugins: e.plugins,
|
|
288
292
|
services: e.services,
|
|
289
293
|
startupOrder: e.startupOrder,
|
|
@@ -298,54 +302,56 @@ const Je = ue({
|
|
|
298
302
|
resolveBodyRowIndexById: h.resolveBodyRowIndexById
|
|
299
303
|
}, A = () => {
|
|
300
304
|
if (e.renderMode === "pagination") {
|
|
301
|
-
const
|
|
305
|
+
const f = e.pagination ?? { pageSize: 100, currentPage: 0 };
|
|
302
306
|
i.api.rows.setPagination({
|
|
303
|
-
pageSize: Math.max(1, Math.trunc(
|
|
304
|
-
currentPage: Math.max(0, Math.trunc(
|
|
307
|
+
pageSize: Math.max(1, Math.trunc(f.pageSize)),
|
|
308
|
+
currentPage: Math.max(0, Math.trunc(f.currentPage))
|
|
305
309
|
});
|
|
306
310
|
return;
|
|
307
311
|
}
|
|
308
312
|
i.api.rows.setPagination(null);
|
|
309
313
|
};
|
|
310
|
-
|
|
314
|
+
w(
|
|
311
315
|
() => e.renderMode,
|
|
312
316
|
() => {
|
|
313
317
|
A();
|
|
314
318
|
},
|
|
315
319
|
{ immediate: !0 }
|
|
316
|
-
),
|
|
320
|
+
), w(
|
|
317
321
|
() => e.pagination,
|
|
318
322
|
() => {
|
|
319
323
|
A();
|
|
320
324
|
},
|
|
321
325
|
{ immediate: !0, deep: !0 }
|
|
322
|
-
), typeof document < "u" && (
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
}),
|
|
326
|
+
), typeof document < "u" && (v = new MutationObserver(() => {
|
|
327
|
+
const f = a.value;
|
|
328
|
+
f && le(f, e.theme);
|
|
329
|
+
}), v.observe(document.documentElement, {
|
|
326
330
|
attributes: !0,
|
|
327
331
|
attributeFilter: ["class", "data-theme"]
|
|
328
|
-
})),
|
|
332
|
+
})), w(
|
|
329
333
|
[() => e.theme, a],
|
|
330
334
|
() => {
|
|
331
|
-
const
|
|
332
|
-
|
|
335
|
+
const f = a.value;
|
|
336
|
+
f && le(f, e.theme);
|
|
333
337
|
},
|
|
334
338
|
{ immediate: !0, deep: !0 }
|
|
335
339
|
);
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
}),
|
|
339
|
-
|
|
340
|
+
const P = i.api.events.on("rows:changed", (f) => {
|
|
341
|
+
o("cell-change", f);
|
|
342
|
+
}), G = i.api.events.on("selection:changed", (f) => {
|
|
343
|
+
o("selection-change", f);
|
|
344
|
+
}), y = i.api.events.on("row-selection:changed", (f) => {
|
|
345
|
+
o("row-selection-change", f);
|
|
340
346
|
});
|
|
341
347
|
ee(() => {
|
|
342
|
-
|
|
348
|
+
P(), G(), y(), v?.disconnect(), v = null;
|
|
343
349
|
});
|
|
344
|
-
const
|
|
345
|
-
const
|
|
350
|
+
const C = g(() => {
|
|
351
|
+
const f = i.virtualWindow.value;
|
|
346
352
|
return {
|
|
347
|
-
...
|
|
348
|
-
rowTotal:
|
|
353
|
+
...f ?? {},
|
|
354
|
+
rowTotal: f?.rowTotal ?? i.rowPartition.value.bodyRowCount,
|
|
349
355
|
colTotal: i.columnSnapshot.value.visibleColumns.length
|
|
350
356
|
};
|
|
351
357
|
});
|
|
@@ -366,7 +372,7 @@ const Je = ue({
|
|
|
366
372
|
stop: i.stop
|
|
367
373
|
}), () => Z(
|
|
368
374
|
"div",
|
|
369
|
-
|
|
375
|
+
Se(t, {
|
|
370
376
|
ref: a,
|
|
371
377
|
class: [
|
|
372
378
|
"affino-datagrid-app-root",
|
|
@@ -392,7 +398,7 @@ const Je = ue({
|
|
|
392
398
|
syncBodyRowsInRange: i.syncBodyRowsInRange,
|
|
393
399
|
getBodyRowAtIndex: h.getBodyRowAtIndex,
|
|
394
400
|
resolveBodyRowIndexById: h.resolveBodyRowIndexById,
|
|
395
|
-
virtualWindow:
|
|
401
|
+
virtualWindow: C.value
|
|
396
402
|
}) ?? []
|
|
397
403
|
);
|
|
398
404
|
}
|
|
@@ -407,21 +413,21 @@ function B(e) {
|
|
|
407
413
|
return null;
|
|
408
414
|
}
|
|
409
415
|
}
|
|
410
|
-
function
|
|
416
|
+
function Qe(e) {
|
|
411
417
|
return e ? {
|
|
412
418
|
fields: [...e.fields],
|
|
413
419
|
expandedByDefault: e.expandedByDefault
|
|
414
420
|
} : null;
|
|
415
421
|
}
|
|
416
|
-
function
|
|
417
|
-
let t = null, r = null,
|
|
418
|
-
const
|
|
422
|
+
function Xe(e) {
|
|
423
|
+
let t = null, r = null, o = !1, c = null, a = null, v = null, i = null, h = null, b = null, A = null;
|
|
424
|
+
const P = () => {
|
|
419
425
|
t?.(), r?.(), t = null, r = null;
|
|
420
|
-
},
|
|
421
|
-
const
|
|
422
|
-
if (!
|
|
426
|
+
}, G = () => {
|
|
427
|
+
const n = e.gridRef.value?.api.columns;
|
|
428
|
+
if (!n)
|
|
423
429
|
return null;
|
|
424
|
-
const d =
|
|
430
|
+
const d = n.getSnapshot(), u = {}, s = {}, R = {};
|
|
425
431
|
for (const S of d.columns)
|
|
426
432
|
u[S.key] = S.visible, s[S.key] = S.width, R[S.key] = S.pin;
|
|
427
433
|
return {
|
|
@@ -430,41 +436,41 @@ function qe(e) {
|
|
|
430
436
|
widths: s,
|
|
431
437
|
pins: R
|
|
432
438
|
};
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
const u = B(
|
|
439
|
-
b = u, u !==
|
|
440
|
-
Object.entries(
|
|
441
|
-
), e.emit.columnWidths(
|
|
439
|
+
}, y = () => {
|
|
440
|
+
o || (o = !0, queueMicrotask(() => {
|
|
441
|
+
o = !1;
|
|
442
|
+
const n = G(), d = e.gridRef.value?.api;
|
|
443
|
+
if (n) {
|
|
444
|
+
const u = B(n);
|
|
445
|
+
b = u, u !== v && (v = u, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
|
|
446
|
+
Object.entries(n.visibility).filter(([, s]) => !s).map(([s]) => s)
|
|
447
|
+
), e.emit.columnWidths(n.widths), e.emit.columnPins(n.pins));
|
|
442
448
|
}
|
|
443
449
|
if (d) {
|
|
444
|
-
const u =
|
|
450
|
+
const u = Qe(d.rows.getSnapshot().groupBy), s = B(u);
|
|
445
451
|
s !== h && (h = s, e.emit.groupBy(u));
|
|
446
452
|
const R = d.state.get(), S = B(R);
|
|
447
453
|
A = S, S !== i && (i = S, e.emit.state(R));
|
|
448
454
|
}
|
|
449
455
|
}));
|
|
450
|
-
},
|
|
451
|
-
const
|
|
452
|
-
!
|
|
456
|
+
}, C = () => {
|
|
457
|
+
const n = e.gridRef.value?.api;
|
|
458
|
+
!n || e.props.sortModel === void 0 && e.props.filterModel === void 0 || n.rows.setSortAndFilterModel({
|
|
453
459
|
sortModel: e.props.sortModel ?? [],
|
|
454
460
|
filterModel: e.props.filterModel ?? null
|
|
455
461
|
});
|
|
456
|
-
},
|
|
457
|
-
const
|
|
458
|
-
!
|
|
462
|
+
}, f = () => {
|
|
463
|
+
const n = e.gridRef.value?.api;
|
|
464
|
+
!n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
|
|
459
465
|
}, D = () => {
|
|
460
|
-
const
|
|
461
|
-
!
|
|
466
|
+
const n = e.gridRef.value?.api;
|
|
467
|
+
!n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
|
|
462
468
|
}, M = () => {
|
|
463
|
-
const
|
|
464
|
-
!
|
|
469
|
+
const n = e.gridRef.value?.api;
|
|
470
|
+
!n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
|
|
465
471
|
}, O = () => {
|
|
466
|
-
const
|
|
467
|
-
if (!
|
|
472
|
+
const n = e.gridRef.value?.api;
|
|
473
|
+
if (!n || e.props.columnState === void 0 && e.props.columnOrder === void 0 && e.props.hiddenColumnKeys === void 0 && e.props.columnWidths === void 0 && e.props.columnPins === void 0)
|
|
468
474
|
return;
|
|
469
475
|
const d = B({
|
|
470
476
|
columnState: e.props.columnState,
|
|
@@ -479,30 +485,30 @@ function qe(e) {
|
|
|
479
485
|
return;
|
|
480
486
|
}
|
|
481
487
|
if (e.props.columnState) {
|
|
482
|
-
|
|
488
|
+
n.columns.setOrder(e.props.columnState.order);
|
|
483
489
|
for (const [u, s] of Object.entries(e.props.columnState.visibility))
|
|
484
|
-
|
|
490
|
+
n.columns.setVisibility(u, s);
|
|
485
491
|
for (const [u, s] of Object.entries(e.props.columnState.widths))
|
|
486
|
-
|
|
492
|
+
n.columns.setWidth(u, X(s));
|
|
487
493
|
for (const [u, s] of Object.entries(e.props.columnState.pins))
|
|
488
|
-
|
|
494
|
+
n.columns.setPin(u, s);
|
|
489
495
|
}
|
|
490
|
-
if (e.props.columnOrder &&
|
|
491
|
-
const u = new Set(e.props.hiddenColumnKeys), s =
|
|
496
|
+
if (e.props.columnOrder && n.columns.setOrder(e.props.columnOrder), e.props.hiddenColumnKeys) {
|
|
497
|
+
const u = new Set(e.props.hiddenColumnKeys), s = n.columns.getSnapshot();
|
|
492
498
|
for (const R of s.columns)
|
|
493
|
-
|
|
499
|
+
n.columns.setVisibility(R.key, !u.has(R.key));
|
|
494
500
|
}
|
|
495
501
|
if (e.props.columnWidths)
|
|
496
502
|
for (const [u, s] of Object.entries(e.props.columnWidths))
|
|
497
|
-
|
|
503
|
+
n.columns.setWidth(u, X(s));
|
|
498
504
|
if (e.props.columnPins)
|
|
499
505
|
for (const [u, s] of Object.entries(e.props.columnPins))
|
|
500
|
-
|
|
506
|
+
n.columns.setPin(u, s);
|
|
501
507
|
c = d;
|
|
502
508
|
}
|
|
503
509
|
}, L = () => {
|
|
504
|
-
const
|
|
505
|
-
if (!
|
|
510
|
+
const n = e.gridRef.value?.api;
|
|
511
|
+
if (!n || e.props.state == null)
|
|
506
512
|
return;
|
|
507
513
|
const d = B(e.props.state);
|
|
508
514
|
if (d === a)
|
|
@@ -511,69 +517,69 @@ function qe(e) {
|
|
|
511
517
|
a = d;
|
|
512
518
|
return;
|
|
513
519
|
}
|
|
514
|
-
const u =
|
|
515
|
-
u && (
|
|
520
|
+
const u = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
|
|
521
|
+
u && (n.state.set(u, e.props.stateOptions ?? {}), a = d);
|
|
516
522
|
}, I = () => {
|
|
517
|
-
const
|
|
518
|
-
|
|
523
|
+
const n = e.gridRef.value?.api;
|
|
524
|
+
n && (n.view.setRowHeightMode(e.props.rowHeightMode), n.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
|
|
519
525
|
}, j = () => {
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}), r =
|
|
524
|
-
|
|
525
|
-
}), L(), O(),
|
|
526
|
-
}, H = () => e.gridRef.value?.api.state.get() ?? null, W = (
|
|
526
|
+
const n = e.gridRef.value;
|
|
527
|
+
n && (c = null, a = null, P(), t = n.rowModel.subscribe(() => {
|
|
528
|
+
y();
|
|
529
|
+
}), r = n.columnModel.subscribe(() => {
|
|
530
|
+
y();
|
|
531
|
+
}), L(), O(), C(), f(), D(), M(), I(), y(), e.emit.ready({ api: n.api }));
|
|
532
|
+
}, H = () => e.gridRef.value?.api.state.get() ?? null, W = (n, d) => e.gridRef.value?.api.state.migrate(n, d) ?? null, V = (n) => {
|
|
527
533
|
const d = e.gridRef.value?.api;
|
|
528
534
|
if (!d)
|
|
529
535
|
return !1;
|
|
530
536
|
c = B({
|
|
531
|
-
columnState:
|
|
537
|
+
columnState: n,
|
|
532
538
|
columnOrder: null,
|
|
533
539
|
hiddenColumnKeys: null,
|
|
534
540
|
columnWidths: null,
|
|
535
541
|
columnPins: null
|
|
536
|
-
}), d.columns.setOrder(
|
|
537
|
-
for (const [u, s] of Object.entries(
|
|
542
|
+
}), d.columns.setOrder(n.order);
|
|
543
|
+
for (const [u, s] of Object.entries(n.visibility))
|
|
538
544
|
d.columns.setVisibility(u, s);
|
|
539
|
-
for (const [u, s] of Object.entries(
|
|
545
|
+
for (const [u, s] of Object.entries(n.widths))
|
|
540
546
|
d.columns.setWidth(u, X(s));
|
|
541
|
-
for (const [u, s] of Object.entries(
|
|
547
|
+
for (const [u, s] of Object.entries(n.pins))
|
|
542
548
|
d.columns.setPin(u, s);
|
|
543
|
-
return
|
|
544
|
-
},
|
|
549
|
+
return y(), !0;
|
|
550
|
+
}, _ = (n, d) => {
|
|
545
551
|
const u = e.gridRef.value?.api;
|
|
546
552
|
if (!u)
|
|
547
553
|
return !1;
|
|
548
|
-
const s = u.state.migrate(
|
|
549
|
-
return s ? (u.state.set(s, d), a = B(
|
|
550
|
-
},
|
|
554
|
+
const s = u.state.migrate(n, { strict: d?.strict });
|
|
555
|
+
return s ? (u.state.set(s, d), a = B(n), y(), !0) : !1;
|
|
556
|
+
}, E = () => e.gridRef.value?.api.pivot.exportLayout() ?? null, k = () => e.gridRef.value?.api.pivot.exportInterop() ?? null, N = (n, d) => {
|
|
551
557
|
const u = e.gridRef.value?.api;
|
|
552
|
-
return u ? (u.pivot.importLayout(
|
|
553
|
-
},
|
|
554
|
-
e.gridRef.value?.api.rows.expandAllGroups(),
|
|
558
|
+
return u ? (u.pivot.importLayout(n, d), y(), !0) : !1;
|
|
559
|
+
}, U = () => {
|
|
560
|
+
e.gridRef.value?.api.rows.expandAllGroups(), y();
|
|
555
561
|
}, F = () => {
|
|
556
|
-
e.gridRef.value?.api.rows.collapseAllGroups(),
|
|
562
|
+
e.gridRef.value?.api.rows.collapseAllGroups(), y();
|
|
557
563
|
};
|
|
558
|
-
|
|
564
|
+
w(
|
|
559
565
|
() => e.gridRef.value,
|
|
560
566
|
() => {
|
|
561
567
|
j();
|
|
562
568
|
},
|
|
563
569
|
{ immediate: !0 }
|
|
564
|
-
),
|
|
570
|
+
), w(
|
|
565
571
|
() => e.props.columns,
|
|
566
572
|
() => {
|
|
567
|
-
c = null, a = null, L(), O(),
|
|
573
|
+
c = null, a = null, L(), O(), y();
|
|
568
574
|
},
|
|
569
575
|
{ deep: !0 }
|
|
570
|
-
),
|
|
576
|
+
), w(
|
|
571
577
|
() => [e.props.state, e.props.stateOptions],
|
|
572
578
|
() => {
|
|
573
|
-
L(), O(),
|
|
579
|
+
L(), O(), C(), f(), D(), M(), I(), y();
|
|
574
580
|
},
|
|
575
581
|
{ deep: !0 }
|
|
576
|
-
),
|
|
582
|
+
), w(
|
|
577
583
|
() => [
|
|
578
584
|
e.props.columnState,
|
|
579
585
|
e.props.columnOrder,
|
|
@@ -582,61 +588,61 @@ function qe(e) {
|
|
|
582
588
|
e.props.columnPins
|
|
583
589
|
],
|
|
584
590
|
() => {
|
|
585
|
-
O(),
|
|
591
|
+
O(), y();
|
|
586
592
|
},
|
|
587
593
|
{ deep: !0 }
|
|
588
|
-
),
|
|
594
|
+
), w(
|
|
589
595
|
() => [e.props.sortModel, e.props.filterModel],
|
|
590
596
|
() => {
|
|
591
|
-
|
|
597
|
+
C(), y();
|
|
592
598
|
},
|
|
593
599
|
{ deep: !0 }
|
|
594
|
-
),
|
|
600
|
+
), w(
|
|
595
601
|
() => e.props.groupBy,
|
|
596
602
|
() => {
|
|
597
|
-
|
|
603
|
+
f(), y();
|
|
598
604
|
},
|
|
599
605
|
{ deep: !0 }
|
|
600
|
-
),
|
|
606
|
+
), w(
|
|
601
607
|
() => e.props.aggregationModel,
|
|
602
608
|
() => {
|
|
603
|
-
D(),
|
|
609
|
+
D(), y();
|
|
604
610
|
},
|
|
605
611
|
{ deep: !0 }
|
|
606
|
-
),
|
|
612
|
+
), w(
|
|
607
613
|
() => e.props.pivotModel,
|
|
608
614
|
() => {
|
|
609
|
-
M(),
|
|
615
|
+
M(), y();
|
|
610
616
|
},
|
|
611
617
|
{ deep: !0 }
|
|
612
|
-
),
|
|
618
|
+
), w(
|
|
613
619
|
() => [e.props.rowHeightMode, e.props.baseRowHeight],
|
|
614
620
|
() => {
|
|
615
|
-
I(),
|
|
621
|
+
I(), y();
|
|
616
622
|
}
|
|
617
623
|
);
|
|
618
624
|
const K = () => {
|
|
619
|
-
|
|
625
|
+
P();
|
|
620
626
|
};
|
|
621
627
|
return ee(() => {
|
|
622
628
|
K();
|
|
623
629
|
}), {
|
|
624
|
-
emitSnapshotUpdates:
|
|
630
|
+
emitSnapshotUpdates: y,
|
|
625
631
|
handleGridReady: j,
|
|
626
632
|
dispose: K,
|
|
627
|
-
getColumnState:
|
|
633
|
+
getColumnState: G,
|
|
628
634
|
getState: H,
|
|
629
635
|
migrateState: W,
|
|
630
636
|
applyColumnState: V,
|
|
631
|
-
applyState:
|
|
632
|
-
exportPivotLayout:
|
|
633
|
-
exportPivotInterop:
|
|
634
|
-
importPivotLayout:
|
|
635
|
-
expandAllGroups:
|
|
637
|
+
applyState: _,
|
|
638
|
+
exportPivotLayout: E,
|
|
639
|
+
exportPivotInterop: k,
|
|
640
|
+
importPivotLayout: N,
|
|
641
|
+
expandAllGroups: U,
|
|
636
642
|
collapseAllGroups: F
|
|
637
643
|
};
|
|
638
644
|
}
|
|
639
|
-
function
|
|
645
|
+
function Ye() {
|
|
640
646
|
return {
|
|
641
647
|
name: "selection",
|
|
642
648
|
getRowSelectionSnapshot: () => null,
|
|
@@ -660,42 +666,42 @@ function Qe() {
|
|
|
660
666
|
};
|
|
661
667
|
}
|
|
662
668
|
function z(e, t) {
|
|
663
|
-
const r = t.map((
|
|
669
|
+
const r = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
|
|
664
670
|
if (r.length !== 0)
|
|
665
|
-
return async (
|
|
671
|
+
return async (o) => {
|
|
666
672
|
for (const c of r)
|
|
667
|
-
await c(
|
|
673
|
+
await c(o);
|
|
668
674
|
};
|
|
669
675
|
}
|
|
670
|
-
function
|
|
676
|
+
function Ze(e) {
|
|
671
677
|
const {
|
|
672
678
|
userSelectionService: t,
|
|
673
679
|
cellSelectionService: r,
|
|
674
|
-
rowSelectionService:
|
|
680
|
+
rowSelectionService: o
|
|
675
681
|
} = e;
|
|
676
682
|
return {
|
|
677
683
|
name: "selection",
|
|
678
|
-
init: z("init", [t, r,
|
|
679
|
-
start: z("start", [t, r,
|
|
680
|
-
stop: z("stop", [t, r,
|
|
681
|
-
dispose: z("dispose", [t, r,
|
|
684
|
+
init: z("init", [t, r, o]),
|
|
685
|
+
start: z("start", [t, r, o]),
|
|
686
|
+
stop: z("stop", [t, r, o]),
|
|
687
|
+
dispose: z("dispose", [t, r, o]),
|
|
682
688
|
getSelectionSnapshot: r.getSelectionSnapshot,
|
|
683
689
|
setSelectionSnapshot: r.setSelectionSnapshot,
|
|
684
690
|
clearSelection: r.clearSelection,
|
|
685
|
-
getRowSelectionSnapshot:
|
|
686
|
-
setRowSelectionSnapshot:
|
|
687
|
-
clearRowSelection:
|
|
688
|
-
getFocusedRow:
|
|
689
|
-
setFocusedRow:
|
|
690
|
-
getSelectedRows:
|
|
691
|
-
isRowSelected:
|
|
692
|
-
setRowSelected:
|
|
693
|
-
selectRows:
|
|
694
|
-
deselectRows:
|
|
695
|
-
clearSelectedRows:
|
|
691
|
+
getRowSelectionSnapshot: o.getRowSelectionSnapshot,
|
|
692
|
+
setRowSelectionSnapshot: o.setRowSelectionSnapshot,
|
|
693
|
+
clearRowSelection: o.clearRowSelection,
|
|
694
|
+
getFocusedRow: o.getFocusedRow,
|
|
695
|
+
setFocusedRow: o.setFocusedRow,
|
|
696
|
+
getSelectedRows: o.getSelectedRows,
|
|
697
|
+
isRowSelected: o.isRowSelected,
|
|
698
|
+
setRowSelected: o.setRowSelected,
|
|
699
|
+
selectRows: o.selectRows,
|
|
700
|
+
deselectRows: o.deselectRows,
|
|
701
|
+
clearSelectedRows: o.clearSelectedRows
|
|
696
702
|
};
|
|
697
703
|
}
|
|
698
|
-
const
|
|
704
|
+
const et = se({
|
|
699
705
|
name: "DataGrid",
|
|
700
706
|
inheritAttrs: !1,
|
|
701
707
|
props: {
|
|
@@ -894,35 +900,40 @@ const Ye = ue({
|
|
|
894
900
|
gantt: {
|
|
895
901
|
type: [Boolean, Object],
|
|
896
902
|
default: void 0
|
|
903
|
+
},
|
|
904
|
+
toolbarModules: {
|
|
905
|
+
type: Array,
|
|
906
|
+
default: () => []
|
|
897
907
|
}
|
|
898
908
|
},
|
|
899
|
-
emits:
|
|
900
|
-
"cell-change",
|
|
901
|
-
"selection-change",
|
|
902
|
-
"row-
|
|
903
|
-
"
|
|
904
|
-
"update:
|
|
905
|
-
"update:
|
|
906
|
-
"update:
|
|
907
|
-
"update:
|
|
908
|
-
"update:
|
|
909
|
-
"update:
|
|
910
|
-
"update:
|
|
911
|
-
"
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
909
|
+
emits: {
|
|
910
|
+
"cell-change": (e) => !0,
|
|
911
|
+
"selection-change": (e) => !0,
|
|
912
|
+
"row-selection-change": (e) => !0,
|
|
913
|
+
"row-select": (e) => !0,
|
|
914
|
+
"update:columnState": (e) => !0,
|
|
915
|
+
"update:columnOrder": (e) => !0,
|
|
916
|
+
"update:hiddenColumnKeys": (e) => !0,
|
|
917
|
+
"update:columnWidths": (e) => !0,
|
|
918
|
+
"update:columnPins": (e) => !0,
|
|
919
|
+
"update:groupBy": (e) => !0,
|
|
920
|
+
"update:viewMode": (e) => !0,
|
|
921
|
+
"update:state": (e) => !0,
|
|
922
|
+
ready: (e) => !0
|
|
923
|
+
},
|
|
924
|
+
setup(e, { attrs: t, slots: r, emit: o, expose: c }) {
|
|
925
|
+
const a = Y(null), v = Y("table"), i = g(() => He(e.renderMode, e.pagination)), h = g(() => We(
|
|
915
926
|
e.pagination,
|
|
916
927
|
i.value,
|
|
917
928
|
e.pageSize,
|
|
918
929
|
e.currentPage
|
|
919
|
-
)), b =
|
|
930
|
+
)), b = g(() => Me(e.columnMenu)), A = g(() => Oe(e.cellMenu)), P = g(() => Be(e.rowIndexMenu)), G = g(() => Ue(e.columnLayout)), y = g(() => Je(e.aggregations)), C = g(() => Ve(e.advancedFilter)), f = g(() => ze(e.groupBy)), D = g(() => $e(e.virtualization, i.value)), M = g(() => _e(e.layoutMode, e.minRows, e.maxRows)), O = g(() => Ae({
|
|
920
931
|
columns: e.columns,
|
|
921
932
|
clientRowModelOptions: e.clientRowModelOptions,
|
|
922
933
|
computedFields: e.computedFields,
|
|
923
934
|
formulas: e.formulas,
|
|
924
935
|
formulaFunctions: e.formulaFunctions
|
|
925
|
-
})), L =
|
|
936
|
+
})), L = g(() => Ce(e.columns)), I = {
|
|
926
937
|
get state() {
|
|
927
938
|
return e.state;
|
|
928
939
|
},
|
|
@@ -951,7 +962,7 @@ const Ye = ue({
|
|
|
951
962
|
return e.filterModel;
|
|
952
963
|
},
|
|
953
964
|
get groupBy() {
|
|
954
|
-
return
|
|
965
|
+
return f.value;
|
|
955
966
|
},
|
|
956
967
|
get aggregationModel() {
|
|
957
968
|
return e.aggregationModel;
|
|
@@ -968,70 +979,74 @@ const Ye = ue({
|
|
|
968
979
|
get columns() {
|
|
969
980
|
return e.columns;
|
|
970
981
|
}
|
|
971
|
-
}, j =
|
|
972
|
-
mode:
|
|
982
|
+
}, j = g(() => e.pivotModel ? "pivot" : O.value && "initialTreeData" in O.value ? "tree" : "base"), H = g(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), W = g(() => a.value?.api.rows.getCount() ?? 0), V = {
|
|
983
|
+
mode: g(() => j.value),
|
|
973
984
|
resolveRuntime: () => a.value,
|
|
974
985
|
visibleColumns: H,
|
|
975
986
|
totalRows: W,
|
|
976
|
-
showRowSelection:
|
|
987
|
+
showRowSelection: g(() => e.rowSelection)
|
|
977
988
|
}, {
|
|
978
|
-
selectionSnapshot:
|
|
979
|
-
selectionAnchor:
|
|
980
|
-
syncSelectionSnapshotFromRuntime:
|
|
981
|
-
selectionService:
|
|
982
|
-
selectionAggregatesLabel:
|
|
983
|
-
} =
|
|
989
|
+
selectionSnapshot: _,
|
|
990
|
+
selectionAnchor: E,
|
|
991
|
+
syncSelectionSnapshotFromRuntime: k,
|
|
992
|
+
selectionService: N,
|
|
993
|
+
selectionAggregatesLabel: U
|
|
994
|
+
} = Re(V), {
|
|
984
995
|
rowSelectionSnapshot: F,
|
|
985
996
|
syncRowSelectionSnapshotFromRuntime: K,
|
|
986
|
-
reconcileRowSelectionFromRuntime:
|
|
997
|
+
reconcileRowSelectionFromRuntime: n,
|
|
987
998
|
selectionService: d
|
|
988
|
-
} =
|
|
999
|
+
} = be({
|
|
989
1000
|
resolveRuntime: () => a.value
|
|
990
|
-
}), u =
|
|
1001
|
+
}), u = g(() => e.rowSelection ? d : Ye()), s = g(() => ({
|
|
991
1002
|
...e.services ?? {},
|
|
992
|
-
selection:
|
|
1003
|
+
selection: Ze({
|
|
993
1004
|
userSelectionService: e.services?.selection,
|
|
994
|
-
cellSelectionService:
|
|
1005
|
+
cellSelectionService: N,
|
|
995
1006
|
rowSelectionService: u.value
|
|
996
1007
|
})
|
|
997
1008
|
})), {
|
|
998
1009
|
dataGridInstanceKey: R,
|
|
999
1010
|
resolvedRowModel: S
|
|
1000
|
-
} =
|
|
1001
|
-
rows:
|
|
1002
|
-
rowModel:
|
|
1011
|
+
} = xe({
|
|
1012
|
+
rows: ne(e, "rows"),
|
|
1013
|
+
rowModel: ne(e, "rowModel"),
|
|
1003
1014
|
clientRowModelOptions: O,
|
|
1004
1015
|
onOwnedRowModelRecreated: () => {
|
|
1005
|
-
|
|
1016
|
+
p.dispose();
|
|
1006
1017
|
}
|
|
1007
|
-
}),
|
|
1018
|
+
}), p = Xe({
|
|
1008
1019
|
gridRef: a,
|
|
1009
1020
|
props: I,
|
|
1010
1021
|
emit: {
|
|
1011
|
-
columnState: (l) =>
|
|
1012
|
-
columnOrder: (l) =>
|
|
1013
|
-
hiddenColumnKeys: (l) =>
|
|
1014
|
-
columnWidths: (l) =>
|
|
1015
|
-
columnPins: (l) =>
|
|
1016
|
-
groupBy: (l) =>
|
|
1017
|
-
state: (l) =>
|
|
1018
|
-
ready: (l) =>
|
|
1022
|
+
columnState: (l) => o("update:columnState", l),
|
|
1023
|
+
columnOrder: (l) => o("update:columnOrder", l),
|
|
1024
|
+
hiddenColumnKeys: (l) => o("update:hiddenColumnKeys", l),
|
|
1025
|
+
columnWidths: (l) => o("update:columnWidths", l),
|
|
1026
|
+
columnPins: (l) => o("update:columnPins", l),
|
|
1027
|
+
groupBy: (l) => o("update:groupBy", l),
|
|
1028
|
+
state: (l) => o("update:state", l),
|
|
1029
|
+
ready: (l) => o("ready", {
|
|
1019
1030
|
api: l.api,
|
|
1020
1031
|
rowModel: S.value
|
|
1021
1032
|
})
|
|
1022
1033
|
}
|
|
1023
|
-
}),
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1026
|
-
|
|
1034
|
+
}), me = (l) => {
|
|
1035
|
+
n(), o("cell-change", l), p.emitSnapshotUpdates();
|
|
1036
|
+
}, fe = (l) => {
|
|
1037
|
+
o("selection-change", l);
|
|
1038
|
+
}, ge = (l) => {
|
|
1039
|
+
o("row-selection-change", l);
|
|
1040
|
+
}, te = () => {
|
|
1041
|
+
p.emitSnapshotUpdates();
|
|
1027
1042
|
};
|
|
1028
|
-
|
|
1043
|
+
w(
|
|
1029
1044
|
F,
|
|
1030
1045
|
(l) => {
|
|
1031
|
-
|
|
1046
|
+
o("row-select", l), te();
|
|
1032
1047
|
},
|
|
1033
1048
|
{ deep: !0 }
|
|
1034
|
-
),
|
|
1049
|
+
), w(
|
|
1035
1050
|
() => e.rowSelection,
|
|
1036
1051
|
(l) => {
|
|
1037
1052
|
if (l) {
|
|
@@ -1041,49 +1056,49 @@ const Ye = ue({
|
|
|
1041
1056
|
d.clearRowSelection?.();
|
|
1042
1057
|
},
|
|
1043
1058
|
{ immediate: !0 }
|
|
1044
|
-
),
|
|
1059
|
+
), w(
|
|
1045
1060
|
() => e.viewMode,
|
|
1046
1061
|
(l) => {
|
|
1047
|
-
|
|
1062
|
+
v.value = l === "gantt" ? "gantt" : "table";
|
|
1048
1063
|
},
|
|
1049
1064
|
{ immediate: !0 }
|
|
1050
1065
|
);
|
|
1051
|
-
const
|
|
1066
|
+
const oe = (l) => {
|
|
1052
1067
|
const m = l === "gantt" ? "gantt" : "table";
|
|
1053
|
-
|
|
1054
|
-
},
|
|
1055
|
-
const l =
|
|
1068
|
+
v.value = m, o("update:viewMode", m);
|
|
1069
|
+
}, ye = () => {
|
|
1070
|
+
const l = p.getState();
|
|
1056
1071
|
return l ? {
|
|
1057
1072
|
state: l,
|
|
1058
|
-
viewMode:
|
|
1073
|
+
viewMode: v.value
|
|
1059
1074
|
} : null;
|
|
1060
|
-
},
|
|
1075
|
+
}, ve = (l, m) => ce(l, p.migrateState, m), pe = (l, m) => p.applyState(l.state, m) ? (l.viewMode && oe(l.viewMode), !0) : !1;
|
|
1061
1076
|
return ee(() => {
|
|
1062
|
-
|
|
1077
|
+
p.dispose();
|
|
1063
1078
|
}), c({
|
|
1064
1079
|
grid: a,
|
|
1065
1080
|
rowModel: S,
|
|
1066
1081
|
getApi: () => a.value?.api ?? null,
|
|
1067
1082
|
getRuntime: () => a.value?.runtime ?? null,
|
|
1068
1083
|
getCore: () => a.value?.core ?? null,
|
|
1069
|
-
getColumnState: () =>
|
|
1084
|
+
getColumnState: () => p.getColumnState(),
|
|
1070
1085
|
getColumnSnapshot: () => a.value?.api.columns.getSnapshot() ?? null,
|
|
1071
|
-
getSelectionAggregatesLabel: () =>
|
|
1086
|
+
getSelectionAggregatesLabel: () => U.value,
|
|
1072
1087
|
getSelectionSummary: () => a.value?.api.selection.summarize() ?? null,
|
|
1073
|
-
getView: () =>
|
|
1074
|
-
setView:
|
|
1075
|
-
getSavedView:
|
|
1076
|
-
migrateSavedView:
|
|
1077
|
-
applySavedView:
|
|
1078
|
-
applyColumnState:
|
|
1079
|
-
getState:
|
|
1080
|
-
migrateState:
|
|
1081
|
-
applyState:
|
|
1082
|
-
exportPivotLayout:
|
|
1083
|
-
exportPivotInterop:
|
|
1084
|
-
importPivotLayout:
|
|
1085
|
-
expandAllGroups:
|
|
1086
|
-
collapseAllGroups:
|
|
1088
|
+
getView: () => v.value,
|
|
1089
|
+
setView: oe,
|
|
1090
|
+
getSavedView: ye,
|
|
1091
|
+
migrateSavedView: ve,
|
|
1092
|
+
applySavedView: pe,
|
|
1093
|
+
applyColumnState: p.applyColumnState,
|
|
1094
|
+
getState: p.getState,
|
|
1095
|
+
migrateState: p.migrateState,
|
|
1096
|
+
applyState: p.applyState,
|
|
1097
|
+
exportPivotLayout: p.exportPivotLayout,
|
|
1098
|
+
exportPivotInterop: p.exportPivotInterop,
|
|
1099
|
+
importPivotLayout: p.importPivotLayout,
|
|
1100
|
+
expandAllGroups: p.expandAllGroups,
|
|
1101
|
+
collapseAllGroups: p.collapseAllGroups,
|
|
1087
1102
|
insertRowsAt: (l, m) => a.value?.api.rows.insertDataAt(l, m) ?? !1,
|
|
1088
1103
|
insertRowBefore: (l, m) => a.value?.api.rows.insertDataBefore(l, m) ?? !1,
|
|
1089
1104
|
insertRowAfter: (l, m) => a.value?.api.rows.insertDataAfter(l, m) ?? !1,
|
|
@@ -1096,23 +1111,24 @@ const Ye = ue({
|
|
|
1096
1111
|
rows: e.rows,
|
|
1097
1112
|
runtime: a.value?.runtime ?? null,
|
|
1098
1113
|
runtimeRowModel: a.value?.rowModel ?? null,
|
|
1099
|
-
selectionSnapshot:
|
|
1100
|
-
selectionAnchor:
|
|
1114
|
+
selectionSnapshot: _,
|
|
1115
|
+
selectionAnchor: E,
|
|
1101
1116
|
rowSelectionSnapshot: F,
|
|
1102
|
-
syncSelectionSnapshotFromRuntime:
|
|
1117
|
+
syncSelectionSnapshotFromRuntime: k,
|
|
1103
1118
|
syncRowSelectionSnapshotFromRuntime: K,
|
|
1119
|
+
flushRowSelectionSnapshotUpdates: te,
|
|
1104
1120
|
sortModel: e.sortModel,
|
|
1105
1121
|
filterModel: e.filterModel,
|
|
1106
|
-
groupBy:
|
|
1122
|
+
groupBy: f.value,
|
|
1107
1123
|
pivotModel: e.pivotModel,
|
|
1108
1124
|
renderMode: i.value,
|
|
1109
1125
|
virtualization: D.value,
|
|
1110
1126
|
columnMenu: b.value,
|
|
1111
1127
|
cellMenu: A.value,
|
|
1112
|
-
rowIndexMenu:
|
|
1113
|
-
columnLayout:
|
|
1114
|
-
aggregations:
|
|
1115
|
-
advancedFilter:
|
|
1128
|
+
rowIndexMenu: P.value,
|
|
1129
|
+
columnLayout: G.value,
|
|
1130
|
+
aggregations: y.value,
|
|
1131
|
+
advancedFilter: C.value,
|
|
1116
1132
|
rowHeightMode: e.rowHeightMode,
|
|
1117
1133
|
baseRowHeight: e.baseRowHeight,
|
|
1118
1134
|
layoutMode: M.value.layoutMode,
|
|
@@ -1125,11 +1141,12 @@ const Ye = ue({
|
|
|
1125
1141
|
isCellEditable: e.isCellEditable,
|
|
1126
1142
|
showRowIndex: e.showRowIndex,
|
|
1127
1143
|
rowSelection: e.rowSelection,
|
|
1128
|
-
viewMode:
|
|
1129
|
-
gantt: e.gantt
|
|
1144
|
+
viewMode: v.value,
|
|
1145
|
+
gantt: e.gantt,
|
|
1146
|
+
toolbarModules: e.toolbarModules
|
|
1130
1147
|
};
|
|
1131
1148
|
return Z(
|
|
1132
|
-
|
|
1149
|
+
qe,
|
|
1133
1150
|
{
|
|
1134
1151
|
...t,
|
|
1135
1152
|
ref: a,
|
|
@@ -1145,8 +1162,9 @@ const Ye = ue({
|
|
|
1145
1162
|
services: s.value,
|
|
1146
1163
|
startupOrder: e.startupOrder,
|
|
1147
1164
|
autoStart: e.autoStart,
|
|
1148
|
-
onCellChange:
|
|
1149
|
-
onSelectionChange:
|
|
1165
|
+
onCellChange: me,
|
|
1166
|
+
onSelectionChange: fe,
|
|
1167
|
+
onRowSelectionChange: ge
|
|
1150
1168
|
},
|
|
1151
1169
|
r.default ? {
|
|
1152
1170
|
default: (m) => r.default?.({
|
|
@@ -1158,7 +1176,7 @@ const Ye = ue({
|
|
|
1158
1176
|
}
|
|
1159
1177
|
})
|
|
1160
1178
|
} : {
|
|
1161
|
-
default: (m) => Z(
|
|
1179
|
+
default: (m) => Z(Pe, {
|
|
1162
1180
|
...l,
|
|
1163
1181
|
runtime: m.runtime,
|
|
1164
1182
|
runtimeRowModel: m.rowModel
|
|
@@ -1167,14 +1185,14 @@ const Ye = ue({
|
|
|
1167
1185
|
);
|
|
1168
1186
|
};
|
|
1169
1187
|
}
|
|
1170
|
-
}),
|
|
1188
|
+
}), ct = et;
|
|
1171
1189
|
export {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1190
|
+
ct as DataGrid,
|
|
1191
|
+
dt as clearDataGridSavedViewInStorage,
|
|
1192
|
+
et as default,
|
|
1193
|
+
ce as migrateDataGridSavedView,
|
|
1194
|
+
Ne as parseDataGridSavedView,
|
|
1195
|
+
st as readDataGridSavedViewFromStorage,
|
|
1196
|
+
ke as serializeDataGridSavedView,
|
|
1197
|
+
ut as writeDataGridSavedViewToStorage
|
|
1180
1198
|
};
|