@affino/datagrid-vue-app 0.1.30 → 0.1.31

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,8 +1,8 @@
1
1
  import { defineComponent as gn, h as V, inject as uo, ref as ee, computed as w, watch as Y, nextTick as rt, openBlock as Ct, createElementBlock as dn, Fragment as Fl, createElementVNode as Q, mergeProps as Ol, unref as m, toDisplayString as kl, createBlock as co, Teleport as mo, renderList as fo, normalizeClass as wo, createCommentVNode as go, onBeforeUnmount as Dl, shallowRef as al, defineAsyncComponent as vn, markRaw as vo, toRaw as ho, onUnmounted as bo } from "vue";
2
2
  import { resolveDataGridCellClickAction as yo, invokeDataGridCellInteraction as Co, toggleDataGridCellValue as Ro, buildDataGridCellRenderModel as So, buildDataGridAdvancedFilterExpressionFromLegacyFilters as po, useDataGridContextMenu as Io, cloneDataGridFilterSnapshot as xo, createClientRowModel as tl } from "@affino/datagrid-vue";
3
- import { useDataGridAppIntentHistory as Mo, createDataGridAppRowHeightMetrics as Ao, useDataGridAppViewport as Fo, useDataGridAppRowSizing as Oo, useDataGridAppCellSelection as ko, useDataGridAppRowPresentation as Do, useDataGridAppClipboard as Eo, useDataGridAppActiveCellViewport as To, useDataGridAppInlineEditing as zo, useDataGridAppInteractionController as Ho, useDataGridAppHeaderResize as _o, useDataGridAppRuntimeSync as Po, useDataGridAppViewportLifecycle as Vo, useDataGridAppColumnLayoutPanel as Bo } from "@affino/datagrid-vue/app";
3
+ import { useDataGridAppIntentHistory as Mo, createDataGridAppRowHeightMetrics as Ao, useDataGridAppViewport as Fo, useDataGridAppRowSizing as Oo, useDataGridAppCellSelection as ko, useDataGridAppRowPresentation as Do, useDataGridAppClipboard as Eo, useDataGridAppActiveCellViewport as To, useDataGridAppInlineEditing as zo, useDataGridAppInteractionController as _o, useDataGridAppHeaderResize as Ho, useDataGridAppRuntimeSync as Po, useDataGridAppViewportLifecycle as Vo, useDataGridAppColumnLayoutPanel as Bo } from "@affino/datagrid-vue/app";
4
4
  import { useDataGridViewportContextMenuRouter as jo, useDataGridContextMenuAnchor as Go, useDataGridContextMenuActionRouter as Ko } from "@affino/datagrid-vue/advanced";
5
- import { c as Lo, t as $o, _ as El, v as No } from "./DataGridTableStage.vue_vue_type_script_setup_true_lang-BHusDA4Y.js";
5
+ import { c as Lo, t as $o, _ as El, v as No } from "./DataGridTableStage.vue_vue_type_script_setup_true_lang-Q2ri6J1V.js";
6
6
  import { usePopoverController as Wo, useFloatingPopover as Uo } from "@affino/popover-vue";
7
7
  import { d as qo, r as Yo } from "./dataGridOverlayThemeVars-vzY74EIz.js";
8
8
  import { u as Xo } from "./useDataGridDraggableOverlaySurface-BgkSR_nl.js";
