@konfuzio/document-validation-ui 0.1.51-dev.2 → 0.1.52-dev.0
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/LICENSE +5 -656
- package/README.md +3 -4
- 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 +1 -1
- package/src/components/App.vue +17 -0
- package/src/components/DocumentDashboard.vue +22 -20
- package/src/main.js +5 -0
- package/src/store/display.js +10 -0
package/package.json
CHANGED
package/src/components/App.vue
CHANGED
|
@@ -129,6 +129,12 @@ export default {
|
|
|
129
129
|
required: false,
|
|
130
130
|
default: "false",
|
|
131
131
|
},
|
|
132
|
+
// eslint-disable-next-line vue/prop-name-casing
|
|
133
|
+
annotation_content_width: {
|
|
134
|
+
type: String,
|
|
135
|
+
required: false,
|
|
136
|
+
default: "60",
|
|
137
|
+
},
|
|
132
138
|
},
|
|
133
139
|
computed: {
|
|
134
140
|
...mapState("display", ["pageError"]),
|
|
@@ -258,6 +264,13 @@ export default {
|
|
|
258
264
|
return this.hide_empty_label_sets === "true";
|
|
259
265
|
}
|
|
260
266
|
},
|
|
267
|
+
annotationContentWidth() {
|
|
268
|
+
if (process.env.VUE_APP_ANNOTATION_CONTENT_WIDTH) {
|
|
269
|
+
return process.env.VUE_APP_ANNOTATION_CONTENT_WIDTH;
|
|
270
|
+
} else {
|
|
271
|
+
return this.annotation_content_width;
|
|
272
|
+
}
|
|
273
|
+
},
|
|
261
274
|
},
|
|
262
275
|
async created() {
|
|
263
276
|
// Sentry config
|
|
@@ -305,6 +318,10 @@ export default {
|
|
|
305
318
|
// document and project config
|
|
306
319
|
Promise.all([
|
|
307
320
|
this.$store.dispatch("display/setDetailsUrl", this.detailsUrl),
|
|
321
|
+
this.$store.dispatch(
|
|
322
|
+
"display/setAnnotationWidth",
|
|
323
|
+
this.annotationContentWidth
|
|
324
|
+
),
|
|
308
325
|
this.$store.dispatch(
|
|
309
326
|
"display/hideEmptyLabelSets",
|
|
310
327
|
this.hideEmptyLabelSets
|
|
@@ -156,26 +156,28 @@ export default {
|
|
|
156
156
|
return elementsWidth;
|
|
157
157
|
},
|
|
158
158
|
onDocumentResize() {
|
|
159
|
-
this.
|
|
160
|
-
this
|
|
161
|
-
|
|
162
|
-
this
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
this
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
159
|
+
if (this.$refs.scrollingDocument) {
|
|
160
|
+
this.documentContainerLeftPadding =
|
|
161
|
+
this.$refs.scrollingDocument.$el.getBoundingClientRect().left;
|
|
162
|
+
this.documentContainerWidth =
|
|
163
|
+
this.$refs.scrollingDocument.$el.offsetWidth;
|
|
164
|
+
this.$store.dispatch(
|
|
165
|
+
"display/updateOptimalResolution",
|
|
166
|
+
this.$el.offsetWidth
|
|
167
|
+
);
|
|
168
|
+
if (this.selectedDocument.pages[0]) {
|
|
169
|
+
this.$store.dispatch("display/updateScale", {
|
|
170
|
+
elementsWidth: this.elementsWidth(),
|
|
171
|
+
client: {
|
|
172
|
+
width: this.$el.clientWidth,
|
|
173
|
+
height: this.$el.clientHeight,
|
|
174
|
+
},
|
|
175
|
+
viewport: {
|
|
176
|
+
width: this.selectedDocument.pages[0].size[0],
|
|
177
|
+
height: this.selectedDocument.pages[0].size[1],
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
}
|
|
179
181
|
}
|
|
180
182
|
},
|
|
181
183
|
},
|
package/src/main.js
CHANGED
|
@@ -8,6 +8,11 @@ import VueObserveVisibility from "vue-observe-visibility";
|
|
|
8
8
|
import Icons from "./icons";
|
|
9
9
|
import VueSplit from "vue-split-panel";
|
|
10
10
|
|
|
11
|
+
// Log app version
|
|
12
|
+
console.log(
|
|
13
|
+
`${require("../package.json").name} ${require("../package.json").version}`
|
|
14
|
+
);
|
|
15
|
+
|
|
11
16
|
Vue.component("VueFontawesome", Icons);
|
|
12
17
|
Vue.component("App", App);
|
|
13
18
|
Vue.use(VueKonva);
|
package/src/store/display.js
CHANGED
|
@@ -316,6 +316,16 @@ const actions = {
|
|
|
316
316
|
commit("SET_LABEL_WIDTH", value);
|
|
317
317
|
commit("SET_ANNOTATION_WIDTH", 100 - value);
|
|
318
318
|
},
|
|
319
|
+
setAnnotationWidth: ({ commit }, value) => {
|
|
320
|
+
const width = Number(value);
|
|
321
|
+
if (width && width >= 20) {
|
|
322
|
+
commit("SET_ANNOTATION_WIDTH", width);
|
|
323
|
+
commit("SET_LABEL_WIDTH", 100 - width);
|
|
324
|
+
} else {
|
|
325
|
+
commit("SET_ANNOTATION_WIDTH", 60);
|
|
326
|
+
commit("SET_LABEL_WIDTH", 40);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
319
329
|
|
|
320
330
|
debounceSearch: debounce(({ commit, dispatch }, query) => {
|
|
321
331
|
dispatch("search", query);
|