@piveau/dpi 0.2.0-alpha.72 → 0.2.0-alpha.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/assets/dpi.css +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +68 -64
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +155 -155
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +39 -39
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +126 -123
- package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +55 -40
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { datasetResolvers as ee, defineJsonldResolver as te, dcatDatasetTransfor
|
|
|
2
2
|
import { useAsyncState as ie } from "@vueuse/core";
|
|
3
3
|
import { isEmpty as ae } from "lodash-es";
|
|
4
4
|
import { toRef as oe, ref as ne, toValue as k, computed as E, watch as N } from "vue";
|
|
5
|
-
function
|
|
5
|
+
function F(e) {
|
|
6
6
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
7
7
|
}
|
|
8
8
|
function a(e) {
|
|
@@ -20,12 +20,12 @@ function ce(e) {
|
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
function Te(e, t) {
|
|
23
|
-
const { enabled: r, hubSearchUrl: i } = t,
|
|
23
|
+
const { enabled: r, hubSearchUrl: i } = t, n = oe(r), g = [...ee()].filter((f) => f.name !== "licence"), { safeTransform: l } = te({
|
|
24
24
|
baseUrl: i,
|
|
25
|
-
resolvers:
|
|
25
|
+
resolvers: g,
|
|
26
26
|
transformer: re
|
|
27
27
|
}), s = ne([]), {
|
|
28
|
-
state:
|
|
28
|
+
state: m,
|
|
29
29
|
isReady: y,
|
|
30
30
|
isLoading: h,
|
|
31
31
|
error: v,
|
|
@@ -90,25 +90,25 @@ function Te(e, t) {
|
|
|
90
90
|
null,
|
|
91
91
|
{ immediate: !1 }
|
|
92
92
|
), L = E(
|
|
93
|
-
() =>
|
|
93
|
+
() => n.value && !h.value && !!y.value
|
|
94
94
|
), B = E(
|
|
95
|
-
() =>
|
|
95
|
+
() => n.value && !!L.value
|
|
96
96
|
), U = E(() => B.value), I = E(() => {
|
|
97
97
|
var f;
|
|
98
|
-
return (f =
|
|
98
|
+
return (f = m.value) == null ? void 0 : f.dpiData;
|
|
99
99
|
}), S = E(() => {
|
|
100
100
|
var f;
|
|
101
|
-
return (f =
|
|
101
|
+
return (f = m.value) == null ? void 0 : f.data;
|
|
102
102
|
});
|
|
103
103
|
return N(
|
|
104
104
|
() => k(e),
|
|
105
|
-
(f) => f &&
|
|
105
|
+
(f) => f && n.value ? T() : null
|
|
106
106
|
), N(S, (f) => {
|
|
107
107
|
console.log("jsonld resolved result:", f);
|
|
108
108
|
}), N(v, (f) => {
|
|
109
109
|
console.log("jsonld error:", f);
|
|
110
110
|
}), {
|
|
111
|
-
processedInput:
|
|
111
|
+
processedInput: m,
|
|
112
112
|
isProcessedInputReady: L,
|
|
113
113
|
result: I,
|
|
114
114
|
isMaterialized: B,
|
|
@@ -116,7 +116,7 @@ function Te(e, t) {
|
|
|
116
116
|
errors: s
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function b(e) {
|
|
120
120
|
if (typeof e == "string")
|
|
121
121
|
return e;
|
|
122
122
|
if (e && typeof e == "object") {
|
|
@@ -136,14 +136,14 @@ function d(e, t = "de") {
|
|
|
136
136
|
return e[t] || (e == null ? void 0 : e.en) || Object.values(e)[0] || "";
|
|
137
137
|
if (Array.isArray(e)) {
|
|
138
138
|
const r = e.find(
|
|
139
|
-
(
|
|
139
|
+
(n) => n["@language"] === t
|
|
140
140
|
);
|
|
141
141
|
if (r)
|
|
142
142
|
return r["@value"] || "";
|
|
143
143
|
const i = e[0];
|
|
144
|
-
return (i == null ? void 0 : i["@value"]) ||
|
|
144
|
+
return (i == null ? void 0 : i["@value"]) || b(i) || "";
|
|
145
145
|
}
|
|
146
|
-
return e["@language"] && e["@value"] ? e["@value"] :
|
|
146
|
+
return e["@language"] && e["@value"] ? e["@value"] : b(e);
|
|
147
147
|
}
|
|
148
148
|
function q(e) {
|
|
149
149
|
return {
|
|
@@ -163,39 +163,39 @@ function H(e) {
|
|
|
163
163
|
"@value": e
|
|
164
164
|
} : e;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function _(e, t = !0) {
|
|
167
167
|
return {
|
|
168
168
|
isValid: t,
|
|
169
169
|
...e
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
function X(e, t = "de") {
|
|
173
|
-
return e ?
|
|
173
|
+
return e ? F(e).map((i) => typeof i == "string" ? _({
|
|
174
174
|
"@value": i,
|
|
175
175
|
"@language": t
|
|
176
|
-
}) : i && typeof i == "object" ? i["@language"] && i["@value"] ?
|
|
176
|
+
}) : i && typeof i == "object" ? i["@language"] && i["@value"] ? _({
|
|
177
177
|
"@value": i["@value"],
|
|
178
178
|
"@language": i["@language"]
|
|
179
|
-
}) :
|
|
180
|
-
"@value":
|
|
179
|
+
}) : _({
|
|
180
|
+
"@value": b(i),
|
|
181
181
|
"@language": t
|
|
182
|
-
}) :
|
|
182
|
+
}) : _({
|
|
183
183
|
"@value": "",
|
|
184
184
|
"@language": t
|
|
185
185
|
})) : [];
|
|
186
186
|
}
|
|
187
187
|
function de(e, t) {
|
|
188
|
-
return e ?
|
|
189
|
-
(i) =>
|
|
188
|
+
return e ? F(e).map(
|
|
189
|
+
(i) => _({
|
|
190
190
|
"@type": t,
|
|
191
|
-
"@value":
|
|
191
|
+
"@value": b(i)
|
|
192
192
|
})
|
|
193
193
|
) : [];
|
|
194
194
|
}
|
|
195
195
|
function Y(e, t) {
|
|
196
196
|
const r = { isValid: !0 };
|
|
197
|
-
for (const [i,
|
|
198
|
-
r[i] =
|
|
197
|
+
for (const [i, n] of Object.entries(t))
|
|
198
|
+
r[i] = b(e == null ? void 0 : e[n]);
|
|
199
199
|
return r;
|
|
200
200
|
}
|
|
201
201
|
function le(e) {
|
|
@@ -208,22 +208,22 @@ function se(e, t) {
|
|
|
208
208
|
discoverabilityPage: [{ isValid: !0 }]
|
|
209
209
|
};
|
|
210
210
|
if (e["dcatap:hvdCategory"]) {
|
|
211
|
-
const i =
|
|
212
|
-
r.hvdPage = i == null ? void 0 : i.map((
|
|
211
|
+
const i = F(e["dcatap:hvdCategory"]).filter(Boolean);
|
|
212
|
+
r.hvdPage = i == null ? void 0 : i.map((n) => ({
|
|
213
213
|
isValid: !0,
|
|
214
|
-
uri:
|
|
215
|
-
label: d(
|
|
214
|
+
uri: n["@id"],
|
|
215
|
+
label: d(n.prefLabel)
|
|
216
216
|
}));
|
|
217
217
|
}
|
|
218
218
|
if (e["dcat:theme"]) {
|
|
219
|
-
const i =
|
|
219
|
+
const i = F(e["dcat:theme"]);
|
|
220
220
|
r.discoverabilityPage = [
|
|
221
221
|
{ isValid: !0 },
|
|
222
222
|
...i.map(
|
|
223
|
-
(
|
|
224
|
-
id:
|
|
225
|
-
uri:
|
|
226
|
-
label: d(
|
|
223
|
+
(n) => _({
|
|
224
|
+
id: b(n).split("/").pop(),
|
|
225
|
+
uri: b(n),
|
|
226
|
+
label: d(n.prefLabel)
|
|
227
227
|
})
|
|
228
228
|
)
|
|
229
229
|
];
|
|
@@ -251,9 +251,9 @@ function fe(e) {
|
|
|
251
251
|
e["dct:modified"],
|
|
252
252
|
"http://www.w3.org/2001/XMLSchema#date"
|
|
253
253
|
)), e["dct:publisher"]) {
|
|
254
|
-
const
|
|
254
|
+
const n = a(e["dct:publisher"]);
|
|
255
255
|
r["dct:publisher"] = [
|
|
256
|
-
Y(
|
|
256
|
+
Y(n, {
|
|
257
257
|
"foaf:name": "foaf:name",
|
|
258
258
|
"foaf:mbox": "foaf:mbox",
|
|
259
259
|
"foaf:homepage": "foaf:homepage"
|
|
@@ -261,9 +261,9 @@ function fe(e) {
|
|
|
261
261
|
];
|
|
262
262
|
}
|
|
263
263
|
if (e["dcat:contactPoint"]) {
|
|
264
|
-
const
|
|
264
|
+
const n = a(e["dcat:contactPoint"]);
|
|
265
265
|
r["dcat:contactPoint"] = [
|
|
266
|
-
Y(
|
|
266
|
+
Y(n, {
|
|
267
267
|
"vcard:fn": "vcard:fn",
|
|
268
268
|
"vcard:hasEmail": "vcard:hasEmail",
|
|
269
269
|
"vcard:hasTelephone": "vcard:hasTelephone"
|
|
@@ -277,7 +277,7 @@ function ue(e) {
|
|
|
277
277
|
return {
|
|
278
278
|
"dcatde:politicalGeocodingURI": (t = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : t.map((i) => {
|
|
279
279
|
var s;
|
|
280
|
-
const
|
|
280
|
+
const g = {
|
|
281
281
|
districtKey: "Kreis",
|
|
282
282
|
governmentDistrictKey: "Bezirk",
|
|
283
283
|
municipalityKey: "Gemeindeschlüssel",
|
|
@@ -286,7 +286,7 @@ function ue(e) {
|
|
|
286
286
|
regionalKey: "Regionalschlüssel"
|
|
287
287
|
};
|
|
288
288
|
let l = i["@id"].split("/").slice(-2, -1)[0];
|
|
289
|
-
return l =
|
|
289
|
+
return l = g[l] || l, {
|
|
290
290
|
isValid: !0,
|
|
291
291
|
uri: i["@id"],
|
|
292
292
|
id: ((s = i.prefLabel) == null ? void 0 : s.de) || i["@id"].split("/").pop(),
|
|
@@ -294,8 +294,8 @@ function ue(e) {
|
|
|
294
294
|
inVoc: l
|
|
295
295
|
};
|
|
296
296
|
}),
|
|
297
|
-
"dcat:temporalResolution": (r = e["dct:temporal"]) == null ? void 0 : r.reduce((i,
|
|
298
|
-
const l = a(
|
|
297
|
+
"dcat:temporalResolution": (r = e["dct:temporal"]) == null ? void 0 : r.reduce((i, n) => {
|
|
298
|
+
const l = a(n["dcat:startDate"]), s = a(n["dcat:endDate"]), m = b(l) || "", y = b(s) || "", h = typeof l != "string" && (l == null ? void 0 : l["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", v = h === "date" ? m : m.split("T")[0], T = h === "date" ? y : y.split("T")[0], L = h === "dateTime" ? m.split("T")[1] : "", B = h === "dateTime" ? y.split("T")[1] : "";
|
|
299
299
|
return {
|
|
300
300
|
isValid: !0,
|
|
301
301
|
type: "dct:PeriodOfTime",
|
|
@@ -313,34 +313,34 @@ function ue(e) {
|
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
function pe(e, t) {
|
|
316
|
-
var i,
|
|
316
|
+
var i, n, g, l, s, m, y, h, v, T, L, B, U, I, S, f, D, A, P, c, R, x, z, M, j, G;
|
|
317
317
|
if (!e)
|
|
318
318
|
return {};
|
|
319
319
|
const r = a(e["spdx:checksum"]);
|
|
320
320
|
return {
|
|
321
321
|
isValid: !0,
|
|
322
322
|
id: t + 1,
|
|
323
|
-
"dcat:accessURL":
|
|
324
|
-
"dcat:downloadURL": ((i = e["dcat:downloadURL"]) == null ? void 0 : i.map((
|
|
325
|
-
"@id":
|
|
323
|
+
"dcat:accessURL": b(a(e["dcat:accessURL"])) || "",
|
|
324
|
+
"dcat:downloadURL": ((i = e["dcat:downloadURL"]) == null ? void 0 : i.map((p) => ({
|
|
325
|
+
"@id": b(p)
|
|
326
326
|
}))) || [{ "@id": "" }],
|
|
327
327
|
"dct:format": {
|
|
328
328
|
// redundancy in label and title for better compatibility
|
|
329
|
-
label: ((
|
|
330
|
-
title: ((
|
|
329
|
+
label: ((n = a(e["dct:format"])) == null ? void 0 : n["purl:identifier"]) || "",
|
|
330
|
+
title: ((g = a(e["dct:format"])) == null ? void 0 : g["purl:identifier"]) || "",
|
|
331
331
|
uri: ((l = a(e["dct:format"])) == null ? void 0 : l["@id"]) || ""
|
|
332
332
|
},
|
|
333
333
|
"dct:title": d(e["dct:title"]),
|
|
334
334
|
"dct:description": d(e["dct:description"]),
|
|
335
|
-
"dct:modified":
|
|
336
|
-
"dct:issued":
|
|
337
|
-
"dcat:byteSize":
|
|
335
|
+
"dct:modified": b(a(e["dct:modified"])),
|
|
336
|
+
"dct:issued": b(a(e["dct:issued"])),
|
|
337
|
+
"dcat:byteSize": b(a(e["dcat:byteSize"])),
|
|
338
338
|
"dcatde:licenseAttributionByText": d(e["dcatapde:licenseAttributionByText"]) || "",
|
|
339
339
|
"dct:license": e["dct:license"] ? {
|
|
340
340
|
isValid: !0,
|
|
341
341
|
uri: ((s = a(e["dct:license"])) == null ? void 0 : s["@id"]) || "",
|
|
342
342
|
"dcterms:license": d(
|
|
343
|
-
(
|
|
343
|
+
(m = a(e["dct:license"])) == null ? void 0 : m.altLabel
|
|
344
344
|
) || "",
|
|
345
345
|
label: d(
|
|
346
346
|
(y = a(e["dct:license"])) == null ? void 0 : y.prefLabel
|
|
@@ -357,66 +357,69 @@ function pe(e, t) {
|
|
|
357
357
|
title: ((L = a(e["dcatap:availability"])) == null ? void 0 : L.prefLabel) || "",
|
|
358
358
|
uri: ((B = a(e["dcatap:availability"])) == null ? void 0 : B["@id"]) || ""
|
|
359
359
|
},
|
|
360
|
-
"dct:language": ((U = e["dct:language"]) == null ? void 0 : U.map((
|
|
360
|
+
"dct:language": ((I = (U = e["dct:language"]) == null ? void 0 : U.map((p) => V(p))) == null ? void 0 : I.map((p) => ({
|
|
361
|
+
...p,
|
|
362
|
+
label: p["@value"] || p.label || ""
|
|
363
|
+
})).filter(Boolean)) || [],
|
|
361
364
|
"dcat:mediaType": q({
|
|
362
365
|
label: d(
|
|
363
|
-
(
|
|
366
|
+
(S = a(e["dcat:mediaType"])) == null ? void 0 : S.prefLabel
|
|
364
367
|
) || "",
|
|
365
|
-
uri: ((
|
|
368
|
+
uri: ((f = a(e["dcat:mediaType"])) == null ? void 0 : f["@id"]) || ""
|
|
366
369
|
}),
|
|
367
370
|
"dcat:compressFormat": q({
|
|
368
371
|
label: d(
|
|
369
|
-
(
|
|
372
|
+
(D = a(e["dcat:compressFormat"])) == null ? void 0 : D.prefLabel
|
|
370
373
|
) || "",
|
|
371
|
-
uri: ((
|
|
374
|
+
uri: ((A = a(e["dcat:compressFormat"])) == null ? void 0 : A["@id"]) || ""
|
|
372
375
|
}),
|
|
373
376
|
"dcat:packageFormat": q({
|
|
374
377
|
label: d(
|
|
375
|
-
(
|
|
378
|
+
(P = a(e["dcat:packageFormat"])) == null ? void 0 : P.prefLabel
|
|
376
379
|
) || "",
|
|
377
|
-
uri: ((
|
|
380
|
+
uri: ((c = a(e["dcat:packageFormat"])) == null ? void 0 : c["@id"]) || ""
|
|
378
381
|
}),
|
|
379
382
|
"adms:status": {
|
|
380
|
-
uri: ((
|
|
381
|
-
"@value": d((
|
|
383
|
+
uri: ((R = a(e["adms:status"])) == null ? void 0 : R["@id"]) || "",
|
|
384
|
+
"@value": d((x = a(e["adms:status"])) == null ? void 0 : x.prefLabel) || ""
|
|
382
385
|
},
|
|
383
386
|
checksum: {
|
|
384
|
-
title:
|
|
385
|
-
"spdx:checksum": ((
|
|
386
|
-
uri: (M =
|
|
387
|
+
title: b(a(r == null ? void 0 : r["spdx:checksumValue"])),
|
|
388
|
+
"spdx:checksum": ((z = b(a(r == null ? void 0 : r["spdx:algorithm"]))) == null ? void 0 : z.split("_").pop()) || "",
|
|
389
|
+
uri: (M = b(
|
|
387
390
|
a(r == null ? void 0 : r["spdx:algorithm"])
|
|
388
391
|
)) == null ? void 0 : M.replace("spdx:", "http://spdx.org/rdf/terms#")
|
|
389
392
|
},
|
|
390
393
|
accessServices: he(e["dcat:accessService"] || []),
|
|
391
|
-
conformsToItems: (j = e["dct:conformsTo"]) == null ? void 0 : j.map((
|
|
394
|
+
conformsToItems: (j = e["dct:conformsTo"]) == null ? void 0 : j.map((p, o) => ({
|
|
392
395
|
// for some reason dct:conformsTo is different from the one on dcat:dataset level
|
|
393
|
-
id:
|
|
394
|
-
"dcat:accessURL":
|
|
395
|
-
"dct:title": d(
|
|
396
|
-
"dcat:downloadURL":
|
|
396
|
+
id: o + 1,
|
|
397
|
+
"dcat:accessURL": p["@id"],
|
|
398
|
+
"dct:title": d(p["rdfs:label"]) || "",
|
|
399
|
+
"dcat:downloadURL": p["@id"],
|
|
397
400
|
// redundancy to match properties on dcat:dataset level
|
|
398
|
-
"rdfs:label": d(
|
|
399
|
-
uri:
|
|
401
|
+
"rdfs:label": d(p["rdfs:label"]) || "",
|
|
402
|
+
uri: p["@id"]
|
|
400
403
|
})).filter(Boolean),
|
|
401
|
-
policyItems: ((G = e["odrl:hasPolicy"]) == null ? void 0 : G.map((
|
|
404
|
+
policyItems: ((G = e["odrl:hasPolicy"]) == null ? void 0 : G.map((p, o) => ({
|
|
402
405
|
// don't ask
|
|
403
|
-
id:
|
|
404
|
-
"dcat:downloadURL":
|
|
405
|
-
"dcat:accessURL":
|
|
406
|
+
id: o + 1,
|
|
407
|
+
"dcat:downloadURL": p["@id"],
|
|
408
|
+
"dcat:accessURL": p["@id"]
|
|
406
409
|
}))) || [{ id: 1, "dcat:downloadURL": "", "dcat:accessURL": "" }],
|
|
407
410
|
documentations: Re(e["foaf:page"] || [])
|
|
408
411
|
};
|
|
409
412
|
}
|
|
410
413
|
function me(e) {
|
|
411
|
-
var r, i,
|
|
414
|
+
var r, i, n, g, l;
|
|
412
415
|
const t = {
|
|
413
416
|
"dcat:distribution": []
|
|
414
417
|
};
|
|
415
418
|
if (e["dcat:distribution"]) {
|
|
416
|
-
const s =
|
|
417
|
-
t["dcat:distribution"] = s.map((
|
|
419
|
+
const s = F(e["dcat:distribution"]);
|
|
420
|
+
t["dcat:distribution"] = s.map((m, y) => pe(m, y)).filter((m) => Object.keys(m).length > 0);
|
|
418
421
|
}
|
|
419
|
-
return t["dct:license"] = [{ ...(i = (r = e["dcat:distribution"]) == null ? void 0 : r[0]) == null ? void 0 : i["dct:license"], "dcterms:license": d((l = (
|
|
422
|
+
return t["dct:license"] = [{ ...(i = (r = e["dcat:distribution"]) == null ? void 0 : r[0]) == null ? void 0 : i["dct:license"], "dcterms:license": d((l = (g = (n = e["dcat:distribution"]) == null ? void 0 : n[0]) == null ? void 0 : g["dct:license"]) == null ? void 0 : l.altLabel) }], console.log(t), t;
|
|
420
423
|
}
|
|
421
424
|
function be(e) {
|
|
422
425
|
return {
|
|
@@ -424,28 +427,28 @@ function be(e) {
|
|
|
424
427
|
};
|
|
425
428
|
}
|
|
426
429
|
function ge(e) {
|
|
427
|
-
var r, i,
|
|
430
|
+
var r, i, n, g, l, s, m, y, h, v, T, L, B, U, I, S, f, D, A, P, c, R, x, z, M, j, G, p;
|
|
428
431
|
const t = {
|
|
429
|
-
"dct:language": (r = e["dct:language"]) == null ? void 0 : r.map((
|
|
430
|
-
"dcatde:politicalGeocodingLevelURI": (i = e["dcatapde:politicalGeocodingLevelURI"]) == null ? void 0 : i.map((
|
|
431
|
-
uri:
|
|
432
|
-
"@value": d(
|
|
432
|
+
"dct:language": (r = e["dct:language"]) == null ? void 0 : r.map((o) => V(o)).filter(Boolean),
|
|
433
|
+
"dcatde:politicalGeocodingLevelURI": (i = e["dcatapde:politicalGeocodingLevelURI"]) == null ? void 0 : i.map((o) => ({
|
|
434
|
+
uri: o["@id"],
|
|
435
|
+
"@value": d(o.prefLabel)
|
|
433
436
|
})),
|
|
434
|
-
"dct:conformsTo": (
|
|
435
|
-
"rdfs:label": d(
|
|
436
|
-
"@id":
|
|
437
|
+
"dct:conformsTo": (n = e["dct:conformsTo"]) == null ? void 0 : n.map((o) => ({
|
|
438
|
+
"rdfs:label": d(o["rdfs:label"]) || "",
|
|
439
|
+
"@id": o["@id"]
|
|
437
440
|
})).filter(Boolean),
|
|
438
441
|
"dct:accessRights": e["dct:accessRights"] ? u(V(e["dct:accessRights"])) : [],
|
|
439
|
-
"dct:issued":
|
|
440
|
-
"dct:provenance": (
|
|
441
|
-
"rdfs:label": d(
|
|
442
|
-
uri:
|
|
442
|
+
"dct:issued": F(e["dct:issued"]),
|
|
443
|
+
"dct:provenance": (g = e["dct:provenance"]) == null ? void 0 : g.map((o) => ({
|
|
444
|
+
"rdfs:label": d(o["rdfs:label"]) || "",
|
|
445
|
+
uri: o["@id"]
|
|
443
446
|
})).filter(Boolean),
|
|
444
447
|
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? u(V(e["dct:accrualPeriodicity"])) : [],
|
|
445
|
-
"dct:type": (l = e["dct:type"]) == null ? void 0 : l.map((
|
|
448
|
+
"dct:type": (l = e["dct:type"]) == null ? void 0 : l.map((o) => V(o)).filter(Boolean),
|
|
446
449
|
"dcat:spatialResolutionInMeters": ((s = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : s.map(H)) || void 0,
|
|
447
|
-
"dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(H).map((
|
|
448
|
-
const O =
|
|
450
|
+
"dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(H).map((o) => {
|
|
451
|
+
const O = o["@value"].match(
|
|
449
452
|
/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
|
|
450
453
|
);
|
|
451
454
|
if (O) {
|
|
@@ -462,21 +465,21 @@ function ge(e) {
|
|
|
462
465
|
];
|
|
463
466
|
}
|
|
464
467
|
}).filter(Boolean).flat() : void 0,
|
|
465
|
-
"dcat:qualifiedRelation": (
|
|
468
|
+
"dcat:qualifiedRelation": (m = u(
|
|
466
469
|
e["dcat:qualifiedRelation"]
|
|
467
|
-
)) == null ? void 0 :
|
|
470
|
+
)) == null ? void 0 : m.filter(Boolean),
|
|
468
471
|
"dct:creator": (y = u(e["dct:creator"])) == null ? void 0 : y.filter(Boolean),
|
|
469
472
|
"dct:contributor": (h = u(e["dct:contributor"])) == null ? void 0 : h.filter(Boolean),
|
|
470
|
-
"dcatde:contributorID": (v = e["dcatapde:contributorID"]) == null ? void 0 : v.map((
|
|
473
|
+
"dcatde:contributorID": (v = e["dcatapde:contributorID"]) == null ? void 0 : v.map((o) => V(o)).filter(Boolean),
|
|
471
474
|
"dcatde:geocodingDescription": (T = u(
|
|
472
475
|
e["dcatapde:geocodingDescription"]
|
|
473
476
|
)) == null ? void 0 : T.filter(Boolean),
|
|
474
|
-
"dct:identifier": (L = e["dct:identifier"]) == null ? void 0 : L.map((
|
|
475
|
-
"@value":
|
|
477
|
+
"dct:identifier": (L = e["dct:identifier"]) == null ? void 0 : L.map((o) => ({
|
|
478
|
+
"@value": o
|
|
476
479
|
})),
|
|
477
480
|
"adms:identifier": (B = u(e["adms:identifier"])) == null ? void 0 : B.filter(Boolean),
|
|
478
|
-
"owl:versionInfo": (U = e["owl:versionInfo"]) == null ? void 0 : U.map((
|
|
479
|
-
"@value":
|
|
481
|
+
"owl:versionInfo": (U = e["owl:versionInfo"]) == null ? void 0 : U.map((o) => ({
|
|
482
|
+
"@value": o
|
|
480
483
|
})),
|
|
481
484
|
"adms:versionNotes": e["adms:versionNotes"],
|
|
482
485
|
"dcatde:legalBasis": (I = u(e["dcatapde:legalBasis"])) == null ? void 0 : I.filter(
|
|
@@ -498,32 +501,32 @@ function ge(e) {
|
|
|
498
501
|
"prov:qualifiedAttribution": (x = u(
|
|
499
502
|
e["prov:qualifiedAttribution"]
|
|
500
503
|
)) == null ? void 0 : x.filter(Boolean),
|
|
501
|
-
"dcat:keyword": (
|
|
502
|
-
"dct:spatial": (
|
|
504
|
+
"dcat:keyword": (z = u(e["dcat:keyword"])) == null ? void 0 : z.filter(Boolean),
|
|
505
|
+
"dct:spatial": (M = u(e["dct:spatial"])) == null ? void 0 : M.filter((o) => o ? !o["@id"].startsWith(
|
|
503
506
|
"http://dcat-ap.de/def/politicalGeocoding/"
|
|
504
507
|
) : !1).filter(Boolean),
|
|
505
|
-
"dct:references": (
|
|
506
|
-
"foaf:page": (
|
|
507
|
-
if (!
|
|
508
|
+
"dct:references": (j = u(e["dct:references"])) == null ? void 0 : j.filter(Boolean),
|
|
509
|
+
"foaf:page": (G = u(e["foaf:page"])) == null ? void 0 : G.filter(Boolean).map((o) => {
|
|
510
|
+
if (!o)
|
|
508
511
|
return;
|
|
509
|
-
const w = a(
|
|
512
|
+
const w = a(o["dct:format"]);
|
|
510
513
|
return {
|
|
511
|
-
"dct:title": a(
|
|
512
|
-
"dct:description": a(
|
|
514
|
+
"dct:title": a(o["dct:title"]),
|
|
515
|
+
"dct:description": a(o["dct:description"]),
|
|
513
516
|
"@value": w ? d(w.prefLabel) : "",
|
|
514
517
|
uri: w ? w["@id"] : "",
|
|
515
|
-
"foaf:homepage": a(
|
|
518
|
+
"foaf:homepage": a(o["foaf:homepage"]) || ""
|
|
516
519
|
};
|
|
517
520
|
}),
|
|
518
|
-
"dcatap:availability": (
|
|
519
|
-
(
|
|
521
|
+
"dcatap:availability": (p = e["dcatap:availability"]) == null ? void 0 : p.map(
|
|
522
|
+
(o) => {
|
|
520
523
|
var w, O, K, C;
|
|
521
524
|
return {
|
|
522
525
|
// Redundant label and title for better compatibility
|
|
523
|
-
label: ((w = a(
|
|
524
|
-
title: ((O = a(
|
|
525
|
-
uri: ((K = a(
|
|
526
|
-
"@value": d((C = a(
|
|
526
|
+
label: ((w = a(o)) == null ? void 0 : w.prefLabel) || "",
|
|
527
|
+
title: ((O = a(o)) == null ? void 0 : O.prefLabel) || "",
|
|
528
|
+
uri: ((K = a(o)) == null ? void 0 : K["@id"]) || "",
|
|
529
|
+
"@value": d((C = a(o)) == null ? void 0 : C.prefLabel) || ""
|
|
527
530
|
};
|
|
528
531
|
}
|
|
529
532
|
)
|
|
@@ -543,11 +546,11 @@ function ye(e, t) {
|
|
|
543
546
|
}
|
|
544
547
|
function he(e) {
|
|
545
548
|
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t, r) => {
|
|
546
|
-
var i,
|
|
549
|
+
var i, n;
|
|
547
550
|
return {
|
|
548
551
|
id: r + 1,
|
|
549
552
|
"dcat:downloadURL": ((i = a(t["dcat:endpointURL"])) == null ? void 0 : i["@id"]) || "",
|
|
550
|
-
"dcat:endpointURL": ((
|
|
553
|
+
"dcat:endpointURL": ((n = a(t["dcat:endpointURL"])) == null ? void 0 : n["@id"]) || "",
|
|
551
554
|
"dct:description": d(t["dct:description"]) || "",
|
|
552
555
|
"dct:title": d(t["dct:title"]) || ""
|
|
553
556
|
};
|
|
@@ -555,24 +558,24 @@ function he(e) {
|
|
|
555
558
|
}
|
|
556
559
|
function Re(e) {
|
|
557
560
|
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t, r) => {
|
|
558
|
-
var i,
|
|
561
|
+
var i, n, g;
|
|
559
562
|
return {
|
|
560
563
|
id: r + 1,
|
|
561
564
|
"dcat:downloadURL": ((i = a(t["dcat:accessURL"])) == null ? void 0 : i["@id"]) || "",
|
|
562
|
-
"dcat:accessURL": ((
|
|
565
|
+
"dcat:accessURL": ((n = a(t["dcat:accessURL"])) == null ? void 0 : n["@id"]) || "",
|
|
563
566
|
"dct:description": d(t["dct:description"]) || "",
|
|
564
567
|
"dct:title": d(t["dct:title"]) || "",
|
|
565
568
|
"dct:format": t["dct:format"] ? d(a(t["dct:format"]).prefLabel) : "",
|
|
566
|
-
formatUri: t["dct:format"] && ((
|
|
569
|
+
formatUri: t["dct:format"] && ((g = V(a(t["dct:format"]))) == null ? void 0 : g.uri) || ""
|
|
567
570
|
};
|
|
568
571
|
});
|
|
569
572
|
}
|
|
570
573
|
export {
|
|
571
574
|
u as asSomeArray,
|
|
572
575
|
d as extractLocalizedString,
|
|
573
|
-
|
|
576
|
+
b as extractStringValue,
|
|
574
577
|
a as getFirstItem,
|
|
575
|
-
|
|
578
|
+
F as normalizeToArray,
|
|
576
579
|
ce as purgeNullishAndEmptyProperties,
|
|
577
580
|
he as toAccessService,
|
|
578
581
|
Re as toDocument,
|