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