@konfuzio/document-validation-ui 0.1.4 → 0.1.5-automatic-document-splitting

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.
Files changed (49) hide show
  1. package/dist/css/app.css +1 -1
  2. package/dist/index.html +1 -1
  3. package/dist/js/app.js +1 -1
  4. package/dist/js/app.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/assets/images/MagicWandIcon.vue +16 -0
  7. package/src/assets/images/ServerImage.vue +3 -0
  8. package/src/assets/images/SplitZigZag.vue +47 -14
  9. package/src/assets/images/StarIcon.vue +16 -0
  10. package/src/assets/scss/document_category.scss +0 -1
  11. package/src/assets/scss/document_dashboard.scss +6 -0
  12. package/src/assets/scss/document_edit.scss +135 -46
  13. package/src/assets/scss/splitting_confirmation_modal.scss +41 -0
  14. package/src/assets/scss/variables.scss +63 -1
  15. package/src/components/App.vue +11 -1
  16. package/src/components/DocumentAnnotations/ActionButtons.vue +7 -0
  17. package/src/components/DocumentAnnotations/AnnotationContent.vue +3 -0
  18. package/src/components/DocumentAnnotations/AnnotationRow.vue +3 -0
  19. package/src/components/DocumentAnnotations/CategorizeModal.vue +24 -4
  20. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +11 -3
  21. package/src/components/DocumentAnnotations/DocumentLabel.vue +2 -0
  22. package/src/components/DocumentAnnotations/EmptyAnnotation.vue +6 -1
  23. package/src/components/DocumentCategory.vue +39 -33
  24. package/src/components/DocumentDashboard.vue +39 -49
  25. package/src/components/DocumentEdit/DocumentEdit.vue +207 -69
  26. package/src/components/DocumentEdit/EditConfirmationModal.vue +54 -0
  27. package/src/components/DocumentEdit/EditPages.vue +30 -18
  28. package/src/components/DocumentEdit/EditSidebar.vue +95 -45
  29. package/src/components/DocumentEdit/SidebarButtons.vue +53 -0
  30. package/src/components/DocumentEdit/SplitInfoBar.vue +19 -0
  31. package/src/components/DocumentEdit/SplitOverview.vue +6 -5
  32. package/src/components/{DocumentError.vue → DocumentModals/DocumentErrorModal.vue} +3 -4
  33. package/src/components/{NotOptimizedViewportModal.vue → DocumentModals/NotOptimizedViewportModal.vue} +2 -2
  34. package/src/components/DocumentModals/SplittingSuggestionsModal.vue +121 -0
  35. package/src/components/DocumentPage/DocumentPage.vue +9 -3
  36. package/src/components/DocumentPage/DummyPage.vue +9 -7
  37. package/src/components/DocumentPage/ScrollingDocument.vue +8 -3
  38. package/src/components/DocumentThumbnails/DocumentThumbnails.vue +45 -8
  39. package/src/components/DocumentTopBar/DocumentName.vue +1 -0
  40. package/src/components/DocumentTopBar/DocumentTopBar.vue +2 -6
  41. package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +6 -20
  42. package/src/components/index.js +1 -0
  43. package/src/locales/de.json +15 -2
  44. package/src/locales/en.json +15 -1
  45. package/src/locales/es.json +14 -1
  46. package/src/store/display.js +8 -0
  47. package/src/store/document.js +83 -37
  48. package/src/store/edit.js +66 -48
  49. package/src/store/project.js +14 -14
@@ -3,7 +3,7 @@ const HTTP = myImports.HTTP;
3
3
 
4
4
  const state = {
5
5
  projectId: null,
6
- currentUser: null
6
+ currentUser: null,
7
7
  };
8
8
 
9
9
  const getters = {
@@ -11,13 +11,13 @@ const getters = {
11
11
  * Gets label sets for an annotation set creation
12
12
  */
13
13
  labelSetsFilteredForAnnotationSetCreation:
14
- state => (labelsSet, annotationSets) => {
14
+ (state) => (labelsSet, annotationSets) => {
15
15
  let returnLabels = [];
16
16
  if (labelsSet) {
17
- returnLabels = labelsSet.filter(labelSet => {
17
+ returnLabels = labelsSet.filter((labelSet) => {
18
18
  // check if label set has multiple and if not, if there's already an annotation set created
19
19
  if (!labelSet.has_multiple_annotation_sets) {
20
- const existingAnnotationSet = annotationSets.find(annSet => {
20
+ const existingAnnotationSet = annotationSets.find((annSet) => {
21
21
  return annSet.id === labelSet.id;
22
22
  });
23
23
  return existingAnnotationSet;
@@ -27,7 +27,7 @@ const getters = {
27
27
  });
28
28
  }
29
29
  return returnLabels;
30
- }
30
+ },
31
31
  };
32
32
 
33
33
  const actions = {
@@ -38,10 +38,10 @@ const actions = {
38
38
  fetchLabelSetDetails: ({ commit, state }, labelSetId) => {
39
39
  return new Promise((resolve, reject) => {
40
40
  HTTP.get(`label-sets/${labelSetId}/`)
41
- .then(response => {
41
+ .then((response) => {
42
42
  return resolve(response.data);
43
43
  })
44
- .catch(error => {
44
+ .catch((error) => {
45
45
  reject(error);
46
46
  console.log(error);
47
47
  });
@@ -52,10 +52,10 @@ const actions = {
52
52
  fetchLabelSets: ({ state }) => {
53
53
  return new Promise((resolve, reject) => {
54
54
  HTTP.get(`label-sets/?project=${state.projectId}`)
55
- .then(response => {
55
+ .then((response) => {
56
56
  return resolve(response.data.results);
57
57
  })
58
- .catch(error => {
58
+ .catch((error) => {
59
59
  reject(error);
60
60
  console.log(error);
61
61
  });
@@ -64,17 +64,17 @@ const actions = {
64
64
 
65
65
  fetchCurrentUser: ({ commit }) => {
66
66
  return HTTP.get(`/auth/me/`)
67
- .then(response => {
67
+ .then((response) => {
68
68
  commit("SET_CURRENT_USER", response.data.username);
69
69
  })
70
- .catch(error => {
70
+ .catch((error) => {
71
71
  console.log(error);
72
72
  });
73
73
  },
74
74
 
75
75
  setCurrentUser: ({ commit }, currentUser) => {
76
76
  commit("SET_CURRENT_USER", currentUser);
77
- }
77
+ },
78
78
  };
79
79
 
80
80
  const mutations = {
@@ -83,7 +83,7 @@ const mutations = {
83
83
  },
84
84
  SET_CURRENT_USER: (state, currentUser) => {
85
85
  state.currentUser = currentUser;
86
- }
86
+ },
87
87
  };
88
88
 
89
89
  export default {
@@ -91,5 +91,5 @@ export default {
91
91
  state,
92
92
  actions,
93
93
  mutations,
94
- getters
94
+ getters,
95
95
  };