@piveau/dpi 0.2.0-alpha.15 → 0.2.0-alpha.17

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 (16) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +23 -20
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue.js +2 -2
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue2.js +139 -116
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +1 -1
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +1 -1
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +34 -36
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +3 -3
  10. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +132 -133
  11. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +2 -2
  12. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +157 -169
  13. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +20 -20
  14. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +37 -37
  15. package/dist/packages/dpi/src/data-provider-interface/schema/projectLdSchema.js +98 -94
  16. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import { pipe as A } from "effect";
2
2
  import * as d from "effect/Option";
3
- import * as H from "jsonld";
3
+ import * as F from "jsonld";
4
4
  import { schemaProject as q } from "../../schema/projectLdSchema.js";
5
- import { getFirstItem as x, extractStringValue as t, extractLocalizedString as N } from "../useDpiSimpleLoader.js";
5
+ import { getFirstItem as G, extractStringValue as t, extractLocalizedString as N } from "../useDpiSimpleLoader.js";
6
6
  import { isNonNullable as m } from "./encodeProject.js";
7
- import { PREFIXES as U, nonEmpty as k } from "./shared.js";
7
+ import { PREFIXES as H, nonEmpty as k } from "./shared.js";
8
8
  function z(r) {
9
9
  const a = (r || "").trim();
10
10
  if (!a)
@@ -18,23 +18,23 @@ function z(r) {
18
18
  }
19
19
  async function C(r) {
20
20
  const a = {
21
- "@context": U,
21
+ "@context": H,
22
22
  "@type": "schema:Project"
23
- }, s = await H.frame(r, a, {
23
+ }, s = await F.frame(r, a, {
24
24
  embed: "@always",
25
25
  omitGraph: !0
26
- }), n = await H.compact(s, U, {
26
+ }), n = await F.compact(s, H, {
27
27
  compactArrays: !1,
28
28
  graph: !1
29
- }), l = q.safeParse(x(n == null ? void 0 : n["@graph"]));
29
+ }), l = q.safeParse(G(n == null ? void 0 : n["@graph"]));
30
30
  if (!l.success)
31
31
  throw new Error(`Failed to parse project
32
32
 
33
33
  ${l.error.message}`);
34
34
  return l.data;
35
35
  }
36
- function G(r) {
37
- return k(x(r["@id"]));
36
+ function U(r) {
37
+ return k(G(r["@id"]));
38
38
  }
39
39
  function K(r, a) {
40
40
  var n, l;
@@ -44,10 +44,10 @@ function K(r, a) {
44
44
  visibility: s
45
45
  },
46
46
  "Auffindbarkeit/Kategorien": {
47
- categories: ((n = r["dcat:theme"]) == null ? void 0 : n.map(G).filter(m)) || []
47
+ categories: ((n = r["dcat:theme"]) == null ? void 0 : n.map(U).filter(m)) || []
48
48
  },
49
49
  "Auffindbarkeit/Anwendungsbereiche": {
50
- applications: ((l = r["schema:application"]) == null ? void 0 : l.map(G).filter(m)) || []
50
+ applications: ((l = r["schema:application"]) == null ? void 0 : l.filter(m)) || []
51
51
  }
52
52
  };
53
53
  }
@@ -81,7 +81,7 @@ function V(r) {
81
81
  )
82
82
  },
