@krak-stack/registry 0.1.18 → 0.1.20
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 +5 -0
- 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 +202 -273
- package/dist/components/ui/data-table.js +1810 -2115
- 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.js +6 -6
- 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/api.builder.d.ts +66 -0
- package/dist/services/health/api.group.d.ts +58 -0
- package/dist/services/health/index.d.ts +253 -0
- package/dist/services/health/index.js +186 -0
- package/dist/services/health/schema.d.ts +50 -0
- 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 +10 -38
|
@@ -1,124 +1,141 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type PaginationMessages } from "./pagination.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type RowData = object;
|
|
4
|
+
export type DataTableSorting = readonly {
|
|
5
|
+
id: string;
|
|
6
|
+
desc: boolean;
|
|
7
|
+
}[];
|
|
8
|
+
export type DataTablePaginationState = {
|
|
9
|
+
pageIndex: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
};
|
|
12
|
+
export type DataTableView = "table" | "gallery";
|
|
13
|
+
export interface DataTablePublicState {
|
|
14
|
+
globalFilter: string;
|
|
15
|
+
sorting: DataTableSorting;
|
|
16
|
+
pagination: DataTablePaginationState;
|
|
17
|
+
columnVisibility: Record<string, boolean>;
|
|
18
|
+
columnSizing: Record<string, number>;
|
|
19
|
+
rowSelection: Record<string, boolean>;
|
|
20
|
+
grouping: readonly string[];
|
|
21
|
+
collapsedGroups: Record<string, boolean>;
|
|
22
|
+
view: DataTableView;
|
|
23
|
+
}
|
|
24
|
+
export interface DataTableValueGetterParams<TData extends RowData> {
|
|
25
|
+
data: TData;
|
|
26
|
+
rowId: string;
|
|
27
|
+
rowIndex: number;
|
|
28
|
+
colDef: DataTableColDef<TData>;
|
|
29
|
+
}
|
|
30
|
+
export interface DataTableCellRendererParams<TData extends RowData> extends DataTableValueGetterParams<TData> {
|
|
31
|
+
value: unknown;
|
|
32
|
+
}
|
|
33
|
+
export interface DataTableColDef<TData extends RowData> {
|
|
34
|
+
field?: keyof TData & string;
|
|
35
|
+
colId?: string;
|
|
36
|
+
headerName: ReactNode;
|
|
37
|
+
valueGetter?: (params: DataTableValueGetterParams<TData>) => unknown;
|
|
38
|
+
valueFormatter?: (params: DataTableCellRendererParams<TData>) => ReactNode;
|
|
39
|
+
cellRenderer?: (params: DataTableCellRendererParams<TData>) => ReactNode;
|
|
40
|
+
sortable?: boolean;
|
|
41
|
+
comparator?: (left: unknown, right: unknown, leftData: TData, rightData: TData) => number;
|
|
42
|
+
searchable?: boolean;
|
|
43
|
+
hideable?: boolean;
|
|
44
|
+
resizable?: boolean;
|
|
45
|
+
width?: number;
|
|
46
|
+
minWidth?: number;
|
|
47
|
+
maxWidth?: number;
|
|
7
48
|
truncate?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface DataTableStatus {
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
error?: ReactNode;
|
|
53
|
+
empty?: ReactNode;
|
|
54
|
+
}
|
|
55
|
+
export type DataTableRowAction<TData> = {
|
|
56
|
+
id?: string;
|
|
57
|
+
name: string;
|
|
58
|
+
icon?: ReactNode;
|
|
59
|
+
variant?: "default" | "destructive";
|
|
60
|
+
onClick: (data: TData) => void;
|
|
61
|
+
visible?: (data: TData) => boolean;
|
|
62
|
+
};
|
|
63
|
+
export type DataTableBulkAction<TData> = {
|
|
64
|
+
id?: string;
|
|
65
|
+
name: string;
|
|
66
|
+
icon?: ReactNode;
|
|
67
|
+
variant?: "default" | "destructive";
|
|
68
|
+
onClick: (rows: TData[]) => void;
|
|
69
|
+
visible?: (rows: TData[]) => boolean;
|
|
8
70
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
71
|
+
export type DataTableGroupAction = {
|
|
72
|
+
name: string;
|
|
73
|
+
icon?: ReactNode;
|
|
74
|
+
variant?: "default" | "destructive";
|
|
75
|
+
onClick: (groupId: string) => void;
|
|
76
|
+
visible?: (groupId: string) => boolean;
|
|
77
|
+
};
|
|
78
|
+
export interface DataTableGroupingField<TData> {
|
|
79
|
+
id: string;
|
|
80
|
+
label: string;
|
|
81
|
+
getGroupId: (row: TData) => string;
|
|
82
|
+
getRowGroupIds?: (row: TData) => readonly string[];
|
|
83
|
+
getGroupIds?: () => readonly string[];
|
|
84
|
+
renderGroupLabel?: (groupId: string, rows: TData[]) => ReactNode;
|
|
85
|
+
renderEmptyGroup?: (groupId: string) => ReactNode;
|
|
86
|
+
onMoveToGroup?: (row: TData, groupId: string) => void;
|
|
87
|
+
actionsLabel?: string;
|
|
88
|
+
actions?: readonly DataTableGroupAction[];
|
|
89
|
+
}
|
|
90
|
+
export interface DataTableGroupingFeature<TData> {
|
|
91
|
+
fields: readonly DataTableGroupingField<TData>[];
|
|
92
|
+
initial?: readonly string[];
|
|
93
|
+
getRowLabel?: (row: TData) => string;
|
|
94
|
+
}
|
|
95
|
+
export type DataTablePaginationFeature = false | {
|
|
96
|
+
mode: "client";
|
|
97
|
+
pageSizes?: readonly number[];
|
|
98
|
+
} | {
|
|
99
|
+
mode: "server";
|
|
100
|
+
rowCount: number;
|
|
101
|
+
pageSizes?: readonly number[];
|
|
22
102
|
};
|
|
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>;
|
|
103
|
+
export interface DataTableFeatures<TData> {
|
|
104
|
+
search?: boolean;
|
|
105
|
+
sorting?: boolean;
|
|
106
|
+
pagination?: DataTablePaginationFeature;
|
|
107
|
+
columnVisibility?: boolean;
|
|
108
|
+
selection?: false | {
|
|
109
|
+
getRowId?: (row: TData) => string;
|
|
110
|
+
isRowSelectable?: (row: TData) => boolean;
|
|
111
|
+
onSelectionChange?: (rows: TData[]) => void;
|
|
112
|
+
bulkActions?: false | {
|
|
113
|
+
label?: string;
|
|
114
|
+
items: readonly DataTableBulkAction<TData>[];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
rowActions?: false | {
|
|
118
|
+
label?: string;
|
|
119
|
+
items: readonly DataTableRowAction<TData>[];
|
|
120
|
+
};
|
|
121
|
+
export?: false | {
|
|
122
|
+
baseName: string;
|
|
123
|
+
scope?: "currentPage" | "filteredRows";
|
|
124
|
+
};
|
|
125
|
+
gallery?: false | {
|
|
126
|
+
name: string;
|
|
127
|
+
description?: string;
|
|
128
|
+
tag?: string;
|
|
129
|
+
tagIcon?: ReactNode;
|
|
130
|
+
};
|
|
131
|
+
grouping?: false | DataTableGroupingFeature<TData>;
|
|
132
|
+
reordering?: false | {
|
|
133
|
+
onReorder: (rows: TData[]) => void;
|
|
134
|
+
getRowLabel?: (row: TData) => string;
|
|
135
|
+
handleLabel?: string;
|
|
136
|
+
};
|
|
137
|
+
refresh?: false | (() => void);
|
|
138
|
+
}
|
|
122
139
|
export type DataTableMessages = PaginationMessages & {
|
|
123
140
|
actions: string;
|
|
124
141
|
empty: string;
|
|
@@ -135,9 +152,9 @@ export type DataTableMessages = PaginationMessages & {
|
|
|
135
152
|
groupBy: string;
|
|
136
153
|
sortAsc: string;
|
|
137
154
|
sortDesc: string;
|
|
138
|
-
sortHide: string;
|
|
139
155
|
sortClear: string;
|
|
140
156
|
sortBy: string;
|
|
157
|
+
hideColumn: string;
|
|
141
158
|
reorder: string;
|
|
142
159
|
resizeColumn: (column: string) => string;
|
|
143
160
|
listOthers: (count: number) => string;
|
|
@@ -170,9 +187,9 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
170
187
|
groupBy: string;
|
|
171
188
|
sortAsc: string;
|
|
172
189
|
sortDesc: string;
|
|
173
|
-
sortHide: string;
|
|
174
190
|
sortClear: string;
|
|
175
191
|
sortBy: string;
|
|
192
|
+
hideColumn: string;
|
|
176
193
|
reorder: string;
|
|
177
194
|
resizeColumn: (column: string) => string;
|
|
178
195
|
listOthers: (count: number) => string;
|
|
@@ -203,9 +220,9 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
203
220
|
groupBy: string;
|
|
204
221
|
sortAsc: string;
|
|
205
222
|
sortDesc: string;
|
|
206
|
-
sortHide: string;
|
|
207
223
|
sortClear: string;
|
|
208
224
|
sortBy: string;
|
|
225
|
+
hideColumn: string;
|
|
209
226
|
reorder: string;
|
|
210
227
|
resizeColumn: (column: string) => string;
|
|
211
228
|
listOthers: (count: number) => string;
|
|
@@ -213,178 +230,90 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
213
230
|
selectRow: string;
|
|
214
231
|
selected: string;
|
|
215
232
|
};
|
|
216
|
-
export interface
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
actions?: DataTableGroupAction[];
|
|
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>[];
|
|
233
|
+
export interface DataTableProps<TData extends RowData> {
|
|
234
|
+
rowData: readonly TData[];
|
|
235
|
+
columnDefs: readonly DataTableColDef<TData>[];
|
|
236
|
+
getRowId?: (row: TData) => string;
|
|
237
|
+
state?: Partial<DataTablePublicState>;
|
|
238
|
+
initialState?: Partial<DataTablePublicState>;
|
|
239
|
+
onStateChange?: (state: DataTablePublicState) => void;
|
|
240
|
+
status?: DataTableStatus;
|
|
241
|
+
features?: DataTableFeatures<TData>;
|
|
242
|
+
onRowClicked?: (row: TData) => void;
|
|
243
|
+
messages?: DataTableMessageOverrides;
|
|
294
244
|
}
|
|
295
|
-
export interface
|
|
296
|
-
|
|
245
|
+
export interface DataTableColumn<TData extends RowData> {
|
|
246
|
+
id: string;
|
|
247
|
+
colDef: DataTableColDef<TData>;
|
|
248
|
+
width: number;
|
|
297
249
|
}
|
|
298
|
-
export interface
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
getRowId: (row: TData) => string;
|
|
304
|
-
isRowSelectable?: (row: TData) => boolean;
|
|
305
|
-
onSelectionChange?: (rows: TData[]) => void;
|
|
250
|
+
export interface DataTableModelRow<TData extends RowData> {
|
|
251
|
+
id: string;
|
|
252
|
+
data: TData;
|
|
253
|
+
index: number;
|
|
254
|
+
values: ReadonlyMap<string, unknown>;
|
|
306
255
|
}
|
|
307
|
-
export interface
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
256
|
+
export interface DataTableModel<TData extends RowData> {
|
|
257
|
+
columns: readonly DataTableColumn<TData>[];
|
|
258
|
+
visibleColumns: readonly DataTableColumn<TData>[];
|
|
259
|
+
rows: readonly DataTableModelRow<TData>[];
|
|
260
|
+
filteredRows: readonly DataTableModelRow<TData>[];
|
|
261
|
+
sortedRows: readonly DataTableModelRow<TData>[];
|
|
262
|
+
pageRows: readonly DataTableModelRow<TData>[];
|
|
263
|
+
pageCount: number;
|
|
264
|
+
totalRows: number;
|
|
316
265
|
}
|
|
317
|
-
|
|
318
|
-
|
|
266
|
+
export declare const normalizeDataTableColumns: <TData extends RowData>(columnDefs: readonly DataTableColDef<TData>[], columnSizing?: Readonly<Record<string, number>>) => DataTableColumn<TData>[];
|
|
267
|
+
export declare const getDataTableWidth: <TData extends RowData>(columns: readonly DataTableColumn<TData>[], utilityColumns?: number) => number;
|
|
268
|
+
export declare const buildDataTableRows: <TData extends RowData>(rowData: readonly TData[], columns: readonly DataTableColumn<TData>[], getRowId?: (row: TData) => string) => DataTableModelRow<TData>[];
|
|
269
|
+
export declare const filterDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], columns: readonly DataTableColumn<TData>[], globalFilter: string) => DataTableModelRow<TData>[];
|
|
270
|
+
export declare const sortDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], columns: readonly DataTableColumn<TData>[], sorting: DataTableSorting) => DataTableModelRow<TData>[];
|
|
271
|
+
export declare const paginateDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], pagination: DataTablePaginationState) => DataTableModelRow<TData>[];
|
|
272
|
+
export declare const mergeDataTableState: (state: DataTablePublicState, controlledState?: Partial<DataTablePublicState>) => DataTablePublicState;
|
|
273
|
+
export declare const reorderDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], sourceRowId: string, targetRowId: string) => TData[];
|
|
274
|
+
type GroupSection<TData extends RowData> = {
|
|
275
|
+
key: string;
|
|
276
|
+
groupId: string;
|
|
277
|
+
depth: number;
|
|
278
|
+
field: DataTableGroupingField<TData>;
|
|
279
|
+
rows: DataTableModelRow<TData>[];
|
|
280
|
+
children: GroupSection<TData>[];
|
|
319
281
|
};
|
|
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, }: {
|
|
282
|
+
export declare const groupDataTableRows: <TData extends RowData>(rows: readonly DataTableModelRow<TData>[], fields: readonly DataTableGroupingField<TData>[], depth?: number, parentKey?: string) => GroupSection<TData>[];
|
|
283
|
+
export declare const getDataTableSelectableRows: <TData extends RowData>(model: DataTableModel<TData>, grouped: boolean, isRowSelectable?: (row: TData) => boolean) => DataTableModelRow<TData>[];
|
|
284
|
+
export type CsvValue = string | number | boolean | null | undefined;
|
|
285
|
+
export declare const downloadCsv: (headers: CsvValue[], data: CsvValue[][], fileName?: string) => void;
|
|
286
|
+
export declare const downloadJson: <TData>(data: TData, fileName?: string) => void;
|
|
287
|
+
export declare const DataTableRowActions: <TData>({ actions, row, title, }: {
|
|
345
288
|
actions: readonly DataTableRowAction<TData>[];
|
|
346
|
-
contentClassName?: string | undefined;
|
|
347
289
|
row: TData;
|
|
348
|
-
title?: string
|
|
290
|
+
title?: string;
|
|
349
291
|
}) => 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>;
|
|
292
|
+
export declare const DataTable: <TData extends RowData>(props: DataTableProps<TData>) => import("react").JSX.Element;
|
|
293
|
+
export interface DataTableRelationshipOption {
|
|
294
|
+
icon?: ReactNode;
|
|
295
|
+
label: string;
|
|
296
|
+
value: string;
|
|
360
297
|
}
|
|
361
|
-
export declare
|
|
362
|
-
export declare function DataTableRelationshipCell({ emptyLabel, manageLabel, onAdd, onRemove, options, value, }: {
|
|
298
|
+
export declare const DataTableRelationshipCell: ({ emptyLabel, manageLabel, onAdd, onRemove, options, value, }: {
|
|
363
299
|
emptyLabel: string;
|
|
364
|
-
from?: ValidateFromPath;
|
|
365
300
|
manageLabel: string;
|
|
366
301
|
onAdd?: (value: string) => void;
|
|
367
302
|
onRemove?: (value: string) => void;
|
|
368
303
|
options: readonly DataTableRelationshipOption[];
|
|
369
304
|
value: readonly DataTableRelationshipOption[];
|
|
370
|
-
})
|
|
371
|
-
export declare
|
|
305
|
+
}) => import("react").JSX.Element;
|
|
306
|
+
export declare const DataTableListSummary: ({ emptyLabel, expandable, items, overflowLabel, totalCount, variant, visibleCount, }: {
|
|
372
307
|
emptyLabel: ReactNode;
|
|
373
|
-
expandable?: boolean
|
|
308
|
+
expandable?: boolean;
|
|
374
309
|
items: readonly (string | {
|
|
375
310
|
icon?: ReactNode;
|
|
376
311
|
label: string;
|
|
377
312
|
value?: string;
|
|
378
313
|
})[];
|
|
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;
|
|
314
|
+
overflowLabel?: (remaining: number) => ReactNode;
|
|
315
|
+
totalCount?: number;
|
|
316
|
+
variant?: "icon" | "text";
|
|
317
|
+
visibleCount?: number;
|
|
318
|
+
}) => import("react").JSX.Element;
|
|
390
319
|
export {};
|