@affino/datagrid-vue-app 0.1.47 → 0.1.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gantt.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as t } from "./chunks/DataGridGanttStageEntry-BpEn4dPx.js";
1
+ import { D as t } from "./chunks/DataGridGanttStageEntry-BwdBiQkI.js";
2
2
  import { buildDataGridTimelineRenderModels as r, normalizeDataGridGanttOptions as n, resolveDataGridTimelineRange as o } from "@affino/datagrid-gantt";
3
3
  export {
4
4
  t as DataGridGanttStage,
package/dist/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export type { DataGridColumnReorderOptions, DataGridColumnReorderProp, } from ".
23
23
  export type { DataGridRowReorderOptions, DataGridRowReorderProp, } from "./config/dataGridRowReorder";
24
24
  export { clearDataGridSavedViewInStorage, migrateDataGridSavedView, parseDataGridSavedView, readDataGridSavedViewFromStorage, serializeDataGridSavedView, writeDataGridSavedViewToStorage, } from "./config/dataGridSavedView";
25
25
  export type { DataGridAggregationsOptions, DataGridAggregationsProp, } from "./config/dataGridAggregations";
26
- export type { DataGridColumnMenuActionKey, DataGridColumnMenuActionOption, DataGridColumnMenuActionOptions, DataGridColumnMenuColumnOptions, DataGridColumnMenuCustomLeafItem, DataGridColumnMenuCustomItem, DataGridColumnMenuCustomItemContext, DataGridColumnMenuCustomItemPlacement, DataGridColumnMenuCustomSubmenuItem, DataGridColumnMenuDisabledReasons, DataGridColumnMenuItemKey, DataGridColumnMenuItemLabels, DataGridColumnMenuOptions, DataGridColumnMenuProp, DataGridColumnMenuTriggerMode, } from "./overlays/dataGridColumnMenu";
26
+ export type { DataGridColumnMenuActionKey, DataGridColumnMenuActionOption, DataGridColumnMenuActionOptions, DataGridColumnMenuColumnOptions, DataGridColumnMenuCustomLeafItem, DataGridColumnMenuCustomItem, DataGridColumnMenuCustomItemContext, DataGridColumnMenuCustomItemPlacement, DataGridColumnMenuCustomSubmenuItem, DataGridColumnMenuDisabledReasons, DataGridColumnMenuItemKey, DataGridColumnMenuItemLabels, DataGridColumnMenuLabels, DataGridColumnMenuOptions, DataGridColumnMenuProp, DataGridColumnMenuTriggerMode, } from "./overlays/dataGridColumnMenu";
27
27
  export type { DataGridCellMenuActionKey, DataGridCellMenuActionOption, DataGridCellMenuActionOptions, DataGridCellMenuColumnOptions, DataGridCellMenuCustomItem, DataGridCellMenuCustomItemContext, DataGridCellMenuCustomItemPlacement, DataGridCellMenuCustomLeafItem, DataGridCellMenuCustomSubmenuItem, DataGridCellMenuDisabledReasons, DataGridCellMenuItemKey, DataGridCellMenuItemLabels, DataGridCellMenuOptions, DataGridCellMenuProp, DataGridRowIndexMenuActionKey, DataGridRowIndexMenuActionOption, DataGridRowIndexMenuActionOptions, DataGridRowIndexMenuDisabledReasons, DataGridRowIndexMenuItemKey, DataGridRowIndexMenuItemLabels, DataGridRowIndexMenuOptions, DataGridRowIndexMenuProp, } from "./overlays/dataGridContextMenu";
28
28
  export type { DataGridGroupByProp, DataGridPaginationProp, } from "./config/dataGridPublicProps";
29
29
  export type { DataGridVirtualizationOptions, DataGridVirtualizationProp, } from "./config/dataGridVirtualization";
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as je, ref as x, provide as tt, computed as f, watch as h, onBeforeUnmount as pe, h as ge, mergeProps as ot, nextTick as nt, unref as Me, toRef as Ce } from "vue";
2
2
  import { useDataGridRuntime as rt, cloneDataGridFilterSnapshot as lt } from "@affino/datagrid-vue";
3
3
  import { useDataGridAppSelection as at, useDataGridAppRowSelection as it } from "@affino/datagrid-vue/app";
