@konfuzio/document-validation-ui 0.1.54 → 0.1.55-dev.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.
Files changed (57) 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/dist/js/chunk-vendors.js +66 -23
  6. package/dist/js/chunk-vendors.js.map +1 -1
  7. package/jest.config.js +22 -2
  8. package/package.json +31 -37
  9. package/src/assets/scss/ann_set_table_options.scss +4 -4
  10. package/src/assets/scss/annotation_action_buttons.scss +7 -7
  11. package/src/assets/scss/annotation_details.scss +9 -9
  12. package/src/assets/scss/choose_label_set_modal.scss +5 -5
  13. package/src/assets/scss/document_action_bar.scss +3 -3
  14. package/src/assets/scss/document_annotations.scss +40 -40
  15. package/src/assets/scss/document_category.scss +8 -8
  16. package/src/assets/scss/document_dashboard.scss +1 -1
  17. package/src/assets/scss/document_edit.scss +29 -28
  18. package/src/assets/scss/document_error.scss +6 -6
  19. package/src/assets/scss/document_name.scss +6 -6
  20. package/src/assets/scss/document_page.scss +3 -3
  21. package/src/assets/scss/document_search_bar.scss +7 -7
  22. package/src/assets/scss/document_set_chooser.scss +2 -2
  23. package/src/assets/scss/document_thumbnails.scss +7 -7
  24. package/src/assets/scss/document_toolbar.scss +10 -10
  25. package/src/assets/scss/document_top_bar.scss +10 -10
  26. package/src/assets/scss/document_viewport_modal.scss +3 -3
  27. package/src/assets/scss/documents_list.scss +11 -12
  28. package/src/assets/scss/edit_page_thumbnail.scss +6 -6
  29. package/src/assets/scss/empty_state.scss +4 -4
  30. package/src/assets/scss/error_page.scss +2 -2
  31. package/src/assets/scss/extracting_data.scss +3 -3
  32. package/src/assets/scss/multi_ann_table_overlay.scss +3 -3
  33. package/src/assets/scss/multi_ann_table_popup.scss +1 -1
  34. package/src/assets/scss/new_annotation.scss +21 -14
  35. package/src/assets/scss/scrolling_document.scss +1 -1
  36. package/src/assets/scss/theme.scss +63 -52
  37. package/src/assets/scss/variables.scss +2 -0
  38. package/src/components/App.vue +75 -14
  39. package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +2 -5
  40. package/src/components/DocumentAnnotations/AnnotationRow.vue +14 -2
  41. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +19 -22
  42. package/src/components/DocumentDashboard.vue +11 -16
  43. package/src/components/DocumentEdit/EditPages.vue +48 -48
  44. package/src/components/DocumentPage/DocumentPage.vue +2 -2
  45. package/src/components/DocumentPage/EditAnnotation.vue +14 -12
  46. package/src/components/DocumentPage/NewAnnotation.vue +15 -14
  47. package/src/constants.js +1 -7
  48. package/src/i18n.js +2 -5
  49. package/src/locales/de.json +1 -1
  50. package/src/locales/en.json +1 -1
  51. package/src/locales/es.json +1 -1
  52. package/src/main.js +13 -16
  53. package/src/store/display.js +33 -22
  54. package/src/store/document.js +30 -15
  55. package/src/store/index.js +5 -8
  56. package/src/utils/utils.js +6 -0
  57. package/src/assets/scss/imports.scss +0 -1
