@bsol-oss/react-datatable5 12.0.0-beta.5 → 12.0.0-beta.51
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/index.d.ts +183 -87
- package/dist/index.js +888 -359
- package/dist/index.mjs +893 -365
- package/dist/types/components/DataTable/DataTable.d.ts +4 -2
- package/dist/types/components/DataTable/DataTableServer.d.ts +4 -2
- package/dist/types/components/DataTable/DefaultTable.d.ts +9 -12
- package/dist/types/components/DataTable/context/DataTableContext.d.ts +19 -3
- package/dist/types/components/DataTable/context/useDataTableContext.d.ts +2 -2
- package/dist/types/components/DataTable/controls/DensityFeature.d.ts +23 -0
- package/dist/types/components/DataTable/controls/DensityToggleButton.d.ts +6 -0
- package/dist/types/components/DataTable/controls/EditSortingButton.d.ts +7 -0
- package/dist/types/components/DataTable/controls/FilterDialog.d.ts +5 -0
- package/dist/types/components/DataTable/controls/PageSizeControl.d.ts +4 -0
- package/dist/types/components/DataTable/controls/Pagination.d.ts +1 -0
- package/dist/types/components/DataTable/controls/ReloadButton.d.ts +4 -0
- package/dist/types/components/DataTable/controls/ResetFilteringButton.d.ts +1 -0
- package/dist/types/components/DataTable/controls/ResetSelectionButton.d.ts +1 -0
- package/dist/types/components/DataTable/controls/ResetSortingButton.d.ts +1 -0
- package/dist/types/components/DataTable/controls/RowCountText.d.ts +1 -0
- package/dist/types/components/DataTable/controls/SelectAllRowsToggle.d.ts +8 -0
- package/dist/types/components/DataTable/controls/TableControls.d.ts +26 -0
- package/dist/types/components/DataTable/controls/TableFilterTags.d.ts +1 -0
- package/dist/types/components/DataTable/controls/TableFilters.d.ts +1 -0
- package/dist/types/components/DataTable/controls/TableSelector.d.ts +1 -0
- package/dist/types/components/DataTable/controls/TableSorter.d.ts +1 -0
- package/dist/types/components/DataTable/controls/TableViewer.d.ts +1 -0
- package/dist/types/components/DataTable/controls/ViewDialog.d.ts +5 -0
- package/dist/types/components/DataTable/display/CardHeader.d.ts +13 -0
- package/dist/types/components/DataTable/display/DataDisplay.d.ts +6 -0
- package/dist/types/components/DataTable/display/EmptyState.d.ts +5 -0
- package/dist/types/components/DataTable/display/ErrorAlert.d.ts +4 -0
- package/dist/types/components/DataTable/display/RecordDisplay.d.ts +9 -0
- package/dist/types/components/DataTable/display/Table.d.ts +10 -0
- package/dist/types/components/DataTable/display/TableBody.d.ts +20 -0
- package/dist/types/components/DataTable/display/TableCardContainer.d.ts +10 -0
- package/dist/types/components/DataTable/display/TableCards.d.ts +11 -0
- package/dist/types/components/DataTable/display/TableComponent.d.ts +6 -0
- package/dist/types/components/DataTable/display/TableDataDisplay.d.ts +6 -0
- package/dist/types/components/DataTable/display/TableFooter.d.ts +5 -0
- package/dist/types/components/DataTable/display/TableHeader.d.ts +51 -0
- package/dist/types/components/DataTable/display/TableLoadingComponent.d.ts +5 -0
- package/dist/types/components/DataTable/display/TextCell.d.ts +10 -0
- package/dist/types/components/DataTable/useDataTable.d.ts +1 -1
- package/dist/types/components/Form/components/core/DefaultForm.d.ts +2 -1
- package/dist/types/components/Form/components/core/FormRoot.d.ts +2 -1
- package/dist/types/components/Form/components/fields/CustomInput.d.ts +8 -0
- package/dist/types/components/Form/components/fields/DatePicker.d.ts +2 -7
- package/dist/types/components/Form/components/fields/EnumPicker.d.ts +2 -1
- package/dist/types/components/Form/components/fields/FilePicker.d.ts +2 -5
- package/dist/types/components/Form/components/fields/StringInputField.d.ts +2 -5
- package/dist/types/components/Form/components/fields/TextAreaInput.d.ts +12 -0
- package/dist/types/components/Form/components/fields/TimePicker.d.ts +7 -0
- package/dist/types/components/Form/components/fields/types.d.ts +6 -0
- package/dist/types/components/Form/components/types/CustomJSONSchema7.d.ts +19 -1
- package/dist/types/components/Form/components/viewers/CustomViewer.d.ts +8 -0
- package/dist/types/components/Form/components/viewers/TextAreaViewer.d.ts +12 -0
- package/dist/types/components/Form/components/viewers/TimeViewer.d.ts +7 -0
- package/dist/types/components/Form/utils/translateWrapper.d.ts +6 -0
- package/dist/types/components/TimePicker/TimePicker.d.ts +20 -0
- package/dist/types/index.d.ts +48 -32
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Row,
|
|
2
|
+
import { Row, RowData, OnChangeFn, Updater, FilterFn, ColumnDef, RowSelectionState, ColumnOrderState, ColumnFiltersState, PaginationState, SortingState, VisibilityState, Table as Table$1, Column } from '@tanstack/react-table';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { ReactNode, Dispatch, SetStateAction } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import { ImageProps, TableHeaderProps as TableHeaderProps$1,
|
|
6
|
+
import { ImageProps, GridProps, TableRootProps, TableHeaderProps as TableHeaderProps$1, TableRowProps, BoxProps, FlexProps, CardBodyProps, TextProps } from '@chakra-ui/react';
|
|
7
7
|
import { IconType } from 'react-icons';
|
|
8
8
|
import * as react_i18next from 'react-i18next';
|
|
9
9
|
import { UseTranslationResponse } from 'react-i18next';
|
|
10
10
|
import { RankingInfo } from '@tanstack/match-sorter-utils';
|
|
11
11
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
12
12
|
import { JSONSchema7 } from 'json-schema';
|
|
13
|
-
import { ForeignKeyProps } from '@/components/Form/components/fields/StringInputField';
|
|
13
|
+
import { ForeignKeyProps as ForeignKeyProps$1 } from '@/components/Form/components/fields/StringInputField';
|
|
14
14
|
import { AxiosRequestConfig } from 'axios';
|
|
15
15
|
import * as react_hook_form from 'react-hook-form';
|
|
16
|
-
import {
|
|
16
|
+
import { UseFormReturn, FieldValues, SubmitHandler } from 'react-hook-form';
|
|
17
17
|
import { RenderProps, Props } from '@bsol-oss/dayzed-react19';
|
|
18
18
|
|
|
19
19
|
interface DensityToggleButtonProps {
|
|
@@ -41,20 +41,11 @@ declare const PageSizeControl: ({ pageSizes, }: PageSizeControlProps) => react_j
|
|
|
41
41
|
|
|
42
42
|
declare const Pagination: () => react_jsx_runtime.JSX.Element;
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
text?: string;
|
|
46
|
-
}
|
|
47
|
-
declare const ResetFilteringButton: ({ text, }: ResetFilteringButtonProps) => react_jsx_runtime.JSX.Element;
|
|
44
|
+
declare const ResetFilteringButton: () => react_jsx_runtime.JSX.Element;
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
text?: string;
|
|
51
|
-
}
|
|
52
|
-
declare const ResetSelectionButton: ({ text, }: ResetSelectionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
46
|
+
declare const ResetSelectionButton: () => react_jsx_runtime.JSX.Element;
|
|
53
47
|
|
|
54
|
-
|
|
55
|
-
text?: string;
|
|
56
|
-
}
|
|
57
|
-
declare const ResetSortingButton: ({ text, }: ResetSortingButtonProps) => react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare const ResetSortingButton: () => react_jsx_runtime.JSX.Element;
|
|
58
49
|
|
|
59
50
|
declare const RowCountText: () => react_jsx_runtime.JSX.Element;
|
|
60
51
|
|
|
@@ -85,23 +76,6 @@ interface ErrorAlertProps {
|
|
|
85
76
|
}
|
|
86
77
|
declare const ErrorAlert: ({ showMessage }: ErrorAlertProps) => react_jsx_runtime.JSX.Element;
|
|
87
78
|
|
|
88
|
-
interface DataTableContext<TData = unknown> {
|
|
89
|
-
table: Table$1<TData>;
|
|
90
|
-
globalFilter: string;
|
|
91
|
-
setGlobalFilter: OnChangeFn<string>;
|
|
92
|
-
type: "client" | "server";
|
|
93
|
-
translate: UseTranslationResponse<any, any>;
|
|
94
|
-
}
|
|
95
|
-
declare const DataTableContext: React$1.Context<DataTableContext<unknown>>;
|
|
96
|
-
|
|
97
|
-
declare const useDataTableContext: <TData>() => DataTableContext<TData>;
|
|
98
|
-
|
|
99
|
-
interface DataDisplayProps {
|
|
100
|
-
variant?: "horizontal" | "stats" | "";
|
|
101
|
-
translate?: UseTranslationResponse<any, any>;
|
|
102
|
-
}
|
|
103
|
-
declare const DataDisplay: ({ variant }: DataDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
104
|
-
|
|
105
79
|
type DensityState = "sm" | "md" | "lg";
|
|
106
80
|
interface DensityTableState {
|
|
107
81
|
density: DensityState;
|
|
@@ -170,6 +144,7 @@ interface DataTableProps<TData = unknown> {
|
|
|
170
144
|
setDensity: OnChangeFn<DensityState>;
|
|
171
145
|
setColumnVisibility: OnChangeFn<VisibilityState>;
|
|
172
146
|
translate: UseTranslationResponse<any, any>;
|
|
147
|
+
tableLabel: DataTableLabel;
|
|
173
148
|
}
|
|
174
149
|
/**
|
|
175
150
|
* DataTable will create a context to hold all values to
|
|
@@ -181,7 +156,38 @@ interface DataTableProps<TData = unknown> {
|
|
|
181
156
|
*
|
|
182
157
|
* @link https://tanstack.com/table/latest/docs/guide/column-defs
|
|
183
158
|
*/
|
|
184
|
-
declare function DataTable<TData = unknown>({ columns, data, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, translate, children, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
159
|
+
declare function DataTable<TData = unknown>({ columns, data, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, translate, children, tableLabel, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
160
|
+
|
|
161
|
+
interface DataTableLabel {
|
|
162
|
+
view: string;
|
|
163
|
+
edit: string;
|
|
164
|
+
filterButtonText: string;
|
|
165
|
+
filterTitle: string;
|
|
166
|
+
filterReset: string;
|
|
167
|
+
filterClose: string;
|
|
168
|
+
reloadTooltip: string;
|
|
169
|
+
reloadButtonText: string;
|
|
170
|
+
resetSelection: string;
|
|
171
|
+
resetSorting: string;
|
|
172
|
+
rowCountText: string;
|
|
173
|
+
hasErrorText: string;
|
|
174
|
+
}
|
|
175
|
+
interface DataTableContextProps<TData = unknown> extends DataTableProps {
|
|
176
|
+
table: Table$1<TData>;
|
|
177
|
+
globalFilter: string;
|
|
178
|
+
setGlobalFilter: OnChangeFn<string>;
|
|
179
|
+
type: "client" | "server";
|
|
180
|
+
translate: UseTranslationResponse<any, unknown>;
|
|
181
|
+
tableLabel: DataTableLabel;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare const useDataTableContext: <TData>() => DataTableContextProps<TData>;
|
|
185
|
+
|
|
186
|
+
interface DataDisplayProps {
|
|
187
|
+
variant?: "horizontal" | "stats" | "";
|
|
188
|
+
translate?: UseTranslationResponse<any, any>;
|
|
189
|
+
}
|
|
190
|
+
declare const DataDisplay: ({ variant }: DataDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
185
191
|
|
|
186
192
|
interface DataTableDefaultState {
|
|
187
193
|
sorting?: SortingState;
|
|
@@ -276,6 +282,7 @@ interface DataTableServerProps<TData extends DataResponse = DataResponse<unknown
|
|
|
276
282
|
query: UseQueryResult<TData>;
|
|
277
283
|
url: string;
|
|
278
284
|
translate: UseTranslationResponse<any, any>;
|
|
285
|
+
tableLabel: DataTableLabel;
|
|
279
286
|
}
|
|
280
287
|
/**
|
|
281
288
|
* DataTableServer will create a context to hold all values to
|
|
@@ -288,28 +295,7 @@ interface DataTableServerProps<TData extends DataResponse = DataResponse<unknown
|
|
|
288
295
|
*
|
|
289
296
|
* @link https://tanstack.com/table/latest/docs/guide/column-defs
|
|
290
297
|
*/
|
|
291
|
-
declare function DataTableServer<TData extends DataResponse = DataResponse<unknown>>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, }: DataTableServerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
292
|
-
|
|
293
|
-
interface TableBodyProps {
|
|
294
|
-
pinnedBgColor?: {
|
|
295
|
-
light: string;
|
|
296
|
-
dark: string;
|
|
297
|
-
};
|
|
298
|
-
showSelector?: boolean;
|
|
299
|
-
alwaysShowSelector?: boolean;
|
|
300
|
-
canResize?: boolean;
|
|
301
|
-
}
|
|
302
|
-
interface TableRowSelectorProps<TData> {
|
|
303
|
-
index: number;
|
|
304
|
-
row: Row<TData>;
|
|
305
|
-
hoveredRow: number;
|
|
306
|
-
pinnedBgColor?: {
|
|
307
|
-
light: string;
|
|
308
|
-
dark: string;
|
|
309
|
-
};
|
|
310
|
-
alwaysShowSelector?: boolean;
|
|
311
|
-
}
|
|
312
|
-
declare const TableBody: ({ pinnedBgColor, showSelector, alwaysShowSelector, canResize, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
|
|
298
|
+
declare function DataTableServer<TData extends DataResponse = DataResponse<unknown>>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, url, translate, children, tableLabel, }: DataTableServerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
313
299
|
|
|
314
300
|
interface TableControlsProps {
|
|
315
301
|
totalText?: string;
|
|
@@ -325,69 +311,127 @@ interface TableControlsProps {
|
|
|
325
311
|
showPageSizeControl?: boolean;
|
|
326
312
|
showPageCountText?: boolean;
|
|
327
313
|
showView?: boolean;
|
|
328
|
-
filterOptions?:
|
|
314
|
+
filterOptions?: {
|
|
315
|
+
label: string;
|
|
316
|
+
value: string;
|
|
317
|
+
}[];
|
|
329
318
|
extraItems?: ReactNode;
|
|
330
319
|
loading?: boolean;
|
|
331
320
|
hasError?: boolean;
|
|
321
|
+
gridProps?: GridProps;
|
|
332
322
|
}
|
|
333
|
-
declare const TableControls: ({ fitTableWidth, fitTableHeight, children, showGlobalFilter, showFilter, showFilterName, showFilterTags, showReload, showPagination, showPageSizeControl, showPageCountText, showView, filterOptions, extraItems, loading, hasError, }: TableControlsProps) => react_jsx_runtime.JSX.Element;
|
|
323
|
+
declare const TableControls: ({ fitTableWidth, fitTableHeight, children, showGlobalFilter, showFilter, showFilterName, showFilterTags, showReload, showPagination, showPageSizeControl, showPageCountText, showView, filterOptions, extraItems, loading, hasError, gridProps, }: TableControlsProps) => react_jsx_runtime.JSX.Element;
|
|
334
324
|
|
|
335
|
-
interface
|
|
325
|
+
interface TableProps extends TableRootProps {
|
|
326
|
+
showLoading?: boolean;
|
|
327
|
+
loadingComponent?: ReactNode;
|
|
328
|
+
emptyComponent?: ReactNode;
|
|
329
|
+
canResize?: boolean;
|
|
330
|
+
children: ReactNode;
|
|
331
|
+
}
|
|
332
|
+
declare const Table: ({ children, emptyComponent, canResize, ...props }: TableProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
|
|
333
|
+
|
|
334
|
+
interface TableBodyProps {
|
|
336
335
|
pinnedBgColor?: {
|
|
337
336
|
light: string;
|
|
338
337
|
dark: string;
|
|
339
338
|
};
|
|
340
339
|
showSelector?: boolean;
|
|
341
340
|
alwaysShowSelector?: boolean;
|
|
342
|
-
}
|
|
343
|
-
declare const TableFooter: ({ pinnedBgColor, showSelector, alwaysShowSelector, }: TableFooterProps) => react_jsx_runtime.JSX.Element;
|
|
344
|
-
|
|
345
|
-
interface TableHeaderProps {
|
|
346
341
|
canResize?: boolean;
|
|
342
|
+
}
|
|
343
|
+
interface TableRowSelectorProps<TData> {
|
|
344
|
+
index: number;
|
|
345
|
+
row: Row<TData>;
|
|
346
|
+
hoveredRow: number;
|
|
347
347
|
pinnedBgColor?: {
|
|
348
348
|
light: string;
|
|
349
349
|
dark: string;
|
|
350
350
|
};
|
|
351
|
+
}
|
|
352
|
+
declare const TableBody: ({ showSelector, canResize, }: TableBodyProps) => react_jsx_runtime.JSX.Element;
|
|
353
|
+
|
|
354
|
+
interface TableFooterProps {
|
|
351
355
|
showSelector?: boolean;
|
|
352
|
-
isSticky?: boolean;
|
|
353
356
|
alwaysShowSelector?: boolean;
|
|
354
|
-
tHeadProps?: TableHeaderProps$1;
|
|
355
357
|
}
|
|
356
|
-
declare const
|
|
358
|
+
declare const TableFooter: ({ showSelector, alwaysShowSelector, }: TableFooterProps) => react_jsx_runtime.JSX.Element;
|
|
357
359
|
|
|
358
|
-
interface
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
interface TableHeaderTexts {
|
|
361
|
+
pinColumn?: string;
|
|
362
|
+
cancelPin?: string;
|
|
363
|
+
sortAscending?: string;
|
|
364
|
+
sortDescending?: string;
|
|
365
|
+
clearSorting?: string;
|
|
366
|
+
}
|
|
367
|
+
interface TableHeaderProps {
|
|
362
368
|
canResize?: boolean;
|
|
363
|
-
|
|
369
|
+
showSelector?: boolean;
|
|
370
|
+
isSticky?: boolean;
|
|
371
|
+
tableHeaderProps?: TableHeaderProps$1;
|
|
372
|
+
tableRowProps?: TableRowProps;
|
|
373
|
+
/**
|
|
374
|
+
* Default text configuration for all columns.
|
|
375
|
+
* Can be overridden per column via meta.headerTexts.
|
|
376
|
+
*/
|
|
377
|
+
defaultTexts?: TableHeaderTexts;
|
|
364
378
|
}
|
|
365
|
-
|
|
379
|
+
/**
|
|
380
|
+
* TableHeader component with configurable text strings.
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* // Using default texts
|
|
384
|
+
* <TableHeader />
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* // Customizing default texts for all columns
|
|
388
|
+
* <TableHeader
|
|
389
|
+
* defaultTexts={{
|
|
390
|
+
* pinColumn: "Pin This Column",
|
|
391
|
+
* sortAscending: "Sort A-Z"
|
|
392
|
+
* }}
|
|
393
|
+
* />
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* // Customizing texts per column via meta
|
|
397
|
+
* const columns = [
|
|
398
|
+
* columnHelper.accessor("name", {
|
|
399
|
+
* header: "Name",
|
|
400
|
+
* meta: {
|
|
401
|
+
* headerTexts: {
|
|
402
|
+
* pinColumn: "Pin Name Column",
|
|
403
|
+
* sortAscending: "Sort Names A-Z"
|
|
404
|
+
* }
|
|
405
|
+
* }
|
|
406
|
+
* })
|
|
407
|
+
* ];
|
|
408
|
+
*/
|
|
409
|
+
declare const TableHeader: ({ canResize, showSelector, isSticky, tableHeaderProps, tableRowProps, defaultTexts, }: TableHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
366
410
|
|
|
367
411
|
interface DefaultTableProps {
|
|
368
412
|
showFooter?: boolean;
|
|
369
|
-
showSelector?: boolean;
|
|
370
413
|
tableProps?: Omit<TableProps, "children">;
|
|
371
|
-
tHeadProps?: TableHeaderProps$1;
|
|
372
|
-
controlProps?: TableControlsProps;
|
|
373
|
-
tableFooterProps?: TableFooterProps;
|
|
374
|
-
tableBodyProps?: TableBodyProps;
|
|
375
414
|
tableHeaderProps?: TableHeaderProps;
|
|
415
|
+
tableBodyProps?: TableBodyProps;
|
|
416
|
+
tableFooterProps?: TableFooterProps;
|
|
417
|
+
controlProps?: TableControlsProps;
|
|
376
418
|
variant?: "" | "greedy";
|
|
377
419
|
}
|
|
378
|
-
declare const DefaultTable: ({ showFooter, tableProps, tableHeaderProps, tableBodyProps,
|
|
420
|
+
declare const DefaultTable: ({ showFooter, tableProps, tableHeaderProps, tableBodyProps, tableFooterProps, controlProps, variant, }: DefaultTableProps) => react_jsx_runtime.JSX.Element;
|
|
379
421
|
|
|
380
422
|
interface ReloadButtonProps {
|
|
381
|
-
text?: string;
|
|
382
423
|
variant?: string;
|
|
383
424
|
}
|
|
384
|
-
declare const ReloadButton: ({
|
|
425
|
+
declare const ReloadButton: ({ variant, }: ReloadButtonProps) => react_jsx_runtime.JSX.Element;
|
|
385
426
|
|
|
386
|
-
interface TableCardContainerProps extends
|
|
427
|
+
interface TableCardContainerProps extends BoxProps {
|
|
387
428
|
children: ReactNode;
|
|
388
429
|
variant?: "carousel" | "";
|
|
430
|
+
gap?: string;
|
|
431
|
+
gridTemplateColumns?: string;
|
|
432
|
+
direction?: FlexProps["direction"];
|
|
389
433
|
}
|
|
390
|
-
declare const TableCardContainer: ({ children, variant, ...props }: TableCardContainerProps) => react_jsx_runtime.JSX.Element;
|
|
434
|
+
declare const TableCardContainer: ({ children, variant, gap, gridTemplateColumns, direction, ...props }: TableCardContainerProps) => react_jsx_runtime.JSX.Element;
|
|
391
435
|
|
|
392
436
|
interface TableCardsProps<TData> {
|
|
393
437
|
isSelectable?: boolean;
|
|
@@ -441,6 +485,12 @@ interface GetColumnsConfigs<K extends RowData> {
|
|
|
441
485
|
declare const widthSanityCheck: <K extends unknown>(widthList: number[], ignoreList: K[], properties: { [key in K as string]?: object | undefined; }) => void;
|
|
442
486
|
declare const getColumns: <TData extends unknown>({ schema, include, ignore, width, meta, defaultWidth, translate, }: GetColumnsConfigs<TData>) => ColumnDef<TData>[];
|
|
443
487
|
|
|
488
|
+
interface TableDataDisplayProps {
|
|
489
|
+
colorPalette?: string;
|
|
490
|
+
emptyComponent?: ReactNode;
|
|
491
|
+
}
|
|
492
|
+
declare const TableDataDisplay: ({ colorPalette, emptyComponent, }: TableDataDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
493
|
+
|
|
444
494
|
interface FilterOptionsProps {
|
|
445
495
|
column: string;
|
|
446
496
|
}
|
|
@@ -448,8 +498,39 @@ declare const FilterOptions: ({ column }: FilterOptionsProps) => react_jsx_runti
|
|
|
448
498
|
|
|
449
499
|
declare const GlobalFilter: () => react_jsx_runtime.JSX.Element;
|
|
450
500
|
|
|
501
|
+
interface ForeignKeyProps {
|
|
502
|
+
column: string;
|
|
503
|
+
table: string;
|
|
504
|
+
display_column: string;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
interface CustomJSONSchema7 extends JSONSchema7 {
|
|
508
|
+
gridColumn?: string;
|
|
509
|
+
gridRow?: string;
|
|
510
|
+
foreign_key?: ForeignKeyProps;
|
|
511
|
+
variant?: string;
|
|
512
|
+
renderDisplay?: (item: unknown) => ReactNode;
|
|
513
|
+
inputRender?: (props: {
|
|
514
|
+
column: string;
|
|
515
|
+
schema: CustomJSONSchema7;
|
|
516
|
+
prefix: string;
|
|
517
|
+
formContext: UseFormReturn;
|
|
518
|
+
}) => ReactNode;
|
|
519
|
+
inputViewerRender?: (props: {
|
|
520
|
+
column: string;
|
|
521
|
+
schema: CustomJSONSchema7;
|
|
522
|
+
prefix: string;
|
|
523
|
+
formContext: UseFormReturn;
|
|
524
|
+
}) => ReactNode;
|
|
525
|
+
dateFormat?: string;
|
|
526
|
+
displayDateFormat?: string;
|
|
527
|
+
timeFormat?: string;
|
|
528
|
+
displayTimeFormat?: string;
|
|
529
|
+
showLabel?: boolean;
|
|
530
|
+
}
|
|
531
|
+
|
|
451
532
|
interface FormRootProps<TData extends FieldValues> {
|
|
452
|
-
schema:
|
|
533
|
+
schema: CustomJSONSchema7;
|
|
453
534
|
serverUrl: string;
|
|
454
535
|
requestUrl?: string;
|
|
455
536
|
idMap: Record<string, object>;
|
|
@@ -472,7 +553,7 @@ interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
472
553
|
display_column: string;
|
|
473
554
|
gridColumn: string;
|
|
474
555
|
gridRow: string;
|
|
475
|
-
foreign_key: ForeignKeyProps;
|
|
556
|
+
foreign_key: ForeignKeyProps$1;
|
|
476
557
|
children: ReactNode;
|
|
477
558
|
}
|
|
478
559
|
declare const idPickerSanityCheck: (column: string, foreign_key?: {
|
|
@@ -484,8 +565,9 @@ declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, f
|
|
|
484
565
|
|
|
485
566
|
interface DefaultFormProps<TData extends FieldValues> {
|
|
486
567
|
formConfig: Omit<FormRootProps<TData>, "children">;
|
|
568
|
+
showTitle?: boolean;
|
|
487
569
|
}
|
|
488
|
-
declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultFormProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
570
|
+
declare const DefaultForm: <TData extends FieldValues>({ formConfig, showTitle, }: DefaultFormProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
489
571
|
|
|
490
572
|
declare const FormTitle: () => react_jsx_runtime.JSX.Element;
|
|
491
573
|
|
|
@@ -566,6 +648,17 @@ declare module "@tanstack/react-table" {
|
|
|
566
648
|
* The display name of the column, used for rendering headers.
|
|
567
649
|
*/
|
|
568
650
|
displayName?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Text configuration for the column header menu items.
|
|
653
|
+
* These strings can be customized per column.
|
|
654
|
+
*/
|
|
655
|
+
headerTexts?: {
|
|
656
|
+
pinColumn?: string;
|
|
657
|
+
cancelPin?: string;
|
|
658
|
+
sortAscending?: string;
|
|
659
|
+
sortDescending?: string;
|
|
660
|
+
clearSorting?: string;
|
|
661
|
+
};
|
|
569
662
|
/**
|
|
570
663
|
* Specifies the type of filter to be used for the column.
|
|
571
664
|
*
|
|
@@ -586,7 +679,10 @@ declare module "@tanstack/react-table" {
|
|
|
586
679
|
/**
|
|
587
680
|
* Options for the select filter variant, if applicable.
|
|
588
681
|
*/
|
|
589
|
-
filterOptions?:
|
|
682
|
+
filterOptions?: {
|
|
683
|
+
label: string;
|
|
684
|
+
value: string;
|
|
685
|
+
}[];
|
|
590
686
|
/**
|
|
591
687
|
* Configuration for the range filter variant, if applicable.
|
|
592
688
|
*
|
|
@@ -612,4 +708,4 @@ declare module "@tanstack/react-table" {
|
|
|
612
708
|
}
|
|
613
709
|
}
|
|
614
710
|
|
|
615
|
-
export { type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7Definition, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, type DatePickerProps, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, ErrorAlert, type ErrorAlertProps, FilterDialog, FilterOptions, type FilterOptionsProps, FormBody, FormRoot, type FormRootProps, FormTitle, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, PageSizeControl, type PageSizeControlProps, Pagination, type RangeCalendarProps, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton,
|
|
711
|
+
export { type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7Definition, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, type DatePickerProps, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, ErrorAlert, type ErrorAlertProps, FilterDialog, FilterOptions, type FilterOptionsProps, FormBody, FormRoot, type FormRootProps, FormTitle, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, PageSizeControl, type PageSizeControlProps, Pagination, type RangeCalendarProps, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, type Result, RowCountText, Table, TableBody, type TableBodyProps, TableCardContainer, type TableCardContainerProps, TableCards, type TableCardsProps, TableComponent, TableControls, type TableControlsProps, TableDataDisplay, type TableDataDisplayProps, TableFilter, TableFilterTags, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, type TableHeaderTexts, TableLoadingComponent, type TableLoadingComponentProps, type TableProps, type TableRendererProps, type TableRowSelectorProps, TableSelector, TableSorter, TableViewer, TextCell, type TextCellProps, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, type UseFormProps, ViewDialog, getColumns, getMultiDates, getRangeDates, idPickerSanityCheck, useDataTable, useDataTableContext, useDataTableServer, useForm, widthSanityCheck };
|