@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.
- package/.eslintrc.js +11 -0
- package/.prettierrc.json +1 -0
- package/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/css/app.0c8973f8.css +1 -0
- package/dist/css/chunk-vendors.053b6b6e.css +5 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +1 -0
- package/dist/js/app.17fe48c4.js +2 -0
- package/dist/js/app.17fe48c4.js.map +1 -0
- package/dist/js/chunk-vendors.a48fca3f.js +47 -0
- package/dist/js/chunk-vendors.a48fca3f.js.map +1 -0
- package/jest.config.js +4 -0
- package/package.json +60 -0
- package/src/.DS_Store +0 -0
- package/src/api.js +49 -0
- package/src/assets/images/AcceptedCheckMark.vue +8 -0
- package/src/assets/images/AcceptedUser.vue +8 -0
- package/src/assets/images/ActionIcon.vue +60 -0
- package/src/assets/images/ArrowDownKey.vue +11 -0
- package/src/assets/images/ArrowUpKey.vue +11 -0
- package/src/assets/images/CategoryIconImg.vue +13 -0
- package/src/assets/images/CheckMark.vue +8 -0
- package/src/assets/images/EditDocIcon.vue +12 -0
- package/src/assets/images/EmptyStateImg.vue +129 -0
- package/src/assets/images/ErrorIcon.vue +28 -0
- package/src/assets/images/EyeIcon.vue +11 -0
- package/src/assets/images/FileNameNotSavedImage.vue +26 -0
- package/src/assets/images/FileNameSavedImage.vue +14 -0
- package/src/assets/images/FitZoomIcon.vue +16 -0
- package/src/assets/images/KeyboardIcon.vue +16 -0
- package/src/assets/images/MinusIcon.vue +13 -0
- package/src/assets/images/NotOptimizedIllustration.vue +651 -0
- package/src/assets/images/PlusIcon.vue +13 -0
- package/src/assets/images/QuestionMark.vue +12 -0
- package/src/assets/images/ServerImage.vue +63 -0
- package/src/assets/images/SplitLines.vue +18 -0
- package/src/assets/images/SplitZigZag.vue +16 -0
- package/src/assets/images/StatusImg.vue +14 -0
- package/src/assets/images/UserIcon.vue +8 -0
- package/src/assets/scss/annotation_details.scss +126 -0
- package/src/assets/scss/categorize_modal.scss +42 -0
- package/src/assets/scss/choose_label_set_modal.scss +62 -0
- package/src/assets/scss/document_action_bar.scss +37 -0
- package/src/assets/scss/document_annotations.scss +472 -0
- package/src/assets/scss/document_category.scss +80 -0
- package/src/assets/scss/document_dashboard.scss +47 -0
- package/src/assets/scss/document_dataset_status.scss +46 -0
- package/src/assets/scss/document_edit.scss +431 -0
- package/src/assets/scss/document_error.scss +81 -0
- package/src/assets/scss/document_handover.scss +200 -0
- package/src/assets/scss/document_name.scss +62 -0
- package/src/assets/scss/document_page.scss +8 -0
- package/src/assets/scss/document_thumbnails.scss +41 -0
- package/src/assets/scss/document_toolbar.scss +89 -0
- package/src/assets/scss/document_top_bar.scss +139 -0
- package/src/assets/scss/document_viewport_modal.scss +25 -0
- package/src/assets/scss/documents_list.scss +130 -0
- package/src/assets/scss/empty_state.scss +34 -0
- package/src/assets/scss/extracting_data.scss +35 -0
- package/src/assets/scss/imports.scss +1 -0
- package/src/assets/scss/main.scss +24 -0
- package/src/assets/scss/multi_ann_table_popup.scss +12 -0
- package/src/assets/scss/new_annotation.scss +86 -0
- package/src/assets/scss/scrolling_document.scss +19 -0
- package/src/assets/scss/variables.scss +696 -0
- package/src/components/App.vue +112 -0
- package/src/components/DocumentAnnotations/ActionButtons.vue +237 -0
- package/src/components/DocumentAnnotations/AnnotationContent.vue +249 -0
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +292 -0
- package/src/components/DocumentAnnotations/AnnotationRow.vue +616 -0
- package/src/components/DocumentAnnotations/CategorizeModal.vue +159 -0
- package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +155 -0
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +502 -0
- package/src/components/DocumentAnnotations/DocumentLabel.vue +148 -0
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +222 -0
- package/src/components/DocumentAnnotations/EmptyState.vue +21 -0
- package/src/components/DocumentAnnotations/ExtractingData.vue +29 -0
- package/src/components/DocumentAnnotations/LoadingAnnotations.vue +43 -0
- package/src/components/DocumentAnnotations/LoadingLabels.vue +43 -0
- package/src/components/DocumentAnnotations/RejectedLabels.vue +96 -0
- package/src/components/DocumentAnnotations/index.js +8 -0
- package/src/components/DocumentCategory.vue +156 -0
- package/src/components/DocumentDashboard.vue +159 -0
- package/src/components/DocumentEdit/DocumentEdit.vue +279 -0
- package/src/components/DocumentEdit/EditPages.vue +213 -0
- package/src/components/DocumentEdit/EditSidebar.vue +118 -0
- package/src/components/DocumentEdit/SplitOverview.vue +182 -0
- package/src/components/DocumentEdit/index.js +4 -0
- package/src/components/DocumentError.vue +53 -0
- package/src/components/DocumentPage/ActionBar.vue +48 -0
- package/src/components/DocumentPage/BoxSelection.vue +149 -0
- package/src/components/DocumentPage/DocumentPage.vue +517 -0
- package/src/components/DocumentPage/DocumentToolbar.vue +145 -0
- package/src/components/DocumentPage/DummyPage.vue +53 -0
- package/src/components/DocumentPage/MultiAnnSelection.vue +302 -0
- package/src/components/DocumentPage/MultiAnnotationTablePopup.vue +253 -0
- package/src/components/DocumentPage/NewAnnotation.vue +283 -0
- package/src/components/DocumentPage/ScrollingDocument.vue +108 -0
- package/src/components/DocumentPage/ScrollingPage.vue +184 -0
- package/src/components/DocumentPage/index.js +5 -0
- package/src/components/DocumentThumbnails/DocumentThumbnails.vue +92 -0
- package/src/components/DocumentThumbnails/LoadingThumbnail.vue +25 -0
- package/src/components/DocumentThumbnails/index.js +1 -0
- package/src/components/DocumentTopBar/DocumentDatasetStatus.vue +103 -0
- package/src/components/DocumentTopBar/DocumentHandover.vue +202 -0
- package/src/components/DocumentTopBar/DocumentName.vue +224 -0
- package/src/components/DocumentTopBar/DocumentTopBar.vue +144 -0
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +148 -0
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +71 -0
- package/src/components/DocumentTopBar/index.js +5 -0
- package/src/components/DocumentsList/DocumentsList.vue +126 -0
- package/src/components/DocumentsList/index.js +1 -0
- package/src/components/ErrorMessage.vue +40 -0
- package/src/components/NotOptimizedViewportModal.vue +54 -0
- package/src/constants.js +4 -0
- package/src/directives/scroll.js +28 -0
- package/src/i18n.js +23 -0
- package/src/locales/de.json +114 -0
- package/src/locales/en.json +114 -0
- package/src/locales/es.json +113 -0
- package/src/main.js +87 -0
- package/src/store/category.js +193 -0
- package/src/store/display.js +238 -0
- package/src/store/document.js +1057 -0
- package/src/store/edit.js +210 -0
- package/src/store/index.js +22 -0
- package/src/store/project.js +95 -0
- package/src/store/selection.js +179 -0
- package/src/utils/utils.js +3 -0
- package/vue.config.js +13 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"no_label_sets_found": "No annotation sets found",
|
|
3
|
+
"no_label_sets_found_description": "There are no annotation sets in this document.",
|
|
4
|
+
"no_labels_found": "No labels found",
|
|
5
|
+
"no_labels_description": "There are no labels in this label set.",
|
|
6
|
+
"resolution_not_supported": "App not supported on this resolution",
|
|
7
|
+
"upload_documents": "Upload your own documents",
|
|
8
|
+
"request_trial": "Request trial access",
|
|
9
|
+
"warning_message": "AI can’t be trained if you change the text manually.",
|
|
10
|
+
"category": "Category",
|
|
11
|
+
"status": "Status",
|
|
12
|
+
"preparation": "Preparation",
|
|
13
|
+
"training": "Training",
|
|
14
|
+
"test": "Test",
|
|
15
|
+
"excluded": "Excluded",
|
|
16
|
+
"set_status": "Set a status",
|
|
17
|
+
"status_error": "We couldn’t change the status. Please try again later.",
|
|
18
|
+
"edit": "Edit",
|
|
19
|
+
"save": "Save",
|
|
20
|
+
"autosaving": "Auto saving...",
|
|
21
|
+
"saved": "Saved",
|
|
22
|
+
"not_saved": "Could not save. Try again",
|
|
23
|
+
"handover": "Handover",
|
|
24
|
+
"handover_document": "Handover document",
|
|
25
|
+
"type_email": "Type an email",
|
|
26
|
+
"invalid_email": "Please enter a valid email address.",
|
|
27
|
+
"members": "MEMBERS",
|
|
28
|
+
"select": "Select",
|
|
29
|
+
"document_successfully_handed": "Document successfully handed over to",
|
|
30
|
+
"handover_not_possible": "Handover was not possible. Please try again later.",
|
|
31
|
+
"small_viewport_title": "Small viewport size",
|
|
32
|
+
"small_viewport_info": "We’re sorry, but Konfuzio is not optimized to this viewport size. For a better experience, please open it on a bigger viewport.",
|
|
33
|
+
"ok": "Ok, got it",
|
|
34
|
+
"no_data_found": "Click to edit...",
|
|
35
|
+
"draw_box_document": "Find <i>{label_name}</i> in the document",
|
|
36
|
+
"accuracy": "Accuracy",
|
|
37
|
+
"not_found_in_document": "Not found in the document",
|
|
38
|
+
"approved_by": "Approved by",
|
|
39
|
+
"approved": "Approved",
|
|
40
|
+
"created_by": "Created by",
|
|
41
|
+
"edited_by": "Edited by",
|
|
42
|
+
"edited": "Edited",
|
|
43
|
+
"created": "Created manually",
|
|
44
|
+
"not_revised_yet": "Not revised yet",
|
|
45
|
+
"rotate_pages": "Rotate pages",
|
|
46
|
+
"rotate_all": "Rotate all",
|
|
47
|
+
"cancel": "Cancel",
|
|
48
|
+
"apply": "Apply",
|
|
49
|
+
"next": "Next",
|
|
50
|
+
"submit": "Submit",
|
|
51
|
+
"data_being_extracted": "New data is being extracted",
|
|
52
|
+
"analysing_document": "We are analysing your document.",
|
|
53
|
+
"few_minutes": "This might take a few minutes.",
|
|
54
|
+
"reject_label": "Reject",
|
|
55
|
+
"rejected": "Rejected",
|
|
56
|
+
"ann_exists": "An annotation for this label and label set already exists.",
|
|
57
|
+
"lite_mode": "Read Only",
|
|
58
|
+
"limited_functionalities": "You are using the Read Only version with limited functionalities.",
|
|
59
|
+
"accept": "Accept",
|
|
60
|
+
"split": "Split",
|
|
61
|
+
"reorder": "Reorder",
|
|
62
|
+
"rotate": "Rotate",
|
|
63
|
+
"edit_error": "The changes couldn’t be saved, please try again later.",
|
|
64
|
+
"overview": "Overview",
|
|
65
|
+
"select_pages": "You can now rotate pages, reorder and split documents.",
|
|
66
|
+
"edit_document": "Edit document (Early Access)",
|
|
67
|
+
"edit_early_access": "You are one of the users who have access to these functionalities before the release date.",
|
|
68
|
+
"selected": "selected",
|
|
69
|
+
"rotate_selected": "Rotate selected",
|
|
70
|
+
"edit_not_available": "Editing is not possible for documents with a status of 'Preparation', 'Training' or 'Test', or documents that are 'Read Only' or 'Reviewed'",
|
|
71
|
+
"back_to_edit": "Back to edit",
|
|
72
|
+
"split_document": "Split document",
|
|
73
|
+
"select_label": "Select Label",
|
|
74
|
+
"select_annotation_set": "Select Annotation Set",
|
|
75
|
+
"document_error_title": "Document error",
|
|
76
|
+
"document_error_info": "We’re sorry, the document ran into a problem and its data can’t be restored.",
|
|
77
|
+
"contact_support": "Contact support",
|
|
78
|
+
"finish_review": "Finish review",
|
|
79
|
+
"review_error": "Something went wrong finishing the review. Please try again later.",
|
|
80
|
+
"document_reviewed": "Editing is no longer possible since the document has already been reviewed.",
|
|
81
|
+
"reviewed_mode": "Reviewed",
|
|
82
|
+
"error_creating_annotation": "The annotation could not be created. Please try again later.",
|
|
83
|
+
"categorize_document_title": "Categorize the Document",
|
|
84
|
+
"categorized_as": "This document is currently categorized as",
|
|
85
|
+
"not_categorized": "This document is currently not categorized. Please select a category before annotating: ",
|
|
86
|
+
"choose_category": "Choose a category",
|
|
87
|
+
"select_category": "Select the correct category.",
|
|
88
|
+
"categorized_error": "If this is not the correct category, please change it and we'll proceed with the re-extraction.",
|
|
89
|
+
"categorize_document_no_category_description": "Ask the Project Manager to add a description of this Category to know more about this category.",
|
|
90
|
+
"annotations_pending": "pending",
|
|
91
|
+
"annotations_accepted": "accepted",
|
|
92
|
+
"reject_all_empty": "Reject all empty",
|
|
93
|
+
"no_labels_to_choose": "No Labels",
|
|
94
|
+
"accept_group": "Accept all",
|
|
95
|
+
"new_ann_set_title": "New annotation set",
|
|
96
|
+
"new_ann_set_description": "Select a data model from the existing ones. The new annotation set will contain the same labels.",
|
|
97
|
+
"select_label_set": "Select label-set model",
|
|
98
|
+
"new_ann_set_hint": "The new set will only be created in the moment you save your annotation.",
|
|
99
|
+
"new": "New",
|
|
100
|
+
"continue": "Continue",
|
|
101
|
+
"use_your_keyboard": "Use your keyboard",
|
|
102
|
+
"arrow_keys": "to Navigate",
|
|
103
|
+
"esc_key": "Exit",
|
|
104
|
+
"enter_key": "Accept or Save",
|
|
105
|
+
"delete_key": "Reject",
|
|
106
|
+
"decline": "Decline",
|
|
107
|
+
"server_error": "We are currently experiencing a server issue. Please try again later or",
|
|
108
|
+
"get_support": "Get Support",
|
|
109
|
+
"no_labels_available": "There are no unfilled or multiple labels in the selected annotation set.",
|
|
110
|
+
"new_multi_ann_title": "Create multiple annotations",
|
|
111
|
+
"new_multi_ann_description": "Select a data model from the existing ones, then deselect the labels that don't exist in this document.",
|
|
112
|
+
"drag_drop_columns_multi_ann": "Drag and drop to change the order of the labels",
|
|
113
|
+
"error_creating_multi_ann": "Not all annotation sets were created successfully."
|
|
114
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"no_label_sets_found": "No se han encontrado grupos de etiquetas",
|
|
3
|
+
"no_label_sets_found_description": "No existen grupos de etiquetas en este documento.",
|
|
4
|
+
"no_labels_found": "No se han encontrado etiquetas",
|
|
5
|
+
"no_labels_description": "No existen etiquetas en este grupo.",
|
|
6
|
+
"resolution_not_supported": "Aplicación no compatible con la resolución de pantalla actual",
|
|
7
|
+
"upload_documents": "Suba sus propios documentos",
|
|
8
|
+
"request_trial": "Solicite acceso a la versión de prueba",
|
|
9
|
+
"warning_message": "La IA no puede ser entrenada si se cambia el texto manualmente.",
|
|
10
|
+
"category": "Categoría",
|
|
11
|
+
"status": "Estado",
|
|
12
|
+
"preparation": "Preparación",
|
|
13
|
+
"training": "Entrenamiento",
|
|
14
|
+
"test": "Prueba",
|
|
15
|
+
"excluded": "Excluído",
|
|
16
|
+
"set_status": "Establecer estado",
|
|
17
|
+
"category_error": "La categoría no se puede cambiar porque hay anotaciones que ya han sido aceptadas o creadas manualmente en este documento.",
|
|
18
|
+
"status_error": "No ha sido posible cambiar el estado del documento. Por favor, inténtelo de nuevo más tarde.",
|
|
19
|
+
"edit": "Editar",
|
|
20
|
+
"save": "Guardar",
|
|
21
|
+
"autosaving": "Auto guardando...",
|
|
22
|
+
"saved": "Guardado",
|
|
23
|
+
"not_saved": "No se pudo guardar. Inténtelo de nuevo.",
|
|
24
|
+
"handover": "Asignar",
|
|
25
|
+
"handover_document": "Asignar documento",
|
|
26
|
+
"type_email": "Escriba un correo electrónico",
|
|
27
|
+
"invalid_email": "Por favor, introduzca un correo electrónico válido",
|
|
28
|
+
"members": "MIEMBROS",
|
|
29
|
+
"select": "Seleccionar",
|
|
30
|
+
"document_successfully_handed": "Documento asignado correctamente a",
|
|
31
|
+
"handover_not_possible": "La asignación no fue posible. Por favor, inténtelo de nuevo más tarde.",
|
|
32
|
+
"small_viewport_title": "Tamaño de ventana demasiado pequeño",
|
|
33
|
+
"small_viewport_info": "Lo sentimos, pero Konfuzio no está optimizado para este tamaño de ventana. Para una mejor experiencia, por favor ábralo en una ventana más grande.",
|
|
34
|
+
"ok": "Ok, entendido",
|
|
35
|
+
"no_data_found": "Click para editar...",
|
|
36
|
+
"draw_box_document": "Encuentra <i>{label_name}</i> en el documento",
|
|
37
|
+
"accuracy": "Precisión",
|
|
38
|
+
"not_found_in_document": "No encontrado en el documento",
|
|
39
|
+
"approved_by": "Aprobado por",
|
|
40
|
+
"approved": "Aprobado",
|
|
41
|
+
"created_by": "Creado por",
|
|
42
|
+
"edited_by": "Editado por",
|
|
43
|
+
"edited": "Editado",
|
|
44
|
+
"created": "Creado manualmente",
|
|
45
|
+
"not_revised_yet": "No ha sido revisado aún",
|
|
46
|
+
"rotate_pages": "Rotar páginas",
|
|
47
|
+
"rotate_all": "Rotar todas",
|
|
48
|
+
"cancel": "Cancelar",
|
|
49
|
+
"apply": "Aplicar",
|
|
50
|
+
"next": "Siguiente",
|
|
51
|
+
"submit": "Enviar",
|
|
52
|
+
"data_being_extracted": "Se están extrayendo nuevos datos",
|
|
53
|
+
"analysing_document": "Estamos analizando el documento.",
|
|
54
|
+
"few_minutes": "Esto puede tardar unos minutos.",
|
|
55
|
+
"reject_label": "Rechazar",
|
|
56
|
+
"rejected": "Rechazadas",
|
|
57
|
+
"ann_exists": "Ya existe una anotación para esta etiqueta y grupo de etiquetas.",
|
|
58
|
+
"lite_mode": "Sólo lectura",
|
|
59
|
+
"limited_functionalities": "Está utilizando la versión de sólo lectura con funcionalidad limitada.",
|
|
60
|
+
"accept": "Aceptar",
|
|
61
|
+
"split": "Dividir",
|
|
62
|
+
"reorder": "Reordenar",
|
|
63
|
+
"rotate": "Rotar",
|
|
64
|
+
"edit_error": "No se han podido guardar los cambios, por favor, inténtelo de nuevo más tarde.",
|
|
65
|
+
"overview": "Vista general",
|
|
66
|
+
"select_pages": "Ahora puedes rotar, reordenar o dividir los documentos.",
|
|
67
|
+
"edit_document": "Editar documento (Early Access)",
|
|
68
|
+
"edit_early_access": "Eres uno de los usuarios que tiene acceso a estas funcionalidades antes de la fecha de lanzamiento.",
|
|
69
|
+
"selected": "seleccionadas",
|
|
70
|
+
"rotate_selected": "Rotar seleccionadas",
|
|
71
|
+
"edit_not_available": "No es posible editar documentos con estado en 'Preparación', 'Entrenamiento' o 'Pruebas', así como documentos que son de 'Sólo Lectura' o 'Revisados'",
|
|
72
|
+
"back_to_edit": "Volver a editar",
|
|
73
|
+
"split_document": "Dividir documento",
|
|
74
|
+
"select_label": "Seleccionar etiqueta",
|
|
75
|
+
"select_annotation_set": "Seleccionar grupo de etiquetas",
|
|
76
|
+
"document_error_title": "Error en el documento",
|
|
77
|
+
"document_error_info": "Lo sentimos, el documento ha sufrido un problema y no se pueden restaurar sus datos.",
|
|
78
|
+
"contact_support": "Contactar con el soporte",
|
|
79
|
+
"finish_review": "Finalizar revisión",
|
|
80
|
+
"review_error": "No ha sido posible finalizar la revisión. Por favor, inténtelo de nuevo más tarde.",
|
|
81
|
+
"document_reviewed": "No es posible editar el documento si ya ha sido revisado.",
|
|
82
|
+
"reviewed_mode": "Revisado",
|
|
83
|
+
"error_creating_annotation": "No ha sido posible crear la anotación. Por favor, inténtelo de nuevo más tarde.",
|
|
84
|
+
"categorize_document_title": "Categorizar documento",
|
|
85
|
+
"categorized_as": "Este documento ha sido categorizado como",
|
|
86
|
+
"not_categorized": "Este documento no ha sido categorizado. Por favor, seleccione una categoría antes de realizar anotaciones: ",
|
|
87
|
+
"choose_category": "Seleccione una categoría",
|
|
88
|
+
"select_category": "Seleccione la categoría correcta.",
|
|
89
|
+
"categorized_error": "Si esta no es la categoría correcta, por favor cámbiela y procederemos a realizar de nuevo la extracción.",
|
|
90
|
+
"categorize_document_no_category_description": "Solicite a su Gestor de Proyecto que agregue una descripción a esta Categoría para saber más sobre ella.",
|
|
91
|
+
"annotations_pending": "pendientes",
|
|
92
|
+
"annotations_accepted": "aceptadas",
|
|
93
|
+
"reject_all_empty": "Rechazar todas las anotaciones vacías",
|
|
94
|
+
"no_labels_to_choose": "Sin etiquetas",
|
|
95
|
+
"accept_group": "Aceptar todas",
|
|
96
|
+
"use_your_keyboard": "Use su teclado",
|
|
97
|
+
"arrow_keys": "para Navegar",
|
|
98
|
+
"esc_key": "Salir del modo de edición",
|
|
99
|
+
"enter_key": "Aceptar o Guardar",
|
|
100
|
+
"delete_key": "Rechazar",
|
|
101
|
+
"decline": "Declinar",
|
|
102
|
+
"server_error": "Estamos experimentando problemas con el servidor. Por favor, repita la operación o ",
|
|
103
|
+
"get_support": "Contacte al Soporte",
|
|
104
|
+
"no_labels_available": "No hay etiquetas vacías o múltiples en el grupo de anotaciones seleccionado.",
|
|
105
|
+
"new_ann_set_title": "Crear anotaciones múltiples",
|
|
106
|
+
"new_ann_set_description": "Seleccione un modelo de datos de las opciones disponibles, y luego deseleccione las etiquetas que no existen en este documento.",
|
|
107
|
+
"select_label_set": "Seleccione un modelo de grupo de etiquetas",
|
|
108
|
+
"new_ann_set_hint": "El nuevo grupo será creado solo cuando se haya guardado la anotación.",
|
|
109
|
+
"new": "Nuevo",
|
|
110
|
+
"continue": "Continuar",
|
|
111
|
+
"drag_drop_columns_multi_ann": "Arrastre y suelte las columnas para ordenar las etiquetas",
|
|
112
|
+
"error_creating_multi_ann": "No todos los grupos de anotaciones fueron creados de manera exitosa."
|
|
113
|
+
}
|
package/src/main.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Vue from "vue";
|
|
2
|
+
import Buefy from "buefy";
|
|
3
|
+
import "buefy/dist/buefy.css";
|
|
4
|
+
import VueKonva from "vue-konva";
|
|
5
|
+
import App from "./components/App";
|
|
6
|
+
import * as Sentry from "@sentry/vue";
|
|
7
|
+
import { Integrations } from "@sentry/tracing";
|
|
8
|
+
import i18n from "./i18n";
|
|
9
|
+
import store from "./store";
|
|
10
|
+
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
11
|
+
// internal icons
|
|
12
|
+
import {
|
|
13
|
+
faArrowUp,
|
|
14
|
+
faAngleRight,
|
|
15
|
+
faAngleLeft,
|
|
16
|
+
faAngleUp,
|
|
17
|
+
faAngleDown,
|
|
18
|
+
faSpinner,
|
|
19
|
+
faPlus,
|
|
20
|
+
faXmark,
|
|
21
|
+
faEllipsisVertical,
|
|
22
|
+
faCircleInfo,
|
|
23
|
+
faArrowRotateLeft,
|
|
24
|
+
faArrowRotateRight,
|
|
25
|
+
faScissors,
|
|
26
|
+
faRepeat,
|
|
27
|
+
faArrowLeft,
|
|
28
|
+
faArrowRight,
|
|
29
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
30
|
+
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
|
31
|
+
|
|
32
|
+
library.add(
|
|
33
|
+
faArrowUp,
|
|
34
|
+
faAngleRight,
|
|
35
|
+
faAngleLeft,
|
|
36
|
+
faAngleUp,
|
|
37
|
+
faAngleDown,
|
|
38
|
+
faSpinner,
|
|
39
|
+
faXmark,
|
|
40
|
+
faSpinner,
|
|
41
|
+
faPlus,
|
|
42
|
+
faEllipsisVertical,
|
|
43
|
+
faCircleInfo,
|
|
44
|
+
faArrowRotateLeft,
|
|
45
|
+
faArrowRotateRight,
|
|
46
|
+
faScissors,
|
|
47
|
+
faRepeat,
|
|
48
|
+
faArrowLeft,
|
|
49
|
+
faArrowRight
|
|
50
|
+
);
|
|
51
|
+
Vue.component("VueFontawesome", FontAwesomeIcon);
|
|
52
|
+
Vue.component("App", App);
|
|
53
|
+
Vue.use(VueKonva);
|
|
54
|
+
Vue.use(Buefy, {
|
|
55
|
+
defaultIconPack: "fas",
|
|
56
|
+
defaultIconComponent: "vue-fontawesome",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Sentry config
|
|
60
|
+
if (process.env.NODE_ENV != "development") {
|
|
61
|
+
Sentry.init({
|
|
62
|
+
Vue,
|
|
63
|
+
dsn: process.env.VUE_APP_SENTRY_DSN,
|
|
64
|
+
integrations: [new Integrations.BrowserTracing()],
|
|
65
|
+
environment: process.env.VUE_APP_SENTRY_ENVIRONMENT,
|
|
66
|
+
|
|
67
|
+
// We recommend adjusting this value in production, or using tracesSampler
|
|
68
|
+
// for finer control
|
|
69
|
+
tracesSampleRate: 1.0,
|
|
70
|
+
|
|
71
|
+
// If false, errors won't show up in devtools
|
|
72
|
+
logErrors: true,
|
|
73
|
+
|
|
74
|
+
tracingOptions: {
|
|
75
|
+
trackComponents: true,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Main entrypoint for the App
|
|
82
|
+
*/
|
|
83
|
+
new Vue({
|
|
84
|
+
i18n,
|
|
85
|
+
store,
|
|
86
|
+
el: "#app",
|
|
87
|
+
});
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import myImports from "../api";
|
|
2
|
+
|
|
3
|
+
const HTTP = myImports.HTTP;
|
|
4
|
+
|
|
5
|
+
const state = {
|
|
6
|
+
documentsInProject: [],
|
|
7
|
+
documentsAvailableToReview: [], // filtered by user
|
|
8
|
+
categories: null,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const getters = {
|
|
12
|
+
/**
|
|
13
|
+
* Get the category name for a given category ID
|
|
14
|
+
*/
|
|
15
|
+
categoryName: (state) => (categoryId) => {
|
|
16
|
+
if (categoryId && state.categories) {
|
|
17
|
+
return state.categories.find(
|
|
18
|
+
(tempCategory) => tempCategory.id == categoryId
|
|
19
|
+
).name;
|
|
20
|
+
}
|
|
21
|
+
return "";
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get the category for a given category ID
|
|
26
|
+
*/
|
|
27
|
+
category: (state) => (categoryId) => {
|
|
28
|
+
if (categoryId && state.categories) {
|
|
29
|
+
return state.categories.find(
|
|
30
|
+
(tempCategory) => tempCategory.id == categoryId
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const actions = {
|
|
38
|
+
setDocumentsInProject: ({ commit }, documents) => {
|
|
39
|
+
commit("SET_DOCUMENTS_IN_PROJECT", documents);
|
|
40
|
+
},
|
|
41
|
+
setDocumentsAvailableToReview: ({ commit }, documentsAvailableToReview) => {
|
|
42
|
+
commit("SET_AVAILABLE_DOCUMENTS", documentsAvailableToReview);
|
|
43
|
+
},
|
|
44
|
+
setCategories: ({ commit }, categories) => {
|
|
45
|
+
commit("SET_CATEGORIES", categories);
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* Actions that use HTTP requests always return the axios promise,
|
|
49
|
+
* so they can be `await`ed (useful to set the `loading` status).
|
|
50
|
+
*/
|
|
51
|
+
fetchDocumentList: ({ commit, rootState }, categoryId) => {
|
|
52
|
+
return HTTP.get(
|
|
53
|
+
`documents/?category=${categoryId}&assignee=${rootState.project.currentUser}`
|
|
54
|
+
)
|
|
55
|
+
.then((response) => {
|
|
56
|
+
if (response.data.results) {
|
|
57
|
+
commit("SET_DOCUMENTS_IN_PROJECT", response.data.results);
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
.catch((error) => {
|
|
61
|
+
console.log(error, "Could not fetch document list from the backend");
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
createAvailableDocumentsList: (
|
|
66
|
+
{ commit, state, dispatch, rootGetters },
|
|
67
|
+
{ categoryId, user, poll }
|
|
68
|
+
) => {
|
|
69
|
+
const sleep = (duration) =>
|
|
70
|
+
new Promise((resolve) => setTimeout(resolve, duration));
|
|
71
|
+
|
|
72
|
+
// Poll document data until the status_data is 2
|
|
73
|
+
// and labeling is available (done)
|
|
74
|
+
let count = 0;
|
|
75
|
+
const pollUntilLabelingAvailable = (duration) => {
|
|
76
|
+
let errors = 0;
|
|
77
|
+
count += 1;
|
|
78
|
+
|
|
79
|
+
return dispatch("fetchDocumentList", categoryId).then(() => {
|
|
80
|
+
for (let i = 0; i < state.documentsInProject.length; i++) {
|
|
81
|
+
const found = state.documentsAvailableToReview.find(
|
|
82
|
+
(doc) => doc.id === state.documentsInProject[i].id
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
if (found) {
|
|
86
|
+
// If the document is already in the available docs array
|
|
87
|
+
// we go to the next item
|
|
88
|
+
continue;
|
|
89
|
+
} else if (
|
|
90
|
+
rootGetters["document/isDocumentReadyToBeReviewed"](
|
|
91
|
+
state.documentsInProject[i]
|
|
92
|
+
)
|
|
93
|
+
) {
|
|
94
|
+
// add available doc to the end of the array
|
|
95
|
+
commit("ADD_AVAILABLE_DOCUMENT", state.documentsInProject[i]);
|
|
96
|
+
} else if (
|
|
97
|
+
rootGetters["document/documentHadErrorDuringExtraction"](
|
|
98
|
+
state.documentsInProject[i]
|
|
99
|
+
)
|
|
100
|
+
) {
|
|
101
|
+
dispatch("document/setDocumentError", true);
|
|
102
|
+
// If error, add 1
|
|
103
|
+
// Then go to next item
|
|
104
|
+
errors += 1;
|
|
105
|
+
continue;
|
|
106
|
+
} else {
|
|
107
|
+
// Some other situation, such as labeling not yet available
|
|
108
|
+
// go to next item
|
|
109
|
+
// TODO: we should only poll the documents that are not yet available
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// After looping, check if length of both arrays is different
|
|
114
|
+
// And if the difference is due to errors or to docs not ready
|
|
115
|
+
if (
|
|
116
|
+
poll &&
|
|
117
|
+
state.documentsInProject.length !==
|
|
118
|
+
state.documentsAvailableToReview.length &&
|
|
119
|
+
state.documentsAvailableToReview.length + errors !==
|
|
120
|
+
state.documentsInProject.length
|
|
121
|
+
) {
|
|
122
|
+
if (count >= 10) return true;
|
|
123
|
+
|
|
124
|
+
// We poll the endpoint again
|
|
125
|
+
return sleep(duration).then(() => {
|
|
126
|
+
pollUntilLabelingAvailable(duration);
|
|
127
|
+
});
|
|
128
|
+
} else {
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// Poll as long as the lengths are different
|
|
135
|
+
if (
|
|
136
|
+
state.documentsInProject.length === 0 ||
|
|
137
|
+
state.documentsInProject.length !==
|
|
138
|
+
state.documentsAvailableToReview.length
|
|
139
|
+
) {
|
|
140
|
+
let duration;
|
|
141
|
+
if (count <= 5) {
|
|
142
|
+
duration = 5000;
|
|
143
|
+
} else if (count > 10) {
|
|
144
|
+
duration = 20000;
|
|
145
|
+
} else {
|
|
146
|
+
duration = 10000;
|
|
147
|
+
}
|
|
148
|
+
pollUntilLabelingAvailable(duration);
|
|
149
|
+
} else {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
fetchCategories: ({ commit }, projectId) => {
|
|
155
|
+
return HTTP.get(`categories/?limit=100&project=${projectId}`)
|
|
156
|
+
.then(async (response) => {
|
|
157
|
+
if (response.data && response.data.results) {
|
|
158
|
+
commit("SET_CATEGORIES", response.data.results);
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
.catch((error) => {
|
|
162
|
+
console.log(error, "Could not fetch categories from the backend");
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const mutations = {
|
|
168
|
+
SET_DOCUMENTS_IN_PROJECT: (state, documents) => {
|
|
169
|
+
state.documentsInProject = documents;
|
|
170
|
+
},
|
|
171
|
+
SET_AVAILABLE_DOCUMENTS: (state, documentsAvailableToReview) => {
|
|
172
|
+
state.documentsAvailableToReview = documentsAvailableToReview;
|
|
173
|
+
},
|
|
174
|
+
ADD_AVAILABLE_DOCUMENT: (state, availableDocument) => {
|
|
175
|
+
const docAlreadyExists = state.documentsAvailableToReview.find(
|
|
176
|
+
(document) => document.id === availableDocument.id
|
|
177
|
+
);
|
|
178
|
+
if (!docAlreadyExists) {
|
|
179
|
+
state.documentsAvailableToReview.push(availableDocument);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
SET_CATEGORIES: (state, categories) => {
|
|
183
|
+
state.categories = categories;
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export default {
|
|
188
|
+
namespaced: true,
|
|
189
|
+
state,
|
|
190
|
+
actions,
|
|
191
|
+
mutations,
|
|
192
|
+
getters,
|
|
193
|
+
};
|