@affino/datagrid-vue-app 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- import { defineComponent as we, ref as q, provide as Ce, computed as g, watch as p, onBeforeUnmount as se, h as ue, mergeProps as Ae, toRef as fe } from "vue";
2
- import { useDataGridRuntime as Pe } from "@affino/datagrid-vue";
3
- import { useDataGridAppSelection as Ge, useDataGridAppRowSelection as xe } from "@affino/datagrid-vue/app";
4
- import { d as De, e as Ke, f as Le, r as Ie, g as je, u as Fe, D as ze } from "./chunks/useDataGridAppRowModel-RrE_k6tK.js";
5
- import { applyGridTheme as Te, resolveGridThemeTokens as Ve, defaultStyleConfig as A, sugarTheme as Se, industrialNeutralTheme as me } from "@affino/datagrid-theme";
1
+ import { defineComponent as he, ref as $, provide as Be, computed as g, watch as p, onBeforeUnmount as ce, h as de, mergeProps as Ce, toRef as ge } from "vue";
2
+ import { useDataGridRuntime as Ge } from "@affino/datagrid-vue";
3
+ import { useDataGridAppSelection as Pe, useDataGridAppRowSelection as xe } from "@affino/datagrid-vue/app";
4
+ import { d as De, e as Ke, f as Le, r as Ie, g as je, u as Fe, D as ze } from "./chunks/useDataGridAppRowModel-pcd72QS1.js";
5
+ import { applyGridTheme as Ve, resolveGridThemeTokens as Te, defaultStyleConfig as G, sugarTheme as Me, industrialNeutralTheme as ye } from "@affino/datagrid-theme";
6
6
  import { d as We } from "./chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js";
7
7
  const He = {
8
- default: A,
9
- "industrial-neutral": me,
10
- industrialNeutral: me,
11
- sugar: Se
8
+ default: G,
9
+ "industrial-neutral": ye,
10
+ industrialNeutral: ye,
11
+ sugar: Me
12
12
  };
