@bsol-oss/react-datatable5 12.0.0-beta.89 → 12.0.0-beta.90

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Row, Table as Table$1, RowData, OnChangeFn, Updater, SortingState, ColumnFiltersState, PaginationState, RowSelectionState, ColumnOrderState, VisibilityState, FilterFn, ColumnDef, Column } from '@tanstack/react-table';
3
- import * as react from 'react';
4
- import react__default, { ReactNode, Dispatch, SetStateAction } from 'react';
3
+ import * as React$1 from 'react';
4
+ import React__default, { ReactNode, Dispatch, SetStateAction } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TableHeaderProps as TableHeaderProps$1, TableRowProps, GridProps, TableRootProps, BoxProps, FlexProps, CardBodyProps, TextProps, ImageProps } from '@chakra-ui/react';
7
7
  import { IconType } from 'react-icons';
@@ -68,7 +68,7 @@ interface TableHeaderProps {
68
68
  declare const TableHeader: ({ canResize, showSelector, isSticky, tableHeaderProps, tableRowProps, defaultTexts, }: TableHeaderProps) => react_jsx_runtime.JSX.Element;
69
69
 
70
70
  interface DensityToggleButtonProps {
71
- icon?: react__default.ReactElement;
71
+ icon?: React__default.ReactElement;
72
72
  text?: string;
73
73
  }
74
74
  declare const DensityToggleButton: ({ text, icon, }: DensityToggleButtonProps) => react_jsx_runtime.JSX.Element;
@@ -101,7 +101,7 @@ declare const ResetSortingButton: () => react_jsx_runtime.JSX.Element;
101
101
  declare const RowCountText: () => react_jsx_runtime.JSX.Element;
102
102
 
103
103
  interface EditViewButtonProps {
104
- icon?: react__default.ReactElement;
104
+ icon?: React__default.ReactElement;
105
105
  }
106
106
  declare const ViewDialog: ({ icon }: EditViewButtonProps) => react_jsx_runtime.JSX.Element;
107
107
 
@@ -115,8 +115,8 @@ declare const GlobalFilter: () => react_jsx_runtime.JSX.Element;
115
115
  declare const TableSelector: () => react_jsx_runtime.JSX.Element;
116
116
 
117
117
  interface SelectAllRowsToggleProps {
118
- selectAllIcon?: react__default.ReactElement;
119
- clearAllIcon?: react__default.ReactElement;
118
+ selectAllIcon?: React__default.ReactElement;
119
+ clearAllIcon?: React__default.ReactElement;
120
120
  selectAllText?: string;
121
121
  clearAllText?: string;
122
122
  }
@@ -166,7 +166,7 @@ interface TableProps extends TableRootProps {
166
166
  showSelector?: boolean;
167
167
  children: ReactNode;
168
168
  }
169
- declare const Table: ({ children, emptyComponent, canResize, showLoading, showSelector, ...props }: TableProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
169
+ declare const Table: ({ children, emptyComponent, canResize, showLoading, showSelector, ...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;
170
170
 
171
171
  interface TableBodyProps {
172
172
  pinnedBgColor?: {
@@ -207,9 +207,9 @@ declare const DefaultCardTitle: () => react_jsx_runtime.JSX.Element;
207
207
  declare const TableCards: <TData>({ isSelectable, showDisplayNameOnly, renderTitle, cardBodyProps, }: TableCardsProps<TData>) => react_jsx_runtime.JSX.Element;
208
208
 
209
209
  interface TableRendererProps<TData> {
210
- render: (render: Table$1<TData>) => react__default.ReactElement;
210
+ render: (render: Table$1<TData>) => React__default.ReactElement;
211
211
  }
212
- declare const TableComponent: <TData>({ render, }: TableRendererProps<TData>) => react__default.ReactElement<unknown, string | react__default.JSXElementConstructor<any>>;
212
+ declare const TableComponent: <TData>({ render, }: TableRendererProps<TData>) => React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>>;
213
213
 
214
214
  interface TableFooterProps {
215
215
  showSelector?: boolean;
@@ -888,7 +888,7 @@ declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultF
888
888
 
889
889
  declare const FormTitle: () => react_jsx_runtime.JSX.Element;
890
890
 
891
- declare const FormBody: <TData extends object>() => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
891
+ declare const FormBody: <TData extends object>() => string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
892
892
 
893
893
  type MediaLibraryBrowserPropsBase = {
894
894
  onFetchFiles?: (search: string) => Promise<FilePickerMediaFile[]>;
@@ -920,7 +920,7 @@ interface UseFormProps {
920
920
  declare const useForm: ({ preLoadedValues, keyPrefix, namespace, schema, }: UseFormProps) => {
921
921
  form: react_hook_form.UseFormReturn<FieldValues, any, undefined>;
922
922
  idMap: Record<string, object>;
923
- setIdMap: react.Dispatch<react.SetStateAction<Record<string, object>>>;
923
+ setIdMap: React$1.Dispatch<React$1.SetStateAction<Record<string, object>>>;
924
924
  translate: react_i18next.UseTranslationResponse<string, string>;
925
925
  };
926
926
 
@@ -954,7 +954,7 @@ interface DatePickerProps extends Props {
954
954
  backButtonLabel?: string;
955
955
  forwardButtonLabel?: string;
956
956
  };
957
- render?: (dayzedData: any) => react__default.ReactNode;
957
+ render?: (dayzedData: any) => React__default.ReactNode;
958
958
  }
959
959
  interface DatePickerLabels {
960
960
  monthNamesShort: string[];
@@ -988,7 +988,65 @@ interface GetStyleProps {
988
988
  unavailable: boolean;
989
989
  isInRange: boolean;
990
990
  }
991
- interface RangeDatePickerProps extends Props, RangeCalendarProps {
991
+ interface RangeDatePickerLabels {
992
+ monthNamesFull: string[];
993
+ weekdayNamesShort: string[];
994
+ backButtonLabel?: string;
995
+ forwardButtonLabel?: string;
996
+ }
997
+ interface RangeDatePickerProps extends Props {
998
+ onDateSelected?: (obj: {
999
+ selected: Date[];
1000
+ selectable: boolean;
1001
+ date: Date;
1002
+ }) => void;
1003
+ selected?: Date[];
1004
+ firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1005
+ showOutsideDays?: boolean;
1006
+ date?: Date;
1007
+ minDate?: Date;
1008
+ maxDate?: Date;
1009
+ monthsToDisplay?: number;
1010
+ labels?: RangeDatePickerLabels;
1011
+ /**
1012
+ * Whether to render the calendar in a popover with a trigger button.
1013
+ * @default true
1014
+ */
1015
+ withPopover?: boolean;
1016
+ /**
1017
+ * Controlled open state for the popover.
1018
+ */
1019
+ open?: boolean;
1020
+ /**
1021
+ * Callback when the popover open state changes.
1022
+ */
1023
+ onOpenChange?: (details: {
1024
+ open: boolean;
1025
+ }) => void;
1026
+ /**
1027
+ * The trigger button element. If not provided, a default button will be rendered.
1028
+ */
1029
+ trigger?: React__default.ReactNode;
1030
+ /**
1031
+ * Format string for displaying the selected date range in the trigger button.
1032
+ * @default "YYYY-MM-DD"
1033
+ */
1034
+ displayFormat?: string;
1035
+ /**
1036
+ * Placeholder text for the trigger button when no dates are selected.
1037
+ */
1038
+ placeholder?: string;
1039
+ /**
1040
+ * Whether to close the popover when clicking outside.
1041
+ * @default true
1042
+ */
1043
+ closeOnInteractOutside?: boolean;
1044
+ /**
1045
+ * Whether to portal the popover content.
1046
+ * @default true
1047
+ */
1048
+ portalled?: boolean;
1049
+ render?: (dayzedData: RenderProps) => React__default.ReactNode;
992
1050
  }
993
1051
 
994
1052
  interface RecordDisplayProps {
@@ -1041,7 +1099,7 @@ interface DefaultTableServerProps extends DefaultTableProps {
1041
1099
  declare const DefaultTableServer: ({ isLoading: isLoadingOverride, ...props }: DefaultTableServerProps) => react_jsx_runtime.JSX.Element;
1042
1100
 
1043
1101
  interface DataDisplayProps {
1044
- variant?: "horizontal" | "stats" | "";
1102
+ variant?: 'horizontal' | 'stats' | '';
1045
1103
  translate?: UseTranslationResponse<any, any>;
1046
1104
  }
1047
1105
  declare const DataDisplay: ({ variant }: DataDisplayProps) => react_jsx_runtime.JSX.Element;
@@ -1172,4 +1230,4 @@ declare module '@tanstack/react-table' {
1172
1230
  }
1173
1231
  }
1174
1232
 
1175
- export { type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7, type CustomJSONSchema7Definition, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, type DatePickerLabels, type DatePickerProps, type DateTimePickerLabels, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DefaultTableServer, type DefaultTableServerProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, type EnumPickerLabels, ErrorAlert, type ErrorAlertProps, type ErrorMessageConfig, type ErrorMessageResult, type FieldErrorConfig, type FilePickerLabels, type FilePickerMediaFile, type FilePickerProps, FilterDialog, FormBody, FormRoot, type FormRootProps, FormTitle, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, type IdPickerLabels, MediaLibraryBrowser, type MediaLibraryBrowserProps, PageSizeControl, type PageSizeControlProps, Pagination, type QueryParams, type RangeCalendarProps, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, type Result, RowCountText, SelectAllRowsToggle, type SelectAllRowsToggleProps, 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, type TagPickerProps, TextCell, type TextCellProps, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, type UseFormProps, type ValidationErrorType, ViewDialog, buildErrorMessages, buildFieldErrors, buildRequiredErrors, convertToAjvErrorsFormat, createErrorMessage, getColumns, getMultiDates, getRangeDates, idPickerSanityCheck, useDataTable, useDataTableContext, useDataTableServer, useForm, widthSanityCheck };
1233
+ export { type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7, type CustomJSONSchema7Definition, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, type DatePickerLabels, type DatePickerProps, type DateTimePickerLabels, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DefaultTableServer, type DefaultTableServerProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, type EnumPickerLabels, ErrorAlert, type ErrorAlertProps, type ErrorMessageConfig, type ErrorMessageResult, type FieldErrorConfig, type FilePickerLabels, type FilePickerMediaFile, type FilePickerProps, FilterDialog, FormBody, FormRoot, type FormRootProps, FormTitle, type GetColumnsConfigs, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, type IdPickerLabels, MediaLibraryBrowser, type MediaLibraryBrowserProps, PageSizeControl, type PageSizeControlProps, Pagination, type QueryParams, type RangeCalendarProps, type RangeDatePickerLabels, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, type Result, RowCountText, SelectAllRowsToggle, type SelectAllRowsToggleProps, 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, type TagPickerProps, TextCell, type TextCellProps, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, type UseFormProps, type ValidationErrorType, ViewDialog, buildErrorMessages, buildFieldErrors, buildRequiredErrors, convertToAjvErrorsFormat, createErrorMessage, getColumns, getMultiDates, getRangeDates, idPickerSanityCheck, useDataTable, useDataTableContext, useDataTableServer, useForm, widthSanityCheck };