4
- import { r as ut, g as st, h as dt, i as ct, j as ft, b as mt, d as yt, c as vt, k as gt, u as pt, D as wt } from "./chunks/useDataGridAppRowModel-OUmmuuko.js";
5
- import { a as Do, l as Po } from "./chunks/useDataGridAppRowModel-OUmmuuko.js";
4
+ import { r as ut, g as st, h as dt, i as ct, j as ft, b as mt, d as yt, c as vt, k as gt, u as pt, D as wt } from "./chunks/useDataGridAppRowModel-DV-_lFKE.js";
5
+ import { a as Do, l as Po } from "./chunks/useDataGridAppRowModel-DV-_lFKE.js";
6
6
  import { r as St } from "./chunks/dataGridAdvancedFilter-xnME5bRa.js";
7
- import { r as ht } from "./chunks/DataGridGanttStageEntry-BpEn4dPx.js";
7
+ import { r as ht } from "./chunks/DataGridGanttStageEntry-BwdBiQkI.js";
8
8
  import { applyGridTheme as Rt, resolveGridThemeTokens as bt, defaultStyleConfig as I, sugarTheme as Ie, industrialNeutralTheme as Oe } from "@affino/datagrid-theme";
9
9
  import { d as Mt } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
10
10
  function yo() {
@@ -88,10 +88,10 @@ function Gt(e, t) {
88
88
  function Ft(e, t, l, o) {
89
89
  if (t !== "pagination")
90
90
  return null;
91
- const u = 100, a = De(l, u), p = Be(o, 0);
91
+ const u = 100, a = De(l, u), y = Be(o, 0);
92
92
  return e === !0 || e === !1 || e == null ? {
93
93
  pageSize: a,
94
- currentPage: p
94
+ currentPage: y
95
95
  } : {
96
96
  pageSize: De(l ?? e.pageSize, u),
97
97
  currentPage: Be(o ?? e.currentPage, 0)
@@ -193,10 +193,10 @@ function He(e, t, l) {
193
193
  const o = zt(e) ? e : null, u = t(o && "state" in o ? o.state : e, l);
194
194
  if (!u)
195
195
  return null;
196
- const a = o?.viewMode, p = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
196
+ const a = o?.viewMode, y = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
197
197
  return X({
198
198
  state: u,
199
- ...p ? { viewMode: p } : {}
199
+ ...y ? { viewMode: y } : {}
200
200
  });
201
201
  }
202
202
  function Et(e) {
@@ -330,7 +330,7 @@ const _t = je({
330
330
  setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
331
331
  const a = x(null);
332
332
  tt(Mt, a);
333
- let p = null;
333
+ let y = null;
334
334
  const s = rt({
335
335
  rows: f(() => e.rows),
336
336
  rowModel: e.rowModel,
@@ -352,10 +352,10 @@ const _t = je({
352
352
  resolveBodyRowIndexById: S.resolveBodyRowIndexById
353
353
  }, D = () => {
354
354
  if (e.renderMode === "pagination") {
355
- const y = e.pagination ?? { pageSize: 100, currentPage: 0 };
355
+ const v = e.pagination ?? { pageSize: 100, currentPage: 0 };
356
356
  s.api.rows.setPagination({
357
- pageSize: Math.max(1, Math.trunc(y.pageSize)),
358
- currentPage: Math.max(0, Math.trunc(y.currentPage))
357
+ pageSize: Math.max(1, Math.trunc(v.pageSize)),
358
+ currentPage: Math.max(0, Math.trunc(v.currentPage))
359
359
  });
360
360
  return;
361
361
  }
@@ -373,39 +373,39 @@ const _t = je({
373
373
  D();
374
374
  },
375
375
  { immediate: !0, deep: !0 }
376
- ), typeof document < "u" && (p = new MutationObserver(() => {
377
- const y = a.value;
378
- y && Ae(y, e.theme);
379
- }), p.observe(document.documentElement, {
376
+ ), typeof document < "u" && (y = new MutationObserver(() => {
377
+ const v = a.value;
378
+ v && Ae(v, e.theme);
379
+ }), y.observe(document.documentElement, {
380
380
  attributes: !0,
381
381
  attributeFilter: ["class", "data-theme"]
382
382
  })), h(
383
383
  [() => e.theme, a],
384
384
  () => {
385
- const y = a.value;
386
- y && Ae(y, e.theme);
385
+ const v = a.value;
386
+ v && Ae(v, e.theme);
387
387
  },
388
388
  { immediate: !0, deep: !0 }
389
389
  );
390
- const C = s.api.events.on("rows:changed", (y) => {
391
- o("cell-change", y);
392
- }), b = s.api.events.on("selection:changed", (y) => {
393
- o("selection-change", y);
394
- }), j = s.api.events.on("row-selection:changed", (y) => {
395
- o("row-selection-change", y);
390
+ const C = s.api.events.on("rows:changed", (v) => {
391
+ o("cell-change", v);
392
+ }), b = s.api.events.on("selection:changed", (v) => {
393
+ o("selection-change", v);
394
+ }), j = s.api.events.on("row-selection:changed", (v) => {
395
+ o("row-selection-change", v);
396
396
  });
397
397
  pe(() => {
398
- C(), b(), j(), p?.disconnect(), p = null;
398
+ C(), b(), j(), y?.disconnect(), y = null;
399
399
  });
400
400
  const F = f(() => {
401
- const y = s.virtualWindow.value;
401
+ const v = s.virtualWindow.value;
402
402
  return {
403
- ...y ?? {},
404
- rowTotal: y?.rowTotal ?? s.rowPartition.value.bodyRowCount,
403
+ ...v ?? {},
404
+ rowTotal: v?.rowTotal ?? s.rowPartition.value.bodyRowCount,
405
405
  colTotal: s.columnSnapshot.value.visibleColumns.length
406
406
  };
407
- }), v = () => {
408
- const y = () => {
407
+ }), g = () => {
408
+ const v = () => {
409
409
  const M = a.value?.querySelector(".grid-body-viewport");
410
410
  if (!M)
411
411
  return !1;
@@ -415,20 +415,20 @@ const _t = je({
415
415
  M.focus();
416
416
  }
417
417
  return typeof document < "u" && document.activeElement === M;
418
- }, g = (M) => {
418
+ }, p = (M) => {
419
419
  nt(() => {
420
- if (!(y() || M >= 3)) {
420
+ if (!(v() || M >= 3)) {
421
421
  if (typeof window < "u") {
422
422
  window.requestAnimationFrame(() => {
423
- g(M + 1);
423
+ p(M + 1);
424
424
  });
425
425
  return;
426
426
  }
427
- g(M + 1);
427
+ p(M + 1);
428
428
  }
429
429
  });
430
430
  };
431
- g(0);
431
+ p(0);
432
432
  };
433
433
  return u({
434
434
  api: s.api,
@@ -443,7 +443,7 @@ const _t = je({
443
443
  getBodyRowAtIndex: S.getBodyRowAtIndex,
444
444
  resolveBodyRowIndexById: S.resolveBodyRowIndexById,
445
445
  virtualWindow: s.virtualWindow,
446
- restoreFocus: v,
446
+ restoreFocus: g,
447
447
  start: s.start,
448
448
  stop: s.stop
449
449
  }), () => ge(
@@ -497,14 +497,14 @@ function kt(e) {
497
497
  } : null;
498
498
  }
499
499
  function Ut(e) {
500
- let t = null, l = null, o = !1, u = null, a = null, p = null, s = null, S = null, R = null, D = null, C = null, b = null;
500
+ let t = null, l = null, o = !1, u = null, a = null, y = null, s = null, S = null, R = null, D = null, C = null, b = null;
501
501
  const j = () => {
502
502
  t?.(), l?.(), t = null, l = null;
503
503
  }, F = () => {
504
504
  const n = e.gridRef.value;
505
505
  return !n || n.api.lifecycle.state === "disposed" ? null : n;
506
- }, v = () => F()?.api ?? null, y = () => {
507
- const n = v()?.columns;
506
+ }, g = () => F()?.api ?? null, v = () => {
507
+ const n = g()?.columns;
508
508
  if (!n)
509
509
  return null;
510
510
  const d = n.getSnapshot(), i = {}, m = {}, A = {};
@@ -516,13 +516,13 @@ function Ut(e) {
516
516
  widths: m,
517
517
  pins: A
518
518
  };
519
- }, g = () => {
519
+ }, p = () => {
520
520
  o || (o = !0, queueMicrotask(() => {
521
521
  o = !1;
522
- const n = y(), d = v();
522
+ const n = v(), d = g();
523
523
  if (n) {
524
524
  const i = B(n);
525
- R = i, i !== p && (p = i, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
525
+ R = i, i !== y && (y = i, e.emit.columnState(n), e.emit.columnOrder(n.order), e.emit.hiddenColumnKeys(
526
526
  Object.entries(n.visibility).filter(([, m]) => !m).map(([m]) => m)
527
527
  ), e.emit.columnWidths(n.widths), e.emit.columnPins(n.pins));
528
528
  }
@@ -534,13 +534,13 @@ function Ut(e) {
534
534
  }
535
535
  }));
536
536
  }, M = () => {
537
- const n = v();
537
+ const n = g();
538
538
  !n || e.props.sortModel === void 0 && e.props.filterModel === void 0 || n.rows.setSortAndFilterModel({
539
539
  sortModel: e.props.sortModel ?? [],
540
540
  filterModel: e.props.filterModel ?? null
541
541
  });
542
542
  }, Z = () => {
543
- const n = v()?.columns;
543
+ const n = g()?.columns;
544
544
  return n ? new Set(n.getSnapshot().columns.map((d) => d.key)) : null;
545
545
  }, ee = (n) => {
546
546
  const d = /* @__PURE__ */ new Set();
@@ -567,7 +567,7 @@ function Ut(e) {
567
567
  return !1;
568
568
  return !0;
569
569
  }, E = (n) => z(n.columns), U = (n) => {
570
- const d = v();
570
+ const d = g();
571
571
  if (!d)
572
572
  return !1;
573
573
  d.columns.setOrder(n.order);
@@ -580,7 +580,7 @@ function Ut(e) {
580
580
  return !0;
581
581
  }, K = () => {
582
582
  if (b) {
583
- const n = b, d = v();
583
+ const n = b, d = g();
584
584
  if (d) {
585
585
  const i = d.state.migrate(n.state, { strict: n.options?.strict });
586
586
  i && E(i) && (b = null, d.state.set(i, n.options), a = B(n.state));
@@ -597,16 +597,16 @@ function Ut(e) {
597
597
  }), U(n.columnState);
598
598
  }
599
599
  }, V = () => {
600
- const n = v();
600
+ const n = g();
601
601
  !n || e.props.groupBy === void 0 || n.rows.setGroupBy(e.props.groupBy ?? null);
602
602
  }, W = () => {
603
- const n = v();
603
+ const n = g();
604
604
  !n || e.props.aggregationModel === void 0 || n.rows.setAggregationModel(e.props.aggregationModel ?? null);
605
605
  }, H = () => {
606
- const n = v();
606
+ const n = g();
607
607
  !n || e.props.pivotModel === void 0 || n.pivot.setModel(e.props.pivotModel ?? null);
608
608
  }, P = () => {
609
- const n = v();
609
+ const n = g();
610
610
  if (!n || e.props.columnState === void 0 && e.props.columnOrder === void 0 && e.props.hiddenColumnKeys === void 0 && e.props.columnWidths === void 0 && e.props.columnPins === void 0)
611
611
  return;
612
612
  const d = B({
@@ -644,7 +644,7 @@ function Ut(e) {
644
644
  u = d;
645
645
  }
646
646
  }, T = () => {
647
- const n = v();
647
+ const n = g();
648
648
  if (!n || e.props.state == null)
649
649
  return;
650
650
  const d = B(e.props.state);
@@ -657,34 +657,34 @@ function Ut(e) {
657
657
  const i = n.state.migrate(e.props.state, { strict: e.props.stateOptions?.strict });
658
658
  i && E(i) && (n.state.set(i, e.props.stateOptions ?? {}), a = d);
659
659
  }, _ = () => {
660
- const n = v();
660
+ const n = g();
661
661
  n && (n.view.setRowHeightMode(e.props.rowHeightMode), n.view.setBaseRowHeight(Math.max(24, Math.trunc(e.props.baseRowHeight))));
662
662
  }, N = () => {
663
663
  const n = F();
664
664
  n && (u = null, a = null, j(), t = n.rowModel.subscribe(() => {
665
- g();
665
+ p();
666
666
  }), l = n.columnModel.subscribe(() => {
667
- g();
668
- }), T(), P(), M(), V(), W(), H(), _(), K(), g(), e.emit.ready({ api: n.api }));
669
- }, q = () => v()?.state.get() ?? null, te = (n, d) => v()?.state.migrate(n, d) ?? null, L = (n) => z(n) ? (u = B({
667
+ p();
668
+ }), T(), P(), M(), V(), W(), H(), _(), K(), p(), e.emit.ready({ api: n.api }));
669
+ }, q = () => g()?.state.get() ?? null, te = (n, d) => g()?.state.migrate(n, d) ?? null, L = (n) => z(n) ? (u = B({
670
670
  columnState: n,
671
671
  columnOrder: null,
672
672
  hiddenColumnKeys: null,
673
673
  columnWidths: null,
674
674
  columnPins: null
675
- }), C = null, U(n) ? (g(), !0) : (C = { columnState: n }, !0)) : (C = { columnState: n }, !0), oe = (n, d) => {
676
- const i = v();
675
+ }), C = null, U(n) ? (p(), !0) : (C = { columnState: n }, !0)) : (C = { columnState: n }, !0), oe = (n, d) => {
676
+ const i = g();
677
677
  if (!i)
678
678
  return b = { state: n, options: d }, !0;
679
679
  const m = i.state.migrate(n, { strict: d?.strict });
680
- return m ? E(m) ? (i.state.set(m, d), a = B(n), b = null, g(), !0) : (b = { state: n, options: d }, !0) : !1;
681
- }, ne = () => v()?.pivot.exportLayout() ?? null, J = () => v()?.pivot.exportInterop() ?? null, re = (n, d) => {
682
- const i = v();
683
- return i ? (i.pivot.importLayout(n, d), g(), !0) : !1;
680
+ return m ? E(m) ? (i.state.set(m, d), a = B(n), b = null, p(), !0) : (b = { state: n, options: d }, !0) : !1;
681
+ }, ne = () => g()?.pivot.exportLayout() ?? null, J = () => g()?.pivot.exportInterop() ?? null, re = (n, d) => {
682
+ const i = g();
683
+ return i ? (i.pivot.importLayout(n, d), p(), !0) : !1;
684
684
  }, k = () => {
685
- v()?.rows.expandAllGroups(), g();
685
+ g()?.rows.expandAllGroups(), p();
686
686
  }, le = () => {
687
- v()?.rows.collapseAllGroups(), g();
687
+ g()?.rows.collapseAllGroups(), p();
688
688
  };
689
689
  h(
690
690
  () => e.gridRef.value,
@@ -695,13 +695,13 @@ function Ut(e) {
695
695
  ), h(
696
696
  () => e.props.columns,
697
697
  () => {
698
- u = null, a = null, T(), P(), K(), g();
698
+ u = null, a = null, T(), P(), K(), p();
699
699
  },
700
700
  { deep: !0 }
701
701
  ), h(
702
702
  () => [e.props.state, e.props.stateOptions],
703
703
  () => {
704
- T(), P(), M(), V(), W(), H(), _(), K(), g();
704
+ T(), P(), M(), V(), W(), H(), _(), K(), p();
705
705
  },
706
706
  { deep: !0 }
707
707
  ), h(
@@ -713,37 +713,37 @@ function Ut(e) {
713
713
  e.props.columnPins
714
714
  ],
715
715
  () => {
716
- P(), K(), g();
716
+ P(), K(), p();
717
717
  },
718
718
  { deep: !0 }
719
719
  ), h(
720
720
  () => [e.props.sortModel, e.props.filterModel],
721
721
  () => {
722
- M(), g();
722
+ M(), p();
723
723
  },
724
724
  { deep: !0 }
725
725
  ), h(
726
726
  () => e.props.groupBy,
727
727
  () => {
728
- V(), g();
728
+ V(), p();
729
729
  },
730
730
  { deep: !0 }
731
731
  ), h(
732
732
  () => e.props.aggregationModel,
733
733
  () => {
734
- W(), g();
734
+ W(), p();
735
735
  },
736
736
  { deep: !0 }
737
737
  ), h(
738
738
  () => e.props.pivotModel,
739
739
  () => {
740
- H(), g();
740
+ H(), p();
741
741
  },
742
742
  { deep: !0 }
743
743
  ), h(
744
744
  () => [e.props.rowHeightMode, e.props.baseRowHeight],
745
745
  () => {
746
- _(), g();
746
+ _(), p();
747
747
  }
748
748
  );
749
749
  const Y = () => {
@@ -752,10 +752,10 @@ function Ut(e) {
752
752
  return pe(() => {
753
753
  Y();
754
754
  }), {
755
- emitSnapshotUpdates: g,
755
+ emitSnapshotUpdates: p,
756
756
  handleGridReady: N,
757
757
  dispose: Y,
758
- getColumnState: y,
758
+ getColumnState: v,
759
759
  getState: q,
760
760
  migrateState: te,
761
761
  applyColumnState: L,
@@ -858,16 +858,16 @@ function Xt(e, t) {
858
858
  const a = l.get(String(u ?? "").trim());
859
859
  if (!a)
860
860
  return;
861
- const p = o.data;
861
+ const y = o.data;
862
862
  if (typeof a.valueGetter == "function")
863
- return a.valueGetter(p);
863
+ return a.valueGetter(y);
864
864
  if (typeof a.accessor == "function")
865
- return a.accessor(p);
865
+ return a.accessor(y);
866
866
  const s = typeof a.field == "string" ? a.field.trim() : "";
867
867
  if (!s)
868
868
  return;
869
- const S = p[s];
870
- return typeof S < "u" ? S : Qt(p, s);
869
+ const S = y[s];
870
+ return typeof S < "u" ? S : Qt(y, s);
871
871
  };
872
872
  }
873
873
  function Zt() {
@@ -930,13 +930,19 @@ function eo(e) {
930
930
  };
931
931
  }
932
932
  function to(e, t) {
933
- if (e?.focusedRow !== t?.focusedRow)
933
+ if (e?.focusedRow !== t?.focusedRow || (e?.mode ?? "explicit") !== (t?.mode ?? "explicit"))
934
934
  return !1;
935
935
  const l = e?.selectedRows ?? [], o = t?.selectedRows ?? [];
936
936
  if (l.length !== o.length)
937
937
  return !1;
938
- for (let u = 0; u < l.length; u += 1)
939
- if (l[u] !== o[u])
938
+ for (let y = 0; y < l.length; y += 1)
939
+ if (l[y] !== o[y])
940
+ return !1;
941
+ const u = e?.excludedRows ?? [], a = t?.excludedRows ?? [];
942
+ if (u.length !== a.length)
943
+ return !1;
944
+ for (let y = 0; y < u.length; y += 1)
945
+ if (u[y] !== a[y])
940
946
  return !1;
941
947
  return !0;
942
948
  }
@@ -1263,14 +1269,14 @@ const ro = {
1263
1269
  ready: (e) => !0
1264
1270
  },
1265
1271
  setup(e, { attrs: t, slots: l, emit: o, expose: u }) {
1266
- const a = x(null), p = Yt(), s = x(null), S = x(null), R = x([]);
1272
+ const a = x(null), y = Yt(), s = x(null), S = x(null), R = x([]);
1267
1273
  let D = null, C = !1;
1268
- const b = x(e.viewMode === "gantt" ? "gantt" : "table"), j = x(e.state ?? null), F = f(() => $t(e.history)), v = f(() => ut(e.chrome)), y = f(() => Gt(e.renderMode, e.pagination)), g = f(() => Ft(
1274
+ const b = x(e.viewMode === "gantt" ? "gantt" : "table"), j = x(e.state ?? null), F = f(() => $t(e.history)), g = f(() => ut(e.chrome)), v = f(() => Gt(e.renderMode, e.pagination)), p = f(() => Ft(
1269
1275
  e.pagination,
1270
- y.value,
1276
+ v.value,
1271
1277
  e.pageSize,
1272
1278
  e.currentPage
1273
- )), M = f(() => st(e.columnMenu)), Z = f(() => dt(e.cellMenu)), ee = f(() => ct(e.rowIndexMenu)), z = f(() => ft(e.columnLayout)), E = f(() => mt(e.columnReorder)), U = f(() => Wt(e.aggregations)), K = f(() => St(e.advancedFilter)), V = f(() => xt(e.findReplace)), W = f(() => Kt(e.gridLines)), H = f(() => Pt(e.groupBy)), P = f(() => e.state ?? j.value), T = f(() => e.sortModel !== void 0 ? e.sortModel : P.value?.rows?.snapshot?.sortModel), _ = f(() => e.filterModel !== void 0 ? e.filterModel : lt(P.value?.rows?.snapshot?.filterModel ?? null)), N = f(() => e.groupBy !== void 0 ? H.value ?? null : P.value?.rows?.snapshot?.groupBy ?? null), q = f(() => e.pivotModel !== void 0 ? e.pivotModel : P.value?.rows?.snapshot?.pivotModel ?? null), te = f(() => Tt(e.virtualization, y.value)), L = f(() => Ht(e.layoutMode, e.minRows, e.maxRows)), oe = f(() => ht(e.placeholderRows)), ne = f(() => yt(e.rowReorder)), J = f(() => {
1279
+ )), M = f(() => st(e.columnMenu)), Z = f(() => dt(e.cellMenu)), ee = f(() => ct(e.rowIndexMenu)), z = f(() => ft(e.columnLayout)), E = f(() => mt(e.columnReorder)), U = f(() => Wt(e.aggregations)), K = f(() => St(e.advancedFilter)), V = f(() => xt(e.findReplace)), W = f(() => Kt(e.gridLines)), H = f(() => Pt(e.groupBy)), P = f(() => e.state ?? j.value), T = f(() => e.sortModel !== void 0 ? e.sortModel : P.value?.rows?.snapshot?.sortModel), _ = f(() => e.filterModel !== void 0 ? e.filterModel : lt(P.value?.rows?.snapshot?.filterModel ?? null)), N = f(() => e.groupBy !== void 0 ? H.value ?? null : P.value?.rows?.snapshot?.groupBy ?? null), q = f(() => e.pivotModel !== void 0 ? e.pivotModel : P.value?.rows?.snapshot?.pivotModel ?? null), te = f(() => Tt(e.virtualization, v.value)), L = f(() => Ht(e.layoutMode, e.minRows, e.maxRows)), oe = f(() => ht(e.placeholderRows)), ne = f(() => yt(e.rowReorder)), J = f(() => {
1274
1280
  const r = e.clientRowModelOptions?.readFilterCell;
1275
1281
  return Xt(
1276
1282
  e.columns,
@@ -1460,7 +1466,7 @@ const ro = {
1460
1466
  })));
1461
1467
  }, de = f(() => {
1462
1468
  const r = F.value.adapter;
1463
- return !F.value.enabled || !r ? p : {
1469
+ return !F.value.enabled || !r ? y : {
1464
1470
  canUndo: () => r.canUndo(),
1465
1471
  canRedo: () => r.canRedo(),
1466
1472
  runHistoryAction: (c) => r.runHistoryAction(c)
@@ -1543,7 +1549,7 @@ const ro = {
1543
1549
  filterModel: _.value,
1544
1550
  groupBy: N.value,
1545
1551
  pivotModel: q.value,
1546
- renderMode: y.value,
1552
+ renderMode: v.value,
1547
1553
  virtualization: te.value,
1548
1554
  columnMenu: M.value,
1549
1555
  cellMenu: Z.value,
@@ -1574,7 +1580,7 @@ const ro = {
1574
1580
  viewMode: b.value,
1575
1581
  gantt: e.gantt,
1576
1582
  history: F.value,
1577
- chrome: v.value,
1583
+ chrome: g.value,
1578
1584
  registerHistoryController: Ye,
1579
1585
  registerStructuralRowActionRunner: Re,
1580
1586
  reportToolbarModules: $e,
@@ -1593,8 +1599,8 @@ const ro = {
1593
1599
  columns: le.value,
1594
1600
  theme: e.theme,
1595
1601
  layoutMode: L.value.layoutMode,
1596
- renderMode: y.value,
1597
- pagination: g.value,
1602
+ renderMode: v.value,
1603
+ pagination: p.value,
1598
1604
  plugins: e.plugins,
1599
1605
  services: ke.value,
1600
1606
  startupOrder: e.startupOrder,
package/dist/internal.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { d as t, r } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
2
2
  import { buildDataGridChromePaneModel as i, buildDataGridChromeRenderModel as d } from "@affino/datagrid-chrome";
3
- import { D as l, a as n, r as G, b as D, c as S, d as u, u as g, e as b, f as T } from "./chunks/useDataGridAppRowModel-OUmmuuko.js";
4
- import { _ as p, a as c, c as R, b as x, d as C, p as f, u as v, e as M, f as h, g as w, h as y, i as F, j as P, k as A, l as O, m as _, n as E, o as H } from "./chunks/DataGridGanttStageEntry-BpEn4dPx.js";
3
+ import { D as l, a as n, r as G, b as D, c as S, d as u, u as g, e as b, f as T } from "./chunks/useDataGridAppRowModel-DV-_lFKE.js";
4
+ import { _ as p, a as c, c as R, b as x, d as C, p as f, u as v, e as M, f as h, g as w, h as y, i as F, j as P, k as A, l as O, m as _, n as E, o as H } from "./chunks/DataGridGanttStageEntry-BwdBiQkI.js";
5
5
  import { _ as V } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-DxZakgyj.js";
6
6
  import { _ as k } from "./chunks/DataGridFindReplacePopover.vue_vue_type_script_setup_true_lang-BEVRKG31.js";
7
7
  import { buildDataGridTimelineRenderModels as B, normalizeDataGridGanttOptions as I, resolveDataGridTimelineRange as L } from "@affino/datagrid-gantt";
@@ -3,7 +3,28 @@ export type DataGridColumnMenuItemKey = (typeof DATAGRID_COLUMN_MENU_ITEM_KEYS)[
3
3
  export declare const DATAGRID_COLUMN_MENU_TRIGGER_MODES: readonly ["button", "contextmenu", "button+contextmenu"];
4
4
  export type DataGridColumnMenuTriggerMode = (typeof DATAGRID_COLUMN_MENU_TRIGGER_MODES)[number];
5
5
  export type DataGridColumnMenuCustomItemPlacement = "start" | "end" | `before:${DataGridColumnMenuItemKey}` | `after:${DataGridColumnMenuItemKey}`;
6
- export type DataGridColumnMenuItemLabels = Readonly<Partial<Record<DataGridColumnMenuItemKey, string>>>;
6
+ export interface DataGridColumnMenuLabels {
7
+ sort?: string;
8
+ group?: string;
9
+ pin?: string;
10
+ filter?: string;
11
+ activeState?: string;
12
+ groupLevel?: string;
13
+ textFilterPlaceholder?: string;
14
+ valueSearchPlaceholder?: string;
15
+ valueFilterDisabledByRowLimitHint?: string;
16
+ valueFilterUnavailableHint?: string;
17
+ filterValuesAriaLabel?: string;
18
+ loadingValues?: string;
19
+ unableToLoadValues?: string;
20
+ noMatchingValues?: string;
21
+ noValues?: string;
22
+ selectedValuesSummary?: string;
23
+ valuesWindowSummary?: string;
24
+ selectAtLeastOneValueHint?: string;
25
+ blankValue?: string;
26
+ }
27
+ export type DataGridColumnMenuItemLabels = Readonly<DataGridColumnMenuLabels>;
7
28
  export type DataGridColumnMenuDisabledReasons = Readonly<Partial<Record<DataGridColumnMenuItemKey, string>>>;
8
29
  export declare const DATAGRID_COLUMN_MENU_ACTION_KEYS: readonly ["sortAsc", "sortDesc", "clearSort", "toggleGroup", "pinMenu", "pinLeft", "pinRight", "unpin", "clearFilter", "addCurrentSelectionToFilter", "selectAllValues", "clearAllValues", "applyFilter", "cancelFilter"];
9
30
  export type DataGridColumnMenuActionKey = (typeof DATAGRID_COLUMN_MENU_ACTION_KEYS)[number];
@@ -0,0 +1,8 @@
1
+ import type { DataGridRowModel } from "@affino/datagrid-vue";
2
+ export type DataGridTableStageAutoSizeRowModel<TRow> = Pick<DataGridRowModel<TRow>, "getSnapshot" | "getRow" | "getRowCount" | "getRowsInRange">;
3
+ export interface ResolveDataGridTableStageAutoSizeRowsInput<TRow> {
4
+ rowModel: Partial<DataGridTableStageAutoSizeRowModel<TRow>> | null | undefined;
5
+ fallbackRows: readonly TRow[];
6
+ sampleLimit: number;
7
+ }
8
+ export declare function resolveDataGridTableStageAutoSizeRows<TRow>(input: ResolveDataGridTableStageAutoSizeRowsInput<TRow>): readonly TRow[];
@@ -1,5 +1,5 @@
1
1
  import { type ComputedRef, type CSSProperties, type Ref } from "vue";
2
- import type { DataGridFilterSnapshot, DataGridGroupBySpec, DataGridGroupExpansionSnapshot, DataGridPaginationSnapshot, DataGridRowNode, DataGridColumnSnapshot, DataGridRowSelectionSnapshot, DataGridSelectionSnapshot, DataGridSortState, UseDataGridRuntimeResult } from "@affino/datagrid-vue";
2
+ import type { DataGridFilterSnapshot, DataGridGroupBySpec, DataGridGroupExpansionSnapshot, DataGridPaginationSnapshot, DataGridRowNode, DataGridRowModel, DataGridColumnSnapshot, DataGridRowSelectionSnapshot, DataGridSelectionSnapshot, DataGridSortState, UseDataGridRuntimeResult } from "@affino/datagrid-vue";
3
3
  import type { DataGridCopyRange } from "@affino/datagrid-vue/advanced";
4
4
  import { type DataGridAppPasteOptions } from "@affino/datagrid-vue/app";
5
5
  import type { DataGridCellEditablePredicate } from "../dataGridEditability";
@@ -73,6 +73,9 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
73
73
  runtimeRowModel?: {
74
74
  subscribe: UseDataGridRuntimeResult<TRow>["rowModel"]["subscribe"];
75
75
  getSnapshot: UseDataGridRuntimeResult<TRow>["rowModel"]["getSnapshot"];
76
+ getRow?: DataGridRowModel<TRow>["getRow"];
77
+ getRowCount?: DataGridRowModel<TRow>["getRowCount"];
78
+ getRowsInRange?: DataGridRowModel<TRow>["getRowsInRange"];
76
79
  dataSource?: {
77
80
  resolveFillBoundary?: (request: DataGridAppResolveFillBoundaryRequest) => Promise<DataGridAppResolveFillBoundaryResult> | DataGridAppResolveFillBoundaryResult;
78
81
  commitFillOperation?: (request: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@affino/datagrid-vue-app",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "Declarative Vue DataGrid component for Affino",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -41,10 +41,10 @@
41
41
  "dependencies": {
42
42
  "@affino/menu-vue": "^2.1.1",
43
43
  "@affino/popover-vue": "^1.1.0",
44
- "@affino/datagrid-chrome": "0.1.1",
45
44
  "@affino/datagrid-gantt": "0.1.2",
45
+ "@affino/datagrid-chrome": "0.1.1",
46
46
  "@affino/datagrid-theme": "0.2.2",
47
- "@affino/datagrid-vue": "0.3.34"
47
+ "@affino/datagrid-vue": "0.3.36"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "vue": "^3.3.0"