@tanstack/svelte-table 8.10.7 → 8.11.1

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.
@@ -558,6 +558,7 @@
558
558
  getDefaultOptions: table => {
559
559
  return {
560
560
  columnResizeMode: 'onEnd',
561
+ columnResizeDirection: 'ltr',
561
562
  onColumnSizingChange: makeStateUpdater('columnSizing', table),
562
563
  onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table)
563
564
  };
@@ -639,7 +640,8 @@
639
640
  }
640
641
  table.setColumnSizingInfo(old => {
641
642
  var _old$startOffset, _old$startSize;
642
- const deltaOffset = clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0);
643
+ const deltaDirection = table.options.columnResizeDirection === 'rtl' ? -1 : 1;
644
+ const deltaOffset = (clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0)) * deltaDirection;
643
645
  const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);
644
646
  old.columnSizingStart.forEach(_ref3 => {
645
647
  let [columnId, headerSize] = _ref3;
@@ -1149,7 +1151,6 @@
1149
1151
  // () => [column.getFacetedRowModel()],
1150
1152
  // facetedRowModel => getRowModelMinMaxValues(facetedRowModel, column.id),
1151
1153
  },
1152
-
1153
1154
  createRow: (row, table) => {
1154
1155
  row.columnFilters = {};
1155
1156
  row.columnFiltersMeta = {};
@@ -1943,7 +1944,6 @@
1943
1944
  // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1944
1945
  };
1945
1946
  },
1946
-
1947
1947
  createTable: table => {
1948
1948
  table.setRowSelection = updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater);
1949
1949
  table.resetRowSelection = defaultState => {
@@ -3075,6 +3075,7 @@
3075
3075
  // helper.accessor('nested.bar', {
3076
3076
  // cell: info => info.getValue(),
3077
3077
  // })
3078
+
3078
3079
  function createColumnHelper() {
3079
3080
  return {
3080
3081
  accessor: (accessor, column) => {
@@ -3619,7 +3620,6 @@
3619
3620
  // nonGroupedRowsById[subRow.id] = subRow;
3620
3621
  // }
3621
3622
  });
3622
-
3623
3623
  return row;
3624
3624
  });
3625
3625
  return aggregatedGroupedRows;
@@ -3636,7 +3636,6 @@
3636
3636
  // nonGroupedRowsById[subRow.id] = subRow;
3637
3637
  // }
3638
3638
  });
3639
-
3640
3639
  return {
3641
3640
  rows: groupedRows,
3642
3641
  flatRows: groupedFlatRows,