@bsol-oss/react-datatable5 7.1.0 → 7.3.0
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 +24 -7
- package/dist/index.js +578 -481
- package/dist/index.mjs +581 -486
- package/dist/types/components/DataTable/DataTable.d.ts +1 -1
- package/dist/types/components/DataTable/DataTableServer.d.ts +1 -2
- package/dist/types/components/DataTable/TableControls.d.ts +3 -2
- package/dist/types/components/DataTable/TableFilters.d.ts +1 -0
- package/dist/types/components/DataTable/components/EmptyState.d.ts +5 -0
- package/dist/types/components/DataTable/components/ErrorAlert.d.ts +4 -0
- package/dist/types/components/DataTable/context/DataTableContext.d.ts +1 -0
- package/dist/types/components/Form/Form.d.ts +6 -1
- package/dist/types/components/Form/components/EnumPicker.d.ts +5 -0
- package/dist/types/index.d.ts +3 -1
- package/package.json +6 -4
package/dist/index.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ interface DataTableProps<TData> {
|
|
|
142
142
|
setDensity: OnChangeFn<DensityState>;
|
|
143
143
|
setColumnVisibility: OnChangeFn<VisibilityState>;
|
|
144
144
|
}
|
|
145
|
-
declare
|
|
145
|
+
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, children, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
146
146
|
|
|
147
147
|
interface DataTableServerProps<TData> {
|
|
148
148
|
children: ReactNode | ReactNode[];
|
|
@@ -150,7 +150,6 @@ interface DataTableServerProps<TData> {
|
|
|
150
150
|
enableRowSelection?: boolean;
|
|
151
151
|
enableMultiRowSelection?: boolean;
|
|
152
152
|
enableSubRowSelection?: boolean;
|
|
153
|
-
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
154
153
|
columnOrder: ColumnOrderState;
|
|
155
154
|
columnFilters: ColumnFiltersState;
|
|
156
155
|
globalFilter: string;
|
|
@@ -170,7 +169,7 @@ interface DataTableServerProps<TData> {
|
|
|
170
169
|
query: UseQueryResult<TData>;
|
|
171
170
|
url: string;
|
|
172
171
|
}
|
|
173
|
-
declare
|
|
172
|
+
declare function DataTableServer<TData = unknown>({ columns, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, query, children, url, }: DataTableServerProps<TData>): react_jsx_runtime.JSX.Element;
|
|
174
173
|
|
|
175
174
|
interface TableBodyProps {
|
|
176
175
|
pinnedBgColor?: {
|
|
@@ -195,11 +194,12 @@ declare const TableBody: ({ pinnedBgColor, showSelector, alwaysShowSelector, can
|
|
|
195
194
|
|
|
196
195
|
interface TableControlsProps {
|
|
197
196
|
totalText?: string;
|
|
198
|
-
showFilter?: boolean;
|
|
199
197
|
fitTableWidth?: boolean;
|
|
200
198
|
fitTableHeight?: boolean;
|
|
201
199
|
isMobile?: boolean;
|
|
202
200
|
children?: ReactNode;
|
|
201
|
+
showGlobalFilter?: boolean;
|
|
202
|
+
showFilter?: boolean;
|
|
203
203
|
showFilterName?: boolean;
|
|
204
204
|
showFilterTags?: boolean;
|
|
205
205
|
showReload?: boolean;
|
|
@@ -208,7 +208,7 @@ interface TableControlsProps {
|
|
|
208
208
|
loading?: boolean;
|
|
209
209
|
hasError?: boolean;
|
|
210
210
|
}
|
|
211
|
-
declare const TableControls: ({ totalText,
|
|
211
|
+
declare const TableControls: ({ totalText, fitTableWidth, fitTableHeight, isMobile, children, showGlobalFilter, showFilter, showFilterName, showFilterTags, showReload, filterOptions, extraItems, loading, hasError, }: TableControlsProps) => react_jsx_runtime.JSX.Element;
|
|
212
212
|
|
|
213
213
|
interface TableFooterProps {
|
|
214
214
|
pinnedBgColor?: {
|
|
@@ -344,6 +344,7 @@ interface DataTableContext<TData> {
|
|
|
344
344
|
table: Table$1<TData>;
|
|
345
345
|
globalFilter: string;
|
|
346
346
|
setGlobalFilter: OnChangeFn<string>;
|
|
347
|
+
type: "client" | "server";
|
|
347
348
|
}
|
|
348
349
|
declare const DataTableContext: React$1.Context<DataTableContext<any>>;
|
|
349
350
|
|
|
@@ -387,6 +388,17 @@ interface GetColumnsConfigs<K extends RowData> {
|
|
|
387
388
|
declare const widthSanityCheck: <K extends unknown>(widthList: number[], ignoreList: K[], properties: { [key in K as string]?: object | undefined; }) => void;
|
|
388
389
|
declare const getColumns: <TData extends unknown>({ schema, ignore, width, meta, defaultWidth, }: GetColumnsConfigs<TData>) => ColumnDef<TData>[];
|
|
389
390
|
|
|
391
|
+
interface EmptyStateProps {
|
|
392
|
+
title: string;
|
|
393
|
+
description: string;
|
|
394
|
+
}
|
|
395
|
+
declare const EmptyState: ({ title, description, }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
396
|
+
|
|
397
|
+
interface ErrorAlertProps {
|
|
398
|
+
showMessage: boolean;
|
|
399
|
+
}
|
|
400
|
+
declare const ErrorAlert: ({ showMessage }: ErrorAlertProps) => react_jsx_runtime.JSX.Element;
|
|
401
|
+
|
|
390
402
|
interface FilterOptionsProps {
|
|
391
403
|
column: string;
|
|
392
404
|
}
|
|
@@ -405,6 +417,11 @@ interface DisplayTextProps {
|
|
|
405
417
|
submitSuccess?: string;
|
|
406
418
|
submitAgain?: string;
|
|
407
419
|
fieldRequired?: string;
|
|
420
|
+
total: string;
|
|
421
|
+
showing: string;
|
|
422
|
+
close: string;
|
|
423
|
+
typeToSearch: string;
|
|
424
|
+
showMore: string;
|
|
408
425
|
}
|
|
409
426
|
interface FormProps<TData extends FieldValues> {
|
|
410
427
|
schema: JSONSchema7;
|
|
@@ -414,7 +431,7 @@ interface FormProps<TData extends FieldValues> {
|
|
|
414
431
|
onSubmit?: SubmitHandler<TData>;
|
|
415
432
|
preLoadedValues?: object;
|
|
416
433
|
rowNumber?: number | string;
|
|
417
|
-
displayText?: DisplayTextProps
|
|
434
|
+
displayText?: Partial<DisplayTextProps>;
|
|
418
435
|
}
|
|
419
436
|
interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
420
437
|
variant: string;
|
|
@@ -522,4 +539,4 @@ declare module "@tanstack/react-table" {
|
|
|
522
539
|
}
|
|
523
540
|
}
|
|
524
541
|
|
|
525
|
-
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 DisplayTextProps, EditFilterButton, type EditFilterButtonProps, EditOrderButton, type EditOrderButtonProps, EditSortingButton, type EditSortingButtonProps, EditViewButton, type EditViewButtonProps, FilterOptions, type FilterOptionsProps, Form, type FormProps, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, PageSizeControl, type PageSizeControlProps, type RangeCalendarProps, type RangeDatePickerProps, 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, TableFilter, TableFilterTags, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadingComponent, type TableLoadingComponentProps, TableOrderer, TablePagination, type TableProps, type TableRendererProps, type TableRowSelectorProps, TableSelector, TableSorter, TableViewer, TextCell, type TextCellProps, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, getColumns, getMultiDates, getRangeDates, useDataTable, useDataTableContext, useDataTableServer, widthSanityCheck };
|
|
542
|
+
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 DisplayTextProps, EditFilterButton, type EditFilterButtonProps, EditOrderButton, type EditOrderButtonProps, EditSortingButton, type EditSortingButtonProps, EditViewButton, type EditViewButtonProps, EmptyState, type EmptyStateProps, ErrorAlert, type ErrorAlertProps, FilterOptions, type FilterOptionsProps, Form, type FormProps, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, PageSizeControl, type PageSizeControlProps, type RangeCalendarProps, type RangeDatePickerProps, 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, TableFilter, TableFilterTags, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadingComponent, type TableLoadingComponentProps, TableOrderer, TablePagination, type TableProps, type TableRendererProps, type TableRowSelectorProps, TableSelector, TableSorter, TableViewer, TextCell, type TextCellProps, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, getColumns, getMultiDates, getRangeDates, useDataTable, useDataTableContext, useDataTableServer, widthSanityCheck };
|