@konfuzio/document-validation-ui 0.1.19-dev.1 → 0.1.19

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 (145) hide show
  1. package/.eslintrc.js +10 -10
  2. package/.prettierrc.json +1 -1
  3. package/LICENSE +21 -21
  4. package/README.md +24 -24
  5. package/cypress.config.js +13 -13
  6. package/dist/css/app.css +1 -1
  7. package/dist/index.html +1 -1
  8. package/dist/js/app.js +1 -1
  9. package/dist/js/app.js.map +1 -1
  10. package/dist/js/chunk-vendors.js +1 -1
  11. package/dist/js/chunk-vendors.js.map +1 -1
  12. package/jest.config.js +4 -4
  13. package/package.json +66 -66
  14. package/src/api.js +82 -82
  15. package/src/assets/images/AcceptedCheckMark.vue +8 -8
  16. package/src/assets/images/AcceptedUser.vue +8 -8
  17. package/src/assets/images/ActionIcon.vue +60 -60
  18. package/src/assets/images/ArrowDownKey.vue +11 -11
  19. package/src/assets/images/ArrowUpKey.vue +11 -11
  20. package/src/assets/images/CategoryIconImg.vue +13 -13
  21. package/src/assets/images/CheckMark.vue +8 -8
  22. package/src/assets/images/DraggableIcon.vue +14 -14
  23. package/src/assets/images/EditDocIcon.vue +12 -12
  24. package/src/assets/images/EmptyStateImg.vue +129 -129
  25. package/src/assets/images/ErrorIcon.vue +28 -28
  26. package/src/assets/images/EyeIcon.vue +11 -11
  27. package/src/assets/images/FileNameNotSavedImage.vue +26 -26
  28. package/src/assets/images/FileNameSavedImage.vue +14 -14
  29. package/src/assets/images/FitZoomIcon.vue +16 -16
  30. package/src/assets/images/GridIcon.vue +16 -16
  31. package/src/assets/images/KeyboardIcon.vue +16 -16
  32. package/src/assets/images/MagicWandIcon.vue +16 -16
  33. package/src/assets/images/MinusIcon.vue +13 -13
  34. package/src/assets/images/NotFoundIcon.vue +16 -16
  35. package/src/assets/images/NotOptimizedIllustration.vue +651 -651
  36. package/src/assets/images/PlusIcon.vue +13 -13
  37. package/src/assets/images/QuestionMark.vue +12 -12
  38. package/src/assets/images/ServerImage.vue +73 -73
  39. package/src/assets/images/SettingsIcon.vue +14 -14
  40. package/src/assets/images/SplitLines.vue +18 -18
  41. package/src/assets/images/SplitZigZag.vue +49 -49
  42. package/src/assets/images/StarIcon.vue +16 -16
  43. package/src/assets/images/StatusImg.vue +14 -14
  44. package/src/assets/images/TranslateArrows.vue +33 -33
  45. package/src/assets/scss/ann_set_table_options.scss +26 -26
  46. package/src/assets/scss/annotation_details.scss +141 -141
  47. package/src/assets/scss/choose_label_set_modal.scss +65 -65
  48. package/src/assets/scss/document_action_bar.scss +37 -37
  49. package/src/assets/scss/document_annotations.scss +558 -537
  50. package/src/assets/scss/document_category.scss +85 -85
  51. package/src/assets/scss/document_dashboard.scss +52 -52
  52. package/src/assets/scss/document_edit.scss +410 -410
  53. package/src/assets/scss/document_error.scss +81 -81
  54. package/src/assets/scss/document_name.scss +60 -60
  55. package/src/assets/scss/document_page.scss +12 -12
  56. package/src/assets/scss/document_thumbnails.scss +41 -41
  57. package/src/assets/scss/document_toolbar.scss +111 -111
  58. package/src/assets/scss/document_top_bar.scss +171 -171
  59. package/src/assets/scss/document_viewport_modal.scss +25 -25
  60. package/src/assets/scss/documents_list.scss +141 -141
  61. package/src/assets/scss/edit_page_thumbnail.scss +53 -53
  62. package/src/assets/scss/empty_state.scss +34 -34
  63. package/src/assets/scss/extracting_data.scss +35 -35
  64. package/src/assets/scss/imports.scss +1 -1
  65. package/src/assets/scss/multi_ann_table_overlay.scss +38 -38
  66. package/src/assets/scss/multi_ann_table_popup.scss +12 -12
  67. package/src/assets/scss/new_annotation.scss +102 -102
  68. package/src/assets/scss/scrolling_document.scss +19 -19
  69. package/src/assets/scss/theme.scss +801 -801
  70. package/src/assets/scss/variables.scss +66 -66
  71. package/src/components/App.cy.js +7 -7
  72. package/src/components/App.vue +187 -187
  73. package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +152 -168
  74. package/src/components/DocumentAnnotations/AnnotationContent.vue +210 -210
  75. package/src/components/DocumentAnnotations/AnnotationDetails.vue +251 -251
  76. package/src/components/DocumentAnnotations/AnnotationRow.vue +752 -752
  77. package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +89 -89
  78. package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +186 -186
  79. package/src/components/DocumentAnnotations/DocumentAnnotations.cy.js +441 -441
  80. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +534 -534
  81. package/src/components/DocumentAnnotations/DocumentLabel.vue +189 -189
  82. package/src/components/DocumentAnnotations/EmptyAnnotation.vue +193 -193
  83. package/src/components/DocumentAnnotations/EmptyState.vue +21 -21
  84. package/src/components/DocumentAnnotations/ExtractingData.vue +41 -41
  85. package/src/components/DocumentAnnotations/LoadingAnnotations.vue +43 -43
  86. package/src/components/DocumentAnnotations/LoadingLabels.vue +43 -43
  87. package/src/components/DocumentAnnotations/MultiAnnotationTableOverlay.vue +338 -338
  88. package/src/components/DocumentAnnotations/index.js +8 -8
  89. package/src/components/DocumentCategory.vue +281 -281
  90. package/src/components/DocumentDashboard.vue +170 -170
  91. package/src/components/DocumentEdit/DocumentEdit.cy.js +541 -541
  92. package/src/components/DocumentEdit/DocumentEdit.vue +503 -503
  93. package/src/components/DocumentEdit/EditConfirmationModal.vue +55 -55
  94. package/src/components/DocumentEdit/EditPageThumbnail.vue +114 -114
  95. package/src/components/DocumentEdit/EditPages.vue +161 -161
  96. package/src/components/DocumentEdit/EditSidebar.vue +154 -154
  97. package/src/components/DocumentEdit/RenameAndCategorize.vue +184 -184
  98. package/src/components/DocumentEdit/SidebarButtons.vue +53 -53
  99. package/src/components/DocumentEdit/SplitInfoBar.vue +21 -21
  100. package/src/components/DocumentEdit/index.js +4 -4
  101. package/src/components/DocumentModals/DocumentErrorModal.vue +58 -58
  102. package/src/components/DocumentModals/NotOptimizedViewportModal.vue +51 -51
  103. package/src/components/DocumentPage/ActionBar.vue +48 -48
  104. package/src/components/DocumentPage/AnnSetTableOptions.vue +111 -111
  105. package/src/components/DocumentPage/BoxSelection.vue +152 -152
  106. package/src/components/DocumentPage/DocumentPage.cy.js +92 -92
  107. package/src/components/DocumentPage/DocumentPage.vue +568 -568
  108. package/src/components/DocumentPage/DocumentToolbar.cy.js +215 -215
  109. package/src/components/DocumentPage/DocumentToolbar.vue +228 -228
  110. package/src/components/DocumentPage/DummyPage.vue +55 -55
  111. package/src/components/DocumentPage/MultiAnnSelection.vue +371 -371
  112. package/src/components/DocumentPage/NewAnnotation.vue +308 -308
  113. package/src/components/DocumentPage/ScrollingDocument.vue +149 -149
  114. package/src/components/DocumentPage/ScrollingPage.vue +179 -179
  115. package/src/components/DocumentPage/index.js +5 -5
  116. package/src/components/DocumentThumbnails/DocumentThumbnails.cy.js +67 -67
  117. package/src/components/DocumentThumbnails/DocumentThumbnails.vue +132 -132
  118. package/src/components/DocumentThumbnails/LoadingThumbnail.vue +25 -25
  119. package/src/components/DocumentThumbnails/index.js +1 -1
  120. package/src/components/DocumentTopBar/DocumentName.vue +236 -236
  121. package/src/components/DocumentTopBar/DocumentTopBar.cy.js +222 -222
  122. package/src/components/DocumentTopBar/DocumentTopBar.vue +202 -202
  123. package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +183 -183
  124. package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +74 -74
  125. package/src/components/DocumentTopBar/index.js +3 -3
  126. package/src/components/DocumentsList/DocumentsList.vue +121 -121
  127. package/src/components/DocumentsList/index.js +1 -1
  128. package/src/components/ErrorMessage.vue +40 -40
  129. package/src/components/index.js +1 -1
  130. package/src/constants.js +5 -5
  131. package/src/directives/scroll.js +28 -28
  132. package/src/i18n.js +22 -22
  133. package/src/icons.js +45 -45
  134. package/src/locales/de.json +148 -148
  135. package/src/locales/en.json +148 -148
  136. package/src/main.js +26 -26
  137. package/src/store/category.js +191 -191
  138. package/src/store/display.js +311 -311
  139. package/src/store/document.js +1438 -1438
  140. package/src/store/edit.js +316 -316
  141. package/src/store/index.js +21 -21
  142. package/src/store/project.js +143 -143
  143. package/src/store/selection.js +210 -210
  144. package/src/utils/utils.js +54 -54
  145. package/vue.config.js +25 -25
