@piveau/dpi 0.1.0-beta.39 → 0.1.0-beta.41
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/assets/dpi.css +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +393 -314
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +105 -69
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +95 -57
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +83 -55
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +116 -75
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +145 -124
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +41 -41
- package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +123 -108
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +440 -258
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +37 -32
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +6 -6
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +183 -126
- package/dist/data-provider-interface/components/ContactPage.vue.js +95 -89
- package/dist/data-provider-interface/components/DistLicense.vue.js +1 -1
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +401 -396
- package/dist/data-provider-interface/components/HVDPage.vue.js +56 -55
- package/dist/data-provider-interface/components/PublisherPage.vue.js +94 -89
- package/dist/data-provider-interface/components/TempResPage.vue.js +122 -104
- package/dist/data-provider-interface/components/TempResPageInModal.vue.js +249 -108
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +128 -118
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +40 -28
- package/dist/data-provider-interface/views/InputPage.vue.js +375 -746
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
2
|
+
import { asSomeArray as ot } from "../../composables/useDpiSimpleLoader.js";
|
|
3
3
|
let e = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
-
function
|
|
4
|
+
function lt(t) {
|
|
5
5
|
return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
6
6
|
}
|
|
7
|
-
async function
|
|
8
|
-
var
|
|
7
|
+
async function ut(t, g, s, p) {
|
|
8
|
+
var A, v, f, k, D, O, j, R, w, S, x, I, B, L, C, P, T, U, M, G, $, F, X, N, q, z, W, E, H, Y, _, J, K, Q, Z, m, V, tt, it, dt, et, at;
|
|
9
9
|
const u = g.specification.prefixes;
|
|
10
10
|
let r = [];
|
|
11
11
|
const o = Object.keys(t);
|
|
@@ -14,7 +14,7 @@ async function yt(t, g, s, p) {
|
|
|
14
14
|
r.push(crypto.randomUUID()), e.dataset["dcat:distribution"].push({
|
|
15
15
|
"@id": `https://piveau.io/set/distribution/${r[c]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const st = 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 yt(t, g, s, p) {
|
|
|
25
25
|
"@id": t.Discoverability.discoverabilityPage[d].uri
|
|
26
26
|
});
|
|
27
27
|
e.dataset["dcat:theme"] = i, t.Discoverability.hvdPage && Object.keys(t.Discoverability.hvdPage).length !== 0 && t.Discoverability.hvdPage[0].label !== void 0 && (e.dataset["dcatap:hvdCategory"] = {
|
|
28
|
-
"@id": (
|
|
28
|
+
"@id": (v = (A = t.Discoverability) == null ? void 0 : A.hvdPage) == null ? void 0 : v[0].uri
|
|
29
29
|
}, e.dataset["dcatap:applicableLegislation"] = {
|
|
30
30
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
31
31
|
});
|
|
@@ -33,13 +33,13 @@ async function yt(t, g, s, p) {
|
|
|
33
33
|
if (o[c] === "BasicInfos") {
|
|
34
34
|
e.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" && (e.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y =
|
|
36
|
+
Object.keys(t.BasicInfos)[i] === "dct:title" && (e.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = lt(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), st === "true" && (y = t.BasicInfos.datasetID)), Object.keys(t.BasicInfos)[i] === "dct:description" && (e.dataset["dct:description"] = t.BasicInfos["dct:description"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:modified" && (e.dataset["dct:modified"] = t.BasicInfos["dct:modified"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:publisher" && (e.dataset["dct:publisher"] = t.BasicInfos["dct:publisher"][0] || "", e.dataset["dct:publisher"]["@type"] = "foaf:Agent"), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && (e.dataset["dcat:contactPoint"] = t.BasicInfos["dcat:contactPoint"][0] || ""), e.dataset["@type"] = "dcat:Dataset", e.meta["dcat:catalog"] = s.permissions[0].rsname, e.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((f = t.Covering) == null ? void 0 : f["dcat:temporalResolution"]).length > 0 && ((D = (k = t.Covering) == null ? void 0 : k["dcat:temporalResolution"]) == null ? void 0 : D.type) !== void 0) {
|
|
43
43
|
e.dataset["dct:temporal"] = [];
|
|
44
44
|
for (let d = 0; d < t.Covering["dcat:temporalResolution"]["dct:temporal"].length; d++)
|
|
45
45
|
t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType === "date" && t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:startDate"] !== "" && (e.dataset["dct:temporal"][d] = {
|
|
@@ -84,20 +84,29 @@ async function yt(t, g, s, p) {
|
|
|
84
84
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"][a]["@id"]
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
if (Object.keys(
|
|
88
|
+
(S = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : S.policyItems
|
|
89
|
+
).length !== 0) {
|
|
90
|
+
e.distribution[i]["odrl:hasPolicy"] = [];
|
|
91
|
+
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i].policyItems.length; a++)
|
|
92
|
+
e.distribution[i]["odrl:hasPolicy"][a] = {
|
|
93
|
+
"@id": t.DistributionSimple["dcat:distribution"][i].policyItems[a]["dcat:downloadURL"]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
let d = (I = (x = t.DistributionSimple) == null ? void 0 : x["dct:license"]) == null ? void 0 : I[0];
|
|
97
|
+
d === void 0 && (d = (P = (C = (L = (B = t.DistributionSimple) == null ? void 0 : B["dcat:distribution"]) == null ? void 0 : L[0]) == null ? void 0 : C["dct:license"]) == null ? void 0 : P[0]), e.distribution[i]["dct:license"] = {
|
|
89
98
|
"@id": (d == null ? void 0 : d.uri) || ""
|
|
90
99
|
}, e.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
91
100
|
"@language": "de",
|
|
92
101
|
"@value": (d == null ? void 0 : d.attribution) || ""
|
|
93
102
|
};
|
|
94
|
-
const b = (
|
|
103
|
+
const b = (M = (U = (T = t.DistributionSimple) == null ? void 0 : T["dcat:distribution"]) == null ? void 0 : U[i]) == null ? void 0 : M["dct:format"];
|
|
95
104
|
b && (e.distribution[i]["dct:format"] = {
|
|
96
105
|
"@id": (b == null ? void 0 : b.uri) || ""
|
|
97
|
-
}), ((
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
|
|
106
|
+
}), ((F = ($ = (G = t.DistributionSimple) == null ? void 0 : G["dcat:distribution"]) == null ? void 0 : $[i]) == null ? void 0 : F["dcatap:applicableLegislation"]) != null && (e.distribution[i]["dct:format"] = (q = (N = (X = t.DistributionSimple) == null ? void 0 : X["dcat:distribution"]) == null ? void 0 : N[i]) == null ? void 0 : q["dcatap:applicableLegislation"]["@id"]);
|
|
107
|
+
const nt = ((E = (W = (z = t.DistributionSimple) == null ? void 0 : z["dcat:distribution"]) == null ? void 0 : W[i]) == null ? void 0 : E.conformsToItems) || [];
|
|
108
|
+
if (nt && (e.distribution[i]["dct:conformsTo"] = ot(
|
|
109
|
+
nt
|
|
101
110
|
).filter(
|
|
102
111
|
(a) => a && (a["dcat:downloadURL"] || a["dct:title"])
|
|
103
112
|
).map((a) => ({
|
|
@@ -161,8 +170,8 @@ async function yt(t, g, s, p) {
|
|
|
161
170
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:language"][a].uri
|
|
162
171
|
};
|
|
163
172
|
}
|
|
164
|
-
const
|
|
165
|
-
|
|
173
|
+
const ct = ((_ = (Y = (H = t.DistributionSimple) == null ? void 0 : H["dcat:distribution"]) == null ? void 0 : Y[i]) == null ? void 0 : _.accessServices) || [];
|
|
174
|
+
ct && (e.distribution[i]["dcat:accessService"] = (J = ot(ct)) == null ? void 0 : J.filter(
|
|
166
175
|
(a) => a && (a["dct:title"] || a["dct:description"] || a["dcat:downloadURL"] || a["dcat:endpointURL"])
|
|
167
176
|
).map((a) => {
|
|
168
177
|
const n = {
|
|
@@ -181,7 +190,7 @@ async function yt(t, g, s, p) {
|
|
|
181
190
|
"@id": l
|
|
182
191
|
}), n;
|
|
183
192
|
})), e.distribution[i]["foaf:page"] || (e.distribution[i]["foaf:page"] = []);
|
|
184
|
-
for (let a = 0; a < ((
|
|
193
|
+
for (let a = 0; a < ((Z = (Q = (K = t.DistributionSimple) == null ? void 0 : K["dcat:distribution"]) == null ? void 0 : Q[i]) == null ? void 0 : Z.documentations.length); a++) {
|
|
185
194
|
const n = t.DistributionSimple["dcat:distribution"][i].documentations[a];
|
|
186
195
|
if ((n == null ? void 0 : n["dct:title"]) !== void 0) {
|
|
187
196
|
const l = {
|
|
@@ -228,7 +237,7 @@ async function yt(t, g, s, p) {
|
|
|
228
237
|
for (let d = 0; d < t.Additionals["dcat:keyword"].length; d++)
|
|
229
238
|
e.dataset["dcat:keyword"] === void 0 && (e.dataset["dcat:keyword"] = []), e.dataset["dcat:keyword"].push({
|
|
230
239
|
"@value": t.Additionals["dcat:keyword"][d]["@value"],
|
|
231
|
-
"@language": ((
|
|
240
|
+
"@language": ((V = (m = t.Additionals["dcat:keyword"]) == null ? void 0 : m[d]) == null ? void 0 : V["@language"]) || "de"
|
|
232
241
|
});
|
|
233
242
|
}
|
|
234
243
|
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
@@ -310,7 +319,7 @@ async function yt(t, g, s, p) {
|
|
|
310
319
|
for (let d = 0; d < t.Additionals["dcatde:legalBasis"].length; d++)
|
|
311
320
|
e.dataset["dcatde:legalBasis"] === void 0 && (e.dataset["dcatde:legalBasis"] = []), e.dataset["dcatde:legalBasis"].push({
|
|
312
321
|
"@value": t.Additionals["dcatde:legalBasis"][d]["@value"],
|
|
313
|
-
"@language": ((
|
|
322
|
+
"@language": ((dt = (it = (tt = t.Additionals) == null ? void 0 : tt["dcatde:legalBasis"]) == null ? void 0 : it[d]) == null ? void 0 : dt["@language"]) || "de"
|
|
314
323
|
});
|
|
315
324
|
}
|
|
316
325
|
if (Object.keys(t.Additionals)[i] === "dct:relation") {
|
|
@@ -435,7 +444,7 @@ async function yt(t, g, s, p) {
|
|
|
435
444
|
for (let d = 0; d < t.Additionals["foaf:page"].length; d++)
|
|
436
445
|
e.dataset["foaf:page"] === void 0 && (e.dataset["foaf:page"] = []), e.dataset["foaf:page"].push({
|
|
437
446
|
"dct:format": {
|
|
438
|
-
"@id": (
|
|
447
|
+
"@id": (at = (et = t.Additionals["foaf:page"]) == null ? void 0 : et[d]) == null ? void 0 : at.uri
|
|
439
448
|
},
|
|
440
449
|
"dct:title": t.Additionals["foaf:page"][d]["dct:title"],
|
|
441
450
|
"dct:description": t.Additionals["foaf:page"][d]["dct:description"],
|
|
@@ -465,7 +474,10 @@ async function yt(t, g, s, p) {
|
|
|
465
474
|
"@id": t.Additionals["dct:accrualPeriodicity"][0].uri
|
|
466
475
|
}), Object.keys(t.Additionals)[i] === "dct:type" && (e.dataset["dct:type"] = {
|
|
467
476
|
"@id": t.Additionals["dct:type"][0].uri
|
|
468
|
-
}), Object.keys(t.Additionals)[i] === "dcat:spatialResolutionInMeters" && (e.dataset["dcat:spatialResolutionInMeters"] =
|
|
477
|
+
}), Object.keys(t.Additionals)[i] === "dcat:spatialResolutionInMeters" && (e.dataset["dcat:spatialResolutionInMeters"] = {
|
|
478
|
+
"@value": t.Additionals["dcat:spatialResolutionInMeters"][0]["@value"] || "",
|
|
479
|
+
"@type": "http://www.w3.org/2001/XMLSchema#decimal"
|
|
480
|
+
}), Object.keys(t.Additionals)[i] === "dcat:temporalResolution" && (e.dataset["dcat:temporalResolution"] = {
|
|
469
481
|
"@type": "http://www.w3.org/2001/XMLSchema#duration",
|
|
470
482
|
"@value": `P${t.Additionals["dcat:temporalResolution"][0].Year}Y${t.Additionals["dcat:temporalResolution"][0].Month}M${t.Additionals["dcat:temporalResolution"][0].Day}D${t.Additionals["dcat:temporalResolution"][0].Hour}H${t.Additionals["dcat:temporalResolution"][0].Minute}M${t.Additionals["dcat:temporalResolution"][0].Second}S`
|
|
471
483
|
});
|
|
@@ -477,16 +489,16 @@ async function yt(t, g, s, p) {
|
|
|
477
489
|
} catch (c) {
|
|
478
490
|
console.log(c);
|
|
479
491
|
}
|
|
480
|
-
let
|
|
492
|
+
let h = rt(e, u);
|
|
481
493
|
return { actionParams: {
|
|
482
494
|
id: y,
|
|
483
495
|
catalog: s.permissions[0].rsname,
|
|
484
|
-
body:
|
|
496
|
+
body: h,
|
|
485
497
|
title: e.dataset["dct:title"]["@value"],
|
|
486
498
|
description: e.dataset["dct:description"]["@value"]
|
|
487
|
-
}, body:
|
|
499
|
+
}, body: h };
|
|
488
500
|
}
|
|
489
|
-
function
|
|
501
|
+
function rt(t, g) {
|
|
490
502
|
const s = {}, p = Object.keys(t);
|
|
491
503
|
for (let o = 0; o < p.length; o++)
|
|
492
504
|
p[o], s[p[o]] = t[p[o]];
|
|
@@ -506,5 +518,5 @@ function lt(t, g) {
|
|
|
506
518
|
return console.log(r), r;
|
|
507
519
|
}
|
|
508
520
|
export {
|
|
509
|
-
|
|
521
|
+
ut as default
|
|
510
522
|
};
|