@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.
Files changed (49) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/DPIMenu.vue.js +7 -7
  3. package/dist/data-provider-interface/DataProviderInterface.vue2.js +18 -17
  4. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +7 -0
  5. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +122 -0
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteInputDefinition.js +14 -0
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue.js +75 -0
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue2.js +4 -0
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectNameStep.vue.js +29 -0
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +7 -0
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +70 -0
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/Chip.vue.js +19 -20
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +1 -1
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +32 -28
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +1 -1
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +21 -0
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +60 -0
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue2.js +4 -0
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +7 -0
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +98 -0
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +16 -21
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +83 -81
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +2 -4
  24. package/dist/data-provider-interface/components/DistLicense.vue.js +61 -63
  25. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +791 -779
  26. package/dist/data-provider-interface/components/HVDPage.vue.js +45 -43
  27. package/dist/data-provider-interface/components/InputPageStep.vue.js +9 -11
  28. package/dist/data-provider-interface/components/ProgressSteps.vue.js +7 -0
  29. package/dist/data-provider-interface/components/ProgressSteps.vue2.js +106 -0
  30. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +204 -204
  31. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +211 -212
  32. package/dist/data-provider-interface/composables/useDpiStepper.js +80 -39
  33. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +145 -105
  34. package/dist/data-provider-interface/store/modules/conversionStore.js +130 -0
  35. package/dist/data-provider-interface/store/modules/dpiStore.js +18 -16
  36. package/dist/data-provider-interface/utils/RDFconverter.js +226 -0
  37. package/dist/data-provider-interface/utils/inputConverter.js +255 -0
  38. package/dist/data-provider-interface/utils/useSteps.js +39 -30
  39. package/dist/data-provider-interface/views/InputPage.vue.js +80 -92
  40. package/dist/data-provider-interface/views/InputPageProject.vue.js +528 -0
  41. package/dist/index.js +31 -27
  42. package/dist/stories/components/DemoStep.vue.js +331 -0
  43. package/dist/stories/components/DemoStepper.vue.js +7 -0
  44. package/dist/stories/components/DemoStepper.vue2.js +160 -0
  45. package/dist/stories/components/PartnerCard.vue.js +7 -0
  46. package/dist/stories/components/PartnerCard.vue2.js +32 -0
  47. package/dist/stories/components/ReviewStepDemo.vue.js +7 -0
  48. package/dist/stories/components/ReviewStepDemo.vue2.js +98 -0
  49. package/package.json +11 -4
