@affino/datagrid-vue-app 0.1.10 → 0.1.12

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Fn, h as k, computed as m, unref as c, ref as P, nextTick as Dn, onBeforeUnmount as En, watch as L, defineAsyncComponent as ft, shallowRef as _n } from "vue";
1
+ import { defineComponent as Fn, h as k, computed as m, unref as c, ref as L, nextTick as Dn, onBeforeUnmount as En, watch as W, defineAsyncComponent as gt, shallowRef as _n } from "vue";
2
2
  import { resolveDataGridCellClickAction as Gn, invokeDataGridCellInteraction as Pn, toggleDataGridCellValue as Ln, buildDataGridCellRenderModel as Wn, useDataGridContextMenu as Nn, cloneDataGridFilterSnapshot as Kn, createClientRowModel as un } from "@affino/datagrid-vue";
3
3
  import { useDataGridAppIntentHistory as $n, createDataGridAppRowHeightMetrics as Un, useDataGridAppViewport as qn, useDataGridAppRowSizing as Xn, useDataGridAppCellSelection as Yn, useDataGridAppRowPresentation as Jn, useDataGridAppClipboard as Zn, useDataGridAppActiveCellViewport as Qn, useDataGridAppInlineEditing as el, useDataGridAppInteractionController as tl, useDataGridAppHeaderResize as nl, useDataGridAppRuntimeSync as ll, useDataGridAppViewportLifecycle as ol, useDataGridAppColumnLayoutPanel as rl, useDataGridAppAdvancedFilterBuilder as al } from "@affino/datagrid-vue/app";
4
4
  import { useDataGridViewportContextMenuRouter as il, useDataGridContextMenuAnchor as sl, useDataGridContextMenuActionRouter as ul } from "@affino/datagrid-vue/advanced";
@@ -19,7 +19,7 @@ const ml = Fn({
19
19
  })))
20
20
  ]);
21
21
  }
