@konfuzio/document-validation-ui 0.2.8-dev.0 → 0.2.8-dev.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/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/package.json +4 -2
- package/src/api.js +0 -1
- package/src/components/DocumentAnnotations/AnnotationContent.vue +2 -2
- package/src/components/DocumentPage/DocumentPage.vue +67 -55
- package/src/components/DocumentPage/DocumentToolbar.vue +0 -1
- package/src/store/category.js +2 -2
- package/src/store/display.js +1 -1
- package/src/store/document.js +4 -12
- package/src/store/edit.js +0 -1
- package/src/store/project.js +6 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konfuzio/document-validation-ui",
|
|
3
|
-
"version": "0.2.8-dev.
|
|
3
|
+
"version": "0.2.8-dev.1",
|
|
4
4
|
"repository": "https://github.com/konfuzio-ai/document-validation-ui",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"scripts": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@4tw/cypress-drag-drop": "^2.3.0",
|
|
46
46
|
"@babel/preset-env": "^7.26.9",
|
|
47
|
+
"@vue/cli-plugin-eslint": "^5.0.9",
|
|
47
48
|
"@vue/cli-service": "^5.0.9",
|
|
48
49
|
"@vue/compiler-sfc": "^3.1.0",
|
|
49
50
|
"@vue/test-utils": "^2.4.6",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
},
|
|
61
62
|
"overrides": {
|
|
62
63
|
"postcss": "8.4.31",
|
|
63
|
-
"webpack-dev-server": "5.2.1"
|
|
64
|
+
"webpack-dev-server": "5.2.1",
|
|
65
|
+
"node-forge": "1.3.2"
|
|
64
66
|
}
|
|
65
67
|
}
|
package/src/api.js
CHANGED
|
@@ -127,8 +127,8 @@ export default {
|
|
|
127
127
|
this.$refs.contentEditable.focus();
|
|
128
128
|
}
|
|
129
129
|
})
|
|
130
|
-
.catch((
|
|
131
|
-
|
|
130
|
+
.catch(() => {
|
|
131
|
+
// Error is silently ignored
|
|
132
132
|
});
|
|
133
133
|
// check if this is part of a group of spans to show the whole bounding box as a placeholder
|
|
134
134
|
if (this.annotation.selection_bbox && this.annotation.span.length > 1) {
|
|
@@ -50,62 +50,73 @@
|
|
|
50
50
|
}"
|
|
51
51
|
/>
|
|
52
52
|
<template v-if="pageInVisibleRange && !editMode">
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
<!-- Main Group -->
|
|
54
|
+
<v-group>
|
|
55
|
+
<!-- Search Results -->
|
|
56
|
+
<template v-if="searchResults.length > 0">
|
|
57
|
+
<v-rect
|
|
58
|
+
v-for="(bbox, index) in searchResults"
|
|
59
|
+
:key="'sr' + index"
|
|
60
|
+
:config="{
|
|
61
|
+
...selectionTextRect(
|
|
62
|
+
bbox,
|
|
63
|
+
bbox === currentSearchResultForPage
|
|
64
|
+
),
|
|
65
|
+
}"
|
|
66
|
+
/>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<!-- Grouped Ann Sets Box -->
|
|
68
70
|
<v-rect
|
|
69
|
-
v-for="(
|
|
71
|
+
v-for="(annotationSet, index) in pageAnnotationSets"
|
|
70
72
|
:key="index"
|
|
71
|
-
:config="
|
|
72
|
-
@click="
|
|
73
|
-
@mouseenter="
|
|
74
|
-
@mouseleave="
|
|
73
|
+
:config="groupAnnotationRect(annotationSet, index)"
|
|
74
|
+
@click="handleClickedAnnotationSet(annotationSet)"
|
|
75
|
+
@mouseenter="onAnnotationSetEnter(annotationSet)"
|
|
76
|
+
@mouseleave="onAnnotationSetLeave"
|
|
75
77
|
/>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<v-group>
|
|
79
|
-
<v-rect
|
|
80
|
-
:config="groupAnnotationRect(annotationSet, index)"
|
|
81
|
-
@click="handleClickedAnnotationSet(annotationSet)"
|
|
82
|
-
@mouseenter="onAnnotationSetEnter(annotationSet)"
|
|
83
|
-
@mouseleave="onAnnotationSetLeave"
|
|
84
|
-
/>
|
|
85
|
-
</v-group>
|
|
86
|
-
</template>
|
|
87
|
-
<template v-for="annotation in pageAnnotations">
|
|
78
|
+
|
|
79
|
+
<!-- Entities -->
|
|
88
80
|
<template
|
|
89
|
-
v-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
v-if="
|
|
82
|
+
!categorizeModalIsActive || !publicView || !isDocumentReviewed
|
|
83
|
+
"
|
|
92
84
|
>
|
|
93
|
-
<v-
|
|
85
|
+
<v-rect
|
|
86
|
+
v-for="(entity, index) in scaledEntities(page.entities, page)"
|
|
87
|
+
:key="index"
|
|
88
|
+
:config="entityRect(entity)"
|
|
89
|
+
@click="handleClickedEntity(entity)"
|
|
90
|
+
@mouseenter="onElementEnter"
|
|
91
|
+
@mouseleave="onElementLeave"
|
|
92
|
+
/>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<!-- Annotations -->
|
|
96
|
+
<template v-for="(annotation, annIndex) in pageAnnotations">
|
|
97
|
+
<template v-if="!isAnnotationInEditMode(annotation.id)">
|
|
94
98
|
<v-rect
|
|
95
|
-
v-
|
|
99
|
+
v-for="(bbox, index) in annotation.span.filter(
|
|
100
|
+
(bbox) => bbox.page_index + 1 == page.number
|
|
101
|
+
)"
|
|
102
|
+
:key="index"
|
|
96
103
|
:config="annotationRect(bbox, annotation.id)"
|
|
97
104
|
@click="handleFocusedAnnotation(annotation)"
|
|
98
105
|
@mouseenter="onElementEnter(annotation, bbox)"
|
|
99
106
|
@mouseleave="onElementLeave"
|
|
100
107
|
/>
|
|
101
|
-
</
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<!-- Annotations Checkboxes-->
|
|
111
|
+
<template
|
|
112
|
+
v-if="
|
|
113
|
+
annotation.metadata &&
|
|
114
|
+
annotation.metadata.checkbox &&
|
|
115
|
+
!isAnnotationInEditMode(annotation.id)
|
|
116
|
+
"
|
|
117
|
+
>
|
|
107
118
|
<v-rect
|
|
108
|
-
|
|
119
|
+
:key="annIndex"
|
|
109
120
|
:config="
|
|
110
121
|
annotationRect(
|
|
111
122
|
annotation.metadata.checkbox.bbox,
|
|
@@ -121,24 +132,25 @@
|
|
|
121
132
|
"
|
|
122
133
|
@mouseleave="onElementLeave"
|
|
123
134
|
/>
|
|
124
|
-
</
|
|
135
|
+
</template>
|
|
125
136
|
</template>
|
|
126
|
-
</
|
|
137
|
+
</v-group>
|
|
127
138
|
</template>
|
|
128
139
|
</v-layer>
|
|
129
140
|
<v-layer>
|
|
130
|
-
<
|
|
141
|
+
<span-selection
|
|
131
142
|
v-for="(span, index) in spanSelectionsForPage(page)"
|
|
143
|
+
:id="index"
|
|
132
144
|
:key="index"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<
|
|
145
|
+
:span="span"
|
|
146
|
+
:page="page"
|
|
147
|
+
/>
|
|
148
|
+
<placeholder-selection
|
|
137
149
|
v-for="(span, index) in placeholderSelectionForPage(page)"
|
|
138
150
|
:key="`${index}_placeholder`"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
151
|
+
:span="span"
|
|
152
|
+
:page="page"
|
|
153
|
+
/>
|
|
142
154
|
<template v-if="page.number === selectionPage">
|
|
143
155
|
<box-selection :page="page" />
|
|
144
156
|
</template>
|
|
@@ -551,7 +563,7 @@ export default {
|
|
|
551
563
|
.then((myBlob) => {
|
|
552
564
|
convertBlob(myBlob);
|
|
553
565
|
})
|
|
554
|
-
.catch((
|
|
566
|
+
.catch(() => {});
|
|
555
567
|
} else {
|
|
556
568
|
convertBlob(this.imageBlob);
|
|
557
569
|
}
|
package/src/store/category.js
CHANGED
package/src/store/display.js
CHANGED
package/src/store/document.js
CHANGED
|
@@ -1263,7 +1263,6 @@ const actions = {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
})
|
|
1265
1265
|
.catch((error) => {
|
|
1266
|
-
console.log(error, "Could not fetch document details from the backend");
|
|
1267
1266
|
dispatch("display/setPageError", error.response.data.detail, {
|
|
1268
1267
|
root: true,
|
|
1269
1268
|
});
|
|
@@ -1293,8 +1292,8 @@ const actions = {
|
|
|
1293
1292
|
.then((response) => {
|
|
1294
1293
|
commit("ADD_PAGE", response.data);
|
|
1295
1294
|
})
|
|
1296
|
-
.catch((
|
|
1297
|
-
|
|
1295
|
+
.catch(() => {
|
|
1296
|
+
// Error is silently ignored
|
|
1298
1297
|
});
|
|
1299
1298
|
},
|
|
1300
1299
|
|
|
@@ -1311,8 +1310,8 @@ const actions = {
|
|
|
1311
1310
|
.then((response) => {
|
|
1312
1311
|
commit("SET_DOC_SET", response.data);
|
|
1313
1312
|
})
|
|
1314
|
-
.catch((
|
|
1315
|
-
|
|
1313
|
+
.catch(() => {
|
|
1314
|
+
// Error is silently ignored
|
|
1316
1315
|
});
|
|
1317
1316
|
},
|
|
1318
1317
|
|
|
@@ -1366,7 +1365,6 @@ const actions = {
|
|
|
1366
1365
|
})
|
|
1367
1366
|
.catch((error) => {
|
|
1368
1367
|
reject(error.response);
|
|
1369
|
-
console.log(error);
|
|
1370
1368
|
});
|
|
1371
1369
|
});
|
|
1372
1370
|
},
|
|
@@ -1392,7 +1390,6 @@ const actions = {
|
|
|
1392
1390
|
})
|
|
1393
1391
|
.catch((error) => {
|
|
1394
1392
|
reject(error.response);
|
|
1395
|
-
console.log(error);
|
|
1396
1393
|
});
|
|
1397
1394
|
});
|
|
1398
1395
|
},
|
|
@@ -1432,7 +1429,6 @@ const actions = {
|
|
|
1432
1429
|
})
|
|
1433
1430
|
.catch((error) => {
|
|
1434
1431
|
reject(error.response);
|
|
1435
|
-
console.log(error);
|
|
1436
1432
|
});
|
|
1437
1433
|
});
|
|
1438
1434
|
},
|
|
@@ -1490,7 +1486,6 @@ const actions = {
|
|
|
1490
1486
|
})
|
|
1491
1487
|
.catch((error) => {
|
|
1492
1488
|
reject(error.response);
|
|
1493
|
-
console.log(error);
|
|
1494
1489
|
});
|
|
1495
1490
|
});
|
|
1496
1491
|
},
|
|
@@ -1508,7 +1503,6 @@ const actions = {
|
|
|
1508
1503
|
})
|
|
1509
1504
|
.catch((error) => {
|
|
1510
1505
|
reject(error.response);
|
|
1511
|
-
console.log(error);
|
|
1512
1506
|
});
|
|
1513
1507
|
});
|
|
1514
1508
|
},
|
|
@@ -1524,7 +1518,6 @@ const actions = {
|
|
|
1524
1518
|
})
|
|
1525
1519
|
.catch((error) => {
|
|
1526
1520
|
reject(error.response);
|
|
1527
|
-
console.log(error);
|
|
1528
1521
|
});
|
|
1529
1522
|
});
|
|
1530
1523
|
},
|
|
@@ -1575,7 +1568,6 @@ const actions = {
|
|
|
1575
1568
|
})
|
|
1576
1569
|
.catch((error) => {
|
|
1577
1570
|
reject(error.response);
|
|
1578
|
-
console.log(error);
|
|
1579
1571
|
});
|
|
1580
1572
|
});
|
|
1581
1573
|
},
|
package/src/store/edit.js
CHANGED
package/src/store/project.js
CHANGED
|
@@ -22,7 +22,6 @@ const actions = {
|
|
|
22
22
|
})
|
|
23
23
|
.catch((error) => {
|
|
24
24
|
reject(error);
|
|
25
|
-
console.log(error);
|
|
26
25
|
});
|
|
27
26
|
});
|
|
28
27
|
},
|
|
@@ -34,8 +33,8 @@ const actions = {
|
|
|
34
33
|
.then((results) => {
|
|
35
34
|
commit("SET_LABEL_SETS", results);
|
|
36
35
|
})
|
|
37
|
-
.catch((
|
|
38
|
-
|
|
36
|
+
.catch(() => {
|
|
37
|
+
// Error is silently ignored
|
|
39
38
|
});
|
|
40
39
|
},
|
|
41
40
|
|
|
@@ -44,8 +43,8 @@ const actions = {
|
|
|
44
43
|
.then((response) => {
|
|
45
44
|
commit("SET_CURRENT_USER", response.data);
|
|
46
45
|
})
|
|
47
|
-
.catch((
|
|
48
|
-
|
|
46
|
+
.catch(() => {
|
|
47
|
+
// Error is silently ignored
|
|
49
48
|
});
|
|
50
49
|
},
|
|
51
50
|
|
|
@@ -71,9 +70,8 @@ const actions = {
|
|
|
71
70
|
.then((results) => {
|
|
72
71
|
resolve(results);
|
|
73
72
|
})
|
|
74
|
-
.catch((
|
|
73
|
+
.catch(() => {
|
|
75
74
|
reject();
|
|
76
|
-
console.log(error, "Could not fetch document list from the backend");
|
|
77
75
|
});
|
|
78
76
|
});
|
|
79
77
|
},
|
|
@@ -87,9 +85,8 @@ const actions = {
|
|
|
87
85
|
.then((results) => {
|
|
88
86
|
resolve(results);
|
|
89
87
|
})
|
|
90
|
-
.catch((
|
|
88
|
+
.catch(() => {
|
|
91
89
|
reject();
|
|
92
|
-
console.log(error, "Could not fetch document list from the backend");
|
|
93
90
|
});
|
|
94
91
|
});
|
|
95
92
|
},
|