@piveau/dpi 0.1.0-beta.8 → 0.1.0-twinby.0
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 +7 -7
- package/dist/data-provider-interface/DataProviderInterface.vue2.js +18 -17
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +122 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteInputDefinition.js +14 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue.js +75 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue2.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectNameStep.vue.js +29 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +70 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Chip.vue.js +19 -20
- package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +32 -28
- package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +21 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +60 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue2.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +98 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +16 -21
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +83 -81
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +2 -4
- package/dist/data-provider-interface/components/DistLicense.vue.js +61 -63
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +791 -779
- package/dist/data-provider-interface/components/HVDPage.vue.js +45 -43
- package/dist/data-provider-interface/components/InputPageStep.vue.js +9 -11
- package/dist/data-provider-interface/components/ProgressSteps.vue.js +7 -0
- package/dist/data-provider-interface/components/ProgressSteps.vue2.js +106 -0
- package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +204 -204
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +211 -212
- package/dist/data-provider-interface/composables/useDpiStepper.js +80 -39
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +145 -105
- package/dist/data-provider-interface/store/modules/conversionStore.js +130 -0
- package/dist/data-provider-interface/store/modules/dpiStore.js +18 -16
- package/dist/data-provider-interface/utils/RDFconverter.js +226 -0
- package/dist/data-provider-interface/utils/inputConverter.js +255 -0
- package/dist/data-provider-interface/utils/useSteps.js +39 -30
- package/dist/data-provider-interface/views/InputPage.vue.js +80 -92
- package/dist/data-provider-interface/views/InputPageProject.vue.js +528 -0
- package/dist/index.js +31 -27
- package/dist/stories/components/DemoStep.vue.js +331 -0
- package/dist/stories/components/DemoStepper.vue.js +7 -0
- package/dist/stories/components/DemoStepper.vue2.js +160 -0
- package/dist/stories/components/PartnerCard.vue.js +7 -0
- package/dist/stories/components/PartnerCard.vue2.js +32 -0
- package/dist/stories/components/ReviewStepDemo.vue.js +7 -0
- package/dist/stories/components/ReviewStepDemo.vue2.js +98 -0
- package/package.json +11 -4
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { toRef as
|
|
2
|
-
import { useAsyncState as
|
|
3
|
-
import { defineJsonldResolver as
|
|
4
|
-
import { isEmpty as
|
|
5
|
-
function
|
|
1
|
+
import { toRef as X, ref as K, toValue as O, computed as V, watch as M } from "vue";
|
|
2
|
+
import { useAsyncState as Q } from "@vueuse/core";
|
|
3
|
+
import { defineJsonldResolver as W, dcatDatasetTransformer as Z, datasetResolvers as ee } from "@piveau/jsonld";
|
|
4
|
+
import { isEmpty as te } from "lodash-es";
|
|
5
|
+
function j(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(Object.entries(e).filter(([i, t]) => t != null && !
|
|
15
|
+
function re(e) {
|
|
16
|
+
return Object.fromEntries(Object.entries(e).filter(([i, t]) => t != null && !te(t)));
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const { enabled: t, hubSearchUrl: r } = i,
|
|
18
|
+
function he(e, i) {
|
|
19
|
+
const { enabled: t, hubSearchUrl: r } = i, c = X(t), { safeTransform: y } = W({
|
|
20
20
|
baseUrl: r,
|
|
21
|
-
resolvers:
|
|
22
|
-
transformer:
|
|
23
|
-
}),
|
|
24
|
-
state:
|
|
25
|
-
isReady:
|
|
26
|
-
isLoading:
|
|
27
|
-
error:
|
|
28
|
-
execute:
|
|
29
|
-
} =
|
|
21
|
+
resolvers: ee(),
|
|
22
|
+
transformer: Z
|
|
23
|
+
}), f = K([]), {
|
|
24
|
+
state: p,
|
|
25
|
+
isReady: h,
|
|
26
|
+
isLoading: R,
|
|
27
|
+
error: B,
|
|
28
|
+
execute: v
|
|
29
|
+
} = Q(
|
|
30
30
|
async () => {
|
|
31
|
-
var
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
31
|
+
var b;
|
|
32
|
+
const n = await y(O(e));
|
|
33
|
+
if (n.error)
|
|
34
|
+
return f.value.push({
|
|
35
35
|
code: "transform_failed",
|
|
36
|
-
message:
|
|
36
|
+
message: n.error.message
|
|
37
37
|
}), null;
|
|
38
|
-
const u =
|
|
39
|
-
return (!u || !((
|
|
38
|
+
const u = n.data;
|
|
39
|
+
return (!u || !((b = u["dpi:isDPIv3"]) != null && b["@value"])) && f.value.push({
|
|
40
40
|
code: "not_dpi_v3",
|
|
41
41
|
message: `The dataset is not a DPI v3 dataset. ID ${u["@id"]}`
|
|
42
42
|
}), {
|
|
43
|
-
dpiData:
|
|
43
|
+
dpiData: fe(u),
|
|
44
44
|
data: u
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
47
|
null,
|
|
48
48
|
{ immediate: !1 }
|
|
49
|
-
),
|
|
50
|
-
var
|
|
51
|
-
return (
|
|
52
|
-
}),
|
|
53
|
-
var
|
|
54
|
-
return (
|
|
49
|
+
), m = V(() => c.value && !R.value && !!h.value), g = V(() => c.value && !!m.value), L = V(() => g.value), A = V(() => {
|
|
50
|
+
var n;
|
|
51
|
+
return (n = p.value) == null ? void 0 : n.dpiData;
|
|
52
|
+
}), P = V(() => {
|
|
53
|
+
var n;
|
|
54
|
+
return (n = p.value) == null ? void 0 : n.data;
|
|
55
55
|
});
|
|
56
|
-
return
|
|
57
|
-
() =>
|
|
58
|
-
(
|
|
59
|
-
),
|
|
60
|
-
console.log("jsonld resolved result:",
|
|
61
|
-
}),
|
|
62
|
-
console.log("jsonld error:",
|
|
56
|
+
return M(
|
|
57
|
+
() => O(e),
|
|
58
|
+
(n) => n && c.value ? v() : null
|
|
59
|
+
), M(P, (n) => {
|
|
60
|
+
console.log("jsonld resolved result:", n);
|
|
61
|
+
}), M(B, (n) => {
|
|
62
|
+
console.log("jsonld error:", n);
|
|
63
63
|
}), {
|
|
64
|
-
processedInput:
|
|
65
|
-
isProcessedInputReady:
|
|
66
|
-
result:
|
|
67
|
-
isMaterialized:
|
|
68
|
-
isReady:
|
|
69
|
-
errors:
|
|
64
|
+
processedInput: p,
|
|
65
|
+
isProcessedInputReady: m,
|
|
66
|
+
result: A,
|
|
67
|
+
isMaterialized: g,
|
|
68
|
+
isReady: L,
|
|
69
|
+
errors: f
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function l(e) {
|
|
73
73
|
if (typeof e == "string")
|
|
74
74
|
return e;
|
|
75
75
|
if (e && typeof e == "object") {
|
|
@@ -80,10 +80,10 @@ function a(e) {
|
|
|
80
80
|
}
|
|
81
81
|
return "";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function C(e) {
|
|
84
84
|
return o(e);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function a(e, i = "de") {
|
|
87
87
|
if (!e)
|
|
88
88
|
return "";
|
|
89
89
|
if (typeof e == "string")
|
|
@@ -91,94 +91,99 @@ function s(e, i = "de") {
|
|
|
91
91
|
if (typeof e == "object" && !Array.isArray(e) && !e["@value"] && !e["@id"])
|
|
92
92
|
return e[i] || Object.values(e)[0] || "";
|
|
93
93
|
if (Array.isArray(e)) {
|
|
94
|
-
const t = e.find((
|
|
94
|
+
const t = e.find((c) => c["@language"] === i);
|
|
95
95
|
if (t)
|
|
96
96
|
return t["@value"] || "";
|
|
97
97
|
const r = e[0];
|
|
98
|
-
return (r == null ? void 0 : r["@value"]) ||
|
|
98
|
+
return (r == null ? void 0 : r["@value"]) || l(r) || "";
|
|
99
99
|
}
|
|
100
|
-
return e["@language"] && e["@value"] ? e["@value"] :
|
|
100
|
+
return e["@language"] && e["@value"] ? e["@value"] : l(e);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return
|
|
102
|
+
function E(e) {
|
|
103
|
+
return a(e);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function F(e) {
|
|
106
106
|
return {
|
|
107
107
|
uri: e.uri,
|
|
108
|
-
|
|
108
|
+
label: e.label
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function U(e, i) {
|
|
112
112
|
const t = e.prefLabel;
|
|
113
|
-
return
|
|
113
|
+
return F({
|
|
114
114
|
uri: e["@id"] || e["purl:identifier"] || "",
|
|
115
|
-
"@value": t ?
|
|
115
|
+
"@value": t ? a(t) : e["purl:identifier"] || ""
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function q(e) {
|
|
119
|
+
return typeof e == "string" ? {
|
|
120
|
+
"@value": e
|
|
121
|
+
} : e;
|
|
122
|
+
}
|
|
123
|
+
function S(e, i = !0) {
|
|
119
124
|
return {
|
|
120
125
|
isValid: i,
|
|
121
126
|
...e
|
|
122
127
|
};
|
|
123
128
|
}
|
|
124
|
-
function
|
|
125
|
-
return e ?
|
|
129
|
+
function $(e, i = "de") {
|
|
130
|
+
return e ? j(e).map((r) => typeof r == "string" ? S({
|
|
126
131
|
"@value": r,
|
|
127
132
|
"@language": i
|
|
128
|
-
}) : r && typeof r == "object" ? r["@language"] && r["@value"] ?
|
|
133
|
+
}) : r && typeof r == "object" ? r["@language"] && r["@value"] ? S({
|
|
129
134
|
"@value": r["@value"],
|
|
130
135
|
"@language": r["@language"]
|
|
131
|
-
}) :
|
|
132
|
-
"@value":
|
|
136
|
+
}) : S({
|
|
137
|
+
"@value": l(r),
|
|
133
138
|
"@language": i
|
|
134
|
-
}) :
|
|
139
|
+
}) : S({
|
|
135
140
|
"@value": "",
|
|
136
141
|
"@language": i
|
|
137
142
|
})) : [];
|
|
138
143
|
}
|
|
139
|
-
function
|
|
140
|
-
return e ?
|
|
144
|
+
function ie(e, i) {
|
|
145
|
+
return e ? j(e).map((r) => S({
|
|
141
146
|
"@type": i,
|
|
142
|
-
"@value":
|
|
147
|
+
"@value": l(r)
|
|
143
148
|
})) : [];
|
|
144
149
|
}
|
|
145
|
-
function
|
|
150
|
+
function k(e, i) {
|
|
146
151
|
const t = { isValid: !0 };
|
|
147
|
-
for (const [r,
|
|
148
|
-
t[r] =
|
|
152
|
+
for (const [r, c] of Object.entries(i))
|
|
153
|
+
t[r] = l(e == null ? void 0 : e[c]);
|
|
149
154
|
return t;
|
|
150
155
|
}
|
|
151
|
-
function
|
|
156
|
+
function oe(e) {
|
|
152
157
|
return {
|
|
153
158
|
happyFlowLandingPage: {}
|
|
154
159
|
};
|
|
155
160
|
}
|
|
156
|
-
function
|
|
161
|
+
function ne(e) {
|
|
157
162
|
const i = {
|
|
158
163
|
discoverabilityPage: [{ isValid: !0 }]
|
|
159
164
|
};
|
|
160
165
|
if (e["dcatap:hvdCategory"]) {
|
|
161
|
-
const t =
|
|
166
|
+
const t = j(e["dcatap:hvdCategory"]).filter(Boolean);
|
|
162
167
|
i.hvdPage = t == null ? void 0 : t.map((r) => ({
|
|
163
168
|
isValid: !0,
|
|
164
169
|
uri: r["@id"],
|
|
165
|
-
label:
|
|
170
|
+
label: a(r.prefLabel)
|
|
166
171
|
}));
|
|
167
172
|
}
|
|
168
173
|
if (e["dcat:theme"]) {
|
|
169
|
-
const t =
|
|
174
|
+
const t = j(e["dcat:theme"]);
|
|
170
175
|
i.discoverabilityPage = [
|
|
171
176
|
{ isValid: !0 },
|
|
172
|
-
...t.map((r) =>
|
|
173
|
-
id:
|
|
174
|
-
uri:
|
|
175
|
-
label:
|
|
177
|
+
...t.map((r) => S({
|
|
178
|
+
id: l(r).split("/").pop(),
|
|
179
|
+
uri: l(r),
|
|
180
|
+
label: a(r.prefLabel)
|
|
176
181
|
}))
|
|
177
182
|
];
|
|
178
183
|
}
|
|
179
184
|
return i;
|
|
180
185
|
}
|
|
181
|
-
function
|
|
186
|
+
function ce(e) {
|
|
182
187
|
var r;
|
|
183
188
|
const t = {
|
|
184
189
|
datasetID: ((r = e["@id"]) == null ? void 0 : r.split("/").pop()) || "",
|
|
@@ -188,20 +193,20 @@ function H(e) {
|
|
|
188
193
|
"dct:publisher": [],
|
|
189
194
|
"dcat:contactPoint": []
|
|
190
195
|
};
|
|
191
|
-
if (e["dct:title"] && (t["dct:title"] =
|
|
196
|
+
if (e["dct:title"] && (t["dct:title"] = $(e["dct:title"])), e["dct:description"] && (t["dct:description"] = $(e["dct:description"])), e["dct:modified"] && (t["dct:modified"] = ie(
|
|
192
197
|
e["dct:modified"],
|
|
193
198
|
"http://www.w3.org/2001/XMLSchema#date"
|
|
194
199
|
)), e["dct:publisher"]) {
|
|
195
|
-
const
|
|
196
|
-
t["dct:publisher"] = [
|
|
200
|
+
const c = o(e["dct:publisher"]);
|
|
201
|
+
t["dct:publisher"] = [k(c, {
|
|
197
202
|
"foaf:name": "foaf:name",
|
|
198
203
|
"foaf:mbox": "foaf:mbox",
|
|
199
204
|
"foaf:homepage": "foaf:homepage"
|
|
200
205
|
})];
|
|
201
206
|
}
|
|
202
207
|
if (e["dcat:contactPoint"]) {
|
|
203
|
-
const
|
|
204
|
-
t["dcat:contactPoint"] = [
|
|
208
|
+
const c = o(e["dcat:contactPoint"]);
|
|
209
|
+
t["dcat:contactPoint"] = [k(c, {
|
|
205
210
|
"vcard:fn": "vcard:fn",
|
|
206
211
|
"vcard:hasEmail": "vcard:hasEmail",
|
|
207
212
|
"vcard:hasTelephone": "vcard:hasTelephone"
|
|
@@ -209,176 +214,170 @@ function H(e) {
|
|
|
209
214
|
}
|
|
210
215
|
return t;
|
|
211
216
|
}
|
|
212
|
-
function
|
|
217
|
+
function ae(e) {
|
|
218
|
+
var i;
|
|
213
219
|
return {
|
|
214
220
|
"dcatde:politicalGeocodingURI": [{ isValid: !0 }],
|
|
215
|
-
"dcat:temporalResolution": [
|
|
216
|
-
{
|
|
217
|
-
isValid: !0,
|
|
218
|
-
type: "dct:PeriodOfTime",
|
|
219
|
-
"dct:temporal": [
|
|
220
|
-
{
|
|
221
|
-
dataType: "dateTime",
|
|
222
|
-
"dcat:startDate": "2025-07-03",
|
|
223
|
-
"dcat:endDate": "2025-07-18",
|
|
224
|
-
startTime: "12:08",
|
|
225
|
-
endTime: "12:08"
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
]
|
|
221
|
+
"dcat:temporalResolution": ((i = e["dcat:temporalResolution"]) == null ? void 0 : i.map((t) => ({ "@value": l(t) }))) || []
|
|
230
222
|
};
|
|
231
223
|
}
|
|
232
|
-
function
|
|
233
|
-
var r,
|
|
224
|
+
function de(e, i) {
|
|
225
|
+
var r, c, y, f, p, h, R, B, v, m, g, L, A, P, n, u, I, b, T, w, d, z, x;
|
|
234
226
|
if (!e)
|
|
235
227
|
return {};
|
|
236
228
|
const t = o(e["spdx:checksum"]);
|
|
237
229
|
return {
|
|
238
230
|
isValid: !0,
|
|
239
231
|
id: i + 1,
|
|
240
|
-
"dcat:accessURL":
|
|
232
|
+
"dcat:accessURL": l(o(e["dcat:accessURL"])) || "",
|
|
241
233
|
"dct:format": {
|
|
242
|
-
|
|
243
|
-
|
|
234
|
+
// redundancy in label and title for better compatibility
|
|
235
|
+
label: ((r = o(e["dct:format"])) == null ? void 0 : r["purl:identifier"]) || "",
|
|
236
|
+
title: ((c = o(e["dct:format"])) == null ? void 0 : c["purl:identifier"]) || "",
|
|
237
|
+
uri: ((y = o(e["dct:format"])) == null ? void 0 : y["@id"]) || ""
|
|
244
238
|
},
|
|
245
|
-
"dct:title":
|
|
246
|
-
"dct:description":
|
|
247
|
-
"dct:modified":
|
|
248
|
-
"dct:issued":
|
|
249
|
-
"dcat:byteSize":
|
|
250
|
-
"dcatde:licenseAttributionByText": "",
|
|
251
|
-
"dct:
|
|
239
|
+
"dct:title": a(e["dct:title"]),
|
|
240
|
+
"dct:description": a(e["dct:description"]),
|
|
241
|
+
"dct:modified": l(o(e["dct:modified"])),
|
|
242
|
+
"dct:issued": l(o(e["dct:issued"])),
|
|
243
|
+
"dcat:byteSize": l(o(e["dcat:byteSize"])),
|
|
244
|
+
"dcatde:licenseAttributionByText": a(e["dcatapde:licenseAttributionByText"]) || "",
|
|
245
|
+
"dct:license": e["dct:license"] ? [{
|
|
246
|
+
isValid: !0,
|
|
247
|
+
uri: ((f = o(e["dct:license"])) == null ? void 0 : f["@id"]) || "",
|
|
248
|
+
"dcterms:license": a((p = o(e["dct:license"])) == null ? void 0 : p.altLabel) || "",
|
|
249
|
+
label: a((h = o(e["dct:license"])) == null ? void 0 : h.prefLabel) || "",
|
|
250
|
+
title: a((R = o(e["dct:license"])) == null ? void 0 : R.prefLabel) || ""
|
|
251
|
+
}] : [],
|
|
252
|
+
"dct:accessRights": l(o(e["dct:accessRights"])),
|
|
252
253
|
"dcatap:availability": {
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
// Redundant label and title for better compatibility
|
|
255
|
+
label: ((B = o(e["dcatap:availability"])) == null ? void 0 : B.prefLabel) || "",
|
|
256
|
+
title: ((v = o(e["dcatap:availability"])) == null ? void 0 : v.prefLabel) || "",
|
|
257
|
+
uri: ((m = o(e["dcatap:availability"])) == null ? void 0 : m["@id"]) || ""
|
|
255
258
|
},
|
|
256
|
-
"dct:language":
|
|
257
|
-
|
|
258
|
-
uri: ((
|
|
259
|
+
"dct:language": F({
|
|
260
|
+
label: `${a((g = o(e["dct:language"])) == null ? void 0 : g["purl:identifier"])} (${a((L = o(e["dct:language"])) == null ? void 0 : L["purl:identifier"])})`,
|
|
261
|
+
uri: ((A = o(e["dct:language"])) == null ? void 0 : A["@id"]) || ""
|
|
259
262
|
}),
|
|
260
|
-
"dcat:mediaType":
|
|
261
|
-
|
|
262
|
-
uri: ((
|
|
263
|
+
"dcat:mediaType": F({
|
|
264
|
+
label: a((P = o(e["dcat:mediaType"])) == null ? void 0 : P.prefLabel) || "",
|
|
265
|
+
uri: ((n = o(e["dcat:mediaType"])) == null ? void 0 : n["@id"]) || ""
|
|
263
266
|
}),
|
|
264
|
-
"dcat:compressFormat":
|
|
265
|
-
|
|
266
|
-
uri: ((
|
|
267
|
+
"dcat:compressFormat": F({
|
|
268
|
+
label: a((u = o(e["dcat:compressFormat"])) == null ? void 0 : u.prefLabel) || "",
|
|
269
|
+
uri: ((I = o(e["dcat:compressFormat"])) == null ? void 0 : I["@id"]) || ""
|
|
267
270
|
}),
|
|
268
|
-
"dcat:packageFormat":
|
|
269
|
-
|
|
270
|
-
uri: ((
|
|
271
|
+
"dcat:packageFormat": F({
|
|
272
|
+
label: a((b = o(e["dcat:packageFormat"])) == null ? void 0 : b.prefLabel) || "",
|
|
273
|
+
uri: ((T = o(e["dcat:packageFormat"])) == null ? void 0 : T["@id"]) || ""
|
|
271
274
|
}),
|
|
272
|
-
"adms:status": ((
|
|
275
|
+
"adms:status": ((w = o(e["adms:status"])) == null ? void 0 : w["@id"]) || "",
|
|
273
276
|
checksum: {
|
|
274
|
-
title:
|
|
275
|
-
"spdx:checksum": ((
|
|
276
|
-
uri: (
|
|
277
|
+
title: l(o(t == null ? void 0 : t["spdx:checksumValue"])),
|
|
278
|
+
"spdx:checksum": ((d = l(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : d.split("_").pop()) || "",
|
|
279
|
+
uri: (z = l(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : z.replace("spdx:", "http://spdx.org/rdf/terms#")
|
|
277
280
|
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
281
|
+
accessServices: pe(e["dcat:accessService"] || [], 1),
|
|
282
|
+
conformsToItems: (x = e["dct:conformsTo"]) == null ? void 0 : x.map((D, _) => ({
|
|
283
|
+
// for some reason dct:conformsTo is different from the one on dcat:dataset level
|
|
284
|
+
id: _ + 1,
|
|
285
|
+
"dcat:accessURL": D["@id"],
|
|
286
|
+
"dct:title": a(D["rdfs:label"]) || "",
|
|
287
|
+
"dcat:downloadURL": D["@id"],
|
|
288
|
+
// redundancy to match properties on dcat:dataset level
|
|
289
|
+
"rdfs:label": a(D["rdfs:label"]) || "",
|
|
290
|
+
uri: D["@id"]
|
|
291
|
+
})).filter(Boolean)
|
|
286
292
|
};
|
|
287
293
|
}
|
|
288
|
-
function
|
|
289
|
-
var t;
|
|
294
|
+
function le(e) {
|
|
290
295
|
const i = {
|
|
291
|
-
"dcat:distribution": []
|
|
292
|
-
"dct:license": [{
|
|
293
|
-
label: ""
|
|
294
|
-
}]
|
|
296
|
+
"dcat:distribution": []
|
|
295
297
|
};
|
|
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
298
|
if (e["dcat:distribution"]) {
|
|
307
|
-
const
|
|
308
|
-
i["dcat:distribution"] =
|
|
299
|
+
const t = j(e["dcat:distribution"]);
|
|
300
|
+
i["dcat:distribution"] = t.map((r, c) => de(r, c)).filter((r) => Object.keys(r).length > 0);
|
|
309
301
|
}
|
|
310
|
-
return i;
|
|
302
|
+
return console.log(i), i;
|
|
311
303
|
}
|
|
312
|
-
function
|
|
304
|
+
function se(e) {
|
|
313
305
|
return {
|
|
314
306
|
reviewAndPublishPage: [{ isValid: !0 }]
|
|
315
307
|
};
|
|
316
308
|
}
|
|
317
|
-
function
|
|
318
|
-
var t, r,
|
|
309
|
+
function ue(e) {
|
|
310
|
+
var t, r, c, y, f, p, h, R, B, v, m, g, L, A, P, n, u, I, b, T, w;
|
|
319
311
|
const i = {
|
|
320
|
-
"dct:language": (t = e["dct:language"]) == null ? void 0 : t.map((
|
|
321
|
-
"dct:conformsTo": (r = e["dct:conformsTo"]) == null ? void 0 : r.map((
|
|
322
|
-
"rdfs:label":
|
|
323
|
-
uri:
|
|
312
|
+
"dct:language": (t = e["dct:language"]) == null ? void 0 : t.map((d) => U(d)).filter(Boolean),
|
|
313
|
+
"dct:conformsTo": (r = e["dct:conformsTo"]) == null ? void 0 : r.map((d) => ({
|
|
314
|
+
"rdfs:label": a(d["rdfs:label"]) || "",
|
|
315
|
+
uri: d["@id"]
|
|
324
316
|
})).filter(Boolean),
|
|
325
|
-
"dct:accessRights": e["dct:accessRights"] ?
|
|
326
|
-
"dct:provenance": (
|
|
327
|
-
"rdfs:label":
|
|
328
|
-
uri:
|
|
317
|
+
"dct:accessRights": e["dct:accessRights"] ? s(U(e["dct:accessRights"])) : [],
|
|
318
|
+
"dct:provenance": (c = e["dct:provenance"]) == null ? void 0 : c.map((d) => ({
|
|
319
|
+
"rdfs:label": a(d["rdfs:label"]) || "",
|
|
320
|
+
uri: d["@id"]
|
|
329
321
|
})).filter(Boolean),
|
|
330
|
-
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ?
|
|
331
|
-
"dct:type": (
|
|
332
|
-
"dcat:spatialResolutionInMeters":
|
|
333
|
-
"dcat:temporalResolution":
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
322
|
+
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? s(U(e["dct:accrualPeriodicity"])) : [],
|
|
323
|
+
"dct:type": (y = e["dct:type"]) == null ? void 0 : y.map((d) => U(d)).filter(Boolean),
|
|
324
|
+
"dcat:spatialResolutionInMeters": ((f = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : f.map(q)) || void 0,
|
|
325
|
+
"dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(q).map((d) => {
|
|
326
|
+
const x = d["@value"].match(/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/);
|
|
327
|
+
if (x) {
|
|
328
|
+
const [, D, _, G, N, H, Y] = x.map((J) => J || "0");
|
|
329
|
+
return { Year: D, Month: _, Day: G, Hour: N, Minute: H, Second: Y };
|
|
330
|
+
}
|
|
331
|
+
}).filter(Boolean) : void 0,
|
|
332
|
+
"dcat:qualifiedRelation": (p = s(e["dcat:qualifiedRelation"])) == null ? void 0 : p.filter(Boolean),
|
|
333
|
+
"dct:creator": (h = s(e["dct:creator"])) == null ? void 0 : h.filter(Boolean),
|
|
334
|
+
"dct:contributor": (R = s(e["dct:contributor"])) == null ? void 0 : R.filter(Boolean),
|
|
335
|
+
"dcatde:contributorID": (B = e["dcatapde:contributorID"]) == null ? void 0 : B.map((d) => U(d)).filter(Boolean),
|
|
336
|
+
"dcatde:geocodingDescription": (v = s(e["dcatapde:geocodingDescription"])) == null ? void 0 : v.filter(Boolean),
|
|
339
337
|
"dct:identifier": e["dct:identifier"] ? [{ "@value": e["dct:identifier"] }] : [],
|
|
340
|
-
"adms:identifier": (
|
|
341
|
-
"owl:versionInfo": (g = e["owl:versionInfo"]) == null ? void 0 : g.map((
|
|
338
|
+
"adms:identifier": (m = s(e["adms:identifier"])) == null ? void 0 : m.filter(Boolean),
|
|
339
|
+
"owl:versionInfo": (g = e["owl:versionInfo"]) == null ? void 0 : g.map((d) => ({ "@value": d })),
|
|
342
340
|
"adms:versionNotes": e["adms:versionNotes"],
|
|
343
|
-
"dcatde:legalBasis": (
|
|
344
|
-
"dct:relation": (
|
|
345
|
-
"dcat:landingPage": (P =
|
|
346
|
-
"prov:wasGeneratedBy": (
|
|
347
|
-
"dct:isReferencedBy": (
|
|
348
|
-
"dct:source": (
|
|
349
|
-
"dct:hasVersion": (
|
|
350
|
-
"dct:isVersionOf": (
|
|
341
|
+
"dcatde:legalBasis": (L = s(e["dcatapde:legalBasis"])) == null ? void 0 : L.filter(Boolean),
|
|
342
|
+
"dct:relation": (A = s(e["dct:relation"])) == null ? void 0 : A.filter(Boolean),
|
|
343
|
+
"dcat:landingPage": (P = s(e["dcat:landingPage"])) == null ? void 0 : P.filter(Boolean),
|
|
344
|
+
"prov:wasGeneratedBy": (n = s(e["prov:wasGeneratedBy"])) == null ? void 0 : n.filter(Boolean),
|
|
345
|
+
"dct:isReferencedBy": (u = s(e["dct:isReferencedBy"])) == null ? void 0 : u.filter(Boolean),
|
|
346
|
+
"dct:source": (I = s(e["dct:source"])) == null ? void 0 : I.filter(Boolean),
|
|
347
|
+
"dct:hasVersion": (b = s(e["dct:hasVersion"])) == null ? void 0 : b.filter(Boolean),
|
|
348
|
+
"dct:isVersionOf": (T = s(e["dct:isVersionOf"])) == null ? void 0 : T.filter(Boolean),
|
|
349
|
+
"prov:qualifiedAttribution": (w = s(e["prov:qualifiedAttribution"])) == null ? void 0 : w.filter(Boolean)
|
|
351
350
|
};
|
|
352
|
-
return
|
|
351
|
+
return re(i);
|
|
353
352
|
}
|
|
354
|
-
function
|
|
353
|
+
function fe(e) {
|
|
355
354
|
return {
|
|
356
|
-
Landing:
|
|
357
|
-
Discoverability:
|
|
358
|
-
BasicInfos:
|
|
359
|
-
Covering:
|
|
360
|
-
DistributionSimple:
|
|
361
|
-
ReviewAndPublish:
|
|
362
|
-
Additionals:
|
|
355
|
+
Landing: oe(),
|
|
356
|
+
Discoverability: ne(e),
|
|
357
|
+
BasicInfos: ce(e),
|
|
358
|
+
Covering: ae(e),
|
|
359
|
+
DistributionSimple: le(e),
|
|
360
|
+
ReviewAndPublish: se(),
|
|
361
|
+
Additionals: ue(e)
|
|
363
362
|
};
|
|
364
363
|
}
|
|
365
|
-
function
|
|
364
|
+
function pe(e, i) {
|
|
366
365
|
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t) => ({
|
|
367
366
|
id: i,
|
|
368
|
-
"dcat:accessURL":
|
|
369
|
-
"dcat:endpointURL":
|
|
370
|
-
"dct:description":
|
|
371
|
-
"dct:title":
|
|
367
|
+
"dcat:accessURL": l(C(t["dcat:accessURL"])),
|
|
368
|
+
"dcat:endpointURL": l(C(t["dcat:endpointURL"])),
|
|
369
|
+
"dct:description": E(t["dct:description"]),
|
|
370
|
+
"dct:title": E(t["dct:title"])
|
|
372
371
|
}));
|
|
373
372
|
}
|
|
374
373
|
export {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
374
|
+
s as asSomeArray,
|
|
375
|
+
a as extractLocalizedString,
|
|
376
|
+
l as extractStringValue,
|
|
378
377
|
o as getFirstItem,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
j as normalizeToArray,
|
|
379
|
+
re as purgeNullishAndEmptyProperties,
|
|
380
|
+
pe as toAccessService,
|
|
381
|
+
fe as toDpi,
|
|
382
|
+
he as useDpiSimpleLoader
|
|
384
383
|
};
|