@affino/datagrid-vue-app 0.1.49 → 0.1.50
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 +52 -1
- package/dist/DataGrid.d.ts +14 -0
- package/dist/chunks/{DataGridGanttStageEntry-BwdBiQkI.js → DataGridGanttStageEntry-DQBFS3-m.js} +68 -0
- package/dist/chunks/DataGridQuickFilterInput-TYJI9vo6.js +60 -0
- package/dist/chunks/{useDataGridAppRowModel-DV-_lFKE.js → useDataGridAppRowModel-BCi5miT8.js} +2120 -2069
- package/dist/config/dataGridQuickFilter.d.ts +14 -0
- package/dist/dataGridQuickFilter.d.ts +1 -0
- package/dist/gantt.js +1 -1
- package/dist/host/DataGridDefaultRenderer.d.ts +9 -0
- package/dist/host/DataGridQuickFilterInput.d.ts +48 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +457 -421
- package/dist/internal.js +2 -2
- package/dist/overlays/DataGridAdvancedFilterPopover.vue.d.ts +1 -1
- package/dist/overlays/DataGridAggregationsPopover.vue.d.ts +2 -2
- package/dist/overlays/DataGridColumnLayoutPopover.vue.d.ts +1 -1
- package/dist/quick-filter.d.ts +2 -0
- package/dist/quick-filter.js +4 -0
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useDataGridRuntime as
|
|
3
|
-
import { useDataGridAppSelection as
|
|
4
|
-
import { r as
|
|
5
|
-
import { a as
|
|
6
|
-
import { r as
|
|
7
|
-
import { r as
|
|
8
|
-
import { applyGridTheme as
|
|
9
|
-
import { d as
|
|
10
|
-
function
|
|
1
|
+
import { defineComponent as Ie, ref as x, provide as rt, computed as f, watch as h, onBeforeUnmount as Se, h as ge, mergeProps as lt, nextTick as at, unref as Oe, toRef as Ae } from "vue";
|
|
2
|
+
import { useDataGridRuntime as it, cloneDataGridFilterSnapshot as ut } from "@affino/datagrid-vue";
|
|
3
|
+
import { useDataGridAppSelection as st, useDataGridAppRowSelection as dt } from "@affino/datagrid-vue/app";
|
|
4
|
+
import { r as ct, g as ft, h as mt, i as yt, j as vt, b as gt, d as pt, c as wt, k as St, u as ht, D as Rt } from "./chunks/useDataGridAppRowModel-BCi5miT8.js";
|
|
5
|
+
import { a as Io, l as Ko } from "./chunks/useDataGridAppRowModel-BCi5miT8.js";
|
|
6
|
+
import { r as bt } from "./chunks/dataGridAdvancedFilter-xnME5bRa.js";
|
|
7
|
+
import { r as Mt } from "./chunks/DataGridGanttStageEntry-DQBFS3-m.js";
|
|
8
|
+
import { applyGridTheme as Ct, resolveGridThemeTokens as Ot, defaultStyleConfig as I, sugarTheme as Ke, industrialNeutralTheme as De } from "@affino/datagrid-theme";
|
|
9
|
+
import { d as At } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
|
|
10
|
+
function Ro() {
|
|
11
11
|
return (e) => e;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const Dt = {
|
|
14
14
|
default: I,
|
|
15
|
-
"industrial-neutral":
|
|
16
|
-
industrialNeutral:
|
|
17
|
-
sugar:
|
|
15
|
+
"industrial-neutral": De,
|
|
16
|
+
industrialNeutral: De,
|
|
17
|
+
sugar: Ke
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function Bt(e, t) {
|
|
20
20
|
if (!e && !t)
|
|
21
21
|
return;
|
|
22
22
|
const l = {
|
|
23
23
|
...e ?? {}
|
|
24
24
|
};
|
|
25
|
-
for (const [o,
|
|
25
|
+
for (const [o, i] of Object.entries(t ?? {}))
|
|
26
26
|
l[o] = {
|
|
27
27
|
...l[o] ?? {},
|
|
28
|
-
...
|
|
28
|
+
...i
|
|
29
29
|
};
|
|
30
30
|
return l;
|
|
31
31
|
}
|
|
@@ -40,34 +40,34 @@ function fe(e, t) {
|
|
|
40
40
|
summary: { ...e.summary ?? {}, ...t.summary ?? {} },
|
|
41
41
|
state: { ...e.state ?? {}, ...t.state ?? {} },
|
|
42
42
|
tokens: { ...e.tokens ?? {}, ...t.tokens ?? {} },
|
|
43
|
-
tokenVariants:
|
|
43
|
+
tokenVariants: Bt(e.tokenVariants, t.tokenVariants)
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Ft(e) {
|
|
47
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;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return e == null ? I : typeof e == "string" ? e === "sugar" ? fe(I,
|
|
49
|
+
function Pt(e) {
|
|
50
|
+
return e == null ? I : typeof e == "string" ? e === "sugar" ? fe(I, Ke) : Dt[e] ?? I : Ft(e) ? fe(I, e) : fe(I, {
|
|
51
51
|
tokens: e
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const t =
|
|
56
|
-
return
|
|
54
|
+
function Gt(e) {
|
|
55
|
+
const t = Pt(e);
|
|
56
|
+
return Ot(t ?? I, {
|
|
57
57
|
document: typeof document > "u" ? void 0 : document
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
function Ae(e, t) {
|
|
61
|
-
const l = Dt(t);
|
|
62
|
-
return Rt(e, l), l;
|
|
63
|
-
}
|
|
64
60
|
function Be(e, t) {
|
|
61
|
+
const l = Gt(t);
|
|
62
|
+
return Ct(e, l), l;
|
|
63
|
+
}
|
|
64
|
+
function Fe(e, t) {
|
|
65
65
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Pe(e, t) {
|
|
68
68
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : t;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function xt(e) {
|
|
71
71
|
if (e !== void 0) {
|
|
72
72
|
if (e == null)
|
|
73
73
|
return null;
|
|
@@ -82,23 +82,54 @@ function Pt(e) {
|
|
|
82
82
|
return e;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function jt(e, t) {
|
|
86
86
|
return t === !0 || t && typeof t == "object" ? "pagination" : e ?? "virtualization";
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Lt(e, t, l, o) {
|
|
89
89
|
if (t !== "pagination")
|
|
90
90
|
return null;
|
|
91
|
-
const
|
|
91
|
+
const i = 100, a = Pe(l, i), y = Fe(o, 0);
|
|
92
92
|
return e === !0 || e === !1 || e == null ? {
|
|
93
93
|
pageSize: a,
|
|
94
94
|
currentPage: y
|
|
95
95
|
} : {
|
|
96
|
-
pageSize:
|
|
97
|
-
currentPage:
|
|
96
|
+
pageSize: Pe(l ?? e.pageSize, i),
|
|
97
|
+
currentPage: Fe(o ?? e.currentPage, 0)
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
+
const pe = "Search rows", we = "contains";
|
|
101
|
+
function It(e) {
|
|
102
|
+
return typeof e == "string" && e.trim().length > 0 ? e.trim() : pe;
|
|
103
|
+
}
|
|
104
|
+
function Kt(e) {
|
|
105
|
+
return e === "tokens" ? "tokens" : we;
|
|
106
|
+
}
|
|
107
|
+
function Ht(e) {
|
|
108
|
+
if (!Array.isArray(e))
|
|
109
|
+
return null;
|
|
110
|
+
const t = e.map((l) => l.trim()).filter((l, o, i) => l.length > 0 && i.indexOf(l) === o);
|
|
111
|
+
return t.length > 0 ? Object.freeze(t) : null;
|
|
112
|
+
}
|
|
113
|
+
function zt(e) {
|
|
114
|
+
return Object.freeze(typeof e == "boolean" ? {
|
|
115
|
+
enabled: e,
|
|
116
|
+
placeholder: pe,
|
|
117
|
+
columns: null,
|
|
118
|
+
mode: we
|
|
119
|
+
} : e ? {
|
|
120
|
+
enabled: !0,
|
|
121
|
+
placeholder: It(e.placeholder),
|
|
122
|
+
columns: Ht(e.columns),
|
|
123
|
+
mode: Kt(e.mode)
|
|
124
|
+
} : {
|
|
125
|
+
enabled: !1,
|
|
126
|
+
placeholder: pe,
|
|
127
|
+
columns: null,
|
|
128
|
+
mode: we
|
|
129
|
+
});
|
|
130
|
+
}
|
|
100
131
|
const me = "Find / replace";
|
|
101
|
-
function
|
|
132
|
+
function Et(e) {
|
|
102
133
|
return typeof e == "boolean" ? {
|
|
103
134
|
enabled: e,
|
|
104
135
|
buttonLabel: me
|
|
@@ -110,22 +141,22 @@ function xt(e) {
|
|
|
110
141
|
buttonLabel: me
|
|
111
142
|
};
|
|
112
143
|
}
|
|
113
|
-
const
|
|
144
|
+
const kt = "all", He = {
|
|
114
145
|
all: "columns",
|
|
115
146
|
rows: "none",
|
|
116
147
|
columns: "columns",
|
|
117
148
|
none: "none"
|
|
118
149
|
};
|
|
119
|
-
function
|
|
120
|
-
return e === "rows" || e === "columns" || e === "none" || e === "all" ? e :
|
|
150
|
+
function Ge(e) {
|
|
151
|
+
return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : kt;
|
|
121
152
|
}
|
|
122
|
-
function
|
|
123
|
-
return e === "columns" || e === "none" ? e :
|
|
153
|
+
function Tt(e, t) {
|
|
154
|
+
return e === "columns" || e === "none" ? e : He[t];
|
|
124
155
|
}
|
|
125
|
-
function
|
|
156
|
+
function xe(e, t) {
|
|
126
157
|
return e !== "none" || t === "columns";
|
|
127
158
|
}
|
|
128
|
-
function
|
|
159
|
+
function je(e) {
|
|
129
160
|
const t = e.body === "all" || e.body === "rows", l = e.body === "all" || e.body === "columns", o = e.header === "columns";
|
|
130
161
|
return {
|
|
131
162
|
body: e.body,
|
|
@@ -136,29 +167,29 @@ function Fe(e) {
|
|
|
136
167
|
headerColumns: o
|
|
137
168
|
};
|
|
138
169
|
}
|
|
139
|
-
function
|
|
170
|
+
function Vt(e) {
|
|
140
171
|
if (typeof e == "string") {
|
|
141
|
-
const o =
|
|
142
|
-
return
|
|
172
|
+
const o = Ge(e), i = He[o];
|
|
173
|
+
return je({
|
|
143
174
|
body: o,
|
|
144
|
-
header:
|
|
145
|
-
pinnedSeparators:
|
|
175
|
+
header: i,
|
|
176
|
+
pinnedSeparators: xe(o, i)
|
|
146
177
|
});
|
|
147
178
|
}
|
|
148
|
-
const t =
|
|
149
|
-
return
|
|
179
|
+
const t = Ge(e?.body), l = Tt(e?.header, t);
|
|
180
|
+
return je({
|
|
150
181
|
body: t,
|
|
151
182
|
header: l,
|
|
152
|
-
pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators :
|
|
183
|
+
pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : xe(t, l)
|
|
153
184
|
});
|
|
154
185
|
}
|
|
155
|
-
function
|
|
186
|
+
function Le(e) {
|
|
156
187
|
if (typeof e != "number" || !Number.isFinite(e))
|
|
157
188
|
return null;
|
|
158
189
|
const t = Math.max(0, Math.trunc(e));
|
|
159
190
|
return t > 0 ? t : null;
|
|
160
191
|
}
|
|
161
|
-
function
|
|
192
|
+
function Wt(e, t, l) {
|
|
162
193
|
const o = e === "auto-height" ? "auto-height" : "fill";
|
|
163
194
|
if (o !== "auto-height")
|
|
164
195
|
return {
|
|
@@ -166,15 +197,15 @@ function Ht(e, t, l) {
|
|
|
166
197
|
minRows: null,
|
|
167
198
|
maxRows: null
|
|
168
199
|
};
|
|
169
|
-
const
|
|
170
|
-
let a =
|
|
171
|
-
return
|
|
200
|
+
const i = Le(t);
|
|
201
|
+
let a = Le(l);
|
|
202
|
+
return i !== null && a !== null && a < i && (a = i), {
|
|
172
203
|
layoutMode: o,
|
|
173
|
-
minRows:
|
|
204
|
+
minRows: i,
|
|
174
205
|
maxRows: a
|
|
175
206
|
};
|
|
176
207
|
}
|
|
177
|
-
function
|
|
208
|
+
function _t(e) {
|
|
178
209
|
return {
|
|
179
210
|
...e,
|
|
180
211
|
transaction: null
|
|
@@ -183,54 +214,54 @@ function Lt(e) {
|
|
|
183
214
|
function X(e) {
|
|
184
215
|
return {
|
|
185
216
|
...e,
|
|
186
|
-
state:
|
|
217
|
+
state: _t(e.state)
|
|
187
218
|
};
|
|
188
219
|
}
|
|
189
|
-
function
|
|
220
|
+
function Ut(e) {
|
|
190
221
|
return typeof e == "object" && e !== null;
|
|
191
222
|
}
|
|
192
|
-
function
|
|
193
|
-
const o =
|
|
194
|
-
if (!
|
|
223
|
+
function ze(e, t, l) {
|
|
224
|
+
const o = Ut(e) ? e : null, i = t(o && "state" in o ? o.state : e, l);
|
|
225
|
+
if (!i)
|
|
195
226
|
return null;
|
|
196
227
|
const a = o?.viewMode, y = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
|
|
197
228
|
return X({
|
|
198
|
-
state:
|
|
229
|
+
state: i,
|
|
199
230
|
...y ? { viewMode: y } : {}
|
|
200
231
|
});
|
|
201
232
|
}
|
|
202
|
-
function
|
|
233
|
+
function Nt(e) {
|
|
203
234
|
return JSON.stringify(X(e));
|
|
204
235
|
}
|
|
205
|
-
function
|
|
236
|
+
function qt(e, t, l) {
|
|
206
237
|
if (typeof e != "string" || e.trim().length === 0)
|
|
207
238
|
return null;
|
|
208
239
|
try {
|
|
209
|
-
return
|
|
240
|
+
return ze(JSON.parse(e), t, l);
|
|
210
241
|
} catch {
|
|
211
242
|
return null;
|
|
212
243
|
}
|
|
213
244
|
}
|
|
214
|
-
function
|
|
245
|
+
function bo(e, t, l) {
|
|
215
246
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
216
247
|
return !1;
|
|
217
248
|
try {
|
|
218
|
-
return e.setItem(t,
|
|
249
|
+
return e.setItem(t, Nt(l)), !0;
|
|
219
250
|
} catch {
|
|
220
251
|
return !1;
|
|
221
252
|
}
|
|
222
253
|
}
|
|
223
|
-
function
|
|
254
|
+
function Mo(e, t, l, o) {
|
|
224
255
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
225
256
|
return null;
|
|
226
257
|
try {
|
|
227
|
-
const
|
|
228
|
-
return
|
|
258
|
+
const i = e.getItem(t);
|
|
259
|
+
return i ? qt(i, l, o) : null;
|
|
229
260
|
} catch {
|
|
230
261
|
return null;
|
|
231
262
|
}
|
|
232
263
|
}
|
|
233
|
-
function
|
|
264
|
+
function Co(e, t) {
|
|
234
265
|
if (!e || typeof t != "string" || t.trim().length === 0)
|
|
235
266
|
return !1;
|
|
236
267
|
try {
|
|
@@ -240,7 +271,7 @@ function po(e, t) {
|
|
|
240
271
|
}
|
|
241
272
|
}
|
|
242
273
|
const ye = "Aggregations";
|
|
243
|
-
function
|
|
274
|
+
function Jt(e) {
|
|
244
275
|
return typeof e == "boolean" ? {
|
|
245
276
|
enabled: e,
|
|
246
277
|
buttonLabel: ye
|
|
@@ -252,10 +283,10 @@ function Wt(e) {
|
|
|
252
283
|
buttonLabel: ye
|
|
253
284
|
};
|
|
254
285
|
}
|
|
255
|
-
function
|
|
286
|
+
function Q(e, t) {
|
|
256
287
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
|
|
257
288
|
}
|
|
258
|
-
function
|
|
289
|
+
function Yt(e, t) {
|
|
259
290
|
const l = {
|
|
260
291
|
rows: !0,
|
|
261
292
|
columns: !1,
|
|
@@ -268,12 +299,12 @@ function Tt(e, t) {
|
|
|
268
299
|
l.rows = !1, l.columns = !1;
|
|
269
300
|
else if (e && typeof e == "object") {
|
|
270
301
|
l.rows = e.rows ?? l.rows, l.columns = e.columns ?? l.columns;
|
|
271
|
-
const o =
|
|
272
|
-
l.rowOverscan =
|
|
302
|
+
const o = Q(e.overscan, l.rowOverscan);
|
|
303
|
+
l.rowOverscan = Q(e.rowOverscan, o), l.columnOverscan = Q(e.columnOverscan, Q(e.overscan, l.columnOverscan));
|
|
273
304
|
}
|
|
274
305
|
return t === "pagination" && (l.rows = !1), l;
|
|
275
306
|
}
|
|
276
|
-
const
|
|
307
|
+
const Qt = Ie({
|
|
277
308
|
name: "DataGridRuntimeHost",
|
|
278
309
|
inheritAttrs: !1,
|
|
279
310
|
props: {
|
|
@@ -327,11 +358,11 @@ const _t = je({
|
|
|
327
358
|
"selection-change": (e) => !0,
|
|
328
359
|
"row-selection-change": (e) => !0
|
|
329
360
|
},
|
|
330
|
-
setup(e, { attrs: t, slots: l, emit: o, expose:
|
|
361
|
+
setup(e, { attrs: t, slots: l, emit: o, expose: i }) {
|
|
331
362
|
const a = x(null);
|
|
332
|
-
|
|
363
|
+
rt(At, a);
|
|
333
364
|
let y = null;
|
|
334
|
-
const
|
|
365
|
+
const d = it({
|
|
335
366
|
rows: f(() => e.rows),
|
|
336
367
|
rowModel: e.rowModel,
|
|
337
368
|
columns: f(() => e.columns),
|
|
@@ -339,43 +370,43 @@ const _t = je({
|
|
|
339
370
|
services: e.services,
|
|
340
371
|
startupOrder: e.startupOrder,
|
|
341
372
|
autoStart: e.autoStart
|
|
342
|
-
}), S =
|
|
343
|
-
api:
|
|
344
|
-
syncBodyRowsInRange:
|
|
345
|
-
setViewportRange:
|
|
346
|
-
setVirtualWindowRange:
|
|
347
|
-
setRows:
|
|
348
|
-
rowPartition:
|
|
349
|
-
virtualWindow:
|
|
350
|
-
columnSnapshot:
|
|
373
|
+
}), S = d, R = {
|
|
374
|
+
api: d.api,
|
|
375
|
+
syncBodyRowsInRange: d.syncBodyRowsInRange,
|
|
376
|
+
setViewportRange: d.setViewportRange,
|
|
377
|
+
setVirtualWindowRange: d.setVirtualWindowRange,
|
|
378
|
+
setRows: d.setRows,
|
|
379
|
+
rowPartition: d.rowPartition,
|
|
380
|
+
virtualWindow: d.virtualWindow,
|
|
381
|
+
columnSnapshot: d.columnSnapshot,
|
|
351
382
|
getBodyRowAtIndex: S.getBodyRowAtIndex,
|
|
352
383
|
resolveBodyRowIndexById: S.resolveBodyRowIndexById
|
|
353
|
-
},
|
|
384
|
+
}, B = () => {
|
|
354
385
|
if (e.renderMode === "pagination") {
|
|
355
386
|
const v = e.pagination ?? { pageSize: 100, currentPage: 0 };
|
|
356
|
-
|
|
387
|
+
d.api.rows.setPagination({
|
|
357
388
|
pageSize: Math.max(1, Math.trunc(v.pageSize)),
|
|
358
389
|
currentPage: Math.max(0, Math.trunc(v.currentPage))
|
|
359
390
|
});
|
|
360
391
|
return;
|
|
361
392
|
}
|
|
362
|
-
|
|
393
|
+
d.api.rows.setPagination(null);
|
|
363
394
|
};
|
|
364
395
|
h(
|
|
365
396
|
() => e.renderMode,
|
|
366
397
|
() => {
|
|
367
|
-
|
|
398
|
+
B();
|
|
368
399
|
},
|
|
369
400
|
{ immediate: !0 }
|
|
370
401
|
), h(
|
|
371
402
|
() => e.pagination,
|
|
372
403
|
() => {
|
|
373
|
-
|
|
404
|
+
B();
|
|
374
405
|
},
|
|
375
406
|
{ immediate: !0, deep: !0 }
|
|
376
407
|
), typeof document < "u" && (y = new MutationObserver(() => {
|
|
377
408
|
const v = a.value;
|
|
378
|
-
v &&
|
|
409
|
+
v && Be(v, e.theme);
|
|
379
410
|
}), y.observe(document.documentElement, {
|
|
380
411
|
attributes: !0,
|
|
381
412
|
attributeFilter: ["class", "data-theme"]
|
|
@@ -383,26 +414,26 @@ const _t = je({
|
|
|
383
414
|
[() => e.theme, a],
|
|
384
415
|
() => {
|
|
385
416
|
const v = a.value;
|
|
386
|
-
v &&
|
|
417
|
+
v && Be(v, e.theme);
|
|
387
418
|
},
|
|
388
419
|
{ immediate: !0, deep: !0 }
|
|
389
420
|
);
|
|
390
|
-
const C =
|
|
421
|
+
const C = d.api.events.on("rows:changed", (v) => {
|
|
391
422
|
o("cell-change", v);
|
|
392
|
-
}), b =
|
|
423
|
+
}), b = d.api.events.on("selection:changed", (v) => {
|
|
393
424
|
o("selection-change", v);
|
|
394
|
-
}), j =
|
|
425
|
+
}), j = d.api.events.on("row-selection:changed", (v) => {
|
|
395
426
|
o("row-selection-change", v);
|
|
396
427
|
});
|
|
397
|
-
|
|
428
|
+
Se(() => {
|
|
398
429
|
C(), b(), j(), y?.disconnect(), y = null;
|
|
399
430
|
});
|
|
400
|
-
const
|
|
401
|
-
const v =
|
|
431
|
+
const P = f(() => {
|
|
432
|
+
const v = d.virtualWindow.value;
|
|
402
433
|
return {
|
|
403
434
|
...v ?? {},
|
|
404
|
-
rowTotal: v?.rowTotal ??
|
|
405
|
-
colTotal:
|
|
435
|
+
rowTotal: v?.rowTotal ?? d.rowPartition.value.bodyRowCount,
|
|
436
|
+
colTotal: d.columnSnapshot.value.visibleColumns.length
|
|
406
437
|
};
|
|
407
438
|
}), g = () => {
|
|
408
439
|
const v = () => {
|
|
@@ -416,7 +447,7 @@ const _t = je({
|
|
|
416
447
|
}
|
|
417
448
|
return typeof document < "u" && document.activeElement === M;
|
|
418
449
|
}, p = (M) => {
|
|
419
|
-
|
|
450
|
+
at(() => {
|
|
420
451
|
if (!(v() || M >= 3)) {
|
|
421
452
|
if (typeof window < "u") {
|
|
422
453
|
window.requestAnimationFrame(() => {
|
|
@@ -430,25 +461,25 @@ const _t = je({
|
|
|
430
461
|
};
|
|
431
462
|
p(0);
|
|
432
463
|
};
|
|
433
|
-
return
|
|
434
|
-
api:
|
|
435
|
-
core:
|
|
464
|
+
return i({
|
|
465
|
+
api: d.api,
|
|
466
|
+
core: d.core,
|
|
436
467
|
runtime: R,
|
|
437
|
-
rowModel:
|
|
438
|
-
columnModel:
|
|
439
|
-
columnSnapshot:
|
|
440
|
-
rowPartition:
|
|
441
|
-
setRows:
|
|
442
|
-
syncBodyRowsInRange:
|
|
468
|
+
rowModel: d.rowModel,
|
|
469
|
+
columnModel: d.columnModel,
|
|
470
|
+
columnSnapshot: d.columnSnapshot,
|
|
471
|
+
rowPartition: d.rowPartition,
|
|
472
|
+
setRows: d.setRows,
|
|
473
|
+
syncBodyRowsInRange: d.syncBodyRowsInRange,
|
|
443
474
|
getBodyRowAtIndex: S.getBodyRowAtIndex,
|
|
444
475
|
resolveBodyRowIndexById: S.resolveBodyRowIndexById,
|
|
445
|
-
virtualWindow:
|
|
476
|
+
virtualWindow: d.virtualWindow,
|
|
446
477
|
restoreFocus: g,
|
|
447
|
-
start:
|
|
448
|
-
stop:
|
|
478
|
+
start: d.start,
|
|
479
|
+
stop: d.stop
|
|
449
480
|
}), () => ge(
|
|
450
481
|
"div",
|
|
451
|
-
|
|
482
|
+
lt(t, {
|
|
452
483
|
ref: a,
|
|
453
484
|
class: [
|
|
454
485
|
"affino-datagrid-app-root",
|
|
@@ -463,19 +494,19 @@ const _t = je({
|
|
|
463
494
|
}
|
|
464
495
|
}),
|
|
465
496
|
l.default?.({
|
|
466
|
-
api:
|
|
467
|
-
core:
|
|
497
|
+
api: d.api,
|
|
498
|
+
core: d.core,
|
|
468
499
|
runtime: R,
|
|
469
500
|
grid: R,
|
|
470
|
-
rowModel:
|
|
471
|
-
columnModel:
|
|
472
|
-
columnSnapshot:
|
|
473
|
-
rowPartition:
|
|
474
|
-
setRows:
|
|
475
|
-
syncBodyRowsInRange:
|
|
501
|
+
rowModel: d.rowModel,
|
|
502
|
+
columnModel: d.columnModel,
|
|
503
|
+
columnSnapshot: d.columnSnapshot.value,
|
|
504
|
+
rowPartition: d.rowPartition.value,
|
|
505
|
+
setRows: d.setRows,
|
|
506
|
+
syncBodyRowsInRange: d.syncBodyRowsInRange,
|
|
476
507
|
getBodyRowAtIndex: S.getBodyRowAtIndex,
|
|
477
508
|
resolveBodyRowIndexById: S.resolveBodyRowIndexById,
|
|
478
|
-
virtualWindow:
|
|
509
|
+
virtualWindow: P.value
|
|
479
510
|
}) ?? []
|
|
480
511
|
);
|
|
481
512
|
}
|
|
@@ -483,54 +514,54 @@ const _t = je({
|
|
|
483
514
|
function ve(e) {
|
|
484
515
|
return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
|
|
485
516
|
}
|
|
486
|
-
function
|
|
517
|
+
function D(e) {
|
|
487
518
|
try {
|
|
488
519
|
return JSON.stringify(e);
|
|
489
520
|
} catch {
|
|
490
521
|
return null;
|
|
491
522
|
}
|
|
492
523
|
}
|
|
493
|
-
function
|
|
524
|
+
function $t(e) {
|
|
494
525
|
return e ? {
|
|
495
526
|
fields: [...e.fields],
|
|
496
527
|
expandedByDefault: e.expandedByDefault
|
|
497
528
|
} : null;
|
|
498
529
|
}
|
|
499
|
-
function
|
|
500
|
-
let t = null, l = null, o = !1,
|
|
530
|
+
function Xt(e) {
|
|
531
|
+
let t = null, l = null, o = !1, i = null, a = null, y = null, d = null, S = null, R = null, B = null, C = null, b = null;
|
|
501
532
|
const j = () => {
|
|
502
533
|
t?.(), l?.(), t = null, l = null;
|
|
503
|
-
},
|
|
534
|
+
}, P = () => {
|
|
504
535
|
const n = e.gridRef.value;
|
|
505
536
|
return !n || n.api.lifecycle.state === "disposed" ? null : n;
|
|
506
|
-
}, g = () =>
|
|
537
|
+
}, g = () => P()?.api ?? null, v = () => {
|
|
507
538
|
const n = g()?.columns;
|
|
508
539
|
if (!n)
|
|
509
540
|
return null;
|
|
510
|
-
const
|
|
511
|
-
for (const O of
|
|
512
|
-
|
|
541
|
+
const s = n.getSnapshot(), u = {}, m = {}, A = {};
|
|
542
|
+
for (const O of s.columns)
|
|
543
|
+
u[O.key] = O.visible, m[O.key] = O.width, A[O.key] = O.pin;
|
|
513
544
|
return {
|
|
514
|
-
order: [...
|
|
515
|
-
visibility:
|
|
545
|
+
order: [...s.order],
|
|
546
|
+
visibility: u,
|
|
516
547
|
widths: m,
|
|
517
548
|
pins: A
|
|
518
549
|
};
|
|
519
550
|
}, p = () => {
|
|
520
551
|
o || (o = !0, queueMicrotask(() => {
|
|
521
552
|
o = !1;
|
|
522
|
-
const n = v(),
|
|
553
|
+
const n = v(), s = g();
|
|
523
554
|
if (n) {
|
|
524
|
-
const
|
|
525
|
-
R =
|
|
555
|
+
const u = D(n);
|
|
556
|
+
R = u, u !== y && (y = u, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
|
|
526
557
|
Object.entries(n.visibility).filter(([, m]) => !m).map(([m]) => m)
|
|
527
558
|
), e.emit.columnWidths(n.widths), e.emit.columnPins(n.pins));
|
|
528
559
|
}
|
|
529
|
-
if (
|
|
530
|
-
const
|
|
531
|
-
m !== S && (S = m, e.emit.groupBy(
|
|
532
|
-
const A =
|
|
533
|
-
|
|
560
|
+
if (s) {
|
|
561
|
+
const u = $t(s.rows.getSnapshot().groupBy), m = D(u);
|
|
562
|
+
m !== S && (S = m, e.emit.groupBy(u));
|
|
563
|
+
const A = s.state.get(), O = D(A);
|
|
564
|
+
B = O, O !== d && (d = O, e.emit.state(A));
|
|
534
565
|
}
|
|
535
566
|
}));
|
|
536
567
|
}, M = () => {
|
|
@@ -541,54 +572,54 @@ function Ut(e) {
|
|
|
541
572
|
});
|
|
542
573
|
}, Z = () => {
|
|
543
574
|
const n = g()?.columns;
|
|
544
|
-
return n ? new Set(n.getSnapshot().columns.map((
|
|
575
|
+
return n ? new Set(n.getSnapshot().columns.map((s) => s.key)) : null;
|
|
545
576
|
}, ee = (n) => {
|
|
546
|
-
const
|
|
577
|
+
const s = /* @__PURE__ */ new Set();
|
|
547
578
|
if (!n)
|
|
548
|
-
return
|
|
549
|
-
for (const
|
|
550
|
-
|
|
551
|
-
for (const
|
|
552
|
-
|
|
553
|
-
for (const
|
|
554
|
-
|
|
555
|
-
for (const
|
|
556
|
-
|
|
557
|
-
return
|
|
579
|
+
return s;
|
|
580
|
+
for (const u of n.order)
|
|
581
|
+
s.add(u);
|
|
582
|
+
for (const u of Object.keys(n.visibility ?? {}))
|
|
583
|
+
s.add(u);
|
|
584
|
+
for (const u of Object.keys(n.widths ?? {}))
|
|
585
|
+
s.add(u);
|
|
586
|
+
for (const u of Object.keys(n.pins ?? {}))
|
|
587
|
+
s.add(u);
|
|
588
|
+
return s;
|
|
558
589
|
}, z = (n) => {
|
|
559
|
-
const
|
|
560
|
-
if (!
|
|
590
|
+
const s = Z();
|
|
591
|
+
if (!s)
|
|
561
592
|
return !1;
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
593
|
+
const u = ee(n);
|
|
594
|
+
if (u.size === 0)
|
|
564
595
|
return !0;
|
|
565
|
-
for (const m of
|
|
566
|
-
if (!
|
|
596
|
+
for (const m of u)
|
|
597
|
+
if (!s.has(m))
|
|
567
598
|
return !1;
|
|
568
599
|
return !0;
|
|
569
600
|
}, E = (n) => z(n.columns), U = (n) => {
|
|
570
|
-
const
|
|
571
|
-
if (!
|
|
601
|
+
const s = g();
|
|
602
|
+
if (!s)
|
|
572
603
|
return !1;
|
|
573
|
-
|
|
574
|
-
for (const [
|
|
575
|
-
|
|
576
|
-
for (const [
|
|
577
|
-
|
|
578
|
-
for (const [
|
|
579
|
-
|
|
604
|
+
s.columns.setOrder(n.order);
|
|
605
|
+
for (const [u, m] of Object.entries(n.visibility))
|
|
606
|
+
s.columns.setVisibility(u, m);
|
|
607
|
+
for (const [u, m] of Object.entries(n.widths))
|
|
608
|
+
s.columns.setWidth(u, ve(m));
|
|
609
|
+
for (const [u, m] of Object.entries(n.pins))
|
|
610
|
+
s.columns.setPin(u, m);
|
|
580
611
|
return !0;
|
|
581
612
|
}, K = () => {
|
|
582
613
|
if (b) {
|
|
583
|
-
const n = b,
|
|
584
|
-
if (
|
|
585
|
-
const
|
|
586
|
-
|
|
614
|
+
const n = b, s = g();
|
|
615
|
+
if (s) {
|
|
616
|
+
const u = s.state.migrate(n.state, { strict: n.options?.strict });
|
|
617
|
+
u && E(u) && (b = null, s.state.set(u, n.options), a = D(n.state));
|
|
587
618
|
}
|
|
588
619
|
}
|
|
589
620
|
if (C && z(C.columnState)) {
|
|
590
621
|
const n = C;
|
|
591
|
-
C = null,
|
|
622
|
+
C = null, i = D({
|
|
592
623
|
columnState: n.columnState,
|
|
593
624
|
columnOrder: null,
|
|
594
625
|
hiddenColumnKeys: null,
|
|
@@ -596,94 +627,94 @@ function Ut(e) {
|
|
|
596
627
|
columnPins: null
|
|
597
628
|
}), U(n.columnState);
|
|
598
629
|
}
|
|
599
|
-
},
|
|
630
|
+
}, k = () => {
|
|
600
631
|
const n = g();
|
|
601
632
|
!n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
|
|
602
|
-
},
|
|
633
|
+
}, T = () => {
|
|
603
634
|
const n = g();
|
|
604
635
|
!n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
|
|
605
|
-
},
|
|
636
|
+
}, V = () => {
|
|
606
637
|
const n = g();
|
|
607
638
|
!n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
|
|
608
|
-
},
|
|
639
|
+
}, L = () => {
|
|
609
640
|
const n = g();
|
|
610
641
|
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)
|
|
611
642
|
return;
|
|
612
|
-
const
|
|
643
|
+
const s = D({
|
|
613
644
|
columnState: e.props.columnState,
|
|
614
645
|
columnOrder: e.props.columnOrder,
|
|
615
646
|
hiddenColumnKeys: e.props.hiddenColumnKeys,
|
|
616
647
|
columnWidths: e.props.columnWidths,
|
|
617
648
|
columnPins: e.props.columnPins
|
|
618
649
|
});
|
|
619
|
-
if (
|
|
620
|
-
if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins &&
|
|
621
|
-
|
|
650
|
+
if (s !== i) {
|
|
651
|
+
if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && D(e.props.columnState) === R) {
|
|
652
|
+
i = s;
|
|
622
653
|
return;
|
|
623
654
|
}
|
|
624
655
|
if (e.props.columnState) {
|
|
625
656
|
n.columns.setOrder(e.props.columnState.order);
|
|
626
|
-
for (const [
|
|
627
|
-
n.columns.setVisibility(
|
|
628
|
-
for (const [
|
|
629
|
-
n.columns.setWidth(
|
|
630
|
-
for (const [
|
|
631
|
-
n.columns.setPin(
|
|
657
|
+
for (const [u, m] of Object.entries(e.props.columnState.visibility))
|
|
658
|
+
n.columns.setVisibility(u, m);
|
|
659
|
+
for (const [u, m] of Object.entries(e.props.columnState.widths))
|
|
660
|
+
n.columns.setWidth(u, ve(m));
|
|
661
|
+
for (const [u, m] of Object.entries(e.props.columnState.pins))
|
|
662
|
+
n.columns.setPin(u, m);
|
|
632
663
|
}
|
|
633
664
|
if (e.props.columnOrder && n.columns.setOrder(e.props.columnOrder), e.props.hiddenColumnKeys) {
|
|
634
|
-
const
|
|
665
|
+
const u = new Set(e.props.hiddenColumnKeys), m = n.columns.getSnapshot();
|
|
635
666
|
for (const A of m.columns)
|
|
636
|
-
n.columns.setVisibility(A.key, !
|
|
667
|
+
n.columns.setVisibility(A.key, !u.has(A.key));
|
|
637
668
|
}
|
|
638
669
|
if (e.props.columnWidths)
|
|
639
|
-
for (const [
|
|
640
|
-
n.columns.setWidth(
|
|
670
|
+
for (const [u, m] of Object.entries(e.props.columnWidths))
|
|
671
|
+
n.columns.setWidth(u, ve(m));
|
|
641
672
|
if (e.props.columnPins)
|
|
642
|
-
for (const [
|
|
643
|
-
n.columns.setPin(
|
|
644
|
-
|
|
673
|
+
for (const [u, m] of Object.entries(e.props.columnPins))
|
|
674
|
+
n.columns.setPin(u, m);
|
|
675
|
+
i = s;
|
|
645
676
|
}
|
|
646
|
-
},
|
|
677
|
+
}, G = () => {
|
|
647
678
|
const n = g();
|
|
648
679
|
if (!n || e.props.state == null)
|
|
649
680
|
return;
|
|
650
|
-
const
|
|
651
|
-
if (
|
|
681
|
+
const s = D(e.props.state);
|
|
682
|
+
if (s === a)
|
|
652
683
|
return;
|
|
653
|
-
if (
|
|
654
|
-
a =
|
|
684
|
+
if (s === B) {
|
|
685
|
+
a = s;
|
|
655
686
|
return;
|
|
656
687
|
}
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
},
|
|
688
|
+
const u = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
|
|
689
|
+
u && E(u) && (n.state.set(u, e.props.stateOptions ?? {}), a = s);
|
|
690
|
+
}, W = () => {
|
|
660
691
|
const n = g();
|
|
661
692
|
n && (n.view.setRowHeightMode(e.props.rowHeightMode), n.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
|
|
662
693
|
}, N = () => {
|
|
663
|
-
const n =
|
|
664
|
-
n && (
|
|
694
|
+
const n = P();
|
|
695
|
+
n && (i = null, a = null, j(), t = n.rowModel.subscribe(() => {
|
|
665
696
|
p();
|
|
666
697
|
}), l = n.columnModel.subscribe(() => {
|
|
667
698
|
p();
|
|
668
|
-
}),
|
|
669
|
-
},
|
|
699
|
+
}), G(), L(), M(), k(), T(), V(), W(), K(), p(), e.emit.ready({ api: n.api }));
|
|
700
|
+
}, te = () => g()?.state.get() ?? null, q = (n, s) => g()?.state.migrate(n, s) ?? null, oe = (n) => z(n) ? (i = D({
|
|
670
701
|
columnState: n,
|
|
671
702
|
columnOrder: null,
|
|
672
703
|
hiddenColumnKeys: null,
|
|
673
704
|
columnWidths: null,
|
|
674
705
|
columnPins: null
|
|
675
|
-
}), C = null, U(n) ? (p(), !0) : (C = { columnState: n }, !0)) : (C = { columnState: n }, !0),
|
|
676
|
-
const
|
|
677
|
-
if (!
|
|
678
|
-
return b = { state: n, options:
|
|
679
|
-
const m =
|
|
680
|
-
return m ? E(m) ? (
|
|
681
|
-
}, ne = () => g()?.pivot.exportLayout() ?? null,
|
|
682
|
-
const
|
|
683
|
-
return
|
|
684
|
-
}, k = () => {
|
|
685
|
-
g()?.rows.expandAllGroups(), p();
|
|
706
|
+
}), C = null, U(n) ? (p(), !0) : (C = { columnState: n }, !0)) : (C = { columnState: n }, !0), H = (n, s) => {
|
|
707
|
+
const u = g();
|
|
708
|
+
if (!u)
|
|
709
|
+
return b = { state: n, options: s }, !0;
|
|
710
|
+
const m = u.state.migrate(n, { strict: s?.strict });
|
|
711
|
+
return m ? E(m) ? (u.state.set(m, s), a = D(n), b = null, p(), !0) : (b = { state: n, options: s }, !0) : !1;
|
|
712
|
+
}, ne = () => g()?.pivot.exportLayout() ?? null, re = () => g()?.pivot.exportInterop() ?? null, J = (n, s) => {
|
|
713
|
+
const u = g();
|
|
714
|
+
return u ? (u.pivot.importLayout(n, s), p(), !0) : !1;
|
|
686
715
|
}, le = () => {
|
|
716
|
+
g()?.rows.expandAllGroups(), p();
|
|
717
|
+
}, _ = () => {
|
|
687
718
|
g()?.rows.collapseAllGroups(), p();
|
|
688
719
|
};
|
|
689
720
|
h(
|
|
@@ -695,13 +726,13 @@ function Ut(e) {
|
|
|
695
726
|
), h(
|
|
696
727
|
() => e.props.columns,
|
|
697
728
|
() => {
|
|
698
|
-
|
|
729
|
+
i = null, a = null, G(), L(), K(), p();
|
|
699
730
|
},
|
|
700
731
|
{ deep: !0 }
|
|
701
732
|
), h(
|
|
702
733
|
() => [e.props.state, e.props.stateOptions],
|
|
703
734
|
() => {
|
|
704
|
-
|
|
735
|
+
G(), L(), M(), k(), T(), V(), W(), K(), p();
|
|
705
736
|
},
|
|
706
737
|
{ deep: !0 }
|
|
707
738
|
), h(
|
|
@@ -713,7 +744,7 @@ function Ut(e) {
|
|
|
713
744
|
e.props.columnPins
|
|
714
745
|
],
|
|
715
746
|
() => {
|
|
716
|
-
|
|
747
|
+
L(), K(), p();
|
|
717
748
|
},
|
|
718
749
|
{ deep: !0 }
|
|
719
750
|
), h(
|
|
@@ -725,68 +756,68 @@ function Ut(e) {
|
|
|
725
756
|
), h(
|
|
726
757
|
() => e.props.groupBy,
|
|
727
758
|
() => {
|
|
728
|
-
|
|
759
|
+
k(), p();
|
|
729
760
|
},
|
|
730
761
|
{ deep: !0 }
|
|
731
762
|
), h(
|
|
732
763
|
() => e.props.aggregationModel,
|
|
733
764
|
() => {
|
|
734
|
-
|
|
765
|
+
T(), p();
|
|
735
766
|
},
|
|
736
767
|
{ deep: !0 }
|
|
737
768
|
), h(
|
|
738
769
|
() => e.props.pivotModel,
|
|
739
770
|
() => {
|
|
740
|
-
|
|
771
|
+
V(), p();
|
|
741
772
|
},
|
|
742
773
|
{ deep: !0 }
|
|
743
774
|
), h(
|
|
744
775
|
() => [e.props.rowHeightMode, e.props.baseRowHeight],
|
|
745
776
|
() => {
|
|
746
|
-
|
|
777
|
+
W(), p();
|
|
747
778
|
}
|
|
748
779
|
);
|
|
749
780
|
const Y = () => {
|
|
750
781
|
j();
|
|
751
782
|
};
|
|
752
|
-
return
|
|
783
|
+
return Se(() => {
|
|
753
784
|
Y();
|
|
754
785
|
}), {
|
|
755
786
|
emitSnapshotUpdates: p,
|
|
756
787
|
handleGridReady: N,
|
|
757
788
|
dispose: Y,
|
|
758
789
|
getColumnState: v,
|
|
759
|
-
getState:
|
|
760
|
-
migrateState:
|
|
761
|
-
applyColumnState:
|
|
762
|
-
applyState:
|
|
790
|
+
getState: te,
|
|
791
|
+
migrateState: q,
|
|
792
|
+
applyColumnState: oe,
|
|
793
|
+
applyState: H,
|
|
763
794
|
exportPivotLayout: ne,
|
|
764
|
-
exportPivotInterop:
|
|
765
|
-
importPivotLayout:
|
|
766
|
-
expandAllGroups:
|
|
767
|
-
collapseAllGroups:
|
|
795
|
+
exportPivotInterop: re,
|
|
796
|
+
importPivotLayout: J,
|
|
797
|
+
expandAllGroups: le,
|
|
798
|
+
collapseAllGroups: _
|
|
768
799
|
};
|
|
769
800
|
}
|
|
770
|
-
function
|
|
801
|
+
function Zt(e) {
|
|
771
802
|
if (!Number.isFinite(e))
|
|
772
803
|
return;
|
|
773
804
|
const t = Math.trunc(e);
|
|
774
805
|
return t > 0 ? t : void 0;
|
|
775
806
|
}
|
|
776
|
-
function
|
|
807
|
+
function eo(e) {
|
|
777
808
|
return e === !1 ? !1 : e === "window" ? "window" : "grid";
|
|
778
809
|
}
|
|
779
|
-
function
|
|
810
|
+
function to(e) {
|
|
780
811
|
return e === !0 || e === "toolbar" ? "toolbar" : e === "external-only" ? "external-only" : !1;
|
|
781
812
|
}
|
|
782
|
-
function
|
|
813
|
+
function oo() {
|
|
783
814
|
return {
|
|
784
815
|
canUndo: () => !1,
|
|
785
816
|
canRedo: () => !1,
|
|
786
817
|
runHistoryAction: async () => null
|
|
787
818
|
};
|
|
788
819
|
}
|
|
789
|
-
function
|
|
820
|
+
function no(e) {
|
|
790
821
|
if (e === !1)
|
|
791
822
|
return {
|
|
792
823
|
enabled: !1,
|
|
@@ -797,9 +828,9 @@ function $t(e) {
|
|
|
797
828
|
const t = typeof e == "object" && e !== null ? e : {};
|
|
798
829
|
return e === void 0 || e === !0 || t.enabled !== !1 ? {
|
|
799
830
|
enabled: !0,
|
|
800
|
-
depth:
|
|
801
|
-
shortcuts:
|
|
802
|
-
controls:
|
|
831
|
+
depth: Zt(t.depth),
|
|
832
|
+
shortcuts: eo(t.shortcuts),
|
|
833
|
+
controls: to(t.controls),
|
|
803
834
|
adapter: t.adapter
|
|
804
835
|
} : {
|
|
805
836
|
enabled: !1,
|
|
@@ -808,54 +839,54 @@ function $t(e) {
|
|
|
808
839
|
controls: !1
|
|
809
840
|
};
|
|
810
841
|
}
|
|
811
|
-
function
|
|
842
|
+
function Oo() {
|
|
812
843
|
return (e) => e;
|
|
813
844
|
}
|
|
814
|
-
function
|
|
845
|
+
function Ao() {
|
|
815
846
|
return (e) => e;
|
|
816
847
|
}
|
|
817
|
-
function
|
|
848
|
+
function Do() {
|
|
818
849
|
return (e) => e;
|
|
819
850
|
}
|
|
820
|
-
function
|
|
851
|
+
function Bo() {
|
|
821
852
|
return (e) => e;
|
|
822
853
|
}
|
|
823
|
-
function
|
|
854
|
+
function Fo() {
|
|
824
855
|
return (e) => e;
|
|
825
856
|
}
|
|
826
|
-
function
|
|
857
|
+
function ro(e, t) {
|
|
827
858
|
if (!t || typeof e != "object" || e === null)
|
|
828
859
|
return;
|
|
829
860
|
const l = t.split(".").filter(Boolean);
|
|
830
861
|
let o = e;
|
|
831
|
-
for (const
|
|
862
|
+
for (const i of l) {
|
|
832
863
|
if (Array.isArray(o)) {
|
|
833
|
-
const a = Number(
|
|
864
|
+
const a = Number(i);
|
|
834
865
|
if (!Number.isInteger(a) || a < 0 || a >= o.length)
|
|
835
866
|
return;
|
|
836
867
|
o = o[a];
|
|
837
868
|
continue;
|
|
838
869
|
}
|
|
839
|
-
if (typeof o != "object" || o === null || !(
|
|
870
|
+
if (typeof o != "object" || o === null || !(i in o))
|
|
840
871
|
return;
|
|
841
|
-
o = o[
|
|
872
|
+
o = o[i];
|
|
842
873
|
}
|
|
843
874
|
return o;
|
|
844
875
|
}
|
|
845
|
-
function
|
|
876
|
+
function lo(e, t) {
|
|
846
877
|
const l = /* @__PURE__ */ new Map();
|
|
847
878
|
for (const o of e ?? []) {
|
|
848
|
-
const
|
|
849
|
-
|
|
879
|
+
const i = String(o.key ?? "").trim();
|
|
880
|
+
i && l.set(i, o);
|
|
850
881
|
}
|
|
851
882
|
if (!(l.size === 0 && typeof t != "function"))
|
|
852
|
-
return (o,
|
|
883
|
+
return (o, i) => {
|
|
853
884
|
if (typeof t == "function") {
|
|
854
|
-
const R = t(o,
|
|
885
|
+
const R = t(o, i);
|
|
855
886
|
if (typeof R < "u")
|
|
856
887
|
return R;
|
|
857
888
|
}
|
|
858
|
-
const a = l.get(String(
|
|
889
|
+
const a = l.get(String(i ?? "").trim());
|
|
859
890
|
if (!a)
|
|
860
891
|
return;
|
|
861
892
|
const y = o.data;
|
|
@@ -863,14 +894,14 @@ function Xt(e, t) {
|
|
|
863
894
|
return a.valueGetter(y);
|
|
864
895
|
if (typeof a.accessor == "function")
|
|
865
896
|
return a.accessor(y);
|
|
866
|
-
const
|
|
867
|
-
if (!
|
|
897
|
+
const d = typeof a.field == "string" ? a.field.trim() : "";
|
|
898
|
+
if (!d)
|
|
868
899
|
return;
|
|
869
|
-
const S = y[
|
|
870
|
-
return typeof S < "u" ? S :
|
|
900
|
+
const S = y[d];
|
|
901
|
+
return typeof S < "u" ? S : ro(y, d);
|
|
871
902
|
};
|
|
872
903
|
}
|
|
873
|
-
function
|
|
904
|
+
function ao() {
|
|
874
905
|
return {
|
|
875
906
|
name: "selection",
|
|
876
907
|
getRowSelectionSnapshot: () => null,
|
|
@@ -893,15 +924,15 @@ function Zt() {
|
|
|
893
924
|
}
|
|
894
925
|
};
|
|
895
926
|
}
|
|
896
|
-
function
|
|
927
|
+
function $(e, t) {
|
|
897
928
|
const l = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
|
|
898
929
|
if (l.length !== 0)
|
|
899
930
|
return async (o) => {
|
|
900
|
-
for (const
|
|
901
|
-
await
|
|
931
|
+
for (const i of l)
|
|
932
|
+
await i(o);
|
|
902
933
|
};
|
|
903
934
|
}
|
|
904
|
-
function
|
|
935
|
+
function io(e) {
|
|
905
936
|
const {
|
|
906
937
|
userSelectionService: t,
|
|
907
938
|
cellSelectionService: l,
|
|
@@ -909,10 +940,10 @@ function eo(e) {
|
|
|
909
940
|
} = e;
|
|
910
941
|
return {
|
|
911
942
|
name: "selection",
|
|
912
|
-
init:
|
|
913
|
-
start:
|
|
914
|
-
stop:
|
|
915
|
-
dispose:
|
|
943
|
+
init: $("init", [t, l, o]),
|
|
944
|
+
start: $("start", [t, l, o]),
|
|
945
|
+
stop: $("stop", [t, l, o]),
|
|
946
|
+
dispose: $("dispose", [t, l, o]),
|
|
916
947
|
getSelectionSnapshot: l.getSelectionSnapshot,
|
|
917
948
|
setSelectionSnapshot: l.setSelectionSnapshot,
|
|
918
949
|
clearSelection: l.clearSelection,
|
|
@@ -929,7 +960,7 @@ function eo(e) {
|
|
|
929
960
|
clearSelectedRows: o.clearSelectedRows
|
|
930
961
|
};
|
|
931
962
|
}
|
|
932
|
-
function
|
|
963
|
+
function uo(e, t) {
|
|
933
964
|
if (e?.focusedRow !== t?.focusedRow || (e?.mode ?? "explicit") !== (t?.mode ?? "explicit"))
|
|
934
965
|
return !1;
|
|
935
966
|
const l = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
|
|
@@ -938,38 +969,38 @@ function to(e, t) {
|
|
|
938
969
|
for (let y = 0; y < l.length; y += 1)
|
|
939
970
|
if (l[y] !== o[y])
|
|
940
971
|
return !1;
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
972
|
+
const i = e?.excludedRows ?? [], a = t?.excludedRows ?? [];
|
|
973
|
+
if (i.length !== a.length)
|
|
943
974
|
return !1;
|
|
944
|
-
for (let y = 0; y <
|
|
945
|
-
if (
|
|
975
|
+
for (let y = 0; y < i.length; y += 1)
|
|
976
|
+
if (i[y] !== a[y])
|
|
946
977
|
return !1;
|
|
947
978
|
return !0;
|
|
948
979
|
}
|
|
949
|
-
function
|
|
980
|
+
function so(e, t) {
|
|
950
981
|
if (e === t)
|
|
951
982
|
return !0;
|
|
952
983
|
const l = Object.entries(e ?? {}), o = Object.entries(t ?? {});
|
|
953
984
|
if (l.length !== o.length)
|
|
954
985
|
return !1;
|
|
955
|
-
for (const [
|
|
956
|
-
if (!Object.is(a, t?.[
|
|
986
|
+
for (const [i, a] of l)
|
|
987
|
+
if (!Object.is(a, t?.[i]))
|
|
957
988
|
return !1;
|
|
958
989
|
return !0;
|
|
959
990
|
}
|
|
960
|
-
function
|
|
991
|
+
function co(e, t) {
|
|
961
992
|
if (e === t)
|
|
962
993
|
return !0;
|
|
963
994
|
if (e.length !== t.length)
|
|
964
995
|
return !1;
|
|
965
996
|
for (let l = 0; l < e.length; l += 1) {
|
|
966
|
-
const o = e[l],
|
|
967
|
-
if (!o || !
|
|
997
|
+
const o = e[l], i = t[l];
|
|
998
|
+
if (!o || !i || o.key !== i.key || o.component !== i.component || !so(o.props, i.props))
|
|
968
999
|
return !1;
|
|
969
1000
|
}
|
|
970
1001
|
return !0;
|
|
971
1002
|
}
|
|
972
|
-
const
|
|
1003
|
+
const fo = {
|
|
973
1004
|
rows: {
|
|
974
1005
|
type: Array,
|
|
975
1006
|
default: () => []
|
|
@@ -1050,6 +1081,10 @@ const ro = {
|
|
|
1050
1081
|
type: [Boolean, Object],
|
|
1051
1082
|
default: void 0
|
|
1052
1083
|
},
|
|
1084
|
+
quickFilter: {
|
|
1085
|
+
type: [Boolean, Object],
|
|
1086
|
+
default: void 0
|
|
1087
|
+
},
|
|
1053
1088
|
findReplace: {
|
|
1054
1089
|
type: [Boolean, Object],
|
|
1055
1090
|
default: void 0
|
|
@@ -1246,10 +1281,10 @@ const ro = {
|
|
|
1246
1281
|
type: Function,
|
|
1247
1282
|
default: void 0
|
|
1248
1283
|
}
|
|
1249
|
-
},
|
|
1284
|
+
}, Ee = Ie({
|
|
1250
1285
|
name: "DataGrid",
|
|
1251
1286
|
inheritAttrs: !1,
|
|
1252
|
-
props:
|
|
1287
|
+
props: fo,
|
|
1253
1288
|
emits: {
|
|
1254
1289
|
"cell-change": (e) => !0,
|
|
1255
1290
|
"cell-edit": (e) => !0,
|
|
@@ -1268,34 +1303,34 @@ const ro = {
|
|
|
1268
1303
|
"toolbar-modules-change": (e) => !0,
|
|
1269
1304
|
ready: (e) => !0
|
|
1270
1305
|
},
|
|
1271
|
-
setup(e, { attrs: t, slots: l, emit: o, expose:
|
|
1272
|
-
const a = x(null), y =
|
|
1273
|
-
let
|
|
1274
|
-
const b = x(e.viewMode === "gantt" ? "gantt" : "table"), j = x(e.state ?? null),
|
|
1306
|
+
setup(e, { attrs: t, slots: l, emit: o, expose: i }) {
|
|
1307
|
+
const a = x(null), y = oo(), d = x(null), S = x(null), R = x([]);
|
|
1308
|
+
let B = null, C = !1;
|
|
1309
|
+
const b = x(e.viewMode === "gantt" ? "gantt" : "table"), j = x(e.state ?? null), P = f(() => no(e.history)), g = f(() => ct(e.chrome)), v = f(() => jt(e.renderMode, e.pagination)), p = f(() => Lt(
|
|
1275
1310
|
e.pagination,
|
|
1276
1311
|
v.value,
|
|
1277
1312
|
e.pageSize,
|
|
1278
1313
|
e.currentPage
|
|
1279
|
-
)), M = f(() =>
|
|
1314
|
+
)), M = f(() => ft(e.columnMenu)), Z = f(() => mt(e.cellMenu)), ee = f(() => yt(e.rowIndexMenu)), z = f(() => vt(e.columnLayout)), E = f(() => gt(e.columnReorder)), U = f(() => Jt(e.aggregations)), K = f(() => bt(e.advancedFilter)), k = f(() => zt(e.quickFilter)), T = f(() => Et(e.findReplace)), V = f(() => Vt(e.gridLines)), L = f(() => xt(e.groupBy)), G = f(() => e.state ?? j.value), W = f(() => e.sortModel !== void 0 ? e.sortModel : G.value?.rows?.snapshot?.sortModel), N = f(() => e.filterModel !== void 0 ? e.filterModel : ut(G.value?.rows?.snapshot?.filterModel ?? null)), te = f(() => e.groupBy !== void 0 ? L.value ?? null : G.value?.rows?.snapshot?.groupBy ?? null), q = f(() => e.pivotModel !== void 0 ? e.pivotModel : G.value?.rows?.snapshot?.pivotModel ?? null), oe = f(() => Yt(e.virtualization, v.value)), H = f(() => Wt(e.layoutMode, e.minRows, e.maxRows)), ne = f(() => Mt(e.placeholderRows)), re = f(() => pt(e.rowReorder)), J = f(() => {
|
|
1280
1315
|
const r = e.clientRowModelOptions?.readFilterCell;
|
|
1281
|
-
return
|
|
1316
|
+
return lo(
|
|
1282
1317
|
e.columns,
|
|
1283
1318
|
e.readFilterCell ?? r
|
|
1284
1319
|
);
|
|
1285
|
-
}),
|
|
1320
|
+
}), le = f(() => {
|
|
1286
1321
|
const r = e.readFilterCellStyle ?? e.clientRowModelOptions?.readFilterCellStyle;
|
|
1287
1322
|
return !J.value && !r ? e.clientRowModelOptions : {
|
|
1288
1323
|
...e.clientRowModelOptions ?? {},
|
|
1289
1324
|
readFilterCell: J.value,
|
|
1290
1325
|
readFilterCellStyle: r
|
|
1291
1326
|
};
|
|
1292
|
-
}),
|
|
1327
|
+
}), _ = f(() => wt({
|
|
1293
1328
|
columns: e.columns,
|
|
1294
|
-
clientRowModelOptions:
|
|
1329
|
+
clientRowModelOptions: le.value,
|
|
1295
1330
|
computedFields: e.computedFields,
|
|
1296
1331
|
formulas: e.formulas,
|
|
1297
1332
|
formulaFunctions: e.formulaFunctions
|
|
1298
|
-
})),
|
|
1333
|
+
})), Y = f(() => St(e.columns)), n = {
|
|
1299
1334
|
get state() {
|
|
1300
1335
|
return e.state;
|
|
1301
1336
|
},
|
|
@@ -1324,7 +1359,7 @@ const ro = {
|
|
|
1324
1359
|
return e.filterModel;
|
|
1325
1360
|
},
|
|
1326
1361
|
get groupBy() {
|
|
1327
|
-
return
|
|
1362
|
+
return L.value;
|
|
1328
1363
|
},
|
|
1329
1364
|
get aggregationModel() {
|
|
1330
1365
|
return e.aggregationModel;
|
|
@@ -1341,62 +1376,62 @@ const ro = {
|
|
|
1341
1376
|
get columns() {
|
|
1342
1377
|
return e.columns;
|
|
1343
1378
|
}
|
|
1344
|
-
},
|
|
1379
|
+
}, s = f(() => q.value ? "pivot" : _.value && "initialTreeData" in _.value ? "tree" : "base"), u = f(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), m = f(() => {
|
|
1345
1380
|
const r = a.value?.runtime;
|
|
1346
1381
|
if (!r)
|
|
1347
1382
|
return 0;
|
|
1348
|
-
const c =
|
|
1383
|
+
const c = Oe(r.rowPartition);
|
|
1349
1384
|
return Math.max(0, c.bodyRowCount + c.pinnedBottomRows.length);
|
|
1350
|
-
}),
|
|
1385
|
+
}), A = (r) => {
|
|
1351
1386
|
const c = a.value?.runtime;
|
|
1352
1387
|
if (!c)
|
|
1353
1388
|
return null;
|
|
1354
|
-
const
|
|
1389
|
+
const F = Oe(c.rowPartition), ce = F.bodyRowCount;
|
|
1355
1390
|
if (r < ce)
|
|
1356
1391
|
return c.getBodyRowAtIndex(r);
|
|
1357
|
-
const
|
|
1358
|
-
return
|
|
1359
|
-
},
|
|
1360
|
-
mode: f(() =>
|
|
1392
|
+
const nt = r - ce;
|
|
1393
|
+
return F.pinnedBottomRows[nt] ?? null;
|
|
1394
|
+
}, O = {
|
|
1395
|
+
mode: f(() => s.value),
|
|
1361
1396
|
resolveRuntime: () => a.value,
|
|
1362
|
-
visibleColumns:
|
|
1363
|
-
totalRows:
|
|
1397
|
+
visibleColumns: u,
|
|
1398
|
+
totalRows: m,
|
|
1364
1399
|
showRowSelection: f(() => e.rowSelection),
|
|
1365
1400
|
readSelectionCell: e.readSelectionCell,
|
|
1366
|
-
resolveSelectionRowAtIndex:
|
|
1401
|
+
resolveSelectionRowAtIndex: A
|
|
1367
1402
|
}, {
|
|
1368
|
-
selectionSnapshot:
|
|
1369
|
-
selectionAnchor:
|
|
1370
|
-
syncSelectionSnapshotFromRuntime:
|
|
1371
|
-
selectionService:
|
|
1372
|
-
selectionAggregatesLabel:
|
|
1373
|
-
} =
|
|
1403
|
+
selectionSnapshot: ke,
|
|
1404
|
+
selectionAnchor: Te,
|
|
1405
|
+
syncSelectionSnapshotFromRuntime: Ve,
|
|
1406
|
+
selectionService: We,
|
|
1407
|
+
selectionAggregatesLabel: _e
|
|
1408
|
+
} = st(O), {
|
|
1374
1409
|
rowSelectionSnapshot: ae,
|
|
1375
1410
|
syncRowSelectionSnapshotFromRuntime: ie,
|
|
1376
|
-
reconcileRowSelectionFromRuntime:
|
|
1377
|
-
selectionService:
|
|
1378
|
-
} =
|
|
1411
|
+
reconcileRowSelectionFromRuntime: Ue,
|
|
1412
|
+
selectionService: he
|
|
1413
|
+
} = dt({
|
|
1379
1414
|
resolveRuntime: () => a.value
|
|
1380
|
-
}),
|
|
1415
|
+
}), Ne = f(() => e.rowSelection ? he : ao()), qe = f(() => ({
|
|
1381
1416
|
...e.services ?? {},
|
|
1382
|
-
selection:
|
|
1417
|
+
selection: io({
|
|
1383
1418
|
userSelectionService: e.services?.selection,
|
|
1384
|
-
cellSelectionService:
|
|
1385
|
-
rowSelectionService:
|
|
1419
|
+
cellSelectionService: We,
|
|
1420
|
+
rowSelectionService: Ne.value
|
|
1386
1421
|
})
|
|
1387
1422
|
})), {
|
|
1388
|
-
dataGridInstanceKey:
|
|
1423
|
+
dataGridInstanceKey: Je,
|
|
1389
1424
|
resolvedRowModel: ue
|
|
1390
|
-
} =
|
|
1391
|
-
rows:
|
|
1392
|
-
rowModel:
|
|
1393
|
-
clientRowModelOptions:
|
|
1425
|
+
} = ht({
|
|
1426
|
+
rows: Ae(e, "rows"),
|
|
1427
|
+
rowModel: Ae(e, "rowModel"),
|
|
1428
|
+
clientRowModelOptions: _,
|
|
1394
1429
|
onOwnedRowModelRecreated: () => {
|
|
1395
1430
|
w.dispose();
|
|
1396
1431
|
}
|
|
1397
|
-
}), w =
|
|
1432
|
+
}), w = Xt({
|
|
1398
1433
|
gridRef: a,
|
|
1399
|
-
props:
|
|
1434
|
+
props: n,
|
|
1400
1435
|
emit: {
|
|
1401
1436
|
columnState: (r) => o("update:columnState", r),
|
|
1402
1437
|
columnOrder: (r) => o("update:columnOrder", r),
|
|
@@ -1412,21 +1447,21 @@ const ro = {
|
|
|
1412
1447
|
rowModel: ue.value
|
|
1413
1448
|
})
|
|
1414
1449
|
}
|
|
1415
|
-
}),
|
|
1416
|
-
|
|
1450
|
+
}), Ye = (r) => {
|
|
1451
|
+
Ue(), o("cell-change", r), w.emitSnapshotUpdates();
|
|
1417
1452
|
}, se = (r) => {
|
|
1418
1453
|
o("cell-edit", r);
|
|
1419
|
-
},
|
|
1454
|
+
}, Qe = (r) => {
|
|
1420
1455
|
o("selection-change", r), w.emitSnapshotUpdates();
|
|
1421
|
-
},
|
|
1456
|
+
}, $e = (r) => {
|
|
1422
1457
|
o("row-selection-change", r);
|
|
1423
|
-
},
|
|
1458
|
+
}, Re = () => {
|
|
1424
1459
|
w.emitSnapshotUpdates();
|
|
1425
1460
|
};
|
|
1426
1461
|
h(
|
|
1427
1462
|
ae,
|
|
1428
1463
|
(r) => {
|
|
1429
|
-
o("row-select", r), o("update:rowSelectionState", r),
|
|
1464
|
+
o("row-select", r), o("update:rowSelectionState", r), Re();
|
|
1430
1465
|
},
|
|
1431
1466
|
{ deep: !0 }
|
|
1432
1467
|
), h(
|
|
@@ -1434,14 +1469,14 @@ const ro = {
|
|
|
1434
1469
|
([r, c]) => {
|
|
1435
1470
|
if (r) {
|
|
1436
1471
|
if (c !== void 0) {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1472
|
+
const F = a.value?.api.rowSelection;
|
|
1473
|
+
uo(ae.value, c) || (c ? F?.setSnapshot(c) : F?.clear(), ie());
|
|
1439
1474
|
return;
|
|
1440
1475
|
}
|
|
1441
1476
|
ie();
|
|
1442
1477
|
return;
|
|
1443
1478
|
}
|
|
1444
|
-
|
|
1479
|
+
he.clearRowSelection?.();
|
|
1445
1480
|
},
|
|
1446
1481
|
{ immediate: !0 }
|
|
1447
1482
|
), h(
|
|
@@ -1451,47 +1486,47 @@ const ro = {
|
|
|
1451
1486
|
},
|
|
1452
1487
|
{ immediate: !0 }
|
|
1453
1488
|
);
|
|
1454
|
-
const
|
|
1489
|
+
const be = (r) => {
|
|
1455
1490
|
const c = r === "gantt" ? "gantt" : "table";
|
|
1456
1491
|
b.value = c, o("update:viewMode", c);
|
|
1457
|
-
},
|
|
1458
|
-
|
|
1459
|
-
},
|
|
1492
|
+
}, Xe = (r) => {
|
|
1493
|
+
d.value = r;
|
|
1494
|
+
}, Me = (r) => {
|
|
1460
1495
|
S.value = r;
|
|
1461
|
-
},
|
|
1462
|
-
|
|
1496
|
+
}, Ze = (r) => {
|
|
1497
|
+
co(R.value, r) || (R.value = r, B = r, !C && (C = !0, Promise.resolve().then(() => {
|
|
1463
1498
|
C = !1;
|
|
1464
|
-
const c =
|
|
1465
|
-
|
|
1499
|
+
const c = B;
|
|
1500
|
+
B = null, c && o("toolbar-modules-change", c);
|
|
1466
1501
|
})));
|
|
1467
1502
|
}, de = f(() => {
|
|
1468
|
-
const r =
|
|
1469
|
-
return !
|
|
1503
|
+
const r = P.value.adapter;
|
|
1504
|
+
return !P.value.enabled || !r ? y : {
|
|
1470
1505
|
canUndo: () => r.canUndo(),
|
|
1471
1506
|
canRedo: () => r.canRedo(),
|
|
1472
1507
|
runHistoryAction: (c) => r.runHistoryAction(c)
|
|
1473
1508
|
};
|
|
1474
|
-
}),
|
|
1475
|
-
canUndo: () => (
|
|
1476
|
-
canRedo: () => (
|
|
1477
|
-
runHistoryAction: (r) => (
|
|
1478
|
-
},
|
|
1509
|
+
}), Ce = {
|
|
1510
|
+
canUndo: () => (d.value ?? de.value).canUndo(),
|
|
1511
|
+
canRedo: () => (d.value ?? de.value).canRedo(),
|
|
1512
|
+
runHistoryAction: (r) => (d.value ?? de.value).runHistoryAction(r)
|
|
1513
|
+
}, et = () => {
|
|
1479
1514
|
const r = w.getState();
|
|
1480
1515
|
return r ? X({
|
|
1481
1516
|
state: r,
|
|
1482
1517
|
viewMode: b.value
|
|
1483
1518
|
}) : null;
|
|
1484
|
-
},
|
|
1485
|
-
const
|
|
1486
|
-
return w.applyState(
|
|
1519
|
+
}, tt = (r, c) => ze(r, w.migrateState, c), ot = (r, c) => {
|
|
1520
|
+
const F = X(r);
|
|
1521
|
+
return w.applyState(F.state, c) ? (F.viewMode && be(F.viewMode), !0) : !1;
|
|
1487
1522
|
};
|
|
1488
|
-
return
|
|
1489
|
-
w.dispose(),
|
|
1490
|
-
}),
|
|
1523
|
+
return Se(() => {
|
|
1524
|
+
w.dispose(), Me(null);
|
|
1525
|
+
}), i({
|
|
1491
1526
|
grid: a,
|
|
1492
1527
|
rowModel: ue,
|
|
1493
|
-
history:
|
|
1494
|
-
getHistory: () =>
|
|
1528
|
+
history: Ce,
|
|
1529
|
+
getHistory: () => Ce,
|
|
1495
1530
|
toolbarModules: R,
|
|
1496
1531
|
getToolbarModules: () => R.value,
|
|
1497
1532
|
getApi: () => a.value?.api ?? null,
|
|
@@ -1502,7 +1537,7 @@ const ro = {
|
|
|
1502
1537
|
},
|
|
1503
1538
|
getColumnState: () => w.getColumnState(),
|
|
1504
1539
|
getColumnSnapshot: () => a.value?.api.columns.getSnapshot() ?? null,
|
|
1505
|
-
getSelectionAggregatesLabel: () =>
|
|
1540
|
+
getSelectionAggregatesLabel: () => _e.value,
|
|
1506
1541
|
runStructuralRowAction: (r, c) => S.value?.(r, c) ?? Promise.resolve(!1),
|
|
1507
1542
|
getSelectionSummary: () => {
|
|
1508
1543
|
const r = a.value?.api.selection.summarize;
|
|
@@ -1514,10 +1549,10 @@ const ro = {
|
|
|
1514
1549
|
return r(c);
|
|
1515
1550
|
},
|
|
1516
1551
|
getView: () => b.value,
|
|
1517
|
-
setView:
|
|
1518
|
-
getSavedView:
|
|
1519
|
-
migrateSavedView:
|
|
1520
|
-
applySavedView:
|
|
1552
|
+
setView: be,
|
|
1553
|
+
getSavedView: et,
|
|
1554
|
+
migrateSavedView: tt,
|
|
1555
|
+
applySavedView: ot,
|
|
1521
1556
|
applyColumnState: w.applyColumnState,
|
|
1522
1557
|
getState: w.getState,
|
|
1523
1558
|
migrateState: w.migrateState,
|
|
@@ -1535,22 +1570,22 @@ const ro = {
|
|
|
1535
1570
|
insertColumnAfter: (r, c) => a.value?.api.columns.insertAfter(r, c) ?? !1
|
|
1536
1571
|
}), () => {
|
|
1537
1572
|
const r = {
|
|
1538
|
-
mode:
|
|
1573
|
+
mode: s.value,
|
|
1539
1574
|
rows: e.rows,
|
|
1540
1575
|
runtime: a.value?.runtime ?? null,
|
|
1541
1576
|
runtimeRowModel: a.value?.rowModel ?? null,
|
|
1542
|
-
selectionSnapshot:
|
|
1543
|
-
selectionAnchor:
|
|
1577
|
+
selectionSnapshot: ke,
|
|
1578
|
+
selectionAnchor: Te,
|
|
1544
1579
|
rowSelectionSnapshot: ae,
|
|
1545
|
-
syncSelectionSnapshotFromRuntime:
|
|
1580
|
+
syncSelectionSnapshotFromRuntime: Ve,
|
|
1546
1581
|
syncRowSelectionSnapshotFromRuntime: ie,
|
|
1547
|
-
flushRowSelectionSnapshotUpdates:
|
|
1548
|
-
sortModel:
|
|
1549
|
-
filterModel:
|
|
1550
|
-
groupBy:
|
|
1582
|
+
flushRowSelectionSnapshotUpdates: Re,
|
|
1583
|
+
sortModel: W.value,
|
|
1584
|
+
filterModel: N.value,
|
|
1585
|
+
groupBy: te.value,
|
|
1551
1586
|
pivotModel: q.value,
|
|
1552
1587
|
renderMode: v.value,
|
|
1553
|
-
virtualization:
|
|
1588
|
+
virtualization: oe.value,
|
|
1554
1589
|
columnMenu: M.value,
|
|
1555
1590
|
cellMenu: Z.value,
|
|
1556
1591
|
rowIndexMenu: ee.value,
|
|
@@ -1558,14 +1593,15 @@ const ro = {
|
|
|
1558
1593
|
columnReorder: E.value,
|
|
1559
1594
|
aggregations: U.value,
|
|
1560
1595
|
advancedFilter: K.value,
|
|
1561
|
-
|
|
1562
|
-
|
|
1596
|
+
quickFilter: k.value,
|
|
1597
|
+
findReplace: T.value,
|
|
1598
|
+
gridLines: V.value,
|
|
1563
1599
|
rowHeightMode: e.rowHeightMode,
|
|
1564
1600
|
baseRowHeight: e.baseRowHeight,
|
|
1565
|
-
layoutMode:
|
|
1566
|
-
minRows:
|
|
1567
|
-
maxRows:
|
|
1568
|
-
placeholderRows:
|
|
1601
|
+
layoutMode: H.value.layoutMode,
|
|
1602
|
+
minRows: H.value.minRows,
|
|
1603
|
+
maxRows: H.value.maxRows,
|
|
1604
|
+
placeholderRows: ne.value,
|
|
1569
1605
|
fillHandle: e.fillHandle,
|
|
1570
1606
|
rangeMove: e.rangeMove,
|
|
1571
1607
|
rowHover: e.rowHover,
|
|
@@ -1576,39 +1612,39 @@ const ro = {
|
|
|
1576
1612
|
isCellEditable: e.isCellEditable,
|
|
1577
1613
|
showRowIndex: e.showRowIndex,
|
|
1578
1614
|
rowSelection: e.rowSelection,
|
|
1579
|
-
rowReorder:
|
|
1615
|
+
rowReorder: re.value,
|
|
1580
1616
|
viewMode: b.value,
|
|
1581
1617
|
gantt: e.gantt,
|
|
1582
|
-
history:
|
|
1618
|
+
history: P.value,
|
|
1583
1619
|
chrome: g.value,
|
|
1584
|
-
registerHistoryController:
|
|
1585
|
-
registerStructuralRowActionRunner:
|
|
1586
|
-
reportToolbarModules:
|
|
1620
|
+
registerHistoryController: Xe,
|
|
1621
|
+
registerStructuralRowActionRunner: Me,
|
|
1622
|
+
reportToolbarModules: Ze,
|
|
1587
1623
|
toolbarModules: e.toolbarModules,
|
|
1588
1624
|
customOverlays: e.customOverlays,
|
|
1589
1625
|
runStructuralRowAction: e.runStructuralRowAction
|
|
1590
1626
|
};
|
|
1591
1627
|
return ge(
|
|
1592
|
-
|
|
1628
|
+
Qt,
|
|
1593
1629
|
{
|
|
1594
1630
|
...t,
|
|
1595
1631
|
ref: a,
|
|
1596
|
-
key:
|
|
1632
|
+
key: Je.value,
|
|
1597
1633
|
rows: e.rows,
|
|
1598
1634
|
rowModel: ue.value,
|
|
1599
|
-
columns:
|
|
1635
|
+
columns: Y.value,
|
|
1600
1636
|
theme: e.theme,
|
|
1601
|
-
layoutMode:
|
|
1637
|
+
layoutMode: H.value.layoutMode,
|
|
1602
1638
|
renderMode: v.value,
|
|
1603
1639
|
pagination: p.value,
|
|
1604
1640
|
plugins: e.plugins,
|
|
1605
|
-
services:
|
|
1641
|
+
services: qe.value,
|
|
1606
1642
|
startupOrder: e.startupOrder,
|
|
1607
1643
|
autoStart: e.autoStart,
|
|
1608
|
-
onCellChange:
|
|
1644
|
+
onCellChange: Ye,
|
|
1609
1645
|
onCellEdit: se,
|
|
1610
|
-
onSelectionChange:
|
|
1611
|
-
onRowSelectionChange:
|
|
1646
|
+
onSelectionChange: Qe,
|
|
1647
|
+
onRowSelectionChange: $e
|
|
1612
1648
|
},
|
|
1613
1649
|
l.default ? {
|
|
1614
1650
|
default: (c) => l.default?.({
|
|
@@ -1625,7 +1661,7 @@ const ro = {
|
|
|
1625
1661
|
}
|
|
1626
1662
|
})
|
|
1627
1663
|
} : {
|
|
1628
|
-
default: (c) => ge(
|
|
1664
|
+
default: (c) => ge(Rt, {
|
|
1629
1665
|
...r,
|
|
1630
1666
|
runtime: c.runtime,
|
|
1631
1667
|
runtimeRowModel: c.rowModel,
|
|
@@ -1640,30 +1676,30 @@ const ro = {
|
|
|
1640
1676
|
};
|
|
1641
1677
|
}
|
|
1642
1678
|
});
|
|
1643
|
-
function
|
|
1679
|
+
function Po() {
|
|
1644
1680
|
return x(null);
|
|
1645
1681
|
}
|
|
1646
|
-
function
|
|
1647
|
-
return
|
|
1682
|
+
function Go() {
|
|
1683
|
+
return Ee;
|
|
1648
1684
|
}
|
|
1649
|
-
const
|
|
1685
|
+
const xo = Ee;
|
|
1650
1686
|
export {
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1687
|
+
xo as DataGrid,
|
|
1688
|
+
Io as DataGridModuleHost,
|
|
1689
|
+
Co as clearDataGridSavedViewInStorage,
|
|
1690
|
+
Ee as default,
|
|
1691
|
+
Bo as defineDataGridCellClassResolver,
|
|
1692
|
+
Fo as defineDataGridCellStyleResolver,
|
|
1693
|
+
Ko as defineDataGridColumns,
|
|
1694
|
+
Go as defineDataGridComponent,
|
|
1695
|
+
Ao as defineDataGridFilterCellReader,
|
|
1696
|
+
Do as defineDataGridFilterCellStyleReader,
|
|
1697
|
+
Oo as defineDataGridSelectionCellReader,
|
|
1698
|
+
Ro as defineDataGridStructuralRowActionHandler,
|
|
1699
|
+
ze as migrateDataGridSavedView,
|
|
1700
|
+
qt as parseDataGridSavedView,
|
|
1701
|
+
Mo as readDataGridSavedViewFromStorage,
|
|
1702
|
+
Nt as serializeDataGridSavedView,
|
|
1703
|
+
Po as useDataGridRef,
|
|
1704
|
+
bo as writeDataGridSavedViewToStorage
|
|
1669
1705
|
};
|