@affino/datagrid-vue-app 0.1.48 → 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 +67 -1
- package/dist/DataGrid.d.ts +14 -0
- package/dist/chunks/{DataGridGanttStageEntry-BpEn4dPx.js → DataGridGanttStageEntry-DQBFS3-m.js} +2670 -2564
- package/dist/chunks/DataGridQuickFilterInput-TYJI9vo6.js +60 -0
- package/dist/chunks/useDataGridAppRowModel-BCi5miT8.js +5090 -0
- 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 +2 -1
- package/dist/index.js +510 -468
- 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/overlays/dataGridColumnMenu.d.ts +22 -1
- package/dist/quick-filter.d.ts +2 -0
- package/dist/quick-filter.js +4 -0
- package/dist/stage/dataGridTableStageAutoSizeRows.d.ts +8 -0
- package/dist/stage/useDataGridTableStageRuntime.d.ts +4 -1
- package/package.json +8 -4
- package/dist/chunks/useDataGridAppRowModel-OUmmuuko.js +0 -4963
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
|
-
currentPage:
|
|
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
|
-
const a = o?.viewMode,
|
|
227
|
+
const a = o?.viewMode, y = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
|
|
197
228
|
return X({
|
|
198
|
-
state:
|
|
199
|
-
...
|
|
229
|
+
state: i,
|
|
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
|
-
|
|
333
|
-
let
|
|
334
|
-
const
|
|
363
|
+
rt(At, a);
|
|
364
|
+
let y = null;
|
|
365
|
+
const d = it({
|
|
335
366
|
rows: f(() => e.rows),
|
|
336
367
|
rowModel: e.rowModel,
|
|
337
368
|
columns: f(() => e.columns),
|
|
@@ -339,73 +370,73 @@ 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
|
-
const
|
|
356
|
-
|
|
357
|
-
pageSize: Math.max(1, Math.trunc(
|
|
358
|
-
currentPage: Math.max(0, Math.trunc(
|
|
386
|
+
const v = e.pagination ?? { pageSize: 100, currentPage: 0 };
|
|
387
|
+
d.api.rows.setPagination({
|
|
388
|
+
pageSize: Math.max(1, Math.trunc(v.pageSize)),
|
|
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
|
-
), typeof document < "u" && (
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
}),
|
|
407
|
+
), typeof document < "u" && (y = new MutationObserver(() => {
|
|
408
|
+
const v = a.value;
|
|
409
|
+
v && Be(v, e.theme);
|
|
410
|
+
}), y.observe(document.documentElement, {
|
|
380
411
|
attributes: !0,
|
|
381
412
|
attributeFilter: ["class", "data-theme"]
|
|
382
413
|
})), h(
|
|
383
414
|
[() => e.theme, a],
|
|
384
415
|
() => {
|
|
385
|
-
const
|
|
386
|
-
|
|
416
|
+
const v = a.value;
|
|
417
|
+
v && Be(v, e.theme);
|
|
387
418
|
},
|
|
388
419
|
{ immediate: !0, deep: !0 }
|
|
389
420
|
);
|
|
390
|
-
const C =
|
|
391
|
-
o("cell-change",
|
|
392
|
-
}), b =
|
|
393
|
-
o("selection-change",
|
|
394
|
-
}), j =
|
|
395
|
-
o("row-selection-change",
|
|
421
|
+
const C = d.api.events.on("rows:changed", (v) => {
|
|
422
|
+
o("cell-change", v);
|
|
423
|
+
}), b = d.api.events.on("selection:changed", (v) => {
|
|
424
|
+
o("selection-change", v);
|
|
425
|
+
}), j = d.api.events.on("row-selection:changed", (v) => {
|
|
426
|
+
o("row-selection-change", v);
|
|
396
427
|
});
|
|
397
|
-
|
|
398
|
-
C(), b(), j(),
|
|
428
|
+
Se(() => {
|
|
429
|
+
C(), b(), j(), y?.disconnect(), y = null;
|
|
399
430
|
});
|
|
400
|
-
const
|
|
401
|
-
const
|
|
431
|
+
const P = f(() => {
|
|
432
|
+
const v = d.virtualWindow.value;
|
|
402
433
|
return {
|
|
403
|
-
...
|
|
404
|
-
rowTotal:
|
|
405
|
-
colTotal:
|
|
434
|
+
...v ?? {},
|
|
435
|
+
rowTotal: v?.rowTotal ?? d.rowPartition.value.bodyRowCount,
|
|
436
|
+
colTotal: d.columnSnapshot.value.visibleColumns.length
|
|
406
437
|
};
|
|
407
|
-
}),
|
|
408
|
-
const
|
|
438
|
+
}), g = () => {
|
|
439
|
+
const v = () => {
|
|
409
440
|
const M = a.value?.querySelector(".grid-body-viewport");
|
|
410
441
|
if (!M)
|
|
411
442
|
return !1;
|
|
@@ -415,40 +446,40 @@ const _t = je({
|
|
|
415
446
|
M.focus();
|
|
416
447
|
}
|
|
417
448
|
return typeof document < "u" && document.activeElement === M;
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
if (!(
|
|
449
|
+
}, p = (M) => {
|
|
450
|
+
at(() => {
|
|
451
|
+
if (!(v() || M >= 3)) {
|
|
421
452
|
if (typeof window < "u") {
|
|
422
453
|
window.requestAnimationFrame(() => {
|
|
423
|
-
|
|
454
|
+
p(M + 1);
|
|
424
455
|
});
|
|
425
456
|
return;
|
|
426
457
|
}
|
|
427
|
-
|
|
458
|
+
p(M + 1);
|
|
428
459
|
}
|
|
429
460
|
});
|
|
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:
|
|
446
|
-
restoreFocus:
|
|
447
|
-
start:
|
|
448
|
-
stop:
|
|
476
|
+
virtualWindow: d.virtualWindow,
|
|
477
|
+
restoreFocus: g,
|
|
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,112 +514,112 @@ 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
|
-
},
|
|
507
|
-
const n =
|
|
537
|
+
}, g = () => P()?.api ?? null, v = () => {
|
|
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 =
|
|
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 = () => {
|
|
537
|
-
const n =
|
|
568
|
+
const n = g();
|
|
538
569
|
!n || e.props.sortModel === void 0 && e.props.filterModel === void 0 || n.rows.setSortAndFilterModel({
|
|
539
570
|
sortModel: e.props.sortModel ?? [],
|
|
540
571
|
filterModel: e.props.filterModel ?? null
|
|
541
572
|
});
|
|
542
573
|
}, Z = () => {
|
|
543
|
-
const n =
|
|
544
|
-
return n ? new Set(n.getSnapshot().columns.map((
|
|
574
|
+
const n = g()?.columns;
|
|
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,95 +627,95 @@ function Ut(e) {
|
|
|
596
627
|
columnPins: null
|
|
597
628
|
}), U(n.columnState);
|
|
598
629
|
}
|
|
599
|
-
},
|
|
600
|
-
const n =
|
|
630
|
+
}, k = () => {
|
|
631
|
+
const n = g();
|
|
601
632
|
!n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
|
|
602
|
-
},
|
|
603
|
-
const n =
|
|
633
|
+
}, T = () => {
|
|
634
|
+
const n = g();
|
|
604
635
|
!n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
|
|
605
|
-
},
|
|
606
|
-
const n =
|
|
636
|
+
}, V = () => {
|
|
637
|
+
const n = g();
|
|
607
638
|
!n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
|
|
608
|
-
},
|
|
609
|
-
const n =
|
|
639
|
+
}, L = () => {
|
|
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
|
-
},
|
|
647
|
-
const n =
|
|
677
|
+
}, G = () => {
|
|
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
|
-
},
|
|
660
|
-
const n =
|
|
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 = () => {
|
|
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 && (
|
|
665
|
-
|
|
694
|
+
const n = P();
|
|
695
|
+
n && (i = null, a = null, j(), t = n.rowModel.subscribe(() => {
|
|
696
|
+
p();
|
|
666
697
|
}), l = n.columnModel.subscribe(() => {
|
|
667
|
-
|
|
668
|
-
}),
|
|
669
|
-
},
|
|
698
|
+
p();
|
|
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) ? (
|
|
676
|
-
const
|
|
677
|
-
if (!
|
|
678
|
-
return b = { state: n, options:
|
|
679
|
-
const m =
|
|
680
|
-
return m ? E(m) ? (
|
|
681
|
-
}, ne = () =>
|
|
682
|
-
const
|
|
683
|
-
return
|
|
684
|
-
}, k = () => {
|
|
685
|
-
v()?.rows.expandAllGroups(), g();
|
|
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 = () => {
|
|
687
|
-
|
|
716
|
+
g()?.rows.expandAllGroups(), p();
|
|
717
|
+
}, _ = () => {
|
|
718
|
+
g()?.rows.collapseAllGroups(), p();
|
|
688
719
|
};
|
|
689
720
|
h(
|
|
690
721
|
() => e.gridRef.value,
|
|
@@ -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,80 +744,80 @@ 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(
|
|
720
751
|
() => [e.props.sortModel, e.props.filterModel],
|
|
721
752
|
() => {
|
|
722
|
-
M(),
|
|
753
|
+
M(), p();
|
|
723
754
|
},
|
|
724
755
|
{ deep: !0 }
|
|
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
|
-
emitSnapshotUpdates:
|
|
786
|
+
emitSnapshotUpdates: p,
|
|
756
787
|
handleGridReady: N,
|
|
757
788
|
dispose: Y,
|
|
758
|
-
getColumnState:
|
|
759
|
-
getState:
|
|
760
|
-
migrateState:
|
|
761
|
-
applyColumnState:
|
|
762
|
-
applyState:
|
|
789
|
+
getColumnState: v,
|
|
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,69 +839,69 @@ 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
|
-
const
|
|
892
|
+
const y = o.data;
|
|
862
893
|
if (typeof a.valueGetter == "function")
|
|
863
|
-
return a.valueGetter(
|
|
894
|
+
return a.valueGetter(y);
|
|
864
895
|
if (typeof a.accessor == "function")
|
|
865
|
-
return a.accessor(
|
|
866
|
-
const
|
|
867
|
-
if (!
|
|
896
|
+
return a.accessor(y);
|
|
897
|
+
const d = typeof a.field == "string" ? a.field.trim() : "";
|
|
898
|
+
if (!d)
|
|
868
899
|
return;
|
|
869
|
-
const S =
|
|
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,41 +960,47 @@ function eo(e) {
|
|
|
929
960
|
clearSelectedRows: o.clearSelectedRows
|
|
930
961
|
};
|
|
931
962
|
}
|
|
932
|
-
function
|
|
933
|
-
if (e?.focusedRow !== t?.focusedRow)
|
|
963
|
+
function uo(e, t) {
|
|
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 ?? [];
|
|
936
967
|
if (l.length !== o.length)
|
|
937
968
|
return !1;
|
|
938
|
-
for (let
|
|
939
|
-
if (l[
|
|
969
|
+
for (let y = 0; y < l.length; y += 1)
|
|
970
|
+
if (l[y] !== o[y])
|
|
971
|
+
return !1;
|
|
972
|
+
const i = e?.excludedRows ?? [], a = t?.excludedRows ?? [];
|
|
973
|
+
if (i.length !== a.length)
|
|
974
|
+
return !1;
|
|
975
|
+
for (let y = 0; y < i.length; y += 1)
|
|
976
|
+
if (i[y] !== a[y])
|
|
940
977
|
return !1;
|
|
941
978
|
return !0;
|
|
942
979
|
}
|
|
943
|
-
function
|
|
980
|
+
function so(e, t) {
|
|
944
981
|
if (e === t)
|
|
945
982
|
return !0;
|
|
946
983
|
const l = Object.entries(e ?? {}), o = Object.entries(t ?? {});
|
|
947
984
|
if (l.length !== o.length)
|
|
948
985
|
return !1;
|
|
949
|
-
for (const [
|
|
950
|
-
if (!Object.is(a, t?.[
|
|
986
|
+
for (const [i, a] of l)
|
|
987
|
+
if (!Object.is(a, t?.[i]))
|
|
951
988
|
return !1;
|
|
952
989
|
return !0;
|
|
953
990
|
}
|
|
954
|
-
function
|
|
991
|
+
function co(e, t) {
|
|
955
992
|
if (e === t)
|
|
956
993
|
return !0;
|
|
957
994
|
if (e.length !== t.length)
|
|
958
995
|
return !1;
|
|
959
996
|
for (let l = 0; l < e.length; l += 1) {
|
|
960
|
-
const o = e[l],
|
|
961
|
-
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))
|
|
962
999
|
return !1;
|
|
963
1000
|
}
|
|
964
1001
|
return !0;
|
|
965
1002
|
}
|
|
966
|
-
const
|
|
1003
|
+
const fo = {
|
|
967
1004
|
rows: {
|
|
968
1005
|
type: Array,
|
|
969
1006
|
default: () => []
|
|
@@ -1044,6 +1081,10 @@ const ro = {
|
|
|
1044
1081
|
type: [Boolean, Object],
|
|
1045
1082
|
default: void 0
|
|
1046
1083
|
},
|
|
1084
|
+
quickFilter: {
|
|
1085
|
+
type: [Boolean, Object],
|
|
1086
|
+
default: void 0
|
|
1087
|
+
},
|
|
1047
1088
|
findReplace: {
|
|
1048
1089
|
type: [Boolean, Object],
|
|
1049
1090
|
default: void 0
|
|
@@ -1240,10 +1281,10 @@ const ro = {
|
|
|
1240
1281
|
type: Function,
|
|
1241
1282
|
default: void 0
|
|
1242
1283
|
}
|
|
1243
|
-
},
|
|
1284
|
+
}, Ee = Ie({
|
|
1244
1285
|
name: "DataGrid",
|
|
1245
1286
|
inheritAttrs: !1,
|
|
1246
|
-
props:
|
|
1287
|
+
props: fo,
|
|
1247
1288
|
emits: {
|
|
1248
1289
|
"cell-change": (e) => !0,
|
|
1249
1290
|
"cell-edit": (e) => !0,
|
|
@@ -1262,34 +1303,34 @@ const ro = {
|
|
|
1262
1303
|
"toolbar-modules-change": (e) => !0,
|
|
1263
1304
|
ready: (e) => !0
|
|
1264
1305
|
},
|
|
1265
|
-
setup(e, { attrs: t, slots: l, emit: o, expose:
|
|
1266
|
-
const a = x(null),
|
|
1267
|
-
let
|
|
1268
|
-
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(
|
|
1269
1310
|
e.pagination,
|
|
1270
|
-
|
|
1311
|
+
v.value,
|
|
1271
1312
|
e.pageSize,
|
|
1272
1313
|
e.currentPage
|
|
1273
|
-
)), 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(() => {
|
|
1274
1315
|
const r = e.clientRowModelOptions?.readFilterCell;
|
|
1275
|
-
return
|
|
1316
|
+
return lo(
|
|
1276
1317
|
e.columns,
|
|
1277
1318
|
e.readFilterCell ?? r
|
|
1278
1319
|
);
|
|
1279
|
-
}),
|
|
1320
|
+
}), le = f(() => {
|
|
1280
1321
|
const r = e.readFilterCellStyle ?? e.clientRowModelOptions?.readFilterCellStyle;
|
|
1281
1322
|
return !J.value && !r ? e.clientRowModelOptions : {
|
|
1282
1323
|
...e.clientRowModelOptions ?? {},
|
|
1283
1324
|
readFilterCell: J.value,
|
|
1284
1325
|
readFilterCellStyle: r
|
|
1285
1326
|
};
|
|
1286
|
-
}),
|
|
1327
|
+
}), _ = f(() => wt({
|
|
1287
1328
|
columns: e.columns,
|
|
1288
|
-
clientRowModelOptions:
|
|
1329
|
+
clientRowModelOptions: le.value,
|
|
1289
1330
|
computedFields: e.computedFields,
|
|
1290
1331
|
formulas: e.formulas,
|
|
1291
1332
|
formulaFunctions: e.formulaFunctions
|
|
1292
|
-
})),
|
|
1333
|
+
})), Y = f(() => St(e.columns)), n = {
|
|
1293
1334
|
get state() {
|
|
1294
1335
|
return e.state;
|
|
1295
1336
|
},
|
|
@@ -1318,7 +1359,7 @@ const ro = {
|
|
|
1318
1359
|
return e.filterModel;
|
|
1319
1360
|
},
|
|
1320
1361
|
get groupBy() {
|
|
1321
|
-
return
|
|
1362
|
+
return L.value;
|
|
1322
1363
|
},
|
|
1323
1364
|
get aggregationModel() {
|
|
1324
1365
|
return e.aggregationModel;
|
|
@@ -1335,62 +1376,62 @@ const ro = {
|
|
|
1335
1376
|
get columns() {
|
|
1336
1377
|
return e.columns;
|
|
1337
1378
|
}
|
|
1338
|
-
},
|
|
1379
|
+
}, s = f(() => q.value ? "pivot" : _.value && "initialTreeData" in _.value ? "tree" : "base"), u = f(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), m = f(() => {
|
|
1339
1380
|
const r = a.value?.runtime;
|
|
1340
1381
|
if (!r)
|
|
1341
1382
|
return 0;
|
|
1342
|
-
const c =
|
|
1383
|
+
const c = Oe(r.rowPartition);
|
|
1343
1384
|
return Math.max(0, c.bodyRowCount + c.pinnedBottomRows.length);
|
|
1344
|
-
}),
|
|
1385
|
+
}), A = (r) => {
|
|
1345
1386
|
const c = a.value?.runtime;
|
|
1346
1387
|
if (!c)
|
|
1347
1388
|
return null;
|
|
1348
|
-
const
|
|
1389
|
+
const F = Oe(c.rowPartition), ce = F.bodyRowCount;
|
|
1349
1390
|
if (r < ce)
|
|
1350
1391
|
return c.getBodyRowAtIndex(r);
|
|
1351
|
-
const
|
|
1352
|
-
return
|
|
1353
|
-
},
|
|
1354
|
-
mode: f(() =>
|
|
1392
|
+
const nt = r - ce;
|
|
1393
|
+
return F.pinnedBottomRows[nt] ?? null;
|
|
1394
|
+
}, O = {
|
|
1395
|
+
mode: f(() => s.value),
|
|
1355
1396
|
resolveRuntime: () => a.value,
|
|
1356
|
-
visibleColumns:
|
|
1357
|
-
totalRows:
|
|
1397
|
+
visibleColumns: u,
|
|
1398
|
+
totalRows: m,
|
|
1358
1399
|
showRowSelection: f(() => e.rowSelection),
|
|
1359
1400
|
readSelectionCell: e.readSelectionCell,
|
|
1360
|
-
resolveSelectionRowAtIndex:
|
|
1401
|
+
resolveSelectionRowAtIndex: A
|
|
1361
1402
|
}, {
|
|
1362
|
-
selectionSnapshot:
|
|
1363
|
-
selectionAnchor:
|
|
1364
|
-
syncSelectionSnapshotFromRuntime:
|
|
1365
|
-
selectionService:
|
|
1366
|
-
selectionAggregatesLabel:
|
|
1367
|
-
} =
|
|
1403
|
+
selectionSnapshot: ke,
|
|
1404
|
+
selectionAnchor: Te,
|
|
1405
|
+
syncSelectionSnapshotFromRuntime: Ve,
|
|
1406
|
+
selectionService: We,
|
|
1407
|
+
selectionAggregatesLabel: _e
|
|
1408
|
+
} = st(O), {
|
|
1368
1409
|
rowSelectionSnapshot: ae,
|
|
1369
1410
|
syncRowSelectionSnapshotFromRuntime: ie,
|
|
1370
|
-
reconcileRowSelectionFromRuntime:
|
|
1371
|
-
selectionService:
|
|
1372
|
-
} =
|
|
1411
|
+
reconcileRowSelectionFromRuntime: Ue,
|
|
1412
|
+
selectionService: he
|
|
1413
|
+
} = dt({
|
|
1373
1414
|
resolveRuntime: () => a.value
|
|
1374
|
-
}),
|
|
1415
|
+
}), Ne = f(() => e.rowSelection ? he : ao()), qe = f(() => ({
|
|
1375
1416
|
...e.services ?? {},
|
|
1376
|
-
selection:
|
|
1417
|
+
selection: io({
|
|
1377
1418
|
userSelectionService: e.services?.selection,
|
|
1378
|
-
cellSelectionService:
|
|
1379
|
-
rowSelectionService:
|
|
1419
|
+
cellSelectionService: We,
|
|
1420
|
+
rowSelectionService: Ne.value
|
|
1380
1421
|
})
|
|
1381
1422
|
})), {
|
|
1382
|
-
dataGridInstanceKey:
|
|
1423
|
+
dataGridInstanceKey: Je,
|
|
1383
1424
|
resolvedRowModel: ue
|
|
1384
|
-
} =
|
|
1385
|
-
rows:
|
|
1386
|
-
rowModel:
|
|
1387
|
-
clientRowModelOptions:
|
|
1425
|
+
} = ht({
|
|
1426
|
+
rows: Ae(e, "rows"),
|
|
1427
|
+
rowModel: Ae(e, "rowModel"),
|
|
1428
|
+
clientRowModelOptions: _,
|
|
1388
1429
|
onOwnedRowModelRecreated: () => {
|
|
1389
1430
|
w.dispose();
|
|
1390
1431
|
}
|
|
1391
|
-
}), w =
|
|
1432
|
+
}), w = Xt({
|
|
1392
1433
|
gridRef: a,
|
|
1393
|
-
props:
|
|
1434
|
+
props: n,
|
|
1394
1435
|
emit: {
|
|
1395
1436
|
columnState: (r) => o("update:columnState", r),
|
|
1396
1437
|
columnOrder: (r) => o("update:columnOrder", r),
|
|
@@ -1406,21 +1447,21 @@ const ro = {
|
|
|
1406
1447
|
rowModel: ue.value
|
|
1407
1448
|
})
|
|
1408
1449
|
}
|
|
1409
|
-
}),
|
|
1410
|
-
|
|
1450
|
+
}), Ye = (r) => {
|
|
1451
|
+
Ue(), o("cell-change", r), w.emitSnapshotUpdates();
|
|
1411
1452
|
}, se = (r) => {
|
|
1412
1453
|
o("cell-edit", r);
|
|
1413
|
-
},
|
|
1454
|
+
}, Qe = (r) => {
|
|
1414
1455
|
o("selection-change", r), w.emitSnapshotUpdates();
|
|
1415
|
-
},
|
|
1456
|
+
}, $e = (r) => {
|
|
1416
1457
|
o("row-selection-change", r);
|
|
1417
|
-
},
|
|
1458
|
+
}, Re = () => {
|
|
1418
1459
|
w.emitSnapshotUpdates();
|
|
1419
1460
|
};
|
|
1420
1461
|
h(
|
|
1421
1462
|
ae,
|
|
1422
1463
|
(r) => {
|
|
1423
|
-
o("row-select", r), o("update:rowSelectionState", r),
|
|
1464
|
+
o("row-select", r), o("update:rowSelectionState", r), Re();
|
|
1424
1465
|
},
|
|
1425
1466
|
{ deep: !0 }
|
|
1426
1467
|
), h(
|
|
@@ -1428,14 +1469,14 @@ const ro = {
|
|
|
1428
1469
|
([r, c]) => {
|
|
1429
1470
|
if (r) {
|
|
1430
1471
|
if (c !== void 0) {
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1472
|
+
const F = a.value?.api.rowSelection;
|
|
1473
|
+
uo(ae.value, c) || (c ? F?.setSnapshot(c) : F?.clear(), ie());
|
|
1433
1474
|
return;
|
|
1434
1475
|
}
|
|
1435
1476
|
ie();
|
|
1436
1477
|
return;
|
|
1437
1478
|
}
|
|
1438
|
-
|
|
1479
|
+
he.clearRowSelection?.();
|
|
1439
1480
|
},
|
|
1440
1481
|
{ immediate: !0 }
|
|
1441
1482
|
), h(
|
|
@@ -1445,47 +1486,47 @@ const ro = {
|
|
|
1445
1486
|
},
|
|
1446
1487
|
{ immediate: !0 }
|
|
1447
1488
|
);
|
|
1448
|
-
const
|
|
1489
|
+
const be = (r) => {
|
|
1449
1490
|
const c = r === "gantt" ? "gantt" : "table";
|
|
1450
1491
|
b.value = c, o("update:viewMode", c);
|
|
1451
|
-
},
|
|
1452
|
-
|
|
1453
|
-
},
|
|
1492
|
+
}, Xe = (r) => {
|
|
1493
|
+
d.value = r;
|
|
1494
|
+
}, Me = (r) => {
|
|
1454
1495
|
S.value = r;
|
|
1455
|
-
},
|
|
1456
|
-
|
|
1496
|
+
}, Ze = (r) => {
|
|
1497
|
+
co(R.value, r) || (R.value = r, B = r, !C && (C = !0, Promise.resolve().then(() => {
|
|
1457
1498
|
C = !1;
|
|
1458
|
-
const c =
|
|
1459
|
-
|
|
1499
|
+
const c = B;
|
|
1500
|
+
B = null, c && o("toolbar-modules-change", c);
|
|
1460
1501
|
})));
|
|
1461
1502
|
}, de = f(() => {
|
|
1462
|
-
const r =
|
|
1463
|
-
return !
|
|
1503
|
+
const r = P.value.adapter;
|
|
1504
|
+
return !P.value.enabled || !r ? y : {
|
|
1464
1505
|
canUndo: () => r.canUndo(),
|
|
1465
1506
|
canRedo: () => r.canRedo(),
|
|
1466
1507
|
runHistoryAction: (c) => r.runHistoryAction(c)
|
|
1467
1508
|
};
|
|
1468
|
-
}),
|
|
1469
|
-
canUndo: () => (
|
|
1470
|
-
canRedo: () => (
|
|
1471
|
-
runHistoryAction: (r) => (
|
|
1472
|
-
},
|
|
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 = () => {
|
|
1473
1514
|
const r = w.getState();
|
|
1474
1515
|
return r ? X({
|
|
1475
1516
|
state: r,
|
|
1476
1517
|
viewMode: b.value
|
|
1477
1518
|
}) : null;
|
|
1478
|
-
},
|
|
1479
|
-
const
|
|
1480
|
-
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;
|
|
1481
1522
|
};
|
|
1482
|
-
return
|
|
1483
|
-
w.dispose(),
|
|
1484
|
-
}),
|
|
1523
|
+
return Se(() => {
|
|
1524
|
+
w.dispose(), Me(null);
|
|
1525
|
+
}), i({
|
|
1485
1526
|
grid: a,
|
|
1486
1527
|
rowModel: ue,
|
|
1487
|
-
history:
|
|
1488
|
-
getHistory: () =>
|
|
1528
|
+
history: Ce,
|
|
1529
|
+
getHistory: () => Ce,
|
|
1489
1530
|
toolbarModules: R,
|
|
1490
1531
|
getToolbarModules: () => R.value,
|
|
1491
1532
|
getApi: () => a.value?.api ?? null,
|
|
@@ -1496,7 +1537,7 @@ const ro = {
|
|
|
1496
1537
|
},
|
|
1497
1538
|
getColumnState: () => w.getColumnState(),
|
|
1498
1539
|
getColumnSnapshot: () => a.value?.api.columns.getSnapshot() ?? null,
|
|
1499
|
-
getSelectionAggregatesLabel: () =>
|
|
1540
|
+
getSelectionAggregatesLabel: () => _e.value,
|
|
1500
1541
|
runStructuralRowAction: (r, c) => S.value?.(r, c) ?? Promise.resolve(!1),
|
|
1501
1542
|
getSelectionSummary: () => {
|
|
1502
1543
|
const r = a.value?.api.selection.summarize;
|
|
@@ -1508,10 +1549,10 @@ const ro = {
|
|
|
1508
1549
|
return r(c);
|
|
1509
1550
|
},
|
|
1510
1551
|
getView: () => b.value,
|
|
1511
|
-
setView:
|
|
1512
|
-
getSavedView:
|
|
1513
|
-
migrateSavedView:
|
|
1514
|
-
applySavedView:
|
|
1552
|
+
setView: be,
|
|
1553
|
+
getSavedView: et,
|
|
1554
|
+
migrateSavedView: tt,
|
|
1555
|
+
applySavedView: ot,
|
|
1515
1556
|
applyColumnState: w.applyColumnState,
|
|
1516
1557
|
getState: w.getState,
|
|
1517
1558
|
migrateState: w.migrateState,
|
|
@@ -1529,22 +1570,22 @@ const ro = {
|
|
|
1529
1570
|
insertColumnAfter: (r, c) => a.value?.api.columns.insertAfter(r, c) ?? !1
|
|
1530
1571
|
}), () => {
|
|
1531
1572
|
const r = {
|
|
1532
|
-
mode:
|
|
1573
|
+
mode: s.value,
|
|
1533
1574
|
rows: e.rows,
|
|
1534
1575
|
runtime: a.value?.runtime ?? null,
|
|
1535
1576
|
runtimeRowModel: a.value?.rowModel ?? null,
|
|
1536
|
-
selectionSnapshot:
|
|
1537
|
-
selectionAnchor:
|
|
1577
|
+
selectionSnapshot: ke,
|
|
1578
|
+
selectionAnchor: Te,
|
|
1538
1579
|
rowSelectionSnapshot: ae,
|
|
1539
|
-
syncSelectionSnapshotFromRuntime:
|
|
1580
|
+
syncSelectionSnapshotFromRuntime: Ve,
|
|
1540
1581
|
syncRowSelectionSnapshotFromRuntime: ie,
|
|
1541
|
-
flushRowSelectionSnapshotUpdates:
|
|
1542
|
-
sortModel:
|
|
1543
|
-
filterModel:
|
|
1544
|
-
groupBy:
|
|
1582
|
+
flushRowSelectionSnapshotUpdates: Re,
|
|
1583
|
+
sortModel: W.value,
|
|
1584
|
+
filterModel: N.value,
|
|
1585
|
+
groupBy: te.value,
|
|
1545
1586
|
pivotModel: q.value,
|
|
1546
|
-
renderMode:
|
|
1547
|
-
virtualization:
|
|
1587
|
+
renderMode: v.value,
|
|
1588
|
+
virtualization: oe.value,
|
|
1548
1589
|
columnMenu: M.value,
|
|
1549
1590
|
cellMenu: Z.value,
|
|
1550
1591
|
rowIndexMenu: ee.value,
|
|
@@ -1552,14 +1593,15 @@ const ro = {
|
|
|
1552
1593
|
columnReorder: E.value,
|
|
1553
1594
|
aggregations: U.value,
|
|
1554
1595
|
advancedFilter: K.value,
|
|
1555
|
-
|
|
1556
|
-
|
|
1596
|
+
quickFilter: k.value,
|
|
1597
|
+
findReplace: T.value,
|
|
1598
|
+
gridLines: V.value,
|
|
1557
1599
|
rowHeightMode: e.rowHeightMode,
|
|
1558
1600
|
baseRowHeight: e.baseRowHeight,
|
|
1559
|
-
layoutMode:
|
|
1560
|
-
minRows:
|
|
1561
|
-
maxRows:
|
|
1562
|
-
placeholderRows:
|
|
1601
|
+
layoutMode: H.value.layoutMode,
|
|
1602
|
+
minRows: H.value.minRows,
|
|
1603
|
+
maxRows: H.value.maxRows,
|
|
1604
|
+
placeholderRows: ne.value,
|
|
1563
1605
|
fillHandle: e.fillHandle,
|
|
1564
1606
|
rangeMove: e.rangeMove,
|
|
1565
1607
|
rowHover: e.rowHover,
|
|
@@ -1570,39 +1612,39 @@ const ro = {
|
|
|
1570
1612
|
isCellEditable: e.isCellEditable,
|
|
1571
1613
|
showRowIndex: e.showRowIndex,
|
|
1572
1614
|
rowSelection: e.rowSelection,
|
|
1573
|
-
rowReorder:
|
|
1615
|
+
rowReorder: re.value,
|
|
1574
1616
|
viewMode: b.value,
|
|
1575
1617
|
gantt: e.gantt,
|
|
1576
|
-
history:
|
|
1577
|
-
chrome:
|
|
1578
|
-
registerHistoryController:
|
|
1579
|
-
registerStructuralRowActionRunner:
|
|
1580
|
-
reportToolbarModules:
|
|
1618
|
+
history: P.value,
|
|
1619
|
+
chrome: g.value,
|
|
1620
|
+
registerHistoryController: Xe,
|
|
1621
|
+
registerStructuralRowActionRunner: Me,
|
|
1622
|
+
reportToolbarModules: Ze,
|
|
1581
1623
|
toolbarModules: e.toolbarModules,
|
|
1582
1624
|
customOverlays: e.customOverlays,
|
|
1583
1625
|
runStructuralRowAction: e.runStructuralRowAction
|
|
1584
1626
|
};
|
|
1585
1627
|
return ge(
|
|
1586
|
-
|
|
1628
|
+
Qt,
|
|
1587
1629
|
{
|
|
1588
1630
|
...t,
|
|
1589
1631
|
ref: a,
|
|
1590
|
-
key:
|
|
1632
|
+
key: Je.value,
|
|
1591
1633
|
rows: e.rows,
|
|
1592
1634
|
rowModel: ue.value,
|
|
1593
|
-
columns:
|
|
1635
|
+
columns: Y.value,
|
|
1594
1636
|
theme: e.theme,
|
|
1595
|
-
layoutMode:
|
|
1596
|
-
renderMode:
|
|
1597
|
-
pagination:
|
|
1637
|
+
layoutMode: H.value.layoutMode,
|
|
1638
|
+
renderMode: v.value,
|
|
1639
|
+
pagination: p.value,
|
|
1598
1640
|
plugins: e.plugins,
|
|
1599
|
-
services:
|
|
1641
|
+
services: qe.value,
|
|
1600
1642
|
startupOrder: e.startupOrder,
|
|
1601
1643
|
autoStart: e.autoStart,
|
|
1602
|
-
onCellChange:
|
|
1644
|
+
onCellChange: Ye,
|
|
1603
1645
|
onCellEdit: se,
|
|
1604
|
-
onSelectionChange:
|
|
1605
|
-
onRowSelectionChange:
|
|
1646
|
+
onSelectionChange: Qe,
|
|
1647
|
+
onRowSelectionChange: $e
|
|
1606
1648
|
},
|
|
1607
1649
|
l.default ? {
|
|
1608
1650
|
default: (c) => l.default?.({
|
|
@@ -1619,7 +1661,7 @@ const ro = {
|
|
|
1619
1661
|
}
|
|
1620
1662
|
})
|
|
1621
1663
|
} : {
|
|
1622
|
-
default: (c) => ge(
|
|
1664
|
+
default: (c) => ge(Rt, {
|
|
1623
1665
|
...r,
|
|
1624
1666
|
runtime: c.runtime,
|
|
1625
1667
|
runtimeRowModel: c.rowModel,
|
|
@@ -1634,30 +1676,30 @@ const ro = {
|
|
|
1634
1676
|
};
|
|
1635
1677
|
}
|
|
1636
1678
|
});
|
|
1637
|
-
function
|
|
1679
|
+
function Po() {
|
|
1638
1680
|
return x(null);
|
|
1639
1681
|
}
|
|
1640
|
-
function
|
|
1641
|
-
return
|
|
1682
|
+
function Go() {
|
|
1683
|
+
return Ee;
|
|
1642
1684
|
}
|
|
1643
|
-
const
|
|
1685
|
+
const xo = Ee;
|
|
1644
1686
|
export {
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
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
|
|
1663
1705
|
};
|