@bsol-oss/react-datatable5 12.0.0-beta.1 → 12.0.0-beta.10
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 +54 -45
- package/dist/index.js +376 -309
- package/dist/index.mjs +373 -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 +4 -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,10 @@ 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
|
-
description?: string;
|
|
444
|
+
interface TableDataDisplayProps {
|
|
445
|
+
colorPalette?: string;
|
|
445
446
|
}
|
|
446
|
-
declare const
|
|
447
|
-
|
|
448
|
-
interface ErrorAlertProps {
|
|
449
|
-
showMessage?: boolean;
|
|
450
|
-
}
|
|
451
|
-
declare const ErrorAlert: ({ showMessage }: ErrorAlertProps) => react_jsx_runtime.JSX.Element;
|
|
447
|
+
declare const TableDataDisplay: ({ colorPalette }: TableDataDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
452
448
|
|
|
453
449
|
interface FilterOptionsProps {
|
|
454
450
|
column: string;
|
|
@@ -457,7 +453,7 @@ declare const FilterOptions: ({ column }: FilterOptionsProps) => react_jsx_runti
|
|
|
457
453
|
|
|
458
454
|
declare const GlobalFilter: () => react_jsx_runtime.JSX.Element;
|
|
459
455
|
|
|
460
|
-
interface
|
|
456
|
+
interface FormRootProps<TData extends FieldValues> {
|
|
461
457
|
schema: JSONSchema7;
|
|
462
458
|
serverUrl: string;
|
|
463
459
|
requestUrl?: string;
|
|
@@ -465,12 +461,14 @@ interface FormProps<TData extends FieldValues> {
|
|
|
465
461
|
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
466
462
|
form: UseFormReturn;
|
|
467
463
|
translate: UseTranslationResponse<any, any>;
|
|
464
|
+
children: ReactNode;
|
|
468
465
|
order?: string[];
|
|
469
466
|
ignore?: string[];
|
|
470
467
|
include?: string[];
|
|
471
468
|
onSubmit?: SubmitHandler<TData>;
|
|
472
469
|
rowNumber?: number | string;
|
|
473
470
|
requestOptions?: AxiosRequestConfig;
|
|
471
|
+
getUpdatedData?: () => TData | Promise<TData> | void;
|
|
474
472
|
}
|
|
475
473
|
interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
476
474
|
variant: string;
|
|
@@ -480,13 +478,24 @@ interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
480
478
|
gridColumn: string;
|
|
481
479
|
gridRow: string;
|
|
482
480
|
foreign_key: ForeignKeyProps;
|
|
481
|
+
children: ReactNode;
|
|
483
482
|
}
|
|
484
483
|
declare const idPickerSanityCheck: (column: string, foreign_key?: {
|
|
485
484
|
table?: string | undefined;
|
|
486
485
|
column?: string | undefined;
|
|
487
486
|
display_column?: string | undefined;
|
|
488
487
|
} | undefined) => void;
|
|
489
|
-
declare const
|
|
488
|
+
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;
|
|
489
|
+
|
|
490
|
+
interface DefaultFormProps<TData extends FieldValues> {
|
|
491
|
+
formConfig: Omit<FormRootProps<TData>, "children">;
|
|
492
|
+
showTitle?: boolean;
|
|
493
|
+
}
|
|
494
|
+
declare const DefaultForm: <TData extends FieldValues>({ formConfig, showTitle, }: DefaultFormProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
495
|
+
|
|
496
|
+
declare const FormTitle: () => react_jsx_runtime.JSX.Element;
|
|
497
|
+
|
|
498
|
+
declare const FormBody: <TData extends object>() => react_jsx_runtime.JSX.Element;
|
|
490
499
|
|
|
491
500
|
interface UseFormProps {
|
|
492
501
|
preLoadedValues?: FieldValues | undefined;
|
|
@@ -609,4 +618,4 @@ declare module "@tanstack/react-table" {
|
|
|
609
618
|
}
|
|
610
619
|
}
|
|
611
620
|
|
|
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,
|
|
621
|
+
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 };
|