@bsol-oss/react-datatable5 8.0.1 → 8.1.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 +10 -2
- package/dist/index.js +255 -274
- package/dist/index.mjs +250 -270
- package/dist/types/components/Form/Form.d.ts +2 -0
- package/dist/types/components/Form/SchemaFormContext.d.ts +4 -2
- package/dist/types/components/Form/components/IdViewer.d.ts +3 -1
- package/dist/types/components/Form/components/StringInputField.d.ts +8 -5
- package/dist/types/components/Form/useSchemaContext.d.ts +4 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ForeignKeyProps } from "@/components/Form/components/StringInputField";
|
|
1
2
|
import { JSONSchema7 } from "json-schema";
|
|
2
3
|
import { FieldValues, SubmitHandler } from "react-hook-form";
|
|
3
4
|
export interface DisplayTextProps {
|
|
@@ -34,5 +35,6 @@ export interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
34
35
|
display_column: string;
|
|
35
36
|
gridColumn: string;
|
|
36
37
|
gridRow: string;
|
|
38
|
+
foreign_key: ForeignKeyProps;
|
|
37
39
|
}
|
|
38
40
|
export declare const Form: <TData extends FieldValues>({ schema, serverUrl, order, ignore, onSubmit, preLoadedValues, rowNumber, displayText, }: FormProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { JSONSchema7 } from "json-schema";
|
|
2
|
+
import { Dispatch, SetStateAction } from "react";
|
|
3
3
|
import { FieldValues } from "react-hook-form";
|
|
4
4
|
import { DisplayTextProps } from "./Form";
|
|
5
5
|
export interface SchemaFormContext<TData extends FieldValues> {
|
|
@@ -7,8 +7,10 @@ export interface SchemaFormContext<TData extends FieldValues> {
|
|
|
7
7
|
serverUrl: string;
|
|
8
8
|
order: string[];
|
|
9
9
|
ignore: string[];
|
|
10
|
-
displayText: DisplayTextProps
|
|
10
|
+
displayText: Partial<DisplayTextProps>;
|
|
11
11
|
onSubmit?: (data: TData) => Promise<void>;
|
|
12
12
|
rowNumber?: number | string;
|
|
13
|
+
idMap: Record<string, object>;
|
|
14
|
+
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
13
15
|
}
|
|
14
16
|
export declare const SchemaFormContext: import("react").Context<SchemaFormContext<unknown>>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { DataListItemProps } from "@chakra-ui/react";
|
|
1
2
|
export interface IdViewerProps {
|
|
2
3
|
value: string | undefined;
|
|
3
4
|
column: string;
|
|
5
|
+
dataListItemProps?: DataListItemProps;
|
|
4
6
|
}
|
|
5
|
-
export declare const IdViewer: ({ value, column }: IdViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const IdViewer: ({ value, column, dataListItemProps, }: IdViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { JSONSchema7 } from "json-schema";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
export interface StringInputFieldProps {
|
|
3
4
|
column: string;
|
|
4
5
|
}
|
|
6
|
+
export interface ForeignKeyProps {
|
|
7
|
+
column: string;
|
|
8
|
+
table: string;
|
|
9
|
+
display_column: string;
|
|
10
|
+
}
|
|
5
11
|
export interface CustomJSONSchema7 extends JSONSchema7 {
|
|
6
12
|
gridColumn?: string;
|
|
7
13
|
gridRow?: string;
|
|
8
14
|
title?: string;
|
|
9
15
|
in_table?: string;
|
|
10
16
|
object_id_column?: string;
|
|
11
|
-
foreign_key?:
|
|
12
|
-
|
|
13
|
-
table?: string;
|
|
14
|
-
display_column: string;
|
|
15
|
-
};
|
|
17
|
+
foreign_key?: ForeignKeyProps;
|
|
18
|
+
renderDisplay: (item: unknown) => ReactNode;
|
|
16
19
|
}
|
|
17
20
|
export declare const StringInputField: ({ column }: StringInputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const useSchemaContext: () => {
|
|
2
3
|
schema: import("json-schema").JSONSchema7;
|
|
3
4
|
serverUrl: string;
|
|
4
5
|
order: string[];
|
|
5
6
|
ignore: string[];
|
|
6
7
|
onSubmit: ((data: unknown) => Promise<void>) | undefined;
|
|
7
|
-
preLoadedValues: any;
|
|
8
8
|
rowNumber: string | number | undefined;
|
|
9
|
-
displayText: import("./Form").DisplayTextProps
|
|
9
|
+
displayText: Partial<import("./Form").DisplayTextProps>;
|
|
10
|
+
idMap: Record<string, object>;
|
|
11
|
+
setIdMap: import("react").Dispatch<import("react").SetStateAction<Record<string, object>>>;
|
|
10
12
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -103,3 +103,4 @@ export * from "./components/DatePicker/DatePicker";
|
|
|
103
103
|
export * from "./components/DatePicker/getMultiDates";
|
|
104
104
|
export * from "./components/DatePicker/getRangeDates";
|
|
105
105
|
export * from "./components/DatePicker/RangeDatePicker";
|
|
106
|
+
export * from "./components/DataTable/components/RecordDisplay";
|