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