@piveau/piveau-hub-ui-modules 4.3.2 → 4.3.3
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/data-provider-interface/DPIMenu.vue.mjs +37 -36
- package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +149 -135
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +152 -140
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/DistributionStepper.vue.mjs +60 -60
- package/dist/data-provider-interface/components/DistributionStepper.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/Dropup.vue.mjs +17 -17
- package/dist/data-provider-interface/components/Dropup.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/Dropup.vue2.mjs +2 -2
- package/dist/data-provider-interface/components/FileUpload.vue.d.ts +5 -2
- package/dist/data-provider-interface/components/FileUpload.vue.mjs +119 -117
- package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/Navigation.vue.mjs +69 -69
- package/dist/data-provider-interface/components/Navigation.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SimpleInput.vue.mjs +19 -14
- package/dist/data-provider-interface/components/SimpleInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +31 -31
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SpatialInput.vue.mjs +90 -94
- package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SpatialInput.vue2.mjs +2 -2
- package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs +41 -30
- package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +81 -78
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapdeODB/format-types.mjs +3 -272
- package/dist/data-provider-interface/config/dcatapdeODB/format-types.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapdeODB/input-definition.d.ts +4 -15
- package/dist/data-provider-interface/config/dcatapdeODB/input-definition.mjs +13 -2081
- package/dist/data-provider-interface/config/dcatapdeODB/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapdeODB/page-content-config.mjs +3 -21
- package/dist/data-provider-interface/config/dcatapdeODB/page-content-config.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapdeODB/prefixes.mjs +3 -24
- package/dist/data-provider-interface/config/dcatapdeODB/prefixes.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapdeODB/vocab-prefixes.mjs +3 -31
- package/dist/data-provider-interface/config/dcatapdeODB/vocab-prefixes.mjs.map +1 -1
- package/dist/data-provider-interface/config/dpi-spec-config.mjs +8 -8
- package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
- package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs +52 -52
- package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.mjs +127 -138
- package/dist/data-provider-interface/views/DraftsPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.mjs +68 -68
- package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs +31 -31
- package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs.map +1 -1
- package/dist/form/Repeatable.vue.mjs +37 -37
- package/dist/form/Repeatable.vue.mjs.map +1 -1
- package/dist/modal/AppConfirmationDialog.vue.d.ts +3 -1
- package/dist/modal/AppConfirmationDialog.vue.mjs +45 -39
- package/dist/modal/AppConfirmationDialog.vue.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as N, markRaw as w, resolveComponent as
|
|
2
|
-
import { mapGetters as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as N, markRaw as w, resolveComponent as S, openBlock as r, createElementBlock as o, createElementVNode as c, createVNode as k, withModifiers as F, withCtx as T, Fragment as C, renderList as P, normalizeClass as L, toDisplayString as g, createTextVNode as l, createCommentVNode as u, createBlock as D } from "vue";
|
|
2
|
+
import { mapGetters as V, mapActions as E } from "vuex";
|
|
3
|
+
import A from "jquery";
|
|
4
|
+
import _ from "./PropertyChooser.vue.mjs";
|
|
5
5
|
import { has as b, isNil as $, isEmpty as M } from "lodash-es";
|
|
6
6
|
import O from "./DistributionInputPage.vue.mjs";
|
|
7
7
|
import H from "./OverviewPage.vue.mjs";
|
|
@@ -37,15 +37,15 @@ const K = N({
|
|
|
37
37
|
components: {
|
|
38
38
|
InputPageStep: U,
|
|
39
39
|
DistributionInputPage: O,
|
|
40
|
-
PropertyChooser:
|
|
40
|
+
PropertyChooser: _,
|
|
41
41
|
Navigation: W
|
|
42
42
|
},
|
|
43
43
|
computed: {
|
|
44
|
-
...
|
|
44
|
+
...V("auth", [
|
|
45
45
|
"getIsEditMode",
|
|
46
46
|
"getUserCatalogIds"
|
|
47
47
|
]),
|
|
48
|
-
...
|
|
48
|
+
...V("dpiStore", [
|
|
49
49
|
"getSchema",
|
|
50
50
|
"getNavSteps",
|
|
51
51
|
"getDeleteDistributionInline"
|
|
@@ -67,11 +67,11 @@ const K = N({
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
methods: {
|
|
70
|
-
...
|
|
70
|
+
...E("auth", [
|
|
71
71
|
"setIsEditMode",
|
|
72
72
|
"setIsDraft"
|
|
73
73
|
]),
|
|
74
|
-
...
|
|
74
|
+
...E("dpiStore", [
|
|
75
75
|
"createSchema",
|
|
76
76
|
"translateSchema",
|
|
77
77
|
"saveFormValues",
|
|
@@ -98,60 +98,60 @@ const K = N({
|
|
|
98
98
|
},
|
|
99
99
|
initInputPage() {
|
|
100
100
|
const e = this.getSchema(this.property), t = Object.keys(e).find(
|
|
101
|
-
(
|
|
101
|
+
(a) => e[a].map((m) => m.name).includes("dct:issued") || e[a].map((m) => m.name).includes("dct:modified")
|
|
102
102
|
);
|
|
103
103
|
localStorage.getItem("dpi_editmode") === "true" && t != null && e[t].forEach(
|
|
104
|
-
(
|
|
105
|
-
(
|
|
104
|
+
(a) => {
|
|
105
|
+
(a.identifier === "issued" || a.identifier === "modified") && (a.children[1].props.else.validation = "", a.children[1].props.else["validation-visibility"] = "", a.children[1].props.then.validation = "", a.children[1].props.then["validation-visibility"] = "", a.children[1].props.then.validation = "", a.children[1].props.then["validation-visibility"] = "");
|
|
106
106
|
}
|
|
107
107
|
), localStorage.getItem("dpi_editmode") === "false" && (this.setIsDraft(!1), this.setIsEditMode(!1)), this.saveLocalstorageValues(this.property);
|
|
108
108
|
const d = this.$store.getters["dpiStore/getRawValues"]({ property: this.property });
|
|
109
109
|
M(d) || (this.formValues = d), this.$nextTick(() => {
|
|
110
|
-
|
|
110
|
+
A('[data-toggle="tooltip"]').tooltip({
|
|
111
111
|
container: "body"
|
|
112
112
|
}), setTimeout(() => {
|
|
113
|
-
document.querySelectorAll(".formkitProperty h4").forEach((n,
|
|
114
|
-
n.parentElement.parentElement.classList.contains("formkitWrapRepeatable") || (
|
|
113
|
+
document.querySelectorAll(".formkitProperty h4").forEach((n, s) => {
|
|
114
|
+
n.parentElement.parentElement.classList.contains("formkitWrapRepeatable") || (s != 0 && s != 1 && s != 2 && s != 3 && n.nextElementSibling.classList.toggle("d-none"), n.addEventListener("click", () => {
|
|
115
115
|
n.classList.toggle("dpiChevUp"), n.nextElementSibling.classList.toggle("d-none");
|
|
116
116
|
}));
|
|
117
117
|
});
|
|
118
|
-
const m = document.querySelectorAll(".formkitProperty"),
|
|
119
|
-
for (const
|
|
120
|
-
if (
|
|
121
|
-
if (
|
|
118
|
+
const m = document.querySelectorAll(".formkitProperty"), y = (n) => {
|
|
119
|
+
for (const s of n)
|
|
120
|
+
if (s.type === "attributes") {
|
|
121
|
+
if (s.target.getAttribute("data-invalid") === "true") {
|
|
122
122
|
try {
|
|
123
|
-
|
|
123
|
+
s.target.parentNode.parentNode.parentNode.previousElementSibling.tagName === "H4" && s.target.parentNode.parentNode.parentNode.previousElementSibling.classList.add("isInvalidProperty");
|
|
124
124
|
} catch {
|
|
125
125
|
}
|
|
126
126
|
try {
|
|
127
|
-
|
|
127
|
+
s.target.previousElementSibling.tagName === "H4" && s.target.previousElementSibling.classList.add("isInvalidProperty");
|
|
128
128
|
} catch {
|
|
129
129
|
}
|
|
130
130
|
try {
|
|
131
|
-
|
|
131
|
+
s.target.parentNode.previousElementSibling.tagName === "H4" && s.target.parentNode.previousElementSibling.classList.add("isInvalidProperty");
|
|
132
132
|
} catch {
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
if (
|
|
135
|
+
if (s.target.getAttribute("data-invalid") === null || s.target.getAttribute("data-invalid") === "false") {
|
|
136
136
|
try {
|
|
137
|
-
|
|
137
|
+
s.target.parentNode.parentNode.parentNode.previousElementSibling.tagName === "H4" && s.target.parentNode.parentNode.parentNode.previousElementSibling.classList.remove("isInvalidProperty");
|
|
138
138
|
} catch {
|
|
139
139
|
}
|
|
140
140
|
try {
|
|
141
|
-
|
|
141
|
+
s.target.previousElementSibling.tagName === "H4" && s.target.previousElementSibling.classList.remove("isInvalidProperty");
|
|
142
142
|
} catch {
|
|
143
143
|
}
|
|
144
144
|
try {
|
|
145
|
-
|
|
145
|
+
s.target.parentNode.previousElementSibling.tagName === "H4" && s.target.parentNode.previousElementSibling.classList.remove("isInvalidProperty");
|
|
146
146
|
} catch {
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
},
|
|
150
|
+
}, v = new MutationObserver(y), f = { attributes: !0 };
|
|
151
151
|
let h = [];
|
|
152
|
-
m.forEach((n,
|
|
152
|
+
m.forEach((n, s) => {
|
|
153
153
|
const i = n.querySelectorAll(".formkit-outer");
|
|
154
|
-
h = h.concat(Array.from(i)),
|
|
154
|
+
h = h.concat(Array.from(i)), v.observe(h[s], f);
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
157
|
});
|
|
@@ -190,8 +190,8 @@ const K = N({
|
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
beforeRouteEnter(e, t, d) {
|
|
193
|
-
d((
|
|
194
|
-
t.name && !t.name.startsWith("DataProviderInterface") &&
|
|
193
|
+
d((a) => {
|
|
194
|
+
t.name && !t.name.startsWith("DataProviderInterface") && a.clearAll();
|
|
195
195
|
});
|
|
196
196
|
},
|
|
197
197
|
setup() {
|
|
@@ -199,27 +199,27 @@ const K = N({
|
|
|
199
199
|
steps: e,
|
|
200
200
|
activeStep: t,
|
|
201
201
|
visitedSteps: d,
|
|
202
|
-
previousStep:
|
|
202
|
+
previousStep: a,
|
|
203
203
|
nextStep: m,
|
|
204
|
-
stepPlugin:
|
|
205
|
-
goToNextStep:
|
|
206
|
-
goToPreviousStep:
|
|
204
|
+
stepPlugin: y,
|
|
205
|
+
goToNextStep: v,
|
|
206
|
+
goToPreviousStep: f
|
|
207
207
|
} = q(), h = () => {
|
|
208
208
|
let { x: i, y: p } = j({ behavior: "smooth" });
|
|
209
209
|
p.value = 0;
|
|
210
|
-
}, n = (i) => (e[i].errorCount > 0 || e[i].blockingCount > 0) && d.value.includes(i),
|
|
210
|
+
}, n = (i) => (e[i].errorCount > 0 || e[i].blockingCount > 0) && d.value.includes(i), s = w({ OverviewPage: H });
|
|
211
211
|
return {
|
|
212
212
|
steps: e,
|
|
213
213
|
visitedSteps: d,
|
|
214
214
|
activeStep: t,
|
|
215
|
-
previousStep:
|
|
215
|
+
previousStep: a,
|
|
216
216
|
nextStep: m,
|
|
217
|
-
stepPlugin:
|
|
217
|
+
stepPlugin: y,
|
|
218
218
|
checkStepValidity: n,
|
|
219
|
-
goToNextStep:
|
|
220
|
-
goToPreviousStep:
|
|
219
|
+
goToNextStep: v,
|
|
220
|
+
goToPreviousStep: f,
|
|
221
221
|
scrollToTop: h,
|
|
222
|
-
library:
|
|
222
|
+
library: s
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
}), R = { class: "form-container" }, z = {
|
|
@@ -232,21 +232,21 @@ const K = N({
|
|
|
232
232
|
}, te = {
|
|
233
233
|
key: 0,
|
|
234
234
|
class: "step inactiveStep"
|
|
235
|
-
}, ie = /* @__PURE__ */ c("div", { class: "circle stepCircle" }, null, -1),
|
|
235
|
+
}, ie = /* @__PURE__ */ c("div", { class: "circle stepCircle" }, null, -1), se = [
|
|
236
236
|
ie
|
|
237
|
-
],
|
|
237
|
+
], ae = { class: "d-flex flex-column w-100" }, re = {
|
|
238
238
|
key: 0,
|
|
239
239
|
class: "w-100 d-flex justify-content-between"
|
|
240
|
-
},
|
|
240
|
+
}, oe = { style: { "min-width": "80%" } }, ne = { key: 0 }, le = { key: 1 }, pe = { key: 1 }, de = {
|
|
241
241
|
key: 4,
|
|
242
242
|
class: "p-1"
|
|
243
243
|
}, ce = /* @__PURE__ */ c("b", null, "*", -1);
|
|
244
|
-
function ue(e, t, d,
|
|
245
|
-
const
|
|
246
|
-
return
|
|
247
|
-
e.isInput ? (
|
|
244
|
+
function ue(e, t, d, a, m, y) {
|
|
245
|
+
const v = S("FormKitSchema"), f = S("DistributionInputPage"), h = S("InputPageStep"), n = S("Navigation"), s = S("FormKit");
|
|
246
|
+
return r(), o("div", R, [
|
|
247
|
+
e.isInput ? (r(), o("div", z, [
|
|
248
248
|
c("div", G, [
|
|
249
|
-
k(
|
|
249
|
+
k(s, {
|
|
250
250
|
type: "form",
|
|
251
251
|
modelValue: e.formValues,
|
|
252
252
|
"onUpdate:modelValue": t[1] || (t[1] = (i) => e.formValues = i),
|
|
@@ -262,7 +262,7 @@ function ue(e, t, d, s, m, S) {
|
|
|
262
262
|
default: T(() => [
|
|
263
263
|
c("div", Z, [
|
|
264
264
|
c("ul", J, [
|
|
265
|
-
(
|
|
265
|
+
(r(!0), o(C, null, P(e.steps, (i, p, I) => (r(), o("li", {
|
|
266
266
|
key: i,
|
|
267
267
|
class: L(["step", { activeItem: e.activeStep === p, inactiveStep: p != e.activeStep, "has-errors": e.checkStepValidity(p) }]),
|
|
268
268
|
"data-step-active": e.activeStep === p,
|
|
@@ -272,28 +272,28 @@ function ue(e, t, d, s, m, S) {
|
|
|
272
272
|
}
|
|
273
273
|
}, [
|
|
274
274
|
c("div", X, [
|
|
275
|
-
c("div", Y,
|
|
275
|
+
c("div", Y, g(I + 1), 1),
|
|
276
276
|
l(),
|
|
277
|
-
e.checkStepValidity(p) ? (
|
|
277
|
+
e.checkStepValidity(p) ? (r(), o("span", {
|
|
278
278
|
key: 0,
|
|
279
279
|
class: "step--errors",
|
|
280
|
-
textContent:
|
|
280
|
+
textContent: g(i.errorCount + i.blockingCount)
|
|
281
281
|
}, null, 8, x)) : u("", !0),
|
|
282
|
-
l(
|
|
282
|
+
l(g(e.$t("message.dataupload.steps." + p + "Step")), 1)
|
|
283
283
|
]),
|
|
284
284
|
l(),
|
|
285
|
-
I != Object.keys(e.steps).length ? (
|
|
285
|
+
I != Object.keys(e.steps).length ? (r(), o("div", ee)) : u("", !0)
|
|
286
286
|
], 10, Q))), 128)),
|
|
287
287
|
l(),
|
|
288
|
-
e.activeStep === "Overview" ? (
|
|
288
|
+
e.activeStep === "Overview" ? (r(), o("li", te, se)) : u("", !0)
|
|
289
289
|
]),
|
|
290
290
|
l(),
|
|
291
|
-
c("div",
|
|
292
|
-
(
|
|
291
|
+
c("div", ae, [
|
|
292
|
+
(r(!0), o(C, null, P(e.getNavSteps(e.$env.content.dataProviderInterface.specification)[e.property], (i, p) => (r(), o("div", { key: p }, [
|
|
293
293
|
k(h, { name: i }, {
|
|
294
294
|
default: T(() => [
|
|
295
|
-
i !== "Distributions" && i !== "Overview" ? (
|
|
296
|
-
c("h1",
|
|
295
|
+
i !== "Distributions" && i !== "Overview" ? (r(), o("div", re, [
|
|
296
|
+
c("h1", oe, g(e.$t("message.dataupload.steps." + i)), 1),
|
|
297
297
|
l(),
|
|
298
298
|
c("a", {
|
|
299
299
|
class: "standardButtonDPI",
|
|
@@ -301,27 +301,27 @@ function ue(e, t, d, s, m, S) {
|
|
|
301
301
|
e.dropdownCLick(), e.expandall = !e.expandall;
|
|
302
302
|
})
|
|
303
303
|
}, [
|
|
304
|
-
e.expandall ? (
|
|
304
|
+
e.expandall ? (r(), o("span", ne, g(e.$t("message.dataupload.info.expand")), 1)) : (r(), o("span", le, g(e.$t("message.dataupload.info.hide")), 1))
|
|
305
305
|
])
|
|
306
306
|
])) : u("", !0),
|
|
307
307
|
l(),
|
|
308
|
-
i !== "Distributions" ? (
|
|
308
|
+
i !== "Distributions" ? (r(), o("hr", pe)) : u("", !0),
|
|
309
309
|
l(),
|
|
310
|
-
i !== "Distributions" ? (
|
|
310
|
+
i !== "Distributions" ? (r(), D(v, {
|
|
311
311
|
key: 2,
|
|
312
312
|
schema: e.getSchema(e.property)[i],
|
|
313
313
|
library: e.library
|
|
314
314
|
}, null, 8, ["schema", "library"])) : u("", !0),
|
|
315
315
|
l(),
|
|
316
|
-
i === "Distributions" ? (
|
|
316
|
+
i === "Distributions" ? (r(), D(f, {
|
|
317
317
|
key: 3,
|
|
318
318
|
schema: e.getSchema("distributions"),
|
|
319
319
|
values: e.formValues
|
|
320
320
|
}, null, 8, ["schema", "values"])) : u("", !0),
|
|
321
321
|
l(),
|
|
322
|
-
i === "Mandatory" ? (
|
|
322
|
+
i === "Mandatory" ? (r(), o("p", de, [
|
|
323
323
|
ce,
|
|
324
|
-
l(" mandatory")
|
|
324
|
+
l(" " + g(e.$t("message.dataupload.info.mandatory")), 1)
|
|
325
325
|
])) : u("", !0)
|
|
326
326
|
]),
|
|
327
327
|
_: 2
|
|
@@ -344,8 +344,8 @@ function ue(e, t, d, s, m, S) {
|
|
|
344
344
|
], 512)) : u("", !0)
|
|
345
345
|
]);
|
|
346
346
|
}
|
|
347
|
-
const
|
|
347
|
+
const Ve = /* @__PURE__ */ B(K, [["render", ue]]);
|
|
348
348
|
export {
|
|
349
|
-
|
|
349
|
+
Ve as default
|
|
350
350
|
};
|
|
351
351
|
//# sourceMappingURL=InputPage.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/InputPage.vue"],"sourcesContent":["<template>\n <div class=\"form-container \">\n <div ref=\"fkInputContainer\" class=\"inputContainer\" v-if=\"isInput\">\n <div class=\"formContainer formkit position-relative\">\n\n <!-- <details>{{ formValues }}</details> -->\n <FormKit type=\"form\" v-model=\"formValues\" :actions=\"false\" :plugins=\"[stepPlugin]\" id=\"dpiForm\"\n @change=\"saveFormValues({ property: property, page: page, distid: id, values: formValues })\"\n @click=\"saveFormValues({ property: property, page: page, distid: id, values: formValues })\" @submit.prevent=\"\"\n class=\"d-flex\">\n\n <div class=\"d-flex\">\n <ul class=\"steps\">\n <li v-for=\"(step, stepName, index) in steps\" :key=\"step\" class=\"step\"\n :data-step-active=\"activeStep === stepName\" :data-step-valid=\"step.valid && step.errorCount === 0\"\n :class=\"{ activeItem: activeStep === stepName, inactiveStep: stepName != activeStep, 'has-errors': checkStepValidity(stepName) }\"\n @click=\"activeStep = stepName; update(); scrollToTop()\">\n\n <div class=\"stepBubbleWrap\">\n <div class=\"circle stepCircle\">{{ index + 1 }}</div>\n <span v-if=\"checkStepValidity(stepName)\" class=\"step--errors\"\n v-text=\"step.errorCount + step.blockingCount\" />{{ camel2title(stepName) }}\n </div>\n <div v-if=\"index != Object.keys(steps).length\" class=\"seperatorHorizontalStepper\"></div>\n </li>\n <li class=\"step inactiveStep\" v-if=\"activeStep === 'Overview'\">\n <div class=\"circle stepCircle\"></div>\n </li>\n\n </ul>\n\n <div class=\"d-flex flex-column w-100\">\n <div v-for=\"(stepName, index) in getNavSteps($env.content.dataProviderInterface.specification)[property]\"\n :key=\"index\">\n <InputPageStep :name=\"stepName\">\n <div v-if=\"stepName !== 'Distributions' && stepName !== 'Overview'\"\n class=\"w-100 d-flex justify-content-between\">\n <h1 style=\"min-width:80%\">{{ stepName }} fields</h1>\n <a class=\"standardButtonDPI\" @click=\"dropdownCLick(); expandall = !expandall\"><span\n v-if=\"expandall\">Expand all</span>\n <span v-else>Hide all</span></a>\n </div>\n <hr v-if=\"stepName !== 'Distributions'\">\n <FormKitSchema v-if=\"stepName !== 'Distributions'\" :schema=\"getSchema(property)[stepName]\"\n :library=\"library\" />\n <DistributionInputPage v-if=\"stepName === 'Distributions'\" :schema=\"getSchema('distributions')\"\n :values=\"formValues\" />\n <p class=\"p-1\" v-if=\"stepName === 'Mandatory'\"> <b>*</b> mandatory</p>\n </InputPageStep>\n </div>\n </div>\n </div>\n\n <Navigation :steps=\"steps\" :nextStep=\"nextStep\" :previousStep=\"previousStep\" :goToNextStep=\"goToNextStep\"\n :goToPreviousStep=\"goToPreviousStep\"></Navigation>\n\n </FormKit>\n\n </div>\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable no-alert,arrow-parens,no-param-reassign,no-lonely-if */\nimport { defineComponent, markRaw } from 'vue';\nimport { mapActions, mapGetters } from 'vuex';\nimport $ from 'jquery';\nimport PropertyChooser from './PropertyChooser.vue'\nimport { has, isNil, isEmpty } from 'lodash';\nimport DistributionInputPage from './DistributionInputPage.vue';\nimport OverviewPage from './OverviewPage.vue';\nimport InputPageStep from '../components/InputPageStep.vue';\nimport Navigation from '../components/Navigation.vue';\nimport { useDpiStepper } from '../composables/useDpiStepper';\nimport { useWindowScroll } from '@vueuse/core'\n\n\nexport default defineComponent({\n props: {\n property: {\n required: true,\n type: String,\n },\n id: {\n type: String,\n },\n },\n data() {\n return {\n heightActiveSec: \"10vh\",\n formValues: {},\n offsetTopStepper: \"60px\",\n info: {},\n catalogues: [],\n byte: true,\n expandall: true,\n // steps:{},\n camel2title: (str) =>\n str\n .replace(/([A-Z])/g, (match) => ` ${match}`)\n .replace(/^./, (match) => match.toUpperCase())\n .trim(),\n };\n },\n components: {\n InputPageStep,\n DistributionInputPage,\n PropertyChooser,\n Navigation\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n 'getUserCatalogIds',\n ]),\n ...mapGetters('dpiStore', [\n 'getSchema',\n 'getNavSteps',\n 'getDeleteDistributionInline',\n ]),\n getTitleStep() {\n return Object.keys(this.formValues).filter(key => has(this.formValues[key], 'dct:title'))[0];\n },\n createIDFromTitle() {\n\n const title = this.formValues[this.getTitleStep]['dct:title'][0]['@value'];\n\n if (title != undefined) {\n return title\n .toLowerCase()\n .replace(/ /g, '-');\n }\n else return;\n },\n getFirstTitleFromForm() {\n const allValues = this.formValues[this.getTitleStep];\n\n return has(allValues, 'dct:title')\n && allValues['dct:title'].length > 0\n && has(allValues['dct:title'][0], '@value')\n && !isNil(allValues['dct:title'][0], '@value')\n ? allValues['dct:title'][0]['@value']\n : '';\n },\n isInput() {\n return this.$route.params.page !== 'overview' && this.$route.params.page !== 'distoverview';\n },\n },\n methods: {\n ...mapActions('auth', [\n 'setIsEditMode',\n 'setIsDraft',\n ]),\n ...mapActions('dpiStore', [\n 'createSchema',\n 'translateSchema',\n 'saveFormValues',\n 'saveLocalstorageValues',\n 'addCatalogOptions',\n 'clearAll',\n ]),\n update() {\n this.$forceUpdate();\n },\n dropdownCLick() {\n\n const h4Elements = document.querySelectorAll('.formkitProperty h4');\n\n if (this.expandall) {\n h4Elements.forEach((h4Element, index) => {\n h4Element.classList.add('dpiChevUp')\n h4Element.nextElementSibling.classList.remove('d-none')\n })\n }\n if (!this.expandall) {\n h4Elements.forEach((h4Element, index) => {\n h4Element.classList.remove('dpiChevUp')\n h4Element.nextElementSibling.classList.add('d-none')\n })\n\n }\n\n },\n clearForm() {\n this.$formkit.reset('dpi')\n },\n scrollToTop() {\n window.scrollTo(0, 0);\n },\n initInputPage() {\n // adding validation of modified and issued based on edit mode\n // no validation in edit mode\n\n // get step name where issued and modified are included\n const initialSchema = this.getSchema(this.property);\n const stepWithDates = Object.keys(initialSchema).find(\n key => initialSchema[key].map(el => el.name).includes('dct:issued') || initialSchema[key].map(el => el.name).includes('dct:modified')\n );\n\n\n\n if (localStorage.getItem('dpi_editmode') === 'true' && stepWithDates != undefined) {\n initialSchema[stepWithDates].forEach((el) => {\n if (el['identifier'] === 'issued' || el['identifier'] === 'modified') {\n el['children'][1]['props']['else']['validation'] = ''\n el['children'][1]['props']['else']['validation-visibility'] = ''\n\n el['children'][1]['props']['then']['validation'] = ''\n el['children'][1]['props']['then']['validation-visibility'] = ''\n el['children'][1]['props']['then']['validation'] = ''\n el['children'][1]['props']['then']['validation-visibility'] = ''\n }\n }\n );\n }\n\n if (localStorage.getItem('dpi_editmode') === 'false') {\n this.setIsDraft(false)\n this.setIsEditMode(false)\n }\n\n this.saveLocalstorageValues(this.property); // saves values from localStorage to vuex store\n const existingValues = this.$store.getters['dpiStore/getRawValues']({ property: this.property });\n\n\n // only overwrite empty object if there are values\n if (!isEmpty(existingValues)) this.formValues = existingValues;\n \n \n \n this.$nextTick(() => {\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n setTimeout(() => {\n const h4Elements = document.querySelectorAll('.formkitProperty h4');\n h4Elements.forEach((h4Element, index) => {\n // Added the clickeffect to the headers of the individual properties\n\n if (!h4Element.parentElement.parentElement.classList.contains('formkitWrapRepeatable')) {\n if (index != 0 && index != 1 && index != 2 && index != 3) {\n h4Element.nextElementSibling.classList.toggle('d-none')\n }\n h4Element.addEventListener('click', () => {\n h4Element.classList.toggle('dpiChevUp')\n h4Element.nextElementSibling.classList.toggle('d-none')\n });\n }\n })\n // Observe the validity of the individual properties\n const elements = document.querySelectorAll('.formkitProperty');\n const attributeChangedCallback = (mutationsList) => {\n for (const mutation of mutationsList) {\n\n if (mutation.type === 'attributes') {\n if (mutation.target.getAttribute('data-invalid') === 'true') {\n try {\n if (mutation.target.parentNode.parentNode.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.parentNode.parentNode.previousElementSibling.classList.add('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.previousElementSibling.tagName === 'H4') {\n mutation.target.previousElementSibling.classList.add('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.previousElementSibling.classList.add('isInvalidProperty')\n }\n } catch (error) { }\n }\n if (mutation.target.getAttribute('data-invalid') === null || mutation.target.getAttribute('data-invalid') === 'false') {\n try {\n if (mutation.target.parentNode.parentNode.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.parentNode.parentNode.previousElementSibling.classList.remove('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.previousElementSibling.tagName === 'H4') {\n mutation.target.previousElementSibling.classList.remove('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.previousElementSibling.classList.remove('isInvalidProperty')\n }\n } catch (error) { }\n }\n }\n }\n };\n // MutationObserver \n const observer = new MutationObserver(attributeChangedCallback);\n const config = { attributes: true };\n let allMatchingElements = [];\n\n elements.forEach((element, index) => {\n const matchingChildren = element.querySelectorAll('.formkit-outer');\n allMatchingElements = allMatchingElements.concat(Array.from(matchingChildren));\n observer.observe(allMatchingElements[index], config);\n });\n });\n });\n },\n createDatasetID() {\n const valueObject = this.formValues[this.getTitleStep];\n if (!has(valueObject, 'datasetID') || isNil(valueObject['datasetID'])) {\n // console.log('in if');\n this.formValues[this.getTitleStep].datasetID = this.createIDFromTitle;\n }\n else {\n\n if (this.createIDFromTitle.startsWith(valueObject.datasetID) || valueObject.datasetID.startsWith(this.createIDFromTitle)) {\n // console.log('in else');\n this.formValues[this.getTitleStep].datasetID = this.createIDFromTitle;\n }\n }\n },\n generateandTranslateSchema(property) {\n for (let index = 0; index < this.getNavSteps(this.$env.content.dataProviderInterface.specification)[property].length; index++) {\n this.createSchema({ property: property, page: this.getNavSteps(this.$env.content.dataProviderInterface.specification)[property][index], specification: this.$env.content.dataProviderInterface.specification });\n this.translateSchema({ property: property, page: this.getNavSteps(this.$env.content.dataProviderInterface.specification)[property][index] });\n }\n },\n\n },\n created() {\n\n\n\n // Needs to be reworked\n if (this.$route.query.edit === 'false') {\n this.clearAll();\n // localStorage.clear();\n }\n\n // create schema for datasets or catalogues\n this.generateandTranslateSchema(this.property);\n\n // for datasets also create schema for distributions\n if (this.property === 'datasets') {\n this.generateandTranslateSchema('distributions');\n }\n },\n mounted() {\n this.initInputPage();\n },\n watch: {\n activeStep: {\n handler() {\n this.scrollToTop();\n },\n },\n getFirstTitleFromForm: {\n handler() {\n if (localStorage.getItem('dpi_editmode') === 'false') {\n this.setIsDraft(false)\n this.setIsEditMode(false)\n }\n // only create id from title if the user is not editing an existing dataset with an existing datasetID\n if (!this.getIsEditMode) {\n this.createDatasetID();\n }\n },\n },\n // the schema is a computed value which gets computed only once so on language change this value must be re-computed\n '$i18n.locale': {\n handler() {\n this.generateandTranslateSchema(this.property);\n if (this.property === 'datasets') this.generateandTranslateSchema('distributions');\n }\n },\n },\n beforeRouteEnter(to, from, next) {\n // Always clear storage when entering DPI\n next(vm => {\n if (from.name && !from.name.startsWith('DataProviderInterface')) {\n vm.clearAll();\n }\n });\n },\n setup() {\n const {\n steps,\n activeStep,\n visitedSteps,\n previousStep,\n nextStep,\n stepPlugin,\n goToNextStep,\n goToPreviousStep,\n } = useDpiStepper();\n\n const scrollToTop = () => {\n let { x, y } = useWindowScroll({ behavior: 'smooth' })\n y.value = 0\n\n }\n\n const checkStepValidity = (stepName) => {\n return (steps[stepName].errorCount > 0 || steps[stepName].blockingCount > 0) && visitedSteps.value.includes(stepName)\n }\n\n const library = markRaw({ OverviewPage })\n\n return {\n steps,\n visitedSteps,\n activeStep,\n previousStep,\n nextStep,\n stepPlugin,\n checkStepValidity,\n goToNextStep,\n goToPreviousStep,\n scrollToTop,\n library,\n }\n }\n});\n</script>\n\n<style lang=\"scss\">\n.standardButtonDPI {\n background-color: #fff;\n color: #000;\n border-radius: 0.3em;\n font-size: 16px;\n padding: 0.75em;\n display: inline-flex;\n align-items: center;\n height: 50px;\n border: 1px solid lightgray;\n transition: all 100ms ease-in-out;\n cursor: pointer;\n\n &:hover {\n transform: scale(98%);\n background-color: #F4F4F4;\n border-color: gray;\n text-decoration: none;\n }\n}\n\n:root {\n --gray: #ccccd7;\n --gray-l: #eeeef4;\n}\n\n.formkit-form {\n max-width: 500px;\n flex-shrink: 0;\n margin-top: 1em;\n margin-bottom: 1em;\n background: #fff;\n color: #000;\n border: 1px solid var(--gray);\n border-radius: 0.5em;\n box-shadow: 0.25em 0.25em 1em 0 rgba(0, 0, 0, 0.1);\n}\n\n#app .source-content {\n padding: 2em;\n background: transparent;\n}\n\n.steps {\n list-style-type: none;\n margin: 0;\n display: flex;\n padding-left: 0;\n background: var(--gray-l);\n border-radius: 0.4em 0.4em 0 0;\n overflow: hidden;\n border-bottom: 1px solid var(--gray);\n}\n\n.step {\n font-size: 14px;\n display: flex;\n align-items: center;\n padding: 16px 20px;\n background: var(--gray-l);\n border-right: 1px solid var(--gray);\n color: gray;\n flex-grow: 0;\n flex-shrink: 0;\n position: relative;\n}\n\n.step:last-child {\n box-shadow: 0.1em -0.1 0.1em 0 rgba(0, 0, 0, 0.33)\n}\n\n.step:hover {\n cursor: pointer;\n}\n\n[data-step-active=\"true\"] {\n color: black;\n background: white !important;\n border-bottom: none;\n position: relative;\n}\n\n.step--errors,\n[data-step-valid=\"true\"]:after {\n content: '✓';\n background-color: #54A085;\n position: absolute;\n top: 4px;\n right: 4px;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n z-index: 10;\n display: flex;\n font-size: 10px;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n color: white;\n}\n\n.step--errors {\n background-color: #ff4949;\n color: #fff;\n z-index: 100;\n}\n\n.step-nav {\n display: flex;\n margin-top: 2em;\n margin-bottom: 1em;\n justify-content: space-between;\n}\n\n.form-body {\n padding: 2em;\n}\n\n.next {\n margin-left: auto;\n}\n\n.formkit-outer[data-type=\"submit\"] .formkit-wrapper {\n padding: 0 2em 1em 2em;\n display: flex;\n}\n\n.formkit-outer[data-type=\"submit\"] .formkit-input {\n margin-left: auto;\n margin-right: 0;\n}\n\ndetails {\n border: 1px solid var(--gray);\n background: var(--gray-l);\n border-radius: .15em;\n padding: 1em;\n}\n\n.formkit-form>.formkit-messages {\n padding: 0 2em 0em 2em;\n}\n\n.formkit-form>.formkit-messages:last-child {\n padding: 0 2em 2em 2em;\n}\n\n[data-errors=\"true\"] .formkit-label {\n color: #ff4949;\n}\n\n.formkit-wrapper {\n max-width: 100%;\n}\n\nbutton:hover,\nsummary {\n cursor: pointer\n}\n\n\n@media (max-width: 438px) {\n h1 {\n font-size: 1.15em;\n }\n\n #app .source-content {\n padding: 0.5em;\n }\n\n .steps {\n flex-direction: column;\n }\n\n .step {\n border-bottom: 1px solid var(--gray);\n border-right: none;\n }\n\n .step:last-child {\n border-bottom: none;\n }\n\n .form-body {\n padding: 1em;\n }\n\n .formkit-outer[data-type=\"submit\"] .formkit-wrapper {\n padding: 0 1em 1em 1em;\n display: flex;\n }\n\n .formkit-form>.formkit-messages {\n padding: 0 1em 0em 1em;\n }\n\n .formkit-form>.formkit-messages:last-child {\n padding: 0 1em 1em 1em;\n }\n}\n\n.repeatableWrap,\n.formkitCmpWrap {\n margin: 2rem 0 !important\n}\n\n.isInvalidProperty {\n background-color: #FFD9D9 !important;\n}\n\n.activeItem {\n flex-grow: 1;\n\n .seperatorHorizontalStepper {\n height: 100%;\n }\n}\n\nselect {\n\n line-height: unset !important;\n}\n\n.form-container {\n padding-top: 20px;\n margin-top: 30px;\n border: solid 1px #d5d5d5;\n border-radius: 3px;\n margin-bottom: 20px;\n}\n\n.inputContainer {\n display: flex;\n}\n\n.formContainer {\n width: 100% !important;\n}\n\n.distributionPage0 {\n display: block;\n}\n\n.distributionPage1 {\n display: none;\n}\n\n.distributionPage2 {\n display: none;\n}\n\n.grid2r2c {\n .formkit-input-group-repeatable {\n display: grid;\n grid-template-columns: 70% 28%;\n grid-template-rows: auto auto;\n grid-gap: 10px;\n background-color: transparent;\n }\n}\n\n.grid1r2c {\n .formkit-input-group-repeatable {\n display: grid;\n grid-template-columns: 70% 28%;\n grid-template-rows: auto;\n grid-gap: 10px;\n background-color: transparent;\n }\n}\n\n.row1 {\n grid-row-start: 1;\n grid-row-end: 2;\n}\n\n.row2 {\n grid-row-start: 2;\n grid-row-end: 3;\n}\n\n.grow3 {\n grid-row-start: 3;\n grid-row-end: 4;\n}\n\n.column1 {\n grid-column-start: 1;\n grid-column-end: 2;\n}\n\n.column2 {\n grid-column-start: 2;\n grid-column-end: 3;\n}\n\n.columnboth {\n grid-column-start: 1;\n grid-column-end: 3;\n}\n\n.display-none {\n display: none;\n}\n\n.activeSection {\n >.formkitProperty {\n >div {}\n }\n}\n\n.formkitCmpWrap {\n border-left: 1px solid lightgray;\n\n\n}\n\n.formkitProperty {\n\n >h4 {\n background-color: #f5f5f5;\n padding: 1rem;\n cursor: pointer;\n position: relative;\n transition: all ease-in-out 200ms;\n\n &:hover {\n\n background-color: lightgray;\n\n &:before {\n\n rotate: -45deg;\n }\n\n &:after {\n\n rotate: 45deg;\n }\n }\n\n &:before {\n transition: all ease-in-out 200ms;\n content: \"\";\n width: 15px;\n height: 1.5px;\n background-color: black;\n position: absolute;\n top: 30px;\n right: 15px;\n rotate: 45deg;\n }\n\n &:after {\n transition: all ease-in-out 200ms;\n content: \"\";\n width: 15px;\n height: 1.5px;\n background-color: black;\n position: absolute;\n top: 30px;\n right: 25px;\n rotate: -45deg;\n }\n }\n\n .formkitProperty {\n h4 {\n padding: 0;\n background-color: unset !important;\n\n &::before {\n display: none !important;\n }\n\n &:after {\n display: none !important;\n }\n }\n }\n}\n\n.dpiChevUp {\n\n &:before {\n\n rotate: -45deg !important;\n }\n\n &:after {\n\n rotate: 45deg !important;\n }\n\n\n\n}\n</style>\n"],"names":["_sfc_main","defineComponent","str","match","InputPageStep","DistributionInputPage","PropertyChooser","Navigation","mapGetters","key","has","title","allValues","isNil","mapActions","h4Elements","h4Element","index","initialSchema","stepWithDates","el","existingValues","isEmpty","$","elements","attributeChangedCallback","mutationsList","mutation","observer","config","allMatchingElements","element","matchingChildren","valueObject","property","to","from","next","vm","steps","activeStep","visitedSteps","previousStep","nextStep","stepPlugin","goToNextStep","goToPreviousStep","useDpiStepper","scrollToTop","x","y","useWindowScroll","checkStepValidity","stepName","library","markRaw","OverviewPage","_hoisted_1","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_createElementVNode","_hoisted_12","_hoisted_14","_hoisted_16","_hoisted_21","_openBlock","_createElementBlock","_ctx","_hoisted_2","_createVNode","_component_FormKit","_cache","$event","_withModifiers","_withCtx","_Fragment","_renderList","step","_normalizeClass","_toDisplayString","_createTextVNode","_createCommentVNode","_hoisted_10","_hoisted_11","_hoisted_13","_component_InputPageStep","_hoisted_15","_hoisted_17","_hoisted_18","_hoisted_19","_createBlock","_component_FormKitSchema","_component_DistributionInputPage","_hoisted_20","_component_Navigation"],"mappings":";;;;;;;;;;;;;AA8EA,MAAKA,IAAaC,EAAa;AAAA,EAC7B,OAAO;AAAA,IACL,UAAU;AAAA,MACR,UAAU;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IACD,IAAI;AAAA,MACF,MAAM;AAAA,IACP;AAAA,EACF;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,YAAY,CAAE;AAAA,MACd,kBAAkB;AAAA,MAClB,MAAM,CAAE;AAAA,MACR,YAAY,CAAE;AAAA,MACd,MAAM;AAAA,MACN,WAAW;AAAA;AAAA,MAEX,aAAa,CAACC,MACZA,EACG,QAAQ,YAAY,CAACC,MAAU,IAAIA,CAAK,EAAE,EAC1C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,wBAA7B0C,EACuBC,GAAA;AAAA,wBA5CzC,KAAA;AAAA,wBA2CsE,QAAQxB,EAAA,UAAUA,EAAA,QAAQ,EAAEnB,CAAQ;AAAA,wBACrF,SAASmB,EAAO;AAAA,4DA5CrCc,EAAA,IAAA,EAAA;AAAA,sBAAAD,EAAA;AAAA,sBA6C+ChC,MAAQ,wBAArC0C,EACyBE,GAAA;AAAA,wBA9C3C,KAAA;AAAA,wBA6C8E,QAAQzB,EAAS,UAAA,eAAA;AAAA,wBAC1E,QAAQA,EAAU;AAAA,2DA9CvCc,EAAA,IAAA,EAAA;AAAA,sBAAAD,EAAA;AAAA,sBA+CuChC,MAAQ,eAA7BiB,KAAAC,EAAsE,KAAtE2B,IAAsE;AAAA,wBAAtB7B;AAAA,wBA/ClEgB,EA+C0E,YAAU;AAAA,4BA/CpFC,EAAA,IAAA,EAAA;AAAA;oBAAA,GAAA;AAAA;;;;YAAAD,EAAA;AAAA,YAqDUX,EACoDyB,GAAA;AAAA,cADvC,OAAO3B,EAAK;AAAA,cAAG,UAAUA,EAAQ;AAAA,cAAG,cAAcA,EAAY;AAAA,cAAG,cAAcA,EAAY;AAAA,cACrG,kBAAkBA,EAAgB;AAAA;;UAtD/C,GAAA;AAAA;;eAAAc,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"InputPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/InputPage.vue"],"sourcesContent":["<template>\n <div class=\"form-container \">\n <div ref=\"fkInputContainer\" class=\"inputContainer\" v-if=\"isInput\">\n <div class=\"formContainer formkit position-relative\">\n\n <!-- <details>{{ formValues }}</details> -->\n <FormKit type=\"form\" v-model=\"formValues\" :actions=\"false\" :plugins=\"[stepPlugin]\" id=\"dpiForm\"\n @change=\"saveFormValues({ property: property, page: page, distid: id, values: formValues })\"\n @click=\"saveFormValues({ property: property, page: page, distid: id, values: formValues })\" @submit.prevent=\"\"\n class=\"d-flex\">\n\n <div class=\"d-flex\">\n <ul class=\"steps\">\n <li v-for=\"(step, stepName, index) in steps\" :key=\"step\" class=\"step\"\n :data-step-active=\"activeStep === stepName\" :data-step-valid=\"step.valid && step.errorCount === 0\"\n :class=\"{ activeItem: activeStep === stepName, inactiveStep: stepName != activeStep, 'has-errors': checkStepValidity(stepName) }\"\n @click=\"activeStep = stepName; update(); scrollToTop()\">\n\n <div class=\"stepBubbleWrap\">\n <div class=\"circle stepCircle\">{{ index + 1 }}</div>\n <span v-if=\"checkStepValidity(stepName)\" class=\"step--errors\"\n v-text=\"step.errorCount + step.blockingCount\" />{{ $t('message.dataupload.steps.' + stepName + \"Step\")\n }}\n </div>\n <div v-if=\"index != Object.keys(steps).length\" class=\"seperatorHorizontalStepper\"></div>\n </li>\n <li class=\"step inactiveStep\" v-if=\"activeStep === 'Overview'\">\n <div class=\"circle stepCircle\"></div>\n </li>\n\n </ul>\n\n <div class=\"d-flex flex-column w-100\">\n <div v-for=\"(stepName, index) in getNavSteps($env.content.dataProviderInterface.specification)[property]\"\n :key=\"index\">\n <InputPageStep :name=\"stepName\">\n <div v-if=\"stepName !== 'Distributions' && stepName !== 'Overview'\"\n class=\"w-100 d-flex justify-content-between\">\n <h1 style=\"min-width:80%\">{{ $t('message.dataupload.steps.' + stepName) }}</h1>\n <a class=\"standardButtonDPI\" @click=\"dropdownCLick(); expandall = !expandall\"><span\n v-if=\"expandall\">{{ $t('message.dataupload.info.expand') }}</span>\n <span v-else>{{ $t('message.dataupload.info.hide') }}</span></a>\n </div>\n <hr v-if=\"stepName !== 'Distributions'\">\n <FormKitSchema v-if=\"stepName !== 'Distributions'\" :schema=\"getSchema(property)[stepName]\"\n :library=\"library\" />\n <DistributionInputPage v-if=\"stepName === 'Distributions'\" :schema=\"getSchema('distributions')\"\n :values=\"formValues\" />\n <p class=\"p-1\" v-if=\"stepName === 'Mandatory'\"> <b>*</b> {{ $t('message.dataupload.info.mandatory') }}</p>\n </InputPageStep>\n </div>\n </div>\n </div>\n\n <Navigation :steps=\"steps\" :nextStep=\"nextStep\" :previousStep=\"previousStep\" :goToNextStep=\"goToNextStep\"\n :goToPreviousStep=\"goToPreviousStep\"></Navigation>\n\n </FormKit>\n\n </div>\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable no-alert,arrow-parens,no-param-reassign,no-lonely-if */\nimport { defineComponent, markRaw } from 'vue';\nimport { mapActions, mapGetters } from 'vuex';\nimport $ from 'jquery';\nimport PropertyChooser from './PropertyChooser.vue'\nimport { has, isNil, isEmpty } from 'lodash';\nimport DistributionInputPage from './DistributionInputPage.vue';\nimport OverviewPage from './OverviewPage.vue';\nimport InputPageStep from '../components/InputPageStep.vue';\nimport Navigation from '../components/Navigation.vue';\nimport { useDpiStepper } from '../composables/useDpiStepper';\nimport { useWindowScroll } from '@vueuse/core'\n\n\nexport default defineComponent({\n props: {\n property: {\n required: true,\n type: String,\n },\n id: {\n type: String,\n },\n },\n data() {\n return {\n heightActiveSec: \"10vh\",\n formValues: {},\n offsetTopStepper: \"60px\",\n info: {},\n catalogues: [],\n byte: true,\n expandall: true,\n // steps:{},\n camel2title: (str) =>\n str\n .replace(/([A-Z])/g, (match) => ` ${match}`)\n .replace(/^./, (match) => match.toUpperCase())\n .trim(),\n };\n },\n components: {\n InputPageStep,\n DistributionInputPage,\n PropertyChooser,\n Navigation\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n 'getUserCatalogIds',\n ]),\n ...mapGetters('dpiStore', [\n 'getSchema',\n 'getNavSteps',\n 'getDeleteDistributionInline',\n ]),\n getTitleStep() {\n return Object.keys(this.formValues).filter(key => has(this.formValues[key], 'dct:title'))[0];\n },\n createIDFromTitle() {\n\n const title = this.formValues[this.getTitleStep]['dct:title'][0]['@value'];\n\n if (title != undefined) {\n return title\n .toLowerCase()\n .replace(/ /g, '-');\n }\n else return;\n },\n getFirstTitleFromForm() {\n const allValues = this.formValues[this.getTitleStep];\n\n return has(allValues, 'dct:title')\n && allValues['dct:title'].length > 0\n && has(allValues['dct:title'][0], '@value')\n && !isNil(allValues['dct:title'][0], '@value')\n ? allValues['dct:title'][0]['@value']\n : '';\n },\n isInput() {\n return this.$route.params.page !== 'overview' && this.$route.params.page !== 'distoverview';\n },\n },\n methods: {\n ...mapActions('auth', [\n 'setIsEditMode',\n 'setIsDraft',\n ]),\n ...mapActions('dpiStore', [\n 'createSchema',\n 'translateSchema',\n 'saveFormValues',\n 'saveLocalstorageValues',\n 'addCatalogOptions',\n 'clearAll',\n ]),\n update() {\n this.$forceUpdate();\n },\n dropdownCLick() {\n\n const h4Elements = document.querySelectorAll('.formkitProperty h4');\n\n if (this.expandall) {\n h4Elements.forEach((h4Element, index) => {\n h4Element.classList.add('dpiChevUp')\n h4Element.nextElementSibling.classList.remove('d-none')\n })\n }\n if (!this.expandall) {\n h4Elements.forEach((h4Element, index) => {\n h4Element.classList.remove('dpiChevUp')\n h4Element.nextElementSibling.classList.add('d-none')\n })\n\n }\n\n },\n clearForm() {\n this.$formkit.reset('dpi')\n },\n scrollToTop() {\n window.scrollTo(0, 0);\n },\n initInputPage() {\n // adding validation of modified and issued based on edit mode\n // no validation in edit mode\n\n // get step name where issued and modified are included\n const initialSchema = this.getSchema(this.property);\n const stepWithDates = Object.keys(initialSchema).find(\n key => initialSchema[key].map(el => el.name).includes('dct:issued') || initialSchema[key].map(el => el.name).includes('dct:modified')\n );\n\n\n\n if (localStorage.getItem('dpi_editmode') === 'true' && stepWithDates != undefined) {\n initialSchema[stepWithDates].forEach((el) => {\n if (el['identifier'] === 'issued' || el['identifier'] === 'modified') {\n el['children'][1]['props']['else']['validation'] = ''\n el['children'][1]['props']['else']['validation-visibility'] = ''\n\n el['children'][1]['props']['then']['validation'] = ''\n el['children'][1]['props']['then']['validation-visibility'] = ''\n el['children'][1]['props']['then']['validation'] = ''\n el['children'][1]['props']['then']['validation-visibility'] = ''\n }\n }\n );\n }\n\n if (localStorage.getItem('dpi_editmode') === 'false') {\n this.setIsDraft(false)\n this.setIsEditMode(false)\n }\n\n this.saveLocalstorageValues(this.property); // saves values from localStorage to vuex store\n const existingValues = this.$store.getters['dpiStore/getRawValues']({ property: this.property });\n\n\n // only overwrite empty object if there are values\n if (!isEmpty(existingValues)) this.formValues = existingValues;\n\n\n\n this.$nextTick(() => {\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n setTimeout(() => {\n const h4Elements = document.querySelectorAll('.formkitProperty h4');\n h4Elements.forEach((h4Element, index) => {\n // Added the clickeffect to the headers of the individual properties\n\n if (!h4Element.parentElement.parentElement.classList.contains('formkitWrapRepeatable')) {\n if (index != 0 && index != 1 && index != 2 && index != 3) {\n h4Element.nextElementSibling.classList.toggle('d-none')\n }\n h4Element.addEventListener('click', () => {\n h4Element.classList.toggle('dpiChevUp')\n h4Element.nextElementSibling.classList.toggle('d-none')\n });\n }\n })\n // Observe the validity of the individual properties\n const elements = document.querySelectorAll('.formkitProperty');\n const attributeChangedCallback = (mutationsList) => {\n for (const mutation of mutationsList) {\n\n if (mutation.type === 'attributes') {\n if (mutation.target.getAttribute('data-invalid') === 'true') {\n try {\n if (mutation.target.parentNode.parentNode.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.parentNode.parentNode.previousElementSibling.classList.add('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.previousElementSibling.tagName === 'H4') {\n mutation.target.previousElementSibling.classList.add('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.previousElementSibling.classList.add('isInvalidProperty')\n }\n } catch (error) { }\n }\n if (mutation.target.getAttribute('data-invalid') === null || mutation.target.getAttribute('data-invalid') === 'false') {\n try {\n if (mutation.target.parentNode.parentNode.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.parentNode.parentNode.previousElementSibling.classList.remove('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.previousElementSibling.tagName === 'H4') {\n mutation.target.previousElementSibling.classList.remove('isInvalidProperty')\n }\n } catch (error) { }\n try {\n if (mutation.target.parentNode.previousElementSibling.tagName === 'H4') {\n mutation.target.parentNode.previousElementSibling.classList.remove('isInvalidProperty')\n }\n } catch (error) { }\n }\n }\n }\n };\n // MutationObserver \n const observer = new MutationObserver(attributeChangedCallback);\n const config = { attributes: true };\n let allMatchingElements = [];\n\n elements.forEach((element, index) => {\n const matchingChildren = element.querySelectorAll('.formkit-outer');\n allMatchingElements = allMatchingElements.concat(Array.from(matchingChildren));\n observer.observe(allMatchingElements[index], config);\n });\n });\n });\n },\n createDatasetID() {\n const valueObject = this.formValues[this.getTitleStep];\n if (!has(valueObject, 'datasetID') || isNil(valueObject['datasetID'])) {\n // console.log('in if');\n this.formValues[this.getTitleStep].datasetID = this.createIDFromTitle;\n }\n else {\n\n if (this.createIDFromTitle.startsWith(valueObject.datasetID) || valueObject.datasetID.startsWith(this.createIDFromTitle)) {\n // console.log('in else');\n this.formValues[this.getTitleStep].datasetID = this.createIDFromTitle;\n }\n }\n },\n generateandTranslateSchema(property) {\n for (let index = 0; index < this.getNavSteps(this.$env.content.dataProviderInterface.specification)[property].length; index++) {\n this.createSchema({ property: property, page: this.getNavSteps(this.$env.content.dataProviderInterface.specification)[property][index], specification: this.$env.content.dataProviderInterface.specification });\n this.translateSchema({ property: property, page: this.getNavSteps(this.$env.content.dataProviderInterface.specification)[property][index] });\n }\n },\n\n },\n created() {\n\n\n\n // Needs to be reworked\n if (this.$route.query.edit === 'false') {\n this.clearAll();\n // localStorage.clear();\n }\n\n // create schema for datasets or catalogues\n this.generateandTranslateSchema(this.property);\n\n // for datasets also create schema for distributions\n if (this.property === 'datasets') {\n this.generateandTranslateSchema('distributions');\n }\n },\n mounted() {\n this.initInputPage();\n },\n watch: {\n activeStep: {\n handler() {\n this.scrollToTop();\n },\n },\n getFirstTitleFromForm: {\n handler() {\n if (localStorage.getItem('dpi_editmode') === 'false') {\n this.setIsDraft(false)\n this.setIsEditMode(false)\n }\n // only create id from title if the user is not editing an existing dataset with an existing datasetID\n if (!this.getIsEditMode) {\n this.createDatasetID();\n }\n },\n },\n // the schema is a computed value which gets computed only once so on language change this value must be re-computed\n '$i18n.locale': {\n handler() {\n this.generateandTranslateSchema(this.property);\n if (this.property === 'datasets') this.generateandTranslateSchema('distributions');\n }\n },\n },\n beforeRouteEnter(to, from, next) {\n // Always clear storage when entering DPI\n next(vm => {\n if (from.name && !from.name.startsWith('DataProviderInterface')) {\n vm.clearAll();\n }\n });\n },\n setup() {\n const {\n steps,\n activeStep,\n visitedSteps,\n previousStep,\n nextStep,\n stepPlugin,\n goToNextStep,\n goToPreviousStep,\n } = useDpiStepper();\n\n const scrollToTop = () => {\n let { x, y } = useWindowScroll({ behavior: 'smooth' })\n y.value = 0\n\n }\n\n const checkStepValidity = (stepName) => {\n return (steps[stepName].errorCount > 0 || steps[stepName].blockingCount > 0) && visitedSteps.value.includes(stepName)\n }\n\n const library = markRaw({ OverviewPage })\n\n return {\n steps,\n visitedSteps,\n activeStep,\n previousStep,\n nextStep,\n stepPlugin,\n checkStepValidity,\n goToNextStep,\n goToPreviousStep,\n scrollToTop,\n library,\n }\n }\n});\n</script>\n\n<style lang=\"scss\">\n.standardButtonDPI {\n background-color: #fff;\n color: #000;\n border-radius: 0.3em;\n font-size: 16px;\n padding: 0.75em;\n display: inline-flex;\n align-items: center;\n height: 50px;\n border: 1px solid lightgray;\n transition: all 100ms ease-in-out;\n cursor: pointer;\n\n &:hover {\n transform: scale(98%);\n background-color: #F4F4F4;\n border-color: gray;\n text-decoration: none;\n }\n}\n\n:root {\n --gray: #ccccd7;\n --gray-l: #eeeef4;\n}\n\n.formkit-form {\n max-width: 500px;\n flex-shrink: 0;\n margin-top: 1em;\n margin-bottom: 1em;\n background: #fff;\n color: #000;\n border: 1px solid var(--gray);\n border-radius: 0.5em;\n box-shadow: 0.25em 0.25em 1em 0 rgba(0, 0, 0, 0.1);\n}\n\n#app .source-content {\n padding: 2em;\n background: transparent;\n}\n\n.steps {\n list-style-type: none;\n margin: 0;\n display: flex;\n padding-left: 0;\n background: var(--gray-l);\n border-radius: 0.4em 0.4em 0 0;\n overflow: hidden;\n border-bottom: 1px solid var(--gray);\n}\n\n.step {\n font-size: 14px;\n display: flex;\n align-items: center;\n padding: 16px 20px;\n background: var(--gray-l);\n border-right: 1px solid var(--gray);\n color: gray;\n flex-grow: 0;\n flex-shrink: 0;\n position: relative;\n}\n\n.step:last-child {\n box-shadow: 0.1em -0.1 0.1em 0 rgba(0, 0, 0, 0.33)\n}\n\n.step:hover {\n cursor: pointer;\n}\n\n[data-step-active=\"true\"] {\n color: black;\n background: white !important;\n border-bottom: none;\n position: relative;\n}\n\n.step--errors,\n[data-step-valid=\"true\"]:after {\n content: '✓';\n background-color: #54A085;\n position: absolute;\n top: 4px;\n right: 4px;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n z-index: 10;\n display: flex;\n font-size: 10px;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n color: white;\n}\n\n.step--errors {\n background-color: #ff4949;\n color: #fff;\n z-index: 100;\n}\n\n.step-nav {\n display: flex;\n margin-top: 2em;\n margin-bottom: 1em;\n justify-content: space-between;\n}\n\n.form-body {\n padding: 2em;\n}\n\n.next {\n margin-left: auto;\n}\n\n.formkit-outer[data-type=\"submit\"] .formkit-wrapper {\n padding: 0 2em 1em 2em;\n display: flex;\n}\n\n.formkit-outer[data-type=\"submit\"] .formkit-input {\n margin-left: auto;\n margin-right: 0;\n}\n\ndetails {\n border: 1px solid var(--gray);\n background: var(--gray-l);\n border-radius: .15em;\n padding: 1em;\n}\n\n.formkit-form>.formkit-messages {\n padding: 0 2em 0em 2em;\n}\n\n.formkit-form>.formkit-messages:last-child {\n padding: 0 2em 2em 2em;\n}\n\n[data-errors=\"true\"] .formkit-label {\n color: #ff4949;\n}\n\n.formkit-wrapper {\n max-width: 100%;\n}\n\nbutton:hover,\nsummary {\n cursor: pointer\n}\n\n\n@media (max-width: 438px) {\n h1 {\n font-size: 1.15em;\n }\n\n #app .source-content {\n padding: 0.5em;\n }\n\n .steps {\n flex-direction: column;\n }\n\n .step {\n border-bottom: 1px solid var(--gray);\n border-right: none;\n }\n\n .step:last-child {\n border-bottom: none;\n }\n\n .form-body {\n padding: 1em;\n }\n\n .formkit-outer[data-type=\"submit\"] .formkit-wrapper {\n padding: 0 1em 1em 1em;\n display: flex;\n }\n\n .formkit-form>.formkit-messages {\n padding: 0 1em 0em 1em;\n }\n\n .formkit-form>.formkit-messages:last-child {\n padding: 0 1em 1em 1em;\n }\n}\n\n.repeatableWrap,\n.formkitCmpWrap {\n margin: 2rem 0 !important\n}\n\n.isInvalidProperty {\n background-color: #FFD9D9 !important;\n}\n\n.activeItem {\n flex-grow: 1;\n\n .seperatorHorizontalStepper {\n height: 100%;\n }\n}\n\nselect {\n\n line-height: unset !important;\n}\n\n.form-container {\n padding-top: 20px;\n margin-top: 30px;\n border: solid 1px #d5d5d5;\n border-radius: 3px;\n margin-bottom: 20px;\n}\n\n.inputContainer {\n display: flex;\n}\n\n.formContainer {\n width: 100% !important;\n}\n\n.distributionPage0 {\n display: block;\n}\n\n.distributionPage1 {\n display: none;\n}\n\n.distributionPage2 {\n display: none;\n}\n\n.grid2r2c {\n .formkit-input-group-repeatable {\n display: grid;\n grid-template-columns: 70% 28%;\n grid-template-rows: auto auto;\n grid-gap: 10px;\n background-color: transparent;\n }\n}\n\n.grid1r2c {\n .formkit-input-group-repeatable {\n display: grid;\n grid-template-columns: 70% 28%;\n grid-template-rows: auto;\n grid-gap: 10px;\n background-color: transparent;\n }\n}\n\n.row1 {\n grid-row-start: 1;\n grid-row-end: 2;\n}\n\n.row2 {\n grid-row-start: 2;\n grid-row-end: 3;\n}\n\n.grow3 {\n grid-row-start: 3;\n grid-row-end: 4;\n}\n\n.column1 {\n grid-column-start: 1;\n grid-column-end: 2;\n}\n\n.column2 {\n grid-column-start: 2;\n grid-column-end: 3;\n}\n\n.columnboth {\n grid-column-start: 1;\n grid-column-end: 3;\n}\n\n.display-none {\n display: none;\n}\n\n.activeSection {\n >.formkitProperty {\n >div {}\n }\n}\n\n.formkitCmpWrap {\n border-left: 1px solid lightgray;\n\n\n}\n\n.formkitProperty {\n\n >h4 {\n background-color: #f5f5f5;\n padding: 1rem;\n cursor: pointer;\n position: relative;\n transition: all ease-in-out 200ms;\n\n &:hover {\n\n background-color: lightgray;\n\n &:before {\n\n rotate: -45deg;\n }\n\n &:after {\n\n rotate: 45deg;\n }\n }\n\n &:before {\n transition: all ease-in-out 200ms;\n content: \"\";\n width: 15px;\n height: 1.5px;\n background-color: black;\n position: absolute;\n top: 30px;\n right: 15px;\n rotate: 45deg;\n }\n\n &:after {\n transition: all ease-in-out 200ms;\n content: \"\";\n width: 15px;\n height: 1.5px;\n background-color: black;\n position: absolute;\n top: 30px;\n right: 25px;\n rotate: -45deg;\n }\n }\n\n .formkitProperty {\n h4 {\n padding: 0;\n background-color: unset !important;\n\n &::before {\n display: none !important;\n }\n\n &:after {\n display: none !important;\n }\n }\n }\n}\n\n.dpiChevUp {\n\n &:before {\n\n rotate: -45deg !important;\n }\n\n &:after {\n\n rotate: 45deg !important;\n }\n\n\n\n}\n</style>\n"],"names":["_sfc_main","defineComponent","str","match","InputPageStep","DistributionInputPage","PropertyChooser","Navigation","mapGetters","key","has","title","allValues","isNil","mapActions","h4Elements","h4Element","index","initialSchema","stepWithDates","el","existingValues","isEmpty","$","elements","attributeChangedCallback","mutationsList","mutation","observer","config","allMatchingElements","element","matchingChildren","valueObject","property","to","from","next","vm","steps","activeStep","visitedSteps","previousStep","nextStep","stepPlugin","goToNextStep","goToPreviousStep","useDpiStepper","scrollToTop","x","y","useWindowScroll","checkStepValidity","stepName","library","markRaw","OverviewPage","_hoisted_1","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_createElementVNode","_hoisted_12","_hoisted_14","_hoisted_16","_hoisted_21","_openBlock","_createElementBlock","_ctx","_hoisted_2","_createVNode","_component_FormKit","_cache","$event","_withModifiers","_withCtx","_Fragment","_renderList","step","_normalizeClass","_toDisplayString","_createTextVNode","_createCommentVNode","_hoisted_10","_hoisted_11","_hoisted_13","_component_InputPageStep","_hoisted_15","_hoisted_17","_hoisted_18","_hoisted_19","_createBlock","_component_FormKitSchema","_component_DistributionInputPage","_hoisted_20","_component_Navigation"],"mappings":";;;;;;;;;;;;;AA+EA,MAAKA,IAAaC,EAAa;AAAA,EAC7B,OAAO;AAAA,IACL,UAAU;AAAA,MACR,UAAU;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IACD,IAAI;AAAA,MACF,MAAM;AAAA,IACP;AAAA,EACF;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,YAAY,CAAE;AAAA,MACd,kBAAkB;AAAA,MAClB,MAAM,CAAE;AAAA,MACR,YAAY,CAAE;AAAA,MACd,MAAM;AAAA,MACN,WAAW;AAAA;AAAA,MAEX,aAAa,CAACC,MACZA,EACG,QAAQ,YAAY,CAACC,MAAU,IAAIA,CAAK,EAAE,EAC1C,QAAQ,MAAM,CAACA,MAAUA,EAAM,YAAW,CAAE,EAC5C,KAAM;AAAA;EAEd;AAAA,EACD,YAAY;AAAA,mBACVC;AAAAA,IACA,uBAAAC;AAAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAGA,EAAW,YAAY;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,eAAe;AACb,aAAO,OAAO,KAAK,KAAK,UAAU,EAAE,OAAO,CAAAC,MAAOC,EAAI,KAAK,WAAWD,CAAG,GAAG,WAAW,CAAC,EAAE,CAAC;AAAA,IAC5F;AAAA,IACD,oBAAoB;AAElB,YAAME,IAAQ,KAAK,WAAW,KAAK,YAAY,EAAE,WAAW,EAAE,CAAC,EAAE,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B,EAgD0E,QAAIb,EAAE,GAAA,mCAAA,CAAA,GAAA,CAAA;AAAA,4BAhDhFc,EAAA,IAAA,EAAA;AAAA;oBAAA,GAAA;AAAA;;;;YAAAD,EAAA;AAAA,YAsDUX,EACoDyB,GAAA;AAAA,cADvC,OAAO3B,EAAK;AAAA,cAAG,UAAUA,EAAQ;AAAA,cAAG,cAAcA,EAAY;AAAA,cAAG,cAAcA,EAAY;AAAA,cACrG,kBAAkBA,EAAgB;AAAA;;UAvD/C,GAAA;AAAA;;eAAAc,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { getCurrentInstance as b, ref as
|
|
1
|
+
import { getCurrentInstance as b, ref as D, computed as I, onMounted as N, openBlock as l, createElementBlock as r, createElementVNode as i, toDisplayString as n, createTextVNode as o, Fragment as m, renderList as p, unref as u, createVNode as f, withCtx as g, createCommentVNode as $ } from "vue";
|
|
2
2
|
import { useStore as q } from "vuex";
|
|
3
3
|
import h from "../../widgets/AppLink.vue.mjs";
|
|
4
|
-
import
|
|
4
|
+
import w from "axios";
|
|
5
5
|
import { has as _, isNil as v } from "lodash-es";
|
|
6
6
|
import "./UserCataloguesPage.vue2.mjs";
|
|
7
|
-
const
|
|
7
|
+
const x = { class: "catOverview" }, L = { class: "d-flex flex-column bg-transparent container-fluid justify-content-between content" }, V = { class: "small-headline" }, j = { class: "m-0" }, E = { class: "catWrap" }, M = {
|
|
8
8
|
__name: "UserCataloguesPage",
|
|
9
9
|
setup(U) {
|
|
10
|
-
let
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
let
|
|
14
|
-
await
|
|
10
|
+
let C = b().appContext.app.config.globalProperties.$env;
|
|
11
|
+
const y = q();
|
|
12
|
+
let a = D([]), d = I(() => y.getters["auth/getUserCatalogIds"]), k = async () => {
|
|
13
|
+
let t;
|
|
14
|
+
await w.get(C.api.baseUrl + "search?filter=catalogue&limit=1000").then((e) => t = e).catch((e) => {
|
|
15
15
|
reject(e);
|
|
16
|
-
}),
|
|
17
|
-
_(e, "title") && !v(e.title) && _(e, "id") && !v(e.id) &&
|
|
18
|
-
}),
|
|
16
|
+
}), t.data.result.results.forEach((e) => {
|
|
17
|
+
_(e, "title") && !v(e.title) && _(e, "id") && !v(e.id) && a.value.push({ title: Object.values(e.title)[0], id: e.id });
|
|
18
|
+
}), a.value = a.value.filter((e) => d.value.includes(e.id)).map((e) => ({ id: e.id, name: e.title }));
|
|
19
19
|
};
|
|
20
|
-
return
|
|
20
|
+
return N(async () => {
|
|
21
21
|
k();
|
|
22
|
-
}), (
|
|
23
|
-
i("div",
|
|
24
|
-
|
|
22
|
+
}), (t, e) => (l(), r("div", x, [
|
|
23
|
+
i("div", L, [
|
|
24
|
+
i("h1", V, n(t.$t("message.dataupload.info.userCatalogues")), 1),
|
|
25
25
|
o(),
|
|
26
|
-
|
|
26
|
+
i("p", j, n(t.$t("message.dataupload.info.userCatDescription")), 1),
|
|
27
27
|
o(),
|
|
28
|
-
i("div",
|
|
29
|
-
(
|
|
30
|
-
key:
|
|
28
|
+
i("div", E, [
|
|
29
|
+
(l(!0), r(m, null, p(u(a), (s, c) => (l(), r("div", {
|
|
30
|
+
key: c,
|
|
31
31
|
class: "annifItems"
|
|
32
32
|
}, [
|
|
33
|
-
|
|
34
|
-
to: { name: "CatalogueDetails", query: { locale:
|
|
33
|
+
f(h, {
|
|
34
|
+
to: { name: "CatalogueDetails", query: { locale: t.$route.query.locale }, params: { ctlg_id: s.id } }
|
|
35
35
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
o(
|
|
36
|
+
default: g(() => [
|
|
37
|
+
o(n(s.name), 1)
|
|
38
38
|
]),
|
|
39
39
|
_: 2
|
|
40
40
|
}, 1032, ["to"])
|
|
41
41
|
]))), 128)),
|
|
42
42
|
o(),
|
|
43
|
-
|
|
44
|
-
key:
|
|
43
|
+
u(a).length === 0 ? (l(!0), r(m, { key: 0 }, p(u(d), (s, c) => (l(), r("div", {
|
|
44
|
+
key: c,
|
|
45
45
|
class: "annifItems"
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
to: { name: "CatalogueDetails", query: { locale:
|
|
47
|
+
f(h, {
|
|
48
|
+
to: { name: "CatalogueDetails", query: { locale: t.$route.query.locale }, params: { ctlg_id: s } }
|
|
49
49
|
}, {
|
|
50
|
-
default:
|
|
51
|
-
o(
|
|
50
|
+
default: g(() => [
|
|
51
|
+
o(n(s), 1)
|
|
52
52
|
]),
|
|
53
53
|
_: 2
|
|
54
54
|
}, 1032, ["to"])
|
|
55
|
-
]))), 128)) :
|
|
55
|
+
]))), 128)) : $("", !0)
|
|
56
56
|
])
|
|
57
57
|
])
|
|
58
58
|
]));
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
M as default
|
|
63
63
|
};
|
|
64
64
|
//# sourceMappingURL=UserCataloguesPage.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserCataloguesPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/UserCataloguesPage.vue"],"sourcesContent":["<script setup>\nimport { useStore } from 'vuex';\nimport { ref, computed, onMounted, } from 'vue';\nimport AppLink from \"../../widgets/AppLink.vue\";\nimport axios from 'axios'\nimport { getCurrentInstance } from \"vue\";\nimport {\n has,\n isNil,\n} from 'lodash-es';\n\nlet env = getCurrentInstance().appContext.app.config.globalProperties.$env;\nconst store = useStore();\nlet filteredCatalogs = ref([])\nlet userCatIDList = computed(() => store.getters['auth/getUserCatalogIds'])\n\nlet filterCatList = async () => {\n let cache;\n await axios\n .get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n .then(response => (cache = response))\n .catch((err) => {\n reject(err);\n });\n\n cache.data.result.results.forEach((e) => {\n if (has(e, 'title') && !isNil(e.title) && has(e, 'id') && !isNil(e.id)) filteredCatalogs.value.push({ title: Object.values(e.title)[0], id: e.id })\n });\n\n filteredCatalogs.value = filteredCatalogs.value\n .filter(item => userCatIDList.value.includes(item.id))\n .map(item => ({ id: item.id, name: item.title }));\n}\nonMounted(async () => {\n filterCatList()\n});\n</script>\n<template>\n <div class=\"catOverview\">\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between content \">\n <h1 class=\"small-headline\">
|
|
1
|
+
{"version":3,"file":"UserCataloguesPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/UserCataloguesPage.vue"],"sourcesContent":["<script setup>\nimport { useStore } from 'vuex';\nimport { ref, computed, onMounted, } from 'vue';\nimport AppLink from \"../../widgets/AppLink.vue\";\nimport axios from 'axios'\nimport { getCurrentInstance } from \"vue\";\nimport {\n has,\n isNil,\n} from 'lodash-es';\n\nlet env = getCurrentInstance().appContext.app.config.globalProperties.$env;\nconst store = useStore();\nlet filteredCatalogs = ref([])\nlet userCatIDList = computed(() => store.getters['auth/getUserCatalogIds'])\n\nlet filterCatList = async () => {\n let cache;\n await axios\n .get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n .then(response => (cache = response))\n .catch((err) => {\n reject(err);\n });\n\n cache.data.result.results.forEach((e) => {\n if (has(e, 'title') && !isNil(e.title) && has(e, 'id') && !isNil(e.id)) filteredCatalogs.value.push({ title: Object.values(e.title)[0], id: e.id })\n });\n\n filteredCatalogs.value = filteredCatalogs.value\n .filter(item => userCatIDList.value.includes(item.id))\n .map(item => ({ id: item.id, name: item.title }));\n}\nonMounted(async () => {\n filterCatList()\n});\n</script>\n<template>\n <div class=\"catOverview\">\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between content \">\n <h1 class=\"small-headline\">{{ $t('message.dataupload.info.userCatalogues') }}</h1>\n <p class=\"m-0 \">{{ $t('message.dataupload.info.userCatDescription') }}</p>\n <div class=\"catWrap\">\n <div v-for=\"(catalog, index) in filteredCatalogs\" :key=\"index\" class=\"annifItems \">\n <app-link\n :to=\"{ name: 'CatalogueDetails', query: { locale: $route.query.locale }, params: { ctlg_id: catalog.id } }\">{{\n catalog.name }}</app-link>\n </div>\n <div v-if=\"filteredCatalogs.length === 0\" v-for=\"(catalog, index) in userCatIDList\" :key=\"index\" class=\"annifItems \">\n <app-link\n :to=\"{ name: 'CatalogueDetails', query: { locale: $route.query.locale }, params: { ctlg_id: catalog } }\">{{\n catalog }}</app-link>\n </div>\n </div>\n </div>\n </div>\n\n</template>\n<style>\n.catOverview {\n min-height: 60vh;\n}\n\n.catWrap {\n display: flex;\n flex-wrap: wrap;\n margin-top: 10px;\n padding-top: 10px;\n border-top: 1px solid lightgray;\n justify-content: space-between;\n}\n\n.catWrap .annifItems {\n background: #ECECEC;\n flex-grow: 1;\n text-align: center;\n}\n\n.subline {\n font-size: 12px;\n color: lightgray;\n\n}\n</style>"],"names":["env","getCurrentInstance","store","useStore","filteredCatalogs","ref","userCatIDList","computed","filterCatList","cache","axios","response","err","has","isNil","item","onMounted"],"mappings":";;;;;;;;;AAWA,QAAIA,IAAMC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AACtE,UAAMC,IAAQC,EAAQ;AACtB,QAAIC,IAAmBC,EAAI,EAAE,GACzBC,IAAgBC,EAAS,MAAML,EAAM,QAAQ,wBAAwB,CAAC,GAEtEM,IAAgB,YAAY;AAC9B,UAAIC;AACJ,YAAMC,EACH,IAAIV,EAAI,IAAI,UAAU,oCAAoC,EAC1D,KAAK,CAAAW,MAAaF,IAAQE,CAAS,EACnC,MAAM,CAACC,MAAQ;AACd,eAAOA,CAAG;AAAA,MAChB,CAAK,GAEHH,EAAM,KAAK,OAAO,QAAQ,QAAQ,CAAC,MAAM;AACvC,QAAII,EAAI,GAAG,OAAO,KAAK,CAACC,EAAM,EAAE,KAAK,KAAKD,EAAI,GAAG,IAAI,KAAK,CAACC,EAAM,EAAE,EAAE,KAAGV,EAAiB,MAAM,KAAK,EAAE,OAAO,OAAO,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAE,CAAE;AAAA,MACtJ,CAAG,GAEDA,EAAiB,QAAQA,EAAiB,MACvC,OAAO,CAAAW,MAAQT,EAAc,MAAM,SAASS,EAAK,EAAE,CAAC,EACpD,IAAI,CAAAA,OAAS,EAAE,IAAIA,EAAK,IAAI,MAAMA,EAAK,MAAO,EAAC;AAAA,IACpD;AACA,WAAAC,EAAU,YAAY;AACpB,MAAAR,EAAe;AAAA,IACjB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|