@konfuzio/document-validation-ui 0.1.55-dev.0 → 0.1.55
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/assets/scss/document_annotations.scss +0 -2
- package/src/assets/scss/document_set_chooser.scss +1 -0
- package/src/assets/scss/document_top_bar.scss +11 -0
- package/src/components/App.vue +80 -0
- package/src/components/DocumentAnnotations/AnnotationRow.vue +5 -0
- package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +8 -2
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +16 -20
- package/src/components/DocumentDashboard.vue +1 -1
- package/src/components/DocumentModals/DocumentErrorModal.vue +5 -0
- package/src/components/DocumentPage/DocumentPage.vue +13 -3
- package/src/components/DocumentPage/EditAnnotation.vue +11 -0
- package/src/components/DocumentPage/NewAnnotation.vue +13 -12
- package/src/components/DocumentTopBar/DocumentTopBar.vue +13 -1
- package/src/components/DocumentsList/DocumentsList.vue +2 -1
- package/src/components/ErrorMessage.vue +6 -1
- package/src/locales/de.json +6 -3
- package/src/locales/en.json +6 -3
- package/src/locales/es.json +6 -3
- package/src/store/display.js +8 -0
- package/src/store/document.js +30 -15
- package/src/utils/utils.js +6 -0
package/src/store/document.js
CHANGED
|
@@ -40,20 +40,9 @@ const state = {
|
|
|
40
40
|
splittingSuggestions: null,
|
|
41
41
|
enableGroupingFeature: true,
|
|
42
42
|
annotationFilters: {
|
|
43
|
-
showFeedbackNeeded:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
true,
|
|
47
|
-
showEmpty:
|
|
48
|
-
window.location.hash === "#unrevised" ||
|
|
49
|
-
window.location.hash === "#possiblyIncorrect"
|
|
50
|
-
? false
|
|
51
|
-
: true,
|
|
52
|
-
showAccepted:
|
|
53
|
-
window.location.hash === "#unrevised" ||
|
|
54
|
-
window.location.hash === "#possiblyIncorrect"
|
|
55
|
-
? false
|
|
56
|
-
: true,
|
|
43
|
+
showFeedbackNeeded: true,
|
|
44
|
+
showEmpty: true,
|
|
45
|
+
showAccepted: true,
|
|
57
46
|
},
|
|
58
47
|
annotationSearch:
|
|
59
48
|
(getURLQueryParam("search") && getURLQueryParam("search").split(",")) || [],
|
|
@@ -1268,11 +1257,19 @@ const actions = {
|
|
|
1268
1257
|
});
|
|
1269
1258
|
},
|
|
1270
1259
|
|
|
1271
|
-
deleteAnnotation: (
|
|
1260
|
+
deleteAnnotation: (
|
|
1261
|
+
{ commit, getters, state },
|
|
1262
|
+
{ annotationId, annotationSet }
|
|
1263
|
+
) => {
|
|
1272
1264
|
return new Promise((resolve, reject) => {
|
|
1273
1265
|
HTTP.delete(`/annotations/${annotationId}/`)
|
|
1274
1266
|
.then(async (response) => {
|
|
1275
1267
|
if (response.status === 204) {
|
|
1268
|
+
if (state.annotationId === annotationId) {
|
|
1269
|
+
commit("SET_ANNOTATION_ID", null);
|
|
1270
|
+
setURLAnnotationHash(null);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1276
1273
|
commit("DELETE_ANNOTATION", annotationId);
|
|
1277
1274
|
|
|
1278
1275
|
// Check if the deleted annotation was the last one in a multiple annotation set
|
|
@@ -1535,6 +1532,15 @@ const actions = {
|
|
|
1535
1532
|
dispatch("fetchDocument");
|
|
1536
1533
|
}
|
|
1537
1534
|
},
|
|
1535
|
+
showMissingAnnotations({ commit }, show) {
|
|
1536
|
+
commit("SET_SHOW_MISSING_ANNOTATIONS", show);
|
|
1537
|
+
},
|
|
1538
|
+
showFeedbackNeededAnnotations({ commit }, show) {
|
|
1539
|
+
commit("SET_SHOW_FEEDBACK_NEEDED_ANNOTATIONS", show);
|
|
1540
|
+
},
|
|
1541
|
+
showAcceptedAnnotations({ commit }, show) {
|
|
1542
|
+
commit("SET_SHOW_ACCEPTED_ANNOTATIONS", show);
|
|
1543
|
+
},
|
|
1538
1544
|
};
|
|
1539
1545
|
|
|
1540
1546
|
const mutations = {
|
|
@@ -1799,6 +1805,15 @@ const mutations = {
|
|
|
1799
1805
|
state.annotationSearch = search;
|
|
1800
1806
|
setURLQueryParam("search", search);
|
|
1801
1807
|
},
|
|
1808
|
+
SET_SHOW_MISSING_ANNOTATIONS: (state, show) => {
|
|
1809
|
+
state.annotationFilters.showEmpty = show;
|
|
1810
|
+
},
|
|
1811
|
+
SET_SHOW_ACCEPTED_ANNOTATIONS: (state, show) => {
|
|
1812
|
+
state.annotationFilters.showAccepted = show;
|
|
1813
|
+
},
|
|
1814
|
+
SET_SHOW_FEEDBACK_NEEDED_ANNOTATIONS: (state, show) => {
|
|
1815
|
+
state.annotationFilters.showFeedbackNeeded = show;
|
|
1816
|
+
},
|
|
1802
1817
|
};
|
|
1803
1818
|
|
|
1804
1819
|
export default {
|
package/src/utils/utils.js
CHANGED
|
@@ -51,6 +51,12 @@ export function setURLQueryParam(query, value, deleteParam = "") {
|
|
|
51
51
|
export function setURLAnnotationHash(annotationId) {
|
|
52
52
|
if (annotationId) {
|
|
53
53
|
window.location.hash = `ann${annotationId}`;
|
|
54
|
+
} else {
|
|
55
|
+
history.pushState(
|
|
56
|
+
"",
|
|
57
|
+
document.title,
|
|
58
|
+
window.location.pathname + window.location.search
|
|
59
|
+
);
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
|