@abidibo/react-cam-roi 0.14.2 → 0.14.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.cjs.js +163 -117
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +163 -117
- package/dist/index.esm.js.map +1 -1
- package/dist/types/Components/RoiEditor/Hooks.d.ts +3 -1
- package/dist/types/Components/RoiEditor/ParametersModalForm/index.d.ts +2 -1
- package/dist/types/Components/RoiEditor/Utils.d.ts +3 -3
- package/dist/types/Utils/index.d.ts +1 -1
- package/package.json +1 -1
@@ -19,7 +19,7 @@ export declare const useCanvasSize: (imageUrl: string) => {
|
|
19
19
|
wrapperRef: import("react").RefObject<HTMLDivElement>;
|
20
20
|
isReady: boolean;
|
21
21
|
};
|
22
|
-
export declare const initCanvasData: (canvasRef: React.MutableRefObject<fabric.Canvas | null>,
|
22
|
+
export declare const initCanvasData: (canvasRef: React.MutableRefObject<fabric.Canvas | null>, canvasSize: {
|
23
23
|
width: number;
|
24
24
|
height: number;
|
25
25
|
}, addShapes: (shapes: {
|
@@ -35,4 +35,6 @@ export declare const useParametersForm: (parameters: OutputParameter[]) => {
|
|
35
35
|
setFields: import("react").Dispatch<import("react").SetStateAction<Record<string, unknown>>>;
|
36
36
|
errors: Record<string, string>;
|
37
37
|
setErrors: import("react").Dispatch<import("react").SetStateAction<Record<string, string>>>;
|
38
|
+
resetErrors: () => void;
|
39
|
+
reset: () => void;
|
38
40
|
};
|
@@ -2,7 +2,8 @@ import { ConfigurationParameter, OutputParameter, ShapeType } from '../Types';
|
|
2
2
|
export type ParametersModalFormProps = {
|
3
3
|
onClose: () => void;
|
4
4
|
title: string;
|
5
|
-
parameters
|
5
|
+
parameters?: ConfigurationParameter[];
|
6
|
+
rolesParameters?: Record<string, ConfigurationParameter[]>;
|
6
7
|
data: OutputParameter[];
|
7
8
|
onSubmit: (data: OutputParameter[], properties?: {
|
8
9
|
name: string;
|
@@ -4,9 +4,9 @@ export declare const notify: INotify;
|
|
4
4
|
export declare const enableRois: (configuration: Configuration) => boolean;
|
5
5
|
export declare const enableMainMetadata: (configuration: Configuration) => boolean;
|
6
6
|
export declare const canDrawShape: (configuration: Configuration, shapeType: Omit<ToolEnum, ToolEnum.Pointer>, shapes: Shapes, notify?: INotify, message?: string) => boolean;
|
7
|
-
export declare const validateParametersForm: (parameters: ConfigurationParameter[], fields: Record<string, unknown>, setErrors: (errors: Record<string, string>) => void,
|
7
|
+
export declare const validateParametersForm: (parameters: ConfigurationParameter[], fields: Record<string, unknown>, setErrors: (errors: Record<string, string>) => void, resetErrors: () => void) => boolean;
|
8
8
|
export declare const validate: (configuration: Configuration, presetName: string, shapes: Shapes, metadata: Metadata, strings: Record<string, string>) => [boolean, string[]];
|
9
|
-
export declare const fabricShapeToOutputShape: (shape: Shape, type: ShapeType,
|
9
|
+
export declare const fabricShapeToOutputShape: (shape: Shape, type: ShapeType, canvasSize: {
|
10
10
|
width: number;
|
11
11
|
height: number;
|
12
12
|
}) => {
|
@@ -50,7 +50,7 @@ export declare function getAbsoluteRectData(rect: fabric.Rect): {
|
|
50
50
|
x: number;
|
51
51
|
y: number;
|
52
52
|
}[];
|
53
|
-
export declare const fabricShapeToOutputCoords: (shape: Shape, type: ShapeType,
|
53
|
+
export declare const fabricShapeToOutputCoords: (shape: Shape, type: ShapeType, canvasSize: {
|
54
54
|
width: number;
|
55
55
|
height: number;
|
56
56
|
}) => {
|
@@ -4,5 +4,5 @@ export declare const humanize: (str: string) => string;
|
|
4
4
|
export declare const formatString: (str: string, placeholders: Record<string, string | number>) => string;
|
5
5
|
export declare const abs2Perc: (value: number, ref: number) => number;
|
6
6
|
export declare const perc2Abs: (value: number, ref: number) => number;
|
7
|
-
export declare const defaultTo: (dft:
|
7
|
+
export declare const defaultTo: <T>(dft: T) => (value: T | undefined | null) => T;
|
8
8
|
export declare const compose: (...fns: Function[]) => (x: any) => any;
|