@bsol-oss/react-datatable5 12.0.0-beta.2 → 12.0.0-beta.3
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 +47 -35
- package/dist/index.js +412 -383
- package/dist/index.mjs +410 -384
- package/dist/types/components/Form/SchemaFormContext.d.ts +13 -0
- package/dist/types/components/Form/components/core/DefaultForm.d.ts +6 -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 +10 -7
- package/package.json +1 -1
|
@@ -16,5 +16,18 @@ export interface SchemaFormContext<TData extends FieldValues> {
|
|
|
16
16
|
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
17
17
|
translate: UseTranslationResponse<any, any>;
|
|
18
18
|
requestOptions: AxiosRequestConfig;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
setIsSuccess: Dispatch<SetStateAction<boolean>>;
|
|
21
|
+
isError: boolean;
|
|
22
|
+
setIsError: Dispatch<SetStateAction<boolean>>;
|
|
23
|
+
isSubmiting: boolean;
|
|
24
|
+
setIsSubmiting: Dispatch<SetStateAction<boolean>>;
|
|
25
|
+
isConfirming: boolean;
|
|
26
|
+
setIsConfirming: Dispatch<SetStateAction<boolean>>;
|
|
27
|
+
validatedData: TData | undefined;
|
|
28
|
+
setValidatedData: Dispatch<SetStateAction<TData>>;
|
|
29
|
+
error: unknown;
|
|
30
|
+
setError: Dispatch<SetStateAction<unknown>>;
|
|
31
|
+
getUpdatedData: () => TData | Promise<TData>;
|
|
19
32
|
}
|
|
20
33
|
export declare const SchemaFormContext: import("react").Context<SchemaFormContext<unknown>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormRootProps } from "./FormRoot";
|
|
2
|
+
import { FieldValues } from "react-hook-form";
|
|
3
|
+
export interface DefaultFormProps<TData extends FieldValues> {
|
|
4
|
+
formConfig: Omit<FormRootProps<TData>, "children">;
|
|
5
|
+
}
|
|
6
|
+
export declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultFormProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormBody: <TData extends object>() => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ForeignKeyProps } from "@/components/Form/components/fields/StringInputField";
|
|
2
|
+
import { AxiosRequestConfig } from "axios";
|
|
3
|
+
import { JSONSchema7 } from "json-schema";
|
|
4
|
+
import { Dispatch, ReactNode, SetStateAction } from "react";
|
|
5
|
+
import { FieldValues, SubmitHandler, UseFormReturn } from "react-hook-form";
|
|
6
|
+
import { UseTranslationResponse } from "react-i18next";
|
|
7
|
+
export interface FormRootProps<TData extends FieldValues> {
|
|
8
|
+
schema: JSONSchema7;
|
|
9
|
+
serverUrl: string;
|
|
10
|
+
requestUrl?: string;
|
|
11
|
+
idMap: Record<string, object>;
|
|
12
|
+
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
13
|
+
form: UseFormReturn;
|
|
14
|
+
translate: UseTranslationResponse<any, any>;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
order?: string[];
|
|
17
|
+
ignore?: string[];
|
|
18
|
+
include?: string[];
|
|
19
|
+
onSubmit?: SubmitHandler<TData>;
|
|
20
|
+
rowNumber?: number | string;
|
|
21
|
+
requestOptions?: AxiosRequestConfig;
|
|
22
|
+
getUpdatedData?: () => TData | Promise<TData> | void;
|
|
23
|
+
}
|
|
24
|
+
export interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
25
|
+
variant: string;
|
|
26
|
+
in_table: string;
|
|
27
|
+
column_ref: string;
|
|
28
|
+
display_column: string;
|
|
29
|
+
gridColumn: string;
|
|
30
|
+
gridRow: string;
|
|
31
|
+
foreign_key: ForeignKeyProps;
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare const idPickerSanityCheck: (column: string, foreign_key?: {
|
|
35
|
+
table?: string | undefined;
|
|
36
|
+
column?: string | undefined;
|
|
37
|
+
display_column?: string | undefined;
|
|
38
|
+
} | undefined) => void;
|
|
39
|
+
export declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, serverUrl, translate, children, order, ignore, include, onSubmit, rowNumber, requestOptions, getUpdatedData, }: FormRootProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormTitle: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SubmitButton: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -58,17 +58,20 @@ declare module "@tanstack/react-table" {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
export * from "./components/Controls/DensityToggleButton";
|
|
61
|
-
export * from "./components/Controls/FilterDialog";
|
|
62
61
|
export * from "./components/Controls/EditOrderButton";
|
|
63
62
|
export * from "./components/Controls/EditSortingButton";
|
|
64
|
-
export * from "./components/Controls/
|
|
63
|
+
export * from "./components/Controls/FilterDialog";
|
|
65
64
|
export * from "./components/Controls/PageSizeControl";
|
|
65
|
+
export * from "./components/Controls/Pagination";
|
|
66
66
|
export * from "./components/Controls/ResetFilteringButton";
|
|
67
67
|
export * from "./components/Controls/ResetSelectionButton";
|
|
68
68
|
export * from "./components/Controls/ResetSortingButton";
|
|
69
69
|
export * from "./components/Controls/RowCountText";
|
|
70
|
-
export * from "./components/Controls/
|
|
70
|
+
export * from "./components/Controls/ViewDialog";
|
|
71
71
|
export * from "./components/DataTable/CardHeader";
|
|
72
|
+
export * from "./components/DataTable/components/EmptyState";
|
|
73
|
+
export * from "./components/DataTable/components/ErrorAlert";
|
|
74
|
+
export * from "./components/DataTable/context/useDataTableContext";
|
|
72
75
|
export * from "./components/DataTable/DataDisplay";
|
|
73
76
|
export * from "./components/DataTable/DataTable";
|
|
74
77
|
export * from "./components/DataTable/DataTableServer";
|
|
@@ -91,14 +94,14 @@ export * from "./components/DataTable/TableSorter";
|
|
|
91
94
|
export * from "./components/DataTable/TableViewer";
|
|
92
95
|
export * from "./components/DataTable/TextCell";
|
|
93
96
|
export * from "./components/DataTable/useDataTable";
|
|
94
|
-
export * from "./components/DataTable/context/useDataTableContext";
|
|
95
97
|
export * from "./components/DataTable/useDataTableServer";
|
|
96
98
|
export * from "./components/DataTable/utils/getColumns";
|
|
97
|
-
export * from "./components/DataTable/components/EmptyState";
|
|
98
|
-
export * from "./components/DataTable/components/ErrorAlert";
|
|
99
99
|
export * from "./components/Filter/FilterOptions";
|
|
100
100
|
export * from "./components/Filter/GlobalFilter";
|
|
101
|
-
export * from "./components/Form/
|
|
101
|
+
export * from "./components/Form/components/core/DefaultForm";
|
|
102
|
+
export * from "./components/Form/components/core/FormRoot";
|
|
103
|
+
export * from "./components/Form/components/core/FormTitle";
|
|
104
|
+
export * from "./components/Form/components/core/FormBody";
|
|
102
105
|
export * from "./components/Form/useForm";
|
|
103
106
|
export * from "./components/DatePicker/DatePicker";
|
|
104
107
|
export * from "./components/DatePicker/getMultiDates";
|