@bsol-oss/react-datatable5 12.0.0-beta.1 → 12.0.0-beta.11
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 +55 -45
- package/dist/index.js +379 -309
- package/dist/index.mjs +376 -308
- package/dist/types/components/DataTable/DataTable.d.ts +1 -1
- package/dist/types/components/DataTable/DataTableServer.d.ts +1 -1
- package/dist/types/components/DataTable/DefaultTable.d.ts +5 -5
- package/dist/types/components/DataTable/components/TextCell.d.ts +10 -0
- package/dist/types/components/DataTable/context/DataTableContext.d.ts +2 -1
- 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 +5 -0
- package/dist/types/components/DataTable/controls/ResetFilteringButton.d.ts +4 -0
- package/dist/types/components/DataTable/controls/ResetSelectionButton.d.ts +4 -0
- package/dist/types/components/DataTable/controls/ResetSortingButton.d.ts +4 -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 +21 -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 +21 -0
- package/dist/types/components/DataTable/display/TableCardContainer.d.ts +7 -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 +9 -0
- package/dist/types/components/DataTable/display/TableHeader.d.ts +13 -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/SchemaFormContext.d.ts +13 -0
- package/dist/types/components/Form/components/core/DefaultForm.d.ts +7 -0
- package/dist/types/components/Form/components/core/FormBody.d.ts +1 -0
- package/dist/types/components/Form/components/core/FormRoot.d.ts +39 -0
- package/dist/types/components/Form/components/core/FormTitle.d.ts +1 -0
- package/dist/types/components/Form/components/core/SubmitButton.d.ts +1 -0
- package/dist/types/index.d.ts +37 -35
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -22,18 +22,6 @@ interface DensityToggleButtonProps {
|
|
|
22
22
|
}
|
|
23
23
|
declare const DensityToggleButton: ({ text, icon, }: DensityToggleButtonProps) => react_jsx_runtime.JSX.Element;
|
|
24
24
|
|
|
25
|
-
interface EditFilterButtonProps {
|
|
26
|
-
icon?: React.ReactElement;
|
|
27
|
-
}
|
|
28
|
-
declare const FilterDialog: ({ icon, }: EditFilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
29
|
-
|
|
30
|
-
interface EditOrderButtonProps {
|
|
31
|
-
title?: string;
|
|
32
|
-
icon?: React__default.ReactElement;
|
|
33
|
-
text?: string;
|
|
34
|
-
}
|
|
35
|
-
declare const EditOrderButton: ({ text, icon, title, }: EditOrderButtonProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
-
|
|
37
25
|
interface EditSortingButtonProps {
|
|
38
26
|
title?: string;
|
|
39
27
|
icon?: React.ReactElement;
|
|
@@ -41,16 +29,18 @@ interface EditSortingButtonProps {
|
|
|
41
29
|
}
|
|
42
30
|
declare const EditSortingButton: ({ text, icon, title, }: EditSortingButtonProps) => react_jsx_runtime.JSX.Element;
|
|
43
31
|
|
|
44
|
-
interface
|
|
45
|
-
icon?:
|
|
32
|
+
interface EditFilterButtonProps {
|
|
33
|
+
icon?: React.ReactElement;
|
|
46
34
|
}
|
|
47
|
-
declare const
|
|
35
|
+
declare const FilterDialog: ({ icon, }: EditFilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
48
36
|
|
|
49
37
|
interface PageSizeControlProps {
|
|
50
38
|
pageSizes?: number[];
|
|
51
39
|
}
|
|
52
40
|
declare const PageSizeControl: ({ pageSizes, }: PageSizeControlProps) => react_jsx_runtime.JSX.Element;
|
|
53
41
|
|
|
42
|
+
declare const Pagination: () => react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
54
44
|
interface ResetFilteringButtonProps {
|
|
55
45
|
text?: string;
|
|
56
46
|
}
|
|
@@ -68,7 +58,10 @@ declare const ResetSortingButton: ({ text, }: ResetSortingButtonProps) => react_
|
|
|
68
58
|
|
|
69
59
|
declare const RowCountText: () => react_jsx_runtime.JSX.Element;
|
|
70
60
|
|
|
71
|
-
|
|
61
|
+
interface EditViewButtonProps {
|
|
62
|
+
icon?: React__default.ReactElement;
|
|
63
|
+
}
|
|
64
|
+
declare const ViewDialog: ({ icon }: EditViewButtonProps) => react_jsx_runtime.JSX.Element;
|
|
72
65
|
|
|
73
66
|
interface CardHeaderProps<TData> {
|
|
74
67
|
row: Row<TData>;
|
|
@@ -81,11 +74,16 @@ interface CardHeaderProps<TData> {
|
|
|
81
74
|
}
|
|
82
75
|
declare const CardHeader: <TData>({ row, imageColumnId, titleColumnId, tagColumnId, tagIcon, showTag, imageProps, }: CardHeaderProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
83
76
|
|
|
84
|
-
interface
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
interface EmptyStateProps {
|
|
78
|
+
title?: string;
|
|
79
|
+
description?: string;
|
|
87
80
|
}
|
|
88
|
-
declare const
|
|
81
|
+
declare const EmptyState: ({ title, description, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
82
|
+
|
|
83
|
+
interface ErrorAlertProps {
|
|
84
|
+
showMessage?: boolean;
|
|
85
|
+
}
|
|
86
|
+
declare const ErrorAlert: ({ showMessage }: ErrorAlertProps) => react_jsx_runtime.JSX.Element;
|
|
89
87
|
|
|
90
88
|
type DensityState = "sm" | "md" | "lg";
|
|
91
89
|
interface DensityTableState {
|
|
@@ -168,6 +166,23 @@ interface DataTableProps<TData = unknown> {
|
|
|
168
166
|
*/
|
|
169
167
|
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;
|
|
170
168
|
|
|
169
|
+
interface DataTableContext<TData = unknown> extends DataTableProps {
|
|
170
|
+
table: Table$1<TData>;
|
|
171
|
+
globalFilter: string;
|
|
172
|
+
setGlobalFilter: OnChangeFn<string>;
|
|
173
|
+
type: "client" | "server";
|
|
174
|
+
translate: UseTranslationResponse<any, any>;
|
|
175
|
+
}
|
|
176
|
+
declare const DataTableContext: React$1.Context<DataTableContext<unknown>>;
|
|
177
|
+
|
|
178
|
+
declare const useDataTableContext: <TData>() => DataTableContext<TData>;
|
|
179
|
+
|
|
180
|
+
interface DataDisplayProps {
|
|
181
|
+
variant?: "horizontal" | "stats" | "";
|
|
182
|
+
translate?: UseTranslationResponse<any, any>;
|
|
183
|
+
}
|
|
184
|
+
declare const DataDisplay: ({ variant }: DataDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
185
|
+
|
|
171
186
|
interface DataTableDefaultState {
|
|
172
187
|
sorting?: SortingState;
|
|
173
188
|
columnFilters?: ColumnFiltersState;
|
|
@@ -397,8 +412,6 @@ interface TableLoadingComponentProps {
|
|
|
397
412
|
}
|
|
398
413
|
declare const TableLoadingComponent: ({ render, }: TableLoadingComponentProps) => react_jsx_runtime.JSX.Element;
|
|
399
414
|
|
|
400
|
-
declare const TableOrderer: () => react_jsx_runtime.JSX.Element;
|
|
401
|
-
|
|
402
415
|
declare const TableSelector: () => react_jsx_runtime.JSX.Element;
|
|
403
416
|
|
|
404
417
|
declare const TableSorter: () => react_jsx_runtime.JSX.Element;
|
|
@@ -414,17 +427,6 @@ interface TextCellProps {
|
|
|
414
427
|
}
|
|
415
428
|
declare const TextCell: ({ label, containerProps, textProps, children, }: TextCellProps) => react_jsx_runtime.JSX.Element;
|
|
416
429
|
|
|
417
|
-
interface DataTableContext<TData = unknown> {
|
|
418
|
-
table: Table$1<TData>;
|
|
419
|
-
globalFilter: string;
|
|
420
|
-
setGlobalFilter: OnChangeFn<string>;
|
|
421
|
-
type: "client" | "server";
|
|
422
|
-
translate: UseTranslationResponse<any, any>;
|
|
423
|
-
}
|
|
424
|
-
declare const DataTableContext: React$1.Context<DataTableContext<unknown>>;
|
|
425
|
-
|
|
426
|
-
declare const useDataTableContext: <TData>() => DataTableContext<TData>;
|
|
427
|
-
|
|
428
430
|
interface GetColumnsConfigs<K extends RowData> {
|
|
429
431
|
schema: JSONSchema7;
|
|
430
432
|
include?: K[];
|
|
@@ -439,16 +441,11 @@ interface GetColumnsConfigs<K extends RowData> {
|
|
|
439
441
|
declare const widthSanityCheck: <K extends unknown>(widthList: number[], ignoreList: K[], properties: { [key in K as string]?: object | undefined; }) => void;
|
|
440
442
|
declare const getColumns: <TData extends unknown>({ schema, include, ignore, width, meta, defaultWidth, translate, }: GetColumnsConfigs<TData>) => ColumnDef<TData>[];
|
|
441
443
|
|
|
442
|
-
interface
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
declare const EmptyState: ({ title, description, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
447
|
-
|
|
448
|
-
interface ErrorAlertProps {
|
|
449
|
-
showMessage?: boolean;
|
|
444
|
+
interface TableDataDisplayProps {
|
|
445
|
+
colorPalette?: string;
|
|
446
|
+
emptyComponent?: ReactNode;
|
|
450
447
|
}
|
|
451
|
-
declare const
|
|
448
|
+
declare const TableDataDisplay: ({ colorPalette, emptyComponent, }: TableDataDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
452
449
|
|
|
453
450
|
interface FilterOptionsProps {
|
|
454
451
|
column: string;
|
|
@@ -457,7 +454,7 @@ declare const FilterOptions: ({ column }: FilterOptionsProps) => react_jsx_runti
|
|
|
457
454
|
|
|
458
455
|
declare const GlobalFilter: () => react_jsx_runtime.JSX.Element;
|
|
459
456
|
|
|
460
|
-
interface
|
|
457
|
+
interface FormRootProps<TData extends FieldValues> {
|
|
461
458
|
schema: JSONSchema7;
|
|
462
459
|
serverUrl: string;
|
|
463
460
|
requestUrl?: string;
|
|
@@ -465,12 +462,14 @@ interface FormProps<TData extends FieldValues> {
|
|
|
465
462
|
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
466
463
|
form: UseFormReturn;
|
|
467
464
|
translate: UseTranslationResponse<any, any>;
|
|
465
|
+
children: ReactNode;
|
|
468
466
|
order?: string[];
|
|
469
467
|
ignore?: string[];
|
|
470
468
|
include?: string[];
|
|
471
469
|
onSubmit?: SubmitHandler<TData>;
|
|
472
470
|
rowNumber?: number | string;
|
|
473
471
|
requestOptions?: AxiosRequestConfig;
|
|
472
|
+
getUpdatedData?: () => TData | Promise<TData> | void;
|
|
474
473
|
}
|
|
475
474
|
interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
476
475
|
variant: string;
|
|
@@ -480,13 +479,24 @@ interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
480
479
|
gridColumn: string;
|
|
481
480
|
gridRow: string;
|
|
482
481
|
foreign_key: ForeignKeyProps;
|
|
482
|
+
children: ReactNode;
|
|
483
483
|
}
|
|
484
484
|
declare const idPickerSanityCheck: (column: string, foreign_key?: {
|
|
485
485
|
table?: string | undefined;
|
|
486
486
|
column?: string | undefined;
|
|
487
487
|
display_column?: string | undefined;
|
|
488
488
|
} | undefined) => void;
|
|
489
|
-
declare const
|
|
489
|
+
declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, serverUrl, translate, children, order, ignore, include, onSubmit, rowNumber, requestOptions, getUpdatedData, }: FormRootProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
490
|
+
|
|
491
|
+
interface DefaultFormProps<TData extends FieldValues> {
|
|
492
|
+
formConfig: Omit<FormRootProps<TData>, "children">;
|
|
493
|
+
showTitle?: boolean;
|
|
494
|
+
}
|
|
495
|
+
declare const DefaultForm: <TData extends FieldValues>({ formConfig, showTitle, }: DefaultFormProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
496
|
+
|
|
497
|
+
declare const FormTitle: () => react_jsx_runtime.JSX.Element;
|
|
498
|
+
|
|
499
|
+
declare const FormBody: <TData extends object>() => react_jsx_runtime.JSX.Element;
|
|
490
500
|
|
|
491
501
|
interface UseFormProps {
|
|
492
502
|
preLoadedValues?: FieldValues | undefined;
|
|
@@ -609,4 +619,4 @@ declare module "@tanstack/react-table" {
|
|
|
609
619
|
}
|
|
610
620
|
}
|
|
611
621
|
|
|
612
|
-
export { type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7Definition, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, type DatePickerProps, DefaultCardTitle, DefaultTable, type DefaultTableProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps,
|
|
622
|
+
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, type ResetFilteringButtonProps, ResetSelectionButton, type ResetSelectionButtonProps, ResetSortingButton, type ResetSortingButtonProps, 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, 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 };
|