@piveau/dpi 0.2.0-alpha.47 → 0.2.0-alpha.48
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/packages/dpi/src/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +38 -30
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue2.js +59 -55
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +3 -3
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +148 -135
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +5 -5
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +317 -296
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +77 -0
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +58 -56
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +97 -90
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +35 -35
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +86 -86
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js +7 -10
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +9 -8
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue2.js +55 -50
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js +8 -8
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +92 -91
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +49 -48
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +122 -117
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsModal.vue.js +48 -48
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +289 -293
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +32 -30
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +46 -29
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +264 -221
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +41 -35
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +63 -65
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +36 -35
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
- package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +49 -49
- package/dist/packages/dpi/src/data-provider-interface/components/DiscoverabilityPage.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/components/DistLicense.vue.js +102 -100
- package/dist/packages/dpi/src/data-provider-interface/components/DistributionSimplePage.vue.js +657 -600
- package/dist/packages/dpi/src/data-provider-interface/components/HVDPage.vue.js +41 -42
- package/dist/packages/dpi/src/data-provider-interface/components/ReviewAndPublishPage.vue.js +272 -239
- package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue.js +3 -3
- package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue2.js +94 -82
- package/dist/packages/dpi/src/data-provider-interface/components/TempResPage.vue.js +81 -81
- package/dist/packages/dpi/src/data-provider-interface/components/TempResPageInModal.vue.js +138 -141
- package/dist/packages/dpi/src/data-provider-interface/components/TitelPage.vue.js +4 -4
- package/dist/packages/dpi/src/data-provider-interface/components/VisibilityPage.vue.js +2 -1
- package/dist/packages/dpi/src/data-provider-interface/components/dpiV3Description.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +255 -242
- package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +80 -84
- package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/store/modules/authStore.js +1 -3
- package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +226 -250
- package/package.json +2 -2
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
2
|
+
import { asSomeArray as pt } from "../../composables/useDpiSimpleLoader.js";
|
|
3
3
|
let d = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
-
function
|
|
4
|
+
function gt(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 ft(t, g, l, b) {
|
|
8
|
+
var A, v, f, D, k, O, R, j, S, w, I, x, L, U, B, 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;
|
|
9
9
|
const u = g.specification.prefixes;
|
|
10
10
|
let p = [];
|
|
11
|
-
const
|
|
11
|
+
const o = Object.keys(t);
|
|
12
12
|
d.dataset["dcat:distribution"] = [];
|
|
13
|
-
for (let
|
|
13
|
+
for (let c = 0; c < t.DistributionSimple["dcat:distribution"].length; c++)
|
|
14
14
|
p.push(crypto.randomUUID()), d.dataset["dcat:distribution"].push({
|
|
15
|
-
"@id": `https://piveau.io/set/distribution/${p[
|
|
15
|
+
"@id": `https://piveau.io/set/distribution/${p[c]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const bt = new URLSearchParams(window.location.search).get("edit");
|
|
18
18
|
let y = "";
|
|
19
19
|
try {
|
|
20
|
-
for (let
|
|
21
|
-
if (c
|
|
20
|
+
for (let c = 0; c < o.length; c++) {
|
|
21
|
+
if (o[c] === "Discoverability") {
|
|
22
22
|
let i = [];
|
|
23
23
|
for (let e = 1; e < t.Discoverability.discoverabilityPage.length; e++)
|
|
24
24
|
i.push({
|
|
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": (v = (A = t.Discoverability) == null ? void 0 : A.hvdPage) == null ? void 0 : v[0].uri
|
|
29
29
|
}, d.dataset["dcatap:applicableLegislation"] = {
|
|
30
30
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
if (c
|
|
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 = gt(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), bt === "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" && (d.dataset["dct:modified"] = t.BasicInfos["dct:modified"][0] || "", d.dataset["dct:modified"]["@type"] = "http://www.w3.org/2001/XMLSchema#date"), Object.keys(t.BasicInfos)[i] === "dct:publisher" && (d.dataset["dct:publisher"] = t.BasicInfos["dct:publisher"][0] || "", d.dataset["dct:publisher"]["@type"] = "foaf:Agent"), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && (d.dataset["dcat:contactPoint"] = t.BasicInfos["dcat:contactPoint"][0] || "", d.dataset["dcat:contactPoint"]["@type"] = "vcard:Organization"), d.dataset["@type"] = "dcat:Dataset", d.meta["dcat:catalog"] = l.permissions[0].rsname, d.meta["@type"] = "dcat:CatalogRecord";
|
|
39
39
|
}
|
|
40
|
-
if (c
|
|
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 && ((k = (D = t.Covering) == null ? void 0 : D["dcat:temporalResolution"]) == null ? void 0 : k.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,21 +64,21 @@ async function yt(t, g, l, b) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && (d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
|
-
"@id": ((
|
|
67
|
+
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((j = (R = (O = t.Covering) == null ? void 0 : O["dcatde:politicalGeocodingURI"]) == null ? void 0 : R[0]) == null ? void 0 : j.uri) != null && (d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
|
+
"@id": ((w = (S = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : S[0]) == null ? void 0 : w.uri) || ""
|
|
69
69
|
}, d.dataset["dct:spatial"] === void 0 && (d.dataset["dct:spatial"] = []), d.dataset["dct:spatial"].push({
|
|
70
|
-
"@id": ((
|
|
70
|
+
"@id": ((x = (I = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : I[0]) == null ? void 0 : x.uri) || ""
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
|
-
if (c
|
|
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] = {}, ((U = (L = t.Discoverability) == null ? void 0 : L.hvdPage[0]) == null ? void 0 : U.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"]
|
|
79
79
|
}), Object.keys(
|
|
80
80
|
t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"]
|
|
81
|
-
).length !== 0) {
|
|
81
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"][0]["@id"] !== "") {
|
|
82
82
|
d.distribution[i]["dcat:downloadURL"] = [];
|
|
83
83
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"].length; a++)
|
|
84
84
|
d.distribution[i]["dcat:downloadURL"][a] = {
|
|
@@ -86,8 +86,8 @@ async function yt(t, g, l, b) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
if (Object.keys(
|
|
89
|
-
(
|
|
90
|
-
).length !== 0) {
|
|
89
|
+
(B = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : B.policyItems
|
|
90
|
+
).length !== 0 && ((P = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : P.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 yt(t, g, l, b) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
Object.keys(
|
|
98
|
-
(
|
|
98
|
+
(C = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : C["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 yt(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 = (M = (G = (T = t.DistributionSimple) == null ? void 0 : T["dcat:distribution"]) == null ? void 0 : G[i]) == null ? void 0 : M["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 && (d.distribution[i]["dct:conformsTo"] =
|
|
111
|
+
}), ((z = (X = (q = t.DistributionSimple) == null ? void 0 : q["dcat:distribution"]) == null ? void 0 : X[i]) == null ? void 0 : z["dcatap:applicableLegislation"]) != null && (d.distribution[i]["dct:format"] = (N = ($ = (F = t.DistributionSimple) == null ? void 0 : F["dcat:distribution"]) == null ? void 0 : $[i]) == null ? void 0 : N["dcatap:applicableLegislation"]["@id"]);
|
|
112
|
+
const s = ((W = (H = (E = t.DistributionSimple) == null ? void 0 : E["dcat:distribution"]) == null ? void 0 : H[i]) == null ? void 0 : W.conformsToItems) || [];
|
|
113
|
+
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] = pt(
|
|
114
114
|
s
|
|
115
115
|
).filter(
|
|
116
116
|
(a) => a && (a["dcat:downloadURL"] || a["dct:title"])
|
|
@@ -120,7 +120,7 @@ async function yt(t, g, l, b) {
|
|
|
120
120
|
"@type": "dct:Standard"
|
|
121
121
|
}))), Object.keys(
|
|
122
122
|
t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"]
|
|
123
|
-
).length !== 0 && (d.distribution[i]["dcat:mediaType"] = {
|
|
123
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"].uri !== "" && (d.distribution[i]["dcat:mediaType"] = {
|
|
124
124
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"].uri || ""
|
|
125
125
|
}), t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] && (d.distribution[i]["dcat:byteSize"] = {
|
|
126
126
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] || "",
|
|
@@ -129,32 +129,31 @@ async function yt(t, g, l, b) {
|
|
|
129
129
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] || ""
|
|
130
130
|
}), Object.keys(
|
|
131
131
|
t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"]
|
|
132
|
-
).length !== 0 && (d.distribution[i]["dcatap:availability"] = {
|
|
132
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"].uri !== "" && (d.distribution[i]["dcatap:availability"] = {
|
|
133
133
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"].uri || ""
|
|
134
134
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:issued"] && (d.distribution[i]["dct:issued"] = {
|
|
135
135
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:issued"] || "",
|
|
136
136
|
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
137
137
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (d.distribution[i]["dct:modified"] = {
|
|
138
|
-
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:modified"] || ""
|
|
139
|
-
|
|
138
|
+
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:modified"] || "",
|
|
139
|
+
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
140
140
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:description"] && (d.distribution[i]["dct:description"] = {
|
|
141
141
|
"@language": "de",
|
|
142
142
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:description"]
|
|
143
143
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:title"] && (d.distribution[i]["dct:title"] = {
|
|
144
144
|
"@language": "de",
|
|
145
145
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:title"]
|
|
146
|
+
}), Object.keys(
|
|
147
|
+
t.DistributionSimple["dcat:distribution"][i]["dct:accessRights"]
|
|
148
|
+
).length !== 0 && (d.distribution[i]["dct:accessRights"] = {
|
|
149
|
+
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:accessRights"].uri
|
|
146
150
|
}), t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"] != null && Object.keys(
|
|
147
151
|
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
148
|
-
).length !== 0 && (
|
|
149
|
-
"CFORMAT: ",
|
|
150
|
-
Object.keys(
|
|
151
|
-
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
152
|
-
).length
|
|
153
|
-
), d.distribution[i]["dcat:compressFormat"] = {
|
|
152
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"].uri !== "" && (d.distribution[i]["dcat:compressFormat"] = {
|
|
154
153
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"].uri || ""
|
|
155
154
|
}), Object.keys(
|
|
156
155
|
t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"]
|
|
157
|
-
).length !== 0 && (d.distribution[i]["dcat:packageFormat"] = {
|
|
156
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"].uri !== "" && (d.distribution[i]["dcat:packageFormat"] = {
|
|
158
157
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"].uri || ""
|
|
159
158
|
}), t.DistributionSimple["dcat:distribution"][i].checksum.uri !== "" && (d.distribution[i]["spdx:checksum"] = {
|
|
160
159
|
"@type": "spdx:Checksum",
|
|
@@ -171,11 +170,13 @@ async function yt(t, g, l, b) {
|
|
|
171
170
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:language"][a].uri
|
|
172
171
|
};
|
|
173
172
|
}
|
|
174
|
-
t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri !== "" && (
|
|
173
|
+
t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri !== "" && Object.keys(
|
|
174
|
+
t.DistributionSimple["dcat:distribution"][i]["adms:status"]
|
|
175
|
+
).length !== 0 && (d.distribution[i]["adms:status"] = {
|
|
175
176
|
"@id": t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri || ""
|
|
176
177
|
});
|
|
177
|
-
const
|
|
178
|
-
|
|
178
|
+
const rt = ((J = (_ = (Y = t.DistributionSimple) == null ? void 0 : Y["dcat:distribution"]) == null ? void 0 : _[i]) == null ? void 0 : J.accessServices) || [];
|
|
179
|
+
if (rt.length !== 0 && (d.distribution[i]["dcat:accessService"] = (K = pt(rt)) == null ? void 0 : K.filter(
|
|
179
180
|
(a) => a && (a["dct:title"] || a["dct:description"] || a["dcat:downloadURL"] || a["dcat:endpointURL"])
|
|
180
181
|
).map((a) => {
|
|
181
182
|
const n = {
|
|
@@ -193,29 +194,29 @@ async function yt(t, g, l, b) {
|
|
|
193
194
|
return r !== void 0 && (n["dcat:endpointURL"] = {
|
|
194
195
|
"@id": r
|
|
195
196
|
}), n;
|
|
196
|
-
})), d.distribution[i]["foaf:page"] || (d.distribution[i]["foaf:page"] = [])
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
})), d.distribution[i]["foaf:page"] || (d.distribution[i]["foaf:page"] = []), d.distribution[i]["foaf:page"].length !== 0)
|
|
198
|
+
for (let a = 0; a < ((m = (Z = (Q = t.DistributionSimple) == null ? void 0 : Q["dcat:distribution"]) == null ? void 0 : Z[i]) == null ? void 0 : m.documentations.length); a++) {
|
|
199
|
+
const n = t.DistributionSimple["dcat:distribution"][i].documentations[a];
|
|
200
|
+
if ((n == null ? void 0 : n["dct:title"]) !== void 0) {
|
|
201
|
+
const r = {
|
|
202
|
+
"@type": "foaf:Document",
|
|
203
|
+
"dct:title": {
|
|
204
|
+
"@language": "de",
|
|
205
|
+
"@value": n["dct:title"]
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
(n == null ? void 0 : n["dct:description"]) !== void 0 && (r["dct:description"] = {
|
|
203
209
|
"@language": "de",
|
|
204
|
-
"@value": n["dct:
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
"@id": n["dcat:accessURL"]
|
|
212
|
-
}), (n == null ? void 0 : n["dct:format"]) !== void 0 && (r["dct:format"] = {
|
|
213
|
-
"@id": n.formatUri
|
|
214
|
-
}), d.distribution[i]["foaf:page"][a] = r;
|
|
210
|
+
"@value": n["dct:description"]
|
|
211
|
+
}), (n == null ? void 0 : n["dcat:accessURL"]) !== void 0 && (r["dcat:accessURL"] = {
|
|
212
|
+
"@id": n["dcat:accessURL"]
|
|
213
|
+
}), (n == null ? void 0 : n["dct:format"]) !== void 0 && (r["dct:format"] = {
|
|
214
|
+
"@id": n.formatUri
|
|
215
|
+
}), d.distribution[i]["foaf:page"][a] = r;
|
|
216
|
+
}
|
|
215
217
|
}
|
|
216
|
-
}
|
|
217
218
|
}
|
|
218
|
-
if (c
|
|
219
|
+
if (o[c], o[c] === "Additionals")
|
|
219
220
|
try {
|
|
220
221
|
for (let i = 0; i < Object.keys(t.Additionals).length; i++) {
|
|
221
222
|
if (Object.keys(t.Additionals)[i] === "dcat:landingPage" && (d.dataset["dcat:landingPage"] = [
|
|
@@ -223,16 +224,11 @@ async function yt(t, g, l, b) {
|
|
|
223
224
|
]), Object.keys(t.Additionals)[i] === "dct:issued" && (d.dataset["dct:issued"] === void 0 && (d.dataset["dct:issued"] = []), d.dataset["dct:issued"].push({
|
|
224
225
|
"@value": t.Additionals["dct:issued"][0]["@value"].split(".").reverse().map((e, s) => s < 2 ? e.padStart(2, "0") : e).join("-") || "",
|
|
225
226
|
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
226
|
-
})), Object.keys(t.Additionals)[i] === "dcatap:availability")
|
|
227
|
-
console.log(
|
|
228
|
-
"#####################",
|
|
229
|
-
Object.keys(t.Additionals)[i]
|
|
230
|
-
);
|
|
227
|
+
})), Object.keys(t.Additionals)[i] === "dcatap:availability")
|
|
231
228
|
for (let e = 0; e < t.Additionals["dcatap:availability"].length; e++)
|
|
232
229
|
d.dataset["dcatap:availability"] === void 0 && (d.dataset["dcatap:availability"] = []), d.dataset["dcatap:availability"].push({
|
|
233
230
|
"@id": t.Additionals["dcatap:availability"][e].uri
|
|
234
231
|
});
|
|
235
|
-
}
|
|
236
232
|
if (Object.keys(t.Additionals)[i] === "dcat:keyword") {
|
|
237
233
|
console.log(
|
|
238
234
|
"#####################",
|
|
@@ -241,7 +237,7 @@ async function yt(t, g, l, b) {
|
|
|
241
237
|
for (let e = 0; e < t.Additionals["dcat:keyword"].length; e++)
|
|
242
238
|
d.dataset["dcat:keyword"] === void 0 && (d.dataset["dcat:keyword"] = []), d.dataset["dcat:keyword"].push({
|
|
243
239
|
"@value": t.Additionals["dcat:keyword"][e]["@value"],
|
|
244
|
-
"@language": ((
|
|
240
|
+
"@language": ((tt = (V = t.Additionals["dcat:keyword"]) == null ? void 0 : V[e]) == null ? void 0 : tt["@language"]) || "de"
|
|
245
241
|
});
|
|
246
242
|
}
|
|
247
243
|
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
@@ -323,7 +319,7 @@ async function yt(t, g, l, b) {
|
|
|
323
319
|
for (let e = 0; e < t.Additionals["dcatde:legalBasis"].length; e++)
|
|
324
320
|
d.dataset["dcatde:legalBasis"] === void 0 && (d.dataset["dcatde:legalBasis"] = []), d.dataset["dcatde:legalBasis"].push({
|
|
325
321
|
"@value": t.Additionals["dcatde:legalBasis"][e]["@value"],
|
|
326
|
-
"@language": ((
|
|
322
|
+
"@language": ((et = (dt = (it = t.Additionals) == null ? void 0 : it["dcatde:legalBasis"]) == null ? void 0 : dt[e]) == null ? void 0 : et["@language"]) || "de"
|
|
327
323
|
});
|
|
328
324
|
}
|
|
329
325
|
if (Object.keys(t.Additionals)[i] === "dct:relation") {
|
|
@@ -445,7 +441,7 @@ async function yt(t, g, l, b) {
|
|
|
445
441
|
for (let e = 0; e < t.Additionals["dct:creator"].length; e++) {
|
|
446
442
|
d.dataset["dct:creator"] === void 0 && (d.dataset["dct:creator"] = []);
|
|
447
443
|
let s;
|
|
448
|
-
t.Additionals["dct:creator"][e]["rdf:type"] === "Person" && (s = "foaf:
|
|
444
|
+
t.Additionals["dct:creator"][e]["rdf:type"] === "Person" && (s = "foaf:Agent"), t.Additionals["dct:creator"][e]["rdf:type"] === "Organisation" && (s = "foaf:Organization"), d.dataset["dct:creator"].push({
|
|
449
445
|
"@type": s,
|
|
450
446
|
"foaf:name": t.Additionals["dct:creator"][e]["foaf:name"],
|
|
451
447
|
"foaf:mbox": t.Additionals["dct:creator"][e]["foaf:mbox"],
|
|
@@ -461,7 +457,7 @@ async function yt(t, g, l, b) {
|
|
|
461
457
|
for (let e = 0; e < t.Additionals["foaf:page"].length; e++)
|
|
462
458
|
d.dataset["foaf:page"] === void 0 && (d.dataset["foaf:page"] = []), d.dataset["foaf:page"].push({
|
|
463
459
|
"dct:format": {
|
|
464
|
-
"@id": (
|
|
460
|
+
"@id": (nt = (at = t.Additionals["foaf:page"]) == null ? void 0 : at[e]) == null ? void 0 : nt.uri
|
|
465
461
|
},
|
|
466
462
|
"dct:title": t.Additionals["foaf:page"][e]["dct:title"],
|
|
467
463
|
"dct:description": t.Additionals["foaf:page"][e]["dct:description"],
|
|
@@ -476,7 +472,7 @@ async function yt(t, g, l, b) {
|
|
|
476
472
|
for (let e = 0; e < t.Additionals["dct:contributor"].length; e++) {
|
|
477
473
|
d.dataset["dct:contributor"] === void 0 && (d.dataset["dct:contributor"] = []);
|
|
478
474
|
let s;
|
|
479
|
-
t.Additionals["dct:contributor"][e]["rdf:type"] === "Person" && (s = "foaf:
|
|
475
|
+
t.Additionals["dct:contributor"][e]["rdf:type"] === "Person" && (s = "foaf:Agent"), t.Additionals["dct:contributor"][e]["rdf:type"] === "Organisation" && (s = "foaf:Organization"), console.log(s), d.dataset["dct:contributor"].push({
|
|
480
476
|
"@type": s,
|
|
481
477
|
"foaf:name": t.Additionals["dct:contributor"][e]["foaf:name"],
|
|
482
478
|
"foaf:mbox": t.Additionals["dct:contributor"][e]["foaf:mbox"],
|
|
@@ -503,29 +499,29 @@ async function yt(t, g, l, b) {
|
|
|
503
499
|
}), Object.keys(t.Additionals)[i] === "dcatde:politicalGeocodingLevelURI")
|
|
504
500
|
for (let e = 0; e < t.Additionals["dcatde:politicalGeocodingLevelURI"].length; e++)
|
|
505
501
|
d.dataset["dcatde:politicalGeocodingLevelURI"] === void 0 && (d.dataset["dcatde:politicalGeocodingLevelURI"] = []), d.dataset["dcatde:politicalGeocodingLevelURI"].push({
|
|
506
|
-
"@id": ((
|
|
502
|
+
"@id": ((ot = (ct = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : ct[e]) == null ? void 0 : ot.uri) || ((lt = (st = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : st[e]) == null ? void 0 : lt["@id"]) || ""
|
|
507
503
|
});
|
|
508
504
|
}
|
|
509
505
|
} catch (i) {
|
|
510
506
|
throw console.error("Validation Error:", i.message), i;
|
|
511
507
|
}
|
|
512
508
|
}
|
|
513
|
-
} catch (
|
|
514
|
-
console.log(
|
|
509
|
+
} catch (c) {
|
|
510
|
+
console.log(c);
|
|
515
511
|
}
|
|
516
|
-
let
|
|
512
|
+
let h = yt(d, u);
|
|
517
513
|
return { actionParams: {
|
|
518
514
|
id: y,
|
|
519
515
|
catalog: l.permissions[0].rsname,
|
|
520
|
-
body:
|
|
516
|
+
body: h,
|
|
521
517
|
title: d.dataset["dct:title"]["@value"],
|
|
522
518
|
description: d.dataset["dct:description"]["@value"]
|
|
523
|
-
}, body:
|
|
519
|
+
}, body: h };
|
|
524
520
|
}
|
|
525
|
-
function
|
|
521
|
+
function yt(t, g) {
|
|
526
522
|
const l = {}, b = Object.keys(t);
|
|
527
|
-
for (let
|
|
528
|
-
b[
|
|
523
|
+
for (let o = 0; o < b.length; o++)
|
|
524
|
+
b[o], l[b[o]] = t[b[o]];
|
|
529
525
|
let p = {
|
|
530
526
|
"@graph": [
|
|
531
527
|
{
|
|
@@ -542,5 +538,5 @@ function lt(t, g) {
|
|
|
542
538
|
return console.log(p), p;
|
|
543
539
|
}
|
|
544
540
|
export {
|
|
545
|
-
|
|
541
|
+
ft as default
|
|
546
542
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
datasets: {
|
|
3
3
|
Landing: ["landingpage"],
|
|
4
|
-
Discoverability: ["
|
|
4
|
+
Discoverability: ["visibility", "discoverabilitypage", "hvd"],
|
|
5
5
|
BasicInfos: [
|
|
6
6
|
"titelpage",
|
|
7
7
|
"descriptionV3",
|
|
@@ -57,7 +57,7 @@ const e = {
|
|
|
57
57
|
"dct:issued",
|
|
58
58
|
"dct:language",
|
|
59
59
|
"foaf:page",
|
|
60
|
-
|
|
60
|
+
"dct:accessRights",
|
|
61
61
|
"dct:conformsTo",
|
|
62
62
|
"dcat:mediaType",
|
|
63
63
|
"dcat:compressFormat",
|
|
@@ -158,9 +158,7 @@ const d = {
|
|
|
158
158
|
id: a,
|
|
159
159
|
catalogue: s,
|
|
160
160
|
body: r
|
|
161
|
-
});
|
|
162
|
-
debugger;
|
|
163
|
-
e("DELETE_USER_DRAFT", a), e("UPDATE_USER_DATA_SUCCESS"), e("CHANGE_IS_DRAFT", !1), e("CHANGE_IS_EDIT_MODE", !1);
|
|
161
|
+
}), e("DELETE_USER_DRAFT", a), e("UPDATE_USER_DATA_SUCCESS"), e("CHANGE_IS_DRAFT", !1), e("CHANGE_IS_EDIT_MODE", !1);
|
|
164
162
|
} catch (o) {
|
|
165
163
|
throw console.log("error"), e("UPDATE_USER_DATA_ERROR"), o;
|
|
166
164
|
}
|