@konfuzio/document-validation-ui 0.1.5 → 0.1.6-multi-ann-set
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/css/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/assets/images/DraggableIcon.vue +14 -0
- package/src/assets/images/GridIcon.vue +16 -0
- package/src/assets/images/MagicWandIcon.vue +16 -0
- package/src/assets/images/NotFoundIcon.vue +16 -0
- package/src/assets/images/SettingsIcon.vue +14 -0
- package/src/assets/images/SplitZigZag.vue +47 -14
- package/src/assets/images/StarIcon.vue +16 -0
- package/src/assets/scss/ann_set_table_options.scss +26 -0
- package/src/assets/scss/annotation_details.scss +85 -73
- package/src/assets/scss/document_annotations.scss +54 -57
- package/src/assets/scss/document_category.scss +0 -1
- package/src/assets/scss/document_dashboard.scss +7 -2
- package/src/assets/scss/document_edit.scss +90 -46
- package/src/assets/scss/main.scss +725 -7
- package/src/assets/scss/multi_ann_table_overlay.scss +44 -0
- package/src/assets/scss/splitting_confirmation_modal.scss +41 -0
- package/src/assets/scss/variables.scss +2 -657
- package/src/components/App.vue +3 -2
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +153 -0
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +28 -7
- package/src/components/DocumentAnnotations/AnnotationRow.vue +131 -40
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +86 -0
- package/src/components/DocumentAnnotations/CategorizeModal.vue +24 -2
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +114 -82
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +16 -3
- package/src/components/DocumentAnnotations/ExtractingData.vue +3 -3
- package/src/components/DocumentAnnotations/index.js +0 -1
- package/src/components/DocumentCategory.vue +13 -5
- package/src/components/DocumentDashboard.vue +17 -6
- package/src/components/DocumentEdit/DocumentEdit.vue +208 -68
- package/src/components/DocumentEdit/EditConfirmationModal.vue +54 -0
- package/src/components/DocumentEdit/EditPages.vue +29 -18
- package/src/components/DocumentEdit/EditSidebar.vue +92 -45
- package/src/components/DocumentEdit/SidebarButtons.vue +53 -0
- package/src/components/DocumentEdit/SplitInfoBar.vue +19 -0
- package/src/components/DocumentEdit/SplitOverview.vue +4 -5
- package/src/components/{DocumentError.vue → DocumentModals/DocumentErrorModal.vue} +3 -4
- package/src/components/{NotOptimizedViewportModal.vue → DocumentModals/NotOptimizedViewportModal.vue} +2 -2
- package/src/components/DocumentModals/SplittingSuggestionsModal.vue +120 -0
- package/src/components/DocumentPage/ActionBar.vue +3 -3
- package/src/components/DocumentPage/AnnSetTableOptions.vue +107 -0
- package/src/components/DocumentPage/DocumentPage.vue +12 -2
- package/src/components/DocumentPage/MultiAnnSelection.vue +89 -1
- package/src/components/DocumentPage/MultiAnnotationTableOverlay.vue +274 -0
- package/src/components/DocumentPage/MultiAnnotationTablePopup.vue +19 -46
- package/src/components/DocumentPage/ScrollingDocument.vue +43 -4
- package/src/components/DocumentPage/ScrollingPage.vue +4 -5
- package/src/components/DocumentThumbnails/DocumentThumbnails.vue +14 -11
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +35 -30
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +3 -1
- package/src/locales/de.json +23 -6
- package/src/locales/en.json +24 -6
- package/src/locales/es.json +23 -6
- package/src/store/display.js +51 -0
- package/src/store/document.js +171 -23
- package/src/store/edit.js +67 -48
- package/src/store/project.js +14 -14
- package/src/components/DocumentAnnotations/ActionButtons.vue +0 -257
- package/src/components/DocumentAnnotations/RejectedLabels.vue +0 -96
|
@@ -14,20 +14,39 @@
|
|
|
14
14
|
|
|
15
15
|
<!-- When there's no annotations in the label -->
|
|
16
16
|
<div v-else-if="annotationSets.length === 0">
|
|
17
|
-
<CategorizeModal
|
|
17
|
+
<CategorizeModal
|
|
18
|
+
v-if="!publicView && !waitingForSplittingConfirmation(selectedDocument)"
|
|
19
|
+
/>
|
|
18
20
|
<EmptyState />
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
|
-
<div
|
|
22
|
-
v-else
|
|
23
|
-
:class="[
|
|
24
|
-
'annotation-set-list',
|
|
25
|
-
missingAnnotations.length && !publicView && 'showing-rejected',
|
|
26
|
-
]"
|
|
27
|
-
>
|
|
23
|
+
<div v-else :class="['annotation-set-list']">
|
|
28
24
|
<CategorizeModal v-if="!publicView" />
|
|
29
25
|
<div
|
|
30
|
-
v-
|
|
26
|
+
v-if="Object.entries(annotationSetsInTable()).length > 0"
|
|
27
|
+
class="annotation-set-group"
|
|
28
|
+
>
|
|
29
|
+
<div class="label-set-header">
|
|
30
|
+
<div class="label-set-name">{{ $t("table") }}</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
v-for="(tableSet, index) in Object.values(annotationSetsInTable())"
|
|
34
|
+
:key="index"
|
|
35
|
+
class="ann-set-table"
|
|
36
|
+
@click="openAnnotationSetTable(tableSet)"
|
|
37
|
+
>
|
|
38
|
+
<div class="ann-set-table-icon">
|
|
39
|
+
<GridIcon /><span class="ann-set-number">{{
|
|
40
|
+
tableSet.length
|
|
41
|
+
}}</span>
|
|
42
|
+
</div>
|
|
43
|
+
<span class="ann-set-table-label-set-name">{{
|
|
44
|
+
tableSet[0].label_set.name
|
|
45
|
+
}}</span>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
v-for="(annotationSet, indexGroup) in annotationSetsToShowInList()"
|
|
31
50
|
:key="indexGroup"
|
|
32
51
|
class="annotation-set-group"
|
|
33
52
|
>
|
|
@@ -40,18 +59,25 @@
|
|
|
40
59
|
}}
|
|
41
60
|
</div>
|
|
42
61
|
<div class="labelset-action-buttons">
|
|
43
|
-
<
|
|
44
|
-
:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
62
|
+
<AnnotationSetActionButtons
|
|
63
|
+
:number-of-empty-labels-in-annotation-set="
|
|
64
|
+
emptyLabelsLength(annotationSet)
|
|
65
|
+
"
|
|
66
|
+
:number-of-pending-annotations-in-annotation-set="
|
|
67
|
+
annotationsWithPendingReviewLength(annotationSet)
|
|
49
68
|
"
|
|
50
|
-
@
|
|
51
|
-
|
|
69
|
+
@mark-all-empty-missing="
|
|
70
|
+
markAnnotationsAsMissing(null, null, annotationSet, true)
|
|
71
|
+
"
|
|
72
|
+
@hover-annotation-set-to-mark-missing="
|
|
73
|
+
handleHoverAnnotationSet(annotationSet, 'missing')
|
|
74
|
+
"
|
|
75
|
+
@leave-annotation-set-to-mark-missing="
|
|
76
|
+
handleHoverAnnotationSet(null)
|
|
77
|
+
"
|
|
78
|
+
@accept-all-pending-annotations="
|
|
79
|
+
acceptPendingAnnotationsInAnnotationSet(annotationSet)
|
|
52
80
|
"
|
|
53
|
-
@leave-annotation-set-to-reject="handleHoverAnnotationSet(null)"
|
|
54
|
-
@accept-group="acceptGroup(annotationSet)"
|
|
55
81
|
@hover-annotation-set-to-accept="
|
|
56
82
|
handleHoverAnnotationSet(annotationSet, 'accept')
|
|
57
83
|
"
|
|
@@ -61,35 +87,28 @@
|
|
|
61
87
|
</div>
|
|
62
88
|
|
|
63
89
|
<div v-for="label in annotationSet.labels" :key="label.id">
|
|
64
|
-
<div
|
|
90
|
+
<div class="labels">
|
|
65
91
|
<DocumentLabel
|
|
66
92
|
:label="label"
|
|
67
93
|
:annotation-set="annotationSet"
|
|
68
94
|
:index-group="indexGroup"
|
|
69
|
-
@handle-
|
|
95
|
+
@handle-missing-annotation="markAnnotationsAsMissing"
|
|
70
96
|
/>
|
|
71
97
|
</div>
|
|
72
98
|
</div>
|
|
73
99
|
</div>
|
|
74
100
|
</div>
|
|
75
|
-
|
|
76
|
-
<div
|
|
77
|
-
v-if="!publicView && missingAnnotations.length"
|
|
78
|
-
class="rejected-labels-list"
|
|
79
|
-
>
|
|
80
|
-
<RejectedLabels :missing-annotations="missingAnnotations" />
|
|
81
|
-
</div>
|
|
82
101
|
</div>
|
|
83
102
|
</template>
|
|
84
103
|
<script>
|
|
85
104
|
import { mapGetters, mapState } from "vuex";
|
|
86
105
|
import EmptyState from "./EmptyState";
|
|
87
106
|
import ExtractingData from "./ExtractingData";
|
|
88
|
-
import
|
|
107
|
+
import AnnotationSetActionButtons from "./AnnotationSetActionButtons";
|
|
89
108
|
import DocumentLabel from "./DocumentLabel";
|
|
90
|
-
import RejectedLabels from "./RejectedLabels";
|
|
91
109
|
import LoadingAnnotations from "./LoadingAnnotations";
|
|
92
110
|
import CategorizeModal from "./CategorizeModal";
|
|
111
|
+
import GridIcon from "../../assets/images/GridIcon";
|
|
93
112
|
|
|
94
113
|
/**
|
|
95
114
|
* This component loads all annotations for one document
|
|
@@ -98,11 +117,11 @@ export default {
|
|
|
98
117
|
components: {
|
|
99
118
|
EmptyState,
|
|
100
119
|
ExtractingData,
|
|
101
|
-
|
|
120
|
+
AnnotationSetActionButtons,
|
|
102
121
|
DocumentLabel,
|
|
103
|
-
RejectedLabels,
|
|
104
122
|
LoadingAnnotations,
|
|
105
123
|
CategorizeModal,
|
|
124
|
+
GridIcon,
|
|
106
125
|
},
|
|
107
126
|
data() {
|
|
108
127
|
return {
|
|
@@ -112,6 +131,7 @@ export default {
|
|
|
112
131
|
};
|
|
113
132
|
},
|
|
114
133
|
computed: {
|
|
134
|
+
...mapState("display", ["showAnnSetTable"]),
|
|
115
135
|
...mapState("document", [
|
|
116
136
|
"documentId",
|
|
117
137
|
"recalculatingAnnotations",
|
|
@@ -123,9 +143,17 @@ export default {
|
|
|
123
143
|
"loading",
|
|
124
144
|
"labels",
|
|
125
145
|
"selectedDocument",
|
|
146
|
+
"splittingSuggestions",
|
|
126
147
|
]),
|
|
127
148
|
...mapGetters("category", ["category"]),
|
|
128
|
-
...mapGetters("document", [
|
|
149
|
+
...mapGetters("document", [
|
|
150
|
+
"numberOfAnnotationSetGroup",
|
|
151
|
+
"emptyLabelsLength",
|
|
152
|
+
"annotationsWithPendingReviewLength",
|
|
153
|
+
"waitingForSplittingConfirmation",
|
|
154
|
+
"annotationSetsToShowInList",
|
|
155
|
+
"annotationSetsInTable",
|
|
156
|
+
]),
|
|
129
157
|
isAnnotationBeingEdited() {
|
|
130
158
|
return this.editAnnotation && this.editAnnotation.id;
|
|
131
159
|
},
|
|
@@ -263,6 +291,18 @@ export default {
|
|
|
263
291
|
this.count = currentAnnIndex + 1;
|
|
264
292
|
}
|
|
265
293
|
|
|
294
|
+
// Skip missing annotations
|
|
295
|
+
if (this.focusedAnnotationIsMarkedAsMissing(annotations, this.count)) {
|
|
296
|
+
for (let i = this.count; i < annotations.length; i++) {
|
|
297
|
+
if (!this.focusedAnnotationIsMarkedAsMissing(annotations, i)) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
this.count++;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (!annotations[this.count]) return;
|
|
305
|
+
|
|
266
306
|
annotations[this.count].click();
|
|
267
307
|
|
|
268
308
|
// scroll to current annotation if not empty
|
|
@@ -285,6 +325,18 @@ export default {
|
|
|
285
325
|
this.count = currentAnnIndex - 1;
|
|
286
326
|
}
|
|
287
327
|
|
|
328
|
+
// Skip missing annotations
|
|
329
|
+
if (this.focusedAnnotationIsMarkedAsMissing(annotations, this.count)) {
|
|
330
|
+
for (let i = this.count; i < annotations.length; i--) {
|
|
331
|
+
if (!this.focusedAnnotationIsMarkedAsMissing(annotations, i)) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
this.count--;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (!annotations[this.count]) return;
|
|
339
|
+
|
|
288
340
|
annotations[this.count].click();
|
|
289
341
|
|
|
290
342
|
// scroll to current annotation if not empty
|
|
@@ -311,9 +363,9 @@ export default {
|
|
|
311
363
|
annotations[currentAnnIndex].className.includes("label-empty") &&
|
|
312
364
|
annotations[currentAnnIndex].className.includes("clicked")
|
|
313
365
|
) {
|
|
314
|
-
//
|
|
366
|
+
// Mark annotation as missing
|
|
315
367
|
if (this.editAnnotation.id === annotations[currentAnnIndex].id) {
|
|
316
|
-
this.
|
|
368
|
+
this.markAnnotationsAsMissing();
|
|
317
369
|
}
|
|
318
370
|
this.jumpToNextAnnotation = true;
|
|
319
371
|
} else {
|
|
@@ -322,45 +374,17 @@ export default {
|
|
|
322
374
|
}
|
|
323
375
|
},
|
|
324
376
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
// or if the document is in public mode
|
|
328
|
-
if (
|
|
329
|
-
this.missingAnnotations.length === 0 ||
|
|
330
|
-
!this.showMissingAnnotations()
|
|
331
|
-
) {
|
|
332
|
-
return true;
|
|
333
|
-
} else {
|
|
334
|
-
let found;
|
|
335
|
-
|
|
336
|
-
if (annotationSet && annotationSet.id) {
|
|
337
|
-
found = this.missingAnnotations.filter(
|
|
338
|
-
(el) =>
|
|
339
|
-
el.label === label.id && el.annotation_set === annotationSet.id
|
|
340
|
-
);
|
|
341
|
-
} else {
|
|
342
|
-
found = this.missingAnnotations.filter(
|
|
343
|
-
(el) =>
|
|
344
|
-
el.label === label.id &&
|
|
345
|
-
el.label_set === annotationSet.label_set.id
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (found.length !== 0) {
|
|
350
|
-
return false;
|
|
351
|
-
} else {
|
|
352
|
-
return true;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
377
|
+
focusedAnnotationIsMarkedAsMissing(annotations, index) {
|
|
378
|
+
return annotations[index].classList.value.includes("missing-annotation");
|
|
355
379
|
},
|
|
356
380
|
|
|
357
|
-
|
|
358
|
-
let
|
|
381
|
+
markAnnotationsAsMissing(label, labelSet, annotationSet, markAllMissing) {
|
|
382
|
+
let missing;
|
|
359
383
|
|
|
360
|
-
if (label && labelSet && !
|
|
361
|
-
// if
|
|
384
|
+
if (label && labelSet && !markAllMissing) {
|
|
385
|
+
// if annotation is marked as missing by clicking the button
|
|
362
386
|
|
|
363
|
-
|
|
387
|
+
missing = [
|
|
364
388
|
{
|
|
365
389
|
document: parseInt(this.documentId),
|
|
366
390
|
label: label,
|
|
@@ -369,24 +393,24 @@ export default {
|
|
|
369
393
|
},
|
|
370
394
|
];
|
|
371
395
|
} else if (this.editAnnotation && this.editAnnotation.id !== null) {
|
|
372
|
-
//
|
|
396
|
+
// iif annotation is marked as missing from "delete" key
|
|
373
397
|
|
|
374
|
-
|
|
398
|
+
missing = {
|
|
375
399
|
document: parseInt(this.documentId),
|
|
376
400
|
label: this.editAnnotation.label,
|
|
377
401
|
label_set: this.editAnnotation.labelSet,
|
|
378
402
|
annotation_set: this.editAnnotation.annotationSet,
|
|
379
403
|
};
|
|
380
|
-
} else if (annotationSet &&
|
|
381
|
-
//
|
|
404
|
+
} else if (annotationSet && markAllMissing) {
|
|
405
|
+
// mark all annotations as missing in annotation set
|
|
382
406
|
|
|
383
407
|
const allEmptyLabels = annotationSet.labels.filter(
|
|
384
408
|
(label) => label.annotations.length === 0
|
|
385
409
|
);
|
|
386
410
|
|
|
387
|
-
// Check if any of the empty annotations was already
|
|
411
|
+
// Check if any of the empty annotations was already marked as missing individually
|
|
388
412
|
// and remove them
|
|
389
|
-
const
|
|
413
|
+
const toMarkAsMissing = [];
|
|
390
414
|
|
|
391
415
|
allEmptyLabels.map((label) => {
|
|
392
416
|
const found = this.missingAnnotations.find(
|
|
@@ -397,11 +421,11 @@ export default {
|
|
|
397
421
|
);
|
|
398
422
|
|
|
399
423
|
if (!found) {
|
|
400
|
-
|
|
424
|
+
toMarkAsMissing.push(label);
|
|
401
425
|
}
|
|
402
426
|
});
|
|
403
427
|
|
|
404
|
-
|
|
428
|
+
missing = toMarkAsMissing.map((label) => {
|
|
405
429
|
return {
|
|
406
430
|
document: parseInt(this.documentId),
|
|
407
431
|
label: label.id,
|
|
@@ -411,10 +435,10 @@ export default {
|
|
|
411
435
|
});
|
|
412
436
|
}
|
|
413
437
|
|
|
414
|
-
this.$store.dispatch("document/
|
|
438
|
+
this.$store.dispatch("document/setAnnotationsMarkedAsMissing", missing);
|
|
415
439
|
|
|
416
440
|
this.$store
|
|
417
|
-
.dispatch("document/addMissingAnnotations",
|
|
441
|
+
.dispatch("document/addMissingAnnotations", missing)
|
|
418
442
|
.then((response) => {
|
|
419
443
|
if (response) {
|
|
420
444
|
this.jumpToNextAnnotation = true;
|
|
@@ -430,7 +454,7 @@ export default {
|
|
|
430
454
|
});
|
|
431
455
|
})
|
|
432
456
|
.finally(() => {
|
|
433
|
-
this.$store.dispatch("document/
|
|
457
|
+
this.$store.dispatch("document/setAnnotationsMarkedAsMissing", null);
|
|
434
458
|
});
|
|
435
459
|
},
|
|
436
460
|
|
|
@@ -449,7 +473,7 @@ export default {
|
|
|
449
473
|
this.$store.dispatch("document/setHoveredAnnotationSet", hovered);
|
|
450
474
|
},
|
|
451
475
|
|
|
452
|
-
|
|
476
|
+
acceptPendingAnnotationsInAnnotationSet(annotationSet) {
|
|
453
477
|
const annotationsToAccept = [];
|
|
454
478
|
|
|
455
479
|
annotationSet.labels.map((label) => {
|
|
@@ -480,6 +504,14 @@ export default {
|
|
|
480
504
|
});
|
|
481
505
|
}
|
|
482
506
|
},
|
|
507
|
+
|
|
508
|
+
openAnnotationSetTable(tableSet) {
|
|
509
|
+
if (this.showAnnSetTable && this.showAnnSetTable === tableSet) {
|
|
510
|
+
this.$store.dispatch("display/toggleAnnSetTable", tableSet);
|
|
511
|
+
} else {
|
|
512
|
+
this.$store.dispatch("display/showAnnSetTable", tableSet);
|
|
513
|
+
}
|
|
514
|
+
},
|
|
483
515
|
},
|
|
484
516
|
};
|
|
485
517
|
</script>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
'error-editing',
|
|
13
13
|
isEmptyAnnotationEditable() ? '' : 'label-empty',
|
|
14
14
|
isAnnotationBeingEdited() && 'clicked',
|
|
15
|
+
annotationIsNotFound(annotationSet, label) && 'missing-annotation',
|
|
15
16
|
]"
|
|
16
17
|
:contenteditable="isEmptyAnnotationEditable()"
|
|
17
18
|
@keypress.enter="saveEmptyAnnotationChanges"
|
|
@@ -21,6 +22,12 @@
|
|
|
21
22
|
<span v-if="span && span.offset_string && isEmptyAnnotationEditable()">
|
|
22
23
|
{{ span.offset_string }}
|
|
23
24
|
</span>
|
|
25
|
+
<span
|
|
26
|
+
v-else-if="annotationIsNotFound(annotationSet, label)"
|
|
27
|
+
class="not-found-text"
|
|
28
|
+
>
|
|
29
|
+
{{ $t("missing_from_document") }}
|
|
30
|
+
</span>
|
|
24
31
|
<span v-else>
|
|
25
32
|
{{ $t("no_data_found") }}
|
|
26
33
|
</span>
|
|
@@ -68,6 +75,7 @@ export default {
|
|
|
68
75
|
...mapGetters("document", [
|
|
69
76
|
"isAnnotationInEditMode",
|
|
70
77
|
"getTextFromEntities",
|
|
78
|
+
"annotationIsNotFound",
|
|
71
79
|
]),
|
|
72
80
|
...mapGetters("selection", ["isValueArray"]),
|
|
73
81
|
...mapState("selection", ["spanSelection", "elementSelected"]),
|
|
@@ -133,6 +141,7 @@ export default {
|
|
|
133
141
|
}
|
|
134
142
|
},
|
|
135
143
|
},
|
|
144
|
+
|
|
136
145
|
methods: {
|
|
137
146
|
emptyAnnotationId() {
|
|
138
147
|
if (!this.annotationSet || !this.label) return;
|
|
@@ -147,7 +156,11 @@ export default {
|
|
|
147
156
|
return this.isAnnotationInEditMode(this.emptyAnnotationId());
|
|
148
157
|
},
|
|
149
158
|
handleEditEmptyAnnotation() {
|
|
150
|
-
if (
|
|
159
|
+
if (
|
|
160
|
+
this.publicView ||
|
|
161
|
+
this.annotationIsNotFound(this.annotationSet, this.label)
|
|
162
|
+
)
|
|
163
|
+
return;
|
|
151
164
|
|
|
152
165
|
if (
|
|
153
166
|
!this.publicView &&
|
|
@@ -190,8 +203,8 @@ export default {
|
|
|
190
203
|
this.elementSelected === this.emptyAnnotationId() && !this.isLoading
|
|
191
204
|
);
|
|
192
205
|
} else if (
|
|
193
|
-
this.spanSelection &&
|
|
194
|
-
this.
|
|
206
|
+
(this.spanSelection && this.spanSelection[this.spanIndex] === 0) ||
|
|
207
|
+
this.annotationIsNotFound(this.annotationSet, this.label)
|
|
195
208
|
) {
|
|
196
209
|
return false;
|
|
197
210
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="data-extraction-container">
|
|
3
3
|
<div class="loading-container">
|
|
4
|
-
<
|
|
4
|
+
<AnnotationActionButtons
|
|
5
5
|
:is-loading="true"
|
|
6
6
|
:save-btn="false"
|
|
7
7
|
:cancel-btn="false"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
21
21
|
<script>
|
|
22
|
-
import
|
|
22
|
+
import AnnotationActionButtons from "./AnnotationActionButtons";
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
25
|
name: "ExtractingData",
|
|
26
|
-
components: {
|
|
26
|
+
components: { AnnotationActionButtons },
|
|
27
27
|
};
|
|
28
28
|
</script>
|
|
29
29
|
<style scoped lang="scss" src="../../assets/scss/extracting_data.scss"></style>
|
|
@@ -3,6 +3,5 @@ export { default as AnnotationContent } from "./AnnotationContent";
|
|
|
3
3
|
export { default as EmptyAnnotation } from "./EmptyAnnotation";
|
|
4
4
|
export { default as DocumentLabel } from "./DocumentLabel";
|
|
5
5
|
export { default as AnnotationDetails } from "./AnnotationDetails";
|
|
6
|
-
export { default as RejectedLabels } from "./RejectedLabels";
|
|
7
6
|
export { default as ChooseLabelSetModal } from "./ChooseLabelSetModal";
|
|
8
7
|
export { default as AnnotationRow } from "./AnnotationRow";
|
|
@@ -29,11 +29,7 @@
|
|
|
29
29
|
{{ $t("category") }}
|
|
30
30
|
</p>
|
|
31
31
|
<div class="category-name">
|
|
32
|
-
{{
|
|
33
|
-
!splitMode
|
|
34
|
-
? categoryName(selectedDocument.category)
|
|
35
|
-
: categoryName(updatedDocument[index].category)
|
|
36
|
-
}}
|
|
32
|
+
{{ setCategoryDefaultText }}
|
|
37
33
|
</div>
|
|
38
34
|
</div>
|
|
39
35
|
<div :class="[!splitMode && 'caret-section']">
|
|
@@ -102,6 +98,18 @@ export default {
|
|
|
102
98
|
...mapState("document", ["selectedDocument", "annotations"]),
|
|
103
99
|
...mapState("category", ["categories"]),
|
|
104
100
|
...mapState("edit", ["editMode", "updatedDocument"]),
|
|
101
|
+
|
|
102
|
+
setCategoryDefaultText() {
|
|
103
|
+
if (!this.splitMode) {
|
|
104
|
+
return this.categoryName(this.selectedDocument.category);
|
|
105
|
+
} else {
|
|
106
|
+
const categoryName = this.categoryName(
|
|
107
|
+
this.updatedDocument[this.index].category
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return categoryName ? categoryName : this.$t("choose_category");
|
|
111
|
+
}
|
|
112
|
+
},
|
|
105
113
|
},
|
|
106
114
|
watch: {
|
|
107
115
|
categories(newValue) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="dashboard">
|
|
3
3
|
<DocumentTopBar />
|
|
4
|
-
<div :class="['dashboard-viewer',
|
|
4
|
+
<div :class="['dashboard-viewer', splitOverview ? 'edit-mode' : '']">
|
|
5
5
|
<DocumentThumbnails v-if="!editMode" ref="documentPages" />
|
|
6
6
|
<ScrollingDocument ref="scrollingDocument" class="dashboard-document" />
|
|
7
7
|
<DocumentAnnotations v-if="!editMode" ref="annotations" />
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</transition>
|
|
19
19
|
</div>
|
|
20
20
|
<div v-if="showDocumentError" class="error-modal">
|
|
21
|
-
<
|
|
21
|
+
<DocumentErrorModal />
|
|
22
22
|
</div>
|
|
23
23
|
<div v-if="!optimalResolution" class="not-optimized">
|
|
24
24
|
<NotOptimizedViewportModal />
|
|
@@ -28,6 +28,13 @@
|
|
|
28
28
|
{{ $t("resolution_not_supported") }}
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
|
+
<div
|
|
32
|
+
v-if="
|
|
33
|
+
selectedDocument && waitingForSplittingConfirmation(selectedDocument)
|
|
34
|
+
"
|
|
35
|
+
>
|
|
36
|
+
<SplittingSuggestionsModal />
|
|
37
|
+
</div>
|
|
31
38
|
</div>
|
|
32
39
|
</template>
|
|
33
40
|
|
|
@@ -39,8 +46,9 @@ import { DocumentThumbnails } from "./DocumentThumbnails";
|
|
|
39
46
|
import { DocumentAnnotations } from "./DocumentAnnotations";
|
|
40
47
|
import { DocumentEdit } from "./DocumentEdit";
|
|
41
48
|
import ErrorMessage from "./ErrorMessage";
|
|
42
|
-
import NotOptimizedViewportModal from "
|
|
43
|
-
import
|
|
49
|
+
import NotOptimizedViewportModal from "../components/DocumentModals/NotOptimizedViewportModal";
|
|
50
|
+
import DocumentErrorModal from "../components/DocumentModals/DocumentErrorModal";
|
|
51
|
+
import SplittingSuggestionsModal from "../components/DocumentModals/SplittingSuggestionsModal";
|
|
44
52
|
|
|
45
53
|
/**
|
|
46
54
|
* This component shows the PDF pages in a scrolling component and
|
|
@@ -56,7 +64,8 @@ export default {
|
|
|
56
64
|
DocumentEdit,
|
|
57
65
|
ErrorMessage,
|
|
58
66
|
NotOptimizedViewportModal,
|
|
59
|
-
|
|
67
|
+
DocumentErrorModal,
|
|
68
|
+
SplittingSuggestionsModal,
|
|
60
69
|
},
|
|
61
70
|
data() {
|
|
62
71
|
return {
|
|
@@ -77,9 +86,11 @@ export default {
|
|
|
77
86
|
"showDocumentError",
|
|
78
87
|
"errorMessageWidth",
|
|
79
88
|
"selectedDocument",
|
|
89
|
+
"splittingSuggestions",
|
|
80
90
|
]),
|
|
81
|
-
...mapState("edit", ["editMode"]),
|
|
91
|
+
...mapState("edit", ["editMode", "splitOverview"]),
|
|
82
92
|
...mapGetters("display", ["isMinimumWidth"]),
|
|
93
|
+
...mapGetters("document", ["waitingForSplittingConfirmation"]),
|
|
83
94
|
},
|
|
84
95
|
watch: {
|
|
85
96
|
selectedDocument(newDocument, oldDocument) {
|