@konfuzio/document-validation-ui 0.2.8-dev.1 → 0.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konfuzio/document-validation-ui",
3
- "version": "0.2.8-dev.1",
3
+ "version": "0.2.8",
4
4
  "repository": "https://github.com/konfuzio-ai/document-validation-ui",
5
5
  "main": "dist/app.js",
6
6
  "scripts": {
@@ -113,7 +113,7 @@
113
113
  v-for="(span, index) in spanForEditing
114
114
  ? spanSelection
115
115
  : annotation.span"
116
- :key="index"
116
+ :key="`span-${span.x0}-${span.y0}-${span.page_index}-${index}`"
117
117
  @mouseenter="onAnnotationHoverEnter(span)"
118
118
  @mouseleave="onAnnotationHoverLeave"
119
119
  >
@@ -139,7 +139,7 @@
139
139
  >
140
140
  <EmptyAnnotation
141
141
  v-for="(span, index) in spanSelection"
142
- :key="index"
142
+ :key="`empty-span-${span.x0}-${span.y0}-${span.page_index}-${index}`"
143
143
  :span="span"
144
144
  :span-index="index"
145
145
  :label="label"
@@ -2,8 +2,8 @@
2
2
  <div class="label">
3
3
  <div v-if="annotationSet && annotationsToShow().length > 0">
4
4
  <AnnotationRow
5
- v-for="(annotation, index) in annotationsToShow()"
6
- :key="index"
5
+ v-for="annotation in annotationsToShow()"
6
+ :key="`annotation-${annotation.id}`"
7
7
  :annotation="annotation"
8
8
  :label="label"
9
9
  :annotation-set="annotationSet"
@@ -21,8 +21,8 @@
21
21
  @columndragleave="columndragleave"
22
22
  >
23
23
  <b-table-column
24
- v-for="(item, index) in isLoading ? [columns[0]] : columns"
25
- :key="index"
24
+ v-for="item in isLoading ? [columns[0]] : columns"
25
+ :key="`column-${item.field}`"
26
26
  :field="item.field"
27
27
  :label="item.label.name"
28
28
  >
@@ -18,7 +18,7 @@
18
18
  <div class="new-documents-container">
19
19
  <div
20
20
  v-for="(page, index) in updatedDocument"
21
- :key="index"
21
+ :key="`page-${page.pages?.[0]?.id || index}`"
22
22
  class="document-details"
23
23
  >
24
24
  <div class="rename-and-categorize-thumbnails">
@@ -69,7 +69,7 @@
69
69
  <!-- Grouped Ann Sets Box -->
70
70
  <v-rect
71
71
  v-for="(annotationSet, index) in pageAnnotationSets"
72
- :key="index"
72
+ :key="`annotation-set-${annotationSet.id || index}`"
73
73
  :config="groupAnnotationRect(annotationSet, index)"
74
74
  @click="handleClickedAnnotationSet(annotationSet)"
75
75
  @mouseenter="onAnnotationSetEnter(annotationSet)"
@@ -84,7 +84,7 @@
84
84
  >
85
85
  <v-rect
86
86
  v-for="(entity, index) in scaledEntities(page.entities, page)"
87
- :key="index"
87
+ :key="`entity-${entity.id || index}`"
88
88
  :config="entityRect(entity)"
89
89
  @click="handleClickedEntity(entity)"
90
90
  @mouseenter="onElementEnter"
@@ -93,30 +93,23 @@
93
93
  </template>
94
94
 
95
95
  <!-- Annotations -->
96
- <template v-for="(annotation, annIndex) in pageAnnotations">
96
+ <template v-for="annotation in pageAnnotations">
97
97
  <template v-if="!isAnnotationInEditMode(annotation.id)">
98
98
  <v-rect
99
99
  v-for="(bbox, index) in annotation.span.filter(
100
100
  (bbox) => bbox.page_index + 1 == page.number
101
101
  )"
102
- :key="index"
102
+ :key="`annotation-${annotation.id}-bbox-${bbox.x0}-${bbox.y0}-${index}`"
103
103
  :config="annotationRect(bbox, annotation.id)"
104
104
  @click="handleFocusedAnnotation(annotation)"
105
105
  @mouseenter="onElementEnter(annotation, bbox)"
106
106
  @mouseleave="onElementLeave"
107
107
  />
108
- </template>
109
108
 
110
- <!-- Annotations Checkboxes-->
111
- <template
112
- v-if="
113
- annotation.metadata &&
114
- annotation.metadata.checkbox &&
115
- !isAnnotationInEditMode(annotation.id)
116
- "
117
- >
109
+ <!-- Annotations Checkboxes-->
118
110
  <v-rect
119
- :key="annIndex"
111
+ v-if="annotation.metadata && annotation.metadata.checkbox"
112
+ :key="`annotation-${annotation.id}-checkbox`"
120
113
  :config="
121
114
  annotationRect(
122
115
  annotation.metadata.checkbox.bbox,
@@ -141,7 +134,7 @@
141
134
  <span-selection
142
135
  v-for="(span, index) in spanSelectionsForPage(page)"
143
136
  :id="index"
144
- :key="index"
137
+ :key="`span-selection-${span.x0}-${span.y0}-${index}`"
145
138
  :span="span"
146
139
  :page="page"
147
140
  />