83
83
  "Grundlegende Informationen/Organisation": {
84
- contact: x(a || []) || {
84
+ contact: G(a || []) || {
85
85
  name: "",
86
86
  mail: "",
87
87
  phone: ""
@@ -216,19 +216,19 @@ function L(r) {
216
216
  selected: P
217
217
  });
218
218
  const p = f.filter((e) => t(e["@type"]) === "ssn:System").map((e) => {
219
- const u = e["ssn:deployedSystem"], g = z(t(e["dct:identifier"]) || ""), y = u && typeof u == "object" ? z(t(u["@id"]) || u["@id"]) : "", W = g || y, M = N(e["dct:description"], "de") || void 0, E = (e["ssn:forProperty"] || []).map((o) => t(o)).filter(m), T = (e["sosa:hasLocation"] || []).map((o) => ({ lat: t(o["geo:lat"]) || "", lng: t(o["geo:long"]) || "" })).filter((o) => o.lat.length > 0 && o.lng.length > 0), B = (e["foaf:depiction"] || []).map((o) => G(o)).filter(m), O = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
219
+ const u = e["ssn:deployedSystem"], g = z(t(e["dct:identifier"]) || ""), y = u && typeof u == "object" ? z(t(u["@id"]) || u["@id"]) : "", W = g || y, x = N(e["dct:description"], "de") || void 0, M = (e["ssn:forProperty"] || []).map((o) => t(o)).filter(m), E = (e["sosa:hasLocation"] || []).map((o) => ({ lat: t(o["geo:lat"]) || "", lng: t(o["geo:long"]) || "" })).filter((o) => o.lat.length > 0 && o.lng.length > 0), T = (e["foaf:depiction"] || []).map((o) => U(o)).filter(m), B = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
220
220
  name: t(o["dct:title"]) || "",
221
221
  url: t(o["schema:url"]) || "",
222
222
  description: t(o["dct:description"]) || void 0
223
- })).filter((o) => o.url.length > 0), F = (e["ssn-system:hasSystemCapability"] || []).map((o) => t(o)).filter(m);
223
+ })).filter((o) => o.url.length > 0), O = (e["ssn-system:hasSystemCapability"] || []).map((o) => t(o)).filter(m);
224
224
  return {
225
225
  id: W,
226
- ...M ? { description: M } : {},
227
- ...E.length > 0 ? { forProperty: E } : {},
228
- ...T.length > 0 ? { locations: T } : {},
229
- ...B.length > 0 ? { depictions: B } : {},
230
- ...O.length > 0 ? { references: O } : {},
231
- ...F.length > 0 ? { functionalities: F } : {},
226
+ ...x ? { description: x } : {},
227
+ ...M.length > 0 ? { forProperty: M } : {},
228
+ ...E.length > 0 ? { locations: E } : {},
229
+ ...T.length > 0 ? { depictions: T } : {},
230
+ ...B.length > 0 ? { references: B } : {},
231
+ ...O.length > 0 ? { functionalities: O } : {},
232
232
  isHostedBy: [],
233
233
  hosts: []
234
234
  };
@@ -1,17 +1,17 @@
1
1
  import { pipe as s } from "effect";
2
2
  import * as n from "effect/Option";
