@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.
- package/.eslintrc.js +10 -10
- package/.prettierrc.json +1 -1
- package/LICENSE +21 -21
- package/README.md +24 -24
- package/cypress.config.js +13 -13
- 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/dist/js/chunk-vendors.js +1 -1
- package/dist/js/chunk-vendors.js.map +1 -1
- package/jest.config.js +4 -4
- package/package.json +66 -66
- package/src/api.js +82 -82
- package/src/assets/images/AcceptedCheckMark.vue +8 -8
- package/src/assets/images/AcceptedUser.vue +8 -8
- package/src/assets/images/ActionIcon.vue +60 -60
- package/src/assets/images/ArrowDownKey.vue +11 -11
- package/src/assets/images/ArrowUpKey.vue +11 -11
- package/src/assets/images/CategoryIconImg.vue +13 -13
- package/src/assets/images/CheckMark.vue +8 -8
- package/src/assets/images/DraggableIcon.vue +14 -14
- package/src/assets/images/EditDocIcon.vue +12 -12
- package/src/assets/images/EmptyStateImg.vue +129 -129
- package/src/assets/images/ErrorIcon.vue +28 -28
- package/src/assets/images/EyeIcon.vue +11 -11
- package/src/assets/images/FileNameNotSavedImage.vue +26 -26
- package/src/assets/images/FileNameSavedImage.vue +14 -14
- package/src/assets/images/FitZoomIcon.vue +16 -16
- package/src/assets/images/GridIcon.vue +16 -16
- package/src/assets/images/KeyboardIcon.vue +16 -16
- package/src/assets/images/MagicWandIcon.vue +16 -16
- package/src/assets/images/MinusIcon.vue +13 -13
- package/src/assets/images/NotFoundIcon.vue +16 -16
- package/src/assets/images/NotOptimizedIllustration.vue +651 -651
- package/src/assets/images/PlusIcon.vue +13 -13
- package/src/assets/images/QuestionMark.vue +12 -12
- package/src/assets/images/ServerImage.vue +73 -73
- package/src/assets/images/SettingsIcon.vue +14 -14
- package/src/assets/images/SplitLines.vue +18 -18
- package/src/assets/images/SplitZigZag.vue +49 -49
- package/src/assets/images/StarIcon.vue +16 -16
- package/src/assets/images/StatusImg.vue +14 -14
- package/src/assets/images/TranslateArrows.vue +33 -33
- package/src/assets/scss/ann_set_table_options.scss +26 -26
- package/src/assets/scss/annotation_details.scss +141 -141
- package/src/assets/scss/choose_label_set_modal.scss +65 -65
- package/src/assets/scss/document_action_bar.scss +37 -37
- package/src/assets/scss/document_annotations.scss +558 -537
- package/src/assets/scss/document_category.scss +85 -85
- package/src/assets/scss/document_dashboard.scss +52 -52
- package/src/assets/scss/document_edit.scss +410 -410
- package/src/assets/scss/document_error.scss +81 -81
- package/src/assets/scss/document_name.scss +60 -60
- package/src/assets/scss/document_page.scss +12 -12
- package/src/assets/scss/document_thumbnails.scss +41 -41
- package/src/assets/scss/document_toolbar.scss +111 -111
- package/src/assets/scss/document_top_bar.scss +171 -171
- package/src/assets/scss/document_viewport_modal.scss +25 -25
- package/src/assets/scss/documents_list.scss +141 -141
- package/src/assets/scss/edit_page_thumbnail.scss +53 -53
- package/src/assets/scss/empty_state.scss +34 -34
- package/src/assets/scss/extracting_data.scss +35 -35
- package/src/assets/scss/imports.scss +1 -1
- package/src/assets/scss/multi_ann_table_overlay.scss +38 -38
- package/src/assets/scss/multi_ann_table_popup.scss +12 -12
- package/src/assets/scss/new_annotation.scss +102 -102
- package/src/assets/scss/scrolling_document.scss +19 -19
- package/src/assets/scss/theme.scss +801 -801
- package/src/assets/scss/variables.scss +66 -66
- package/src/components/App.cy.js +7 -7
- package/src/components/App.vue +187 -187
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +152 -168
- package/src/components/DocumentAnnotations/AnnotationContent.vue +210 -210
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +251 -251
- package/src/components/DocumentAnnotations/AnnotationRow.vue +752 -752
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +89 -89
- package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +186 -186
- package/src/components/DocumentAnnotations/DocumentAnnotations.cy.js +441 -441
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +534 -534
- package/src/components/DocumentAnnotations/DocumentLabel.vue +189 -189
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +193 -193
- package/src/components/DocumentAnnotations/EmptyState.vue +21 -21
- package/src/components/DocumentAnnotations/ExtractingData.vue +41 -41
- package/src/components/DocumentAnnotations/LoadingAnnotations.vue +43 -43
- package/src/components/DocumentAnnotations/LoadingLabels.vue +43 -43
- package/src/components/DocumentAnnotations/MultiAnnotationTableOverlay.vue +338 -338
- package/src/components/DocumentAnnotations/index.js +8 -8
- package/src/components/DocumentCategory.vue +281 -281
- package/src/components/DocumentDashboard.vue +170 -170
- package/src/components/DocumentEdit/DocumentEdit.cy.js +541 -541
- package/src/components/DocumentEdit/DocumentEdit.vue +503 -503
- package/src/components/DocumentEdit/EditConfirmationModal.vue +55 -55
- package/src/components/DocumentEdit/EditPageThumbnail.vue +114 -114
- package/src/components/DocumentEdit/EditPages.vue +161 -161
- package/src/components/DocumentEdit/EditSidebar.vue +154 -154
- package/src/components/DocumentEdit/RenameAndCategorize.vue +184 -184
- package/src/components/DocumentEdit/SidebarButtons.vue +53 -53
- package/src/components/DocumentEdit/SplitInfoBar.vue +21 -21
- package/src/components/DocumentEdit/index.js +4 -4
- package/src/components/DocumentModals/DocumentErrorModal.vue +58 -58
- package/src/components/DocumentModals/NotOptimizedViewportModal.vue +51 -51
- package/src/components/DocumentPage/ActionBar.vue +48 -48
- package/src/components/DocumentPage/AnnSetTableOptions.vue +111 -111
- package/src/components/DocumentPage/BoxSelection.vue +152 -152
- package/src/components/DocumentPage/DocumentPage.cy.js +92 -92
- package/src/components/DocumentPage/DocumentPage.vue +568 -568
- package/src/components/DocumentPage/DocumentToolbar.cy.js +215 -215
- package/src/components/DocumentPage/DocumentToolbar.vue +228 -228
- package/src/components/DocumentPage/DummyPage.vue +55 -55
- package/src/components/DocumentPage/MultiAnnSelection.vue +371 -371
- package/src/components/DocumentPage/NewAnnotation.vue +308 -308
- package/src/components/DocumentPage/ScrollingDocument.vue +149 -149
- package/src/components/DocumentPage/ScrollingPage.vue +179 -179
- package/src/components/DocumentPage/index.js +5 -5
- package/src/components/DocumentThumbnails/DocumentThumbnails.cy.js +67 -67
- package/src/components/DocumentThumbnails/DocumentThumbnails.vue +132 -132
- package/src/components/DocumentThumbnails/LoadingThumbnail.vue +25 -25
- package/src/components/DocumentThumbnails/index.js +1 -1
- package/src/components/DocumentTopBar/DocumentName.vue +236 -236
- package/src/components/DocumentTopBar/DocumentTopBar.cy.js +222 -222
- package/src/components/DocumentTopBar/DocumentTopBar.vue +202 -202
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +183 -183
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +74 -74
- package/src/components/DocumentTopBar/index.js +3 -3
- package/src/components/DocumentsList/DocumentsList.vue +121 -121
- package/src/components/DocumentsList/index.js +1 -1
- package/src/components/ErrorMessage.vue +40 -40
- package/src/components/index.js +1 -1
- package/src/constants.js +5 -5
- package/src/directives/scroll.js +28 -28
- package/src/i18n.js +22 -22
- package/src/icons.js +45 -45
- package/src/locales/de.json +148 -148
- package/src/locales/en.json +148 -148
- package/src/main.js +26 -26
- package/src/store/category.js +191 -191
- package/src/store/display.js +311 -311
- package/src/store/document.js +1438 -1438
- package/src/store/edit.js +316 -316
- package/src/store/index.js +21 -21
- package/src/store/project.js +143 -143
- package/src/store/selection.js +210 -210
- package/src/utils/utils.js +54 -54
- package/vue.config.js +25 -25
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="documentsAvailableToReview && documentsAvailableToReview.length > 0"
|
|
4
|
-
class="documents-list"
|
|
5
|
-
>
|
|
6
|
-
<div v-if="showCategoryInfo && selectedCategory" class="documents-list-top">
|
|
7
|
-
<div class="documents-list-top-left">
|
|
8
|
-
<h2>{{ selectedCategory.name }}</h2>
|
|
9
|
-
<p>
|
|
10
|
-
{{ selectedCategory.description }}
|
|
11
|
-
</p>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="documents-list-top-right">
|
|
14
|
-
<div class="action-box">
|
|
15
|
-
<span>{{ $t("upload_documents") }}</span>
|
|
16
|
-
<b-button
|
|
17
|
-
class="action-button primary-button"
|
|
18
|
-
type="is-primary"
|
|
19
|
-
@click="requestTrialAccess"
|
|
20
|
-
>
|
|
21
|
-
{{ $t("request_trial") }}
|
|
22
|
-
</b-button>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="documents-list-bottom">
|
|
27
|
-
<b-carousel-list :data="documentsAvailableToReview" :items-to-show="5">
|
|
28
|
-
<template #item="document">
|
|
29
|
-
<div
|
|
30
|
-
:class="[
|
|
31
|
-
'documents-list-thumbnail',
|
|
32
|
-
selectedDocument.id == document.id && 'selected',
|
|
33
|
-
]"
|
|
34
|
-
@click="changeDocument(document.id)"
|
|
35
|
-
>
|
|
36
|
-
<ServerImage
|
|
37
|
-
:class="[
|
|
38
|
-
'img-thumbnail',
|
|
39
|
-
selectedDocument.id == document.id && 'selected',
|
|
40
|
-
]"
|
|
41
|
-
:image-url="`${document.thumbnail_url}?${document.updated_at}`"
|
|
42
|
-
>
|
|
43
|
-
<b-skeleton width="20px" height="100%" />
|
|
44
|
-
</ServerImage>
|
|
45
|
-
<div
|
|
46
|
-
:class="[
|
|
47
|
-
'document-name',
|
|
48
|
-
selectedDocument.id == document.id && 'selected',
|
|
49
|
-
]"
|
|
50
|
-
>
|
|
51
|
-
<!-- if is the current document, then we use the store variable to get the file name edits in real time -->
|
|
52
|
-
{{
|
|
53
|
-
selectedDocument.id == document.id
|
|
54
|
-
? selectedDocument.data_file_name
|
|
55
|
-
: document.data_file_name
|
|
56
|
-
}}
|
|
57
|
-
</div>
|
|
58
|
-
<div
|
|
59
|
-
v-if="documentHadErrorDuringExtraction(document)"
|
|
60
|
-
class="error-icon"
|
|
61
|
-
>
|
|
62
|
-
<ErrorIcon />
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</template>
|
|
66
|
-
</b-carousel-list>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
70
|
-
<script>
|
|
71
|
-
import { mapGetters, mapState } from "vuex";
|
|
72
|
-
import ServerImage from "../../assets/images/ServerImage";
|
|
73
|
-
import ErrorIcon from "../../assets/images/ErrorIcon";
|
|
74
|
-
import {
|
|
75
|
-
getURLQueryParam,
|
|
76
|
-
navigateToNewDocumentURL,
|
|
77
|
-
getURLPath,
|
|
78
|
-
} from "../../utils/utils";
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* This component creates a horizontal list of documents
|
|
82
|
-
* with thumbnail pictures which are clickable.
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
export default {
|
|
86
|
-
name: "DocumentsList",
|
|
87
|
-
components: {
|
|
88
|
-
ServerImage,
|
|
89
|
-
ErrorIcon,
|
|
90
|
-
},
|
|
91
|
-
data() {
|
|
92
|
-
return {
|
|
93
|
-
showCategoryInfo: false,
|
|
94
|
-
selectedCategory: null,
|
|
95
|
-
documentsList: null,
|
|
96
|
-
};
|
|
97
|
-
},
|
|
98
|
-
computed: {
|
|
99
|
-
...mapState("document", ["selectedDocument"]),
|
|
100
|
-
...mapState("category", ["documentsAvailableToReview"]),
|
|
101
|
-
...mapGetters("category", ["category"]),
|
|
102
|
-
...mapGetters("document", ["documentHadErrorDuringExtraction"]),
|
|
103
|
-
},
|
|
104
|
-
watch: {
|
|
105
|
-
showCategoryInfo(newValue) {
|
|
106
|
-
if (newValue) {
|
|
107
|
-
this.selectedCategory = this.category(this.selectedDocument.category);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
methods: {
|
|
112
|
-
changeDocument(documentId) {
|
|
113
|
-
this.$store.dispatch("document/changeCurrentDocument", documentId);
|
|
114
|
-
},
|
|
115
|
-
requestTrialAccess() {
|
|
116
|
-
window.open("https://konfuzio.com", "_blank");
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
</script>
|
|
121
|
-
<style scoped lang="scss" src="../../assets/scss/documents_list.scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="documentsAvailableToReview && documentsAvailableToReview.length > 0"
|
|
4
|
+
class="documents-list"
|
|
5
|
+
>
|
|
6
|
+
<div v-if="showCategoryInfo && selectedCategory" class="documents-list-top">
|
|
7
|
+
<div class="documents-list-top-left">
|
|
8
|
+
<h2>{{ selectedCategory.name }}</h2>
|
|
9
|
+
<p>
|
|
10
|
+
{{ selectedCategory.description }}
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="documents-list-top-right">
|
|
14
|
+
<div class="action-box">
|
|
15
|
+
<span>{{ $t("upload_documents") }}</span>
|
|
16
|
+
<b-button
|
|
17
|
+
class="action-button primary-button"
|
|
18
|
+
type="is-primary"
|
|
19
|
+
@click="requestTrialAccess"
|
|
20
|
+
>
|
|
21
|
+
{{ $t("request_trial") }}
|
|
22
|
+
</b-button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="documents-list-bottom">
|
|
27
|
+
<b-carousel-list :data="documentsAvailableToReview" :items-to-show="5">
|
|
28
|
+
<template #item="document">
|
|
29
|
+
<div
|
|
30
|
+
:class="[
|
|
31
|
+
'documents-list-thumbnail',
|
|
32
|
+
selectedDocument.id == document.id && 'selected',
|
|
33
|
+
]"
|
|
34
|
+
@click="changeDocument(document.id)"
|
|
35
|
+
>
|
|
36
|
+
<ServerImage
|
|
37
|
+
:class="[
|
|
38
|
+
'img-thumbnail',
|
|
39
|
+
selectedDocument.id == document.id && 'selected',
|
|
40
|
+
]"
|
|
41
|
+
:image-url="`${document.thumbnail_url}?${document.updated_at}`"
|
|
42
|
+
>
|
|
43
|
+
<b-skeleton width="20px" height="100%" />
|
|
44
|
+
</ServerImage>
|
|
45
|
+
<div
|
|
46
|
+
:class="[
|
|
47
|
+
'document-name',
|
|
48
|
+
selectedDocument.id == document.id && 'selected',
|
|
49
|
+
]"
|
|
50
|
+
>
|
|
51
|
+
<!-- if is the current document, then we use the store variable to get the file name edits in real time -->
|
|
52
|
+
{{
|
|
53
|
+
selectedDocument.id == document.id
|
|
54
|
+
? selectedDocument.data_file_name
|
|
55
|
+
: document.data_file_name
|
|
56
|
+
}}
|
|
57
|
+
</div>
|
|
58
|
+
<div
|
|
59
|
+
v-if="documentHadErrorDuringExtraction(document)"
|
|
60
|
+
class="error-icon"
|
|
61
|
+
>
|
|
62
|
+
<ErrorIcon />
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</b-carousel-list>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
<script>
|
|
71
|
+
import { mapGetters, mapState } from "vuex";
|
|
72
|
+
import ServerImage from "../../assets/images/ServerImage";
|
|
73
|
+
import ErrorIcon from "../../assets/images/ErrorIcon";
|
|
74
|
+
import {
|
|
75
|
+
getURLQueryParam,
|
|
76
|
+
navigateToNewDocumentURL,
|
|
77
|
+
getURLPath,
|
|
78
|
+
} from "../../utils/utils";
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* This component creates a horizontal list of documents
|
|
82
|
+
* with thumbnail pictures which are clickable.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
export default {
|
|
86
|
+
name: "DocumentsList",
|
|
87
|
+
components: {
|
|
88
|
+
ServerImage,
|
|
89
|
+
ErrorIcon,
|
|
90
|
+
},
|
|
91
|
+
data() {
|
|
92
|
+
return {
|
|
93
|
+
showCategoryInfo: false,
|
|
94
|
+
selectedCategory: null,
|
|
95
|
+
documentsList: null,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
...mapState("document", ["selectedDocument"]),
|
|
100
|
+
...mapState("category", ["documentsAvailableToReview"]),
|
|
101
|
+
...mapGetters("category", ["category"]),
|
|
102
|
+
...mapGetters("document", ["documentHadErrorDuringExtraction"]),
|
|
103
|
+
},
|
|
104
|
+
watch: {
|
|
105
|
+
showCategoryInfo(newValue) {
|
|
106
|
+
if (newValue) {
|
|
107
|
+
this.selectedCategory = this.category(this.selectedDocument.category);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
methods: {
|
|
112
|
+
changeDocument(documentId) {
|
|
113
|
+
this.$store.dispatch("document/changeCurrentDocument", documentId);
|
|
114
|
+
},
|
|
115
|
+
requestTrialAccess() {
|
|
116
|
+
window.open("https://konfuzio.com", "_blank");
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
</script>
|
|
121
|
+
<style scoped lang="scss" src="../../assets/scss/documents_list.scss"></style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DocumentsList } from "./DocumentsList";
|
|
1
|
+
export { default as DocumentsList } from "./DocumentsList";
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-message>
|
|
3
|
-
<div v-if="serverError" class="message-container">
|
|
4
|
-
<span class="server-error">
|
|
5
|
-
{{ errorMessage }}
|
|
6
|
-
<span class="contact-support" @click="handleGetSupport">
|
|
7
|
-
{{ $t("get_support") }} <b-icon icon="arrow-right" size="is-small"
|
|
8
|
-
/></span>
|
|
9
|
-
</span>
|
|
10
|
-
</div>
|
|
11
|
-
<div v-else class="message-container">
|
|
12
|
-
{{ errorMessage }}
|
|
13
|
-
</div>
|
|
14
|
-
<div class="btn-container" type="button" @click="handleErrorClose">
|
|
15
|
-
<b-icon icon="xmark" class="close-btn error-icon" size="is-small" />
|
|
16
|
-
</div>
|
|
17
|
-
</b-message>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
import { mapState } from "vuex";
|
|
22
|
-
|
|
23
|
-
export default {
|
|
24
|
-
name: "ErrorMessage",
|
|
25
|
-
computed: {
|
|
26
|
-
...mapState("document", ["errorMessage", "serverError"]),
|
|
27
|
-
},
|
|
28
|
-
methods: {
|
|
29
|
-
handleGetSupport() {
|
|
30
|
-
const error = "Server error";
|
|
31
|
-
this.$store.dispatch("document/contactSupport", error);
|
|
32
|
-
},
|
|
33
|
-
handleErrorClose() {
|
|
34
|
-
this.$store.dispatch("document/setErrorMessage", null);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style scoped lang="scss" src="../assets/scss/variables.scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<b-message>
|
|
3
|
+
<div v-if="serverError" class="message-container">
|
|
4
|
+
<span class="server-error">
|
|
5
|
+
{{ errorMessage }}
|
|
6
|
+
<span class="contact-support" @click="handleGetSupport">
|
|
7
|
+
{{ $t("get_support") }} <b-icon icon="arrow-right" size="is-small"
|
|
8
|
+
/></span>
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-else class="message-container">
|
|
12
|
+
{{ errorMessage }}
|
|
13
|
+
</div>
|
|
14
|
+
<div class="btn-container" type="button" @click="handleErrorClose">
|
|
15
|
+
<b-icon icon="xmark" class="close-btn error-icon" size="is-small" />
|
|
16
|
+
</div>
|
|
17
|
+
</b-message>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import { mapState } from "vuex";
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: "ErrorMessage",
|
|
25
|
+
computed: {
|
|
26
|
+
...mapState("document", ["errorMessage", "serverError"]),
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
handleGetSupport() {
|
|
30
|
+
const error = "Server error";
|
|
31
|
+
this.$store.dispatch("document/contactSupport", error);
|
|
32
|
+
},
|
|
33
|
+
handleErrorClose() {
|
|
34
|
+
this.$store.dispatch("document/setErrorMessage", null);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style scoped lang="scss" src="../assets/scss/variables.scss"></style>
|
package/src/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DocumentCategory } from "./DocumentCategory";
|
|
1
|
+
export { default as DocumentCategory } from "./DocumentCategory";
|
package/src/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const PIXEL_RATIO = window.devicePixelRatio || 1;
|
|
2
|
-
export const VIEWPORT_RATIO = 0.98;
|
|
3
|
-
export const MINIMUM_APP_WIDTH = 600;
|
|
4
|
-
export const MINIMUM_OPTIMIZED_APP_WIDTH = 950;
|
|
5
|
-
export const MULTI_ANN_TABLE_FEATURE = false;
|
|
1
|
+
export const PIXEL_RATIO = window.devicePixelRatio || 1;
|
|
2
|
+
export const VIEWPORT_RATIO = 0.98;
|
|
3
|
+
export const MINIMUM_APP_WIDTH = 600;
|
|
4
|
+
export const MINIMUM_OPTIMIZED_APP_WIDTH = 950;
|
|
5
|
+
export const MULTI_ANN_TABLE_FEATURE = false;
|
package/src/directives/scroll.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
function inserted(el, binding) {
|
|
2
|
-
const callback = binding.value;
|
|
3
|
-
if (binding.modifiers.immediate) {
|
|
4
|
-
callback();
|
|
5
|
-
}
|
|
6
|
-
const throttledScroll = throttle(callback, 300);
|
|
7
|
-
el.addEventListener("scroll", throttledScroll, true);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function throttle(callback, limit) {
|
|
11
|
-
var waiting = false; // Initially, we're not waiting
|
|
12
|
-
return function() {
|
|
13
|
-
// We return a throttled function
|
|
14
|
-
if (!waiting) {
|
|
15
|
-
// If we're not waiting
|
|
16
|
-
callback.apply(this, arguments); // Execute users function
|
|
17
|
-
waiting = true; // Prevent future invocations
|
|
18
|
-
setTimeout(function() {
|
|
19
|
-
// After a period of time
|
|
20
|
-
waiting = false; // And allow future invocations
|
|
21
|
-
}, limit);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
inserted
|
|
28
|
-
};
|
|
1
|
+
function inserted(el, binding) {
|
|
2
|
+
const callback = binding.value;
|
|
3
|
+
if (binding.modifiers.immediate) {
|
|
4
|
+
callback();
|
|
5
|
+
}
|
|
6
|
+
const throttledScroll = throttle(callback, 300);
|
|
7
|
+
el.addEventListener("scroll", throttledScroll, true);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function throttle(callback, limit) {
|
|
11
|
+
var waiting = false; // Initially, we're not waiting
|
|
12
|
+
return function() {
|
|
13
|
+
// We return a throttled function
|
|
14
|
+
if (!waiting) {
|
|
15
|
+
// If we're not waiting
|
|
16
|
+
callback.apply(this, arguments); // Execute users function
|
|
17
|
+
waiting = true; // Prevent future invocations
|
|
18
|
+
setTimeout(function() {
|
|
19
|
+
// After a period of time
|
|
20
|
+
waiting = false; // And allow future invocations
|
|
21
|
+
}, limit);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
inserted
|
|
28
|
+
};
|
package/src/i18n.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import VueI18n from 'vue-i18n'
|
|
3
|
-
|
|
4
|
-
Vue.use(VueI18n)
|
|
5
|
-
|
|
6
|
-
function loadLocaleMessages() {
|
|
7
|
-
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
|
|
8
|
-
const messages = {}
|
|
9
|
-
locales.keys().forEach(key => {
|
|
10
|
-
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
|
11
|
-
if (matched && matched.length > 1) {
|
|
12
|
-
const locale = matched[1]
|
|
13
|
-
messages[locale] = locales(key)
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
return messages
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default new VueI18n({
|
|
20
|
-
locale: process.env.VUE_APP_I18N_LOCALE || 'en',
|
|
21
|
-
fallbackLocale: 'en',
|
|
22
|
-
messages: loadLocaleMessages()
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueI18n from 'vue-i18n'
|
|
3
|
+
|
|
4
|
+
Vue.use(VueI18n)
|
|
5
|
+
|
|
6
|
+
function loadLocaleMessages() {
|
|
7
|
+
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
|
|
8
|
+
const messages = {}
|
|
9
|
+
locales.keys().forEach(key => {
|
|
10
|
+
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
|
11
|
+
if (matched && matched.length > 1) {
|
|
12
|
+
const locale = matched[1]
|
|
13
|
+
messages[locale] = locales(key)
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
return messages
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default new VueI18n({
|
|
20
|
+
locale: process.env.VUE_APP_I18N_LOCALE || 'en',
|
|
21
|
+
fallbackLocale: 'en',
|
|
22
|
+
messages: loadLocaleMessages()
|
|
23
23
|
})
|
package/src/icons.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
// internal icons
|
|
2
|
-
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
-
import {
|
|
4
|
-
faArrowUp,
|
|
5
|
-
faAngleRight,
|
|
6
|
-
faAngleLeft,
|
|
7
|
-
faAngleUp,
|
|
8
|
-
faAngleDown,
|
|
9
|
-
faSpinner,
|
|
10
|
-
faPlus,
|
|
11
|
-
faXmark,
|
|
12
|
-
faEllipsisVertical,
|
|
13
|
-
faCircleInfo,
|
|
14
|
-
faArrowRotateLeft,
|
|
15
|
-
faArrowRotateRight,
|
|
16
|
-
faScissors,
|
|
17
|
-
faRepeat,
|
|
18
|
-
faArrowLeft,
|
|
19
|
-
faArrowRight,
|
|
20
|
-
faDownload,
|
|
21
|
-
} from "@fortawesome/free-solid-svg-icons";
|
|
22
|
-
import { FontAwesomeIcon as Icons } from "@fortawesome/vue-fontawesome";
|
|
23
|
-
|
|
24
|
-
library.add(
|
|
25
|
-
faArrowUp,
|
|
26
|
-
faAngleRight,
|
|
27
|
-
faAngleLeft,
|
|
28
|
-
faAngleUp,
|
|
29
|
-
faAngleDown,
|
|
30
|
-
faSpinner,
|
|
31
|
-
faXmark,
|
|
32
|
-
faSpinner,
|
|
33
|
-
faPlus,
|
|
34
|
-
faEllipsisVertical,
|
|
35
|
-
faCircleInfo,
|
|
36
|
-
faArrowRotateLeft,
|
|
37
|
-
faArrowRotateRight,
|
|
38
|
-
faScissors,
|
|
39
|
-
faRepeat,
|
|
40
|
-
faArrowLeft,
|
|
41
|
-
faArrowRight,
|
|
42
|
-
faDownload
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
export default Icons;
|
|
1
|
+
// internal icons
|
|
2
|
+
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
+
import {
|
|
4
|
+
faArrowUp,
|
|
5
|
+
faAngleRight,
|
|
6
|
+
faAngleLeft,
|
|
7
|
+
faAngleUp,
|
|
8
|
+
faAngleDown,
|
|
9
|
+
faSpinner,
|
|
10
|
+
faPlus,
|
|
11
|
+
faXmark,
|
|
12
|
+
faEllipsisVertical,
|
|
13
|
+
faCircleInfo,
|
|
14
|
+
faArrowRotateLeft,
|
|
15
|
+
faArrowRotateRight,
|
|
16
|
+
faScissors,
|
|
17
|
+
faRepeat,
|
|
18
|
+
faArrowLeft,
|
|
19
|
+
faArrowRight,
|
|
20
|
+
faDownload,
|
|
21
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
22
|
+
import { FontAwesomeIcon as Icons } from "@fortawesome/vue-fontawesome";
|
|
23
|
+
|
|
24
|
+
library.add(
|
|
25
|
+
faArrowUp,
|
|
26
|
+
faAngleRight,
|
|
27
|
+
faAngleLeft,
|
|
28
|
+
faAngleUp,
|
|
29
|
+
faAngleDown,
|
|
30
|
+
faSpinner,
|
|
31
|
+
faXmark,
|
|
32
|
+
faSpinner,
|
|
33
|
+
faPlus,
|
|
34
|
+
faEllipsisVertical,
|
|
35
|
+
faCircleInfo,
|
|
36
|
+
faArrowRotateLeft,
|
|
37
|
+
faArrowRotateRight,
|
|
38
|
+
faScissors,
|
|
39
|
+
faRepeat,
|
|
40
|
+
faArrowLeft,
|
|
41
|
+
faArrowRight,
|
|
42
|
+
faDownload
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export default Icons;
|