@bsol-oss/react-datatable5 12.0.0-beta.4 → 12.0.0-beta.40
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 +94 -76
- package/dist/index.js +815 -375
- package/dist/index.mjs +819 -378
- 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 +9 -12
- package/dist/types/components/DataTable/components/TextCell.d.ts +10 -0
- package/dist/types/components/DataTable/context/DataTableContext.d.ts +3 -2
- 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 +23 -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 +5 -0
- package/dist/types/components/DataTable/display/TableHeader.d.ts +9 -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/components/core/DefaultForm.d.ts +2 -1
- package/dist/types/components/Form/components/core/FormRoot.d.ts +2 -1
- package/dist/types/components/Form/components/fields/CustomInput.d.ts +8 -0
- package/dist/types/components/Form/components/fields/DatePicker.d.ts +2 -7
- package/dist/types/components/Form/components/fields/EnumPicker.d.ts +2 -1
- package/dist/types/components/Form/components/fields/FilePicker.d.ts +2 -5
- package/dist/types/components/Form/components/fields/StringInputField.d.ts +2 -5
- package/dist/types/components/Form/components/fields/TextAreaInput.d.ts +12 -0
- package/dist/types/components/Form/components/fields/TimePicker.d.ts +7 -0
- package/dist/types/components/Form/components/fields/types.d.ts +6 -0
- package/dist/types/components/Form/components/types/CustomJSONSchema7.d.ts +17 -1
- package/dist/types/components/Form/components/viewers/CustomViewer.d.ts +8 -0
- package/dist/types/components/Form/components/viewers/TextAreaViewer.d.ts +12 -0
- package/dist/types/components/Form/components/viewers/TimeViewer.d.ts +7 -0
- package/dist/types/components/TimePicker/TimePicker.d.ts +20 -0
- package/dist/types/index.d.ts +32 -33
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnDef, ColumnFiltersState, ColumnOrderState, FilterFn, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { RankingInfo } from "@tanstack/match-sorter-utils";
|
|
4
|
-
import { DensityState } from "
|
|
4
|
+
import { DensityState } from "./controls/DensityFeature";
|
|
5
5
|
import { UseTranslationResponse } from "react-i18next";
|
|
6
6
|
declare module "@tanstack/react-table" {
|
|
7
7
|
interface FilterFns {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { UseQueryResult } from "@tanstack/react-query";
|
|
3
3
|
import { ColumnDef, ColumnFiltersState, ColumnOrderState, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
4
|
-
import { DensityState } from "
|
|
4
|
+
import { DensityState } from "./controls/DensityFeature";
|
|
5
5
|
import { DataResponse } from "./useDataTableServer";
|
|
6
6
|
import { UseTranslationResponse } from "react-i18next";
|
|
7
7
|
export interface DataTableServerProps<TData extends DataResponse = DataResponse<unknown>> {
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { TableFooterProps } from "./TableFooter";
|
|
5
|
-
import { TableHeaderProps } from "./TableHeader";
|
|
6
|
-
import { TableProps } from "./Table";
|
|
1
|
+
import { TableControlsProps } from "./controls/TableControls";
|
|
2
|
+
import { TableProps } from "./display/Table";
|
|
3
|
+
import { TableBodyProps } from "./display/TableBody";
|
|
4
|
+
import { TableFooterProps } from "./display/TableFooter";
|
|
5
|
+
import { TableHeaderProps } from "./display/TableHeader";
|
|
7
6
|
export interface DefaultTableProps {
|
|
8
7
|
showFooter?: boolean;
|
|
9
|
-
showSelector?: boolean;
|
|
10
8
|
tableProps?: Omit<TableProps, "children">;
|
|
11
|
-
tHeadProps?: ChakraHeaderProps;
|
|
12
|
-
controlProps?: TableControlsProps;
|
|
13
|
-
tableFooterProps?: TableFooterProps;
|
|
14
|
-
tableBodyProps?: TableBodyProps;
|
|
15
9
|
tableHeaderProps?: TableHeaderProps;
|
|
10
|
+
tableBodyProps?: TableBodyProps;
|
|
11
|
+
tableFooterProps?: TableFooterProps;
|
|
12
|
+
controlProps?: TableControlsProps;
|
|
16
13
|
variant?: "" | "greedy";
|
|
17
14
|
}
|
|
18
|
-
export declare const DefaultTable: ({ showFooter, tableProps, tableHeaderProps, tableBodyProps,
|
|
15
|
+
export declare const DefaultTable: ({ showFooter, tableProps, tableHeaderProps, tableBodyProps, tableFooterProps, controlProps, variant, }: DefaultTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlexProps, TextProps } from "@chakra-ui/react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface TextCellProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
noOfLines?: number[];
|
|
6
|
+
children: string | number | ReactNode | ReactNode[];
|
|
7
|
+
containerProps?: FlexProps;
|
|
8
|
+
textProps?: TextProps;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextCell: ({ label, containerProps, textProps, children, }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { OnChangeFn, Table } from "@tanstack/react-table";
|
|
3
3
|
import { UseTranslationResponse } from "react-i18next";
|
|
4
|
-
|
|
4
|
+
import { DataTableProps } from "../DataTable";
|
|
5
|
+
export interface DataTableContext<TData = unknown> extends DataTableProps {
|
|
5
6
|
table: Table<TData>;
|
|
6
7
|
globalFilter: string;
|
|
7
8
|
setGlobalFilter: OnChangeFn<string>;
|
|
8
9
|
type: "client" | "server";
|
|
9
|
-
translate: UseTranslationResponse<any,
|
|
10
|
+
translate: UseTranslationResponse<any, unknown>;
|
|
10
11
|
}
|
|
11
12
|
export declare const DataTableContext: import("react").Context<DataTableContext<unknown>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnChangeFn, Updater, RowData, TableFeature } from "@tanstack/react-table";
|
|
2
|
+
export type DensityState = "sm" | "md" | "lg";
|
|
3
|
+
export interface DensityTableState {
|
|
4
|
+
density: DensityState;
|
|
5
|
+
}
|
|
6
|
+
export interface DensityOptions {
|
|
7
|
+
enableDensity?: boolean;
|
|
8
|
+
onDensityChange?: OnChangeFn<DensityState>;
|
|
9
|
+
}
|
|
10
|
+
export interface DensityInstance {
|
|
11
|
+
setDensity: (updater: Updater<DensityState>) => void;
|
|
12
|
+
toggleDensity: (value?: DensityState) => void;
|
|
13
|
+
getDensityValue: (value?: DensityState) => number;
|
|
14
|
+
}
|
|
15
|
+
declare module "@tanstack/react-table" {
|
|
16
|
+
interface TableState extends DensityTableState {
|
|
17
|
+
}
|
|
18
|
+
interface TableOptionsResolved<TData extends RowData> extends DensityOptions {
|
|
19
|
+
}
|
|
20
|
+
interface Table<TData extends RowData> extends DensityInstance {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const DensityFeature: TableFeature<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface EditSortingButtonProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
icon?: React.ReactElement;
|
|
5
|
+
text?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const EditSortingButton: ({ text, icon, title, }: EditSortingButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Pagination: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RowCountText: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SelectAllRowsToggleProps {
|
|
3
|
+
selectAllIcon?: React.ReactElement;
|
|
4
|
+
clearAllIcon?: React.ReactElement;
|
|
5
|
+
selectAllText?: string;
|
|
6
|
+
clearAllText?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const SelectAllRowsToggle: ({ selectAllIcon, clearAllIcon, selectAllText, clearAllText, }: SelectAllRowsToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GridProps } from "@chakra-ui/react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface TableControlsProps {
|
|
4
|
+
totalText?: string;
|
|
5
|
+
fitTableWidth?: boolean;
|
|
6
|
+
fitTableHeight?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
showGlobalFilter?: boolean;
|
|
9
|
+
showFilter?: boolean;
|
|
10
|
+
showFilterName?: boolean;
|
|
11
|
+
showFilterTags?: boolean;
|
|
12
|
+
showReload?: boolean;
|
|
13
|
+
showPagination?: boolean;
|
|
14
|
+
showPageSizeControl?: boolean;
|
|
15
|
+
showPageCountText?: boolean;
|
|
16
|
+
showView?: boolean;
|
|
17
|
+
filterOptions?: string[];
|
|
18
|
+
extraItems?: ReactNode;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
hasError?: boolean;
|
|
21
|
+
gridProps?: GridProps;
|
|
22
|
+
}
|
|
23
|
+
export declare const TableControls: ({ fitTableWidth, fitTableHeight, children, showGlobalFilter, showFilter, showFilterName, showFilterTags, showReload, showPagination, showPageSizeControl, showPageCountText, showView, filterOptions, extraItems, loading, hasError, gridProps, }: TableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableFilterTags: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableFilter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableSelector: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableSorter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableViewer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageProps } from "@chakra-ui/react";
|
|
2
|
+
import { Row } from "@tanstack/react-table";
|
|
3
|
+
import { IconType } from "react-icons";
|
|
4
|
+
export interface CardHeaderProps<TData> {
|
|
5
|
+
row: Row<TData>;
|
|
6
|
+
imageColumnId?: keyof TData;
|
|
7
|
+
titleColumnId?: keyof TData;
|
|
8
|
+
tagColumnId?: keyof TData;
|
|
9
|
+
tagIcon?: IconType;
|
|
10
|
+
showTag?: boolean;
|
|
11
|
+
imageProps?: ImageProps;
|
|
12
|
+
}
|
|
13
|
+
export declare const CardHeader: <TData>({ row, imageColumnId, titleColumnId, tagColumnId, tagIcon, showTag, imageProps, }: CardHeaderProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseTranslationResponse } from "react-i18next";
|
|
2
|
+
export interface DataDisplayProps {
|
|
3
|
+
variant?: "horizontal" | "stats" | "";
|
|
4
|
+
translate?: UseTranslationResponse<any, any>;
|
|
5
|
+
}
|
|
6
|
+
export declare const DataDisplay: ({ variant }: DataDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BoxProps } from "@chakra-ui/react";
|
|
2
|
+
import { UseTranslationResponse } from "react-i18next";
|
|
3
|
+
export interface RecordDisplayProps {
|
|
4
|
+
object: object | null;
|
|
5
|
+
boxProps?: BoxProps;
|
|
6
|
+
translate?: UseTranslationResponse<any, any>;
|
|
7
|
+
prefix?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const RecordDisplay: ({ object, boxProps, translate, prefix, }: RecordDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TableRootProps } from "@chakra-ui/react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface TableProps extends TableRootProps {
|
|
4
|
+
showLoading?: boolean;
|
|
5
|
+
loadingComponent?: ReactNode;
|
|
6
|
+
emptyComponent?: ReactNode;
|
|
7
|
+
canResize?: boolean;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Table: ({ children, emptyComponent, canResize, ...props }: TableProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Row } from "@tanstack/react-table";
|
|
2
|
+
export interface TableBodyProps {
|
|
3
|
+
pinnedBgColor?: {
|
|
4
|
+
light: string;
|
|
5
|
+
dark: string;
|
|
6
|
+
};
|
|
7
|
+
showSelector?: boolean;
|
|
8
|
+
alwaysShowSelector?: boolean;
|
|
9
|
+
canResize?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface TableRowSelectorProps<TData> {
|
|
12
|
+
index: number;
|
|
13
|
+
row: Row<TData>;
|
|
14
|
+
hoveredRow: number;
|
|
15
|
+
pinnedBgColor?: {
|
|
16
|
+
light: string;
|
|
17
|
+
dark: string;
|
|
18
|
+
};
|
|
19
|
+
alwaysShowSelector?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const TableBody: ({ showSelector, alwaysShowSelector, canResize, }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GridProps } from "@chakra-ui/react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface TableCardContainerProps extends GridProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
variant?: "carousel" | "";
|
|
6
|
+
}
|
|
7
|
+
export declare const TableCardContainer: ({ children, variant, ...props }: TableCardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CardBodyProps } from "@chakra-ui/react";
|
|
2
|
+
import { Row } from "@tanstack/react-table";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
export interface TableCardsProps<TData> {
|
|
5
|
+
isSelectable?: boolean;
|
|
6
|
+
showDisplayNameOnly?: boolean;
|
|
7
|
+
renderTitle?: (row: Row<TData>) => ReactNode | undefined;
|
|
8
|
+
cardBodyProps?: CardBodyProps;
|
|
9
|
+
}
|
|
10
|
+
export declare const DefaultCardTitle: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const TableCards: <TData>({ isSelectable, showDisplayNameOnly, renderTitle, cardBodyProps, }: TableCardsProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Table } from "@tanstack/react-table";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface TableRendererProps<TData> {
|
|
4
|
+
render: (render: Table<TData>) => React.ReactElement;
|
|
5
|
+
}
|
|
6
|
+
export declare const TableComponent: <TData>({ render, }: TableRendererProps<TData>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface TableDataDisplayProps {
|
|
3
|
+
colorPalette?: string;
|
|
4
|
+
emptyComponent?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const TableDataDisplay: ({ colorPalette, emptyComponent, }: TableDataDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableHeaderProps as ChakraTableHeaderProps, TableRowProps } from "@chakra-ui/react";
|
|
2
|
+
export interface TableHeaderProps {
|
|
3
|
+
canResize?: boolean;
|
|
4
|
+
showSelector?: boolean;
|
|
5
|
+
isSticky?: boolean;
|
|
6
|
+
tableHeaderProps?: ChakraTableHeaderProps;
|
|
7
|
+
tableRowProps?: TableRowProps;
|
|
8
|
+
}
|
|
9
|
+
export declare const TableHeader: ({ canResize, showSelector, isSticky, tableHeaderProps, tableRowProps, }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlexProps, TextProps } from "@chakra-ui/react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface TextCellProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
noOfLines?: number[];
|
|
6
|
+
children: string | number | ReactNode | ReactNode[];
|
|
7
|
+
containerProps?: FlexProps;
|
|
8
|
+
textProps?: TextProps;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextCell: ({ label, containerProps, textProps, children, }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnFiltersState, ColumnOrderState, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
-
import { DensityState } from "
|
|
2
|
+
import { DensityState } from "./controls/DensityFeature";
|
|
3
3
|
import { UseTranslationResponse } from "react-i18next";
|
|
4
4
|
export interface DataTableDefaultState {
|
|
5
5
|
sorting?: SortingState;
|
|
@@ -2,5 +2,6 @@ import { FormRootProps } from "./FormRoot";
|
|
|
2
2
|
import { FieldValues } from "react-hook-form";
|
|
3
3
|
export interface DefaultFormProps<TData extends FieldValues> {
|
|
4
4
|
formConfig: Omit<FormRootProps<TData>, "children">;
|
|
5
|
+
showTitle?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultFormProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const DefaultForm: <TData extends FieldValues>({ formConfig, showTitle, }: DefaultFormProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,8 +4,9 @@ import { JSONSchema7 } from "json-schema";
|
|
|
4
4
|
import { Dispatch, ReactNode, SetStateAction } from "react";
|
|
5
5
|
import { FieldValues, SubmitHandler, UseFormReturn } from "react-hook-form";
|
|
6
6
|
import { UseTranslationResponse } from "react-i18next";
|
|
7
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
7
8
|
export interface FormRootProps<TData extends FieldValues> {
|
|
8
|
-
schema:
|
|
9
|
+
schema: CustomJSONSchema7;
|
|
9
10
|
serverUrl: string;
|
|
10
11
|
requestUrl?: string;
|
|
11
12
|
idMap: Record<string, object>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
3
|
+
export interface DatePickerProps {
|
|
4
|
+
column: string;
|
|
5
|
+
schema: CustomJSONSchema7;
|
|
6
|
+
prefix: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CustomInput: ({ column, schema, prefix }: DatePickerProps) => import("react").ReactNode;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
column: string;
|
|
4
|
-
schema: CustomJSONSchema7;
|
|
5
|
-
prefix: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const DatePicker: ({ column, schema, prefix }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { InputDefaultProps } from "./types";
|
|
2
|
+
export declare const DatePicker: ({ column, schema, prefix }: InputDefaultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,5 +4,6 @@ export interface IdPickerProps {
|
|
|
4
4
|
isMultiple?: boolean;
|
|
5
5
|
schema: CustomJSONSchema7;
|
|
6
6
|
prefix: string;
|
|
7
|
+
showTotalAndLimit?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const EnumPicker: ({ column, isMultiple, schema, prefix, }: IdPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const EnumPicker: ({ column, isMultiple, schema, prefix, showTotalAndLimit, }: IdPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
schema: any;
|
|
4
|
-
prefix: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { InputDefaultProps } from "./types";
|
|
2
|
+
export declare const FilePicker: ({ column, schema, prefix }: InputDefaultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface StringInputFieldProps {
|
|
3
|
-
column: string;
|
|
4
|
-
schema: CustomJSONSchema7;
|
|
5
|
-
prefix: string;
|
|
1
|
+
import { InputDefaultProps } from "./types";
|
|
2
|
+
export interface StringInputFieldProps extends InputDefaultProps {
|
|
6
3
|
}
|
|
7
4
|
export interface ForeignKeyProps {
|
|
8
5
|
column: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
2
|
+
export interface TextAreaInputProps {
|
|
3
|
+
column: string;
|
|
4
|
+
schema: CustomJSONSchema7;
|
|
5
|
+
prefix: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ForeignKeyProps {
|
|
8
|
+
column: string;
|
|
9
|
+
table: string;
|
|
10
|
+
display_column: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const TextAreaInput: ({ column, schema, prefix, }: TextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
2
|
+
export interface DatePickerProps {
|
|
3
|
+
column: string;
|
|
4
|
+
schema: CustomJSONSchema7;
|
|
5
|
+
prefix: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const TimePicker: ({ column, schema, prefix }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { JSONSchema7 } from "json-schema";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ForeignKeyProps } from "../fields/StringInputField";
|
|
4
|
+
import { UseFormReturn } from "react-hook-form";
|
|
4
5
|
export interface CustomJSONSchema7 extends JSONSchema7 {
|
|
5
6
|
gridColumn?: string;
|
|
6
7
|
gridRow?: string;
|
|
7
8
|
foreign_key?: ForeignKeyProps;
|
|
8
9
|
variant?: string;
|
|
9
|
-
renderDisplay
|
|
10
|
+
renderDisplay?: (item: unknown) => ReactNode;
|
|
11
|
+
inputRender?: (props: {
|
|
12
|
+
column: string;
|
|
13
|
+
schema: CustomJSONSchema7;
|
|
14
|
+
prefix: string;
|
|
15
|
+
formContext: UseFormReturn;
|
|
16
|
+
}) => ReactNode;
|
|
17
|
+
inputViewerRender?: (props: {
|
|
18
|
+
column: string;
|
|
19
|
+
schema: CustomJSONSchema7;
|
|
20
|
+
prefix: string;
|
|
21
|
+
formContext: UseFormReturn;
|
|
22
|
+
}) => ReactNode;
|
|
23
|
+
dateFormat?: string;
|
|
24
|
+
displayDateFormat?: string;
|
|
25
|
+
format?: string;
|
|
10
26
|
}
|
|
11
27
|
export interface TagPickerProps {
|
|
12
28
|
column: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
3
|
+
export interface DatePickerProps {
|
|
4
|
+
column: string;
|
|
5
|
+
schema: CustomJSONSchema7;
|
|
6
|
+
prefix: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CustomViewer: ({ column, schema, prefix }: DatePickerProps) => import("react").ReactNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
2
|
+
export interface TextAreaViewerProps {
|
|
3
|
+
column: string;
|
|
4
|
+
schema: CustomJSONSchema7;
|
|
5
|
+
prefix: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ForeignKeyProps {
|
|
8
|
+
column: string;
|
|
9
|
+
table: string;
|
|
10
|
+
display_column: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const TextAreaViewer: ({ column, schema, prefix, }: TextAreaViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomJSONSchema7 } from "../types/CustomJSONSchema7";
|
|
2
|
+
export interface TimeViewerProps {
|
|
3
|
+
column: string;
|
|
4
|
+
schema: CustomJSONSchema7;
|
|
5
|
+
prefix: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const TimeViewer: ({ column, schema, prefix }: TimeViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
interface TimePickerProps {
|
|
3
|
+
hour: number | null;
|
|
4
|
+
setHour: Dispatch<SetStateAction<number | null>>;
|
|
5
|
+
minute: number | null;
|
|
6
|
+
setMinute: Dispatch<SetStateAction<number | null>>;
|
|
7
|
+
meridiem: "am" | "pm" | null;
|
|
8
|
+
setMeridiem: Dispatch<SetStateAction<"am" | "pm" | null>>;
|
|
9
|
+
onChange?: (newValue: {
|
|
10
|
+
hour: number | null;
|
|
11
|
+
minute: number | null;
|
|
12
|
+
meridiem: "am" | "pm" | null;
|
|
13
|
+
}) => void;
|
|
14
|
+
meridiemLabel?: {
|
|
15
|
+
am: string;
|
|
16
|
+
pm: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare function TimePicker({ hour, setHour, minute, setMinute, meridiem, setMeridiem, meridiemLabel, onChange, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|