@svgrid/grid 2.2.32 → 2.2.34

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.
Files changed (91) hide show
  1. package/dist/DockNodeView.svelte +1 -1
  2. package/dist/GridFooter.svelte +46 -47
  3. package/dist/GridMenus.svelte +0 -77
  4. package/dist/SvDateRangeInput.svelte +1 -1
  5. package/dist/SvGrid.css +10 -0
  6. package/dist/SvGrid.svelte +2 -25
  7. package/dist/SvGridChart.svelte +2 -10
  8. package/dist/SvGridSelect.svelte +0 -2
  9. package/dist/SvKbd.svelte +1 -1
  10. package/dist/SvList.svelte +1 -1
  11. package/dist/SvMenubar.svelte +1 -1
  12. package/dist/SvMultiSelect.svelte +0 -1
  13. package/dist/SvOtpInput.svelte +1 -1
  14. package/dist/SvRichText.svelte +4 -0
  15. package/dist/SvTour.svelte +4 -0
  16. package/dist/SvTreeSelect.svelte +0 -2
  17. package/dist/cdn/{GridMenus-Cyk3qpJ7.js → GridMenus-T-bZNprc.js} +153 -152
  18. package/dist/cdn/{GridMenus-C6ixSGWW.js → GridMenus-oQYElQll.js} +5 -7
  19. package/dist/cdn/{SvDateTimePicker-ClqtVIj3.js → SvDateTimePicker-CHnUkWcH.js} +163 -163
  20. package/dist/cdn/{SvDateTimePicker-CdqaP61H.js → SvDateTimePicker-CRQH_U7E.js} +570 -553
  21. package/dist/cdn/{SvGridChart-BhnFdLd0.js → SvGridChart-BEJmNNx9.js} +1 -1
  22. package/dist/cdn/{SvGridChart-BcLCYvw9.js → SvGridChart-BwVos976.js} +27 -20
  23. package/dist/cdn/{SvGridChartPanel-Cmx9DHAS.js → SvGridChartPanel-BOknOkrP.js} +2 -2
  24. package/dist/cdn/{SvGridChartPanel-DvjwxLvK.js → SvGridChartPanel-D2PjII4O.js} +22 -14
  25. package/dist/cdn/{SvGridChartView-PwqI4s02.js → SvGridChartView-00LPUHL1.js} +3 -3
  26. package/dist/cdn/{SvGridChartView-B40DTJSX.js → SvGridChartView-BhUEJ5ki.js} +2 -2
  27. package/dist/cdn/{SvGridDropdown-Dh-2ej8j.js → SvGridDropdown-D13MtJ2j.js} +5 -4
  28. package/dist/cdn/{chart-T1usDN0o.js → chart-i4XcXyHJ.js} +12 -10
  29. package/dist/cdn/disclose-version-Dr7rEVv-.js +2866 -0
  30. package/dist/cdn/{export-format-JT5pWVT8.js → export-format-Cv1Dll6k.js} +66 -245
  31. package/dist/cdn/{src-BgHjWF0Q.js → src-72QTH8lh.js} +9006 -8811
  32. package/dist/cdn/{src-CgD-wiuS.js → src-Cm7C_WOZ.js} +9206 -8927
  33. package/dist/cdn/svgrid.js +9 -9
  34. package/dist/cdn/svgrid.svelte-external.js +8 -8
  35. package/dist/chart.d.ts +2 -0
  36. package/dist/chart.js +1 -4
  37. package/dist/columns.js +9 -2
  38. package/dist/createMenu.svelte.js +0 -1
  39. package/dist/createPopoverSelect.svelte.d.ts +2 -2
  40. package/dist/editing.js +1 -1
  41. package/dist/export-format.js +3 -0
  42. package/dist/selection.js +0 -1
  43. package/package.json +3 -2
  44. package/src/DockNodeView.svelte +1 -1
  45. package/src/GridFooter.svelte +46 -47
  46. package/src/GridMenus.svelte +0 -77
  47. package/src/SvCalendar.test.ts +1 -1
  48. package/src/SvDateRangeInput.svelte +1 -1
  49. package/src/SvGrid.controller.svelte.ts +0 -5
  50. package/src/SvGrid.css +10 -0
  51. package/src/SvGrid.svelte +2 -25
  52. package/src/SvGrid.types.ts +0 -1
  53. package/src/SvGridChart.svelte +2 -10
  54. package/src/SvGridSelect.svelte +0 -2
  55. package/src/SvKbd.svelte +1 -1
  56. package/src/SvList.svelte +1 -1
  57. package/src/SvMenubar.svelte +1 -1
  58. package/src/SvMultiSelect.svelte +0 -1
  59. package/src/SvOtpInput.svelte +1 -1
  60. package/src/SvRichText.svelte +4 -0
  61. package/src/SvTour.svelte +4 -0
  62. package/src/SvTreeSelect.svelte +0 -2
  63. package/src/ai.test.ts +1 -1
  64. package/src/build-api.ts +0 -105
  65. package/src/cell-formatting.test.ts +1 -1
  66. package/src/cell-render.ts +0 -94
  67. package/src/chart.ts +1 -2
  68. package/src/clipboard.ts +0 -102
  69. package/src/columns.ts +7 -117
  70. package/src/createMenu.svelte.ts +0 -1
  71. package/src/editing.ts +2 -105
  72. package/src/editor-registry.grid.test.ts +0 -2
  73. package/src/export-format.ts +3 -0
  74. package/src/features.ts +0 -90
  75. package/src/keyboard-handlers.coverage.test.ts +1 -1
  76. package/src/keyboard-handlers.ts +0 -120
  77. package/src/menus.test.ts +0 -1
  78. package/src/menus.ts +0 -112
  79. package/src/new-features.test.ts +3 -1
  80. package/src/row-drag.test.ts +1 -1
  81. package/src/row-resize.test.ts +1 -2
  82. package/src/scroll-sync.test.ts +4 -7
  83. package/src/scroll-sync.ts +0 -122
  84. package/src/selection.ts +0 -109
  85. package/src/server-group-model.test.ts +2 -2
  86. package/src/summaries.ts +0 -112
  87. package/src/svgrid.behavior.test.ts +0 -1
  88. package/src/svgrid.column-reorder.test.ts +0 -8
  89. package/src/svgrid.footer-pagesize.svelte.test.ts +86 -0
  90. package/src/tree-row-model.test.ts +0 -1
  91. package/dist/cdn/disclose-version-DoD9AFD_.js +0 -2958
