@servantcdh/ez-planet-labeling 0.3.3 → 0.4.0
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 +830 -1239
- package/dist/index.js +18028 -3745
- package/package.json +15 -5
- package/dist/index-DDn_Fjhx.js +0 -788
- package/dist/style.css +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,1440 +1,1031 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fabric } from 'fabric';
|
|
3
|
-
import { FabricObject } from 'fabric';
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
4
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import { RefObject } from 'react';
|
|
6
5
|
import { StoreApi } from 'zustand';
|
|
7
|
-
import { TemporalState } from 'zundo';
|
|
8
6
|
import { UseBoundStore } from 'zustand';
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
style: AnnotationStyle;
|
|
16
|
-
geometry: AnnotationGeometry | null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export declare type AnnotationGeometry = BoxGeometry | SegmentationGeometry | PolygonGeometry | BrushGeometry | RecognitionGeometry;
|
|
20
|
-
|
|
21
|
-
export declare interface AnnotationLabel {
|
|
22
|
-
name: string;
|
|
23
|
-
index: number;
|
|
24
|
-
}
|
|
8
|
+
/**
|
|
9
|
+
* Add fabric objects to the canvas.
|
|
10
|
+
* Extensions call this to render results (polygons, boxes, etc.).
|
|
11
|
+
*/
|
|
12
|
+
export declare function addCanvasObjects(objects: unknown[]): void;
|
|
25
13
|
|
|
26
|
-
export declare interface
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
lineWidth?: number;
|
|
31
|
-
zIndex?: number;
|
|
14
|
+
export declare interface ApiResponse<T> {
|
|
15
|
+
code?: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
data: T;
|
|
32
18
|
}
|
|
33
19
|
|
|
34
20
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
21
|
+
* AsyncData<T> — a lightweight wrapper that mirrors the surface of
|
|
22
|
+
* react-query's UseQueryResult so that consumer components need zero
|
|
23
|
+
* changes when we swap the data source from react-query to host-provided
|
|
24
|
+
* context.
|
|
37
25
|
*/
|
|
38
|
-
export declare
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}[];
|
|
47
|
-
|
|
48
|
-
export declare const basicColors: string[];
|
|
49
|
-
|
|
50
|
-
export declare const blankRectTool: () => LabelingTool;
|
|
51
|
-
|
|
52
|
-
export declare interface BoxGeometry {
|
|
53
|
-
type: 'box';
|
|
54
|
-
/** Normalized coordinates (0~1 ratio, image-size independent) */
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
width: number;
|
|
58
|
-
height: number;
|
|
26
|
+
export declare interface AsyncData<T> {
|
|
27
|
+
data: T | undefined;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
isFetching: boolean;
|
|
30
|
+
isError: boolean;
|
|
31
|
+
error: unknown;
|
|
32
|
+
refetch: () => void;
|
|
33
|
+
dataUpdatedAt: number;
|
|
59
34
|
}
|
|
60
35
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
36
|
+
declare interface Attribute {
|
|
37
|
+
name: string;
|
|
38
|
+
attributeType: "SELECT" | "CHECKBOX" | "TEXT";
|
|
39
|
+
values: string[];
|
|
40
|
+
placeholder?: string;
|
|
65
41
|
}
|
|
66
42
|
|
|
67
|
-
declare interface
|
|
68
|
-
|
|
69
|
-
|
|
43
|
+
export declare interface AttributeValue {
|
|
44
|
+
attributeType?: LabelAttributeType;
|
|
45
|
+
name?: string;
|
|
46
|
+
values?: string[];
|
|
70
47
|
}
|
|
71
48
|
|
|
72
|
-
declare interface
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
lineWidth: number;
|
|
82
|
-
}) => void;
|
|
49
|
+
declare interface AutoLabelingInfo {
|
|
50
|
+
modelId?: string;
|
|
51
|
+
externalModelId?: string;
|
|
52
|
+
scores?: Score[];
|
|
53
|
+
transactionId?: string;
|
|
54
|
+
containerId?: string;
|
|
55
|
+
status?: string;
|
|
56
|
+
inferenceType?: string;
|
|
57
|
+
threshold?: number;
|
|
83
58
|
}
|
|
84
59
|
|
|
85
|
-
|
|
60
|
+
declare function Badge({ title, size, style }: BagdeType): JSX_2.Element;
|
|
86
61
|
|
|
87
|
-
|
|
88
|
-
type: 'add';
|
|
89
|
-
annotation: Annotation;
|
|
90
|
-
} | {
|
|
91
|
-
type: 'update';
|
|
92
|
-
annotation: Annotation;
|
|
93
|
-
prev: Annotation;
|
|
94
|
-
} | {
|
|
95
|
-
type: 'delete';
|
|
96
|
-
id: string;
|
|
97
|
-
} | {
|
|
98
|
-
type: 'batch';
|
|
99
|
-
added: Annotation[];
|
|
100
|
-
updated: Annotation[];
|
|
101
|
-
deleted: string[];
|
|
102
|
-
};
|
|
62
|
+
declare type BadgeStyle = ComponentProps<typeof Badge>["style"];
|
|
103
63
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
64
|
+
declare interface BagdeType extends UIType {
|
|
65
|
+
title: string;
|
|
66
|
+
style?: "primary" | "secondary" | "accent" | "primary-light" | "secondary-light" | "accent-light" | "blue";
|
|
107
67
|
}
|
|
108
68
|
|
|
109
|
-
declare interface
|
|
110
|
-
|
|
111
|
-
|
|
69
|
+
declare interface BaseInfoDTO {
|
|
70
|
+
contentSize?: number;
|
|
71
|
+
contentType?: string;
|
|
72
|
+
fileFormat?: string[];
|
|
73
|
+
isRequired?: boolean;
|
|
74
|
+
isPreset?: boolean;
|
|
75
|
+
isVisible?: boolean;
|
|
76
|
+
schemaId?: string;
|
|
77
|
+
schemaName?: string;
|
|
112
78
|
}
|
|
113
79
|
|
|
114
|
-
declare interface
|
|
115
|
-
|
|
116
|
-
|
|
80
|
+
declare interface BatchUpdateSummary {
|
|
81
|
+
deletedCount?: number;
|
|
82
|
+
insertedCount?: number;
|
|
83
|
+
updatedCount?: number;
|
|
84
|
+
totalProcessed?: number;
|
|
117
85
|
}
|
|
118
86
|
|
|
119
|
-
declare interface
|
|
120
|
-
|
|
121
|
-
|
|
87
|
+
export declare interface BoxValue {
|
|
88
|
+
className?: string;
|
|
89
|
+
classIndex?: number;
|
|
90
|
+
coord?: number[];
|
|
91
|
+
color?: string;
|
|
92
|
+
lineColor?: string;
|
|
93
|
+
opacity?: number;
|
|
94
|
+
zindex?: number;
|
|
122
95
|
}
|
|
123
96
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
y: number;
|
|
127
|
-
shiftKey: boolean;
|
|
128
|
-
ctrlKey: boolean;
|
|
129
|
-
altKey: boolean;
|
|
97
|
+
declare interface BulkLabelCreateRequest {
|
|
98
|
+
labels: LabelInsertData[];
|
|
130
99
|
}
|
|
131
100
|
|
|
132
|
-
declare interface
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
image: {
|
|
136
|
-
width: number;
|
|
137
|
-
height: number;
|
|
138
|
-
};
|
|
101
|
+
declare interface BulkLabelCreateResponse {
|
|
102
|
+
labelContextId: string;
|
|
103
|
+
createdLabels: LabelResponse[];
|
|
139
104
|
}
|
|
140
|
-
export { CanvasState_2 as CanvasState }
|
|
141
105
|
|
|
142
|
-
|
|
143
|
-
* Convert all canvas objects to Annotations.
|
|
144
|
-
*/
|
|
145
|
-
export declare const canvasToAnnotations: (objects: LabeledFabricObject[], imageWidth: number, imageHeight: number) => Promise<Annotation[]>;
|
|
106
|
+
declare type ChartPivotMode = (typeof WORKSPACE_CHART_PIVOT_MODE)[keyof typeof WORKSPACE_CHART_PIVOT_MODE];
|
|
146
107
|
|
|
147
|
-
declare interface
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
classIndex: number;
|
|
152
|
-
className: string;
|
|
153
|
-
labelValue: unknown;
|
|
154
|
-
attributeValues?: Record<string, unknown>;
|
|
108
|
+
export declare interface ChartValue {
|
|
109
|
+
className?: string;
|
|
110
|
+
classIndex?: number;
|
|
111
|
+
columnName?: string;
|
|
155
112
|
color?: string;
|
|
156
113
|
opacity?: number;
|
|
114
|
+
zindex?: number;
|
|
157
115
|
}
|
|
158
116
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
export declare const createImage: (src: string) => Promise<HTMLImageElement>;
|
|
163
|
-
|
|
164
|
-
export declare const createTemporalHistoryStore: <T>() => UseBoundStore<Omit<StoreApi<TemporalHistoryState<T>>, "temporal"> & {
|
|
165
|
-
temporal: StoreApi<TemporalState< {
|
|
166
|
-
snapshot: T | null;
|
|
167
|
-
}>>;
|
|
168
|
-
}>;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Crop image data to the bounding box of non-transparent pixels.
|
|
172
|
-
*/
|
|
173
|
-
export declare const cropAlphaArea: (imgData: ImageData) => {
|
|
174
|
-
canvas: HTMLCanvasElement;
|
|
175
|
-
minX: number;
|
|
176
|
-
minY: number;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export declare const emitLabelEvent: (action: LabelEventType, data?: LabelEventData) => void;
|
|
180
|
-
|
|
181
|
-
export declare const ensureCanvas: () => FabricCanvas;
|
|
182
|
-
|
|
183
|
-
export declare const eraserTool: () => LabelingTool;
|
|
184
|
-
|
|
185
|
-
export declare const EXCEPTION_TOOLS: string[];
|
|
186
|
-
|
|
187
|
-
export declare const EXPORT_PROPS: string[];
|
|
188
|
-
|
|
189
|
-
export declare interface ExtensionContext {
|
|
190
|
-
image: {
|
|
191
|
-
url: string;
|
|
192
|
-
width: number;
|
|
193
|
-
height: number;
|
|
194
|
-
};
|
|
195
|
-
annotations: Annotation[];
|
|
196
|
-
selectedIds: string[];
|
|
197
|
-
activeTool: string;
|
|
198
|
-
addAnnotations: (annotations: Annotation[]) => void;
|
|
199
|
-
updateAnnotation: (id: string, annotation: Partial<Annotation>) => void;
|
|
200
|
-
removeAnnotations: (ids: string[]) => void;
|
|
201
|
-
setTool: (tool: string) => void;
|
|
202
|
-
canvas: {
|
|
203
|
-
toJSON: () => object;
|
|
204
|
-
getImageDataURL: () => string;
|
|
205
|
-
};
|
|
117
|
+
export declare interface ClassificationValue {
|
|
118
|
+
classIndex?: number;
|
|
119
|
+
className?: string;
|
|
206
120
|
}
|
|
207
121
|
|
|
208
|
-
declare
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
122
|
+
declare interface ContentDTO {
|
|
123
|
+
accountId?: string;
|
|
124
|
+
contents?: Record<string, Array<Record<string, unknown>>>;
|
|
125
|
+
contentSetId?: string;
|
|
126
|
+
createdBy?: string;
|
|
127
|
+
createdDate?: string;
|
|
128
|
+
createdId?: string;
|
|
129
|
+
datasetId?: string;
|
|
130
|
+
id?: string;
|
|
131
|
+
modifiedBy?: string;
|
|
132
|
+
modifiedDate?: string;
|
|
133
|
+
modifiedId?: string;
|
|
134
|
+
orgId?: string;
|
|
135
|
+
summary?: Record<string, number>;
|
|
136
|
+
transactionId?: string;
|
|
137
|
+
version?: string | null;
|
|
138
|
+
zoneId?: string;
|
|
222
139
|
}
|
|
223
140
|
|
|
224
|
-
export declare interface
|
|
225
|
-
file: File;
|
|
226
|
-
policyId: string;
|
|
141
|
+
export declare interface ContentsetStatus {
|
|
227
142
|
contentSetId: string;
|
|
228
|
-
|
|
143
|
+
totalCount?: number;
|
|
144
|
+
contentSetStatus?: ContentsetStatusState[];
|
|
145
|
+
contentsetStatus?: "NONE" | ContentsetStatusState;
|
|
146
|
+
schemas?: SchemaStatus[];
|
|
147
|
+
elements?: ElementStatus[];
|
|
229
148
|
}
|
|
230
149
|
|
|
231
|
-
export declare
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
* e.g. formatShortcutTitle("Selection", "v") → "Selection (V)"
|
|
236
|
-
*/
|
|
237
|
-
export declare function formatShortcutTitle(title: string, shortcutKey: string): string;
|
|
238
|
-
|
|
239
|
-
export declare const getActiveLabeledObjects: (targetCanvas?: FabricCanvas) => LabeledFabricObject[];
|
|
240
|
-
|
|
241
|
-
export declare const getCanvasInstance: () => FabricCanvas;
|
|
242
|
-
|
|
243
|
-
export declare const getCanvasJSON: (targetCanvas?: FabricCanvas) => CanvasJSON;
|
|
244
|
-
|
|
245
|
-
export declare const getImageToolStore: () => ImageToolState;
|
|
246
|
-
|
|
247
|
-
export declare const getLabeledObjects: (targetCanvas?: FabricCanvas) => LabeledFabricObject[];
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Normalize keyboard event to a shortcut key string.
|
|
251
|
-
* Handles special cases like backslash.
|
|
252
|
-
*/
|
|
253
|
-
export declare function getLabelingShortcutKey(event: KeyboardEvent): string;
|
|
254
|
-
|
|
255
|
-
export declare const getToolSelectionStore: () => ToolSelectionState;
|
|
256
|
-
|
|
257
|
-
export declare const getViewModeStore: () => ViewModeState;
|
|
258
|
-
|
|
259
|
-
declare type IconSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
260
|
-
|
|
261
|
-
declare interface ImageToolState {
|
|
262
|
-
tool: LabelingTool | null;
|
|
263
|
-
setTool: (tool: LabelingTool | null) => void;
|
|
264
|
-
overedUniques: string[];
|
|
265
|
-
setOveredUniques: (overedUniques: string[]) => void;
|
|
266
|
-
undoStack: string[];
|
|
267
|
-
redoStack: string[];
|
|
268
|
-
setUndoStack: (undoStack: string[]) => void;
|
|
269
|
-
setRedoStack: (redoStack: string[]) => void;
|
|
270
|
-
toolHistory: string[];
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
declare interface IssuePanelState {
|
|
274
|
-
isOpen: boolean;
|
|
275
|
-
open: () => void;
|
|
276
|
-
close: () => void;
|
|
277
|
-
toggle: () => void;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
declare interface KeyboardShortcutsConfig {
|
|
281
|
-
viewMode: WorkspaceViewMode;
|
|
282
|
-
isValidationMode: boolean;
|
|
283
|
-
setTool: (toolType: ToolType) => void;
|
|
284
|
-
onUndo?: () => void;
|
|
285
|
-
onRedo?: () => void;
|
|
286
|
-
disabled?: boolean;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
declare interface LabelBatchState {
|
|
290
|
-
classificationLabels: ClassificationLabelEntry[];
|
|
291
|
-
classificationDeletedIds: string[];
|
|
292
|
-
inserts: LabelInsertData[];
|
|
293
|
-
updates: LabelUpdateData[];
|
|
294
|
-
deletes: LabelDeleteData[];
|
|
295
|
-
labelDataRevision: number;
|
|
296
|
-
addClassificationLabel: (label: ClassificationLabelEntry) => void;
|
|
297
|
-
removeClassificationLabel: (tempId: string) => void;
|
|
298
|
-
removeClassificationLabelById: (labelId: string) => void;
|
|
299
|
-
clearTemporaryClassificationLabels: () => void;
|
|
300
|
-
clearPendingChanges: () => void;
|
|
301
|
-
hasPendingChanges: () => boolean;
|
|
302
|
-
bumpLabelDataRevision: () => void;
|
|
303
|
-
reset: () => void;
|
|
150
|
+
export declare interface ContentsetStatusResponse {
|
|
151
|
+
labelContextId: string;
|
|
152
|
+
datasetId: string;
|
|
153
|
+
contentSets: ContentsetStatus[];
|
|
304
154
|
}
|
|
305
155
|
|
|
306
|
-
export declare
|
|
307
|
-
id: string;
|
|
308
|
-
}
|
|
156
|
+
export declare type ContentsetStatusState = "IN_LABELING" | "COMPLETED" | "VALIDATION_COMPLETED" | "VALIDATION_ERROR";
|
|
309
157
|
|
|
310
|
-
declare interface
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
alpha?: string;
|
|
315
|
-
selected?: boolean;
|
|
316
|
-
class?: string;
|
|
317
|
-
added?: boolean;
|
|
318
|
-
index?: number;
|
|
319
|
-
seq?: number;
|
|
320
|
-
copied?: boolean;
|
|
321
|
-
combinded?: boolean;
|
|
322
|
-
labeler?: string;
|
|
323
|
-
undo?: boolean;
|
|
324
|
-
redo?: boolean;
|
|
325
|
-
passStack?: boolean;
|
|
326
|
-
replaced?: boolean;
|
|
327
|
-
removed?: boolean;
|
|
328
|
-
trueLeft?: number;
|
|
329
|
-
trueTop?: number;
|
|
330
|
-
toHex?: string;
|
|
331
|
-
eraser?: unknown;
|
|
332
|
-
labelType?: string;
|
|
333
|
-
labelPayload?: Record<string, unknown>;
|
|
334
|
-
_objects?: LabeledFabricObject[];
|
|
335
|
-
labelInsertData?: Record<string, unknown>;
|
|
336
|
-
[key: string]: unknown;
|
|
158
|
+
declare interface CustomPageWrapper<TItem, TFilter = unknown> {
|
|
159
|
+
list: TItem[];
|
|
160
|
+
totalCount: number;
|
|
161
|
+
filter: TFilter;
|
|
337
162
|
}
|
|
338
163
|
|
|
339
|
-
declare interface
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
objects?: LabeledFabricObject[];
|
|
344
|
-
info?: string;
|
|
345
|
-
canvasJSON?: CanvasExportJSON;
|
|
346
|
-
seq?: Array<{
|
|
347
|
-
unique: string;
|
|
348
|
-
seq: number;
|
|
349
|
-
}>;
|
|
350
|
-
callback?: (json: CanvasExportJSON | string) => void;
|
|
351
|
-
direction?: ZoomPayload['direction'];
|
|
352
|
-
level?: number;
|
|
353
|
-
onChange?: ZoomPayload['onChange'];
|
|
354
|
-
class?: string;
|
|
355
|
-
hex?: string;
|
|
356
|
-
opacity?: number;
|
|
357
|
-
onDone?: () => void;
|
|
358
|
-
imageWidth?: number;
|
|
359
|
-
imageHeight?: number;
|
|
360
|
-
action?: string;
|
|
361
|
-
point?: {
|
|
362
|
-
x: number;
|
|
363
|
-
y: number;
|
|
364
|
-
};
|
|
365
|
-
labelInsertData?: Record<string, unknown>;
|
|
366
|
-
[key: string]: unknown;
|
|
164
|
+
export declare interface DatasetApiResponse<T> {
|
|
165
|
+
code: number;
|
|
166
|
+
message: string;
|
|
167
|
+
data: T;
|
|
367
168
|
}
|
|
368
169
|
|
|
369
|
-
declare type
|
|
370
|
-
|
|
371
|
-
declare type LabelEventType = 'load' | 'selected' | 'deleted' | 'zoom' | 'copy' | 'paste' | 'deleteSelected' | 'selectAll' | 'reset' | 'combine' | 'seq' | 'addClass' | 'deleteObjectsOfTool' | 'addObjects' | 'deselectAll' | 'undo' | 'redo' | 'changed' | 'blur' | 'focus' | 'init';
|
|
170
|
+
export declare type DatasetContentRecord = ContentDTO;
|
|
372
171
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
readonly selection: "v";
|
|
379
|
-
readonly layerToggle: "\\";
|
|
380
|
-
readonly navigationToggle: "g";
|
|
381
|
-
};
|
|
382
|
-
readonly image: {
|
|
383
|
-
readonly boundingBox: "u";
|
|
384
|
-
readonly pen: "p";
|
|
385
|
-
readonly brush: "b";
|
|
386
|
-
readonly magicBrush: "w";
|
|
387
|
-
readonly superpixel: "x";
|
|
388
|
-
readonly eraser: "e";
|
|
389
|
-
};
|
|
390
|
-
readonly text: {
|
|
391
|
-
readonly highlighting: "h";
|
|
392
|
-
readonly autoHighlight: "a";
|
|
393
|
-
};
|
|
394
|
-
readonly number: {
|
|
395
|
-
readonly highlighting: "h";
|
|
396
|
-
};
|
|
397
|
-
readonly validation: {
|
|
398
|
-
readonly rangeSelection: "s";
|
|
399
|
-
readonly issue: "i";
|
|
400
|
-
};
|
|
401
|
-
};
|
|
172
|
+
export declare interface DatasetContentSearchResponse {
|
|
173
|
+
filter?: Record<string, unknown>;
|
|
174
|
+
list: DatasetContentRecord[];
|
|
175
|
+
totalCount: number;
|
|
176
|
+
}
|
|
402
177
|
|
|
403
|
-
|
|
178
|
+
declare type DatasetContentType = "IMAGE" | "CSV" | "TABLE" | "PDF" | "WORD" | "TABULAR" | "CUSTOM" | (string & {});
|
|
404
179
|
|
|
405
|
-
declare
|
|
406
|
-
image: string | {
|
|
407
|
-
url: string;
|
|
408
|
-
width: number;
|
|
409
|
-
height: number;
|
|
410
|
-
};
|
|
411
|
-
annotations: Annotation[];
|
|
412
|
-
onChange?: (event: CanvasChangeEvent) => void;
|
|
413
|
-
readOnly?: boolean;
|
|
414
|
-
width?: number;
|
|
415
|
-
height?: number;
|
|
416
|
-
}
|
|
180
|
+
declare type DatasetContentVersion = string | null | undefined;
|
|
417
181
|
|
|
418
|
-
export declare interface
|
|
182
|
+
export declare interface DatasetDTO {
|
|
419
183
|
id: string;
|
|
184
|
+
orgId: string;
|
|
185
|
+
zoneId: string;
|
|
186
|
+
accountId: string;
|
|
187
|
+
exist: boolean;
|
|
420
188
|
name: string;
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
189
|
+
latestVersion: string;
|
|
190
|
+
currentVersion: string | null;
|
|
191
|
+
records: string;
|
|
192
|
+
versionList: VersionDTO[];
|
|
193
|
+
isLock: boolean;
|
|
194
|
+
isEditing: boolean;
|
|
195
|
+
isArchMode: boolean;
|
|
196
|
+
tags: string[];
|
|
197
|
+
schema?: SchemaItemDTO[];
|
|
198
|
+
importTransactionId?: string;
|
|
199
|
+
createdId: string;
|
|
200
|
+
createdBy: string;
|
|
201
|
+
createdDate: string;
|
|
202
|
+
modifiedId: string;
|
|
203
|
+
modifiedBy: string;
|
|
204
|
+
modifiedDate: string;
|
|
205
|
+
schemaTypes: DatasetContentType[];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
declare interface DetailTableCellSelection {
|
|
209
|
+
rowIndex: number;
|
|
210
|
+
columnId: string;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare interface DetailTableRow {
|
|
214
|
+
[key: string]: string | undefined;
|
|
215
|
+
elementId?: string;
|
|
424
216
|
}
|
|
425
217
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
onViewModeChange: (mode: WorkspaceViewMode) => void;
|
|
436
|
-
availableViewModes: WorkspaceViewMode[];
|
|
437
|
-
textContent?: TextContent;
|
|
438
|
-
numberContent?: NumberContent;
|
|
439
|
-
fileContent?: FileContent;
|
|
440
|
-
records: WorkspaceRecord[];
|
|
441
|
-
activeRecordId: string;
|
|
442
|
-
onRecordSelect: (record: WorkspaceRecord) => void;
|
|
443
|
-
classes: LabelingClass[];
|
|
444
|
-
policies: LabelingPolicy[];
|
|
445
|
-
onClassSelect?: (cls: LabelingClass) => void;
|
|
446
|
-
selectedClassId: string | null;
|
|
447
|
-
setSelectedClassId: (id: string | null) => void;
|
|
448
|
-
selectedAnnotationId: string | null;
|
|
449
|
-
setSelectedAnnotationId: (id: string | null) => void;
|
|
450
|
-
onSave: (payload: SavePayload) => void | Promise<void>;
|
|
451
|
-
onSaveToRecord?: () => void;
|
|
452
|
-
onFileUpload?: (file: File) => void;
|
|
453
|
-
isSaving: boolean;
|
|
454
|
-
onNavigateLeft?: () => void;
|
|
455
|
-
onNavigateRight?: () => void;
|
|
456
|
-
canNavigateLeft: boolean;
|
|
457
|
-
canNavigateRight: boolean;
|
|
458
|
-
mode: WorkspaceMode;
|
|
459
|
-
onModeChange?: (mode: WorkspaceMode) => void;
|
|
460
|
-
validationResults: ValidationResult[];
|
|
461
|
-
indicator?: WorkspaceIndicator;
|
|
462
|
-
extensions: LabelingExtension[];
|
|
463
|
-
tools: ToolType[];
|
|
464
|
-
theme?: Partial<LabelingTheme>;
|
|
465
|
-
layout: WorkspaceLayout;
|
|
466
|
-
navDirection: 'horizontal' | 'vertical';
|
|
467
|
-
setNavDirection: (dir: 'horizontal' | 'vertical') => void;
|
|
468
|
-
navVisible: boolean;
|
|
469
|
-
setNavVisible: (visible: boolean) => void;
|
|
218
|
+
declare interface ElementStatus {
|
|
219
|
+
elementId?: string;
|
|
220
|
+
inLabeling?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* New spec (OAS): elementStatus 배열로 상태를 내려줌
|
|
223
|
+
* - IN_LABELING / VALIDATION_ERROR / VALIDATION_COMPLETED
|
|
224
|
+
*/
|
|
225
|
+
elementStatus?: ContentsetStatusState[];
|
|
226
|
+
policyStatuses?: PolicyLabelStatus[];
|
|
470
227
|
}
|
|
471
228
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
slot: 'tool' | 'sidePanel' | 'toolbar';
|
|
475
|
-
render: (context: ExtensionContext) => ReactNode;
|
|
476
|
-
}
|
|
229
|
+
/** An error-state placeholder. */
|
|
230
|
+
export declare function errorData<T>(error: unknown): AsyncData<T>;
|
|
477
231
|
|
|
478
232
|
/**
|
|
479
|
-
*
|
|
480
|
-
*
|
|
233
|
+
* Context object passed to every extension render function, giving it
|
|
234
|
+
* access to the current workspace state and canvas interaction.
|
|
481
235
|
*/
|
|
482
|
-
export declare
|
|
236
|
+
export declare interface ExtensionRenderContext {
|
|
237
|
+
/** Currently selected content-set ID (null when nothing is selected). */
|
|
238
|
+
contentSetId: string | null;
|
|
239
|
+
/** Active label context ID. */
|
|
240
|
+
labelContextId: string | null;
|
|
241
|
+
/** Policy IDs used in the current labeling context. */
|
|
242
|
+
policyIds: string[];
|
|
243
|
+
/** Dataset ID. */
|
|
244
|
+
datasetId: string;
|
|
245
|
+
/** Dataset version. */
|
|
246
|
+
datasetVersion: string;
|
|
247
|
+
/**
|
|
248
|
+
* Call this after a mutation succeeds so the host can invalidate /
|
|
249
|
+
* refetch the appropriate caches.
|
|
250
|
+
*/
|
|
251
|
+
requestDataRefresh: (hint: MutationSuccessHint) => void;
|
|
252
|
+
/** Ref to the fabric.Canvas instance (null when no image is loaded). */
|
|
253
|
+
canvasRef: RefObject<unknown | null>;
|
|
254
|
+
/** Current image dimensions and URL (null when no image is loaded). */
|
|
255
|
+
imageInfo: WorkspaceImageInfo | null;
|
|
256
|
+
/** Add fabric objects to the canvas. */
|
|
257
|
+
addCanvasObjects: (objects: unknown[]) => void;
|
|
258
|
+
/** Remove fabric objects matching a predicate from the canvas. */
|
|
259
|
+
removeCanvasObjects: (predicate: (obj: unknown) => boolean) => void;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
declare interface FileLabelUploadRequest {
|
|
263
|
+
file: File;
|
|
264
|
+
contentSetId?: string;
|
|
265
|
+
elementId?: string;
|
|
266
|
+
policyId: string;
|
|
267
|
+
schemaName?: string;
|
|
268
|
+
}
|
|
483
269
|
|
|
484
|
-
declare interface
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
270
|
+
export declare interface FileLabelUploadVariables {
|
|
271
|
+
labelContextId?: string | null;
|
|
272
|
+
labelContextRequest?: LabelContextCreateRequest;
|
|
273
|
+
body: FileLabelUploadRequest;
|
|
488
274
|
}
|
|
489
275
|
|
|
490
|
-
export declare
|
|
276
|
+
export declare interface FileValue {
|
|
277
|
+
bucket?: string;
|
|
278
|
+
objectName?: string;
|
|
279
|
+
endpoint?: string;
|
|
280
|
+
fileName?: string;
|
|
281
|
+
[key: string]: unknown;
|
|
282
|
+
}
|
|
491
283
|
|
|
492
|
-
declare interface
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
children?: ReactNode;
|
|
284
|
+
declare interface FilterState {
|
|
285
|
+
filter: Record<string, unknown>;
|
|
286
|
+
setFilter: (patch: Record<string, unknown>) => void;
|
|
287
|
+
resetFilter: () => void;
|
|
497
288
|
}
|
|
498
289
|
|
|
499
|
-
export declare
|
|
290
|
+
export declare const getCanvasInstance: () => any;
|
|
500
291
|
|
|
501
|
-
|
|
292
|
+
/** Idle mutation state (not pending, no error). */
|
|
293
|
+
export declare const IDLE_MUTATION: MutationState;
|
|
502
294
|
|
|
503
|
-
declare interface
|
|
504
|
-
|
|
505
|
-
size?: IconSize;
|
|
506
|
-
className?: string;
|
|
507
|
-
style?: React.CSSProperties;
|
|
295
|
+
declare interface InLabelingStatusResponse {
|
|
296
|
+
inLabeling: boolean;
|
|
508
297
|
}
|
|
509
298
|
|
|
510
|
-
export declare
|
|
299
|
+
export declare type LabelAttributeType = "SELECT" | "CHECKBOX" | "TEXT";
|
|
511
300
|
|
|
512
|
-
declare interface
|
|
513
|
-
|
|
301
|
+
export declare interface LabelBatchUpdateRequest {
|
|
302
|
+
deletes?: LabelDeleteData[];
|
|
303
|
+
inserts?: LabelInsertData[];
|
|
304
|
+
updates?: LabelUpdateData[];
|
|
514
305
|
}
|
|
515
306
|
|
|
516
|
-
export declare
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
selectedAnnotationId?: string | null;
|
|
522
|
-
onClassSelect?: (cls: LabelingClass) => void;
|
|
523
|
-
onAnnotationSelect?: (annotation: Annotation) => void;
|
|
524
|
-
onAnnotationDelete?: (annotationId: string) => void;
|
|
525
|
-
disabled?: boolean;
|
|
307
|
+
export declare interface LabelBatchUpdateResponse {
|
|
308
|
+
deletedIds?: string[];
|
|
309
|
+
insertedLabels?: LabelResponse[];
|
|
310
|
+
updatedLabels?: LabelResponse[];
|
|
311
|
+
summary?: BatchUpdateSummary;
|
|
526
312
|
}
|
|
527
313
|
|
|
528
|
-
export declare
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
selectedAnnotationId?: string | null;
|
|
534
|
-
onAnnotationSelect?: (annotation: Annotation) => void;
|
|
535
|
-
onValidate?: (event: ValidateEvent) => void | Promise<void>;
|
|
536
|
-
onValidationUpdate?: (event: ValidationUpdateEvent) => void | Promise<void>;
|
|
537
|
-
onValidationDelete?: (event: ValidationDeleteEvent) => void | Promise<void>;
|
|
314
|
+
export declare interface LabelBatchUpdateVariables {
|
|
315
|
+
labelContextId?: string | null;
|
|
316
|
+
labelContextRequest?: LabelContextCreateRequest;
|
|
317
|
+
labelContextUpdateRequest?: LabelContextUpdateRequest;
|
|
318
|
+
body: LabelBatchUpdateRequest;
|
|
538
319
|
}
|
|
539
320
|
|
|
540
|
-
export declare
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
records: WorkspaceRecord[];
|
|
544
|
-
activeRecordId: string;
|
|
545
|
-
onRecordSelect: (record: WorkspaceRecord) => void;
|
|
546
|
-
direction?: 'horizontal' | 'vertical';
|
|
547
|
-
onDirectionChange?: (direction: 'horizontal' | 'vertical') => void;
|
|
548
|
-
hidden?: boolean;
|
|
321
|
+
export declare interface LabelBulkCreateVariables {
|
|
322
|
+
labelContextId: string;
|
|
323
|
+
body: BulkLabelCreateRequest;
|
|
549
324
|
}
|
|
550
325
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
*/
|
|
556
|
-
export declare function LabelingNumberSection({ content, readOnly, segments, }: LabelingNumberSectionProps): JSX_2.Element;
|
|
557
|
-
|
|
558
|
-
declare interface LabelingNumberSectionProps {
|
|
559
|
-
content?: NumberContent;
|
|
560
|
-
readOnly?: boolean;
|
|
561
|
-
segments?: Array<{
|
|
562
|
-
id: string;
|
|
563
|
-
start: number;
|
|
564
|
-
end: number;
|
|
565
|
-
color: string;
|
|
566
|
-
opacity?: number;
|
|
567
|
-
}>;
|
|
326
|
+
export declare interface LabelContextCreateRequest {
|
|
327
|
+
datasetId: string;
|
|
328
|
+
datasetVersion: string | number;
|
|
329
|
+
policyIds: string[];
|
|
568
330
|
}
|
|
569
331
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
name: string;
|
|
573
|
-
classes: LabelingClass[];
|
|
332
|
+
declare interface LabelContextEnableResponse {
|
|
333
|
+
enable: boolean;
|
|
574
334
|
}
|
|
575
335
|
|
|
576
|
-
export declare
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
336
|
+
export declare interface LabelContextResponse {
|
|
337
|
+
id: string;
|
|
338
|
+
datasetId: string;
|
|
339
|
+
datasetVersion?: string | number;
|
|
340
|
+
policyIds: string[];
|
|
341
|
+
enable?: boolean;
|
|
342
|
+
organizationId?: string;
|
|
343
|
+
accountId?: string;
|
|
344
|
+
zoneId?: string;
|
|
345
|
+
userId?: string;
|
|
346
|
+
inLabeling?: boolean;
|
|
347
|
+
isLabeled?: boolean;
|
|
348
|
+
createdBy?: string;
|
|
349
|
+
createdDate?: string;
|
|
350
|
+
modifiedBy?: string;
|
|
351
|
+
modifiedDate?: string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export declare interface LabelContextUpdateRequest {
|
|
355
|
+
policyIds?: string[];
|
|
356
|
+
inLabeling?: boolean;
|
|
357
|
+
enable?: boolean;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export declare interface LabelContextUpdateVariables {
|
|
361
|
+
labelContextId: string;
|
|
362
|
+
body: LabelContextUpdateRequest;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
declare interface LabelCopyRequest {
|
|
366
|
+
copyType: LabelCopyType;
|
|
367
|
+
sourcePolicyId?: string;
|
|
368
|
+
targetPolicyId?: string;
|
|
369
|
+
targetLabelContextId?: string;
|
|
370
|
+
targetPolicyIds?: string[];
|
|
371
|
+
sourceDatasetId?: string;
|
|
372
|
+
sourceDatasetVersion?: string;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare interface LabelCopyResponse {
|
|
376
|
+
copyType?: LabelCopyType;
|
|
377
|
+
copiedCount?: number;
|
|
378
|
+
skippedCount?: number;
|
|
379
|
+
totalProcessedCount?: number;
|
|
380
|
+
copiedLabelIds?: string[];
|
|
381
|
+
message?: string;
|
|
382
|
+
sourcePolicyId?: string;
|
|
383
|
+
targetPolicyId?: string;
|
|
384
|
+
targetLabelContextId?: string;
|
|
385
|
+
sourceDatasetId?: string;
|
|
386
|
+
sourceDatasetVersion?: string;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
declare type LabelCopyType = "POLICY" | "DATASET";
|
|
616
390
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
* Users can select text to create new segments via mouseup events.
|
|
620
|
-
*/
|
|
621
|
-
export declare function LabelingTextSection({ content, readOnly, segments, }: LabelingTextSectionProps): JSX_2.Element;
|
|
622
|
-
|
|
623
|
-
declare interface LabelingTextSectionProps {
|
|
624
|
-
content?: TextContent;
|
|
625
|
-
readOnly?: boolean;
|
|
626
|
-
segments?: Array<{
|
|
627
|
-
id: string;
|
|
628
|
-
start: number;
|
|
629
|
-
end: number;
|
|
630
|
-
color: string;
|
|
631
|
-
opacity?: number;
|
|
632
|
-
}>;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
export declare interface LabelingTheme {
|
|
636
|
-
primary: string;
|
|
637
|
-
background: string;
|
|
638
|
-
surface: string;
|
|
639
|
-
border: string;
|
|
640
|
-
text: string;
|
|
641
|
-
textSecondary: string;
|
|
642
|
-
hover: string;
|
|
643
|
-
primaryLight: string;
|
|
644
|
-
fontFamily: string;
|
|
645
|
-
radius: number;
|
|
646
|
-
spacing: {
|
|
647
|
-
sm: number;
|
|
648
|
-
md: number;
|
|
649
|
-
lg: number;
|
|
650
|
-
};
|
|
391
|
+
export declare interface LabelDeleteData {
|
|
392
|
+
id: string;
|
|
651
393
|
}
|
|
652
394
|
|
|
653
|
-
declare interface
|
|
395
|
+
export declare interface LabelDetailResponse {
|
|
654
396
|
id: string;
|
|
655
|
-
|
|
397
|
+
labelContextId: string;
|
|
398
|
+
contentId?: string;
|
|
399
|
+
contentSetId?: string;
|
|
400
|
+
elementId?: string;
|
|
401
|
+
policyId: string;
|
|
402
|
+
schemaName?: string;
|
|
403
|
+
isLabeled?: boolean;
|
|
404
|
+
organizationId?: string;
|
|
405
|
+
accountId?: string;
|
|
406
|
+
zoneId?: string;
|
|
407
|
+
userId?: string;
|
|
408
|
+
autoLabelingInfo?: AutoLabelingInfo;
|
|
409
|
+
inferenceType?: LabelInferenceType;
|
|
410
|
+
labelType?: LabelType;
|
|
411
|
+
unitType?: LabelUnitType;
|
|
412
|
+
labelValue?: LabelValue;
|
|
413
|
+
attributeValues?: AttributeValue[];
|
|
414
|
+
modifiedBy?: string;
|
|
415
|
+
modifiedDate?: string;
|
|
416
|
+
createdBy?: string;
|
|
417
|
+
createdDate?: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export declare type LabelInferenceType = "CLASSIFICATION" | "OBJECT_DETECTION" | "SEGMENTATION" | "RECOGNITION";
|
|
421
|
+
|
|
422
|
+
declare const LABELING_RECORDS_CELL_ACCESSORIES_SYMBOL: unique symbol;
|
|
423
|
+
|
|
424
|
+
export declare interface LabelingApiHeaders {
|
|
425
|
+
orgId?: string;
|
|
426
|
+
zoneId?: string;
|
|
427
|
+
accountId?: string;
|
|
428
|
+
userId?: string;
|
|
429
|
+
userName?: string;
|
|
656
430
|
}
|
|
657
431
|
|
|
658
432
|
/**
|
|
659
|
-
*
|
|
660
|
-
*
|
|
433
|
+
* Data that the host feeds into the labeling workspace.
|
|
434
|
+
* Each field mirrors one of the former react-query hooks.
|
|
661
435
|
*/
|
|
662
|
-
export declare
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
436
|
+
export declare interface LabelingDataContextValue {
|
|
437
|
+
policiesBatch: AsyncData<PolicyDetail[]>;
|
|
438
|
+
labelContext: AsyncData<LabelContextResponse>;
|
|
439
|
+
labelContextStatus: AsyncData<ContentsetStatusResponse>;
|
|
440
|
+
labelContextInLabeling: AsyncData<InLabelingStatusResponse>;
|
|
441
|
+
labelContextEnable: AsyncData<LabelContextEnableResponse>;
|
|
442
|
+
labelSearch: AsyncData<LabelSearchResult>;
|
|
443
|
+
previousLabelContexts: AsyncData<PreviousLabelContextWithLabelsResponse[]>;
|
|
444
|
+
validResultSearch: AsyncData<ValidResultSearchResult>;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export declare interface LabelingDatasetCellReference {
|
|
448
|
+
datasetId: string;
|
|
449
|
+
version: string;
|
|
450
|
+
contentSetId: string;
|
|
451
|
+
schemaNames: string[];
|
|
452
|
+
schemaLabel: string;
|
|
453
|
+
contentType: string;
|
|
454
|
+
isRequired: boolean;
|
|
455
|
+
maxItems: number | string | null;
|
|
456
|
+
showIntProps?: boolean;
|
|
670
457
|
}
|
|
671
458
|
|
|
672
459
|
/**
|
|
673
|
-
*
|
|
674
|
-
*
|
|
460
|
+
* Dataset-related data the host feeds into the labeling workspace.
|
|
461
|
+
* Separated from LabelingDataContext because it changes at a different
|
|
462
|
+
* frequency (on record selection vs. on every label operation).
|
|
675
463
|
*/
|
|
676
|
-
export declare
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
declare interface LabelingWorkspaceControlProps {
|
|
681
|
-
viewMode: WorkspaceViewMode;
|
|
682
|
-
onViewModeChange?: (mode: WorkspaceViewMode) => void;
|
|
683
|
-
availableViewModes?: WorkspaceViewMode[];
|
|
684
|
-
mode?: WorkspaceMode;
|
|
685
|
-
onModeChange?: (mode: WorkspaceMode) => void;
|
|
686
|
-
onSave?: () => void;
|
|
687
|
-
onSaveToRecord?: () => void;
|
|
688
|
-
isSaving?: boolean;
|
|
689
|
-
onNavigateLeft?: () => void;
|
|
690
|
-
onNavigateRight?: () => void;
|
|
691
|
-
canNavigateLeft?: boolean;
|
|
692
|
-
canNavigateRight?: boolean;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
export declare interface LabelingWorkspaceProps {
|
|
696
|
-
image: string | {
|
|
697
|
-
url: string;
|
|
698
|
-
width: number;
|
|
699
|
-
height: number;
|
|
700
|
-
};
|
|
701
|
-
annotations: Annotation[];
|
|
702
|
-
onChange: (event: CanvasChangeEvent) => void;
|
|
703
|
-
viewMode?: WorkspaceViewMode;
|
|
704
|
-
onViewModeChange?: (mode: WorkspaceViewMode) => void;
|
|
705
|
-
availableViewModes?: WorkspaceViewMode[];
|
|
706
|
-
textContent?: TextContent;
|
|
707
|
-
numberContent?: NumberContent;
|
|
708
|
-
fileContent?: FileContent;
|
|
709
|
-
records: WorkspaceRecord[];
|
|
710
|
-
activeRecordId: string;
|
|
711
|
-
onRecordSelect: (record: WorkspaceRecord) => void;
|
|
712
|
-
onDetailExpand?: (record: WorkspaceRecord, schemaLabel: string) => void;
|
|
713
|
-
totalRecords?: number;
|
|
714
|
-
onPageChange?: (page: number) => void;
|
|
715
|
-
classes: LabelingClass[];
|
|
716
|
-
policies?: LabelingPolicy[];
|
|
717
|
-
onClassSelect?: (cls: LabelingClass) => void;
|
|
718
|
-
onSave: (payload: SavePayload) => void | Promise<void>;
|
|
719
|
-
onSaveToRecord?: (payload: SaveToRecordPayload) => void | Promise<void>;
|
|
720
|
-
onFileUpload?: (payload: FileUploadPayload) => void | Promise<void>;
|
|
721
|
-
isSaving?: boolean;
|
|
722
|
-
onNavigateLeft?: () => void;
|
|
723
|
-
onNavigateRight?: () => void;
|
|
724
|
-
canNavigateLeft?: boolean;
|
|
725
|
-
canNavigateRight?: boolean;
|
|
726
|
-
mode?: WorkspaceMode;
|
|
727
|
-
onModeChange?: (mode: WorkspaceMode) => void;
|
|
728
|
-
validationResults?: ValidationResult[];
|
|
729
|
-
onValidate?: (event: ValidateEvent) => void | Promise<void>;
|
|
730
|
-
onValidationUpdate?: (event: ValidationUpdateEvent) => void | Promise<void>;
|
|
731
|
-
onValidationDelete?: (event: ValidationDeleteEvent) => void | Promise<void>;
|
|
732
|
-
onSaveValidation?: (payload: SaveValidationPayload) => void | Promise<void>;
|
|
733
|
-
indicator?: WorkspaceIndicator;
|
|
734
|
-
extensions?: LabelingExtension[];
|
|
735
|
-
tools?: ToolType[];
|
|
736
|
-
theme?: Partial<LabelingTheme>;
|
|
737
|
-
layout?: WorkspaceLayout;
|
|
738
|
-
isDirty?: boolean;
|
|
739
|
-
dirtyConfirmMessage?: string;
|
|
464
|
+
export declare interface LabelingDatasetContextValue {
|
|
465
|
+
datasetDetail: AsyncData<DatasetDTO>;
|
|
466
|
+
datasetContents: AsyncData<DatasetApiResponse<DatasetContentSearchResponse>>;
|
|
467
|
+
datasetContentDetail: AsyncData<DatasetContentRecord | null>;
|
|
740
468
|
}
|
|
741
469
|
|
|
742
470
|
/**
|
|
743
|
-
*
|
|
744
|
-
*
|
|
471
|
+
* A pluggable extension that the host registers to add optional
|
|
472
|
+
* features (e.g. SAM, Automated Labeling) to the labeling workspace.
|
|
473
|
+
*
|
|
474
|
+
* The library provides render slots only — the host owns all UI and logic.
|
|
745
475
|
*/
|
|
746
|
-
export declare
|
|
747
|
-
|
|
748
|
-
declare interface LabelingWorkspaceSectionProps {
|
|
749
|
-
viewMode: WorkspaceViewMode;
|
|
750
|
-
image: string | {
|
|
751
|
-
url: string;
|
|
752
|
-
width: number;
|
|
753
|
-
height: number;
|
|
754
|
-
};
|
|
755
|
-
annotations: Annotation[];
|
|
756
|
-
onChange?: (event: CanvasChangeEvent) => void;
|
|
757
|
-
readOnly?: boolean;
|
|
758
|
-
textContent?: TextContent;
|
|
759
|
-
numberContent?: NumberContent;
|
|
760
|
-
fileContent?: FileContent;
|
|
761
|
-
onFileUpload?: (file: File) => void;
|
|
762
|
-
children?: ReactNode;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
export declare interface LabelInsertData {
|
|
766
|
-
policyId: string;
|
|
767
|
-
classIndex: number;
|
|
768
|
-
className: string;
|
|
769
|
-
labelValue: unknown;
|
|
770
|
-
attributeValues?: Record<string, unknown>;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
declare interface LabelSelectionState {
|
|
774
|
-
selectedClassificationId: string | null;
|
|
775
|
-
selectedClassificationInfo: SelectedClassificationInfo | null;
|
|
776
|
-
setSelectedClassificationId: (id: string | null, info?: SelectedClassificationInfo | null) => void;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
export declare interface LabelUpdateData extends LabelInsertData {
|
|
476
|
+
export declare interface LabelingExtension {
|
|
477
|
+
/** Unique identifier for this extension. */
|
|
780
478
|
id: string;
|
|
479
|
+
/** Human-readable name. */
|
|
480
|
+
name: string;
|
|
481
|
+
/** Set to false to disable the extension without removing it. */
|
|
482
|
+
enabled?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Renders action buttons / sections inside the InfoPanel.
|
|
485
|
+
* The returned node is placed at the bottom of the InfoPanel, after the
|
|
486
|
+
* label lists and before the issue panel toggle.
|
|
487
|
+
*/
|
|
488
|
+
renderInfoPanelAction?: (ctx: ExtensionRenderContext) => ReactNode;
|
|
489
|
+
/**
|
|
490
|
+
* Renders a floating overlay on top of the workspace (e.g. a modal).
|
|
491
|
+
* Rendered at the root level so it can use portals / z-index freely.
|
|
492
|
+
*/
|
|
493
|
+
renderOverlay?: (ctx: ExtensionRenderContext) => ReactNode;
|
|
494
|
+
/**
|
|
495
|
+
* Renders an additional tool button in the floating toolbar.
|
|
496
|
+
* Use this for canvas-based tools (e.g. SAM point/box input).
|
|
497
|
+
*/
|
|
498
|
+
renderToolbarAction?: (ctx: ExtensionRenderContext) => ReactNode;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export declare interface LabelingMutationContextValue {
|
|
502
|
+
batchUpdateLabels: (vars: LabelBatchUpdateVariables) => Promise<LabelBatchUpdateResponse>;
|
|
503
|
+
batchUpdateLabelsState: MutationState;
|
|
504
|
+
bulkCreateLabels: (vars: LabelBulkCreateVariables) => Promise<BulkLabelCreateResponse>;
|
|
505
|
+
bulkCreateLabelsState: MutationState;
|
|
506
|
+
createLabelContext: (body: LabelContextCreateRequest) => Promise<LabelContextResponse>;
|
|
507
|
+
createLabelContextState: MutationState;
|
|
508
|
+
updateLabelContext: (vars: LabelContextUpdateVariables) => Promise<LabelContextResponse>;
|
|
509
|
+
updateLabelContextState: MutationState;
|
|
510
|
+
createLabelStatus: (body: LabelStatusCreateRequest) => Promise<ApiResponse<LabelStatusResponse>>;
|
|
511
|
+
createLabelStatusState: MutationState;
|
|
512
|
+
uploadFileLabel: (vars: FileLabelUploadVariables) => Promise<LabelResponse>;
|
|
513
|
+
uploadFileLabelState: MutationState;
|
|
514
|
+
copyLabels: (body: LabelCopyRequest) => Promise<LabelCopyResponse>;
|
|
515
|
+
copyLabelsState: MutationState;
|
|
516
|
+
createValidResult: (body: ValidResultCreateRequest) => Promise<ValidResultResponse>;
|
|
517
|
+
createValidResultState: MutationState;
|
|
518
|
+
updateValidResult: (vars: ValidResultUpdateVariables) => Promise<ValidResultResponse>;
|
|
519
|
+
updateValidResultState: MutationState;
|
|
520
|
+
bulkDeleteValidResults: (body: ValidResultBulkDeleteRequest) => Promise<ValidResultBulkDeleteResponse>;
|
|
521
|
+
bulkDeleteValidResultsState: MutationState;
|
|
522
|
+
/**
|
|
523
|
+
* Called by the library after a successful mutation.
|
|
524
|
+
* The host should use the hint to invalidate / refetch the right caches.
|
|
525
|
+
*/
|
|
526
|
+
onMutationSuccess: (hint: MutationSuccessHint) => void;
|
|
781
527
|
}
|
|
782
528
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
529
|
+
/**
|
|
530
|
+
* Composite provider that wraps the three labeling contexts.
|
|
531
|
+
*
|
|
532
|
+
* Usage (host app):
|
|
533
|
+
* ```tsx
|
|
534
|
+
* <LabelingProviders data={dataCtx} mutations={mutationCtx} dataset={datasetCtx}>
|
|
535
|
+
* <LabelingWorkspace />
|
|
536
|
+
* </LabelingProviders>
|
|
537
|
+
* ```
|
|
538
|
+
*/
|
|
539
|
+
export declare function LabelingProviders({ data, mutations, dataset, children, }: LabelingProvidersProps): JSX_2.Element;
|
|
792
540
|
|
|
793
|
-
declare interface
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
541
|
+
export declare interface LabelingProvidersProps {
|
|
542
|
+
data: LabelingDataContextValue;
|
|
543
|
+
mutations: LabelingMutationContextValue;
|
|
544
|
+
dataset: LabelingDatasetContextValue;
|
|
545
|
+
children: React.ReactNode;
|
|
797
546
|
}
|
|
798
547
|
|
|
799
|
-
declare
|
|
800
|
-
|
|
801
|
-
export declare const loadFabric: () => Promise<fabric>;
|
|
802
|
-
|
|
803
|
-
export declare const magicbrushTool: () => LabelingTool;
|
|
804
|
-
|
|
805
|
-
export declare interface NavigationCellAccessories {
|
|
806
|
-
badges?: NavigationCellBadge[];
|
|
548
|
+
declare interface LabelingRecordsCellAccessories {
|
|
549
|
+
badges?: LabelingRecordsCellBadge[];
|
|
807
550
|
hasIssue?: boolean;
|
|
808
551
|
hasValidationCompleted?: boolean;
|
|
809
552
|
}
|
|
810
553
|
|
|
811
|
-
|
|
554
|
+
declare type LabelingRecordsCellAccessoriesMap = Record<string, LabelingRecordsCellAccessories>;
|
|
555
|
+
|
|
556
|
+
declare interface LabelingRecordsCellBadge {
|
|
812
557
|
title: string;
|
|
813
|
-
style:
|
|
558
|
+
style: BadgeStyle;
|
|
814
559
|
}
|
|
815
560
|
|
|
816
|
-
export declare interface
|
|
817
|
-
|
|
818
|
-
|
|
561
|
+
export declare interface LabelingRecordSelection {
|
|
562
|
+
datasetId: string | null;
|
|
563
|
+
record: DatasetContentRecord;
|
|
564
|
+
displayRow: LabelingRecordsTableRow;
|
|
565
|
+
schemaEntries: LabelingSchemaEntry[];
|
|
566
|
+
schemaNameToContentType: Record<string, string>;
|
|
567
|
+
accessories?: LabelingRecordsCellAccessoriesMap;
|
|
568
|
+
detailReference?: LabelingDatasetCellReference;
|
|
569
|
+
rowIndex: number;
|
|
570
|
+
rowId: string;
|
|
819
571
|
}
|
|
820
572
|
|
|
821
|
-
|
|
573
|
+
declare type LabelingRecordsTableRow = VirtualizedRecordsTableRow & {
|
|
574
|
+
[LABELING_RECORDS_CELL_ACCESSORIES_SYMBOL]?: LabelingRecordsCellAccessoriesMap;
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
export declare interface LabelingSchemaEntry {
|
|
822
578
|
label: string;
|
|
579
|
+
summaryKeys: string[];
|
|
580
|
+
detailSchemaNames: string[];
|
|
823
581
|
contentType: string;
|
|
824
582
|
isRequired: boolean;
|
|
825
|
-
maxItems
|
|
583
|
+
maxItems: number | string | null;
|
|
584
|
+
schema?: SchemaItemDTO;
|
|
826
585
|
}
|
|
827
586
|
|
|
828
|
-
export declare
|
|
829
|
-
mode?: 'line' | 'bar';
|
|
830
|
-
xAxis?: {
|
|
831
|
-
label: string;
|
|
832
|
-
ticks: unknown[];
|
|
833
|
-
};
|
|
834
|
-
yAxis?: {
|
|
835
|
-
label: string;
|
|
836
|
-
series: unknown[];
|
|
837
|
-
};
|
|
838
|
-
source: {
|
|
839
|
-
columns: string[] | Array<{
|
|
840
|
-
key: string;
|
|
841
|
-
label: string;
|
|
842
|
-
}>;
|
|
843
|
-
rows: unknown[][] | Array<Record<string, unknown>>;
|
|
844
|
-
};
|
|
845
|
-
canRender?: boolean;
|
|
846
|
-
segments?: Array<{
|
|
847
|
-
id: string;
|
|
848
|
-
start: number;
|
|
849
|
-
end: number;
|
|
850
|
-
color: string;
|
|
851
|
-
opacity?: number;
|
|
852
|
-
}>;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
declare interface NumberLabelingTool {
|
|
856
|
-
id: 'selection' | 'drag-segment';
|
|
857
|
-
label: string;
|
|
858
|
-
}
|
|
587
|
+
export declare function LabelingWorkspace({ extensions, }: LabelingWorkspaceProps): JSX_2.Element;
|
|
859
588
|
|
|
860
|
-
declare interface
|
|
861
|
-
|
|
862
|
-
labelId: string | null;
|
|
863
|
-
tempId: string | null;
|
|
864
|
-
start: number;
|
|
865
|
-
end: number;
|
|
866
|
-
color?: string;
|
|
867
|
-
opacity?: number;
|
|
589
|
+
export declare interface LabelingWorkspaceProps {
|
|
590
|
+
extensions?: LabelingExtension[];
|
|
868
591
|
}
|
|
869
592
|
|
|
870
|
-
declare interface
|
|
871
|
-
|
|
872
|
-
|
|
593
|
+
export declare interface LabelInsertData {
|
|
594
|
+
contentSetId?: string;
|
|
595
|
+
elementId?: string;
|
|
596
|
+
policyId: string;
|
|
597
|
+
schemaName?: string;
|
|
598
|
+
inferenceType?: LabelInferenceType;
|
|
599
|
+
/**
|
|
600
|
+
* labelType 설명
|
|
601
|
+
* inferenceType classification 전용
|
|
602
|
+
* 파일 업로드 기반 라벨 > FILE
|
|
603
|
+
* 차트(Number) 기반 라벨 > TABLE
|
|
604
|
+
* 그외 타입의 엘레멘트 단위 or 레코드 단위 라벨 > 사용 안함
|
|
605
|
+
*/
|
|
606
|
+
labelType?: LabelType;
|
|
607
|
+
/**
|
|
608
|
+
* unitType 설명
|
|
609
|
+
* 엘레멘트 단위 > ELEMENT
|
|
610
|
+
* 레코드 단위 > CONTENTSET
|
|
611
|
+
*/
|
|
612
|
+
unitType?: LabelUnitType;
|
|
613
|
+
labelValue?: LabelValue;
|
|
614
|
+
attributeValues?: AttributeValue[];
|
|
615
|
+
isLabeled?: boolean;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
declare type LabelOrderDirection = "ASC" | "DESC" | "asc" | "desc";
|
|
619
|
+
|
|
620
|
+
export declare interface LabelResponse extends LabelDetailResponse {
|
|
621
|
+
version: DatasetContentVersion;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export declare interface LabelSearchRequest {
|
|
625
|
+
labelContextId: SearchOperatorFilter<string>;
|
|
626
|
+
contentSetId?: SearchOperatorFilter<string>;
|
|
627
|
+
elementId?: SearchOperatorFilter<string>;
|
|
628
|
+
unitType?: SearchOperatorFilter<LabelUnitType>;
|
|
629
|
+
orderBy?: Record<string, LabelOrderDirection>;
|
|
630
|
+
pageNumber?: number;
|
|
631
|
+
pageSize?: number;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export declare type LabelSearchResult = CustomPageWrapper<LabelDetailResponse, LabelSearchRequest>;
|
|
635
|
+
|
|
636
|
+
declare interface LabelStatusCreateRequest {
|
|
637
|
+
labelContextId: string;
|
|
638
|
+
contentSetId: string;
|
|
639
|
+
elementId: string;
|
|
640
|
+
isLabeling?: boolean;
|
|
873
641
|
}
|
|
874
642
|
|
|
875
|
-
declare interface
|
|
876
|
-
|
|
877
|
-
|
|
643
|
+
declare interface LabelStatusResponse {
|
|
644
|
+
id: string;
|
|
645
|
+
labelContextId: string;
|
|
646
|
+
contentSetId: string;
|
|
647
|
+
elementId: string;
|
|
648
|
+
isLabeling?: boolean;
|
|
649
|
+
organizationId?: string;
|
|
650
|
+
accountId?: string;
|
|
651
|
+
zoneId?: string;
|
|
652
|
+
userId?: string;
|
|
653
|
+
createdBy?: string;
|
|
654
|
+
createdDate?: string;
|
|
878
655
|
}
|
|
879
656
|
|
|
880
|
-
export declare type
|
|
657
|
+
export declare type LabelType = "FILE" | "TABLE";
|
|
881
658
|
|
|
882
|
-
declare
|
|
883
|
-
opacity: number;
|
|
884
|
-
setOpacity: (opacity: number) => void;
|
|
885
|
-
}
|
|
659
|
+
export declare type LabelUnitType = "CONTENTSET" | "ELEMENT";
|
|
886
660
|
|
|
887
|
-
declare interface
|
|
888
|
-
|
|
889
|
-
setColorCode: (colorCode: string) => void;
|
|
661
|
+
export declare interface LabelUpdateData extends LabelInsertData {
|
|
662
|
+
id: string;
|
|
890
663
|
}
|
|
891
664
|
|
|
892
|
-
export declare
|
|
893
|
-
type: 'polygon';
|
|
894
|
-
/** Normalized vertex coordinates */
|
|
895
|
-
points: Array<{
|
|
896
|
-
x: number;
|
|
897
|
-
y: number;
|
|
898
|
-
}>;
|
|
899
|
-
}
|
|
665
|
+
export declare type LabelValue = ClassificationValue | BoxValue | SegmentationResponseValue | SegmentationBase64Value | ChartValue | RecognitionValue | FileValue | unknown;
|
|
900
666
|
|
|
901
|
-
|
|
667
|
+
/** A loading-state placeholder. */
|
|
668
|
+
export declare function loadingData<T>(): AsyncData<T>;
|
|
902
669
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
670
|
+
/**
|
|
671
|
+
* Mutation state — tracks the status of a single mutation call.
|
|
672
|
+
*/
|
|
673
|
+
export declare interface MutationState {
|
|
674
|
+
isPending: boolean;
|
|
675
|
+
isError: boolean;
|
|
676
|
+
error: unknown;
|
|
908
677
|
}
|
|
909
678
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
679
|
+
/**
|
|
680
|
+
* Hint the library sends to the host after a successful mutation so
|
|
681
|
+
* the host can invalidate / refetch the appropriate caches.
|
|
682
|
+
*/
|
|
683
|
+
export declare type MutationSuccessHint = {
|
|
684
|
+
type: "labels-saved";
|
|
685
|
+
labelContextId: string | null;
|
|
686
|
+
} | {
|
|
687
|
+
type: "labels-copied";
|
|
688
|
+
} | {
|
|
689
|
+
type: "labels-bulk-created";
|
|
690
|
+
labelContextId: string;
|
|
691
|
+
} | {
|
|
692
|
+
type: "label-context-created";
|
|
693
|
+
labelContextId: string;
|
|
694
|
+
} | {
|
|
695
|
+
type: "label-context-updated";
|
|
696
|
+
labelContextId: string;
|
|
697
|
+
} | {
|
|
698
|
+
type: "label-status-created";
|
|
699
|
+
} | {
|
|
700
|
+
type: "valid-result-created";
|
|
701
|
+
} | {
|
|
702
|
+
type: "valid-result-updated";
|
|
703
|
+
} | {
|
|
704
|
+
type: "valid-results-deleted";
|
|
705
|
+
} | {
|
|
706
|
+
type: "file-uploaded";
|
|
707
|
+
labelContextId: string;
|
|
708
|
+
};
|
|
913
709
|
|
|
914
|
-
export declare interface
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
imageSize?: {
|
|
921
|
-
width: number;
|
|
922
|
-
height: number;
|
|
923
|
-
};
|
|
710
|
+
export declare interface PolicyClass {
|
|
711
|
+
name: string;
|
|
712
|
+
color: string;
|
|
713
|
+
opacity?: number;
|
|
714
|
+
index?: number;
|
|
715
|
+
attributes?: Attribute[] | null;
|
|
924
716
|
}
|
|
925
717
|
|
|
926
|
-
export declare interface
|
|
927
|
-
|
|
928
|
-
|
|
718
|
+
export declare interface PolicyDetail {
|
|
719
|
+
id: string;
|
|
720
|
+
basePolicyId: string;
|
|
721
|
+
version: string;
|
|
722
|
+
baseVersion: string;
|
|
723
|
+
name: string;
|
|
724
|
+
exist: boolean;
|
|
725
|
+
classes: PolicyClass[];
|
|
726
|
+
elements?: string[];
|
|
727
|
+
tags?: string[];
|
|
728
|
+
versions: Version[];
|
|
729
|
+
zoneId: string;
|
|
730
|
+
organizationId: string;
|
|
731
|
+
accountId: string;
|
|
732
|
+
userId: string;
|
|
733
|
+
createdBy: string;
|
|
734
|
+
createdDate: string;
|
|
735
|
+
modifiedBy: string;
|
|
736
|
+
modifiedDate: string;
|
|
737
|
+
copyLabel?: boolean;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
declare interface PolicyLabelStatus {
|
|
741
|
+
policyId?: string;
|
|
742
|
+
labelId?: string;
|
|
743
|
+
status?: ContentsetStatusState[];
|
|
744
|
+
hasValidationError?: boolean;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
declare interface PreviousLabelContextWithLabelsResponse {
|
|
748
|
+
id: string;
|
|
749
|
+
datasetId: string;
|
|
750
|
+
datasetVersion: string;
|
|
751
|
+
policyIds: string[];
|
|
752
|
+
createdBy?: string;
|
|
753
|
+
createdDate?: string;
|
|
754
|
+
modifiedBy?: string;
|
|
755
|
+
modifiedDate?: string;
|
|
929
756
|
}
|
|
930
757
|
|
|
931
|
-
export declare interface
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
758
|
+
export declare interface RecognitionValue {
|
|
759
|
+
className?: string;
|
|
760
|
+
classIndex?: number;
|
|
761
|
+
start?: number;
|
|
762
|
+
end?: number;
|
|
763
|
+
text?: string;
|
|
764
|
+
color?: string;
|
|
765
|
+
opacity?: number;
|
|
766
|
+
zindex?: number;
|
|
935
767
|
}
|
|
936
768
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
mask: string;
|
|
943
|
-
/** Fabric object vector for restoration (optional) */
|
|
944
|
-
vector?: string;
|
|
945
|
-
}
|
|
769
|
+
/**
|
|
770
|
+
* Remove fabric objects matching a predicate from the canvas.
|
|
771
|
+
* Extensions call this to clean up their objects.
|
|
772
|
+
*/
|
|
773
|
+
export declare function removeCanvasObjects(predicate: (obj: unknown) => boolean): void;
|
|
946
774
|
|
|
947
|
-
declare interface
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
className?: string | null;
|
|
951
|
-
labelId?: string | null;
|
|
952
|
-
tempId?: string | null;
|
|
953
|
-
isCanvasFocused?: boolean;
|
|
775
|
+
export declare interface SchemaItemDTO {
|
|
776
|
+
baseInfo: BaseInfoDTO;
|
|
777
|
+
properties: Record<string, unknown>;
|
|
954
778
|
}
|
|
955
779
|
|
|
956
|
-
declare interface
|
|
957
|
-
|
|
958
|
-
|
|
780
|
+
declare interface SchemaStatus {
|
|
781
|
+
name?: string;
|
|
782
|
+
totalCount?: number;
|
|
783
|
+
elements?: ElementStatus[];
|
|
959
784
|
}
|
|
960
785
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
export declare const setMagicBrushModule: (module: any) => void;
|
|
966
|
-
|
|
967
|
-
export declare const setSuperpixelModules: (modules: {
|
|
968
|
-
SLIC: any;
|
|
969
|
-
MagicBrush: any;
|
|
970
|
-
}) => void;
|
|
971
|
-
|
|
972
|
-
export declare const subscribeLabelEvents: (listener: LabelEventListener) => () => void;
|
|
973
|
-
|
|
974
|
-
export declare const superpixelTool: () => LabelingTool;
|
|
975
|
-
|
|
976
|
-
declare interface TemporalHistoryState<T> {
|
|
977
|
-
snapshot: T | null;
|
|
978
|
-
setSnapshot: (snapshot: T) => void;
|
|
979
|
-
reset: () => void;
|
|
786
|
+
declare interface Score {
|
|
787
|
+
className?: string;
|
|
788
|
+
score?: number;
|
|
789
|
+
[key: string]: unknown;
|
|
980
790
|
}
|
|
981
791
|
|
|
982
|
-
declare interface
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
special: boolean;
|
|
986
|
-
setEnglish: (value: boolean) => void;
|
|
987
|
-
setNumber: (value: boolean) => void;
|
|
988
|
-
setSpecial: (value: boolean) => void;
|
|
989
|
-
reset: () => void;
|
|
792
|
+
declare interface SearchOperatorFilter<TValue> {
|
|
793
|
+
operator: string;
|
|
794
|
+
value: TValue;
|
|
990
795
|
}
|
|
991
796
|
|
|
992
|
-
export declare interface
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
end: number;
|
|
1002
|
-
label?: string;
|
|
1003
|
-
color: string;
|
|
1004
|
-
opacity?: number;
|
|
1005
|
-
}>;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
declare interface TextLabelingTool {
|
|
1009
|
-
id: 'selection' | 'drag-segment';
|
|
1010
|
-
label: string;
|
|
797
|
+
export declare interface SegmentationBase64Value {
|
|
798
|
+
className?: string;
|
|
799
|
+
classIndex?: number;
|
|
800
|
+
segColor?: string;
|
|
801
|
+
segOrder?: number;
|
|
802
|
+
segOpacity?: number;
|
|
803
|
+
segBuffer: string;
|
|
804
|
+
segVector?: string;
|
|
805
|
+
segContentType?: string;
|
|
1011
806
|
}
|
|
1012
807
|
|
|
1013
|
-
declare interface
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
808
|
+
export declare interface SegmentationResponseValue {
|
|
809
|
+
className?: string;
|
|
810
|
+
classIndex?: number;
|
|
811
|
+
bucket?: string;
|
|
812
|
+
objectName?: string;
|
|
813
|
+
endpoint?: string;
|
|
814
|
+
segVector?: string;
|
|
815
|
+
segColor?: string;
|
|
816
|
+
segOrder?: number;
|
|
817
|
+
segOpacity?: number;
|
|
1020
818
|
color?: string;
|
|
1021
819
|
opacity?: number;
|
|
820
|
+
zindex?: number;
|
|
1022
821
|
}
|
|
1023
822
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
setSelectedSegment: (segment: TextSegmentSelection | null) => void;
|
|
1027
|
-
}
|
|
823
|
+
/** Wrap an already-resolved value as AsyncData (no loading, no error). */
|
|
824
|
+
export declare function staticData<T>(data: T): AsyncData<T>;
|
|
1028
825
|
|
|
1029
|
-
declare interface
|
|
1030
|
-
|
|
1031
|
-
|
|
826
|
+
declare interface UIType<TSize extends string = "xs" | "sm" | "md" | "lg" | "xl", TStyle extends string = string> {
|
|
827
|
+
size?: TSize;
|
|
828
|
+
style?: TStyle;
|
|
1032
829
|
}
|
|
1033
830
|
|
|
1034
|
-
export declare
|
|
1035
|
-
|
|
1036
|
-
export declare const toHex: (color: string) => {
|
|
1037
|
-
hex: string;
|
|
1038
|
-
alpha: string;
|
|
1039
|
-
};
|
|
1040
|
-
|
|
1041
|
-
export declare const TOOL_INFO_BOUNDED_BOX = "Bounded Box";
|
|
1042
|
-
|
|
1043
|
-
export declare const TOOL_INFO_BRUSH = "Brush";
|
|
1044
|
-
|
|
1045
|
-
export declare const TOOL_INFO_COMBINED_LABELS = "Combined Label";
|
|
1046
|
-
|
|
1047
|
-
export declare const TOOL_INFO_ERASER = "Eraser";
|
|
831
|
+
export declare const useFilterStore: UseBoundStore<StoreApi<FilterState>>;
|
|
1048
832
|
|
|
1049
|
-
export declare const
|
|
833
|
+
export declare const useWorkspaceNavigationDetailSelectionStore: UseBoundStore<StoreApi<WorkspaceNavigationDetailSelectionState>>;
|
|
1050
834
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
export declare const TOOL_INFO_MAGIC_BRUSH = "Magic Brush";
|
|
1054
|
-
|
|
1055
|
-
export declare const TOOL_INFO_SUPERPIXEL = "Superpixel";
|
|
1056
|
-
|
|
1057
|
-
export declare interface ToolbarButtonItem {
|
|
1058
|
-
variant: 'button';
|
|
1059
|
-
id?: string;
|
|
1060
|
-
icon?: ReactNode;
|
|
1061
|
-
title?: string;
|
|
1062
|
-
tooltip?: string;
|
|
1063
|
-
disabled?: boolean;
|
|
1064
|
-
active?: boolean;
|
|
1065
|
-
slim?: boolean;
|
|
1066
|
-
onClick?: () => void;
|
|
1067
|
-
subItems?: ToolbarItem[];
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
declare interface ToolbarButtonItemMeta {
|
|
1071
|
-
variant: 'button';
|
|
1072
|
-
id?: string;
|
|
1073
|
-
icon: ReactNode;
|
|
1074
|
-
title: string;
|
|
1075
|
-
tooltip?: string;
|
|
1076
|
-
disabled?: boolean;
|
|
1077
|
-
active?: boolean;
|
|
1078
|
-
slim?: boolean;
|
|
1079
|
-
onClick: () => void;
|
|
1080
|
-
subItems?: ToolbarItemMeta[];
|
|
835
|
+
declare interface ValidResultBulkDeleteRequest {
|
|
836
|
+
validResultIds: string[];
|
|
1081
837
|
}
|
|
1082
838
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
disabled?: boolean;
|
|
1090
|
-
onClick?: () => void;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
declare interface ToolbarCheckboxItemMeta {
|
|
1094
|
-
variant: 'checkbox';
|
|
1095
|
-
id: string;
|
|
1096
|
-
icon?: ReactNode;
|
|
1097
|
-
title: string;
|
|
1098
|
-
checked: boolean;
|
|
1099
|
-
disabled?: boolean;
|
|
1100
|
-
onClick: () => void;
|
|
839
|
+
declare interface ValidResultBulkDeleteResponse {
|
|
840
|
+
deletedIds: string[];
|
|
841
|
+
failedIds: string[];
|
|
842
|
+
successCount: number;
|
|
843
|
+
failureCount: number;
|
|
844
|
+
totalCount: number;
|
|
1101
845
|
}
|
|
1102
846
|
|
|
1103
|
-
export declare interface
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
847
|
+
export declare interface ValidResultCreateRequest {
|
|
848
|
+
labelContextId: string;
|
|
849
|
+
datasetId: string;
|
|
850
|
+
datasetVersion: string;
|
|
851
|
+
contentSetId: string;
|
|
852
|
+
elementId?: string;
|
|
853
|
+
policyId?: string;
|
|
854
|
+
labelId?: string;
|
|
855
|
+
result: boolean;
|
|
856
|
+
reason?: string;
|
|
857
|
+
validType: ValidType;
|
|
1109
858
|
}
|
|
1110
859
|
|
|
1111
|
-
export declare
|
|
1112
|
-
|
|
1113
|
-
declare type ToolbarItemMeta = ToolbarRadioItemMeta | ToolbarButtonItemMeta | ToolbarCheckboxItemMeta | ToolbarDividerItemMeta;
|
|
1114
|
-
|
|
1115
|
-
export declare interface ToolbarRadioItem {
|
|
1116
|
-
variant: 'radio';
|
|
860
|
+
export declare interface ValidResultResponse {
|
|
1117
861
|
id: string;
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
862
|
+
labelContextId: string;
|
|
863
|
+
datasetId: string;
|
|
864
|
+
datasetVersion: string;
|
|
865
|
+
contentSetId: string;
|
|
866
|
+
elementId?: string;
|
|
867
|
+
policyId?: string;
|
|
868
|
+
labelId?: string;
|
|
869
|
+
result: boolean;
|
|
870
|
+
reason?: string;
|
|
871
|
+
validType: ValidType;
|
|
872
|
+
validatedDate?: string;
|
|
873
|
+
organizationId?: string;
|
|
874
|
+
accountId?: string;
|
|
875
|
+
zoneId?: string;
|
|
876
|
+
userId?: string;
|
|
877
|
+
modifiedBy?: string;
|
|
878
|
+
modifiedDate?: string;
|
|
879
|
+
createdBy?: string;
|
|
880
|
+
createdDate?: string;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
declare interface ValidResultSearchRequest {
|
|
884
|
+
orderBy?: Record<string, LabelOrderDirection>;
|
|
885
|
+
pageNumber?: number;
|
|
886
|
+
pageSize?: number;
|
|
887
|
+
labelContextId?: SearchOperatorFilter<string>;
|
|
888
|
+
contentSetId?: SearchOperatorFilter<string>;
|
|
889
|
+
elementId?: SearchOperatorFilter<string>;
|
|
890
|
+
policyId?: SearchOperatorFilter<string>;
|
|
891
|
+
validType?: SearchOperatorFilter<ValidType>;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
declare type ValidResultSearchResult = CustomPageWrapper<ValidResultResponse, ValidResultSearchRequest>;
|
|
895
|
+
|
|
896
|
+
export declare interface ValidResultUpdateRequest {
|
|
897
|
+
result?: boolean;
|
|
898
|
+
reason?: string;
|
|
899
|
+
validType?: ValidType;
|
|
1124
900
|
}
|
|
1125
901
|
|
|
1126
|
-
declare interface
|
|
1127
|
-
variant: 'radio';
|
|
902
|
+
export declare interface ValidResultUpdateVariables {
|
|
1128
903
|
id: string;
|
|
1129
|
-
|
|
1130
|
-
icon: ReactNode;
|
|
1131
|
-
title: string;
|
|
1132
|
-
checked: boolean;
|
|
1133
|
-
disabled?: boolean;
|
|
1134
|
-
isSlim?: boolean;
|
|
1135
|
-
onClick: () => void;
|
|
1136
|
-
subButtonItems?: ToolbarItemMeta[];
|
|
904
|
+
body: ValidResultUpdateRequest;
|
|
1137
905
|
}
|
|
1138
906
|
|
|
1139
|
-
export declare type
|
|
1140
|
-
|
|
1141
|
-
export declare interface ToolExtension extends LabelingExtension {
|
|
1142
|
-
slot: 'tool';
|
|
1143
|
-
icon: ReactNode;
|
|
1144
|
-
label: string;
|
|
1145
|
-
shortcut?: string;
|
|
1146
|
-
canvasHandlers?: {
|
|
1147
|
-
onMouseDown?: (e: CanvasPointerEvent) => void;
|
|
1148
|
-
onMouseMove?: (e: CanvasPointerEvent) => void;
|
|
1149
|
-
onMouseUp?: (e: CanvasPointerEvent) => void;
|
|
1150
|
-
};
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
declare interface ToolInitConfig {
|
|
1154
|
-
colorCode: string;
|
|
1155
|
-
brush: BrushOptions;
|
|
1156
|
-
imageUrl?: string;
|
|
1157
|
-
magicbrushConfig?: {
|
|
1158
|
-
threshold: number;
|
|
1159
|
-
radius: number;
|
|
1160
|
-
};
|
|
1161
|
-
superpixelConfig?: Record<string, number>;
|
|
1162
|
-
segAnythingCallback?: (payload: any) => void;
|
|
1163
|
-
previousTool?: LabelingTool | null;
|
|
1164
|
-
}
|
|
907
|
+
export declare type ValidType = "CONTENTSET" | "ELEMENT" | "LABEL";
|
|
1165
908
|
|
|
1166
|
-
declare interface
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
909
|
+
declare interface Version {
|
|
910
|
+
id: string;
|
|
911
|
+
version: string;
|
|
912
|
+
classCount: number;
|
|
913
|
+
elementCount: number;
|
|
914
|
+
createdBy?: string;
|
|
915
|
+
createdDate?: string;
|
|
916
|
+
modifiedBy?: string;
|
|
917
|
+
modifiedDate?: string;
|
|
1175
918
|
}
|
|
1176
919
|
|
|
1177
|
-
export declare
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
export declare const toRgbaArray: (rgba: string) => number[];
|
|
1182
|
-
|
|
1183
|
-
export declare const toRGBAHex: (rgba: string) => string;
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* Set black pixels transparent and apply opacity to non-black pixels.
|
|
1187
|
-
*/
|
|
1188
|
-
export declare const transparentBlackPixel: (imageData: ImageData, opacity: number) => ImageData;
|
|
1189
|
-
|
|
1190
|
-
export declare const useBrushStore: UseBoundStore<StoreApi<BrushState>>;
|
|
1191
|
-
|
|
1192
|
-
export declare const useCanvasObjectsStore: UseBoundStore<StoreApi<CanvasObjectsState>>;
|
|
1193
|
-
|
|
1194
|
-
/**
|
|
1195
|
-
* Manages extension lifecycle — provides the ExtensionContext
|
|
1196
|
-
* and hooks up ToolExtension canvas handlers.
|
|
1197
|
-
*/
|
|
1198
|
-
export declare function useExtensions(options: UseExtensionsOptions): {
|
|
1199
|
-
context: ExtensionContext;
|
|
1200
|
-
toolExtensions: ToolExtension[];
|
|
1201
|
-
sidePanelExtensions: LabelingExtension[];
|
|
1202
|
-
toolbarExtensions: LabelingExtension[];
|
|
1203
|
-
activeToolExtension: ToolExtension | undefined;
|
|
1204
|
-
};
|
|
1205
|
-
|
|
1206
|
-
declare interface UseExtensionsOptions {
|
|
1207
|
-
extensions: LabelingExtension[];
|
|
1208
|
-
image: {
|
|
1209
|
-
url: string;
|
|
1210
|
-
width: number;
|
|
1211
|
-
height: number;
|
|
1212
|
-
};
|
|
1213
|
-
annotations: Annotation[];
|
|
1214
|
-
selectedIds: string[];
|
|
1215
|
-
activeTool: string;
|
|
1216
|
-
addAnnotations: (annotations: Annotation[]) => void;
|
|
1217
|
-
updateAnnotation: (id: string, annotation: Partial<Annotation>) => void;
|
|
1218
|
-
removeAnnotations: (ids: string[]) => void;
|
|
1219
|
-
setTool: (tool: string) => void;
|
|
920
|
+
export declare interface VersionDTO {
|
|
921
|
+
version: string | null;
|
|
922
|
+
versionedDate: string;
|
|
923
|
+
versionRecords: string;
|
|
1220
924
|
}
|
|
1221
925
|
|
|
1222
|
-
export declare const
|
|
1223
|
-
|
|
1224
|
-
export declare const useIssuePanelStore: UseBoundStore<StoreApi<IssuePanelState>>;
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
* Registers keyboard shortcuts matching portal-iris-web.
|
|
1228
|
-
* Shortcuts are view-mode-aware: Image mode has brush/eraser keys,
|
|
1229
|
-
* Text mode has highlighting, etc.
|
|
1230
|
-
*/
|
|
1231
|
-
export declare function useKeyboardShortcuts({ viewMode, isValidationMode, setTool, onUndo, onRedo, disabled, }: KeyboardShortcutsConfig): void;
|
|
1232
|
-
|
|
1233
|
-
export declare const useLabelBatchStore: UseBoundStore<StoreApi<LabelBatchState>>;
|
|
1234
|
-
|
|
1235
|
-
/**
|
|
1236
|
-
* Level 3 headless hook — Direct canvas access.
|
|
1237
|
-
*
|
|
1238
|
-
* Provides low-level canvas operations: add/remove objects,
|
|
1239
|
-
* export state, zoom control, etc.
|
|
1240
|
-
*/
|
|
1241
|
-
export declare function useLabelingCanvas(): {
|
|
1242
|
-
objects: LabeledFabricObject[];
|
|
1243
|
-
zoom: number;
|
|
1244
|
-
getAnnotations: (imageWidth: number, imageHeight: number) => Promise<Annotation[]>;
|
|
1245
|
-
addAnnotation: (annotation: Annotation, imageWidth: number, imageHeight: number) => Promise<void>;
|
|
1246
|
-
removeAnnotation: (annotationId: string) => void;
|
|
1247
|
-
clearCanvas: () => void;
|
|
1248
|
-
exportState: (imageWidth: number, imageHeight: number) => Promise<CanvasState_2>;
|
|
1249
|
-
setZoomLevel: (level: number) => void;
|
|
1250
|
-
};
|
|
1251
|
-
|
|
1252
|
-
export declare function useLabelingContext(): LabelingContextValue;
|
|
1253
|
-
|
|
1254
|
-
/**
|
|
1255
|
-
* Level 3 headless hook — Canvas undo/redo history.
|
|
1256
|
-
*
|
|
1257
|
-
* Uses the tool store's undo/redo stacks (JSON snapshots).
|
|
1258
|
-
*/
|
|
1259
|
-
export declare function useLabelingHistory(): {
|
|
1260
|
-
canUndo: boolean;
|
|
1261
|
-
canRedo: boolean;
|
|
1262
|
-
undo: () => Promise<void>;
|
|
1263
|
-
redo: () => Promise<void>;
|
|
1264
|
-
pushSnapshot: () => void;
|
|
1265
|
-
clear: () => void;
|
|
1266
|
-
};
|
|
1267
|
-
|
|
1268
|
-
/**
|
|
1269
|
-
* Level 3 headless hook — Tool selection and palette state.
|
|
1270
|
-
*
|
|
1271
|
-
* Returns current tool, setTool, and palette/brush/opacity state with setters.
|
|
1272
|
-
*/
|
|
1273
|
-
export declare function useLabelingTools(): {
|
|
1274
|
-
activeToolId: string | null;
|
|
1275
|
-
currentTool: LabelingTool | null;
|
|
1276
|
-
setTool: (toolType: ToolType) => void;
|
|
1277
|
-
clearTool: () => void;
|
|
1278
|
-
colorCode: string;
|
|
1279
|
-
setColorCode: (colorCode: string) => void;
|
|
1280
|
-
opacity: number;
|
|
1281
|
-
setOpacity: (opacity: number) => void;
|
|
1282
|
-
brush: {
|
|
1283
|
-
id: number;
|
|
1284
|
-
lineCap: string;
|
|
1285
|
-
lineWidth: number;
|
|
1286
|
-
};
|
|
1287
|
-
setBrush: (brush: {
|
|
1288
|
-
id: number;
|
|
1289
|
-
lineCap: string;
|
|
1290
|
-
lineWidth: number;
|
|
1291
|
-
}) => void;
|
|
1292
|
-
};
|
|
1293
|
-
|
|
1294
|
-
export declare function useLabelingUIMeta(viewMode: WorkspaceViewMode, isValidationMode: boolean): LabelingUIMetaResult;
|
|
1295
|
-
|
|
1296
|
-
export declare const useLabelSelectionStore: UseBoundStore<StoreApi<LabelSelectionState>>;
|
|
1297
|
-
|
|
1298
|
-
export declare const useLabelVisibilityStore: UseBoundStore<StoreApi<LabelVisibilityState>>;
|
|
1299
|
-
|
|
1300
|
-
export declare const useLayerModeStore: UseBoundStore<StoreApi<LayerModeState>>;
|
|
1301
|
-
|
|
1302
|
-
export declare const useNumberSegmentSelectionStore: UseBoundStore<StoreApi<NumberSegmentSelectionState>>;
|
|
1303
|
-
|
|
1304
|
-
export declare const useNumberToolStore: UseBoundStore<StoreApi<NumberToolState>>;
|
|
1305
|
-
|
|
1306
|
-
export declare const useOpacityStore: UseBoundStore<StoreApi<OpacityState>>;
|
|
1307
|
-
|
|
1308
|
-
export declare const usePaletteStore: UseBoundStore<StoreApi<PaletteState>>;
|
|
926
|
+
export declare const VIRTUALIZED_RECORDS_ROW_META_SYMBOL: unique symbol;
|
|
1309
927
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
export declare const useTextAutoHighlightStore: UseBoundStore<StoreApi<TextAutoHighlightState>>;
|
|
1313
|
-
|
|
1314
|
-
export declare const useTextSegmentSelectionStore: UseBoundStore<StoreApi<TextSegmentSelectionState>>;
|
|
1315
|
-
|
|
1316
|
-
export declare const useTextToolStore: UseBoundStore<StoreApi<TextToolState>>;
|
|
1317
|
-
|
|
1318
|
-
/**
|
|
1319
|
-
* Manages tool lifecycle: calls tool.init(config) when the tool changes,
|
|
1320
|
-
* and runs the cleanup function returned by init when unmounting or switching.
|
|
1321
|
-
*/
|
|
1322
|
-
export declare function useToolInit(currentTool: LabelingTool | null, config: ToolInitConfig, canvasReady?: boolean): {
|
|
1323
|
-
activeToolId: string | null;
|
|
928
|
+
declare type VirtualizedRecordsTableRow = Record<string, VirtualizedRowCellValue> & {
|
|
929
|
+
[VIRTUALIZED_RECORDS_ROW_META_SYMBOL]?: VirtualizedRowMeta;
|
|
1324
930
|
};
|
|
1325
931
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
export declare const useValidationModeStore: UseBoundStore<StoreApi<ValidationModeState>>;
|
|
1329
|
-
|
|
1330
|
-
export declare const useViewModeStore: UseBoundStore<StoreApi<ViewModeState>>;
|
|
1331
|
-
|
|
1332
|
-
export declare const useWorkspaceLayoutStore: UseBoundStore<StoreApi<WorkspaceLayoutState>>;
|
|
1333
|
-
|
|
1334
|
-
export declare const useZoomStore: UseBoundStore<StoreApi<ZoomState>>;
|
|
1335
|
-
|
|
1336
|
-
export declare interface ValidateEvent {
|
|
1337
|
-
annotationIds: string[];
|
|
1338
|
-
result: boolean;
|
|
1339
|
-
reason?: string;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
export declare interface ValidationDeleteEvent {
|
|
1343
|
-
ids: string[];
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
declare interface ValidationModeState {
|
|
1347
|
-
isValidationMode: boolean;
|
|
1348
|
-
setValidationMode: (value: boolean) => void;
|
|
1349
|
-
toggleValidationMode: () => void;
|
|
1350
|
-
}
|
|
932
|
+
declare type VirtualizedRowCellValue = string | number;
|
|
1351
933
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
reason?: string;
|
|
1357
|
-
validatedAt?: string;
|
|
934
|
+
declare interface VirtualizedRowMeta {
|
|
935
|
+
columnRefs: Record<string, unknown>;
|
|
936
|
+
rowRef?: unknown;
|
|
937
|
+
rowId?: string;
|
|
1358
938
|
}
|
|
1359
939
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
}
|
|
940
|
+
declare const WORKSPACE_CHART_PIVOT_MODE: {
|
|
941
|
+
readonly ROW_AS_X: "ROW_AS_X";
|
|
942
|
+
readonly COLUMN_AS_X: "COLUMN_AS_X";
|
|
943
|
+
};
|
|
1365
944
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
945
|
+
/** Information about the currently displayed image in the workspace. */
|
|
946
|
+
export declare interface WorkspaceImageInfo {
|
|
947
|
+
url: string;
|
|
948
|
+
width: number;
|
|
949
|
+
height: number;
|
|
1369
950
|
}
|
|
1370
951
|
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
952
|
+
declare interface WorkspaceNavigationChartAxisSnapshot {
|
|
953
|
+
mode: ChartPivotMode;
|
|
954
|
+
canRender: boolean;
|
|
955
|
+
xAxis: {
|
|
956
|
+
label: string;
|
|
957
|
+
ticks: WorkspaceNavigationChartAxisTick[];
|
|
958
|
+
};
|
|
959
|
+
yAxis: {
|
|
960
|
+
label: string;
|
|
961
|
+
series: WorkspaceNavigationChartSeries[];
|
|
962
|
+
};
|
|
963
|
+
source: {
|
|
964
|
+
rows: number[];
|
|
965
|
+
columns: string[];
|
|
1380
966
|
};
|
|
1381
967
|
}
|
|
1382
968
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
declare interface WorkspaceLayoutState {
|
|
1389
|
-
direction: LayoutDirection;
|
|
1390
|
-
active: boolean;
|
|
1391
|
-
setDirection: (direction: LayoutDirection) => void;
|
|
1392
|
-
setActive: (active: boolean) => void;
|
|
1393
|
-
toggleActive: () => void;
|
|
969
|
+
declare interface WorkspaceNavigationChartAxisTick {
|
|
970
|
+
key: number | string;
|
|
971
|
+
label: string;
|
|
972
|
+
rowIndex?: number;
|
|
973
|
+
columnId?: string;
|
|
1394
974
|
}
|
|
1395
975
|
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
export declare interface WorkspaceRecord {
|
|
976
|
+
declare interface WorkspaceNavigationChartSeries {
|
|
1399
977
|
id: string;
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
declare interface
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
978
|
+
label: string;
|
|
979
|
+
values: Array<number | null>;
|
|
980
|
+
points: WorkspaceNavigationChartSeriesPoint[];
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
declare interface WorkspaceNavigationChartSeriesPoint {
|
|
984
|
+
axisKey: number | string;
|
|
985
|
+
rowIndex: number;
|
|
986
|
+
columnId: string;
|
|
987
|
+
elementId: string | null;
|
|
988
|
+
value: number | null;
|
|
989
|
+
rawValue: string | null;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
declare interface WorkspaceNavigationDetailContext {
|
|
993
|
+
columns: string[];
|
|
994
|
+
rows: DetailTableRow[];
|
|
995
|
+
recordName: string | null;
|
|
996
|
+
columnName: string | null;
|
|
997
|
+
contentType: string | null;
|
|
998
|
+
contentSetId: string | null;
|
|
999
|
+
schemaName: string | null;
|
|
1000
|
+
/**
|
|
1001
|
+
* @deprecated Use contentSetId.
|
|
1002
|
+
*/
|
|
1003
|
+
contentsetId?: string | null;
|
|
1004
|
+
elementId: string | null;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
declare interface WorkspaceNavigationDetailSelectionState extends WorkspaceNavigationDetailContext {
|
|
1008
|
+
activeRowId: string | null;
|
|
1009
|
+
selectedRows: number[];
|
|
1010
|
+
selectedColumns: string[];
|
|
1011
|
+
selectedCells: DetailTableCellSelection[];
|
|
1012
|
+
chartPivotMode: ChartPivotMode;
|
|
1013
|
+
chartAxisSnapshot: WorkspaceNavigationChartAxisSnapshot;
|
|
1014
|
+
detailContextResetKey: number;
|
|
1015
|
+
setChartPivotMode: (mode: ChartPivotMode) => void;
|
|
1016
|
+
toggleChartPivotMode: () => void;
|
|
1017
|
+
setContext: (context: WorkspaceNavigationDetailContext | null) => void;
|
|
1018
|
+
setActiveRowId: (rowId: string | null) => void;
|
|
1019
|
+
setSelectionSnapshot: (payload: Partial<WorkspaceNavigationDetailContext> & {
|
|
1020
|
+
selectedRows?: number[];
|
|
1021
|
+
selectedColumns?: string[];
|
|
1022
|
+
selectedCells?: DetailTableCellSelection[];
|
|
1436
1023
|
}) => void;
|
|
1437
|
-
|
|
1024
|
+
incrementDetailContextKey: () => void;
|
|
1025
|
+
toggleRowSelection: (rowIndex: number) => void;
|
|
1026
|
+
toggleColumnSelection: (columnId: string) => void;
|
|
1027
|
+
toggleCellSelection: (rowIndex: number, columnId: string) => void;
|
|
1028
|
+
clearSelection: () => void;
|
|
1438
1029
|
}
|
|
1439
1030
|
|
|
1440
1031
|
export { }
|