@konfuzio/document-validation-ui 0.1.5-automatic-document-splitting-2 → 0.1.5-pre-release-1
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/images/ServerImage.vue +2 -2
- package/src/assets/images/SplitZigZag.vue +14 -47
- package/src/assets/scss/document_category.scss +1 -0
- package/src/assets/scss/document_dashboard.scss +0 -6
- package/src/assets/scss/document_edit.scss +46 -131
- package/src/assets/scss/document_top_bar.scss +1 -1
- package/src/assets/scss/variables.scss +3 -63
- package/src/components/DocumentAnnotations/AnnotationContent.vue +1 -1
- package/src/components/DocumentAnnotations/CategorizeModal.vue +2 -22
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +3 -11
- package/src/components/DocumentCategory.vue +5 -13
- package/src/components/DocumentDashboard.vue +6 -17
- package/src/components/DocumentEdit/DocumentEdit.vue +69 -207
- package/src/components/DocumentEdit/EditPages.vue +18 -29
- package/src/components/DocumentEdit/EditSidebar.vue +45 -95
- package/src/components/DocumentEdit/SplitOverview.vue +5 -4
- package/src/components/{DocumentModals/DocumentErrorModal.vue → DocumentError.vue} +4 -3
- package/src/components/DocumentPage/ScrollingDocument.vue +2 -2
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +20 -6
- package/src/components/{DocumentModals/NotOptimizedViewportModal.vue → NotOptimizedViewportModal.vue} +2 -2
- package/src/locales/de.json +2 -15
- package/src/locales/en.json +1 -15
- package/src/locales/es.json +1 -14
- package/src/store/document.js +19 -49
- package/src/store/edit.js +48 -66
- package/src/store/project.js +14 -14
- package/src/assets/images/MagicWandIcon.vue +0 -16
- package/src/assets/images/StarIcon.vue +0 -16
- package/src/assets/scss/splitting_confirmation_modal.scss +0 -41
- package/src/components/DocumentEdit/EditConfirmationModal.vue +0 -54
- package/src/components/DocumentEdit/SidebarButtons.vue +0 -53
- package/src/components/DocumentEdit/SplitInfoBar.vue +0 -19
- package/src/components/DocumentModals/SplittingSuggestionsModal.vue +0 -121
package/src/store/edit.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import myImports from "../api";
|
|
2
|
-
import { getURLQueryParam, navigateToNewDocumentURL } from "../utils/utils";
|
|
3
2
|
|
|
4
3
|
const HTTP = myImports.HTTP;
|
|
5
4
|
|
|
@@ -7,10 +6,9 @@ const state = {
|
|
|
7
6
|
editMode: false,
|
|
8
7
|
splitOverview: false,
|
|
9
8
|
isMultipleSelection: false,
|
|
10
|
-
|
|
9
|
+
documentPagesListForEditMode: [], // TODO: change name
|
|
11
10
|
selectedPages: [],
|
|
12
11
|
updatedDocument: [],
|
|
13
|
-
showEditConfirmationModal: false,
|
|
14
12
|
};
|
|
15
13
|
|
|
16
14
|
const actions = {
|
|
@@ -27,8 +25,8 @@ const actions = {
|
|
|
27
25
|
commit("SET_SPLIT_OVERVIEW", overview);
|
|
28
26
|
},
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
commit("
|
|
28
|
+
setDocumentPagesListForEditMode: ({ commit }, pages) => {
|
|
29
|
+
commit("SET_DOCUMENT_PAGES_FOR_EDIT_MODE", pages);
|
|
32
30
|
},
|
|
33
31
|
|
|
34
32
|
setUpdatedDocument: ({ commit }, updatedDocument) => {
|
|
@@ -59,41 +57,42 @@ const actions = {
|
|
|
59
57
|
},
|
|
60
58
|
|
|
61
59
|
rotatePage: ({ state, commit }, { page, direction }) => {
|
|
62
|
-
if (state.
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
rotatedAngle
|
|
60
|
+
if (state.documentPagesListForEditMode.find((p) => p.id === page[0].id)) {
|
|
61
|
+
const documentPagesListForEditMode =
|
|
62
|
+
state.documentPagesListForEditMode.map((p) => {
|
|
63
|
+
let rotatedAngle;
|
|
64
|
+
if (direction === "left") {
|
|
65
|
+
rotatedAngle = p.angle - 90;
|
|
66
|
+
if (p.id === page[0].id) {
|
|
67
|
+
if (rotatedAngle === -270) {
|
|
68
|
+
rotatedAngle = 90;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
...p,
|
|
72
|
+
angle: rotatedAngle,
|
|
73
|
+
};
|
|
70
74
|
}
|
|
71
|
-
return
|
|
72
|
-
...p,
|
|
73
|
-
angle: rotatedAngle,
|
|
74
|
-
};
|
|
75
|
+
return p;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
if (direction === "right") {
|
|
78
|
+
rotatedAngle = p.angle + 90;
|
|
79
|
+
if (p.id === page[0].id) {
|
|
80
|
+
if (rotatedAngle === 270) {
|
|
81
|
+
rotatedAngle = -90;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
...p,
|
|
85
|
+
angle: rotatedAngle,
|
|
86
|
+
};
|
|
83
87
|
}
|
|
84
|
-
return
|
|
85
|
-
...p,
|
|
86
|
-
angle: rotatedAngle,
|
|
87
|
-
};
|
|
88
|
+
return p;
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
});
|
|
90
|
+
});
|
|
92
91
|
|
|
93
|
-
commit("
|
|
92
|
+
commit("SET_DOCUMENT_PAGES_FOR_EDIT_MODE", documentPagesListForEditMode);
|
|
94
93
|
} else {
|
|
95
94
|
if (direction === "left") {
|
|
96
|
-
state.
|
|
95
|
+
state.documentPagesListForEditMode.push({
|
|
97
96
|
id: page.id,
|
|
98
97
|
number: page.number,
|
|
99
98
|
angle: -90,
|
|
@@ -103,7 +102,7 @@ const actions = {
|
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
if (direction === "right") {
|
|
106
|
-
state.
|
|
105
|
+
state.documentPagesListForEditMode.push({
|
|
107
106
|
id: page.id,
|
|
108
107
|
number: page.number,
|
|
109
108
|
angle: 90,
|
|
@@ -116,7 +115,7 @@ const actions = {
|
|
|
116
115
|
|
|
117
116
|
updateRotationToTheLeft: ({ state, commit }) => {
|
|
118
117
|
// updated the angles that will be sent to the backend
|
|
119
|
-
const array = state.
|
|
118
|
+
const array = state.documentPagesListForEditMode.map((p) => {
|
|
120
119
|
let rotatedAngle = p.angle - 90;
|
|
121
120
|
if (rotatedAngle === -270) {
|
|
122
121
|
rotatedAngle = 90;
|
|
@@ -127,12 +126,12 @@ const actions = {
|
|
|
127
126
|
};
|
|
128
127
|
});
|
|
129
128
|
|
|
130
|
-
commit("
|
|
129
|
+
commit("SET_DOCUMENT_PAGES_FOR_EDIT_MODE", array);
|
|
131
130
|
},
|
|
132
131
|
|
|
133
132
|
updateRotationToTheRight: ({ state, commit }) => {
|
|
134
133
|
// updated the angles that will be sent to the backend
|
|
135
|
-
const array = state.
|
|
134
|
+
const array = state.documentPagesListForEditMode.map((p) => {
|
|
136
135
|
let rotatedAngle = p.angle + 90;
|
|
137
136
|
if (rotatedAngle === 270) {
|
|
138
137
|
rotatedAngle = -90;
|
|
@@ -143,16 +142,13 @@ const actions = {
|
|
|
143
142
|
};
|
|
144
143
|
});
|
|
145
144
|
|
|
146
|
-
commit("
|
|
145
|
+
commit("SET_DOCUMENT_PAGES_FOR_EDIT_MODE", array);
|
|
147
146
|
},
|
|
148
147
|
|
|
149
148
|
editDocument: ({ rootState, dispatch }, editedDocument) => {
|
|
150
149
|
dispatch("document/startRecalculatingAnnotations", null, {
|
|
151
150
|
root: true,
|
|
152
151
|
});
|
|
153
|
-
|
|
154
|
-
const oldId = rootState.document.documentId;
|
|
155
|
-
|
|
156
152
|
return new Promise((resolve) => {
|
|
157
153
|
HTTP.post(
|
|
158
154
|
`/documents/${rootState.document.documentId}/postprocess/`,
|
|
@@ -160,22 +156,15 @@ const actions = {
|
|
|
160
156
|
)
|
|
161
157
|
.then(async (response) => {
|
|
162
158
|
if (response && response.status === 200) {
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
dispatch("document/pollDocumentEndpoint", null, {
|
|
174
|
-
root: true,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
159
|
+
const newDocument = response.data[0];
|
|
160
|
+
const newId = newDocument.id;
|
|
161
|
+
|
|
162
|
+
await dispatch("document/setDocId", newId, {
|
|
163
|
+
root: true,
|
|
164
|
+
});
|
|
165
|
+
dispatch("document/pollDocumentEndpoint", null, {
|
|
166
|
+
root: true,
|
|
167
|
+
});
|
|
179
168
|
resolve(null);
|
|
180
169
|
} else {
|
|
181
170
|
resolve(response);
|
|
@@ -187,10 +176,6 @@ const actions = {
|
|
|
187
176
|
});
|
|
188
177
|
});
|
|
189
178
|
},
|
|
190
|
-
|
|
191
|
-
setShowEditConfirmationModal: ({ commit }, value) => {
|
|
192
|
-
commit("SET_SHOW_EDIT_CONFIRMATION_MODAL", value);
|
|
193
|
-
},
|
|
194
179
|
};
|
|
195
180
|
|
|
196
181
|
const mutations = {
|
|
@@ -202,8 +187,8 @@ const mutations = {
|
|
|
202
187
|
state.splitOverview = overview;
|
|
203
188
|
},
|
|
204
189
|
|
|
205
|
-
|
|
206
|
-
state.
|
|
190
|
+
SET_DOCUMENT_PAGES_FOR_EDIT_MODE: (state, pages) => {
|
|
191
|
+
state.documentPagesListForEditMode = pages;
|
|
207
192
|
},
|
|
208
193
|
|
|
209
194
|
SET_UPDATED_DOCUMENT: (state, updatedDocument) => {
|
|
@@ -215,9 +200,6 @@ const mutations = {
|
|
|
215
200
|
ADD_SELECTED_PAGE: (state, selectedPage) => {
|
|
216
201
|
state.selectedPages.push(selectedPage);
|
|
217
202
|
},
|
|
218
|
-
SET_SHOW_EDIT_CONFIRMATION_MODAL: (state, value) => {
|
|
219
|
-
state.showEditConfirmationModal = value;
|
|
220
|
-
},
|
|
221
203
|
};
|
|
222
204
|
|
|
223
205
|
export default {
|
package/src/store/project.js
CHANGED
|
@@ -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
|
-
|
|
14
|
+
state => (labelsSet, annotationSets) => {
|
|
15
15
|
let returnLabels = [];
|
|
16
16
|
if (labelsSet) {
|
|
17
|
-
returnLabels = labelsSet.filter(
|
|
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(
|
|
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(
|
|
41
|
+
.then(response => {
|
|
42
42
|
return resolve(response.data);
|
|
43
43
|
})
|
|
44
|
-
.catch(
|
|
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(
|
|
55
|
+
.then(response => {
|
|
56
56
|
return resolve(response.data.results);
|
|
57
57
|
})
|
|
58
|
-
.catch(
|
|
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(
|
|
67
|
+
.then(response => {
|
|
68
68
|
commit("SET_CURRENT_USER", response.data.username);
|
|
69
69
|
})
|
|
70
|
-
.catch(
|
|
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
|
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
width="19"
|
|
4
|
-
height="19"
|
|
5
|
-
viewBox="0 0 19 19"
|
|
6
|
-
fill="none"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
>
|
|
9
|
-
<path
|
|
10
|
-
fill-rule="evenodd"
|
|
11
|
-
clip-rule="evenodd"
|
|
12
|
-
d="M11.5098 0.833984C11.97 0.833984 12.3431 1.20708 12.3431 1.66732V2.91732C12.3431 3.37755 11.97 3.75065 11.5098 3.75065C11.0496 3.75065 10.6765 3.37755 10.6765 2.91732V1.66732C10.6765 1.20708 11.0496 0.833984 11.5098 0.833984ZM6.70333 2.74473C7.02877 2.41929 7.55641 2.41929 7.88184 2.74473L8.76573 3.62861C9.09116 3.95405 9.09116 4.48169 8.76573 4.80712C8.44029 5.13256 7.91265 5.13256 7.58721 4.80712L6.70333 3.92324C6.37789 3.5978 6.37789 3.07017 6.70333 2.74473ZM16.2657 2.74473C16.5912 3.07017 16.5912 3.5978 16.2657 3.92324L15.3818 4.80712C15.0564 5.13256 14.5288 5.13256 14.2033 4.80712C13.8779 4.48169 13.8779 3.95405 14.2033 3.62861L15.0872 2.74473C15.4127 2.41929 15.9403 2.41929 16.2657 2.74473ZM9.73615 5.84407C10.0709 5.7353 10.4315 5.7353 10.7662 5.84407C11.0076 5.92251 11.1925 6.05549 11.3383 6.17918C11.4709 6.29182 11.6158 6.43668 11.7645 6.58543L12.4164 7.23737C12.5651 7.38607 12.71 7.53089 12.8226 7.66358C12.9463 7.80928 13.0793 7.99419 13.1578 8.23562C13.2665 8.57036 13.2665 8.93094 13.1578 9.26568C13.0793 9.50711 12.9463 9.69202 12.8226 9.83772C12.71 9.9704 12.5652 10.1152 12.4164 10.2639L10.4244 12.256C10.4242 12.2562 10.424 12.2564 10.4238 12.2566C10.4236 12.2568 10.4234 12.257 10.4232 12.2572L4.68113 17.9992C4.53242 18.148 4.3876 18.2928 4.25492 18.4055C4.10921 18.5291 3.9243 18.6621 3.68287 18.7406C3.34813 18.8493 2.98755 18.8493 2.65281 18.7406C2.41138 18.6621 2.22648 18.5291 2.08077 18.4055C1.94809 18.2928 1.80327 18.148 1.65456 17.9992L1.63578 17.9804L1.0214 17.366L1.0026 17.3473C0.853863 17.1986 0.709012 17.0537 0.596376 16.9211C0.472682 16.7754 0.339706 16.5904 0.26126 16.349C0.152497 16.0143 0.152497 15.6537 0.26126 15.319C0.339706 15.0775 0.472681 14.8926 0.596375 14.7469C0.709013 14.6142 0.853865 14.4694 1.0026 14.3207L6.74496 8.57836L8.73791 6.5854C8.88661 6.43667 9.03142 6.29182 9.1641 6.17918C9.30981 6.05549 9.49472 5.92251 9.73615 5.84407ZM7.33451 10.3458L2.19991 15.4804C2.02518 15.6552 1.93003 15.7512 1.86694 15.8255C1.86443 15.8285 1.86207 15.8313 1.85985 15.834C1.86207 15.8366 1.86443 15.8395 1.86694 15.8424C1.93003 15.9167 2.02518 16.0128 2.19991 16.1875L2.81429 16.8019C2.98902 16.9767 3.08509 17.0718 3.1594 17.1349C3.16236 17.1374 3.16518 17.1398 3.16785 17.142C3.17052 17.1398 3.17333 17.1374 3.17629 17.1349C3.2506 17.0718 3.34667 16.9766 3.5214 16.8019L8.656 11.6673L7.33451 10.3458ZM9.83451 10.4888L8.51302 9.16732L9.89762 7.78272C10.0724 7.60799 10.1684 7.51284 10.2427 7.44975C10.2457 7.44724 10.2485 7.44487 10.2512 7.44265C10.2538 7.44487 10.2567 7.44724 10.2596 7.44975C10.3339 7.51284 10.43 7.60799 10.6047 7.78272L11.2191 8.3971C11.3938 8.57183 11.489 8.66789 11.5521 8.74221C11.5546 8.74516 11.557 8.74798 11.5592 8.75065C11.557 8.75332 11.5546 8.75614 11.5521 8.75909C11.489 8.83341 11.3938 8.92947 11.2191 9.1042L9.83451 10.4888ZM15.2598 7.50065C15.2598 7.04041 15.6329 6.66732 16.0931 6.66732H17.3431C17.8034 6.66732 18.1765 7.04041 18.1765 7.50065C18.1765 7.96089 17.8034 8.33398 17.3431 8.33398H16.0931C15.6329 8.33398 15.2598 7.96089 15.2598 7.50065ZM14.2033 10.2447C14.5288 9.91929 15.0564 9.91929 15.3818 10.2447L16.2657 11.1286C16.5912 11.454 16.5912 11.9817 16.2657 12.3071C15.9403 12.6326 15.4127 12.6326 15.0872 12.3071L14.2033 11.4232C13.8779 11.0978 13.8779 10.5702 14.2033 10.2447Z"
|
|
13
|
-
fill="#41AF85"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
</template>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
width="16"
|
|
4
|
-
height="16"
|
|
5
|
-
viewBox="0 0 16 16"
|
|
6
|
-
fill="none"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
>
|
|
9
|
-
<path
|
|
10
|
-
fill-rule="evenodd"
|
|
11
|
-
clip-rule="evenodd"
|
|
12
|
-
d="M2.99935 0.667969C3.36754 0.667969 3.66602 0.966446 3.66602 1.33464V2.33464H4.66602C5.03421 2.33464 5.33268 2.63311 5.33268 3.0013C5.33268 3.36949 5.03421 3.66797 4.66602 3.66797H3.66602V4.66797C3.66602 5.03616 3.36754 5.33464 2.99935 5.33464C2.63116 5.33464 2.33268 5.03616 2.33268 4.66797V3.66797H1.33268C0.964492 3.66797 0.666016 3.36949 0.666016 3.0013C0.666016 2.63311 0.964492 2.33464 1.33268 2.33464H2.33268V1.33464C2.33268 0.966446 2.63116 0.667969 2.99935 0.667969ZM8.66601 1.33464C8.94186 1.33464 9.18922 1.50452 9.28824 1.76198L10.4444 4.76789C10.6446 5.28859 10.7076 5.43863 10.7936 5.5597C10.88 5.68117 10.9861 5.7873 11.1076 5.87367C11.2287 5.95975 11.3787 6.02268 11.8994 6.22295L14.9053 7.37907C15.1628 7.47809 15.3327 7.72545 15.3327 8.0013C15.3327 8.27715 15.1628 8.52451 14.9053 8.62353L11.8994 9.77965C11.3787 9.97992 11.2287 10.0429 11.1076 10.1289C10.9861 10.2153 10.88 10.3214 10.7936 10.4429C10.7076 10.564 10.6446 10.714 10.4444 11.2347L9.28825 14.2406C9.18922 14.4981 8.94186 14.668 8.66602 14.668C8.39017 14.668 8.14281 14.4981 8.04379 14.2406L6.88767 11.2347C6.6874 10.714 6.62447 10.564 6.53838 10.4429C6.45201 10.3214 6.34588 10.2153 6.22441 10.1289C6.10335 10.0429 5.9533 9.97992 5.4326 9.77965L2.4267 8.62353C2.16923 8.52451 1.99935 8.27715 1.99935 8.0013C1.99935 7.72545 2.16923 7.47809 2.4267 7.37907L5.4326 6.22295C5.9533 6.02268 6.10335 5.95975 6.22441 5.87367C6.34588 5.7873 6.45201 5.68117 6.53838 5.5597C6.62447 5.43863 6.6874 5.28859 6.88767 4.76789L8.04378 1.76198C8.14281 1.50452 8.39017 1.33464 8.66601 1.33464ZM2.99935 10.668C3.36754 10.668 3.66602 10.9664 3.66602 11.3346V12.3346H4.66602C5.03421 12.3346 5.33268 12.6331 5.33268 13.0013C5.33268 13.3695 5.03421 13.668 4.66602 13.668H3.66602V14.668C3.66602 15.0362 3.36754 15.3346 2.99935 15.3346C2.63116 15.3346 2.33268 15.0362 2.33268 14.668V13.668H1.33268C0.964492 13.668 0.666016 13.3695 0.666016 13.0013C0.666016 12.6331 0.964492 12.3346 1.33268 12.3346H2.33268V11.3346C2.33268 10.9664 2.63116 10.668 2.99935 10.668Z"
|
|
13
|
-
fill="#41AF85"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
</template>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
@import "./imports.scss";
|
|
2
|
-
|
|
3
|
-
.splitting-confirmation-modal {
|
|
4
|
-
.header {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
gap: 8px;
|
|
8
|
-
padding-bottom: 15px;
|
|
9
|
-
font-weight: 500;
|
|
10
|
-
font-size: 18px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.content {
|
|
14
|
-
text-align: left;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
font-size: 14px;
|
|
17
|
-
color: $text-color;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.modal-card-foot {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
gap: 10px;
|
|
24
|
-
|
|
25
|
-
.recommended {
|
|
26
|
-
font-weight: 600;
|
|
27
|
-
font-size: 11px;
|
|
28
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
29
|
-
padding: 2px 5px;
|
|
30
|
-
border-radius: 36px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.button {
|
|
34
|
-
width: 100%;
|
|
35
|
-
|
|
36
|
-
&.is-primary {
|
|
37
|
-
font-weight: 500;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="edit-confirmation-modal">
|
|
3
|
-
<b-modal v-model="isModalActive" :can-cancel="[]" class="edit-modal">
|
|
4
|
-
<section class="modal-card-body">
|
|
5
|
-
<div class="header">
|
|
6
|
-
<p class="modal-title">{{ $t("confirm_splitting") }}</p>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="content">{{ $t("splitting_warning") }}</div>
|
|
9
|
-
</section>
|
|
10
|
-
<footer class="modal-card-foot">
|
|
11
|
-
<b-button @click="closeModal">
|
|
12
|
-
{{ $t("no") }}
|
|
13
|
-
</b-button>
|
|
14
|
-
<b-button type="is-primary" @click="confirmChanges">
|
|
15
|
-
{{ $t("yes") }}
|
|
16
|
-
</b-button>
|
|
17
|
-
</footer>
|
|
18
|
-
</b-modal>
|
|
19
|
-
</section>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import { mapState } from "vuex";
|
|
24
|
-
/**
|
|
25
|
-
* This component shows a modal to confirm the edit changes in the document
|
|
26
|
-
*/
|
|
27
|
-
export default {
|
|
28
|
-
name: "EditConfirmationModal",
|
|
29
|
-
data() {
|
|
30
|
-
return {
|
|
31
|
-
isModalActive: false,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
computed: {
|
|
35
|
-
...mapState("edit", ["showEditConfirmationModal"]),
|
|
36
|
-
},
|
|
37
|
-
watch: {
|
|
38
|
-
showEditConfirmationModal(newValue) {
|
|
39
|
-
this.isModalActive = newValue;
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
methods: {
|
|
43
|
-
closeModal() {
|
|
44
|
-
this.isModalActive = false;
|
|
45
|
-
this.$store.dispatch("edit/setShowEditConfirmationModal", false);
|
|
46
|
-
},
|
|
47
|
-
confirmChanges() {
|
|
48
|
-
this.$emit("save-changes");
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<style scoped lang="scss" src="../../assets/scss/document_edit.scss"></style>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="sidebar-buttons">
|
|
3
|
-
<!-- Rotate buttons -->
|
|
4
|
-
<div v-if="showRotateButton" class="rotate-button-container">
|
|
5
|
-
<b-button
|
|
6
|
-
class="rotate-button edit-mode-btn primary-button"
|
|
7
|
-
:disabled="buttonDisabled"
|
|
8
|
-
@click="rotateButton"
|
|
9
|
-
>
|
|
10
|
-
<div class="button-content">
|
|
11
|
-
<b-icon :icon="icon" class="is-small" />
|
|
12
|
-
<span class="button-text">{{ buttonText }}</span>
|
|
13
|
-
</div>
|
|
14
|
-
</b-button>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
export default {
|
|
21
|
-
name: "SidebarButtons",
|
|
22
|
-
props: {
|
|
23
|
-
showRotateButton: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false,
|
|
26
|
-
},
|
|
27
|
-
buttonDisabled: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: true,
|
|
30
|
-
},
|
|
31
|
-
buttonText: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: null,
|
|
34
|
-
},
|
|
35
|
-
icon: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: null,
|
|
38
|
-
},
|
|
39
|
-
tooltipInfo: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: null,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
methods: {
|
|
46
|
-
rotateButton() {
|
|
47
|
-
this.$emit("rotate");
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style scoped lang="scss" src="../../assets/scss/document_edit.scss"></style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="split-info-bar">
|
|
3
|
-
<StarIcon />
|
|
4
|
-
<span> {{ $t("smart_split_suggestions") }}</span>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import StarIcon from "../../assets/images/StarIcon";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: "SplitInfoBar",
|
|
13
|
-
components: {
|
|
14
|
-
StarIcon,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<style scoped lang="scss" src="../../assets/scss/document_edit.scss"></style>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section ref="splittingModal" class="splitting-confirmation-modal">
|
|
3
|
-
<b-modal
|
|
4
|
-
v-model="isModalActive"
|
|
5
|
-
class="modal-400"
|
|
6
|
-
:width="500"
|
|
7
|
-
:can-cancel="[]"
|
|
8
|
-
>
|
|
9
|
-
<section class="modal-card-body split-modal">
|
|
10
|
-
<div class="header">
|
|
11
|
-
<StarIcon />
|
|
12
|
-
<p class="modal-title">
|
|
13
|
-
{{
|
|
14
|
-
splittingSuggestions && splittingSuggestions.length > 0
|
|
15
|
-
? $t("split_modal_title")
|
|
16
|
-
: $t("prepare_document")
|
|
17
|
-
}}
|
|
18
|
-
</p>
|
|
19
|
-
</div>
|
|
20
|
-
<div ref="bodyText" class="content"></div>
|
|
21
|
-
</section>
|
|
22
|
-
<footer class="modal-card-foot">
|
|
23
|
-
<b-button @click="closeModal">
|
|
24
|
-
{{ $t("do_it_later") }}
|
|
25
|
-
</b-button>
|
|
26
|
-
<b-button type="is-primary" @click="handleReviewNow">
|
|
27
|
-
{{ $t("review_now") }}
|
|
28
|
-
<span class="recommended">{{ recommended }}</span>
|
|
29
|
-
</b-button>
|
|
30
|
-
</footer>
|
|
31
|
-
</b-modal>
|
|
32
|
-
</section>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
import { nextTick } from "vue";
|
|
37
|
-
import { mapGetters, mapState } from "vuex";
|
|
38
|
-
import StarIcon from "../../assets/images/StarIcon";
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* This component shows a modal to inform the user about auto-splitting suggestions
|
|
42
|
-
*/
|
|
43
|
-
export default {
|
|
44
|
-
name: "SplittingSuggestionsModal",
|
|
45
|
-
components: {
|
|
46
|
-
StarIcon,
|
|
47
|
-
},
|
|
48
|
-
data() {
|
|
49
|
-
return {
|
|
50
|
-
isModalActive: false,
|
|
51
|
-
recommended: this.$t("recommended"),
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
computed: {
|
|
55
|
-
...mapState("document", ["splittingSuggestions", "selectedDocument"]),
|
|
56
|
-
...mapGetters("document", ["waitingForSplittingConfirmation"]),
|
|
57
|
-
},
|
|
58
|
-
watch: {
|
|
59
|
-
splittingSuggestions(newValue) {
|
|
60
|
-
if (newValue) {
|
|
61
|
-
this.isModalActive = true;
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
isModalActive(newValue) {
|
|
65
|
-
if (newValue) {
|
|
66
|
-
this.$nextTick(() => {
|
|
67
|
-
if (
|
|
68
|
-
this.splittingSuggestions &&
|
|
69
|
-
this.splittingSuggestions.length > 0
|
|
70
|
-
) {
|
|
71
|
-
this.$refs.bodyText.innerHTML = this.$t("split_modal_body", {
|
|
72
|
-
number_of_split_documents: this.splittingSuggestions.length,
|
|
73
|
-
});
|
|
74
|
-
} else {
|
|
75
|
-
this.$refs.bodyText.innerHTML = this.$t(
|
|
76
|
-
"split_modal_no_suggestions"
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
mounted() {
|
|
84
|
-
if (this.splittingSuggestions) {
|
|
85
|
-
this.isModalActive = true;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
nextTick(() => {
|
|
89
|
-
if (this.recommended) {
|
|
90
|
-
this.recommended = this.recommended.toUpperCase();
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
methods: {
|
|
95
|
-
closeModal() {
|
|
96
|
-
const updatedDocument = [
|
|
97
|
-
{
|
|
98
|
-
name: this.selectedDocument.data_file_name,
|
|
99
|
-
category: this.selectedDocument.category,
|
|
100
|
-
pages: this.selectedDocument.pages,
|
|
101
|
-
},
|
|
102
|
-
];
|
|
103
|
-
|
|
104
|
-
this.$store.dispatch("edit/editDocument", updatedDocument);
|
|
105
|
-
|
|
106
|
-
this.$store.dispatch("display/setCategorizeModalIsActive", false);
|
|
107
|
-
this.isModalActive = false;
|
|
108
|
-
},
|
|
109
|
-
handleReviewNow() {
|
|
110
|
-
this.$store.dispatch("edit/enableEditMode");
|
|
111
|
-
this.isModalActive = false;
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
</script>
|
|
116
|
-
|
|
117
|
-
<style
|
|
118
|
-
scoped
|
|
119
|
-
lang="scss"
|
|
120
|
-
src="../../assets/scss/splitting_confirmation_modal.scss"
|
|
121
|
-
></style>
|