@@ -130,7 +130,7 @@ const Tl = gn({
130
130
  function x(z, P) {
131
131
  l("toggle-visibility", { key: z, visible: P });
132
132
  }
133
- function _(z) {
133
+ function H(z) {
134
134
  const E = (z.currentTarget instanceof HTMLElement ? z.currentTarget : null)?.getBoundingClientRect();
135
135
  return !E || E.height <= 0 ? "after" : z.clientY < E.top + E.height / 2 ? "before" : "after";
136
136
  }
@@ -142,7 +142,7 @@ const Tl = gn({
142
142
  I.value = null, F.value = null;
143
143
  return;
144
144
  }
145
- z.preventDefault(), z.dataTransfer && (z.dataTransfer.dropEffect = "move"), I.value = P, F.value = _(z);
145
+ z.preventDefault(), z.dataTransfer && (z.dataTransfer.dropEffect = "move"), I.value = P, F.value = H(z);
146
146
  }
147
147
  function Ie(z, P) {
148
148
  if (!v.value || v.value === P) {
@@ -152,7 +152,7 @@ const Tl = gn({
152
152
  z.preventDefault(), l("move-to-position", {
153
153
  key: v.value,
154
154
  targetKey: P,
155
- placement: _(z)
155
+ placement: H(z)
156
156
  }), Ee();
157
157
  }
158
158
  function Ee() {
@@ -546,7 +546,7 @@ function pr(e) {
546
546
  });
547
547
  return Object.freeze(Object.fromEntries(o));
548
548
  }
549
- function Ha(e) {
549
+ function _a(e) {
550
550
  return typeof e == "boolean" ? {
551
551
  enabled: e,
552
552
  items: [...ue],
@@ -614,7 +614,7 @@ function Fr(e, o) {
614
614
  a.set(l.key, l);
615
615
  return Object.freeze(Array.from(a.values()));
616
616
  }
617
- function _a(e) {
617
+ function Ha(e) {
618
618
  return typeof e == "boolean" ? {
619
619
  enabled: e,
620
620
  items: [...lt],
@@ -651,13 +651,13 @@ function Er(e) {
651
651
  const o = Jl.map((a) => [a, Object.freeze({ ...e.actions[a] ?? {} })]).filter(([, a]) => Object.keys(a).length > 0);
652
652
  return Object.freeze(Object.fromEntries(o));
653
653
  }
654
- function Hl(e) {
654
+ function _l(e) {
655
655
  return (o) => {
656
656
  e.value = o instanceof HTMLElement ? o : null;
657
657
  };
658
658
  }
659
659
  function Tr(e) {
660
- const o = Hl(e.headerViewportRef), a = Hl(e.bodyViewportRef), l = (I) => {
660
+ const o = _l(e.headerViewportRef), a = _l(e.bodyViewportRef), l = (I) => {
661
661
  e.editingCellValueRef.value = I;
662
662
  }, c = w(() => ({
663
663
  gridContentStyle: m(e.gridContentStyle),
@@ -866,8 +866,8 @@ function zr(e) {
866
866
  }
867
867
  };
868
868
  }
869
- const _l = 140, mn = 108, ll = "__datagrid_row_selection__";
870
- function Hr(e) {
869
+ const Hl = 140, mn = 108, ll = "__datagrid_row_selection__";
870
+ function _r(e) {
871
871
  const o = w(() => (e.showRowSelection?.value ?? !0) && e.runtime.api.rowSelection.hasSupport()), a = w(() => o.value ? {
872
872
  key: ll,
873
873
  state: {
@@ -917,8 +917,8 @@ function Hr(e) {
917
917
  } : null), l = (v) => v === ll, c = (v) => l(v.key), s = w(() => {
918
918
  const v = a.value, I = e.visibleColumns.value.filter((x) => x.pin === "left"), F = e.visibleColumns.value.filter((x) => x.pin !== "left" && x.pin !== "right"), C = e.visibleColumns.value.filter((x) => x.pin === "right");
919
919
  return v ? [v, ...I, ...F, ...C] : [...I, ...F, ...C];
920
- }), f = w(() => s.value.filter((v) => v.pin !== "left" && v.pin !== "right")), b = (v) => v.width ?? _l, R = (v) => {
921
- const I = s.value.find((x) => x.key === v), C = `${I ? b(I) : _l}px`;
920
+ }), f = w(() => s.value.filter((v) => v.pin !== "left" && v.pin !== "right")), b = (v) => v.width ?? Hl, R = (v) => {
921
+ const I = s.value.find((x) => x.key === v), C = `${I ? b(I) : Hl}px`;
922
922
  return {
923
923
  width: C,
924
924
  minWidth: C,
@@ -955,7 +955,7 @@ function Hr(e) {
955
955
  rowSelectionColumn: a
956
956
  };
957
957
  }
958
- function _r(e) {
958
+ function Hr(e) {
959
959
  const o = w(() => {
960
960
  const l = e.lastAppliedFill.value, c = e.selectionRange.value;
961
961
  return !l || !c || e.isFillDragging.value || l.allowBehaviorToggle === !1 || l.previewRange.startRow !== c.startRow || l.previewRange.endRow !== c.endRow || l.previewRange.startColumn !== c.startColumn || l.previewRange.endColumn !== c.endColumn ? null : {
@@ -1011,8 +1011,8 @@ function Vr(e) {
1011
1011
  }).displayValue;
1012
1012
  }, M = w(() => {
1013
1013
  const C = e.runtime.api.rows.getCount(), x = [];
1014
- for (let _ = 0; _ < C; _ += 1) {
1015
- const q = e.runtime.api.rows.get(_);
1014
+ for (let H = 0; H < C; H += 1) {
1015
+ const q = e.runtime.api.rows.get(H);
1016
1016
  !q || q.kind === "group" || q.rowId == null || x.push(q.rowId);
1017
1017
  }
1018
1018
  return x;
@@ -1050,13 +1050,13 @@ function Vr(e) {
1050
1050
  x.deselectRows(C);
1051
1051
  });
1052
1052
  },
1053
- selectRowRange: (C, x, _) => {
1053
+ selectRowRange: (C, x, H) => {
1054
1054
  p(C);
1055
1055
  const q = e.orderedVisibleColumns.value.length - 1;
1056
1056
  if (q < 0)
1057
1057
  return;
1058
1058
  const me = e.viewportRowStart.value + x;
1059
- if (!_) {
1059
+ if (!H) {
1060
1060
  e.applySelectionRange({
1061
1061
  startRow: me,
1062
1062
  endRow: me,
@@ -1169,14 +1169,14 @@ function Gr(e) {
1169
1169
  return s().some((x) => {
1170
1170
  if (!b(x, p, v))
1171
1171
  return !1;
1172
- const _ = e.viewportRowStart.value + p;
1172
+ const H = e.viewportRowStart.value + p;
1173
1173
  switch (I) {
1174
1174
  case "top":
1175
- return _ === x.startRow;
1175
+ return H === x.startRow;
1176
1176
  case "right":
1177
1177
  return v === x.endColumn;
1178
1178
  case "bottom":
1179
- return _ === x.endRow;
1179
+ return H === x.endRow;
1180
1180
  case "left":
1181
1181
  return v === x.startColumn;
1182
1182
  }
@@ -1208,7 +1208,7 @@ function Wr(e) {
1208
1208
  totalBodyRows: s,
1209
1209
  placeholderRows: e.placeholderRows,
1210
1210
  cloneRowData: e.cloneRowData
1211
- }), b = w(() => Math.max(0, f.totalVisualRows.value)), R = w(() => c.value ? Kr : 0), M = Hr({
1211
+ }), b = w(() => Math.max(0, f.totalVisualRows.value)), R = w(() => c.value ? Kr : 0), M = _r({
1212
1212
  runtime: e.runtime,
1213
1213
  visibleColumns: e.visibleColumns,
1214
1214
  showRowSelection: e.showRowSelection,
@@ -1222,7 +1222,7 @@ function Wr(e) {
1222
1222
  isCellEditable: F,
1223
1223
  isCellEditableByKey: C,
1224
1224
  rowSelectionColumn: x
1225
- } = M, _ = Ao({
1225
+ } = M, H = Ao({
1226
1226
  totalRows: () => b.value,
1227
1227
  resolveBaseRowHeight: () => e.normalizedBaseRowHeight.value,
1228
1228
  resolveRowHeightOverride: (h) => e.runtime.api.view.getRowHeightOverride(h),
@@ -1234,12 +1234,12 @@ function Wr(e) {
1234
1234
  const O = Math.max(0, Math.trunc(h));
1235
1235
  if (O <= 0)
1236
1236
  return 0;
1237
- const k = _.resolveTotalHeight();
1238
- return O <= s.value ? _.resolveRowOffset(O) : k + (O - s.value) * e.normalizedBaseRowHeight.value;
1237
+ const k = H.resolveTotalHeight();
1238
+ return O <= s.value ? H.resolveRowOffset(O) : k + (O - s.value) * e.normalizedBaseRowHeight.value;
1239
1239
  }, me = w(() => {
1240
1240
  if (e.layoutMode.value !== "auto-height")
1241
1241
  return null;
1242
- let h = _.resolveTotalHeight();
1242
+ let h = H.resolveTotalHeight();
1243
1243
  return e.minRows.value !== null && (h = Math.max(h, q(e.minRows.value))), e.maxRows.value !== null && (h = Math.min(h, q(e.maxRows.value))), Math.max(0, Math.trunc(h));
1244
1244
  }), Ie = w(() => e.layoutMode.value !== "auto-height" ? {} : {
1245
1245
  height: "auto"
@@ -1290,10 +1290,10 @@ function Wr(e) {
1290
1290
  rowOverscan: w(() => e.virtualization.value.rowOverscan),
1291
1291
  columnOverscan: w(() => e.virtualization.value.columnOverscan),
1292
1292
  measureVisibleRowHeights: () => it(),
1293
- resolveRowHeight: _.resolveRowHeight,
1294
- resolveRowOffset: _.resolveRowOffset,
1295
- resolveRowIndexAtOffset: _.resolveRowIndexAtOffset,
1296
- resolveTotalRowHeight: _.resolveTotalHeight
1293
+ resolveRowHeight: H.resolveRowHeight,
1294
+ resolveRowOffset: H.resolveRowOffset,
1295
+ resolveRowIndexAtOffset: H.resolveRowIndexAtOffset,
1296
+ resolveTotalRowHeight: H.resolveTotalHeight
1297
1297
  }), Fn = (h) => xn(h), le = f.visualRuntime, L = le.resolveBodyRowIndexById, {
1298
1298
  rowStyle: Ge,
1299
1299
  isRowAutosizeProbe: Ke,
@@ -1373,16 +1373,16 @@ function Wr(e) {
1373
1373
  history: e.history
1374
1374
  }), {
1375
1375
  captureHistorySnapshot: Me,
1376
- captureHistorySnapshotForRowIds: He,
1376
+ captureHistorySnapshotForRowIds: _e,
1377
1377
  recordHistoryIntentTransaction: Ce,
1378
1378
  canUndoHistory: Et,
1379
1379
  canRedoHistory: Tt,
1380
1380
  runHistoryAction: zt
1381
1381
  } = Dt, {
1382
- rowIndexLabel: Hn,
1383
- readCell: _n,
1384
- readDisplayCell: Ht,
1385
- rowClass: _t,
1382
+ rowIndexLabel: _n,
1383
+ readCell: Hn,
1384
+ readDisplayCell: _t,
1385
+ rowClass: Ht,
1386
1386
  toggleGroupRow: Pt
1387
1387
  } = Do({
1388
1388
  mode: e.mode,
@@ -1398,11 +1398,11 @@ function Wr(e) {
1398
1398
  isCellEditableByKey: C,
1399
1399
  readRowSelectionCell: Dn,
1400
1400
  readRowSelectionDisplayCell: En,
1401
- readCell: _n,
1402
- readDisplayCell: Ht,
1401
+ readCell: Hn,
1402
+ readDisplayCell: _t,
1403
1403
  toggleRowCheckboxSelected: Tn,
1404
1404
  captureHistorySnapshot: Me,
1405
- captureHistorySnapshotForRowIds: He,
1405
+ captureHistorySnapshotForRowIds: _e,
1406
1406
  recordHistoryIntentTransaction: Ce,
1407
1407
  syncViewport: () => ie()
1408
1408
  }), {
@@ -1423,7 +1423,7 @@ function Wr(e) {
1423
1423
  applySelectionRange: xe,
1424
1424
  clearCellSelection: dt,
1425
1425
  captureRowsSnapshot: Me,
1426
- captureRowsSnapshotForRowIds: He,
1426
+ captureRowsSnapshotForRowIds: _e,
1427
1427
  recordEditTransaction: (h) => {
1428
1428
  Ce({
1429
1429
  intent: "edit",
@@ -1447,7 +1447,7 @@ function Wr(e) {
1447
1447
  copySelectedCells: Bt,
1448
1448
  pasteSelectedCells: jt,
1449
1449
  cutSelectedCells: Ae,
1450
- isCellInPendingClipboardRange: _e,
1450
+ isCellInPendingClipboardRange: He,
1451
1451
  isCellOnPendingClipboardEdge: Pn
1452
1452
  } = te, {
1453
1453
  ensureKeyboardActiveCellVisible: Gt,
@@ -1457,8 +1457,8 @@ function Wr(e) {
1457
1457
  visibleColumns: A,
1458
1458
  resolveColumnWidth: p,
1459
1459
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
1460
- resolveRowHeight: _.resolveRowHeight,
1461
- resolveRowOffset: _.resolveRowOffset,
1460
+ resolveRowHeight: H.resolveRowHeight,
1461
+ resolveRowOffset: H.resolveRowOffset,
1462
1462
  indexColumnWidth: R.value,
1463
1463
  defaultColumnWidth: ol,
1464
1464
  syncViewport: () => ie()
@@ -1490,7 +1490,7 @@ function Wr(e) {
1490
1490
  },
1491
1491
  isCellEditable: de,
1492
1492
  captureRowsSnapshot: Me,
1493
- captureRowsSnapshotForRowIds: He,
1493
+ captureRowsSnapshotForRowIds: _e,
1494
1494
  recordEditTransaction: (h) => {
1495
1495
  Ce({
1496
1496
  intent: "edit",
@@ -1566,8 +1566,8 @@ function Wr(e) {
1566
1566
  bodyViewportRef: E,
1567
1567
  indexColumnWidth: R.value,
1568
1568
  resolveColumnWidth: p,
1569
- resolveRowHeight: _.resolveRowHeight,
1570
- resolveRowIndexAtOffset: _.resolveRowIndexAtOffset,
1569
+ resolveRowHeight: H.resolveRowHeight,
1570
+ resolveRowIndexAtOffset: H.resolveRowIndexAtOffset,
1571
1571
  normalizeRowId: kn,
1572
1572
  normalizeCellCoord: xt,
1573
1573
  resolveSelectionRange: $e,
@@ -1581,7 +1581,7 @@ function Wr(e) {
1581
1581
  resolveRowIndexById: L,
1582
1582
  ensureEditableRowAtIndex: (h) => f.ensureMaterializedRowAt(h, "toggle"),
1583
1583
  captureRowsSnapshot: Me,
1584
- captureRowsSnapshotForRowIds: He,
1584
+ captureRowsSnapshotForRowIds: _e,
1585
1585
  recordIntentTransaction: (h, O) => {
1586
1586
  Ce(h, O);
1587
1587
  },
@@ -1609,7 +1609,7 @@ function Wr(e) {
1609
1609
  closeContextMenu: e.closeContextMenu,
1610
1610
  openContextMenuFromCurrentCell: e.openContextMenuFromCurrentCell,
1611
1611
  runRowIndexKeyboardAction: e.runRowIndexKeyboardAction
1612
- }, Oe = Ho(fe), {
1612
+ }, Oe = _o(fe), {
1613
1613
  isPointerSelectingCells: Ze,
1614
1614
  isFillDragging: Qe,
1615
1615
  fillPreviewRange: Nt,
@@ -1646,7 +1646,7 @@ function Wr(e) {
1646
1646
  applyColumnResizeFromPointer: Yn,
1647
1647
  stopColumnResize: et,
1648
1648
  dispose: tt
1649
- } = _o({
1649
+ } = Ho({
1650
1650
  visibleColumns: A,
1651
1651
  rows: e.rows,
1652
1652
  persistColumnWidth: (h, O) => {
@@ -1683,7 +1683,7 @@ function Wr(e) {
1683
1683
  isCommittedCellSelected: ce,
1684
1684
  shouldHighlightCommittedSelectedCell: Ft,
1685
1685
  isCommittedCellOnSelectionEdge: Ot
1686
- }), { selectionRange: nn, selectionRanges: Xn } = Re, Jn = _r({
1686
+ }), { selectionRange: nn, selectionRanges: Xn } = Re, Jn = Hr({
1687
1687
  lastAppliedFill: Wt,
1688
1688
  selectionRange: nn,
1689
1689
  isFillDragging: Qe
@@ -1778,7 +1778,7 @@ function Wr(e) {
1778
1778
  handleHeaderScroll: T.scrollSync.handleHeaderScroll,
1779
1779
  handleViewportScroll: pt,
1780
1780
  handleViewportKeydown: T.viewportKeyboard.handleViewportKeydown,
1781
- rowClass: _t,
1781
+ rowClass: Ht,
1782
1782
  isRowAutosizeProbe: Ke,
1783
1783
  rowStyle: Ge,
1784
1784
  isRowInPendingClipboardCut: e.isRowInPendingClipboardCut,
@@ -1792,7 +1792,7 @@ function Wr(e) {
1792
1792
  reorderRowsByIndex: e.reorderRowsByIndex,
1793
1793
  handleToggleAllVisibleRows: T.rowSelection.toggleVisibleRowsSelected,
1794
1794
  toggleGroupRow: Pt,
1795
- rowIndexLabel: Hn,
1795
+ rowIndexLabel: _n,
1796
1796
  startResize: tn,
1797
1797
  handleResizeDoubleClick: yt,
1798
1798
  startRowResize: On,
@@ -1802,7 +1802,7 @@ function Wr(e) {
1802
1802
  shouldHighlightSelectedCell: T.visualSelection.shouldHighlightSelectedCell,
1803
1803
  isCellOnSelectionEdge: T.visualSelection.isCellOnSelectionEdge,
1804
1804
  isCellInFillPreview: Wn,
1805
- isCellInPendingClipboardRange: _e,
1805
+ isCellInPendingClipboardRange: He,
1806
1806
  isCellOnPendingClipboardEdge: Pn,
1807
1807
  isEditingCell: Ye,
1808
1808
  isCellEditable: (h, O, k, N) => We(
@@ -1878,7 +1878,7 @@ function Wr(e) {
1878
1878
  cutSelectedCells: Ae,
1879
1879
  clearSelectedCells: qn,
1880
1880
  captureHistorySnapshot: Me,
1881
- captureHistorySnapshotForRowIds: He,
1881
+ captureHistorySnapshotForRowIds: _e,
1882
1882
  recordHistoryIntentTransaction: Ce,
1883
1883
  revealCellInComfortZone: Vn
1884
1884
  };
@@ -1973,7 +1973,7 @@ function Pl(e) {
1973
1973
  join: f === 0 ? ul("and") : s.join
1974
1974
  }));
1975
1975
  }
1976
- const Yr = vn(() => import("./DataGridAdvancedFilterPopover-CXT1rG40.js")), Xr = vn(() => import("./DataGridAggregationsPopover-BRVx8c_y.js")), Jr = vn(() => import("./DataGridFindReplacePopover-Dou8Fsm3.js")), Vl = vn(() => import("./DataGridGanttStageEntry-Dt0DXiFp.js"));
1976
+ const Yr = vn(() => import("./DataGridAdvancedFilterPopover-CXT1rG40.js")), Xr = vn(() => import("./DataGridAggregationsPopover-BRVx8c_y.js")), Jr = vn(() => import("./DataGridFindReplacePopover-Dou8Fsm3.js")), Vl = vn(() => import("./DataGridGanttStageEntry-C4qhNhnp.js"));
1977
1977
  function Zr(e) {
1978
1978
  return {
1979
1979
  ...e,
@@ -2505,7 +2505,7 @@ const da = {
2505
2505
  key: t.key,
2506
2506
  label: t.column.label ?? t.key,
2507
2507
  allowedOps: ca(t.column.dataType)
2508
- }))), _ = ee(e.rowHeightMode), q = w(() => Qr(e.baseRowHeight)), me = w(() => v.value[0]?.key ?? "name"), Ie = w(() => {
2508
+ }))), H = ee(e.rowHeightMode), q = w(() => Qr(e.baseRowHeight)), me = w(() => v.value[0]?.key ?? "name"), Ie = w(() => {
2509
2509
  const t = /* @__PURE__ */ new Map();
2510
2510
  for (const n of I.value)
2511
2511
  t.set(n.key, n.column.label ?? n.key);
@@ -2589,7 +2589,7 @@ const da = {
2589
2589
  ), Y(
2590
2590
  () => e.rowHeightMode,
2591
2591
  (t) => {
2592
- _.value = t;
2592
+ H.value = t;
2593
2593
  }
2594
2594
  );
2595
2595
  const It = (t) => {
@@ -2679,8 +2679,8 @@ const da = {
2679
2679
  caseSensitive: !1
2680
2680
  } : delete r.columnFilters[t], s.value = r, ce();
2681
2681
  }, Me = () => {
2682
- e.runtime.api.view.setRowHeightMode(_.value), e.runtime.api.view.setBaseRowHeight(q.value);
2683
- }, He = () => {
2682
+ e.runtime.api.view.setRowHeightMode(H.value), e.runtime.api.view.setBaseRowHeight(q.value);
2683
+ }, _e = () => {
2684
2684
  L.value = Rt(Ke.value), le.value = !0;
2685
2685
  }, Ce = () => {
2686
2686
  L.value = Rt(Ke.value), le.value = !1;
@@ -2720,7 +2720,7 @@ const da = {
2720
2720
  g
2721
2721
  ]
2722
2722
  };
2723
- }, Hn = (t, n) => {
2723
+ }, _n = (t, n) => {
2724
2724
  const r = x.value.find((u) => u.key === t);
2725
2725
  if (!r || !r.allowedOps.includes(n))
2726
2726
  return;
@@ -2732,10 +2732,10 @@ const da = {
2732
2732
  basis: Le.value,
2733
2733
  columns: i
2734
2734
  };
2735
- }, _n = () => {
2735
+ }, Hn = () => {
2736
2736
  const t = L.value && L.value.columns.length > 0 ? L.value : null;
2737
2737
  e.runtime.api.rows.setAggregationModel(t), L.value = Rt(t), le.value = !1;
2738
- }, Ht = (t) => c.value.find((n) => n.key === t)?.direction ?? null, _t = (t, n) => {
2738
+ }, _t = (t) => c.value.find((n) => n.key === t)?.direction ?? null, Ht = (t, n) => {
2739
2739
  const r = v.value.find((i) => i.key === t);
2740
2740
  !r || r.column.capabilities?.sortable === !1 || (c.value = n === null ? c.value.filter((i) => i.key !== t) : [{ key: t, direction: n }], ce());
2741
2741
  }, Pt = (t, n) => {
@@ -2811,7 +2811,7 @@ const da = {
2811
2811
  return null;
2812
2812
  const r = Math.trunc(n);
2813
2813
  return t[r] ?? null;
2814
- }, _e = (t) => typeof t == "string" || typeof t == "number" ? t : null, Pn = () => {
2814
+ }, He = (t) => typeof t == "string" || typeof t == "number" ? t : null, Pn = () => {
2815
2815
  const t = e.selectionSnapshot.value, n = v.value.map((u) => u.key);
2816
2816
  if (!t || n.length === 0)
2817
2817
  return null;
@@ -2825,16 +2825,16 @@ const da = {
2825
2825
  endRow: u.endRow,
2826
2826
  startColumnKey: g,
2827
2827
  endColumnKey: d,
2828
- startRowId: _e(u.startRowId),
2829
- endRowId: _e(u.endRowId),
2828
+ startRowId: He(u.startRowId),
2829
+ endRowId: He(u.endRowId),
2830
2830
  anchor: {
2831
2831
  rowIndex: u.anchor?.rowIndex ?? u.startRow,
2832
- rowId: _e(u.anchor?.rowId),
2832
+ rowId: He(u.anchor?.rowId),
2833
2833
  columnKey: y
2834
2834
  },
2835
2835
  focus: {
2836
2836
  rowIndex: u.focus?.rowIndex ?? u.endRow,
2837
- rowId: _e(u.focus?.rowId),
2837
+ rowId: He(u.focus?.rowId),
2838
2838
  columnKey: S
2839
2839
  }
2840
2840
  };
@@ -2847,7 +2847,7 @@ const da = {
2847
2847
  activeRangeIndex: Math.max(0, Math.trunc(t.activeRangeIndex ?? 0)),
2848
2848
  activeCell: t.activeCell && i ? {
2849
2849
  rowIndex: t.activeCell.rowIndex,
2850
- rowId: _e(t.activeCell.rowId),
2850
+ rowId: He(t.activeCell.rowId),
2851
2851
  columnKey: i
2852
2852
  } : null
2853
2853
  };
@@ -2857,8 +2857,8 @@ const da = {
2857
2857
  return null;
2858
2858
  const r = [];
2859
2859
  for (const d of t.ranges) {
2860
- const y = n.indexOf(d.startColumnKey), S = n.indexOf(d.endColumnKey), H = n.indexOf(d.anchor.columnKey), D = n.indexOf(d.focus.columnKey);
2861
- y < 0 || S < 0 || H < 0 || D < 0 || r.push({
2860
+ const y = n.indexOf(d.startColumnKey), S = n.indexOf(d.endColumnKey), _ = n.indexOf(d.anchor.columnKey), D = n.indexOf(d.focus.columnKey);
2861
+ y < 0 || S < 0 || _ < 0 || D < 0 || r.push({
2862
2862
  startRow: d.startRow,
2863
2863
  endRow: d.endRow,
2864
2864
  startCol: y,
@@ -2867,7 +2867,7 @@ const da = {
2867
2867
  endRowId: d.endRowId,
2868
2868
  anchor: {
2869
2869
  rowIndex: d.anchor.rowIndex,
2870
- colIndex: H,
2870
+ colIndex: _,
2871
2871
  rowId: d.anchor.rowId
2872
2872
  },
2873
2873
  focus: {
@@ -3151,10 +3151,10 @@ const da = {
3151
3151
  return i;
3152
3152
  const u = ft(), g = v.value.length - 1;
3153
3153
  if (u && g >= 0) {
3154
- const d = Math.min(u.startColumn, u.endColumn), y = Math.max(u.startColumn, u.endColumn), S = Math.min(u.startRow, u.endRow), H = Math.max(u.startRow, u.endRow), D = t.length > 0 ? e.runtime.resolveBodyRowIndexById(t) : -1;
3155
- if (d === 0 && y === g && (D < 0 || D >= S && D <= H)) {
3154
+ const d = Math.min(u.startColumn, u.endColumn), y = Math.max(u.startColumn, u.endColumn), S = Math.min(u.startRow, u.endRow), _ = Math.max(u.startRow, u.endRow), D = t.length > 0 ? e.runtime.resolveBodyRowIndexById(t) : -1;
3155
+ if (d === 0 && y === g && (D < 0 || D >= S && D <= _)) {
3156
3156
  const K = [];
3157
- for (let W = S; W <= H; W += 1) {
3157
+ for (let W = S; W <= _; W += 1) {
3158
3158
  const se = e.runtime.getBodyRowAtIndex(W);
3159
3159
  if (!se || se.kind === "group" || se.rowId == null)
3160
3160
  continue;
@@ -3238,11 +3238,11 @@ const da = {
3238
3238
  }).findIndex((K) => fe(K) === r);
3239
3239
  if (S < 0)
3240
3240
  return !1;
3241
- const H = T(), D = bt(
3241
+ const _ = T(), D = bt(
3242
3242
  u,
3243
3243
  t.placement === "after" ? S + 1 : S
3244
3244
  );
3245
- return D && (Gn(u), Z(H, u.length > 1 ? `Move ${u.length} rows` : "Move row")), D;
3245
+ return D && (Gn(u), Z(_, u.length > 1 ? `Move ${u.length} rows` : "Move row")), D;
3246
3246
  }, Wn = (t) => {
3247
3247
  const n = String(t.sourceColumnKey), r = String(t.targetColumnKey);
3248
3248
  if (!n || !r || n === r)
@@ -3253,15 +3253,15 @@ const da = {
3253
3253
  const d = i.map((U) => U.key), y = d.indexOf(n), S = d.indexOf(r);
3254
3254
  if (y < 0 || S < 0)
3255
3255
  return !1;
3256
- const H = d[y];
3257
- if (!H)
3256
+ const _ = d[y];
3257
+ if (!_)
3258
3258
  return !1;
3259
3259
  d.splice(y, 1);
3260
3260
  const D = d.indexOf(r);
3261
3261
  if (D < 0)
3262
3262
  return !1;
3263
3263
  const K = t.placement === "after" ? D + 1 : D;
3264
- d.splice(K, 0, H);
3264
+ d.splice(K, 0, _);
3265
3265
  const W = Pn(), se = g.pin ?? "none";
3266
3266
  return (u.pin ?? "none") !== se && e.runtime.api.columns.setPin(n, se), e.runtime.api.columns.setOrder(d), Vn(W), !0;
3267
3267
  }, Un = () => te.value ? (te.value = null, !0) : !1, qn = (t) => {
@@ -3307,7 +3307,7 @@ const da = {
3307
3307
  totalRuntimeRows: p,
3308
3308
  visibleColumns: v,
3309
3309
  rowRenderMode: w(() => e.renderMode),
3310
- rowHeightMode: _,
3310
+ rowHeightMode: H,
3311
3311
  normalizedBaseRowHeight: q,
3312
3312
  selectionSnapshot: e.selectionSnapshot,
3313
3313
  selectionAnchor: e.selectionAnchor,
@@ -3340,10 +3340,10 @@ const da = {
3340
3340
  isColumnFilterActive: It,
3341
3341
  isColumnGrouped: dt,
3342
3342
  resolveColumnGroupOrder: ct,
3343
- resolveColumnMenuSortDirection: Ht,
3343
+ resolveColumnMenuSortDirection: _t,
3344
3344
  resolveColumnMenuSelectedTokens: Te,
3345
3345
  resolveColumnMenuValueEntries: kn,
3346
- applyColumnMenuSort: _t,
3346
+ applyColumnMenuSort: Ht,
3347
3347
  applyColumnMenuPin: Pt,
3348
3348
  applyColumnMenuGroupBy: mt,
3349
3349
  applyColumnMenuFilter: Ne,
@@ -3608,10 +3608,10 @@ const da = {
3608
3608
  const d = T(), y = te.value?.operation === "cut" ? te.value.sourceRowIds : [];
3609
3609
  if (!Ln(i + 1))
3610
3610
  return !1;
3611
- const H = Math.max(0, i + 1), D = Oe(
3611
+ const _ = Math.max(0, i + 1), D = Oe(
3612
3612
  y[0] ?? r
3613
- ) ?? Oe(r), K = y.length > 0 ? bt(y, H) : e.runtime.api.rows.insertDataAt(
3614
- H,
3613
+ ) ?? Oe(r), K = y.length > 0 ? bt(y, _) : e.runtime.api.rows.insertDataAt(
3614
+ _,
3615
3615
  g.map((W) => Ut(W, D))
3616
3616
  );
3617
3617
  return K && te.value?.operation === "cut" && (te.value = null), K && Z(
@@ -3648,14 +3648,14 @@ const da = {
3648
3648
  return !1;
3649
3649
  const d = T(), y = te.value?.operation === "cut" ? te.value.sourceRowIds : [], S = Oe(
3650
3650
  y[0] ?? r
3651
- ) ?? Oe(r), H = y.length > 0 ? $n(y, r) : e.runtime.api.rows.insertDataAfter(
3651
+ ) ?? Oe(r), _ = y.length > 0 ? $n(y, r) : e.runtime.api.rows.insertDataAfter(
3652
3652
  n,
3653
3653
  g.map((D) => Ut(D, S))
3654
3654
  );
3655
- return H && te.value?.operation === "cut" && (te.value = null), H && Z(
3655
+ return _ && te.value?.operation === "cut" && (te.value = null), _ && Z(
3656
3656
  d,
3657
3657
  y.length > 0 ? y.length > 1 ? `Move ${y.length} rows` : "Move row" : g.length > 1 ? `Paste ${g.length} rows` : "Paste row"
3658
- ), H;
3658
+ ), _;
3659
3659
  }
3660
3660
  return !1;
3661
3661
  };
@@ -3750,29 +3750,29 @@ const da = {
3750
3750
  if (!e.cellMenu.enabled || !n)
3751
3751
  return [];
3752
3752
  const r = fn(e.cellMenu, n), i = new Set(Ir(e.cellMenu, n)), u = Mr(e.cellMenu, n), g = xr(e.cellMenu, n), d = Ar(e.cellMenu, n), y = Fr(e.cellMenu, n), S = [];
3753
- for (const H of r) {
3754
- const K = (da[H] ?? []).flatMap((W) => {
3755
- const se = no(H, W, i, u, d);
3753
+ for (const _ of r) {
3754
+ const K = (da[_] ?? []).flatMap((W) => {
3755
+ const se = no(_, W, i, u, d);
3756
3756
  return se ? [se] : [];
3757
3757
  });
3758
3758
  if (K.length !== 0) {
3759
- if (H === "pasteSpecial") {
3760
- const W = i.has(H) || K.every((se) => se.disabled);
3759
+ if (_ === "pasteSpecial") {
3760
+ const W = i.has(_) || K.every((se) => se.disabled);
3761
3761
  S.push({
3762
- itemKey: H,
3762
+ itemKey: _,
3763
3763
  entries: [{
3764
3764
  kind: "submenu",
3765
3765
  id: "paste-special-submenu",
3766
3766
  label: g.pasteSpecial ?? "Paste special",
3767
3767
  disabled: W,
3768
- title: u[H] ?? (K.length === 1 ? K[0]?.title : void 0),
3768
+ title: u[_] ?? (K.length === 1 ? K[0]?.title : void 0),
3769
3769
  entries: K
3770
3770
  }]
3771
3771
  });
3772
3772
  continue;
3773
3773
  }
3774
3774
  S.push({
3775
- itemKey: H,
3775
+ itemKey: _,
3776
3776
  entries: K
3777
3777
  });
3778
3778
  }
@@ -3788,7 +3788,7 @@ const da = {
3788
3788
  return [];
3789
3789
  const n = Xe(oe.value.rowId ?? ""), r = Or(e.rowIndexMenu), i = new Set(kr(e.rowIndexMenu)), u = Dr(e.rowIndexMenu), g = Er(e.rowIndexMenu), d = [];
3790
3790
  for (const y of r) {
3791
- const H = (ma[y] ?? []).flatMap((D) => {
3791
+ const _ = (ma[y] ?? []).flatMap((D) => {
3792
3792
  const W = g[D === "insert-row-above" ? "insertAbove" : D === "insert-row-below" ? "insertBelow" : D === "copy-row" ? "copy" : D === "paste-row" ? "paste" : D === "delete-selected-rows" ? "deleteSelected" : "cut"];
3793
3793
  if (W?.hidden)
3794
3794
  return [];
@@ -3804,7 +3804,7 @@ const da = {
3804
3804
  actionId: D
3805
3805
  }];
3806
3806
  });
3807
- H.length > 0 && d.push(H);
3807
+ _.length > 0 && d.push(_);
3808
3808
  }
3809
3809
  return d;
3810
3810
  }
@@ -3837,9 +3837,15 @@ const da = {
3837
3837
  if (i.kind === "submenu") {
3838
3838
  const u = Cl(i.id), g = u ? V("div", {
3839
3839
  class: "datagrid-context-menu__submenu-panel",
3840
- role: "group"
3840
+ role: "menu",
3841
+ "data-datagrid-menu-parent-action": i.id
3841
3842
  }, Il(i.entries, [...n, i.id], r + 1)) : null;
3842
- return [
3843
+ return [V("div", {
3844
+ class: [
3845
+ "datagrid-context-menu__submenu",
3846
+ u ? "datagrid-context-menu__submenu--open" : null
3847
+ ]
3848
+ }, [
3843
3849
  V("button", {
3844
3850
  type: "button",
3845
3851
  class: [
@@ -3849,6 +3855,8 @@ const da = {
3849
3855
  "data-datagrid-menu-action": i.id,
3850
3856
  "data-datagrid-menu-depth": String(r),
3851
3857
  "data-datagrid-menu-open": u ? "true" : void 0,
3858
+ "aria-haspopup": "menu",
3859
+ "aria-expanded": u ? "true" : "false",
3852
3860
  disabled: i.disabled,
3853
3861
  title: i.title,
3854
3862
  onClick: () => {
@@ -3859,10 +3867,10 @@ const da = {
3859
3867
  V("span", {
3860
3868
  class: "datagrid-context-menu__submenu-arrow",
3861
3869
  "aria-hidden": "true"
3862
- }, u ? "v" : ">")
3870
+ }, ">")
3863
3871
  ]),
3864
3872
  ...g ? [g] : []
3865
- ];
3873
+ ])];
3866
3874
  }
3867
3875
  return [V("button", {
3868
3876
  type: "button",
@@ -3927,9 +3935,9 @@ const da = {
3927
3935
  isColumnFilterActive: It,
3928
3936
  isColumnGrouped: dt,
3929
3937
  resolveColumnGroupOrder: ct,
3930
- resolveColumnMenuSortDirection: Ht,
3938
+ resolveColumnMenuSortDirection: _t,
3931
3939
  resolveColumnMenuSelectedTokens: Te,
3932
- applyColumnMenuSort: _t,
3940
+ applyColumnMenuSort: Ht,
3933
3941
  applyColumnMenuPin: Pt,
3934
3942
  applyColumnMenuGroupBy: mt,
3935
3943
  applyColumnMenuFilter: Ne,
@@ -4034,12 +4042,12 @@ const da = {
4034
4042
  active: Ge.value && (le.value || !!Ke.value?.columns.length),
4035
4043
  disabled: !Ge.value,
4036
4044
  disabledReason: Ge.value ? "" : "Aggregations require an active group-by model.",
4037
- onOpen: He,
4045
+ onOpen: _e,
4038
4046
  onUpdateBasis: Tt,
4039
4047
  onToggleColumn: zt,
4040
- onUpdateOp: Hn,
4048
+ onUpdateOp: _n,
4041
4049
  onClear: Et,
4042
- onApply: _n,
4050
+ onApply: Hn,
4043
4051
  onCancel: Ce
4044
4052
  }
4045
4053
  }), [...t, ...e.toolbarModules].map(Zr);
@@ -4344,8 +4352,8 @@ export {
4344
4352
  Tr as e,
4345
4353
  Wr as f,
4346
4354
  za as g,
4347
- Ha as h,
4348
- _a as i,
4355
+ _a as h,
4356
+ Ha as i,
4349
4357
  Ba as j,
4350
4358
  Va as k,
4351
4359
  Ga as r,