@bsol-oss/react-datatable5 8.1.2 → 9.0.1
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 +22 -22
- package/dist/index.js +122 -116
- package/dist/index.mjs +125 -120
- package/dist/types/components/Form/Form.d.ts +8 -20
- package/dist/types/components/Form/SchemaFormContext.d.ts +2 -2
- package/dist/types/components/Form/components/IdViewer.d.ts +1 -3
- package/dist/types/components/Form/useForm.d.ts +12 -0
- package/dist/types/components/Form/useSchemaContext.d.ts +1 -1
- package/dist/types/components/ui/hover-card.d.ts +11 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
-
import React__default, { ReactNode } 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 { ImageProps, TableHeaderProps as TableHeaderProps$1, TableRootProps, GridProps, CardBodyProps, FlexProps, TextProps, BoxProps } from '@chakra-ui/react';
|
|
7
7
|
import { IconType } from 'react-icons';
|
|
@@ -9,7 +9,10 @@ import { RankingInfo } from '@tanstack/match-sorter-utils';
|
|
|
9
9
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
10
10
|
import { JSONSchema7 } from 'json-schema';
|
|
11
11
|
import { ForeignKeyProps } from '@/components/Form/components/StringInputField';
|
|
12
|
-
import
|
|
12
|
+
import * as react_hook_form from 'react-hook-form';
|
|
13
|
+
import { FieldValues, UseFormReturn, SubmitHandler } from 'react-hook-form';
|
|
14
|
+
import * as react_i18next from 'react-i18next';
|
|
15
|
+
import { UseTranslationResponse } from 'react-i18next';
|
|
13
16
|
import { RenderProps, Props } from '@bsol-oss/dayzed-react19';
|
|
14
17
|
|
|
15
18
|
interface DensityToggleButtonProps {
|
|
@@ -451,32 +454,18 @@ declare const FilterOptions: ({ column }: FilterOptionsProps) => react_jsx_runti
|
|
|
451
454
|
|
|
452
455
|
declare const GlobalFilter: () => react_jsx_runtime.JSX.Element;
|
|
453
456
|
|
|
454
|
-
interface DisplayTextProps {
|
|
455
|
-
title?: string;
|
|
456
|
-
addNew?: string;
|
|
457
|
-
submit?: string;
|
|
458
|
-
confirm?: string;
|
|
459
|
-
save?: string;
|
|
460
|
-
empty?: string;
|
|
461
|
-
cancel?: string;
|
|
462
|
-
submitSuccess?: string;
|
|
463
|
-
submitAgain?: string;
|
|
464
|
-
fieldRequired?: string;
|
|
465
|
-
total: string;
|
|
466
|
-
showing: string;
|
|
467
|
-
close: string;
|
|
468
|
-
typeToSearch: string;
|
|
469
|
-
showMore: string;
|
|
470
|
-
}
|
|
471
457
|
interface FormProps<TData extends FieldValues> {
|
|
472
458
|
schema: JSONSchema7;
|
|
473
459
|
serverUrl: string;
|
|
460
|
+
idMap: Record<string, object>;
|
|
461
|
+
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
462
|
+
form: UseFormReturn;
|
|
463
|
+
translate: UseTranslationResponse<any, any>;
|
|
474
464
|
order?: string[];
|
|
475
465
|
ignore?: string[];
|
|
476
466
|
onSubmit?: SubmitHandler<TData>;
|
|
477
467
|
preLoadedValues?: object;
|
|
478
468
|
rowNumber?: number | string;
|
|
479
|
-
displayText?: Partial<DisplayTextProps>;
|
|
480
469
|
}
|
|
481
470
|
interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
482
471
|
variant: string;
|
|
@@ -487,7 +476,18 @@ interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
487
476
|
gridRow: string;
|
|
488
477
|
foreign_key: ForeignKeyProps;
|
|
489
478
|
}
|
|
490
|
-
declare const Form: <TData extends FieldValues>({ schema, serverUrl, order, ignore, onSubmit, preLoadedValues, rowNumber,
|
|
479
|
+
declare const Form: <TData extends FieldValues>({ schema, idMap, setIdMap, form, serverUrl, translate, order, ignore, onSubmit, preLoadedValues, rowNumber, }: FormProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
480
|
+
|
|
481
|
+
interface UseFormProps {
|
|
482
|
+
preLoadedValues?: FieldValues | undefined;
|
|
483
|
+
keyPrefix?: string;
|
|
484
|
+
}
|
|
485
|
+
declare const useForm: ({ preLoadedValues, keyPrefix }: UseFormProps) => {
|
|
486
|
+
form: react_hook_form.UseFormReturn<FieldValues, any, undefined>;
|
|
487
|
+
idMap: Record<string, object>;
|
|
488
|
+
setIdMap: React$1.Dispatch<React$1.SetStateAction<Record<string, object>>>;
|
|
489
|
+
translate: react_i18next.UseTranslationResponse<"", string>;
|
|
490
|
+
};
|
|
491
491
|
|
|
492
492
|
interface CalendarProps extends RenderProps {
|
|
493
493
|
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
@@ -597,4 +597,4 @@ declare module "@tanstack/react-table" {
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
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,
|
|
600
|
+
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, 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, 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, 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, type UseFormProps, getColumns, getMultiDates, getRangeDates, useDataTable, useDataTableContext, useDataTableServer, useForm, widthSanityCheck };
|