@konfuzio/document-validation-ui 0.1.1 → 0.1.2-pre-release-1
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.6a102cfe.css +1 -0
- package/dist/index.html +1 -1
- package/dist/js/app.8be19e1c.js +2 -0
- package/dist/js/app.8be19e1c.js.map +1 -0
- package/package.json +1 -1
- package/src/assets/scss/annotation_details.scss +1 -1
- package/src/assets/scss/categorize_modal.scss +36 -33
- package/src/assets/scss/choose_label_set_modal.scss +60 -57
- package/src/assets/scss/document_page.scss +4 -0
- package/src/assets/scss/document_top_bar.scss +0 -7
- package/src/assets/scss/variables.scss +47 -29
- package/src/components/DocumentAnnotations/ActionButtons.vue +33 -21
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +66 -109
- package/src/components/DocumentAnnotations/CategorizeModal.vue +91 -32
- package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +56 -27
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +0 -14
- package/src/components/DocumentEdit/DocumentEdit.vue +25 -36
- package/src/components/DocumentEdit/EditPages.vue +8 -17
- package/src/components/DocumentPage/DocumentPage.vue +17 -16
- package/src/components/DocumentPage/DocumentToolbar.vue +12 -24
- package/src/components/DocumentPage/NewAnnotation.vue +11 -2
- package/src/components/DocumentPage/ScrollingPage.vue +4 -17
- package/src/components/DocumentTopBar/DocumentTopBar.vue +0 -15
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +7 -2
- package/src/components/DocumentTopBar/index.js +0 -2
- package/src/locales/de.json +8 -5
- package/src/locales/en.json +6 -3
- package/src/locales/es.json +6 -3
- package/src/store/document.js +88 -9
- package/dist/css/app.0c8973f8.css +0 -1
- package/dist/js/app.17fe48c4.js +0 -2
- package/dist/js/app.17fe48c4.js.map +0 -1
- package/src/assets/scss/document_dataset_status.scss +0 -46
- package/src/assets/scss/document_handover.scss +0 -200
- package/src/components/DocumentTopBar/DocumentDatasetStatus.vue +0 -103
- package/src/components/DocumentTopBar/DocumentHandover.vue +0 -202
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="['document-edit', splitOverview && 'split-overview-component']">
|
|
3
|
-
<div
|
|
4
|
-
v-if="!splitOverview"
|
|
5
|
-
class="pages-section"
|
|
6
|
-
>
|
|
3
|
+
<div v-if="!splitOverview" class="pages-section">
|
|
7
4
|
<EditPages
|
|
8
5
|
:active-splitting-lines="activeSplittingLines"
|
|
9
6
|
@change-page="changePage"
|
|
@@ -12,20 +9,14 @@
|
|
|
12
9
|
@handle-drag-end="handleDragEnd"
|
|
13
10
|
/>
|
|
14
11
|
</div>
|
|
15
|
-
<div
|
|
16
|
-
v-else
|
|
17
|
-
class="split-overview-section"
|
|
18
|
-
>
|
|
12
|
+
<div v-else class="split-overview-section">
|
|
19
13
|
<SplitOverview
|
|
20
14
|
:file-name="fileName"
|
|
21
15
|
:file-extension="fileExtension"
|
|
22
16
|
@change-page="changePage"
|
|
23
17
|
/>
|
|
24
18
|
</div>
|
|
25
|
-
<div
|
|
26
|
-
v-if="!splitOverview"
|
|
27
|
-
class="sidebar"
|
|
28
|
-
>
|
|
19
|
+
<div v-if="!splitOverview" class="sidebar">
|
|
29
20
|
<EditSidebar
|
|
30
21
|
@rotate-left="rotatePage"
|
|
31
22
|
@rotate-right="rotatePage"
|
|
@@ -49,7 +40,7 @@ export default {
|
|
|
49
40
|
components: {
|
|
50
41
|
EditSidebar,
|
|
51
42
|
SplitOverview,
|
|
52
|
-
EditPages
|
|
43
|
+
EditPages,
|
|
53
44
|
},
|
|
54
45
|
data() {
|
|
55
46
|
return {
|
|
@@ -57,7 +48,7 @@ export default {
|
|
|
57
48
|
fileExtension: null,
|
|
58
49
|
activeSplittingLines: [],
|
|
59
50
|
dragging: false,
|
|
60
|
-
prevPageAtIndex: null
|
|
51
|
+
prevPageAtIndex: null,
|
|
61
52
|
};
|
|
62
53
|
},
|
|
63
54
|
computed: {
|
|
@@ -68,8 +59,8 @@ export default {
|
|
|
68
59
|
"documentPagesListForEditMode",
|
|
69
60
|
"updatedDocument",
|
|
70
61
|
"splitOverview",
|
|
71
|
-
"selectedPages"
|
|
72
|
-
])
|
|
62
|
+
"selectedPages",
|
|
63
|
+
]),
|
|
73
64
|
},
|
|
74
65
|
watch: {
|
|
75
66
|
pages() {
|
|
@@ -85,7 +76,7 @@ export default {
|
|
|
85
76
|
if (newValue) {
|
|
86
77
|
this.saveUpdatedDocument();
|
|
87
78
|
}
|
|
88
|
-
}
|
|
79
|
+
},
|
|
89
80
|
},
|
|
90
81
|
mounted() {
|
|
91
82
|
this.setPages();
|
|
@@ -105,15 +96,15 @@ export default {
|
|
|
105
96
|
);
|
|
106
97
|
},
|
|
107
98
|
createDocumentPagesListForEditMode() {
|
|
108
|
-
return this.selectedDocument.pages.map(page => {
|
|
99
|
+
return this.selectedDocument.pages.map((page) => {
|
|
109
100
|
return {
|
|
110
101
|
id: page.id,
|
|
111
102
|
angle: 0,
|
|
112
|
-
|
|
103
|
+
number: page.number,
|
|
113
104
|
thumbnail_url: page.thumbnail_url,
|
|
114
105
|
image_url: page.image_url,
|
|
115
106
|
size: page.size,
|
|
116
|
-
updated_at: this.selectedDocument.downloaded_at
|
|
107
|
+
updated_at: this.selectedDocument.downloaded_at,
|
|
117
108
|
};
|
|
118
109
|
});
|
|
119
110
|
},
|
|
@@ -129,13 +120,13 @@ export default {
|
|
|
129
120
|
|
|
130
121
|
/** ROTATE */
|
|
131
122
|
rotatePage(direction) {
|
|
132
|
-
const page = this.selectedPages.map(page => {
|
|
123
|
+
const page = this.selectedPages.map((page) => {
|
|
133
124
|
return page;
|
|
134
125
|
});
|
|
135
126
|
|
|
136
127
|
this.$store.dispatch("edit/rotatePage", {
|
|
137
128
|
page,
|
|
138
|
-
direction
|
|
129
|
+
direction,
|
|
139
130
|
});
|
|
140
131
|
},
|
|
141
132
|
handleRotationsToTheLeft() {
|
|
@@ -170,17 +161,13 @@ export default {
|
|
|
170
161
|
// Add page number to specific index
|
|
171
162
|
// Or replace it with 0 (to keep the same index) if it exists
|
|
172
163
|
const found = this.activeSplittingLines.find(
|
|
173
|
-
item => item === page.
|
|
164
|
+
(item) => item === page.number
|
|
174
165
|
);
|
|
175
166
|
|
|
176
167
|
if (found) {
|
|
177
|
-
this.activeSplittingLines.splice(page.
|
|
168
|
+
this.activeSplittingLines.splice(page.number - 1, 1, 0);
|
|
178
169
|
} else {
|
|
179
|
-
this.activeSplittingLines.splice(
|
|
180
|
-
page.page_number - 1,
|
|
181
|
-
1,
|
|
182
|
-
page.page_number
|
|
183
|
-
);
|
|
170
|
+
this.activeSplittingLines.splice(page.number - 1, 1, page.number);
|
|
184
171
|
}
|
|
185
172
|
|
|
186
173
|
this.saveUpdatedDocument();
|
|
@@ -189,7 +176,9 @@ export default {
|
|
|
189
176
|
this.splitFileNameFromExtension();
|
|
190
177
|
|
|
191
178
|
// Check how many sub docs we have
|
|
192
|
-
const subDocuments = this.activeSplittingLines.filter(
|
|
179
|
+
const subDocuments = this.activeSplittingLines.filter(
|
|
180
|
+
(item) => item !== 0
|
|
181
|
+
);
|
|
193
182
|
|
|
194
183
|
// Create array of objects
|
|
195
184
|
// with a fixed size based on how many sub documents are currently
|
|
@@ -201,7 +190,7 @@ export default {
|
|
|
201
190
|
const pageObject = {
|
|
202
191
|
name: this.handleFileName(i),
|
|
203
192
|
category: this.selectedDocument.category,
|
|
204
|
-
pages: this.handleSubPages(i, subDocuments)
|
|
193
|
+
pages: this.handleSubPages(i, subDocuments),
|
|
205
194
|
};
|
|
206
195
|
|
|
207
196
|
// Then we replace the "undefined" with the created object
|
|
@@ -255,24 +244,24 @@ export default {
|
|
|
255
244
|
checkMove(e) {
|
|
256
245
|
// Save the page placed originally where the page we are dragging will go
|
|
257
246
|
this.prevPageAtIndex = this.documentPagesListForEditMode.find(
|
|
258
|
-
page =>
|
|
247
|
+
(page) =>
|
|
259
248
|
this.documentPagesListForEditMode.indexOf(page) ===
|
|
260
249
|
e.draggedContext.futureIndex
|
|
261
250
|
);
|
|
262
251
|
},
|
|
263
252
|
handleDragEnd() {
|
|
264
253
|
// Update page numbers
|
|
265
|
-
const pages = this.documentPagesListForEditMode.map(page => {
|
|
254
|
+
const pages = this.documentPagesListForEditMode.map((page) => {
|
|
266
255
|
const index = this.documentPagesListForEditMode.indexOf(page);
|
|
267
256
|
return {
|
|
268
257
|
...page,
|
|
269
|
-
|
|
258
|
+
number: index + 1,
|
|
270
259
|
};
|
|
271
260
|
});
|
|
272
261
|
|
|
273
262
|
this.$store.dispatch("edit/setDocumentPagesListForEditMode", pages);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
263
|
+
},
|
|
264
|
+
},
|
|
276
265
|
};
|
|
277
266
|
</script>
|
|
278
267
|
|
|
@@ -34,10 +34,7 @@
|
|
|
34
34
|
transform: 'rotate(' + getRotation(page.id) + 'deg)',
|
|
35
35
|
}"
|
|
36
36
|
>
|
|
37
|
-
<b-skeleton
|
|
38
|
-
width="57px"
|
|
39
|
-
height="57px"
|
|
40
|
-
/>
|
|
37
|
+
<b-skeleton width="57px" height="57px" />
|
|
41
38
|
</ServerImage>
|
|
42
39
|
</div>
|
|
43
40
|
<div class="icon-container">
|
|
@@ -46,36 +43,30 @@
|
|
|
46
43
|
</div>
|
|
47
44
|
</div>
|
|
48
45
|
</div>
|
|
49
|
-
<span class="page-number">{{ page.
|
|
46
|
+
<span class="page-number">{{ page.number }}</span>
|
|
50
47
|
</div>
|
|
51
48
|
<div
|
|
52
49
|
:class="[
|
|
53
50
|
'splitting-lines',
|
|
54
51
|
activeSplittingLines &&
|
|
55
|
-
activeSplittingLines[index] === page.
|
|
52
|
+
activeSplittingLines[index] === page.number &&
|
|
56
53
|
'active-split',
|
|
57
54
|
]"
|
|
58
55
|
@click="handleSplittingLines(page)"
|
|
59
56
|
>
|
|
60
57
|
<div class="scissors-icon">
|
|
61
|
-
<b-icon
|
|
62
|
-
icon="scissors"
|
|
63
|
-
class="is-small"
|
|
64
|
-
/>
|
|
58
|
+
<b-icon icon="scissors" class="is-small" />
|
|
65
59
|
</div>
|
|
66
60
|
<div
|
|
67
61
|
v-if="
|
|
68
62
|
activeSplittingLines &&
|
|
69
|
-
|
|
63
|
+
activeSplittingLines[index] === page.number
|
|
70
64
|
"
|
|
71
65
|
class="lines"
|
|
72
66
|
>
|
|
73
67
|
<SplitZigZag />
|
|
74
68
|
</div>
|
|
75
|
-
<div
|
|
76
|
-
v-else
|
|
77
|
-
class="lines"
|
|
78
|
-
>
|
|
69
|
+
<div v-else class="lines">
|
|
79
70
|
<SplitLines />
|
|
80
71
|
</div>
|
|
81
72
|
</div>
|
|
@@ -162,10 +153,10 @@ export default {
|
|
|
162
153
|
},
|
|
163
154
|
selectPage(page) {
|
|
164
155
|
if (!page) return;
|
|
165
|
-
this.$emit("change-page", page.
|
|
156
|
+
this.$emit("change-page", page.number);
|
|
166
157
|
const selectedPage = {
|
|
167
158
|
id: page.id,
|
|
168
|
-
number: page.
|
|
159
|
+
number: page.number,
|
|
169
160
|
thumbnail_url: page.thumbnail_url,
|
|
170
161
|
};
|
|
171
162
|
this.selected = true;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
ref="pdfContainer"
|
|
4
|
+
:class="['pdf-page-container', categorizeModalIsActive && 'pointer-cursor']"
|
|
5
|
+
>
|
|
3
6
|
<NewAnnotation
|
|
4
7
|
v-if="newAnnotation && newAnnotation.length && !editAnnotation"
|
|
5
8
|
:new-annotation="newAnnotation"
|
|
@@ -48,7 +51,7 @@
|
|
|
48
51
|
<template v-for="annotation in pageAnnotations">
|
|
49
52
|
<template
|
|
50
53
|
v-for="(bbox, index) in annotation.span.filter(
|
|
51
|
-
(bbox) => bbox.page_index + 1 ==
|
|
54
|
+
(bbox) => bbox.page_index + 1 == page.number
|
|
52
55
|
)"
|
|
53
56
|
>
|
|
54
57
|
<v-rect
|
|
@@ -147,7 +150,7 @@ export default {
|
|
|
147
150
|
showFocusedAnnotation() {
|
|
148
151
|
return (
|
|
149
152
|
this.documentAnnotationSelected &&
|
|
150
|
-
this.documentAnnotationSelected.page === this.
|
|
153
|
+
this.documentAnnotationSelected.page === this.page.number &&
|
|
151
154
|
this.visiblePageRange.includes(this.documentAnnotationSelected.page) &&
|
|
152
155
|
!this.isAnnotationInEditMode(this.documentAnnotationSelected.id)
|
|
153
156
|
);
|
|
@@ -174,7 +177,7 @@ export default {
|
|
|
174
177
|
},
|
|
175
178
|
|
|
176
179
|
pageInVisibleRange() {
|
|
177
|
-
return this.visiblePageRange.includes(this.
|
|
180
|
+
return this.visiblePageRange.includes(this.page.number);
|
|
178
181
|
},
|
|
179
182
|
|
|
180
183
|
/**
|
|
@@ -215,7 +218,7 @@ export default {
|
|
|
215
218
|
this.annotations.map((annotation) => {
|
|
216
219
|
if (
|
|
217
220
|
annotation.span.find(
|
|
218
|
-
(span) => span.page_index + 1 === this.
|
|
221
|
+
(span) => span.page_index + 1 === this.page.number
|
|
219
222
|
)
|
|
220
223
|
) {
|
|
221
224
|
annotations.push(annotation);
|
|
@@ -225,16 +228,9 @@ export default {
|
|
|
225
228
|
return annotations;
|
|
226
229
|
},
|
|
227
230
|
|
|
228
|
-
pageNumber() {
|
|
229
|
-
if (this.editMode) {
|
|
230
|
-
return this.page.page_number;
|
|
231
|
-
}
|
|
232
|
-
return this.page.number;
|
|
233
|
-
},
|
|
234
|
-
|
|
235
231
|
selection() {
|
|
236
232
|
return this.$store.getters["selection/getSelectionForPage"](
|
|
237
|
-
this.
|
|
233
|
+
this.page.number
|
|
238
234
|
);
|
|
239
235
|
},
|
|
240
236
|
|
|
@@ -252,6 +248,7 @@ export default {
|
|
|
252
248
|
"selectedDocument",
|
|
253
249
|
"publicView",
|
|
254
250
|
"selectedEntities",
|
|
251
|
+
"categorizeModalIsActive",
|
|
255
252
|
]),
|
|
256
253
|
...mapState("edit", ["editMode"]),
|
|
257
254
|
...mapGetters("display", ["visiblePageRange", "bboxToRect"]),
|
|
@@ -300,6 +297,8 @@ export default {
|
|
|
300
297
|
},
|
|
301
298
|
|
|
302
299
|
onMouseDown(event) {
|
|
300
|
+
if (this.categorizeModalIsActive) return;
|
|
301
|
+
|
|
303
302
|
this.closePopups();
|
|
304
303
|
|
|
305
304
|
// check if element and delegate to it
|
|
@@ -324,7 +323,7 @@ export default {
|
|
|
324
323
|
|
|
325
324
|
const position = this.$refs.stage.getStage().getPointerPosition();
|
|
326
325
|
this.startSelection({
|
|
327
|
-
pageNumber: this.
|
|
326
|
+
pageNumber: this.page.number,
|
|
328
327
|
start: {
|
|
329
328
|
x: position.x,
|
|
330
329
|
y: position.y,
|
|
@@ -366,7 +365,7 @@ export default {
|
|
|
366
365
|
},
|
|
367
366
|
|
|
368
367
|
handleClickedEntity(entity) {
|
|
369
|
-
if (!entity) return;
|
|
368
|
+
if (!entity || this.categorizeModalIsActive) return;
|
|
370
369
|
|
|
371
370
|
// Check if we are creating a new Annotation
|
|
372
371
|
// or if we are editing an existing or empty one
|
|
@@ -404,7 +403,9 @@ export default {
|
|
|
404
403
|
},
|
|
405
404
|
|
|
406
405
|
onElementEnter() {
|
|
407
|
-
this
|
|
406
|
+
if (!this.categorizeModalIsActive) {
|
|
407
|
+
this.$refs.stage.$el.style.cursor = "pointer";
|
|
408
|
+
}
|
|
408
409
|
},
|
|
409
410
|
|
|
410
411
|
onElementLeave() {
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
<b-tooltip
|
|
5
5
|
:label="tooltipInfo"
|
|
6
6
|
multilined
|
|
7
|
-
type="is-dark"
|
|
8
7
|
:active="editModeDisabled"
|
|
9
8
|
size="is-large"
|
|
9
|
+
class="top-aligned"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
12
|
v-if="!editMode"
|
|
13
13
|
:class="[
|
|
14
14
|
'icons icons-left',
|
|
15
|
-
editModeDisabled && 'edit-mode-disabled'
|
|
15
|
+
editModeDisabled && 'edit-mode-disabled',
|
|
16
16
|
]"
|
|
17
17
|
@click="handleEdit"
|
|
18
18
|
>
|
|
@@ -22,27 +22,15 @@
|
|
|
22
22
|
<span class="edit-text">{{ $t("edit") }}</span>
|
|
23
23
|
</div>
|
|
24
24
|
</b-tooltip>
|
|
25
|
-
<div
|
|
26
|
-
v-if="!editMode"
|
|
27
|
-
class="toolbar-divider"
|
|
28
|
-
/>
|
|
25
|
+
<div v-if="!editMode" class="toolbar-divider" />
|
|
29
26
|
<div class="icons icons-right">
|
|
30
|
-
<div
|
|
31
|
-
class="fit-zoom icon"
|
|
32
|
-
@click.prevent.stop="fitAuto"
|
|
33
|
-
>
|
|
27
|
+
<div class="fit-zoom icon" @click.prevent.stop="fitAuto">
|
|
34
28
|
<FitZoomIcon />
|
|
35
29
|
</div>
|
|
36
|
-
<div
|
|
37
|
-
class="zoom-in icon"
|
|
38
|
-
@click.prevent.stop="zoomIn"
|
|
39
|
-
>
|
|
30
|
+
<div class="zoom-in icon" @click.prevent.stop="zoomIn">
|
|
40
31
|
<PlusIcon />
|
|
41
32
|
</div>
|
|
42
|
-
<div
|
|
43
|
-
class="zoom-out icon"
|
|
44
|
-
@click.prevent.stop="zoomOut"
|
|
45
|
-
>
|
|
33
|
+
<div class="zoom-out icon" @click.prevent.stop="zoomOut">
|
|
46
34
|
<MinusIcon />
|
|
47
35
|
</div>
|
|
48
36
|
<div class="percentage">
|
|
@@ -66,7 +54,7 @@ export default {
|
|
|
66
54
|
FitZoomIcon,
|
|
67
55
|
PlusIcon,
|
|
68
56
|
MinusIcon,
|
|
69
|
-
EditDocIcon
|
|
57
|
+
EditDocIcon,
|
|
70
58
|
},
|
|
71
59
|
data() {
|
|
72
60
|
return {
|
|
@@ -76,21 +64,21 @@ export default {
|
|
|
76
64
|
fitPercentage: 0.5,
|
|
77
65
|
toolbarModalOpen: true,
|
|
78
66
|
editModeDisabled: false,
|
|
79
|
-
tooltipInfo: null
|
|
67
|
+
tooltipInfo: null,
|
|
80
68
|
};
|
|
81
69
|
},
|
|
82
70
|
computed: {
|
|
83
71
|
...mapState("display", ["scale"]),
|
|
84
72
|
...mapState("edit", ["editMode"]),
|
|
85
73
|
...mapState("document", ["selectedDocument", "recalculatingAnnotations"]),
|
|
86
|
-
...mapGetters("document", ["documentCannotBeEdited"])
|
|
74
|
+
...mapGetters("document", ["documentCannotBeEdited"]),
|
|
87
75
|
},
|
|
88
76
|
watch: {
|
|
89
77
|
selectedDocument(newValue) {
|
|
90
78
|
if (this.documentCannotBeEdited(newValue)) {
|
|
91
79
|
this.editModeDisabled = true;
|
|
92
80
|
}
|
|
93
|
-
}
|
|
81
|
+
},
|
|
94
82
|
},
|
|
95
83
|
mounted() {
|
|
96
84
|
this.defaultScale = this.scale;
|
|
@@ -137,8 +125,8 @@ export default {
|
|
|
137
125
|
this.$store.dispatch("display/updateFit", "custom").then(() => {
|
|
138
126
|
this.$store.dispatch("display/updateScale", { scale });
|
|
139
127
|
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
128
|
+
},
|
|
129
|
+
},
|
|
142
130
|
};
|
|
143
131
|
</script>
|
|
144
132
|
|
|
@@ -55,13 +55,16 @@
|
|
|
55
55
|
</b-button>
|
|
56
56
|
</b-dropdown>
|
|
57
57
|
<b-tooltip
|
|
58
|
-
:label="$t('no_labels_available')"
|
|
59
58
|
multilined
|
|
60
|
-
type="is-dark"
|
|
61
59
|
:active="selectedSet && (!labels || labels.length === 0)"
|
|
62
60
|
size="is-large"
|
|
63
61
|
position="is-bottom"
|
|
62
|
+
class="bottom-aligned"
|
|
63
|
+
:close-delay="5000"
|
|
64
64
|
>
|
|
65
|
+
<template #content>
|
|
66
|
+
<div ref="tooltipContent"></div>
|
|
67
|
+
</template>
|
|
65
68
|
<b-dropdown
|
|
66
69
|
v-model="selectedLabel"
|
|
67
70
|
aria-role="list"
|
|
@@ -199,6 +202,8 @@ export default {
|
|
|
199
202
|
// prevent click propagation when opening the popup
|
|
200
203
|
document.body.addEventListener("click", this.clickOutside);
|
|
201
204
|
}, 200);
|
|
205
|
+
|
|
206
|
+
this.setTooltipText();
|
|
202
207
|
},
|
|
203
208
|
destroyed() {
|
|
204
209
|
document.body.removeEventListener("click", this.clickOutside);
|
|
@@ -276,6 +281,10 @@ export default {
|
|
|
276
281
|
},
|
|
277
282
|
});
|
|
278
283
|
},
|
|
284
|
+
setTooltipText() {
|
|
285
|
+
// Text set from innerHTML vs 'label' due to html tag in locales file string
|
|
286
|
+
this.$refs.tooltipContent.innerHTML = this.$t("no_labels_available");
|
|
287
|
+
},
|
|
279
288
|
},
|
|
280
289
|
};
|
|
281
290
|
</script>
|
|
@@ -113,20 +113,12 @@ export default {
|
|
|
113
113
|
},
|
|
114
114
|
isElementFocused(focused) {
|
|
115
115
|
if (!this.loading && focused) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// TODO: have the same name for page.number in the edit mode so there's no need to do this validations
|
|
119
|
-
if (this.editMode) {
|
|
120
|
-
pageNumber = this.page.page_number;
|
|
121
|
-
} else {
|
|
122
|
-
pageNumber = this.page.number;
|
|
123
|
-
}
|
|
124
|
-
this.$store.dispatch("display/updateCurrentPage", pageNumber);
|
|
116
|
+
this.$store.dispatch("display/updateCurrentPage", this.page.number);
|
|
125
117
|
}
|
|
126
118
|
},
|
|
127
119
|
currentPage(number) {
|
|
128
120
|
if (
|
|
129
|
-
(this.page.number === number || this.page.
|
|
121
|
+
(this.page.number === number || this.page.number === number) &&
|
|
130
122
|
!this.isElementFocused
|
|
131
123
|
) {
|
|
132
124
|
this.$emit("page-jump", this.elementTop);
|
|
@@ -147,14 +139,9 @@ export default {
|
|
|
147
139
|
});
|
|
148
140
|
},
|
|
149
141
|
pageInVisibleRange(page) {
|
|
150
|
-
let number;
|
|
151
|
-
if (this.editMode) {
|
|
152
|
-
number = page.page_number;
|
|
153
|
-
} else {
|
|
154
|
-
number = page.number;
|
|
155
|
-
}
|
|
156
142
|
return (
|
|
157
|
-
this.currentPage === number ||
|
|
143
|
+
this.currentPage === page.number ||
|
|
144
|
+
this.visiblePageRange.includes(page.number)
|
|
158
145
|
);
|
|
159
146
|
},
|
|
160
147
|
updateElementBounds() {
|
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
<DocumentCategory
|
|
9
9
|
v-if="categories && !editMode && !recalculatingAnnotations"
|
|
10
10
|
/>
|
|
11
|
-
<DocumentDatasetStatus
|
|
12
|
-
v-if="showDatasetDropdown && !editMode && !recalculatingAnnotations"
|
|
13
|
-
:dataset-status="selectedDocument.dataset_status"
|
|
14
|
-
/>
|
|
15
11
|
</div>
|
|
16
12
|
|
|
17
13
|
<DocumentName :data-file-name="selectedDocument.data_file_name" />
|
|
@@ -29,7 +25,6 @@
|
|
|
29
25
|
class="read-only-info"
|
|
30
26
|
>
|
|
31
27
|
<b-tooltip
|
|
32
|
-
type="is-dark"
|
|
33
28
|
:animated="false"
|
|
34
29
|
position="is-bottom"
|
|
35
30
|
class="right-aligned width-184"
|
|
@@ -64,10 +59,6 @@
|
|
|
64
59
|
<div class="top-bar-buttons">
|
|
65
60
|
<DocumentTopBarButtons />
|
|
66
61
|
</div>
|
|
67
|
-
|
|
68
|
-
<div v-if="showHandoverButton && !editMode" class="handover">
|
|
69
|
-
<DocumentHandover />
|
|
70
|
-
</div>
|
|
71
62
|
</div>
|
|
72
63
|
</div>
|
|
73
64
|
<div v-else class="loading-top-bar">
|
|
@@ -78,10 +69,8 @@
|
|
|
78
69
|
|
|
79
70
|
<script>
|
|
80
71
|
import { mapState } from "vuex";
|
|
81
|
-
import DocumentDatasetStatus from "./DocumentDatasetStatus";
|
|
82
72
|
import DocumentCategory from "../../components/DocumentCategory";
|
|
83
73
|
import DocumentName from "./DocumentName";
|
|
84
|
-
import DocumentHandover from "./DocumentHandover";
|
|
85
74
|
import DocumentTopBarButtons from "./DocumentTopBarButtons";
|
|
86
75
|
import KeyboardActionsDescription from "./KeyboardActionsDescription";
|
|
87
76
|
|
|
@@ -94,17 +83,13 @@ export default {
|
|
|
94
83
|
name: "DocumentTopBar",
|
|
95
84
|
components: {
|
|
96
85
|
DocumentCategory,
|
|
97
|
-
DocumentDatasetStatus,
|
|
98
86
|
DocumentName,
|
|
99
|
-
DocumentHandover,
|
|
100
87
|
DocumentTopBarButtons,
|
|
101
88
|
KeyboardActionsDescription,
|
|
102
89
|
},
|
|
103
90
|
data() {
|
|
104
91
|
return {
|
|
105
92
|
categoryError: false,
|
|
106
|
-
showDatasetDropdown: false,
|
|
107
|
-
showHandoverButton: false,
|
|
108
93
|
};
|
|
109
94
|
},
|
|
110
95
|
computed: {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
class="finish-review-button-container"
|
|
29
29
|
>
|
|
30
30
|
<ActionButtons
|
|
31
|
-
:finish-review-btn="
|
|
31
|
+
:finish-review-btn="annotationSets && annotationSets.length > 0"
|
|
32
32
|
:finish-disabled="finishDisabled"
|
|
33
33
|
:is-loading="isLoading"
|
|
34
34
|
@finish-review="handleFinishReview"
|
|
@@ -60,6 +60,7 @@ export default {
|
|
|
60
60
|
"selectedDocument",
|
|
61
61
|
"publicView",
|
|
62
62
|
"finishedReview",
|
|
63
|
+
"annotationSets",
|
|
63
64
|
]),
|
|
64
65
|
...mapState("edit", ["editMode", "splitOverview", "updatedDocument"]),
|
|
65
66
|
},
|
|
@@ -96,7 +97,11 @@ export default {
|
|
|
96
97
|
handleButton() {
|
|
97
98
|
// Check if we are not in the split overview
|
|
98
99
|
// and if we have a split document
|
|
99
|
-
if (
|
|
100
|
+
if (
|
|
101
|
+
!this.splitOverview &&
|
|
102
|
+
this.updatedDocument &&
|
|
103
|
+
this.updatedDocument.length > 1
|
|
104
|
+
) {
|
|
100
105
|
// Enable the "next" button to go to the overview
|
|
101
106
|
this.$store.dispatch("edit/setSplitOverview", true);
|
|
102
107
|
this.$store.dispatch("edit/setSelectedPages", null);
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { default as DocumentTopBar } from "./DocumentTopBar";
|
|
2
2
|
export { default as DocumentName } from "./DocumentName";
|
|
3
|
-
export { default as DatasetStatus } from "./DocumentDatasetStatus";
|
|
4
|
-
export { default as Handover } from "./DocumentHandover";
|
|
5
3
|
export { default as DocumentTopBarButtons } from "./DocumentTopBarButtons";
|
package/src/locales/de.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ok": "Ok, verstanden",
|
|
35
35
|
"no_data_found": "Zum Bearbeiten anklicken...",
|
|
36
36
|
"draw_box_document": "Find <i>{label_name}</i> in the document",
|
|
37
|
-
"
|
|
37
|
+
"confidence": "Konfidenz",
|
|
38
38
|
"not_found_in_document": "Im Dokument nicht gefunden",
|
|
39
39
|
"approved_by": "Genehmigt von",
|
|
40
40
|
"approved": "Genehmigt",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"enter_key": "Akzeptieren oder Speichern",
|
|
99
99
|
"delete_key": "Ablehnen",
|
|
100
100
|
"decline": "Decline",
|
|
101
|
-
"server_error": "
|
|
102
|
-
"get_support": "
|
|
103
|
-
"no_labels_available": "Das ausgewählte Annotations-Set enthält keine nicht ausgefüllten oder multiplen Labels.",
|
|
101
|
+
"server_error": "Wir haben derzeit ein Serverproblem. Bitte versuchen Sie es später noch einmal oder",
|
|
102
|
+
"get_support": "Hole dir Unterstützung",
|
|
103
|
+
"no_labels_available": "Das ausgewählte Annotations-Set enthält keine nicht ausgefüllten oder multiplen Labels. Weitere Informationen finden Sie unter <a href='https://help.konfuzio.com/modules/labels/index.html#multiple' target='_blank'>diesem Link</a>.",
|
|
104
104
|
"new_ann_set_title": "Neues Annotations-Set",
|
|
105
105
|
"new_ann_set_description": "Wählen Sie ein Datenmodell aus den vorhandenen aus. Das neue Annotations-Set enthält dieselben Beschriftungen.",
|
|
106
106
|
"select_label_set": "Wählen Sie das Label-Set-Modell aus",
|
|
@@ -110,5 +110,8 @@
|
|
|
110
110
|
"new_multi_ann_title": "Erstellen Sie mehrere Annotationen",
|
|
111
111
|
"new_multi_ann_description": "Wählen Sie ein Datenmodell aus den vorhandenen aus und deaktivieren Sie dann die Labels, die in diesem Dokument nicht vorhanden sind.",
|
|
112
112
|
"drag_drop_columns_multi_ann": "Drag and Drop, um die Reihenfolge der Labels zu ändern",
|
|
113
|
-
"error_creating_multi_ann": "Nicht alle Annotationen wurden erfolgreich erstellt."
|
|
113
|
+
"error_creating_multi_ann": "Nicht alle Annotationen wurden erfolgreich erstellt.",
|
|
114
|
+
"disabled_finish_review": "Der Abschluss der Dokumentenprüfung ist erst möglich, nachdem alle Annotationen überarbeitet wurden, unabhängig davon, ob sie akzeptiert oder abgelehnt wurden.",
|
|
115
|
+
"no_multi_ann_labelset_model": "Es gibt keine verfügbaren Label Sets, die mehrfach in diesem Dokument zu finden sind. Weitere Informationen finden Sie unter <a href='https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets' target='_blank'>diesem Link</a>.",
|
|
116
|
+
"single_category_in_project": "Das aktuelle Projekt hat nur eine Kategorie, die diesem Dokument bereits zugeordnet ist. Um sie ändern zu können, sollte die neue zuerst dem Projekt hinzugefügt werden. Einzelheiten dazu finden Sie unter <a href='https://help.konfuzio.com/modules/categories/index.html#add-a-category' target='_blank'>diesem Link</a>."
|
|
114
117
|
}
|
package/src/locales/en.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"ok": "Ok, got it",
|
|
34
34
|
"no_data_found": "Click to edit...",
|
|
35
35
|
"draw_box_document": "Find <i>{label_name}</i> in the document",
|
|
36
|
-
"
|
|
36
|
+
"confidence": "Confidence",
|
|
37
37
|
"not_found_in_document": "Not found in the document",
|
|
38
38
|
"approved_by": "Approved by",
|
|
39
39
|
"approved": "Approved",
|
|
@@ -106,9 +106,12 @@
|
|
|
106
106
|
"decline": "Decline",
|
|
107
107
|
"server_error": "We are currently experiencing a server issue. Please try again later or",
|
|
108
108
|
"get_support": "Get Support",
|
|
109
|
-
"no_labels_available": "There are no unfilled or multiple labels in the selected annotation set.",
|
|
109
|
+
"no_labels_available": "There are no unfilled or multiple labels in the selected annotation set. For more details, you can visit <a href='https://help.konfuzio.com/modules/labels/index.html#multiple' target='_blank'>this link</a>.",
|
|
110
110
|
"new_multi_ann_title": "Create multiple annotations",
|
|
111
111
|
"new_multi_ann_description": "Select a data model from the existing ones, then deselect the labels that don't exist in this document.",
|
|
112
112
|
"drag_drop_columns_multi_ann": "Drag and drop to change the order of the labels",
|
|
113
|
-
"error_creating_multi_ann": "Not all annotation sets were created successfully."
|
|
113
|
+
"error_creating_multi_ann": "Not all annotation sets were created successfully.",
|
|
114
|
+
"disabled_finish_review": "Finishing the document review is only possible after all annotations have been revised, whether they are accepted or rejected.",
|
|
115
|
+
"no_multi_ann_labelset_model": "There are no available label sets that can be found multiple times in this document. For more details, you can visit <a href='https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets' target='_blank'>this link</a>.",
|
|
116
|
+
"single_category_in_project": "The current project has only one category, which is already assigned to this document. To be able to change it, the new one should be first added to the project. For details on how to do this, visit <a href='https://help.konfuzio.com/modules/categories/index.html#add-a-category' target='_blank'>this link</a>."
|
|
114
117
|
}
|