package/src/menus.ts CHANGED
@@ -2,131 +2,19 @@
2
2
  // reading/writing controller state via the `ctx` handle; the reactive core
3
3
  // ($state/$derived/$effect) stays in the controller.
4
4
  import {
5
- applyExcelFilter,
6
- normalizeForFilter,
7
- createColumnVirtualizer,
8
- createCoreRowModel,
9
- createExpandedRowModel,
10
- createFilteredRowModel,
11
- createGroupedRowModel,
12
- createPaginatedRowModel,
13
- createSvelteVirtualizer,
14
- createSortedRowModel,
15
- createSvGrid,
16
- filterFns,
17
- getGridCellA11yProps,
18
- getGridCellDomId,
19
- getGridHeaderA11yProps,
20
- getGridRootA11yProps,
21
- getGridRowA11yProps,
22
- parseEditorValue,
23
- normalizeEditorOptions,
24
- sortFns,
25
- tableFeatures,
26
- rowSortingFeature,
27
- columnFilteringFeature,
28
- columnGroupingFeature,
29
- type CellContext,
30
- type EditorContext,
31
- type CellEditorOption,
32
- type CellEditorType,
33
- type CellFormatter,
34
- type CellFormatConfig,
35
- type Column,
36
- type ColumnDef,
37
- type Row,
38
5
  type RowData,
39
- type SvGridApi,
40
6
  type TableFeatures,
41
7
  } from "./index";
42
8
  import "./sv-grid-scrollbar";
43
9
  import { untrack } from "svelte";
44
- import type { Snippet } from "svelte";
45
- import { getKeyboardIntent, getNextActiveCell } from "./keyboard";
46
- import {
47
- formatNumericWithConfig,
48
- getDateFormatter,
49
- resolveDatePattern,
50
- } from "./cell-formatting";
51
- import {
52
- RenderSnippetConfig,
53
- RenderComponentConfig,
54
- } from "./render-component";
55
- import { buildFillPattern } from "./fill-patterns";
56
- import { buildSparkline, toSparklineValues } from "./sparkline";
57
- import {
58
- resolveCellFormat,
59
- computeColumnStat,
60
- formatsNeedingStats,
61
- type ColumnStat,
62
- type ResolvedCellFormat,
63
- } from "./conditional-formatting";
64
- import SvGridDropdown from "./SvGridDropdown.svelte";
65
10
  import type {
66
- Props,
67
- SelectionPoint,
68
- SelectionRange,
69
- CellEditState,
70
11
  FilterOperator,
71
- FilterOption,
72
- MenuPosition,
73
12
  } from "./SvGrid.types";
