@konfuzio/document-validation-ui 0.1.26-dev.2 → 0.1.26-dev.4
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 +6 -0
- package/src/components/App.vue +16 -0
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +32 -4
- package/src/components/DocumentTopBar/DocumentTopBar.vue +2 -1
- package/src/constants.js +1 -0
- package/src/icons.js +5 -1
- package/src/store/display.js +8 -0
package/package.json
CHANGED
package/src/components/App.vue
CHANGED
|
@@ -78,6 +78,12 @@ export default {
|
|
|
78
78
|
required: false,
|
|
79
79
|
default: "",
|
|
80
80
|
},
|
|
81
|
+
// eslint-disable-next-line vue/prop-name-casing
|
|
82
|
+
review_filter: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false,
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
81
87
|
},
|
|
82
88
|
computed: {
|
|
83
89
|
documentId() {
|
|
@@ -130,6 +136,15 @@ export default {
|
|
|
130
136
|
return null;
|
|
131
137
|
}
|
|
132
138
|
},
|
|
139
|
+
reviewFilter() {
|
|
140
|
+
if (process.env.VUE_APP_DOCUMENTS_LIST_REVIEW_FILTER) {
|
|
141
|
+
return process.env.VUE_APP_DOCUMENTS_LIST_REVIEW_FILTER;
|
|
142
|
+
} else if (this.review_filter) {
|
|
143
|
+
return this.review_filter;
|
|
144
|
+
} else {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
},
|
|
133
148
|
},
|
|
134
149
|
created() {
|
|
135
150
|
// Sentry config
|
|
@@ -172,6 +187,7 @@ export default {
|
|
|
172
187
|
// document and project config
|
|
173
188
|
Promise.all([
|
|
174
189
|
this.$store.dispatch("display/setDetailsUrl", this.detailsUrl),
|
|
190
|
+
this.$store.dispatch("display/setReviewFilter", this.reviewFilter),
|
|
175
191
|
this.$store.dispatch("document/setDocId", this.documentId),
|
|
176
192
|
this.$store.dispatch("document/setPublicView", this.isPublicView),
|
|
177
193
|
this.$store.dispatch(
|
|
@@ -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
|
},
|
|
@@ -123,6 +123,7 @@ export default {
|
|
|
123
123
|
"loading",
|
|
124
124
|
"recalculatingAnnotations",
|
|
125
125
|
]),
|
|
126
|
+
...mapState("display", ["reviewFilter"]),
|
|
126
127
|
...mapState("category", ["categories"]),
|
|
127
128
|
...mapState("edit", ["editMode"]),
|
|
128
129
|
...mapState("project", ["documentsInProject"]),
|
|
@@ -163,7 +164,7 @@ export default {
|
|
|
163
164
|
// Only consider documents who have a status of "ready"
|
|
164
165
|
const filteredDocuments = this.documentsInProject.filter(
|
|
165
166
|
(document) =>
|
|
166
|
-
this.isDocumentReadyToBeReviewed(document) ||
|
|
167
|
+
(this.reviewFilter && this.isDocumentReadyToBeReviewed(document)) ||
|
|
167
168
|
this.waitingForSplittingConfirmation(document)
|
|
168
169
|
);
|
|
169
170
|
|
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;
|
package/src/store/display.js
CHANGED
|
@@ -41,6 +41,7 @@ const state = {
|
|
|
41
41
|
searchLoading: false,
|
|
42
42
|
currentSearchResult: null,
|
|
43
43
|
detailsUrl: null,
|
|
44
|
+
reviewFilter: false,
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
const getters = {
|
|
@@ -296,6 +297,10 @@ const actions = {
|
|
|
296
297
|
commit("SET_DETAILS_URL", value);
|
|
297
298
|
},
|
|
298
299
|
|
|
300
|
+
setReviewFilter: ({ commit }, value) => {
|
|
301
|
+
commit("SET_REVIEW_FILTER", value);
|
|
302
|
+
},
|
|
303
|
+
|
|
299
304
|
debounceSearch: debounce(({ commit, dispatch }, query) => {
|
|
300
305
|
dispatch("search", query);
|
|
301
306
|
}, 300),
|
|
@@ -417,6 +422,9 @@ const mutations = {
|
|
|
417
422
|
SET_DETAILS_URL: (state, value) => {
|
|
418
423
|
state.detailsUrl = value;
|
|
419
424
|
},
|
|
425
|
+
SET_REVIEW_FILTER: (state, value) => {
|
|
426
|
+
state.reviewFilter = value;
|
|
427
|
+
},
|
|
420
428
|
};
|
|
421
429
|
|
|
422
430
|
export default {
|