@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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { JSONSchema7 } from "json-schema";
|
|
2
2
|
import { Dispatch, SetStateAction } from "react";
|
|
3
3
|
import { FieldValues } from "react-hook-form";
|
|
4
|
-
import {
|
|
4
|
+
import { UseTranslationResponse } from "react-i18next";
|
|
5
5
|
export interface SchemaFormContext<TData extends FieldValues> {
|
|
6
6
|
schema: JSONSchema7;
|
|
7
7
|
serverUrl: string;
|
|
8
8
|
order: string[];
|
|
9
9
|
ignore: string[];
|
|
10
|
-
displayText: Partial<DisplayTextProps>;
|
|
11
10
|
onSubmit?: (data: TData) => Promise<void>;
|
|
12
11
|
rowNumber?: number | string;
|
|
13
12
|
idMap: Record<string, object>;
|
|
14
13
|
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
14
|
+
translate: UseTranslationResponse<any, any>;
|
|
15
15
|
}
|
|
16
16
|
export declare const SchemaFormContext: import("react").Context<SchemaFormContext<unknown>>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { DataListItemProps } from "@chakra-ui/react";
|
|
2
1
|
export interface IdViewerProps {
|
|
3
2
|
value: string | undefined;
|
|
4
3
|
column: string;
|
|
5
|
-
dataListItemProps?: DataListItemProps;
|
|
6
4
|
}
|
|
7
|
-
export declare const IdViewer: ({ value, column
|
|
5
|
+
export declare const IdViewer: ({ value, column }: IdViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldValues } from "react-hook-form";
|
|
3
|
+
export interface UseFormProps {
|
|
4
|
+
preLoadedValues?: FieldValues | undefined;
|
|
5
|
+
keyPrefix?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const useForm: ({ preLoadedValues, keyPrefix }: UseFormProps) => {
|
|
8
|
+
form: import("react-hook-form").UseFormReturn<FieldValues, any, undefined>;
|
|
9
|
+
idMap: Record<string, object>;
|
|
10
|
+
setIdMap: import("react").Dispatch<import("react").SetStateAction<Record<string, object>>>;
|
|
11
|
+
translate: import("react-i18next").UseTranslationResponse<"", string>;
|
|
12
|
+
};
|
|
@@ -6,7 +6,7 @@ export declare const useSchemaContext: () => {
|
|
|
6
6
|
ignore: string[];
|
|
7
7
|
onSubmit: ((data: unknown) => Promise<void>) | undefined;
|
|
8
8
|
rowNumber: string | number | undefined;
|
|
9
|
-
displayText: Partial<import("./Form").DisplayTextProps>;
|
|
10
9
|
idMap: Record<string, object>;
|
|
11
10
|
setIdMap: import("react").Dispatch<import("react").SetStateAction<Record<string, object>>>;
|
|
11
|
+
translate: import("react-i18next").UseTranslationResponse<any, any>;
|
|
12
12
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HoverCard } from "@chakra-ui/react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface HoverCardContentProps extends HoverCard.ContentProps {
|
|
4
|
+
portalled?: boolean;
|
|
5
|
+
portalRef?: React.RefObject<HTMLElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare const HoverCardContent: React.ForwardRefExoticComponent<HoverCardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const HoverCardArrow: React.ForwardRefExoticComponent<HoverCard.ArrowProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const HoverCardRoot: React.FC<HoverCard.RootProps>;
|
|
10
|
+
export declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCard.TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export * from "./components/DataTable/components/ErrorAlert";
|
|
|
99
99
|
export * from "./components/Filter/FilterOptions";
|
|
100
100
|
export * from "./components/Filter/GlobalFilter";
|
|
101
101
|
export * from "./components/Form/Form";
|
|
102
|
+
export * from "./components/Form/useForm";
|
|
102
103
|
export * from "./components/DatePicker/DatePicker";
|
|
103
104
|
export * from "./components/DatePicker/getMultiDates";
|
|
104
105
|
export * from "./components/DatePicker/getRangeDates";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bsol-oss/react-datatable5",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"react-dom": "^19.0.0",
|
|
51
51
|
"react-hook-form": "^7.54.2",
|
|
52
52
|
"react-icons": "^5.4.0",
|
|
53
|
-
"tiny-invariant": "^1.3.3"
|
|
53
|
+
"tiny-invariant": "^1.3.3",
|
|
54
|
+
"react-i18next": "^15.4.1"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@chromatic-com/storybook": "^3.2.3",
|