@piveau/dpi 0.1.0-beta.6 → 0.1.0-beta.61
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/DPIMenu.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +58 -53
- package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +78 -66
- package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +11 -10
- package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +101 -76
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +7 -7
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +434 -360
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +103 -71
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +17 -22
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +130 -77
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +91 -61
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +111 -74
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +170 -99
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +109 -52
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +65 -86
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +29 -28
- package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +159 -103
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +571 -207
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +100 -53
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +52 -57
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +301 -100
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +46 -27
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +71 -38
- package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +182 -105
- package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +19 -14
- package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
- package/dist/data-provider-interface/components/ContactPage.vue.js +148 -100
- package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +32 -32
- package/dist/data-provider-interface/components/DistLicense.vue.js +198 -99
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +879 -843
- package/dist/data-provider-interface/components/Dropup.vue.js +6 -6
- package/dist/data-provider-interface/components/HVDPage.vue.js +107 -85
- package/dist/data-provider-interface/components/InfoSlot.vue.js +5 -5
- package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +89 -46
- package/dist/data-provider-interface/components/PublisherPage.vue.js +111 -81
- package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +328 -265
- package/dist/data-provider-interface/components/TempResPage.vue.js +267 -187
- package/dist/data-provider-interface/components/TempResPageInModal.vue.js +395 -0
- package/dist/data-provider-interface/components/TitelPage.vue.js +4 -4
- package/dist/data-provider-interface/components/UpdateDate.vue.js +33 -29
- package/dist/data-provider-interface/components/dpiV3Description.vue.js +7 -6
- package/dist/data-provider-interface/composables/useDpiContext.js +5 -7
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +397 -244
- package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +1 -1
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +472 -95
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +104 -152
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +10 -3
- package/dist/data-provider-interface/store/modules/authStore.js +11 -11
- package/dist/data-provider-interface/views/DraftsPage.vue.js +3 -3
- package/dist/data-provider-interface/views/InputPage.vue.js +377 -750
- package/dist/styles/_dpi.scss +1614 -0
- package/dist/styles/_maps.scss +24 -0
- package/dist/styles/_variables.scss +973 -0
- package/package.json +28 -19
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +0 -41
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +0 -46
|
@@ -1,75 +1,83 @@
|
|
|
1
|
-
import { toRef as
|
|
2
|
-
import { useAsyncState as
|
|
3
|
-
import { defineJsonldResolver as
|
|
4
|
-
import { isEmpty as
|
|
5
|
-
function
|
|
1
|
+
import { toRef as ee, ref as te, toValue as N, computed as O, watch as E } from "vue";
|
|
2
|
+
import { useAsyncState as ie } from "@vueuse/core";
|
|
3
|
+
import { defineJsonldResolver as re, dcatDatasetTransformer as oe, datasetResolvers as ae } from "@piveau/jsonld";
|
|
4
|
+
import { isEmpty as ne } from "lodash-es";
|
|
5
|
+
function V(e) {
|
|
6
6
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
7
7
|
}
|
|
8
8
|
function o(e) {
|
|
9
9
|
if (e != null)
|
|
10
10
|
return Array.isArray(e) ? e[0] : e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function s(e) {
|
|
13
13
|
return Array.isArray(e) ? e : e ? [e] : void 0;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return Object.fromEntries(
|
|
15
|
+
function ce(e) {
|
|
16
|
+
return Object.fromEntries(
|
|
17
|
+
Object.entries(e).filter(
|
|
18
|
+
([r, t]) => t != null && !ne(t)
|
|
19
|
+
)
|
|
20
|
+
);
|
|
17
21
|
}
|
|
18
|
-
function
|
|
19
|
-
const { enabled: t, hubSearchUrl:
|
|
20
|
-
baseUrl:
|
|
21
|
-
resolvers:
|
|
22
|
-
transformer:
|
|
23
|
-
}),
|
|
22
|
+
function De(e, r) {
|
|
23
|
+
const { enabled: t, hubSearchUrl: i } = r, n = ee(t), { safeTransform: f } = re({
|
|
24
|
+
baseUrl: i,
|
|
25
|
+
resolvers: ae(),
|
|
26
|
+
transformer: oe
|
|
27
|
+
}), c = te([]), {
|
|
24
28
|
state: m,
|
|
25
|
-
isReady:
|
|
26
|
-
isLoading:
|
|
27
|
-
error:
|
|
28
|
-
execute:
|
|
29
|
-
} =
|
|
29
|
+
isReady: g,
|
|
30
|
+
isLoading: y,
|
|
31
|
+
error: b,
|
|
32
|
+
execute: B
|
|
33
|
+
} = ie(
|
|
30
34
|
async () => {
|
|
31
|
-
var
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
35
|
+
var D;
|
|
36
|
+
const l = await f(N(e));
|
|
37
|
+
if (l.error)
|
|
38
|
+
return c.value.push({
|
|
35
39
|
code: "transform_failed",
|
|
36
|
-
message:
|
|
40
|
+
message: l.error.message
|
|
37
41
|
}), null;
|
|
38
|
-
const
|
|
39
|
-
return (!
|
|
42
|
+
const h = l.data;
|
|
43
|
+
return (!h || !((D = h["dpi:isDPIv3"]) != null && D["@value"])) && c.value.push({
|
|
40
44
|
code: "not_dpi_v3",
|
|
41
|
-
message: `The dataset is not a DPI v3 dataset. ID ${
|
|
45
|
+
message: `The dataset is not a DPI v3 dataset. ID ${h["@id"]}`
|
|
42
46
|
}), {
|
|
43
|
-
dpiData:
|
|
44
|
-
data:
|
|
47
|
+
dpiData: ye(h),
|
|
48
|
+
data: h
|
|
45
49
|
};
|
|
46
50
|
},
|
|
47
51
|
null,
|
|
48
52
|
{ immediate: !1 }
|
|
49
|
-
),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
), R = O(
|
|
54
|
+
() => n.value && !y.value && !!g.value
|
|
55
|
+
), L = O(
|
|
56
|
+
() => n.value && !!R.value
|
|
57
|
+
), v = O(() => L.value), w = O(() => {
|
|
58
|
+
var l;
|
|
59
|
+
return (l = m.value) == null ? void 0 : l.dpiData;
|
|
60
|
+
}), P = O(() => {
|
|
61
|
+
var l;
|
|
62
|
+
return (l = m.value) == null ? void 0 : l.data;
|
|
55
63
|
});
|
|
56
|
-
return
|
|
57
|
-
() =>
|
|
58
|
-
(
|
|
59
|
-
),
|
|
60
|
-
console.log("jsonld resolved result:",
|
|
61
|
-
}),
|
|
62
|
-
console.log("jsonld error:",
|
|
64
|
+
return E(
|
|
65
|
+
() => N(e),
|
|
66
|
+
(l) => l && n.value ? B() : null
|
|
67
|
+
), E(P, (l) => {
|
|
68
|
+
console.log("jsonld resolved result:", l);
|
|
69
|
+
}), E(b, (l) => {
|
|
70
|
+
console.log("jsonld error:", l);
|
|
63
71
|
}), {
|
|
64
72
|
processedInput: m,
|
|
65
|
-
isProcessedInputReady:
|
|
66
|
-
result:
|
|
67
|
-
isMaterialized:
|
|
68
|
-
isReady:
|
|
69
|
-
errors:
|
|
73
|
+
isProcessedInputReady: R,
|
|
74
|
+
result: w,
|
|
75
|
+
isMaterialized: L,
|
|
76
|
+
isReady: v,
|
|
77
|
+
errors: c
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
|
-
function
|
|
80
|
+
function u(e) {
|
|
73
81
|
if (typeof e == "string")
|
|
74
82
|
return e;
|
|
75
83
|
if (e && typeof e == "object") {
|
|
@@ -80,305 +88,450 @@ function a(e) {
|
|
|
80
88
|
}
|
|
81
89
|
return "";
|
|
82
90
|
}
|
|
83
|
-
function
|
|
84
|
-
return o(e);
|
|
85
|
-
}
|
|
86
|
-
function s(e, i = "de") {
|
|
91
|
+
function d(e, r = "de") {
|
|
87
92
|
if (!e)
|
|
88
93
|
return "";
|
|
89
94
|
if (typeof e == "string")
|
|
90
95
|
return e;
|
|
91
96
|
if (typeof e == "object" && !Array.isArray(e) && !e["@value"] && !e["@id"])
|
|
92
|
-
return e[
|
|
97
|
+
return e[r] || Object.values(e)[0] || "";
|
|
93
98
|
if (Array.isArray(e)) {
|
|
94
|
-
const t = e.find(
|
|
99
|
+
const t = e.find(
|
|
100
|
+
(n) => n["@language"] === r
|
|
101
|
+
);
|
|
95
102
|
if (t)
|
|
96
103
|
return t["@value"] || "";
|
|
97
|
-
const
|
|
98
|
-
return (
|
|
104
|
+
const i = e[0];
|
|
105
|
+
return (i == null ? void 0 : i["@value"]) || u(i) || "";
|
|
99
106
|
}
|
|
100
|
-
return e["@language"] && e["@value"] ? e["@value"] :
|
|
101
|
-
}
|
|
102
|
-
function j(e) {
|
|
103
|
-
return s(e);
|
|
107
|
+
return e["@language"] && e["@value"] ? e["@value"] : u(e);
|
|
104
108
|
}
|
|
105
|
-
function
|
|
109
|
+
function K(e) {
|
|
106
110
|
return {
|
|
107
111
|
uri: e.uri,
|
|
108
|
-
|
|
112
|
+
label: e.label,
|
|
113
|
+
//
|
|
114
|
+
"@value": e.label
|
|
109
115
|
};
|
|
110
116
|
}
|
|
111
|
-
function
|
|
117
|
+
function T(e, r) {
|
|
112
118
|
const t = e.prefLabel;
|
|
113
|
-
return
|
|
119
|
+
return K({
|
|
114
120
|
uri: e["@id"] || e["purl:identifier"] || "",
|
|
115
|
-
|
|
121
|
+
label: t ? d(t) : e["purl:identifier"] || ""
|
|
116
122
|
});
|
|
117
123
|
}
|
|
118
|
-
function
|
|
124
|
+
function H(e) {
|
|
125
|
+
return typeof e == "string" ? {
|
|
126
|
+
"@value": e
|
|
127
|
+
} : e;
|
|
128
|
+
}
|
|
129
|
+
function S(e, r = !0) {
|
|
119
130
|
return {
|
|
120
|
-
isValid:
|
|
131
|
+
isValid: r,
|
|
121
132
|
...e
|
|
122
133
|
};
|
|
123
134
|
}
|
|
124
|
-
function
|
|
125
|
-
return e ?
|
|
126
|
-
"@value":
|
|
127
|
-
"@language":
|
|
128
|
-
}) :
|
|
129
|
-
"@value":
|
|
130
|
-
"@language":
|
|
131
|
-
}) :
|
|
132
|
-
"@value":
|
|
133
|
-
"@language":
|
|
134
|
-
}) :
|
|
135
|
+
function X(e, r = "de") {
|
|
136
|
+
return e ? V(e).map((i) => typeof i == "string" ? S({
|
|
137
|
+
"@value": i,
|
|
138
|
+
"@language": r
|
|
139
|
+
}) : i && typeof i == "object" ? i["@language"] && i["@value"] ? S({
|
|
140
|
+
"@value": i["@value"],
|
|
141
|
+
"@language": i["@language"]
|
|
142
|
+
}) : S({
|
|
143
|
+
"@value": u(i),
|
|
144
|
+
"@language": r
|
|
145
|
+
}) : S({
|
|
135
146
|
"@value": "",
|
|
136
|
-
"@language":
|
|
147
|
+
"@language": r
|
|
137
148
|
})) : [];
|
|
138
149
|
}
|
|
139
|
-
function
|
|
140
|
-
return e ?
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
150
|
+
function de(e, r) {
|
|
151
|
+
return e ? V(e).map(
|
|
152
|
+
(i) => S({
|
|
153
|
+
"@type": r,
|
|
154
|
+
"@value": u(i)
|
|
155
|
+
})
|
|
156
|
+
) : [];
|
|
144
157
|
}
|
|
145
|
-
function
|
|
158
|
+
function Y(e, r) {
|
|
146
159
|
const t = { isValid: !0 };
|
|
147
|
-
for (const [
|
|
148
|
-
t[
|
|
160
|
+
for (const [i, n] of Object.entries(r))
|
|
161
|
+
t[i] = u(e == null ? void 0 : e[n]);
|
|
149
162
|
return t;
|
|
150
163
|
}
|
|
151
|
-
function
|
|
164
|
+
function le(e) {
|
|
152
165
|
return {
|
|
153
166
|
happyFlowLandingPage: {}
|
|
154
167
|
};
|
|
155
168
|
}
|
|
156
|
-
function
|
|
157
|
-
const
|
|
169
|
+
function se(e) {
|
|
170
|
+
const r = {
|
|
158
171
|
discoverabilityPage: [{ isValid: !0 }]
|
|
159
172
|
};
|
|
160
173
|
if (e["dcatap:hvdCategory"]) {
|
|
161
|
-
const t =
|
|
162
|
-
|
|
174
|
+
const t = V(
|
|
175
|
+
e["dcatap:hvdCategory"]
|
|
176
|
+
).filter(Boolean);
|
|
177
|
+
r.hvdPage = t == null ? void 0 : t.map((i) => ({
|
|
163
178
|
isValid: !0,
|
|
164
|
-
uri:
|
|
165
|
-
label:
|
|
179
|
+
uri: i["@id"],
|
|
180
|
+
label: d(i.prefLabel)
|
|
166
181
|
}));
|
|
167
182
|
}
|
|
168
183
|
if (e["dcat:theme"]) {
|
|
169
|
-
const t =
|
|
170
|
-
|
|
184
|
+
const t = V(e["dcat:theme"]);
|
|
185
|
+
r.discoverabilityPage = [
|
|
171
186
|
{ isValid: !0 },
|
|
172
|
-
...t.map(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
187
|
+
...t.map(
|
|
188
|
+
(i) => S({
|
|
189
|
+
id: u(i).split("/").pop(),
|
|
190
|
+
uri: u(i),
|
|
191
|
+
label: d(i.prefLabel)
|
|
192
|
+
})
|
|
193
|
+
)
|
|
177
194
|
];
|
|
178
195
|
}
|
|
179
|
-
return
|
|
196
|
+
return r;
|
|
180
197
|
}
|
|
181
|
-
function
|
|
182
|
-
var
|
|
198
|
+
function fe(e) {
|
|
199
|
+
var i;
|
|
183
200
|
const t = {
|
|
184
|
-
datasetID: ((
|
|
201
|
+
datasetID: ((i = e["@id"]) == null ? void 0 : i.split("/").pop()) || "",
|
|
185
202
|
"dct:title": [],
|
|
186
203
|
"dct:description": [],
|
|
187
204
|
"dct:modified": [""],
|
|
188
205
|
"dct:publisher": [],
|
|
189
206
|
"dcat:contactPoint": []
|
|
190
207
|
};
|
|
191
|
-
if (e["dct:title"] && (t["dct:title"] =
|
|
208
|
+
if (e["dct:title"] && (t["dct:title"] = X(e["dct:title"])), e["dct:description"] && (t["dct:description"] = X(
|
|
209
|
+
e["dct:description"]
|
|
210
|
+
)), e["dct:modified"] && (t["dct:modified"] = de(
|
|
192
211
|
e["dct:modified"],
|
|
193
212
|
"http://www.w3.org/2001/XMLSchema#date"
|
|
194
213
|
)), e["dct:publisher"]) {
|
|
195
214
|
const n = o(e["dct:publisher"]);
|
|
196
|
-
t["dct:publisher"] = [
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
215
|
+
t["dct:publisher"] = [
|
|
216
|
+
Y(n, {
|
|
217
|
+
"foaf:name": "foaf:name",
|
|
218
|
+
"foaf:mbox": "foaf:mbox",
|
|
219
|
+
"foaf:homepage": "foaf:homepage"
|
|
220
|
+
})
|
|
221
|
+
];
|
|
201
222
|
}
|
|
202
223
|
if (e["dcat:contactPoint"]) {
|
|
203
224
|
const n = o(e["dcat:contactPoint"]);
|
|
204
|
-
t["dcat:contactPoint"] = [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
225
|
+
t["dcat:contactPoint"] = [
|
|
226
|
+
Y(n, {
|
|
227
|
+
"vcard:fn": "vcard:fn",
|
|
228
|
+
"vcard:hasEmail": "vcard:hasEmail",
|
|
229
|
+
"vcard:hasTelephone": "vcard:hasTelephone"
|
|
230
|
+
})
|
|
231
|
+
];
|
|
209
232
|
}
|
|
210
233
|
return t;
|
|
211
234
|
}
|
|
212
|
-
function
|
|
235
|
+
function ue(e) {
|
|
236
|
+
var r, t;
|
|
213
237
|
return {
|
|
214
|
-
"dcatde:politicalGeocodingURI": [
|
|
215
|
-
|
|
216
|
-
{
|
|
238
|
+
"dcatde:politicalGeocodingURI": (r = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : r.map((i) => {
|
|
239
|
+
var m;
|
|
240
|
+
const f = {
|
|
241
|
+
districtKey: "Kreis",
|
|
242
|
+
governmentDistrictKey: "Bezirk",
|
|
243
|
+
municipalityKey: "Gemeindeschlüssel",
|
|
244
|
+
municipalAssociationKey: "Gemeindeverbände",
|
|
245
|
+
stateKey: "Bundesland",
|
|
246
|
+
regionalKey: "Regionalschlüssel"
|
|
247
|
+
};
|
|
248
|
+
let c = i["@id"].split("/").slice(-2, -1)[0];
|
|
249
|
+
return c = f[c] || c, {
|
|
250
|
+
isValid: !0,
|
|
251
|
+
uri: i["@id"],
|
|
252
|
+
id: ((m = i.prefLabel) == null ? void 0 : m.de) || i["@id"].split("/").pop(),
|
|
253
|
+
label: d(i.altLabel),
|
|
254
|
+
inVoc: c
|
|
255
|
+
};
|
|
256
|
+
}),
|
|
257
|
+
"dcat:temporalResolution": (t = e["dct:temporal"]) == null ? void 0 : t.reduce((i, n) => {
|
|
258
|
+
const c = o(n["dcat:startDate"]), m = o(n["dcat:endDate"]), g = u(c) || "", y = u(m) || "", b = typeof c != "string" && (c == null ? void 0 : c["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", B = b === "date" ? g : g.split("T")[0], R = b === "date" ? y : y.split("T")[0], L = b === "dateTime" ? g.split("T")[1] : "", v = b === "dateTime" ? y.split("T")[1] : "";
|
|
259
|
+
return {
|
|
217
260
|
isValid: !0,
|
|
218
261
|
type: "dct:PeriodOfTime",
|
|
219
262
|
"dct:temporal": [
|
|
220
263
|
{
|
|
221
|
-
dataType:
|
|
222
|
-
"dcat:startDate":
|
|
223
|
-
"dcat:endDate":
|
|
224
|
-
startTime: "
|
|
225
|
-
endTime: "
|
|
264
|
+
dataType: b,
|
|
265
|
+
"dcat:startDate": B,
|
|
266
|
+
"dcat:endDate": R,
|
|
267
|
+
startTime: L || "",
|
|
268
|
+
endTime: v || ""
|
|
226
269
|
}
|
|
227
270
|
]
|
|
228
|
-
}
|
|
229
|
-
|
|
271
|
+
};
|
|
272
|
+
}, {})
|
|
230
273
|
};
|
|
231
274
|
}
|
|
232
|
-
function
|
|
233
|
-
var
|
|
275
|
+
function pe(e, r) {
|
|
276
|
+
var i, n, f, c, m, g, y, b, B, R, L, v, w, P, l, h, U, D, x, F, j, z, M;
|
|
234
277
|
if (!e)
|
|
235
278
|
return {};
|
|
236
279
|
const t = o(e["spdx:checksum"]);
|
|
237
280
|
return {
|
|
238
281
|
isValid: !0,
|
|
239
|
-
id:
|
|
240
|
-
"dcat:accessURL":
|
|
282
|
+
id: r + 1,
|
|
283
|
+
"dcat:accessURL": u(o(e["dcat:accessURL"])) || "",
|
|
284
|
+
"dcat:downloadURL": ((i = e["dcat:downloadURL"]) == null ? void 0 : i.map((p) => ({
|
|
285
|
+
"@id": u(p)
|
|
286
|
+
}))) || [{ "@id": "" }],
|
|
241
287
|
"dct:format": {
|
|
242
|
-
|
|
243
|
-
|
|
288
|
+
// redundancy in label and title for better compatibility
|
|
289
|
+
label: ((n = o(e["dct:format"])) == null ? void 0 : n["purl:identifier"]) || "",
|
|
290
|
+
title: ((f = o(e["dct:format"])) == null ? void 0 : f["purl:identifier"]) || "",
|
|
291
|
+
uri: ((c = o(e["dct:format"])) == null ? void 0 : c["@id"]) || ""
|
|
244
292
|
},
|
|
245
|
-
"dct:title":
|
|
246
|
-
"dct:description":
|
|
247
|
-
"dct:modified":
|
|
248
|
-
"dct:issued":
|
|
249
|
-
"dcat:byteSize":
|
|
250
|
-
"dcatde:licenseAttributionByText": "",
|
|
251
|
-
"dct:
|
|
293
|
+
"dct:title": d(e["dct:title"]),
|
|
294
|
+
"dct:description": d(e["dct:description"]),
|
|
295
|
+
"dct:modified": u(o(e["dct:modified"])),
|
|
296
|
+
"dct:issued": u(o(e["dct:issued"])),
|
|
297
|
+
"dcat:byteSize": u(o(e["dcat:byteSize"])),
|
|
298
|
+
"dcatde:licenseAttributionByText": d(e["dcatapde:licenseAttributionByText"]) || "",
|
|
299
|
+
"dct:license": e["dct:license"] ? {
|
|
300
|
+
isValid: !0,
|
|
301
|
+
uri: ((m = o(e["dct:license"])) == null ? void 0 : m["@id"]) || "",
|
|
302
|
+
"dcterms:license": d(
|
|
303
|
+
(g = o(e["dct:license"])) == null ? void 0 : g.altLabel
|
|
304
|
+
) || "",
|
|
305
|
+
label: d(
|
|
306
|
+
(y = o(e["dct:license"])) == null ? void 0 : y.prefLabel
|
|
307
|
+
) || "",
|
|
308
|
+
title: d(e["dcatapde:licenseAttributionByText"]) || ""
|
|
309
|
+
} : {},
|
|
310
|
+
"dct:accessRights": e["dct:accessRights"] ? o(T(e["dct:accessRights"])) : [],
|
|
252
311
|
"dcatap:availability": {
|
|
253
|
-
|
|
254
|
-
|
|
312
|
+
// Redundant label and title for better compatibility
|
|
313
|
+
label: ((b = o(e["dcatap:availability"])) == null ? void 0 : b.prefLabel) || "",
|
|
314
|
+
title: ((B = o(e["dcatap:availability"])) == null ? void 0 : B.prefLabel) || "",
|
|
315
|
+
uri: ((R = o(e["dcatap:availability"])) == null ? void 0 : R["@id"]) || ""
|
|
255
316
|
},
|
|
256
|
-
"dct:language":
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
uri: ((R = o(e["dcat:mediaType"])) == null ? void 0 : R["@id"]) || ""
|
|
317
|
+
"dct:language": ((L = e["dct:language"]) == null ? void 0 : L.map((p) => T(p)).filter(Boolean)) || [],
|
|
318
|
+
"dcat:mediaType": K({
|
|
319
|
+
label: d(
|
|
320
|
+
(v = o(e["dcat:mediaType"])) == null ? void 0 : v.prefLabel
|
|
321
|
+
) || "",
|
|
322
|
+
uri: ((w = o(e["dcat:mediaType"])) == null ? void 0 : w["@id"]) || ""
|
|
263
323
|
}),
|
|
264
|
-
"dcat:compressFormat":
|
|
265
|
-
|
|
266
|
-
|
|
324
|
+
"dcat:compressFormat": K({
|
|
325
|
+
label: d(
|
|
326
|
+
(P = o(e["dcat:compressFormat"])) == null ? void 0 : P.prefLabel
|
|
327
|
+
) || "",
|
|
328
|
+
uri: ((l = o(e["dcat:compressFormat"])) == null ? void 0 : l["@id"]) || ""
|
|
267
329
|
}),
|
|
268
|
-
"dcat:packageFormat":
|
|
269
|
-
|
|
270
|
-
|
|
330
|
+
"dcat:packageFormat": K({
|
|
331
|
+
label: d(
|
|
332
|
+
(h = o(e["dcat:packageFormat"])) == null ? void 0 : h.prefLabel
|
|
333
|
+
) || "",
|
|
334
|
+
uri: ((U = o(e["dcat:packageFormat"])) == null ? void 0 : U["@id"]) || ""
|
|
271
335
|
}),
|
|
272
|
-
"adms:status":
|
|
336
|
+
"adms:status": {
|
|
337
|
+
uri: ((D = o(e["adms:status"])) == null ? void 0 : D["@id"]) || "",
|
|
338
|
+
"@value": d((x = o(e["adms:status"])) == null ? void 0 : x.prefLabel) || ""
|
|
339
|
+
},
|
|
273
340
|
checksum: {
|
|
274
|
-
title:
|
|
275
|
-
"spdx:checksum": ((
|
|
276
|
-
uri: (
|
|
341
|
+
title: u(o(t == null ? void 0 : t["spdx:checksumValue"])),
|
|
342
|
+
"spdx:checksum": ((F = u(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : F.split("_").pop()) || "",
|
|
343
|
+
uri: (j = u(
|
|
344
|
+
o(t == null ? void 0 : t["spdx:algorithm"])
|
|
345
|
+
)) == null ? void 0 : j.replace("spdx:", "http://spdx.org/rdf/terms#")
|
|
277
346
|
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
347
|
+
accessServices: he(e["dcat:accessService"] || []),
|
|
348
|
+
documentations: Re(e["foaf:page"] || []),
|
|
349
|
+
conformsToItems: (z = e["dct:conformsTo"]) == null ? void 0 : z.map((p, I) => ({
|
|
350
|
+
// for some reason dct:conformsTo is different from the one on dcat:dataset level
|
|
351
|
+
id: I + 1,
|
|
352
|
+
"dcat:accessURL": p["@id"],
|
|
353
|
+
"dct:title": d(p["rdfs:label"]) || "",
|
|
354
|
+
"dcat:downloadURL": p["@id"],
|
|
355
|
+
// redundancy to match properties on dcat:dataset level
|
|
356
|
+
"rdfs:label": d(p["rdfs:label"]) || "",
|
|
357
|
+
uri: p["@id"]
|
|
358
|
+
})).filter(Boolean),
|
|
359
|
+
policyItems: ((M = e["odrl:hasPolicy"]) == null ? void 0 : M.map((p, I) => ({
|
|
360
|
+
// don't ask
|
|
361
|
+
id: I + 1,
|
|
362
|
+
"dcat:downloadURL": p["@id"],
|
|
363
|
+
"dcat:accessURL": p["@id"]
|
|
364
|
+
}))) || [{ id: 1, "dcat:downloadURL": "", "dcat:accessURL": "" }]
|
|
286
365
|
};
|
|
287
366
|
}
|
|
288
|
-
function
|
|
289
|
-
var t;
|
|
290
|
-
const
|
|
291
|
-
"dcat:distribution": []
|
|
292
|
-
"dct:license": [{
|
|
293
|
-
label: ""
|
|
294
|
-
}]
|
|
367
|
+
function me(e) {
|
|
368
|
+
var t, i;
|
|
369
|
+
const r = {
|
|
370
|
+
"dcat:distribution": []
|
|
295
371
|
};
|
|
296
|
-
if (e["dct:license"]) {
|
|
297
|
-
const r = (t = L(e["dcat:distribution"]).find((n) => n["dct:license"])) == null ? void 0 : t["dct:license"];
|
|
298
|
-
i["dct:license"] = [
|
|
299
|
-
{
|
|
300
|
-
isValid: !0,
|
|
301
|
-
uri: (r == null ? void 0 : r["@id"]) || "",
|
|
302
|
-
label: s(r) || ""
|
|
303
|
-
}
|
|
304
|
-
];
|
|
305
|
-
}
|
|
306
372
|
if (e["dcat:distribution"]) {
|
|
307
|
-
const
|
|
308
|
-
|
|
373
|
+
const n = V(e["dcat:distribution"]);
|
|
374
|
+
r["dcat:distribution"] = n.map((f, c) => pe(f, c)).filter((f) => Object.keys(f).length > 0);
|
|
309
375
|
}
|
|
310
|
-
return i;
|
|
376
|
+
return r["dct:license"] = [(i = (t = r["dcat:distribution"]) == null ? void 0 : t[0]) == null ? void 0 : i["dct:license"]], console.log(r), r;
|
|
311
377
|
}
|
|
312
|
-
function
|
|
378
|
+
function be(e) {
|
|
313
379
|
return {
|
|
314
380
|
reviewAndPublishPage: [{ isValid: !0 }]
|
|
315
381
|
};
|
|
316
382
|
}
|
|
317
|
-
function
|
|
318
|
-
var t,
|
|
319
|
-
const
|
|
320
|
-
"dct:language": (t = e["dct:language"]) == null ? void 0 : t.map((
|
|
321
|
-
"
|
|
322
|
-
|
|
323
|
-
|
|
383
|
+
function ge(e) {
|
|
384
|
+
var t, i, n, f, c, m, g, y, b, B, R, L, v, w, P, l, h, U, D, x, F, j, z, M, p, I, C, q;
|
|
385
|
+
const r = {
|
|
386
|
+
"dct:language": (t = e["dct:language"]) == null ? void 0 : t.map((a) => T(a)).filter(Boolean),
|
|
387
|
+
"dcatde:politicalGeocodingLevelURI": (i = e["dcatapde:politicalGeocodingLevelURI"]) == null ? void 0 : i.map((a) => ({
|
|
388
|
+
uri: a["@id"],
|
|
389
|
+
"@value": d(a.prefLabel)
|
|
390
|
+
})),
|
|
391
|
+
"dct:conformsTo": (n = e["dct:conformsTo"]) == null ? void 0 : n.map((a) => ({
|
|
392
|
+
"rdfs:label": d(a["rdfs:label"]) || "",
|
|
393
|
+
"@id": a["@id"]
|
|
324
394
|
})).filter(Boolean),
|
|
325
|
-
"dct:accessRights": e["dct:accessRights"] ?
|
|
326
|
-
"dct:
|
|
327
|
-
|
|
328
|
-
|
|
395
|
+
"dct:accessRights": e["dct:accessRights"] ? s(T(e["dct:accessRights"])) : [],
|
|
396
|
+
"dct:issued": V(e["dct:issued"]),
|
|
397
|
+
"dct:provenance": (f = e["dct:provenance"]) == null ? void 0 : f.map((a) => ({
|
|
398
|
+
"rdfs:label": d(a["rdfs:label"]) || "",
|
|
399
|
+
uri: a["@id"]
|
|
329
400
|
})).filter(Boolean),
|
|
330
|
-
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ?
|
|
331
|
-
"dct:type": (
|
|
332
|
-
"dcat:spatialResolutionInMeters":
|
|
333
|
-
"dcat:temporalResolution":
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
401
|
+
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? s(T(e["dct:accrualPeriodicity"])) : [],
|
|
402
|
+
"dct:type": (c = e["dct:type"]) == null ? void 0 : c.map((a) => T(a)).filter(Boolean),
|
|
403
|
+
"dcat:spatialResolutionInMeters": ((m = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : m.map(H)) || void 0,
|
|
404
|
+
"dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(H).map((a) => {
|
|
405
|
+
const G = a["@value"].match(
|
|
406
|
+
/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
|
|
407
|
+
);
|
|
408
|
+
if (G) {
|
|
409
|
+
const [, _, k, $, J, W, Q] = G.map(
|
|
410
|
+
(Z) => Z || "0"
|
|
411
|
+
);
|
|
412
|
+
return [
|
|
413
|
+
{ Year: _ },
|
|
414
|
+
{ Month: k },
|
|
415
|
+
{ Day: $ },
|
|
416
|
+
{ Hour: J },
|
|
417
|
+
{ Minute: W },
|
|
418
|
+
{ Second: Q }
|
|
419
|
+
];
|
|
420
|
+
}
|
|
421
|
+
}).filter(Boolean).flat() : void 0,
|
|
422
|
+
"dcat:qualifiedRelation": (g = s(
|
|
423
|
+
e["dcat:qualifiedRelation"]
|
|
424
|
+
)) == null ? void 0 : g.filter(Boolean),
|
|
425
|
+
"dct:creator": (y = s(e["dct:creator"])) == null ? void 0 : y.filter(Boolean),
|
|
426
|
+
"dct:contributor": (b = s(e["dct:contributor"])) == null ? void 0 : b.filter(Boolean),
|
|
427
|
+
"dcatde:contributorID": (B = e["dcatapde:contributorID"]) == null ? void 0 : B.map((a) => T(a)).filter(Boolean),
|
|
428
|
+
"dcatde:geocodingDescription": (R = s(
|
|
429
|
+
e["dcatapde:geocodingDescription"]
|
|
430
|
+
)) == null ? void 0 : R.filter(Boolean),
|
|
431
|
+
"dct:identifier": (L = e["dct:identifier"]) == null ? void 0 : L.map((a) => ({
|
|
432
|
+
"@value": a
|
|
433
|
+
})),
|
|
434
|
+
"adms:identifier": (v = s(e["adms:identifier"])) == null ? void 0 : v.filter(Boolean),
|
|
435
|
+
"owl:versionInfo": (w = e["owl:versionInfo"]) == null ? void 0 : w.map((a) => ({
|
|
436
|
+
"@value": a
|
|
437
|
+
})),
|
|
342
438
|
"adms:versionNotes": e["adms:versionNotes"],
|
|
343
|
-
"dcatde:legalBasis": (
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
"
|
|
347
|
-
"
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
"
|
|
439
|
+
"dcatde:legalBasis": (P = s(e["dcatapde:legalBasis"])) == null ? void 0 : P.filter(
|
|
440
|
+
Boolean
|
|
441
|
+
),
|
|
442
|
+
"dct:relation": (l = s(e["dct:relation"])) == null ? void 0 : l.filter(Boolean),
|
|
443
|
+
"dcat:landingPage": (h = s(e["dcat:landingPage"])) == null ? void 0 : h.filter(
|
|
444
|
+
Boolean
|
|
445
|
+
),
|
|
446
|
+
"prov:wasGeneratedBy": (U = s(e["prov:wasGeneratedBy"])) == null ? void 0 : U.filter(
|
|
447
|
+
Boolean
|
|
448
|
+
),
|
|
449
|
+
"dct:isReferencedBy": (D = s(e["dct:isReferencedBy"])) == null ? void 0 : D.filter(
|
|
450
|
+
Boolean
|
|
451
|
+
),
|
|
452
|
+
"dct:source": (x = s(e["dct:source"])) == null ? void 0 : x.filter(Boolean),
|
|
453
|
+
"dct:hasVersion": (F = s(e["dct:hasVersion"])) == null ? void 0 : F.filter(Boolean),
|
|
454
|
+
"dct:isVersionOf": (j = s(e["dct:isVersionOf"])) == null ? void 0 : j.filter(Boolean),
|
|
455
|
+
"prov:qualifiedAttribution": (z = s(
|
|
456
|
+
e["prov:qualifiedAttribution"]
|
|
457
|
+
)) == null ? void 0 : z.filter(Boolean),
|
|
458
|
+
"dcat:keyword": (M = s(e["dcat:keyword"])) == null ? void 0 : M.filter(Boolean),
|
|
459
|
+
"dct:spatial": (p = s(e["dct:spatial"])) == null ? void 0 : p.filter((a) => a ? !a["@id"].startsWith(
|
|
460
|
+
"http://dcat-ap.de/def/politicalGeocoding/"
|
|
461
|
+
) : !1).filter(Boolean),
|
|
462
|
+
"dct:references": (I = s(e["dct:references"])) == null ? void 0 : I.filter(Boolean),
|
|
463
|
+
"foaf:page": (C = s(e["foaf:page"])) == null ? void 0 : C.filter(Boolean).map((a) => {
|
|
464
|
+
if (!a) return;
|
|
465
|
+
const A = o(a["dct:format"]);
|
|
466
|
+
return {
|
|
467
|
+
"dct:title": o(a["dct:title"]),
|
|
468
|
+
"dct:description": o(a["dct:description"]),
|
|
469
|
+
"@value": A ? d(A.prefLabel) : "",
|
|
470
|
+
uri: A ? A["@id"] : "",
|
|
471
|
+
"foaf:homepage": o(a["foaf:homepage"]) || ""
|
|
472
|
+
};
|
|
473
|
+
}),
|
|
474
|
+
"dcatap:availability": (q = e["dcatap:availability"]) == null ? void 0 : q.map(
|
|
475
|
+
(a) => {
|
|
476
|
+
var A, G, _, k;
|
|
477
|
+
return {
|
|
478
|
+
// Redundant label and title for better compatibility
|
|
479
|
+
label: ((A = o(a)) == null ? void 0 : A.prefLabel) || "",
|
|
480
|
+
title: ((G = o(a)) == null ? void 0 : G.prefLabel) || "",
|
|
481
|
+
uri: ((_ = o(a)) == null ? void 0 : _["@id"]) || "",
|
|
482
|
+
"@value": d((k = o(a)) == null ? void 0 : k.prefLabel) || ""
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
)
|
|
351
486
|
};
|
|
352
|
-
return
|
|
487
|
+
return ce(r);
|
|
353
488
|
}
|
|
354
|
-
function
|
|
489
|
+
function ye(e) {
|
|
355
490
|
return {
|
|
356
|
-
Landing:
|
|
357
|
-
Discoverability:
|
|
358
|
-
BasicInfos:
|
|
359
|
-
Covering:
|
|
360
|
-
DistributionSimple:
|
|
361
|
-
ReviewAndPublish:
|
|
362
|
-
Additionals:
|
|
491
|
+
Landing: le(),
|
|
492
|
+
Discoverability: se(e),
|
|
493
|
+
BasicInfos: fe(e),
|
|
494
|
+
Covering: ue(e),
|
|
495
|
+
DistributionSimple: me(e),
|
|
496
|
+
ReviewAndPublish: be(),
|
|
497
|
+
Additionals: ge(e)
|
|
363
498
|
};
|
|
364
499
|
}
|
|
365
|
-
function
|
|
366
|
-
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t) =>
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
500
|
+
function he(e) {
|
|
501
|
+
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, t) => {
|
|
502
|
+
var i, n;
|
|
503
|
+
return {
|
|
504
|
+
id: t + 1,
|
|
505
|
+
"dcat:downloadURL": ((i = o(r["dcat:endpointURL"])) == null ? void 0 : i["@id"]) || "",
|
|
506
|
+
"dcat:endpointURL": ((n = o(r["dcat:endpointURL"])) == null ? void 0 : n["@id"]) || "",
|
|
507
|
+
"dct:description": d(r["dct:description"]) || "",
|
|
508
|
+
"dct:title": d(r["dct:title"]) || ""
|
|
509
|
+
};
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
function Re(e) {
|
|
513
|
+
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, t) => {
|
|
514
|
+
var i, n, f, c;
|
|
515
|
+
return {
|
|
516
|
+
id: t + 1,
|
|
517
|
+
"dcat:downloadURL": ((i = o(r["dcat:accessURL"])) == null ? void 0 : i["@id"]) || "",
|
|
518
|
+
"dcat:accessURL": ((n = o(r["dcat:accessURL"])) == null ? void 0 : n["@id"]) || "",
|
|
519
|
+
"dct:description": d(r["dct:description"]) || "",
|
|
520
|
+
"dct:title": d(r["dct:title"]) || "",
|
|
521
|
+
"dct:format": r["dct:format"] && ((f = T(o(r["dct:format"]))) == null ? void 0 : f.label) || "",
|
|
522
|
+
formatUri: r["dct:format"] && ((c = T(o(r["dct:format"]))) == null ? void 0 : c.uri) || ""
|
|
523
|
+
};
|
|
524
|
+
});
|
|
373
525
|
}
|
|
374
526
|
export {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
527
|
+
s as asSomeArray,
|
|
528
|
+
d as extractLocalizedString,
|
|
529
|
+
u as extractStringValue,
|
|
378
530
|
o as getFirstItem,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
531
|
+
V as normalizeToArray,
|
|
532
|
+
ce as purgeNullishAndEmptyProperties,
|
|
533
|
+
he as toAccessService,
|
|
534
|
+
Re as toDocument,
|
|
535
|
+
ye as toDpi,
|
|
536
|
+
De as useDpiSimpleLoader
|
|
384
537
|
};
|