@affino/datagrid-vue-app 0.1.49 → 0.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
- import { defineComponent as je, ref as x, provide as tt, computed as f, watch as h, onBeforeUnmount as pe, h as ge, mergeProps as ot, nextTick as nt, unref as Me, toRef as Ce } from "vue";
2
- import { useDataGridRuntime as rt, cloneDataGridFilterSnapshot as lt } from "@affino/datagrid-vue";
3
- import { useDataGridAppSelection as at, useDataGridAppRowSelection as it } from "@affino/datagrid-vue/app";
4
- import { r as ut, g as st, h as dt, i as ct, j as ft, b as mt, d as yt, c as vt, k as gt, u as pt, D as wt } from "./chunks/useDataGridAppRowModel-DV-_lFKE.js";
5
- import { a as Do, l as Po } from "./chunks/useDataGridAppRowModel-DV-_lFKE.js";
6
- import { r as St } from "./chunks/dataGridAdvancedFilter-xnME5bRa.js";
7
- import { r as ht } from "./chunks/DataGridGanttStageEntry-BwdBiQkI.js";
8
- import { applyGridTheme as Rt, resolveGridThemeTokens as bt, defaultStyleConfig as I, sugarTheme as Ie, industrialNeutralTheme as Oe } from "@affino/datagrid-theme";
9
- import { d as Mt } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
10
- function yo() {
1
+ import { defineComponent as Ie, ref as x, provide as rt, computed as f, watch as h, onBeforeUnmount as Se, h as ge, mergeProps as lt, nextTick as at, unref as Oe, toRef as Ae } from "vue";
2
+ import { useDataGridRuntime as it, cloneDataGridFilterSnapshot as ut } from "@affino/datagrid-vue";
3
+ import { useDataGridAppSelection as st, useDataGridAppRowSelection as dt } from "@affino/datagrid-vue/app";
4
+ import { r as ct, g as ft, h as mt, i as yt, j as vt, b as gt, d as pt, c as wt, k as St, u as ht, D as Rt } from "./chunks/useDataGridAppRowModel-BCi5miT8.js";
5
+ import { a as Io, l as Ko } from "./chunks/useDataGridAppRowModel-BCi5miT8.js";
6
+ import { r as bt } from "./chunks/dataGridAdvancedFilter-xnME5bRa.js";
7
+ import { r as Mt } from "./chunks/DataGridGanttStageEntry-DQBFS3-m.js";
8
+ import { applyGridTheme as Ct, resolveGridThemeTokens as Ot, defaultStyleConfig as I, sugarTheme as Ke, industrialNeutralTheme as De } from "@affino/datagrid-theme";
9
+ import { d as At } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
10
+ function Ro() {
11
11
  return (e) => e;
12
12
  }
13
- const Ct = {
13
+ const Dt = {
14
14
  default: I,
15
- "industrial-neutral": Oe,
16
- industrialNeutral: Oe,
17
- sugar: Ie
15
+ "industrial-neutral": De,
16
+ industrialNeutral: De,
17
+ sugar: Ke
18
18
  };
19
- function Ot(e, t) {
19
+ function Bt(e, t) {
20
20
  if (!e && !t)
21
21
  return;
22
22
  const l = {
23
23
  ...e ?? {}
24
24
  };
25
- for (const [o, u] of Object.entries(t ?? {}))
25
+ for (const [o, i] of Object.entries(t ?? {}))
26
26
  l[o] = {
27
27
  ...l[o] ?? {},
28
- ...u
28
+ ...i
29
29
  };
30
30
  return l;
31
31
  }
@@ -40,34 +40,34 @@ function fe(e, t) {
40
40
  summary: { ...e.summary ?? {}, ...t.summary ?? {} },
41
41
  state: { ...e.state ?? {}, ...t.state ?? {} },
42
42
  tokens: { ...e.tokens ?? {}, ...t.tokens ?? {} },
43
- tokenVariants: Ot(e.tokenVariants, t.tokenVariants)
43
+ tokenVariants: Bt(e.tokenVariants, t.tokenVariants)
44
44
  };
45
45
  }
46
- function At(e) {
46
+ function Ft(e) {
47
47
  return !e || typeof e != "object" ? !1 : "tokens" in e || "tokenVariants" in e || "activeTokenVariant" in e || "defaultTokenVariant" in e || "inheritThemeFromDocument" in e || "documentDarkClass" in e || "grid" in e || "header" in e || "body" in e || "group" in e || "summary" in e || "state" in e;
48
48
  }
49
- function Bt(e) {
50
- return e == null ? I : typeof e == "string" ? e === "sugar" ? fe(I, Ie) : Ct[e] ?? I : At(e) ? fe(I, e) : fe(I, {
49
+ function Pt(e) {
50
+ return e == null ? I : typeof e == "string" ? e === "sugar" ? fe(I, Ke) : Dt[e] ?? I : Ft(e) ? fe(I, e) : fe(I, {
51
51
  tokens: e
52
52
  });
53
53
  }
54
- function Dt(e) {
55
- const t = Bt(e);
56
- return bt(t ?? I, {
54
+ function Gt(e) {
55
+ const t = Pt(e);
56
+ return Ot(t ?? I, {
57
57
  document: typeof document > "u" ? void 0 : document
58
58
  });
59
59
  }
60
- function Ae(e, t) {
61
- const l = Dt(t);
62
- return Rt(e, l), l;
63
- }
64
60
  function Be(e, t) {
61
+ const l = Gt(t);
62
+ return Ct(e, l), l;
63
+ }
64
+ function Fe(e, t) {
65
65
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
66
66
  }
67
- function De(e, t) {
67
+ function Pe(e, t) {
68
68
  return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : t;
69
69
  }
70
- function Pt(e) {
70
+ function xt(e) {
71
71
  if (e !== void 0) {
72
72
  if (e == null)
73
73
  return null;
@@ -82,23 +82,54 @@ function Pt(e) {
82
82
  return e;
83
83
  }
84
84
  }
85
- function Gt(e, t) {
85
+ function jt(e, t) {
86
86
  return t === !0 || t && typeof t == "object" ? "pagination" : e ?? "virtualization";
87
87
  }
88
- function Ft(e, t, l, o) {
88
+ function Lt(e, t, l, o) {
89
89
  if (t !== "pagination")
90
90
  return null;
91
- const u = 100, a = De(l, u), y = Be(o, 0);
91
+ const i = 100, a = Pe(l, i), y = Fe(o, 0);
92
92
  return e === !0 || e === !1 || e == null ? {
93
93
  pageSize: a,
94
94
  currentPage: y
95
95
  } : {
96
- pageSize: De(l ?? e.pageSize, u),
97
- currentPage: Be(o ?? e.currentPage, 0)
96
+ pageSize: Pe(l ?? e.pageSize, i),
97
+ currentPage: Fe(o ?? e.currentPage, 0)
98
98
  };
99
99
  }
100
+ const pe = "Search rows", we = "contains";
101
+ function It(e) {
102
+ return typeof e == "string" && e.trim().length > 0 ? e.trim() : pe;
103
+ }
104
+ function Kt(e) {
105
+ return e === "tokens" ? "tokens" : we;
106
+ }
107
+ function Ht(e) {
108
+ if (!Array.isArray(e))
109
+ return null;
110
+ const t = e.map((l) => l.trim()).filter((l, o, i) => l.length > 0 && i.indexOf(l) === o);
111
+ return t.length > 0 ? Object.freeze(t) : null;
112
+ }
113
+ function zt(e) {
114
+ return Object.freeze(typeof e == "boolean" ? {
115
+ enabled: e,
116
+ placeholder: pe,
117
+ columns: null,
118
+ mode: we
119
+ } : e ? {
120
+ enabled: !0,
121
+ placeholder: It(e.placeholder),
122
+ columns: Ht(e.columns),
123
+ mode: Kt(e.mode)
124
+ } : {
125
+ enabled: !1,
126
+ placeholder: pe,
127
+ columns: null,
128
+ mode: we
129
+ });
130
+ }
100
131
  const me = "Find / replace";
101
- function xt(e) {
132
+ function Et(e) {
102
133
  return typeof e == "boolean" ? {
103
134
  enabled: e,
104
135
  buttonLabel: me
@@ -110,22 +141,22 @@ function xt(e) {
110
141
  buttonLabel: me
111
142
  };
112
143
  }
113
- const jt = "all", Ke = {
144
+ const kt = "all", He = {
114
145
  all: "columns",
115
146
  rows: "none",
116
147
  columns: "columns",
117
148
  none: "none"
118
149
  };
119
- function Pe(e) {
120
- return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : jt;
150
+ function Ge(e) {
151
+ return e === "rows" || e === "columns" || e === "none" || e === "all" ? e : kt;
121
152
  }
122
- function It(e, t) {
123
- return e === "columns" || e === "none" ? e : Ke[t];
153
+ function Tt(e, t) {
154
+ return e === "columns" || e === "none" ? e : He[t];
124
155
  }
125
- function Ge(e, t) {
156
+ function xe(e, t) {
126
157
  return e !== "none" || t === "columns";
127
158
  }
128
- function Fe(e) {
159
+ function je(e) {
129
160
  const t = e.body === "all" || e.body === "rows", l = e.body === "all" || e.body === "columns", o = e.header === "columns";
130
161
  return {
131
162
  body: e.body,
@@ -136,29 +167,29 @@ function Fe(e) {
136
167
  headerColumns: o
137
168
  };
138
169
  }
139
- function Kt(e) {
170
+ function Vt(e) {
140
171
  if (typeof e == "string") {
141
- const o = Pe(e), u = Ke[o];
142
- return Fe({
172
+ const o = Ge(e), i = He[o];
173
+ return je({
143
174
  body: o,
144
- header: u,
145
- pinnedSeparators: Ge(o, u)
175
+ header: i,
176
+ pinnedSeparators: xe(o, i)
146
177
  });
147
178
  }
148
- const t = Pe(e?.body), l = It(e?.header, t);
149
- return Fe({
179
+ const t = Ge(e?.body), l = Tt(e?.header, t);
180
+ return je({
150
181
  body: t,
151
182
  header: l,
152
- pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : Ge(t, l)
183
+ pinnedSeparators: typeof e?.pinnedSeparators == "boolean" ? e.pinnedSeparators : xe(t, l)
153
184
  });
154
185
  }
155
- function xe(e) {
186
+ function Le(e) {
156
187
  if (typeof e != "number" || !Number.isFinite(e))
157
188
  return null;
158
189
  const t = Math.max(0, Math.trunc(e));
159
190
  return t > 0 ? t : null;
160
191
  }
161
- function Ht(e, t, l) {
192
+ function Wt(e, t, l) {
162
193
  const o = e === "auto-height" ? "auto-height" : "fill";
163
194
  if (o !== "auto-height")
164
195
  return {
@@ -166,15 +197,15 @@ function Ht(e, t, l) {
166
197
  minRows: null,
167
198
  maxRows: null
168
199
  };
169
- const u = xe(t);
170
- let a = xe(l);
171
- return u !== null && a !== null && a < u && (a = u), {
200
+ const i = Le(t);
201
+ let a = Le(l);
202
+ return i !== null && a !== null && a < i && (a = i), {
172
203
  layoutMode: o,
173
- minRows: u,
204
+ minRows: i,
174
205
  maxRows: a
175
206
  };
176
207
  }
177
- function Lt(e) {
208
+ function _t(e) {
178
209
  return {
179
210
  ...e,
180
211
  transaction: null
@@ -183,54 +214,54 @@ function Lt(e) {
183
214
  function X(e) {
184
215
  return {
185
216
  ...e,
186
- state: Lt(e.state)
217
+ state: _t(e.state)
187
218
  };
188
219
  }
189
- function zt(e) {
220
+ function Ut(e) {
190
221
  return typeof e == "object" && e !== null;
191
222
  }
192
- function He(e, t, l) {
193
- const o = zt(e) ? e : null, u = t(o && "state" in o ? o.state : e, l);
194
- if (!u)
223
+ function ze(e, t, l) {
224
+ const o = Ut(e) ? e : null, i = t(o && "state" in o ? o.state : e, l);
225
+ if (!i)
195
226
  return null;
196
227
  const a = o?.viewMode, y = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
197
228
  return X({
198
- state: u,
229
+ state: i,
199
230
  ...y ? { viewMode: y } : {}
200
231
  });
201
232
  }
202
- function Et(e) {
233
+ function Nt(e) {
203
234
  return JSON.stringify(X(e));
204
235
  }
205
- function Vt(e, t, l) {
236
+ function qt(e, t, l) {
206
237
  if (typeof e != "string" || e.trim().length === 0)
207
238
  return null;
208
239
  try {
209
- return He(JSON.parse(e), t, l);
240
+ return ze(JSON.parse(e), t, l);
210
241
  } catch {
211
242
  return null;
212
243
  }
213
244
  }
214
- function vo(e, t, l) {
245
+ function bo(e, t, l) {
215
246
  if (!e || typeof t != "string" || t.trim().length === 0)
216
247
  return !1;
217
248
  try {
218
- return e.setItem(t, Et(l)), !0;
249
+ return e.setItem(t, Nt(l)), !0;
219
250
  } catch {
220
251
  return !1;
221
252
  }
222
253
  }
223
- function go(e, t, l, o) {
254
+ function Mo(e, t, l, o) {
224
255
  if (!e || typeof t != "string" || t.trim().length === 0)
225
256
  return null;
226
257
  try {
227
- const u = e.getItem(t);
228
- return u ? Vt(u, l, o) : null;
258
+ const i = e.getItem(t);
259
+ return i ? qt(i, l, o) : null;
229
260
  } catch {
230
261
  return null;
231
262
  }
232
263
  }
233
- function po(e, t) {
264
+ function Co(e, t) {
234
265
  if (!e || typeof t != "string" || t.trim().length === 0)
235
266
  return !1;
236
267
  try {
@@ -240,7 +271,7 @@ function po(e, t) {
240
271
  }
241
272
  }
242
273
  const ye = "Aggregations";
243
- function Wt(e) {
274
+ function Jt(e) {
244
275
  return typeof e == "boolean" ? {
245
276
  enabled: e,
246
277
  buttonLabel: ye
@@ -252,10 +283,10 @@ function Wt(e) {
252
283
  buttonLabel: ye
253
284
  };
254
285
  }
255
- function $(e, t) {
286
+ function Q(e, t) {
256
287
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t;
257
288
  }
258
- function Tt(e, t) {
289
+ function Yt(e, t) {
259
290
  const l = {
260
291
  rows: !0,
261
292
  columns: !1,
@@ -268,12 +299,12 @@ function Tt(e, t) {
268
299
  l.rows = !1, l.columns = !1;
269
300
  else if (e && typeof e == "object") {
270
301
  l.rows = e.rows ?? l.rows, l.columns = e.columns ?? l.columns;
271
- const o = $(e.overscan, l.rowOverscan);
272
- l.rowOverscan = $(e.rowOverscan, o), l.columnOverscan = $(e.columnOverscan, $(e.overscan, l.columnOverscan));
302
+ const o = Q(e.overscan, l.rowOverscan);
303
+ l.rowOverscan = Q(e.rowOverscan, o), l.columnOverscan = Q(e.columnOverscan, Q(e.overscan, l.columnOverscan));
273
304
  }
274
305
  return t === "pagination" && (l.rows = !1), l;
275
306
  }
276
- const _t = je({
307
+ const Qt = Ie({
277
308
  name: "DataGridRuntimeHost",
278
309
  inheritAttrs: !1,
279
310
  props: {
@@ -327,11 +358,11 @@ const _t = je({
327
358
  "selection-change": (e) => !0,
328
359
  "row-selection-change": (e) => !0
329
360
  },
330
- setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
361
+ setup(e, { attrs: t, slots: l, emit: o, expose: i }) {
331
362
  const a = x(null);
332
- tt(Mt, a);
363
+ rt(At, a);
333
364
  let y = null;
334
- const s = rt({
365
+ const d = it({
335
366
  rows: f(() => e.rows),
336
367
  rowModel: e.rowModel,
337
368
  columns: f(() => e.columns),
@@ -339,43 +370,43 @@ const _t = je({
339
370
  services: e.services,
340
371
  startupOrder: e.startupOrder,
341
372
  autoStart: e.autoStart
342
- }), S = s, R = {
343
- api: s.api,
344
- syncBodyRowsInRange: s.syncBodyRowsInRange,
345
- setViewportRange: s.setViewportRange,
346
- setVirtualWindowRange: s.setVirtualWindowRange,
347
- setRows: s.setRows,
348
- rowPartition: s.rowPartition,
349
- virtualWindow: s.virtualWindow,
350
- columnSnapshot: s.columnSnapshot,
373
+ }), S = d, R = {
374
+ api: d.api,
375
+ syncBodyRowsInRange: d.syncBodyRowsInRange,
376
+ setViewportRange: d.setViewportRange,
377
+ setVirtualWindowRange: d.setVirtualWindowRange,
378
+ setRows: d.setRows,
379
+ rowPartition: d.rowPartition,
380
+ virtualWindow: d.virtualWindow,
381
+ columnSnapshot: d.columnSnapshot,
351
382
  getBodyRowAtIndex: S.getBodyRowAtIndex,
352
383
  resolveBodyRowIndexById: S.resolveBodyRowIndexById
353
- }, D = () => {
384
+ }, B = () => {
354
385
  if (e.renderMode === "pagination") {
355
386
  const v = e.pagination ?? { pageSize: 100, currentPage: 0 };
356
- s.api.rows.setPagination({
387
+ d.api.rows.setPagination({
357
388
  pageSize: Math.max(1, Math.trunc(v.pageSize)),
358
389
  currentPage: Math.max(0, Math.trunc(v.currentPage))
359
390
  });
360
391
  return;
361
392
  }
362
- s.api.rows.setPagination(null);
393
+ d.api.rows.setPagination(null);
363
394
  };
364
395
  h(
365
396
  () => e.renderMode,
366
397
  () => {
367
- D();
398
+ B();
368
399
  },
369
400
  { immediate: !0 }
370
401
  ), h(
371
402
  () => e.pagination,
372
403
  () => {
373
- D();
404
+ B();
374
405
  },
375
406
  { immediate: !0, deep: !0 }
376
407
  ), typeof document < "u" && (y = new MutationObserver(() => {
377
408
  const v = a.value;
378
- v && Ae(v, e.theme);
409
+ v && Be(v, e.theme);
379
410
  }), y.observe(document.documentElement, {
380
411
  attributes: !0,
381
412
  attributeFilter: ["class", "data-theme"]
@@ -383,26 +414,26 @@ const _t = je({
383
414
  [() => e.theme, a],
384
415
  () => {
385
416
  const v = a.value;
386
- v && Ae(v, e.theme);
417
+ v && Be(v, e.theme);
387
418
  },
388
419
  { immediate: !0, deep: !0 }
389
420
  );
390
- const C = s.api.events.on("rows:changed", (v) => {
421
+ const C = d.api.events.on("rows:changed", (v) => {
391
422
  o("cell-change", v);
392
- }), b = s.api.events.on("selection:changed", (v) => {
423
+ }), b = d.api.events.on("selection:changed", (v) => {
393
424
  o("selection-change", v);
394
- }), j = s.api.events.on("row-selection:changed", (v) => {
425
+ }), j = d.api.events.on("row-selection:changed", (v) => {
395
426
  o("row-selection-change", v);
396
427
  });
397
- pe(() => {
428
+ Se(() => {
398
429
  C(), b(), j(), y?.disconnect(), y = null;
399
430
  });
400
- const F = f(() => {
401
- const v = s.virtualWindow.value;
431
+ const P = f(() => {
432
+ const v = d.virtualWindow.value;
402
433
  return {
403
434
  ...v ?? {},
404
- rowTotal: v?.rowTotal ?? s.rowPartition.value.bodyRowCount,
405
- colTotal: s.columnSnapshot.value.visibleColumns.length
435
+ rowTotal: v?.rowTotal ?? d.rowPartition.value.bodyRowCount,
436
+ colTotal: d.columnSnapshot.value.visibleColumns.length
406
437
  };
407
438
  }), g = () => {
408
439
  const v = () => {
@@ -416,7 +447,7 @@ const _t = je({
416
447
  }
417
448
  return typeof document < "u" && document.activeElement === M;
418
449
  }, p = (M) => {
419
- nt(() => {
450
+ at(() => {
420
451
  if (!(v() || M >= 3)) {
421
452
  if (typeof window < "u") {
422
453
  window.requestAnimationFrame(() => {
@@ -430,25 +461,25 @@ const _t = je({
430
461
  };
431
462
  p(0);
432
463
  };
433
- return u({
434
- api: s.api,
435
- core: s.core,
464
+ return i({
465
+ api: d.api,
466
+ core: d.core,
436
467
  runtime: R,
437
- rowModel: s.rowModel,
438
- columnModel: s.columnModel,
439
- columnSnapshot: s.columnSnapshot,
440
- rowPartition: s.rowPartition,
441
- setRows: s.setRows,
442
- syncBodyRowsInRange: s.syncBodyRowsInRange,
468
+ rowModel: d.rowModel,
469
+ columnModel: d.columnModel,
470
+ columnSnapshot: d.columnSnapshot,
471
+ rowPartition: d.rowPartition,
472
+ setRows: d.setRows,
473
+ syncBodyRowsInRange: d.syncBodyRowsInRange,
443
474
  getBodyRowAtIndex: S.getBodyRowAtIndex,
444
475
  resolveBodyRowIndexById: S.resolveBodyRowIndexById,
445
- virtualWindow: s.virtualWindow,
476
+ virtualWindow: d.virtualWindow,
446
477
  restoreFocus: g,
447
- start: s.start,
448
- stop: s.stop
478
+ start: d.start,
479
+ stop: d.stop
449
480
  }), () => ge(
450
481
  "div",
451
- ot(t, {
482
+ lt(t, {
452
483
  ref: a,
453
484
  class: [
454
485
  "affino-datagrid-app-root",
@@ -463,19 +494,19 @@ const _t = je({
463
494
  }
464
495
  }),
465
496
  l.default?.({
466
- api: s.api,
467
- core: s.core,
497
+ api: d.api,
498
+ core: d.core,
468
499
  runtime: R,
469
500
  grid: R,
470
- rowModel: s.rowModel,
471
- columnModel: s.columnModel,
472
- columnSnapshot: s.columnSnapshot.value,
473
- rowPartition: s.rowPartition.value,
474
- setRows: s.setRows,
475
- syncBodyRowsInRange: s.syncBodyRowsInRange,
501
+ rowModel: d.rowModel,
502
+ columnModel: d.columnModel,
503
+ columnSnapshot: d.columnSnapshot.value,
504
+ rowPartition: d.rowPartition.value,
505
+ setRows: d.setRows,
506
+ syncBodyRowsInRange: d.syncBodyRowsInRange,
476
507
  getBodyRowAtIndex: S.getBodyRowAtIndex,
477
508
  resolveBodyRowIndexById: S.resolveBodyRowIndexById,
478
- virtualWindow: F.value
509
+ virtualWindow: P.value
479
510
  }) ?? []
480
511
  );
481
512
  }
@@ -483,54 +514,54 @@ const _t = je({
483
514
  function ve(e) {
484
515
  return Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : null;
485
516
  }
486
- function B(e) {
517
+ function D(e) {
487
518
  try {
488
519
  return JSON.stringify(e);
489
520
  } catch {
490
521
  return null;
491
522
  }
492
523
  }
493
- function kt(e) {
524
+ function $t(e) {
494
525
  return e ? {
495
526
  fields: [...e.fields],
496
527
  expandedByDefault: e.expandedByDefault
497
528
  } : null;
498
529
  }
499
- function Ut(e) {
500
- let t = null, l = null, o = !1, u = null, a = null, y = null, s = null, S = null, R = null, D = null, C = null, b = null;
530
+ function Xt(e) {
531
+ let t = null, l = null, o = !1, i = null, a = null, y = null, d = null, S = null, R = null, B = null, C = null, b = null;
501
532
  const j = () => {
502
533
  t?.(), l?.(), t = null, l = null;
503
- }, F = () => {
534
+ }, P = () => {
504
535
  const n = e.gridRef.value;
505
536
  return !n || n.api.lifecycle.state === "disposed" ? null : n;
506
- }, g = () => F()?.api ?? null, v = () => {
537
+ }, g = () => P()?.api ?? null, v = () => {
507
538
  const n = g()?.columns;
508
539
  if (!n)
509
540
  return null;
510
- const d = n.getSnapshot(), i = {}, m = {}, A = {};
511
- for (const O of d.columns)
512
- i[O.key] = O.visible, m[O.key] = O.width, A[O.key] = O.pin;
541
+ const s = n.getSnapshot(), u = {}, m = {}, A = {};
542
+ for (const O of s.columns)
543
+ u[O.key] = O.visible, m[O.key] = O.width, A[O.key] = O.pin;
513
544
  return {
514
- order: [...d.order],
515
- visibility: i,
545
+ order: [...s.order],
546
+ visibility: u,
516
547
  widths: m,
517
548
  pins: A
518
549
  };
519
550
  }, p = () => {
520
551
  o || (o = !0, queueMicrotask(() => {
521
552
  o = !1;
522
- const n = v(), d = g();
553
+ const n = v(), s = g();
523
554
  if (n) {
524
- const i = B(n);
525
- R = i, i !== y && (y = i, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
555
+ const u = D(n);
556
+ R = u, u !== y && (y = u, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
526
557
  Object.entries(n.visibility).filter(([, m]) => !m).map(([m]) => m)
527
558
  ), e.emit.columnWidths(n.widths), e.emit.columnPins(n.pins));
528
559
  }
529
- if (d) {
530
- const i = kt(d.rows.getSnapshot().groupBy), m = B(i);
531
- m !== S && (S = m, e.emit.groupBy(i));
532
- const A = d.state.get(), O = B(A);
533
- D = O, O !== s && (s = O, e.emit.state(A));
560
+ if (s) {
561
+ const u = $t(s.rows.getSnapshot().groupBy), m = D(u);
562
+ m !== S && (S = m, e.emit.groupBy(u));
563
+ const A = s.state.get(), O = D(A);
564
+ B = O, O !== d && (d = O, e.emit.state(A));
534
565
  }
535
566
  }));
536
567
  }, M = () => {
@@ -541,54 +572,54 @@ function Ut(e) {
541
572
  });
542
573
  }, Z = () => {
543
574
  const n = g()?.columns;
544
- return n ? new Set(n.getSnapshot().columns.map((d) => d.key)) : null;
575
+ return n ? new Set(n.getSnapshot().columns.map((s) => s.key)) : null;
545
576
  }, ee = (n) => {
546
- const d = /* @__PURE__ */ new Set();
577
+ const s = /* @__PURE__ */ new Set();
547
578
  if (!n)
548
- return d;
549
- for (const i of n.order)
550
- d.add(i);
551
- for (const i of Object.keys(n.visibility ?? {}))
552
- d.add(i);
553
- for (const i of Object.keys(n.widths ?? {}))
554
- d.add(i);
555
- for (const i of Object.keys(n.pins ?? {}))
556
- d.add(i);
557
- return d;
579
+ return s;
580
+ for (const u of n.order)
581
+ s.add(u);
582
+ for (const u of Object.keys(n.visibility ?? {}))
583
+ s.add(u);
584
+ for (const u of Object.keys(n.widths ?? {}))
585
+ s.add(u);
586
+ for (const u of Object.keys(n.pins ?? {}))
587
+ s.add(u);
588
+ return s;
558
589
  }, z = (n) => {
559
- const d = Z();
560
- if (!d)
590
+ const s = Z();
591
+ if (!s)
561
592
  return !1;
562
- const i = ee(n);
563
- if (i.size === 0)
593
+ const u = ee(n);
594
+ if (u.size === 0)
564
595
  return !0;
565
- for (const m of i)
566
- if (!d.has(m))
596
+ for (const m of u)
597
+ if (!s.has(m))
567
598
  return !1;
568
599
  return !0;
569
600
  }, E = (n) => z(n.columns), U = (n) => {
570
- const d = g();
571
- if (!d)
601
+ const s = g();
602
+ if (!s)
572
603
  return !1;
573
- d.columns.setOrder(n.order);
574
- for (const [i, m] of Object.entries(n.visibility))
575
- d.columns.setVisibility(i, m);
576
- for (const [i, m] of Object.entries(n.widths))
577
- d.columns.setWidth(i, ve(m));
578
- for (const [i, m] of Object.entries(n.pins))
579
- d.columns.setPin(i, m);
604
+ s.columns.setOrder(n.order);
605
+ for (const [u, m] of Object.entries(n.visibility))
606
+ s.columns.setVisibility(u, m);
607
+ for (const [u, m] of Object.entries(n.widths))
608
+ s.columns.setWidth(u, ve(m));
609
+ for (const [u, m] of Object.entries(n.pins))
610
+ s.columns.setPin(u, m);
580
611
  return !0;
581
612
  }, K = () => {
582
613
  if (b) {
583
- const n = b, d = g();
584
- if (d) {
585
- const i = d.state.migrate(n.state, { strict: n.options?.strict });
586
- i && E(i) && (b = null, d.state.set(i, n.options), a = B(n.state));
614
+ const n = b, s = g();
615
+ if (s) {
616
+ const u = s.state.migrate(n.state, { strict: n.options?.strict });
617
+ u && E(u) && (b = null, s.state.set(u, n.options), a = D(n.state));
587
618
  }
588
619
  }
589
620
  if (C && z(C.columnState)) {
590
621
  const n = C;
591
- C = null, u = B({
622
+ C = null, i = D({
592
623
  columnState: n.columnState,
593
624
  columnOrder: null,
594
625
  hiddenColumnKeys: null,
@@ -596,94 +627,94 @@ function Ut(e) {
596
627
  columnPins: null
597
628
  }), U(n.columnState);
598
629
  }
599
- }, V = () => {
630
+ }, k = () => {
600
631
  const n = g();
601
632
  !n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
602
- }, W = () => {
633
+ }, T = () => {
603
634
  const n = g();
604
635
  !n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
605
- }, H = () => {
636
+ }, V = () => {
606
637
  const n = g();
607
638
  !n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
608
- }, P = () => {
639
+ }, L = () => {
609
640
  const n = g();
610
641
  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)
611
642
  return;
612
- const d = B({
643
+ const s = D({
613
644
  columnState: e.props.columnState,
614
645
  columnOrder: e.props.columnOrder,
615
646
  hiddenColumnKeys: e.props.hiddenColumnKeys,
616
647
  columnWidths: e.props.columnWidths,
617
648
  columnPins: e.props.columnPins
618
649
  });
619
- if (d !== u) {
620
- if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && B(e.props.columnState) === R) {
621
- u = d;
650
+ if (s !== i) {
651
+ if (e.props.columnState && !e.props.columnOrder && !e.props.hiddenColumnKeys && !e.props.columnWidths && !e.props.columnPins && D(e.props.columnState) === R) {
652
+ i = s;
622
653
  return;
623
654
  }
624
655
  if (e.props.columnState) {
625
656
  n.columns.setOrder(e.props.columnState.order);
626
- for (const [i, m] of Object.entries(e.props.columnState.visibility))
627
- n.columns.setVisibility(i, m);
628
- for (const [i, m] of Object.entries(e.props.columnState.widths))
629
- n.columns.setWidth(i, ve(m));
630
- for (const [i, m] of Object.entries(e.props.columnState.pins))
631
- n.columns.setPin(i, m);
657
+ for (const [u, m] of Object.entries(e.props.columnState.visibility))
658
+ n.columns.setVisibility(u, m);
659
+ for (const [u, m] of Object.entries(e.props.columnState.widths))
660
+ n.columns.setWidth(u, ve(m));
661
+ for (const [u, m] of Object.entries(e.props.columnState.pins))
662
+ n.columns.setPin(u, m);
632
663
  }
633
664
  if (e.props.columnOrder && n.columns.setOrder(e.props.columnOrder), e.props.hiddenColumnKeys) {
634
- const i = new Set(e.props.hiddenColumnKeys), m = n.columns.getSnapshot();
665
+ const u = new Set(e.props.hiddenColumnKeys), m = n.columns.getSnapshot();
635
666
  for (const A of m.columns)
636
- n.columns.setVisibility(A.key, !i.has(A.key));
667
+ n.columns.setVisibility(A.key, !u.has(A.key));
637
668
  }
638
669
  if (e.props.columnWidths)
639
- for (const [i, m] of Object.entries(e.props.columnWidths))
640
- n.columns.setWidth(i, ve(m));
670
+ for (const [u, m] of Object.entries(e.props.columnWidths))
671
+ n.columns.setWidth(u, ve(m));
641
672
  if (e.props.columnPins)
642
- for (const [i, m] of Object.entries(e.props.columnPins))
643
- n.columns.setPin(i, m);
644
- u = d;
673
+ for (const [u, m] of Object.entries(e.props.columnPins))
674
+ n.columns.setPin(u, m);
675
+ i = s;
645
676
  }
646
- }, T = () => {
677
+ }, G = () => {
647
678
  const n = g();
648
679
  if (!n || e.props.state == null)
649
680
  return;
650
- const d = B(e.props.state);
651
- if (d === a)
681
+ const s = D(e.props.state);
682
+ if (s === a)
652
683
  return;
653
- if (d === D) {
654
- a = d;
684
+ if (s === B) {
685
+ a = s;
655
686
  return;
656
687
  }
657
- const i = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
658
- i && E(i) && (n.state.set(i, e.props.stateOptions ?? {}), a = d);
659
- }, _ = () => {
688
+ const u = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
689
+ u && E(u) && (n.state.set(u, e.props.stateOptions ?? {}), a = s);
690
+ }, W = () => {
660
691
  const n = g();
661
692
  n && (n.view.setRowHeightMode(e.props.rowHeightMode), n.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
662
693
  }, N = () => {
663
- const n = F();
664
- n && (u = null, a = null, j(), t = n.rowModel.subscribe(() => {
694
+ const n = P();
695
+ n && (i = null, a = null, j(), t = n.rowModel.subscribe(() => {
665
696
  p();
666
697
  }), l = n.columnModel.subscribe(() => {
667
698
  p();
668
- }), T(), P(), M(), V(), W(), H(), _(), K(), p(), e.emit.ready({ api: n.api }));
669
- }, q = () => g()?.state.get() ?? null, te = (n, d) => g()?.state.migrate(n, d) ?? null, L = (n) => z(n) ? (u = B({
699
+ }), G(), L(), M(), k(), T(), V(), W(), K(), p(), e.emit.ready({ api: n.api }));
700
+ }, te = () => g()?.state.get() ?? null, q = (n, s) => g()?.state.migrate(n, s) ?? null, oe = (n) => z(n) ? (i = D({
670
701
  columnState: n,
671
702
  columnOrder: null,
672
703
  hiddenColumnKeys: null,
673
704
  columnWidths: null,
674
705
  columnPins: null
675
- }), C = null, U(n) ? (p(), !0) : (C = { columnState: n }, !0)) : (C = { columnState: n }, !0), oe = (n, d) => {
676
- const i = g();
677
- if (!i)
678
- return b = { state: n, options: d }, !0;
679
- const m = i.state.migrate(n, { strict: d?.strict });
680
- return m ? E(m) ? (i.state.set(m, d), a = B(n), b = null, p(), !0) : (b = { state: n, options: d }, !0) : !1;
681
- }, ne = () => g()?.pivot.exportLayout() ?? null, J = () => g()?.pivot.exportInterop() ?? null, re = (n, d) => {
682
- const i = g();
683
- return i ? (i.pivot.importLayout(n, d), p(), !0) : !1;
684
- }, k = () => {
685
- g()?.rows.expandAllGroups(), p();
706
+ }), C = null, U(n) ? (p(), !0) : (C = { columnState: n }, !0)) : (C = { columnState: n }, !0), H = (n, s) => {
707
+ const u = g();
708
+ if (!u)
709
+ return b = { state: n, options: s }, !0;
710
+ const m = u.state.migrate(n, { strict: s?.strict });
711
+ return m ? E(m) ? (u.state.set(m, s), a = D(n), b = null, p(), !0) : (b = { state: n, options: s }, !0) : !1;
712
+ }, ne = () => g()?.pivot.exportLayout() ?? null, re = () => g()?.pivot.exportInterop() ?? null, J = (n, s) => {
713
+ const u = g();
714
+ return u ? (u.pivot.importLayout(n, s), p(), !0) : !1;
686
715
  }, le = () => {
716
+ g()?.rows.expandAllGroups(), p();
717
+ }, _ = () => {
687
718
  g()?.rows.collapseAllGroups(), p();
688
719
  };
689
720
  h(
@@ -695,13 +726,13 @@ function Ut(e) {
695
726
  ), h(
696
727
  () => e.props.columns,
697
728
  () => {
698
- u = null, a = null, T(), P(), K(), p();
729
+ i = null, a = null, G(), L(), K(), p();
699
730
  },
700
731
  { deep: !0 }
701
732
  ), h(
702
733
  () => [e.props.state, e.props.stateOptions],
703
734
  () => {
704
- T(), P(), M(), V(), W(), H(), _(), K(), p();
735
+ G(), L(), M(), k(), T(), V(), W(), K(), p();
705
736
  },
706
737
  { deep: !0 }
707
738
  ), h(
@@ -713,7 +744,7 @@ function Ut(e) {
713
744
  e.props.columnPins
714
745
  ],
715
746
  () => {
716
- P(), K(), p();
747
+ L(), K(), p();
717
748
  },
718
749
  { deep: !0 }
719
750
  ), h(
@@ -725,68 +756,68 @@ function Ut(e) {
725
756
  ), h(
726
757
  () => e.props.groupBy,
727
758
  () => {
728
- V(), p();
759
+ k(), p();
729
760
  },
730
761
  { deep: !0 }
731
762
  ), h(
732
763
  () => e.props.aggregationModel,
733
764
  () => {
734
- W(), p();
765
+ T(), p();
735
766
  },
736
767
  { deep: !0 }
737
768
  ), h(
738
769
  () => e.props.pivotModel,
739
770
  () => {
740
- H(), p();
771
+ V(), p();
741
772
  },
742
773
  { deep: !0 }
743
774
  ), h(
744
775
  () => [e.props.rowHeightMode, e.props.baseRowHeight],
745
776
  () => {
746
- _(), p();
777
+ W(), p();
747
778
  }
748
779
  );
749
780
  const Y = () => {
750
781
  j();
751
782
  };
752
- return pe(() => {
783
+ return Se(() => {
753
784
  Y();
754
785
  }), {
755
786
  emitSnapshotUpdates: p,
756
787
  handleGridReady: N,
757
788
  dispose: Y,
758
789
  getColumnState: v,
759
- getState: q,
760
- migrateState: te,
761
- applyColumnState: L,
762
- applyState: oe,
790
+ getState: te,
791
+ migrateState: q,
792
+ applyColumnState: oe,
793
+ applyState: H,
763
794
  exportPivotLayout: ne,
764
- exportPivotInterop: J,
765
- importPivotLayout: re,
766
- expandAllGroups: k,
767
- collapseAllGroups: le
795
+ exportPivotInterop: re,
796
+ importPivotLayout: J,
797
+ expandAllGroups: le,
798
+ collapseAllGroups: _
768
799
  };
769
800
  }
770
- function Nt(e) {
801
+ function Zt(e) {
771
802
  if (!Number.isFinite(e))
772
803
  return;
773
804
  const t = Math.trunc(e);
774
805
  return t > 0 ? t : void 0;
775
806
  }
776
- function qt(e) {
807
+ function eo(e) {
777
808
  return e === !1 ? !1 : e === "window" ? "window" : "grid";
778
809
  }
779
- function Jt(e) {
810
+ function to(e) {
780
811
  return e === !0 || e === "toolbar" ? "toolbar" : e === "external-only" ? "external-only" : !1;
781
812
  }
782
- function Yt() {
813
+ function oo() {
783
814
  return {
784
815
  canUndo: () => !1,
785
816
  canRedo: () => !1,
786
817
  runHistoryAction: async () => null
787
818
  };
788
819
  }
789
- function $t(e) {
820
+ function no(e) {
790
821
  if (e === !1)
791
822
  return {
792
823
  enabled: !1,
@@ -797,9 +828,9 @@ function $t(e) {
797
828
  const t = typeof e == "object" && e !== null ? e : {};
798
829
  return e === void 0 || e === !0 || t.enabled !== !1 ? {
799
830
  enabled: !0,
800
- depth: Nt(t.depth),
801
- shortcuts: qt(t.shortcuts),
802
- controls: Jt(t.controls),
831
+ depth: Zt(t.depth),
832
+ shortcuts: eo(t.shortcuts),
833
+ controls: to(t.controls),
803
834
  adapter: t.adapter
804
835
  } : {
805
836
  enabled: !1,
@@ -808,54 +839,54 @@ function $t(e) {
808
839
  controls: !1
809
840
  };
810
841
  }
811
- function wo() {
842
+ function Oo() {
812
843
  return (e) => e;
813
844
  }
814
- function So() {
845
+ function Ao() {
815
846
  return (e) => e;
816
847
  }
817
- function ho() {
848
+ function Do() {
818
849
  return (e) => e;
819
850
  }
820
- function Ro() {
851
+ function Bo() {
821
852
  return (e) => e;
822
853
  }
823
- function bo() {
854
+ function Fo() {
824
855
  return (e) => e;
825
856
  }
826
- function Qt(e, t) {
857
+ function ro(e, t) {
827
858
  if (!t || typeof e != "object" || e === null)
828
859
  return;
829
860
  const l = t.split(".").filter(Boolean);
830
861
  let o = e;
831
- for (const u of l) {
862
+ for (const i of l) {
832
863
  if (Array.isArray(o)) {
833
- const a = Number(u);
864
+ const a = Number(i);
834
865
  if (!Number.isInteger(a) || a < 0 || a >= o.length)
835
866
  return;
836
867
  o = o[a];
837
868
  continue;
838
869
  }
839
- if (typeof o != "object" || o === null || !(u in o))
870
+ if (typeof o != "object" || o === null || !(i in o))
840
871
  return;
841
- o = o[u];
872
+ o = o[i];
842
873
  }
843
874
  return o;
844
875
  }
845
- function Xt(e, t) {
876
+ function lo(e, t) {
846
877
  const l = /* @__PURE__ */ new Map();
847
878
  for (const o of e ?? []) {
848
- const u = String(o.key ?? "").trim();
849
- u && l.set(u, o);
879
+ const i = String(o.key ?? "").trim();
880
+ i && l.set(i, o);
850
881
  }
851
882
  if (!(l.size === 0 && typeof t != "function"))
852
- return (o, u) => {
883
+ return (o, i) => {
853
884
  if (typeof t == "function") {
854
- const R = t(o, u);
885
+ const R = t(o, i);
855
886
  if (typeof R < "u")
856
887
  return R;
857
888
  }
858
- const a = l.get(String(u ?? "").trim());
889
+ const a = l.get(String(i ?? "").trim());
859
890
  if (!a)
860
891
  return;
861
892
  const y = o.data;
@@ -863,14 +894,14 @@ function Xt(e, t) {
863
894
  return a.valueGetter(y);
864
895
  if (typeof a.accessor == "function")
865
896
  return a.accessor(y);
866
- const s = typeof a.field == "string" ? a.field.trim() : "";
867
- if (!s)
897
+ const d = typeof a.field == "string" ? a.field.trim() : "";
898
+ if (!d)
868
899
  return;
869
- const S = y[s];
870
- return typeof S < "u" ? S : Qt(y, s);
900
+ const S = y[d];
901
+ return typeof S < "u" ? S : ro(y, d);
871
902
  };
872
903
  }
873
- function Zt() {
904
+ function ao() {
874
905
  return {
875
906
  name: "selection",
876
907
  getRowSelectionSnapshot: () => null,
@@ -893,15 +924,15 @@ function Zt() {
893
924
  }
894
925
  };
895
926
  }
896
- function Q(e, t) {
927
+ function $(e, t) {
897
928
  const l = t.map((o) => o?.[e]).filter((o) => typeof o == "function");
898
929
  if (l.length !== 0)
899
930
  return async (o) => {
900
- for (const u of l)
901
- await u(o);
931
+ for (const i of l)
932
+ await i(o);
902
933
  };
903
934
  }
904
- function eo(e) {
935
+ function io(e) {
905
936
  const {
906
937
  userSelectionService: t,
907
938
  cellSelectionService: l,
@@ -909,10 +940,10 @@ function eo(e) {
909
940
  } = e;
910
941
  return {
911
942
  name: "selection",
912
- init: Q("init", [t, l, o]),
913
- start: Q("start", [t, l, o]),
914
- stop: Q("stop", [t, l, o]),
915
- dispose: Q("dispose", [t, l, o]),
943
+ init: $("init", [t, l, o]),
944
+ start: $("start", [t, l, o]),
945
+ stop: $("stop", [t, l, o]),
946
+ dispose: $("dispose", [t, l, o]),
916
947
  getSelectionSnapshot: l.getSelectionSnapshot,
917
948
  setSelectionSnapshot: l.setSelectionSnapshot,
918
949
  clearSelection: l.clearSelection,
@@ -929,7 +960,7 @@ function eo(e) {
929
960
  clearSelectedRows: o.clearSelectedRows
930
961
  };
931
962
  }
932
- function to(e, t) {
963
+ function uo(e, t) {
933
964
  if (e?.focusedRow !== t?.focusedRow || (e?.mode ?? "explicit") !== (t?.mode ?? "explicit"))
934
965
  return !1;
935
966
  const l = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
@@ -938,38 +969,38 @@ function to(e, t) {
938
969
  for (let y = 0; y < l.length; y += 1)
939
970
  if (l[y] !== o[y])
940
971
  return !1;
941
- const u = e?.excludedRows ?? [], a = t?.excludedRows ?? [];
942
- if (u.length !== a.length)
972
+ const i = e?.excludedRows ?? [], a = t?.excludedRows ?? [];
973
+ if (i.length !== a.length)
943
974
  return !1;
944
- for (let y = 0; y < u.length; y += 1)
945
- if (u[y] !== a[y])
975
+ for (let y = 0; y < i.length; y += 1)
976
+ if (i[y] !== a[y])
946
977
  return !1;
947
978
  return !0;
948
979
  }
949
- function oo(e, t) {
980
+ function so(e, t) {
950
981
  if (e === t)
951
982
  return !0;
952
983
  const l = Object.entries(e ?? {}), o = Object.entries(t ?? {});
953
984
  if (l.length !== o.length)
954
985
  return !1;
955
- for (const [u, a] of l)
956
- if (!Object.is(a, t?.[u]))
986
+ for (const [i, a] of l)
987
+ if (!Object.is(a, t?.[i]))
957
988
  return !1;
958
989
  return !0;
959
990
  }
960
- function no(e, t) {
991
+ function co(e, t) {
961
992
  if (e === t)
962
993
  return !0;
963
994
  if (e.length !== t.length)
964
995
  return !1;
965
996
  for (let l = 0; l < e.length; l += 1) {
966
- const o = e[l], u = t[l];
967
- if (!o || !u || o.key !== u.key || o.component !== u.component || !oo(o.props, u.props))
997
+ const o = e[l], i = t[l];
998
+ if (!o || !i || o.key !== i.key || o.component !== i.component || !so(o.props, i.props))
968
999
  return !1;
969
1000
  }
970
1001
  return !0;
971
1002
  }
972
- const ro = {
1003
+ const fo = {
973
1004
  rows: {
974
1005
  type: Array,
975
1006
  default: () => []
@@ -1050,6 +1081,10 @@ const ro = {
1050
1081
  type: [Boolean, Object],
1051
1082
  default: void 0
1052
1083
  },
1084
+ quickFilter: {
1085
+ type: [Boolean, Object],
1086
+ default: void 0
1087
+ },
1053
1088
  findReplace: {
1054
1089
  type: [Boolean, Object],
1055
1090
  default: void 0
@@ -1246,10 +1281,10 @@ const ro = {
1246
1281
  type: Function,
1247
1282
  default: void 0
1248
1283
  }
1249
- }, Le = je({
1284
+ }, Ee = Ie({
1250
1285
  name: "DataGrid",
1251
1286
  inheritAttrs: !1,
1252
- props: ro,
1287
+ props: fo,
1253
1288
  emits: {
1254
1289
  "cell-change": (e) => !0,
1255
1290
  "cell-edit": (e) => !0,
@@ -1268,34 +1303,34 @@ const ro = {
1268
1303
  "toolbar-modules-change": (e) => !0,
1269
1304
  ready: (e) => !0
1270
1305
  },
1271
- setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
1272
- const a = x(null), y = Yt(), s = x(null), S = x(null), R = x([]);
1273
- let D = null, C = !1;
1274
- const b = x(e.viewMode === "gantt" ? "gantt" : "table"), j = x(e.state ?? null), F = f(() => $t(e.history)), g = f(() => ut(e.chrome)), v = f(() => Gt(e.renderMode, e.pagination)), p = f(() => Ft(
1306
+ setup(e, { attrs: t, slots: l, emit: o, expose: i }) {
1307
+ const a = x(null), y = oo(), d = x(null), S = x(null), R = x([]);
1308
+ let B = null, C = !1;
1309
+ const b = x(e.viewMode === "gantt" ? "gantt" : "table"), j = x(e.state ?? null), P = f(() => no(e.history)), g = f(() => ct(e.chrome)), v = f(() => jt(e.renderMode, e.pagination)), p = f(() => Lt(
1275
1310
  e.pagination,
1276
1311
  v.value,
1277
1312
  e.pageSize,
1278
1313
  e.currentPage
1279
- )), M = f(() => st(e.columnMenu)), Z = f(() => dt(e.cellMenu)), ee = f(() => ct(e.rowIndexMenu)), z = f(() => ft(e.columnLayout)), E = f(() => mt(e.columnReorder)), U = f(() => Wt(e.aggregations)), K = f(() => St(e.advancedFilter)), V = f(() => xt(e.findReplace)), W = f(() => Kt(e.gridLines)), H = f(() => Pt(e.groupBy)), P = f(() => e.state ?? j.value), T = f(() => e.sortModel !== void 0 ? e.sortModel : P.value?.rows?.snapshot?.sortModel), _ = f(() => e.filterModel !== void 0 ? e.filterModel : lt(P.value?.rows?.snapshot?.filterModel ?? null)), N = f(() => e.groupBy !== void 0 ? H.value ?? null : P.value?.rows?.snapshot?.groupBy ?? null), q = f(() => e.pivotModel !== void 0 ? e.pivotModel : P.value?.rows?.snapshot?.pivotModel ?? null), te = f(() => Tt(e.virtualization, v.value)), L = f(() => Ht(e.layoutMode, e.minRows, e.maxRows)), oe = f(() => ht(e.placeholderRows)), ne = f(() => yt(e.rowReorder)), J = f(() => {
1314
+ )), M = f(() => ft(e.columnMenu)), Z = f(() => mt(e.cellMenu)), ee = f(() => yt(e.rowIndexMenu)), z = f(() => vt(e.columnLayout)), E = f(() => gt(e.columnReorder)), U = f(() => Jt(e.aggregations)), K = f(() => bt(e.advancedFilter)), k = f(() => zt(e.quickFilter)), T = f(() => Et(e.findReplace)), V = f(() => Vt(e.gridLines)), L = f(() => xt(e.groupBy)), G = f(() => e.state ?? j.value), W = f(() => e.sortModel !== void 0 ? e.sortModel : G.value?.rows?.snapshot?.sortModel), N = f(() => e.filterModel !== void 0 ? e.filterModel : ut(G.value?.rows?.snapshot?.filterModel ?? null)), te = f(() => e.groupBy !== void 0 ? L.value ?? null : G.value?.rows?.snapshot?.groupBy ?? null), q = f(() => e.pivotModel !== void 0 ? e.pivotModel : G.value?.rows?.snapshot?.pivotModel ?? null), oe = f(() => Yt(e.virtualization, v.value)), H = f(() => Wt(e.layoutMode, e.minRows, e.maxRows)), ne = f(() => Mt(e.placeholderRows)), re = f(() => pt(e.rowReorder)), J = f(() => {
1280
1315
  const r = e.clientRowModelOptions?.readFilterCell;
1281
- return Xt(
1316
+ return lo(
1282
1317
  e.columns,
1283
1318
  e.readFilterCell ?? r
1284
1319
  );
1285
- }), re = f(() => {
1320
+ }), le = f(() => {
1286
1321
  const r = e.readFilterCellStyle ?? e.clientRowModelOptions?.readFilterCellStyle;
1287
1322
  return !J.value && !r ? e.clientRowModelOptions : {
1288
1323
  ...e.clientRowModelOptions ?? {},
1289
1324
  readFilterCell: J.value,
1290
1325
  readFilterCellStyle: r
1291
1326
  };
1292
- }), k = f(() => vt({
1327
+ }), _ = f(() => wt({
1293
1328
  columns: e.columns,
1294
- clientRowModelOptions: re.value,
1329
+ clientRowModelOptions: le.value,
1295
1330
  computedFields: e.computedFields,
1296
1331
  formulas: e.formulas,
1297
1332
  formulaFunctions: e.formulaFunctions
1298
- })), le = f(() => gt(e.columns)), Y = {
1333
+ })), Y = f(() => St(e.columns)), n = {
1299
1334
  get state() {
1300
1335
  return e.state;
1301
1336
  },
@@ -1324,7 +1359,7 @@ const ro = {
1324
1359
  return e.filterModel;
1325
1360
  },
1326
1361
  get groupBy() {
1327
- return H.value;
1362
+ return L.value;
1328
1363
  },
1329
1364
  get aggregationModel() {
1330
1365
  return e.aggregationModel;
@@ -1341,62 +1376,62 @@ const ro = {
1341
1376
  get columns() {
1342
1377
  return e.columns;
1343
1378
  }
1344
- }, n = f(() => q.value ? "pivot" : k.value && "initialTreeData" in k.value ? "tree" : "base"), d = f(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), i = f(() => {
1379
+ }, s = f(() => q.value ? "pivot" : _.value && "initialTreeData" in _.value ? "tree" : "base"), u = f(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), m = f(() => {
1345
1380
  const r = a.value?.runtime;
1346
1381
  if (!r)
1347
1382
  return 0;
1348
- const c = Me(r.rowPartition);
1383
+ const c = Oe(r.rowPartition);
1349
1384
  return Math.max(0, c.bodyRowCount + c.pinnedBottomRows.length);
1350
- }), m = (r) => {
1385
+ }), A = (r) => {
1351
1386
  const c = a.value?.runtime;
1352
1387
  if (!c)
1353
1388
  return null;
1354
- const G = Me(c.rowPartition), ce = G.bodyRowCount;
1389
+ const F = Oe(c.rowPartition), ce = F.bodyRowCount;
1355
1390
  if (r < ce)
1356
1391
  return c.getBodyRowAtIndex(r);
1357
- const et = r - ce;
1358
- return G.pinnedBottomRows[et] ?? null;
1359
- }, A = {
1360
- mode: f(() => n.value),
1392
+ const nt = r - ce;
1393
+ return F.pinnedBottomRows[nt] ?? null;
1394
+ }, O = {
1395
+ mode: f(() => s.value),
1361
1396
  resolveRuntime: () => a.value,
1362
- visibleColumns: d,
1363
- totalRows: i,
1397
+ visibleColumns: u,
1398
+ totalRows: m,
1364
1399
  showRowSelection: f(() => e.rowSelection),
1365
1400
  readSelectionCell: e.readSelectionCell,
1366
- resolveSelectionRowAtIndex: m
1401
+ resolveSelectionRowAtIndex: A
1367
1402
  }, {
1368
- selectionSnapshot: O,
1369
- selectionAnchor: ze,
1370
- syncSelectionSnapshotFromRuntime: Ee,
1371
- selectionService: Ve,
1372
- selectionAggregatesLabel: We
1373
- } = at(A), {
1403
+ selectionSnapshot: ke,
1404
+ selectionAnchor: Te,
1405
+ syncSelectionSnapshotFromRuntime: Ve,
1406
+ selectionService: We,
1407
+ selectionAggregatesLabel: _e
1408
+ } = st(O), {
1374
1409
  rowSelectionSnapshot: ae,
1375
1410
  syncRowSelectionSnapshotFromRuntime: ie,
1376
- reconcileRowSelectionFromRuntime: Te,
1377
- selectionService: we
1378
- } = it({
1411
+ reconcileRowSelectionFromRuntime: Ue,
1412
+ selectionService: he
1413
+ } = dt({
1379
1414
  resolveRuntime: () => a.value
1380
- }), _e = f(() => e.rowSelection ? we : Zt()), ke = f(() => ({
1415
+ }), Ne = f(() => e.rowSelection ? he : ao()), qe = f(() => ({
1381
1416
  ...e.services ?? {},
1382
- selection: eo({
1417
+ selection: io({
1383
1418
  userSelectionService: e.services?.selection,
1384
- cellSelectionService: Ve,
1385
- rowSelectionService: _e.value
1419
+ cellSelectionService: We,
1420
+ rowSelectionService: Ne.value
1386
1421
  })
1387
1422
  })), {
1388
- dataGridInstanceKey: Ue,
1423
+ dataGridInstanceKey: Je,
1389
1424
  resolvedRowModel: ue
1390
- } = pt({
1391
- rows: Ce(e, "rows"),
1392
- rowModel: Ce(e, "rowModel"),
1393
- clientRowModelOptions: k,
1425
+ } = ht({
1426
+ rows: Ae(e, "rows"),
1427
+ rowModel: Ae(e, "rowModel"),
1428
+ clientRowModelOptions: _,
1394
1429
  onOwnedRowModelRecreated: () => {
1395
1430
  w.dispose();
1396
1431
  }
1397
- }), w = Ut({
1432
+ }), w = Xt({
1398
1433
  gridRef: a,
1399
- props: Y,
1434
+ props: n,
1400
1435
  emit: {
1401
1436
  columnState: (r) => o("update:columnState", r),
1402
1437
  columnOrder: (r) => o("update:columnOrder", r),
@@ -1412,21 +1447,21 @@ const ro = {
1412
1447
  rowModel: ue.value
1413
1448
  })
1414
1449
  }
1415
- }), Ne = (r) => {
1416
- Te(), o("cell-change", r), w.emitSnapshotUpdates();
1450
+ }), Ye = (r) => {
1451
+ Ue(), o("cell-change", r), w.emitSnapshotUpdates();
1417
1452
  }, se = (r) => {
1418
1453
  o("cell-edit", r);
1419
- }, qe = (r) => {
1454
+ }, Qe = (r) => {
1420
1455
  o("selection-change", r), w.emitSnapshotUpdates();
1421
- }, Je = (r) => {
1456
+ }, $e = (r) => {
1422
1457
  o("row-selection-change", r);
1423
- }, Se = () => {
1458
+ }, Re = () => {
1424
1459
  w.emitSnapshotUpdates();
1425
1460
  };
1426
1461
  h(
1427
1462
  ae,
1428
1463
  (r) => {
1429
- o("row-select", r), o("update:rowSelectionState", r), Se();
1464
+ o("row-select", r), o("update:rowSelectionState", r), Re();
1430
1465
  },
1431
1466
  { deep: !0 }
1432
1467
  ), h(
@@ -1434,14 +1469,14 @@ const ro = {
1434
1469
  ([r, c]) => {
1435
1470
  if (r) {
1436
1471
  if (c !== void 0) {
1437
- const G = a.value?.api.rowSelection;
1438
- to(ae.value, c) || (c ? G?.setSnapshot(c) : G?.clear(), ie());
1472
+ const F = a.value?.api.rowSelection;
1473
+ uo(ae.value, c) || (c ? F?.setSnapshot(c) : F?.clear(), ie());
1439
1474
  return;
1440
1475
  }
1441
1476
  ie();
1442
1477
  return;
1443
1478
  }
1444
- we.clearRowSelection?.();
1479
+ he.clearRowSelection?.();
1445
1480
  },
1446
1481
  { immediate: !0 }
1447
1482
  ), h(
@@ -1451,47 +1486,47 @@ const ro = {
1451
1486
  },
1452
1487
  { immediate: !0 }
1453
1488
  );
1454
- const he = (r) => {
1489
+ const be = (r) => {
1455
1490
  const c = r === "gantt" ? "gantt" : "table";
1456
1491
  b.value = c, o("update:viewMode", c);
1457
- }, Ye = (r) => {
1458
- s.value = r;
1459
- }, Re = (r) => {
1492
+ }, Xe = (r) => {
1493
+ d.value = r;
1494
+ }, Me = (r) => {
1460
1495
  S.value = r;
1461
- }, $e = (r) => {
1462
- no(R.value, r) || (R.value = r, D = r, !C && (C = !0, Promise.resolve().then(() => {
1496
+ }, Ze = (r) => {
1497
+ co(R.value, r) || (R.value = r, B = r, !C && (C = !0, Promise.resolve().then(() => {
1463
1498
  C = !1;
1464
- const c = D;
1465
- D = null, c && o("toolbar-modules-change", c);
1499
+ const c = B;
1500
+ B = null, c && o("toolbar-modules-change", c);
1466
1501
  })));
1467
1502
  }, de = f(() => {
1468
- const r = F.value.adapter;
1469
- return !F.value.enabled || !r ? y : {
1503
+ const r = P.value.adapter;
1504
+ return !P.value.enabled || !r ? y : {
1470
1505
  canUndo: () => r.canUndo(),
1471
1506
  canRedo: () => r.canRedo(),
1472
1507
  runHistoryAction: (c) => r.runHistoryAction(c)
1473
1508
  };
1474
- }), be = {
1475
- canUndo: () => (s.value ?? de.value).canUndo(),
1476
- canRedo: () => (s.value ?? de.value).canRedo(),
1477
- runHistoryAction: (r) => (s.value ?? de.value).runHistoryAction(r)
1478
- }, Qe = () => {
1509
+ }), Ce = {
1510
+ canUndo: () => (d.value ?? de.value).canUndo(),
1511
+ canRedo: () => (d.value ?? de.value).canRedo(),
1512
+ runHistoryAction: (r) => (d.value ?? de.value).runHistoryAction(r)
1513
+ }, et = () => {
1479
1514
  const r = w.getState();
1480
1515
  return r ? X({
1481
1516
  state: r,
1482
1517
  viewMode: b.value
1483
1518
  }) : null;
1484
- }, Xe = (r, c) => He(r, w.migrateState, c), Ze = (r, c) => {
1485
- const G = X(r);
1486
- return w.applyState(G.state, c) ? (G.viewMode && he(G.viewMode), !0) : !1;
1519
+ }, tt = (r, c) => ze(r, w.migrateState, c), ot = (r, c) => {
1520
+ const F = X(r);
1521
+ return w.applyState(F.state, c) ? (F.viewMode && be(F.viewMode), !0) : !1;
1487
1522
  };
1488
- return pe(() => {
1489
- w.dispose(), Re(null);
1490
- }), u({
1523
+ return Se(() => {
1524
+ w.dispose(), Me(null);
1525
+ }), i({
1491
1526
  grid: a,
1492
1527
  rowModel: ue,
1493
- history: be,
1494
- getHistory: () => be,
1528
+ history: Ce,
1529
+ getHistory: () => Ce,
1495
1530
  toolbarModules: R,
1496
1531
  getToolbarModules: () => R.value,
1497
1532
  getApi: () => a.value?.api ?? null,
@@ -1502,7 +1537,7 @@ const ro = {
1502
1537
  },
1503
1538
  getColumnState: () => w.getColumnState(),
1504
1539
  getColumnSnapshot: () => a.value?.api.columns.getSnapshot() ?? null,
1505
- getSelectionAggregatesLabel: () => We.value,
1540
+ getSelectionAggregatesLabel: () => _e.value,
1506
1541
  runStructuralRowAction: (r, c) => S.value?.(r, c) ?? Promise.resolve(!1),
1507
1542
  getSelectionSummary: () => {
1508
1543
  const r = a.value?.api.selection.summarize;
@@ -1514,10 +1549,10 @@ const ro = {
1514
1549
  return r(c);
1515
1550
  },
1516
1551
  getView: () => b.value,
1517
- setView: he,
1518
- getSavedView: Qe,
1519
- migrateSavedView: Xe,
1520
- applySavedView: Ze,
1552
+ setView: be,
1553
+ getSavedView: et,
1554
+ migrateSavedView: tt,
1555
+ applySavedView: ot,
1521
1556
  applyColumnState: w.applyColumnState,
1522
1557
  getState: w.getState,
1523
1558
  migrateState: w.migrateState,
@@ -1535,22 +1570,22 @@ const ro = {
1535
1570
  insertColumnAfter: (r, c) => a.value?.api.columns.insertAfter(r, c) ?? !1
1536
1571
  }), () => {
1537
1572
  const r = {
1538
- mode: n.value,
1573
+ mode: s.value,
1539
1574
  rows: e.rows,
1540
1575
  runtime: a.value?.runtime ?? null,
1541
1576
  runtimeRowModel: a.value?.rowModel ?? null,
1542
- selectionSnapshot: O,
1543
- selectionAnchor: ze,
1577
+ selectionSnapshot: ke,
1578
+ selectionAnchor: Te,
1544
1579
  rowSelectionSnapshot: ae,
1545
- syncSelectionSnapshotFromRuntime: Ee,
1580
+ syncSelectionSnapshotFromRuntime: Ve,
1546
1581
  syncRowSelectionSnapshotFromRuntime: ie,
1547
- flushRowSelectionSnapshotUpdates: Se,
1548
- sortModel: T.value,
1549
- filterModel: _.value,
1550
- groupBy: N.value,
1582
+ flushRowSelectionSnapshotUpdates: Re,
1583
+ sortModel: W.value,
1584
+ filterModel: N.value,
1585
+ groupBy: te.value,
1551
1586
  pivotModel: q.value,
1552
1587
  renderMode: v.value,
1553
- virtualization: te.value,
1588
+ virtualization: oe.value,
1554
1589
  columnMenu: M.value,
1555
1590
  cellMenu: Z.value,
1556
1591
  rowIndexMenu: ee.value,
@@ -1558,14 +1593,15 @@ const ro = {
1558
1593
  columnReorder: E.value,
1559
1594
  aggregations: U.value,
1560
1595
  advancedFilter: K.value,
1561
- findReplace: V.value,
1562
- gridLines: W.value,
1596
+ quickFilter: k.value,
1597
+ findReplace: T.value,
1598
+ gridLines: V.value,
1563
1599
  rowHeightMode: e.rowHeightMode,
1564
1600
  baseRowHeight: e.baseRowHeight,
1565
- layoutMode: L.value.layoutMode,
1566
- minRows: L.value.minRows,
1567
- maxRows: L.value.maxRows,
1568
- placeholderRows: oe.value,
1601
+ layoutMode: H.value.layoutMode,
1602
+ minRows: H.value.minRows,
1603
+ maxRows: H.value.maxRows,
1604
+ placeholderRows: ne.value,
1569
1605
  fillHandle: e.fillHandle,
1570
1606
  rangeMove: e.rangeMove,
1571
1607
  rowHover: e.rowHover,
@@ -1576,39 +1612,39 @@ const ro = {
1576
1612
  isCellEditable: e.isCellEditable,
1577
1613
  showRowIndex: e.showRowIndex,
1578
1614
  rowSelection: e.rowSelection,
1579
- rowReorder: ne.value,
1615
+ rowReorder: re.value,
1580
1616
  viewMode: b.value,
1581
1617
  gantt: e.gantt,
1582
- history: F.value,
1618
+ history: P.value,
1583
1619
  chrome: g.value,
1584
- registerHistoryController: Ye,
1585
- registerStructuralRowActionRunner: Re,
1586
- reportToolbarModules: $e,
1620
+ registerHistoryController: Xe,
1621
+ registerStructuralRowActionRunner: Me,
1622
+ reportToolbarModules: Ze,
1587
1623
  toolbarModules: e.toolbarModules,
1588
1624
  customOverlays: e.customOverlays,
1589
1625
  runStructuralRowAction: e.runStructuralRowAction
1590
1626
  };
1591
1627
  return ge(
1592
- _t,
1628
+ Qt,
1593
1629
  {
1594
1630
  ...t,
1595
1631
  ref: a,
1596
- key: Ue.value,
1632
+ key: Je.value,
1597
1633
  rows: e.rows,
1598
1634
  rowModel: ue.value,
1599
- columns: le.value,
1635
+ columns: Y.value,
1600
1636
  theme: e.theme,
1601
- layoutMode: L.value.layoutMode,
1637
+ layoutMode: H.value.layoutMode,
1602
1638
  renderMode: v.value,
1603
1639
  pagination: p.value,
1604
1640
  plugins: e.plugins,
1605
- services: ke.value,
1641
+ services: qe.value,
1606
1642
  startupOrder: e.startupOrder,
1607
1643
  autoStart: e.autoStart,
1608
- onCellChange: Ne,
1644
+ onCellChange: Ye,
1609
1645
  onCellEdit: se,
1610
- onSelectionChange: qe,
1611
- onRowSelectionChange: Je
1646
+ onSelectionChange: Qe,
1647
+ onRowSelectionChange: $e
1612
1648
  },
1613
1649
  l.default ? {
1614
1650
  default: (c) => l.default?.({
@@ -1625,7 +1661,7 @@ const ro = {
1625
1661
  }
1626
1662
  })
1627
1663
  } : {
1628
- default: (c) => ge(wt, {
1664
+ default: (c) => ge(Rt, {
1629
1665
  ...r,
1630
1666
  runtime: c.runtime,
1631
1667
  runtimeRowModel: c.rowModel,
@@ -1640,30 +1676,30 @@ const ro = {
1640
1676
  };
1641
1677
  }
1642
1678
  });
1643
- function Mo() {
1679
+ function Po() {
1644
1680
  return x(null);
1645
1681
  }
1646
- function Co() {
1647
- return Le;
1682
+ function Go() {
1683
+ return Ee;
1648
1684
  }
1649
- const Oo = Le;
1685
+ const xo = Ee;
1650
1686
  export {
1651
- Oo as DataGrid,
1652
- Do as DataGridModuleHost,
1653
- po as clearDataGridSavedViewInStorage,
1654
- Le as default,
1655
- Ro as defineDataGridCellClassResolver,
1656
- bo as defineDataGridCellStyleResolver,
1657
- Po as defineDataGridColumns,
1658
- Co as defineDataGridComponent,
1659
- So as defineDataGridFilterCellReader,
1660
- ho as defineDataGridFilterCellStyleReader,
1661
- wo as defineDataGridSelectionCellReader,
1662
- yo as defineDataGridStructuralRowActionHandler,
1663
- He as migrateDataGridSavedView,
1664
- Vt as parseDataGridSavedView,
1665
- go as readDataGridSavedViewFromStorage,
1666
- Et as serializeDataGridSavedView,
1667
- Mo as useDataGridRef,
1668
- vo as writeDataGridSavedViewToStorage
1687
+ xo as DataGrid,
1688
+ Io as DataGridModuleHost,
1689
+ Co as clearDataGridSavedViewInStorage,
1690
+ Ee as default,
1691
+ Bo as defineDataGridCellClassResolver,
1692
+ Fo as defineDataGridCellStyleResolver,
1693
+ Ko as defineDataGridColumns,
1694
+ Go as defineDataGridComponent,
1695
+ Ao as defineDataGridFilterCellReader,
1696
+ Do as defineDataGridFilterCellStyleReader,
1697
+ Oo as defineDataGridSelectionCellReader,
1698
+ Ro as defineDataGridStructuralRowActionHandler,
1699
+ ze as migrateDataGridSavedView,
1700
+ qt as parseDataGridSavedView,
1701
+ Mo as readDataGridSavedViewFromStorage,
1702
+ Nt as serializeDataGridSavedView,
1703
+ Po as useDataGridRef,
1704
+ bo as writeDataGridSavedViewToStorage
1669
1705
  };