@ambuj.bhaskar/react-component-library 0.19.0-alpha → 0.19.2-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/assets/index.css +1 -1
- package/dist/index.cjs +232 -168
- package/dist/index.d.ts +224 -0
- package/dist/index.js +34587 -27550
- package/dist/index.umd.js +212 -148
- package/package.json +4 -3
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
|
/**
|
|
@@ -111,6 +211,94 @@ export declare type AwiAnnotationHotkeysProps = {
|
|
|
111
211
|
controlMinusHotkey?: () => void;
|
|
112
212
|
};
|
|
113
213
|
|
|
214
|
+
export declare const AwiAnnotationTools: React.FC<AwiAnnotationToolsProps>;
|
|
215
|
+
|
|
216
|
+
export declare type AwiAnnotationToolsProps = {
|
|
217
|
+
handleSelectTool?: (tool: "edit" | "annotate") => void;
|
|
218
|
+
handleSAMToggle?: (tool: "SAM" | "Normal") => void;
|
|
219
|
+
isEditing: boolean;
|
|
220
|
+
loggedUser: LoggedUser;
|
|
221
|
+
annotator_name: string;
|
|
222
|
+
hasAnnotation: boolean;
|
|
223
|
+
SAMToggleValue: boolean;
|
|
224
|
+
currentSelectedSAMTool: any;
|
|
225
|
+
handleCopyAnnotations: any;
|
|
226
|
+
setOpenRequestDetails?: (a: any) => void;
|
|
227
|
+
openRequestDetails: boolean;
|
|
228
|
+
show_guidelines_first: boolean;
|
|
229
|
+
handleZoomInClick: () => void;
|
|
230
|
+
zoomProperties: any;
|
|
231
|
+
handleReset: () => void;
|
|
232
|
+
handleZoomOutClick: () => void;
|
|
233
|
+
handleCompleteAnnotation: () => void;
|
|
234
|
+
toggleFullscreen: () => void;
|
|
235
|
+
selectAnnotationId?: any;
|
|
236
|
+
selectedAnnotationInfo?: any;
|
|
237
|
+
undoLastStateAnnotation: () => void;
|
|
238
|
+
usingSamFunction: boolean;
|
|
239
|
+
samAPIactive: boolean;
|
|
240
|
+
handleSendToSamFunction: () => void;
|
|
241
|
+
coordinates: any;
|
|
242
|
+
handleSendToSamFunctionPrompt: () => void;
|
|
243
|
+
reLoadAndReDrawAnnotations: () => void;
|
|
244
|
+
showGuidelinesFirst: boolean;
|
|
245
|
+
isMobile?: boolean;
|
|
246
|
+
toggleSelectAnnotation: () => void;
|
|
247
|
+
handleLeftKeyDown: () => void;
|
|
248
|
+
handleRightKeyDown: () => void;
|
|
249
|
+
handleUpKeyDown: () => void;
|
|
250
|
+
handleDownKeyDown: () => void;
|
|
251
|
+
undoAnnotationPoint: () => void;
|
|
252
|
+
togglePagination: () => void;
|
|
253
|
+
switchToEditMode?: () => void;
|
|
254
|
+
switchToCreateMode?: () => void;
|
|
255
|
+
goToNextImage?: () => void;
|
|
256
|
+
goToPreviousImage?: () => void;
|
|
257
|
+
handleGoToPendingAnnotations?: () => void;
|
|
258
|
+
handleCopyByCtrlC?: () => void;
|
|
259
|
+
handlePasteAnnotationsByControlV?: () => void;
|
|
260
|
+
showPagination?: boolean;
|
|
261
|
+
isControlViaToolPress: boolean;
|
|
262
|
+
isAltViaToolPress: boolean;
|
|
263
|
+
setIsControlViaToolPress: (boolean: any) => void;
|
|
264
|
+
setIsAltViaToolPress: (boolean: any) => void;
|
|
265
|
+
isCarousel: boolean;
|
|
266
|
+
allowedToCopyPreview: boolean;
|
|
267
|
+
classColorMapToSend?: any;
|
|
268
|
+
request: any;
|
|
269
|
+
parentReqData: any;
|
|
270
|
+
RequestInfoModal: any;
|
|
271
|
+
setCrossHair: (boolean: any) => void;
|
|
272
|
+
isCrossHair: boolean;
|
|
273
|
+
annotationViewType?: string;
|
|
274
|
+
REACT_APP_SAM_ENABLED?: string;
|
|
275
|
+
controlMinusHotkey?: () => void;
|
|
276
|
+
controlPlusHotkey?: () => void;
|
|
277
|
+
Carousel?: any;
|
|
278
|
+
};
|
|
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
|
+
|
|
114
302
|
export declare const AwiEmptyState: React.FC<AwiEmptyStateProps>;
|
|
115
303
|
|
|
116
304
|
export declare type AwiEmptyStateProps = {
|
|
@@ -539,6 +727,17 @@ export declare type ContactInputProps = {
|
|
|
539
727
|
dsabledColor?: Color;
|
|
540
728
|
};
|
|
541
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
|
+
|
|
542
741
|
export declare type CorrectedAnnotationType = "created" | "not-created" | "";
|
|
543
742
|
|
|
544
743
|
declare type CSSstring = string;
|
|
@@ -638,6 +837,8 @@ export declare type HeatmapProps = {
|
|
|
638
837
|
borderColor?: Color;
|
|
639
838
|
cellTextColor?: Color;
|
|
640
839
|
labelTextColor?: Color;
|
|
840
|
+
className?: string;
|
|
841
|
+
cellClassName?: string;
|
|
641
842
|
};
|
|
642
843
|
|
|
643
844
|
declare type HTMLButtonProps = ComponentProps<"button">;
|
|
@@ -778,6 +979,15 @@ export declare interface MiniData {
|
|
|
778
979
|
awi_creation?: Date;
|
|
779
980
|
}
|
|
780
981
|
|
|
982
|
+
export declare const MockImageGenerationHelper: {
|
|
983
|
+
HARDCODED_FALL_BACK_IMAGE: string;
|
|
984
|
+
HARDCODED_FALL_BACK_BIG_IMAGE: string;
|
|
985
|
+
DEFAULT_AVATAR_IMAGE: string;
|
|
986
|
+
generateImageUrl: (url: string | undefined | null, _serverLink?: boolean) => string;
|
|
987
|
+
getImageKitUrl: (url: string, _width?: number, _height?: number, _q?: number) => string;
|
|
988
|
+
getUserAvatar: (user: any) => string;
|
|
989
|
+
};
|
|
990
|
+
|
|
781
991
|
export declare const Modal: default_2.FC<ModalProps>;
|
|
782
992
|
|
|
783
993
|
export declare interface ModalButtonProps {
|
|
@@ -853,6 +1063,20 @@ declare type Point = {
|
|
|
853
1063
|
|
|
854
1064
|
declare type Polygon = Point[];
|
|
855
1065
|
|
|
1066
|
+
export declare type PostRequestBody = {
|
|
1067
|
+
img_url: string;
|
|
1068
|
+
coords: Coordinate[];
|
|
1069
|
+
coordinates?: any;
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
export declare type PostRequestPromptBody = {
|
|
1073
|
+
requestId: number;
|
|
1074
|
+
contents: Content[];
|
|
1075
|
+
confidence: number;
|
|
1076
|
+
modelName: string;
|
|
1077
|
+
modelMaxResults: number;
|
|
1078
|
+
};
|
|
1079
|
+
|
|
856
1080
|
export declare const Select: React.FC<SelectProps>;
|
|
857
1081
|
|
|
858
1082
|
export declare type SelectProps = {
|