@humanspeak/svelte-headless-table 5.0.2 → 5.0.4
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/README.md +25 -20
- package/dist/bodyCells.d.ts +1 -1
- package/dist/columns.d.ts +1 -2
- package/dist/createTable.d.ts +1 -1
- package/dist/createTable.js +1 -1
- package/dist/headerCells.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/plugins/addColumnFilters.d.ts +2 -2
- package/dist/plugins/addColumnOrder.d.ts +1 -1
- package/dist/plugins/addDataExport.d.ts +1 -1
- package/dist/plugins/addDataExport.js +1 -1
- package/dist/plugins/addExpandedRows.d.ts +1 -1
- package/dist/plugins/addExpandedRows.js +1 -1
- package/dist/plugins/addFlatten.d.ts +1 -1
- package/dist/plugins/addGroupBy.js +1 -1
- package/dist/plugins/addHiddenColumns.d.ts +1 -1
- package/dist/plugins/addPagination.d.ts +1 -1
- package/dist/plugins/addResizedColumns.d.ts +1 -1
- package/dist/plugins/addResizedColumns.js +1 -1
- package/dist/plugins/addSelectedRows.d.ts +1 -1
- package/dist/plugins/addSelectedRows.js +1 -1
- package/dist/plugins/addSortBy.d.ts +2 -2
- package/dist/plugins/addSortBy.js +1 -1
- package/dist/plugins/addSubRows.js +1 -1
- package/dist/plugins/addTableFilter.d.ts +2 -2
- package/dist/plugins/addTableFilter.js +1 -1
- package/dist/tableComponent.d.ts +1 -1
- package/dist/tableComponent.js +1 -1
- package/dist/types/Label.d.ts +1 -1
- package/dist/types/TablePlugin.d.ts +2 -2
- package/package.json +22 -12
package/README.md
CHANGED
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
|
|
8
|
-
[](https://www.npmjs.com/package/@humanspeak/svelte-headless-table)
|
|
9
|
+
[](https://github.com/humanspeak/svelte-headless-table/actions/workflows/npm-publish.yml)
|
|
10
|
+
[](https://coveralls.io/github/humanspeak/svelte-headless-table?branch=main)
|
|
11
|
+
[](https://github.com/humanspeak/svelte-headless-table/blob/main/LICENSE)
|
|
12
|
+
[](https://www.npmjs.com/package/@humanspeak/svelte-headless-table)
|
|
13
|
+
[](https://github.com/humanspeak/svelte-headless-table/actions/workflows/codeql.yml)
|
|
14
|
+
[](https://packagephobia.com/result?p=@humanspeak/svelte-headless-table)
|
|
15
|
+
[](https://trunk.io)
|
|
16
|
+
[](http://www.typescriptlang.org/)
|
|
17
|
+
[](https://www.npmjs.com/package/@humanspeak/svelte-headless-table)
|
|
18
|
+
[](https://github.com/humanspeak/svelte-headless-table/graphs/commit-activity)
|
|
14
19
|
|
|
15
20
|
</div>
|
|
16
21
|
|
|
@@ -18,7 +23,7 @@
|
|
|
18
23
|
|
|
19
24
|
> Build and design powerful datagrid experiences while retaining 100% control over styles and markup.
|
|
20
25
|
|
|
21
|
-
Visit the [documentation](https://
|
|
26
|
+
Visit the [documentation](https://table.svelte.page/) for code examples and API reference, and get started with the [quick start guide](https://table.svelte.page/docs/getting-started/quick-start)!
|
|
22
27
|
|
|
23
28
|
## Why Svelte Headless Table?
|
|
24
29
|
|
|
@@ -40,18 +45,18 @@ Easily extend Svelte Headless Table with complex **sorting**, **filtering**, **g
|
|
|
40
45
|
|
|
41
46
|
### Plugin roadmap
|
|
42
47
|
|
|
43
|
-
- [x] [addSortBy](https://
|
|
44
|
-
- [x] [addColumnFilters](https://
|
|
45
|
-
- [x] [addTableFilter](https://
|
|
46
|
-
- [x] [addColumnOrder](https://
|
|
47
|
-
- [x] [addHiddenColumns](https://
|
|
48
|
-
- [x] [addPagination](https://
|
|
49
|
-
- [x] [addSubRows](https://
|
|
50
|
-
- [x] [addGroupBy](https://
|
|
51
|
-
- [x] [addExpandedRows](https://
|
|
52
|
-
- [x] [addSelectedRows](https://
|
|
53
|
-
- [x] [addResizedColumns](https://
|
|
54
|
-
- [x] [addGridLayout](https://
|
|
48
|
+
- [x] [addSortBy](https://table.svelte.page/docs/plugins/add-sort-by)
|
|
49
|
+
- [x] [addColumnFilters](https://table.svelte.page/docs/plugins/add-column-filters)
|
|
50
|
+
- [x] [addTableFilter](https://table.svelte.page/docs/plugins/add-table-filter)
|
|
51
|
+
- [x] [addColumnOrder](https://table.svelte.page/docs/plugins/add-column-order)
|
|
52
|
+
- [x] [addHiddenColumns](https://table.svelte.page/docs/plugins/add-hidden-columns)
|
|
53
|
+
- [x] [addPagination](https://table.svelte.page/docs/plugins/add-pagination)
|
|
54
|
+
- [x] [addSubRows](https://table.svelte.page/docs/plugins/add-sub-rows)
|
|
55
|
+
- [x] [addGroupBy](https://table.svelte.page/docs/plugins/add-group-by)
|
|
56
|
+
- [x] [addExpandedRows](https://table.svelte.page/docs/plugins/add-expanded-rows)
|
|
57
|
+
- [x] [addSelectedRows](https://table.svelte.page/docs/plugins/add-selected-rows)
|
|
58
|
+
- [x] [addResizedColumns](https://table.svelte.page/docs/plugins/add-resized-columns)
|
|
59
|
+
- [x] [addGridLayout](https://table.svelte.page/docs/plugins/add-grid-layout)
|
|
55
60
|
|
|
56
61
|
## Examples
|
|
57
62
|
|
|
@@ -119,4 +124,4 @@ Easily extend Svelte Headless Table with complex **sorting**, **filtering**, **g
|
|
|
119
124
|
</table>
|
|
120
125
|
```
|
|
121
126
|
|
|
122
|
-
For more complex examples with advanced features, visit the [documentation site](https://
|
|
127
|
+
For more complex examples with advanced features, visit the [documentation site](https://table.svelte.page/docs/plugins/overview).
|
package/dist/bodyCells.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { RenderConfig } from '@humanspeak/svelte-render';
|
|
1
2
|
import { type Readable } from 'svelte/store';
|
|
2
3
|
import type { BodyRow } from './bodyRows.js';
|
|
3
4
|
import type { DataColumn, DisplayColumn, FlatColumn } from './columns.js';
|
|
4
5
|
import { TableComponent } from './tableComponent.js';
|
|
5
6
|
import type { DataLabel, DisplayLabel } from './types/Label.js';
|
|
6
7
|
import type { AnyPlugins } from './types/TablePlugin.js';
|
|
7
|
-
import type { RenderConfig } from '@humanspeak/svelte-subscribe';
|
|
8
8
|
export type BodyCellInit<Item, Plugins extends AnyPlugins = AnyPlugins> = {
|
|
9
9
|
id: string;
|
|
10
10
|
row: BodyRow<Item, Plugins>;
|
package/dist/columns.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DisplayBodyCell } from './bodyCells.js';
|
|
2
2
|
import type { TableState } from './createViewModel.js';
|
|
3
|
-
import type { DisplayLabel, HeaderLabel } from './types/Label.js';
|
|
4
|
-
import type { DataLabel } from './types/Label.js';
|
|
3
|
+
import type { DataLabel, DisplayLabel, HeaderLabel } from './types/Label.js';
|
|
5
4
|
import type { AnyPlugins, PluginColumnConfigs } from './types/TablePlugin.js';
|
|
6
5
|
export interface ColumnInit<Item, Plugins extends AnyPlugins = AnyPlugins> {
|
|
7
6
|
header: HeaderLabel<Item, Plugins>;
|
package/dist/createTable.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataColumn, DisplayColumn, GroupColumn, type Column, type DataColumnInitBase, type DataColumnInitFnAndId, type DataColumnInitIdAndKey, type DataColumnInitKey, type DisplayColumnInit, type GroupColumnInit } from './columns.js';
|
|
2
|
+
import { type CreateViewModelOptions, type TableViewModel } from './createViewModel.js';
|
|
2
3
|
import type { AnyPlugins } from './types/TablePlugin.js';
|
|
3
4
|
import type { ReadOrWritable } from './utils/store.js';
|
|
4
|
-
import { type CreateViewModelOptions, type TableViewModel } from './createViewModel.js';
|
|
5
5
|
export declare class Table<Item, Plugins extends AnyPlugins = AnyPlugins> {
|
|
6
6
|
data: ReadOrWritable<Item[]>;
|
|
7
7
|
plugins: Plugins;
|
package/dist/createTable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataColumn, DisplayColumn, getFlatColumnIds, GroupColumn } from './columns.js';
|
|
2
|
-
import { getDuplicates } from './utils/array.js';
|
|
3
2
|
import { createViewModel } from './createViewModel.js';
|
|
3
|
+
import { getDuplicates } from './utils/array.js';
|
|
4
4
|
export class Table {
|
|
5
5
|
data;
|
|
6
6
|
plugins;
|
package/dist/headerCells.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { RenderConfig } from '@humanspeak/svelte-render';
|
|
1
2
|
import { TableComponent } from './tableComponent.js';
|
|
2
3
|
import type { HeaderLabel } from './types/Label.js';
|
|
3
4
|
import type { AnyPlugins } from './types/TablePlugin.js';
|
|
4
|
-
import type { RenderConfig } from '@humanspeak/svelte-subscribe';
|
|
5
5
|
export type HeaderCellInit<Item, Plugins extends AnyPlugins = AnyPlugins> = {
|
|
6
6
|
id: string;
|
|
7
7
|
label: HeaderLabel<Item, Plugins>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from '@humanspeak/svelte-render';
|
|
2
2
|
export { Subscribe } from '@humanspeak/svelte-subscribe';
|
|
3
3
|
export { createTable } from './createTable.js';
|
|
4
|
-
export { Table } from './createTable.js';
|
|
5
|
-
export { HeaderRow } from './headerRows.js';
|
|
6
|
-
export { HeaderCell, FlatHeaderCell, DataHeaderCell, FlatDisplayHeaderCell, GroupHeaderCell, GroupDisplayHeaderCell } from './headerCells.js';
|
|
7
|
-
export * from './bodyRows.js';
|
|
8
4
|
export * from './bodyCells.js';
|
|
5
|
+
export * from './bodyRows.js';
|
|
9
6
|
export * from './columns.js';
|
|
7
|
+
export { Table } from './createTable.js';
|
|
10
8
|
export type * from './createViewModel.js';
|
|
9
|
+
export { DataHeaderCell, FlatDisplayHeaderCell, FlatHeaderCell, GroupDisplayHeaderCell, GroupHeaderCell, HeaderCell } from './headerCells.js';
|
|
10
|
+
export { HeaderRow } from './headerRows.js';
|
|
11
11
|
export type * from './types/Label.js';
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ export { Subscribe } from '@humanspeak/svelte-subscribe';
|
|
|
4
4
|
// table core
|
|
5
5
|
export { createTable } from './createTable.js';
|
|
6
6
|
// models
|
|
7
|
-
export { Table } from './createTable.js';
|
|
8
|
-
export { HeaderRow } from './headerRows.js';
|
|
9
|
-
export { HeaderCell, FlatHeaderCell, DataHeaderCell, FlatDisplayHeaderCell, GroupHeaderCell, GroupDisplayHeaderCell } from './headerCells.js';
|
|
10
|
-
export * from './bodyRows.js';
|
|
11
7
|
export * from './bodyCells.js';
|
|
8
|
+
export * from './bodyRows.js';
|
|
12
9
|
export * from './columns.js';
|
|
10
|
+
export { Table } from './createTable.js';
|
|
11
|
+
export { DataHeaderCell, FlatDisplayHeaderCell, FlatHeaderCell, GroupDisplayHeaderCell, GroupHeaderCell, HeaderCell } from './headerCells.js';
|
|
12
|
+
export { HeaderRow } from './headerRows.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RenderConfig } from '@humanspeak/svelte-render';
|
|
2
|
-
import type { BodyRow } from '../bodyRows.js';
|
|
3
|
-
import type { TablePlugin, NewTablePropSet } from '../types/TablePlugin.js';
|
|
4
2
|
import { type Readable, type Writable } from 'svelte/store';
|
|
3
|
+
import type { BodyRow } from '../bodyRows.js';
|
|
5
4
|
import type { PluginInitTableState } from '../createViewModel.js';
|
|
5
|
+
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
6
6
|
export interface ColumnFiltersConfig {
|
|
7
7
|
serverSide?: boolean;
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
2
1
|
import { type Writable } from 'svelte/store';
|
|
2
|
+
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
3
|
export interface ColumnOrderConfig {
|
|
4
4
|
initialColumnIdOrder?: string[];
|
|
5
5
|
hideUnspecifiedColumns?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TablePlugin } from '../types/TablePlugin.js';
|
|
2
1
|
import { type Readable } from 'svelte/store';
|
|
2
|
+
import type { TablePlugin } from '../types/TablePlugin.js';
|
|
3
3
|
export type DataExportFormat = 'object' | 'json' | 'csv';
|
|
4
4
|
type ExportForFormat = {
|
|
5
5
|
object: Record<string, unknown>[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isReadable } from '../utils/store.js';
|
|
2
1
|
import { derived, get } from 'svelte/store';
|
|
2
|
+
import { isReadable } from '../utils/store.js';
|
|
3
3
|
const getObjectsFromRows = (rows, ids, childrenKey) => {
|
|
4
4
|
return rows.map((row) => {
|
|
5
5
|
const dataObject = Object.fromEntries(ids.map((id) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { type Readable, type Writable } from 'svelte/store';
|
|
1
2
|
import type { BodyRow } from '../bodyRows.js';
|
|
2
3
|
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
4
|
import { type RecordSetStore } from '../utils/store.js';
|
|
4
|
-
import { type Readable, type Writable } from 'svelte/store';
|
|
5
5
|
export interface ExpandedRowsConfig<Item> {
|
|
6
6
|
initialExpandedIds?: Record<string, boolean>;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { recordSetStore } from '../utils/store.js';
|
|
2
1
|
import { keyed } from '@humanspeak/svelte-keyed';
|
|
3
2
|
import { derived, readable } from 'svelte/store';
|
|
3
|
+
import { recordSetStore } from '../utils/store.js';
|
|
4
4
|
const withExpandedRows = (row, expandedIds) => {
|
|
5
5
|
if (row.subRows === undefined) {
|
|
6
6
|
return [row];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type Writable } from 'svelte/store';
|
|
1
2
|
import type { BodyRow } from '../bodyRows.js';
|
|
2
3
|
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
|
-
import { type Writable } from 'svelte/store';
|
|
4
4
|
export interface FlattenConfig {
|
|
5
5
|
initialDepth?: number;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { derived, writable } from 'svelte/store';
|
|
1
2
|
import { DataBodyCell } from '../bodyCells.js';
|
|
2
3
|
import { BodyRow, DisplayBodyRow } from '../bodyRows.js';
|
|
3
4
|
import { isShiftClick } from '../utils/event.js';
|
|
4
5
|
import { nonUndefined } from '../utils/filter.js';
|
|
5
6
|
import { arraySetStore } from '../utils/store.js';
|
|
6
|
-
import { derived, writable } from 'svelte/store';
|
|
7
7
|
const getIdPrefix = (id) => {
|
|
8
8
|
const prefixTokens = id.split('>').slice(0, -1);
|
|
9
9
|
if (prefixTokens.length === 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
2
1
|
import { type Writable } from 'svelte/store';
|
|
2
|
+
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
3
|
export interface HiddenColumnsConfig {
|
|
4
4
|
initialHiddenColumnIds?: string[];
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
2
1
|
import { type Readable, type Updater, type Writable } from 'svelte/store';
|
|
2
|
+
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
3
|
export type PaginationConfig = {
|
|
4
4
|
initialPageIndex?: number;
|
|
5
5
|
initialPageSize?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NewTableAttributeSet, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
2
1
|
import { type Writable } from 'svelte/store';
|
|
2
|
+
import type { NewTableAttributeSet, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
3
|
export interface AddResizedColumnsConfig {
|
|
4
4
|
onResizeEnd?: (ev: Event) => void;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { sum } from '../utils/math.js';
|
|
2
1
|
import { keyed } from '@humanspeak/svelte-keyed';
|
|
3
2
|
import { derived, writable } from 'svelte/store';
|
|
3
|
+
import { sum } from '../utils/math.js';
|
|
4
4
|
const getDragXPos = (event) => {
|
|
5
5
|
if (event instanceof MouseEvent)
|
|
6
6
|
return event.clientX;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { type Readable, type Writable } from 'svelte/store';
|
|
1
2
|
import type { BodyRow } from '../bodyRows.js';
|
|
2
3
|
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
3
4
|
import { type RecordSetStore } from '../utils/store.js';
|
|
4
|
-
import { type Readable, type Writable } from 'svelte/store';
|
|
5
5
|
export interface SelectedRowsConfig<Item> {
|
|
6
6
|
initialSelectedDataIds?: Record<string, boolean>;
|
|
7
7
|
linkDataSubRows?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { derived, get } from 'svelte/store';
|
|
1
2
|
import { nonNull } from '../utils/filter.js';
|
|
2
3
|
import { recordSetStore } from '../utils/store.js';
|
|
3
|
-
import { derived, get } from 'svelte/store';
|
|
4
4
|
const isAllSubRowsSelectedForRow = (row, $selectedDataIds, linkDataSubRows) => {
|
|
5
5
|
if (row.isData()) {
|
|
6
6
|
if (!linkDataSubRows || row.subRows === undefined) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BodyRow } from '../bodyRows.js';
|
|
2
|
-
import type { TablePlugin, NewTablePropSet } from '../types/TablePlugin.js';
|
|
3
1
|
import { type Readable, type Writable } from 'svelte/store';
|
|
2
|
+
import type { BodyRow } from '../bodyRows.js';
|
|
3
|
+
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
4
4
|
export interface SortByConfig {
|
|
5
5
|
initialSortKeys?: SortKey[];
|
|
6
6
|
disableMultiSort?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { derived, writable } from 'svelte/store';
|
|
1
2
|
import { compare } from '../utils/compare.js';
|
|
2
3
|
import { isShiftClick } from '../utils/event.js';
|
|
3
|
-
import { derived, writable } from 'svelte/store';
|
|
4
4
|
const DEFAULT_TOGGLE_ORDER = ['asc', 'desc', undefined];
|
|
5
5
|
export const createSortKeysStore = (initKeys) => {
|
|
6
6
|
const { subscribe, update, set } = writable(initKeys);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataBodyRow, getSubRows } from '../bodyRows.js';
|
|
2
1
|
import { derived } from 'svelte/store';
|
|
2
|
+
import { DataBodyRow, getSubRows } from '../bodyRows.js';
|
|
3
3
|
const withSubRows = (row, getChildren) => {
|
|
4
4
|
const subItems = getChildren(row.original);
|
|
5
5
|
if (subItems === undefined) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BodyRow } from '../bodyRows.js';
|
|
2
|
-
import type { TablePlugin, NewTablePropSet } from '../types/TablePlugin.js';
|
|
3
1
|
import { type Readable, type Writable } from 'svelte/store';
|
|
2
|
+
import type { BodyRow } from '../bodyRows.js';
|
|
3
|
+
import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js';
|
|
4
4
|
export interface TableFilterConfig {
|
|
5
5
|
fn?: TableFilterFn;
|
|
6
6
|
initialFilterValue?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { recordSetStore } from '../utils/store.js';
|
|
2
1
|
import { derived, writable } from 'svelte/store';
|
|
2
|
+
import { recordSetStore } from '../utils/store.js';
|
|
3
3
|
import { textPrefixFilter } from './addColumnFilters.js';
|
|
4
4
|
const getFilteredRows = (rows, filterValue, columnOptions, { tableCellMatches, fn, includeHiddenColumns }) => {
|
|
5
5
|
const $filteredRows = rows
|
package/dist/tableComponent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Readable } from 'svelte/store';
|
|
2
|
-
import type { AnyPlugins, ComponentKeys, ElementHook, PluginTablePropSet } from './types/TablePlugin.js';
|
|
3
2
|
import type { TableState } from './createViewModel.js';
|
|
3
|
+
import type { AnyPlugins, ComponentKeys, ElementHook, PluginTablePropSet } from './types/TablePlugin.js';
|
|
4
4
|
import type { Clonable } from './utils/clone.js';
|
|
5
5
|
export interface TableComponentInit {
|
|
6
6
|
id: string;
|
package/dist/tableComponent.js
CHANGED
package/dist/types/Label.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RenderConfig } from '@humanspeak/svelte-
|
|
1
|
+
import type { RenderConfig } from '@humanspeak/svelte-render';
|
|
2
2
|
import type { DataBodyCell, DisplayBodyCell } from '../bodyCells.js';
|
|
3
3
|
import type { TableState } from '../createViewModel.js';
|
|
4
4
|
import type { HeaderCell } from '../headerCells.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { Readable } from 'svelte/store';
|
|
1
2
|
import type { BodyCell, BodyCellAttributes } from '../bodyCells.js';
|
|
2
3
|
import type { BodyRow, BodyRowAttributes } from '../bodyRows.js';
|
|
3
4
|
import type { DataColumn, FlatColumn } from '../columns.js';
|
|
5
|
+
import type { PluginInitTableState, TableAttributes, TableBodyAttributes, TableHeadAttributes } from '../createViewModel.js';
|
|
4
6
|
import type { HeaderCell, HeaderCellAttributes } from '../headerCells.js';
|
|
5
7
|
import type { HeaderRow, HeaderRowAttributes } from '../headerRows.js';
|
|
6
|
-
import type { PluginInitTableState, TableAttributes, TableBodyAttributes, TableHeadAttributes } from '../createViewModel.js';
|
|
7
|
-
import type { Readable } from 'svelte/store';
|
|
8
8
|
export type TablePlugin<Item, PluginState, ColumnOptions, TablePropSet extends AnyTablePropSet = AnyTablePropSet, TableAttributeSet extends AnyTableAttributeSet = AnyTableAttributeSet> = (init: TablePluginInit<Item, ColumnOptions>) => TablePluginInstance<Item, PluginState, ColumnOptions, TablePropSet, TableAttributeSet>;
|
|
9
9
|
export type TablePluginInit<Item, ColumnOptions> = {
|
|
10
10
|
pluginName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humanspeak/svelte-headless-table",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "A powerful, headless table library for Svelte that provides complete control over table UI while handling complex data operations like sorting, filtering, pagination, grouping, and row expansion. Build custom, accessible data tables with zero styling opinions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"svelte",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"customizable",
|
|
28
28
|
"accessible"
|
|
29
29
|
],
|
|
30
|
-
"homepage": "https://
|
|
30
|
+
"homepage": "https://table.svelte.page",
|
|
31
31
|
"bugs": {
|
|
32
32
|
"url": "https://github.com/humanspeak/svelte-headless-table/issues"
|
|
33
33
|
},
|
|
@@ -69,6 +69,11 @@
|
|
|
69
69
|
"prepublishOnly": "npm run package",
|
|
70
70
|
"preview": "vite preview",
|
|
71
71
|
"test": "vitest run --coverage",
|
|
72
|
+
"test:all": "npm run test && npm run test:e2e",
|
|
73
|
+
"test:e2e": "playwright test",
|
|
74
|
+
"test:e2e:debug": "playwright test --debug",
|
|
75
|
+
"test:e2e:report": "playwright show-report",
|
|
76
|
+
"test:e2e:ui": "playwright test --ui",
|
|
72
77
|
"test:only": "vitest run",
|
|
73
78
|
"test:watch": "vitest"
|
|
74
79
|
},
|
|
@@ -78,6 +83,8 @@
|
|
|
78
83
|
"@humanspeak/svelte-subscribe": "^5.0.0"
|
|
79
84
|
},
|
|
80
85
|
"devDependencies": {
|
|
86
|
+
"@faker-js/faker": "^9.4.0",
|
|
87
|
+
"@playwright/test": "^1.50.0",
|
|
81
88
|
"@sveltejs/adapter-auto": "^3.0.0",
|
|
82
89
|
"@sveltejs/kit": "^2.0.0",
|
|
83
90
|
"@sveltejs/package": "^2.0.0",
|
|
@@ -85,22 +92,25 @@
|
|
|
85
92
|
"@testing-library/jest-dom": "^6.1.6",
|
|
86
93
|
"@testing-library/svelte": "^4.0.5",
|
|
87
94
|
"@types/eslint": "8.56.0",
|
|
88
|
-
"@types/
|
|
89
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
90
|
-
"@typescript-eslint/parser": "^
|
|
95
|
+
"@types/node": "^22.10.10",
|
|
96
|
+
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
97
|
+
"@typescript-eslint/parser": "^8.22.0",
|
|
91
98
|
"@vitest/coverage-v8": "^1.1.1",
|
|
92
|
-
"eslint": "^
|
|
93
|
-
"eslint-config-prettier": "^
|
|
94
|
-
"eslint-plugin-svelte": "^2.
|
|
95
|
-
"
|
|
96
|
-
"prettier": "^3.
|
|
97
|
-
"prettier-plugin-
|
|
99
|
+
"eslint": "^9.19.0",
|
|
100
|
+
"eslint-config-prettier": "^10.0.1",
|
|
101
|
+
"eslint-plugin-svelte": "^2.46.1",
|
|
102
|
+
"globals": "^15.14.0",
|
|
103
|
+
"prettier": "^3.4.2",
|
|
104
|
+
"prettier-plugin-organize-imports": "^4.1.0",
|
|
105
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
106
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
98
107
|
"publint": "^0.1.9",
|
|
99
108
|
"svelte": "^4.2.7",
|
|
100
109
|
"svelte-check": "^3.6.0",
|
|
101
110
|
"tslib": "^2.4.1",
|
|
102
111
|
"type-fest": "^4.9.0",
|
|
103
|
-
"typescript": "^5.
|
|
112
|
+
"typescript": "^5.7.3",
|
|
113
|
+
"typescript-eslint": "^8.22.0",
|
|
104
114
|
"vite": "^5.0.3",
|
|
105
115
|
"vitest": "^1.0.0"
|
|
106
116
|
},
|