@konfuzio/document-validation-ui 0.1.1 → 0.1.2-pre-release-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 (36) hide show
  1. package/dist/css/app.6a102cfe.css +1 -0
  2. package/dist/index.html +1 -1
  3. package/dist/js/app.8be19e1c.js +2 -0
  4. package/dist/js/app.8be19e1c.js.map +1 -0
  5. package/package.json +1 -1
  6. package/src/assets/scss/annotation_details.scss +1 -1
  7. package/src/assets/scss/categorize_modal.scss +36 -33
  8. package/src/assets/scss/choose_label_set_modal.scss +60 -57
  9. package/src/assets/scss/document_page.scss +4 -0
  10. package/src/assets/scss/document_top_bar.scss +0 -7
  11. package/src/assets/scss/variables.scss +47 -29
  12. package/src/components/DocumentAnnotations/ActionButtons.vue +33 -21
  13. package/src/components/DocumentAnnotations/AnnotationDetails.vue +66 -109
  14. package/src/components/DocumentAnnotations/CategorizeModal.vue +91 -32
  15. package/src/components/DocumentAnnotations/ChooseLabelSetModal.vue +56 -27
  16. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +0 -14
  17. package/src/components/DocumentEdit/DocumentEdit.vue +25 -36
  18. package/src/components/DocumentEdit/EditPages.vue +8 -17
  19. package/src/components/DocumentPage/DocumentPage.vue +17 -16
  20. package/src/components/DocumentPage/DocumentToolbar.vue +12 -24
  21. package/src/components/DocumentPage/NewAnnotation.vue +11 -2
  22. package/src/components/DocumentPage/ScrollingPage.vue +4 -17
  23. package/src/components/DocumentTopBar/DocumentTopBar.vue +0 -15
  24. package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +7 -2
  25. package/src/components/DocumentTopBar/index.js +0 -2
  26. package/src/locales/de.json +8 -5
  27. package/src/locales/en.json +6 -3
  28. package/src/locales/es.json +6 -3
  29. package/src/store/document.js +88 -9
  30. package/dist/css/app.0c8973f8.css +0 -1
  31. package/dist/js/app.17fe48c4.js +0 -2
  32. package/dist/js/app.17fe48c4.js.map +0 -1
  33. package/src/assets/scss/document_dataset_status.scss +0 -46
  34. package/src/assets/scss/document_handover.scss +0 -200
  35. package/src/components/DocumentTopBar/DocumentDatasetStatus.vue +0 -103
  36. package/src/components/DocumentTopBar/DocumentHandover.vue +0 -202
@@ -34,7 +34,7 @@
34
34
  "ok": "Ok, entendido",
35
35
  "no_data_found": "Click para editar...",
36
36
  "draw_box_document": "Encuentra <i>{label_name}</i> en el documento",
37
- "accuracy": "Precisión",
37
+ "confidence": "Precisión",
38
38
  "not_found_in_document": "No encontrado en el documento",
39
39
  "approved_by": "Aprobado por",
40
40
  "approved": "Aprobado",
@@ -101,7 +101,7 @@
101
101
  "decline": "Declinar",
102
102
  "server_error": "Estamos experimentando problemas con el servidor. Por favor, repita la operación o ",
103
103
  "get_support": "Contacte al Soporte",
104
- "no_labels_available": "No hay etiquetas vacías o múltiples en el grupo de anotaciones seleccionado.",
104
+ "no_labels_available": "No hay etiquetas vacías o múltiples en el grupo de anotaciones seleccionado. Para más información, haz clic en <a href='https://help.konfuzio.com/modules/labels/index.html#multiple' target='_blank'>este enlace</a>.",
105
105
  "new_ann_set_title": "Crear anotaciones múltiples",
106
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
107
  "select_label_set": "Seleccione un modelo de grupo de etiquetas",
@@ -109,5 +109,8 @@
109
109
  "new": "Nuevo",
110
110
  "continue": "Continuar",
111
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."
112
+ "error_creating_multi_ann": "No todos los grupos de anotaciones fueron creados de manera exitosa.",
113
+ "disabled_finish_review": "Solo es posible finalizar la revisión del documento si todas las anotaciones han sido revisadas, ya sea aceptadas o rechazadas.",
114
+ "no_multi_ann_labelset_model": "En este documento no hay grupos de etiquetas múltiples disponibles. Para más información, haz clic en <a href='https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets' target='_blank'>este enlace</a>.",
115
+ "single_category_in_project": "Este proyecto solo tiene una categoría, la cual se ha asignado a este documento. Para poder modificarla, es necesario agregar esta nueva categoría al proyecto. Para más información, visita <a href='https://help.konfuzio.com/modules/categories/index.html#add-a-category' target='_blank'>este enlace</a>."
113
116
  }
@@ -28,6 +28,7 @@ const state = {
28
28
  newAcceptedAnnotations: null,
29
29
  selectedEntities: null,
30
30
  serverError: false,
31
+ categorizeModalIsActive: false,
31
32
  };
