@ambuj.bhaskar/react-component-library 0.18.18-alpha → 0.18.20-alpha

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 CHANGED
@@ -39,6 +39,90 @@ export declare type AnnotationAttributes = {
39
39
  };
40
40
  }[];
41
41
 
42
+ export declare const AnnotationComponentLibrary: React.FC<AnnotationComponentLibraryProps>;
43
+
44
+ declare type AnnotationComponentLibraryProps = {
45
+ imageUrl?: string;
46
+ showAnnotations?: boolean;
47
+ createAnnotation?: (coords: {
48
+ x: number;
49
+ y: number;
50
+ }[], classId: any, isSam: any, cb?: () => void) => void;
51
+ handleMultipleAnnotations?: (payload: any, cb?: () => void) => void;
52
+ handleUpdateAnnotationCoordinates?: (coords: {
53
+ x: number;
54
+ y: number;
55
+ }[], annotation_id: string, cb?: () => void) => void;
56
+ className?: string;
57
+ content_id?: string;
58
+ request_id?: number;
59
+ isEditing?: boolean;
60
+ handleSelectTool?: (tool: "edit" | "annotate") => void;
61
+ selectIndex?: string;
62
+ handleSelectAnnotationIndex?: (index: string, changeMode?: boolean) => void;
63
+ showAnnotationType?: ShowAnnotationStatus;
64
+ loggedUser?: any;
65
+ isCarousel?: boolean;
66
+ classColorMap?: any;
67
+ disableAnnotation?: boolean;
68
+ SAMToggle?: string;
69
+ handleSAMToggle?: (tool: "SAM" | "Normal") => void;
70
+ imageNumber?: number;
71
+ togglePagination?: (callback: (prev: boolean) => boolean) => void;
72
+ unSelectedAnnotationIDsSet?: Set<string>;
73
+ setMousePosition?: ({ x, y }: {
74
+ x: any;
75
+ y: any;
76
+ }) => void;
77
+ allowedToCopyPreview?: boolean;
78
+ copyCallBackHandler?: any;
79
+ annotationSession?: any;
80
+ SAMToggleValue?: any;
81
+ selectedSAMTool?: any;
82
+ handleCopyAnnotations?: (annotations: any, copyAll: any) => void;
83
+ setOpenRequestDetails?: (a: any) => void;
84
+ openRequestDetails?: any;
85
+ handleNextPage?: () => void;
86
+ handlePreviousPage?: () => void;
87
+ handleGoToPage?: (index: number) => void;
88
+ currentPage?: any;
89
+ handleUpdateImageIndex?: (index: number) => void;
90
+ requestId?: any;
91
+ showPagination?: any;
92
+ isAnnotationCreating?: any;
93
+ contentInfo?: any;
94
+ content_key?: any;
95
+ isAnnotationUpdating?: any;
96
+ isDeleteAnnotationMutationLoading?: any;
97
+ showGuidelinesFirst?: any;
98
+ currentImage?: number;
99
+ selectedContent?: any;
100
+ switchToEditMode?: () => void;
101
+ switchToCreateMode?: () => void;
102
+ goToNextImage?: () => void;
103
+ goToPreviousImage?: () => void;
104
+ handleGoToPendingAnnotations?: () => void;
105
+ handlePasteAnnotationsByControlV?: () => void;
106
+ annotationsResponse?: any;
107
+ isAnnotationFetching?: boolean;
108
+ fetchAnnotationsKey?: any;
109
+ request?: any;
110
+ parentReqData?: any;
111
+ clearAnnotationCache?: any;
112
+ RequestInfoModal?: any;
113
+ getAnnotationFromSAM?: (a: any) => any;
114
+ getAnnotationsFromSAMPrompt?: (a: any) => any;
115
+ fetchAnnotations?: any;
116
+ pageCount?: number;
117
+ annotationViewType?: string;
118
+ AnnotationPagination?: any;
119
+ REACT_APP_SAM_ENABLED?: string;
120
+ ImageGenerationHelper: any;
121
+ fallbackImageUrl?: string;
122
+ activeColor?: any;
123
+ Carousel?: any;
124
+ };
125
+
42
126
  export declare type AnnotationLibraryComponentProps = {
43
127
  title?: string;
44
128
  };
