@konfuzio/document-validation-ui 0.1.26-dev.3 → 0.1.26-dev.5
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 +1 -1
- package/dist/js/chunk-vendors.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/scss/document_annotations.scss +7 -1
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +32 -4
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +14 -3
- package/src/constants.js +1 -0
- package/src/icons.js +5 -1
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
.annotation-set-list {
|
|
48
48
|
padding-bottom: 16px;
|
|
49
49
|
overflow: auto;
|
|
50
|
-
|
|
50
|
+
height: 100vh;
|
|
51
51
|
|
|
52
52
|
#annotation-filters {
|
|
53
53
|
padding: 16px 16px 0px 16px;
|
|
@@ -501,6 +501,12 @@
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
+
.button-icon {
|
|
505
|
+
height: 24px;
|
|
506
|
+
width: 24px;
|
|
507
|
+
padding: 6px;
|
|
508
|
+
}
|
|
509
|
+
|
|
504
510
|
.accept-decline-container {
|
|
505
511
|
padding-right: 14px;
|
|
506
512
|
display: flex;
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
type="is-primary"
|
|
21
21
|
@click.stop="save"
|
|
22
22
|
>
|
|
23
|
-
{{ $t("save") }}
|
|
23
|
+
<span v-if="showText">{{ $t("save") }}</span>
|
|
24
|
+
<b-tooltip v-else position="is-left" :label="$t('save')">
|
|
25
|
+
<b-icon icon="floppy-disk" size="small" class="button-icon" />
|
|
26
|
+
</b-tooltip>
|
|
24
27
|
</b-button>
|
|
25
28
|
|
|
26
29
|
<!-- cancel button -->
|
|
@@ -57,14 +60,20 @@
|
|
|
57
60
|
class="missing-button-container"
|
|
58
61
|
>
|
|
59
62
|
<b-button type="is-ghost" class="missing-btn" @click.stop="markAsMissing">
|
|
60
|
-
{{ $t("missing_annotation") }}
|
|
63
|
+
<span v-if="showText">{{ $t("missing_annotation") }}</span>
|
|
64
|
+
<b-tooltip v-else position="is-left" :label="$t('missing_annotation')">
|
|
65
|
+
<b-icon icon="xmark" size="small" class="button-icon" />
|
|
66
|
+
</b-tooltip>
|
|
61
67
|
</b-button>
|
|
62
68
|
<b-button
|
|
63
69
|
type="is-ghost"
|
|
64
70
|
class="search-btn"
|
|
65
71
|
@click.stop="searchInDocument"
|
|
66
72
|
>
|
|
67
|
-
{{ $t("search_in_document") }}
|
|
73
|
+
<span v-if="showText">{{ $t("search_in_document") }}</span>
|
|
74
|
+
<b-tooltip v-else position="is-left" :label="$t('search_in_document')">
|
|
75
|
+
<b-icon icon="search" size="small" class="button-icon" />
|
|
76
|
+
</b-tooltip>
|
|
68
77
|
</b-button>
|
|
69
78
|
</div>
|
|
70
79
|
|
|
@@ -75,7 +84,10 @@
|
|
|
75
84
|
type="is-primary"
|
|
76
85
|
@click.stop="restore"
|
|
77
86
|
>
|
|
78
|
-
{{ $t("restore") }}
|
|
87
|
+
<span v-if="showText">{{ $t("restore") }}</span>
|
|
88
|
+
<b-tooltip v-else position="is-left" :label="$t('restore')">
|
|
89
|
+
<b-icon icon="trash-arrow-up" size="small" class="button-icon" />
|
|
90
|
+
</b-tooltip>
|
|
79
91
|
</b-button>
|
|
80
92
|
</div>
|
|
81
93
|
</template>
|
|
@@ -83,6 +95,7 @@
|
|
|
83
95
|
/* Component for showing actions for each annotation row */
|
|
84
96
|
import { mapGetters, mapState } from "vuex";
|
|
85
97
|
import AcceptedCheckMark from "../../assets/images/AcceptedCheckMark";
|
|
98
|
+
import { TEXT_BREAKPOINT_WIDTH } from "../../constants";
|
|
86
99
|
export default {
|
|
87
100
|
name: "AnnotationActionButtons",
|
|
88
101
|
components: {
|
|
@@ -116,6 +129,11 @@ export default {
|
|
|
116
129
|
required: false,
|
|
117
130
|
},
|
|
118
131
|
},
|
|
132
|
+
data() {
|
|
133
|
+
return {
|
|
134
|
+
showText: window.innerWidth > TEXT_BREAKPOINT_WIDTH,
|
|
135
|
+
};
|
|
136
|
+
},
|
|
119
137
|
computed: {
|
|
120
138
|
...mapState("document", ["publicView", "missingAnnotations"]),
|
|
121
139
|
...mapGetters("document", ["isDocumentReviewed"]),
|
|
@@ -129,7 +147,17 @@ export default {
|
|
|
129
147
|
);
|
|
130
148
|
},
|
|
131
149
|
},
|
|
150
|
+
created() {
|
|
151
|
+
window.addEventListener("resize", this.resize);
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
destroyed() {
|
|
155
|
+
window.removeEventListener("resize", this.resize);
|
|
156
|
+
},
|
|
132
157
|
methods: {
|
|
158
|
+
resize() {
|
|
159
|
+
this.showText = window.innerWidth > TEXT_BREAKPOINT_WIDTH;
|
|
160
|
+
},
|
|
133
161
|
save() {
|
|
134
162
|
this.$emit("save");
|
|
135
163
|
},
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
:class="[!fromTable && 'left-aligned', 'annotation-details']"
|
|
6
6
|
>
|
|
7
7
|
<div :class="['label-icon', fromTable && 'is-small']">
|
|
8
|
-
<div
|
|
8
|
+
<div
|
|
9
|
+
v-if="
|
|
10
|
+
(created(annotation) || edited(annotation)) &&
|
|
11
|
+
!isNegative(annotation) &&
|
|
12
|
+
!publicView
|
|
13
|
+
"
|
|
14
|
+
>
|
|
9
15
|
<div
|
|
10
16
|
:class="[
|
|
11
17
|
'annotation-details-icon',
|
|
@@ -23,7 +29,9 @@
|
|
|
23
29
|
<NotFoundIcon />
|
|
24
30
|
</div>
|
|
25
31
|
<div
|
|
26
|
-
v-else-if="
|
|
32
|
+
v-else-if="
|
|
33
|
+
notExtracted(annotation) || (isNegative(annotation) && !publicView)
|
|
34
|
+
"
|
|
27
35
|
:class="[
|
|
28
36
|
'annotation-details-icon',
|
|
29
37
|
animate ? 'animated-ripple' : '',
|
|
@@ -202,7 +210,10 @@ export default {
|
|
|
202
210
|
},
|
|
203
211
|
methods: {
|
|
204
212
|
getText() {
|
|
205
|
-
if (
|
|
213
|
+
if (
|
|
214
|
+
this.notExtracted(this.annotation) ||
|
|
215
|
+
this.isNegative(this.annotation)
|
|
216
|
+
) {
|
|
206
217
|
return this.$t("not_found_in_document");
|
|
207
218
|
} else if (this.created(this.annotation)) {
|
|
208
219
|
return this.getUser(this.annotation)
|
package/src/constants.js
CHANGED
|
@@ -2,4 +2,5 @@ export const PIXEL_RATIO = window.devicePixelRatio || 1;
|
|
|
2
2
|
export const VIEWPORT_RATIO = 0.98;
|
|
3
3
|
export const MINIMUM_APP_WIDTH = 600;
|
|
4
4
|
export const MINIMUM_OPTIMIZED_APP_WIDTH = 950;
|
|
5
|
+
export const TEXT_BREAKPOINT_WIDTH = 1350;
|
|
5
6
|
export const MULTI_ANN_TABLE_FEATURE = false;
|
package/src/icons.js
CHANGED
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
faArrowRight,
|
|
20
20
|
faDownload,
|
|
21
21
|
faSearch,
|
|
22
|
+
faTrashArrowUp,
|
|
23
|
+
faFloppyDisk,
|
|
22
24
|
} from "@fortawesome/free-solid-svg-icons";
|
|
23
25
|
import { FontAwesomeIcon as Icons } from "@fortawesome/vue-fontawesome";
|
|
24
26
|
|
|
@@ -41,7 +43,9 @@ library.add(
|
|
|
41
43
|
faArrowLeft,
|
|
42
44
|
faArrowRight,
|
|
43
45
|
faDownload,
|
|
44
|
-
faSearch
|
|
46
|
+
faSearch,
|
|
47
|
+
faTrashArrowUp,
|
|
48
|
+
faFloppyDisk
|
|
45
49
|
);
|
|
46
50
|
|
|
47
51
|
export default Icons;
|