22
- }), J = ["sort", "group", "pin", "filter"], kn = [
22
+ }), Z = ["sort", "group", "pin", "filter"], kn = [
23
23
  "sortAsc",
24
24
  "sortDesc",
25
25
  "clearSort",
@@ -35,16 +35,16 @@ const ml = Fn({
35
35
  "applyFilter",
36
36
  "cancelFilter"
37
37
  ], cn = 120;
38
- function hn(e) {
39
- const o = new Set(J), r = Array.isArray(e) ? e : J, l = [];
38
+ function bn(e) {
39
+ const o = new Set(Z), r = Array.isArray(e) ? e : Z, l = [];
40
40
  for (const s of r)
41
41
  !o.has(s) || l.includes(s) || l.push(s);
42
- return l.length > 0 ? l : [...J];
42
+ return l.length > 0 ? l : [...Z];
43
43
  }
44
44
  function fn(e) {
45
45
  if (!Array.isArray(e))
46
46
  return [];
47
- const o = new Set(J), r = [];
47
+ const o = new Set(Z), r = [];
48
48
  for (const l of e)
49
49
  !o.has(l) || r.includes(l) || r.push(l);
50
50
  return r;
@@ -52,13 +52,13 @@ function fn(e) {
52
52
  function Hn(e) {
53
53
  if (!e)
54
54
  return Object.freeze({});
55
- const o = Object.entries(e).filter(([r, l]) => J.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
55
+ const o = Object.entries(e).filter(([r, l]) => Z.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
56
56
  return Object.freeze(Object.fromEntries(o));
57
57
  }
58
58
  function Vn(e) {
59
59
  if (!e)
60
60
  return Object.freeze({});
61
- const o = Object.entries(e).filter(([r, l]) => J.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
61
+ const o = Object.entries(e).filter(([r, l]) => Z.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
62
62
  return Object.freeze(Object.fromEntries(o));
63
63
  }
64
64
  function zn(e) {
@@ -79,16 +79,16 @@ function wl(e) {
79
79
  if (!e)
80
80
  return {};
81
81
  const o = Object.entries(e).filter(([r]) => r.trim().length > 0).map(([r, l]) => {
82
- const s = l?.items ? hn(l.items) : void 0, i = fn(l?.hide), f = fn(l?.disabled), v = Vn(l?.disabledReasons), y = Hn(l?.labels), A = zn(l?.actions);
82
+ const s = l?.items ? bn(l.items) : void 0, i = fn(l?.hide), f = fn(l?.disabled), C = Vn(l?.disabledReasons), y = Hn(l?.labels), x = zn(l?.actions);
83
83
  return [
84
84
  r,
85
85
  {
86
86
  ...s ? { items: s } : {},
87
87
  ...i.length > 0 ? { hide: i } : {},
88
88
  ...f.length > 0 ? { disabled: f } : {},
89
- ...Object.keys(v).length > 0 ? { disabledReasons: v } : {},
89
+ ...Object.keys(C).length > 0 ? { disabledReasons: C } : {},
90
90
  ...Object.keys(y).length > 0 ? { labels: y } : {},
91
- ...Object.keys(A).length > 0 ? { actions: A } : {}
91
+ ...Object.keys(x).length > 0 ? { actions: x } : {}
92
92
  }
93
93
  ];
94
94
  });
@@ -98,7 +98,7 @@ function yo(e) {
98
98
  return typeof e == "boolean" ? {
99
99
  enabled: e,
100
100
  maxFilterValues: cn,
101
- items: [...J],
101
+ items: [...Z],
102
102
  disabled: [],
103
103
  disabledReasons: Object.freeze({}),
104
104
  labels: Object.freeze({}),
@@ -107,7 +107,7 @@ function yo(e) {
107
107
  } : e ? {
108
108
  enabled: e.enabled ?? !0,
109
109
  maxFilterValues: Number.isFinite(e.maxFilterValues) ? Math.max(20, Math.trunc(e.maxFilterValues)) : cn,
110
- items: hn(e.items),
110
+ items: bn(e.items),
111
111
  disabled: fn(e.disabled),
112
112
  disabledReasons: Vn(e.disabledReasons),
113
113
  labels: Hn(e.labels),
@@ -116,7 +116,7 @@ function yo(e) {
116
116
  } : {
117
117
  enabled: !1,
118
118
  maxFilterValues: cn,
119
- items: [...J],
119
+ items: [...Z],
120
120
  disabled: [],
121
121
  disabledReasons: Object.freeze({}),
122
122
  labels: Object.freeze({}),
@@ -125,7 +125,7 @@ function yo(e) {
125
125
  };
126
126
  }
127
127
  function Tn(e, o) {
128
- const r = e.columns[o], l = r?.items ? hn(r.items) : e.items, s = new Set(r?.hide ?? []), i = l.filter((f) => !s.has(f));
128
+ const r = e.columns[o], l = r?.items ? bn(r.items) : e.items, s = new Set(r?.hide ?? []), i = l.filter((f) => !s.has(f));
129
129
  return i.length > 0 ? i : [];
130
130
  }
131
131
  function fl(e, o) {
@@ -154,7 +154,7 @@ function vl(e, o) {
154
154
  }).filter(([, s]) => Object.keys(s).length > 0);
155
155
  return Object.freeze(Object.fromEntries(l));
156
156
  }
157
- const B = ["clipboard", "edit"], yn = ["cut", "copy", "paste", "clear"], Ce = ["insert", "clipboard", "selection"], jn = [
157
+ const _ = ["clipboard", "edit"], yn = ["cut", "copy", "paste", "clear"], ve = ["insert", "clipboard", "selection"], jn = [
158
158
  "insertAbove",
159
159
  "insertBelow",
160
160
  "cut",
@@ -162,13 +162,13 @@ const B = ["clipboard", "edit"], yn = ["cut", "copy", "paste", "clear"], Ce = ["
162
162
  "paste",
163
163
  "deleteSelected"
164
164
  ];
165
- function gt(e, o) {
165
+ function Ct(e, o) {
166
166
  const r = new Set(o), l = Array.isArray(e) ? e : o, s = [];
167
167
  for (const i of l)
168
168
  !r.has(i) || s.includes(i) || s.push(i);
169
169
  return s.length > 0 ? s : [...o];
170
170
  }
171
- function wt(e, o) {
171
+ function ft(e, o) {
172
172
  if (!Array.isArray(e))
173
173
  return [];
174
174
  const r = new Set(o), l = [];
@@ -176,7 +176,7 @@ function wt(e, o) {
176
176
  !r.has(s) || l.includes(s) || l.push(s);
177
177
  return l;
178
178
  }
179
- function ve(e, o) {
179
+ function he(e, o) {
180
180
  if (!e)
181
181
  return Object.freeze({});
182
182
  const r = Object.entries(e).filter((l) => o.includes(l[0]) && typeof l[1] == "string").map(([l, s]) => [l, s.trim()]).filter(([, l]) => l.length > 0);
@@ -196,20 +196,20 @@ function Rn(e, o) {
196
196
  }).filter(([, l]) => Object.keys(l).length > 0);
197
197
  return Object.freeze(Object.fromEntries(r));
198
198
  }
199
- function bl(e) {
199
+ function hl(e) {
200
200
  if (!e)
201
201
  return {};
202
202
  const o = Object.entries(e).filter(([r]) => r.trim().length > 0).map(([r, l]) => {
203
- const s = l?.items ? gt(l.items, B) : void 0, i = wt(l?.hide, B), f = wt(l?.disabled, B), v = ve(l?.disabledReasons, B), y = ve(l?.labels, B), A = Rn(l?.actions, yn);
203
+ const s = l?.items ? Ct(l.items, _) : void 0, i = ft(l?.hide, _), f = ft(l?.disabled, _), C = he(l?.disabledReasons, _), y = he(l?.labels, _), x = Rn(l?.actions, yn);
204
204
  return [
205
205
  r,
206
206
  {
207
207
  ...s ? { items: s } : {},
208
208
  ...i.length > 0 ? { hide: i } : {},
209
209
  ...f.length > 0 ? { disabled: f } : {},
210
- ...Object.keys(v).length > 0 ? { disabledReasons: v } : {},
210
+ ...Object.keys(C).length > 0 ? { disabledReasons: C } : {},
211
211
  ...Object.keys(y).length > 0 ? { labels: y } : {},
212
- ...Object.keys(A).length > 0 ? { actions: A } : {}
212
+ ...Object.keys(x).length > 0 ? { actions: x } : {}
213
213
  }
214
214
  ];
215
215
  });
@@ -218,7 +218,7 @@ function bl(e) {
218
218
  function Ro(e) {
219
219
  return typeof e == "boolean" ? {
220
220
  enabled: e,
221
- items: [...B],
221
+ items: [..._],
222
222
  disabled: [],
223
223
  disabledReasons: Object.freeze({}),
224
224
  labels: Object.freeze({}),
@@ -226,15 +226,15 @@ function Ro(e) {
226
226
  columns: {}
227
227
  } : e ? {
228
228
  enabled: e.enabled ?? !0,
229
- items: gt(e.items, B),
230
- disabled: wt(e.disabled, B),
231
- disabledReasons: ve(e.disabledReasons, B),
232
- labels: ve(e.labels, B),
229
+ items: Ct(e.items, _),
230
+ disabled: ft(e.disabled, _),
231
+ disabledReasons: he(e.disabledReasons, _),
232
+ labels: he(e.labels, _),
233
233
  actions: Rn(e.actions, yn),
234
- columns: bl(e.columns)
234
+ columns: hl(e.columns)
235
235
  } : {
236
236
  enabled: !1,
237
- items: [...B],
237
+ items: [..._],
238
238
  disabled: [],
239
239
  disabledReasons: Object.freeze({}),
240
240
  labels: Object.freeze({}),
@@ -242,12 +242,12 @@ function Ro(e) {
242
242
  columns: {}
243
243
  };
244
244
  }
245
- function mt(e, o) {
246
- const r = e.columns[o], l = r?.items ? gt(r.items, B) : e.items, s = new Set(r?.hide ?? []), i = l.filter((f) => !s.has(f));
245
+ function wt(e, o) {
246
+ const r = e.columns[o], l = r?.items ? Ct(r.items, _) : e.items, s = new Set(r?.hide ?? []), i = l.filter((f) => !s.has(f));
247
247
  return i.length > 0 ? i : [];
248
248
  }
249
- function hl(e, o) {
250
- const r = mt(e, o), l = new Set(e.columns[o]?.disabled ?? []), s = new Set(e.disabled);
249
+ function bl(e, o) {
250
+ const r = wt(e, o), l = new Set(e.columns[o]?.disabled ?? []), s = new Set(e.disabled);
251
251
  return r.filter((i) => s.has(i) || l.has(i));
252
252
  }
253
253
  function yl(e, o) {
@@ -269,21 +269,21 @@ function Rl(e, o) {
269
269
  function So(e) {
270
270
  return typeof e == "boolean" ? {
271
271
  enabled: e,
272
- items: [...Ce],
272
+ items: [...ve],
273
273
  disabled: [],
274
274
  disabledReasons: Object.freeze({}),
275
275
  labels: Object.freeze({}),
276
276
  actions: Object.freeze({})
277
277
  } : e ? {
278
278
  enabled: e.enabled ?? !0,
279
- items: gt(e.items, Ce),
280
- disabled: wt(e.disabled, Ce),
281
- disabledReasons: ve(e.disabledReasons, Ce),
282
- labels: ve(e.labels, Ce),
279
+ items: Ct(e.items, ve),
280
+ disabled: ft(e.disabled, ve),
281
+ disabledReasons: he(e.disabledReasons, ve),
282
+ labels: he(e.labels, ve),
283
283
  actions: Rn(e.actions, jn)
284
284
  } : {
285
285
  enabled: !1,
286
- items: [...Ce],
286
+ items: [...ve],
287
287
  disabled: [],
288
288
  disabledReasons: Object.freeze({}),
289
289
  labels: Object.freeze({}),
@@ -309,8 +309,8 @@ function Sn(e) {
309
309
  };
310
310
  }
311
311
  function xl(e) {
312
- const o = Sn(e.headerViewportRef), r = Sn(e.bodyViewportRef), l = (g) => {
313
- e.editingCellValueRef.value = g;
312
+ const o = Sn(e.headerViewportRef), r = Sn(e.bodyViewportRef), l = (I) => {
313
+ e.editingCellValueRef.value = I;
314
314
  }, s = m(() => ({
315
315
  gridContentStyle: c(e.gridContentStyle),
316
316
  mainTrackStyle: c(e.mainTrackStyle),
@@ -359,7 +359,7 @@ function xl(e) {
359
359
  clearColumnMenuFilter: c(e.clearColumnMenuFilter),
360
360
  startResize: c(e.startResize),
361
361
  handleResizeDoubleClick: c(e.handleResizeDoubleClick)
362
- })), v = m(() => ({
362
+ })), C = m(() => ({
363
363
  displayRows: c(e.displayRows),
364
364
  pinnedBottomRows: c(e.pinnedBottomRows),
365
365
  sourceRows: c(e.sourceRows),
@@ -397,7 +397,7 @@ function xl(e) {
397
397
  isFillHandleCell: c(e.isFillHandleCell),
398
398
  startFillHandleDrag: c(e.startFillHandleDrag),
399
399
  startFillHandleDoubleClick: c(e.startFillHandleDoubleClick)
400
- })), A = m(() => ({
400
+ })), x = m(() => ({
401
401
  editingCellValue: e.editingCellValueRef.value,
402
402
  editingCellInitialFilter: c(e.editingCellInitialFilter),
403
403
  editingCellOpenOnMount: c(e.editingCellOpenOnMount),
@@ -407,7 +407,7 @@ function xl(e) {
407
407
  handleEditorKeydown: c(e.handleEditorKeydown),
408
408
  commitInlineEdit: c(e.commitInlineEdit),
409
409
  cancelInlineEdit: c(e.cancelInlineEdit)
410
- })), h = m(() => ({
410
+ })), b = m(() => ({
411
411
  cellClass: c(e.cellClass),
412
412
  cellStyle: c(e.cellStyle),
413
413
  isCellSelected: c(e.isCellSelected),
@@ -420,38 +420,38 @@ function xl(e) {
420
420
  isCellEditable: c(e.isCellEditable),
421
421
  readCell: c(e.readCell),
422
422
  readDisplayCell: c(e.readDisplayCell)
423
- })), R = m(() => ({
423
+ })), S = m(() => ({
424
424
  handleCellMouseDown: c(e.handleCellMouseDown),
425
425
  handleCellClick: c(e.handleCellClick),
426
426
  handleCellKeydown: c(e.handleCellKeydown)
427
- })), S = m(() => ({
427
+ })), M = m(() => ({
428
428
  mode: c(e.mode),
429
429
  rowHeightMode: c(e.rowHeightMode),
430
430
  layoutMode: c(e.layoutMode),
431
431
  layout: s.value,
432
432
  viewport: i.value,
433
433
  columns: f.value,
434
- rows: v.value,
434
+ rows: C.value,
435
435
  selection: y.value,
436
- editing: A.value,
437
- cells: h.value,
438
- interaction: R.value
439
- })), C = cl({
436
+ editing: x.value,
437
+ cells: b.value,
438
+ interaction: S.value
439
+ })), g = cl({
440
440
  mode: m(() => c(e.mode)),
441
441
  rowHeightMode: m(() => c(e.rowHeightMode)),
442
442
  layoutMode: m(() => c(e.layoutMode)),
443
443
  layout: s,
444
444
  viewport: i,
445
445
  columns: f,
446
- rows: v,
446
+ rows: C,
447
447
  selection: y,
448
- editing: A,
449
- cells: h,
450
- interaction: R
448
+ editing: x,
449
+ cells: b,
450
+ interaction: S
451
451
  });
452
452
  return {
453
- tableStageProps: S,
454
- tableStageContext: C,
453
+ tableStageProps: M,
454
+ tableStageContext: g,
455
455
  captureHeaderViewportRef: o,
456
456
  captureBodyViewportRef: r,
457
457
  updateEditingCellValue: l
@@ -461,30 +461,30 @@ function Al(e) {
461
461
  return {
462
462
  readStageCell: (s, i) => e.isRowSelectionColumnKey(i) ? e.readRowSelectionCell(s) : e.readCell(s, i),
463
463
  readStageDisplayCell: (s, i) => e.isRowSelectionColumnKey(i) ? e.readRowSelectionDisplayCell(s) : e.readDisplayCell(s, i),
464
- handleCellClick: (s, i, f, v) => {
464
+ handleCellClick: (s, i, f, C) => {
465
465
  if (e.isRowSelectionColumn(f)) {
466
466
  e.toggleRowCheckboxSelected(s);
467
467
  return;
468
468
  }
469
- const y = e.viewportRowStart.value + i, A = e.isCellEditableByKey(s, y, f.key, v), h = Gn({
469
+ const y = e.viewportRowStart.value + i, x = e.isCellEditableByKey(s, y, f.key, C), b = Gn({
470
470
  column: f.column,
471
471
  row: s.kind !== "group" ? s.data : void 0,
472
472
  rowId: s.rowId,
473
- editable: A
473
+ editable: x
474
474
  });
475
- if (h === "invoke") {
475
+ if (b === "invoke") {
476
476
  Pn({
477
477
  column: f.column,
478
478
  row: s.kind !== "group" ? s.data : void 0,
479
479
  rowId: s.rowId,
480
- editable: A,
480
+ editable: x,
481
481
  trigger: "click"
482
482
  });
483
483
  return;
484
484
  }
485
- if (h !== "toggle" || s.kind === "group" || s.rowId == null)
485
+ if (b !== "toggle" || s.kind === "group" || s.rowId == null)
486
486
  return;
487
- const R = e.captureHistorySnapshot();
487
+ const S = e.captureHistorySnapshot();
488
488
  e.runtime.api.rows.applyEdits([
489
489
  {
490
490
  rowId: s.rowId,
@@ -501,25 +501,25 @@ function Al(e) {
501
501
  affectedRange: {
502
502
  startRow: y,
503
503
  endRow: y,
504
- startColumn: v,
505
- endColumn: v
504
+ startColumn: C,
505
+ endColumn: C
506
506
  }
507
- }, R), e.syncViewport();
507
+ }, S), e.syncViewport();
508
508
  }
509
509
  };
510
510
  }
511
- const Mn = 140, dt = 108, dn = "__datagrid_row_selection__";
511
+ const Mn = 140, mt = 108, dn = "__datagrid_row_selection__";
512
512
  function Ol(e) {
513
513
  const o = m(() => (e.showRowSelection?.value ?? !0) && e.runtime.api.rowSelection.hasSupport()), r = m(() => o.value ? {
514
514
  key: dn,
515
515
  state: {
516
516
  visible: !0,
517
517
  pin: "left",
518
- width: dt
518
+ width: mt
519
519
  },
520
520
  visible: !0,
521
521
  pin: "left",
522
- width: dt,
522
+ width: mt,
523
523
  column: {
524
524
  key: dn,
525
525
  label: "",
@@ -529,16 +529,16 @@ function Ol(e) {
529
529
  keyboard: ["enter", "space"],
530
530
  role: "checkbox",
531
531
  label: "Toggle row selection",
532
- checked: ({ rowId: C }) => C != null && e.runtime.api.rowSelection.isSelected(C),
533
- onInvoke: ({ rowId: C }) => {
534
- C == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setSelected(
535
- C,
536
- !e.runtime.api.rowSelection.isSelected(C)
532
+ checked: ({ rowId: g }) => g != null && e.runtime.api.rowSelection.isSelected(g),
533
+ onInvoke: ({ rowId: g }) => {
534
+ g == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setSelected(
535
+ g,
536
+ !e.runtime.api.rowSelection.isSelected(g)
537
537
  );
538
538
  }
539
539
  },
540
- minWidth: dt,
541
- maxWidth: dt,
540
+ minWidth: mt,
541
+ maxWidth: mt,
542
542
  capabilities: {
543
543
  editable: !0,
544
544
  sortable: !1,
@@ -556,43 +556,43 @@ function Ol(e) {
556
556
  rowSelection: !0
557
557
  }
558
558
  }
559
- } : null), l = (C) => C === dn, s = (C) => l(C.key), i = m(() => {
560
- const C = r.value, g = e.visibleColumns.value.filter((x) => x.pin === "left"), I = e.visibleColumns.value.filter((x) => x.pin !== "left" && x.pin !== "right"), M = e.visibleColumns.value.filter((x) => x.pin === "right");
561
- return C ? [C, ...g, ...I, ...M] : [...g, ...I, ...M];
562
- }), f = m(() => i.value.filter((C) => C.pin !== "left" && C.pin !== "right")), v = (C) => C.width ?? Mn, y = (C) => {
563
- const g = i.value.find((x) => x.key === C), M = `${g ? v(g) : Mn}px`;
559
+ } : null), l = (g) => g === dn, s = (g) => l(g.key), i = m(() => {
560
+ const g = r.value, I = e.visibleColumns.value.filter((A) => A.pin === "left"), v = e.visibleColumns.value.filter((A) => A.pin !== "left" && A.pin !== "right"), R = e.visibleColumns.value.filter((A) => A.pin === "right");
561
+ return g ? [g, ...I, ...v, ...R] : [...I, ...v, ...R];
562
+ }), f = m(() => i.value.filter((g) => g.pin !== "left" && g.pin !== "right")), C = (g) => g.width ?? Mn, y = (g) => {
563
+ const I = i.value.find((A) => A.key === g), R = `${I ? C(I) : Mn}px`;
564
564
  return {
565
- width: M,
566
- minWidth: M,
567
- maxWidth: M
565
+ width: R,
566
+ minWidth: R,
567
+ maxWidth: R
568
568
  };
569
- }, A = (C) => C.column.capabilities?.editable !== !1, h = (C, g, I) => s(I) ? C.kind !== "group" && C.rowId != null : C.kind === "group" || C.rowId == null || !A(I) ? !1 : e.isCellEditable ? e.isCellEditable({
570
- row: C.data,
571
- rowId: C.rowId,
572
- rowIndex: g,
573
- column: I.column,
574
- columnKey: I.key
575
- }) : !0, R = (C, g) => {
576
- const I = i.value[g];
577
- if (I?.key === C)
578
- return { column: I, columnIndex: g };
579
- const M = i.value.findIndex((x) => x.key === C);
580
- return M < 0 ? null : {
581
- column: i.value[M],
582
- columnIndex: M
569
+ }, x = (g) => g.column.capabilities?.editable !== !1, b = (g, I, v) => s(v) ? g.kind !== "group" && g.rowId != null : g.kind === "group" || g.rowId == null || !x(v) ? !1 : e.isCellEditable ? e.isCellEditable({
570
+ row: g.data,
571
+ rowId: g.rowId,
572
+ rowIndex: I,
573
+ column: v.column,
574
+ columnKey: v.key
575
+ }) : !0, S = (g, I) => {
576
+ const v = i.value[I];
577
+ if (v?.key === g)
578
+ return { column: v, columnIndex: I };
579
+ const R = i.value.findIndex((A) => A.key === g);
580
+ return R < 0 ? null : {
581
+ column: i.value[R],
582
+ columnIndex: R
583
583
  };
584
584
  };
585
585
  return {
586
586
  orderedVisibleColumns: i,
587
587
  centerColumns: f,
588
- resolveColumnWidth: v,
588
+ resolveColumnWidth: C,
589
589
  stageColumnStyle: y,
590
590
  isRowSelectionColumnKey: l,
591
591
  isRowSelectionColumn: s,
592
- isCellEditable: h,
593
- isCellEditableByKey: (C, g, I, M) => {
594
- const x = R(I, M);
595
- return x ? h(C, g, x.column) : !1;
592
+ isCellEditable: b,
593
+ isCellEditableByKey: (g, I, v, R) => {
594
+ const A = S(v, R);
595
+ return A ? b(g, I, A.column) : !1;
596
596
  },
597
597
  rowSelectionColumn: r
598
598
  };
@@ -618,14 +618,14 @@ function Dl(e) {
618
618
  });
619
619
  return {
620
620
  captureHistorySnapshot: () => e.history ? e.history.captureSnapshot() : o?.captureRowsSnapshot() ?? null,
621
- recordHistoryIntentTransaction: (y, A) => {
621
+ recordHistoryIntentTransaction: (y, x) => {
622
622
  if (e.history) {
623
- e.history.recordIntentTransaction(y, A);
623
+ e.history.recordIntentTransaction(y, x);
624
624
  return;
625
625
  }
626
626
  o?.recordIntentTransaction(
627
627
  y,
628
- A
628
+ x
629
629
  );
630
630
  },
631
631
  canUndoHistory: () => e.history ? e.history.canUndo() : o?.canUndo.value ?? !1,
@@ -637,68 +637,69 @@ function Dl(e) {
637
637
  };
638
638
  }
639
639
  function El(e) {
640
- const o = m(() => new Set(e.rowSelectionSnapshot.value?.selectedRows ?? [])), r = (g) => g.rowId != null && e.rowSelectionSnapshot.value?.focusedRow === g.rowId, l = (g) => g.kind !== "group" && g.rowId != null && o.value.has(g.rowId), s = (g) => l(g), i = (g) => s(g) ? "true" : "false", f = (g) => {
641
- const I = e.rowSelectionColumn.value?.column;
642
- return !I || g.kind === "group" ? "" : Wn({
643
- column: I,
644
- value: s(g)
640
+ const o = e.syncRowSelectionSnapshotFromRuntime ?? (() => {
641
+ }), r = m(() => new Set(e.rowSelectionSnapshot.value?.selectedRows ?? [])), l = (v) => v.rowId != null && e.rowSelectionSnapshot.value?.focusedRow === v.rowId, s = (v) => v.kind !== "group" && v.rowId != null && r.value.has(v.rowId), i = (v) => s(v), f = (v) => i(v) ? "true" : "false", C = (v) => {
642
+ const R = e.rowSelectionColumn.value?.column;
643
+ return !R || v.kind === "group" ? "" : Wn({
644
+ column: R,
645
+ value: i(v)
645
646
  }).displayValue;
646
- }, v = m(() => {
647
- const g = e.runtime.api.rows.getCount(), I = [];
648
- for (let M = 0; M < g; M += 1) {
649
- const x = e.runtime.api.rows.get(M);
650
- !x || x.kind === "group" || x.rowId == null || I.push(x.rowId);
647
+ }, y = m(() => {
648
+ const v = e.runtime.api.rows.getCount(), R = [];
649
+ for (let A = 0; A < v; A += 1) {
650
+ const j = e.runtime.api.rows.get(A);
651
+ !j || j.kind === "group" || j.rowId == null || R.push(j.rowId);
651
652
  }
652
- return I;
653
- }), y = m(() => {
654
- const g = v.value;
655
- return g.length > 0 && g.every((I) => o.value.has(I));
656
- }), A = m(() => v.value.some((I) => o.value.has(I))), h = (g) => {
657
- g.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setFocusedRow(g.rowId);
653
+ return R;
654
+ }), x = m(() => {
655
+ const v = y.value;
656
+ return v.length > 0 && v.every((R) => r.value.has(R));
657
+ }), b = m(() => y.value.some((R) => r.value.has(R))), S = (v) => {
658
+ v.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setFocusedRow(v.rowId);
658
659
  };
659
660
  return {
660
- rowSelectionSet: o,
661
- isRowFocused: r,
662
- isRowCheckboxSelected: l,
663
- readRowSelectionCell: i,
664
- readRowSelectionDisplayCell: f,
665
- areAllVisibleRowsSelected: y,
666
- areSomeVisibleRowsSelected: A,
667
- focusRow: h,
668
- toggleRowCheckboxSelected: (g) => {
669
- g.kind === "group" || g.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setSelected(g.rowId, !o.value.has(g.rowId));
661
+ rowSelectionSet: r,
662
+ isRowFocused: l,
663
+ isRowCheckboxSelected: s,
664
+ readRowSelectionCell: f,
665
+ readRowSelectionDisplayCell: C,
666
+ areAllVisibleRowsSelected: x,
667
+ areSomeVisibleRowsSelected: b,
668
+ focusRow: S,
669
+ toggleRowCheckboxSelected: (v) => {
670
+ v.kind === "group" || v.rowId == null || !e.runtime.api.rowSelection.hasSupport() || (e.runtime.api.rowSelection.setSelected(v.rowId, !r.value.has(v.rowId)), o());
670
671
  },
671
672
  toggleVisibleRowsSelected: () => {
672
673
  if (!e.runtime.api.rowSelection.hasSupport())
673
674
  return;
674
- const g = v.value;
675
- if (!y.value) {
676
- e.runtime.api.rowSelection.selectRows(g);
675
+ const v = y.value;
676
+ if (!x.value) {
677
+ e.runtime.api.rowSelection.selectRows(v), o();
677
678
  return;
678
679
  }
679
- e.runtime.api.rowSelection.deselectRows(g);
680
+ e.runtime.api.rowSelection.deselectRows(v), o();
680
681
  },
681
- selectRowRange: (g, I, M) => {
682
- h(g);
683
- const x = e.orderedVisibleColumns.value.length - 1;
684
- if (x < 0)
682
+ selectRowRange: (v, R, A) => {
683
+ S(v);
684
+ const j = e.orderedVisibleColumns.value.length - 1;
685
+ if (j < 0)
685
686
  return;
686
- const W = e.viewportRowStart.value + I;
687
- if (!M) {
687
+ const N = e.viewportRowStart.value + R;
688
+ if (!A) {
688
689
  e.applySelectionRange({
689
- startRow: W,
690
- endRow: W,
690
+ startRow: N,
691
+ endRow: N,
691
692
  startColumn: 0,
692
- endColumn: x
693
+ endColumn: j
693
694
  });
694
695
  return;
695
696
  }
696
- const re = e.selectionAnchorCell.value?.rowIndex ?? W;
697
+ const ae = e.selectionAnchorCell.value?.rowIndex ?? N;
697
698
  e.applySelectionRange({
698
- startRow: Math.min(re, W),
699
- endRow: Math.max(re, W),
699
+ startRow: Math.min(ae, N),
700
+ endRow: Math.max(ae, N),
700
701
  startColumn: 0,
701
- endColumn: x
702
+ endColumn: j
702
703
  });
703
704
  }
704
705
  };
@@ -716,12 +717,12 @@ function kl(e) {
716
717
  const f = e.bodyViewportRef.value;
717
718
  if (!f)
718
719
  return;
719
- const v = Math.abs(i.deltaX) > 0 ? i.deltaX : i.shiftKey ? i.deltaY : 0, y = v === 0 ? i.deltaY : 0;
720
- v === 0 && y === 0 || (i.preventDefault(), v !== 0 && (f.scrollLeft += v), y !== 0 && (f.scrollTop += y), e.syncViewport());
720
+ const C = Math.abs(i.deltaX) > 0 ? i.deltaX : i.shiftKey ? i.deltaY : 0, y = C === 0 ? i.deltaY : 0;
721
+ C === 0 && y === 0 || (i.preventDefault(), C !== 0 && (f.scrollLeft += C), y !== 0 && (f.scrollTop += y), e.syncViewport());
721
722
  },
722
723
  handleHeaderScroll: (i) => {
723
- const f = i.target, v = e.bodyViewportRef.value;
724
- !f || !v || (v.scrollLeft !== f.scrollLeft && (v.scrollLeft = f.scrollLeft), e.syncViewport());
724
+ const f = i.target, C = e.bodyViewportRef.value;
725
+ !f || !C || (C.scrollLeft !== f.scrollLeft && (C.scrollLeft = f.scrollLeft), e.syncViewport());
725
726
  },
726
727
  handleWindowMouseUp: () => {
727
728
  e.stopColumnResize(), e.handleInteractionWindowMouseUp();
@@ -746,10 +747,10 @@ function Hl(e) {
746
747
  r(i) && l();
747
748
  return;
748
749
  }
749
- const v = e.runtime.getBodyRowAtIndex(f.rowIndex);
750
- v && e.handleCellKeydown(
750
+ const C = e.runtime.getBodyRowAtIndex(f.rowIndex);
751
+ C && e.handleCellKeydown(
751
752
  i,
752
- v,
753
+ C,
753
754
  f.rowIndex - e.viewportRowStart.value,
754
755
  f.colIndex
755
756
  );
@@ -758,49 +759,49 @@ function Hl(e) {
758
759
  }
759
760
  function Vl(e) {
760
761
  const o = m(() => e.interactionSelectionRange.value ?? e.resolveCommittedSelectionRange()), r = () => {
761
- const h = o.value;
762
- return h && h.startRow === h.endRow && h.startColumn === h.endColumn ? {
763
- rowIndex: h.startRow,
764
- columnIndex: h.startColumn
762
+ const b = o.value;
763
+ return b && b.startRow === b.endRow && b.startColumn === b.endColumn ? {
764
+ rowIndex: b.startRow,
765
+ columnIndex: b.startColumn
765
766
  } : e.selectionAnchorCell.value;
766
- }, l = () => o.value, s = () => e.mode.value === "base" && e.isFillDragging.value && !!e.fillPreviewRange.value, i = (h, R, S) => {
767
- const C = e.viewportRowStart.value + R;
768
- return C >= h.startRow && C <= h.endRow && S >= h.startColumn && S <= h.endColumn;
769
- }, f = (h, R) => {
770
- const S = r();
771
- return S ? S.rowIndex === e.viewportRowStart.value + h && S.columnIndex === R : e.isCommittedSelectionAnchorCell(h, R);
767
+ }, l = () => o.value, s = () => e.mode.value === "base" && e.isFillDragging.value && !!e.fillPreviewRange.value, i = (b, S, M) => {
768
+ const g = e.viewportRowStart.value + S;
769
+ return g >= b.startRow && g <= b.endRow && M >= b.startColumn && M <= b.endColumn;
770
+ }, f = (b, S) => {
771
+ const M = r();
772
+ return M ? M.rowIndex === e.viewportRowStart.value + b && M.columnIndex === S : e.isCommittedSelectionAnchorCell(b, S);
772
773
  };
773
774
  return {
774
775
  selectionRange: o,
775
776
  isSelectionAnchorCell: f,
776
- isCellSelected: (h, R) => {
777
+ isCellSelected: (b, S) => {
777
778
  if (!s())
778
- return e.isCommittedCellSelected(h, R);
779
- const S = l();
780
- return S ? i(S, h, R) : !1;
779
+ return e.isCommittedCellSelected(b, S);
780
+ const M = l();
781
+ return M ? i(M, b, S) : !1;
781
782
  },
782
- shouldHighlightSelectedCell: (h, R) => {
783
+ shouldHighlightSelectedCell: (b, S) => {
783
784
  if (!s())
784
- return e.shouldHighlightCommittedSelectedCell(h, R);
785
- const S = l();
786
- return !S || !i(S, h, R) || S.startRow === S.endRow && S.startColumn === S.endColumn ? !1 : !f(h, R);
785
+ return e.shouldHighlightCommittedSelectedCell(b, S);
786
+ const M = l();
787
+ return !M || !i(M, b, S) || M.startRow === M.endRow && M.startColumn === M.endColumn ? !1 : !f(b, S);
787
788
  },
788
- isCellOnSelectionEdge: (h, R, S) => {
789
+ isCellOnSelectionEdge: (b, S, M) => {
789
790
  if (!s())
790
- return e.isCommittedCellOnSelectionEdge(h, R, S);
791
- const C = l();
792
- if (!C || !i(C, h, R))
791
+ return e.isCommittedCellOnSelectionEdge(b, S, M);
792
+ const g = l();
793
+ if (!g || !i(g, b, S))
793
794
  return !1;
794
- const g = e.viewportRowStart.value + h;
795
- switch (S) {
795
+ const I = e.viewportRowStart.value + b;
796
+ switch (M) {
796
797
  case "top":
797
- return g === C.startRow;
798
+ return I === g.startRow;
798
799
  case "right":
799
- return R === C.endColumn;
800
+ return S === g.endColumn;
800
801
  case "bottom":
801
- return g === C.endRow;
802
+ return I === g.endRow;
802
803
  case "left":
803
- return R === C.startColumn;
804
+ return S === g.startColumn;
804
805
  }
805
806
  }
806
807
  };
@@ -808,55 +809,55 @@ function Vl(e) {
808
809
  const mn = 140, zl = 72, Tl = 80, jl = 24, Bl = 400;
809
810
  function _l(e) {
810
811
  const o = e.syncRowSelectionSnapshotFromRuntime ?? (() => {
811
- }), r = e.rowSelectionSnapshot ?? P(null), l = m(() => e.showRowIndex?.value !== !1), s = m(() => e.runtime.rowPartition.value.bodyRowCount), i = m(() => Math.max(0, e.totalRuntimeRows.value)), f = m(() => l.value ? zl : 0), v = Ol({
812
+ }), r = e.rowSelectionSnapshot ?? L(null), l = m(() => e.showRowIndex?.value !== !1), s = m(() => e.runtime.rowPartition.value.bodyRowCount), i = m(() => Math.max(0, e.totalRuntimeRows.value)), f = m(() => l.value ? zl : 0), C = Ol({
812
813
  runtime: e.runtime,
813
814
  visibleColumns: e.visibleColumns,
814
815
  showRowSelection: e.showRowSelection,
815
816
  isCellEditable: e.isCellEditable
816
817
  }), {
817
818
  orderedVisibleColumns: y,
818
- centerColumns: A,
819
- resolveColumnWidth: h,
820
- isRowSelectionColumnKey: R,
821
- isRowSelectionColumn: S,
822
- isCellEditable: C,
823
- isCellEditableByKey: g,
824
- rowSelectionColumn: I
825
- } = v, M = Un({
819
+ centerColumns: x,
820
+ resolveColumnWidth: b,
821
+ isRowSelectionColumnKey: S,
822
+ isRowSelectionColumn: M,
823
+ isCellEditable: g,
824
+ isCellEditableByKey: I,
825
+ rowSelectionColumn: v
826
+ } = C, R = Un({
826
827
  totalRows: () => s.value,
827
828
  resolveBaseRowHeight: () => e.normalizedBaseRowHeight.value,
828
829
  resolveRowHeightOverride: (a) => e.runtime.api.view.getRowHeightOverride(a),
829
830
  resolveRowHeightVersion: () => e.runtime.api.view.getRowHeightVersion(),
830
831
  hasRowHeightOverrides: () => e.runtime.api.view.getRowHeightVersion() > 0
831
- }), x = (a) => {
832
+ }), A = (a) => {
832
833
  const w = Math.max(0, Math.trunc(a));
833
834
  if (w <= 0)
834
835
  return 0;
835
- const b = M.resolveTotalHeight();
836
- return w <= s.value ? M.resolveRowOffset(w) : b + (w - s.value) * e.normalizedBaseRowHeight.value;
837
- }, W = m(() => {
836
+ const h = R.resolveTotalHeight();
837
+ return w <= s.value ? R.resolveRowOffset(w) : h + (w - s.value) * e.normalizedBaseRowHeight.value;
838
+ }, j = m(() => {
838
839
  if (e.layoutMode.value !== "auto-height")
839
840
  return null;
840
- let a = M.resolveTotalHeight();
841
- return e.minRows.value !== null && (a = Math.max(a, x(e.minRows.value))), e.maxRows.value !== null && (a = Math.min(a, x(e.maxRows.value))), Math.max(0, Math.trunc(a));
842
- }), re = m(() => e.layoutMode.value !== "auto-height" ? {} : {
841
+ let a = R.resolveTotalHeight();
842
+ return e.minRows.value !== null && (a = Math.max(a, A(e.minRows.value))), e.maxRows.value !== null && (a = Math.min(a, A(e.maxRows.value))), Math.max(0, Math.trunc(a));
843
+ }), N = m(() => e.layoutMode.value !== "auto-height" ? {} : {
843
844
  height: "auto"
844
- }), Ct = m(() => {
845
+ }), ae = m(() => {
845
846
  if (e.layoutMode.value !== "auto-height")
846
847
  return {};
847
- const a = W.value ?? 0;
848
+ const a = j.value ?? 0;
848
849
  return {
849
850
  height: `${a}px`,
850
851
  maxHeight: `${a}px`
851
852
  };
852
853
  });
853
- let je = () => !1;
854
+ let Be = () => !1;
854
855
  const {
855
856
  headerViewportRef: vt,
856
- bodyViewportRef: N,
857
- displayRows: Be,
858
- pinnedBottomRows: bt,
859
- renderedColumns: ht,
857
+ bodyViewportRef: K,
858
+ displayRows: _e,
859
+ pinnedBottomRows: ht,
860
+ renderedColumns: bt,
860
861
  viewportRowStart: H,
861
862
  viewportColumnStart: yt,
862
863
  topSpacerHeight: Rt,
@@ -870,7 +871,7 @@ function _l(e) {
870
871
  handleViewportScroll: Ot,
871
872
  syncViewportFromDom: D,
872
873
  scheduleViewportSync: F,
873
- cancelScheduledViewportSync: ae
874
+ cancelScheduledViewportSync: ie
874
875
  } = qn({
875
876
  runtime: e.runtime,
876
877
  mode: e.mode,
@@ -878,92 +879,93 @@ function _l(e) {
878
879
  rowVirtualizationEnabled: m(() => e.virtualization.value.rows),
879
880
  columnVirtualizationEnabled: m(() => e.virtualization.value.columns),
880
881
  totalRows: s,
881
- visibleColumns: A,
882
+ visibleColumns: x,
882
883
  sizingColumns: y,
883
884
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
884
- resolveColumnWidth: h,
885
+ resolveColumnWidth: b,
885
886
  defaultColumnWidth: mn,
886
887
  indexColumnWidth: 0,
887
888
  flexFillOffsetWidth: f.value,
888
889
  rowOverscan: m(() => e.virtualization.value.rowOverscan),
889
890
  columnOverscan: m(() => e.virtualization.value.columnOverscan),
890
- measureVisibleRowHeights: () => ye(),
891
- resolveRowHeight: M.resolveRowHeight,
892
- resolveRowOffset: M.resolveRowOffset,
893
- resolveRowIndexAtOffset: M.resolveRowIndexAtOffset,
894
- resolveTotalRowHeight: M.resolveTotalHeight
895
- }), ie = (a) => At(a), _e = (a) => {
891
+ measureVisibleRowHeights: () => Re(),
892
+ resolveRowHeight: R.resolveRowHeight,
893
+ resolveRowOffset: R.resolveRowOffset,
894
+ resolveRowIndexAtOffset: R.resolveRowIndexAtOffset,
895
+ resolveTotalRowHeight: R.resolveTotalHeight
896
+ }), se = (a) => At(a), Ge = (a) => {
896
897
  if (i.value <= 0)
897
898
  return null;
898
899
  const w = Math.max(0, Math.min(i.value - 1, Math.trunc(a)));
899
900
  return e.runtime.api.rows.get(w) ?? null;
900
- }, he = (a) => {
901
+ }, ye = (a) => {
901
902
  for (let w = 0; w < i.value; w += 1)
902
903
  if (e.runtime.api.rows.get(w)?.rowId === a)
903
904
  return w;
904
905
  return e.runtime.resolveBodyRowIndexById(a);
905
- }, G = {
906
+ }, P = {
906
907
  ...e.runtime,
907
- getBodyRowAtIndex: _e,
908
- resolveBodyRowIndexById: he
908
+ getBodyRowAtIndex: Ge,
909
+ resolveBodyRowIndexById: ye
909
910
  }, {
910
- rowStyle: Ge,
911
- isRowAutosizeProbe: Pe,
912
- measureVisibleRowHeights: ye,
913
- startRowResize: Le,
914
- autosizeRow: We,
915
- dispose: Ne
911
+ rowStyle: Pe,
912
+ isRowAutosizeProbe: Le,
913
+ measureVisibleRowHeights: Re,
914
+ startRowResize: We,
915
+ autosizeRow: Ne,
916
+ dispose: Ke
916
917
  } = Xn({
917
918
  mode: e.mode,
918
919
  rowHeightMode: e.rowHeightMode,
919
920
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
920
921
  viewportRowStart: H,
921
- bodyViewportRef: N,
922
+ bodyViewportRef: K,
922
923
  runtime: e.runtime,
923
924
  minRowHeight: jl,
924
925
  syncViewport: () => D()
925
- }), Z = Yn({
926
+ }), Q = Yn({
926
927
  mode: e.mode,
927
- runtime: G,
928
+ runtime: P,
928
929
  totalRows: i,
929
930
  visibleColumns: y,
930
931
  viewportRowStart: H,
931
932
  selectionSnapshot: e.selectionSnapshot,
932
933
  selectionAnchor: e.selectionAnchor,
933
- isEditingCell: (a, w) => je(a, w)
934
+ isEditingCell: (a, w) => Be(a, w)
934
935
  }), {
935
- normalizeRowId: Re,
936
- normalizeCellCoord: Ke,
936
+ normalizeRowId: Se,
937
+ normalizeCellCoord: $e,
937
938
  resolveSelectionRange: V,
938
- resolveCurrentCellCoord: $e,
939
- applySelectionRange: Q,
940
- applyCellSelectionByCoord: Se,
939
+ resolveCurrentCellCoord: Ue,
940
+ applySelectionRange: ee,
941
+ applyCellSelectionByCoord: Me,
941
942
  setCellSelection: Ft,
942
- clearCellSelection: Ue,
943
- isCellSelected: qe
944
- } = Z, Dt = Z.isSelectionAnchorCell ?? (() => !1), Et = Z.shouldHighlightSelectedCell ?? ((a, w) => qe(a, w)), kt = Z.isCellOnSelectionEdge ?? (() => !1), se = m(() => {
943
+ clearCellSelection: qe,
944
+ isCellSelected: Xe
945
+ } = Q, Dt = Q.isSelectionAnchorCell ?? (() => !1), Et = Q.shouldHighlightSelectedCell ?? ((a, w) => Xe(a, w)), kt = Q.isCellOnSelectionEdge ?? (() => !1), ue = m(() => {
945
946
  const a = e.selectionSnapshot.value;
946
947
  if (!a || a.ranges.length === 0)
947
948
  return null;
948
- const w = a.activeRangeIndex ?? 0, b = a.ranges[w]?.anchor ?? a.ranges[0]?.anchor ?? null;
949
- return !b || typeof b.rowIndex != "number" || typeof b.colIndex != "number" || !Number.isFinite(b.rowIndex) || !Number.isFinite(b.colIndex) ? null : {
950
- rowIndex: Math.trunc(b.rowIndex),
951
- columnIndex: Math.trunc(b.colIndex)
949
+ const w = a.activeRangeIndex ?? 0, h = a.ranges[w]?.anchor ?? a.ranges[0]?.anchor ?? null;
950
+ return !h || typeof h.rowIndex != "number" || typeof h.colIndex != "number" || !Number.isFinite(h.rowIndex) || !Number.isFinite(h.colIndex) ? null : {
951
+ rowIndex: Math.trunc(h.rowIndex),
952
+ columnIndex: Math.trunc(h.colIndex)
952
953
  };
953
- }), Xe = El({
954
+ }), Ye = El({
954
955
  runtime: e.runtime,
955
- rowSelectionColumn: I,
956
+ rowSelectionColumn: v,
956
957
  orderedVisibleColumns: y,
957
- displayRows: Be,
958
+ displayRows: _e,
958
959
  rowSelectionSnapshot: r,
960
+ syncRowSelectionSnapshotFromRuntime: o,
959
961
  viewportRowStart: H,
960
- selectionAnchorCell: se,
961
- applySelectionRange: Q
962
+ selectionAnchorCell: ue,
963
+ applySelectionRange: ee
962
964
  }), {
963
965
  readRowSelectionCell: Ht,
964
966
  readRowSelectionDisplayCell: Vt,
965
967
  toggleRowCheckboxSelected: zt
966
- } = Xe, Tt = m(() => {
968
+ } = Ye, Tt = m(() => {
967
969
  const a = `${f.value}px`;
968
970
  return {
969
971
  ...xt.value,
@@ -971,211 +973,211 @@ function _l(e) {
971
973
  minWidth: a,
972
974
  maxWidth: a
973
975
  };
974
- }), Me = Dl({
976
+ }), pe = Dl({
975
977
  runtime: e.runtime,
976
978
  cloneRowData: e.cloneRowData,
977
979
  syncViewport: () => D(),
978
980
  history: e.history
979
981
  }), {
980
- captureHistorySnapshot: U,
981
- recordHistoryIntentTransaction: q,
982
- canUndoHistory: Ye,
983
- canRedoHistory: Je,
984
- runHistoryAction: pe
985
- } = Me, {
986
- rowIndexLabel: ee,
987
- readCell: j,
988
- readDisplayCell: Ze,
989
- rowClass: Ie,
990
- toggleGroupRow: Qe
982
+ captureHistorySnapshot: q,
983
+ recordHistoryIntentTransaction: X,
984
+ canUndoHistory: Je,
985
+ canRedoHistory: Ze,
986
+ runHistoryAction: Ie
987
+ } = pe, {
988
+ rowIndexLabel: te,
989
+ readCell: B,
990
+ readDisplayCell: Qe,
991
+ rowClass: xe,
992
+ toggleGroupRow: et
991
993
  } = Jn({
992
994
  mode: e.mode,
993
995
  runtime: e.runtime,
994
996
  viewportRowStart: H,
995
997
  firstColumnKey: e.firstColumnKey
996
- }), xe = Al({
998
+ }), Ae = Al({
997
999
  runtime: e.runtime,
998
1000
  viewportRowStart: H,
999
- isRowSelectionColumnKey: R,
1000
- isRowSelectionColumn: S,
1001
- isCellEditableByKey: g,
1001
+ isRowSelectionColumnKey: S,
1002
+ isRowSelectionColumn: M,
1003
+ isCellEditableByKey: I,
1002
1004
  readRowSelectionCell: Ht,
1003
1005
  readRowSelectionDisplayCell: Vt,
1004
- readCell: j,
1005
- readDisplayCell: Ze,
1006
+ readCell: B,
1007
+ readDisplayCell: Qe,
1006
1008
  toggleRowCheckboxSelected: zt,
1007
- captureHistorySnapshot: U,
1008
- recordHistoryIntentTransaction: q,
1009
+ captureHistorySnapshot: q,
1010
+ recordHistoryIntentTransaction: X,
1009
1011
  syncViewport: () => D()
1010
1012
  }), {
1011
- readStageCell: ue
1012
- } = xe, jt = Zn({
1013
+ readStageCell: ce
1014
+ } = Ae, jt = Zn({
1013
1015
  mode: e.mode,
1014
- runtime: G,
1016
+ runtime: P,
1015
1017
  totalRows: i,
1016
1018
  visibleColumns: y,
1017
1019
  viewportRowStart: H,
1018
1020
  resolveSelectionRange: V,
1019
- resolveCurrentCellCoord: $e,
1020
- applySelectionRange: Q,
1021
- clearCellSelection: Ue,
1022
- captureRowsSnapshot: U,
1021
+ resolveCurrentCellCoord: Ue,
1022
+ applySelectionRange: ee,
1023
+ clearCellSelection: qe,
1024
+ captureRowsSnapshot: q,
1023
1025
  recordEditTransaction: (a) => {
1024
- q({
1026
+ X({
1025
1027
  intent: "edit",
1026
1028
  label: "Cell edit"
1027
1029
  }, a);
1028
1030
  },
1029
- readCell: (a, w) => ue(a, w),
1031
+ readCell: (a, w) => ce(a, w),
1030
1032
  readClipboardCell: e.readClipboardCell ? (a, w) => e.readClipboardCell?.(a, w) ?? "" : void 0,
1031
- isCellEditable: g,
1033
+ isCellEditable: I,
1032
1034
  syncViewport: () => D(),
1033
1035
  applyClipboardEdits: e.applyClipboardEdits,
1034
1036
  buildFillMatrixFromRange: e.buildFillMatrixFromRange
1035
1037
  }), {
1036
- normalizeClipboardRange: et,
1037
- applyClipboardEdits: tt,
1038
+ normalizeClipboardRange: tt,
1039
+ applyClipboardEdits: nt,
1038
1040
  rangesEqual: Bt,
1039
1041
  buildFillMatrixFromRange: _t,
1040
1042
  clearPendingClipboardOperation: Gt,
1041
- copySelectedCells: Ae,
1042
- pasteSelectedCells: te,
1043
- cutSelectedCells: ce,
1044
- isCellInPendingClipboardRange: de,
1045
- isCellOnPendingClipboardEdge: me
1043
+ copySelectedCells: Oe,
1044
+ pasteSelectedCells: ne,
1045
+ cutSelectedCells: de,
1046
+ isCellInPendingClipboardRange: me,
1047
+ isCellOnPendingClipboardEdge: we
1046
1048
  } = jt, {
1047
- ensureKeyboardActiveCellVisible: ne
1049
+ ensureKeyboardActiveCellVisible: le
1048
1050
  } = Qn({
1049
- bodyViewportRef: N,
1051
+ bodyViewportRef: K,
1050
1052
  visibleColumns: y,
1051
- resolveColumnWidth: h,
1053
+ resolveColumnWidth: b,
1052
1054
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
1053
- resolveRowHeight: M.resolveRowHeight,
1054
- resolveRowOffset: M.resolveRowOffset,
1055
+ resolveRowHeight: R.resolveRowHeight,
1056
+ resolveRowOffset: R.resolveRowOffset,
1055
1057
  indexColumnWidth: f.value,
1056
1058
  defaultColumnWidth: mn,
1057
1059
  syncViewport: () => D()
1058
1060
  }), {
1059
- editingCell: Oe,
1061
+ editingCell: Fe,
1060
1062
  editingCellValue: Pt,
1061
1063
  editingCellInitialFilter: Lt,
1062
- editingCellOpenOnMount: nt,
1063
- isEditingCell: lt,
1064
- startInlineEdit: Fe,
1065
- commitInlineEdit: De,
1066
- cancelInlineEdit: ot,
1064
+ editingCellOpenOnMount: lt,
1065
+ isEditingCell: ot,
1066
+ startInlineEdit: De,
1067
+ commitInlineEdit: Ee,
1068
+ cancelInlineEdit: rt,
1067
1069
  handleEditorKeydown: Wt
1068
1070
  } = el({
1069
1071
  mode: e.mode,
1070
- bodyViewportRef: N,
1072
+ bodyViewportRef: K,
1071
1073
  visibleColumns: y,
1072
1074
  totalRows: i,
1073
- runtime: G,
1074
- readCell: (a, w) => ue(a, w),
1075
- resolveRowIndexById: he,
1075
+ runtime: P,
1076
+ readCell: (a, w) => ce(a, w),
1077
+ resolveRowIndexById: ye,
1076
1078
  applyCellSelection: (a) => {
1077
- Se(a, !1);
1079
+ Me(a, !1);
1078
1080
  },
1079
1081
  ensureActiveCellVisible: (a, w) => {
1080
- ne(a, w);
1082
+ le(a, w);
1081
1083
  },
1082
- isCellEditable: g,
1083
- captureRowsSnapshot: U,
1084
+ isCellEditable: I,
1085
+ captureRowsSnapshot: q,
1084
1086
  recordEditTransaction: (a) => {
1085
- q({
1087
+ X({
1086
1088
  intent: "edit",
1087
1089
  label: "Cell edit"
1088
1090
  }, a);
1089
1091
  }
1090
1092
  });
1091
- je = lt;
1092
- const Nt = m(() => Oe.value), Kt = {
1093
+ Be = ot;
1094
+ const Nt = m(() => Fe.value), Kt = {
1093
1095
  mode: e.mode,
1094
1096
  enableFillHandle: e.enableFillHandle,
1095
1097
  enableRangeMove: e.enableRangeMove,
1096
- runtime: G,
1098
+ runtime: P,
1097
1099
  totalRows: i,
1098
1100
  visibleColumns: y,
1099
1101
  viewportRowStart: H,
1100
1102
  selectionSnapshot: e.selectionSnapshot,
1101
- bodyViewportRef: N,
1103
+ bodyViewportRef: K,
1102
1104
  indexColumnWidth: f.value,
1103
- resolveColumnWidth: h,
1104
- resolveRowHeight: M.resolveRowHeight,
1105
- resolveRowIndexAtOffset: M.resolveRowIndexAtOffset,
1106
- normalizeRowId: Re,
1107
- normalizeCellCoord: Ke,
1105
+ resolveColumnWidth: b,
1106
+ resolveRowHeight: R.resolveRowHeight,
1107
+ resolveRowIndexAtOffset: R.resolveRowIndexAtOffset,
1108
+ normalizeRowId: Se,
1109
+ normalizeCellCoord: $e,
1108
1110
  resolveSelectionRange: V,
1109
- applySelectionRange: Q,
1110
- applyCellSelectionByCoord: Se,
1111
+ applySelectionRange: ee,
1112
+ applyCellSelectionByCoord: Me,
1111
1113
  setCellSelection: Ft,
1112
- clearCellSelection: Ue,
1113
- readCell: (a, w) => ue(a, w),
1114
- isCellEditable: g,
1114
+ clearCellSelection: qe,
1115
+ readCell: (a, w) => ce(a, w),
1116
+ isCellEditable: I,
1115
1117
  cloneRowData: e.cloneRowData,
1116
- resolveRowIndexById: he,
1117
- captureRowsSnapshot: U,
1118
+ resolveRowIndexById: ye,
1119
+ captureRowsSnapshot: q,
1118
1120
  recordIntentTransaction: (a, w) => {
1119
- q(a, w);
1121
+ X(a, w);
1120
1122
  },
1121
1123
  clearPendingClipboardOperation: Gt,
1122
1124
  clearExternalPendingClipboardOperation: e.clearExternalPendingClipboardOperation,
1123
- copySelectedCells: Ae,
1124
- pasteSelectedCells: te,
1125
- cutSelectedCells: ce,
1126
- normalizeClipboardRange: et,
1127
- applyClipboardEdits: tt,
1125
+ copySelectedCells: Oe,
1126
+ pasteSelectedCells: ne,
1127
+ cutSelectedCells: de,
1128
+ normalizeClipboardRange: tt,
1129
+ applyClipboardEdits: nt,
1128
1130
  rangesEqual: Bt,
1129
1131
  buildFillMatrixFromRange: _t,
1130
1132
  applyRangeMove: e.applyRangeMove,
1131
1133
  syncViewport: () => D(),
1132
1134
  editingCell: Nt,
1133
- startInlineEdit: Fe,
1134
- commitInlineEdit: De,
1135
- canUndo: Ye,
1136
- canRedo: Je,
1137
- runHistoryAction: pe,
1138
- ensureKeyboardActiveCellVisible: ne,
1135
+ startInlineEdit: De,
1136
+ commitInlineEdit: Ee,
1137
+ canUndo: Je,
1138
+ canRedo: Ze,
1139
+ runHistoryAction: Ie,
1140
+ ensureKeyboardActiveCellVisible: le,
1139
1141
  isContextMenuVisible: e.isContextMenuVisible,
1140
1142
  closeContextMenu: e.closeContextMenu,
1141
1143
  openContextMenuFromCurrentCell: e.openContextMenuFromCurrentCell,
1142
1144
  runRowIndexKeyboardAction: e.runRowIndexKeyboardAction
1143
1145
  }, $t = tl(Kt), {
1144
- isPointerSelectingCells: rt,
1145
- isFillDragging: le,
1146
- fillPreviewRange: Ee,
1147
- lastAppliedFill: ke,
1146
+ isPointerSelectingCells: at,
1147
+ isFillDragging: oe,
1148
+ fillPreviewRange: ke,
1149
+ lastAppliedFill: He,
1148
1150
  isRangeMoving: Ut,
1149
- selectionRange: He,
1150
- rangeMovePreviewRange: at,
1151
+ selectionRange: Ve,
1152
+ rangeMovePreviewRange: it,
1151
1153
  stopPointerSelection: qt,
1152
1154
  stopFillSelection: Xt,
1153
1155
  startFillHandleDrag: Yt,
1154
1156
  startFillHandleDoubleClick: Jt,
1155
- applyLastFillBehavior: we,
1157
+ applyLastFillBehavior: fe,
1156
1158
  handleCellMouseDown: Zt,
1157
1159
  handleCellKeydown: z,
1158
- handleRowIndexKeydown: it,
1160
+ handleRowIndexKeydown: st,
1159
1161
  handleWindowMouseMove: Qt,
1160
- handleWindowMouseUp: X,
1161
- isCellInFillPreview: Ve,
1162
+ handleWindowMouseUp: Y,
1163
+ isCellInFillPreview: ze,
1162
1164
  isFillHandleCell: en,
1163
1165
  clearSelectedCells: tn,
1164
1166
  dispose: nn
1165
1167
  } = $t, ln = Hl({
1166
- runtime: G,
1168
+ runtime: P,
1167
1169
  selectionSnapshot: e.selectionSnapshot,
1168
1170
  totalRows: i,
1169
1171
  orderedVisibleColumns: y,
1170
1172
  viewportRowStart: H,
1171
- applySelectionRange: Q,
1173
+ applySelectionRange: ee,
1172
1174
  handleCellKeydown: z
1173
1175
  }), {
1174
- isColumnResizing: fe,
1176
+ isColumnResizing: ge,
1175
1177
  startResize: on,
1176
- handleResizeDoubleClick: st,
1178
+ handleResizeDoubleClick: ut,
1177
1179
  applyColumnResizeFromPointer: rn,
1178
- stopColumnResize: ge,
1180
+ stopColumnResize: Ce,
1179
1181
  dispose: an
1180
1182
  } = nl({
1181
1183
  visibleColumns: y,
@@ -1189,48 +1191,48 @@ function _l(e) {
1189
1191
  autoSizeCharWidth: 7.2,
1190
1192
  autoSizeHorizontalPadding: 42,
1191
1193
  autoSizeMaxWidth: 640,
1192
- isFillDragging: () => le.value,
1194
+ isFillDragging: () => oe.value,
1193
1195
  stopFillSelection: () => {
1194
1196
  Xt(!1);
1195
1197
  },
1196
- isDragSelecting: () => rt.value,
1198
+ isDragSelecting: () => at.value,
1197
1199
  stopDragSelection: () => {
1198
1200
  qt();
1199
1201
  },
1200
1202
  readCellText: (a, w) => {
1201
- const b = a[w];
1202
- return b == null ? "" : String(b);
1203
+ const h = a[w];
1204
+ return h == null ? "" : String(h);
1203
1205
  }
1204
- }), ut = Vl({
1206
+ }), ct = Vl({
1205
1207
  mode: e.mode,
1206
1208
  viewportRowStart: H,
1207
- selectionAnchorCell: se,
1208
- fillPreviewRange: Ee,
1209
- isFillDragging: le,
1210
- interactionSelectionRange: He,
1209
+ selectionAnchorCell: ue,
1210
+ fillPreviewRange: ke,
1211
+ isFillDragging: oe,
1212
+ interactionSelectionRange: Ve,
1211
1213
  resolveCommittedSelectionRange: V,
1212
1214
  isCommittedSelectionAnchorCell: Dt,
1213
- isCommittedCellSelected: qe,
1215
+ isCommittedCellSelected: Xe,
1214
1216
  shouldHighlightCommittedSelectedCell: Et,
1215
1217
  isCommittedCellOnSelectionEdge: kt
1216
- }), { selectionRange: ct } = ut, sn = Fl({
1217
- lastAppliedFill: ke,
1218
- selectionRange: ct,
1219
- isFillDragging: le
1218
+ }), { selectionRange: dt } = ct, sn = Fl({
1219
+ lastAppliedFill: He,
1220
+ selectionRange: dt,
1221
+ isFillDragging: oe
1220
1222
  }), t = kl({
1221
- bodyViewportRef: N,
1222
- isColumnResizing: fe,
1223
+ bodyViewportRef: K,
1224
+ isColumnResizing: ge,
1223
1225
  applyColumnResizeFromPointer: rn,
1224
- stopColumnResize: ge,
1226
+ stopColumnResize: Ce,
1225
1227
  handleInteractionWindowMouseMove: Qt,
1226
- handleInteractionWindowMouseUp: X,
1228
+ handleInteractionWindowMouseUp: Y,
1227
1229
  syncViewport: D
1228
1230
  }), n = {
1229
- rowSelection: Xe,
1230
- history: Me,
1231
- cellIo: xe,
1231
+ rowSelection: Ye,
1232
+ history: pe,
1233
+ cellIo: Ae,
1232
1234
  viewportKeyboard: ln,
1233
- visualSelection: ut,
1235
+ visualSelection: ct,
1234
1236
  fillAction: sn,
1235
1237
  scrollSync: t
1236
1238
  }, {
@@ -1241,9 +1243,9 @@ function _l(e) {
1241
1243
  rowHeightMode: e.rowHeightMode,
1242
1244
  layoutMode: e.layoutMode,
1243
1245
  visibleColumns: y,
1244
- renderedColumns: ht,
1245
- displayRows: Be,
1246
- pinnedBottomRows: bt,
1246
+ renderedColumns: bt,
1247
+ displayRows: _e,
1248
+ pinnedBottomRows: ht,
1247
1249
  sourceRows: e.sourceRows ?? e.rows,
1248
1250
  showRowIndex: l,
1249
1251
  rowHover: m(() => e.rowHover?.value === !0),
@@ -1252,8 +1254,8 @@ function _l(e) {
1252
1254
  gridContentStyle: pt,
1253
1255
  mainTrackStyle: It,
1254
1256
  indexColumnStyle: Tt,
1255
- stageStyle: re,
1256
- bodyShellStyle: Ct,
1257
+ stageStyle: N,
1258
+ bodyShellStyle: ae,
1257
1259
  topSpacerHeight: Rt,
1258
1260
  bottomSpacerHeight: be,
1259
1261
  viewportRowStart: H,
@@ -1262,18 +1264,18 @@ function _l(e) {
1262
1264
  rightColumnSpacerWidth: Mt,
1263
1265
  editingCellValueRef: Pt,
1264
1266
  editingCellInitialFilter: Lt,
1265
- editingCellOpenOnMount: nt,
1266
- selectionRange: ct,
1267
- selectionAnchorCell: se,
1268
- fillPreviewRange: Ee,
1269
- rangeMovePreviewRange: at,
1267
+ editingCellOpenOnMount: lt,
1268
+ selectionRange: dt,
1269
+ selectionAnchorCell: ue,
1270
+ fillPreviewRange: ke,
1271
+ rangeMovePreviewRange: it,
1270
1272
  fillHandleEnabled: m(() => e.enableFillHandle.value),
1271
1273
  rangeMoveEnabled: m(() => e.enableRangeMove.value),
1272
- isFillDragging: le,
1274
+ isFillDragging: oe,
1273
1275
  isRangeMoving: Ut,
1274
1276
  headerViewportRef: vt,
1275
- bodyViewportRef: N,
1276
- columnStyle: ie,
1277
+ bodyViewportRef: K,
1278
+ columnStyle: se,
1277
1279
  toggleSortForColumn: e.toggleSortForColumn,
1278
1280
  sortIndicator: e.sortIndicator,
1279
1281
  setColumnFilterText: e.setColumnFilterText,
@@ -1300,9 +1302,9 @@ function _l(e) {
1300
1302
  handleHeaderScroll: n.scrollSync.handleHeaderScroll,
1301
1303
  handleViewportScroll: Ot,
1302
1304
  handleViewportKeydown: n.viewportKeyboard.handleViewportKeydown,
1303
- rowClass: Ie,
1304
- isRowAutosizeProbe: Pe,
1305
- rowStyle: Ge,
1305
+ rowClass: xe,
1306
+ isRowAutosizeProbe: Le,
1307
+ rowStyle: Pe,
1306
1308
  isRowInPendingClipboardCut: e.isRowInPendingClipboardCut,
1307
1309
  isRowFocused: n.rowSelection.isRowFocused,
1308
1310
  isRowCheckboxSelected: n.rowSelection.isRowCheckboxSelected,
@@ -1310,36 +1312,36 @@ function _l(e) {
1310
1312
  someVisibleRowsSelected: n.rowSelection.areSomeVisibleRowsSelected,
1311
1313
  handleRowClick: n.rowSelection.focusRow,
1312
1314
  handleRowIndexClick: n.rowSelection.selectRowRange,
1313
- handleRowIndexKeydown: it,
1315
+ handleRowIndexKeydown: st,
1314
1316
  handleToggleAllVisibleRows: n.rowSelection.toggleVisibleRowsSelected,
1315
- toggleGroupRow: Qe,
1316
- rowIndexLabel: ee,
1317
+ toggleGroupRow: et,
1318
+ rowIndexLabel: te,
1317
1319
  startResize: on,
1318
- handleResizeDoubleClick: st,
1319
- startRowResize: Le,
1320
- autosizeRow: We,
1320
+ handleResizeDoubleClick: ut,
1321
+ startRowResize: We,
1322
+ autosizeRow: Ne,
1321
1323
  isCellSelected: n.visualSelection.isCellSelected,
1322
1324
  isSelectionAnchorCell: n.visualSelection.isSelectionAnchorCell,
1323
1325
  shouldHighlightSelectedCell: n.visualSelection.shouldHighlightSelectedCell,
1324
1326
  isCellOnSelectionEdge: n.visualSelection.isCellOnSelectionEdge,
1325
- isCellInFillPreview: Ve,
1326
- isCellInPendingClipboardRange: de,
1327
- isCellOnPendingClipboardEdge: me,
1328
- isEditingCell: lt,
1329
- isCellEditable: (a, w, b, O) => C(a, H.value + w, b),
1327
+ isCellInFillPreview: ze,
1328
+ isCellInPendingClipboardRange: me,
1329
+ isCellOnPendingClipboardEdge: we,
1330
+ isEditingCell: ot,
1331
+ isCellEditable: (a, w, h, O) => g(a, H.value + w, h),
1330
1332
  handleCellMouseDown: Zt,
1331
1333
  handleCellClick: n.cellIo.handleCellClick,
1332
1334
  handleCellKeydown: z,
1333
- startInlineEdit: Fe,
1335
+ startInlineEdit: De,
1334
1336
  isFillHandleCell: en,
1335
1337
  startFillHandleDrag: Yt,
1336
1338
  startFillHandleDoubleClick: Jt,
1337
1339
  fillActionAnchorCell: n.fillAction.fillActionAnchorCell,
1338
1340
  fillActionBehavior: n.fillAction.fillActionBehavior,
1339
- applyFillActionBehavior: we,
1341
+ applyFillActionBehavior: fe,
1340
1342
  handleEditorKeydown: Wt,
1341
- commitInlineEdit: De,
1342
- cancelInlineEdit: ot,
1343
+ commitInlineEdit: Ee,
1344
+ cancelInlineEdit: rt,
1343
1345
  readCell: n.cellIo.readStageCell,
1344
1346
  readDisplayCell: n.cellIo.readStageDisplayCell
1345
1347
  });
@@ -1355,21 +1357,21 @@ function _l(e) {
1355
1357
  syncRowSelectionSnapshotFromRuntime: o,
1356
1358
  syncViewport: D,
1357
1359
  scheduleViewportSync: F,
1358
- measureVisibleRowHeights: ye,
1360
+ measureVisibleRowHeights: Re,
1359
1361
  applyRowHeightSettings: e.applyRowHeightSettings
1360
1362
  }), ol({
1361
- bodyViewportRef: N,
1363
+ bodyViewportRef: K,
1362
1364
  syncViewport: D,
1363
1365
  handleWindowMouseMove: n.scrollSync.handleWindowMouseMove,
1364
1366
  handleWindowMouseUp: n.scrollSync.handleWindowMouseUp,
1365
- cancelScheduledViewportSync: ae,
1367
+ cancelScheduledViewportSync: ie,
1366
1368
  onAfterMount: () => {
1367
1369
  e.syncSelectionSnapshotFromRuntime(), o(), Dn(() => {
1368
1370
  e.applyRowHeightSettings(), D();
1369
1371
  });
1370
1372
  },
1371
1373
  dispose: [
1372
- Ne,
1374
+ Ke,
1373
1375
  an,
1374
1376
  nn,
1375
1377
  n.history.disposeIntentHistory
@@ -1378,15 +1380,15 @@ function _l(e) {
1378
1380
  tableStageProps: u,
1379
1381
  tableStageContext: d,
1380
1382
  syncViewportFromDom: D,
1381
- copySelectedCells: Ae,
1382
- pasteSelectedCells: te,
1383
- cutSelectedCells: ce,
1383
+ copySelectedCells: Oe,
1384
+ pasteSelectedCells: ne,
1385
+ cutSelectedCells: de,
1384
1386
  clearSelectedCells: tn,
1385
- captureHistorySnapshot: U,
1386
- recordHistoryIntentTransaction: q
1387
+ captureHistorySnapshot: q,
1388
+ recordHistoryIntentTransaction: X
1387
1389
  };
1388
1390
  }
1389
- const Gl = ft(() => import("./DataGridColumnLayoutPopover-Qt56b3CA.js")), Pl = ft(() => import("./DataGridAdvancedFilterPopover-Bak_CkaO.js")), Ll = ft(() => import("./DataGridAggregationsPopover-DfQ3-UV4.js")), Wl = ft(() => import("./DataGridGanttStageEntry-DgXw3IJw.js"));
1391
+ const Gl = gt(() => import("./DataGridColumnLayoutPopover-Qt56b3CA.js")), Pl = gt(() => import("./DataGridAdvancedFilterPopover-Bak_CkaO.js")), Ll = gt(() => import("./DataGridAggregationsPopover-DfQ3-UV4.js")), Wl = gt(() => import("./DataGridGanttStageEntry-DgXw3IJw.js"));
1390
1392
  function Nl(e) {
1391
1393
  return Number.isFinite(e) ? Math.max(24, Math.trunc(e)) : 31;
1392
1394
  }
@@ -1406,7 +1408,7 @@ function gn() {
1406
1408
  advancedExpression: null
1407
1409
  };
1408
1410
  }
1409
- function ze(e) {
1411
+ function Te(e) {
1410
1412
  return Kn(e ?? gn()) ?? gn();
1411
1413
  }
1412
1414
  function Cn(e) {
@@ -1417,7 +1419,7 @@ function $l(e) {
1417
1419
  for (const [s, i] of Object.entries(e.columnFilters ?? {})) {
1418
1420
  if (i.kind === "valueSet") {
1419
1421
  const f = Array.from(new Set(
1420
- (i.tokens ?? []).map((v) => Cn(String(v ?? ""))).filter((v) => v.length > 0)
1422
+ (i.tokens ?? []).map((C) => Cn(String(C ?? ""))).filter((C) => C.length > 0)
1421
1423
  ));
1422
1424
  if (f.length === 0)
1423
1425
  continue;
@@ -1448,7 +1450,7 @@ function Ul(e) {
1448
1450
  s?.kind === "predicate" && typeof s.value == "string" && (o[l] = s.value);
1449
1451
  return o;
1450
1452
  }
1451
- function Y(e) {
1453
+ function J(e) {
1452
1454
  if (typeof globalThis.structuredClone == "function")
1453
1455
  try {
1454
1456
  return globalThis.structuredClone(e);
@@ -1502,7 +1504,7 @@ function ql(e) {
1502
1504
  return null;
1503
1505
  }
1504
1506
  }
1505
- function Te(e) {
1507
+ function je(e) {
1506
1508
  return e ? {
1507
1509
  columns: e.columns.map((o) => ({ ...o })),
1508
1510
  basis: e.basis === "source" ? "source" : "filtered"
@@ -1514,10 +1516,10 @@ function Xl(e) {
1514
1516
  expandedByDefault: e.expandedByDefault
1515
1517
  } : null;
1516
1518
  }
1517
- function $(e) {
1519
+ function U(e) {
1518
1520
  return e == null ? "blank" : e instanceof Date ? e.toISOString() : typeof e == "string" ? `"${e}"` : String(e);
1519
1521
  }
1520
- function oe(e) {
1522
+ function re(e) {
1521
1523
  switch (e) {
1522
1524
  case "contains":
1523
1525
  return "contains";
@@ -1569,21 +1571,21 @@ function Yl(e) {
1569
1571
  return l === "string" || l === "number" || l === "boolean" || l === "bigint" || l === "date" || l === "repr" || l === "json" ? s : o;
1570
1572
  }
1571
1573
  function Jl(e, o) {
1572
- return o.kind === "valueSet" ? o.tokens.length === 1 ? `${e}: ${Yl(o.tokens[0] ?? "")}` : `${e}: ${o.tokens.length} values` : o.operator === "between" ? `${e} between ${$(o.value)} and ${$(o.value2)}` : o.operator === "isEmpty" || o.operator === "notEmpty" || o.operator === "isNull" || o.operator === "notNull" ? `${e} ${oe(o.operator)}` : `${e} ${oe(o.operator)} ${$(o.value)}`;
1574
+ return o.kind === "valueSet" ? o.tokens.length === 1 ? `${e}: ${Yl(o.tokens[0] ?? "")}` : `${e}: ${o.tokens.length} values` : o.operator === "between" ? `${e} between ${U(o.value)} and ${U(o.value2)}` : o.operator === "isEmpty" || o.operator === "notEmpty" || o.operator === "isNull" || o.operator === "notNull" ? `${e} ${re(o.operator)}` : `${e} ${re(o.operator)} ${U(o.value)}`;
1573
1575
  }
1574
1576
  function Zl(e, o) {
1575
1577
  const r = o.clauses.map((l, s) => {
1576
1578
  const i = s === 0 ? "" : `${String(l.join ?? "and").toUpperCase()} `;
1577
- return l.operator === "between" ? `${i}${oe(l.operator)} ${$(l.value)} and ${$(l.value2)}` : l.operator === "isEmpty" || l.operator === "notEmpty" || l.operator === "isNull" || l.operator === "notNull" ? `${i}${oe(l.operator)}` : `${i}${oe(l.operator)} ${$(l.value)}`;
1579
+ return l.operator === "between" ? `${i}${re(l.operator)} ${U(l.value)} and ${U(l.value2)}` : l.operator === "isEmpty" || l.operator === "notEmpty" || l.operator === "isNull" || l.operator === "notNull" ? `${i}${re(l.operator)}` : `${i}${re(l.operator)} ${U(l.value)}`;
1578
1580
  }).filter((l) => l.length > 0);
1579
1581
  return r.length === 0 ? `${e}: active` : `${e} ${r.join(" ")}`;
1580
1582
  }
1581
- function bn(e, o) {
1583
+ function hn(e, o) {
1582
1584
  if (e.kind === "condition") {
1583
1585
  const r = o(e.key);
1584
- return e.operator === "between" ? `${r} between ${$(e.value)} and ${$(e.value2)}` : e.operator === "isEmpty" || e.operator === "notEmpty" || e.operator === "isNull" || e.operator === "notNull" ? `${r} ${oe(e.operator)}` : `${r} ${oe(e.operator)} ${$(e.value)}`;
1586
+ return e.operator === "between" ? `${r} between ${U(e.value)} and ${U(e.value2)}` : e.operator === "isEmpty" || e.operator === "notEmpty" || e.operator === "isNull" || e.operator === "notNull" ? `${r} ${re(e.operator)}` : `${r} ${re(e.operator)} ${U(e.value)}`;
1585
1587
  }
1586
- return e.kind === "not" ? `NOT (${bn(e.child, o)})` : e.children.map((r) => bn(r, o)).filter((r) => r.length > 0).join(` ${e.operator.toUpperCase()} `);
1588
+ return e.kind === "not" ? `NOT (${hn(e.child, o)})` : e.children.map((r) => hn(r, o)).filter((r) => r.length > 0).join(` ${e.operator.toUpperCase()} `);
1587
1589
  }
1588
1590
  const Ql = [
1589
1591
  "sum",
@@ -1792,7 +1794,7 @@ const lo = {
1792
1794
  }
1793
1795
  },
1794
1796
  setup(e) {
1795
- const o = P(0), r = P(pn(e.sortModel)), l = P(ze(e.filterModel)), s = m(() => Ul(l.value));
1797
+ const o = L(0), r = L(pn(e.sortModel)), l = L(Te(e.filterModel)), s = m(() => Ul(l.value));
1796
1798
  let i = "";
1797
1799
  const f = () => {
1798
1800
  const t = e.runtimeRowModel.getSnapshot();
@@ -1805,52 +1807,52 @@ const lo = {
1805
1807
  ].join("|");
1806
1808
  };
1807
1809
  i = f();
1808
- const v = e.runtimeRowModel.subscribe(() => {
1810
+ const C = e.runtimeRowModel.subscribe(() => {
1809
1811
  const t = f();
1810
1812
  t !== i && (i = t, o.value += 1);
1811
1813
  });
1812
1814
  En(() => {
1813
- v();
1814
- }), L(
1815
+ C();
1816
+ }), W(
1815
1817
  () => e.sortModel,
1816
1818
  (t) => {
1817
1819
  r.value = pn(t);
1818
1820
  },
1819
1821
  { deep: !0 }
1820
- ), L(
1822
+ ), W(
1821
1823
  () => e.filterModel,
1822
1824
  (t) => {
1823
- l.value = ze(t);
1825
+ l.value = Te(t);
1824
1826
  },
1825
1827
  { deep: !0 }
1826
1828
  );
1827
- const y = m(() => e.mode), A = m(() => e.rows), h = m(() => (o.value, e.runtime.api.rows.getSnapshot().rowCount)), R = m(() => e.runtime.columnSnapshot.value.visibleColumns), S = m(() => e.runtime.columnSnapshot.value.columns ?? []), C = m(() => R.value.filter((t) => t.visible !== !1).map((t) => ({
1829
+ const y = m(() => e.mode), x = m(() => e.rows), b = m(() => (o.value, e.runtime.api.rows.getSnapshot().rowCount)), S = m(() => e.runtime.columnSnapshot.value.visibleColumns), M = m(() => e.runtime.columnSnapshot.value.columns ?? []), g = m(() => S.value.filter((t) => t.visible !== !1).map((t) => ({
1828
1830
  key: t.key,
1829
1831
  label: t.column.label ?? t.key
1830
- }))), g = m(() => S.value.map((t) => ({
1832
+ }))), I = m(() => M.value.map((t) => ({
1831
1833
  key: t.key,
1832
1834
  label: t.column.label ?? t.key,
1833
1835
  visible: t.visible !== !1
1834
- }))), I = m(() => S.value.filter((t) => t.column.capabilities?.aggregatable === !0).map((t) => ({
1836
+ }))), v = m(() => M.value.filter((t) => t.column.capabilities?.aggregatable === !0).map((t) => ({
1835
1837
  key: t.key,
1836
1838
  label: t.column.label ?? t.key,
1837
1839
  allowedOps: no(t.column.dataType)
1838
- }))), M = P(e.rowHeightMode), x = m(() => Nl(e.baseRowHeight)), W = m(() => R.value[0]?.key ?? "name"), re = m(() => {
1840
+ }))), R = L(e.rowHeightMode), A = m(() => Nl(e.baseRowHeight)), j = m(() => S.value[0]?.key ?? "name"), N = m(() => {
1839
1841
  const t = /* @__PURE__ */ new Map();
1840
- for (const n of S.value)
1842
+ for (const n of M.value)
1841
1843
  t.set(n.key, n.column.label ?? n.key);
1842
1844
  return t;
1843
1845
  }), {
1844
- isColumnLayoutPanelOpen: Ct,
1845
- columnLayoutPanelItems: je,
1846
+ isColumnLayoutPanelOpen: ae,
1847
+ columnLayoutPanelItems: Be,
1846
1848
  openColumnLayoutPanel: vt,
1847
- cancelColumnLayoutPanel: N,
1848
- applyColumnLayoutPanel: Be,
1849
- moveColumnUp: bt,
1850
- moveColumnDown: ht,
1849
+ cancelColumnLayoutPanel: K,
1850
+ applyColumnLayoutPanel: _e,
1851
+ moveColumnUp: ht,
1852
+ moveColumnDown: bt,
1851
1853
  updateColumnVisibility: H
1852
1854
  } = rl({
1853
- resolveColumns: () => g.value,
1855
+ resolveColumns: () => I.value,
1854
1856
  applyColumnLayout: (t) => {
1855
1857
  e.runtime.api.columns.setOrder(t.order);
1856
1858
  for (const [n, u] of Object.entries(t.visibilityByKey))
@@ -1868,12 +1870,12 @@ const lo = {
1868
1870
  applyAdvancedFilterPanel: At,
1869
1871
  clearAdvancedFilterPanel: Ot
1870
1872
  } = al({
1871
- resolveColumns: () => C.value
1872
- }), D = P(!1), F = P(null), ae = m(() => !!e.groupBy?.fields?.length), ie = m(() => (o.value, Te(e.runtime.api.rows.getAggregationModel()))), _e = m(() => (o.value, Xl(e.runtime.api.rows.getSnapshot().groupBy))), he = m(() => {
1873
+ resolveColumns: () => g.value
1874
+ }), D = L(!1), F = L(null), ie = m(() => !!e.groupBy?.fields?.length), se = m(() => (o.value, je(e.runtime.api.rows.getAggregationModel()))), Ge = m(() => (o.value, Xl(e.runtime.api.rows.getSnapshot().groupBy))), ye = m(() => {
1873
1875
  const t = new Map(
1874
1876
  (F.value?.columns ?? []).map((n) => [n.key, n.op])
1875
1877
  );
1876
- return I.value.map((n) => {
1878
+ return v.value.map((n) => {
1877
1879
  const u = n.allowedOps[0] ?? "count", d = t.get(n.key), a = d && n.allowedOps.includes(d) ? d : u;
1878
1880
  return {
1879
1881
  key: n.key,
@@ -1883,29 +1885,29 @@ const lo = {
1883
1885
  allowedOps: n.allowedOps
1884
1886
  };
1885
1887
  });
1886
- }), G = m(() => F.value?.basis === "source" ? "source" : "filtered");
1887
- L(
1888
- ie,
1888
+ }), P = m(() => F.value?.basis === "source" ? "source" : "filtered");
1889
+ W(
1890
+ se,
1889
1891
  (t) => {
1890
- D.value || (F.value = Te(t));
1892
+ D.value || (F.value = je(t));
1891
1893
  },
1892
1894
  { immediate: !0, deep: !0 }
1893
- ), L(
1895
+ ), W(
1894
1896
  () => e.rowHeightMode,
1895
1897
  (t) => {
1896
- M.value = t;
1898
+ R.value = t;
1897
1899
  }
1898
1900
  );
1899
- const Ge = (t) => {
1901
+ const Pe = (t) => {
1900
1902
  const n = l.value.columnFilters?.[t];
1901
1903
  return n ? n.kind === "valueSet" ? n.tokens.length > 0 : !0 : !1;
1902
- }, Pe = (t) => {
1904
+ }, Le = (t) => {
1903
1905
  const n = l.value.columnFilters?.[t];
1904
1906
  return !n || n.kind !== "valueSet" ? [] : n.tokens.map((u) => Cn(String(u ?? "")));
1905
- }, ye = (t) => Tn(e.columnMenu, t), Le = (t) => fl(e.columnMenu, t), We = (t) => Cl(e.columnMenu, t), Ne = (t) => gl(e.columnMenu, t), Z = (t) => vl(e.columnMenu, t), Re = (t) => {
1906
- const n = _e.value?.fields.findIndex((u) => u === t) ?? -1;
1907
+ }, Re = (t) => Tn(e.columnMenu, t), We = (t) => fl(e.columnMenu, t), Ne = (t) => Cl(e.columnMenu, t), Ke = (t) => gl(e.columnMenu, t), Q = (t) => vl(e.columnMenu, t), Se = (t) => {
1908
+ const n = Ge.value?.fields.findIndex((u) => u === t) ?? -1;
1907
1909
  return n >= 0 ? n : null;
1908
- }, Ke = (t) => Re(t) !== null, V = () => {
1910
+ }, $e = (t) => Se(t) !== null, V = () => {
1909
1911
  const t = r.value.map((u) => ({
1910
1912
  key: u.key,
1911
1913
  direction: u.direction
@@ -1917,24 +1919,24 @@ const lo = {
1917
1919
  advancedExpression: n
1918
1920
  })
1919
1921
  });
1920
- }, $e = m(() => e.advancedFilter.enabled ? be.value ?? l.value.advancedExpression ?? null : l.value.advancedExpression ?? null), Q = m(() => {
1921
- const t = (u) => re.value.get(u) ?? u, n = [];
1922
+ }, Ue = m(() => e.advancedFilter.enabled ? be.value ?? l.value.advancedExpression ?? null : l.value.advancedExpression ?? null), ee = m(() => {
1923
+ const t = (u) => N.value.get(u) ?? u, n = [];
1922
1924
  for (const [u, d] of Object.entries(l.value.columnFilters ?? {}))
1923
1925
  d && n.push(Jl(t(u), d));
1924
1926
  for (const [u, d] of Object.entries(l.value.advancedFilters ?? {}))
1925
1927
  d && n.push(`Advanced: ${Zl(t(u), d)}`);
1926
- return $e.value && n.push(`Advanced: ${bn($e.value, t)}`), Object.freeze(n);
1927
- }), Se = m(() => Q.value.length > 0), Ft = () => {
1928
+ return Ue.value && n.push(`Advanced: ${hn(Ue.value, t)}`), Object.freeze(n);
1929
+ }), Me = m(() => ee.value.length > 0), Ft = () => {
1928
1930
  l.value = gn(), Ot(), V();
1929
1931
  };
1930
- L(
1932
+ W(
1931
1933
  be,
1932
1934
  () => {
1933
1935
  e.advancedFilter.enabled && V();
1934
1936
  },
1935
1937
  { deep: !0 }
1936
1938
  );
1937
- const Ue = (t, n = !1) => {
1939
+ const qe = (t, n = !1) => {
1938
1940
  const u = r.value.findIndex((a) => a.key === t), d = u >= 0 ? r.value[u] : null;
1939
1941
  if (!d) {
1940
1942
  const a = { key: t, direction: "asc" };
@@ -1947,7 +1949,7 @@ const lo = {
1947
1949
  return;
1948
1950
  }
1949
1951
  r.value = n ? r.value.filter((a) => a.key !== t) : [], V();
1950
- }, qe = (t) => {
1952
+ }, Xe = (t) => {
1951
1953
  const n = r.value.findIndex((a) => a.key === t);
1952
1954
  if (n < 0)
1953
1955
  return "";
@@ -1957,7 +1959,7 @@ const lo = {
1957
1959
  const d = u.direction === "asc" ? "↑" : "↓";
1958
1960
  return r.value.length > 1 ? `${d}${n + 1}` : d;
1959
1961
  }, Dt = (t, n) => {
1960
- const u = ze(l.value), d = n.trim();
1962
+ const u = Te(l.value), d = n.trim();
1961
1963
  d ? u.columnFilters[t] = {
1962
1964
  kind: "predicate",
1963
1965
  operator: "contains",
@@ -1965,20 +1967,20 @@ const lo = {
1965
1967
  caseSensitive: !1
1966
1968
  } : delete u.columnFilters[t], l.value = u, V();
1967
1969
  }, Et = () => {
1968
- e.runtime.api.view.setRowHeightMode(M.value), e.runtime.api.view.setBaseRowHeight(x.value);
1970
+ e.runtime.api.view.setRowHeightMode(R.value), e.runtime.api.view.setBaseRowHeight(A.value);
1969
1971
  }, kt = () => {
1970
- F.value = Te(ie.value), D.value = !0;
1971
- }, se = () => {
1972
- F.value = Te(ie.value), D.value = !1;
1972
+ F.value = je(se.value), D.value = !0;
1973
+ }, ue = () => {
1974
+ F.value = je(se.value), D.value = !1;
1973
1975
  };
1974
- L(
1975
- ae,
1976
+ W(
1977
+ ie,
1976
1978
  (t) => {
1977
- t || se();
1979
+ t || ue();
1978
1980
  },
1979
1981
  { immediate: !0 }
1980
1982
  );
1981
- const Xe = () => {
1983
+ const Ye = () => {
1982
1984
  F.value = null;
1983
1985
  }, Ht = (t) => {
1984
1986
  F.value = {
@@ -1986,28 +1988,28 @@ const lo = {
1986
1988
  columns: F.value?.columns ?? []
1987
1989
  };
1988
1990
  }, Vt = (t, n) => {
1989
- const u = I.value.find((b) => b.key === t);
1991
+ const u = v.value.find((h) => h.key === t);
1990
1992
  if (!u)
1991
1993
  return;
1992
1994
  const d = F.value?.columns ?? [];
1993
1995
  if (!n) {
1994
- const b = d.filter((O) => O.key !== t);
1995
- F.value = b.length > 0 ? { basis: G.value, columns: b } : null;
1996
+ const h = d.filter((O) => O.key !== t);
1997
+ F.value = h.length > 0 ? { basis: P.value, columns: h } : null;
1996
1998
  return;
1997
1999
  }
1998
- const w = d.find((b) => b.key === t) ?? {
2000
+ const w = d.find((h) => h.key === t) ?? {
1999
2001
  key: t,
2000
2002
  op: u.allowedOps[0] ?? "count"
2001
2003
  };
2002
2004
  F.value = {
2003
- basis: G.value,
2005
+ basis: P.value,
2004
2006
  columns: [
2005
- ...d.filter((b) => b.key !== t),
2007
+ ...d.filter((h) => h.key !== t),
2006
2008
  w
2007
2009
  ]
2008
2010
  };
2009
2011
  }, zt = (t, n) => {
2010
- const u = I.value.find((a) => a.key === t);
2012
+ const u = v.value.find((a) => a.key === t);
2011
2013
  if (!u || !u.allowedOps.includes(n))
2012
2014
  return;
2013
2015
  const d = (F.value?.columns ?? []).map((a) => a.key !== t ? a : {
@@ -2015,42 +2017,42 @@ const lo = {
2015
2017
  op: n
2016
2018
  });
2017
2019
  F.value = {
2018
- basis: G.value,
2020
+ basis: P.value,
2019
2021
  columns: d
2020
2022
  };
2021
2023
  }, Tt = () => {
2022
2024
  const t = F.value && F.value.columns.length > 0 ? F.value : null;
2023
- e.runtime.api.rows.setAggregationModel(t), F.value = Te(t), D.value = !1;
2024
- }, Me = (t) => r.value.find((n) => n.key === t)?.direction ?? null, U = (t, n) => {
2025
- const u = R.value.find((d) => d.key === t);
2025
+ e.runtime.api.rows.setAggregationModel(t), F.value = je(t), D.value = !1;
2026
+ }, pe = (t) => r.value.find((n) => n.key === t)?.direction ?? null, q = (t, n) => {
2027
+ const u = S.value.find((d) => d.key === t);
2026
2028
  !u || u.column.capabilities?.sortable === !1 || (r.value = n === null ? r.value.filter((d) => d.key !== t) : [{ key: t, direction: n }], V());
2027
- }, q = (t, n) => {
2029
+ }, X = (t, n) => {
2028
2030
  e.runtime.api.columns.setPin(t, n);
2029
- }, Ye = (t, n) => {
2030
- const u = _e.value, d = n ? Array.from(/* @__PURE__ */ new Set([...u?.fields ?? [], t])) : (u?.fields ?? []).filter((a) => a !== t);
2031
+ }, Je = (t, n) => {
2032
+ const u = Ge.value, d = n ? Array.from(/* @__PURE__ */ new Set([...u?.fields ?? [], t])) : (u?.fields ?? []).filter((a) => a !== t);
2031
2033
  e.runtime.api.rows.setGroupBy(d.length > 0 ? {
2032
2034
  fields: d,
2033
2035
  expandedByDefault: u?.expandedByDefault ?? !0
2034
2036
  } : null);
2035
- }, Je = (t, n) => {
2037
+ }, Ze = (t, n) => {
2036
2038
  const u = Array.from(new Set(
2037
2039
  n.map((a) => Cn(String(a ?? ""))).filter((a) => a.length > 0)
2038
2040
  ));
2039
2041
  if (u.length === 0) {
2040
- pe(t);
2042
+ Ie(t);
2041
2043
  return;
2042
2044
  }
2043
- const d = ze(l.value);
2045
+ const d = Te(l.value);
2044
2046
  d.columnFilters[t] = {
2045
2047
  kind: "valueSet",
2046
2048
  tokens: u
2047
2049
  }, l.value = d, V();
2048
- }, pe = (t) => {
2049
- const n = ze(l.value);
2050
+ }, Ie = (t) => {
2051
+ const n = Te(l.value);
2050
2052
  delete n.columnFilters[t], l.value = n, V();
2051
- }, ee = P(null), j = P(null);
2052
- let Ze = 0;
2053
- const Ie = () => {
2053
+ }, te = L(null), B = L(null);
2054
+ let Qe = 0;
2055
+ const xe = () => {
2054
2056
  const t = e.selectionSnapshot.value, n = t?.ranges[t.activeRangeIndex] ?? null;
2055
2057
  return n ? {
2056
2058
  startRow: n.startRow,
@@ -2058,16 +2060,16 @@ const lo = {
2058
2060
  startColumn: n.startCol,
2059
2061
  endColumn: n.endCol
2060
2062
  } : null;
2061
- }, Qe = () => {
2063
+ }, et = () => {
2062
2064
  const t = e.selectionSnapshot.value?.activeCell;
2063
2065
  return t ? {
2064
2066
  rowIndex: t.rowIndex,
2065
2067
  columnIndex: t.colIndex
2066
2068
  } : null;
2067
- }, xe = (t) => t ? t.startRow !== t.endRow || t.startColumn !== t.endColumn : !1, ue = (t, n) => t.rowIndex >= Math.min(n.startRow, n.endRow) && t.rowIndex <= Math.max(n.startRow, n.endRow) && t.columnIndex >= Math.min(n.startColumn, n.endColumn) && t.columnIndex <= Math.max(n.startColumn, n.endColumn), jt = (t, n) => {
2068
- const u = e.runtime.resolveBodyRowIndexById(t), d = R.value.findIndex((a) => a.key === n);
2069
+ }, Ae = (t) => t ? t.startRow !== t.endRow || t.startColumn !== t.endColumn : !1, ce = (t, n) => t.rowIndex >= Math.min(n.startRow, n.endRow) && t.rowIndex <= Math.max(n.startRow, n.endRow) && t.columnIndex >= Math.min(n.startColumn, n.endColumn) && t.columnIndex <= Math.max(n.startColumn, n.endColumn), jt = (t, n) => {
2070
+ const u = e.runtime.resolveBodyRowIndexById(t), d = S.value.findIndex((a) => a.key === n);
2069
2071
  return u < 0 || d < 0 ? null : { rowIndex: u, columnIndex: d };
2070
- }, et = (t) => ({
2072
+ }, tt = (t) => ({
2071
2073
  ranges: [{
2072
2074
  startRow: t.rowIndex,
2073
2075
  endRow: t.rowIndex,
@@ -2092,7 +2094,7 @@ const lo = {
2092
2094
  colIndex: t.columnIndex,
2093
2095
  rowId: e.runtime.getBodyRowAtIndex(t.rowIndex)?.rowId ?? null
2094
2096
  }
2095
- }), tt = (t) => {
2097
+ }), nt = (t) => {
2096
2098
  const n = e.runtime.api.rows.getCount();
2097
2099
  for (let u = 0; u < n; u += 1) {
2098
2100
  const d = e.runtime.api.rows.get(u);
@@ -2113,55 +2115,55 @@ const lo = {
2113
2115
  return "";
2114
2116
  }
2115
2117
  }, Gt = async () => {
2116
- if (j.value?.rows.length)
2117
- return j.value.rows.map((n) => Y(n));
2118
+ if (B.value?.rows.length)
2119
+ return B.value.rows.map((n) => J(n));
2118
2120
  const t = (await _t()).trim();
2119
2121
  if (!t)
2120
2122
  return null;
2121
2123
  try {
2122
2124
  const n = JSON.parse(t);
2123
2125
  if (Array.isArray(n))
2124
- return n.filter((u) => !!u && typeof u == "object").map((u) => Y(u));
2126
+ return n.filter((u) => !!u && typeof u == "object").map((u) => J(u));
2125
2127
  if (n && typeof n == "object")
2126
- return [Y(n)];
2128
+ return [J(n)];
2127
2129
  } catch {
2128
2130
  return null;
2129
2131
  }
2130
2132
  return null;
2131
- }, Ae = async (t, n, u = []) => {
2132
- const d = t.map((w) => Y(w));
2133
- j.value = {
2133
+ }, Oe = async (t, n, u = []) => {
2134
+ const d = t.map((w) => J(w));
2135
+ B.value = {
2134
2136
  rows: d,
2135
2137
  operation: n,
2136
2138
  sourceRowIds: u.map((w) => String(w))
2137
2139
  };
2138
2140
  const a = ql(d);
2139
2141
  return a && await Bt(a), !0;
2140
- }, te = () => e.runtime.api.rows.hasInsertSupport(), ce = () => e.runtime.api.rows.hasDataMutationSupport(), de = (t) => !t || typeof t != "object" ? !1 : "data" in t || "row" in t || "kind" in t || "state" in t || "sourceIndex" in t || "originalIndex" in t || "displayIndex" in t, me = (t) => {
2142
+ }, ne = () => e.runtime.api.rows.hasInsertSupport(), de = () => e.runtime.api.rows.hasDataMutationSupport(), me = (t) => !t || typeof t != "object" ? !1 : "data" in t || "row" in t || "kind" in t || "state" in t || "sourceIndex" in t || "originalIndex" in t || "displayIndex" in t, we = (t) => {
2141
2143
  const n = t;
2142
2144
  return n.rowId != null ? String(n.rowId) : n.id != null ? String(n.id) : null;
2143
- }, ne = (t) => {
2145
+ }, le = (t) => {
2144
2146
  for (const n of e.rows) {
2145
2147
  if (!n || typeof n != "object")
2146
2148
  continue;
2147
2149
  const u = n;
2148
- if ((u.rowId != null ? String(u.rowId) : u.rowKey != null ? String(u.rowKey) : null) === t && de(u))
2150
+ if ((u.rowId != null ? String(u.rowId) : u.rowKey != null ? String(u.rowKey) : null) === t && me(u))
2149
2151
  return u;
2150
2152
  }
2151
2153
  for (const n of e.rows) {
2152
2154
  if (!n || typeof n != "object")
2153
2155
  continue;
2154
2156
  const u = n;
2155
- if (de(u))
2157
+ if (me(u))
2156
2158
  return u;
2157
2159
  }
2158
2160
  return null;
2159
- }, Oe = () => (Ze += 1, `datagrid-row-${Date.now()}-${Ze}`), Pt = (t) => {
2160
- const n = Y(t), u = Oe();
2161
+ }, Fe = () => (Qe += 1, `datagrid-row-${Date.now()}-${Qe}`), Pt = (t) => {
2162
+ const n = J(t), u = Fe();
2161
2163
  let d = !1;
2162
2164
  return "id" in n && (n.id = u, d = !0), "rowId" in n && (n.rowId = u, d = !0), d || (n.id = u), n;
2163
2165
  }, Lt = (t) => {
2164
- const n = Oe(), u = {};
2166
+ const n = Fe(), u = {};
2165
2167
  for (const [d, a] of Object.entries(t)) {
2166
2168
  if (d === "id" || d === "rowId") {
2167
2169
  u[d] = n;
@@ -2170,8 +2172,8 @@ const lo = {
2170
2172
  u[d] = typeof a == "number" ? null : "";
2171
2173
  }
2172
2174
  return !("id" in u) && !("rowId" in u) && (u.id = n), u;
2173
- }, nt = (t, n, u) => {
2174
- const d = Oe(), a = u === "clone" ? Y(t) : Object.entries(t).reduce((b, [O, p]) => (b[O] = typeof p == "number" ? null : "", b), {});
2175
+ }, lt = (t, n, u) => {
2176
+ const d = Fe(), a = u === "clone" ? J(t) : Object.entries(t).reduce((h, [O, p]) => (h[O] = typeof p == "number" ? null : "", h), {});
2175
2177
  ("id" in a || !("rowId" in a) && !("id" in a)) && (a.id = d), "rowId" in a && (a.rowId = d), "rowKey" in a && (a.rowKey = d);
2176
2178
  const w = typeof n.state == "object" && n.state != null ? n.state : null;
2177
2179
  return {
@@ -2186,27 +2188,27 @@ const lo = {
2186
2188
  expanded: !1
2187
2189
  },
2188
2190
  data: a,
2189
- row: Y(a)
2191
+ row: J(a)
2190
2192
  };
2191
- }, lt = (t, n = null) => n && de(n) ? nt(t, n, "clone") : Pt(t), Fe = (t, n = null) => n && de(n) ? nt(t, n, "blank") : Lt(t), De = (t) => {
2192
- const u = (e.rowSelectionSnapshot.value?.selectedRows ?? []).map((w) => String(w)).filter((w) => w.length > 0 && tt(w)?.kind !== "group");
2193
+ }, ot = (t, n = null) => n && me(n) ? lt(t, n, "clone") : Pt(t), De = (t, n = null) => n && me(n) ? lt(t, n, "blank") : Lt(t), Ee = (t) => {
2194
+ const u = (e.rowSelectionSnapshot.value?.selectedRows ?? []).map((w) => String(w)).filter((w) => w.length > 0 && nt(w)?.kind !== "group");
2193
2195
  if (u.length > 0)
2194
2196
  return u;
2195
- const d = Ie(), a = R.value.length - 1;
2197
+ const d = xe(), a = S.value.length - 1;
2196
2198
  if (d && a >= 0) {
2197
- const w = Math.min(d.startColumn, d.endColumn), b = Math.max(d.startColumn, d.endColumn), O = Math.min(d.startRow, d.endRow), p = Math.max(d.startRow, d.endRow), _ = t.length > 0 ? e.runtime.resolveBodyRowIndexById(t) : -1;
2198
- if (w === 0 && b === a && (_ < 0 || _ >= O && _ <= p)) {
2199
- const K = [];
2199
+ const w = Math.min(d.startColumn, d.endColumn), h = Math.max(d.startColumn, d.endColumn), O = Math.min(d.startRow, d.endRow), p = Math.max(d.startRow, d.endRow), G = t.length > 0 ? e.runtime.resolveBodyRowIndexById(t) : -1;
2200
+ if (w === 0 && h === a && (G < 0 || G >= O && G <= p)) {
2201
+ const $ = [];
2200
2202
  for (let T = O; T <= p; T += 1) {
2201
2203
  const E = e.runtime.getBodyRowAtIndex(T);
2202
- !E || E.kind === "group" || E.rowId == null || K.push(String(E.rowId));
2204
+ !E || E.kind === "group" || E.rowId == null || $.push(String(E.rowId));
2203
2205
  }
2204
- if (K.length > 0)
2205
- return K;
2206
+ if ($.length > 0)
2207
+ return $;
2206
2208
  }
2207
2209
  }
2208
2210
  return t.length > 0 ? [t] : [];
2209
- }, ot = () => {
2211
+ }, rt = () => {
2210
2212
  const t = [], n = e.runtime.api.rows.getCount();
2211
2213
  for (let u = 0; u < n; u += 1) {
2212
2214
  const d = e.runtime.api.rows.get(u);
@@ -2214,56 +2216,56 @@ const lo = {
2214
2216
  }
2215
2217
  return t;
2216
2218
  }, Wt = (t) => {
2217
- if (!ce() || t.length === 0)
2219
+ if (!de() || t.length === 0)
2218
2220
  return !1;
2219
- const n = new Set(t), u = ot().filter((d) => {
2220
- const a = me(d);
2221
+ const n = new Set(t), u = rt().filter((d) => {
2222
+ const a = we(d);
2221
2223
  return a == null || !n.has(a);
2222
2224
  });
2223
2225
  return u.length === e.runtime.api.rows.getCount() ? !1 : (e.runtime.api.rows.replaceData(u), e.runtime.api.rowSelection.hasSupport() && (e.runtime.api.rowSelection.clearSelectedRows(), e.syncRowSelectionSnapshotFromRuntime?.()), !0);
2224
2226
  }, Nt = (t, n) => {
2225
- if (!ce() || t.length === 0 || !n)
2227
+ if (!de() || t.length === 0 || !n)
2226
2228
  return !1;
2227
- const u = ot(), d = new Set(t.map((O) => String(O)));
2229
+ const u = rt(), d = new Set(t.map((O) => String(O)));
2228
2230
  if (d.has(String(n)))
2229
2231
  return !1;
2230
2232
  const a = u.filter((O) => {
2231
- const p = me(O);
2233
+ const p = we(O);
2232
2234
  return p != null && d.has(p);
2233
2235
  });
2234
2236
  if (a.length === 0)
2235
2237
  return !1;
2236
2238
  const w = u.filter((O) => {
2237
- const p = me(O);
2239
+ const p = we(O);
2238
2240
  return p == null || !d.has(p);
2239
- }), b = w.findIndex((O) => me(O) === n);
2240
- return b < 0 ? !1 : (e.runtime.api.rows.replaceData([
2241
- ...w.slice(0, b + 1),
2241
+ }), h = w.findIndex((O) => we(O) === n);
2242
+ return h < 0 ? !1 : (e.runtime.api.rows.replaceData([
2243
+ ...w.slice(0, h + 1),
2242
2244
  ...a,
2243
- ...w.slice(b + 1)
2245
+ ...w.slice(h + 1)
2244
2246
  ]), e.runtime.api.rowSelection.hasSupport() && (e.runtime.api.rowSelection.selectRows(t), e.syncRowSelectionSnapshotFromRuntime?.()), !0);
2245
- }, Kt = () => j.value ? (j.value = null, !0) : !1, $t = (t) => {
2247
+ }, Kt = () => B.value ? (B.value = null, !0) : !1, $t = (t) => {
2246
2248
  if (t.kind === "group")
2247
2249
  return !1;
2248
- const n = j.value;
2250
+ const n = B.value;
2249
2251
  return n ? n.sourceRowIds.includes(String(t.rowId)) : !1;
2250
2252
  };
2251
- let rt = () => !1, le = () => {
2252
- }, Ee = () => {
2253
- }, ke = async (t, n) => !1;
2253
+ let at = () => !1, oe = () => {
2254
+ }, ke = () => {
2255
+ }, He = async (t, n) => !1;
2254
2256
  const Ut = (t, n) => {
2255
2257
  if (n)
2256
2258
  return n;
2257
2259
  const u = In[t], d = ro[t];
2258
2260
  return d ? `${u} (${d})` : u;
2259
2261
  }, {
2260
- tableStageProps: He,
2261
- tableStageContext: at,
2262
+ tableStageProps: Ve,
2263
+ tableStageContext: it,
2262
2264
  copySelectedCells: qt,
2263
2265
  pasteSelectedCells: Xt,
2264
2266
  cutSelectedCells: Yt,
2265
2267
  clearSelectedCells: Jt,
2266
- captureHistorySnapshot: we,
2268
+ captureHistorySnapshot: fe,
2267
2269
  recordHistoryIntentTransaction: Zt
2268
2270
  } = _l({
2269
2271
  mode: y,
@@ -2272,15 +2274,15 @@ const lo = {
2272
2274
  maxRows: m(() => e.maxRows),
2273
2275
  enableFillHandle: m(() => e.fillHandle),
2274
2276
  enableRangeMove: m(() => e.rangeMove),
2275
- rows: A,
2276
- sourceRows: A,
2277
+ rows: x,
2278
+ sourceRows: x,
2277
2279
  runtime: e.runtime,
2278
2280
  rowVersion: o,
2279
- totalRuntimeRows: h,
2280
- visibleColumns: R,
2281
+ totalRuntimeRows: b,
2282
+ visibleColumns: S,
2281
2283
  rowRenderMode: m(() => e.renderMode),
2282
- rowHeightMode: M,
2283
- normalizedBaseRowHeight: x,
2284
+ rowHeightMode: R,
2285
+ normalizedBaseRowHeight: A,
2284
2286
  selectionSnapshot: e.selectionSnapshot,
2285
2287
  selectionAnchor: e.selectionAnchor,
2286
2288
  rowSelectionSnapshot: e.rowSelectionSnapshot,
@@ -2292,88 +2294,88 @@ const lo = {
2292
2294
  syncSelectionSnapshotFromRuntime: e.syncSelectionSnapshotFromRuntime,
2293
2295
  syncRowSelectionSnapshotFromRuntime: e.syncRowSelectionSnapshotFromRuntime,
2294
2296
  clearExternalPendingClipboardOperation: Kt,
2295
- firstColumnKey: W,
2297
+ firstColumnKey: j,
2296
2298
  columnFilterTextByKey: s,
2297
2299
  virtualization: m(() => e.virtualization),
2298
- toggleSortForColumn: Ue,
2299
- sortIndicator: qe,
2300
+ toggleSortForColumn: qe,
2301
+ sortIndicator: Xe,
2300
2302
  setColumnFilterText: Dt,
2301
2303
  columnMenuEnabled: m(() => e.columnMenu.enabled),
2302
2304
  columnMenuMaxFilterValues: m(() => e.columnMenu.maxFilterValues),
2303
- resolveColumnMenuItems: ye,
2304
- resolveColumnMenuDisabledItems: Le,
2305
- resolveColumnMenuDisabledReasons: We,
2306
- resolveColumnMenuLabels: Ne,
2307
- resolveColumnMenuActionOptions: Z,
2308
- isColumnFilterActive: Ge,
2309
- isColumnGrouped: Ke,
2310
- resolveColumnGroupOrder: Re,
2311
- resolveColumnMenuSortDirection: Me,
2312
- resolveColumnMenuSelectedTokens: Pe,
2313
- applyColumnMenuSort: U,
2314
- applyColumnMenuPin: q,
2315
- applyColumnMenuGroupBy: Ye,
2316
- applyColumnMenuFilter: Je,
2317
- clearColumnMenuFilter: pe,
2305
+ resolveColumnMenuItems: Re,
2306
+ resolveColumnMenuDisabledItems: We,
2307
+ resolveColumnMenuDisabledReasons: Ne,
2308
+ resolveColumnMenuLabels: Ke,
2309
+ resolveColumnMenuActionOptions: Q,
2310
+ isColumnFilterActive: Pe,
2311
+ isColumnGrouped: $e,
2312
+ resolveColumnGroupOrder: Se,
2313
+ resolveColumnMenuSortDirection: pe,
2314
+ resolveColumnMenuSelectedTokens: Le,
2315
+ applyColumnMenuSort: q,
2316
+ applyColumnMenuPin: X,
2317
+ applyColumnMenuGroupBy: Je,
2318
+ applyColumnMenuFilter: Ze,
2319
+ clearColumnMenuFilter: Ie,
2318
2320
  applyRowHeightSettings: Et,
2319
- cloneRowData: Y,
2321
+ cloneRowData: J,
2320
2322
  isCellEditable: e.isCellEditable,
2321
- isContextMenuVisible: () => rt(),
2322
- closeContextMenu: () => le(),
2323
+ isContextMenuVisible: () => at(),
2324
+ closeContextMenu: () => oe(),
2323
2325
  openContextMenuFromCurrentCell: () => {
2324
- Ee();
2326
+ ke();
2325
2327
  },
2326
- runRowIndexKeyboardAction: (t, n) => ke(t, n)
2328
+ runRowIndexKeyboardAction: (t, n) => He(t, n)
2327
2329
  }), {
2328
2330
  contextMenu: z,
2329
- contextMenuRef: it,
2331
+ contextMenuRef: st,
2330
2332
  contextMenuStyle: Qt,
2331
- closeContextMenu: X,
2332
- openContextMenu: Ve,
2333
+ closeContextMenu: Y,
2334
+ openContextMenu: ze,
2333
2335
  onContextMenuKeyDown: en
2334
2336
  } = Nn();
2335
- rt = () => z.value.visible, le = X;
2337
+ at = () => z.value.visible, oe = Y;
2336
2338
  const tn = il({
2337
2339
  isInteractionBlocked: () => !1,
2338
2340
  isRangeMoveModifierActive: () => !1,
2339
- resolveSelectionRange: Ie,
2341
+ resolveSelectionRange: xe,
2340
2342
  resolveCellCoordFromDataset: jt,
2341
2343
  applyCellSelection: (t) => {
2342
- e.runtime.api.selection.setSnapshot(et(t)), e.syncSelectionSnapshotFromRuntime();
2344
+ e.runtime.api.selection.setSnapshot(tt(t)), e.syncSelectionSnapshotFromRuntime();
2343
2345
  },
2344
- resolveActiveCellCoord: Qe,
2346
+ resolveActiveCellCoord: et,
2345
2347
  setActiveCellCoord: (t) => {
2346
- e.runtime.api.selection.setSnapshot(et(t)), e.syncSelectionSnapshotFromRuntime();
2348
+ e.runtime.api.selection.setSnapshot(tt(t)), e.syncSelectionSnapshotFromRuntime();
2347
2349
  },
2348
2350
  cellCoordsEqual: (t, n) => t?.rowIndex === n?.rowIndex && t?.columnIndex === n?.columnIndex,
2349
- isMultiCellSelection: xe,
2350
- isCoordInsideRange: ue,
2351
- openContextMenu: Ve,
2352
- closeContextMenu: X,
2353
- isColumnContextEnabled: (t) => e.cellMenu.enabled ? mt(e.cellMenu, t).length > 0 : !1,
2351
+ isMultiCellSelection: Ae,
2352
+ isCoordInsideRange: ce,
2353
+ openContextMenu: ze,
2354
+ closeContextMenu: Y,
2355
+ isColumnContextEnabled: (t) => e.cellMenu.enabled ? wt(e.cellMenu, t).length > 0 : !1,
2354
2356
  isRowIndexContextEnabled: () => e.rowIndexMenu.enabled && e.showRowIndex
2355
2357
  }), nn = sl({
2356
- resolveCurrentCellCoord: Qe,
2357
- resolveViewportElement: () => ee.value,
2358
+ resolveCurrentCellCoord: et,
2359
+ resolveViewportElement: () => te.value,
2358
2360
  resolveRowAtIndex: (t) => e.runtime.getBodyRowAtIndex(t) ?? void 0,
2359
- resolveColumnAtIndex: (t) => R.value[t] ?? void 0,
2360
- resolveSelectionRange: Ie,
2361
- isMultiCellSelection: (t) => xe(t),
2362
- isCoordInsideRange: ue,
2363
- openContextMenu: Ve,
2364
- isColumnContextEnabled: (t) => e.cellMenu.enabled && mt(e.cellMenu, t.key).length > 0
2361
+ resolveColumnAtIndex: (t) => S.value[t] ?? void 0,
2362
+ resolveSelectionRange: xe,
2363
+ isMultiCellSelection: (t) => Ae(t),
2364
+ isCoordInsideRange: ce,
2365
+ openContextMenu: ze,
2366
+ isColumnContextEnabled: (t) => e.cellMenu.enabled && wt(e.cellMenu, t.key).length > 0
2365
2367
  });
2366
- Ee = () => {
2368
+ ke = () => {
2367
2369
  nn.openContextMenuFromCurrentCell();
2368
2370
  };
2369
2371
  const ln = (t) => {
2370
- if (!e.rowIndexMenu.enabled || !e.showRowIndex || !ee.value)
2372
+ if (!e.rowIndexMenu.enabled || !e.showRowIndex || !te.value)
2371
2373
  return !1;
2372
- const n = String(t), u = `.datagrid-stage__row-index-cell[data-row-id="${Kl(n)}"]`, d = ee.value.querySelector(u);
2374
+ const n = String(t), u = `.datagrid-stage__row-index-cell[data-row-id="${Kl(n)}"]`, d = te.value.querySelector(u);
2373
2375
  if (!d)
2374
2376
  return !1;
2375
2377
  const a = d.getBoundingClientRect();
2376
- return Ve(
2378
+ return ze(
2377
2379
  a.left + Math.max(10, Math.min(a.width / 2, Math.max(10, a.width - 10))),
2378
2380
  a.bottom - 4,
2379
2381
  {
@@ -2381,64 +2383,64 @@ const lo = {
2381
2383
  rowId: n
2382
2384
  }
2383
2385
  ), !0;
2384
- }, fe = (t, n) => {
2386
+ }, ge = (t, n) => {
2385
2387
  Zt({
2386
2388
  intent: "edit",
2387
2389
  label: n
2388
2390
  }, t);
2389
2391
  };
2390
- ke = async (t, n) => {
2392
+ He = async (t, n) => {
2391
2393
  const u = String(n);
2392
2394
  if (t === "open-row-menu")
2393
2395
  return ln(u);
2394
- const d = tt(u);
2396
+ const d = nt(u);
2395
2397
  if (!d || d.kind === "group")
2396
2398
  return !1;
2397
2399
  if (t === "insert-row-above") {
2398
- if (!te())
2400
+ if (!ne())
2399
2401
  return !1;
2400
- const a = we(), w = e.runtime.api.rows.insertDataBefore(
2402
+ const a = fe(), w = e.runtime.api.rows.insertDataBefore(
2401
2403
  n,
2402
- [Fe(d.data, ne(u))]
2404
+ [De(d.data, le(u))]
2403
2405
  );
2404
- return w && fe(a, "Insert row above"), w;
2406
+ return w && ge(a, "Insert row above"), w;
2405
2407
  }
2406
2408
  if (t === "insert-row-below") {
2407
- if (!te())
2409
+ if (!ne())
2408
2410
  return !1;
2409
- const a = we(), w = e.runtime.api.rows.insertDataAfter(
2411
+ const a = fe(), w = e.runtime.api.rows.insertDataAfter(
2410
2412
  n,
2411
- [Fe(d.data, ne(u))]
2413
+ [De(d.data, le(u))]
2412
2414
  );
2413
- return w && fe(a, "Insert row below"), w;
2415
+ return w && ge(a, "Insert row below"), w;
2414
2416
  }
2415
2417
  if (t === "copy-row")
2416
- return Ae([d.data], "copy", [u]);
2418
+ return Oe([d.data], "copy", [u]);
2417
2419
  if (t === "cut-row")
2418
- return Ae([d.data], "cut", [u]);
2420
+ return Oe([d.data], "cut", [u]);
2419
2421
  if (t === "paste-row") {
2420
- if (!te())
2422
+ if (!ne())
2421
2423
  return !1;
2422
2424
  const a = await Gt();
2423
2425
  if (!a || a.length === 0)
2424
2426
  return !1;
2425
- const w = we(), b = j.value?.operation === "cut" ? j.value.sourceRowIds : [], O = ne(
2426
- b[0] ?? u
2427
- ) ?? ne(u), p = b.length > 0 ? Nt(b, u) : e.runtime.api.rows.insertDataAfter(
2427
+ const w = fe(), h = B.value?.operation === "cut" ? B.value.sourceRowIds : [], O = le(
2428
+ h[0] ?? u
2429
+ ) ?? le(u), p = h.length > 0 ? Nt(h, u) : e.runtime.api.rows.insertDataAfter(
2428
2430
  n,
2429
- a.map((_) => lt(_, O))
2431
+ a.map((G) => ot(G, O))
2430
2432
  );
2431
- return p && j.value?.operation === "cut" && (j.value = null), p && fe(
2433
+ return p && B.value?.operation === "cut" && (B.value = null), p && ge(
2432
2434
  w,
2433
- b.length > 0 ? b.length > 1 ? `Move ${b.length} rows` : "Move row" : a.length > 1 ? `Paste ${a.length} rows` : "Paste row"
2435
+ h.length > 0 ? h.length > 1 ? `Move ${h.length} rows` : "Move row" : a.length > 1 ? `Paste ${a.length} rows` : "Paste row"
2434
2436
  ), p;
2435
2437
  }
2436
2438
  if (t === "delete-selected-rows") {
2437
- const a = De(u);
2439
+ const a = Ee(u);
2438
2440
  if (a.length === 0)
2439
2441
  return !1;
2440
- const w = we(), b = Wt(a);
2441
- return b && fe(w, a.length > 1 ? `Delete ${a.length} rows` : "Delete row"), b;
2442
+ const w = fe(), h = Wt(a);
2443
+ return h && ge(w, a.length > 1 ? `Delete ${a.length} rows` : "Delete row"), h;
2442
2444
  }
2443
2445
  return !1;
2444
2446
  };
@@ -2449,13 +2451,13 @@ const lo = {
2449
2451
  rowId: z.value.rowId
2450
2452
  }),
2451
2453
  runHeaderContextAction: () => !1,
2452
- runRowIndexContextAction: ke,
2454
+ runRowIndexContextAction: He,
2453
2455
  copySelection: qt,
2454
2456
  pasteSelection: Xt,
2455
2457
  cutSelection: Yt,
2456
2458
  clearCurrentSelection: Jt,
2457
- closeContextMenu: X
2458
- }), st = m(() => {
2459
+ closeContextMenu: Y
2460
+ }), ut = m(() => {
2459
2461
  if (!z.value.visible)
2460
2462
  return [];
2461
2463
  const t = z.value.zone;
@@ -2463,20 +2465,20 @@ const lo = {
2463
2465
  const n = z.value.columnKey ?? "";
2464
2466
  if (!e.cellMenu.enabled || !n)
2465
2467
  return [];
2466
- const u = mt(e.cellMenu, n), d = new Set(hl(e.cellMenu, n)), a = yl(e.cellMenu, n), w = Rl(e.cellMenu, n);
2467
- return u.flatMap((b, O) => {
2468
- const p = lo[b] ?? [];
2469
- return p.flatMap((_) => {
2470
- const T = w[_];
2468
+ const u = wt(e.cellMenu, n), d = new Set(bl(e.cellMenu, n)), a = yl(e.cellMenu, n), w = Rl(e.cellMenu, n);
2469
+ return u.flatMap((h, O) => {
2470
+ const p = lo[h] ?? [];
2471
+ return p.flatMap((G) => {
2472
+ const T = w[G];
2471
2473
  if (T?.hidden)
2472
2474
  return [];
2473
- const E = d.has(b) || T?.disabled === !0;
2475
+ const E = d.has(h) || T?.disabled === !0;
2474
2476
  return [{
2475
- id: _,
2476
- label: T?.label ?? In[_],
2477
+ id: G,
2478
+ label: T?.label ?? In[G],
2477
2479
  disabled: E,
2478
- title: T?.disabledReason ?? a[b],
2479
- separatorBefore: O > 0 && _ === p[0]
2480
+ title: T?.disabledReason ?? a[h],
2481
+ separatorBefore: O > 0 && G === p[0]
2480
2482
  }];
2481
2483
  });
2482
2484
  });
@@ -2485,19 +2487,19 @@ const lo = {
2485
2487
  if (!e.rowIndexMenu.enabled)
2486
2488
  return [];
2487
2489
  const n = Sl(e.rowIndexMenu), u = new Set(Ml(e.rowIndexMenu)), d = pl(e.rowIndexMenu), a = Il(e.rowIndexMenu);
2488
- return n.flatMap((w, b) => {
2490
+ return n.flatMap((w, h) => {
2489
2491
  const O = oo[w] ?? [];
2490
2492
  return O.flatMap((p) => {
2491
- const K = a[p === "insert-row-above" ? "insertAbove" : p === "insert-row-below" ? "insertBelow" : p === "copy-row" ? "copy" : p === "paste-row" ? "paste" : p === "delete-selected-rows" ? "deleteSelected" : "cut"];
2492
- if (K?.hidden)
2493
+ const $ = a[p === "insert-row-above" ? "insertAbove" : p === "insert-row-below" ? "insertBelow" : p === "copy-row" ? "copy" : p === "paste-row" ? "paste" : p === "delete-selected-rows" ? "deleteSelected" : "cut"];
2494
+ if ($?.hidden)
2493
2495
  return [];
2494
- let T = u.has(w) || K?.disabled === !0, E = K?.disabledReason ?? d[w];
2495
- return (p === "insert-row-above" || p === "insert-row-below" || p === "paste-row") && !te() && (T = !0, E = E ?? "Row insertion is not supported by the current row model"), (p === "cut-row" || p === "delete-selected-rows") && !ce() && (T = !0, E = E ?? "Row deletion is not supported by the current row model"), p === "delete-selected-rows" && De(z.value.rowId ?? "").length === 0 && (T = !0, E = E ?? "No deletable rows are selected"), [{
2496
+ let T = u.has(w) || $?.disabled === !0, E = $?.disabledReason ?? d[w];
2497
+ return (p === "insert-row-above" || p === "insert-row-below" || p === "paste-row") && !ne() && (T = !0, E = E ?? "Row insertion is not supported by the current row model"), (p === "cut-row" || p === "delete-selected-rows") && !de() && (T = !0, E = E ?? "Row deletion is not supported by the current row model"), p === "delete-selected-rows" && Ee(z.value.rowId ?? "").length === 0 && (T = !0, E = E ?? "No deletable rows are selected"), [{
2496
2498
  id: p,
2497
- label: Ut(p, K?.label),
2499
+ label: Ut(p, $?.label),
2498
2500
  disabled: T,
2499
2501
  title: E,
2500
- separatorBefore: b > 0 && p === O[0]
2502
+ separatorBefore: h > 0 && p === O[0]
2501
2503
  }];
2502
2504
  });
2503
2505
  });
@@ -2505,61 +2507,61 @@ const lo = {
2505
2507
  return [];
2506
2508
  }), rn = (t) => {
2507
2509
  tn.dispatchViewportContextMenu(t);
2508
- }, ge = () => {
2509
- ee.value?.querySelector(".grid-body-viewport")?.focus({ preventScroll: !0 });
2510
+ }, Ce = () => {
2511
+ te.value?.querySelector(".grid-body-viewport")?.focus({ preventScroll: !0 });
2510
2512
  }, an = () => {
2511
2513
  Dn(() => {
2512
2514
  if (typeof window < "u") {
2513
2515
  window.requestAnimationFrame(() => {
2514
- ge();
2516
+ Ce();
2515
2517
  });
2516
2518
  return;
2517
2519
  }
2518
- ge();
2520
+ Ce();
2519
2521
  });
2520
- }, ut = async (t) => {
2521
- await on.runContextMenuAction(t) && (ge(), X(), an());
2522
+ }, ct = async (t) => {
2523
+ await on.runContextMenuAction(t) && (Ce(), Y(), an());
2522
2524
  };
2523
- L(
2525
+ W(
2524
2526
  () => z.value.visible,
2525
2527
  (t, n, u) => {
2526
2528
  if (!t || typeof window > "u")
2527
2529
  return;
2528
2530
  const d = (w) => {
2529
- const b = w.target;
2530
- b && it.value?.contains(b) || X();
2531
+ const h = w.target;
2532
+ h && st.value?.contains(h) || Y();
2531
2533
  }, a = () => {
2532
- X();
2534
+ Y();
2533
2535
  };
2534
2536
  window.addEventListener("mousedown", d, !0), window.addEventListener("blur", a), u(() => {
2535
2537
  window.removeEventListener("mousedown", d, !0), window.removeEventListener("blur", a);
2536
2538
  });
2537
2539
  }
2538
2540
  );
2539
- const ct = m(() => ({
2540
- ...He.value,
2541
+ const dt = m(() => ({
2542
+ ...Ve.value,
2541
2543
  columns: {
2542
- ...He.value.columns,
2544
+ ...Ve.value.columns,
2543
2545
  columnMenuEnabled: e.columnMenu.enabled,
2544
2546
  columnMenuMaxFilterValues: e.columnMenu.maxFilterValues,
2545
- resolveColumnMenuItems: ye,
2546
- resolveColumnMenuDisabledItems: Le,
2547
- resolveColumnMenuDisabledReasons: We,
2548
- resolveColumnMenuLabels: Ne,
2549
- resolveColumnMenuActionOptions: Z,
2550
- isColumnFilterActive: Ge,
2551
- isColumnGrouped: Ke,
2552
- resolveColumnGroupOrder: Re,
2553
- resolveColumnMenuSortDirection: Me,
2554
- resolveColumnMenuSelectedTokens: Pe,
2555
- applyColumnMenuSort: U,
2556
- applyColumnMenuPin: q,
2557
- applyColumnMenuGroupBy: Ye,
2558
- applyColumnMenuFilter: Je,
2559
- clearColumnMenuFilter: pe
2547
+ resolveColumnMenuItems: Re,
2548
+ resolveColumnMenuDisabledItems: We,
2549
+ resolveColumnMenuDisabledReasons: Ne,
2550
+ resolveColumnMenuLabels: Ke,
2551
+ resolveColumnMenuActionOptions: Q,
2552
+ isColumnFilterActive: Pe,
2553
+ isColumnGrouped: $e,
2554
+ resolveColumnGroupOrder: Se,
2555
+ resolveColumnMenuSortDirection: pe,
2556
+ resolveColumnMenuSelectedTokens: Le,
2557
+ applyColumnMenuSort: q,
2558
+ applyColumnMenuPin: X,
2559
+ applyColumnMenuGroupBy: Je,
2560
+ applyColumnMenuFilter: Ze,
2561
+ clearColumnMenuFilter: Ie
2560
2562
  },
2561
2563
  rows: {
2562
- ...He.value.rows,
2564
+ ...Ve.value.rows,
2563
2565
  sourceRows: e.rows,
2564
2566
  rowHover: e.rowHover,
2565
2567
  stripedRows: e.stripedRows
@@ -2570,16 +2572,16 @@ const lo = {
2570
2572
  key: "column-layout",
2571
2573
  component: Gl,
2572
2574
  props: {
2573
- isOpen: Ct.value,
2574
- items: je.value,
2575
+ isOpen: ae.value,
2576
+ items: Be.value,
2575
2577
  buttonLabel: e.columnLayout.buttonLabel,
2576
2578
  active: !1,
2577
2579
  onOpen: vt,
2578
2580
  onToggleVisibility: H,
2579
- onMoveUp: bt,
2580
- onMoveDown: ht,
2581
- onApply: Be,
2582
- onCancel: N
2581
+ onMoveUp: ht,
2582
+ onMoveDown: bt,
2583
+ onApply: _e,
2584
+ onCancel: K
2583
2585
  }
2584
2586
  }), e.advancedFilter.enabled && t.push({
2585
2587
  key: "advanced-filter",
@@ -2587,11 +2589,11 @@ const lo = {
2587
2589
  props: {
2588
2590
  isOpen: yt.value,
2589
2591
  clauses: Rt.value,
2590
- columns: C.value,
2591
- appliedFilterSummaryItems: Q.value,
2592
- hasAnyFilters: Se.value,
2592
+ columns: g.value,
2593
+ appliedFilterSummaryItems: ee.value,
2594
+ hasAnyFilters: Me.value,
2593
2595
  buttonLabel: e.advancedFilter.buttonLabel,
2594
- active: Se.value,
2596
+ active: Me.value,
2595
2597
  onOpen: St,
2596
2598
  onAdd: Mt,
2597
2599
  onRemove: pt,
@@ -2605,19 +2607,19 @@ const lo = {
2605
2607
  component: Ll,
2606
2608
  props: {
2607
2609
  isOpen: D.value,
2608
- basis: G.value,
2609
- items: he.value,
2610
+ basis: P.value,
2611
+ items: ye.value,
2610
2612
  buttonLabel: e.aggregations.buttonLabel,
2611
- active: ae.value && (D.value || !!ie.value?.columns.length),
2612
- disabled: !ae.value,
2613
- disabledReason: ae.value ? "" : "Aggregations require an active group-by model.",
2613
+ active: ie.value && (D.value || !!se.value?.columns.length),
2614
+ disabled: !ie.value,
2615
+ disabledReason: ie.value ? "" : "Aggregations require an active group-by model.",
2614
2616
  onOpen: kt,
2615
2617
  onUpdateBasis: Ht,
2616
2618
  onToggleColumn: Vt,
2617
2619
  onUpdateOp: zt,
2618
- onClear: Xe,
2620
+ onClear: Ye,
2619
2621
  onApply: Tt,
2620
- onCancel: se
2622
+ onCancel: ue
2621
2623
  }
2622
2624
  }), [...t, ...e.toolbarModules];
2623
2625
  });
@@ -2641,21 +2643,21 @@ const lo = {
2641
2643
  "datagrid-app-stage",
2642
2644
  e.layoutMode === "auto-height" ? "datagrid-app-stage--auto-height" : "datagrid-app-stage--fill"
2643
2645
  ],
2644
- ref: ee
2646
+ ref: te
2645
2647
  }, [
2646
2648
  e.viewMode === "gantt" ? k(Wl, {
2647
- stageContext: at,
2649
+ stageContext: it,
2648
2650
  runtime: e.runtime,
2649
2651
  gantt: e.gantt,
2650
- baseRowHeight: x.value,
2652
+ baseRowHeight: A.value,
2651
2653
  rowVersion: o.value
2652
2654
  }) : k(dl, {
2653
- ...ct.value,
2654
- stageContext: at,
2655
+ ...dt.value,
2656
+ stageContext: it,
2655
2657
  onViewportContextMenu: rn
2656
2658
  }),
2657
- z.value.visible && st.value.length > 0 ? k("div", {
2658
- ref: it,
2659
+ z.value.visible && ut.value.length > 0 ? k("div", {
2660
+ ref: st,
2659
2661
  class: "datagrid-context-menu",
2660
2662
  style: Qt.value,
2661
2663
  role: "menu",
@@ -2663,11 +2665,11 @@ const lo = {
2663
2665
  onKeydown: (t) => {
2664
2666
  en(t, {
2665
2667
  onEscape: () => {
2666
- ge();
2668
+ Ce();
2667
2669
  }
2668
2670
  });
2669
2671
  }
2670
- }, st.value.flatMap((t) => {
2672
+ }, ut.value.flatMap((t) => {
2671
2673
  const n = [];
2672
2674
  return t.separatorBefore && n.push(k("div", {
2673
2675
  class: "datagrid-context-menu__separator",
@@ -2679,7 +2681,7 @@ const lo = {
2679
2681
  disabled: t.disabled,
2680
2682
  title: t.title,
2681
2683
  onClick: () => {
2682
- ut(t.id);
2684
+ ct(t.id);
2683
2685
  }
2684
2686
  }, t.label)), n;
2685
2687
  })) : null
@@ -2742,37 +2744,37 @@ function po(e) {
2742
2744
  return uo(e);
2743
2745
  }
2744
2746
  function Io(e) {
2745
- const o = ao(e.clientRowModelOptions), r = e.enterpriseClientRowModelOptions, l = co(e.columns), s = e.formulas !== void 0, i = e.computedFields !== void 0, f = e.formulaFunctions !== void 0, v = l.length > 0, y = s || v ? mo(l, e.formulas) : void 0, A = i ? so(e.computedFields) : void 0, h = f ? e.formulaFunctions ?? {} : void 0, R = !!(v || s || i || f);
2746
- if (!o && !R)
2747
+ const o = ao(e.clientRowModelOptions), r = e.enterpriseClientRowModelOptions, l = co(e.columns), s = e.formulas !== void 0, i = e.computedFields !== void 0, f = e.formulaFunctions !== void 0, C = l.length > 0, y = s || C ? mo(l, e.formulas) : void 0, x = i ? so(e.computedFields) : void 0, b = f ? e.formulaFunctions ?? {} : void 0, S = !!(C || s || i || f);
2748
+ if (!o && !S)
2747
2749
  return r ? {
2748
2750
  ...r
2749
2751
  } : void 0;
2750
- if (!R) {
2752
+ if (!S) {
2751
2753
  if (o && !r)
2752
2754
  return o;
2753
2755
  if (!o && r)
2754
2756
  return r;
2755
2757
  if (o && r) {
2756
- let S = xn.get(o);
2757
- S || (S = /* @__PURE__ */ new WeakMap(), xn.set(o, S));
2758
- const C = S.get(r);
2759
- if (C)
2760
- return C;
2761
- const g = {
2758
+ let M = xn.get(o);
2759
+ M || (M = /* @__PURE__ */ new WeakMap(), xn.set(o, M));
2760
+ const g = M.get(r);
2761
+ if (g)
2762
+ return g;
2763
+ const I = {
2762
2764
  ...o,
2763
2765
  ...r
2764
2766
  };
2765
- return S.set(
2767
+ return M.set(
2766
2768
  r,
2767
- g
2768
- ), g;
2769
+ I
2770
+ ), I;
2769
2771
  }
2770
2772
  }
2771
2773
  return {
2772
2774
  ...o ?? {},
2773
- ...i ? { initialComputedFields: A } : {},
2774
- ...s || v ? { initialFormulaFields: y } : {},
2775
- ...f ? { initialFormulaFunctionRegistry: h } : {},
2775
+ ...i ? { initialComputedFields: x } : {},
2776
+ ...s || C ? { initialFormulaFields: y } : {},
2777
+ ...f ? { initialFormulaFunctionRegistry: b } : {},
2776
2778
  ...r?.computeMode ? { computeMode: r.computeMode } : {},
2777
2779
  ...r?.workerPatchDispatchThreshold !== void 0 ? { workerPatchDispatchThreshold: r.workerPatchDispatchThreshold } : {},
2778
2780
  ...r?.formulaColumnCacheMaxColumns !== void 0 ? { formulaColumnCacheMaxColumns: r.formulaColumnCacheMaxColumns } : {}
@@ -2796,35 +2798,35 @@ function On(e) {
2796
2798
  };
2797
2799
  }
2798
2800
  function xo(e) {
2799
- const o = P(0), r = un(), l = _n(
2801
+ const o = L(0), r = un(), l = _n(
2800
2802
  e.rowModel.value ? null : un({
2801
2803
  rows: e.rows.value,
2802
2804
  ...On(e.clientRowModelOptions.value)
2803
2805
  })
2804
- ), s = (v) => {
2805
- !v || v === e.rowModel.value || "dispose" in v && typeof v.dispose == "function" && v.dispose();
2806
+ ), s = (C) => {
2807
+ !C || C === e.rowModel.value || "dispose" in C && typeof C.dispose == "function" && C.dispose();
2806
2808
  }, i = () => {
2807
2809
  e.rowModel.value || (s(l.value), l.value = un({
2808
2810
  rows: e.rows.value,
2809
2811
  ...On(e.clientRowModelOptions.value)
2810
2812
  }), o.value += 1, e.onOwnedRowModelRecreated?.());
2811
2813
  }, f = m(() => e.rowModel.value ?? l.value ?? r);
2812
- return L(
2814
+ return W(
2813
2815
  e.rows,
2814
- (v) => {
2815
- l.value && l.value.setRows(v);
2816
+ (C) => {
2817
+ l.value && l.value.setRows(C);
2816
2818
  },
2817
2819
  { deep: !1 }
2818
- ), L(
2820
+ ), W(
2819
2821
  e.clientRowModelOptions,
2820
2822
  () => {
2821
2823
  i();
2822
2824
  },
2823
2825
  { deep: !0 }
2824
- ), L(
2826
+ ), W(
2825
2827
  e.rowModel,
2826
- (v) => {
2827
- if (v) {
2828
+ (C) => {
2829
+ if (C) {
2828
2830
  s(l.value), l.value = null, o.value += 1;
2829
2831
  return;
2830
2832
  }