74
13
  import {
75
- cfTextStyle,
76
- fmtStat,
77
- getCellKey,
78
- resolveClassList,
79
- toDateInputValue,
80
- toDateTimeLocalInputValue,
81
- getEditableInputValue,
82
- getEditorInputType,
83
- toValueArray,
84
- getOptionLabel,
85
- getOptionColor,
86
- colorfulChipStyle,
87
- getEditorClass,
88
- asDate,
89
14
  clampMenuX,
90
15
  cssEscape,
91
- rawToNumber,
92
- formatFacetNumber,
93
- formatFacetDate,
94
16
  } from "./SvGrid.helpers";
95
- import { createCellRender } from "./cell-render";
96
- import { createEditing } from "./editing";
97
- import { createSelection } from "./selection";
98
- import { createColumns } from "./columns";
99
- import { createGridApi } from "./build-api";
100
- import { createClipboard } from "./clipboard";
101
- import {
102
- filterOperatorOptions,
103
- fallbackOperatorOption,
104
- TEXT_OPERATORS,
105
- NUMBER_OPERATORS,
106
- DATE_OPERATORS,
107
- CHECKBOX_OPERATORS,
108
- operatorOption,
109
- operatorsForColumn,
110
- defaultOperatorFor,
111
- operatorLabelFor,
112
- } from "./filter-operators";
113
- import {
114
- type FacetBucket,
115
- isBucketableColumn,
116
- buildBuckets,
117
- isInBucket,
118
- } from "./facet-buckets";
119
17
  import { splitInTokens, joinInTokens } from "./filtering/excel-filters";
120
- import {
121
- getColumnBaseValue,
122
- isGroupRow,
123
- toolPanelHeaderLabel,
124
- formatSummaryNumeric,
125
- getColumnAlign,
126
- getPinnedCellValue,
127
- getColumnAccessorValue,
128
- columnDefMatchesId,
129
- } from "./cell-values";
130
18
 
131
19
  export function createMenus<
132
20
  TFeatures extends TableFeatures = TableFeatures,
