@ambuj.bhaskar/react-component-library 0.18.19-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
  /**
@@ -627,6 +727,17 @@ export declare type ContactInputProps = {
627
727
  dsabledColor?: Color;
628
728
  };
629
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
+
630
741
  export declare type CorrectedAnnotationType = "created" | "not-created" | "";
631
742
 
632
743
  declare type CSSstring = string;
@@ -866,6 +977,15 @@ export declare interface MiniData {
866
977
  awi_creation?: Date;
867
978
  }
868
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
+
869
989
  export declare const Modal: default_2.FC<ModalProps>;
870
990
 
871
991
  export declare interface ModalButtonProps {
@@ -941,6 +1061,20 @@ declare type Point = {
941
1061
 
942
1062
  declare type Polygon = Point[];
943
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
+
944
1078
  export declare const Select: React.FC<SelectProps>;
945
1079
 
946
1080
  export declare type SelectProps = {