@konfuzio/document-validation-ui 0.1.8-pre-release-1 → 0.1.8-pre-release-3
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/css/chunk-vendors.css +5 -0
- 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/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/api.js +0 -10
- package/src/assets/scss/categorize_modal.scss +1 -1
- package/src/assets/scss/choose_label_set_modal.scss +1 -1
- package/src/assets/scss/document_category.scss +11 -6
- package/src/assets/scss/document_edit.scss +1 -1
- package/src/assets/scss/{theme.scss → main.scss} +28 -30
- package/src/assets/scss/variables.scss +11 -1
- package/src/components/App.vue +2 -55
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +9 -12
- package/src/components/DocumentAnnotations/AnnotationContent.vue +5 -5
- package/src/components/DocumentAnnotations/AnnotationRow.vue +2 -2
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +7 -4
- package/src/components/DocumentAnnotations/CategorizeModal.vue +5 -3
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +4 -4
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +5 -5
- package/src/components/DocumentAnnotations/MultiAnnotationTableOverlay.vue +42 -10
- package/src/components/DocumentCategory.vue +5 -1
- package/src/components/DocumentEdit/DocumentEdit.vue +4 -10
- package/src/components/DocumentModals/SplittingSuggestionsModal.vue +15 -3
- package/src/components/DocumentPage/DocumentPage.vue +6 -6
- package/src/components/DocumentPage/DocumentToolbar.vue +16 -14
- package/src/components/DocumentPage/MultiAnnSelection.vue +4 -2
- package/src/components/DocumentTopBar/DocumentName.vue +3 -3
- package/src/components/DocumentTopBar/DocumentTopBar.vue +8 -8
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +10 -25
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +4 -7
- package/src/main.js +1 -0
- package/src/store/document.js +6 -26
package/src/store/document.js
CHANGED
|
@@ -25,12 +25,10 @@ const state = {
|
|
|
25
25
|
annotationsMarkedAsMissing: null,
|
|
26
26
|
errorMessageWidth: null,
|
|
27
27
|
hoveredAnnotationSet: null,
|
|
28
|
-
finishedReview: false,
|
|
29
28
|
newAcceptedAnnotations: null,
|
|
30
29
|
selectedEntities: null,
|
|
31
30
|
serverError: false,
|
|
32
31
|
splittingSuggestions: null,
|
|
33
|
-
documentIsReviewed: false,
|
|
34
32
|
};
|
|
35
33
|
|
|
36
34
|
const getters = {
|
|
@@ -406,13 +404,13 @@ const getters = {
|
|
|
406
404
|
},
|
|
407
405
|
|
|
408
406
|
// Check if document is ready to be finished
|
|
409
|
-
|
|
407
|
+
isDocumentReadyToFinishReview: (state) => {
|
|
410
408
|
// check if all annotations have been revised
|
|
411
409
|
let notRevised;
|
|
412
410
|
|
|
413
411
|
const emptyAnnotations = [];
|
|
414
412
|
|
|
415
|
-
if (state.annotationSets) {
|
|
413
|
+
if (state.annotationSets && state.annotationSets.length > 0) {
|
|
416
414
|
state.annotationSets.forEach((annSet) => {
|
|
417
415
|
annSet.labels.map((label) => {
|
|
418
416
|
// return only labels with empty annotations
|
|
@@ -443,10 +441,13 @@ const getters = {
|
|
|
443
441
|
) {
|
|
444
442
|
return true;
|
|
445
443
|
}
|
|
446
|
-
|
|
447
444
|
return false;
|
|
448
445
|
},
|
|
449
446
|
|
|
447
|
+
isDocumentReviewed: (state) => {
|
|
448
|
+
return state.selectedDocument.is_reviewed;
|
|
449
|
+
},
|
|
450
|
+
|
|
450
451
|
/**
|
|
451
452
|
* Get number of annotations pending review per annotation set
|
|
452
453
|
*/
|
|
@@ -703,9 +704,6 @@ const actions = {
|
|
|
703
704
|
setSplittingSuggestions: ({ commit }, value) => {
|
|
704
705
|
commit("SET_SPLITTING_SUGGESTIONS", value);
|
|
705
706
|
},
|
|
706
|
-
setDocumentIsReviewed: ({ commit }, value) => {
|
|
707
|
-
commit("SET_DOCUMENT_IS_REVIEWED", value);
|
|
708
|
-
},
|
|
709
707
|
|
|
710
708
|
/**
|
|
711
709
|
* Actions that use HTTP requests always return the axios promise,
|
|
@@ -742,8 +740,6 @@ const actions = {
|
|
|
742
740
|
commit("SET_ANNOTATIONS", annotations);
|
|
743
741
|
commit("SET_LABELS", labels);
|
|
744
742
|
commit("SET_SELECTED_DOCUMENT", response.data);
|
|
745
|
-
commit("SET_DOCUMENT_IS_REVIEWED", response.data.is_reviewed);
|
|
746
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
747
743
|
|
|
748
744
|
if (rootState.project.projectId) {
|
|
749
745
|
projectId = rootState.project.projectId;
|
|
@@ -840,7 +836,6 @@ const actions = {
|
|
|
840
836
|
.then(async (response) => {
|
|
841
837
|
if (response.status === 201) {
|
|
842
838
|
await dispatch("fetchMissingAnnotations");
|
|
843
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
844
839
|
|
|
845
840
|
if (!getters.annotationSetExists(response.data.annotation_set)) {
|
|
846
841
|
const documentData = await dispatch("fetchDocumentData");
|
|
@@ -876,7 +871,6 @@ const actions = {
|
|
|
876
871
|
.then(async (response) => {
|
|
877
872
|
if (response.status === 200) {
|
|
878
873
|
commit("UPDATE_ANNOTATION", response.data);
|
|
879
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
880
874
|
commit("SET_NEW_ACCEPTED_ANNOTATIONS", null);
|
|
881
875
|
|
|
882
876
|
resolve(true);
|
|
@@ -895,7 +889,6 @@ const actions = {
|
|
|
895
889
|
.then(async (response) => {
|
|
896
890
|
if (response.status === 204) {
|
|
897
891
|
commit("DELETE_ANNOTATION", annotationId);
|
|
898
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
899
892
|
|
|
900
893
|
resolve(true);
|
|
901
894
|
}
|
|
@@ -918,7 +911,6 @@ const actions = {
|
|
|
918
911
|
commit("UPDATE_FILE_NAME", response.data.data_file_name);
|
|
919
912
|
} else {
|
|
920
913
|
commit("SET_SELECTED_DOCUMENT", response.data);
|
|
921
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
922
914
|
|
|
923
915
|
dispatch("pollDocumentEndpoint");
|
|
924
916
|
}
|
|
@@ -955,7 +947,6 @@ const actions = {
|
|
|
955
947
|
)
|
|
956
948
|
.then((response) => {
|
|
957
949
|
commit("SET_MISSING_ANNOTATIONS", response.data.results);
|
|
958
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
959
950
|
resolve(true);
|
|
960
951
|
})
|
|
961
952
|
.catch((error) => {
|
|
@@ -972,7 +963,6 @@ const actions = {
|
|
|
972
963
|
if (response.status === 201) {
|
|
973
964
|
commit("SET_ANNOTATIONS_MARKED_AS_MISSING", null);
|
|
974
965
|
commit("ADD_MISSING_ANNOTATIONS", response.data);
|
|
975
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
976
966
|
}
|
|
977
967
|
|
|
978
968
|
resolve(response);
|
|
@@ -990,7 +980,6 @@ const actions = {
|
|
|
990
980
|
.then((response) => {
|
|
991
981
|
if (response.status === 204) {
|
|
992
982
|
commit("DELETE_MISSING_ANNOTATION", id);
|
|
993
|
-
commit("SET_FINISHED_REVIEW", getters.isDocumentReviewFinished());
|
|
994
983
|
resolve(true);
|
|
995
984
|
}
|
|
996
985
|
})
|
|
@@ -1226,9 +1215,6 @@ const mutations = {
|
|
|
1226
1215
|
SET_EDIT_ANNOTATION: (state, editAnnotation) => {
|
|
1227
1216
|
state.editAnnotation = editAnnotation;
|
|
1228
1217
|
},
|
|
1229
|
-
SET_FINISHED_REVIEW: (state, finishedReview) => {
|
|
1230
|
-
state.finishedReview = finishedReview;
|
|
1231
|
-
},
|
|
1232
1218
|
RESET_EDIT_ANNOTATION: (state) => {
|
|
1233
1219
|
state.editAnnotation = null;
|
|
1234
1220
|
},
|
|
@@ -1256,9 +1242,6 @@ const mutations = {
|
|
|
1256
1242
|
}
|
|
1257
1243
|
},
|
|
1258
1244
|
SET_SELECTED_DOCUMENT: (state, document) => {
|
|
1259
|
-
if (document.is_reviewed === true) {
|
|
1260
|
-
state.documentIsReviewed = true;
|
|
1261
|
-
}
|
|
1262
1245
|
state.selectedDocument = document;
|
|
1263
1246
|
|
|
1264
1247
|
// this is to handle cache when a document is edited or changed
|
|
@@ -1327,9 +1310,6 @@ const mutations = {
|
|
|
1327
1310
|
SET_SPLITTING_SUGGESTIONS: (state, array) => {
|
|
1328
1311
|
state.splittingSuggestions = array;
|
|
1329
1312
|
},
|
|
1330
|
-
SET_DOCUMENT_IS_REVIEWED: (state, value) => {
|
|
1331
|
-
state.documentIsReviewed = value;
|
|
1332
|
-
},
|
|
1333
1313
|
};
|
|
1334
1314
|
|
|
1335
1315
|
export default {
|