@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
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="action-buttons">
|
|
3
|
-
<!-- loading -->
|
|
4
|
-
<div v-if="isLoading && !finishReviewBtn">
|
|
5
|
-
<b-notification :closable="false" class="loading-background">
|
|
6
|
-
<b-loading :active="isLoading" :is-full-page="loadingOnFullPage">
|
|
7
|
-
<b-icon icon="spinner" class="fa-spin loading-icon-size spinner" />
|
|
8
|
-
</b-loading>
|
|
9
|
-
</b-notification>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<!-- save button -->
|
|
13
|
-
<b-button
|
|
14
|
-
v-if="saveBtn && !isLoading && !publicView"
|
|
15
|
-
:class="[
|
|
16
|
-
'annotation-save-btn text-btn',
|
|
17
|
-
actionBar && 'action-bar-save-btn',
|
|
18
|
-
actionBar ? 'tertiary-button' : 'primary-button',
|
|
19
|
-
]"
|
|
20
|
-
type="is-primary"
|
|
21
|
-
@click.stop="save"
|
|
22
|
-
>
|
|
23
|
-
{{ $t("save") }}
|
|
24
|
-
</b-button>
|
|
25
|
-
|
|
26
|
-
<!-- cancel button -->
|
|
27
|
-
<b-button
|
|
28
|
-
v-if="cancelBtn && !isLoading"
|
|
29
|
-
class="is-small annotation-cancel-btn"
|
|
30
|
-
icon-left="xmark"
|
|
31
|
-
@click.stop="cancel"
|
|
32
|
-
/>
|
|
33
|
-
|
|
34
|
-
<!-- decline button -->
|
|
35
|
-
<div
|
|
36
|
-
v-if="declineBtn && !isLoading && !saveBtn && !cancelBtn && !publicView"
|
|
37
|
-
class="reject-decline-button-container"
|
|
38
|
-
>
|
|
39
|
-
<b-button
|
|
40
|
-
type="is-ghost"
|
|
41
|
-
class="reject-decline-btn decline-btn"
|
|
42
|
-
@click.stop="decline"
|
|
43
|
-
>
|
|
44
|
-
{{ $t("decline") }}
|
|
45
|
-
</b-button>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<!-- accept button -->
|
|
49
|
-
<b-button
|
|
50
|
-
v-if="acceptBtn && !isLoading && !saveBtn && !cancelBtn && !publicView"
|
|
51
|
-
class="annotation-accept-btn primary-button"
|
|
52
|
-
type="is-primary"
|
|
53
|
-
@click.stop="accept"
|
|
54
|
-
>
|
|
55
|
-
{{ $t("accept") }}
|
|
56
|
-
</b-button>
|
|
57
|
-
|
|
58
|
-
<!-- reject button -->
|
|
59
|
-
<div
|
|
60
|
-
v-if="showReject && !isLoading && !cancelBtn && !saveBtn && !publicView"
|
|
61
|
-
class="reject-decline-button-container"
|
|
62
|
-
>
|
|
63
|
-
<b-button
|
|
64
|
-
type="is-ghost"
|
|
65
|
-
class="reject-decline-btn reject-btn"
|
|
66
|
-
@click.stop="reject"
|
|
67
|
-
>
|
|
68
|
-
{{ $t("reject_label") }}
|
|
69
|
-
</b-button>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<!-- reject all labels -->
|
|
73
|
-
<div
|
|
74
|
-
v-if="
|
|
75
|
-
!publicView && rejectAllEmptyBtn && !isLoading && !cancelBtn && !saveBtn
|
|
76
|
-
"
|
|
77
|
-
class="reject-decline-button-container reject-all"
|
|
78
|
-
@mouseenter="mouseenterAnnotationSet('reject')"
|
|
79
|
-
@mouseleave="mouseleaveAnnotationSet"
|
|
80
|
-
>
|
|
81
|
-
<b-button
|
|
82
|
-
type="is-ghost"
|
|
83
|
-
class="reject-decline-btn reject-btn reject-all-btn"
|
|
84
|
-
:disabled="emptyLabelsLength(annotationSet) === 0"
|
|
85
|
-
@click.stop="rejectAllEmpty"
|
|
86
|
-
>
|
|
87
|
-
{{ $t("reject_all_empty") }} ({{ emptyLabelsLength(annotationSet) }})
|
|
88
|
-
</b-button>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<!-- accept all pending annotations -->
|
|
92
|
-
<div
|
|
93
|
-
v-if="!publicView && acceptAllBtn && !isLoading"
|
|
94
|
-
class="accept-all"
|
|
95
|
-
@mouseenter="mouseenterAnnotationSet('accept')"
|
|
96
|
-
@mouseleave="mouseleaveAnnotationSet"
|
|
97
|
-
>
|
|
98
|
-
<b-button
|
|
99
|
-
type="is-primary"
|
|
100
|
-
class="accept-all-btn"
|
|
101
|
-
:disabled="annotationsWithPendingReviewLength(annotationSet) === 0"
|
|
102
|
-
@click.stop="acceptGroup"
|
|
103
|
-
>
|
|
104
|
-
{{ $t("accept_group") }} ({{
|
|
105
|
-
annotationsWithPendingReviewLength(annotationSet)
|
|
106
|
-
}})
|
|
107
|
-
</b-button>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
<!-- finish review button -->
|
|
111
|
-
<b-tooltip
|
|
112
|
-
:active="finishDisabled"
|
|
113
|
-
position="is-bottom"
|
|
114
|
-
multilined
|
|
115
|
-
class="right-aligned finish-review"
|
|
116
|
-
>
|
|
117
|
-
<b-button
|
|
118
|
-
v-if="finishReviewBtn && !publicView"
|
|
119
|
-
:class="['finish-review-btn', 'text-btn', 'primary-button']"
|
|
120
|
-
type="is-primary"
|
|
121
|
-
:disabled="finishDisabled"
|
|
122
|
-
@click.stop="finishReview"
|
|
123
|
-
>
|
|
124
|
-
<span v-if="!isLoading">
|
|
125
|
-
{{ $t("finish_review") }}
|
|
126
|
-
</span>
|
|
127
|
-
|
|
128
|
-
<div v-else>
|
|
129
|
-
<b-notification :closable="false" :class="['loading-background']">
|
|
130
|
-
<b-loading :active="isLoading" :is-full-page="loadingOnFullPage">
|
|
131
|
-
<b-icon
|
|
132
|
-
icon="spinner"
|
|
133
|
-
class="fa-spin loading-icon-size spinner"
|
|
134
|
-
/>
|
|
135
|
-
</b-loading>
|
|
136
|
-
</b-notification>
|
|
137
|
-
</div>
|
|
138
|
-
</b-button>
|
|
139
|
-
|
|
140
|
-
<template #content> {{ $t("disabled_finish_review") }} </template>
|
|
141
|
-
</b-tooltip>
|
|
142
|
-
</div>
|
|
143
|
-
</template>
|
|
144
|
-
<script>
|
|
145
|
-
/* Component for showing actions for each annotation row */
|
|
146
|
-
import { mapState, mapGetters } from "vuex";
|
|
147
|
-
export default {
|
|
148
|
-
name: "ActionButtons",
|
|
149
|
-
props: {
|
|
150
|
-
saveBtn: {
|
|
151
|
-
type: Boolean,
|
|
152
|
-
},
|
|
153
|
-
cancelBtn: {
|
|
154
|
-
type: Boolean,
|
|
155
|
-
},
|
|
156
|
-
showReject: {
|
|
157
|
-
type: Boolean,
|
|
158
|
-
},
|
|
159
|
-
isLoading: {
|
|
160
|
-
type: Boolean,
|
|
161
|
-
},
|
|
162
|
-
acceptBtn: {
|
|
163
|
-
type: Boolean,
|
|
164
|
-
},
|
|
165
|
-
// TODO: finishReviewBtn should not be here (see comment above for purpose of this component)
|
|
166
|
-
finishReviewBtn: {
|
|
167
|
-
type: Boolean,
|
|
168
|
-
},
|
|
169
|
-
// TODO: finishDisabled should not be here
|
|
170
|
-
finishDisabled: {
|
|
171
|
-
type: Boolean,
|
|
172
|
-
},
|
|
173
|
-
// TODO: handleReject should not be here
|
|
174
|
-
handleReject: {
|
|
175
|
-
type: Function,
|
|
176
|
-
default: null,
|
|
177
|
-
},
|
|
178
|
-
// TODO: rejectAllEmptyBtn should not be here
|
|
179
|
-
rejectAllEmptyBtn: {
|
|
180
|
-
type: Boolean,
|
|
181
|
-
},
|
|
182
|
-
// TODO: annotationSet should not be needed on a UI only component
|
|
183
|
-
annotationSet: {
|
|
184
|
-
type: Object,
|
|
185
|
-
default: null,
|
|
186
|
-
},
|
|
187
|
-
// TODO: acceptAllBtn should not be here
|
|
188
|
-
acceptAllBtn: {
|
|
189
|
-
type: Boolean,
|
|
190
|
-
},
|
|
191
|
-
declineBtn: {
|
|
192
|
-
type: Boolean,
|
|
193
|
-
},
|
|
194
|
-
actionBar: {
|
|
195
|
-
type: Boolean,
|
|
196
|
-
required: false,
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
data() {
|
|
200
|
-
return {
|
|
201
|
-
loadingOnFullPage: false,
|
|
202
|
-
};
|
|
203
|
-
},
|
|
204
|
-
computed: {
|
|
205
|
-
...mapState("document", ["publicView", "missingAnnotations"]),
|
|
206
|
-
...mapGetters("document", [
|
|
207
|
-
"emptyLabelsLength",
|
|
208
|
-
"annotationsWithPendingReviewLength",
|
|
209
|
-
]),
|
|
210
|
-
},
|
|
211
|
-
methods: {
|
|
212
|
-
save() {
|
|
213
|
-
this.$emit("save");
|
|
214
|
-
},
|
|
215
|
-
cancel() {
|
|
216
|
-
this.$emit("cancel");
|
|
217
|
-
},
|
|
218
|
-
accept() {
|
|
219
|
-
this.$emit("accept");
|
|
220
|
-
},
|
|
221
|
-
reject() {
|
|
222
|
-
this.$emit("reject");
|
|
223
|
-
},
|
|
224
|
-
mouseenterAnnotationSet(type) {
|
|
225
|
-
if (type == "reject") {
|
|
226
|
-
this.$emit("hover-annotation-set-to-reject");
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (type == "accept") {
|
|
230
|
-
this.$emit("hover-annotation-set-to-accept");
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
mouseleaveAnnotationSet() {
|
|
234
|
-
this.$emit("leave-annotation-set-to-accept");
|
|
235
|
-
this.$emit("leave-annotation-set-to-reject");
|
|
236
|
-
},
|
|
237
|
-
rejectAllEmpty() {
|
|
238
|
-
this.$emit("reject-all-empty");
|
|
239
|
-
},
|
|
240
|
-
finishReview() {
|
|
241
|
-
this.$emit("finish-review");
|
|
242
|
-
},
|
|
243
|
-
acceptGroup() {
|
|
244
|
-
this.$emit("accept-group");
|
|
245
|
-
},
|
|
246
|
-
decline() {
|
|
247
|
-
this.$emit("decline");
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
</script>
|
|
252
|
-
|
|
253
|
-
<style
|
|
254
|
-
scoped
|
|
255
|
-
lang="scss"
|
|
256
|
-
src="../../assets/scss/document_annotations.scss"
|
|
257
|
-
></style>
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="rejected-label-container">
|
|
3
|
-
<p class="title">
|
|
4
|
-
{{ `${$t("rejected")} (${missingAnnotations.length})` }}
|
|
5
|
-
</p>
|
|
6
|
-
<section class="rejected-tag-container">
|
|
7
|
-
<b-taglist
|
|
8
|
-
v-for="missingAnnotation in missingAnnotations"
|
|
9
|
-
:key="missingAnnotation.id"
|
|
10
|
-
>
|
|
11
|
-
<b-tag
|
|
12
|
-
attached
|
|
13
|
-
closable
|
|
14
|
-
aria-close-label="Close tag"
|
|
15
|
-
:class="[
|
|
16
|
-
isLoading && closedTag === missingAnnotation.id && 'loading-active',
|
|
17
|
-
]"
|
|
18
|
-
@close="removeRejectedLabel(missingAnnotation.id)"
|
|
19
|
-
>
|
|
20
|
-
<span
|
|
21
|
-
:class="[
|
|
22
|
-
'label-name',
|
|
23
|
-
isLoading && closedTag === missingAnnotation.id && 'loading',
|
|
24
|
-
]"
|
|
25
|
-
>
|
|
26
|
-
{{ getLabelName(missingAnnotation.label) }}
|
|
27
|
-
</span>
|
|
28
|
-
</b-tag>
|
|
29
|
-
<div class="tag-loading-container">
|
|
30
|
-
<ActionButtons
|
|
31
|
-
:is-loading="isLoading && closedTag === missingAnnotation.id"
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
</b-taglist>
|
|
35
|
-
</section>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script>
|
|
40
|
-
import { mapState } from "vuex";
|
|
41
|
-
import ActionButtons from "./ActionButtons.vue";
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
name: "RejectedLabels",
|
|
45
|
-
components: { ActionButtons },
|
|
46
|
-
props: {
|
|
47
|
-
missingAnnotations: {
|
|
48
|
-
default: null,
|
|
49
|
-
type: Array,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
isLoading: false,
|
|
56
|
-
closedTag: null,
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
computed: {
|
|
60
|
-
...mapState("document", ["labels"]),
|
|
61
|
-
},
|
|
62
|
-
methods: {
|
|
63
|
-
removeRejectedLabel(id) {
|
|
64
|
-
this.isLoading = true;
|
|
65
|
-
this.closedTag = id;
|
|
66
|
-
|
|
67
|
-
this.$store
|
|
68
|
-
.dispatch("document/deleteMissingAnnotation", id)
|
|
69
|
-
.catch((error) => {
|
|
70
|
-
this.$store.dispatch("document/createErrorMessage", {
|
|
71
|
-
error,
|
|
72
|
-
serverErrorMessage: this.$t("server_error"),
|
|
73
|
-
defaultErrorMessage: this.$t("edit_error"),
|
|
74
|
-
});
|
|
75
|
-
})
|
|
76
|
-
.finally(() => {
|
|
77
|
-
this.isLoading = false;
|
|
78
|
-
this.closedTag = null;
|
|
79
|
-
});
|
|
80
|
-
},
|
|
81
|
-
getLabelName(label) {
|
|
82
|
-
if (!this.labels) return;
|
|
83
|
-
const found = this.labels.find((l) => l.id === label);
|
|
84
|
-
if (found) {
|
|
85
|
-
return found.name;
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
</script>
|
|
91
|
-
|
|
92
|
-
<style
|
|
93
|
-
scoped
|
|
94
|
-
lang="scss"
|
|
95
|
-
src="../../assets/scss/document_annotations.scss"
|
|
96
|
-
></style>
|