@upbound/monarch-blocks 0.13.0 → 0.13.2
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/data-table.d.ts +2 -3
- package/dist/data-table.js +344 -316
- package/dist/data-table.js.map +1 -1
- package/dist/{empty-view--jBQ7evg.d.ts → empty-view-BgEn71l5.d.ts} +31 -51
- package/dist/graph.d.ts +1 -2
- package/dist/graph.js +207 -168
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +489 -478
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconName } from '@upbound/monarch-core';
|
|
3
|
-
import { RowData, Cell, Column, TableOptions, Row, ColumnDef, HeaderGroup, Header, ReactTable, TableFeatures } from '@tanstack/react-table';
|
|
4
|
-
import * as _tanstack_table_core from '@tanstack/table-core';
|
|
3
|
+
import { RowData, Cell, columnFilteringFeature, globalFilteringFeature, columnFacetingFeature, rowSortingFeature, rowPaginationFeature, rowExpandingFeature, columnGroupingFeature, columnOrderingFeature, columnPinningFeature, columnVisibilityFeature, columnSizingFeature, columnResizingFeature, createFilteredRowModel, createFacetedRowModel, createFacetedUniqueValues, createSortedRowModel, createPaginatedRowModel, createGroupedRowModel, createExpandedRowModel, filterFns, sortFns, Column, TableOptions, Row, ColumnDef, HeaderGroup, Header, ReactTable, TableFeatures } from '@tanstack/react-table';
|
|
5
4
|
|
|
5
|
+
/** Spelled with `@tanstack/react-table` names only, so the published types never reference `table-core`. */
|
|
6
|
+
type DataTableFeatureSet = {
|
|
7
|
+
columnFilteringFeature: typeof columnFilteringFeature;
|
|
8
|
+
globalFilteringFeature: typeof globalFilteringFeature;
|
|
9
|
+
columnFacetingFeature: typeof columnFacetingFeature;
|
|
10
|
+
rowSortingFeature: typeof rowSortingFeature;
|
|
11
|
+
rowPaginationFeature: typeof rowPaginationFeature;
|
|
12
|
+
rowExpandingFeature: typeof rowExpandingFeature;
|
|
13
|
+
columnGroupingFeature: typeof columnGroupingFeature;
|
|
14
|
+
columnOrderingFeature: typeof columnOrderingFeature;
|
|
15
|
+
columnPinningFeature: typeof columnPinningFeature;
|
|
16
|
+
columnVisibilityFeature: typeof columnVisibilityFeature;
|
|
17
|
+
columnSizingFeature: typeof columnSizingFeature;
|
|
18
|
+
columnResizingFeature: typeof columnResizingFeature;
|
|
19
|
+
filteredRowModel: ReturnType<typeof createFilteredRowModel>;
|
|
20
|
+
facetedRowModel: ReturnType<typeof createFacetedRowModel>;
|
|
21
|
+
facetedUniqueValues: ReturnType<typeof createFacetedUniqueValues>;
|
|
22
|
+
sortedRowModel: ReturnType<typeof createSortedRowModel>;
|
|
23
|
+
paginatedRowModel: ReturnType<typeof createPaginatedRowModel>;
|
|
24
|
+
groupedRowModel: ReturnType<typeof createGroupedRowModel>;
|
|
25
|
+
expandedRowModel: ReturnType<typeof createExpandedRowModel>;
|
|
26
|
+
filterFns: typeof filterFns;
|
|
27
|
+
sortFns: typeof sortFns;
|
|
28
|
+
};
|
|
6
29
|
/**
|
|
7
30
|
* Every TanStack Table feature `DataTable` uses, registered once for all tables.
|
|
8
31
|
*
|
|
@@ -10,56 +33,13 @@ import * as _tanstack_table_core from '@tanstack/table-core';
|
|
|
10
33
|
* when its feature is registered here, and the row-model slots are static. `DataTable` therefore
|
|
11
34
|
* always registers every row model and turns a stage off through state or `manual*` options
|
|
12
35
|
* instead (see `data-table.tsx`).
|
|
36
|
+
*
|
|
37
|
+
* The explicit `DataTableFeatureSet` annotation is load-bearing: without it, the emitted `.d.ts`
|
|
38
|
+
* spells the inferred type with `@tanstack/table-core` (where `@tanstack/react-table` re-exports
|
|
39
|
+
* these from), a package Monarch does not depend on. Consumers then resolve whatever `table-core`
|
|
40
|
+
* is hoisted near them — possibly v8 — and get mismatched `TableFeature` types.
|
|
13
41
|
*/
|
|
14
|
-
declare const dataTableFeatures:
|
|
15
|
-
columnFilteringFeature: _tanstack_table_core.TableFeature;
|
|
16
|
-
globalFilteringFeature: _tanstack_table_core.TableFeature;
|
|
17
|
-
columnFacetingFeature: _tanstack_table_core.TableFeature;
|
|
18
|
-
rowSortingFeature: _tanstack_table_core.TableFeature;
|
|
19
|
-
rowPaginationFeature: _tanstack_table_core.TableFeature;
|
|
20
|
-
rowExpandingFeature: _tanstack_table_core.TableFeature;
|
|
21
|
-
columnGroupingFeature: _tanstack_table_core.TableFeature;
|
|
22
|
-
columnOrderingFeature: _tanstack_table_core.TableFeature;
|
|
23
|
-
columnPinningFeature: _tanstack_table_core.TableFeature;
|
|
24
|
-
columnVisibilityFeature: _tanstack_table_core.TableFeature;
|
|
25
|
-
columnSizingFeature: _tanstack_table_core.TableFeature;
|
|
26
|
-
columnResizingFeature: _tanstack_table_core.TableFeature;
|
|
27
|
-
filteredRowModel: (table: _tanstack_table_core.Table<any, any>) => () => _tanstack_table_core.RowModel<any, any>;
|
|
28
|
-
facetedRowModel: (table: _tanstack_table_core.Table<any, any>, columnId: string) => () => _tanstack_table_core.RowModel<any, any>;
|
|
29
|
-
facetedUniqueValues: (table: _tanstack_table_core.Table<_tanstack_table_core.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
30
|
-
sortedRowModel: (table: _tanstack_table_core.Table<any, any>) => () => _tanstack_table_core.RowModel<any, any>;
|
|
31
|
-
paginatedRowModel: (table: _tanstack_table_core.Table<any, any>) => () => _tanstack_table_core.RowModel<any, any>;
|
|
32
|
-
groupedRowModel: (table: _tanstack_table_core.Table<any, any>) => () => _tanstack_table_core.RowModel<any, any>;
|
|
33
|
-
expandedRowModel: (table: _tanstack_table_core.Table<any, any>) => () => _tanstack_table_core.RowModel<any, any>;
|
|
34
|
-
filterFns: {
|
|
35
|
-
arrIncludes: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
36
|
-
arrIncludesAll: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
37
|
-
arrHas: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
38
|
-
arrIncludesSome: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
39
|
-
between: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
40
|
-
betweenInclusive: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
41
|
-
empty: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
42
|
-
endsWith: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
43
|
-
equals: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
44
|
-
equalsString: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
45
|
-
equalsStringSensitive: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
46
|
-
inDateRange: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
47
|
-
inNumberRange: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
48
|
-
includesString: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
49
|
-
includesStringSensitive: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
50
|
-
notEmpty: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
51
|
-
startsWith: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
52
|
-
weakEquals: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
53
|
-
};
|
|
54
|
-
sortFns: {
|
|
55
|
-
alphanumeric: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
56
|
-
alphanumericCaseSensitive: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
57
|
-
basic: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
58
|
-
datetime: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
59
|
-
text: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
60
|
-
textCaseSensitive: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
42
|
+
declare const dataTableFeatures: DataTableFeatureSet;
|
|
63
43
|
/** The feature set every `DataTable` is built with — the `TFeatures` argument of TanStack's core types. */
|
|
64
44
|
type DataTableFeatures = typeof dataTableFeatures;
|
|
65
45
|
/** TanStack's `ColumnDef`, bound to `DataTable`'s features. Use this to author `DataTable` columns. */
|
package/dist/graph.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ import { Node, NodeProps, Edge, EdgeProps, NodeTypes, EdgeTypes } from 'reactflo
|
|
|
2
2
|
export { Edge, Node } from 'reactflow';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ColumnFiltersState } from '@tanstack/react-table';
|
|
5
|
-
import { T as TableDataState } from './empty-view
|
|
5
|
+
import { T as TableDataState } from './empty-view-BgEn71l5.js';
|
|
6
6
|
import { DataTableColumnDef, DataTableEmptyConfig } from './data-table.js';
|
|
7
7
|
import '@upbound/monarch-core';
|
|
8
|
-
import '@tanstack/table-core';
|
|
9
8
|
|
|
10
9
|
type GraphBadgeVariant = 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link' | 'healthy' | 'unhealthy' | 'warning' | 'stale' | 'info' | 'unknown';
|
|
11
10
|
type BadgeWithTooltip = {
|