13
13
  function _e(e, o) {
14
14
  if (!e && !o)
15
15
  return;
16
- const r = {
16
+ const l = {
17
17
  ...e ?? {}
18
18
  };
19
- for (const [n, f] of Object.entries(o ?? {}))
20
- r[n] = {
21
- ...r[n] ?? {},
19
+ for (const [r, f] of Object.entries(o ?? {}))
20
+ l[r] = {
21
+ ...l[r] ?? {},
22
22
  ...f
23
23
  };
24
- return r;
24
+ return l;
25
25
  }
26
- function ne(e, o) {
26
+ function le(e, o) {
27
27
  return {
28
28
  ...e,
29
29
  ...o,
@@ -41,24 +41,24 @@ function ke(e) {
41
41
  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;
42
42
  }
43
43
  function Ee(e) {
44
- return e == null ? A : typeof e == "string" ? e === "sugar" ? ne(A, Se) : He[e] ?? A : ke(e) ? ne(A, e) : ne(A, {
44
+ return e == null ? G : typeof e == "string" ? e === "sugar" ? le(G, Me) : He[e] ?? G : ke(e) ? le(G, e) : le(G, {
45
45
  tokens: e
46
46
  });
47
47
  }
48
48
  function Ne(e) {
49
49
  const o = Ee(e);
50
- return Ve(o ?? A, {
50
+ return Te(o ?? G, {
51
51
  document: typeof document > "u" ? void 0 : document
52
52
  });
53
53
  }
54
- function ge(e, o) {
55
- const r = Ne(o);
56
- return Te(e, r), r;
57
- }
58
54
  function ve(e, o) {
55
+ const l = Ne(o);
56
+ return Ve(e, l), l;
57
+ }
58
+ function pe(e, o) {
59
59
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : o;
60
60
  }
61
- function ye(e, o) {
61
+ function we(e, o) {
62
62
  return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : o;
63
63
  }
64
64
  function Ue(e) {
@@ -70,7 +70,7 @@ function Ue(e) {
70
70
  return o ? { fields: [o], expandedByDefault: !0 } : null;
71
71
  }
72
72
  if (Array.isArray(e)) {
73
- const o = e.map((r) => r.trim()).filter((r) => r.length > 0);
73
+ const o = e.map((l) => l.trim()).filter((l) => l.length > 0);
74
74
  return o.length > 0 ? { fields: [...o], expandedByDefault: !0 } : null;
75
75
  }
76
76
  return e;
@@ -79,49 +79,49 @@ function Ue(e) {
79
79
  function qe(e, o) {
80
80
  return o === !0 || o && typeof o == "object" ? "pagination" : e ?? "virtualization";
81
81
  }
82
- function Je(e, o, r, n) {
82
+ function Je(e, o, l, r) {
83
83
  if (o !== "pagination")
84
84
  return null;
85
- const f = 100, u = ye(r, f), y = ve(n, 0);
85
+ const f = 100, u = we(l, f), v = pe(r, 0);
86
86
  return e === !0 || e === !1 || e == null ? {
87
87
  pageSize: u,
88
- currentPage: y
88
+ currentPage: v
89
89
  } : {
90
- pageSize: ye(r ?? e.pageSize, f),
91
- currentPage: ve(n ?? e.currentPage, 0)
90
+ pageSize: we(l ?? e.pageSize, f),
91
+ currentPage: pe(r ?? e.currentPage, 0)
92
92
  };
93
93
  }
94
- const re = "Advanced filter";
94
+ const ae = "Advanced filter";
95
95
  function $e(e) {
96
96
  return typeof e == "boolean" ? {
97
97
  enabled: e,
98
- buttonLabel: re
98
+ buttonLabel: ae
99
99
  } : e ? {
100
100
  enabled: e.enabled ?? !0,
101
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : re
101
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ae
102
102
  } : {
103
103
  enabled: !1,
104
- buttonLabel: re
104
+ buttonLabel: ae
105
105
  };
106
106
  }
107
- function pe(e) {
107
+ function Se(e) {
108
108
  if (typeof e != "number" || !Number.isFinite(e))
109
109
  return null;
110
110
  const o = Math.max(0, Math.trunc(e));
111
111
  return o > 0 ? o : null;
112
112
  }
113
- function Qe(e, o, r) {
114
- const n = e === "auto-height" ? "auto-height" : "fill";
115
- if (n !== "auto-height")
113
+ function Qe(e, o, l) {
114
+ const r = e === "auto-height" ? "auto-height" : "fill";
115
+ if (r !== "auto-height")
116
116
  return {
117
- layoutMode: n,
117
+ layoutMode: r,
118
118
  minRows: null,
119
119
  maxRows: null
120
120
  };
121
- const f = pe(o);
122
- let u = pe(r);
121
+ const f = Se(o);
122
+ let u = Se(l);
123
123
  return f !== null && u !== null && u < f && (u = f), {
124
- layoutMode: n,
124
+ layoutMode: r,
125
125
  minRows: f,
126
126
  maxRows: u
127
127
  };
@@ -132,7 +132,7 @@ function Xe(e) {
132
132
  transaction: null
133
133
  };
134
134
  }
135
- function J(e) {
135
+ function Q(e) {
136
136
  return {
137
137
  ...e,
138
138
  state: Xe(e.state)
@@ -141,43 +141,43 @@ function J(e) {
141
141
  function Ye(e) {
142
142
  return typeof e == "object" && e !== null;
143
143
  }
144
- function he(e, o, r) {
145
- const n = Ye(e) ? e : null, f = o(n && "state" in n ? n.state : e, r);
144
+ function be(e, o, l) {
145
+ const r = Ye(e) ? e : null, f = o(r && "state" in r ? r.state : e, l);
146
146
  if (!f)
147
147
  return null;
148
- const u = n?.viewMode, y = u === "gantt" ? "gantt" : u === "table" ? "table" : void 0;
149
- return J({
148
+ const u = r?.viewMode, v = u === "gantt" ? "gantt" : u === "table" ? "table" : void 0;
149
+ return Q({
150
150
  state: f,
151
- ...y ? { viewMode: y } : {}
151
+ ...v ? { viewMode: v } : {}
152
152
  });
153
153
  }
154
154
  function Ze(e) {
155
- return JSON.stringify(J(e));
155
+ return JSON.stringify(Q(e));
156
156
  }
157
- function et(e, o, r) {
157
+ function et(e, o, l) {
158
158
  if (typeof e != "string" || e.trim().length === 0)
159
159
  return null;
160
160
  try {
161
- return he(JSON.parse(e), o, r);
161
+ return be(JSON.parse(e), o, l);
162
162
  } catch {
163
163
  return null;
164
164
  }
165
165
  }
166
- function wt(e, o, r) {
166
+ function wt(e, o, l) {
167
167
  if (!e || typeof o != "string" || o.trim().length === 0)
168
168
  return !1;
169
169
  try {
170
- return e.setItem(o, Ze(r)), !0;
170
+ return e.setItem(o, Ze(l)), !0;
171
171
  } catch {
172
172
  return !1;
173
173
  }
174
174
  }
175
- function St(e, o, r, n) {
175
+ function St(e, o, l, r) {
176
176
  if (!e || typeof o != "string" || o.trim().length === 0)
177
177
  return null;
178
178
  try {
179
179
  const f = e.getItem(o);
180
- return f ? et(f, r, n) : null;
180
+ return f ? et(f, l, r) : null;
181
181
  } catch {
182
182
  return null;
183
183
  }
@@ -191,54 +191,54 @@ function ht(e, o) {
191
191
  return !1;
192
192
  }
193
193
  }
194
- const le = "Columns";
194
+ const ie = "Columns";
195
195
  function tt(e) {
196
196
  return typeof e == "boolean" ? {
197
197
  enabled: e,
198
- buttonLabel: le
198
+ buttonLabel: ie
199
199
  } : e ? {
200
200
  enabled: e.enabled ?? !0,
201
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : le
201
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ie
202
202
  } : {
203
203
  enabled: !1,
204
- buttonLabel: le
204
+ buttonLabel: ie
205
205
  };
206
206
  }
207
- const ae = "Aggregations";
207
+ const ue = "Aggregations";
208
208
  function ot(e) {
209
209
  return typeof e == "boolean" ? {
210
210
  enabled: e,
211
- buttonLabel: ae
211
+ buttonLabel: ue
212
212
  } : e ? {
213
213
  enabled: e.enabled ?? !0,
214
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ae
214
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ue
215
215
  } : {
216
216
  enabled: !1,
217
- buttonLabel: ae
217
+ buttonLabel: ue
218
218
  };
219
219
  }
220
- function N(e, o) {
220
+ function q(e, o) {
221
221
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : o;
222
222
  }
223
223
  function nt(e, o) {
224
- const r = {
224
+ const l = {
225
225
  rows: !0,
226
226
  columns: !1,
227
227
  rowOverscan: 8,
228
228
  columnOverscan: 2
229
229
  };
230
230
  if (e === !0)
231
- r.columns = !0;
231
+ l.columns = !0;
232
232
  else if (e === !1)
233
- r.rows = !1, r.columns = !1;
233
+ l.rows = !1, l.columns = !1;
234
234
  else if (e && typeof e == "object") {
235
- r.rows = e.rows ?? r.rows, r.columns = e.columns ?? r.columns;
236
- const n = N(e.overscan, r.rowOverscan);
237
- r.rowOverscan = N(e.rowOverscan, n), r.columnOverscan = N(e.columnOverscan, N(e.overscan, r.columnOverscan));
235
+ l.rows = e.rows ?? l.rows, l.columns = e.columns ?? l.columns;
236
+ const r = q(e.overscan, l.rowOverscan);
237
+ l.rowOverscan = q(e.rowOverscan, r), l.columnOverscan = q(e.columnOverscan, q(e.overscan, l.columnOverscan));
238
238
  }
239
- return o === "pagination" && (r.rows = !1), r;
239
+ return o === "pagination" && (l.rows = !1), l;
240
240
  }
241
- const rt = we({
241
+ const rt = he({
242
242
  name: "DataGridRuntimeHost",
243
243
  inheritAttrs: !1,
244
244
  props: {
@@ -292,11 +292,11 @@ const rt = we({
292
292
  "selection-change": (e) => !0,
293
293
  "row-selection-change": (e) => !0
294
294
  },
295
- setup(e, { attrs: o, slots: r, emit: n, expose: f }) {
296
- const u = q(null);
297
- Ce(We, u);
298
- let y = null;
299
- const s = Pe({
295
+ setup(e, { attrs: o, slots: l, emit: r, expose: f }) {
296
+ const u = $(null);
297
+ Be(We, u);
298
+ let v = null;
299
+ const s = Ge({
300
300
  rows: g(() => e.rows),
301
301
  rowModel: e.rowModel,
302
302
  columns: g(() => e.columns),
@@ -304,9 +304,11 @@ const rt = we({
304
304
  services: e.services,
305
305
  startupOrder: e.startupOrder,
306
306
  autoStart: e.autoStart
307
- }), w = s, b = {
307
+ }), w = s, O = {
308
308
  api: s.api,
309
309
  syncBodyRowsInRange: s.syncBodyRowsInRange,
310
+ setViewportRange: s.setViewportRange,
311
+ setVirtualWindowRange: s.setVirtualWindowRange,
310
312
  rowPartition: s.rowPartition,
311
313
  virtualWindow: s.virtualWindow,
312
314
  columnSnapshot: s.columnSnapshot,
@@ -335,31 +337,31 @@ const rt = we({
335
337
  B();
336
338
  },
337
339
  { immediate: !0, deep: !0 }
338
- ), typeof document < "u" && (y = new MutationObserver(() => {
340
+ ), typeof document < "u" && (v = new MutationObserver(() => {
339
341
  const d = u.value;
340
- d && ge(d, e.theme);
341
- }), y.observe(document.documentElement, {
342
+ d && ve(d, e.theme);
343
+ }), v.observe(document.documentElement, {
342
344
  attributes: !0,
343
345
  attributeFilter: ["class", "data-theme"]
344
346
  })), p(
345
347
  [() => e.theme, u],
346
348
  () => {
347
349
  const d = u.value;
348
- d && ge(d, e.theme);
350
+ d && ve(d, e.theme);
349
351
  },
350
352
  { immediate: !0, deep: !0 }
351
353
  );
352
354
  const h = s.api.events.on("rows:changed", (d) => {
353
- n("cell-change", d);
354
- }), R = s.api.events.on("selection:changed", (d) => {
355
- n("selection-change", d);
355
+ r("cell-change", d);
356
+ }), M = s.api.events.on("selection:changed", (d) => {
357
+ r("selection-change", d);
356
358
  }), P = s.api.events.on("row-selection:changed", (d) => {
357
- n("row-selection-change", d);
359
+ r("row-selection-change", d);
358
360
  });
359
- se(() => {
360
- h(), R(), P(), y?.disconnect(), y = null;
361
+ ce(() => {
362
+ h(), M(), P(), v?.disconnect(), v = null;
361
363
  });
362
- const G = g(() => {
364
+ const x = g(() => {
363
365
  const d = s.virtualWindow.value;
364
366
  return {
365
367
  ...d ?? {},
@@ -370,7 +372,7 @@ const rt = we({
370
372
  return f({
371
373
  api: s.api,
372
374
  core: s.core,
373
- runtime: b,
375
+ runtime: O,
374
376
  rowModel: s.rowModel,
375
377
  columnModel: s.columnModel,
376
378
  columnSnapshot: s.columnSnapshot,
@@ -382,9 +384,9 @@ const rt = we({
382
384
  virtualWindow: s.virtualWindow,
383
385
  start: s.start,
384
386
  stop: s.stop
385
- }), () => ue(
387
+ }), () => de(
386
388
  "div",
387
- Ae(o, {
389
+ Ce(o, {
388
390
  ref: u,
389
391
  class: [
390
392
  "affino-datagrid-app-root",
@@ -397,11 +399,11 @@ const rt = we({
397
399
  minWidth: "0"
398
400
  }
399
401
  }),
400
- r.default?.({
402
+ l.default?.({
401
403
  api: s.api,
402
404
  core: s.core,
403
- runtime: b,
404
- grid: b,
405
+ runtime: O,
406
+ grid: O,
405
407
  rowModel: s.rowModel,
406
408
  columnModel: s.columnModel,
407
409
  columnSnapshot: s.columnSnapshot.value,
@@ -410,15 +412,15 @@ const rt = we({
410
412
  syncBodyRowsInRange: s.syncBodyRowsInRange,
411
413
  getBodyRowAtIndex: w.getBodyRowAtIndex,
412
414
  resolveBodyRowIndexById: w.resolveBodyRowIndexById,
413
- virtualWindow: G.value
415
+ virtualWindow: x.value
414
416
  }) ?? []
415
417
  );
416
418
  }
417
419
  });
418
- function ie(e) {
420
+ function se(e) {
419
421
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
420
422
  }
421
- function M(e) {
423
+ function R(e) {
422
424
  try {
423
425
  return JSON.stringify(e);
424
426
  } catch {
@@ -432,116 +434,119 @@ function lt(e) {
432
434
  } : null;
433
435
  }
434
436
  function at(e) {
435
- let o = null, r = null, n = !1, f = null, u = null, y = null, s = null, w = null, b = null, B = null, h = null, R = null;
437
+ let o = null, l = null, r = !1, f = null, u = null, v = null, s = null, w = null, O = null, B = null, h = null, M = null;
436
438
  const P = () => {
437
- o?.(), r?.(), o = null, r = null;
438
- }, G = () => {
439
- const t = e.gridRef.value?.api.columns;
439
+ o?.(), l?.(), o = null, l = null;
440
+ }, x = () => {
441
+ const t = e.gridRef.value;
442
+ return !t || t.api.lifecycle.state === "disposed" ? null : t;
443
+ }, d = () => x()?.api ?? null, j = () => {
444
+ const t = d()?.columns;
440
445
  if (!t)
441
446
  return null;
442
- const i = t.getSnapshot(), l = {}, c = {}, v = {};
447
+ const i = t.getSnapshot(), n = {}, c = {}, b = {};
443
448
  for (const S of i.columns)
444
- l[S.key] = S.visible, c[S.key] = S.width, v[S.key] = S.pin;
449
+ n[S.key] = S.visible, c[S.key] = S.width, b[S.key] = S.pin;
445
450
  return {
446
451
  order: [...i.order],
447
- visibility: l,
452
+ visibility: n,
448
453
  widths: c,
449
- pins: v
454
+ pins: b
450
455
  };
451
- }, d = () => {
452
- n || (n = !0, queueMicrotask(() => {
453
- n = !1;
454
- const t = G(), i = e.gridRef.value?.api;
456
+ }, y = () => {
457
+ r || (r = !0, queueMicrotask(() => {
458
+ r = !1;
459
+ const t = j(), i = d();
455
460
  if (t) {
456
- const l = M(t);
457
- b = l, l !== y && (y = l, e.emit.columnState(t), e.emit.columnOrder(t.order), e.emit.hiddenColumnKeys(
461
+ const n = R(t);
462
+ O = n, n !== v && (v = n, e.emit.columnState(t), e.emit.columnOrder(t.order), e.emit.hiddenColumnKeys(
458
463
  Object.entries(t.visibility).filter(([, c]) => !c).map(([c]) => c)
459
464
  ), e.emit.columnWidths(t.widths), e.emit.columnPins(t.pins));
460
465
  }
461
466
  if (i) {
462
- const l = lt(i.rows.getSnapshot().groupBy), c = M(l);
463
- c !== w && (w = c, e.emit.groupBy(l));
464
- const v = i.state.get(), S = M(v);
465
- B = S, S !== s && (s = S, e.emit.state(v));
467
+ const n = lt(i.rows.getSnapshot().groupBy), c = R(n);
468
+ c !== w && (w = c, e.emit.groupBy(n));
469
+ const b = i.state.get(), S = R(b);
470
+ B = S, S !== s && (s = S, e.emit.state(b));
466
471
  }
467
472
  }));
468
- }, x = () => {
469
- const t = e.gridRef.value?.api;
473
+ }, F = () => {
474
+ const t = d();
470
475
  !t || e.props.sortModel === void 0 && e.props.filterModel === void 0 || t.rows.setSortAndFilterModel({
471
476
  sortModel: e.props.sortModel ?? [],
472
477
  filterModel: e.props.filterModel ?? null
473
478
  });
474
- }, D = () => {
475
- const t = e.gridRef.value?.api.columns;
479
+ }, X = () => {
480
+ const t = d()?.columns;
476
481
  return t ? new Set(t.getSnapshot().columns.map((i) => i.key)) : null;
477
- }, $ = (t) => {
482
+ }, Y = (t) => {
478
483
  const i = /* @__PURE__ */ new Set();
479
484
  if (!t)
480
485
  return i;
481
- for (const l of t.order)
482
- i.add(l);
483
- for (const l of Object.keys(t.visibility ?? {}))
484
- i.add(l);
485
- for (const l of Object.keys(t.widths ?? {}))
486
- i.add(l);
487
- for (const l of Object.keys(t.pins ?? {}))
488
- i.add(l);
486
+ for (const n of t.order)
487
+ i.add(n);
488
+ for (const n of Object.keys(t.visibility ?? {}))
489
+ i.add(n);
490
+ for (const n of Object.keys(t.widths ?? {}))
491
+ i.add(n);
492
+ for (const n of Object.keys(t.pins ?? {}))
493
+ i.add(n);
489
494
  return i;
490
- }, F = (t) => {
491
- const i = D();
495
+ }, D = (t) => {
496
+ const i = X();
492
497
  if (!i)
493
498
  return !1;
494
- const l = $(t);
495
- if (l.size === 0 || e.props.columns.length > 0)
499
+ const n = Y(t);
500
+ if (n.size === 0 || e.props.columns.length > 0)
496
501
  return !0;
497
- for (const c of l)
502
+ for (const c of n)
498
503
  if (!i.has(c))
499
504
  return !1;
500
505
  return !0;
501
- }, z = (t) => F(t.columns), T = (t) => {
502
- const i = e.gridRef.value?.api;
506
+ }, z = (t) => D(t.columns), C = (t) => {
507
+ const i = d();
503
508
  if (!i)
504
509
  return !1;
505
510
  i.columns.setOrder(t.order);
506
- for (const [l, c] of Object.entries(t.visibility))
507
- i.columns.setVisibility(l, c);
508
- for (const [l, c] of Object.entries(t.widths))
509
- i.columns.setWidth(l, ie(c));
510
- for (const [l, c] of Object.entries(t.pins))
511
- i.columns.setPin(l, c);
511
+ for (const [n, c] of Object.entries(t.visibility))
512
+ i.columns.setVisibility(n, c);
513
+ for (const [n, c] of Object.entries(t.widths))
514
+ i.columns.setWidth(n, se(c));
515
+ for (const [n, c] of Object.entries(t.pins))
516
+ i.columns.setPin(n, c);
512
517
  return !0;
513
- }, K = () => {
514
- if (R) {
515
- const t = R, i = e.gridRef.value?.api;
518
+ }, A = () => {
519
+ if (M) {
520
+ const t = M, i = d();
516
521
  if (i) {
517
- const l = i.state.migrate(t.state, { strict: t.options?.strict });
518
- l && z(l) && (R = null, i.state.set(l, t.options), u = M(t.state));
522
+ const n = i.state.migrate(t.state, { strict: t.options?.strict });
523
+ n && z(n) && (M = null, i.state.set(n, t.options), u = R(t.state));
519
524
  }
520
525
  }
521
- if (h && F(h.columnState)) {
526
+ if (h && D(h.columnState)) {
522
527
  const t = h;
523
- h = null, f = M({
528
+ h = null, f = R({
524
529
  columnState: t.columnState,
525
530
  columnOrder: null,
526
531
  hiddenColumnKeys: null,
527
532
  columnWidths: null,
528
533
  columnPins: null
529
- }), T(t.columnState);
534
+ }), C(t.columnState);
530
535
  }
531
- }, O = () => {
532
- const t = e.gridRef.value?.api;
536
+ }, V = () => {
537
+ const t = d();
533
538
  !t || e.props.groupBy === void 0 || t.rows.setGroupBy(e.props.groupBy ?? null);
534
- }, C = () => {
535
- const t = e.gridRef.value?.api;
539
+ }, T = () => {
540
+ const t = d();
536
541
  !t || e.props.aggregationModel === void 0 || t.rows.setAggregationModel(e.props.aggregationModel ?? null);
537
- }, V = () => {
538
- const t = e.gridRef.value?.api;
542
+ }, K = () => {
543
+ const t = d();
539
544
  !t || e.props.pivotModel === void 0 || t.pivot.setModel(e.props.pivotModel ?? null);
540
545
  }, L = () => {
541
- const t = e.gridRef.value?.api;
546
+ const t = d();
542
547
  if (!t || 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)
543
548
  return;
544
- const i = M({
549
+ const i = R({
545
550
  columnState: e.props.columnState,
546
551
  columnOrder: e.props.columnOrder,
547
552
  hiddenColumnKeys: e.props.hiddenColumnKeys,
@@ -549,74 +554,74 @@ function at(e) {
549
554
  columnPins: e.props.columnPins
550
555
  });
551
556
  if (i !== f) {
552
- if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && M(e.props.columnState) === b) {
557
+ if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && R(e.props.columnState) === O) {
553
558
  f = i;
554
559
  return;
555
560
  }
556
561
  if (e.props.columnState) {
557
562
  t.columns.setOrder(e.props.columnState.order);
558
- for (const [l, c] of Object.entries(e.props.columnState.visibility))
559
- t.columns.setVisibility(l, c);
560
- for (const [l, c] of Object.entries(e.props.columnState.widths))
561
- t.columns.setWidth(l, ie(c));
562
- for (const [l, c] of Object.entries(e.props.columnState.pins))
563
- t.columns.setPin(l, c);
563
+ for (const [n, c] of Object.entries(e.props.columnState.visibility))
564
+ t.columns.setVisibility(n, c);
565
+ for (const [n, c] of Object.entries(e.props.columnState.widths))
566
+ t.columns.setWidth(n, se(c));
567
+ for (const [n, c] of Object.entries(e.props.columnState.pins))
568
+ t.columns.setPin(n, c);
564
569
  }
565
570
  if (e.props.columnOrder && t.columns.setOrder(e.props.columnOrder), e.props.hiddenColumnKeys) {
566
- const l = new Set(e.props.hiddenColumnKeys), c = t.columns.getSnapshot();
567
- for (const v of c.columns)
568
- t.columns.setVisibility(v.key, !l.has(v.key));
571
+ const n = new Set(e.props.hiddenColumnKeys), c = t.columns.getSnapshot();
572
+ for (const b of c.columns)
573
+ t.columns.setVisibility(b.key, !n.has(b.key));
569
574
  }
570
575
  if (e.props.columnWidths)
571
- for (const [l, c] of Object.entries(e.props.columnWidths))
572
- t.columns.setWidth(l, ie(c));
576
+ for (const [n, c] of Object.entries(e.props.columnWidths))
577
+ t.columns.setWidth(n, se(c));
573
578
  if (e.props.columnPins)
574
- for (const [l, c] of Object.entries(e.props.columnPins))
575
- t.columns.setPin(l, c);
579
+ for (const [n, c] of Object.entries(e.props.columnPins))
580
+ t.columns.setPin(n, c);
576
581
  f = i;
577
582
  }
578
- }, I = () => {
579
- const t = e.gridRef.value?.api;
583
+ }, W = () => {
584
+ const t = d();
580
585
  if (!t || e.props.state == null)
581
586
  return;
582
- const i = M(e.props.state);
587
+ const i = R(e.props.state);
583
588
  if (i === u)
584
589
  return;
585
590
  if (i === B) {
586
591
  u = i;
587
592
  return;
588
593
  }
589
- const l = t.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
590
- l && z(l) && (t.state.set(l, e.props.stateOptions ?? {}), u = i);
591
- }, W = () => {
592
- const t = e.gridRef.value?.api;
594
+ const n = t.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
595
+ n && z(n) && (t.state.set(n, e.props.stateOptions ?? {}), u = i);
596
+ }, H = () => {
597
+ const t = d();
593
598
  t && (t.view.setRowHeightMode(e.props.rowHeightMode), t.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
594
599
  }, E = () => {
595
- const t = e.gridRef.value;
600
+ const t = x();
596
601
  t && (f = null, u = null, P(), o = t.rowModel.subscribe(() => {
597
- d();
598
- }), r = t.columnModel.subscribe(() => {
599
- d();
600
- }), I(), L(), x(), O(), C(), V(), W(), K(), d(), e.emit.ready({ api: t.api }));
601
- }, Q = () => e.gridRef.value?.api.state.get() ?? null, X = (t, i) => e.gridRef.value?.api.state.migrate(t, i) ?? null, Y = (t) => F(t) ? (f = M({
602
+ y();
603
+ }), l = t.columnModel.subscribe(() => {
604
+ y();
605
+ }), W(), L(), F(), V(), T(), K(), H(), A(), y(), e.emit.ready({ api: t.api }));
606
+ }, Z = () => d()?.state.get() ?? null, ee = (t, i) => d()?.state.migrate(t, i) ?? null, te = (t) => D(t) ? (f = R({
602
607
  columnState: t,
603
608
  columnOrder: null,
604
609
  hiddenColumnKeys: null,
605
610
  columnWidths: null,
606
611
  columnPins: null
607
- }), h = null, T(t) ? (d(), !0) : (h = { columnState: t }, !0)) : (h = { columnState: t }, !0), Z = (t, i) => {
608
- const l = e.gridRef.value?.api;
609
- if (!l)
610
- return R = { state: t, options: i }, !0;
611
- const c = l.state.migrate(t, { strict: i?.strict });
612
- return c ? z(c) ? (l.state.set(c, i), u = M(t), R = null, d(), !0) : (R = { state: t, options: i }, !0) : !1;
613
- }, ee = () => e.gridRef.value?.api.pivot.exportLayout() ?? null, te = () => e.gridRef.value?.api.pivot.exportInterop() ?? null, H = (t, i) => {
614
- const l = e.gridRef.value?.api;
615
- return l ? (l.pivot.importLayout(t, i), d(), !0) : !1;
616
- }, _ = () => {
617
- e.gridRef.value?.api.rows.expandAllGroups(), d();
618
- }, oe = () => {
619
- e.gridRef.value?.api.rows.collapseAllGroups(), d();
612
+ }), h = null, C(t) ? (y(), !0) : (h = { columnState: t }, !0)) : (h = { columnState: t }, !0), oe = (t, i) => {
613
+ const n = d();
614
+ if (!n)
615
+ return M = { state: t, options: i }, !0;
616
+ const c = n.state.migrate(t, { strict: i?.strict });
617
+ return c ? z(c) ? (n.state.set(c, i), u = R(t), M = null, y(), !0) : (M = { state: t, options: i }, !0) : !1;
618
+ }, _ = () => d()?.pivot.exportLayout() ?? null, k = () => d()?.pivot.exportInterop() ?? null, ne = (t, i) => {
619
+ const n = d();
620
+ return n ? (n.pivot.importLayout(t, i), y(), !0) : !1;
621
+ }, N = () => {
622
+ d()?.rows.expandAllGroups(), y();
623
+ }, re = () => {
624
+ d()?.rows.collapseAllGroups(), y();
620
625
  };
621
626
  p(
622
627
  () => e.gridRef.value,
@@ -627,13 +632,13 @@ function at(e) {
627
632
  ), p(
628
633
  () => e.props.columns,
629
634
  () => {
630
- f = null, u = null, I(), L(), K(), d();
635
+ f = null, u = null, W(), L(), A(), y();
631
636
  },
632
637
  { deep: !0 }
633
638
  ), p(
634
639
  () => [e.props.state, e.props.stateOptions],
635
640
  () => {
636
- I(), L(), x(), O(), C(), V(), W(), K(), d();
641
+ W(), L(), F(), V(), T(), K(), H(), A(), y();
637
642
  },
638
643
  { deep: !0 }
639
644
  ), p(
@@ -645,58 +650,58 @@ function at(e) {
645
650
  e.props.columnPins
646
651
  ],
647
652
  () => {
648
- L(), K(), d();
653
+ L(), A(), y();
649
654
  },
650
655
  { deep: !0 }
651
656
  ), p(
652
657
  () => [e.props.sortModel, e.props.filterModel],
653
658
  () => {
654
- x(), d();
659
+ F(), y();
655
660
  },
656
661
  { deep: !0 }
657
662
  ), p(
658
663
  () => e.props.groupBy,
659
664
  () => {
660
- O(), d();
665
+ V(), y();
661
666
  },
662
667
  { deep: !0 }
663
668
  ), p(
664
669
  () => e.props.aggregationModel,
665
670
  () => {
666
- C(), d();
671
+ T(), y();
667
672
  },
668
673
  { deep: !0 }
669
674
  ), p(
670
675
  () => e.props.pivotModel,
671
676
  () => {
672
- V(), d();
677
+ K(), y();
673
678
  },
674
679
  { deep: !0 }
675
680
  ), p(
676
681
  () => [e.props.rowHeightMode, e.props.baseRowHeight],
677
682
  () => {
678
- W(), d();
683
+ H(), y();
679
684
  }
680
685
  );
681
- const k = () => {
686
+ const U = () => {
682
687
  P();
683
688
  };
684
- return se(() => {
685
- k();
689
+ return ce(() => {
690
+ U();
686
691
  }), {
687
- emitSnapshotUpdates: d,
692
+ emitSnapshotUpdates: y,
688
693
  handleGridReady: E,
689
- dispose: k,
690
- getColumnState: G,
691
- getState: Q,
692
- migrateState: X,
693
- applyColumnState: Y,
694
- applyState: Z,
695
- exportPivotLayout: ee,
696
- exportPivotInterop: te,
697
- importPivotLayout: H,
698
- expandAllGroups: _,
699
- collapseAllGroups: oe
694
+ dispose: U,
695
+ getColumnState: j,
696
+ getState: Z,
697
+ migrateState: ee,
698
+ applyColumnState: te,
699
+ applyState: oe,
700
+ exportPivotLayout: _,
701
+ exportPivotInterop: k,
702
+ importPivotLayout: ne,
703
+ expandAllGroups: N,
704
+ collapseAllGroups: re
700
705
  };
701
706
  }
702
707
  function it() {
@@ -722,54 +727,54 @@ function it() {
722
727
  }
723
728
  };
724
729
  }
725
- function U(e, o) {
726
- const r = o.map((n) => n?.[e]).filter((n) => typeof n == "function");
727
- if (r.length !== 0)
728
- return async (n) => {
729
- for (const f of r)
730
- await f(n);
730
+ function J(e, o) {
731
+ const l = o.map((r) => r?.[e]).filter((r) => typeof r == "function");
732
+ if (l.length !== 0)
733
+ return async (r) => {
734
+ for (const f of l)
735
+ await f(r);
731
736
  };
732
737
  }
733
738
  function ut(e) {
734
739
  const {
735
740
  userSelectionService: o,
736
- cellSelectionService: r,
737
- rowSelectionService: n
741
+ cellSelectionService: l,
742
+ rowSelectionService: r
738
743
  } = e;
739
744
  return {
740
745
  name: "selection",
741
- init: U("init", [o, r, n]),
742
- start: U("start", [o, r, n]),
743
- stop: U("stop", [o, r, n]),
744
- dispose: U("dispose", [o, r, n]),
745
- getSelectionSnapshot: r.getSelectionSnapshot,
746
- setSelectionSnapshot: r.setSelectionSnapshot,
747
- clearSelection: r.clearSelection,
748
- getRowSelectionSnapshot: n.getRowSelectionSnapshot,
749
- setRowSelectionSnapshot: n.setRowSelectionSnapshot,
750
- clearRowSelection: n.clearRowSelection,
751
- getFocusedRow: n.getFocusedRow,
752
- setFocusedRow: n.setFocusedRow,
753
- getSelectedRows: n.getSelectedRows,
754
- isRowSelected: n.isRowSelected,
755
- setRowSelected: n.setRowSelected,
756
- selectRows: n.selectRows,
757
- deselectRows: n.deselectRows,
758
- clearSelectedRows: n.clearSelectedRows
746
+ init: J("init", [o, l, r]),
747
+ start: J("start", [o, l, r]),
748
+ stop: J("stop", [o, l, r]),
749
+ dispose: J("dispose", [o, l, r]),
750
+ getSelectionSnapshot: l.getSelectionSnapshot,
751
+ setSelectionSnapshot: l.setSelectionSnapshot,
752
+ clearSelection: l.clearSelection,
753
+ getRowSelectionSnapshot: r.getRowSelectionSnapshot,
754
+ setRowSelectionSnapshot: r.setRowSelectionSnapshot,
755
+ clearRowSelection: r.clearRowSelection,
756
+ getFocusedRow: r.getFocusedRow,
757
+ setFocusedRow: r.setFocusedRow,
758
+ getSelectedRows: r.getSelectedRows,
759
+ isRowSelected: r.isRowSelected,
760
+ setRowSelected: r.setRowSelected,
761
+ selectRows: r.selectRows,
762
+ deselectRows: r.deselectRows,
763
+ clearSelectedRows: r.clearSelectedRows
759
764
  };
760
765
  }
761
766
  function st(e, o) {
762
767
  if (e?.focusedRow !== o?.focusedRow)
763
768
  return !1;
764
- const r = e?.selectedRows ?? [], n = o?.selectedRows ?? [];
765
- if (r.length !== n.length)
769
+ const l = e?.selectedRows ?? [], r = o?.selectedRows ?? [];
770
+ if (l.length !== r.length)
766
771
  return !1;
767
- for (let f = 0; f < r.length; f += 1)
768
- if (r[f] !== n[f])
772
+ for (let f = 0; f < l.length; f += 1)
773
+ if (l[f] !== r[f])
769
774
  return !1;
770
775
  return !0;
771
776
  }
772
- const dt = we({
777
+ const dt = he({
773
778
  name: "DataGrid",
774
779
  inheritAttrs: !1,
775
780
  props: {
@@ -994,19 +999,19 @@ const dt = we({
994
999
  "update:state": (e) => !0,
995
1000
  ready: (e) => !0
996
1001
  },
997
- setup(e, { attrs: o, slots: r, emit: n, expose: f }) {
998
- const u = q(null), y = q(e.viewMode === "gantt" ? "gantt" : "table"), s = q(e.state ?? null), w = g(() => qe(e.renderMode, e.pagination)), b = g(() => Je(
1002
+ setup(e, { attrs: o, slots: l, emit: r, expose: f }) {
1003
+ const u = $(null), v = $(e.viewMode === "gantt" ? "gantt" : "table"), s = $(e.state ?? null), w = g(() => qe(e.renderMode, e.pagination)), O = g(() => Je(
999
1004
  e.pagination,
1000
1005
  w.value,
1001
1006
  e.pageSize,
1002
1007
  e.currentPage
1003
- )), B = g(() => De(e.columnMenu)), h = g(() => Ke(e.cellMenu)), R = g(() => Le(e.rowIndexMenu)), P = g(() => tt(e.columnLayout)), G = g(() => ot(e.aggregations)), d = g(() => $e(e.advancedFilter)), x = g(() => Ue(e.groupBy)), D = g(() => e.state ?? s.value), $ = g(() => e.sortModel !== void 0 ? e.sortModel : D.value?.rows?.snapshot?.sortModel), F = g(() => e.filterModel !== void 0 ? e.filterModel : D.value?.rows?.snapshot?.filterModel ?? null), z = g(() => e.groupBy !== void 0 ? x.value ?? null : D.value?.rows?.snapshot?.groupBy ?? null), T = g(() => e.pivotModel !== void 0 ? e.pivotModel : D.value?.rows?.snapshot?.pivotModel ?? null), K = g(() => nt(e.virtualization, w.value)), O = g(() => Qe(e.layoutMode, e.minRows, e.maxRows)), C = g(() => Ie({
1008
+ )), B = g(() => De(e.columnMenu)), h = g(() => Ke(e.cellMenu)), M = g(() => Le(e.rowIndexMenu)), P = g(() => tt(e.columnLayout)), x = g(() => ot(e.aggregations)), d = g(() => $e(e.advancedFilter)), j = g(() => Ue(e.groupBy)), y = g(() => e.state ?? s.value), F = g(() => e.sortModel !== void 0 ? e.sortModel : y.value?.rows?.snapshot?.sortModel), X = g(() => e.filterModel !== void 0 ? e.filterModel : y.value?.rows?.snapshot?.filterModel ?? null), Y = g(() => e.groupBy !== void 0 ? j.value ?? null : y.value?.rows?.snapshot?.groupBy ?? null), D = g(() => e.pivotModel !== void 0 ? e.pivotModel : y.value?.rows?.snapshot?.pivotModel ?? null), z = g(() => nt(e.virtualization, w.value)), C = g(() => Qe(e.layoutMode, e.minRows, e.maxRows)), A = g(() => Ie({
1004
1009
  columns: e.columns,
1005
1010
  clientRowModelOptions: e.clientRowModelOptions,
1006
1011
  computedFields: e.computedFields,
1007
1012
  formulas: e.formulas,
1008
1013
  formulaFunctions: e.formulaFunctions
1009
- })), V = g(() => je(e.columns)), L = {
1014
+ })), V = g(() => je(e.columns)), T = {
1010
1015
  get state() {
1011
1016
  return e.state;
1012
1017
  },
@@ -1035,7 +1040,7 @@ const dt = we({
1035
1040
  return e.filterModel;
1036
1041
  },
1037
1042
  get groupBy() {
1038
- return x.value;
1043
+ return j.value;
1039
1044
  },
1040
1045
  get aggregationModel() {
1041
1046
  return e.aggregationModel;
@@ -1052,73 +1057,73 @@ const dt = we({
1052
1057
  get columns() {
1053
1058
  return e.columns;
1054
1059
  }
1055
- }, I = g(() => T.value ? "pivot" : C.value && "initialTreeData" in C.value ? "tree" : "base"), W = g(() => u.value?.api.columns.getSnapshot().visibleColumns ?? []), E = g(() => u.value?.api.rows.getCount() ?? 0), Q = {
1056
- mode: g(() => I.value),
1060
+ }, K = g(() => D.value ? "pivot" : A.value && "initialTreeData" in A.value ? "tree" : "base"), L = g(() => u.value?.api.columns.getSnapshot().visibleColumns ?? []), W = g(() => u.value?.api.rows.getCount() ?? 0), H = {
1061
+ mode: g(() => K.value),
1057
1062
  resolveRuntime: () => u.value,
1058
- visibleColumns: W,
1059
- totalRows: E,
1063
+ visibleColumns: L,
1064
+ totalRows: W,
1060
1065
  showRowSelection: g(() => e.rowSelection)
1061
1066
  }, {
1062
- selectionSnapshot: X,
1063
- selectionAnchor: Y,
1064
- syncSelectionSnapshotFromRuntime: Z,
1065
- selectionService: ee,
1066
- selectionAggregatesLabel: te
1067
- } = Ge(Q), {
1068
- rowSelectionSnapshot: H,
1069
- syncRowSelectionSnapshotFromRuntime: _,
1070
- reconcileRowSelectionFromRuntime: oe,
1071
- selectionService: k
1067
+ selectionSnapshot: E,
1068
+ selectionAnchor: Z,
1069
+ syncSelectionSnapshotFromRuntime: ee,
1070
+ selectionService: te,
1071
+ selectionAggregatesLabel: oe
1072
+ } = Pe(H), {
1073
+ rowSelectionSnapshot: _,
1074
+ syncRowSelectionSnapshotFromRuntime: k,
1075
+ reconcileRowSelectionFromRuntime: ne,
1076
+ selectionService: N
1072
1077
  } = xe({
1073
1078
  resolveRuntime: () => u.value
1074
- }), t = g(() => e.rowSelection ? k : it()), i = g(() => ({
1079
+ }), re = g(() => e.rowSelection ? N : it()), U = g(() => ({
1075
1080
  ...e.services ?? {},
1076
1081
  selection: ut({
1077
1082
  userSelectionService: e.services?.selection,
1078
- cellSelectionService: ee,
1079
- rowSelectionService: t.value
1083
+ cellSelectionService: te,
1084
+ rowSelectionService: re.value
1080
1085
  })
1081
1086
  })), {
1082
- dataGridInstanceKey: l,
1083
- resolvedRowModel: c
1087
+ dataGridInstanceKey: t,
1088
+ resolvedRowModel: i
1084
1089
  } = Fe({
1085
- rows: fe(e, "rows"),
1086
- rowModel: fe(e, "rowModel"),
1087
- clientRowModelOptions: C,
1090
+ rows: ge(e, "rows"),
1091
+ rowModel: ge(e, "rowModel"),
1092
+ clientRowModelOptions: A,
1088
1093
  onOwnedRowModelRecreated: () => {
1089
- v.dispose();
1094
+ n.dispose();
1090
1095
  }
1091
- }), v = at({
1096
+ }), n = at({
1092
1097
  gridRef: u,
1093
- props: L,
1098
+ props: T,
1094
1099
  emit: {
1095
- columnState: (a) => n("update:columnState", a),
1096
- columnOrder: (a) => n("update:columnOrder", a),
1097
- hiddenColumnKeys: (a) => n("update:hiddenColumnKeys", a),
1098
- columnWidths: (a) => n("update:columnWidths", a),
1099
- columnPins: (a) => n("update:columnPins", a),
1100
- groupBy: (a) => n("update:groupBy", a),
1100
+ columnState: (a) => r("update:columnState", a),
1101
+ columnOrder: (a) => r("update:columnOrder", a),
1102
+ hiddenColumnKeys: (a) => r("update:hiddenColumnKeys", a),
1103
+ columnWidths: (a) => r("update:columnWidths", a),
1104
+ columnPins: (a) => r("update:columnPins", a),
1105
+ groupBy: (a) => r("update:groupBy", a),
1101
1106
  state: (a) => {
1102
- s.value = a, n("update:state", a);
1107
+ s.value = a, r("update:state", a);
1103
1108
  },
1104
- ready: (a) => n("ready", {
1109
+ ready: (a) => r("ready", {
1105
1110
  api: a.api,
1106
- rowModel: c.value
1111
+ rowModel: i.value
1107
1112
  })
1108
1113
  }
1109
- }), S = (a) => {
1110
- oe(), n("cell-change", a), v.emitSnapshotUpdates();
1111
- }, Re = (a) => {
1112
- n("selection-change", a);
1113
- }, Me = (a) => {
1114
- n("row-selection-change", a);
1115
- }, de = () => {
1116
- v.emitSnapshotUpdates();
1114
+ }), c = (a) => {
1115
+ ne(), r("cell-change", a), n.emitSnapshotUpdates();
1116
+ }, b = (a) => {
1117
+ r("selection-change", a);
1118
+ }, S = (a) => {
1119
+ r("row-selection-change", a);
1120
+ }, fe = () => {
1121
+ n.emitSnapshotUpdates();
1117
1122
  };
1118
1123
  p(
1119
- H,
1124
+ _,
1120
1125
  (a) => {
1121
- n("row-select", a), n("update:rowSelectionState", a), de();
1126
+ r("row-select", a), r("update:rowSelectionState", a), fe();
1122
1127
  },
1123
1128
  { deep: !0 }
1124
1129
  ), p(
@@ -1126,62 +1131,62 @@ const dt = we({
1126
1131
  ([a, m]) => {
1127
1132
  if (a) {
1128
1133
  if (m !== void 0) {
1129
- const j = u.value?.api.rowSelection;
1130
- st(H.value, m) || (m ? j?.setSnapshot(m) : j?.clear(), _());
1134
+ const I = u.value?.api.rowSelection;
1135
+ st(_.value, m) || (m ? I?.setSnapshot(m) : I?.clear(), k());
1131
1136
  return;
1132
1137
  }
1133
- _();
1138
+ k();
1134
1139
  return;
1135
1140
  }
1136
- k.clearRowSelection?.();
1141
+ N.clearRowSelection?.();
1137
1142
  },
1138
1143
  { immediate: !0 }
1139
1144
  ), p(
1140
1145
  () => e.viewMode,
1141
1146
  (a) => {
1142
- y.value = a === "gantt" ? "gantt" : "table";
1147
+ v.value = a === "gantt" ? "gantt" : "table";
1143
1148
  },
1144
1149
  { immediate: !0 }
1145
1150
  );
1146
- const ce = (a) => {
1151
+ const me = (a) => {
1147
1152
  const m = a === "gantt" ? "gantt" : "table";
1148
- y.value = m, n("update:viewMode", m);
1149
- }, be = () => {
1150
- const a = v.getState();
1151
- return a ? J({
1153
+ v.value = m, r("update:viewMode", m);
1154
+ }, Re = () => {
1155
+ const a = n.getState();
1156
+ return a ? Q({
1152
1157
  state: a,
1153
- viewMode: y.value
1158
+ viewMode: v.value
1154
1159
  }) : null;
1155
- }, Oe = (a, m) => he(a, v.migrateState, m), Be = (a, m) => {
1156
- const j = J(a);
1157
- return v.applyState(j.state, m) ? (j.viewMode && ce(j.viewMode), !0) : !1;
1160
+ }, Oe = (a, m) => be(a, n.migrateState, m), Ae = (a, m) => {
1161
+ const I = Q(a);
1162
+ return n.applyState(I.state, m) ? (I.viewMode && me(I.viewMode), !0) : !1;
1158
1163
  };
1159
- return se(() => {
1160
- v.dispose();
1164
+ return ce(() => {
1165
+ n.dispose();
1161
1166
  }), f({
1162
1167
  grid: u,
1163
- rowModel: c,
1168
+ rowModel: i,
1164
1169
  getApi: () => u.value?.api ?? null,
1165
1170
  getRuntime: () => u.value?.runtime ?? null,
1166
1171
  getCore: () => u.value?.core ?? null,
1167
- getColumnState: () => v.getColumnState(),
1172
+ getColumnState: () => n.getColumnState(),
1168
1173
  getColumnSnapshot: () => u.value?.api.columns.getSnapshot() ?? null,
1169
- getSelectionAggregatesLabel: () => te.value,
1174
+ getSelectionAggregatesLabel: () => oe.value,
1170
1175
  getSelectionSummary: () => u.value?.api.selection.summarize() ?? null,
1171
- getView: () => y.value,
1172
- setView: ce,
1173
- getSavedView: be,
1176
+ getView: () => v.value,
1177
+ setView: me,
1178
+ getSavedView: Re,
1174
1179
  migrateSavedView: Oe,
1175
- applySavedView: Be,
1176
- applyColumnState: v.applyColumnState,
1177
- getState: v.getState,
1178
- migrateState: v.migrateState,
1179
- applyState: v.applyState,
1180
- exportPivotLayout: v.exportPivotLayout,
1181
- exportPivotInterop: v.exportPivotInterop,
1182
- importPivotLayout: v.importPivotLayout,
1183
- expandAllGroups: v.expandAllGroups,
1184
- collapseAllGroups: v.collapseAllGroups,
1180
+ applySavedView: Ae,
1181
+ applyColumnState: n.applyColumnState,
1182
+ getState: n.getState,
1183
+ migrateState: n.migrateState,
1184
+ applyState: n.applyState,
1185
+ exportPivotLayout: n.exportPivotLayout,
1186
+ exportPivotInterop: n.exportPivotInterop,
1187
+ importPivotLayout: n.importPivotLayout,
1188
+ expandAllGroups: n.expandAllGroups,
1189
+ collapseAllGroups: n.collapseAllGroups,
1185
1190
  insertRowsAt: (a, m) => u.value?.api.rows.insertDataAt(a, m) ?? !1,
1186
1191
  insertRowBefore: (a, m) => u.value?.api.rows.insertDataBefore(a, m) ?? !1,
1187
1192
  insertRowAfter: (a, m) => u.value?.api.rows.insertDataAfter(a, m) ?? !1,
@@ -1190,33 +1195,33 @@ const dt = we({
1190
1195
  insertColumnAfter: (a, m) => u.value?.api.columns.insertAfter(a, m) ?? !1
1191
1196
  }), () => {
1192
1197
  const a = {
1193
- mode: I.value,
1198
+ mode: K.value,
1194
1199
  rows: e.rows,
1195
1200
  runtime: u.value?.runtime ?? null,
1196
1201
  runtimeRowModel: u.value?.rowModel ?? null,
1197
- selectionSnapshot: X,
1198
- selectionAnchor: Y,
1199
- rowSelectionSnapshot: H,
1200
- syncSelectionSnapshotFromRuntime: Z,
1201
- syncRowSelectionSnapshotFromRuntime: _,
1202
- flushRowSelectionSnapshotUpdates: de,
1203
- sortModel: $.value,
1204
- filterModel: F.value,
1205
- groupBy: z.value,
1206
- pivotModel: T.value,
1202
+ selectionSnapshot: E,
1203
+ selectionAnchor: Z,
1204
+ rowSelectionSnapshot: _,
1205
+ syncSelectionSnapshotFromRuntime: ee,
1206
+ syncRowSelectionSnapshotFromRuntime: k,
1207
+ flushRowSelectionSnapshotUpdates: fe,
1208
+ sortModel: F.value,
1209
+ filterModel: X.value,
1210
+ groupBy: Y.value,
1211
+ pivotModel: D.value,
1207
1212
  renderMode: w.value,
1208
- virtualization: K.value,
1213
+ virtualization: z.value,
1209
1214
  columnMenu: B.value,
1210
1215
  cellMenu: h.value,
1211
- rowIndexMenu: R.value,
1216
+ rowIndexMenu: M.value,
1212
1217
  columnLayout: P.value,
1213
- aggregations: G.value,
1218
+ aggregations: x.value,
1214
1219
  advancedFilter: d.value,
1215
1220
  rowHeightMode: e.rowHeightMode,
1216
1221
  baseRowHeight: e.baseRowHeight,
1217
- layoutMode: O.value.layoutMode,
1218
- minRows: O.value.minRows,
1219
- maxRows: O.value.maxRows,
1222
+ layoutMode: C.value.layoutMode,
1223
+ minRows: C.value.minRows,
1224
+ maxRows: C.value.maxRows,
1220
1225
  fillHandle: e.fillHandle,
1221
1226
  rangeMove: e.rangeMove,
1222
1227
  rowHover: e.rowHover,
@@ -1224,33 +1229,33 @@ const dt = we({
1224
1229
  isCellEditable: e.isCellEditable,
1225
1230
  showRowIndex: e.showRowIndex,
1226
1231
  rowSelection: e.rowSelection,
1227
- viewMode: y.value,
1232
+ viewMode: v.value,
1228
1233
  gantt: e.gantt,
1229
1234
  toolbarModules: e.toolbarModules
1230
1235
  };
1231
- return ue(
1236
+ return de(
1232
1237
  rt,
1233
1238
  {
1234
1239
  ...o,
1235
1240
  ref: u,
1236
- key: l.value,
1241
+ key: t.value,
1237
1242
  rows: e.rows,
1238
- rowModel: c.value,
1243
+ rowModel: i.value,
1239
1244
  columns: V.value,
1240
1245
  theme: e.theme,
1241
- layoutMode: O.value.layoutMode,
1246
+ layoutMode: C.value.layoutMode,
1242
1247
  renderMode: w.value,
1243
- pagination: b.value,
1248
+ pagination: O.value,
1244
1249
  plugins: e.plugins,
1245
- services: i.value,
1250
+ services: U.value,
1246
1251
  startupOrder: e.startupOrder,
1247
1252
  autoStart: e.autoStart,
1248
- onCellChange: S,
1249
- onSelectionChange: Re,
1250
- onRowSelectionChange: Me
1253
+ onCellChange: c,
1254
+ onSelectionChange: b,
1255
+ onRowSelectionChange: S
1251
1256
  },
1252
- r.default ? {
1253
- default: (m) => r.default?.({
1257
+ l.default ? {
1258
+ default: (m) => l.default?.({
1254
1259
  ...m,
1255
1260
  defaultRendererProps: {
1256
1261
  ...a,
@@ -1259,7 +1264,7 @@ const dt = we({
1259
1264
  }
1260
1265
  })
1261
1266
  } : {
1262
- default: (m) => ue(ze, {
1267
+ default: (m) => de(ze, {
1263
1268
  ...a,
1264
1269
  runtime: m.runtime,
1265
1270
  runtimeRowModel: m.rowModel
@@ -1268,12 +1273,12 @@ const dt = we({
1268
1273
  );
1269
1274
  };
1270
1275
  }
1271
- }), Rt = dt;
1276
+ }), Mt = dt;
1272
1277
  export {
1273
- Rt as DataGrid,
1278
+ Mt as DataGrid,
1274
1279
  ht as clearDataGridSavedViewInStorage,
1275
1280
  dt as default,
1276
- he as migrateDataGridSavedView,
1281
+ be as migrateDataGridSavedView,
1277
1282
  et as parseDataGridSavedView,
1278
1283
  St as readDataGridSavedViewFromStorage,
1279
1284
  Ze as serializeDataGridSavedView,