@affino/datagrid-vue-app 0.1.37 → 0.1.39

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.
Files changed (19) hide show
  1. package/dist/DataGrid.d.ts +1 -1
  2. package/dist/advanced-filter.js +1 -1
  3. package/dist/aggregations.js +1 -1
  4. package/dist/chunks/{DataGridAdvancedFilterPopover-CXT1rG40.js → DataGridAdvancedFilterPopover-BBLSw7c4.js} +1 -1
  5. package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-BshOPOFV.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-BUkG_Bz7.js} +1 -1
  6. package/dist/chunks/{DataGridAggregationsPopover-BRVx8c_y.js → DataGridAggregationsPopover-C8kdwv0O.js} +1 -1
  7. package/dist/chunks/{DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-CsQpLONh.js → DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-t6v8MqIT.js} +1 -1
  8. package/dist/chunks/{DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-Dc5SowKk.js → DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-xry4J3Lx.js} +66 -62
  9. package/dist/chunks/DataGridGanttStageEntry-o99nyV0i.js +9665 -0
  10. package/dist/chunks/{useDataGridAppRowModel-JUDjg-Fq.js → useDataGridAppRowModel-Dy5CF0h4.js} +1614 -1597
  11. package/dist/gantt.js +4 -4
  12. package/dist/index.js +413 -397
  13. package/dist/internal.js +28 -29
  14. package/dist/stage/dataGridTableStage.types.d.ts +2 -2
  15. package/dist/stage/useDataGridTableStageRuntime.d.ts +12 -12
  16. package/package.json +4 -4
  17. package/dist/chunks/DataGridGanttStage.vue_vue_type_script_setup_true_lang-DJ72Tgpd.js +0 -1007
  18. package/dist/chunks/DataGridGanttStageEntry-C4qhNhnp.js +0 -40
  19. package/dist/chunks/DataGridTableStage.vue_vue_type_script_setup_true_lang-Q2ri6J1V.js +0 -8604