@@ -1,75 +1,75 @@
1
- import { toRef as O, ref as E, toValue as F, computed as T, watch as x } from "vue";
2
- import { useAsyncState as C } from "@vueuse/core";
3
- import { defineJsonldResolver as M, dcatDatasetTransformer as k, datasetResolvers as G } from "@piveau/jsonld";
4
- import { isEmpty as N } from "lodash-es";
5
- function L(e) {
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 d(e) {
12
+ function s(e) {
13
13
  return Array.isArray(e) ? e : e ? [e] : void 0;
14
14
  }
15
- function $(e) {
16
- return Object.fromEntries(Object.entries(e).filter(([i, t]) => t != null && !N(t)));
15
+ function re(e) {
16
+ return Object.fromEntries(Object.entries(e).filter(([i, t]) => t != null && !te(t)));
17
17
  }
18
- function ce(e, i) {
19
- const { enabled: t, hubSearchUrl: r } = i, n = O(t), { safeTransform: f } = M({
18
+ function he(e, i) {
19
+ const { enabled: t, hubSearchUrl: r } = i, c = X(t), { safeTransform: y } = W({
20
20
  baseUrl: r,
21
- resolvers: G(),
22
- transformer: k
23
- }), p = E([]), {
24
- state: m,
25
- isReady: y,
26
- isLoading: h,
27
- error: v,
28
- execute: R
29
- } = C(
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 I;
32
- const c = await f(F(e));
33
- if (c.error)
34
- return p.value.push({
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: c.error.message
36
+ message: n.error.message
37
37
  }), null;
38
- const u = c.data;
39
- return (!u || !((I = u["dpi:isDPIv3"]) != null && I["@value"])) && p.value.push({
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: ee(u),
43
+ dpiData: fe(u),
44
44
  data: u
45
45
  };
46
46
  },
47
47
  null,
48
48
  { immediate: !1 }
49
- ), g = T(() => n.value && !h.value && !!y.value), b = T(() => n.value && !!g.value), B = T(() => b.value), P = T(() => {
50
- var c;
51
- return (c = m.value) == null ? void 0 : c.dpiData;
52
- }), A = T(() => {
53
- var c;
54
- return (c = m.value) == null ? void 0 : c.data;
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 x(
57
- () => F(e),
58
- (c) => c && n.value ? R() : null
59
- ), x(A, (c) => {
60
- console.log("jsonld resolved result:", c);
61
- }), x(v, (c) => {
62
- console.log("jsonld error:", c);
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: m,
65
- isProcessedInputReady: g,
66
- result: P,
67
- isMaterialized: b,
68
- isReady: B,
69
- errors: p
64
+ processedInput: p,
65
+ isProcessedInputReady: m,
66
+ result: A,
67
+ isMaterialized: g,
68
+ isReady: L,
69
+ errors: f
70
70
  };
71
71
  }
72
- function a(e) {
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 U(e) {
83
+ function C(e) {
84
84
  return o(e);
85
85
  }
86
- function s(e, i = "de") {
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((n) => n["@language"] === i);
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"]) || a(r) || "";
98
+ return (r == null ? void 0 : r["@value"]) || l(r) || "";
99
99
  }
100
- return e["@language"] && e["@value"] ? e["@value"] : a(e);
100
+ return e["@language"] && e["@value"] ? e["@value"] : l(e);
101
101
  }
102
- function j(e) {
103
- return s(e);
102
+ function E(e) {
103
+ return a(e);
104
104
  }
105
- function S(e) {
105
+ function F(e) {
106
106
  return {
107
107
  uri: e.uri,
108
- "@value": e["@value"]
108
+ label: e.label
109
109
  };
110
110
  }
111
- function w(e, i) {
111
+ function U(e, i) {
112
112
  const t = e.prefLabel;
113
- return S({
113
+ return F({
114
114
  uri: e["@id"] || e["purl:identifier"] || "",
115
- "@value": t ? s(t) : e["purl:identifier"] || ""
115
+ "@value": t ? a(t) : e["purl:identifier"] || ""
116
116
  });
117
117
  }
118
- function D(e, i = !0) {
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 z(e, i = "de") {
125
- return e ? L(e).map((r) => typeof r == "string" ? D({
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"] ? D({
133
+ }) : r && typeof r == "object" ? r["@language"] && r["@value"] ? S({
129
134
  "@value": r["@value"],
130
135
  "@language": r["@language"]
131
- }) : D({
132
- "@value": a(r),
136
+ }) : S({
137
+ "@value": l(r),
133
138
  "@language": i
134
- }) : D({
139
+ }) : S({
135
140
  "@value": "",
136
141
  "@language": i
137
142
  })) : [];
138
143
  }
139
- function q(e, i) {
140
- return e ? L(e).map((r) => D({
144
+ function ie(e, i) {
145
+ return e ? j(e).map((r) => S({
141
146
  "@type": i,
142
- "@value": a(r)
147
+ "@value": l(r)
143
148
  })) : [];
144
149
  }
145
- function _(e, i) {
150
+ function k(e, i) {
146
151
  const t = { isValid: !0 };
147
- for (const [r, n] of Object.entries(i))
148
- t[r] = a(e == null ? void 0 : e[n]);
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 J(e) {
156
+ function oe(e) {
152
157
  return {
153
158
  happyFlowLandingPage: {}
154
159
  };
155
160
  }
156
- function X(e) {
161
+ function ne(e) {
157
162
  const i = {
158
163
  discoverabilityPage: [{ isValid: !0 }]
159
164
  };
160
165
  if (e["dcatap:hvdCategory"]) {
161
- const t = L(e["dcatap:hvdCategory"]).filter(Boolean);
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: s(r.prefLabel)
170
+ label: a(r.prefLabel)
166
171
  }));
167
172
  }
168
173
  if (e["dcat:theme"]) {
169
- const t = L(e["dcat:theme"]);
174
+ const t = j(e["dcat:theme"]);
170
175
  i.discoverabilityPage = [
171
176
  { isValid: !0 },
172
- ...t.map((r) => D({
173
- id: a(r).split("/").pop(),
174
- uri: a(r),
175
- label: s(r.prefLabel)
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 H(e) {
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"] = z(e["dct:title"])), e["dct:description"] && (t["dct:description"] = z(e["dct:description"])), e["dct:modified"] && (t["dct:modified"] = q(
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 n = o(e["dct:publisher"]);
196
- t["dct:publisher"] = [_(n, {
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 n = o(e["dcat:contactPoint"]);
204
- t["dcat:contactPoint"] = [_(n, {
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 K(e) {
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 Q(e, i) {
233
- var r, n, f, p, m, y, h, v, R, g, b, B, P, A, c, u;
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": a(o(e["dcat:accessURL"])) || "",
232
+ "dcat:accessURL": l(o(e["dcat:accessURL"])) || "",
241
233
  "dct:format": {
242
- label: (r = o(e["dct:format"])) == null ? void 0 : r["purl:identifier"],
243
- uri: ((n = o(e["dct:format"])) == null ? void 0 : n["@id"]) || ""
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": s(e["dct:title"]),
246
- "dct:description": s(e["dct:description"]),
247
- "dct:modified": a(o(e["dct:modified"])),
248
- "dct:issued": a(o(e["dct:issued"])),
249
- "dcat:byteSize": a(o(e["dcat:byteSize"])),
250
- "dcatde:licenseAttributionByText": "",
251
- "dct:accessRights": a(o(e["dct:accessRights"])),
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
- label: (f = o(e["dcatap:availability"])) == null ? void 0 : f.label,
254
- uri: ((p = o(e["dcatap:availability"])) == null ? void 0 : p.uri) || ""
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": S({
257
- "@value": `${s((m = o(e["dct:language"])) == null ? void 0 : m["purl:identifier"])} (${s((y = o(e["dct:language"])) == null ? void 0 : y["purl:identifier"])})`,
258
- uri: ((h = o(e["dct:language"])) == null ? void 0 : h["@id"]) || ""
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": S({
261
- "@value": s((v = o(e["dcat:mediaType"])) == null ? void 0 : v.prefLabel),
262
- uri: ((R = o(e["dcat:mediaType"])) == null ? void 0 : R["@id"]) || ""
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": S({
265
- "@value": s((g = o(e["dcat:compressFormat"])) == null ? void 0 : g.prefLabel),
266
- uri: ((b = o(e["dcat:compressFormat"])) == null ? void 0 : b["@id"]) || ""
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": S({
269
- "@value": s((B = o(e["dcat:packageFormat"])) == null ? void 0 : B.prefLabel),
270
- uri: ((P = o(e["dcat:packageFormat"])) == null ? void 0 : P["@id"]) || ""
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": ((A = o(e["adms:status"])) == null ? void 0 : A["@id"]) || "",
275
+ "adms:status": ((w = o(e["adms:status"])) == null ? void 0 : w["@id"]) || "",
273
276
  checksum: {
274
- title: a(o(t == null ? void 0 : t["spdx:checksumValue"])),
275
- "spdx:checksum": ((c = a(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : c.split("_").pop()) || "",
276
- uri: (u = a(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : u.replace("spdx:", "http://spdx.org/rdf/terms#")
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
- changeLicense: { title: "", "dcterms:license": "" },
279
- showErrorFormat: !1,
280
- formatErrorMessage: "",
281
- showErrorDownloadURL: !1,
282
- documentations: [],
283
- conformsToItems: [],
284
- policyItems: [],
285
- accessServices: te(e["dcat:accessService"] || [], 1)
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 W(e) {
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 r = L(e["dcat:distribution"]);
308
- i["dcat:distribution"] = r.map((n, f) => Q(n, f)).filter((n) => Object.keys(n).length > 0);
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 Y(e) {
304
+ function se(e) {
313
305
  return {
314
306
  reviewAndPublishPage: [{ isValid: !0 }]
315
307
  };
316
308
  }
317
- function Z(e) {
318
- var t, r, n, f, p, m, y, h, v, R, g, b, B, P, A, c, u, V, I;
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((l) => w(l)).filter(Boolean),
321
- "dct:conformsTo": (r = e["dct:conformsTo"]) == null ? void 0 : r.map((l) => ({
322
- "rdfs:label": l["rdfs:label"],
323
- uri: l["@id"]
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"] ? d(w(e["dct:accessRights"])) : [],
326
- "dct:provenance": (n = e["dct:provenance"]) == null ? void 0 : n.map((l) => ({
327
- "rdfs:label": l["rdfs:label"],
328
- uri: l["@id"]
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"] ? d(w(e["dct:accrualPeriodicity"])) : [],
331
- "dct:type": (f = e["dct:type"]) == null ? void 0 : f.map((l) => w(l)).filter(Boolean),
332
- "dcat:spatialResolutionInMeters": a(e["dcat:spatialResolutionInMeters"]) || void 0,
333
- "dcat:temporalResolution": a(e["dcat:temporalResolution"]) || void 0,
334
- "dcat:qualifiedRelation": (p = d(e["dcat:qualifiedRelation"])) == null ? void 0 : p.filter(Boolean),
335
- "dct:creator": (m = d(e["dct:creator"])) == null ? void 0 : m.filter(Boolean),
336
- "dct:contributor": (y = d(e["dct:contributor"])) == null ? void 0 : y.filter(Boolean),
337
- "dcatde:contributorID": (h = e["dcatapde:contributorID"]) == null ? void 0 : h.map((l) => w(l)).filter(Boolean),
338
- "dcatde:geocodingDescription": (v = d(e["dcatapde:geocodingDescription"])) == null ? void 0 : v.filter(Boolean),
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": (R = d(e["adms:identifier"])) == null ? void 0 : R.filter(Boolean),
341
- "owl:versionInfo": (g = e["owl:versionInfo"]) == null ? void 0 : g.map((l) => ({ "@value": l })),
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": (b = d(e["dcatapde:legalBasis"])) == null ? void 0 : b.filter(Boolean),
344
- "dct:relation": (B = d(e["dct:relation"])) == null ? void 0 : B.filter(Boolean),
345
- "dcat:landingPage": (P = d(e["dcat:landingPage"])) == null ? void 0 : P.filter(Boolean),
346
- "prov:wasGeneratedBy": (A = d(e["prov:wasGeneratedBy"])) == null ? void 0 : A.filter(Boolean),
347
- "dct:isReferencedBy": (c = d(e["dct:isReferencedBy"])) == null ? void 0 : c.filter(Boolean),
348
- "dct:source": (u = d(e["dct:source"])) == null ? void 0 : u.filter(Boolean),
349
- "dct:hasVersion": (V = d(e["dct:hasVersion"])) == null ? void 0 : V.filter(Boolean),
350
- "dct:isVersionOf": (I = d(e["dct:isVersionOf"])) == null ? void 0 : I.filter(Boolean)
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 $(i);
351
+ return re(i);
353
352
  }
354
- function ee(e) {
353
+ function fe(e) {
355
354
  return {
356
- Landing: J(),
357
- Discoverability: X(e),
358
- BasicInfos: H(e),
359
- Covering: K(),
360
- DistributionSimple: W(e),
361
- ReviewAndPublish: Y(),
362
- Additionals: Z(e)
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 te(e, i) {
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": a(U(t["dcat:accessURL"])),
369
- "dcat:endpointURL": a(U(t["dcat:endpointURL"])),
370
- "dct:description": j(t["dct:description"]),
371
- "dct:title": j(t["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
- d as asSomeArray,
376
- s as extractLocalizedString,
377
- a as extractStringValue,
374
+ s as asSomeArray,
375
+ a as extractLocalizedString,
376
+ l as extractStringValue,
378
377
  o as getFirstItem,
379
- L as normalizeToArray,
380
- $ as purgeNullishAndEmptyProperties,
381
- te as toAccessService,
382
- ee as toDpi,
383
- ce as useDpiSimpleLoader
378
+ j as normalizeToArray,
379
+ re as purgeNullishAndEmptyProperties,
380
+ pe as toAccessService,
381
+ fe as toDpi,
382
+ he as useDpiSimpleLoader
384
383
  };