@@ -20,6 +20,7 @@ import {
20
20
  import { Integrations } from "@sentry/tracing";
21
21
  import API from "../api";
22
22
  import { initKeycloak } from "../utils/keycloak";
23
+ import { debounce } from "../utils/utils";
23
24
 
24
25
  export default {
25
26
  name: "App",
@@ -53,6 +54,24 @@ export default {
53
54
  default: "true",
54
55
  },
55
56
  // eslint-disable-next-line vue/prop-name-casing
57
+ show_missing_annotations: {
58
+ type: String,
59
+ required: false,
60
+ default: "true",
61
+ },
62
+ // eslint-disable-next-line vue/prop-name-casing
63
+ show_feedback_needed_annotations: {
64
+ type: String,
65
+ required: false,
66
+ default: "true",
67
+ },
68
+ // eslint-disable-next-line vue/prop-name-casing
69
+ show_accepted_annotations: {
70
+ type: String,
71
+ required: false,
72
+ default: "true",
73
+ },
74
+ // eslint-disable-next-line vue/prop-name-casing
56
75
  sentry_dsn: {
57
76
  type: String,
58
77
  required: false,
@@ -176,6 +195,42 @@ export default {
176
195
  return this.show_documents_navigation === "true";
177
196
  }
178
197
  },
198
+ showMissingAnnotations() {
199
+ if (
200
+ window.location.hash === "#unrevised" ||
201
+ window.location.hash === "#possiblyIncorrect"
202
+ ) {
203
+ return false;
204
+ } else if (process.env.VUE_APP_SHOW_MISSING_ANNOTATIONS) {
205
+ return process.env.VUE_APP_SHOW_MISSING_ANNOTATIONS === "true";
206
+ } else {
207
+ return this.show_missing_annotations === "true";
208
+ }
209
+ },
210
+ showAcceptedAnnotations() {
211
+ if (
212
+ window.location.hash === "#unrevised" ||
213
+ window.location.hash === "#possiblyIncorrect"
214
+ ) {
215
+ return false;
216
+ } else if (process.env.VUE_APP_SHOW_ACCEPTED_ANNOTATIONS) {
217
+ return process.env.VUE_APP_SHOW_ACCEPTED_ANNOTATIONS === "true";
218
+ } else {
219
+ return this.show_accepted_annotations === "true";
220
+ }
221
+ },
222
+ showFeedbackNeededAnnotations() {
223
+ if (
224
+ window.location.hash === "#unrevised" ||
225
+ window.location.hash === "#possiblyIncorrect"
226
+ ) {
227
+ return true;
228
+ } else if (process.env.VUE_APP_SHOW_FEEDBACK_NEEDED_ANNOTATIONS) {
229
+ return process.env.VUE_APP_SHOW_FEEDBACK_NEEDED_ANNOTATIONS === "true";
230
+ } else {
231
+ return this.show_feedback_needed_annotations === "true";
232
+ }
233
+ },
179
234
  isPublicView() {
180
235
  if (
181
236
  this.userToken ||
@@ -330,6 +385,18 @@ export default {
330
385
  "display/showDocumentsNavigation",
331
386
  this.showDocumentsNavigation
332
387
  ),
388
+ this.$store.dispatch(
389
+ "document/showMissingAnnotations",
390
+ this.showMissingAnnotations
391
+ ),
392
+ this.$store.dispatch(
393
+ "document/showFeedbackNeededAnnotations",
394
+ this.showFeedbackNeededAnnotations
395
+ ),
396
+ this.$store.dispatch(
397
+ "document/showAcceptedAnnotations",
398
+ this.showAcceptedAnnotations
399
+ ),
333
400
  this.$store.dispatch("document/setDocId", this.documentId),
334
401
  this.$store.dispatch("document/setPublicView", this.isPublicView),
335
402
  this.$store.dispatch("document/setAnnotationId", this.annotationId),
@@ -342,20 +409,14 @@ export default {
342
409
  this.$store.dispatch("document/fetchDocument");
343
410
  });
344
411
 
345
- // Add observer for class added to HTML tag when Buefy modals are mounted
346
- // TODO: check defaultModalScroll property in Buefy constructor https://buefy.org/documentation/constructor-options
347
- const htmlTag = document.documentElement;
348
- const observer = new MutationObserver(function (mutations) {
349
- mutations.forEach(function (mutation) {
350
- if (mutation.attributeName === "class") {
351
- const classToRemove = "is-clipped";
352
- if (mutation.target.classList.contains(classToRemove)) {
353
- htmlTag.classList.remove(classToRemove);
354
- }
355
- }
356
- });
357
- });
358
- observer.observe(htmlTag, { attributes: true });
412
+ // Stop error resizeObserver
413
+ const _ = window.ResizeObserver;
414
+ window.ResizeObserver = class ResizeObserver extends _ {
415
+ constructor(callback) {
416
+ callback = debounce(callback, 20);
417
+ super(callback);
418
+ }
419
+ };
359
420
  },
360
421
  };
361
422
  </script>
@@ -205,9 +205,7 @@ export default {
205
205
  data() {
206
206
  return {
207
207
  tooltipDelay: 700,
208
- showText:
209
- window.innerWidth >
210
- TEXT_BREAKPOINT_WIDTH(this.$i18n ? this.$i18n.locale : "en"),
208
+ showText: window.innerWidth > TEXT_BREAKPOINT_WIDTH,
211
209
  };
212
210
  },
213
211
  computed: {
@@ -232,8 +230,7 @@ export default {
232
230
  },
233
231
  methods: {
234
232
  resize() {
235
- this.showText =
236
- window.innerWidth > TEXT_BREAKPOINT_WIDTH(this.$i18n.locale);
233
+ this.showText = window.innerWidth > TEXT_BREAKPOINT_WIDTH;
237
234
  },
238
235
  search() {
239
236
  this.$emit("search");
@@ -15,14 +15,13 @@
15
15
  >
16
16
  <div class="annotations-width-slider">
17
17
  <b-slider
18
- :value="labelWidth"
18
+ v-model="labelContainerWidth"
19
19
  type="is-move"
20
20
  :min="20"
21
21
  :max="80"
22
22
  :custom-formatter="(val) => `${$t('label_size')} ${val}%`"
23
23
  class="is-full-height show-hover show-line"
24
24
  :disabled="isAnnotationInEditMode()"
25
- @input="setLabelWidth"
26
25
  />
27
26
  </div>
28
27
  <div
@@ -244,6 +243,7 @@ export default {
244
243
  checkboxDefaultValue: checkboxValue,
245
244
  isCheckboxAvailable: false,
246
245
  isChecked: checkboxValue,
246
+ labelContainerWidth: 0,
247
247
  };
248
248
  },
249
249
  computed: {
@@ -319,6 +319,12 @@ export default {
319
319
  },
320
320
  },
321
321
  watch: {
322
+ labelWidth(width) {
323
+ this.labelContainerWidth = width;
324
+ },
325
+ labelContainerWidth(width) {
326
+ this.setLabelWidth(width);
327
+ },
322
328
  annotationId(newAnnotationId) {
323
329
  this.checkAnnotationSelection(newAnnotationId);
324
330
  },
@@ -383,6 +389,7 @@ export default {
383
389
  },
384
390
  mounted() {
385
391
  this.checkAnnotationSelection(this.annotationId);
392
+ this.labelContainerWidth = this.labelWidth;
386
393
  },
387
394
  methods: {
388
395
  ...mapActions("display", ["setLabelWidth"]),
@@ -516,12 +523,14 @@ export default {
516
523
  return (
517
524
  !this.editAnnotation &&
518
525
  this.annotation &&
526
+ !this.isLoading &&
519
527
  this.hoveredAnnotation === this.annotation.id
520
528
  );
521
529
  },
522
530
  showAcceptButton() {
523
531
  return (
524
532
  !this.editAnnotation &&
533
+ !this.isLoading &&
525
534
  !this.isAnnotationInEditMode(this.currentAnnotationId()) &&
526
535
  this.annotation &&
527
536
  !this.annotation.is_correct &&
@@ -531,6 +540,7 @@ export default {
531
540
  showDeclineButton() {
532
541
  return (
533
542
  !this.editAnnotation &&
543
+ !this.isLoading &&
534
544
  !this.isAnnotationInEditMode(this.currentAnnotationId()) &&
535
545
  this.annotation &&
536
546
  this.hoveredAnnotation === this.annotation.id
@@ -539,6 +549,7 @@ export default {
539
549
  showMissingButton() {
540
550
  return (
541
551
  !this.editAnnotation &&
552
+ !this.isLoading &&
542
553
  this.hoveredAnnotation &&
543
554
  !this.isAnnotationInEditMode(this.currentAnnotationId()) &&
544
555
  !this.annotation &&
@@ -710,6 +721,7 @@ export default {
710
721
  this.$store.dispatch("document/resetEditAnnotation");
711
722
  this.$store.dispatch("selection/disableSelection");
712
723
  this.$store.dispatch("selection/setSelectedEntities", null);
724
+ this.isLoading = false;
713
725
  });
714
726
  },
715
727
  saveEmptyAnnotationChanges() {
@@ -105,7 +105,10 @@
105
105
  </div>
106
106
  </div>
107
107
 
108
- <b-collapse :open="isAccordionOpen(annotationSet)">
108
+ <b-collapse
109
+ :model-value="isAccordionOpen(annotationSet)"
110
+ animation="slide"
111
+ >
109
112
  <div
110
113
  v-if="annotationSet.labels.length > 0"
111
114
  class="annotation-sets-list"
@@ -232,12 +235,16 @@ export default {
232
235
  this.jumpToNextAnnotation = false;
233
236
  }
234
237
  },
235
-
236
238
  getAnnotationsFiltered(newFiltered, oldFiltered) {
237
- this.loadAccordions(
238
- newFiltered.annotationSets,
239
- oldFiltered.annotationSets
240
- );
239
+ // just load accordions again if the length was changed
240
+ if (
241
+ newFiltered.annotationSets.length !== oldFiltered.annotationSets.length
242
+ ) {
243
+ this.loadAccordions(
244
+ newFiltered.annotationSets,
245
+ oldFiltered.annotationSets
246
+ );
247
+ }
241
248
  },
242
249
  annotationId(newAnnotationId) {
243
250
  if (newAnnotationId) {
@@ -299,21 +306,13 @@ export default {
299
306
  }
300
307
  this.annotationSetsAccordion = newAnnotationSetsAccordion;
301
308
  },
302
- loadAccordions(newAnnotationSets, oldAnnotationSets = null) {
309
+ loadAccordions(newAnnotationSets) {
303
310
  if (newAnnotationSets) {
304
311
  const isFirstTime = this.annotationSetsAccordion === null;
305
312
  const newAnnotationSetsAccordion = {};
306
- const annotationSetsOpened = [];
307
313
  const annotationSetsCreated = [];
308
314
 
309
315
  newAnnotationSets.forEach((newAnnotationSet, index) => {
310
- const wasOpen = annotationSetsOpened.find(
311
- (annotationSetOpened) =>
312
- annotationSetOpened &&
313
- annotationSetOpened.id &&
314
- newAnnotationSet.id &&
315
- newAnnotationSet.id === annotationSetOpened.id
316
- );
317
316
  if (isFirstTime && this.annotationSetId) {
318
317
  newAnnotationSetsAccordion[
319
318
  newAnnotationSet.id || newAnnotationSet.label_set.id
@@ -330,10 +329,6 @@ export default {
330
329
  newAnnotationSetsAccordion[
331
330
  newAnnotationSet.id || newAnnotationSet.label_set.id
332
331
  ] = true;
333
- } else if (wasOpen) {
334
- newAnnotationSetsAccordion[
335
- newAnnotationSet.id || newAnnotationSet.label_set.id
336
- ] = wasOpen !== undefined;
337
332
  } else {
338
333
  const wasCreated = annotationSetsCreated.find(
339
334
  (annotationSetCreated) =>
@@ -408,9 +403,11 @@ export default {
408
403
  },
409
404
 
410
405
  createArray(className) {
411
- return Array.from(
412
- this.$refs.annotationList.getElementsByClassName(className)
413
- );
406
+ if (this.$refs.annotationList) {
407
+ return Array.from(
408
+ this.$refs.annotationList.getElementsByClassName(className)
409
+ );
410
+ }
414
411
  },
415
412
 
416
413
  keyDownHandler(event) {
@@ -3,24 +3,19 @@
3
3
  <DocumentTopBar />
4
4
  <div :class="['dashboard-viewer', renameAndCategorize ? 'edit-mode' : '']">
5
5
  <DocumentThumbnails v-if="!editMode" ref="documentPages" />
6
- <Split>
7
- <SplitArea :size="50" :min-size="350">
6
+ <splitpanes class="default-theme">
7
+ <pane :size="50" :min-size="10">
8
8
  <ScrollingDocument
9
9
  ref="scrollingDocument"
10
10
  class="dashboard-document"
11
11
  />
12
- </SplitArea>
13
- <SplitArea :size="50" style="overflow-y: hidden">
12
+ </pane>
13
+ <pane :size="50">
14
14
  <DocumentAnnotations v-if="!editMode" ref="annotations" />
15
15
  <DocumentEdit v-else ref="editView" />
16
- </SplitArea>
17
- </Split>
16
+ </pane>
17
+ </splitpanes>
18
18
 
19
- <MultiAnnotationTableOverlay
20
- v-if="showAnnSetTable"
21
- :left="documentContainerLeftPadding"
22
- :width="documentContainerWidth"
23
- />
24
19
  <ChooseLabelSetModal
25
20
  v-if="showChooseLabelSetModal && showChooseLabelSetModal.show"
26
21
  :is-multiple-annotations="showChooseLabelSetModal.isMultipleAnnotations"
@@ -59,16 +54,15 @@ import { mapGetters, mapState } from "vuex";
59
54
  import { DocumentTopBar } from "./DocumentTopBar";
60
55
  import { ScrollingDocument } from "./DocumentPage";
61
56
  import { DocumentThumbnails } from "./DocumentThumbnails";
62
- import {
63
- DocumentAnnotations,
64
- MultiAnnotationTableOverlay,
65
- } from "./DocumentAnnotations";
57
+ import { DocumentAnnotations } from "./DocumentAnnotations";
66
58
  import { DocumentEdit } from "./DocumentEdit";
67
59
  import ErrorMessage from "./ErrorMessage";
68
60
  import NotOptimizedViewportModal from "../components/DocumentModals/NotOptimizedViewportModal";
69
61
  import AnnotationDeletedModal from "../components/DocumentModals/AnnotationDeletedModal";
70
62
  import DocumentErrorModal from "../components/DocumentModals/DocumentErrorModal";
71
63
  import ChooseLabelSetModal from "../components/DocumentAnnotations/ChooseLabelSetModal";
64
+ import { Splitpanes, Pane } from "splitpanes";
65
+ import "splitpanes/dist/splitpanes.css";
72
66
 
73
67
  /**
74
68
  * This component shows the PDF pages in a scrolling component and
@@ -77,6 +71,8 @@ import ChooseLabelSetModal from "../components/DocumentAnnotations/ChooseLabelSe
77
71
  export default {
78
72
  name: "DocumentDashboard",
79
73
  components: {
74
+ Splitpanes,
75
+ Pane,
80
76
  DocumentTopBar,
81
77
  ScrollingDocument,
82
78
  DocumentThumbnails,
@@ -85,7 +81,6 @@ export default {
85
81
  ErrorMessage,
86
82
  NotOptimizedViewportModal,
87
83
  DocumentErrorModal,
88
- MultiAnnotationTableOverlay,
89
84
  ChooseLabelSetModal,
90
85
  AnnotationDeletedModal,
91
86
  },
@@ -7,60 +7,64 @@
7
7
  v-model="editPages"
8
8
  class="document-grid"
9
9
  easing="cubic-bezier(0.37, 0, 0.63, 1)"
10
+ item-key="id"
11
+ :move="checkMove"
10
12
  @start="dragging = true"
11
13
  @end="handleDragEnd"
12
- @move="checkMove"
13
14
  >
14
- <div
15
- v-for="(page, index) in editPages"
16
- :key="page.id"
17
- class="image-section"
18
- tabindex="0"
19
- >
20
- <div class="top-section">
21
- <EditPageThumbnail
22
- :page="page"
23
- :index="index"
24
- :rotation="getRotation(page.id)"
25
- />
26
- <div
27
- :class="[
28
- 'splitting-lines',
29
- splittingLines &&
30
- splittingLines[index].page === page.number &&
31
- 'active-split',
32
- ]"
33
- @click="handleSplittingLines(page.number, 'manual')"
34
- >
35
- <div class="scissors-icon">
36
- <b-icon icon="scissors" class="is-small" />
37
- </div>
15
+ <template #item="{ element, index }">
16
+ <div
17
+ :id="element.id"
18
+ :key="element.id"
19
+ class="image-section"
20
+ tabindex="0"
21
+ >
22
+ <div class="top-section">
23
+ <EditPageThumbnail
24
+ :page="element"
25
+ :index="index"
26
+ :rotation="getRotation(element.id)"
27
+ />
38
28
  <div
39
- v-if="
40
- splittingLines && splittingLines[index].page === page.number
41
- "
42
- class="lines active-split"
29
+ :class="[
30
+ 'splitting-lines',
31
+ splittingLines &&
32
+ splittingLines[index].page === element.number &&
33
+ 'active-split',
34
+ ]"
35
+ @click="handleSplittingLines(element.number, 'manual')"
43
36
  >
44
- <SplitZigZag
45
- :color="
37
+ <div class="scissors-icon">
38
+ <b-icon icon="scissors" class="is-small" />
39
+ </div>
40
+ <div
41
+ v-if="
46
42
  splittingLines &&
47
- splittingLines[index].origin &&
48
- splittingLines[index].origin === 'AI' &&
49
- splitSuggestionsEnabled
50
- ? 'green'
51
- : 'dark'
43
+ splittingLines[index].page === element.number
52
44
  "
53
- />
54
- </div>
55
- <div v-else class="lines not-active-split">
56
- <SplitLines />
45
+ class="lines active-split"
46
+ >
47
+ <SplitZigZag
48
+ :color="
49
+ splittingLines &&
50
+ splittingLines[index].origin &&
51
+ splittingLines[index].origin === 'AI' &&
52
+ splitSuggestionsEnabled
53
+ ? 'green'
54
+ : 'dark'
55
+ "
56
+ />
57
+ </div>
58
+ <div v-else class="lines not-active-split">
59
+ <SplitLines />
60
+ </div>
57
61
  </div>
58
62
  </div>
63
+ <div class="bottom-section">
64
+ <span class="page-number">{{ element.number }}</span>
65
+ </div>
59
66
  </div>
60
- <div class="bottom-section">
61
- <span class="page-number">{{ page.number }}</span>
62
- </div>
63
- </div>
67
+ </template>
64
68
  </draggable>
65
69
  </div>
66
70
  </template>
@@ -75,7 +79,6 @@ import { mapState } from "vuex";
75
79
  import SplitLines from "../../assets/images/SplitLines";
76
80
  import SplitZigZag from "../../assets/images/SplitZigZag";
77
81
  import EditPageThumbnail from "./EditPageThumbnail";
78
-
79
82
  import draggable from "vuedraggable";
80
83
 
81
84
  export default {
@@ -132,9 +135,6 @@ export default {
132
135
  }
133
136
  },
134
137
  },
135
- mounted() {
136
- this.editPages = this.pagesForPostprocess;
137
- },
138
138
  methods: {
139
139
  deselect() {
140
140
  this.$store.dispatch("edit/setSelectedPages");
@@ -86,7 +86,7 @@
86
86
  (bbox) => bbox.page_index + 1 == page.number
87
87
  )"
88
88
  >
89
- <v-group :key="'ann' + annotation.id + '-' + index">
89
+ <v-group>
90
90
  <v-rect
91
91
  v-if="!isAnnotationInEditMode(annotation.id)"
92
92
  :config="annotationRect(bbox, annotation.id)"
@@ -99,7 +99,7 @@
99
99
  <template
100
100
  v-if="annotation.metadata && annotation.metadata.checkbox"
101
101
  >
102
- <v-group :key="'ann' + annotation.id + '-checkbox'">
102
+ <v-group>
103
103
  <v-rect
104
104
  v-if="!isAnnotationInEditMode(annotation.id)"
105
105
  :config="
@@ -24,17 +24,19 @@
24
24
  ]"
25
25
  type="is-text"
26
26
  >
27
- {{
28
- selectedSet
29
- ? `${selectedSet.label_set.name} ${
30
- selectedSet.id
31
- ? numberOfAnnotationSetGroup(selectedSet)
32
- : `${numberOfLabelSetGroup(selectedSet.label_set)} (${$t(
33
- "new"
34
- )})`
35
- }`
36
- : $t("select_annotation_set")
37
- }}
27
+ <span class="input-text">
28
+ {{
29
+ selectedSet
30
+ ? `${selectedSet.label_set.name} ${
31
+ selectedSet.id
32
+ ? numberOfAnnotationSetGroup(selectedSet)
33
+ : `${numberOfLabelSetGroup(selectedSet.label_set)} (${$t(
34
+ "new"
35
+ )})`
36
+ }`
37
+ : $t("select_annotation_set")
38
+ }}</span
39
+ >
38
40
  <span class="caret-icon">
39
41
  <b-icon icon="angle-down" size="is-small" class="caret" />
40
42
  </span>
@@ -85,7 +87,7 @@
85
87
  :disabled="!labelsFiltered"
86
88
  type="is-text"
87
89
  >
88
- {{ selectedLabel.name }}
90
+ <span class="input-text"> {{ selectedLabel.name }}</span>
89
91
  <span class="caret-icon">
90
92
  <b-icon icon="angle-down" size="is-small" class="caret" />
91
93
  </span>
@@ -26,17 +26,19 @@
26
26
  ]"
27
27
  type="is-text"
28
28
  >
29
- {{
30
- selectedSet
31
- ? `${selectedSet.label_set.name} ${
32
- selectedSet.id
33
- ? numberOfAnnotationSetGroup(selectedSet)
34
- : `${numberOfLabelSetGroup(selectedSet.label_set)} (${$t(
35
- "new"
36
- )})`
37
- }`
38
- : $t("select_annotation_set")
39
- }}
29
+ <span class="input-text">
30
+ {{
31
+ selectedSet
32
+ ? `${selectedSet.label_set.name} ${
33
+ selectedSet.id
34
+ ? numberOfAnnotationSetGroup(selectedSet)
35
+ : `${numberOfLabelSetGroup(selectedSet.label_set)} (${$t(
36
+ "new"
37
+ )})`
38
+ }`
39
+ : $t("select_annotation_set")
40
+ }}</span
41
+ >
40
42
  <span class="caret-icon">
41
43
  <b-icon icon="angle-down" size="is-small" class="caret" />
42
44
  </span>
@@ -71,7 +73,6 @@
71
73
  size="is-large"
72
74
  position="is-bottom"
73
75
  class="bottom-aligned"
74
- :close-delay="5000"
75
76
  >
76
77
  <template #content>
77
78
  <div ref="tooltipContent"></div>
@@ -92,13 +93,13 @@
92
93
  ]"
93
94
  type="is-text"
94
95
  >
95
- {{
96
+ <span class="input-text">{{
96
97
  selectedLabel
97
98
  ? selectedLabel.name
98
99
  : labels && labels.length === 0
99
100
  ? $t("no_labels_to_choose")
100
101
  : $t("select_label")
101
- }}
102
+ }}</span>
102
103
  <span class="caret-icon">
103
104
  <b-icon icon="angle-down" size="is-small" class="caret" />
104
105
  </span>
package/src/constants.js CHANGED
@@ -2,10 +2,4 @@ export const PIXEL_RATIO = window.devicePixelRatio || 1;
2
2
  export const VIEWPORT_RATIO = 0.98;
3
3
  export const MINIMUM_APP_WIDTH = 600;
4
4
  export const MINIMUM_OPTIMIZED_APP_WIDTH = 950;
5
- export const TEXT_BREAKPOINT_WIDTH = (locale) => {
6
- if (locale === "en") {
7
- return 1350;
8
- } else {
9
- return 1800;
10
- }
11
- };
5
+ export const TEXT_BREAKPOINT_WIDTH = 1800;
package/src/i18n.js CHANGED
@@ -1,7 +1,4 @@
1
- import Vue from "vue";
2
- import VueI18n from "vue-i18n";
3
-
4
- Vue.use(VueI18n);
1
+ import { createI18n } from "vue-i18n";
5
2
 
6
3
  function loadLocaleMessages() {
7
4
  const locales = require.context(
@@ -20,7 +17,7 @@ function loadLocaleMessages() {
20
17
  return messages;
21
18
  }
22
19
 
23
- export default new VueI18n({
20
+ export const i18n = createI18n({
24
21
  locale: process.env.VUE_APP_LOCALE || "en",
25
22
  fallbackLocale: "en",
26
23
  messages: loadLocaleMessages(),
@@ -102,7 +102,7 @@
102
102
  "decline": "Ablehnen",
103
103
  "server_error": "Wir haben derzeit ein Serverproblem. Bitte versuchen Sie es später noch einmal oder",
104
104
  "get_support": "Hole dir Unterstützung",
105
- "no_labels_available": "Das ausgewählte Annotations-Set enthält keine nicht ausgefüllten oder multiplen Labels. Weitere Informationen finden Sie unter <a href='https://help.konfuzio.com/modules/labels/index.html#multiple' target='_blank'>diesem Link</a>.",
105
+ "no_labels_available": "Das ausgewählte Annotations-Set enthält keine nicht ausgefüllten oder multiplen Labels.",
106
106
  "new_ann_set_title": "Neues Annotations-Set",
107
107
  "new_ann_set_description": "Wählen Sie ein Datenmodell aus den vorhandenen aus. Das neue Annotations-Set enthält dieselben Beschriftungen.",
108
108
  "select_label_set": "Wählen Sie das Label-Set-Modell aus",
@@ -109,7 +109,7 @@
109
109
  "decline": "Decline",
110
110
  "server_error": "We are currently experiencing a server issue. Please try again later or",
111
111
  "get_support": "Get Support",
112
- "no_labels_available": "There are no unfilled or multiple labels in the selected annotation set. For more details, you can visit <a href='https://help.konfuzio.com/modules/labels/index.html#multiple' target='_blank'>this link</a>.",
112
+ "no_labels_available": "There are no unfilled or multiple labels in the selected annotation set.",
113
113
  "new_multi_ann_title": "Create multiple annotations",
114
114
  "new_multi_ann_description": "Select a data model from the existing ones, then deselect the labels that don't exist in this document.",
115
115
  "drag_drop_columns_multi_ann": "Drag and drop to change the order of the labels",