3
- import { PREFIXES as Q } from "./shared.js";
4
- function H(e) {
3
+ import { PREFIXES as F } from "./shared.js";
4
+ function Q(e) {
5
5
  return e.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
6
6
  }
7
- function Z(e, r) {
7
+ function H(e, r) {
8
8
  if (e)
9
9
  return {
10
10
  "@value": e,
11
11
  "@type": r
12
12
  };
13
13
  }
14
- function T(e, r) {
14
+ function z(e, r) {
15
15
  const t = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), i = t.endsWith("/") ? t : `${t}/`, a = r.trim().replace(/^\/+/, "");
16
16
  try {
17
17
  return new URL(a, i).toString();
@@ -19,7 +19,7 @@ function T(e, r) {
19
19
  return `${i}${a}`;
20
20
  }
21
21
  }
22
- function Y(e) {
22
+ function Z(e) {
23
23
  return (e ?? []).map((t) => {
24
24
  var i, a;
25
25
  return { name: (i = t.name) == null ? void 0 : i.trim(), url: (a = t.url) == null ? void 0 : a.trim() };
@@ -28,11 +28,11 @@ function Y(e) {
28
28
  ...t.url && t.url.length > 0 ? { "foaf:homepage": t.url } : {}
29
29
  }));
30
30
  }
31
- function J(e, r) {
31
+ function Y(e, r) {
32
32
  return e ? [{ "@value": e, "@language": r }] : void 0;
33
33
  }
34
- function ee(e) {
35
- return (r) => J(r, e);
34
+ function J(e) {
35
+ return (r) => Y(r, e);
36
36
  }
37
37
  function W(e) {
38
38
  if (e)
@@ -43,31 +43,31 @@ function W(e) {
43
43
  function P(e) {
44
44
  return e != null;
45
45
  }
46
- function ne(e, r = "http://www.w3.org/2001/XMLSchema#string") {
46
+ function ee(e, r = "http://www.w3.org/2001/XMLSchema#string") {
47
47
  return s(
48
48
  n.fromNullable(e),
49
49
  n.map((t) => t.trim()),
50
50
  n.filter((t) => t.length > 0),
51
- n.flatMap((t) => n.fromNullable(Z(t, r)))
51
+ n.flatMap((t) => n.fromNullable(H(t, r)))
52
52
  );
53
53
  }
54
- const X = (e) => (e ?? "").trim(), F = (e) => e.length > 0;
54
+ const q = (e) => (e ?? "").trim(), X = (e) => e.length > 0;
55
55
  function m(e) {
56
56
  return s(
57
57
  n.fromNullable(e ?? void 0),
58
- n.map(X),
59
- n.filter(F)
58
+ n.map(q),
59
+ n.filter(X)
60
60
  );
61
61
  }
62
- function te(e) {
62
+ function ne(e) {
63
63
  return s(
64
64
  n.fromNullable(e),
65
- n.map((r) => r.map(X).filter(F)),
65
+ n.map((r) => r.map(q).filter(X)),
66
66
  n.filter((r) => r.length > 0),
67
67
  n.map((r) => [...r])
68
68
  );
69
69
  }
70
- function C(e) {
70
+ function te(e) {
71
71
  return s(
72
72
  n.fromNullable(e),
73
73
  n.map((r) => r.map((t) => W(t)).filter(P)),
@@ -75,7 +75,7 @@ function C(e) {
75
75
  n.map((r) => [...r])
76
76
  );
77
77
  }
78
- function $(e, r) {
78
+ function C(e, r) {
79
79
  return s(
80
80
  m(e),
81
81
  n.flatMap((t) => n.fromNullable(r(t)))
@@ -84,12 +84,12 @@ function $(e, r) {
84
84
  function re(e) {
85
85
  return A(e).flatMap((r) => [...r]);
86
86
  }
87
- function q(e, r, t) {
87
+ function $(e, r, t) {
88
88
  return s(
89
89
  n.fromNullable(e),
90
90
  n.map((i) => i.map(r).filter(P)),
91
91
  n.filter((i) => i.length > 0),
92
- n.map((i) => z(i, t)),
92
+ n.map((i) => T(i, t)),
93
93
  n.filter((i) => i.length > 0),
94
94
  n.map((i) => [...i])
95
95
  );
@@ -156,7 +156,7 @@ function ae(e) {
156
156
  "dct:description": t.description
157
157
  }));
158
158
  }
159
- function z(e, r) {
159
+ function T(e, r) {
160
160
  return (e ?? []).map((i) => ({
161
161
  "@type": "rdfs:Resource",
162
162
  "dct:type": r,
@@ -178,14 +178,14 @@ function z(e, r) {
178
178
  function oe(e, r) {
179
179
  return (e ?? []).map((i) => ({
180
180
  "@type": "schema:SoftwareApplication",
181
- "dct:identifier": T(r.baseRepoUrl, i.id),
181
+ "dct:identifier": z(r.baseRepoUrl, i.id),
182
182
  "schema:featureList": f((i.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0))
183
183
  }));
184
184
  }
185
185
  function se(e, r) {
186
186
  return (e ?? []).map((i) => ({
187
187
  "@type": "dcat:Dataset",
188
- "dct:identifier": T(r.baseRepoUrl, i.id)
188
+ "dct:identifier": z(r.baseRepoUrl, i.id)
189
189
  }));
190
190
  }
191
191
  function le(e, r, t) {
@@ -193,7 +193,7 @@ function le(e, r, t) {
193
193
  var c;
194
194
  return {
195
195
  "@type": "ssn:System",
196
- "dct:identifier": T(t.baseRepoUrl, a.id),
196
+ "dct:identifier": z(t.baseRepoUrl, a.id),
197
197
  "dct:description": s(
198
198
  n.fromNullable(a.description),
199
199
  n.map((o) => o.trim()),
@@ -212,7 +212,7 @@ function le(e, r, t) {
212
212
  // Corresponds to functionalities of hardware;
213
213
  // not to be confused with functionalities of software (schema:featureList)
214
214
  "ssn-system:hasSystemCapability": f((a.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0)),
215
- "dct:references": f(z((c = a.references) == null ? void 0 : c.map((o) => ({
215
+ "dct:references": f(T((c = a.references) == null ? void 0 : c.map((o) => ({
216
216
  name: o.name ?? "",
217
217
  url: o.url ?? "",
218
218
  description: o.description
@@ -238,7 +238,7 @@ function U(e) {
238
238
  "dct:description": a(j ?? "__EMPTY__"),
239
239
  "p-plan:isPrecededBy": null,
240
240
  "prov:used": f(ae(I)),
241
- "dct:references": f(z(L, "documentation")),
241
+ "dct:references": f(T(L, "documentation")),
242
242
  "p-plan:hasInputVar": b.length > 0 ? b : void 0
243
243
  };
244
244
  return n.some(k);
@@ -249,7 +249,7 @@ function ue(e, r = {}) {
249
249
  "@type": ["schema:Project", "https://piveau.eu/ns/voc#CustomResource"]
250
250
  }, i = (r == null ? void 0 : r.language) ?? "de", a = s(
251
251
  m((v = e["Grundlegende Informationen/Name"]) == null ? void 0 : v.projectName),
252
- n.map((l) => H(l)),
252
+ n.map((l) => Q(l)),
253
253
  n.filter((l) => l.length > 0),
254
254
  n.getOrUndefined
255
255
  ), c = s(
@@ -257,9 +257,9 @@ function ue(e, r = {}) {
257
257
  n.map((l) => l.trim()),
258
258
  n.filter((l) => l.length > 0),
259
259
  n.getOrElse(() => a ?? "__TODO__")
260
- ), o = ee(i);
261
- t["dct:title"] = s($((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, o), n.getOrThrow), t["dct:description"] = s($((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, o), n.getOrThrow), t["dct:identifier"] = [c], t["dcat:theme"] = s(C((k = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : k.categories), n.getOrThrow), t["schema:application"] = s(C((w = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : w.applications), n.getOrThrow), t["schema:status"] = s(m((y = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : y.projectName), n.getOrThrow), t["schema:amount"] = s(
262
- ne((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
260
+ ), o = J(i);
261
+ t["dct:title"] = s(C((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, o), n.getOrThrow), t["dct:description"] = s(C((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, o), n.getOrThrow), t["dct:identifier"] = [c], t["dcat:theme"] = s(te((k = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : k.categories), n.getOrThrow), t["schema:application"] = (w = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : w.applications, t["schema:status"] = s(m((y = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : y.projectName), n.getOrThrow), t["schema:amount"] = s(
262
+ ee((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
263
263
  n.map((l) => {
264
264
  var g;
265
265
  return {
@@ -270,9 +270,9 @@ function ue(e, r = {}) {
270
270
  };
271
271
  }),
272
272
  n.getOrUndefined
273
- ), t["schema:skills"] = s(te((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(m((R = e["Optionale Daten"]) == null ? void 0 : R.startDate), n.getOrUndefined), t["schema:endDate"] = s(m((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
273
+ ), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(m((R = e["Optionale Daten"]) == null ? void 0 : R.startDate), n.getOrUndefined), t["schema:endDate"] = s(m((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
274
274
  const p = [
275
- q(
275
+ $(
276
276
  (K = e["Optionale Daten"]) == null ? void 0 : K.links,
277
277
  (l) => {
278
278
  const g = s(m(l.url), n.getOrUndefined);
@@ -285,7 +285,7 @@ function ue(e, r = {}) {
285
285
  },
286
286
  "documentation"
287
287
  ),
288
- q(
288
+ $(
289
289
  (B = e["Optionale Daten"]) == null ? void 0 : B.references,
290
290
  (l) => {
291
291
  const g = s(m(l.homepage), n.getOrUndefined);
@@ -311,7 +311,7 @@ function ue(e, r = {}) {
311
311
  n.getOrUndefined
312
312
  ), t["dct:contributor"] = s(
313
313
  n.fromNullable((V = e["Optionale Daten"]) == null ? void 0 : V.partners),
314
- n.map((l) => Y(l)),
314
+ n.map((l) => Z(l)),
315
315
  n.filter((l) => l.length > 0),
316
316
  n.getOrUndefined
317
317
  );
@@ -350,7 +350,7 @@ function ue(e, r = {}) {
350
350
  ]);
351
351
  return t["p-plan:hasStep"] = f(L), {
352
352
  "@context": {
353
- ...Q
353
+ ...F
354
354
  },
355
355
  "@graph": M(t)
356
356
  };
@@ -358,8 +358,8 @@ function ue(e, r = {}) {
358
358
  export {
359
359
  ue as encodeProject,
360
360
  P as isNonNullable,
361
- H as slugify,
362
- J as toLangedValue,
361
+ Q as slugify,
362
+ Y as toLangedValue,
363
363
  W as toNodeReference,
364
- Z as toTypedValue
364
+ H as toTypedValue
365
365
  };
@@ -1,117 +1,121 @@
1
- import { schemaDateField as n, takeFirst as e, schemaFoafAgent as c, schemaContactPoint as p, schemaIriString as r, schemaLanguageContainer as a, schemaTypedLiteral as s } from "@piveau/jsonld";
2
- import * as t from "zod/v4";
3
- const o = t.object({
4
- "@id": t.string().optional(),
5
- "@type": t.string(),
6
- "dct:type": t.preprocess(e, t.string().optional()),
7
- "schema:url": t.preprocess(e, t.string()),
8
- "dct:title": t.preprocess(e, t.string()),
9
- "dct:description": t.preprocess(e, t.string().optional())
10
- }), l = t.object({
11
- "dct:title": t.preprocess(e, t.string())
12
- }), i = t.object({
13
- "@type": t.preprocess(e, t.string().optional())
14
- }), d = i.extend({
15
- "@type": t.literal("schema:SoftwareApplication"),
16
- "dct:identifier": t.preprocess(e, t.string().optional()),
17
- "schema:featureList": t.array(t.string()).optional()
18
- }), y = i.extend({
19
- "@type": t.literal("dcat:Dataset"),
20
- "dct:identifier": t.preprocess(e, t.string().optional())
21
- }), m = t.object({
22
- "@type": t.string().optional(),
23
- "geo:lat": t.preprocess(e, t.string().optional()),
24
- "geo:long": t.preprocess(e, t.string().optional())
25
- }), h = i.extend({
26
- "@type": t.literal("ssn:System"),
27
- "dct:description": t.array(a).optional(),
28
- "ssn:deployedSystem": t.preprocess(e, r.optional()),
1
+ import { schemaDateField as n, takeFirst as t, schemaFoafAgent as p, schemaContactPoint as l, schemaIriString as i, schemaLanguageContainer as a, schemaTypedLiteral as s } from "@piveau/jsonld";
2
+ import { asArray as d } from "@piveau/sdk-vue";
3
+ import * as e from "zod/v4";
4
+ function y(r) {
5
+ return typeof r == "string" ? r : typeof r == "object" && r !== null && "@id" in r ? t(r["@id"]) : r;
6
+ }
7
+ const o = e.object({
8
+ "@id": e.string().optional(),
9
+ "@type": e.string(),
10
+ "dct:type": e.preprocess(t, e.string().optional()),
11
+ "schema:url": e.preprocess(t, e.string()),
12
+ "dct:title": e.preprocess(t, e.string()),
13
+ "dct:description": e.preprocess(t, e.string().optional())
14
+ }), m = e.object({
15
+ "dct:title": e.preprocess(t, e.string())
16
+ }), c = e.object({
17
+ "@type": e.preprocess(t, e.string().optional())
18
+ }), h = c.extend({
19
+ "@type": e.literal("schema:SoftwareApplication"),
20
+ "dct:identifier": e.preprocess(t, e.string().optional()),
21
+ "schema:featureList": e.array(e.string()).optional()
22
+ }), g = c.extend({
23
+ "@type": e.literal("dcat:Dataset"),
24
+ "dct:identifier": e.preprocess(t, e.string().optional())
25
+ }), f = e.object({
26
+ "@type": e.string().optional(),
27
+ "geo:lat": e.preprocess(t, e.string().optional()),
28
+ "geo:long": e.preprocess(t, e.string().optional())
29
+ }), j = c.extend({
30
+ "@type": e.literal("ssn:System"),
31
+ "dct:description": e.array(a).optional(),
32
+ "ssn:deployedSystem": e.preprocess(t, i.optional()),
29
33
  /**
30
34
  * The purpose of the hardware instance ("Zwecke")
31
35
  */
32
- "ssn:forProperty": t.array(t.string()).optional(),
33
- "sosa:hasLocation": t.array(m).optional(),
34
- "foaf:depiction": t.array(r).optional(),
35
- "dct:references": t.array(o).optional(),
36
+ "ssn:forProperty": e.array(e.string()).optional(),
37
+ "sosa:hasLocation": e.array(f).optional(),
38
+ "foaf:depiction": e.array(i).optional(),
39
+ "dct:references": e.array(o).optional(),
36
40
  /**
37
41
  * Corresponds to functionalities of hardware;
38
42
  * not to be confused with schema:featureList of software
39
43
  */
40
- "ssn-system:hasSystemCapability": t.array(t.string()).optional()
41
- }), g = t.discriminatedUnion("@type", [
42
- d,
43
- y,
44
- h
45
- ]), f = t.object({
46
- "@type": t.string(),
47
- "schema:text": t.preprocess(e, t.string()),
48
- "schema:acceptedAnswer": t.preprocess(e, t.string()),
49
- "schema:position": t.preprocess(e, s)
50
- }), j = t.object({
51
- "@type": t.string(),
52
- "dct:identifier": t.preprocess(e, t.string()),
53
- "dct:type": t.preprocess(e, t.string().optional()),
54
- "schema:position": t.preprocess(e, s.optional()),
55
- "schema:question": t.array(f).optional(),
56
- "p-plan:isPrecededBy": t.any(),
57
- "dct:references": t.array(o).optional()
58
- }), u = t.object({
59
- "@type": t.string(),
60
- "dct:identifier": t.preprocess(e, t.string()),
61
- "p-plan:Activity": t.preprocess(e, t.string()),
62
- "dct:description": t.array(a),
63
- "schema:about": t.array(t.string()).optional(),
64
- "schema:position": t.preprocess(e, s.optional()),
65
- "prov:used": t.array(l).optional(),
66
- "p-plan:isPrecededBy": t.any(),
67
- "p-plan:hasInputVar": t.array(g).optional(),
68
- "dct:references": t.array(o).optional()
69
- }), P = t.object({
70
- "@type": t.string(),
71
- "schema:description": t.preprocess(e, t.string().optional()),
72
- "schema:currency": t.preprocess(e, t.string().optional()),
73
- "schema:value": t.preprocess(e, s.optional())
74
- }), L = t.object({
75
- "@id": t.string().optional(),
76
- "@type": t.array(t.string()).min(2),
44
+ "ssn-system:hasSystemCapability": e.array(e.string()).optional()
45
+ }), u = e.discriminatedUnion("@type", [
46
+ h,
47
+ g,
48
+ j
49
+ ]), P = e.object({
50
+ "@type": e.string(),
51
+ "schema:text": e.preprocess(t, e.string()),
52
+ "schema:acceptedAnswer": e.preprocess(t, e.string()),
53
+ "schema:position": e.preprocess(t, s)
54
+ }), b = e.object({
55
+ "@type": e.string(),
56
+ "dct:identifier": e.preprocess(t, e.string()),
57
+ "dct:type": e.preprocess(t, e.string().optional()),
58
+ "schema:position": e.preprocess(t, s.optional()),
59
+ "schema:question": e.array(P).optional(),
60
+ "p-plan:isPrecededBy": e.any(),
61
+ "dct:references": e.array(o).optional()
62
+ }), A = e.object({
63
+ "@type": e.string(),
64
+ "dct:identifier": e.preprocess(t, e.string()),
65
+ "p-plan:Activity": e.preprocess(t, e.string()),
66
+ "dct:description": e.array(a),
67
+ "schema:about": e.array(e.string()).optional(),
68
+ "schema:position": e.preprocess(t, s.optional()),
69
+ "prov:used": e.array(m).optional(),
70
+ "p-plan:isPrecededBy": e.any(),
71
+ "p-plan:hasInputVar": e.array(u).optional(),
72
+ "dct:references": e.array(o).optional()
73
+ }), L = e.object({
74
+ "@type": e.string(),
75
+ "schema:description": e.preprocess(t, e.string().optional()),
76
+ "schema:currency": e.preprocess(t, e.string().optional()),
77
+ "schema:value": e.preprocess(t, s.optional())
78
+ }), w = e.object({
79
+ "@id": e.string().optional(),
80
+ "@type": e.array(e.string()).min(2),
77
81
  // Core identifiers and labels
78
- "dct:identifier": t.array(t.string()).optional(),
79
- "dct:title": t.array(a),
80
- "dct:description": t.array(a),
82
+ "dct:identifier": e.array(e.string()).optional(),
83
+ "dct:title": e.array(a),
84
+ "dct:description": e.array(a),
81
85
  // Themes/categories as simple IRI nodes
82
- "dcat:theme": t.array(r),
86
+ "dcat:theme": e.array(i),
83
87
  // Applications and status as literals
84
- "schema:application": t.array(r),
85
- "schema:status": t.preprocess(e, t.string()),
88
+ "schema:application": e.preprocess((r) => d(r).map(y), e.array(e.string())),
89
+ "schema:status": e.preprocess(t, e.string()),
86
90
  // Optional dates (date/dateTime)
87
91
  "schema:startDate": n,
88
92
  "schema:endDate": n,
89
93
  // Optional skills (literals)
90
- "schema:skills": t.array(t.string()).optional(),
94
+ "schema:skills": e.array(e.string()).optional(),
91
95
  // Contact and partners
92
- "dcat:contactPoint": t.array(p).optional(),
93
- "dct:contributor": t.array(c).optional(),
96
+ "dcat:contactPoint": e.array(l).optional(),
97
+ "dct:contributor": e.array(p).optional(),
94
98
  // Optional budget
95
- "schema:amount": t.preprocess(e, P.optional()),
99
+ "schema:amount": e.preprocess(t, L.optional()),
96
100
  // Organizational and technical steps
97
- "schema:hasPart": t.array(j).optional(),
98
- "p-plan:hasStep": t.array(u).optional(),
101
+ "schema:hasPart": e.array(b).optional(),
102
+ "p-plan:hasStep": e.array(A).optional(),
99
103
  // References and last modified
100
- "dct:references": t.array(o).optional(),
104
+ "dct:references": e.array(o).optional(),
101
105
  "prov:generatedAtTime": n
102
106
  });
103
107
  export {
104
- y as schemaDatasetLink,
105
- h as schemaHardwareInstance,
106
- m as schemaHardwareLocation,
107
- L as schemaProject,
108
- g as schemaProjectInputLink,
109
- i as schemaProjectInputLinkBase,
110
- l as schemaProjectMethodsUsed,
111
- P as schemaProjectMonetaryAmount,
112
- j as schemaProjectQAPage,
113
- f as schemaProjectQuestionAnswer,
108
+ g as schemaDatasetLink,
109
+ j as schemaHardwareInstance,
110
+ f as schemaHardwareLocation,
111
+ w as schemaProject,
112
+ u as schemaProjectInputLink,
113
+ c as schemaProjectInputLinkBase,
114
+ m as schemaProjectMethodsUsed,
115
+ L as schemaProjectMonetaryAmount,
116
+ b as schemaProjectQAPage,
117
+ P as schemaProjectQuestionAnswer,
114
118
  o as schemaProjectResource,
115
- u as schemaProjectTechnicalStep,
116
- d as schemaSoftwareLink
119
+ A as schemaProjectTechnicalStep,
120
+ h as schemaSoftwareLink
117
121
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.2.0-alpha.15",
4
+ "version": "0.2.0-alpha.17",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",