@@ -58,7 +58,8 @@ describe('createSvGrid - getRowId', () => {
58
58
 
59
59
  it('passes the row index to getRowId', () => {
60
60
  const seen: Array<{ id: string; index: number }> = []
61
- createSvGrid<typeof features, Row>({
61
+ // The row model is lazy, so it has to be read for getRowId to run at all.
62
+ const rows = createSvGrid<typeof features, Row>({
62
63
  _features: features,
63
64
  _rowModels: { coreRowModel: createCoreRowModel<Row>() },
64
65
  columns,
@@ -68,6 +69,7 @@ describe('createSvGrid - getRowId', () => {
68
69
  return row.id
69
70
  },
70
71
  }).getRowModel().rows
72
+ expect(rows).toHaveLength(data.length)
71
73
  expect(seen).toEqual([
72
74
  { id: 'ada', index: 0 },
73
75
  { id: 'linus', index: 1 },
@@ -6,7 +6,7 @@
6
6
  * Because the bus is shared, we can create TWO fake ctxs (two grids) and drive
7
7
  * a genuine grid-to-grid move without mounting anything.
8
8
  */
9
- import { beforeEach, describe, expect, it, vi } from 'vitest'
9
+ import { describe, expect, it, vi } from 'vitest'
10
10
  import { createRowDrag, rowDropZone } from './row-drag'
11
11
 
12
12
  type AnyCtx = Record<string, any>
@@ -1,6 +1,5 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
2
2
  import { rowResize } from './row-resize'
3
- import type { RowResizeOptions } from './row-resize'
4
3
 
5
4
  const STRIP_CLASS = 'sv-grid-row-resize-handle'
6
5
 
@@ -247,7 +246,7 @@ describe('rowResize - drag', () => {
247
246
  })
248
247
 
249
248
  it('ignores pointermove / pointerup when no drag is active', () => {
250
- const { host, rows } = buildGrid([{ rowIndex: 0 }])
249
+ const { host } = buildGrid([{ rowIndex: 0 }])
251
250
  track(host)
252
251
  const onResize = vi.fn()
253
252
  const onResizeMove = vi.fn()
@@ -102,7 +102,7 @@ describe('showTooltipFor / hideTooltip', () => {
102
102
  })
103
103
 
104
104
  it('clears a pending timer before scheduling a new tooltip', () => {
105
- const { ctx, ss } = syncFor()
105
+ const { ss } = syncFor()
106
106
  const clearSpy = vi.spyOn(window, 'clearTimeout')
107
107
  const el = anchorEl({ left: 10, right: 30, top: 10, bottom: 30 })
108
108
  ss.showTooltipFor(el, 'first')
@@ -204,13 +204,10 @@ describe('scheduleScrollSync / flushScheduledScrollSync', () => {
204
204
  })
205
205
 
206
206
  describe('onBodyScroll', () => {
207
- let rafCb: FrameRequestCallback | null = null
208
207
  beforeEach(() => {
209
- rafCb = null
210
- vi.stubGlobal('requestAnimationFrame', (cb: FrameRequestCallback) => {
211
- rafCb = cb
212
- return 7
213
- })
208
+ // These tests assert what happens BEFORE the frame runs, so the stub just
209
+ // hands back a handle and never invokes the callback.
210
+ vi.stubGlobal('requestAnimationFrame', () => 7)
214
211
  })
215
212
  afterEach(() => {
216
213
  vi.unstubAllGlobals()
@@ -2,132 +2,10 @@
2
2
  // reading/writing controller state via the `ctx` handle; the reactive core
3
3
  // ($state/$derived/$effect) stays in the controller.
4
4
  import {
5
- applyExcelFilter,
6
- normalizeForFilter,
7
- createColumnVirtualizer,
8
- createCoreRowModel,
9
- createExpandedRowModel,
10
- createFilteredRowModel,
11
- createGroupedRowModel,
12
- createPaginatedRowModel,
13
- createSvelteVirtualizer,
14
- createSortedRowModel,
15
- createSvGrid,
16
- filterFns,
17
- getGridCellA11yProps,
18
- getGridCellDomId,
19
- getGridHeaderA11yProps,
20
- getGridRootA11yProps,
21
- getGridRowA11yProps,
22
- parseEditorValue,
23
- normalizeEditorOptions,
24
- sortFns,
25
- tableFeatures,
26
- rowSortingFeature,
27
- columnFilteringFeature,
28
- columnGroupingFeature,
29
- type CellContext,
30
- type EditorContext,
31
- type CellEditorOption,
32
- type CellEditorType,
33
- type CellFormatter,
34
- type CellFormatConfig,
35
- type Column,
36
- type ColumnDef,
37
- type Row,
38
5
  type RowData,
39
- type SvGridApi,
40
6
  type TableFeatures,
41
7
  } from "./index";
42
8
  import "./sv-grid-scrollbar";
43
- import type { Snippet } from "svelte";
44
- import { getKeyboardIntent, getNextActiveCell } from "./keyboard";
45
- import {
46
- formatNumericWithConfig,
47
- getDateFormatter,
48
- resolveDatePattern,
49
- } from "./cell-formatting";
50
- import {
51
- RenderSnippetConfig,
52
- RenderComponentConfig,
53
- } from "./render-component";
54
- import { buildFillPattern } from "./fill-patterns";
55
- import { buildSparkline, toSparklineValues } from "./sparkline";
56
- import {
57
- resolveCellFormat,
58
- computeColumnStat,
59
- formatsNeedingStats,
60
- type ColumnStat,
61
- type ResolvedCellFormat,
62
- } from "./conditional-formatting";
63
- import SvGridDropdown from "./SvGridDropdown.svelte";
64
- import type {
65
- Props,
66
- SelectionPoint,
67
- SelectionRange,
68
- CellEditState,
69
- FilterOperator,
70
- FilterOption,
71
- MenuPosition,
72
- } from "./SvGrid.types";
73
- import {
74
- cfTextStyle,
75
- fmtStat,
76
- getCellKey,
77
- resolveClassList,
78
- toDateInputValue,
79
- toDateTimeLocalInputValue,
80
- getEditableInputValue,
81
- getEditorInputType,
82
- toValueArray,
83
- getOptionLabel,
84
- getOptionColor,
85
- colorfulChipStyle,
86
- getEditorClass,
87
- asDate,
88
- clampMenuX,
89
- cssEscape,
90
- rawToNumber,
91
- formatFacetNumber,
92
- formatFacetDate,
93
- } from "./SvGrid.helpers";
94
- import { createKeyboard } from "./keyboard-handlers";
95
- import { createSummaries } from "./summaries";
96
- import { createMenus } from "./menus";
97
- import { createCellRender } from "./cell-render";
98
- import { createEditing } from "./editing";
99
- import { createSelection } from "./selection";
100
- import { createColumns } from "./columns";
101
- import { createGridApi } from "./build-api";
102
- import { createClipboard } from "./clipboard";
103
- import {
104
- filterOperatorOptions,
105
- fallbackOperatorOption,
106
- TEXT_OPERATORS,
107
- NUMBER_OPERATORS,
108
- DATE_OPERATORS,
109
- CHECKBOX_OPERATORS,
110
- operatorOption,
111
- operatorsForColumn,
112
- defaultOperatorFor,
113
- operatorLabelFor,
114
- } from "./filter-operators";
115
- import {
116
- type FacetBucket,
117
- isBucketableColumn,
118
- buildBuckets,
119
- isInBucket,
120
- } from "./facet-buckets";
121
- import {
122
- getColumnBaseValue,
123
- isGroupRow,
124
- toolPanelHeaderLabel,
125
- formatSummaryNumeric,
126
- getColumnAlign,
127
- getPinnedCellValue,
128
- getColumnAccessorValue,
129
- columnDefMatchesId,
130
- } from "./cell-values";
131
9
 
132
10
  export function createScrollSync<
133
11
  TFeatures extends TableFeatures = TableFeatures,
package/src/selection.ts CHANGED
@@ -2,125 +2,17 @@
2
2
  // reading/writing controller state via the `ctx` handle; the reactive core
3
3
  // ($state/$derived/$effect) stays in the controller.
4
4
  import {
5
- applyExcelFilter,
6
- normalizeForFilter,
7
- createColumnVirtualizer,
8
- createCoreRowModel,
9
- createExpandedRowModel,
10
- createFilteredRowModel,
11
- createGroupedRowModel,
12
- createPaginatedRowModel,
13
- createSvelteVirtualizer,
14
- createSortedRowModel,
15
- createSvGrid,
16
- filterFns,
17
- getGridCellA11yProps,
18
5
  getGridCellDomId,
19
- getGridHeaderA11yProps,
20
- getGridRootA11yProps,
21
- getGridRowA11yProps,
22
- parseEditorValue,
23
- normalizeEditorOptions,
24
- sortFns,
25
- tableFeatures,
26
- rowSortingFeature,
27
- columnFilteringFeature,
28
- columnGroupingFeature,
29
- type CellContext,
30
- type EditorContext,
31
- type CellEditorOption,
32
- type CellEditorType,
33
- type CellFormatter,
34
- type CellFormatConfig,
35
- type Column,
36
- type ColumnDef,
37
- type Row,
38
6
  type RowData,
39
- type SvGridApi,
40
7
  type TableFeatures,
41
8
  } from "./index";
42
9
  import "./sv-grid-scrollbar";
43
- import type { Snippet } from "svelte";
44
- import { getKeyboardIntent, getNextActiveCell } from "./keyboard";
45
- import {
46
- formatNumericWithConfig,
47
- getDateFormatter,
48
- resolveDatePattern,
49
- } from "./cell-formatting";
50
- import {
51
- RenderSnippetConfig,
52
- RenderComponentConfig,
53
- } from "./render-component";
54
- import { buildFillPattern } from "./fill-patterns";
55
- import { buildSparkline, toSparklineValues } from "./sparkline";
56
- import {
57
- resolveCellFormat,
58
- computeColumnStat,
59
- formatsNeedingStats,
60
- type ColumnStat,
61
- type ResolvedCellFormat,
62
- } from "./conditional-formatting";
63
- import SvGridDropdown from "./SvGridDropdown.svelte";
64
10
  import type {
65
- Props,
66
- SelectionPoint,
67
11
  SelectionRange,
68
- CellEditState,
69
- FilterOperator,
70
- FilterOption,
71
- MenuPosition,
72
12
  } from "./SvGrid.types";
73
- import {
74
- cfTextStyle,
75
- fmtStat,
76
- getCellKey,
77
- resolveClassList,
78
- toDateInputValue,
79
- toDateTimeLocalInputValue,
80
- getEditableInputValue,
81
- getEditorInputType,
82
- toValueArray,
83
- getOptionLabel,
84
- getOptionColor,
85
- colorfulChipStyle,
86
- getEditorClass,
87
- asDate,
88
- clampMenuX,
89
- cssEscape,
90
- rawToNumber,
91
- formatFacetNumber,
92
- formatFacetDate,
93
- } from "./SvGrid.helpers";
94
- import { createColumns } from "./columns";
95
- import { createGridApi } from "./build-api";
96
- import { createClipboard } from "./clipboard";
97
- import {
98
- filterOperatorOptions,
99
- fallbackOperatorOption,
100
- TEXT_OPERATORS,
101
- NUMBER_OPERATORS,
102
- DATE_OPERATORS,
103
- CHECKBOX_OPERATORS,
104
- operatorOption,
105
- operatorsForColumn,
106
- defaultOperatorFor,
107
- operatorLabelFor,
108
- } from "./filter-operators";
109
- import {
110
- type FacetBucket,
111
- isBucketableColumn,
112
- buildBuckets,
113
- isInBucket,
114
- } from "./facet-buckets";
115
13
  import {
116
14
  getColumnBaseValue,
117
15
  isGroupRow,
118
- toolPanelHeaderLabel,
119
- formatSummaryNumeric,
120
- getColumnAlign,
121
- getPinnedCellValue,
122
- getColumnAccessorValue,
123
- columnDefMatchesId,
124
16
  } from "./cell-values";
125
17
 
126
18
  export function createSelection<
@@ -244,7 +136,6 @@ export function createSelection<
244
136
  `td[data-svgrid-row="${rowIndex}"][data-svgrid-col="${colIndex}"]`,
245
137
  );
246
138
  if (cellEl) {
247
- const headerHeight = ctx.theadEl?.offsetHeight ?? 0;
248
139
  const containerRect = ctx.scrollContainer.getBoundingClientRect();
249
140
  const cellRect = cellEl.getBoundingClientRect();
250
141
  const cellTopInView = cellRect.top - containerRect.top;
@@ -114,10 +114,10 @@ describe('createServerGroupModel', () => {
114
114
 
115
115
  it('collapse removes the children again', async () => {
116
116
  const src = makeGroupSource(DATA)
117
- let state = { displayRows: [] as ServerDisplayRow<Row>[] } as never
117
+ // Reads go through ctl.getState() below, so the change callback is a no-op.
118
118
  const ctl = createServerGroupModel<Row>(src, {
119
119
  groupBy: ['country', 'city'],
120
- onChange: (s) => (state = s as never),
120
+ onChange: () => {},
121
121
  })
122
122
  ctl.refresh()
123
123
  await flush()
package/src/summaries.ts CHANGED
@@ -2,129 +2,17 @@
2
2
  // reading/writing controller state via the `ctx` handle; the reactive core
3
3
  // ($state/$derived/$effect) stays in the controller.
4
4
  import {
5
- applyExcelFilter,
6
- normalizeForFilter,
7
- createColumnVirtualizer,
8
- createCoreRowModel,
9
- createExpandedRowModel,
10
- createFilteredRowModel,
11
- createGroupedRowModel,
12
- createPaginatedRowModel,
13
- createSvelteVirtualizer,
14
- createSortedRowModel,
15
- createSvGrid,
16
- filterFns,
17
- getGridCellA11yProps,
18
- getGridCellDomId,
19
- getGridHeaderA11yProps,
20
- getGridRootA11yProps,
21
- getGridRowA11yProps,
22
- parseEditorValue,
23
- normalizeEditorOptions,
24
- sortFns,
25
- tableFeatures,
26
- rowSortingFeature,
27
- columnFilteringFeature,
28
- columnGroupingFeature,
29
- type CellContext,
30
- type EditorContext,
31
- type CellEditorOption,
32
- type CellEditorType,
33
- type CellFormatter,
34
- type CellFormatConfig,
35
5
  type Column,
36
- type ColumnDef,
37
6
  type Row,
38
7
  type RowData,
39
- type SvGridApi,
40
8
  type TableFeatures,
41
9
  } from "./index";
42
10
  import "./sv-grid-scrollbar";
43
- import type { Snippet } from "svelte";
44
- import { getKeyboardIntent, getNextActiveCell } from "./keyboard";
45
11
  import {
46
- formatNumericWithConfig,
47
- getDateFormatter,
48
- resolveDatePattern,
49
- } from "./cell-formatting";
50
- import {
51
- RenderSnippetConfig,
52
- RenderComponentConfig,
53
- } from "./render-component";
54
- import { buildFillPattern } from "./fill-patterns";
55
- import { buildSparkline, toSparklineValues } from "./sparkline";
56
- import {
57
- resolveCellFormat,
58
- computeColumnStat,
59
- formatsNeedingStats,
60
- type ColumnStat,
61
- type ResolvedCellFormat,
62
- } from "./conditional-formatting";
63
- import SvGridDropdown from "./SvGridDropdown.svelte";
64
- import type {
65
- Props,
66
- SelectionPoint,
67
- SelectionRange,
68
- CellEditState,
69
- FilterOperator,
70
- FilterOption,
71
- MenuPosition,
72
- } from "./SvGrid.types";
73
- import {
74
- cfTextStyle,
75
- fmtStat,
76
12
  getCellKey,
77
- resolveClassList,
78
- toDateInputValue,
79
- toDateTimeLocalInputValue,
80
- getEditableInputValue,
81
- getEditorInputType,
82
- toValueArray,
83
- getOptionLabel,
84
- getOptionColor,
85
- colorfulChipStyle,
86
- getEditorClass,
87
- asDate,
88
- clampMenuX,
89
- cssEscape,
90
- rawToNumber,
91
- formatFacetNumber,
92
- formatFacetDate,
93
13
  } from "./SvGrid.helpers";
94
- import { createMenus } from "./menus";
95
- import { createCellRender } from "./cell-render";
96
- import { createEditing } from "./editing";
97
- import { createSelection } from "./selection";
98
- import { createColumns } from "./columns";
99
- import { createGridApi } from "./build-api";
100
- import { createClipboard } from "./clipboard";
101
- import {
102
- filterOperatorOptions,
103
- fallbackOperatorOption,
104
- TEXT_OPERATORS,
105
- NUMBER_OPERATORS,
106
- DATE_OPERATORS,
107
- CHECKBOX_OPERATORS,
108
- operatorOption,
109
- operatorsForColumn,
110
- defaultOperatorFor,
111
- operatorLabelFor,
112
- } from "./filter-operators";
113
- import {
114
- type FacetBucket,
115
- isBucketableColumn,
116
- buildBuckets,
117
- isInBucket,
118
- } from "./facet-buckets";
119
14
  import {
120
- getColumnBaseValue,
121
- isGroupRow,
122
- toolPanelHeaderLabel,
123
15
  formatSummaryNumeric,
124
- getColumnAlign,
125
- getPinnedCellValue,
126
- getColumnAccessorValue,
127
- columnDefMatchesId,
128
16
  } from "./cell-values";
129
17
 
130
18
  export function createSummaries<
@@ -25,7 +25,6 @@ import {
25
25
  createGroupedRowModel,
26
26
  createPaginatedRowModel,
27
27
  createSortedRowModel,
28
- renderSnippet,
29
28
  rowExpandingFeature,
30
29
  rowPaginationFeature,
31
30
  rowSelectionFeature,
@@ -106,14 +106,6 @@ function headerOrder(target: HTMLElement): string[] {
106
106
  return Array.from(ths).map((th) => th.dataset.svgridHeaderCol ?? '')
107
107
  }
108
108
 
109
- function header(target: HTMLElement, id: string): HTMLElement {
110
- // jsdom doesn't ship CSS.escape; our ids are simple alphanumerics so
111
- // a plain attribute selector is fine.
112
- const el = target.querySelector<HTMLElement>(`th[data-svgrid-header-col="${id}"]`)
113
- if (!el) throw new Error(`header not found: ${id}`)
114
- return el
115
- }
116
-
117
109
  describe('SvGrid column reorder - default off', () => {
118
110
  it('does NOT set draggable on headers when the prop is unset', async () => {
119
111
  const { target, destroy } = await mountGrid()