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