package/dist/index.js CHANGED
@@ -1,34 +1,34 @@
1
- import { defineComponent as Fe, ref as D, provide as Xe, computed as m, watch as S, onBeforeUnmount as we, h as ge, mergeProps as Ze, toRef as Me } from "vue";
2
- import { useDataGridRuntime as et } from "@affino/datagrid-vue";
3
- import { useDataGridAppSelection as tt, useDataGridAppRowSelection as ot } from "@affino/datagrid-vue/app";
4
- import { r as nt, g as rt, h as lt, i as at, b as it, d as ut, c as st, j as dt, u as ct, D as ft } from "./chunks/useDataGridAppRowModel-JUDjg-Fq.js";
5
- import { a as Mo, k as Oo } from "./chunks/useDataGridAppRowModel-JUDjg-Fq.js";
6
- import { s as mt } from "./chunks/DataGridTableStage.vue_vue_type_script_setup_true_lang-Q2ri6J1V.js";
7
- import { applyGridTheme as yt, resolveGridThemeTokens as vt, defaultStyleConfig as F, sugarTheme as xe, industrialNeutralTheme as Oe } from "@affino/datagrid-theme";
8
- import { d as gt } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
9
- function uo() {
1
+ import { defineComponent as je, ref as P, provide as ot, computed as m, watch as S, onBeforeUnmount as pe, h as we, mergeProps as nt, unref as Ce, toRef as Oe } from "vue";
2
+ import { useDataGridRuntime as rt } from "@affino/datagrid-vue";
3
+ import { useDataGridAppSelection as lt, useDataGridAppRowSelection as at } from "@affino/datagrid-vue/app";
4
+ import { r as it, g as ut, h as st, i as dt, b as ct, d as ft, c as mt, j as yt, u as vt, D as gt } from "./chunks/useDataGridAppRowModel-Dy5CF0h4.js";
5
+ import { a as Ao, k as Bo } from "./chunks/useDataGridAppRowModel-Dy5CF0h4.js";
6
+ import { r as wt } from "./chunks/DataGridGanttStageEntry-o99nyV0i.js";
7
+ import { applyGridTheme as pt, resolveGridThemeTokens as St, defaultStyleConfig as F, sugarTheme as Ie, industrialNeutralTheme as Ae } from "@affino/datagrid-theme";
8
+ import { d as ht } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
9
+ function fo() {
10
10
  return (e) => e;
11
11
  }
12
- const wt = {
12
+ const bt = {
13
13
  default: F,
14
- "industrial-neutral": Oe,
15
- industrialNeutral: Oe,
16
- sugar: xe
14
+ "industrial-neutral": Ae,
15
+ industrialNeutral: Ae,
16
+ sugar: Ie
17
17
  };
18
- function pt(e, t) {
18
+ function Rt(e, t) {
19
19
  if (!e && !t)
20
20
  return;
21
- const r = {
21
+ const l = {
22
22
  ...e ?? {}
23
23
  };
24
24
  for (const [o, u] of Object.entries(t ?? {}))
25
- r[o] = {
26
- ...r[o] ?? {},
25
+ l[o] = {
26
+ ...l[o] ?? {},
27
27
  ...u
28
28
  };
29
- return r;
29
+ return l;
30
30
  }
31
- function de(e, t) {
31
+ function ce(e, t) {
32
32
  return {
33
33
  ...e,
34
34
  ...t,
@@ -39,34 +39,34 @@ function de(e, t) {
39
39
  summary: { ...e.summary ?? {}, ...t.summary ?? {} },
40
40
  state: { ...e.state ?? {}, ...t.state ?? {} },
41
41
  tokens: { ...e.tokens ?? {}, ...t.tokens ?? {} },
42
- tokenVariants: pt(e.tokenVariants, t.tokenVariants)
42
+ tokenVariants: Rt(e.tokenVariants, t.tokenVariants)
43
43
  };
44
44
  }
45
- function St(e) {
45
+ function Mt(e) {
46
46
  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;
47
47
  }
48
- function ht(e) {
49
- return e == null ? F : typeof e == "string" ? e === "sugar" ? de(F, xe) : wt[e] ?? F : St(e) ? de(F, e) : de(F, {
48
+ function Ct(e) {
49
+ return e == null ? F : typeof e == "string" ? e === "sugar" ? ce(F, Ie) : bt[e] ?? F : Mt(e) ? ce(F, e) : ce(F, {
50
50
  tokens: e
51
51
  });
52
52
  }
53
- function bt(e) {
54
- const t = ht(e);
55
- return vt(t ?? F, {
53
+ function Ot(e) {
54
+ const t = Ct(e);
55
+ return St(t ?? F, {
56
56
  document: typeof document > "u" ? void 0 : document
57
57
  });
58
58
  }
59
- function Ce(e, t) {
60
- const r = bt(t);
61
- return yt(e, r), r;
59
+ function Be(e, t) {
60
+ const l = Ot(t);
61
+ return pt(e, l), l;
62
62
  }
63
- function Ae(e, t) {
63
+ function Ge(e, t) {
64
64
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
65
65
  }
66
- function Be(e, t) {
66
+ function De(e, t) {
67
67
  return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : t;
68
68
  }
69
- function Rt(e) {
69
+ function At(e) {
70
70
  if (e !== void 0) {
71
71
  if (e == null)
72
72
  return null;
@@ -75,102 +75,102 @@ function Rt(e) {
75
75
  return t ? { fields: [t], expandedByDefault: !0 } : null;
76
76
  }
77
77
  if (Array.isArray(e)) {
78
- const t = e.map((r) => r.trim()).filter((r) => r.length > 0);
78
+ const t = e.map((l) => l.trim()).filter((l) => l.length > 0);
79
79
  return t.length > 0 ? { fields: [...t], expandedByDefault: !0 } : null;
80
80
  }
81
81
  return e;
82
82
  }
83
83
  }
84
- function Mt(e, t) {
84
+ function Bt(e, t) {
85
85
  return t === !0 || t && typeof t == "object" ? "pagination" : e ?? "virtualization";
86
86
  }
87
- function Ot(e, t, r, o) {
87
+ function Gt(e, t, l, o) {
88
88
  if (t !== "pagination")
89
89
  return null;
90
- const u = 100, a = Be(r, u), v = Ae(o, 0);
90
+ const u = 100, a = De(l, u), v = Ge(o, 0);
91
91
  return e === !0 || e === !1 || e == null ? {
92
92
  pageSize: a,
93
93
  currentPage: v
94
94
  } : {
95
- pageSize: Be(r ?? e.pageSize, u),
96
- currentPage: Ae(o ?? e.currentPage, 0)
95
+ pageSize: De(l ?? e.pageSize, u),
96
+ currentPage: Ge(o ?? e.currentPage, 0)
97
97
  };
98
98
  }
99
- const ce = "Advanced filter";
100
- function Ct(e) {
99
+ const fe = "Advanced filter";
100
+ function Dt(e) {
101
101
  return typeof e == "boolean" ? {
102
102
  enabled: e,
103
- buttonLabel: ce
103
+ buttonLabel: fe
104
104
  } : e ? {
105
105
  enabled: e.enabled ?? !0,
106
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ce
106
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : fe
107
107
  } : {
108
108
  enabled: !1,
109
- buttonLabel: ce
109
+ buttonLabel: fe
110
110
  };
111
111
  }
112
- const fe = "Find / replace";
113
- function At(e) {
112
+ const me = "Find / replace";
113
+ function Pt(e) {
114
114
  return typeof e == "boolean" ? {
115
115
  enabled: e,
116
- buttonLabel: fe
116
+ buttonLabel: me
117
117
  } : e ? {
118
118
  enabled: e.enabled ?? !0,
119
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : fe
119
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : me
120
120
  } : {
121
121
  enabled: !1,
122
- buttonLabel: fe
122
+ buttonLabel: me
123
123
  };
124
124
  }
125
- const Bt = "all", je = {
125
+ const Lt = "all", Ke = {
126
126
  all: "columns",
127
127
  rows: "none",
128
128
  columns: "columns",
129
129
  none: "none"
130
130
  };
131
- function Ge(e) {
132
- return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : Bt;
131
+ function Pe(e) {
132
+ return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : Lt;
133
133
  }
134
- function Gt(e, t) {
135
- return e === "columns" || e === "none" ? e : je[t];
134
+ function xt(e, t) {
135
+ return e === "columns" || e === "none" ? e : Ke[t];
136
136
  }
137
- function De(e, t) {
137
+ function Le(e, t) {
138
138
  return e !== "none" || t === "columns";
139
139
  }
140
- function Pe(e) {
141
- const t = e.body === "all" || e.body === "rows", r = e.body === "all" || e.body === "columns", o = e.header === "columns";
140
+ function xe(e) {
141
+ const t = e.body === "all" || e.body === "rows", l = e.body === "all" || e.body === "columns", o = e.header === "columns";
142
142
  return {
143
143
  body: e.body,
144
144
  header: e.header,
145
145
  pinnedSeparators: e.pinnedSeparators,
146
146
  bodyRows: t,
147
- bodyColumns: r,
147
+ bodyColumns: l,
148
148
  headerColumns: o
149
149
  };
150
150
  }
151
- function Dt(e) {
151
+ function Ft(e) {
152
152
  if (typeof e == "string") {
153
- const o = Ge(e), u = je[o];
154
- return Pe({
153
+ const o = Pe(e), u = Ke[o];
154
+ return xe({
155
155
  body: o,
156
156
  header: u,
157
- pinnedSeparators: De(o, u)
157
+ pinnedSeparators: Le(o, u)
158
158
  });
159
159
  }
160
- const t = Ge(e?.body), r = Gt(e?.header, t);
161
- return Pe({
160
+ const t = Pe(e?.body), l = xt(e?.header, t);
161
+ return xe({
162
162
  body: t,
163
- header: r,
164
- pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : De(t, r)
163
+ header: l,
164
+ pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : Le(t, l)
165
165
  });
166
166
  }
167
- function Le(e) {
167
+ function Fe(e) {
168
168
  if (typeof e != "number" || !Number.isFinite(e))
169
169
  return null;
170
170
  const t = Math.max(0, Math.trunc(e));
171
171
  return t > 0 ? t : null;
172
172
  }
173
- function Pt(e, t, r) {
173
+ function jt(e, t, l) {
174
174
  const o = e === "auto-height" ? "auto-height" : "fill";
175
175
  if (o !== "auto-height")
176
176
  return {
@@ -178,15 +178,15 @@ function Pt(e, t, r) {
178
178
  minRows: null,
179
179
  maxRows: null
180
180
  };
181
- const u = Le(t);
182
- let a = Le(r);
181
+ const u = Fe(t);
182
+ let a = Fe(l);
183
183
  return u !== null && a !== null && a < u && (a = u), {
184
184
  layoutMode: o,
185
185
  minRows: u,
186
186
  maxRows: a
187
187
  };
188
188
  }
189
- function Lt(e) {
189
+ function It(e) {
190
190
  return {
191
191
  ...e,
192
192
  transaction: null
@@ -195,14 +195,14 @@ function Lt(e) {
195
195
  function X(e) {
196
196
  return {
197
197
  ...e,
198
- state: Lt(e.state)
198
+ state: It(e.state)
199
199
  };
200
200
  }
201
- function Ft(e) {
201
+ function Kt(e) {
202
202
  return typeof e == "object" && e !== null;
203
203
  }
204
- function Ke(e, t, r) {
205
- const o = Ft(e) ? e : null, u = t(o && "state" in o ? o.state : e, r);
204
+ function He(e, t, l) {
205
+ const o = Kt(e) ? e : null, u = t(o && "state" in o ? o.state : e, l);
206
206
  if (!u)
207
207
  return null;
208
208
  const a = o?.viewMode, v = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
@@ -211,38 +211,38 @@ function Ke(e, t, r) {
211
211
  ...v ? { viewMode: v } : {}
212
212
  });
213
213
  }
214
- function xt(e) {
214
+ function Ht(e) {
215
215
  return JSON.stringify(X(e));
216
216
  }
217
- function jt(e, t, r) {
217
+ function zt(e, t, l) {
218
218
  if (typeof e != "string" || e.trim().length === 0)
219
219
  return null;
220
220
  try {
221
- return Ke(JSON.parse(e), t, r);
221
+ return He(JSON.parse(e), t, l);
222
222
  } catch {
223
223
  return null;
224
224
  }
225
225
  }
226
- function so(e, t, r) {
226
+ function mo(e, t, l) {
227
227
  if (!e || typeof t != "string" || t.trim().length === 0)
228
228
  return !1;
229
229
  try {
230
- return e.setItem(t, xt(r)), !0;
230
+ return e.setItem(t, Ht(l)), !0;
231
231
  } catch {
232
232
  return !1;
233
233
  }
234
234
  }
235
- function co(e, t, r, o) {
235
+ function yo(e, t, l, o) {
236
236
  if (!e || typeof t != "string" || t.trim().length === 0)
237
237
  return null;
238
238
  try {
239
239
  const u = e.getItem(t);
240
- return u ? jt(u, r, o) : null;
240
+ return u ? zt(u, l, o) : null;
241
241
  } catch {
242
242
  return null;
243
243
  }
244
244
  }
245
- function fo(e, t) {
245
+ function vo(e, t) {
246
246
  if (!e || typeof t != "string" || t.trim().length === 0)
247
247
  return !1;
248
248
  try {
@@ -251,54 +251,54 @@ function fo(e, t) {
251
251
  return !1;
252
252
  }
253
253
  }
254
- const me = "Columns";
255
- function Kt(e) {
254
+ const ye = "Columns";
255
+ function Tt(e) {
256
256
  return typeof e == "boolean" ? {
257
257
  enabled: e,
258
- buttonLabel: me
258
+ buttonLabel: ye
259
259
  } : e ? {
260
260
  enabled: e.enabled ?? !0,
261
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : me
261
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ye
262
262
  } : {
263
263
  enabled: !1,
264
- buttonLabel: me
264
+ buttonLabel: ye
265
265
  };
266
266
  }
267
- const ye = "Aggregations";
268
- function It(e) {
267
+ const ve = "Aggregations";
268
+ function Et(e) {
269
269
  return typeof e == "boolean" ? {
270
270
  enabled: e,
271
- buttonLabel: ye
271
+ buttonLabel: ve
272
272
  } : e ? {
273
273
  enabled: e.enabled ?? !0,
274
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ye
274
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ve
275
275
  } : {
276
276
  enabled: !1,
277
- buttonLabel: ye
277
+ buttonLabel: ve
278
278
  };
279
279
  }
280
280
  function $(e, t) {
281
281
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
282
282
  }
283
- function Ht(e, t) {
284
- const r = {
283
+ function Vt(e, t) {
284
+ const l = {
285
285
  rows: !0,
286
286
  columns: !1,
287
287
  rowOverscan: 8,
288
288
  columnOverscan: 2
289
289
  };
290
290
  if (e === !0)
291
- r.columns = !0;
291
+ l.columns = !0;
292
292
  else if (e === !1)
293
- r.rows = !1, r.columns = !1;
293
+ l.rows = !1, l.columns = !1;
294
294
  else if (e && typeof e == "object") {
295
- r.rows = e.rows ?? r.rows, r.columns = e.columns ?? r.columns;
296
- const o = $(e.overscan, r.rowOverscan);
297
- r.rowOverscan = $(e.rowOverscan, o), r.columnOverscan = $(e.columnOverscan, $(e.overscan, r.columnOverscan));
295
+ l.rows = e.rows ?? l.rows, l.columns = e.columns ?? l.columns;
296
+ const o = $(e.overscan, l.rowOverscan);
297
+ l.rowOverscan = $(e.rowOverscan, o), l.columnOverscan = $(e.columnOverscan, $(e.overscan, l.columnOverscan));
298
298
  }
299
- return t === "pagination" && (r.rows = !1), r;
299
+ return t === "pagination" && (l.rows = !1), l;
300
300
  }
301
- const zt = Fe({
301
+ const _t = je({
302
302
  name: "DataGridRuntimeHost",
303
303
  inheritAttrs: !1,
304
304
  props: {
@@ -352,11 +352,11 @@ const zt = Fe({
352
352
  "selection-change": (e) => !0,
353
353
  "row-selection-change": (e) => !0
354
354
  },
355
- setup(e, { attrs: t, slots: r, emit: o, expose: u }) {
356
- const a = D(null);
357
- Xe(gt, a);
355
+ setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
356
+ const a = P(null);
357
+ ot(ht, a);
358
358
  let v = null;
359
- const s = et({
359
+ const s = rt({
360
360
  rows: m(() => e.rows),
361
361
  rowModel: e.rowModel,
362
362
  columns: m(() => e.columns),
@@ -377,10 +377,10 @@ const zt = Fe({
377
377
  resolveBodyRowIndexById: p.resolveBodyRowIndexById
378
378
  }, A = () => {
379
379
  if (e.renderMode === "pagination") {
380
- const c = e.pagination ?? { pageSize: 100, currentPage: 0 };
380
+ const f = e.pagination ?? { pageSize: 100, currentPage: 0 };
381
381
  s.api.rows.setPagination({
382
- pageSize: Math.max(1, Math.trunc(c.pageSize)),
383
- currentPage: Math.max(0, Math.trunc(c.currentPage))
382
+ pageSize: Math.max(1, Math.trunc(f.pageSize)),
383
+ currentPage: Math.max(0, Math.trunc(f.currentPage))
384
384
  });
385
385
  return;
386
386
  }
@@ -399,34 +399,34 @@ const zt = Fe({
399
399
  },
400
400
  { immediate: !0, deep: !0 }
401
401
  ), typeof document < "u" && (v = new MutationObserver(() => {
402
- const c = a.value;
403
- c && Ce(c, e.theme);
402
+ const f = a.value;
403
+ f && Be(f, e.theme);
404
404
  }), v.observe(document.documentElement, {
405
405
  attributes: !0,
406
406
  attributeFilter: ["class", "data-theme"]
407
407
  })), S(
408
408
  [() => e.theme, a],
409
409
  () => {
410
- const c = a.value;
411
- c && Ce(c, e.theme);
410
+ const f = a.value;
411
+ f && Be(f, e.theme);
412
412
  },
413
413
  { immediate: !0, deep: !0 }
414
414
  );
415
- const R = s.api.events.on("rows:changed", (c) => {
416
- o("cell-change", c);
417
- }), b = s.api.events.on("selection:changed", (c) => {
418
- o("selection-change", c);
419
- }), P = s.api.events.on("row-selection:changed", (c) => {
420
- o("row-selection-change", c);
415
+ const R = s.api.events.on("rows:changed", (f) => {
416
+ o("cell-change", f);
417
+ }), b = s.api.events.on("selection:changed", (f) => {
418
+ o("selection-change", f);
419
+ }), L = s.api.events.on("row-selection:changed", (f) => {
420
+ o("row-selection-change", f);
421
421
  });
422
- we(() => {
423
- R(), b(), P(), v?.disconnect(), v = null;
422
+ pe(() => {
423
+ R(), b(), L(), v?.disconnect(), v = null;
424
424
  });
425
- const G = m(() => {
426
- const c = s.virtualWindow.value;
425
+ const D = m(() => {
426
+ const f = s.virtualWindow.value;
427
427
  return {
428
- ...c ?? {},
429
- rowTotal: c?.rowTotal ?? s.rowPartition.value.bodyRowCount,
428
+ ...f ?? {},
429
+ rowTotal: f?.rowTotal ?? s.rowPartition.value.bodyRowCount,
430
430
  colTotal: s.columnSnapshot.value.visibleColumns.length
431
431
  };
432
432
  });
@@ -445,9 +445,9 @@ const zt = Fe({
445
445
  virtualWindow: s.virtualWindow,
446
446
  start: s.start,
447
447
  stop: s.stop
448
- }), () => ge(
448
+ }), () => we(
449
449
  "div",
450
- Ze(t, {
450
+ nt(t, {
451
451
  ref: a,
452
452
  class: [
453
453
  "affino-datagrid-app-root",
@@ -461,7 +461,7 @@ const zt = Fe({
461
461
  minWidth: "0"
462
462
  }
463
463
  }),
464
- r.default?.({
464
+ l.default?.({
465
465
  api: s.api,
466
466
  core: s.core,
467
467
  runtime: h,
@@ -474,72 +474,72 @@ const zt = Fe({
474
474
  syncBodyRowsInRange: s.syncBodyRowsInRange,
475
475
  getBodyRowAtIndex: p.getBodyRowAtIndex,
476
476
  resolveBodyRowIndexById: p.resolveBodyRowIndexById,
477
- virtualWindow: G.value
477
+ virtualWindow: D.value
478
478
  }) ?? []
479
479
  );
480
480
  }
481
481
  });
482
- function ve(e) {
482
+ function ge(e) {
483
483
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
484
484
  }
485
- function C(e) {
485
+ function O(e) {
486
486
  try {
487
487
  return JSON.stringify(e);
488
488
  } catch {
489
489
  return null;
490
490
  }
491
491
  }
492
- function Tt(e) {
492
+ function Wt(e) {
493
493
  return e ? {
494
494
  fields: [...e.fields],
495
495
  expandedByDefault: e.expandedByDefault
496
496
  } : null;
497
497
  }
498
- function Et(e) {
499
- let t = null, r = null, o = !1, u = null, a = null, v = null, s = null, p = null, h = null, A = null, R = null, b = null;
500
- const P = () => {
501
- t?.(), r?.(), t = null, r = null;
502
- }, G = () => {
498
+ function kt(e) {
499
+ let t = null, l = null, o = !1, u = null, a = null, v = null, s = null, p = null, h = null, A = null, R = null, b = null;
500
+ const L = () => {
501
+ t?.(), l?.(), t = null, l = null;
502
+ }, D = () => {
503
503
  const n = e.gridRef.value;
504
504
  return !n || n.api.lifecycle.state === "disposed" ? null : n;
505
- }, c = () => G()?.api ?? null, L = () => {
506
- const n = c()?.columns;
505
+ }, f = () => D()?.api ?? null, x = () => {
506
+ const n = f()?.columns;
507
507
  if (!n)
508
508
  return null;
509
- const d = n.getSnapshot(), i = {}, y = {}, O = {};
509
+ const d = n.getSnapshot(), i = {}, y = {}, C = {};
510
510
  for (const M of d.columns)
511
- i[M.key] = M.visible, y[M.key] = M.width, O[M.key] = M.pin;
511
+ i[M.key] = M.visible, y[M.key] = M.width, C[M.key] = M.pin;
512
512
  return {
513
513
  order: [...d.order],
514
514
  visibility: i,
515
515
  widths: y,
516
- pins: O
516
+ pins: C
517
517
  };
518
518
  }, g = () => {
519
519
  o || (o = !0, queueMicrotask(() => {
520
520
  o = !1;
521
- const n = L(), d = c();
521
+ const n = x(), d = f();
522
522
  if (n) {
523
- const i = C(n);
523
+ const i = O(n);
524
524
  h = i, i !== v && (v = i, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
525
525
  Object.entries(n.visibility).filter(([, y]) => !y).map(([y]) => y)
526
526
  ), e.emit.columnWidths(n.widths), e.emit.columnPins(n.pins));
527
527
  }
528
528
  if (d) {
529
- const i = Tt(d.rows.getSnapshot().groupBy), y = C(i);
529
+ const i = Wt(d.rows.getSnapshot().groupBy), y = O(i);
530
530
  y !== p && (p = y, e.emit.groupBy(i));
531
- const O = d.state.get(), M = C(O);
532
- A = M, M !== s && (s = M, e.emit.state(O));
531
+ const C = d.state.get(), M = O(C);
532
+ A = M, M !== s && (s = M, e.emit.state(C));
533
533
  }
534
534
  }));
535
535
  }, H = () => {
536
- const n = c();
536
+ const n = f();
537
537
  !n || e.props.sortModel === void 0 && e.props.filterModel === void 0 || n.rows.setSortAndFilterModel({
538
538
  sortModel: e.props.sortModel ?? [],
539
539
  filterModel: e.props.filterModel ?? null
540
540
  });
541
541
  }, Z = () => {
542
- const n = c()?.columns;
542
+ const n = f()?.columns;
543
543
  return n ? new Set(n.getSnapshot().columns.map((d) => d.key)) : null;
544
544
  }, ee = (n) => {
545
545
  const d = /* @__PURE__ */ new Set();
@@ -559,35 +559,35 @@ function Et(e) {
559
559
  if (!d)
560
560
  return !1;
561
561
  const i = ee(n);
562
- if (i.size === 0 || e.props.columns.length > 0)
562
+ if (i.size === 0)
563
563
  return !0;
564
564
  for (const y of i)
565
565
  if (!d.has(y))
566
566
  return !1;
567
567
  return !0;
568
568
  }, T = (n) => z(n.columns), U = (n) => {
569
- const d = c();
569
+ const d = f();
570
570
  if (!d)
571
571
  return !1;
572
572
  d.columns.setOrder(n.order);
573
573
  for (const [i, y] of Object.entries(n.visibility))
574
574
  d.columns.setVisibility(i, y);
575
575
  for (const [i, y] of Object.entries(n.widths))
576
- d.columns.setWidth(i, ve(y));
576
+ d.columns.setWidth(i, ge(y));
577
577
  for (const [i, y] of Object.entries(n.pins))
578
578
  d.columns.setPin(i, y);
579
579
  return !0;
580
- }, x = () => {
580
+ }, j = () => {
581
581
  if (b) {
582
- const n = b, d = c();
582
+ const n = b, d = f();
583
583
  if (d) {
584
584
  const i = d.state.migrate(n.state, { strict: n.options?.strict });
585
- i && T(i) && (b = null, d.state.set(i, n.options), a = C(n.state));
585
+ i && T(i) && (b = null, d.state.set(i, n.options), a = O(n.state));
586
586
  }
587
587
  }
588
588
  if (R && z(R.columnState)) {
589
589
  const n = R;
590
- R = null, u = C({
590
+ R = null, u = O({
591
591
  columnState: n.columnState,
592
592
  columnOrder: null,
593
593
  hiddenColumnKeys: null,
@@ -596,19 +596,19 @@ function Et(e) {
596
596
  }), U(n.columnState);
597
597
  }
598
598
  }, E = () => {
599
- const n = c();
599
+ const n = f();
600
600
  !n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
601
601
  }, V = () => {
602
- const n = c();
602
+ const n = f();
603
603
  !n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
604
- }, j = () => {
605
- const n = c();
604
+ }, I = () => {
605
+ const n = f();
606
606
  !n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
607
607
  }, B = () => {
608
- const n = c();
608
+ const n = f();
609
609
  if (!n || e.props.columnState === void 0 && e.props.columnOrder === void 0 && e.props.hiddenColumnKeys === void 0 && e.props.columnWidths === void 0 && e.props.columnPins === void 0)
610
610
  return;
611
- const d = C({
611
+ const d = O({
612
612
  columnState: e.props.columnState,
613
613
  columnOrder: e.props.columnOrder,
614
614
  hiddenColumnKeys: e.props.hiddenColumnKeys,
@@ -616,7 +616,7 @@ function Et(e) {
616
616
  columnPins: e.props.columnPins
617
617
  });
618
618
  if (d !== u) {
619
- if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && C(e.props.columnState) === h) {
619
+ if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && O(e.props.columnState) === h) {
620
620
  u = d;
621
621
  return;
622
622
  }
@@ -625,28 +625,28 @@ function Et(e) {
625
625
  for (const [i, y] of Object.entries(e.props.columnState.visibility))
626
626
  n.columns.setVisibility(i, y);
627
627
  for (const [i, y] of Object.entries(e.props.columnState.widths))
628
- n.columns.setWidth(i, ve(y));
628
+ n.columns.setWidth(i, ge(y));
629
629
  for (const [i, y] of Object.entries(e.props.columnState.pins))
630
630
  n.columns.setPin(i, y);
631
631
  }
632
632
  if (e.props.columnOrder && n.columns.setOrder(e.props.columnOrder), e.props.hiddenColumnKeys) {
633
633
  const i = new Set(e.props.hiddenColumnKeys), y = n.columns.getSnapshot();
634
- for (const O of y.columns)
635
- n.columns.setVisibility(O.key, !i.has(O.key));
634
+ for (const C of y.columns)
635
+ n.columns.setVisibility(C.key, !i.has(C.key));
636
636
  }
637
637
  if (e.props.columnWidths)
638
638
  for (const [i, y] of Object.entries(e.props.columnWidths))
639
- n.columns.setWidth(i, ve(y));
639
+ n.columns.setWidth(i, ge(y));
640
640
  if (e.props.columnPins)
641
641
  for (const [i, y] of Object.entries(e.props.columnPins))
642
642
  n.columns.setPin(i, y);
643
643
  u = d;
644
644
  }
645
645
  }, _ = () => {
646
- const n = c();
646
+ const n = f();
647
647
  if (!n || e.props.state == null)
648
648
  return;
649
- const d = C(e.props.state);
649
+ const d = O(e.props.state);
650
650
  if (d === a)
651
651
  return;
652
652
  if (d === A) {
@@ -656,34 +656,34 @@ function Et(e) {
656
656
  const i = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
657
657
  i && T(i) && (n.state.set(i, e.props.stateOptions ?? {}), a = d);
658
658
  }, W = () => {
659
- const n = c();
659
+ const n = f();
660
660
  n && (n.view.setRowHeightMode(e.props.rowHeightMode), n.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
661
661
  }, N = () => {
662
- const n = G();
663
- n && (u = null, a = null, P(), t = n.rowModel.subscribe(() => {
662
+ const n = D();
663
+ n && (u = null, a = null, L(), t = n.rowModel.subscribe(() => {
664
664
  g();
665
- }), r = n.columnModel.subscribe(() => {
665
+ }), l = n.columnModel.subscribe(() => {
666
666
  g();
667
- }), _(), B(), H(), E(), V(), j(), W(), x(), g(), e.emit.ready({ api: n.api }));
668
- }, q = () => c()?.state.get() ?? null, te = (n, d) => c()?.state.migrate(n, d) ?? null, K = (n) => z(n) ? (u = C({
667
+ }), _(), B(), H(), E(), V(), I(), W(), j(), g(), e.emit.ready({ api: n.api }));
668
+ }, q = () => f()?.state.get() ?? null, te = (n, d) => f()?.state.migrate(n, d) ?? null, K = (n) => z(n) ? (u = O({
669
669
  columnState: n,
670
670
  columnOrder: null,
671
671
  hiddenColumnKeys: null,
672
672
  columnWidths: null,
673
673
  columnPins: null
674
674
  }), R = null, U(n) ? (g(), !0) : (R = { columnState: n }, !0)) : (R = { columnState: n }, !0), oe = (n, d) => {
675
- const i = c();
675
+ const i = f();
676
676
  if (!i)
677
677
  return b = { state: n, options: d }, !0;
678
678
  const y = i.state.migrate(n, { strict: d?.strict });
679
- return y ? T(y) ? (i.state.set(y, d), a = C(n), b = null, g(), !0) : (b = { state: n, options: d }, !0) : !1;
680
- }, ne = () => c()?.pivot.exportLayout() ?? null, J = () => c()?.pivot.exportInterop() ?? null, re = (n, d) => {
681
- const i = c();
679
+ return y ? T(y) ? (i.state.set(y, d), a = O(n), b = null, g(), !0) : (b = { state: n, options: d }, !0) : !1;
680
+ }, ne = () => f()?.pivot.exportLayout() ?? null, J = () => f()?.pivot.exportInterop() ?? null, re = (n, d) => {
681
+ const i = f();
682
682
  return i ? (i.pivot.importLayout(n, d), g(), !0) : !1;
683
683
  }, k = () => {
684
- c()?.rows.expandAllGroups(), g();
684
+ f()?.rows.expandAllGroups(), g();
685
685
  }, le = () => {
686
- c()?.rows.collapseAllGroups(), g();
686
+ f()?.rows.collapseAllGroups(), g();
687
687
  };
688
688
  S(
689
689
  () => e.gridRef.value,
@@ -694,13 +694,13 @@ function Et(e) {
694
694
  ), S(
695
695
  () => e.props.columns,
696
696
  () => {
697
- u = null, a = null, _(), B(), x(), g();
697
+ u = null, a = null, _(), B(), j(), g();
698
698
  },
699
699
  { deep: !0 }
700
700
  ), S(
701
701
  () => [e.props.state, e.props.stateOptions],
702
702
  () => {
703
- _(), B(), H(), E(), V(), j(), W(), x(), g();
703
+ _(), B(), H(), E(), V(), I(), W(), j(), g();
704
704
  },
705
705
  { deep: !0 }
706
706
  ), S(
@@ -712,7 +712,7 @@ function Et(e) {
712
712
  e.props.columnPins
713
713
  ],
714
714
  () => {
715
- B(), x(), g();
715
+ B(), j(), g();
716
716
  },
717
717
  { deep: !0 }
718
718
  ), S(
@@ -736,7 +736,7 @@ function Et(e) {
736
736
  ), S(
737
737
  () => e.props.pivotModel,
738
738
  () => {
739
- j(), g();
739
+ I(), g();
740
740
  },
741
741
  { deep: !0 }
742
742
  ), S(
@@ -746,15 +746,15 @@ function Et(e) {
746
746
  }
747
747
  );
748
748
  const Y = () => {
749
- P();
749
+ L();
750
750
  };
751
- return we(() => {
751
+ return pe(() => {
752
752
  Y();
753
753
  }), {
754
754
  emitSnapshotUpdates: g,
755
755
  handleGridReady: N,
756
756
  dispose: Y,
757
- getColumnState: L,
757
+ getColumnState: x,
758
758
  getState: q,
759
759
  migrateState: te,
760
760
  applyColumnState: K,
@@ -766,26 +766,26 @@ function Et(e) {
766
766
  collapseAllGroups: le
767
767
  };
768
768
  }
769
- function Vt(e) {
769
+ function Ut(e) {
770
770
  if (!Number.isFinite(e))
771
771
  return;
772
772
  const t = Math.trunc(e);
773
773
  return t > 0 ? t : void 0;
774
774
  }
775
- function _t(e) {
775
+ function Nt(e) {
776
776
  return e === !1 ? !1 : e === "window" ? "window" : "grid";
777
777
  }
778
- function Wt(e) {
778
+ function qt(e) {
779
779
  return e === !0 || e === "toolbar" ? "toolbar" : e === "external-only" ? "external-only" : !1;
780
780
  }
781
- function kt() {
781
+ function Jt() {
782
782
  return {
783
783
  canUndo: () => !1,
784
784
  canRedo: () => !1,
785
785
  runHistoryAction: async () => null
786
786
  };
787
787
  }
788
- function Ut(e) {
788
+ function Yt(e) {
789
789
  if (e === !1)
790
790
  return {
791
791
  enabled: !1,
@@ -796,9 +796,9 @@ function Ut(e) {
796
796
  const t = typeof e == "object" && e !== null ? e : {};
797
797
  return e === void 0 || e === !0 || t.enabled !== !1 ? {
798
798
  enabled: !0,
799
- depth: Vt(t.depth),
800
- shortcuts: _t(t.shortcuts),
801
- controls: Wt(t.controls),
799
+ depth: Ut(t.depth),
800
+ shortcuts: Nt(t.shortcuts),
801
+ controls: qt(t.controls),
802
802
  adapter: t.adapter
803
803
  } : {
804
804
  enabled: !1,
@@ -807,27 +807,27 @@ function Ut(e) {
807
807
  controls: !1
808
808
  };
809
809
  }
810
- function mo() {
810
+ function go() {
811
811
  return (e) => e;
812
812
  }
813
- function yo() {
813
+ function wo() {
814
814
  return (e) => e;
815
815
  }
816
- function vo() {
816
+ function po() {
817
817
  return (e) => e;
818
818
  }
819
- function go() {
819
+ function So() {
820
820
  return (e) => e;
821
821
  }
822
- function wo() {
822
+ function ho() {
823
823
  return (e) => e;
824
824
  }
825
- function Nt(e, t) {
825
+ function $t(e, t) {
826
826
  if (!t || typeof e != "object" || e === null)
827
827
  return;
828
- const r = t.split(".").filter(Boolean);
828
+ const l = t.split(".").filter(Boolean);
829
829
  let o = e;
830
- for (const u of r) {
830
+ for (const u of l) {
831
831
  if (Array.isArray(o)) {
832
832
  const a = Number(u);
833
833
  if (!Number.isInteger(a) || a < 0 || a >= o.length)
@@ -841,20 +841,20 @@ function Nt(e, t) {
841
841
  }
842
842
  return o;
843
843
  }
844
- function qt(e, t) {
845
- const r = /* @__PURE__ */ new Map();
844
+ function Qt(e, t) {
845
+ const l = /* @__PURE__ */ new Map();
846
846
  for (const o of e ?? []) {
847
847
  const u = String(o.key ?? "").trim();
848
- u && r.set(u, o);
848
+ u && l.set(u, o);
849
849
  }
850
- if (!(r.size === 0 && typeof t != "function"))
850
+ if (!(l.size === 0 && typeof t != "function"))
851
851
  return (o, u) => {
852
852
  if (typeof t == "function") {
853
853
  const h = t(o, u);
854
854
  if (typeof h < "u")
855
855
  return h;
856
856
  }
857
- const a = r.get(String(u ?? "").trim());
857
+ const a = l.get(String(u ?? "").trim());
858
858
  if (!a)
859
859
  return;
860
860
  const v = o.data;
@@ -866,10 +866,10 @@ function qt(e, t) {
866
866
  if (!s)
867
867
  return;
868
868
  const p = v[s];
869
- return typeof p < "u" ? p : Nt(v, s);
869
+ return typeof p < "u" ? p : $t(v, s);
870
870
  };
871
871
  }
872
- function Jt() {
872
+ function Xt() {
873
873
  return {
874
874
  name: "selection",
875
875
  getRowSelectionSnapshot: () => null,
@@ -893,28 +893,28 @@ function Jt() {
893
893
  };
894
894
  }
895
895
  function Q(e, t) {
896
- const r = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
897
- if (r.length !== 0)
896
+ const l = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
897
+ if (l.length !== 0)
898
898
  return async (o) => {
899
- for (const u of r)
899
+ for (const u of l)
900
900
  await u(o);
901
901
  };
902
902
  }
903
- function Yt(e) {
903
+ function Zt(e) {
904
904
  const {
905
905
  userSelectionService: t,
906
- cellSelectionService: r,
906
+ cellSelectionService: l,
907
907
  rowSelectionService: o
908
908
  } = e;
909
909
  return {
910
910
  name: "selection",
911
- init: Q("init", [t, r, o]),
912
- start: Q("start", [t, r, o]),
913
- stop: Q("stop", [t, r, o]),
914
- dispose: Q("dispose", [t, r, o]),
915
- getSelectionSnapshot: r.getSelectionSnapshot,
916
- setSelectionSnapshot: r.setSelectionSnapshot,
917
- clearSelection: r.clearSelection,
911
+ init: Q("init", [t, l, o]),
912
+ start: Q("start", [t, l, o]),
913
+ stop: Q("stop", [t, l, o]),
914
+ dispose: Q("dispose", [t, l, o]),
915
+ getSelectionSnapshot: l.getSelectionSnapshot,
916
+ setSelectionSnapshot: l.setSelectionSnapshot,
917
+ clearSelection: l.clearSelection,
918
918
  getRowSelectionSnapshot: o.getRowSelectionSnapshot,
919
919
  setRowSelectionSnapshot: o.setRowSelectionSnapshot,
920
920
  clearRowSelection: o.clearRowSelection,
@@ -928,41 +928,41 @@ function Yt(e) {
928
928
  clearSelectedRows: o.clearSelectedRows
929
929
  };
930
930
  }
931
- function $t(e, t) {
931
+ function eo(e, t) {
932
932
  if (e?.focusedRow !== t?.focusedRow)
933
933
  return !1;
934
- const r = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
935
- if (r.length !== o.length)
934
+ const l = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
935
+ if (l.length !== o.length)
936
936
  return !1;
937
- for (let u = 0; u < r.length; u += 1)
938
- if (r[u] !== o[u])
937
+ for (let u = 0; u < l.length; u += 1)
938
+ if (l[u] !== o[u])
939
939
  return !1;
940
940
  return !0;
941
941
  }
942
- function Qt(e, t) {
942
+ function to(e, t) {
943
943
  if (e === t)
944
944
  return !0;
945
- const r = Object.entries(e ?? {}), o = Object.entries(t ?? {});
946
- if (r.length !== o.length)
945
+ const l = Object.entries(e ?? {}), o = Object.entries(t ?? {});
946
+ if (l.length !== o.length)
947
947
  return !1;
948
- for (const [u, a] of r)
948
+ for (const [u, a] of l)
949
949
  if (!Object.is(a, t?.[u]))
950
950
  return !1;
951
951
  return !0;
952
952
  }
953
- function Xt(e, t) {
953
+ function oo(e, t) {
954
954
  if (e === t)
955
955
  return !0;
956
956
  if (e.length !== t.length)
957
957
  return !1;
958
- for (let r = 0; r < e.length; r += 1) {
959
- const o = e[r], u = t[r];
960
- if (!o || !u || o.key !== u.key || o.component !== u.component || !Qt(o.props, u.props))
958
+ for (let l = 0; l < e.length; l += 1) {
959
+ const o = e[l], u = t[l];
960
+ if (!o || !u || o.key !== u.key || o.component !== u.component || !to(o.props, u.props))
961
961
  return !1;
962
962
  }
963
963
  return !0;
964
964
  }
965
- const Zt = {
965
+ const no = {
966
966
  rows: {
967
967
  type: Array,
968
968
  default: () => []
@@ -1223,10 +1223,10 @@ const Zt = {
1223
1223
  type: Array,
1224
1224
  default: void 0
1225
1225
  }
1226
- }, Ie = Fe({
1226
+ }, ze = je({
1227
1227
  name: "DataGrid",
1228
1228
  inheritAttrs: !1,
1229
- props: Zt,
1229
+ props: no,
1230
1230
  emits: {
1231
1231
  "cell-change": (e) => !0,
1232
1232
  "selection-change": (e) => !0,
@@ -1244,34 +1244,34 @@ const Zt = {
1244
1244
  "toolbar-modules-change": (e) => !0,
1245
1245
  ready: (e) => !0
1246
1246
  },
1247
- setup(e, { attrs: t, slots: r, emit: o, expose: u }) {
1248
- const a = D(null), v = kt(), s = D(null), p = D(null), h = D([]);
1247
+ setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
1248
+ const a = P(null), v = Jt(), s = P(null), p = P(null), h = P([]);
1249
1249
  let A = null, R = !1;
1250
- const b = D(e.viewMode === "gantt" ? "gantt" : "table"), P = D(e.state ?? null), G = m(() => Ut(e.history)), c = m(() => nt(e.chrome)), L = m(() => Mt(e.renderMode, e.pagination)), g = m(() => Ot(
1250
+ const b = P(e.viewMode === "gantt" ? "gantt" : "table"), L = P(e.state ?? null), D = m(() => Yt(e.history)), f = m(() => it(e.chrome)), x = m(() => Bt(e.renderMode, e.pagination)), g = m(() => Gt(
1251
1251
  e.pagination,
1252
- L.value,
1252
+ x.value,
1253
1253
  e.pageSize,
1254
1254
  e.currentPage
1255
- )), H = m(() => rt(e.columnMenu)), Z = m(() => lt(e.cellMenu)), ee = m(() => at(e.rowIndexMenu)), z = m(() => Kt(e.columnLayout)), T = m(() => it(e.columnReorder)), U = m(() => It(e.aggregations)), x = m(() => Ct(e.advancedFilter)), E = m(() => At(e.findReplace)), V = m(() => Dt(e.gridLines)), j = m(() => Rt(e.groupBy)), B = m(() => e.state ?? P.value), _ = m(() => e.sortModel !== void 0 ? e.sortModel : B.value?.rows?.snapshot?.sortModel), W = m(() => e.filterModel !== void 0 ? e.filterModel : B.value?.rows?.snapshot?.filterModel ?? null), N = m(() => e.groupBy !== void 0 ? j.value ?? null : B.value?.rows?.snapshot?.groupBy ?? null), q = m(() => e.pivotModel !== void 0 ? e.pivotModel : B.value?.rows?.snapshot?.pivotModel ?? null), te = m(() => Ht(e.virtualization, L.value)), K = m(() => Pt(e.layoutMode, e.minRows, e.maxRows)), oe = m(() => mt(e.placeholderRows)), ne = m(() => ut(e.rowReorder)), J = m(() => {
1256
- const l = e.clientRowModelOptions?.readFilterCell;
1257
- return qt(
1255
+ )), H = m(() => ut(e.columnMenu)), Z = m(() => st(e.cellMenu)), ee = m(() => dt(e.rowIndexMenu)), z = m(() => Tt(e.columnLayout)), T = m(() => ct(e.columnReorder)), U = m(() => Et(e.aggregations)), j = m(() => Dt(e.advancedFilter)), E = m(() => Pt(e.findReplace)), V = m(() => Ft(e.gridLines)), I = m(() => At(e.groupBy)), B = m(() => e.state ?? L.value), _ = m(() => e.sortModel !== void 0 ? e.sortModel : B.value?.rows?.snapshot?.sortModel), W = m(() => e.filterModel !== void 0 ? e.filterModel : B.value?.rows?.snapshot?.filterModel ?? null), N = m(() => e.groupBy !== void 0 ? I.value ?? null : B.value?.rows?.snapshot?.groupBy ?? null), q = m(() => e.pivotModel !== void 0 ? e.pivotModel : B.value?.rows?.snapshot?.pivotModel ?? null), te = m(() => Vt(e.virtualization, x.value)), K = m(() => jt(e.layoutMode, e.minRows, e.maxRows)), oe = m(() => wt(e.placeholderRows)), ne = m(() => ft(e.rowReorder)), J = m(() => {
1256
+ const r = e.clientRowModelOptions?.readFilterCell;
1257
+ return Qt(
1258
1258
  e.columns,
1259
- e.readFilterCell ?? l
1259
+ e.readFilterCell ?? r
1260
1260
  );
1261
1261
  }), re = m(() => {
1262
- const l = e.readFilterCellStyle ?? e.clientRowModelOptions?.readFilterCellStyle;
1263
- return !J.value && !l ? e.clientRowModelOptions : {
1262
+ const r = e.readFilterCellStyle ?? e.clientRowModelOptions?.readFilterCellStyle;
1263
+ return !J.value && !r ? e.clientRowModelOptions : {
1264
1264
  ...e.clientRowModelOptions ?? {},
1265
1265
  readFilterCell: J.value,
1266
- readFilterCellStyle: l
1266
+ readFilterCellStyle: r
1267
1267
  };
1268
- }), k = m(() => st({
1268
+ }), k = m(() => mt({
1269
1269
  columns: e.columns,
1270
1270
  clientRowModelOptions: re.value,
1271
1271
  computedFields: e.computedFields,
1272
1272
  formulas: e.formulas,
1273
1273
  formulaFunctions: e.formulaFunctions
1274
- })), le = m(() => dt(e.columns)), Y = {
1274
+ })), le = m(() => yt(e.columns)), Y = {
1275
1275
  get state() {
1276
1276
  return e.state;
1277
1277
  },
@@ -1300,7 +1300,7 @@ const Zt = {
1300
1300
  return e.filterModel;
1301
1301
  },
1302
1302
  get groupBy() {
1303
- return j.value;
1303
+ return I.value;
1304
1304
  },
1305
1305
  get aggregationModel() {
1306
1306
  return e.aggregationModel;
@@ -1317,139 +1317,155 @@ const Zt = {
1317
1317
  get columns() {
1318
1318
  return e.columns;
1319
1319
  }
1320
- }, n = m(() => q.value ? "pivot" : k.value && "initialTreeData" in k.value ? "tree" : "base"), d = m(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), i = m(() => a.value?.api.rows.getCount() ?? 0), y = {
1320
+ }, n = m(() => q.value ? "pivot" : k.value && "initialTreeData" in k.value ? "tree" : "base"), d = m(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), i = m(() => {
1321
+ const r = a.value?.runtime;
1322
+ if (!r)
1323
+ return 0;
1324
+ const c = Ce(r.rowPartition);
1325
+ return Math.max(0, c.bodyRowCount + c.pinnedBottomRows.length);
1326
+ }), y = (r) => {
1327
+ const c = a.value?.runtime;
1328
+ if (!c)
1329
+ return null;
1330
+ const G = Ce(c.rowPartition), de = G.bodyRowCount;
1331
+ if (r < de)
1332
+ return c.getBodyRowAtIndex(r);
1333
+ const tt = r - de;
1334
+ return G.pinnedBottomRows[tt] ?? null;
1335
+ }, C = {
1321
1336
  mode: m(() => n.value),
1322
1337
  resolveRuntime: () => a.value,
1323
1338
  visibleColumns: d,
1324
1339
  totalRows: i,
1325
1340
  showRowSelection: m(() => e.rowSelection),
1326
- readSelectionCell: e.readSelectionCell
1341
+ readSelectionCell: e.readSelectionCell,
1342
+ resolveSelectionRowAtIndex: y
1327
1343
  }, {
1328
- selectionSnapshot: O,
1329
- selectionAnchor: M,
1330
- syncSelectionSnapshotFromRuntime: He,
1331
- selectionService: ze,
1332
- selectionAggregatesLabel: Te
1333
- } = tt(y), {
1344
+ selectionSnapshot: M,
1345
+ selectionAnchor: Te,
1346
+ syncSelectionSnapshotFromRuntime: Ee,
1347
+ selectionService: Ve,
1348
+ selectionAggregatesLabel: _e
1349
+ } = lt(C), {
1334
1350
  rowSelectionSnapshot: ae,
1335
1351
  syncRowSelectionSnapshotFromRuntime: ie,
1336
- reconcileRowSelectionFromRuntime: Ee,
1337
- selectionService: pe
1338
- } = ot({
1352
+ reconcileRowSelectionFromRuntime: We,
1353
+ selectionService: Se
1354
+ } = at({
1339
1355
  resolveRuntime: () => a.value
1340
- }), Ve = m(() => e.rowSelection ? pe : Jt()), _e = m(() => ({
1356
+ }), ke = m(() => e.rowSelection ? Se : Xt()), Ue = m(() => ({
1341
1357
  ...e.services ?? {},
1342
- selection: Yt({
1358
+ selection: Zt({
1343
1359
  userSelectionService: e.services?.selection,
1344
- cellSelectionService: ze,
1345
- rowSelectionService: Ve.value
1360
+ cellSelectionService: Ve,
1361
+ rowSelectionService: ke.value
1346
1362
  })
1347
1363
  })), {
1348
- dataGridInstanceKey: We,
1364
+ dataGridInstanceKey: Ne,
1349
1365
  resolvedRowModel: ue
1350
- } = ct({
1351
- rows: Me(e, "rows"),
1352
- rowModel: Me(e, "rowModel"),
1366
+ } = vt({
1367
+ rows: Oe(e, "rows"),
1368
+ rowModel: Oe(e, "rowModel"),
1353
1369
  clientRowModelOptions: k,
1354
1370
  onOwnedRowModelRecreated: () => {
1355
1371
  w.dispose();
1356
1372
  }
1357
- }), w = Et({
1373
+ }), w = kt({
1358
1374
  gridRef: a,
1359
1375
  props: Y,
1360
1376
  emit: {
1361
- columnState: (l) => o("update:columnState", l),
1362
- columnOrder: (l) => o("update:columnOrder", l),
1363
- hiddenColumnKeys: (l) => o("update:hiddenColumnKeys", l),
1364
- columnWidths: (l) => o("update:columnWidths", l),
1365
- columnPins: (l) => o("update:columnPins", l),
1366
- groupBy: (l) => o("update:groupBy", l),
1367
- state: (l) => {
1368
- P.value = l, o("update:state", l);
1377
+ columnState: (r) => o("update:columnState", r),
1378
+ columnOrder: (r) => o("update:columnOrder", r),
1379
+ hiddenColumnKeys: (r) => o("update:hiddenColumnKeys", r),
1380
+ columnWidths: (r) => o("update:columnWidths", r),
1381
+ columnPins: (r) => o("update:columnPins", r),
1382
+ groupBy: (r) => o("update:groupBy", r),
1383
+ state: (r) => {
1384
+ L.value = r, o("update:state", r);
1369
1385
  },
1370
- ready: (l) => o("ready", {
1371
- api: l.api,
1386
+ ready: (r) => o("ready", {
1387
+ api: r.api,
1372
1388
  rowModel: ue.value
1373
1389
  })
1374
1390
  }
1375
- }), ke = (l) => {
1376
- Ee(), o("cell-change", l), w.emitSnapshotUpdates();
1377
- }, Ue = (l) => {
1378
- o("selection-change", l);
1379
- }, Ne = (l) => {
1380
- o("row-selection-change", l);
1381
- }, Se = () => {
1391
+ }), qe = (r) => {
1392
+ We(), o("cell-change", r), w.emitSnapshotUpdates();
1393
+ }, Je = (r) => {
1394
+ o("selection-change", r);
1395
+ }, Ye = (r) => {
1396
+ o("row-selection-change", r);
1397
+ }, he = () => {
1382
1398
  w.emitSnapshotUpdates();
1383
1399
  };
1384
1400
  S(
1385
1401
  ae,
1386
- (l) => {
1387
- o("row-select", l), o("update:rowSelectionState", l), Se();
1402
+ (r) => {
1403
+ o("row-select", r), o("update:rowSelectionState", r), he();
1388
1404
  },
1389
1405
  { deep: !0 }
1390
1406
  ), S(
1391
1407
  () => [e.rowSelection, e.rowSelectionState, a.value],
1392
- ([l, f]) => {
1393
- if (l) {
1394
- if (f !== void 0) {
1395
- const I = a.value?.api.rowSelection;
1396
- $t(ae.value, f) || (f ? I?.setSnapshot(f) : I?.clear(), ie());
1408
+ ([r, c]) => {
1409
+ if (r) {
1410
+ if (c !== void 0) {
1411
+ const G = a.value?.api.rowSelection;
1412
+ eo(ae.value, c) || (c ? G?.setSnapshot(c) : G?.clear(), ie());
1397
1413
  return;
1398
1414
  }
1399
1415
  ie();
1400
1416
  return;
1401
1417
  }
1402
- pe.clearRowSelection?.();
1418
+ Se.clearRowSelection?.();
1403
1419
  },
1404
1420
  { immediate: !0 }
1405
1421
  ), S(
1406
1422
  () => e.viewMode,
1407
- (l) => {
1408
- b.value = l === "gantt" ? "gantt" : "table";
1423
+ (r) => {
1424
+ b.value = r === "gantt" ? "gantt" : "table";
1409
1425
  },
1410
1426
  { immediate: !0 }
1411
1427
  );
1412
- const he = (l) => {
1413
- const f = l === "gantt" ? "gantt" : "table";
1414
- b.value = f, o("update:viewMode", f);
1415
- }, qe = (l) => {
1416
- s.value = l;
1417
- }, be = (l) => {
1418
- p.value = l;
1419
- }, Je = (l) => {
1420
- Xt(h.value, l) || (h.value = l, A = l, !R && (R = !0, Promise.resolve().then(() => {
1428
+ const be = (r) => {
1429
+ const c = r === "gantt" ? "gantt" : "table";
1430
+ b.value = c, o("update:viewMode", c);
1431
+ }, $e = (r) => {
1432
+ s.value = r;
1433
+ }, Re = (r) => {
1434
+ p.value = r;
1435
+ }, Qe = (r) => {
1436
+ oo(h.value, r) || (h.value = r, A = r, !R && (R = !0, Promise.resolve().then(() => {
1421
1437
  R = !1;
1422
- const f = A;
1423
- A = null, f && o("toolbar-modules-change", f);
1438
+ const c = A;
1439
+ A = null, c && o("toolbar-modules-change", c);
1424
1440
  })));
1425
1441
  }, se = m(() => {
1426
- const l = G.value.adapter;
1427
- return !G.value.enabled || !l ? v : {
1428
- canUndo: () => l.canUndo(),
1429
- canRedo: () => l.canRedo(),
1430
- runHistoryAction: (f) => l.runHistoryAction(f)
1442
+ const r = D.value.adapter;
1443
+ return !D.value.enabled || !r ? v : {
1444
+ canUndo: () => r.canUndo(),
1445
+ canRedo: () => r.canRedo(),
1446
+ runHistoryAction: (c) => r.runHistoryAction(c)
1431
1447
  };
1432
- }), Re = {
1448
+ }), Me = {
1433
1449
  canUndo: () => (s.value ?? se.value).canUndo(),
1434
1450
  canRedo: () => (s.value ?? se.value).canRedo(),
1435
- runHistoryAction: (l) => (s.value ?? se.value).runHistoryAction(l)
1436
- }, Ye = () => {
1437
- const l = w.getState();
1438
- return l ? X({
1439
- state: l,
1451
+ runHistoryAction: (r) => (s.value ?? se.value).runHistoryAction(r)
1452
+ }, Xe = () => {
1453
+ const r = w.getState();
1454
+ return r ? X({
1455
+ state: r,
1440
1456
  viewMode: b.value
1441
1457
  }) : null;
1442
- }, $e = (l, f) => Ke(l, w.migrateState, f), Qe = (l, f) => {
1443
- const I = X(l);
1444
- return w.applyState(I.state, f) ? (I.viewMode && he(I.viewMode), !0) : !1;
1458
+ }, Ze = (r, c) => He(r, w.migrateState, c), et = (r, c) => {
1459
+ const G = X(r);
1460
+ return w.applyState(G.state, c) ? (G.viewMode && be(G.viewMode), !0) : !1;
1445
1461
  };
1446
- return we(() => {
1447
- w.dispose(), be(null);
1462
+ return pe(() => {
1463
+ w.dispose(), Re(null);
1448
1464
  }), u({
1449
1465
  grid: a,
1450
1466
  rowModel: ue,
1451
- history: Re,
1452
- getHistory: () => Re,
1467
+ history: Me,
1468
+ getHistory: () => Me,
1453
1469
  toolbarModules: h,
1454
1470
  getToolbarModules: () => h.value,
1455
1471
  getApi: () => a.value?.api ?? null,
@@ -1457,22 +1473,22 @@ const Zt = {
1457
1473
  getCore: () => a.value?.core ?? null,
1458
1474
  getColumnState: () => w.getColumnState(),
1459
1475
  getColumnSnapshot: () => a.value?.api.columns.getSnapshot() ?? null,
1460
- getSelectionAggregatesLabel: () => Te.value,
1461
- runStructuralRowAction: (l, f) => p.value?.(l, f) ?? Promise.resolve(!1),
1476
+ getSelectionAggregatesLabel: () => _e.value,
1477
+ runStructuralRowAction: (r, c) => p.value?.(r, c) ?? Promise.resolve(!1),
1462
1478
  getSelectionSummary: () => {
1463
- const l = a.value?.api.selection.summarize;
1464
- if (!l)
1479
+ const r = a.value?.api.selection.summarize;
1480
+ if (!r)
1465
1481
  return null;
1466
- const f = {
1482
+ const c = {
1467
1483
  readSelectionCell: e.readSelectionCell
1468
1484
  };
1469
- return l(f);
1485
+ return r(c);
1470
1486
  },
1471
1487
  getView: () => b.value,
1472
- setView: he,
1473
- getSavedView: Ye,
1474
- migrateSavedView: $e,
1475
- applySavedView: Qe,
1488
+ setView: be,
1489
+ getSavedView: Xe,
1490
+ migrateSavedView: Ze,
1491
+ applySavedView: et,
1476
1492
  applyColumnState: w.applyColumnState,
1477
1493
  getState: w.getState,
1478
1494
  migrateState: w.migrateState,
@@ -1482,29 +1498,29 @@ const Zt = {
1482
1498
  importPivotLayout: w.importPivotLayout,
1483
1499
  expandAllGroups: w.expandAllGroups,
1484
1500
  collapseAllGroups: w.collapseAllGroups,
1485
- insertRowsAt: (l, f) => a.value?.api.rows.insertDataAt(l, f) ?? !1,
1486
- insertRowBefore: (l, f) => a.value?.api.rows.insertDataBefore(l, f) ?? !1,
1487
- insertRowAfter: (l, f) => a.value?.api.rows.insertDataAfter(l, f) ?? !1,
1488
- insertColumnsAt: (l, f) => a.value?.api.columns.insertAt(l, f) ?? !1,
1489
- insertColumnBefore: (l, f) => a.value?.api.columns.insertBefore(l, f) ?? !1,
1490
- insertColumnAfter: (l, f) => a.value?.api.columns.insertAfter(l, f) ?? !1
1501
+ insertRowsAt: (r, c) => a.value?.api.rows.insertDataAt(r, c) ?? !1,
1502
+ insertRowBefore: (r, c) => a.value?.api.rows.insertDataBefore(r, c) ?? !1,
1503
+ insertRowAfter: (r, c) => a.value?.api.rows.insertDataAfter(r, c) ?? !1,
1504
+ insertColumnsAt: (r, c) => a.value?.api.columns.insertAt(r, c) ?? !1,
1505
+ insertColumnBefore: (r, c) => a.value?.api.columns.insertBefore(r, c) ?? !1,
1506
+ insertColumnAfter: (r, c) => a.value?.api.columns.insertAfter(r, c) ?? !1
1491
1507
  }), () => {
1492
- const l = {
1508
+ const r = {
1493
1509
  mode: n.value,
1494
1510
  rows: e.rows,
1495
1511
  runtime: a.value?.runtime ?? null,
1496
1512
  runtimeRowModel: a.value?.rowModel ?? null,
1497
- selectionSnapshot: O,
1498
- selectionAnchor: M,
1513
+ selectionSnapshot: M,
1514
+ selectionAnchor: Te,
1499
1515
  rowSelectionSnapshot: ae,
1500
- syncSelectionSnapshotFromRuntime: He,
1516
+ syncSelectionSnapshotFromRuntime: Ee,
1501
1517
  syncRowSelectionSnapshotFromRuntime: ie,
1502
- flushRowSelectionSnapshotUpdates: Se,
1518
+ flushRowSelectionSnapshotUpdates: he,
1503
1519
  sortModel: _.value,
1504
1520
  filterModel: W.value,
1505
1521
  groupBy: N.value,
1506
1522
  pivotModel: q.value,
1507
- renderMode: L.value,
1523
+ renderMode: x.value,
1508
1524
  virtualization: te.value,
1509
1525
  columnMenu: H.value,
1510
1526
  cellMenu: Z.value,
@@ -1512,7 +1528,7 @@ const Zt = {
1512
1528
  columnLayout: z.value,
1513
1529
  columnReorder: T.value,
1514
1530
  aggregations: U.value,
1515
- advancedFilter: x.value,
1531
+ advancedFilter: j.value,
1516
1532
  findReplace: E.value,
1517
1533
  gridLines: V.value,
1518
1534
  rowHeightMode: e.rowHeightMode,
@@ -1534,80 +1550,80 @@ const Zt = {
1534
1550
  rowReorder: ne.value,
1535
1551
  viewMode: b.value,
1536
1552
  gantt: e.gantt,
1537
- history: G.value,
1538
- chrome: c.value,
1539
- registerHistoryController: qe,
1540
- registerStructuralRowActionRunner: be,
1541
- reportToolbarModules: Je,
1553
+ history: D.value,
1554
+ chrome: f.value,
1555
+ registerHistoryController: $e,
1556
+ registerStructuralRowActionRunner: Re,
1557
+ reportToolbarModules: Qe,
1542
1558
  toolbarModules: e.toolbarModules,
1543
1559
  customOverlays: e.customOverlays,
1544
1560
  runStructuralRowAction: e.runStructuralRowAction
1545
1561
  };
1546
- return ge(
1547
- zt,
1562
+ return we(
1563
+ _t,
1548
1564
  {
1549
1565
  ...t,
1550
1566
  ref: a,
1551
- key: We.value,
1567
+ key: Ne.value,
1552
1568
  rows: e.rows,
1553
1569
  rowModel: ue.value,
1554
1570
  columns: le.value,
1555
1571
  theme: e.theme,
1556
1572
  layoutMode: K.value.layoutMode,
1557
- renderMode: L.value,
1573
+ renderMode: x.value,
1558
1574
  pagination: g.value,
1559
1575
  plugins: e.plugins,
1560
- services: _e.value,
1576
+ services: Ue.value,
1561
1577
  startupOrder: e.startupOrder,
1562
1578
  autoStart: e.autoStart,
1563
- onCellChange: ke,
1564
- onSelectionChange: Ue,
1565
- onRowSelectionChange: Ne
1579
+ onCellChange: qe,
1580
+ onSelectionChange: Je,
1581
+ onRowSelectionChange: Ye
1566
1582
  },
1567
- r.default ? {
1568
- default: (f) => r.default?.({
1569
- ...f,
1583
+ l.default ? {
1584
+ default: (c) => l.default?.({
1585
+ ...c,
1570
1586
  defaultRendererProps: {
1571
- ...l,
1572
- runtime: f.runtime,
1573
- runtimeRowModel: f.rowModel
1587
+ ...r,
1588
+ runtime: c.runtime,
1589
+ runtimeRowModel: c.rowModel
1574
1590
  }
1575
1591
  })
1576
1592
  } : {
1577
- default: (f) => ge(ft, {
1578
- ...l,
1579
- runtime: f.runtime,
1580
- runtimeRowModel: f.rowModel
1593
+ default: (c) => we(gt, {
1594
+ ...r,
1595
+ runtime: c.runtime,
1596
+ runtimeRowModel: c.rowModel
1581
1597
  })
1582
1598
  }
1583
1599
  );
1584
1600
  };
1585
1601
  }
1586
1602
  });
1587
- function po() {
1588
- return D(null);
1603
+ function bo() {
1604
+ return P(null);
1589
1605
  }
1590
- function So() {
1591
- return Ie;
1606
+ function Ro() {
1607
+ return ze;
1592
1608
  }
1593
- const ho = Ie;
1609
+ const Mo = ze;
1594
1610
  export {
1595
- ho as DataGrid,
1596
- Mo as DataGridModuleHost,
1597
- fo as clearDataGridSavedViewInStorage,
1598
- Ie as default,
1599
- go as defineDataGridCellClassResolver,
1600
- wo as defineDataGridCellStyleResolver,
1601
- Oo as defineDataGridColumns,
1602
- So as defineDataGridComponent,
1603
- yo as defineDataGridFilterCellReader,
1604
- vo as defineDataGridFilterCellStyleReader,
1605
- mo as defineDataGridSelectionCellReader,
1606
- uo as defineDataGridStructuralRowActionHandler,
1607
- Ke as migrateDataGridSavedView,
1608
- jt as parseDataGridSavedView,
1609
- co as readDataGridSavedViewFromStorage,
1610
- xt as serializeDataGridSavedView,
1611
- po as useDataGridRef,
1612
- so as writeDataGridSavedViewToStorage
1611
+ Mo as DataGrid,
1612
+ Ao as DataGridModuleHost,
1613
+ vo as clearDataGridSavedViewInStorage,
1614
+ ze as default,
1615
+ So as defineDataGridCellClassResolver,
1616
+ ho as defineDataGridCellStyleResolver,
1617
+ Bo as defineDataGridColumns,
1618
+ Ro as defineDataGridComponent,
1619
+ wo as defineDataGridFilterCellReader,
1620
+ po as defineDataGridFilterCellStyleReader,
1621
+ go as defineDataGridSelectionCellReader,
1622
+ fo as defineDataGridStructuralRowActionHandler,
1623
+ He as migrateDataGridSavedView,
1624
+ zt as parseDataGridSavedView,
1625
+ yo as readDataGridSavedViewFromStorage,
1626
+ Ht as serializeDataGridSavedView,
1627
+ bo as useDataGridRef,
1628
+ mo as writeDataGridSavedViewToStorage
1613
1629
  };