32
33
 
33
34
  const getters = {
@@ -392,6 +393,10 @@ const getters = {
392
393
  );
393
394
  },
394
395
 
396
+ /**
397
+ * Joins all strings in a multi-entity Annotation array
398
+ * to look like a single string
399
+ */
395
400
  getTextFromEntities: (state) => () => {
396
401
  return state.selectedEntities
397
402
  .map((entity) => {
@@ -399,6 +404,77 @@ const getters = {
399
404
  })
400
405
  .join(" ");
401
406
  },
407
+
408
+ /**
409
+ * Check the level of confidence of an annotation
410
+ */
411
+ confidence: () => (annotation) => {
412
+ if (annotation) {
413
+ return annotation.confidence;
414
+ } else {
415
+ return null;
416
+ }
417
+ },
418
+
419
+ /**
420
+ * Check status of annotation
421
+ */
422
+ notFound: () => (annotation) => {
423
+ if (annotation) {
424
+ return !annotation.span;
425
+ } else {
426
+ return true;
427
+ }
428
+ },
429
+ created: () => (annotation) => {
430
+ if (annotation) {
431
+ return (
432
+ annotation.created_by && !annotation.revised && annotation.is_correct
433
+ );
434
+ } else {
435
+ return null;
436
+ }
437
+ },
438
+ edited: () => (annotation) => {
439
+ if (annotation) {
440
+ if (annotation.offset_string !== annotation.offset_string_original) {
441
+ return true;
442
+ } else if (annotation.created_by) {
443
+ return true;
444
+ } else {
445
+ return false;
446
+ }
447
+ } else {
448
+ return null;
449
+ }
450
+ },
451
+ accepted: () => (annotation) => {
452
+ if (annotation) {
453
+ return annotation.revised && annotation.is_correct;
454
+ } else {
455
+ return null;
456
+ }
457
+ },
458
+
459
+ /**
460
+ * Check for user who created or revised the annotation
461
+ */
462
+ getUser: () => (annotation) => {
463
+ if (annotation) {
464
+ if (annotation.created_by && !annotation.revised) {
465
+ // If the annotation was created but not yet revised
466
+ // we show who created it
467
+ return annotation.created_by;
468
+ } else if (annotation.revised && annotation.revised_by) {
469
+ return annotation.revised_by;
470
+ } else {
471
+ // If both revised_by and created_by are null, we don't show any user
472
+ return null;
473
+ }
474
+ } else {
475
+ return null;
476
+ }
477
+ },
402
478
  };
403
479
 
404
480
  const actions = {
@@ -487,6 +563,9 @@ const actions = {
487
563
  setSelectedEntities: ({ commit }, entities) => {
488
564
  commit("SET_SELECTED_ENTITIES", entities);
489
565
  },
566
+ setCategorizeModalIsActive: ({ commit }, value) => {
567
+ commit("SET_CATEGORIZE_MODAL_IS_ACTIVE", value);
568
+ },
490
569
 
491
570
  /**
492
571
  * Actions that use HTTP requests always return the axios promise,
@@ -543,13 +622,13 @@ const actions = {
543
622
  return;
544
623
  });
545
624
 
546
- await dispatch("fetchMissingAnnotations");
547
-
548
625
  if (!state.publicView) {
549
626
  await dispatch("project/fetchCurrentUser", null, {
550
627
  root: true,
551
628
  });
552
629
 
630
+ await dispatch("fetchMissingAnnotations");
631
+
553
632
  if (projectId) {
554
633
  await dispatch("category/fetchCategories", projectId, {
555
634
  root: true,
@@ -854,16 +933,13 @@ const actions = {
854
933
  },
855
934
 
856
935
  contactSupport: ({ rootState }, error) => {
857
- let url;
936
+ const url =
937
+ "https://konfuzio.atlassian.net/servicedesk/customer/portal/1/group/1/create/1";
858
938
  const params = `project=${rootState.project.projectId}&email=${rootState.project.currentUser}&issue=${error}`;
859
939
 
860
- if (process.env.VUE_APP_I18N_LOCALE == "de") {
861
- url = "https://konfuzio.com/de/support/";
862
- } else {
863
- url = "https://konfuzio.com/en/support/";
864
- }
940
+ const fullUrl = `${url}?${params}`;
865
941
 
866
- window.open(`${url}?${params}`, "_blank");
942
+ window.open(fullUrl, "_blank");
867
943
  },
868
944
  };
869
945
 
@@ -1046,6 +1122,9 @@ const mutations = {
1046
1122
  SET_SERVER_ERROR: (state, value) => {
1047
1123
  state.serverError = value;
1048
1124
  },
1125
+ SET_CATEGORIZE_MODAL_IS_ACTIVE: (state, value) => {
1126
+ state.categorizeModalIsActive = value;
1127
+ },
1049
1128
  };
1050
1129
 
1051
1130
  export default {