@konfuzio/document-validation-ui 0.1.50 → 0.1.51-dev.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.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/dist/js/chunk-vendors.js +8 -6
- package/dist/js/chunk-vendors.js.map +1 -1
- package/package.json +2 -1
- package/src/assets/scss/annotation_action_buttons.scss +82 -0
- package/src/assets/scss/document_annotations.scss +331 -419
- package/src/assets/scss/document_dashboard.scss +0 -7
- package/src/assets/scss/document_edit.scss +3 -1
- package/src/assets/scss/document_top_bar.scss +72 -68
- package/src/assets/scss/theme.scss +89 -70
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +153 -106
- package/src/components/DocumentAnnotations/AnnotationRow.vue +72 -19
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +4 -4
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +7 -3
- package/src/components/DocumentAnnotations/DocumentLabel.vue +42 -59
- package/src/components/DocumentAnnotations/ExtractingData.vue +1 -7
- package/src/components/DocumentCategory.vue +0 -5
- package/src/components/DocumentDashboard.vue +12 -3
- package/src/components/DocumentEdit/EditSidebar.vue +1 -1
- package/src/components/DocumentPage/DocumentPage.vue +2 -1
- package/src/components/DocumentPage/EditAnnotation.vue +21 -15
- package/src/components/DocumentPage/ScrollingDocument.vue +1 -13
- package/src/components/DocumentTopBar/DocumentTopBar.vue +42 -40
- package/src/icons.js +6 -0
- package/src/locales/de.json +3 -2
- package/src/locales/en.json +3 -2
- package/src/locales/es.json +3 -2
- package/src/main.js +2 -0
- package/src/store/display.js +12 -10
- package/src/store/document.js +3 -0
- package/src/components/DocumentPage/ActionBar.vue +0 -48
|
@@ -1,67 +1,51 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="label">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</
|
|
16
|
-
</div>
|
|
17
|
-
<div class="label-group-right">
|
|
18
|
-
<div v-if="!publicView" class="label-annotations-pending">
|
|
19
|
-
{{
|
|
20
|
-
`${
|
|
21
|
-
label.annotations.length - acceptedAnnotationsGroupCounter
|
|
22
|
-
} ${$t("annotations_pending")}`
|
|
23
|
-
}}
|
|
24
|
-
</div>
|
|
25
|
-
<div v-if="!publicView" class="label-annotations-accepted">
|
|
26
|
-
{{
|
|
27
|
-
`${acceptedAnnotationsGroupCounter} ${$t("annotations_accepted")}`
|
|
28
|
-
}}
|
|
29
|
-
</div>
|
|
3
|
+
<div
|
|
4
|
+
v-if="isGroup"
|
|
5
|
+
:class="['label-group', !showAnnotationsGroup && 'keyboard-nav']"
|
|
6
|
+
@click.stop="toggleGroup"
|
|
7
|
+
>
|
|
8
|
+
<div class="label-group-left">
|
|
9
|
+
<b-icon
|
|
10
|
+
:icon="showAnnotationsGroup ? 'angle-up' : 'angle-down'"
|
|
11
|
+
size="is-16"
|
|
12
|
+
class="caret"
|
|
13
|
+
/>
|
|
14
|
+
<div class="label-name">
|
|
15
|
+
<span>{{ `${label.name} (${label.annotations.length})` }}</span>
|
|
30
16
|
</div>
|
|
31
17
|
</div>
|
|
32
|
-
<div
|
|
33
|
-
v-if="
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
<div class="label-group-right">
|
|
19
|
+
<div v-if="!publicView" class="label-annotations-pending">
|
|
20
|
+
{{
|
|
21
|
+
`${label.annotations.length - acceptedAnnotationsGroupCounter} ${$t(
|
|
22
|
+
"annotations_pending"
|
|
23
|
+
)}`
|
|
24
|
+
}}
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="!publicView" class="label-annotations-accepted">
|
|
27
|
+
{{
|
|
28
|
+
`${acceptedAnnotationsGroupCounter} ${$t("annotations_accepted")}`
|
|
29
|
+
}}
|
|
30
|
+
</div>
|
|
44
31
|
</div>
|
|
45
32
|
</div>
|
|
46
|
-
<div
|
|
33
|
+
<div
|
|
34
|
+
v-if="showAnnotationsGroup && annotationSet"
|
|
35
|
+
:class="isGroup && 'label-group-annotation-list'"
|
|
36
|
+
>
|
|
47
37
|
<AnnotationRow
|
|
48
|
-
v-for="annotation in
|
|
49
|
-
|
|
38
|
+
v-for="(annotation, index) in hasAnnotations
|
|
39
|
+
? label.annotations
|
|
40
|
+
: [singleAnnotation]"
|
|
41
|
+
:key="index"
|
|
50
42
|
:annotation="annotation"
|
|
51
43
|
:label="label"
|
|
52
44
|
:annotation-set="annotationSet"
|
|
53
45
|
:label-set="annotationSet.label_set"
|
|
54
46
|
/>
|
|
55
47
|
</div>
|
|
56
|
-
<div v-else-if="
|
|
57
|
-
<AnnotationRow
|
|
58
|
-
:annotation="singleAnnotation"
|
|
59
|
-
:label="label"
|
|
60
|
-
:annotation-set="annotationSet"
|
|
61
|
-
:label-set="annotationSet.label_set"
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
<div v-else-if="labelSet">
|
|
48
|
+
<div v-else-if="showAnnotationsGroup && labelSet">
|
|
65
49
|
<AnnotationRow :label="label" :label-set="labelSet" />
|
|
66
50
|
</div>
|
|
67
51
|
</div>
|
|
@@ -114,6 +98,9 @@ export default {
|
|
|
114
98
|
hasAnnotations() {
|
|
115
99
|
return this.label.annotations && this.label.annotations.length > 0;
|
|
116
100
|
},
|
|
101
|
+
isGroup() {
|
|
102
|
+
return this.enableGroupingFeature && this.nonMultipleAnnotationsExtracted;
|
|
103
|
+
},
|
|
117
104
|
},
|
|
118
105
|
watch: {
|
|
119
106
|
annotationId(newAnnotationId) {
|
|
@@ -155,14 +142,6 @@ export default {
|
|
|
155
142
|
|
|
156
143
|
if (annotation) {
|
|
157
144
|
this.showAnnotationsGroup = true;
|
|
158
|
-
// this.$store.dispatch("document/setSidebarAnnotationSelected", null);
|
|
159
|
-
// // run in next render because we need to open the group first
|
|
160
|
-
// this.$nextTick(() => {
|
|
161
|
-
// this.$store.dispatch(
|
|
162
|
-
// "document/setSidebarAnnotationSelected",
|
|
163
|
-
// annotation
|
|
164
|
-
// );
|
|
165
|
-
// });
|
|
166
145
|
}
|
|
167
146
|
}
|
|
168
147
|
},
|
|
@@ -180,6 +159,10 @@ export default {
|
|
|
180
159
|
this.acceptedAnnotationsGroupCounter =
|
|
181
160
|
this.numberOfAcceptedAnnotationsInLabel(this.label);
|
|
182
161
|
}
|
|
162
|
+
if (!this.isGroup) {
|
|
163
|
+
// if not a group then show by default
|
|
164
|
+
this.showAnnotationsGroup = true;
|
|
165
|
+
}
|
|
183
166
|
},
|
|
184
167
|
labelHasPendingAnnotations(hoveredSet) {
|
|
185
168
|
if (!hoveredSet) return;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="data-extraction-container">
|
|
3
3
|
<div class="loading-container">
|
|
4
|
-
<
|
|
5
|
-
:is-loading="true"
|
|
6
|
-
:save-btn="false"
|
|
7
|
-
:cancel-btn="false"
|
|
8
|
-
/>
|
|
4
|
+
<b-icon icon="spinner" class="fa-spin spinner-icon" />
|
|
9
5
|
</div>
|
|
10
6
|
<div class="data-extraction-text">
|
|
11
7
|
<p class="title">
|
|
@@ -28,11 +24,9 @@
|
|
|
28
24
|
</template>
|
|
29
25
|
<script>
|
|
30
26
|
import { mapState } from "vuex";
|
|
31
|
-
import AnnotationActionButtons from "./AnnotationActionButtons";
|
|
32
27
|
|
|
33
28
|
export default {
|
|
34
29
|
name: "ExtractingData",
|
|
35
|
-
components: { AnnotationActionButtons },
|
|
36
30
|
computed: {
|
|
37
31
|
...mapState("edit", ["redirectingUser"]),
|
|
38
32
|
},
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
? 'right-aligned full-height-tooltip'
|
|
11
11
|
: 'left-aligned full-height-tooltip',
|
|
12
12
|
]"
|
|
13
|
-
:close-delay="tooltipCloseDelay"
|
|
14
13
|
>
|
|
15
14
|
<template #content>
|
|
16
15
|
<div ref="tooltipContent"></div>
|
|
@@ -99,7 +98,6 @@ export default {
|
|
|
99
98
|
return {
|
|
100
99
|
categoryError: false,
|
|
101
100
|
tooltipIsShown: false,
|
|
102
|
-
tooltipCloseDelay: 0,
|
|
103
101
|
dropdownIsDisabled: false,
|
|
104
102
|
};
|
|
105
103
|
},
|
|
@@ -265,7 +263,6 @@ export default {
|
|
|
265
263
|
if (this.categories) {
|
|
266
264
|
// Text set from innerHTML vs 'label' due to html tag in locales file string
|
|
267
265
|
let tooltipText;
|
|
268
|
-
let tooltipDelay = 0;
|
|
269
266
|
|
|
270
267
|
if (this.documentCannotBeEdited(this.selectedDocument)) {
|
|
271
268
|
tooltipText = this.$t("edit_not_available");
|
|
@@ -273,10 +270,8 @@ export default {
|
|
|
273
270
|
tooltipText = this.$t("approved_annotations");
|
|
274
271
|
} else if (this.projectHasSingleCategory) {
|
|
275
272
|
tooltipText = this.$t("single_category_in_project");
|
|
276
|
-
tooltipDelay = 5000;
|
|
277
273
|
}
|
|
278
274
|
|
|
279
|
-
this.tooltipCloseDelay = tooltipDelay;
|
|
280
275
|
this.$refs.tooltipContent.innerHTML = tooltipText;
|
|
281
276
|
}
|
|
282
277
|
},
|
|
@@ -3,9 +3,18 @@
|
|
|
3
3
|
<DocumentTopBar />
|
|
4
4
|
<div :class="['dashboard-viewer', renameAndCategorize ? 'edit-mode' : '']">
|
|
5
5
|
<DocumentThumbnails v-if="!editMode" ref="documentPages" />
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<Split>
|
|
7
|
+
<SplitArea :size="50" :min-size="350">
|
|
8
|
+
<ScrollingDocument
|
|
9
|
+
ref="scrollingDocument"
|
|
10
|
+
class="dashboard-document"
|
|
11
|
+
/>
|
|
12
|
+
</SplitArea>
|
|
13
|
+
<SplitArea :size="50" style="overflow-y: hidden">
|
|
14
|
+
<DocumentAnnotations v-if="!editMode" ref="annotations" />
|
|
15
|
+
<DocumentEdit v-else ref="editView" />
|
|
16
|
+
</SplitArea>
|
|
17
|
+
</Split>
|
|
9
18
|
|
|
10
19
|
<MultiAnnotationTableOverlay
|
|
11
20
|
v-if="showAnnSetTable"
|
|
@@ -176,28 +176,34 @@ export default {
|
|
|
176
176
|
...mapGetters("display", ["bboxToRect"]),
|
|
177
177
|
...mapState("selection", ["selection", "spanSelection"]),
|
|
178
178
|
top() {
|
|
179
|
-
|
|
179
|
+
if (this.selection && this.selection.start && this.selection.end) {
|
|
180
|
+
const top = this.selection.start.y - heightOfPopup; // subtract the height of the popup plus some margin
|
|
180
181
|
|
|
181
|
-
|
|
182
|
+
const height = this.selection.end.y - this.selection.start.y;
|
|
182
183
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
//check if the popup will not go off the container on the top
|
|
185
|
+
return this.selection.start.y > heightOfPopup
|
|
186
|
+
? top - margin
|
|
187
|
+
: this.selection.start.y + height + margin;
|
|
188
|
+
}
|
|
189
|
+
return 0;
|
|
187
190
|
},
|
|
188
191
|
left() {
|
|
189
|
-
|
|
192
|
+
if (this.selection && this.selection.start && this.selection.end) {
|
|
193
|
+
const width = this.selection.end.x - this.selection.start.x;
|
|
190
194
|
|
|
191
|
-
|
|
195
|
+
const left = this.selection.start.x + width / 2 - widthOfPopup / 2; // add the entity half width to be centered and then subtract half the width of the popup
|
|
192
196
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
//check if the popup will not go off the container
|
|
198
|
+
if (left + widthOfPopup > this.containerWidth) {
|
|
199
|
+
// on the right side
|
|
200
|
+
return this.containerWidth - widthOfPopup;
|
|
201
|
+
} else {
|
|
202
|
+
// on the left side
|
|
203
|
+
return left > 0 ? left : 0;
|
|
204
|
+
}
|
|
200
205
|
}
|
|
206
|
+
return 0;
|
|
201
207
|
},
|
|
202
208
|
wasChanged() {
|
|
203
209
|
return (
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
<Toolbar v-if="showToolbar" />
|
|
33
|
-
<ActionBar v-if="showActionBar" />
|
|
34
33
|
</div>
|
|
35
34
|
</template>
|
|
36
35
|
<script>
|
|
@@ -38,14 +37,12 @@ import { mapState, mapGetters } from "vuex";
|
|
|
38
37
|
import scroll from "../../directives/scroll";
|
|
39
38
|
import ScrollingPage from "./ScrollingPage";
|
|
40
39
|
import Toolbar from "./DocumentToolbar";
|
|
41
|
-
import ActionBar from "./ActionBar";
|
|
42
40
|
import SearchBar from "./SearchBar";
|
|
43
41
|
|
|
44
42
|
export default {
|
|
45
43
|
components: {
|
|
46
44
|
ScrollingPage,
|
|
47
45
|
Toolbar,
|
|
48
|
-
ActionBar,
|
|
49
46
|
SearchBar,
|
|
50
47
|
},
|
|
51
48
|
directives: {
|
|
@@ -74,7 +71,6 @@ export default {
|
|
|
74
71
|
]),
|
|
75
72
|
...mapState("display", [
|
|
76
73
|
"scale",
|
|
77
|
-
"documentActionBar",
|
|
78
74
|
"pageChangedFromThumbnail",
|
|
79
75
|
"currentPage",
|
|
80
76
|
"searchEnabled",
|
|
@@ -89,15 +85,7 @@ export default {
|
|
|
89
85
|
}
|
|
90
86
|
},
|
|
91
87
|
showToolbar() {
|
|
92
|
-
return
|
|
93
|
-
!this.loading &&
|
|
94
|
-
this.pages.length > 0 &&
|
|
95
|
-
this.scale &&
|
|
96
|
-
!this.documentActionBar
|
|
97
|
-
);
|
|
98
|
-
},
|
|
99
|
-
showActionBar() {
|
|
100
|
-
return this.documentActionBar !== null;
|
|
88
|
+
return !this.loading && this.pages.length > 0 && this.scale;
|
|
101
89
|
},
|
|
102
90
|
},
|
|
103
91
|
watch: {
|
|
@@ -38,49 +38,51 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<div
|
|
42
|
-
<div
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
<div class="right-bar-components">
|
|
42
|
+
<div v-if="!recalculatingAnnotations" class="right-components">
|
|
43
|
+
<div
|
|
44
|
+
v-if="!editMode && (!publicView || !isDocumentReviewed)"
|
|
45
|
+
class="keyboard-actions-info"
|
|
46
|
+
>
|
|
47
|
+
<KeyboardActionsDescription />
|
|
48
|
+
</div>
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
>
|
|
53
|
-
<b-tooltip
|
|
54
|
-
:animated="false"
|
|
55
|
-
position="is-bottom"
|
|
56
|
-
class="right-aligned width-184"
|
|
50
|
+
<div
|
|
51
|
+
v-if="!editMode && (publicView || isDocumentReviewed)"
|
|
52
|
+
class="read-only-info"
|
|
57
53
|
>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
icon
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
54
|
+
<b-tooltip
|
|
55
|
+
:animated="false"
|
|
56
|
+
position="is-bottom"
|
|
57
|
+
class="right-aligned width-184"
|
|
58
|
+
>
|
|
59
|
+
<span v-if="publicView">
|
|
60
|
+
{{ $t("lite_mode") }}
|
|
61
|
+
</span>
|
|
62
|
+
<span v-else class="doc-reviewed">
|
|
63
|
+
{{ $t("reviewed_mode") }}
|
|
64
|
+
</span>
|
|
65
|
+
<b-icon
|
|
66
|
+
:class="[
|
|
67
|
+
'info-icon is-small',
|
|
68
|
+
!publicView && isDocumentReviewed && 'info-reviewed',
|
|
69
|
+
]"
|
|
70
|
+
icon="circle-info"
|
|
71
|
+
/>
|
|
72
|
+
<template #content>
|
|
73
|
+
<div v-if="publicView" class="read-only-details">
|
|
74
|
+
{{ $t("limited_functionalities") }}
|
|
75
|
+
</div>
|
|
76
|
+
<div v-else class="read-only-details">
|
|
77
|
+
{{ $t("document_reviewed") }}
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
</b-tooltip>
|
|
81
|
+
</div>
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
<div class="top-bar-buttons">
|
|
84
|
+
<DocumentTopBarButtons />
|
|
85
|
+
</div>
|
|
84
86
|
</div>
|
|
85
87
|
</div>
|
|
86
88
|
</div>
|
package/src/icons.js
CHANGED
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
faSpinner,
|
|
10
10
|
faPlus,
|
|
11
11
|
faXmark,
|
|
12
|
+
faMagnifyingGlassMinus,
|
|
13
|
+
faBan,
|
|
14
|
+
faCircleCheck,
|
|
12
15
|
faEllipsisVertical,
|
|
13
16
|
faCircleInfo,
|
|
14
17
|
faArrowRotateLeft,
|
|
@@ -35,6 +38,9 @@ library.add(
|
|
|
35
38
|
faAngleDown,
|
|
36
39
|
faSpinner,
|
|
37
40
|
faXmark,
|
|
41
|
+
faMagnifyingGlassMinus,
|
|
42
|
+
faBan,
|
|
43
|
+
faCircleCheck,
|
|
38
44
|
faSpinner,
|
|
39
45
|
faPlus,
|
|
40
46
|
faEllipsisVertical,
|
package/src/locales/de.json
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"drag_drop_columns_multi_ann": "Drag and Drop, um die Reihenfolge der Labels zu ändern",
|
|
115
115
|
"error_creating_multi_ann": "Nicht alle Annotationen wurden erfolgreich erstellt.",
|
|
116
116
|
"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>.",
|
|
117
|
-
"single_category_in_project": "Das aktuelle Projekt hat nur eine Kategorie. Um sie ändern zu können, sollte die neue zuerst dem Projekt hinzugefügt werden.
|
|
117
|
+
"single_category_in_project": "Das aktuelle Projekt hat nur eine Kategorie. Um sie ändern zu können, sollte die neue zuerst dem Projekt hinzugefügt werden.",
|
|
118
118
|
"approved_annotations": "Die Kategorie kann nicht geändert werden, da bereits akzeptierte Annotationen oder manuell erstellte Annotationen zu diesem Dokument vorhanden sind.",
|
|
119
119
|
"restore": "Wiederherstellen",
|
|
120
120
|
"disabled_finish_review": "Das Beenden der Dokumentenprüfung ist erst möglich, nachdem alle Annotationen überarbeitet wurden, unabhängig davon, ob sie akzeptiert oder als fehlend markiert wurden.",
|
|
@@ -162,5 +162,6 @@
|
|
|
162
162
|
"annotation_link": "Kopieren Sie den permanenten Link zu dieser Annotationen",
|
|
163
163
|
"copied": "Kopiert",
|
|
164
164
|
"checkbox_ann_details": "Für dieses Label wird ein Kästchen extrahiert.",
|
|
165
|
-
"document_section": "Dokumentabschnitt"
|
|
165
|
+
"document_section": "Dokumentabschnitt",
|
|
166
|
+
"label_size": "Spaltengröße:"
|
|
166
167
|
}
|
package/src/locales/en.json
CHANGED
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"error_creating_multi_ann": "Not all annotation sets were created successfully.",
|
|
117
117
|
"disabled_finish_review": "Finishing the document review is only possible after all annotations have been revised, whether they are accepted or marked as missing.",
|
|
118
118
|
"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>.",
|
|
119
|
-
"single_category_in_project": "The current project has only one category. To be able to change it, the new one should be first added to the project.
|
|
119
|
+
"single_category_in_project": "The current project has only one category. To be able to change it, the new one should be first added to the project.",
|
|
120
120
|
"approved_annotations": "It is not possible to change the current category since the document has approved or manually created annotations.",
|
|
121
121
|
"restore": "Restore",
|
|
122
122
|
"split_modal_title": "Split the document",
|
|
@@ -163,5 +163,6 @@
|
|
|
163
163
|
"annotation_link": "Copy the permanent link to this annotation",
|
|
164
164
|
"copied": "Copied",
|
|
165
165
|
"checkbox_ann_details": "A checkbox will be extracted for this label.",
|
|
166
|
-
"document_section": "Document Section"
|
|
166
|
+
"document_section": "Document Section",
|
|
167
|
+
"label_size": "Column size:"
|
|
167
168
|
}
|
package/src/locales/es.json
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"error_creating_multi_ann": "No todos los grupos de anotaciones fueron creados de manera exitosa.",
|
|
114
114
|
"disabled_finish_review": "Solo es posible finalizar la revisión del documento si todas las anotaciones han sido revisadas, ya sea aceptadas o marcadas como faltantes.",
|
|
115
115
|
"no_multi_ann_labelset_model": "En este documento no hay grupos de etiquetas múltiples disponibles. Para más información, haga clic en <a href='https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets' target='_blank'>este enlace</a>.",
|
|
116
|
-
"single_category_in_project": "Este proyecto solo tiene una categoría. Para poder modificarla, es necesario agregar esta nueva categoría al proyecto.
|
|
116
|
+
"single_category_in_project": "Este proyecto solo tiene una categoría. Para poder modificarla, es necesario agregar esta nueva categoría al proyecto.",
|
|
117
117
|
"approved_annotations": "No es posible cambiar la categoría ya que existen anotaciones aceptadas o creadas manualmente en este documento.",
|
|
118
118
|
"restore": "Restaurar",
|
|
119
119
|
"split_modal_title": "Dividir el documento",
|
|
@@ -162,5 +162,6 @@
|
|
|
162
162
|
"annotation_link": "Copia el enlace permanente a esta anotación.",
|
|
163
163
|
"copied": "Copiada",
|
|
164
164
|
"checkbox_ann_details": "Se extraerá una casilla de verificación para esta etiqueta.",
|
|
165
|
-
"document_section": "Sección del documento"
|
|
165
|
+
"document_section": "Sección del documento",
|
|
166
|
+
"label_size": "Tamaño de columna:"
|
|
166
167
|
}
|
package/src/main.js
CHANGED
|
@@ -6,6 +6,7 @@ import i18n from "./i18n";
|
|
|
6
6
|
import store from "./store";
|
|
7
7
|
import VueObserveVisibility from "vue-observe-visibility";
|
|
8
8
|
import Icons from "./icons";
|
|
9
|
+
import VueSplit from "vue-split-panel";
|
|
9
10
|
|
|
10
11
|
Vue.component("VueFontawesome", Icons);
|
|
11
12
|
Vue.component("App", App);
|
|
@@ -15,6 +16,7 @@ Vue.use(Buefy, {
|
|
|
15
16
|
defaultIconComponent: "vue-fontawesome",
|
|
16
17
|
});
|
|
17
18
|
Vue.use(VueObserveVisibility);
|
|
19
|
+
Vue.use(VueSplit);
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* Main entrypoint for the App
|
package/src/store/display.js
CHANGED
|
@@ -22,7 +22,6 @@ const state = {
|
|
|
22
22
|
currentPage: 1,
|
|
23
23
|
optimalResolution: true,
|
|
24
24
|
interactionBlocked: false,
|
|
25
|
-
documentActionBar: null, // document action bar properties
|
|
26
25
|
categorizeModalIsActive: false,
|
|
27
26
|
pageChangedFromThumbnail: false,
|
|
28
27
|
showAnnSetTable: null,
|
|
@@ -36,6 +35,8 @@ const state = {
|
|
|
36
35
|
currentSearchResult: null,
|
|
37
36
|
detailsUrl: null,
|
|
38
37
|
pageError: null,
|
|
38
|
+
labelWidth: 40,
|
|
39
|
+
annotationWidth: 60,
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
const getters = {
|
|
@@ -290,12 +291,6 @@ const actions = {
|
|
|
290
291
|
updateOptimalResolution({ commit }, width) {
|
|
291
292
|
commit("SET_OPTIMAL_RESOLUTION", width >= MINIMUM_OPTIMIZED_APP_WIDTH);
|
|
292
293
|
},
|
|
293
|
-
showDocumentActionBar({ commit }, { icon, text, action, show, loading }) {
|
|
294
|
-
commit(
|
|
295
|
-
"SET_DOCUMENT_ACTION_BAR",
|
|
296
|
-
show ? { icon, text, action, loading } : null
|
|
297
|
-
);
|
|
298
|
-
},
|
|
299
294
|
showAnnSetTable({ commit }, tableSet) {
|
|
300
295
|
commit("SET_ANN_SET_TABLE", tableSet);
|
|
301
296
|
},
|
|
@@ -314,10 +309,13 @@ const actions = {
|
|
|
314
309
|
setPageChangedFromThumbnail: ({ commit }, value) => {
|
|
315
310
|
commit("SET_PAGE_CHANGED_FROM_THUMBNAIL", value);
|
|
316
311
|
},
|
|
317
|
-
|
|
318
312
|
setDetailsUrl: ({ commit }, value) => {
|
|
319
313
|
commit("SET_DETAILS_URL", value);
|
|
320
314
|
},
|
|
315
|
+
setLabelWidth: ({ commit }, value) => {
|
|
316
|
+
commit("SET_LABEL_WIDTH", value);
|
|
317
|
+
commit("SET_ANNOTATION_WIDTH", 100 - value);
|
|
318
|
+
},
|
|
321
319
|
|
|
322
320
|
debounceSearch: debounce(({ commit, dispatch }, query) => {
|
|
323
321
|
dispatch("search", query);
|
|
@@ -401,8 +399,12 @@ const mutations = {
|
|
|
401
399
|
state.currentPage = currentPage;
|
|
402
400
|
},
|
|
403
401
|
|
|
404
|
-
|
|
405
|
-
state.
|
|
402
|
+
SET_LABEL_WIDTH: (state, labelWidth) => {
|
|
403
|
+
state.labelWidth = labelWidth;
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
SET_ANNOTATION_WIDTH: (state, annotationWidth) => {
|
|
407
|
+
state.annotationWidth = annotationWidth;
|
|
406
408
|
},
|
|
407
409
|
|
|
408
410
|
SET_SHOW_DOCUMENTS_NAVIGATION: (state, show) => {
|
package/src/store/document.js
CHANGED
|
@@ -1251,6 +1251,9 @@ const actions = {
|
|
|
1251
1251
|
if (response.status === 200) {
|
|
1252
1252
|
commit("UPDATE_ANNOTATION", response.data);
|
|
1253
1253
|
commit("SET_NEW_ACCEPTED_ANNOTATIONS", null);
|
|
1254
|
+
if (response.data && response.data.id) {
|
|
1255
|
+
dispatch("setAnnotationId", response.data.id);
|
|
1256
|
+
}
|
|
1254
1257
|
|
|
1255
1258
|
resolve(true);
|
|
1256
1259
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="action-bar">
|
|
3
|
-
<div class="action-bar-elements">
|
|
4
|
-
<div v-if="documentActionBar.icon" class="action-icon">
|
|
5
|
-
<ActionIcon :icon="documentActionBar.icon" class="icon" />
|
|
6
|
-
</div>
|
|
7
|
-
<div v-if="documentActionBar.text" class="action-text">
|
|
8
|
-
{{ documentActionBar.text }}
|
|
9
|
-
</div>
|
|
10
|
-
<div v-if="documentActionBar.action" class="action-button">
|
|
11
|
-
<AnnotationActionButtons
|
|
12
|
-
:save-btn="documentActionBar.action !== null"
|
|
13
|
-
:is-loading="documentActionBar.loading"
|
|
14
|
-
:action-bar="true"
|
|
15
|
-
@save="handleSave()"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import { mapState } from "vuex";
|
|
24
|
-
import AnnotationActionButtons from "../DocumentAnnotations/AnnotationActionButtons";
|
|
25
|
-
import ActionIcon from "../../assets/images/ActionIcon";
|
|
26
|
-
|
|
27
|
-
export default {
|
|
28
|
-
name: "ActionBar",
|
|
29
|
-
components: {
|
|
30
|
-
ActionIcon,
|
|
31
|
-
AnnotationActionButtons,
|
|
32
|
-
},
|
|
33
|
-
computed: {
|
|
34
|
-
...mapState("display", ["documentActionBar"]),
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
handleSave() {
|
|
38
|
-
this.documentActionBar.action();
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<style
|
|
45
|
-
scoped
|
|
46
|
-
lang="scss"
|
|
47
|
-
src="../../assets/scss/document_action_bar.scss"
|
|
48
|
-
></style>
|