compote-ui 0.42.4 → 0.42.6

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,8 @@
1
- import { columnVisibilityFeature, columnResizingFeature, columnSizingFeature, columnFilteringFeature, columnFacetingFeature, columnPinningFeature, columnOrderingFeature, createSortedRowModel, createFilteredRowModel, createFacetedRowModel, createFacetedMinMaxValues, createFacetedUniqueValues, createTable as createTanStackTable, filterFns, renderComponent, renderSnippet, rowSelectionFeature, rowSortingFeature, sortFns, tableFeatures } from '@tanstack/svelte-table';
1
+ import { columnVisibilityFeature, columnResizingFeature, columnSizingFeature, columnFilteringFeature, columnFacetingFeature, columnPinningFeature, columnOrderingFeature, createSortedRowModel, createFilteredRowModel,
2
+ // createFacetedRowModel,
3
+ // createFacetedMinMaxValues,
4
+ // createFacetedUniqueValues,
5
+ createTable as createTanStackTable, filterFns, renderComponent, renderSnippet, rowSelectionFeature, rowSortingFeature, sortFns, tableFeatures } from '@tanstack/svelte-table';
2
6
  import { createAtom } from '@tanstack/svelte-store';
3
7
  import { useLocaleContext } from '@ark-ui/svelte/locale';
4
8
  const dataTableFeatures = tableFeatures({
@@ -29,10 +33,10 @@ export function createTable(options) {
29
33
  _features: dataTableFeatures,
30
34
  _rowModels: {
31
35
  sortedRowModel: createSortedRowModel(sortFns),
32
- filteredRowModel: createFilteredRowModel({ ...filterFns, oneOf: oneOfFilterFn }),
33
- facetedRowModel: createFacetedRowModel(),
34
- facetedMinMaxValues: createFacetedMinMaxValues(),
35
- facetedUniqueValues: createFacetedUniqueValues()
36
+ filteredRowModel: createFilteredRowModel({ ...filterFns, oneOf: oneOfFilterFn })
37
+ // facetedRowModel: createFacetedRowModel(),
38
+ // facetedMinMaxValues: createFacetedMinMaxValues(),
39
+ // facetedUniqueValues: createFacetedUniqueValues()
36
40
  },
37
41
  columnResizeMode: options.columnResizeMode,
38
42
  getRowId: options.getRowId,
@@ -42,23 +42,9 @@
42
42
  ...rest
43
43
  }: Props = $props();
44
44
 
45
- const tableStateKey = $derived(JSON.stringify(table.store.state));
46
- function trackTableState() {
47
- return tableStateKey;
48
- }
49
-
50
- const rowModel = $derived.by(() => {
51
- trackTableState();
52
- return table.getRowModel();
53
- });
54
- const headerGroups = $derived.by(() => {
55
- trackTableState();
56
- return table.getHeaderGroups();
57
- });
58
- const visibleLeafColumns = $derived.by(() => {
59
- trackTableState();
60
- return table.getVisibleLeafColumns();
61
- });
45
+ const rowModel = $derived(table.getRowModel());
46
+ const headerGroups = $derived(table.getHeaderGroups());
47
+ const visibleLeafColumns = $derived(table.getVisibleLeafColumns());
62
48
  const growColumn = $derived(visibleLeafColumns.find((col) => getColumnMeta(col.columnDef)?.grow));
63
49
  const hasGrowColumn = $derived(growColumn !== undefined);
64
50
  const visibleColumnCount = $derived(visibleLeafColumns.length);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.42.4",
3
+ "version": "0.42.6",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "dev": "vite dev --open",