@konfuzio/document-validation-ui 0.1.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 (131) hide show
  1. package/.eslintrc.js +11 -0
  2. package/.prettierrc.json +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +13 -0
  5. package/dist/css/app.0c8973f8.css +1 -0
  6. package/dist/css/chunk-vendors.053b6b6e.css +5 -0
  7. package/dist/favicon.ico +0 -0
  8. package/dist/index.html +1 -0
  9. package/dist/js/app.17fe48c4.js +2 -0
  10. package/dist/js/app.17fe48c4.js.map +1 -0
  11. package/dist/js/chunk-vendors.a48fca3f.js +47 -0
  12. package/dist/js/chunk-vendors.a48fca3f.js.map +1 -0
  13. package/jest.config.js +4 -0
  14. package/package.json +60 -0
  15. package/src/.DS_Store +0 -0
  16. package/src/api.js +49 -0
  17. package/src/assets/images/AcceptedCheckMark.vue +8 -0
  18. package/src/assets/images/AcceptedUser.vue +8 -0
  19. package/src/assets/images/ActionIcon.vue +60 -0
  20. package/src/assets/images/ArrowDownKey.vue +11 -0
  21. package/src/assets/images/ArrowUpKey.vue +11 -0
  22. package/src/assets/images/CategoryIconImg.vue +13 -0
  23. package/src/assets/images/CheckMark.vue +8 -0
  24. package/src/assets/images/EditDocIcon.vue +12 -0
  25. package/src/assets/images/EmptyStateImg.vue +129 -0
  26. package/src/assets/images/ErrorIcon.vue +28 -0
  27. package/src/assets/images/EyeIcon.vue +11 -0
  28. package/src/assets/images/FileNameNotSavedImage.vue +26 -0
  29. package/src/assets/images/FileNameSavedImage.vue +14 -0
  30. package/src/assets/images/FitZoomIcon.vue +16 -0
  31. package/src/assets/images/KeyboardIcon.vue +16 -0
  32. package/src/assets/images/MinusIcon.vue +13 -0
  33. package/src/assets/images/NotOptimizedIllustration.vue +651 -0
  34. package/src/assets/images/PlusIcon.vue +13 -0
  35. package/src/assets/images/QuestionMark.vue +12 -0
  36. package/src/assets/images/ServerImage.vue +63 -0
  37. package/src/assets/images/SplitLines.vue +18 -0
  38. package/src/assets/images/SplitZigZag.vue +16 -0
  39. package/src/assets/images/StatusImg.vue +14 -0
  40. package/src/assets/images/UserIcon.vue +8 -0
  41. package/src/assets/scss/annotation_details.scss +126 -0
  42. package/src/assets/scss/categorize_modal.scss +42 -0
  43. package/src/assets/scss/choose_label_set_modal.scss +62 -0
  44. package/src/assets/scss/document_action_bar.scss +37 -0
  45. package/src/assets/scss/document_annotations.scss +472 -0
  46. package/src/assets/scss/document_category.scss +80 -0
  47. package/src/assets/scss/document_dashboard.scss +47 -0
  48. package/src/assets/scss/document_dataset_status.scss +46 -0
  49. package/src/assets/scss/document_edit.scss +431 -0
  50. package/src/assets/scss/document_error.scss +81 -0
  51. package/src/assets/scss/document_handover.scss +200 -0
  52. package/src/assets/scss/document_name.scss +62 -0
  53. package/src/assets/scss/document_page.scss +8 -0
  54. package/src/assets/scss/document_thumbnails.scss +41 -0
  55. package/src/assets/scss/document_toolbar.scss +89 -0
  56. package/src/assets/scss/document_top_bar.scss +139 -0
  57. package/src/assets/scss/document_viewport_modal.scss +25 -0
  58. package/src/assets/scss/documents_list.scss +130 -0
  59. package/src/assets/scss/empty_state.scss +34 -0
  60. package/src/assets/scss/extracting_data.scss +35 -0
  61. package/src/assets/scss/imports.scss +1 -0
  62. package/src/assets/scss/main.scss +24 -0
  63. package/src/assets/scss/multi_ann_table_popup.scss +12 -0
  64. package/src/assets/scss/new_annotation.scss +86 -0
  65. package/src/assets/scss/scrolling_document.scss +19 -0
  66. package/src/assets/scss/variables.scss +696 -0
  67. package/src/components/App.vue +112 -0
  68. package/src/components/DocumentAnnotations/ActionButtons.vue +237 -0
  69. package/src/components/DocumentAnnotations/AnnotationContent.vue +249 -0
  70. package/src/components/DocumentAnnotations/AnnotationDetails.vue +292 -0
  71. package/src/components/DocumentAnnotations/AnnotationRow.vue +616 -0
  72. package/src/components/DocumentAnnotations/CategorizeModal.vue +159 -0
  73. package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +155 -0
  74. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +502 -0
  75. package/src/components/DocumentAnnotations/DocumentLabel.vue +148 -0
  76. package/src/components/DocumentAnnotations/EmptyAnnotation.vue +222 -0
  77. package/src/components/DocumentAnnotations/EmptyState.vue +21 -0
  78. package/src/components/DocumentAnnotations/ExtractingData.vue +29 -0
  79. package/src/components/DocumentAnnotations/LoadingAnnotations.vue +43 -0
  80. package/src/components/DocumentAnnotations/LoadingLabels.vue +43 -0
  81. package/src/components/DocumentAnnotations/RejectedLabels.vue +96 -0
  82. package/src/components/DocumentAnnotations/index.js +8 -0
  83. package/src/components/DocumentCategory.vue +156 -0
  84. package/src/components/DocumentDashboard.vue +159 -0
  85. package/src/components/DocumentEdit/DocumentEdit.vue +279 -0
  86. package/src/components/DocumentEdit/EditPages.vue +213 -0
  87. package/src/components/DocumentEdit/EditSidebar.vue +118 -0
  88. package/src/components/DocumentEdit/SplitOverview.vue +182 -0
  89. package/src/components/DocumentEdit/index.js +4 -0
  90. package/src/components/DocumentError.vue +53 -0
  91. package/src/components/DocumentPage/ActionBar.vue +48 -0
  92. package/src/components/DocumentPage/BoxSelection.vue +149 -0
  93. package/src/components/DocumentPage/DocumentPage.vue +517 -0
  94. package/src/components/DocumentPage/DocumentToolbar.vue +145 -0
  95. package/src/components/DocumentPage/DummyPage.vue +53 -0
  96. package/src/components/DocumentPage/MultiAnnSelection.vue +302 -0
  97. package/src/components/DocumentPage/MultiAnnotationTablePopup.vue +253 -0
  98. package/src/components/DocumentPage/NewAnnotation.vue +283 -0
  99. package/src/components/DocumentPage/ScrollingDocument.vue +108 -0
  100. package/src/components/DocumentPage/ScrollingPage.vue +184 -0
  101. package/src/components/DocumentPage/index.js +5 -0
  102. package/src/components/DocumentThumbnails/DocumentThumbnails.vue +92 -0
  103. package/src/components/DocumentThumbnails/LoadingThumbnail.vue +25 -0
  104. package/src/components/DocumentThumbnails/index.js +1 -0
  105. package/src/components/DocumentTopBar/DocumentDatasetStatus.vue +103 -0
  106. package/src/components/DocumentTopBar/DocumentHandover.vue +202 -0
  107. package/src/components/DocumentTopBar/DocumentName.vue +224 -0
  108. package/src/components/DocumentTopBar/DocumentTopBar.vue +144 -0
  109. package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +148 -0
  110. package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +71 -0
  111. package/src/components/DocumentTopBar/index.js +5 -0
  112. package/src/components/DocumentsList/DocumentsList.vue +126 -0
  113. package/src/components/DocumentsList/index.js +1 -0
  114. package/src/components/ErrorMessage.vue +40 -0
  115. package/src/components/NotOptimizedViewportModal.vue +54 -0
  116. package/src/constants.js +4 -0
  117. package/src/directives/scroll.js +28 -0
  118. package/src/i18n.js +23 -0
  119. package/src/locales/de.json +114 -0
  120. package/src/locales/en.json +114 -0
  121. package/src/locales/es.json +113 -0
  122. package/src/main.js +87 -0
  123. package/src/store/category.js +193 -0
  124. package/src/store/display.js +238 -0
  125. package/src/store/document.js +1057 -0
  126. package/src/store/edit.js +210 -0
  127. package/src/store/index.js +22 -0
  128. package/src/store/project.js +95 -0
  129. package/src/store/selection.js +179 -0
  130. package/src/utils/utils.js +3 -0
  131. package/vue.config.js +13 -0
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <svg
3
+ width="11"
4
+ height="12"
5
+ viewBox="0 0 11 12"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M5.49935 0.667969C5.13116 0.667969 4.83268 0.966447 4.83268 1.33464V5.33463H0.832682C0.464492 5.33463 0.166016 5.63311 0.166016 6.0013C0.166016 6.36949 0.464493 6.66797 0.832682 6.66797H4.83268V10.668C4.83268 11.0362 5.13116 11.3346 5.49935 11.3346C5.86754 11.3346 6.16602 11.0362 6.16602 10.668V6.66797H10.166C10.5342 6.66797 10.8327 6.36949 10.8327 6.0013C10.8327 5.63311 10.5342 5.33463 10.166 5.33463H6.16602V1.33464C6.16602 0.966446 5.86754 0.667969 5.49935 0.667969Z"
11
+ />
12
+ </svg>
13
+ </template>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ data-name="Layer 1"
5
+ viewBox="0 0 24 24"
6
+ >
7
+ <path
8
+ fill="#dfe0e4"
9
+ d="M15.33252,9.5A3.5001,3.5001,0,0,0,8.80127,7.75a1.00016,1.00016,0,0,0,1.73242,1A1.50266,1.50266,0,0,1,11.83252,8a1.5,1.5,0,1,1,0,3h-.00244a.94984.94984,0,0,0-.18927.0387,1.03181,1.03181,0,0,0-.19861.04065.98275.98275,0,0,0-.15552.10485,1.00813,1.00813,0,0,0-.162.10975,1.00464,1.00464,0,0,0-.11706.1737.97789.97789,0,0,0-.09668.14417,1.02252,1.02252,0,0,0-.04285.21191A.94847.94847,0,0,0,10.83252,12v1l.00232.01135.0011.49109a1.00016,1.00016,0,0,0,1,.99756h.00244a1.00006,1.00006,0,0,0,.99756-1.00244l-.00153-.66138A3.49363,3.49363,0,0,0,15.33252,9.5Zm-4.20264,6.79A1,1,0,0,0,11.82959,18a1.036,1.036,0,0,0,.71045-.29,1.01517,1.01517,0,0,0,0-1.41992A1.03425,1.03425,0,0,0,11.12988,16.29Z"
10
+ />
11
+ </svg>
12
+ </template>
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div style="display: flex">
3
+ <img v-show="loaded" ref="imgTag" :height="height" />
4
+ <slot v-if="!loaded" />
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import api from "../../api";
10
+
11
+ export default {
12
+ name: "ServerImage",
13
+ props: {
14
+ imageUrl: {
15
+ required: true,
16
+ },
17
+ height: {
18
+ default: null,
19
+ },
20
+ width: {
21
+ default: null,
22
+ },
23
+ },
24
+ data() {
25
+ return {
26
+ loaded: false,
27
+ };
28
+ },
29
+ watch: {
30
+ imageUrl() {
31
+ this.loadImage();
32
+ },
33
+ },
34
+ mounted() {
35
+ this.loadImage();
36
+ },
37
+ methods: {
38
+ loadImage() {
39
+ if (!this.imageUrl) return;
40
+ return api.IMG_REQUEST.get(this.imageUrl)
41
+ .then((response) => {
42
+ return response.data;
43
+ })
44
+ .then((myBlob) => {
45
+ this.$refs.imgTag.src = URL.createObjectURL(myBlob);
46
+ if (this.height) {
47
+ this.$refs.imgTag.style.height = this.height;
48
+ }
49
+ if (this.width) {
50
+ this.$refs.imgTag.style.width = this.width;
51
+ }
52
+ this.loaded = true;
53
+ });
54
+ },
55
+ },
56
+ };
57
+ </script>
58
+
59
+ <style
60
+ scoped
61
+ lang="scss"
62
+ src="../../assets/scss/document_thumbnails.scss"
63
+ ></style>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg
3
+ width="2"
4
+ height="59"
5
+ viewBox="0 0 2 59"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M1 0.908203V58.2693"
11
+ stroke="#858C9A"
12
+ stroke-opacity="0.4"
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ stroke-dasharray="2 2"
16
+ />
17
+ </svg>
18
+ </template>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <svg
3
+ width="6"
4
+ height="57"
5
+ viewBox="0 0 6 57"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M1 1L5 7.875L1 14.75L5 21.625L1 28.5L5 35.375L1 42.25L5 49.125L1 56"
11
+ stroke="#2B3545"
12
+ stroke-linecap="round"
13
+ stroke-linejoin="round"
14
+ />
15
+ </svg>
16
+ </template>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ width="18"
4
+ height="10"
5
+ viewBox="0 0 18 10"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M17.0917 1.07462C17.0142 0.996517 16.9221 0.934522 16.8205 0.892214C16.719 0.849907 16.61 0.828125 16.5 0.828125C16.39 0.828125 16.2811 0.849907 16.1795 0.892214C16.078 0.934522 15.9858 0.996517 15.9084 1.07462L10.6667 6.32462L7.0917 2.74129C7.01423 2.66318 6.92206 2.60119 6.82051 2.55888C6.71896 2.51657 6.61004 2.49479 6.50003 2.49479C6.39002 2.49479 6.2811 2.51657 6.17955 2.55888C6.078 2.60119 5.98583 2.66318 5.90836 2.74129L0.908364 7.74129C0.830257 7.81876 0.768262 7.91093 0.725954 8.01248C0.683647 8.11403 0.661865 8.22295 0.661865 8.33296C0.661865 8.44297 0.683647 8.55189 0.725954 8.65344C0.768262 8.75499 0.830257 8.84715 0.908364 8.92462C0.985833 9.00273 1.078 9.06473 1.17955 9.10703C1.2811 9.14934 1.39002 9.17112 1.50003 9.17112C1.61004 9.17112 1.71896 9.14934 1.82051 9.10703C1.92206 9.06473 2.01423 9.00273 2.0917 8.92462L6.50003 4.50796L10.075 8.09129C10.1525 8.1694 10.2447 8.23139 10.3462 8.2737C10.4478 8.31601 10.5567 8.33779 10.6667 8.33779C10.7767 8.33779 10.8856 8.31601 10.9872 8.2737C11.0887 8.23139 11.1809 8.1694 11.2584 8.09129L17.0917 2.25796C17.1698 2.18049 17.2318 2.08832 17.2741 1.98677C17.3164 1.88522 17.3382 1.7763 17.3382 1.66629C17.3382 1.55628 17.3164 1.44736 17.2741 1.34581C17.2318 1.24426 17.1698 1.15209 17.0917 1.07462Z"
11
+ fill="#2B3545"
12
+ />
13
+ </svg>
14
+ </template>
@@ -0,0 +1,8 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
3
+ <path
4
+ fill="#dfe0e4"
5
+ d="M15.71,12.71a6,6,0,1,0-7.42,0,10,10,0,0,0-6.22,8.18,1,1,0,0,0,2,.22,8,8,0,0,1,15.9,0,1,1,0,0,0,1,.89h.11a1,1,0,0,0,.88-1.1A10,10,0,0,0,15.71,12.71ZM12,12a4,4,0,1,1,4-4A4,4,0,0,1,12,12Z"
6
+ />
7
+ </svg>
8
+ </template>
@@ -0,0 +1,126 @@
1
+ @import "./imports.scss";
2
+
3
+ .label-icon {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ height: 40px;
8
+
9
+ .annotation-details-icon {
10
+ display: flex;
11
+ padding: 0 15px;
12
+
13
+ &.animated-ripple {
14
+ animation: bounce 0.4s 0.1s;
15
+ transform: scale(1);
16
+ }
17
+
18
+ svg {
19
+ width: 25px;
20
+ }
21
+
22
+ &.user-icon {
23
+ padding: 0 18px;
24
+ svg {
25
+ width: 20px;
26
+ }
27
+ }
28
+ }
29
+ }
30
+
31
+ .label-details {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 8px;
35
+ min-width: 100px;
36
+
37
+ .label-description {
38
+ opacity: 0.7;
39
+ color: $white;
40
+ font-weight: 400;
41
+ font-size: 12px;
42
+ line-height: 18px;
43
+ border-bottom: 1px solid $low-opacity-white;
44
+ padding-bottom: 8px;
45
+ word-wrap: break-all;
46
+ white-space: normal;
47
+ width: 216px;
48
+ }
49
+
50
+ .accuracy {
51
+ color: $white;
52
+ font-weight: 400;
53
+ font-size: 12px;
54
+ line-height: 18px;
55
+ display: flex;
56
+ flex-direction: row;
57
+ justify-content: space-between;
58
+ border-bottom: 1px solid $low-opacity-white;
59
+ padding-bottom: 8px;
60
+
61
+ .value {
62
+ color: $green;
63
+
64
+ &.yellow {
65
+ color: $yellow;
66
+ }
67
+
68
+ &.red {
69
+ color: $red;
70
+ }
71
+ }
72
+ }
73
+
74
+ .revision {
75
+ font-weight: 400;
76
+ font-size: 12px;
77
+ line-height: 18px;
78
+ color: $white;
79
+
80
+ > div {
81
+ display: flex;
82
+ align-items: center;
83
+ }
84
+
85
+ .annotation-details-icon {
86
+ display: flex;
87
+
88
+ svg {
89
+ width: 25px;
90
+ }
91
+
92
+ &.user-icon {
93
+ padding-right: 5px;
94
+
95
+ svg {
96
+ width: 20px;
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+ @keyframes bounce {
104
+ 0% {
105
+ transform: scale(0.7);
106
+ opacity: 1;
107
+ }
108
+
109
+ 20% {
110
+ transform: scale(0.9);
111
+ opacity: 0.7;
112
+ }
113
+
114
+ 40% {
115
+ transform: scale(1);
116
+ opacity: 0.7;
117
+ }
118
+
119
+ 60% {
120
+ transform: scale(1.3);
121
+ }
122
+
123
+ 100% {
124
+ transform: scale(1);
125
+ }
126
+ }
@@ -0,0 +1,42 @@
1
+ @import "./imports.scss";
2
+
3
+ .categorize-modal {
4
+ .content {
5
+ h3 {
6
+ font-weight: 500;
7
+ font-size: 18px;
8
+ line-height: 28px;
9
+ color: $grey-darker;
10
+ }
11
+
12
+ p {
13
+ font-weight: 400;
14
+ font-size: 14px;
15
+ line-height: 20px;
16
+ color: $text-strong;
17
+ }
18
+
19
+ .categorize-dropdown {
20
+ width: 100%;
21
+ border: 1px solid #D0D5DD;
22
+ height: 40px;
23
+ cursor: pointer;
24
+ box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
25
+ border-radius: 8px;
26
+ margin-bottom: 4px;
27
+ }
28
+
29
+ .category-description {
30
+ font-weight: 400;
31
+ font-size: 14px;
32
+ line-height: 20px;
33
+ color: $text-lighter;
34
+ }
35
+
36
+ .submit-category {
37
+ margin-top: 16px;
38
+ width: 100%;
39
+ }
40
+ }
41
+
42
+ }
@@ -0,0 +1,62 @@
1
+ @import "./imports.scss";
2
+
3
+ .choose-label-set-modal {
4
+ .content {
5
+ h3 {
6
+ font-weight: 500;
7
+ font-size: 18px;
8
+ line-height: 28px;
9
+ color: $grey-darker;
10
+ }
11
+
12
+ p {
13
+ font-weight: 400;
14
+ font-size: 14px;
15
+ line-height: 20px;
16
+ color: $text-strong;
17
+ }
18
+
19
+ .label-set-dropdown {
20
+ width: 100%;
21
+ border: 1px solid #D0D5DD;
22
+ height: 40px;
23
+ cursor: pointer;
24
+ box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
25
+ border-radius: 8px;
26
+ margin-bottom: 4px;
27
+ }
28
+
29
+ .labels-list {
30
+ color: $grey-blue;
31
+ font-size: 14px;
32
+ font-weight: 400;
33
+ line-height: 20px;
34
+
35
+ .labels-select {
36
+ padding: 12px;
37
+ overflow: scroll;
38
+ height: 154px;
39
+ border: 1px solid $grey-detail;
40
+ border-radius: 8px;
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 5px;
44
+ }
45
+ }
46
+
47
+ .next-step-description {
48
+ font-weight: 400;
49
+ font-size: 12px;
50
+ line-height: 18px;
51
+ text-align: center;
52
+ color: $dark-blue;
53
+ margin-top: 8px;
54
+ }
55
+
56
+ .submit-ann-set {
57
+ margin-top: 16px;
58
+ width: 100%;
59
+ }
60
+ }
61
+
62
+ }
@@ -0,0 +1,37 @@
1
+ @import "./imports.scss";
2
+ .action-bar {
3
+ position: absolute;
4
+ width: fit-content;
5
+ bottom: 20px;
6
+ left: 0;
7
+ right: 0;
8
+ margin: 0 auto;
9
+ z-index: 100;
10
+
11
+ .action-bar-elements {
12
+ background-color: $dark-blue;
13
+ height: 40px;
14
+ width: fit-content;
15
+ padding: 4px 4px 4px 12px;
16
+ border-radius: 52px;
17
+ margin-left: auto;
18
+ margin-right: auto;
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ gap: 9px;
23
+
24
+ .action-icon {
25
+ .icon {
26
+ display: flex;
27
+ }
28
+ }
29
+
30
+ .action-text {
31
+ color: $white;
32
+ font-size: 14px;
33
+ font-weight: 400;
34
+ line-height: 20px;
35
+ }
36
+ }
37
+ }