@@ -1,193 +1,193 @@
1
- <template>
2
- <div class="empty-annotation">
3
- <span
4
- v-if="!publicView && !isDocumentReviewed"
5
- :id="emptyAnnotationId()"
6
- ref="emptyAnnotation"
7
- :class="[
8
- 'annotation-value',
9
- showActionError &&
10
- editAnnotation &&
11
- editAnnotation.id === emptyAnnotationId() &&
12
- 'error-editing',
13
- !isEmptyAnnotationEditable() && !isMissingAnnotation && 'label-empty',
14
- isAnnotationBeingEdited() && 'clicked-ann',
15
- isMissingAnnotation && 'missing-annotation',
16
- !isMissingAnnotation && 'keyboard-nav',
17
- ]"
18
- :contenteditable="isEmptyAnnotationEditable()"
19
- @keypress.enter="saveEmptyAnnotationChanges"
20
- @click="handleEditEmptyAnnotation"
21
- @focus="handleEditEmptyAnnotation"
22
- ><!-- eslint-disable vue/no-v-html -->
23
- <span
24
- v-if="isFindingAnnotation"
25
- v-html="$t('draw_box_document', { label_name: label.name })"
26
- >
27
- </span>
28
- <span v-else-if="isMissingAnnotation" class="not-found-text">
29
- {{ $t("missing_from_document") }}
30
- </span>
31
- <span
32
- v-else-if="span && span.offset_string && isEmptyAnnotationEditable()"
33
- >
34
- {{ span.offset_string }}
35
- </span>
36
- <span v-else>
37
- {{ $t("no_data_found") }}
38
- </span>
39
- <!--eslint-enable-->
40
- </span>
41
- </div>
42
- </template>
43
- <script>
44
- import { mapState, mapGetters } from "vuex";
45
- import { isElementArray } from "../../utils/utils";
46
-
47
- /**
48
- * This component is responsible for managing empty annotations (labels with no annotations).
49
- */
50
- export default {
51
- name: "EmptyAnnotation",
52
- props: {
53
- label: {
54
- type: Object,
55
- required: true,
56
- },
57
- annotationSet: {
58
- type: Object,
59
- required: true,
60
- },
61
- span: {
62
- type: Object,
63
- default: null,
64
- required: false,
65
- },
66
- spanIndex: {
67
- type: Number,
68
- required: false,
69
- default: 0,
70
- },
71
- isMissingAnnotation: {
72
- type: Boolean,
73
- required: true,
74
- default: false,
75
- },
76
- },
77
- computed: {
78
- ...mapGetters("document", ["isAnnotationInEditMode", "isDocumentReviewed"]),
79
- ...mapState("selection", ["spanSelection", "elementSelected"]),
80
- ...mapState("document", [
81
- "editAnnotation",
82
- "publicView",
83
- "showActionError",
84
- ]),
85
- isFindingAnnotation() {
86
- return (
87
- this.editAnnotation &&
88
- this.editAnnotation.id === this.emptyAnnotationId() &&
89
- (!this.span || !this.span.offset_string)
90
- );
91
- },
92
- },
93
-
94
- watch: {
95
- span(newValue) {
96
- if (this.elementSelected === this.emptyAnnotationId() && newValue) {
97
- if (isElementArray(newValue))
98
- newValue.map((span) => {
99
- if (span.offset_string) {
100
- span.offset_string =
101
- this.$refs.emptyAnnotation.textContent.trim();
102
- span.offset_string_original =
103
- this.$refs.emptyAnnotation.textContent.trim();
104
- }
105
- });
106
- }
107
- },
108
- spanSelection(newValue) {
109
- if (!newValue) return;
110
-
111
- // Check if the bbox has no string
112
- if (newValue[0] && !newValue[0].offset_string) {
113
- this.$store.dispatch("document/resetEditAnnotation");
114
- this.$store.dispatch("selection/disableSelection");
115
- }
116
- },
117
- },
118
-
119
- methods: {
120
- emptyAnnotationId() {
121
- if (!this.annotationSet || !this.label) return;
122
-
123
- if (this.annotationSet.id) {
124
- return `${this.annotationSet.id}_${this.label.id}`;
125
- } else {
126
- return `${this.annotationSet.label_set.id}_${this.label.id}`;
127
- }
128
- },
129
- isAnnotationBeingEdited() {
130
- return this.isAnnotationInEditMode(this.emptyAnnotationId());
131
- },
132
- handleEditEmptyAnnotation() {
133
- if (
134
- this.publicView ||
135
- this.isDocumentReviewed ||
136
- this.isMissingAnnotation
137
- )
138
- return;
139
-
140
- if (
141
- !this.publicView &&
142
- !this.isDocumentReviewed &&
143
- this.elementSelected !== this.emptyAnnotationId()
144
- ) {
145
- this.$store.dispatch("selection/disableSelection");
146
- this.$store.dispatch("selection/setSelectedEntities", null);
147
- this.$store.dispatch(
148
- "selection/selectElement",
149
- this.emptyAnnotationId()
150
- );
151
-
152
- this.$store.dispatch("document/setEditAnnotation", {
153
- id: this.emptyAnnotationId(),
154
- index: this.spanIndex,
155
- label: this.label.id,
156
- labelSet: this.annotationSet.label_set.id,
157
- annotationSet: this.annotationSet.id,
158
- });
159
- }
160
- },
161
- isEmptyAnnotationEditable() {
162
- if (
163
- (this.spanSelection && this.spanSelection[this.spanIndex] === 0) ||
164
- this.isMissingAnnotation
165
- ) {
166
- return false;
167
- } else {
168
- return (
169
- this.elementSelected === this.emptyAnnotationId() &&
170
- this.spanSelection &&
171
- this.spanSelection[this.spanIndex] &&
172
- this.spanSelection[this.spanIndex].offset_string != null
173
- );
174
- }
175
- },
176
- saveEmptyAnnotationChanges(event) {
177
- if (this.publicView || this.isDocumentReviewed) return;
178
-
179
- if (event) {
180
- event.preventDefault();
181
- }
182
-
183
- // API call handled in parent component - AnnotationRow
184
- this.$emit("save-empty-annotation-changes");
185
- },
186
- },
187
- };
188
- </script>
189
- <style
190
- scoped
191
- lang="scss"
192
- src="../../assets/scss/document_annotations.scss"
193
- ></style>
1
+ <template>
2
+ <div class="empty-annotation">
3
+ <span
4
+ v-if="!publicView && !isDocumentReviewed"
5
+ :id="emptyAnnotationId()"
6
+ ref="emptyAnnotation"
7
+ :class="[
8
+ 'annotation-value',
9
+ showActionError &&
10
+ editAnnotation &&
11
+ editAnnotation.id === emptyAnnotationId() &&
12
+ 'error-editing',
13
+ !isEmptyAnnotationEditable() && !isMissingAnnotation && 'label-empty',
14
+ isAnnotationBeingEdited() && 'clicked-ann',
15
+ isMissingAnnotation && 'missing-annotation',
16
+ !isMissingAnnotation && 'keyboard-nav',
17
+ ]"
18
+ :contenteditable="isEmptyAnnotationEditable()"
19
+ @keypress.enter="saveEmptyAnnotationChanges"
20
+ @click="handleEditEmptyAnnotation"
21
+ @focus="handleEditEmptyAnnotation"
22
+ ><!-- eslint-disable vue/no-v-html -->
23
+ <span
24
+ v-if="isFindingAnnotation"
25
+ v-html="$t('draw_box_document', { label_name: label.name })"
26
+ >
27
+ </span>
28
+ <span v-else-if="isMissingAnnotation" class="not-found-text">
29
+ {{ $t("missing_from_document") }}
30
+ </span>
31
+ <span
32
+ v-else-if="span && span.offset_string && isEmptyAnnotationEditable()"
33
+ >
34
+ {{ span.offset_string }}
35
+ </span>
36
+ <span v-else>
37
+ {{ $t("no_data_found") }}
38
+ </span>
39
+ <!--eslint-enable-->
40
+ </span>
41
+ </div>
42
+ </template>
43
+ <script>
44
+ import { mapState, mapGetters } from "vuex";
45
+ import { isElementArray } from "../../utils/utils";
46
+
47
+ /**
48
+ * This component is responsible for managing empty annotations (labels with no annotations).
49
+ */
50
+ export default {
51
+ name: "EmptyAnnotation",
52
+ props: {
53
+ label: {
54
+ type: Object,
55
+ required: true,
56
+ },
57
+ annotationSet: {
58
+ type: Object,
59
+ required: true,
60
+ },
61
+ span: {
62
+ type: Object,
63
+ default: null,
64
+ required: false,
65
+ },
66
+ spanIndex: {
67
+ type: Number,
68
+ required: false,
69
+ default: 0,
70
+ },
71
+ isMissingAnnotation: {
72
+ type: Boolean,
73
+ required: true,
74
+ default: false,
75
+ },
76
+ },
77
+ computed: {
78
+ ...mapGetters("document", ["isAnnotationInEditMode", "isDocumentReviewed"]),
79
+ ...mapState("selection", ["spanSelection", "elementSelected"]),
80
+ ...mapState("document", [
81
+ "editAnnotation",
82
+ "publicView",
83
+ "showActionError",
84
+ ]),
85
+ isFindingAnnotation() {
86
+ return (
87
+ this.editAnnotation &&
88
+ this.editAnnotation.id === this.emptyAnnotationId() &&
89
+ (!this.span || !this.span.offset_string)
90
+ );
91
+ },
92
+ },
93
+
94
+ watch: {
95
+ span(newValue) {
96
+ if (this.elementSelected === this.emptyAnnotationId() && newValue) {
97
+ if (isElementArray(newValue))
98
+ newValue.map((span) => {
99
+ if (span.offset_string) {
100
+ span.offset_string =
101
+ this.$refs.emptyAnnotation.textContent.trim();
102
+ span.offset_string_original =
103
+ this.$refs.emptyAnnotation.textContent.trim();
104
+ }
105
+ });
106
+ }
107
+ },
108
+ spanSelection(newValue) {
109
+ if (!newValue) return;
110
+
111
+ // Check if the bbox has no string
112
+ if (newValue[0] && !newValue[0].offset_string) {
113
+ this.$store.dispatch("document/resetEditAnnotation");
114
+ this.$store.dispatch("selection/disableSelection");
115
+ }
116
+ },
117
+ },
118
+
119
+ methods: {
120
+ emptyAnnotationId() {
121
+ if (!this.annotationSet || !this.label) return;
122
+
123
+ if (this.annotationSet.id) {
124
+ return `${this.annotationSet.id}_${this.label.id}`;
125
+ } else {
126
+ return `${this.annotationSet.label_set.id}_${this.label.id}`;
127
+ }
128
+ },
129
+ isAnnotationBeingEdited() {
130
+ return this.isAnnotationInEditMode(this.emptyAnnotationId());
131
+ },
132
+ handleEditEmptyAnnotation() {
133
+ if (
134
+ this.publicView ||
135
+ this.isDocumentReviewed ||
136
+ this.isMissingAnnotation
137
+ )
138
+ return;
139
+
140
+ if (
141
+ !this.publicView &&
142
+ !this.isDocumentReviewed &&
143
+ this.elementSelected !== this.emptyAnnotationId()
144
+ ) {
145
+ this.$store.dispatch("selection/disableSelection");
146
+ this.$store.dispatch("selection/setSelectedEntities", null);
147
+ this.$store.dispatch(
148
+ "selection/selectElement",
149
+ this.emptyAnnotationId()
150
+ );
151
+
152
+ this.$store.dispatch("document/setEditAnnotation", {
153
+ id: this.emptyAnnotationId(),
154
+ index: this.spanIndex,
155
+ label: this.label.id,
156
+ labelSet: this.annotationSet.label_set.id,
157
+ annotationSet: this.annotationSet.id,
158
+ });
159
+ }
160
+ },
161
+ isEmptyAnnotationEditable() {
162
+ if (
163
+ (this.spanSelection && this.spanSelection[this.spanIndex] === 0) ||
164
+ this.isMissingAnnotation
165
+ ) {
166
+ return false;
167
+ } else {
168
+ return (
169
+ this.elementSelected === this.emptyAnnotationId() &&
170
+ this.spanSelection &&
171
+ this.spanSelection[this.spanIndex] &&
172
+ this.spanSelection[this.spanIndex].offset_string != null
173
+ );
174
+ }
175
+ },
176
+ saveEmptyAnnotationChanges(event) {
177
+ if (this.publicView || this.isDocumentReviewed) return;
178
+
179
+ if (event) {
180
+ event.preventDefault();
181
+ }
182
+
183
+ // API call handled in parent component - AnnotationRow
184
+ this.$emit("save-empty-annotation-changes");
185
+ },
186
+ },
187
+ };
188
+ </script>
189
+ <style
190
+ scoped
191
+ lang="scss"
192
+ src="../../assets/scss/document_annotations.scss"
193
+ ></style>
@@ -1,21 +1,21 @@
1
- <template>
2
- <div class="empty-container">
3
- <EmptyStateImg />
4
- <div class="empty-text">
5
- <p class="title">
6
- {{ $t("no_label_sets_found") }}
7
- </p>
8
- <p class="description">
9
- {{ $t("no_label_sets_found_description") }}
10
- </p>
11
- </div>
12
- </div>
13
- </template>
14
- <script>
15
- import EmptyStateImg from "../../assets/images/EmptyStateImg";
16
- export default {
17
- name: "EmptyState",
18
- components: { EmptyStateImg }
19
- };
20
- </script>
21
- <style scoped lang="scss" src="../../assets/scss/empty_state.scss"></style>
1
+ <template>
2
+ <div class="empty-container">
3
+ <EmptyStateImg />
4
+ <div class="empty-text">
5
+ <p class="title">
6
+ {{ $t("no_label_sets_found") }}
7
+ </p>
8
+ <p class="description">
9
+ {{ $t("no_label_sets_found_description") }}
10
+ </p>
11
+ </div>
12
+ </div>
13
+ </template>
14
+ <script>
15
+ import EmptyStateImg from "../../assets/images/EmptyStateImg";
16
+ export default {
17
+ name: "EmptyState",
18
+ components: { EmptyStateImg }
19
+ };
20
+ </script>
21
+ <style scoped lang="scss" src="../../assets/scss/empty_state.scss"></style>
@@ -1,41 +1,41 @@
1
- <template>
2
- <div class="data-extraction-container">
3
- <div class="loading-container">
4
- <AnnotationActionButtons
5
- :is-loading="true"
6
- :save-btn="false"
7
- :cancel-btn="false"
8
- />
9
- </div>
10
- <div class="data-extraction-text">
11
- <p class="title">
12
- <span v-if="redirectingUser"> {{ $t("wait_title") }}</span>
13
- <span v-else>
14
- {{ $t("data_being_extracted") }}
15
- </span>
16
- </p>
17
- <div class="description">
18
- <span v-if="redirectingUser">
19
- <p>{{ $t("redirecting_to_documents_list") }}</p>
20
- </span>
21
- <span v-else>
22
- <p>{{ $t("analysing_document") }}</p>
23
- <p>{{ $t("few_minutes") }}</p>
24
- </span>
25
- </div>
26
- </div>
27
- </div>
28
- </template>
29
- <script>
30
- import { mapState } from "vuex";
31
- import AnnotationActionButtons from "./AnnotationActionButtons";
32
-
33
- export default {
34
- name: "ExtractingData",
35
- components: { AnnotationActionButtons },
36
- computed: {
37
- ...mapState("edit", ["redirectingUser"]),
38
- },
39
- };
40
- </script>
41
- <style scoped lang="scss" src="../../assets/scss/extracting_data.scss"></style>
1
+ <template>
2
+ <div class="data-extraction-container">
3
+ <div class="loading-container">
4
+ <AnnotationActionButtons
5
+ :is-loading="true"
6
+ :save-btn="false"
7
+ :cancel-btn="false"
8
+ />
9
+ </div>
10
+ <div class="data-extraction-text">
11
+ <p class="title">
12
+ <span v-if="redirectingUser"> {{ $t("wait_title") }}</span>
13
+ <span v-else>
14
+ {{ $t("data_being_extracted") }}
15
+ </span>
16
+ </p>
17
+ <div class="description">
18
+ <span v-if="redirectingUser">
19
+ <p>{{ $t("redirecting_to_documents_list") }}</p>
20
+ </span>
21
+ <span v-else>
22
+ <p>{{ $t("analysing_document") }}</p>
23
+ <p>{{ $t("few_minutes") }}</p>
24
+ </span>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </template>
29
+ <script>
30
+ import { mapState } from "vuex";
31
+ import AnnotationActionButtons from "./AnnotationActionButtons";
32
+
33
+ export default {
34
+ name: "ExtractingData",
35
+ components: { AnnotationActionButtons },
36
+ computed: {
37
+ ...mapState("edit", ["redirectingUser"]),
38
+ },
39
+ };
40
+ </script>
41
+ <style scoped lang="scss" src="../../assets/scss/extracting_data.scss"></style>
@@ -1,43 +1,43 @@
1
- <template>
2
- <div class="annotations-skeleton">
3
- <div class="label-set-name-skeleton">
4
- <b-skeleton
5
- width="20%"
6
- height="8px"
7
- />
8
- </div>
9
-
10
- <!-- Label rows -->
11
- <div
12
- v-for="n in numberOfLabelRows"
13
- :key="n"
14
- >
15
- <LoadingLabels />
16
- </div>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- import LoadingLabels from "./LoadingLabels";
22
-
23
- /**
24
- * This component shows a skeleton instead of the label sets
25
- * while some document data is still loading
26
- */
27
-
28
- export default {
29
- name: "LoadingAnnotations",
30
- components: { LoadingLabels },
31
- data() {
32
- return {
33
- numberOfLabelRows: 7
34
- };
35
- }
36
- };
37
- </script>
38
-
39
- <style
40
- scoped
41
- lang="scss"
42
- src="../../assets/scss/document_annotations.scss"
43
- ></style>
1
+ <template>
2
+ <div class="annotations-skeleton">
3
+ <div class="label-set-name-skeleton">
4
+ <b-skeleton
5
+ width="20%"
6
+ height="8px"
7
+ />
8
+ </div>
9
+
10
+ <!-- Label rows -->
11
+ <div
12
+ v-for="n in numberOfLabelRows"
13
+ :key="n"
14
+ >
15
+ <LoadingLabels />
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import LoadingLabels from "./LoadingLabels";
22
+
23
+ /**
24
+ * This component shows a skeleton instead of the label sets
25
+ * while some document data is still loading
26
+ */
27
+
28
+ export default {
29
+ name: "LoadingAnnotations",
30
+ components: { LoadingLabels },
31
+ data() {
32
+ return {
33
+ numberOfLabelRows: 7
34
+ };
35
+ }
36
+ };
37
+ </script>
38
+
39
+ <style
40
+ scoped
41
+ lang="scss"
42
+ src="../../assets/scss/document_annotations.scss"
43
+ ></style>