@adapttable/unstyled 0.1.1 → 0.2.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.
- package/CHANGELOG.md +42 -0
- package/README.md +13 -0
- package/dist/index.cjs +1893 -2385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +280 -245
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +280 -245
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1820 -2344
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,147 +1,146 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from
|
|
3
|
-
import { BaseDataTableProps, TableSource, UseTableDataOptions, UrlStateAdapter, UseSavedViewsOptions, FilterDef, TableLabels, Direction } from '@adapttable/core';
|
|
4
|
-
export { ActionConfirm, ActiveFilterChip, BulkAction, CellProps, ColorScheme, ColumnDef, ColumnFilter, ConfirmHandler, ConfirmRequest, Direction, ExtraFilters, FILTER_TYPES, FilterDef, FilterOption, FilterType, FilterValue, InfiniteQueryLike, PageSelector, PaginatedResponse, PaginationMode, RowAction, SavedView, SortByOption, SortDirection, SortableValue, TableLabels, TableQuery, TableSource, UrlStateAdapter, UseBackendDataOptions, UseDataTableResult, UseFrontendDataOptions, UseSavedViewsOptions, UseSavedViewsResult, UseServerDataOptions, UseTableDataOptions, UseTableDataResult, UseTableUrlStateOptions, UseTableUrlStateResult, createHistoryAdapter, createMemoryAdapter, defaultConfirm, defaultLabels, deriveSortByOptions, filterLabel, filterStateKeys, getHistoryAdapter, useBackendData, useDataTable, useFrontendData, useSavedViews, useServerData, useTableData, useTableUrlState } from '@adapttable/core';
|
|
1
|
+
import { ActionConfirm, ActiveFilterChip, BaseDataTableProps, BulkAction, CellProps, ColorScheme, ColumnDef, ColumnFilter, ConfirmHandler, ConfirmRequest, Direction, Direction as Direction$1, ExtraFilters, FILTER_TYPES, FilterDef, FilterDef as FilterDef$1, FilterOption, FilterType, FilterValue, InfiniteQueryLike, PageSelector, PaginatedResponse, PaginationMode, RowAction, SavedView, SortByOption, SortDirection, SortableValue, TableLabels, TableLabels as TableLabels$1, TableQuery, TableSource, TableSource as TableSource$1, UrlStateAdapter, UrlStateAdapter as UrlStateAdapter$1, UseBackendDataOptions, UseDataTableResult, UseFrontendDataOptions, UseSavedViewsOptions, UseSavedViewsOptions as UseSavedViewsOptions$1, UseSavedViewsResult, UseServerDataOptions, UseTableDataOptions, UseTableDataOptions as UseTableDataOptions$1, UseTableDataResult, UseTableUrlStateOptions, UseTableUrlStateResult, createHistoryAdapter, createMemoryAdapter, defaultConfirm, defaultLabels, deriveSortByOptions, filterLabel, filterStateKeys, getHistoryAdapter, useBackendData, useDataTable, useFrontendData, useSavedViews, useServerData, useTableData, useTableUrlState } from "@adapttable/core";
|
|
2
|
+
import { ReactNode } from "react";
|
|
5
3
|
|
|
4
|
+
//#region src/types.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Per-part class-name hooks. Every node also carries a stable
|
|
8
7
|
* `data-adapttable-part` attribute and `data-*` state attributes so you
|
|
9
8
|
* can style with Tailwind, shadcn, or your own CSS.
|
|
10
9
|
*/
|
|
11
10
|
interface DataTableClassNames {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
11
|
+
root?: string;
|
|
12
|
+
toolbar?: string;
|
|
13
|
+
search?: string;
|
|
14
|
+
/** The search field wrapper (holds the search input + leading icon). */
|
|
15
|
+
searchField?: string;
|
|
16
|
+
/** The leading magnifying-glass icon inside the search field. */
|
|
17
|
+
searchIcon?: string;
|
|
18
|
+
sortSelect?: string;
|
|
19
|
+
/** Rows-per-page `<select>` (toolbar in infinite mode, footer when paged). */
|
|
20
|
+
rowsPerPageSelect?: string;
|
|
21
|
+
filtersButton?: string;
|
|
22
|
+
/** The leading funnel icon inside the Filters button. */
|
|
23
|
+
filtersIcon?: string;
|
|
24
|
+
filtersCount?: string;
|
|
25
|
+
filtersAnchor?: string;
|
|
26
|
+
filtersBackdrop?: string;
|
|
27
|
+
filtersPopover?: string;
|
|
28
|
+
filtersPanel?: string;
|
|
29
|
+
filtersHeader?: string;
|
|
30
|
+
filtersTitle?: string;
|
|
31
|
+
filtersClose?: string;
|
|
32
|
+
filtersBody?: string;
|
|
33
|
+
filtersFooter?: string;
|
|
34
|
+
filtersClear?: string;
|
|
35
|
+
filtersDone?: string;
|
|
36
|
+
/** One auto-built filter field (the `<label>`/`<fieldset>` wrapper). */
|
|
37
|
+
filterField?: string;
|
|
38
|
+
/** The field's caption (the `<span>`/`<legend>` holding the label text). */
|
|
39
|
+
filterLabel?: string;
|
|
40
|
+
/** Text / date / number inputs inside an auto-built field. */
|
|
41
|
+
filterInput?: string;
|
|
42
|
+
/** The `<select>` of an auto-built `select` field. */
|
|
43
|
+
filterSelect?: string;
|
|
44
|
+
/** The operator `<select>` of an auto-built range field. */
|
|
45
|
+
filterOperator?: string;
|
|
46
|
+
/** The checkbox-list container of an auto-built `multiSelect` field. */
|
|
47
|
+
filterCheckboxGroup?: string;
|
|
48
|
+
/** One checkbox option (`<label>` + checkbox) in a `multiSelect` field. */
|
|
49
|
+
filterCheckbox?: string;
|
|
50
|
+
/** The placeholder shown while a field's async options load. */
|
|
51
|
+
filterOptionsLoading?: string;
|
|
52
|
+
chips?: string;
|
|
53
|
+
chip?: string;
|
|
54
|
+
chipRemove?: string;
|
|
55
|
+
columnMenu?: string;
|
|
56
|
+
columnMenuButton?: string;
|
|
57
|
+
columnMenuPanel?: string;
|
|
58
|
+
columnMenuHeader?: string;
|
|
59
|
+
columnMenuTitle?: string;
|
|
60
|
+
columnMenuItem?: string;
|
|
61
|
+
columnMenuGrip?: string;
|
|
62
|
+
columnMenuLabel?: string;
|
|
63
|
+
columnMenuVisibility?: string;
|
|
64
|
+
columnMenuPin?: string;
|
|
65
|
+
/** The separator above the trailing row-actions entry in the menu. */
|
|
66
|
+
columnMenuSeparator?: string;
|
|
67
|
+
columnMenuReset?: string;
|
|
68
|
+
/** The saved-views menu trigger button. */
|
|
69
|
+
viewsButton?: string;
|
|
70
|
+
/** The saved-views dropdown panel. */
|
|
71
|
+
viewsPanel?: string;
|
|
72
|
+
/** One saved view's apply button in the list. */
|
|
73
|
+
viewsItem?: string;
|
|
74
|
+
/** A saved view's delete button. */
|
|
75
|
+
viewsDelete?: string;
|
|
76
|
+
/** The view-name input in the save row. */
|
|
77
|
+
viewsInput?: string;
|
|
78
|
+
/** The save-view button in the save row. */
|
|
79
|
+
viewsSave?: string;
|
|
80
|
+
resizeHandle?: string;
|
|
81
|
+
bulkBar?: string;
|
|
82
|
+
bulkButton?: string;
|
|
83
|
+
/** The cross-page banner inside the bulk bar (full page selected). */
|
|
84
|
+
selectAllBanner?: string;
|
|
85
|
+
/** The banner's status text (page selected / all matching selected). */
|
|
86
|
+
selectAllText?: string;
|
|
87
|
+
/** The banner's action button (select all matching / clear all). */
|
|
88
|
+
selectAllButton?: string;
|
|
89
|
+
table?: string;
|
|
90
|
+
thead?: string;
|
|
91
|
+
headerRow?: string;
|
|
92
|
+
headerCell?: string;
|
|
93
|
+
/** The grouped-header `<tr>` rendered above the column headers. */
|
|
94
|
+
groupRow?: string;
|
|
95
|
+
/** One spanning `<th>` (or edge gap) inside the group row. */
|
|
96
|
+
groupCell?: string;
|
|
97
|
+
sortButton?: string;
|
|
98
|
+
/** The 1-based multi-sort position badge inside a sorted header. */
|
|
99
|
+
sortIndex?: string;
|
|
100
|
+
tbody?: string;
|
|
101
|
+
row?: string;
|
|
102
|
+
cell?: string;
|
|
103
|
+
/** The leading expand-chevron header cell (row expansion). */
|
|
104
|
+
expandHeader?: string;
|
|
105
|
+
/** The leading expand-chevron body cell on each row. */
|
|
106
|
+
expandCell?: string;
|
|
107
|
+
/** The expand/collapse chevron button (desktop rows and mobile cards). */
|
|
108
|
+
expandButton?: string;
|
|
109
|
+
/** The full-width detail `<tr>` rendered under an expanded row. */
|
|
110
|
+
detailRow?: string;
|
|
111
|
+
/** The single spanning `<td>` inside the detail row. */
|
|
112
|
+
detailCell?: string;
|
|
113
|
+
/** The detail section inside an expanded mobile card. */
|
|
114
|
+
cardDetail?: string;
|
|
115
|
+
actionsCell?: string;
|
|
116
|
+
actionButton?: string;
|
|
117
|
+
selectionCell?: string;
|
|
118
|
+
checkbox?: string;
|
|
119
|
+
loadMore?: string;
|
|
120
|
+
loadMoreButton?: string;
|
|
121
|
+
cards?: string;
|
|
122
|
+
card?: string;
|
|
123
|
+
cardRow?: string;
|
|
124
|
+
cardLabel?: string;
|
|
125
|
+
cardValue?: string;
|
|
126
|
+
/** The `<tfoot>` holding the summary row. */
|
|
127
|
+
summary?: string;
|
|
128
|
+
/** The summary `<tr>` inside the footer. */
|
|
129
|
+
summaryRow?: string;
|
|
130
|
+
/** One summary `<td>` (aligned under its column, or an edge pad). */
|
|
131
|
+
summaryCell?: string;
|
|
132
|
+
/** The trailing summary `<li>` in the mobile card list. */
|
|
133
|
+
summaryCard?: string;
|
|
134
|
+
footer?: string;
|
|
135
|
+
pageButton?: string;
|
|
136
|
+
empty?: string;
|
|
137
|
+
/** The clear-filters button inside the "no results" empty state. */
|
|
138
|
+
emptyClear?: string;
|
|
139
|
+
loading?: string;
|
|
140
|
+
/** The non-blocking background-refresh progress indicator. */
|
|
141
|
+
refreshIndicator?: string;
|
|
142
|
+
error?: string;
|
|
143
|
+
retryButton?: string;
|
|
145
144
|
}
|
|
146
145
|
/**
|
|
147
146
|
* Overridable sub-components — a cross-adapter alias for the top-level
|
|
@@ -149,80 +148,81 @@ interface DataTableClassNames {
|
|
|
149
148
|
* entry wins (`slots.empty ?? emptyState`, `slots.skeleton ?? loadingState`).
|
|
150
149
|
*/
|
|
151
150
|
interface DataTableSlots {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
/** Replace the empty-state (alias for `emptyState`). */
|
|
152
|
+
empty?: ReactNode;
|
|
153
|
+
/** Replace the loading skeleton (alias for `loadingState`). */
|
|
154
|
+
skeleton?: ReactNode;
|
|
156
155
|
}
|
|
157
156
|
/** Props for the unstyled `<DataTable>`. */
|
|
158
157
|
interface DataTableProps<TRow> extends Omit<BaseDataTableProps<TRow>, "source"> {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Full-control tier: a prebuilt source (`useFrontendData`,
|
|
160
|
+
* `useBackendData`, …), used as-is. Omit it and pass `data` instead for
|
|
161
|
+
* the managed tiers.
|
|
162
|
+
*/
|
|
163
|
+
source?: TableSource$1<TRow>;
|
|
164
|
+
/**
|
|
165
|
+
* The rows. Alone: frontend tier — the table filters/sorts/pages them.
|
|
166
|
+
* With `onQueryChange`: server tier — the current page, as returned.
|
|
167
|
+
*/
|
|
168
|
+
data?: readonly TRow[];
|
|
169
|
+
/** Server tier: total row count across all pages (drives the pager). */
|
|
170
|
+
total?: number;
|
|
171
|
+
/** Server tier: request in flight. */
|
|
172
|
+
loading?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Server tier: fired with the consolidated query (page, search, sort,
|
|
175
|
+
* filters) whenever it changes — including once on mount with the
|
|
176
|
+
* URL-restored values. The caller fetches and hands back `data` + `total`.
|
|
177
|
+
*/
|
|
178
|
+
onQueryChange?: UseTableDataOptions$1<TRow>["onQueryChange"];
|
|
179
|
+
/**
|
|
180
|
+
* URL-state adapter for the managed tiers (router integration, memory
|
|
181
|
+
* adapter for tests/SSR). Defaults to the browser History API.
|
|
182
|
+
*/
|
|
183
|
+
urlAdapter?: UrlStateAdapter$1;
|
|
184
|
+
/**
|
|
185
|
+
* Sync table state (search, sort, page, filters) to the URL. `false`
|
|
186
|
+
* keeps everything in memory — the table works identically, the address
|
|
187
|
+
* bar never changes, and any `urlAdapter` is ignored.
|
|
188
|
+
*
|
|
189
|
+
* @default true
|
|
190
|
+
*/
|
|
191
|
+
urlSync?: boolean;
|
|
192
|
+
/** Per-table URL namespace (e.g. `"left"` → `left.q`, `left.page`). */
|
|
193
|
+
urlKey?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Mounts a saved-views menu in the toolbar (beside the Columns button).
|
|
196
|
+
* The table's own `urlAdapter` / `urlKey` fill in unless overridden here.
|
|
197
|
+
*/
|
|
198
|
+
savedViews?: UseSavedViewsOptions$1;
|
|
199
|
+
/** Per-part class name overrides. */
|
|
200
|
+
classNames?: DataTableClassNames;
|
|
201
|
+
/** Empty-state node override. */
|
|
202
|
+
emptyState?: ReactNode;
|
|
203
|
+
/** Loading-state node override (replaces the skeleton on first load). */
|
|
204
|
+
loadingState?: ReactNode;
|
|
205
|
+
/**
|
|
206
|
+
* Cross-adapter alias for `emptyState` / `loadingState`. Takes precedence
|
|
207
|
+
* over the top-level props when both are provided.
|
|
208
|
+
*/
|
|
209
|
+
slots?: DataTableSlots;
|
|
211
210
|
}
|
|
212
|
-
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/components/AutoFilterForm.d.ts
|
|
213
213
|
/** Props for {@link AutoFilterForm}. */
|
|
214
214
|
interface AutoFilterFormProps<TRow> {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
215
|
+
/** The resolved filter definitions, in render order. */
|
|
216
|
+
defs: readonly FilterDef$1<TRow>[];
|
|
217
|
+
/** The table source whose filter bag the controls read and write. */
|
|
218
|
+
source: TableSource$1<TRow>;
|
|
219
|
+
/** Per-part class name overrides (the `filter*` keys). */
|
|
220
|
+
classNames?: DataTableClassNames;
|
|
221
|
+
/**
|
|
222
|
+
* Label overrides for the range widgets (`operator`, `value`, `from`,
|
|
223
|
+
* `to`, and the `op*` operator names); English defaults merge in.
|
|
224
|
+
*/
|
|
225
|
+
labels?: TableLabels$1;
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* The auto-built filter form for the declarative `filters` array: one
|
|
@@ -234,34 +234,50 @@ interface AutoFilterFormProps<TRow> {
|
|
|
234
234
|
*
|
|
235
235
|
* @typeParam TRow - The row type.
|
|
236
236
|
*/
|
|
237
|
-
declare function AutoFilterForm<TRow>({
|
|
238
|
-
|
|
237
|
+
declare function AutoFilterForm<TRow>({
|
|
238
|
+
defs,
|
|
239
|
+
source,
|
|
240
|
+
classNames,
|
|
241
|
+
labels
|
|
242
|
+
}: Readonly<AutoFilterFormProps<TRow>>): import("react").JSX.Element;
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/components/FilterPanel.d.ts
|
|
239
245
|
/** Props for {@link FilterPanel}. */
|
|
240
246
|
interface FilterPanelProps {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
open: boolean;
|
|
248
|
+
onClose: () => void;
|
|
249
|
+
filters: ReactNode;
|
|
250
|
+
activeFilterCount: number;
|
|
251
|
+
onClearFilters?: () => void;
|
|
252
|
+
labels: Required<TableLabels$1>;
|
|
253
|
+
dir?: Direction$1;
|
|
254
|
+
classNames: DataTableClassNames;
|
|
249
255
|
}
|
|
250
256
|
/** Backdrop + side drawer for caller-provided filter widgets. */
|
|
251
|
-
declare function FilterPanel({
|
|
252
|
-
|
|
257
|
+
declare function FilterPanel({
|
|
258
|
+
open,
|
|
259
|
+
onClose,
|
|
260
|
+
filters,
|
|
261
|
+
activeFilterCount,
|
|
262
|
+
onClearFilters,
|
|
263
|
+
labels,
|
|
264
|
+
dir,
|
|
265
|
+
classNames
|
|
266
|
+
}: Readonly<FilterPanelProps>): import("react").ReactPortal | null;
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/components/FilterPopover.d.ts
|
|
253
269
|
/** Props for {@link FilterPopover}. */
|
|
254
270
|
interface FilterPopoverProps {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
271
|
+
open: boolean;
|
|
272
|
+
onClose: () => void;
|
|
273
|
+
filters: ReactNode;
|
|
274
|
+
activeFilterCount: number;
|
|
275
|
+
onClearFilters?: () => void;
|
|
276
|
+
labels: Required<TableLabels$1>;
|
|
277
|
+
dir?: Direction$1;
|
|
278
|
+
classNames: DataTableClassNames;
|
|
279
|
+
/** The Filters trigger button — the popover anchors beneath it. */
|
|
280
|
+
children: ReactNode;
|
|
265
281
|
}
|
|
266
282
|
/**
|
|
267
283
|
* Anchored filter card (the default filter container). Opens beneath the
|
|
@@ -270,24 +286,36 @@ interface FilterPopoverProps {
|
|
|
270
286
|
* it. This is the plain-DOM mirror of the Mantine reference; pair with
|
|
271
287
|
* `filtersMode="drawer"` for the slide-in panel (`FilterPanel`) instead.
|
|
272
288
|
*/
|
|
273
|
-
declare function FilterPopover({
|
|
274
|
-
|
|
289
|
+
declare function FilterPopover({
|
|
290
|
+
open,
|
|
291
|
+
onClose,
|
|
292
|
+
filters,
|
|
293
|
+
activeFilterCount,
|
|
294
|
+
onClearFilters,
|
|
295
|
+
labels,
|
|
296
|
+
dir,
|
|
297
|
+
classNames,
|
|
298
|
+
children
|
|
299
|
+
}: Readonly<FilterPopoverProps>): import("react").JSX.Element;
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/components/icons.d.ts
|
|
275
302
|
interface IconProps {
|
|
276
|
-
|
|
277
|
-
|
|
303
|
+
size?: number;
|
|
304
|
+
className?: string;
|
|
278
305
|
}
|
|
279
306
|
/** Magnifying-glass search glyph (inline SVG, `currentColor`). */
|
|
280
|
-
declare const SearchIcon: (p: Readonly<IconProps>) => react.JSX.Element;
|
|
307
|
+
declare const SearchIcon: (p: Readonly<IconProps>) => import("react").JSX.Element;
|
|
281
308
|
/** Funnel glyph for the Filters button (inline SVG, `currentColor`). */
|
|
282
|
-
declare const FiltersIcon: (p: Readonly<IconProps>) => react.JSX.Element;
|
|
283
|
-
|
|
309
|
+
declare const FiltersIcon: (p: Readonly<IconProps>) => import("react").JSX.Element;
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/components/SavedViewsMenu.d.ts
|
|
284
312
|
/** The label strings the saved-views menu renders. */
|
|
285
|
-
type SavedViewsLabels = Pick<Required<TableLabels>, "savedViews" | "saveView" | "viewName" | "deleteView">;
|
|
313
|
+
type SavedViewsLabels = Pick<Required<TableLabels$1>, "savedViews" | "saveView" | "viewName" | "deleteView">;
|
|
286
314
|
interface SavedViewsMenuProps {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
315
|
+
/** Wiring for core's `useSavedViews` — storage key, storage, adapter, urlKey. */
|
|
316
|
+
options: UseSavedViewsOptions$1;
|
|
317
|
+
labels: SavedViewsLabels;
|
|
318
|
+
classNames: DataTableClassNames;
|
|
291
319
|
}
|
|
292
320
|
/**
|
|
293
321
|
* Saved-views popover: a disclosure button + a panel listing the saved views
|
|
@@ -296,8 +324,13 @@ interface SavedViewsMenuProps {
|
|
|
296
324
|
* `useSavedViews`; closes on outside-click or Escape. Ships no styles —
|
|
297
325
|
* target the `data-adapttable-part` hooks or the `views*` className slots.
|
|
298
326
|
*/
|
|
299
|
-
declare function SavedViewsMenu({
|
|
300
|
-
|
|
327
|
+
declare function SavedViewsMenu({
|
|
328
|
+
options,
|
|
329
|
+
labels,
|
|
330
|
+
classNames
|
|
331
|
+
}: Readonly<SavedViewsMenuProps>): import("react").JSX.Element;
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/cx.d.ts
|
|
301
334
|
/**
|
|
302
335
|
* Join class-name parts, dropping falsy values. Tiny `clsx`-style helper
|
|
303
336
|
* so the unstyled adapter has no runtime dependencies.
|
|
@@ -306,7 +339,8 @@ declare function SavedViewsMenu({ options, labels, classNames, }: Readonly<Saved
|
|
|
306
339
|
* @returns The space-joined class string.
|
|
307
340
|
*/
|
|
308
341
|
declare function cx(...parts: (string | false | null | undefined)[]): string;
|
|
309
|
-
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region src/DataTable.d.ts
|
|
310
344
|
/**
|
|
311
345
|
* Headless, unstyled AdaptTable for Tailwind / shadcn / custom CSS. Renders
|
|
312
346
|
* semantic HTML with `data-adapttable-part` hooks and `className` overrides;
|
|
@@ -314,6 +348,7 @@ declare function cx(...parts: (string | false | null | undefined)[]): string;
|
|
|
314
348
|
*
|
|
315
349
|
* @typeParam TRow - The row type.
|
|
316
350
|
*/
|
|
317
|
-
declare function DataTable<TRow>(props: Readonly<DataTableProps<TRow>>): react.JSX.Element;
|
|
318
|
-
|
|
319
|
-
export { AutoFilterForm, type AutoFilterFormProps, DataTable, type DataTableClassNames, type DataTableProps, type DataTableSlots, FilterPanel, type FilterPanelProps, FilterPopover, type FilterPopoverProps, FiltersIcon, type SavedViewsLabels, SavedViewsMenu, type SavedViewsMenuProps, SearchIcon, cx };
|
|
351
|
+
declare function DataTable<TRow>(props: Readonly<DataTableProps<TRow>>): import("react").JSX.Element;
|
|
352
|
+
//#endregion
|
|
353
|
+
export { type ActionConfirm, type ActiveFilterChip, AutoFilterForm, type AutoFilterFormProps, type BulkAction, type CellProps, type ColorScheme, type ColumnDef, type ColumnFilter, type ConfirmHandler, type ConfirmRequest, DataTable, type DataTableClassNames, type DataTableProps, type DataTableSlots, type Direction, type ExtraFilters, FILTER_TYPES, type FilterDef, type FilterOption, FilterPanel, type FilterPanelProps, FilterPopover, type FilterPopoverProps, type FilterType, type FilterValue, FiltersIcon, type InfiniteQueryLike, type PageSelector, type PaginatedResponse, type PaginationMode, type RowAction, type SavedView, type SavedViewsLabels, SavedViewsMenu, type SavedViewsMenuProps, SearchIcon, type SortByOption, type SortDirection, type SortableValue, type TableLabels, type TableQuery, type TableSource, type UrlStateAdapter, type UseBackendDataOptions, type UseDataTableResult, type UseFrontendDataOptions, type UseSavedViewsOptions, type UseSavedViewsResult, type UseServerDataOptions, type UseTableDataOptions, type UseTableDataResult, type UseTableUrlStateOptions, type UseTableUrlStateResult, createHistoryAdapter, createMemoryAdapter, cx, defaultConfirm, defaultLabels, deriveSortByOptions, filterLabel, filterStateKeys, getHistoryAdapter, useBackendData, useDataTable, useFrontendData, useSavedViews, useServerData, useTableData, useTableUrlState };
|
|
354
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/components/AutoFilterForm.tsx","../src/components/FilterPanel.tsx","../src/components/FilterPopover.tsx","../src/components/icons.tsx","../src/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