@affino/datagrid-vue-app 0.1.18 → 0.1.20

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 (38) hide show
  1. package/README.md +40 -0
  2. package/dist/DataGrid.d.ts +20 -0
  3. package/dist/DataGridTableStage.vue.d.ts +9 -0
  4. package/dist/advanced-filter.js +1 -1
  5. package/dist/advancedFilterDraftClauses.d.ts +6 -0
  6. package/dist/chunks/{DataGridAdvancedFilterPopover-CabJ-Ztk.js → DataGridAdvancedFilterPopover-CRd9hbEZ.js} +1 -1
  7. package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-x-cfVm5j.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-DhdOikY0.js} +10 -8
  8. package/dist/chunks/{DataGridAggregationsPopover-DfQ3-UV4.js → DataGridAggregationsPopover-Bu7nZX7u.js} +6 -4
  9. package/dist/chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-BPU8WkWd.js +373 -0
  10. package/dist/chunks/DataGridFindReplacePopover-DCuFy-bD.js +4 -0
  11. package/dist/chunks/DataGridFindReplacePopover.vue_vue_type_script_setup_true_lang-DfHFHhUf.js +171 -0
  12. package/dist/chunks/DataGridGanttStageEntry-BbSAXYrL.js +8404 -0
  13. package/dist/chunks/dataGridOverlayThemeVars-vzY74EIz.js +33 -0
  14. package/dist/chunks/useDataGridAppRowModel-Cq1nWBYl.js +3498 -0
  15. package/dist/config/dataGridFindReplace.d.ts +9 -0
  16. package/dist/config/dataGridGridLines.d.ts +16 -0
  17. package/dist/dataGridGridLines.d.ts +1 -0
  18. package/dist/find-replace.d.ts +2 -0
  19. package/dist/find-replace.js +4 -0
  20. package/dist/gantt.js +1 -1
  21. package/dist/gestures/dataGridTouchPanGuard.d.ts +13 -0
  22. package/dist/host/DataGridDefaultRenderer.d.ts +29 -1
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +437 -366
  25. package/dist/internal.d.ts +1 -0
  26. package/dist/internal.js +19 -17
  27. package/dist/overlays/DataGridFindReplacePopover.vue.d.ts +74 -0
  28. package/dist/stage/DataGridTableStage.vue.d.ts +9 -0
  29. package/dist/stage/dataGridTableStage.types.d.ts +3 -0
  30. package/dist/stage/useDataGridTableStageCellIo.d.ts +1 -0
  31. package/dist/stage/useDataGridTableStageHistory.d.ts +3 -1
  32. package/dist/stage/useDataGridTableStageRuntime.d.ts +17 -2
  33. package/dist/stage/useDataGridTableStageScrollSync.d.ts +1 -1
  34. package/dist/useDataGridAppFindReplace.d.ts +54 -0
  35. package/package.json +7 -3
  36. package/dist/chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js +0 -399
  37. package/dist/chunks/DataGridGanttStageEntry-CS2wpBnj.js +0 -7815
  38. package/dist/chunks/useDataGridAppRowModel-RrE_k6tK.js +0 -3008
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";
6
- import { d as We } from "./chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js";
7
- const He = {
8
- default: A,
9
- "industrial-neutral": me,
10
- industrialNeutral: me,
11
- sugar: Se
1
+ import { defineComponent as Oe, ref as Y, provide as Ke, computed as y, watch as w, onBeforeUnmount as fe, h as ce, mergeProps as je, toRef as ge } from "vue";
2
+ import { useDataGridRuntime as Ie } from "@affino/datagrid-vue";
3
+ import { useDataGridAppSelection as Fe, useDataGridAppRowSelection as ze } from "@affino/datagrid-vue/app";
4
+ import { d as Te, e as _e, f as Ve, r as Ee, g as We, u as He, D as ke } from "./chunks/useDataGridAppRowModel-Cq1nWBYl.js";
5
+ import { applyGridTheme as Ue, resolveGridThemeTokens as Ne, defaultStyleConfig as L, sugarTheme as Ae, industrialNeutralTheme as ve } from "@affino/datagrid-theme";
6
+ import { d as qe } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
7
+ const Je = {
8
+ default: L,
9
+ "industrial-neutral": ve,
10
+ industrialNeutral: ve,
11
+ sugar: Ae
12
12
  };
13
- function _e(e, o) {
13
+ function Ye(e, o) {
14
14
  if (!e && !o)
15
15
  return;
16
16
  const r = {
17
17
  ...e ?? {}
18
18
  };
19
- for (const [n, f] of Object.entries(o ?? {}))
19
+ for (const [n, c] of Object.entries(o ?? {}))
20
20
  r[n] = {
21
21
  ...r[n] ?? {},
22
- ...f
22
+ ...c
23
23
  };
24
24
  return r;
25
25
  }
26
- function ne(e, o) {
26
+ function le(e, o) {
27
27
  return {
28
28
  ...e,
29
29
  ...o,
@@ -34,34 +34,34 @@ function ne(e, o) {
34
34
  summary: { ...e.summary ?? {}, ...o.summary ?? {} },
35
35
  state: { ...e.state ?? {}, ...o.state ?? {} },
36
36
  tokens: { ...e.tokens ?? {}, ...o.tokens ?? {} },
37
- tokenVariants: _e(e.tokenVariants, o.tokenVariants)
37
+ tokenVariants: Ye(e.tokenVariants, o.tokenVariants)
38
38
  };
39
39
  }
40
- function ke(e) {
40
+ function $e(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
- 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, {
43
+ function Qe(e) {
44
+ return e == null ? L : typeof e == "string" ? e === "sugar" ? le(L, Ae) : Je[e] ?? L : $e(e) ? le(L, e) : le(L, {
45
45
  tokens: e
46
46
  });
47
47
  }
48
- function Ne(e) {
49
- const o = Ee(e);
50
- return Ve(o ?? A, {
48
+ function Xe(e) {
49
+ const o = Qe(e);
50
+ return Ne(o ?? L, {
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;
54
+ function pe(e, o) {
55
+ const r = Xe(o);
56
+ return Ue(e, r), r;
57
57
  }
58
- function ve(e, o) {
58
+ function we(e, o) {
59
59
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : o;
60
60
  }
61
- function ye(e, o) {
61
+ function Se(e, o) {
62
62
  return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : o;
63
63
  }
64
- function Ue(e) {
64
+ function Ze(e) {
65
65
  if (e !== void 0) {
66
66
  if (e == null)
67
67
  return null;
@@ -76,41 +76,96 @@ function Ue(e) {
76
76
  return e;
77
77
  }
78
78
  }
79
- function qe(e, o) {
79
+ function et(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 tt(e, o, r, n) {
83
83
  if (o !== "pagination")
84
84
  return null;
85
- const f = 100, u = ye(r, f), y = ve(n, 0);
85
+ const c = 100, u = Se(r, c), p = we(n, 0);
86
86
  return e === !0 || e === !1 || e == null ? {
87
87
  pageSize: u,
88
- currentPage: y
88
+ currentPage: p
89
89
  } : {
90
- pageSize: ye(r ?? e.pageSize, f),
91
- currentPage: ve(n ?? e.currentPage, 0)
90
+ pageSize: Se(r ?? e.pageSize, c),
91
+ currentPage: we(n ?? e.currentPage, 0)
92
92
  };
93
93
  }
94
- const re = "Advanced filter";
95
- function $e(e) {
94
+ const ae = "Advanced filter";
95
+ function ot(e) {
96
+ return typeof e == "boolean" ? {
97
+ enabled: e,
98
+ buttonLabel: ae
99
+ } : e ? {
100
+ enabled: e.enabled ?? !0,
101
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ae
102
+ } : {
103
+ enabled: !1,
104
+ buttonLabel: ae
105
+ };
106
+ }
107
+ const ie = "Find / replace";
108
+ function nt(e) {
96
109
  return typeof e == "boolean" ? {
97
110
  enabled: e,
98
- buttonLabel: re
111
+ buttonLabel: ie
99
112
  } : e ? {
100
113
  enabled: e.enabled ?? !0,
101
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : re
114
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ie
102
115
  } : {
103
116
  enabled: !1,
104
- buttonLabel: re
117
+ buttonLabel: ie
105
118
  };
106
119
  }
107
- function pe(e) {
120
+ const rt = "all", Be = {
121
+ all: "columns",
122
+ rows: "none",
123
+ columns: "columns",
124
+ none: "none"
125
+ };
126
+ function he(e) {
127
+ return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : rt;
128
+ }
129
+ function lt(e, o) {
130
+ return e === "columns" || e === "none" ? e : Be[o];
131
+ }
132
+ function be(e, o) {
133
+ return e !== "none" || o === "columns";
134
+ }
135
+ function Me(e) {
136
+ const o = e.body === "all" || e.body === "rows", r = e.body === "all" || e.body === "columns", n = e.header === "columns";
137
+ return {
138
+ body: e.body,
139
+ header: e.header,
140
+ pinnedSeparators: e.pinnedSeparators,
141
+ bodyRows: o,
142
+ bodyColumns: r,
143
+ headerColumns: n
144
+ };
145
+ }
146
+ function at(e) {
147
+ if (typeof e == "string") {
148
+ const n = he(e), c = Be[n];
149
+ return Me({
150
+ body: n,
151
+ header: c,
152
+ pinnedSeparators: be(n, c)
153
+ });
154
+ }
155
+ const o = he(e?.body), r = lt(e?.header, o);
156
+ return Me({
157
+ body: o,
158
+ header: r,
159
+ pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : be(o, r)
160
+ });
161
+ }
162
+ function Re(e) {
108
163
  if (typeof e != "number" || !Number.isFinite(e))
109
164
  return null;
110
165
  const o = Math.max(0, Math.trunc(e));
111
166
  return o > 0 ? o : null;
112
167
  }
113
- function Qe(e, o, r) {
168
+ function it(e, o, r) {
114
169
  const n = e === "auto-height" ? "auto-height" : "fill";
115
170
  if (n !== "auto-height")
116
171
  return {
@@ -118,71 +173,71 @@ function Qe(e, o, r) {
118
173
  minRows: null,
119
174
  maxRows: null
120
175
  };
121
- const f = pe(o);
122
- let u = pe(r);
123
- return f !== null && u !== null && u < f && (u = f), {
176
+ const c = Re(o);
177
+ let u = Re(r);
178
+ return c !== null && u !== null && u < c && (u = c), {
124
179
  layoutMode: n,
125
- minRows: f,
180
+ minRows: c,
126
181
  maxRows: u
127
182
  };
128
183
  }
129
- function Xe(e) {
184
+ function ut(e) {
130
185
  return {
131
186
  ...e,
132
187
  transaction: null
133
188
  };
134
189
  }
135
- function J(e) {
190
+ function $(e) {
136
191
  return {
137
192
  ...e,
138
- state: Xe(e.state)
193
+ state: ut(e.state)
139
194
  };
140
195
  }
141
- function Ye(e) {
196
+ function st(e) {
142
197
  return typeof e == "object" && e !== null;
143
198
  }
144
- function he(e, o, r) {
145
- const n = Ye(e) ? e : null, f = o(n && "state" in n ? n.state : e, r);
146
- if (!f)
199
+ function Ce(e, o, r) {
200
+ const n = st(e) ? e : null, c = o(n && "state" in n ? n.state : e, r);
201
+ if (!c)
147
202
  return null;
148
- const u = n?.viewMode, y = u === "gantt" ? "gantt" : u === "table" ? "table" : void 0;
149
- return J({
150
- state: f,
151
- ...y ? { viewMode: y } : {}
203
+ const u = n?.viewMode, p = u === "gantt" ? "gantt" : u === "table" ? "table" : void 0;
204
+ return $({
205
+ state: c,
206
+ ...p ? { viewMode: p } : {}
152
207
  });
153
208
  }
154
- function Ze(e) {
155
- return JSON.stringify(J(e));
209
+ function dt(e) {
210
+ return JSON.stringify($(e));
156
211
  }
157
- function et(e, o, r) {
212
+ function ct(e, o, r) {
158
213
  if (typeof e != "string" || e.trim().length === 0)
159
214
  return null;
160
215
  try {
161
- return he(JSON.parse(e), o, r);
216
+ return Ce(JSON.parse(e), o, r);
162
217
  } catch {
163
218
  return null;
164
219
  }
165
220
  }
166
- function wt(e, o, r) {
221
+ function Dt(e, o, r) {
167
222
  if (!e || typeof o != "string" || o.trim().length === 0)
168
223
  return !1;
169
224
  try {
170
- return e.setItem(o, Ze(r)), !0;
225
+ return e.setItem(o, dt(r)), !0;
171
226
  } catch {
172
227
  return !1;
173
228
  }
174
229
  }
175
- function St(e, o, r, n) {
230
+ function Gt(e, o, r, n) {
176
231
  if (!e || typeof o != "string" || o.trim().length === 0)
177
232
  return null;
178
233
  try {
179
- const f = e.getItem(o);
180
- return f ? et(f, r, n) : null;
234
+ const c = e.getItem(o);
235
+ return c ? ct(c, r, n) : null;
181
236
  } catch {
182
237
  return null;
183
238
  }
184
239
  }
185
- function ht(e, o) {
240
+ function Pt(e, o) {
186
241
  if (!e || typeof o != "string" || o.trim().length === 0)
187
242
  return !1;
188
243
  try {
@@ -191,36 +246,36 @@ function ht(e, o) {
191
246
  return !1;
192
247
  }
193
248
  }
194
- const le = "Columns";
195
- function tt(e) {
249
+ const ue = "Columns";
250
+ function ft(e) {
196
251
  return typeof e == "boolean" ? {
197
252
  enabled: e,
198
- buttonLabel: le
253
+ buttonLabel: ue
199
254
  } : e ? {
200
255
  enabled: e.enabled ?? !0,
201
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : le
256
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ue
202
257
  } : {
203
258
  enabled: !1,
204
- buttonLabel: le
259
+ buttonLabel: ue
205
260
  };
206
261
  }
207
- const ae = "Aggregations";
208
- function ot(e) {
262
+ const se = "Aggregations";
263
+ function mt(e) {
209
264
  return typeof e == "boolean" ? {
210
265
  enabled: e,
211
- buttonLabel: ae
266
+ buttonLabel: se
212
267
  } : e ? {
213
268
  enabled: e.enabled ?? !0,
214
- buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : ae
269
+ buttonLabel: typeof e.buttonLabel == "string" && e.buttonLabel.trim().length > 0 ? e.buttonLabel.trim() : se
215
270
  } : {
216
271
  enabled: !1,
217
- buttonLabel: ae
272
+ buttonLabel: se
218
273
  };
219
274
  }
220
- function N(e, o) {
275
+ function q(e, o) {
221
276
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : o;
222
277
  }
223
- function nt(e, o) {
278
+ function yt(e, o) {
224
279
  const r = {
225
280
  rows: !0,
226
281
  columns: !1,
@@ -233,12 +288,12 @@ function nt(e, o) {
233
288
  r.rows = !1, r.columns = !1;
234
289
  else if (e && typeof e == "object") {
235
290
  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));
291
+ const n = q(e.overscan, r.rowOverscan);
292
+ r.rowOverscan = q(e.rowOverscan, n), r.columnOverscan = q(e.columnOverscan, q(e.overscan, r.columnOverscan));
238
293
  }
239
294
  return o === "pagination" && (r.rows = !1), r;
240
295
  }
241
- const rt = we({
296
+ const gt = Oe({
242
297
  name: "DataGridRuntimeHost",
243
298
  inheritAttrs: !1,
244
299
  props: {
@@ -292,26 +347,28 @@ const rt = we({
292
347
  "selection-change": (e) => !0,
293
348
  "row-selection-change": (e) => !0
294
349
  },
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({
300
- rows: g(() => e.rows),
350
+ setup(e, { attrs: o, slots: r, emit: n, expose: c }) {
351
+ const u = Y(null);
352
+ Ke(qe, u);
353
+ let p = null;
354
+ const s = Ie({
355
+ rows: y(() => e.rows),
301
356
  rowModel: e.rowModel,
302
- columns: g(() => e.columns),
357
+ columns: y(() => e.columns),
303
358
  plugins: e.plugins,
304
359
  services: e.services,
305
360
  startupOrder: e.startupOrder,
306
361
  autoStart: e.autoStart
307
- }), w = s, b = {
362
+ }), S = s, O = {
308
363
  api: s.api,
309
364
  syncBodyRowsInRange: s.syncBodyRowsInRange,
365
+ setViewportRange: s.setViewportRange,
366
+ setVirtualWindowRange: s.setVirtualWindowRange,
310
367
  rowPartition: s.rowPartition,
311
368
  virtualWindow: s.virtualWindow,
312
369
  columnSnapshot: s.columnSnapshot,
313
- getBodyRowAtIndex: w.getBodyRowAtIndex,
314
- resolveBodyRowIndexById: w.resolveBodyRowIndexById
370
+ getBodyRowAtIndex: S.getBodyRowAtIndex,
371
+ resolveBodyRowIndexById: S.resolveBodyRowIndexById
315
372
  }, B = () => {
316
373
  if (e.renderMode === "pagination") {
317
374
  const d = e.pagination ?? { pageSize: 100, currentPage: 0 };
@@ -323,43 +380,43 @@ const rt = we({
323
380
  }
324
381
  s.api.rows.setPagination(null);
325
382
  };
326
- p(
383
+ w(
327
384
  () => e.renderMode,
328
385
  () => {
329
386
  B();
330
387
  },
331
388
  { immediate: !0 }
332
- ), p(
389
+ ), w(
333
390
  () => e.pagination,
334
391
  () => {
335
392
  B();
336
393
  },
337
394
  { immediate: !0, deep: !0 }
338
- ), typeof document < "u" && (y = new MutationObserver(() => {
395
+ ), typeof document < "u" && (p = new MutationObserver(() => {
339
396
  const d = u.value;
340
- d && ge(d, e.theme);
341
- }), y.observe(document.documentElement, {
397
+ d && pe(d, e.theme);
398
+ }), p.observe(document.documentElement, {
342
399
  attributes: !0,
343
400
  attributeFilter: ["class", "data-theme"]
344
- })), p(
401
+ })), w(
345
402
  [() => e.theme, u],
346
403
  () => {
347
404
  const d = u.value;
348
- d && ge(d, e.theme);
405
+ d && pe(d, e.theme);
349
406
  },
350
407
  { immediate: !0, deep: !0 }
351
408
  );
352
- const h = s.api.events.on("rows:changed", (d) => {
409
+ const b = s.api.events.on("rows:changed", (d) => {
353
410
  n("cell-change", d);
354
- }), R = s.api.events.on("selection:changed", (d) => {
411
+ }), M = s.api.events.on("selection:changed", (d) => {
355
412
  n("selection-change", d);
356
- }), P = s.api.events.on("row-selection:changed", (d) => {
413
+ }), D = s.api.events.on("row-selection:changed", (d) => {
357
414
  n("row-selection-change", d);
358
415
  });
359
- se(() => {
360
- h(), R(), P(), y?.disconnect(), y = null;
416
+ fe(() => {
417
+ b(), M(), D(), p?.disconnect(), p = null;
361
418
  });
362
- const G = g(() => {
419
+ const G = y(() => {
363
420
  const d = s.virtualWindow.value;
364
421
  return {
365
422
  ...d ?? {},
@@ -367,27 +424,28 @@ const rt = we({
367
424
  colTotal: s.columnSnapshot.value.visibleColumns.length
368
425
  };
369
426
  });
370
- return f({
427
+ return c({
371
428
  api: s.api,
372
429
  core: s.core,
373
- runtime: b,
430
+ runtime: O,
374
431
  rowModel: s.rowModel,
375
432
  columnModel: s.columnModel,
376
433
  columnSnapshot: s.columnSnapshot,
377
434
  rowPartition: s.rowPartition,
378
435
  setRows: s.setRows,
379
436
  syncBodyRowsInRange: s.syncBodyRowsInRange,
380
- getBodyRowAtIndex: w.getBodyRowAtIndex,
381
- resolveBodyRowIndexById: w.resolveBodyRowIndexById,
437
+ getBodyRowAtIndex: S.getBodyRowAtIndex,
438
+ resolveBodyRowIndexById: S.resolveBodyRowIndexById,
382
439
  virtualWindow: s.virtualWindow,
383
440
  start: s.start,
384
441
  stop: s.stop
385
- }), () => ue(
442
+ }), () => ce(
386
443
  "div",
387
- Ae(o, {
444
+ je(o, {
388
445
  ref: u,
389
446
  class: [
390
447
  "affino-datagrid-app-root",
448
+ e.theme === "sugar" ? "affino-datagrid-app-root--theme-sugar" : null,
391
449
  e.layoutMode === "auto-height" ? "affino-datagrid-app-root--auto-height" : "affino-datagrid-app-root--fill"
392
450
  ],
393
451
  style: {
@@ -400,81 +458,84 @@ const rt = we({
400
458
  r.default?.({
401
459
  api: s.api,
402
460
  core: s.core,
403
- runtime: b,
404
- grid: b,
461
+ runtime: O,
462
+ grid: O,
405
463
  rowModel: s.rowModel,
406
464
  columnModel: s.columnModel,
407
465
  columnSnapshot: s.columnSnapshot.value,
408
466
  rowPartition: s.rowPartition.value,
409
467
  setRows: s.setRows,
410
468
  syncBodyRowsInRange: s.syncBodyRowsInRange,
411
- getBodyRowAtIndex: w.getBodyRowAtIndex,
412
- resolveBodyRowIndexById: w.resolveBodyRowIndexById,
469
+ getBodyRowAtIndex: S.getBodyRowAtIndex,
470
+ resolveBodyRowIndexById: S.resolveBodyRowIndexById,
413
471
  virtualWindow: G.value
414
472
  }) ?? []
415
473
  );
416
474
  }
417
475
  });
418
- function ie(e) {
476
+ function de(e) {
419
477
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
420
478
  }
421
- function M(e) {
479
+ function R(e) {
422
480
  try {
423
481
  return JSON.stringify(e);
424
482
  } catch {
425
483
  return null;
426
484
  }
427
485
  }
428
- function lt(e) {
486
+ function vt(e) {
429
487
  return e ? {
430
488
  fields: [...e.fields],
431
489
  expandedByDefault: e.expandedByDefault
432
490
  } : null;
433
491
  }
434
- 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;
436
- const P = () => {
492
+ function pt(e) {
493
+ let o = null, r = null, n = !1, c = null, u = null, p = null, s = null, S = null, O = null, B = null, b = null, M = null;
494
+ const D = () => {
437
495
  o?.(), r?.(), o = null, r = null;
438
496
  }, G = () => {
439
- const t = e.gridRef.value?.api.columns;
497
+ const t = e.gridRef.value;
498
+ return !t || t.api.lifecycle.state === "disposed" ? null : t;
499
+ }, d = () => G()?.api ?? null, U = () => {
500
+ const t = d()?.columns;
440
501
  if (!t)
441
502
  return null;
442
- const i = t.getSnapshot(), l = {}, c = {}, v = {};
443
- for (const S of i.columns)
444
- l[S.key] = S.visible, c[S.key] = S.width, v[S.key] = S.pin;
503
+ const i = t.getSnapshot(), l = {}, f = {}, g = {};
504
+ for (const h of i.columns)
505
+ l[h.key] = h.visible, f[h.key] = h.width, g[h.key] = h.pin;
445
506
  return {
446
507
  order: [...i.order],
447
508
  visibility: l,
448
- widths: c,
449
- pins: v
509
+ widths: f,
510
+ pins: g
450
511
  };
451
- }, d = () => {
512
+ }, v = () => {
452
513
  n || (n = !0, queueMicrotask(() => {
453
514
  n = !1;
454
- const t = G(), i = e.gridRef.value?.api;
515
+ const t = U(), i = d();
455
516
  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(
458
- Object.entries(t.visibility).filter(([, c]) => !c).map(([c]) => c)
517
+ const l = R(t);
518
+ O = l, l !== p && (p = l, e.emit.columnState(t), e.emit.columnOrder(t.order), e.emit.hiddenColumnKeys(
519
+ Object.entries(t.visibility).filter(([, f]) => !f).map(([f]) => f)
459
520
  ), e.emit.columnWidths(t.widths), e.emit.columnPins(t.pins));
460
521
  }
461
522
  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));
523
+ const l = vt(i.rows.getSnapshot().groupBy), f = R(l);
524
+ f !== S && (S = f, e.emit.groupBy(l));
525
+ const g = i.state.get(), h = R(g);
526
+ B = h, h !== s && (s = h, e.emit.state(g));
466
527
  }
467
528
  }));
468
- }, x = () => {
469
- const t = e.gridRef.value?.api;
529
+ }, P = () => {
530
+ const t = d();
470
531
  !t || e.props.sortModel === void 0 && e.props.filterModel === void 0 || t.rows.setSortAndFilterModel({
471
532
  sortModel: e.props.sortModel ?? [],
472
533
  filterModel: e.props.filterModel ?? null
473
534
  });
474
- }, D = () => {
475
- const t = e.gridRef.value?.api.columns;
535
+ }, x = () => {
536
+ const t = d()?.columns;
476
537
  return t ? new Set(t.getSnapshot().columns.map((i) => i.key)) : null;
477
- }, $ = (t) => {
538
+ }, Q = (t) => {
478
539
  const i = /* @__PURE__ */ new Set();
479
540
  if (!t)
480
541
  return i;
@@ -487,99 +548,99 @@ function at(e) {
487
548
  for (const l of Object.keys(t.pins ?? {}))
488
549
  i.add(l);
489
550
  return i;
490
- }, F = (t) => {
491
- const i = D();
551
+ }, z = (t) => {
552
+ const i = x();
492
553
  if (!i)
493
554
  return !1;
494
- const l = $(t);
555
+ const l = Q(t);
495
556
  if (l.size === 0 || e.props.columns.length > 0)
496
557
  return !0;
497
- for (const c of l)
498
- if (!i.has(c))
558
+ for (const f of l)
559
+ if (!i.has(f))
499
560
  return !1;
500
561
  return !0;
501
- }, z = (t) => F(t.columns), T = (t) => {
502
- const i = e.gridRef.value?.api;
562
+ }, T = (t) => z(t.columns), _ = (t) => {
563
+ const i = d();
503
564
  if (!i)
504
565
  return !1;
505
566
  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);
567
+ for (const [l, f] of Object.entries(t.visibility))
568
+ i.columns.setVisibility(l, f);
569
+ for (const [l, f] of Object.entries(t.widths))
570
+ i.columns.setWidth(l, de(f));
571
+ for (const [l, f] of Object.entries(t.pins))
572
+ i.columns.setPin(l, f);
512
573
  return !0;
513
574
  }, K = () => {
514
- if (R) {
515
- const t = R, i = e.gridRef.value?.api;
575
+ if (M) {
576
+ const t = M, i = d();
516
577
  if (i) {
517
578
  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));
579
+ l && T(l) && (M = null, i.state.set(l, t.options), u = R(t.state));
519
580
  }
520
581
  }
521
- if (h && F(h.columnState)) {
522
- const t = h;
523
- h = null, f = M({
582
+ if (b && z(b.columnState)) {
583
+ const t = b;
584
+ b = null, c = R({
524
585
  columnState: t.columnState,
525
586
  columnOrder: null,
526
587
  hiddenColumnKeys: null,
527
588
  columnWidths: null,
528
589
  columnPins: null
529
- }), T(t.columnState);
590
+ }), _(t.columnState);
530
591
  }
531
- }, O = () => {
532
- const t = e.gridRef.value?.api;
592
+ }, A = () => {
593
+ const t = d();
533
594
  !t || e.props.groupBy === void 0 || t.rows.setGroupBy(e.props.groupBy ?? null);
534
595
  }, C = () => {
535
- const t = e.gridRef.value?.api;
596
+ const t = d();
536
597
  !t || e.props.aggregationModel === void 0 || t.rows.setAggregationModel(e.props.aggregationModel ?? null);
537
598
  }, V = () => {
538
- const t = e.gridRef.value?.api;
599
+ const t = d();
539
600
  !t || e.props.pivotModel === void 0 || t.pivot.setModel(e.props.pivotModel ?? null);
540
- }, L = () => {
541
- const t = e.gridRef.value?.api;
601
+ }, j = () => {
602
+ const t = d();
542
603
  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
604
  return;
544
- const i = M({
605
+ const i = R({
545
606
  columnState: e.props.columnState,
546
607
  columnOrder: e.props.columnOrder,
547
608
  hiddenColumnKeys: e.props.hiddenColumnKeys,
548
609
  columnWidths: e.props.columnWidths,
549
610
  columnPins: e.props.columnPins
550
611
  });
551
- 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) {
553
- f = i;
612
+ if (i !== c) {
613
+ if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && R(e.props.columnState) === O) {
614
+ c = i;
554
615
  return;
555
616
  }
556
617
  if (e.props.columnState) {
557
618
  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);
619
+ for (const [l, f] of Object.entries(e.props.columnState.visibility))
620
+ t.columns.setVisibility(l, f);
621
+ for (const [l, f] of Object.entries(e.props.columnState.widths))
622
+ t.columns.setWidth(l, de(f));
623
+ for (const [l, f] of Object.entries(e.props.columnState.pins))
624
+ t.columns.setPin(l, f);
564
625
  }
565
626
  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));
627
+ const l = new Set(e.props.hiddenColumnKeys), f = t.columns.getSnapshot();
628
+ for (const g of f.columns)
629
+ t.columns.setVisibility(g.key, !l.has(g.key));
569
630
  }
570
631
  if (e.props.columnWidths)
571
- for (const [l, c] of Object.entries(e.props.columnWidths))
572
- t.columns.setWidth(l, ie(c));
632
+ for (const [l, f] of Object.entries(e.props.columnWidths))
633
+ t.columns.setWidth(l, de(f));
573
634
  if (e.props.columnPins)
574
- for (const [l, c] of Object.entries(e.props.columnPins))
575
- t.columns.setPin(l, c);
576
- f = i;
635
+ for (const [l, f] of Object.entries(e.props.columnPins))
636
+ t.columns.setPin(l, f);
637
+ c = i;
577
638
  }
578
639
  }, I = () => {
579
- const t = e.gridRef.value?.api;
640
+ const t = d();
580
641
  if (!t || e.props.state == null)
581
642
  return;
582
- const i = M(e.props.state);
643
+ const i = R(e.props.state);
583
644
  if (i === u)
584
645
  return;
585
646
  if (i === B) {
@@ -587,56 +648,56 @@ function at(e) {
587
648
  return;
588
649
  }
589
650
  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;
593
- t && (t.view.setRowHeightMode(e.props.rowHeightMode), t.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
651
+ l && T(l) && (t.state.set(l, e.props.stateOptions ?? {}), u = i);
594
652
  }, E = () => {
595
- const t = e.gridRef.value;
596
- t && (f = null, u = null, P(), o = t.rowModel.subscribe(() => {
597
- d();
653
+ const t = d();
654
+ t && (t.view.setRowHeightMode(e.props.rowHeightMode), t.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
655
+ }, N = () => {
656
+ const t = G();
657
+ t && (c = null, u = null, D(), o = t.rowModel.subscribe(() => {
658
+ v();
598
659
  }), 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({
660
+ v();
661
+ }), I(), j(), P(), A(), C(), V(), E(), K(), v(), e.emit.ready({ api: t.api }));
662
+ }, X = () => d()?.state.get() ?? null, Z = (t, i) => d()?.state.migrate(t, i) ?? null, ee = (t) => z(t) ? (c = R({
602
663
  columnState: t,
603
664
  columnOrder: null,
604
665
  hiddenColumnKeys: null,
605
666
  columnWidths: null,
606
667
  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;
668
+ }), b = null, _(t) ? (v(), !0) : (b = { columnState: t }, !0)) : (b = { columnState: t }, !0), te = (t, i) => {
669
+ const l = d();
609
670
  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();
671
+ return M = { state: t, options: i }, !0;
672
+ const f = l.state.migrate(t, { strict: i?.strict });
673
+ return f ? T(f) ? (l.state.set(f, i), u = R(t), M = null, v(), !0) : (M = { state: t, options: i }, !0) : !1;
674
+ }, oe = () => d()?.pivot.exportLayout() ?? null, ne = () => d()?.pivot.exportInterop() ?? null, W = (t, i) => {
675
+ const l = d();
676
+ return l ? (l.pivot.importLayout(t, i), v(), !0) : !1;
677
+ }, H = () => {
678
+ d()?.rows.expandAllGroups(), v();
679
+ }, re = () => {
680
+ d()?.rows.collapseAllGroups(), v();
620
681
  };
621
- p(
682
+ w(
622
683
  () => e.gridRef.value,
623
684
  () => {
624
- E();
685
+ N();
625
686
  },
626
687
  { immediate: !0 }
627
- ), p(
688
+ ), w(
628
689
  () => e.props.columns,
629
690
  () => {
630
- f = null, u = null, I(), L(), K(), d();
691
+ c = null, u = null, I(), j(), K(), v();
631
692
  },
632
693
  { deep: !0 }
633
- ), p(
694
+ ), w(
634
695
  () => [e.props.state, e.props.stateOptions],
635
696
  () => {
636
- I(), L(), x(), O(), C(), V(), W(), K(), d();
697
+ I(), j(), P(), A(), C(), V(), E(), K(), v();
637
698
  },
638
699
  { deep: !0 }
639
- ), p(
700
+ ), w(
640
701
  () => [
641
702
  e.props.columnState,
642
703
  e.props.columnOrder,
@@ -645,61 +706,61 @@ function at(e) {
645
706
  e.props.columnPins
646
707
  ],
647
708
  () => {
648
- L(), K(), d();
709
+ j(), K(), v();
649
710
  },
650
711
  { deep: !0 }
651
- ), p(
712
+ ), w(
652
713
  () => [e.props.sortModel, e.props.filterModel],
653
714
  () => {
654
- x(), d();
715
+ P(), v();
655
716
  },
656
717
  { deep: !0 }
657
- ), p(
718
+ ), w(
658
719
  () => e.props.groupBy,
659
720
  () => {
660
- O(), d();
721
+ A(), v();
661
722
  },
662
723
  { deep: !0 }
663
- ), p(
724
+ ), w(
664
725
  () => e.props.aggregationModel,
665
726
  () => {
666
- C(), d();
727
+ C(), v();
667
728
  },
668
729
  { deep: !0 }
669
- ), p(
730
+ ), w(
670
731
  () => e.props.pivotModel,
671
732
  () => {
672
- V(), d();
733
+ V(), v();
673
734
  },
674
735
  { deep: !0 }
675
- ), p(
736
+ ), w(
676
737
  () => [e.props.rowHeightMode, e.props.baseRowHeight],
677
738
  () => {
678
- W(), d();
739
+ E(), v();
679
740
  }
680
741
  );
681
742
  const k = () => {
682
- P();
743
+ D();
683
744
  };
684
- return se(() => {
745
+ return fe(() => {
685
746
  k();
686
747
  }), {
687
- emitSnapshotUpdates: d,
688
- handleGridReady: E,
748
+ emitSnapshotUpdates: v,
749
+ handleGridReady: N,
689
750
  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
751
+ getColumnState: U,
752
+ getState: X,
753
+ migrateState: Z,
754
+ applyColumnState: ee,
755
+ applyState: te,
756
+ exportPivotLayout: oe,
757
+ exportPivotInterop: ne,
758
+ importPivotLayout: W,
759
+ expandAllGroups: H,
760
+ collapseAllGroups: re
700
761
  };
701
762
  }
702
- function it() {
763
+ function wt() {
703
764
  return {
704
765
  name: "selection",
705
766
  getRowSelectionSnapshot: () => null,
@@ -722,15 +783,15 @@ function it() {
722
783
  }
723
784
  };
724
785
  }
725
- function U(e, o) {
786
+ function J(e, o) {
726
787
  const r = o.map((n) => n?.[e]).filter((n) => typeof n == "function");
727
788
  if (r.length !== 0)
728
789
  return async (n) => {
729
- for (const f of r)
730
- await f(n);
790
+ for (const c of r)
791
+ await c(n);
731
792
  };
732
793
  }
733
- function ut(e) {
794
+ function St(e) {
734
795
  const {
735
796
  userSelectionService: o,
736
797
  cellSelectionService: r,
@@ -738,10 +799,10 @@ function ut(e) {
738
799
  } = e;
739
800
  return {
740
801
  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]),
802
+ init: J("init", [o, r, n]),
803
+ start: J("start", [o, r, n]),
804
+ stop: J("stop", [o, r, n]),
805
+ dispose: J("dispose", [o, r, n]),
745
806
  getSelectionSnapshot: r.getSelectionSnapshot,
746
807
  setSelectionSnapshot: r.setSelectionSnapshot,
747
808
  clearSelection: r.clearSelection,
@@ -758,18 +819,18 @@ function ut(e) {
758
819
  clearSelectedRows: n.clearSelectedRows
759
820
  };
760
821
  }
761
- function st(e, o) {
822
+ function ht(e, o) {
762
823
  if (e?.focusedRow !== o?.focusedRow)
763
824
  return !1;
764
825
  const r = e?.selectedRows ?? [], n = o?.selectedRows ?? [];
765
826
  if (r.length !== n.length)
766
827
  return !1;
767
- for (let f = 0; f < r.length; f += 1)
768
- if (r[f] !== n[f])
828
+ for (let c = 0; c < r.length; c += 1)
829
+ if (r[c] !== n[c])
769
830
  return !1;
770
831
  return !0;
771
832
  }
772
- const dt = we({
833
+ const bt = Oe({
773
834
  name: "DataGrid",
774
835
  inheritAttrs: !1,
775
836
  props: {
@@ -845,6 +906,14 @@ const dt = we({
845
906
  type: [Boolean, Object],
846
907
  default: void 0
847
908
  },
909
+ findReplace: {
910
+ type: [Boolean, Object],
911
+ default: void 0
912
+ },
913
+ gridLines: {
914
+ type: [String, Object],
915
+ default: void 0
916
+ },
848
917
  showRowIndex: {
849
918
  type: Boolean,
850
919
  default: !0
@@ -994,19 +1063,19 @@ const dt = we({
994
1063
  "update:state": (e) => !0,
995
1064
  ready: (e) => !0
996
1065
  },
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(
1066
+ setup(e, { attrs: o, slots: r, emit: n, expose: c }) {
1067
+ const u = Y(null), p = Y(e.viewMode === "gantt" ? "gantt" : "table"), s = Y(e.state ?? null), S = y(() => et(e.renderMode, e.pagination)), O = y(() => tt(
999
1068
  e.pagination,
1000
- w.value,
1069
+ S.value,
1001
1070
  e.pageSize,
1002
1071
  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({
1072
+ )), B = y(() => Te(e.columnMenu)), b = y(() => _e(e.cellMenu)), M = y(() => Ve(e.rowIndexMenu)), D = y(() => ft(e.columnLayout)), G = y(() => mt(e.aggregations)), d = y(() => ot(e.advancedFilter)), U = y(() => nt(e.findReplace)), v = y(() => at(e.gridLines)), P = y(() => Ze(e.groupBy)), x = y(() => e.state ?? s.value), Q = y(() => e.sortModel !== void 0 ? e.sortModel : x.value?.rows?.snapshot?.sortModel), z = y(() => e.filterModel !== void 0 ? e.filterModel : x.value?.rows?.snapshot?.filterModel ?? null), T = y(() => e.groupBy !== void 0 ? P.value ?? null : x.value?.rows?.snapshot?.groupBy ?? null), _ = y(() => e.pivotModel !== void 0 ? e.pivotModel : x.value?.rows?.snapshot?.pivotModel ?? null), K = y(() => yt(e.virtualization, S.value)), A = y(() => it(e.layoutMode, e.minRows, e.maxRows)), C = y(() => Ee({
1004
1073
  columns: e.columns,
1005
1074
  clientRowModelOptions: e.clientRowModelOptions,
1006
1075
  computedFields: e.computedFields,
1007
1076
  formulas: e.formulas,
1008
1077
  formulaFunctions: e.formulaFunctions
1009
- })), V = g(() => je(e.columns)), L = {
1078
+ })), V = y(() => We(e.columns)), j = {
1010
1079
  get state() {
1011
1080
  return e.state;
1012
1081
  },
@@ -1035,7 +1104,7 @@ const dt = we({
1035
1104
  return e.filterModel;
1036
1105
  },
1037
1106
  get groupBy() {
1038
- return x.value;
1107
+ return P.value;
1039
1108
  },
1040
1109
  get aggregationModel() {
1041
1110
  return e.aggregationModel;
@@ -1052,45 +1121,45 @@ const dt = we({
1052
1121
  get columns() {
1053
1122
  return e.columns;
1054
1123
  }
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),
1124
+ }, I = y(() => _.value ? "pivot" : C.value && "initialTreeData" in C.value ? "tree" : "base"), E = y(() => u.value?.api.columns.getSnapshot().visibleColumns ?? []), N = y(() => u.value?.api.rows.getCount() ?? 0), X = {
1125
+ mode: y(() => I.value),
1057
1126
  resolveRuntime: () => u.value,
1058
- visibleColumns: W,
1059
- totalRows: E,
1060
- showRowSelection: g(() => e.rowSelection)
1127
+ visibleColumns: E,
1128
+ totalRows: N,
1129
+ showRowSelection: y(() => e.rowSelection)
1061
1130
  }, {
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,
1131
+ selectionSnapshot: Z,
1132
+ selectionAnchor: ee,
1133
+ syncSelectionSnapshotFromRuntime: te,
1134
+ selectionService: oe,
1135
+ selectionAggregatesLabel: ne
1136
+ } = Fe(X), {
1137
+ rowSelectionSnapshot: W,
1138
+ syncRowSelectionSnapshotFromRuntime: H,
1139
+ reconcileRowSelectionFromRuntime: re,
1071
1140
  selectionService: k
1072
- } = xe({
1141
+ } = ze({
1073
1142
  resolveRuntime: () => u.value
1074
- }), t = g(() => e.rowSelection ? k : it()), i = g(() => ({
1143
+ }), t = y(() => e.rowSelection ? k : wt()), i = y(() => ({
1075
1144
  ...e.services ?? {},
1076
- selection: ut({
1145
+ selection: St({
1077
1146
  userSelectionService: e.services?.selection,
1078
- cellSelectionService: ee,
1147
+ cellSelectionService: oe,
1079
1148
  rowSelectionService: t.value
1080
1149
  })
1081
1150
  })), {
1082
1151
  dataGridInstanceKey: l,
1083
- resolvedRowModel: c
1084
- } = Fe({
1085
- rows: fe(e, "rows"),
1086
- rowModel: fe(e, "rowModel"),
1152
+ resolvedRowModel: f
1153
+ } = He({
1154
+ rows: ge(e, "rows"),
1155
+ rowModel: ge(e, "rowModel"),
1087
1156
  clientRowModelOptions: C,
1088
1157
  onOwnedRowModelRecreated: () => {
1089
- v.dispose();
1158
+ g.dispose();
1090
1159
  }
1091
- }), v = at({
1160
+ }), g = pt({
1092
1161
  gridRef: u,
1093
- props: L,
1162
+ props: j,
1094
1163
  emit: {
1095
1164
  columnState: (a) => n("update:columnState", a),
1096
1165
  columnOrder: (a) => n("update:columnOrder", a),
@@ -1103,85 +1172,85 @@ const dt = we({
1103
1172
  },
1104
1173
  ready: (a) => n("ready", {
1105
1174
  api: a.api,
1106
- rowModel: c.value
1175
+ rowModel: f.value
1107
1176
  })
1108
1177
  }
1109
- }), S = (a) => {
1110
- oe(), n("cell-change", a), v.emitSnapshotUpdates();
1111
- }, Re = (a) => {
1178
+ }), h = (a) => {
1179
+ re(), n("cell-change", a), g.emitSnapshotUpdates();
1180
+ }, Le = (a) => {
1112
1181
  n("selection-change", a);
1113
- }, Me = (a) => {
1182
+ }, De = (a) => {
1114
1183
  n("row-selection-change", a);
1115
- }, de = () => {
1116
- v.emitSnapshotUpdates();
1184
+ }, me = () => {
1185
+ g.emitSnapshotUpdates();
1117
1186
  };
1118
- p(
1119
- H,
1187
+ w(
1188
+ W,
1120
1189
  (a) => {
1121
- n("row-select", a), n("update:rowSelectionState", a), de();
1190
+ n("row-select", a), n("update:rowSelectionState", a), me();
1122
1191
  },
1123
1192
  { deep: !0 }
1124
- ), p(
1193
+ ), w(
1125
1194
  () => [e.rowSelection, e.rowSelectionState, u.value],
1126
1195
  ([a, m]) => {
1127
1196
  if (a) {
1128
1197
  if (m !== void 0) {
1129
- const j = u.value?.api.rowSelection;
1130
- st(H.value, m) || (m ? j?.setSnapshot(m) : j?.clear(), _());
1198
+ const F = u.value?.api.rowSelection;
1199
+ ht(W.value, m) || (m ? F?.setSnapshot(m) : F?.clear(), H());
1131
1200
  return;
1132
1201
  }
1133
- _();
1202
+ H();
1134
1203
  return;
1135
1204
  }
1136
1205
  k.clearRowSelection?.();
1137
1206
  },
1138
1207
  { immediate: !0 }
1139
- ), p(
1208
+ ), w(
1140
1209
  () => e.viewMode,
1141
1210
  (a) => {
1142
- y.value = a === "gantt" ? "gantt" : "table";
1211
+ p.value = a === "gantt" ? "gantt" : "table";
1143
1212
  },
1144
1213
  { immediate: !0 }
1145
1214
  );
1146
- const ce = (a) => {
1215
+ const ye = (a) => {
1147
1216
  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({
1217
+ p.value = m, n("update:viewMode", m);
1218
+ }, Ge = () => {
1219
+ const a = g.getState();
1220
+ return a ? $({
1152
1221
  state: a,
1153
- viewMode: y.value
1222
+ viewMode: p.value
1154
1223
  }) : 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;
1224
+ }, Pe = (a, m) => Ce(a, g.migrateState, m), xe = (a, m) => {
1225
+ const F = $(a);
1226
+ return g.applyState(F.state, m) ? (F.viewMode && ye(F.viewMode), !0) : !1;
1158
1227
  };
1159
- return se(() => {
1160
- v.dispose();
1161
- }), f({
1228
+ return fe(() => {
1229
+ g.dispose();
1230
+ }), c({
1162
1231
  grid: u,
1163
- rowModel: c,
1232
+ rowModel: f,
1164
1233
  getApi: () => u.value?.api ?? null,
1165
1234
  getRuntime: () => u.value?.runtime ?? null,
1166
1235
  getCore: () => u.value?.core ?? null,
1167
- getColumnState: () => v.getColumnState(),
1236
+ getColumnState: () => g.getColumnState(),
1168
1237
  getColumnSnapshot: () => u.value?.api.columns.getSnapshot() ?? null,
1169
- getSelectionAggregatesLabel: () => te.value,
1238
+ getSelectionAggregatesLabel: () => ne.value,
1170
1239
  getSelectionSummary: () => u.value?.api.selection.summarize() ?? null,
1171
- getView: () => y.value,
1172
- setView: ce,
1173
- getSavedView: be,
1174
- 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,
1240
+ getView: () => p.value,
1241
+ setView: ye,
1242
+ getSavedView: Ge,
1243
+ migrateSavedView: Pe,
1244
+ applySavedView: xe,
1245
+ applyColumnState: g.applyColumnState,
1246
+ getState: g.getState,
1247
+ migrateState: g.migrateState,
1248
+ applyState: g.applyState,
1249
+ exportPivotLayout: g.exportPivotLayout,
1250
+ exportPivotInterop: g.exportPivotInterop,
1251
+ importPivotLayout: g.importPivotLayout,
1252
+ expandAllGroups: g.expandAllGroups,
1253
+ collapseAllGroups: g.collapseAllGroups,
1185
1254
  insertRowsAt: (a, m) => u.value?.api.rows.insertDataAt(a, m) ?? !1,
1186
1255
  insertRowBefore: (a, m) => u.value?.api.rows.insertDataBefore(a, m) ?? !1,
1187
1256
  insertRowAfter: (a, m) => u.value?.api.rows.insertDataAfter(a, m) ?? !1,
@@ -1194,29 +1263,31 @@ const dt = we({
1194
1263
  rows: e.rows,
1195
1264
  runtime: u.value?.runtime ?? null,
1196
1265
  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,
1207
- renderMode: w.value,
1266
+ selectionSnapshot: Z,
1267
+ selectionAnchor: ee,
1268
+ rowSelectionSnapshot: W,
1269
+ syncSelectionSnapshotFromRuntime: te,
1270
+ syncRowSelectionSnapshotFromRuntime: H,
1271
+ flushRowSelectionSnapshotUpdates: me,
1272
+ sortModel: Q.value,
1273
+ filterModel: z.value,
1274
+ groupBy: T.value,
1275
+ pivotModel: _.value,
1276
+ renderMode: S.value,
1208
1277
  virtualization: K.value,
1209
1278
  columnMenu: B.value,
1210
- cellMenu: h.value,
1211
- rowIndexMenu: R.value,
1212
- columnLayout: P.value,
1279
+ cellMenu: b.value,
1280
+ rowIndexMenu: M.value,
1281
+ columnLayout: D.value,
1213
1282
  aggregations: G.value,
1214
1283
  advancedFilter: d.value,
1284
+ findReplace: U.value,
1285
+ gridLines: v.value,
1215
1286
  rowHeightMode: e.rowHeightMode,
1216
1287
  baseRowHeight: e.baseRowHeight,
1217
- layoutMode: O.value.layoutMode,
1218
- minRows: O.value.minRows,
1219
- maxRows: O.value.maxRows,
1288
+ layoutMode: A.value.layoutMode,
1289
+ minRows: A.value.minRows,
1290
+ maxRows: A.value.maxRows,
1220
1291
  fillHandle: e.fillHandle,
1221
1292
  rangeMove: e.rangeMove,
1222
1293
  rowHover: e.rowHover,
@@ -1224,30 +1295,30 @@ const dt = we({
1224
1295
  isCellEditable: e.isCellEditable,
1225
1296
  showRowIndex: e.showRowIndex,
1226
1297
  rowSelection: e.rowSelection,
1227
- viewMode: y.value,
1298
+ viewMode: p.value,
1228
1299
  gantt: e.gantt,
1229
1300
  toolbarModules: e.toolbarModules
1230
1301
  };
1231
- return ue(
1232
- rt,
1302
+ return ce(
1303
+ gt,
1233
1304
  {
1234
1305
  ...o,
1235
1306
  ref: u,
1236
1307
  key: l.value,
1237
1308
  rows: e.rows,
1238
- rowModel: c.value,
1309
+ rowModel: f.value,
1239
1310
  columns: V.value,
1240
1311
  theme: e.theme,
1241
- layoutMode: O.value.layoutMode,
1242
- renderMode: w.value,
1243
- pagination: b.value,
1312
+ layoutMode: A.value.layoutMode,
1313
+ renderMode: S.value,
1314
+ pagination: O.value,
1244
1315
  plugins: e.plugins,
1245
1316
  services: i.value,
1246
1317
  startupOrder: e.startupOrder,
1247
1318
  autoStart: e.autoStart,
1248
- onCellChange: S,
1249
- onSelectionChange: Re,
1250
- onRowSelectionChange: Me
1319
+ onCellChange: h,
1320
+ onSelectionChange: Le,
1321
+ onRowSelectionChange: De
1251
1322
  },
1252
1323
  r.default ? {
1253
1324
  default: (m) => r.default?.({
@@ -1259,7 +1330,7 @@ const dt = we({
1259
1330
  }
1260
1331
  })
1261
1332
  } : {
1262
- default: (m) => ue(ze, {
1333
+ default: (m) => ce(ke, {
1263
1334
  ...a,
1264
1335
  runtime: m.runtime,
1265
1336
  runtimeRowModel: m.rowModel
@@ -1268,14 +1339,14 @@ const dt = we({
1268
1339
  );
1269
1340
  };
1270
1341
  }
1271
- }), Rt = dt;
1342
+ }), xt = bt;
1272
1343
  export {
1273
- Rt as DataGrid,
1274
- ht as clearDataGridSavedViewInStorage,
1275
- dt as default,
1276
- he as migrateDataGridSavedView,
1277
- et as parseDataGridSavedView,
1278
- St as readDataGridSavedViewFromStorage,
1279
- Ze as serializeDataGridSavedView,
1280
- wt as writeDataGridSavedViewToStorage
1344
+ xt as DataGrid,
1345
+ Pt as clearDataGridSavedViewInStorage,
1346
+ bt as default,
1347
+ Ce as migrateDataGridSavedView,
1348
+ ct as parseDataGridSavedView,
1349
+ Gt as readDataGridSavedViewFromStorage,
1350
+ dt as serializeDataGridSavedView,
1351
+ Dt as writeDataGridSavedViewToStorage
1281
1352
  };