@krak-stack/registry 0.1.19 → 0.1.21
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/components/ui/code-block.d.ts +1 -3
- package/dist/components/ui/code-block.js +32 -60
- package/dist/components/ui/data-table.d.ts +211 -273
- package/dist/components/ui/data-table.js +1894 -2012
- package/dist/components/ui/effect-form.js +169 -170
- package/dist/components/ui/form.js +112 -113
- package/dist/components/ui/icon-input.js +40 -43
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/sidebar-layout.js +67 -72
- package/dist/components/ui/theme-switcher.js +3 -3
- package/dist/components/ui/virtualized-combobox.js +31 -34
- package/dist/lib/{docs-core.d.ts → docs.d.ts} +135 -144
- package/dist/lib/{docs-core.js → docs.js} +597 -440
- package/dist/lib/documentation-toolkit.d.ts +19 -1
- package/dist/lib/documentation-toolkit.js +164 -66
- package/dist/lib/httpapi-cli.d.ts +5 -4
- package/dist/lib/httpapi-cli.js +256 -34
- package/dist/lib/httpapi-client.js +3 -3
- package/dist/lib/httpapi-helpers.d.ts +8 -6
- package/dist/lib/httpapi-helpers.js +12 -12
- package/dist/lib/httpapi-mcp.js +3 -3
- package/dist/lib/httpapi-toolkit.js +3 -3
- package/dist/lib/markdown/content.d.ts +13 -0
- package/dist/lib/markdown/server.d.ts +19 -0
- package/dist/lib/query.d.ts +3 -2
- package/dist/lib/query.js +10 -8
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/services/agent/client/atom.d.ts +7 -0
- package/dist/services/agent/client/index.js +481 -304
- package/dist/services/agent/index.d.ts +16 -0
- package/dist/services/agent/index.js +102 -1
- package/dist/services/agent/schema.d.ts +28 -0
- package/dist/services/agent/schema.js +15 -4
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/index.js +9 -9
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +5 -5
- package/dist/services/notification/index.js +2 -2
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +7 -7
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/package.json +6 -38
|
@@ -1,124 +1,142 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type PaginationMessages } from "./pagination.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { type QueryType } from "../../lib/query.js";
|
|
4
|
+
type RowData = object;
|
|
5
|
+
export type DataTableSorting = readonly {
|
|
6
|
+
id: string;
|
|
7
|
+
desc: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
export type DataTablePaginationState = {
|
|
10
|
+
pageIndex: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
};
|
|
13
|
+
export type DataTableView = "table" | "gallery";
|
|
14
|
+
export interface DataTablePublicState {
|
|
15
|
+
globalFilter: string;
|
|
16
|
+
sorting: DataTableSorting;
|
|
17
|
+
pagination: DataTablePaginationState;
|
|
18
|
+
columnVisibility: Record<string, boolean>;
|
|
19
|
+
columnSizing: Record<string, number>;
|
|
20
|
+
rowSelection: Record<string, boolean>;
|
|
21
|
+
grouping: readonly string[];
|
|
22
|
+
collapsedGroups: Record<string, boolean>;
|
|
23
|
+
view: DataTableView;
|
|
24
|
+
}
|
|
25
|
+
export interface DataTableValueGetterParams<TData extends RowData> {
|
|
26
|
+
data: TData;
|
|
27
|
+
rowId: string;
|
|
28
|
+
rowIndex: number;
|
|
29
|
+
colDef: DataTableColDef<TData>;
|
|
30
|
+
}
|
|
31
|
+
export interface DataTableCellRendererParams<TData extends RowData> extends DataTableValueGetterParams<TData> {
|
|
32
|
+
value: unknown;
|
|
33
|
+
}
|
|
34
|
+
export interface DataTableColDef<TData extends RowData> {
|
|
35
|
+
field?: keyof TData & string;
|
|
36
|
+
colId?: string;
|
|
37
|
+
headerName: ReactNode;
|
|
38
|
+
valueGetter?: (params: DataTableValueGetterParams<TData>) => unknown;
|
|
39
|
+
valueFormatter?: (params: DataTableCellRendererParams<TData>) => ReactNode;
|
|
40
|
+
cellRenderer?: (params: DataTableCellRendererParams<TData>) => ReactNode;
|
|
41
|
+
sortable?: boolean;
|
|
42
|
+
comparator?: (left: unknown, right: unknown, leftData: TData, rightData: TData) => number;
|
|
43
|
+
searchable?: boolean;
|
|
44
|
+
hideable?: boolean;
|
|
45
|
+
resizable?: boolean;
|
|
46
|
+
width?: number;
|
|
47
|
+
minWidth?: number;
|
|
48
|
+
maxWidth?: number;
|
|
7
49
|
truncate?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface DataTableStatus {
|
|
52
|
+
loading?: boolean;
|
|
53
|
+
error?: ReactNode;
|
|
54
|
+
empty?: ReactNode;
|
|
55
|
+
}
|
|
56
|
+
export type DataTableRowAction<TData> = {
|
|
57
|
+
id?: string;
|
|
58
|
+
name: string;
|
|
59
|
+
icon?: ReactNode;
|
|
60
|
+
variant?: "default" | "destructive";
|
|
61
|
+
onClick: (data: TData) => void;
|
|
62
|
+
visible?: (data: TData) => boolean;
|
|
63
|
+
};
|
|
64
|
+
export type DataTableBulkAction<TData> = {
|
|
65
|
+
id?: string;
|
|
66
|
+
name: string;
|
|
67
|
+
icon?: ReactNode;
|
|
68
|
+
variant?: "default" | "destructive";
|
|
69
|
+
onClick: (rows: TData[]) => void;
|
|
70
|
+
visible?: (rows: TData[]) => boolean;
|
|
8
71
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
72
|
+
export type DataTableGroupAction = {
|
|
73
|
+
name: string;
|
|
74
|
+
icon?: ReactNode;
|
|
75
|
+
variant?: "default" | "destructive";
|
|
76
|
+
onClick: (groupId: string) => void;
|
|
77
|
+
visible?: (groupId: string) => boolean;
|
|
78
|
+
};
|
|
79
|
+
export interface DataTableGroupingField<TData> {
|
|
80
|
+
id: string;
|
|
81
|
+
label: string;
|
|
82
|
+
getGroupId: (row: TData) => string;
|
|
83
|
+
getRowGroupIds?: (row: TData) => readonly string[];
|
|
84
|
+
getGroupIds?: () => readonly string[];
|
|
85
|
+
renderGroupLabel?: (groupId: string, rows: TData[]) => ReactNode;
|
|
86
|
+
renderEmptyGroup?: (groupId: string) => ReactNode;
|
|
87
|
+
onMoveToGroup?: (row: TData, groupId: string) => void;
|
|
88
|
+
actionsLabel?: string;
|
|
89
|
+
actions?: readonly DataTableGroupAction[];
|
|
90
|
+
}
|
|
91
|
+
export interface DataTableGroupingFeature<TData> {
|
|
92
|
+
fields: readonly DataTableGroupingField<TData>[];
|
|
93
|
+
initial?: readonly string[];
|
|
94
|
+
getRowLabel?: (row: TData) => string;
|
|
95
|
+
}
|
|
96
|
+
export type DataTablePaginationFeature = false | {
|
|
97
|
+
mode: "client";
|
|
98
|
+
pageSizes?: readonly number[];
|
|
99
|
+
} | {
|
|
100
|
+
mode: "server";
|
|
101
|
+
rowCount: number;
|
|
102
|
+
pageSizes?: readonly number[];
|
|
22
103
|
};
|
|
23
|
-
export
|
|
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
|
-
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
60
|
-
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
61
|
-
columnMeta: DataTableColumnMeta;
|
|
62
|
-
}, TData, TSelected, {}, {}, {}>, useDataTableCellContext: <TValue extends import("@tanstack/react-table").CellData = unknown>() => import("@tanstack/react-table").Cell_Core<{
|
|
63
|
-
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
64
|
-
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
65
|
-
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
66
|
-
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
67
|
-
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
68
|
-
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
69
|
-
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
70
|
-
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
71
|
-
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
72
|
-
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
73
|
-
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
74
|
-
columnMeta: DataTableColumnMeta;
|
|
75
|
-
}, any, TValue> & {
|
|
76
|
-
FlexRender: () => ReactNode;
|
|
77
|
-
}, useDataTableHeaderContext: <TValue extends import("@tanstack/react-table").CellData = unknown>() => import("@tanstack/react-table").Header_Core<{
|
|
78
|
-
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
79
|
-
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
80
|
-
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
81
|
-
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
82
|
-
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
83
|
-
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
84
|
-
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
85
|
-
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
86
|
-
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
87
|
-
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
88
|
-
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
89
|
-
columnMeta: DataTableColumnMeta;
|
|
90
|
-
}, any, TValue> & import("@tanstack/react-table").Header_ColumnResizing & import("@tanstack/react-table").Header_ColumnSizing & {
|
|
91
|
-
FlexRender: () => ReactNode;
|
|
92
|
-
}, useDataTableContext: <TData extends RowData = RowData, TSelected = import("@tanstack/react-table").TableState_ColumnFiltering & import("@tanstack/react-table").TableState_ColumnResizing & import("@tanstack/react-table").TableState_ColumnSizing & import("@tanstack/react-table").TableState_ColumnVisibility & import("@tanstack/react-table").TableState_GlobalFiltering & import("@tanstack/react-table").TableState_RowPagination & import("@tanstack/react-table").TableState_RowSelection & import("@tanstack/react-table").TableState_RowSorting>() => AppReactTable<{
|
|
93
|
-
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
94
|
-
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
95
|
-
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
96
|
-
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
97
|
-
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
98
|
-
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
99
|
-
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
100
|
-
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
101
|
-
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
102
|
-
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
103
|
-
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
104
|
-
columnMeta: DataTableColumnMeta;
|
|
105
|
-
}, TData, TSelected, {}, {}, {}>;
|
|
106
|
-
export type DataTableColumnDef<TData extends RowData, TValue = unknown> = ColumnDef<typeof dataTableFeatures, TData, TValue>;
|
|
107
|
-
type DataTableColumn<TData extends RowData, TValue = unknown> = Column<typeof dataTableFeatures, TData, TValue>;
|
|
108
|
-
type DataTableHeader<TData extends RowData, TValue = unknown> = Header<typeof dataTableFeatures, TData, TValue>;
|
|
109
|
-
type DataTableInstance<TData extends RowData> = AppReactTable<typeof dataTableFeatures, TData, TableState<typeof dataTableFeatures>, Record<never, never>, Record<never, never>, Record<never, never>>;
|
|
110
|
-
export declare const TableSearchSchema: Schema.Struct<{
|
|
111
|
-
readonly page: Schema.optional<Schema.Int>;
|
|
112
|
-
readonly pageSize: Schema.optional<Schema.Int>;
|
|
113
|
-
readonly globalFilter: Schema.optional<Schema.String>;
|
|
114
|
-
readonly sort: Schema.optional<Schema.decodeTo<Schema.String, Schema.decodeTo<Schema.$Array<Schema.Struct<{
|
|
115
|
-
readonly id: Schema.NonEmptyString;
|
|
116
|
-
readonly direction: Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>;
|
|
117
|
-
}>>, Schema.String, never, never>, never, never>>;
|
|
118
|
-
readonly grouping: Schema.optional<Schema.$Array<Schema.String>>;
|
|
119
|
-
}>;
|
|
120
|
-
export declare const TableSearchSchemaStandard: ReturnType<typeof Schema.toStandardSchemaV1<typeof TableSearchSchema>>;
|
|
121
|
-
export type TableParams = Schema.Schema.Type<typeof TableSearchSchema>;
|
|
104
|
+
export interface DataTableFeatures<TData> {
|
|
105
|
+
search?: boolean;
|
|
106
|
+
sorting?: boolean;
|
|
107
|
+
pagination?: DataTablePaginationFeature;
|
|
108
|
+
columnVisibility?: boolean;
|
|
109
|
+
selection?: false | {
|
|
110
|
+
getRowId?: (row: TData) => string;
|
|
111
|
+
isRowSelectable?: (row: TData) => boolean;
|
|
112
|
+
onSelectionChange?: (rows: TData[]) => void;
|
|
113
|
+
bulkActions?: false | {
|
|
114
|
+
label?: string;
|
|
115
|
+
items: readonly DataTableBulkAction<TData>[];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
rowActions?: false | {
|
|
119
|
+
label?: string;
|
|
120
|
+
items: readonly DataTableRowAction<TData>[];
|
|
121
|
+
};
|
|
122
|
+
export?: false | {
|
|
123
|
+
baseName: string;
|
|
124
|
+
scope?: "currentPage" | "filteredRows";
|
|
125
|
+
};
|
|
126
|
+
gallery?: false | {
|
|
127
|
+
name: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
tag?: string;
|
|
130
|
+
tagIcon?: ReactNode;
|
|
131
|
+
};
|
|
132
|
+
grouping?: false | DataTableGroupingFeature<TData>;
|
|
133
|
+
reordering?: false | {
|
|
134
|
+
onReorder: (rows: TData[]) => void;
|
|
135
|
+
getRowLabel?: (row: TData) => string;
|
|
136
|
+
handleLabel?: string;
|
|
137
|
+
};
|
|
138
|
+
refresh?: false | (() => void);
|
|
139
|
+
}
|
|
122
140
|
export type DataTableMessages = PaginationMessages & {
|
|
123
141
|
actions: string;
|
|
124
142
|
empty: string;
|
|
@@ -135,10 +153,12 @@ export type DataTableMessages = PaginationMessages & {
|
|
|
135
153
|
groupBy: string;
|
|
136
154
|
sortAsc: string;
|
|
137
155
|
sortDesc: string;
|
|
138
|
-
sortHide: string;
|
|
139
156
|
sortClear: string;
|
|
140
157
|
sortBy: string;
|
|
158
|
+
hideColumn: string;
|
|
141
159
|
reorder: string;
|
|
160
|
+
moveUp: string;
|
|
161
|
+
moveDown: string;
|
|
142
162
|
resizeColumn: (column: string) => string;
|
|
143
163
|
listOthers: (count: number) => string;
|
|
144
164
|
selectAllRows: string;
|
|
@@ -170,10 +190,12 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
170
190
|
groupBy: string;
|
|
171
191
|
sortAsc: string;
|
|
172
192
|
sortDesc: string;
|
|
173
|
-
sortHide: string;
|
|
174
193
|
sortClear: string;
|
|
175
194
|
sortBy: string;
|
|
195
|
+
hideColumn: string;
|
|
176
196
|
reorder: string;
|
|
197
|
+
moveUp: string;
|
|
198
|
+
moveDown: string;
|
|
177
199
|
resizeColumn: (column: string) => string;
|
|
178
200
|
listOthers: (count: number) => string;
|
|
179
201
|
selectAllRows: string;
|
|
@@ -203,188 +225,104 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
203
225
|
groupBy: string;
|
|
204
226
|
sortAsc: string;
|
|
205
227
|
sortDesc: string;
|
|
206
|
-
sortHide: string;
|
|
207
228
|
sortClear: string;
|
|
208
229
|
sortBy: string;
|
|
230
|
+
hideColumn: string;
|
|
209
231
|
reorder: string;
|
|
232
|
+
moveUp: string;
|
|
233
|
+
moveDown: string;
|
|
210
234
|
resizeColumn: (column: string) => string;
|
|
211
235
|
listOthers: (count: number) => string;
|
|
212
236
|
selectAllRows: string;
|
|
213
237
|
selectRow: string;
|
|
214
238
|
selected: string;
|
|
215
239
|
};
|
|
216
|
-
export interface
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
export interface DataTableGrouping<TData> {
|
|
230
|
-
fields: DataTableGroupingField<TData>[];
|
|
231
|
-
initial?: string[];
|
|
232
|
-
getRowLabel?: (row: TData) => string;
|
|
233
|
-
}
|
|
234
|
-
export interface DataTableRelationshipOption {
|
|
235
|
-
icon?: ReactNode;
|
|
236
|
-
label: string;
|
|
237
|
-
value: string;
|
|
238
|
-
}
|
|
239
|
-
export interface DataTableGalleryConfig {
|
|
240
|
-
name: string;
|
|
241
|
-
description?: string;
|
|
242
|
-
tag?: string;
|
|
243
|
-
tagIcon?: ReactNode;
|
|
244
|
-
}
|
|
245
|
-
export interface DataTableReordering<TData> {
|
|
246
|
-
onReorder: (rows: TData[]) => void;
|
|
247
|
-
getRowId: (row: TData) => string;
|
|
248
|
-
getRowLabel?: (row: TData) => string;
|
|
249
|
-
handleLabel?: string;
|
|
250
|
-
}
|
|
251
|
-
export type DataTableRowAction<TData> = {
|
|
252
|
-
id?: string;
|
|
253
|
-
name: string;
|
|
254
|
-
icon?: ReactNode;
|
|
255
|
-
variant?: "default" | "destructive" | undefined;
|
|
256
|
-
onClick: (data: TData) => void;
|
|
257
|
-
visible?: (data: TData) => boolean;
|
|
258
|
-
};
|
|
259
|
-
export type DataTableBulkAction<TData> = {
|
|
260
|
-
id?: string;
|
|
261
|
-
name: string;
|
|
262
|
-
icon?: ReactNode;
|
|
263
|
-
variant?: "default" | "destructive" | undefined;
|
|
264
|
-
onClick: (rows: TData[]) => void;
|
|
265
|
-
visible?: (rows: TData[]) => boolean;
|
|
266
|
-
};
|
|
267
|
-
export type DataTableGroupAction = {
|
|
268
|
-
name: string;
|
|
269
|
-
icon?: ReactNode;
|
|
270
|
-
variant?: "default" | "destructive" | undefined;
|
|
271
|
-
onClick: (groupId: string) => void;
|
|
272
|
-
visible?: (groupId: string) => boolean;
|
|
273
|
-
};
|
|
274
|
-
export interface DataTableState {
|
|
275
|
-
loading?: boolean;
|
|
276
|
-
error?: ReactNode;
|
|
277
|
-
empty?: ReactNode;
|
|
278
|
-
}
|
|
279
|
-
export type DataTablePaginationFeature = false | {
|
|
280
|
-
mode: "client";
|
|
281
|
-
pageSizes?: readonly number[];
|
|
282
|
-
} | {
|
|
283
|
-
mode: "server";
|
|
284
|
-
rowCount: number;
|
|
285
|
-
pageSizes?: readonly number[];
|
|
286
|
-
};
|
|
287
|
-
export interface DataTableExportFeature {
|
|
288
|
-
baseName: string;
|
|
289
|
-
scope?: "currentPage" | "filteredRows";
|
|
290
|
-
}
|
|
291
|
-
export interface DataTableRowActionsFeature<TData> {
|
|
292
|
-
label?: string;
|
|
293
|
-
items: readonly DataTableRowAction<TData>[];
|
|
240
|
+
export interface DataTableProps<TData extends RowData> {
|
|
241
|
+
rowData: readonly TData[];
|
|
242
|
+
columnDefs: readonly DataTableColDef<TData>[];
|
|
243
|
+
getRowId?: (row: TData) => string;
|
|
244
|
+
state?: Partial<DataTablePublicState>;
|
|
245
|
+
initialState?: Partial<DataTablePublicState>;
|
|
246
|
+
onStateChange?: (state: DataTablePublicState) => void;
|
|
247
|
+
query?: QueryType;
|
|
248
|
+
onQueryChange?: (query: QueryType) => void;
|
|
249
|
+
status?: DataTableStatus;
|
|
250
|
+
features?: DataTableFeatures<TData>;
|
|
251
|
+
onRowClicked?: (row: TData) => void;
|
|
252
|
+
messages?: DataTableMessageOverrides;
|
|
294
253
|
}
|
|
295
|
-
export interface
|
|
296
|
-
|
|
254
|
+
export interface DataTableColumn<TData extends RowData> {
|
|
255
|
+
id: string;
|
|
256
|
+
colDef: DataTableColDef<TData>;
|
|
257
|
+
width: number;
|
|
297
258
|
}
|
|
298
|
-
export interface
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
getRowId: (row: TData) => string;
|
|
304
|
-
isRowSelectable?: (row: TData) => boolean;
|
|
305
|
-
onSelectionChange?: (rows: TData[]) => void;
|
|
259
|
+
export interface DataTableModelRow<TData extends RowData> {
|
|
260
|
+
id: string;
|
|
261
|
+
data: TData;
|
|
262
|
+
index: number;
|
|
263
|
+
values: ReadonlyMap<string, unknown>;
|
|
306
264
|
}
|
|
307
|
-
export interface
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
265
|
+
export interface DataTableModel<TData extends RowData> {
|
|
266
|
+
columns: readonly DataTableColumn<TData>[];
|
|
267
|
+
visibleColumns: readonly DataTableColumn<TData>[];
|
|
268
|
+
rows: readonly DataTableModelRow<TData>[];
|
|
269
|
+
filteredRows: readonly DataTableModelRow<TData>[];
|
|
270
|
+
sortedRows: readonly DataTableModelRow<TData>[];
|
|
271
|
+
pageRows: readonly DataTableModelRow<TData>[];
|
|
272
|
+
pageCount: number;
|
|
273
|
+
totalRows: number;
|
|
316
274
|
}
|
|
317
|
-
|
|
318
|
-
|
|
275
|
+
export declare const normalizeDataTableColumns: <TData extends RowData>(columnDefs: readonly DataTableColDef<TData>[], columnSizing?: Readonly<Record<string, number>>) => DataTableColumn<TData>[];
|
|
276
|
+
export declare const getDataTableWidth: <TData extends RowData>(columns: readonly DataTableColumn<TData>[], utilityColumns?: number) => number;
|
|
277
|
+
export declare const buildDataTableRows: <TData extends RowData>(rowData: readonly TData[], columns: readonly DataTableColumn<TData>[], getRowId?: (row: TData) => string) => DataTableModelRow<TData>[];
|
|
278
|
+
export declare const filterDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], columns: readonly DataTableColumn<TData>[], globalFilter: string) => DataTableModelRow<TData>[];
|
|
279
|
+
export declare const sortDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], columns: readonly DataTableColumn<TData>[], sorting: DataTableSorting) => DataTableModelRow<TData>[];
|
|
280
|
+
export declare const paginateDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], pagination: DataTablePaginationState) => DataTableModelRow<TData>[];
|
|
281
|
+
export declare const mergeDataTableState: (state: DataTablePublicState, controlledState?: Partial<DataTablePublicState>) => DataTablePublicState;
|
|
282
|
+
export declare const reorderDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], sourceRowId: string, targetRowId: string) => TData[];
|
|
283
|
+
type GroupSection<TData extends RowData> = {
|
|
284
|
+
key: string;
|
|
285
|
+
groupId: string;
|
|
286
|
+
depth: number;
|
|
287
|
+
field: DataTableGroupingField<TData>;
|
|
288
|
+
rows: DataTableModelRow<TData>[];
|
|
289
|
+
children: GroupSection<TData>[];
|
|
319
290
|
};
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
searchState?: "url" | "local";
|
|
327
|
-
emptyLabel?: ReactNode;
|
|
328
|
-
messages?: DataTableMessageOverrides;
|
|
329
|
-
exportFileName?: string;
|
|
330
|
-
isLoading?: boolean;
|
|
331
|
-
onRefresh?: () => void;
|
|
332
|
-
onRowClick?: (row: TData) => void;
|
|
333
|
-
routeFrom?: ValidateFromPath;
|
|
334
|
-
from?: ValidateFromPath;
|
|
335
|
-
grouping?: DataTableGrouping<TData>;
|
|
336
|
-
reordering?: DataTableReordering<TData>;
|
|
337
|
-
features?: DataTableFeatures<TData>;
|
|
338
|
-
gallery?: DataTableGalleryConfig;
|
|
339
|
-
rowActions?: readonly LegacyDataTableRowAction<TData>[];
|
|
340
|
-
serverPagination?: {
|
|
341
|
-
rowCount: number;
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
export declare const DataTableRowActions: <TData>({ actions, contentClassName, row, title, }: {
|
|
291
|
+
export declare const groupDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], fields: readonly DataTableGroupingField<TData>[], depth?: number, parentKey?: string) => GroupSection<TData>[];
|
|
292
|
+
export declare const getDataTableSelectableRows: <TData extends RowData>(model: DataTableModel<TData>, grouped: boolean, isRowSelectable?: (row: TData) => boolean) => DataTableModelRow<TData>[];
|
|
293
|
+
export type CsvValue = string | number | boolean | null | undefined;
|
|
294
|
+
export declare const downloadCsv: (headers: CsvValue[], data: CsvValue[][], fileName?: string) => void;
|
|
295
|
+
export declare const downloadJson: <TData>(data: TData, fileName?: string) => void;
|
|
296
|
+
export declare const DataTableRowActions: <TData>({ actions, row, title, }: {
|
|
345
297
|
actions: readonly DataTableRowAction<TData>[];
|
|
346
|
-
contentClassName?: string | undefined;
|
|
347
298
|
row: TData;
|
|
348
|
-
title?: string
|
|
299
|
+
title?: string;
|
|
349
300
|
}) => import("react").JSX.Element | null;
|
|
350
|
-
export declare const
|
|
351
|
-
export
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
interface DataTablePaginationProps<TData extends RowData> {
|
|
356
|
-
messages?: DataTableMessageOverrides;
|
|
357
|
-
pageSizes?: readonly number[] | undefined;
|
|
358
|
-
rowCount?: number | undefined;
|
|
359
|
-
table: DataTableInstance<TData>;
|
|
301
|
+
export declare const DataTable: <TData extends RowData>(props: DataTableProps<TData>) => import("react").JSX.Element;
|
|
302
|
+
export interface DataTableRelationshipOption {
|
|
303
|
+
icon?: ReactNode;
|
|
304
|
+
label: string;
|
|
305
|
+
value: string;
|
|
360
306
|
}
|
|
361
|
-
export declare
|
|
362
|
-
export declare function DataTableRelationshipCell({ emptyLabel, manageLabel, onAdd, onRemove, options, value, }: {
|
|
307
|
+
export declare const DataTableRelationshipCell: ({ emptyLabel, manageLabel, onAdd, onRemove, options, value, }: {
|
|
363
308
|
emptyLabel: string;
|
|
364
|
-
from?: ValidateFromPath;
|
|
365
309
|
manageLabel: string;
|
|
366
310
|
onAdd?: (value: string) => void;
|
|
367
311
|
onRemove?: (value: string) => void;
|
|
368
312
|
options: readonly DataTableRelationshipOption[];
|
|
369
313
|
value: readonly DataTableRelationshipOption[];
|
|
370
|
-
})
|
|
371
|
-
export declare
|
|
314
|
+
}) => import("react").JSX.Element;
|
|
315
|
+
export declare const DataTableListSummary: ({ emptyLabel, expandable, items, overflowLabel, totalCount, variant, visibleCount, }: {
|
|
372
316
|
emptyLabel: ReactNode;
|
|
373
|
-
expandable?: boolean
|
|
317
|
+
expandable?: boolean;
|
|
374
318
|
items: readonly (string | {
|
|
375
319
|
icon?: ReactNode;
|
|
376
320
|
label: string;
|
|
377
321
|
value?: string;
|
|
378
322
|
})[];
|
|
379
|
-
overflowLabel?: (
|
|
380
|
-
totalCount?: number
|
|
381
|
-
variant?: "icon" | "text"
|
|
382
|
-
visibleCount?: number
|
|
383
|
-
})
|
|
384
|
-
interface DataTableColumnHeaderProps<TData extends RowData, TValue> extends HTMLAttributes<HTMLDivElement> {
|
|
385
|
-
column: DataTableColumn<TData, TValue>;
|
|
386
|
-
messages?: DataTableMessageOverrides;
|
|
387
|
-
title: string;
|
|
388
|
-
}
|
|
389
|
-
export declare function DataTableColumnHeader<TData extends RowData, TValue>({ column, messages, title, className, }: DataTableColumnHeaderProps<TData, TValue>): import("react").JSX.Element;
|
|
323
|
+
overflowLabel?: (remaining: number) => ReactNode;
|
|
324
|
+
totalCount?: number;
|
|
325
|
+
variant?: "icon" | "text";
|
|
326
|
+
visibleCount?: number;
|
|
327
|
+
}) => import("react").JSX.Element;
|
|
390
328
|
export {};
|