@piveau/dpi 0.1.0-beta.72 → 0.1.0-beta.74
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/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +58 -50
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +23 -22
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +32 -30
- package/package.json +2 -2
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as d, getCurrentInstance as
|
|
1
|
+
import { ref as d, getCurrentInstance as _, onMounted as P, computed as z, watch as h, createElementBlock as g, openBlock as c, Fragment as w, createCommentVNode as V, renderList as W, unref as r, normalizeClass as $, createVNode as k, createBlock as A } from "vue";
|
|
2
2
|
import { getLanguages as N } from "../../services/dpiV3_apis.js";
|
|
3
3
|
import U from "../Dropdown.vue.js";
|
|
4
4
|
import q from "../ButtonV3.vue.js";
|
|
@@ -18,69 +18,77 @@ const Q = {
|
|
|
18
18
|
inOverview: { type: Boolean, default: !1 }
|
|
19
19
|
},
|
|
20
20
|
emits: ["addLanguage", "deleteButtonClicked"],
|
|
21
|
-
setup(v, { emit:
|
|
22
|
-
const
|
|
23
|
-
let
|
|
24
|
-
const { formValues:
|
|
25
|
-
|
|
26
|
-
}, b =
|
|
21
|
+
setup(v, { emit: y }) {
|
|
22
|
+
const u = v;
|
|
23
|
+
let t = d([{ label: "", "@value": "", uri: "" }]), o = {};
|
|
24
|
+
const { formValues: C } = H(), { t: f } = E(), B = () => {
|
|
25
|
+
t.value.push({});
|
|
26
|
+
}, b = _(), L = b.appContext.app.config.globalProperties.$env, I = b.appContext.app.config.globalProperties.$i18n.locale;
|
|
27
27
|
let p = d([]);
|
|
28
|
-
|
|
29
|
-
(e) => e.id ===
|
|
30
|
-
) || {},
|
|
28
|
+
o = C.value.DistributionSimple["dcat:distribution"].find(
|
|
29
|
+
(e) => e.id === u.distributionId
|
|
30
|
+
) || {}, P(async () => {
|
|
31
31
|
var e;
|
|
32
|
-
|
|
32
|
+
o["dct:language"].length > 0 && (t.value = o["dct:language"]), p.value = (e = o["dct:language"]) == null ? void 0 : e.map((l) => l.label);
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
35
|
-
s.value =
|
|
36
|
-
"@value":
|
|
37
|
-
label:
|
|
38
|
-
uri:
|
|
34
|
+
const l = await N(L.api.baseUrl, I);
|
|
35
|
+
s.value = l.map((a) => ({
|
|
36
|
+
"@value": a.label,
|
|
37
|
+
label: a.label,
|
|
38
|
+
uri: a.uri
|
|
39
39
|
}));
|
|
40
|
-
} catch (
|
|
41
|
-
console.error("Failed to load language data",
|
|
40
|
+
} catch (l) {
|
|
41
|
+
console.error("Failed to load language data", l);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
const s = d([]);
|
|
45
|
-
let
|
|
46
|
-
console.log("Titelliste",
|
|
47
|
-
const
|
|
48
|
-
|
|
45
|
+
let O = d(p);
|
|
46
|
+
console.log("Titelliste", O);
|
|
47
|
+
const F = y, T = (e, l) => {
|
|
48
|
+
t.value.length > 1 ? (t.value[l] = {
|
|
49
|
+
"@value": e,
|
|
49
50
|
label: e,
|
|
50
|
-
uri: s.value.find((
|
|
51
|
-
},
|
|
51
|
+
uri: s.value.find((a) => a["@value"] === e).uri || ""
|
|
52
|
+
}, console.log(o["dct:language"], t.value), o["dct:language"] = t.value, console.log(o["dct:language"], t.value)) : (t.value[0] = {
|
|
52
53
|
"@value": e,
|
|
53
|
-
uri: s.value.find((
|
|
54
|
-
},
|
|
54
|
+
uri: s.value.find((a) => a["@value"] === e).uri || ""
|
|
55
|
+
}, o["dct:language"][0] = t.value[0], s.value.find((a) => a["@value"] === e).uri);
|
|
55
56
|
}, m = d(""), x = (e) => {
|
|
56
57
|
m.value = e, console.log(m);
|
|
57
|
-
},
|
|
58
|
+
}, D = z(() => s.value.filter(
|
|
58
59
|
(e) => {
|
|
59
|
-
var
|
|
60
|
-
return (i = (
|
|
60
|
+
var l, a, n, i;
|
|
61
|
+
return (i = (l = e["@value"]) == null ? void 0 : l.toLowerCase()) == null ? void 0 : i.trim().startsWith((n = (a = m.value) == null ? void 0 : a.toLowerCase()) == null ? void 0 : n.trim());
|
|
61
62
|
}
|
|
62
63
|
));
|
|
63
|
-
|
|
64
|
-
() =>
|
|
64
|
+
h(
|
|
65
|
+
() => o["dct:language"],
|
|
66
|
+
(e) => {
|
|
67
|
+
t.value = o["dct:language"];
|
|
68
|
+
},
|
|
69
|
+
{ deep: !0 }
|
|
70
|
+
), h(
|
|
71
|
+
() => u.languageText,
|
|
65
72
|
(e) => {
|
|
66
73
|
p.value = e;
|
|
67
74
|
}
|
|
68
75
|
);
|
|
69
|
-
const
|
|
70
|
-
console.log("delete clicked"),
|
|
76
|
+
const S = () => {
|
|
77
|
+
console.log("delete clicked"), F("deleteButtonClicked", u.distributionId);
|
|
71
78
|
};
|
|
72
|
-
return (e,
|
|
73
|
-
(c(!0), g(
|
|
79
|
+
return (e, l) => (c(), g(w, null, [
|
|
80
|
+
(c(!0), g(w, null, W(r(t), (a, n) => (c(), g("div", {
|
|
74
81
|
class: $([{
|
|
75
|
-
repeatableOuter: !
|
|
76
|
-
dpiV3AutoCompleteWrap: !
|
|
77
|
-
}, "langDropdown"])
|
|
82
|
+
repeatableOuter: !u.inOverview,
|
|
83
|
+
dpiV3AutoCompleteWrap: !u.inOverview
|
|
84
|
+
}, "langDropdown"]),
|
|
85
|
+
key: n
|
|
78
86
|
}, [
|
|
79
|
-
|
|
80
|
-
"onUpdate:modelValue": [(i) =>
|
|
87
|
+
k(U, {
|
|
88
|
+
"onUpdate:modelValue": [(i) => T(i, n), (i) => r(t)[n].label = i],
|
|
81
89
|
dropdownWidth: "large",
|
|
82
90
|
type: "inputField",
|
|
83
|
-
modelValue: r(
|
|
91
|
+
modelValue: r(t)[n].label,
|
|
84
92
|
inputFieldProps: {
|
|
85
93
|
addOnText: !1,
|
|
86
94
|
initialHintText: !1,
|
|
@@ -95,29 +103,29 @@ const Q = {
|
|
|
95
103
|
"message.dataupload.datasets.dcat:distribution.advanced.language-placeholder"
|
|
96
104
|
),
|
|
97
105
|
inputFieldSize: "large",
|
|
98
|
-
modelValue: r(p)[
|
|
106
|
+
modelValue: r(p)[n],
|
|
99
107
|
defaultInput: !v.showDeleteButton
|
|
100
108
|
},
|
|
101
|
-
data:
|
|
102
|
-
onDeleteDropdownField:
|
|
109
|
+
data: D.value,
|
|
110
|
+
onDeleteDropdownField: S,
|
|
103
111
|
onInput: x
|
|
104
112
|
}, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data"]),
|
|
105
|
-
|
|
113
|
+
u.inOverview ? V("", !0) : (c(), A(M, {
|
|
106
114
|
key: 0,
|
|
107
115
|
"button-text": "Löschen",
|
|
108
116
|
class: "rightAlign",
|
|
109
117
|
iconStart: "trash",
|
|
110
|
-
onClick: (i) => r(
|
|
118
|
+
onClick: (i) => r(t).splice(n, 1)
|
|
111
119
|
}, null, 8, ["onClick"]))
|
|
112
|
-
], 2))),
|
|
113
|
-
|
|
114
|
-
|
|
120
|
+
], 2))), 128)),
|
|
121
|
+
u.inOverview ? V("", !0) : (c(), g("div", Q, [
|
|
122
|
+
k(q, {
|
|
115
123
|
buttonText: "Weitere hinzufügen",
|
|
116
124
|
size: "large",
|
|
117
125
|
iconStart: "plus",
|
|
118
126
|
variant: "tertiary",
|
|
119
127
|
class: "mt-3",
|
|
120
|
-
onClick:
|
|
128
|
+
onClick: l[0] || (l[0] = (a) => B())
|
|
121
129
|
})
|
|
122
130
|
]))
|
|
123
131
|
], 64));
|
package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as E, getCurrentInstance as
|
|
1
|
+
import { ref as E, getCurrentInstance as Ve, reactive as Re, watch as Be, computed as me, resolveComponent as Q, createElementBlock as k, openBlock as s, Fragment as Z, createVNode as y, createCommentVNode as c, withCtx as J, createTextVNode as Se, toDisplayString as T, createBlock as g, renderList as X, unref as $, createElementVNode as R, isRef as ie } from "vue";
|
|
2
2
|
import le from "../ButtonV3.vue.js";
|
|
3
3
|
import I from "../InputField.vue.js";
|
|
4
4
|
import ce from "../TextAreaV3.vue.js";
|
|
@@ -41,7 +41,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
41
41
|
},
|
|
42
42
|
setup(e, { emit: de }) {
|
|
43
43
|
const ne = de;
|
|
44
|
-
let K = E([{}]), B = E([]), C = E(!1), P = E(), re =
|
|
44
|
+
let K = E([{}]), B = E([]), C = E(!1), P = E(), re = Ve().appContext.app.config.globalProperties.$env;
|
|
45
45
|
const { formValues: D } = Le(), a = Re({}), r = E([]), A = e;
|
|
46
46
|
Be(
|
|
47
47
|
() => {
|
|
@@ -99,8 +99,8 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
99
99
|
if (!U.trim() || !h(U))
|
|
100
100
|
return a[l] = "Bitte geben Sie eine gültige URL ein.", !1;
|
|
101
101
|
case "isVersionOf":
|
|
102
|
-
const
|
|
103
|
-
if (!
|
|
102
|
+
const V = t["@id"] || "";
|
|
103
|
+
if (!V.trim() || !h(V))
|
|
104
104
|
return a[l] = "Bitte geben Sie eine gültige URL ein.", !1;
|
|
105
105
|
break;
|
|
106
106
|
case "isReferencedBy":
|
|
@@ -182,7 +182,8 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
182
182
|
"hasVersion",
|
|
183
183
|
"isVersionOf",
|
|
184
184
|
"isReferencedBy",
|
|
185
|
-
"references"
|
|
185
|
+
"references",
|
|
186
|
+
"wasGeneratedBy"
|
|
186
187
|
].includes(n) && r.value.forEach((l, m) => {
|
|
187
188
|
Y(l, m) || (t = !1);
|
|
188
189
|
}), t;
|
|
@@ -207,7 +208,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
207
208
|
r.value[n] || (r.value[n] = {}), r.value[n]["@value"] = t.pref_label.de || t.pref_label.en, r.value[n].uri = t.resource, setTimeout(() => {
|
|
208
209
|
Y(r.value[n], n);
|
|
209
210
|
}, 0);
|
|
210
|
-
},
|
|
211
|
+
}, w = (t, n, u, l) => {
|
|
211
212
|
var v;
|
|
212
213
|
const m = typeof t == "string" ? t : ((v = t == null ? void 0 : t.target) == null ? void 0 : v.value) ?? "";
|
|
213
214
|
r.value[u] || (r.value[u] = {}), n === "dct:issued" ? r.value[u][l] = $e(m) : r.value[u][l] = m, m != "" && (K.value[0][n] = m), l === "@id" && m != "" && (K.value[0][n] = "https://" + m), setTimeout(() => {
|
|
@@ -254,7 +255,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
254
255
|
console.log(m);
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
|
-
},
|
|
258
|
+
}, we = () => {
|
|
258
259
|
if (!ge())
|
|
259
260
|
return;
|
|
260
261
|
const t = r.value.filter(
|
|
@@ -281,7 +282,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
281
282
|
(i) => i.$formkit !== "group"
|
|
282
283
|
), (i, b) => (s(), g(l, { key: b }, {
|
|
283
284
|
default: J(() => {
|
|
284
|
-
var p, U,
|
|
285
|
+
var p, U, V, S, F, M, N, W, j, q, _, ee, te, G, L, z, ue, se;
|
|
285
286
|
return [
|
|
286
287
|
R("div", Ie, [
|
|
287
288
|
i.$formkit === "url" && e.item.name === "@id" ? (s(), g(I, {
|
|
@@ -292,7 +293,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
292
293
|
preIcon: !1,
|
|
293
294
|
showEndIcon: !1,
|
|
294
295
|
"show-error": !!a[`${e.item.identifier}-${o}`],
|
|
295
|
-
onInput: (f) =>
|
|
296
|
+
onInput: (f) => w(f, e.item.name, o, "@id"),
|
|
296
297
|
initialHintText: !1,
|
|
297
298
|
"model-value": (p = r.value[o]) == null ? void 0 : p["@id"],
|
|
298
299
|
"v-model": (U = r.value[o]) == null ? void 0 : U["@id"]
|
|
@@ -305,9 +306,9 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
305
306
|
preIcon: !1,
|
|
306
307
|
showEndIcon: !1,
|
|
307
308
|
"show-error": !1,
|
|
308
|
-
onInput: (f) =>
|
|
309
|
+
onInput: (f) => w(f, e.item.name, o, i.name),
|
|
309
310
|
initialHintText: !1,
|
|
310
|
-
"model-value": (
|
|
311
|
+
"model-value": (V = r.value[o]) == null ? void 0 : V[i.name],
|
|
311
312
|
"v-model": (S = r.value[o]) == null ? void 0 : S[i.name]
|
|
312
313
|
}, null, 8, ["label", "placeholder", "onInput", "model-value", "v-model"])) : c("", !0),
|
|
313
314
|
i.$formkit === "url" && i.label != "Homepage" && i.label != "Contributor Homepage" && e.item.name != "@id" && a[`${e.item.identifier}-${o}`] ? (s(), k("div", Ce, [
|
|
@@ -325,7 +326,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
325
326
|
preIcon: !1,
|
|
326
327
|
showEndIcon: !1,
|
|
327
328
|
"show-error": !!a[`${e.item.identifier}-${o}`],
|
|
328
|
-
onInput: (f) =>
|
|
329
|
+
onInput: (f) => w(f, e.item.name, o, "@value"),
|
|
329
330
|
initialHintText: !1,
|
|
330
331
|
"model-value": (F = r.value[o]) == null ? void 0 : F["@value"],
|
|
331
332
|
"v-model": (M = r.value[o]) == null ? void 0 : M["@value"]
|
|
@@ -345,7 +346,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
345
346
|
preIcon: !1,
|
|
346
347
|
showEndIcon: !1,
|
|
347
348
|
"show-error": i.name === "foaf:name" && !!a[`${e.item.identifier}-${o}`],
|
|
348
|
-
onInput: (f) =>
|
|
349
|
+
onInput: (f) => w(f, e.item.name, o, i.name),
|
|
349
350
|
initialHintText: !1,
|
|
350
351
|
"model-value": (N = r.value[o]) == null ? void 0 : N[i.name],
|
|
351
352
|
"v-model": (W = r.value[o]) == null ? void 0 : W[i.name]
|
|
@@ -413,7 +414,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
413
414
|
infoIcon: !1,
|
|
414
415
|
preIcon: !1,
|
|
415
416
|
showEndIcon: !1,
|
|
416
|
-
onInput: (f) =>
|
|
417
|
+
onInput: (f) => w(f, e.item.name, o, "@value"),
|
|
417
418
|
initialHintText: !1,
|
|
418
419
|
"model-value": (L = r.value[o]) == null ? void 0 : L["@value"]
|
|
419
420
|
}, null, 8, ["label", "placeholder", "onInput", "model-value"])) : c("", !0),
|
|
@@ -424,7 +425,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
424
425
|
infoIcon: !1,
|
|
425
426
|
preIcon: !1,
|
|
426
427
|
showEndIcon: !1,
|
|
427
|
-
onInput: (f) =>
|
|
428
|
+
onInput: (f) => w(f, e.item.name, o, i.name),
|
|
428
429
|
initialHintText: !1,
|
|
429
430
|
"model-value": (ue = r.value[o]) == null ? void 0 : ue[i.name]
|
|
430
431
|
}, null, 8, ["label", "placeholder", "onInput", "model-value"])) : c("", !0),
|
|
@@ -437,7 +438,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
437
438
|
preIcon: !1,
|
|
438
439
|
showEndIcon: !1,
|
|
439
440
|
"show-error": !1,
|
|
440
|
-
onInput: (f) =>
|
|
441
|
+
onInput: (f) => w(f, e.item.name, o, "@value"),
|
|
441
442
|
initialHintText: !1,
|
|
442
443
|
"model-value": (se = r.value[o]) == null ? void 0 : se["@value"]
|
|
443
444
|
}, null, 8, ["label", "placeholder", "onInput", "model-value"])) : c("", !0)
|
|
@@ -473,7 +474,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
473
474
|
preIcon: !1,
|
|
474
475
|
showEndIcon: !1,
|
|
475
476
|
"show-error": !!a[e.item.identifier],
|
|
476
|
-
onInput: n[1] || (n[1] = (i) =>
|
|
477
|
+
onInput: n[1] || (n[1] = (i) => w(i, e.item.name, 0, "@value")),
|
|
477
478
|
initialHintText: !1,
|
|
478
479
|
"model-value": (d = r.value[0]) == null ? void 0 : d["@value"]
|
|
479
480
|
}, null, 8, ["label", "placeholder", "show-error", "model-value"])) : c("", !0),
|
|
@@ -494,7 +495,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
494
495
|
preIcon: !1,
|
|
495
496
|
showEndIcon: !1,
|
|
496
497
|
"show-error": !!a[e.item.identifier],
|
|
497
|
-
onInput: (
|
|
498
|
+
onInput: (V) => w(V, e.item.name, b, i.name),
|
|
498
499
|
initialHintText: !1,
|
|
499
500
|
"model-value": (p = r.value[b]) == null ? void 0 : p[i.name],
|
|
500
501
|
"v-model": (U = r.value[b]) == null ? void 0 : U[i.name]
|
|
@@ -508,7 +509,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
508
509
|
R("span", qe, T(oe.value.message), 1)
|
|
509
510
|
])) : c("", !0),
|
|
510
511
|
e.item.$formkit === "formkitGroup" && e.item.children[0].$formkit === "date" ? (s(!0), k(Z, { key: 4 }, X(e.item.children, (i, b) => {
|
|
511
|
-
var p, U,
|
|
512
|
+
var p, U, V, S;
|
|
512
513
|
return s(), g(I, {
|
|
513
514
|
key: b,
|
|
514
515
|
label: i.label,
|
|
@@ -519,10 +520,10 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
519
520
|
inputType: "date",
|
|
520
521
|
showEndIcon: !1,
|
|
521
522
|
"show-error": !1,
|
|
522
|
-
onInput: (F) =>
|
|
523
|
+
onInput: (F) => w(F, e.item.name, b, i.name),
|
|
523
524
|
initialHintText: !1,
|
|
524
525
|
"model-value": (U = (p = r.value[b]) == null ? void 0 : p[i.name]) == null ? void 0 : U["@value"],
|
|
525
|
-
"v-model": (S = (
|
|
526
|
+
"v-model": (S = (V = r.value[b]) == null ? void 0 : V[i.name]) == null ? void 0 : S["@value"]
|
|
526
527
|
}, null, 8, ["label", "placeholder", "onInput", "model-value", "v-model"]);
|
|
527
528
|
}), 128)) : c("", !0),
|
|
528
529
|
e.item.$formkit === "auto" ? (s(), g(ae, {
|
|
@@ -590,7 +591,7 @@ const Ie = { class: "dpiV3_LinkAndMetadata" }, Ce = {
|
|
|
590
591
|
variant: "tertiary"
|
|
591
592
|
}),
|
|
592
593
|
y(le, {
|
|
593
|
-
onClick:
|
|
594
|
+
onClick: we,
|
|
594
595
|
buttonText: "Speichern",
|
|
595
596
|
size: "large"
|
|
596
597
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
2
|
+
import { asSomeArray as Rt } from "../../composables/useDpiSimpleLoader.js";
|
|
3
3
|
let d = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
-
function
|
|
4
|
+
function St(t) {
|
|
5
5
|
return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
6
6
|
}
|
|
7
|
-
async function
|
|
8
|
-
var A,
|
|
7
|
+
async function Ut(t, g, l, b) {
|
|
8
|
+
var A, f, v, D, k, O, R, j, S, w, I, x, L, B, U, P, C, T, G, M, q, X, z, F, $, N, E, H, W, Y, _, J, K, Q, Z, m, V, tt, it, dt, et, at, nt, ct, ot, st, lt, rt, pt, bt, gt, yt, ut, ht, At, ft, vt, Dt, kt;
|
|
9
9
|
const u = g.specification.prefixes;
|
|
10
10
|
let p = [];
|
|
11
11
|
const o = Object.keys(t);
|
|
@@ -14,7 +14,7 @@ async function ft(t, g, l, b) {
|
|
|
14
14
|
p.push(crypto.randomUUID()), d.dataset["dcat:distribution"].push({
|
|
15
15
|
"@id": `https://piveau.io/set/distribution/${p[c]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const jt = new URLSearchParams(window.location.search).get("edit");
|
|
18
18
|
let y = "";
|
|
19
19
|
try {
|
|
20
20
|
for (let c = 0; c < o.length; c++) {
|
|
@@ -25,7 +25,7 @@ async function ft(t, g, l, b) {
|
|
|
25
25
|
"@id": t.Discoverability.discoverabilityPage[e].uri
|
|
26
26
|
});
|
|
27
27
|
d.dataset["dcat:theme"] = i, t.Discoverability.hvdPage && Object.keys(t.Discoverability.hvdPage).length !== 0 && t.Discoverability.hvdPage[0].label !== void 0 && (d.dataset["dcatap:hvdCategory"] = {
|
|
28
|
-
"@id": (
|
|
28
|
+
"@id": (f = (A = t.Discoverability) == null ? void 0 : A.hvdPage) == null ? void 0 : f[0].uri
|
|
29
29
|
}, d.dataset["dcatap:applicableLegislation"] = {
|
|
30
30
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
31
31
|
});
|
|
@@ -33,13 +33,13 @@ async function ft(t, g, l, b) {
|
|
|
33
33
|
if (o[c] === "BasicInfos") {
|
|
34
34
|
d.dataset["dpi:isDPIv3"] = !0;
|
|
35
35
|
for (let i = 0; i < Object.keys(t.BasicInfos).length; i++)
|
|
36
|
-
Object.keys(t.BasicInfos)[i] === "dct:title" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y =
|
|
36
|
+
Object.keys(t.BasicInfos)[i] === "dct:title" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = St(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), jt === "true" && (y = t.BasicInfos.datasetID)), Object.keys(t.BasicInfos)[i] === "dct:description" && (d.dataset["dct:description"] = t.BasicInfos["dct:description"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:modified" && ((v = t.BasicInfos["dct:modified"]) != null && v[0] ? d.dataset["dct:modified"] = { ...(D = t.BasicInfos["dct:modified"]) == null ? void 0 : D[0], "@type": ((O = (k = t.BasicInfos["dct:modified"]) == null ? void 0 : k[0]) == null ? void 0 : O["@type"]) || "http://www.w3.org/2001/XMLSchema#date" } : d.dataset["dct:modified"] = void 0), Object.keys(t.BasicInfos)[i] === "dct:publisher" && ((R = t.BasicInfos["dct:publisher"]) != null && R[0] ? d.dataset["dct:publisher"] = { ...(j = t.BasicInfos["dct:publisher"]) == null ? void 0 : j[0], "@type": ((w = (S = t.BasicInfos["dct:publisher"]) == null ? void 0 : S[0]) == null ? void 0 : w["@type"]) || "foaf:Agent" } : d.dataset["dct:publisher"] = void 0), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && ((I = t.BasicInfos["dcat:contactPoint"]) != null && I[0] ? d.dataset["dcat:contactPoint"] = { ...(x = t.BasicInfos["dcat:contactPoint"]) == null ? void 0 : x[0], "@type": ((B = (L = t.BasicInfos["dcat:contactPoint"]) == null ? void 0 : L[0]) == null ? void 0 : B["@type"]) || "vcard:Organization" } : d.dataset["dcat:contactPoint"] = void 0), d.dataset["@type"] = "dcat:Dataset", d.meta["dcat:catalog"] = l.permissions[0].rsname, d.meta["@type"] = "dcat:CatalogRecord";
|
|
39
39
|
}
|
|
40
40
|
if (o[c] === "Covering" && Object.keys(t.Covering).length > 1)
|
|
41
41
|
for (let i = 0; i < Object.keys(t.Covering).length; i++) {
|
|
42
|
-
if (Object.keys(t.Covering)[i] === "dcat:temporalResolution" && t.Covering["dcat:temporalResolution"] !== void 0 && Object.keys((
|
|
42
|
+
if (Object.keys(t.Covering)[i] === "dcat:temporalResolution" && t.Covering["dcat:temporalResolution"] !== void 0 && Object.keys((U = t.Covering) == null ? void 0 : U["dcat:temporalResolution"]).length > 0 && ((C = (P = t.Covering) == null ? void 0 : P["dcat:temporalResolution"]) == null ? void 0 : C.type) !== void 0) {
|
|
43
43
|
d.dataset["dct:temporal"] = [];
|
|
44
44
|
for (let e = 0; e < t.Covering["dcat:temporalResolution"]["dct:temporal"].length; e++)
|
|
45
45
|
t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][e].dataType === "date" && t.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:startDate"] !== "" && (d.dataset["dct:temporal"][e] = {
|
|
@@ -64,15 +64,15 @@ async function ft(t, g, l, b) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((
|
|
68
|
-
"@id": ((
|
|
67
|
+
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((M = (G = (T = t.Covering) == null ? void 0 : T["dcatde:politicalGeocodingURI"]) == null ? void 0 : G[0]) == null ? void 0 : M.uri) != null && (d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
|
+
"@id": ((X = (q = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : q[0]) == null ? void 0 : X.uri) || ""
|
|
69
69
|
}, d.dataset["dct:spatial"] === void 0 && (d.dataset["dct:spatial"] = []), d.dataset["dct:spatial"].push({
|
|
70
|
-
"@id": ((
|
|
70
|
+
"@id": ((F = (z = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : z[0]) == null ? void 0 : F.uri) || ""
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
73
|
if (o[c] === "DistributionSimple")
|
|
74
74
|
for (let i = 0; i < t.DistributionSimple["dcat:distribution"].length; i++) {
|
|
75
|
-
if (d.distribution[i] = {}, ((
|
|
75
|
+
if (d.distribution[i] = {}, ((N = ($ = t.Discoverability) == null ? void 0 : $.hvdPage[0]) == null ? void 0 : N.uri) != null && (d.distribution[i]["dcatap:applicableLegislation"] = {
|
|
76
76
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
77
77
|
}), d.distribution[i]["@type"] = "dcat:Distribution", d.distribution[i]["@id"] = `https://piveau.io/set/distribution/${p[i]}`, t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"] && (d.distribution[i]["dcat:accessURL"] = {
|
|
78
78
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"]
|
|
@@ -86,8 +86,8 @@ async function ft(t, g, l, b) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
if (Object.keys(
|
|
89
|
-
(
|
|
90
|
-
).length !== 0 && ((
|
|
89
|
+
(E = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : E.policyItems
|
|
90
|
+
).length !== 0 && ((H = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : H.policyItems[0]["dcat:downloadURL"]) !== "") {
|
|
91
91
|
d.distribution[i]["odrl:hasPolicy"] = [];
|
|
92
92
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i].policyItems.length; a++)
|
|
93
93
|
d.distribution[i]["odrl:hasPolicy"][a] = {
|
|
@@ -95,7 +95,7 @@ async function ft(t, g, l, b) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
Object.keys(
|
|
98
|
-
(
|
|
98
|
+
(W = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : W["dct:license"]
|
|
99
99
|
).length !== 0 && (d.distribution[i]["dct:license"] = {
|
|
100
100
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:license"].uri || t.DistributionSimple["dct:license"][0].uri
|
|
101
101
|
}, t.DistributionSimple["dcat:distribution"][i]["dct:license"]["dcterms:license"] === "" && t.DistributionSimple["dct:license"][0].title !== "" && (d.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
@@ -105,12 +105,12 @@ async function ft(t, g, l, b) {
|
|
|
105
105
|
"@language": "de",
|
|
106
106
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:license"].title
|
|
107
107
|
}));
|
|
108
|
-
const e = (
|
|
108
|
+
const e = (J = (_ = (Y = t.DistributionSimple) == null ? void 0 : Y["dcat:distribution"]) == null ? void 0 : _[i]) == null ? void 0 : J["dct:format"];
|
|
109
109
|
e && (d.distribution[i]["dct:format"] = {
|
|
110
110
|
"@id": (e == null ? void 0 : e.uri) || ""
|
|
111
|
-
}), ((
|
|
112
|
-
const s = ((
|
|
113
|
-
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] =
|
|
111
|
+
}), ((Z = (Q = (K = t.DistributionSimple) == null ? void 0 : K["dcat:distribution"]) == null ? void 0 : Q[i]) == null ? void 0 : Z["dcatap:applicableLegislation"]) != null && (d.distribution[i]["dct:format"] = (tt = (V = (m = t.DistributionSimple) == null ? void 0 : m["dcat:distribution"]) == null ? void 0 : V[i]) == null ? void 0 : tt["dcatap:applicableLegislation"]["@id"]);
|
|
112
|
+
const s = ((et = (dt = (it = t.DistributionSimple) == null ? void 0 : it["dcat:distribution"]) == null ? void 0 : dt[i]) == null ? void 0 : et.conformsToItems) || [];
|
|
113
|
+
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] = Rt(
|
|
114
114
|
s
|
|
115
115
|
).filter(
|
|
116
116
|
(a) => a && (a["dcat:downloadURL"] || a["dct:title"])
|
|
@@ -126,6 +126,7 @@ async function ft(t, g, l, b) {
|
|
|
126
126
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] || "",
|
|
127
127
|
"@type": "http://www.w3.org/2001/XMLSchema#decimal"
|
|
128
128
|
}), t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] && (d.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
129
|
+
"@language": "de",
|
|
129
130
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] || ""
|
|
130
131
|
}), Object.keys(
|
|
131
132
|
t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"]
|
|
@@ -175,8 +176,8 @@ async function ft(t, g, l, b) {
|
|
|
175
176
|
).length !== 0 && (d.distribution[i]["adms:status"] = {
|
|
176
177
|
"@id": t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri || ""
|
|
177
178
|
});
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
179
|
+
const Ot = ((ct = (nt = (at = t.DistributionSimple) == null ? void 0 : at["dcat:distribution"]) == null ? void 0 : nt[i]) == null ? void 0 : ct.accessServices) || [];
|
|
180
|
+
if (Ot.length !== 0 && (d.distribution[i]["dcat:accessService"] = (ot = Rt(Ot)) == null ? void 0 : ot.filter(
|
|
180
181
|
(a) => a && (a["dct:title"] || a["dct:description"] || a["dcat:downloadURL"] || a["dcat:endpointURL"])
|
|
181
182
|
).map((a) => {
|
|
182
183
|
const n = {
|
|
@@ -195,7 +196,7 @@ async function ft(t, g, l, b) {
|
|
|
195
196
|
"@id": r
|
|
196
197
|
}), n;
|
|
197
198
|
})), d.distribution[i]["foaf:page"] || (d.distribution[i]["foaf:page"] = []), d.distribution[i]["foaf:page"].length !== 0)
|
|
198
|
-
for (let a = 0; a < ((
|
|
199
|
+
for (let a = 0; a < ((rt = (lt = (st = t.DistributionSimple) == null ? void 0 : st["dcat:distribution"]) == null ? void 0 : lt[i]) == null ? void 0 : rt.documentations.length); a++) {
|
|
199
200
|
const n = t.DistributionSimple["dcat:distribution"][i].documentations[a];
|
|
200
201
|
if ((n == null ? void 0 : n["dct:title"]) !== void 0) {
|
|
201
202
|
const r = {
|
|
@@ -237,7 +238,7 @@ async function ft(t, g, l, b) {
|
|
|
237
238
|
for (let e = 0; e < t.Additionals["dcat:keyword"].length; e++)
|
|
238
239
|
d.dataset["dcat:keyword"] === void 0 && (d.dataset["dcat:keyword"] = []), d.dataset["dcat:keyword"].push({
|
|
239
240
|
"@value": t.Additionals["dcat:keyword"][e]["@value"],
|
|
240
|
-
"@language": ((
|
|
241
|
+
"@language": ((bt = (pt = t.Additionals["dcat:keyword"]) == null ? void 0 : pt[e]) == null ? void 0 : bt["@language"]) || "de"
|
|
241
242
|
});
|
|
242
243
|
}
|
|
243
244
|
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
@@ -319,7 +320,7 @@ async function ft(t, g, l, b) {
|
|
|
319
320
|
for (let e = 0; e < t.Additionals["dcatde:legalBasis"].length; e++)
|
|
320
321
|
d.dataset["dcatde:legalBasis"] === void 0 && (d.dataset["dcatde:legalBasis"] = []), d.dataset["dcatde:legalBasis"].push({
|
|
321
322
|
"@value": t.Additionals["dcatde:legalBasis"][e]["@value"],
|
|
322
|
-
"@language": ((
|
|
323
|
+
"@language": ((ut = (yt = (gt = t.Additionals) == null ? void 0 : gt["dcatde:legalBasis"]) == null ? void 0 : yt[e]) == null ? void 0 : ut["@language"]) || "de"
|
|
323
324
|
});
|
|
324
325
|
}
|
|
325
326
|
if (Object.keys(t.Additionals)[i] === "dct:relation") {
|
|
@@ -457,7 +458,7 @@ async function ft(t, g, l, b) {
|
|
|
457
458
|
for (let e = 0; e < t.Additionals["foaf:page"].length; e++)
|
|
458
459
|
d.dataset["foaf:page"] === void 0 && (d.dataset["foaf:page"] = []), d.dataset["foaf:page"].push({
|
|
459
460
|
"dct:format": {
|
|
460
|
-
"@id": (
|
|
461
|
+
"@id": (At = (ht = t.Additionals["foaf:page"]) == null ? void 0 : ht[e]) == null ? void 0 : At.uri
|
|
461
462
|
},
|
|
462
463
|
"dct:title": t.Additionals["foaf:page"][e]["dct:title"],
|
|
463
464
|
"dct:description": t.Additionals["foaf:page"][e]["dct:description"],
|
|
@@ -499,7 +500,7 @@ async function ft(t, g, l, b) {
|
|
|
499
500
|
}), Object.keys(t.Additionals)[i] === "dcatde:politicalGeocodingLevelURI")
|
|
500
501
|
for (let e = 0; e < t.Additionals["dcatde:politicalGeocodingLevelURI"].length; e++)
|
|
501
502
|
d.dataset["dcatde:politicalGeocodingLevelURI"] === void 0 && (d.dataset["dcatde:politicalGeocodingLevelURI"] = []), d.dataset["dcatde:politicalGeocodingLevelURI"].push({
|
|
502
|
-
"@id": ((
|
|
503
|
+
"@id": ((vt = (ft = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : ft[e]) == null ? void 0 : vt.uri) || ((kt = (Dt = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : Dt[e]) == null ? void 0 : kt["@id"]) || ""
|
|
503
504
|
});
|
|
504
505
|
}
|
|
505
506
|
} catch (i) {
|
|
@@ -507,9 +508,10 @@ async function ft(t, g, l, b) {
|
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
510
|
} catch (c) {
|
|
511
|
+
debugger;
|
|
510
512
|
console.log(c);
|
|
511
513
|
}
|
|
512
|
-
let h =
|
|
514
|
+
let h = wt(d, u);
|
|
513
515
|
return { actionParams: {
|
|
514
516
|
id: y,
|
|
515
517
|
catalog: l.permissions[0].rsname,
|
|
@@ -518,7 +520,7 @@ async function ft(t, g, l, b) {
|
|
|
518
520
|
description: d.dataset["dct:description"]["@value"]
|
|
519
521
|
}, body: h };
|
|
520
522
|
}
|
|
521
|
-
function
|
|
523
|
+
function wt(t, g) {
|
|
522
524
|
const l = {}, b = Object.keys(t);
|
|
523
525
|
for (let o = 0; o < b.length; o++)
|
|
524
526
|
b[o], l[b[o]] = t[b[o]];
|
|
@@ -538,5 +540,5 @@ function yt(t, g) {
|
|
|
538
540
|
return console.log(p), p;
|
|
539
541
|
}
|
|
540
542
|
export {
|
|
541
|
-
|
|
543
|
+
Ut as default
|
|
542
544
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piveau/dpi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.74",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@headlessui/vue": "^1.7.23",
|
|
56
56
|
"@histoire/plugin-vue": "1.0.0-alpha.2",
|
|
57
57
|
"@phosphor-icons/vue": "^2.2.1",
|
|
58
|
-
"@piveau/jsonld": "file:../../bin/piveau-jsonld-1.0.0-beta.
|
|
58
|
+
"@piveau/jsonld": "file:../../bin/piveau-jsonld-1.0.0-beta.24.tgz",
|
|
59
59
|
"@popperjs/core": "^2.11.8",
|
|
60
60
|
"@types/jsonld": "^1.5.15",
|
|
61
61
|
"@types/node": "^24.1.0",
|