@@ -62,6 +146,22 @@ export declare const AWI_ALL_GLOBALS: {
62
146
  awi_label: string;
63
147
  value: string;
64
148
  }[];
149
+ INITIAL_ZOOM_PROPERTIES: {
150
+ scale: number;
151
+ x: number;
152
+ y: number;
153
+ };
154
+ INITIAL_ZOOM_LEVEL: number;
155
+ HOVER_TO_SELECT_ON_ALREADY_SELECTED: boolean;
156
+ DEFAULT_CANVAS_RATION: {
157
+ w: number;
158
+ h: number;
159
+ };
160
+ MAX_ANNOTATIONS_TO_HOVER: number;
161
+ TWO_PIE: number;
162
+ POLYGON_POINT_REMOVE_CONFIRM_PROMPT: boolean;
163
+ MAX_ANNOTATIONS_TO_RUN_FAST: number;
164
+ STATUS_COLOR_MAP: Record<string, string>;
65
165
  };
66
166
 
67
167
  /**
@@ -177,6 +277,28 @@ export declare type AwiAnnotationToolsProps = {
177
277
  Carousel?: any;
178
278
  };
179
279
 
280
+ export declare const AwiCanvasContainer: React.FC<AwiCanvasContainerProps>;
281
+
282
+ export declare type AwiCanvasContainerProps = {
283
+ title?: string;
284
+ canvasDimensions: any;
285
+ zoomProperties: any;
286
+ isEditing: any;
287
+ canvasRef: any;
288
+ bgCanvasRef: any;
289
+ overlayCanvasRef: any;
290
+ handleMouseDown: any;
291
+ handleMouseUp: any;
292
+ handleMouseMove: any;
293
+ handleMouseMoveOut: any;
294
+ handleOnMouseLeave: any;
295
+ handleWheel: any;
296
+ handleTouchStart: any;
297
+ handleTouchMove: any;
298
+ handleTouchEnd: any;
299
+ handleTouchCancel: any;
300
+ };
301
+
180
302
  export declare const AwiEmptyState: React.FC<AwiEmptyStateProps>;
181
303
 
182
304
  export declare type AwiEmptyStateProps = {
@@ -605,6 +727,17 @@ export declare type ContactInputProps = {
605
727
  dsabledColor?: Color;
606
728
  };
607
729
 
730
+ export declare type Content = {
731
+ url: string;
732
+ contentKey: string;
733
+ directPrompt: string;
734
+ };
735
+
736
+ export declare type Coordinate = {
737
+ x: number;
738
+ y: number;
739
+ };
740
+
608
741
  export declare type CorrectedAnnotationType = "created" | "not-created" | "";
609
742
 
610
743
  declare type CSSstring = string;
@@ -844,6 +977,15 @@ export declare interface MiniData {
844
977
  awi_creation?: Date;
845
978
  }
846
979
 
980
+ export declare const MockImageGenerationHelper: {
981
+ HARDCODED_FALL_BACK_IMAGE: string;
982
+ HARDCODED_FALL_BACK_BIG_IMAGE: string;
983
+ DEFAULT_AVATAR_IMAGE: string;
984
+ generateImageUrl: (url: string | undefined | null, _serverLink?: boolean) => string;
985
+ getImageKitUrl: (url: string, _width?: number, _height?: number, _q?: number) => string;
986
+ getUserAvatar: (user: any) => string;
987
+ };
988
+
847
989
  export declare const Modal: default_2.FC<ModalProps>;
848
990
 
849
991
  export declare interface ModalButtonProps {
@@ -919,6 +1061,20 @@ declare type Point = {
919
1061
 
920
1062
  declare type Polygon = Point[];
921
1063
 
1064
+ export declare type PostRequestBody = {
1065
+ img_url: string;
1066
+ coords: Coordinate[];
1067
+ coordinates?: any;
1068
+ };
1069
+
1070
+ export declare type PostRequestPromptBody = {
1071
+ requestId: number;
1072
+ contents: Content[];
1073
+ confidence: number;
1074
+ modelName: string;
1075
+ modelMaxResults: number;
1076
+ };
1077
+
922
1078
  export declare const Select: React.FC<SelectProps>;
923
1079
 
924
1080
  export declare type SelectProps = {