@piveau/dpi 0.2.0-alpha.34 → 0.2.0-alpha.35

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 (15) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ActionCard.vue.js +2 -2
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +1 -0
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +37 -33
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +41 -37
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +1 -1
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +69 -64
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +1 -1
  10. package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue.js +2 -2
  11. package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue2.js +20 -14
  12. package/dist/packages/dpi/src/data-provider-interface/components/TheErrorDialog.vue.js +44 -41
  13. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +97 -95
  14. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +26 -19
  15. package/package.json +1 -1
@@ -1,83 +1,85 @@
1
1
  import { pipe as A } from "effect";
2
- import * as d from "effect/Option";
2
+ import * as g from "effect/Option";
3
3
  import * as H from "jsonld";
4
4
  import { schemaProject as q } from "../../schema/projectLdSchema.js";
5
5
  import { getFirstItem as G, extractStringValue as t, extractLocalizedString as N } from "../useDpiSimpleLoader.js";
6
- import { isNonNullable as m } from "./encodeProject.js";
7
- import { PREFIXES as F, nonEmpty as k } from "./shared.js";
8
- function z(r) {
9
- const a = (r || "").trim();
6
+ import { isNonNullable as h } from "./encodeProject.js";
7
+ import { PREFIXES as F, nonEmpty as j } from "./shared.js";
8
+ function W(n) {
9
+ const a = (n || "").trim();
10
10
  if (!a)
11
11
  return "";
12
12
  try {
13
- const n = new URL(a).pathname.split("/").filter(Boolean);
14
- return n[n.length - 1] || "";
13
+ const r = new URL(a).pathname.split("/").filter(Boolean);
14
+ return r[r.length - 1] || "";
15
15
  } catch {
16
16
  return a;
17
17
  }
18
18
  }
19
- async function C(r) {
19
+ async function C(n) {
20
20
  const a = {
21
21
  "@context": F,
22
22
  "@type": "schema:Project"
23
- }, s = await H.frame(r, a, {
23
+ }, s = await H.frame(n, a, {
24
24
  embed: "@always",
25
25
  omitGraph: !0
26
- }), n = await H.compact(s, F, {
26
+ }), r = await H.compact(s, F, {
27
27
  compactArrays: !1,
28
28
  graph: !1
29
- }), l = q.safeParse(G(n == null ? void 0 : n["@graph"]));
30
- if (!l.success)
29
+ }), d = q.safeParse(G(r == null ? void 0 : r["@graph"]));
30
+ if (!d.success)
31
31
  throw new Error(`Failed to parse project
32
32
 
33
- ${l.error.message}`);
34
- return l.data;
33
+ ${d.error.message}`);
34
+ return d.data;
35
35
  }
36
- function U(r) {
37
- return k(G(r["@id"]));
36
+ function U(n) {
37
+ return j(G(n["@id"]));
38
38
  }
39
- function K(r, a) {
40
- var n, l;
39
+ function K(n, a) {
40
+ var r, d;
41
41
  const { visibility: s } = a;
42
42
  return {
43
43
  "Auffindbarkeit/Sichtbarkeit": {
44
44
  visibility: s
45
45
  },
46
46
  "Auffindbarkeit/Kategorien": {
47
- categories: ((n = r["dcat:theme"]) == null ? void 0 : n.map(U).filter(m)) || []
47
+ categories: ((r = n["dcat:theme"]) == null ? void 0 : r.map(U).filter(h)) || []
48
48
  },
49
49
  "Auffindbarkeit/Anwendungsbereiche": {
50
- applications: ((l = r["schema:application"]) == null ? void 0 : l.filter(m)) || []
50
+ applications: ((d = n["schema:application"]) == null ? void 0 : d.filter(h)) || []
51
51
  }
52
52
  };
53
53
  }
54
- function V(r) {
54
+ function V(n) {
55
55
  var s;
56
- const a = (s = r["dcat:contactPoint"]) == null ? void 0 : s.map((n) => ({
57
- name: k(t(n["vcard:fn"])),
58
- mail: k(t(n["vcard:hasEmail"])),
59
- phone: k(t(n["vcard:hasTelephone"]))
60
- })).filter(m);
56
+ const a = (s = n["dcat:contactPoint"]) == null ? void 0 : s.map((r) => ({
57
+ name: j(t(r["vcard:fn"])),
58
+ mail: j(t(r["vcard:hasEmail"])),
59
+ phone: j(t(r["vcard:hasTelephone"]))
60
+ })).filter(h);
61
61
  return {
62
62
  "Grundlegende Informationen/Name": {
63
63
  projectName: A(
64
- d.fromNullable(N(r["dct:title"], "de")),
65
- d.flatMap((n) => k(n) ? d.some(n) : d.none()),
66
- d.getOrThrowWith(() => new Error("Project name is missing"))
64
+ g.fromNullable(N(n["dct:title"], "de")),
65
+ g.flatMap((r) => j(r) ? g.some(r) : g.none()),
66
+ g.getOrThrowWith(() => new Error("Project name is missing"))
67
67
  )
68
68
  },
69
69
  "Grundlegende Informationen/Beschreibung": {
70
70
  projectDescription: A(
71
- d.fromNullable(N(r["dct:description"], "de")),
72
- d.flatMap((n) => k(n) ? d.some(n) : d.none()),
73
- d.getOrThrowWith(() => new Error("Project description is missing"))
71
+ g.fromNullable(N(n["dct:description"], "de")),
72
+ // O.flatMap(s => nonEmpty(s) ? O.some(s) : O.none()),
73
+ // O.getOrThrowWith(() => new Error('Project description is missing')),
74
+ g.getOrElse(() => "")
74
75
  )
75
76
  },
76
77
  "Grundlegende Informationen/Projektstatus": {
77
78
  projectName: A(
78
- d.fromNullable(r["schema:status"]),
79
- d.flatMap((n) => k(n) ? d.some(n) : d.none()),
80
- d.getOrThrowWith(() => new Error("Project status is missing"))
79
+ g.fromNullable(n["schema:status"]),
80
+ // O.flatMap(s => nonEmpty(s) ? O.some(s) : O.none()),
81
+ // O.getOrThrowWith(() => new Error('Project status is missing')),
82
+ g.getOrElse(() => "")
81
83
  )
82
84
  },
83
85
  "Grundlegende Informationen/Organisation": {
@@ -89,44 +91,44 @@ function V(r) {
89
91
  }
90
92
  };
91
93
  }
92
- function R(r) {
93
- var a, s, n, l, b, D, v, i;
94
+ function R(n) {
95
+ var a, s, r, d, b, k, D, i;
94
96
  return {
95
97
  "Optionale Daten": {
96
- partners: ((a = r["dct:contributor"]) == null ? void 0 : a.map((c) => ({
98
+ partners: ((a = n["dct:contributor"]) == null ? void 0 : a.map((c) => ({
97
99
  name: t(c["foaf:name"]),
98
100
  url: t(c["foaf:homepage"])
99
- })).filter(m)) || [],
100
- requiredExpertise: ((s = r["schema:skills"]) == null ? void 0 : s.map(t).filter(m)) || [],
101
- references: ((l = (n = r["dct:references"]) == null ? void 0 : n.filter((c) => c["dct:type"] === "image")) == null ? void 0 : l.map((c) => ({
101
+ })).filter(h)) || [],
102
+ requiredExpertise: ((s = n["schema:skills"]) == null ? void 0 : s.map(t).filter(h)) || [],
103
+ references: ((d = (r = n["dct:references"]) == null ? void 0 : r.filter((c) => c["dct:type"] === "image")) == null ? void 0 : d.map((c) => ({
102
104
  homepage: t(c["schema:url"])
103
- })).filter(m)) || [],
104
- startDate: t(r["schema:startDate"] || ""),
105
- endDate: t(r["schema:endDate"] || ""),
106
- budget: t(((b = r["schema:amount"]) == null ? void 0 : b["schema:value"]) || ""),
107
- budgetDescription: t(((D = r["schema:amount"]) == null ? void 0 : D["schema:description"]) || ""),
105
+ })).filter(h)) || [],
106
+ startDate: t(n["schema:startDate"] || ""),
107
+ endDate: t(n["schema:endDate"] || ""),
108
+ budget: t(((b = n["schema:amount"]) == null ? void 0 : b["schema:value"]) || ""),
109
+ budgetDescription: t(((k = n["schema:amount"]) == null ? void 0 : k["schema:description"]) || ""),
108
110
  // todo:
109
- links: ((i = (v = r["dct:references"]) == null ? void 0 : v.filter((c) => c["dct:type"] === "documentation")) == null ? void 0 : i.map((c) => ({
111
+ links: ((i = (D = n["dct:references"]) == null ? void 0 : D.filter((c) => c["dct:type"] === "documentation")) == null ? void 0 : i.map((c) => ({
110
112
  name: t(c["dct:title"]),
111
113
  url: t(c["schema:url"]),
112
114
  description: t(c["dct:description"])
113
- })).filter(m)) || []
115
+ })).filter(h)) || []
114
116
  }
115
117
  };
116
118
  }
117
- function $(r) {
118
- const a = r["schema:hasPart"] ?? [], s = (h) => a.find((f) => f["dct:type"] === h), n = (h) => {
119
+ function $(n) {
120
+ const a = n["schema:hasPart"] ?? [], s = (u) => a.find((m) => m["dct:type"] === u), r = (u) => {
119
121
  var p, e;
120
- const f = /* @__PURE__ */ new Map(), P = [...(h == null ? void 0 : h["schema:question"]) ?? []].sort((u, g) => {
121
- const y = Number.parseInt(t(u["schema:position"])), W = Number.parseInt(t(g["schema:position"]));
122
- return (Number.isNaN(y) ? 0 : y) - (Number.isNaN(W) ? 0 : W);
122
+ const m = /* @__PURE__ */ new Map(), v = [...(u == null ? void 0 : u["schema:question"]) ?? []].sort((l, f) => {
123
+ const y = Number.parseInt(t(l["schema:position"])), z = Number.parseInt(t(f["schema:position"]));
124
+ return (Number.isNaN(y) ? 0 : y) - (Number.isNaN(z) ? 0 : z);
123
125
  });
124
- for (const u of P) {
125
- const g = (p = u["schema:text"]) == null ? void 0 : p.trim(), y = (e = u["schema:acceptedAnswer"]) == null ? void 0 : e.trim();
126
- g && y && f.set(g, y);
126
+ for (const l of v) {
127
+ const f = (p = l["schema:text"]) == null ? void 0 : p.trim(), y = (e = l["schema:acceptedAnswer"]) == null ? void 0 : e.trim();
128
+ f && y && m.set(f, y);
127
129
  }
128
- return f;
129
- }, l = {
130
+ return m;
131
+ }, d = {
130
132
  projectTriggers: "Was waren Ausloeser fuer das Projekt (z. B. rechtliche oder politische Vorgaben, intrinsische Motivation oder inspirierende Projekte aus anderen Kommunen)?",
131
133
  involvedStakeholders: "Welche relevanten Akteure innerhalb oder ausserhalb Ihrer Organisation haben Sie fruehzeitig involviert (z. B. um politische Rueckendeckung sicherzustellen)?",
132
134
  dataCollectionMethod: "Wie haben Sie den Bestand vorhandener Daten erhoben?",
@@ -136,39 +138,39 @@ function $(r) {
136
138
  tenderFormat: "Welche Ausschreibungsform haben Sie gewaehlt und warum? Gab es eine Vorlage oder Muster-Leistungsbeschreibung, die hilfreich war?",
137
139
  tenderTips: "Welche Tipps haben Sie fuer eine erfolgreiche Ausschreibung?",
138
140
  resourcePlanning: "Wie haben Sie die Ressourcenplanung fuer die Entwicklung und den Betrieb Ihres Digitalen Zwillings gestaltet und gesichert?"
139
- }, D = {
141
+ }, k = {
140
142
  projectTriggers: "Wie haben Sie die Zusammenarbeit mit den Dienstleistern organisiert und wie wurden relevante Stakeholder in Entscheidungsprozesse eingebunden?",
141
143
  involvedStakeholders: "Gab es Verzoegerungen und wenn ja, was waren die Gruende?",
142
144
  dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
143
145
  budgetPlanning: "Welche Ueberlegungen sind in Ihre Entscheidung fuer eine Open-Source-Loesung eingeflossen und welche Erfahrungen haben Sie gemacht?"
144
- }, v = {
146
+ }, D = {
145
147
  projectTriggers: "Was sind Ihre wichtigsten Learnings aus dem Projekt? Was wuerden Sie beim naechsten Use Case anders machen?",
146
148
  involvedStakeholders: "Wird die Wirksamkeit Ihres Projekts ueberwacht und wenn ja, wie? Ist der erwartete Nutzen eingetreten?",
147
149
  dataCollectionMethod: "Gibt es Plaene fuer eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafuer?",
148
150
  budgetPlanning: "Welche externen Unterstuetzungsangebote haben Ihnen geholfen oder auch gefehlt?"
149
- }, i = (h, f) => {
150
- const j = s(h), P = n(j), p = {};
151
- for (const [e, u] of Object.entries(f)) {
152
- const g = P.get(u);
153
- g && (p[e] = g);
151
+ }, i = (u, m) => {
152
+ const I = s(u), v = r(I), p = {};
153
+ for (const [e, l] of Object.entries(m)) {
154
+ const f = v.get(l);
155
+ f && (p[e] = f);
154
156
  }
155
157
  return p;
156
- }, c = i("Initiieren", l), w = i("Planen", b), S = i("Umsetzen", D), I = i("Weiterdenken", v);
158
+ }, c = i("Initiieren", d), w = i("Planen", b), S = i("Umsetzen", k), P = i("Weiterdenken", D);
157
159
  return {
158
160
  "Projektphasen (optional)": {},
159
161
  "Projektphasen (optional)/Initiieren": c,
160
162
  "Projektphasen (optional)/Planen": w,
161
163
  "Projektphasen (optional)/Umsetzen": S,
162
- "Projektphasen (optional)/Weiterdenken": I
164
+ "Projektphasen (optional)/Weiterdenken": P
163
165
  };
164
166
  }
165
- function L(r) {
166
- const a = r["p-plan:hasStep"] ?? [], s = {
167
+ function L(n) {
168
+ const a = n["p-plan:hasStep"] ?? [], s = {
167
169
  datenerfassung: "1. Datenerfassung",
168
170
  datenverarbeitung: "2. Datenverarbeitung",
169
171
  datensimulation: "3. Datensimulation",
170
172
  datenvisualisierung: "4. Datenvisualisierung"
171
- }, n = {
173
+ }, r = {
172
174
  "Technische Prozessschritte": {},
173
175
  "1. Datenerfassung/Grundlegende Informationen": {},
174
176
  "1. Datenerfassung/Software": {},
@@ -186,61 +188,61 @@ function L(r) {
186
188
  "4. Datenvisualisierung/Software": {},
187
189
  "4. Datenvisualisierung/Datensätze": {},
188
190
  "4. Datenvisualisierung/Hardware": {}
189
- }, l = (i) => `${i}/Grundlegende Informationen`, b = (i) => `${i}/Software`, D = (i) => `${i}/Datensätze`, v = (i) => `${i}/Hardware`;
191
+ }, d = (i) => `${i}/Grundlegende Informationen`, b = (i) => `${i}/Software`, k = (i) => `${i}/Datensätze`, D = (i) => `${i}/Hardware`;
190
192
  for (const i of a) {
191
193
  const c = (t(i["p-plan:Activity"] || "") || "").trim().toLowerCase(), w = s[c];
192
194
  if (!w)
193
195
  continue;
194
- const S = N(i["dct:description"], "de") || "", I = (i["prov:used"] || []).map((e) => ({
196
+ const S = N(i["dct:description"], "de") || "", P = (i["prov:used"] || []).map((e) => ({
195
197
  name: t(e["dct:title"]) || ""
196
198
  // description: extractStringValue(m['dct:description']) || undefined,
197
- })).filter((e) => (e.name ?? "").length > 0), h = (i["dct:references"] || []).filter((e) => t(e["dct:type"]) === "documentation").map((e) => ({
199
+ })).filter((e) => (e.name ?? "").length > 0), u = (i["dct:references"] || []).filter((e) => t(e["dct:type"]) === "documentation").map((e) => ({
198
200
  name: t(e["dct:title"]) || "",
199
201
  url: t(e["schema:url"]) || "",
200
202
  description: t(e["dct:description"]) || void 0
201
203
  })).filter((e) => e.url.length > 0 && e.name.length > 0);
202
- (S || I.length > 0 || h.length > 0) && (n[l(w)] = {
204
+ (S || P.length > 0 || u.length > 0) && (r[d(w)] = {
203
205
  ...S ? { description: S } : {},
204
- ...I.length > 0 ? { methods: I } : {},
205
- ...h.length > 0 ? { links: h } : {}
206
+ ...P.length > 0 ? { methods: P } : {},
207
+ ...u.length > 0 ? { links: u } : {}
206
208
  });
207
- const f = i["p-plan:hasInputVar"] || [], j = f.filter((e) => t(e["@type"]) === "schema:SoftwareApplication").map((e) => ({
208
- id: z(t(e["dct:identifier"]) || ""),
209
- functionalities: (e["schema:featureList"] || []).map((u) => t(u)).filter(m)
209
+ const m = i["p-plan:hasInputVar"] || [], I = m.filter((e) => t(e["@type"]) === "schema:SoftwareApplication").map((e) => ({
210
+ id: W(t(e["dct:identifier"]) || ""),
211
+ functionalities: (e["schema:featureList"] || []).map((l) => t(l)).filter(h)
210
212
  })).filter((e) => e.id.length > 0);
211
- j.length > 0 && (n[b(w)] = {
212
- selected: j
213
+ I.length > 0 && (r[b(w)] = {
214
+ selected: I
213
215
  });
214
- const P = f.filter((e) => t(e["@type"]) === "dcat:Dataset").map((e) => ({ id: z(t(e["dct:identifier"]) || "") })).filter((e) => e.id.length > 0);
215
- P.length > 0 && (n[D(w)] = {
216
- selected: P
216
+ const v = m.filter((e) => t(e["@type"]) === "dcat:Dataset").map((e) => ({ id: W(t(e["dct:identifier"]) || "") })).filter((e) => e.id.length > 0);
217
+ v.length > 0 && (r[k(w)] = {
218
+ selected: v
217
219
  });
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, 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), B = (e["foaf:depiction"] || []).map((o) => U(o)).filter(m), T = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
220
+ const p = m.filter((e) => t(e["@type"]) === "ssn:System").map((e) => {
221
+ const l = e["ssn:deployedSystem"], f = W(t(e["dct:identifier"]) || ""), y = l && typeof l == "object" ? W(t(l["@id"]) || l["@id"]) : "", z = f || y, x = N(e["dct:description"], "de") || void 0, E = (e["ssn:forProperty"] || []).map((o) => t(o)).filter(h), B = (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), M = (e["foaf:depiction"] || []).map((o) => U(o)).filter(h), T = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
220
222
  name: t(o["dct:title"]) || "",
221
223
  url: t(o["schema:url"]) || "",
222
224
  description: t(o["dct:description"]) || void 0
223
- })).filter((o) => o.url.length > 0), O = (e["ssn-system:hasSystemCapability"] || []).map((o) => t(o)).filter(m);
225
+ })).filter((o) => o.url.length > 0), O = (e["ssn-system:hasSystemCapability"] || []).map((o) => t(o)).filter(h);
224
226
  return {
225
- id: W,
227
+ id: z,
226
228
  ...x ? { description: x } : {},
227
- ...M.length > 0 ? { forProperty: M } : {},
228
- ...E.length > 0 ? { locations: E } : {},
229
- ...B.length > 0 ? { depictions: B } : {},
229
+ ...E.length > 0 ? { forProperty: E } : {},
230
+ ...B.length > 0 ? { locations: B } : {},
231
+ ...M.length > 0 ? { depictions: M } : {},
230
232
  ...T.length > 0 ? { references: T } : {},
231
233
  ...O.length > 0 ? { functionalities: O } : {},
232
234
  isHostedBy: e["sosa:isHostedBy"] || [],
233
235
  hosts: []
234
236
  };
235
237
  }).filter((e) => (e.id ?? "").length > 0);
236
- p.length > 0 && (n[v(w)] = {
238
+ p.length > 0 && (r[D(w)] = {
237
239
  selected: p
238
240
  });
239
241
  }
240
- return n;
242
+ return r;
241
243
  }
242
- async function _(r, a) {
243
- const s = await C(r);
244
+ async function _(n, a) {
245
+ const s = await C(n);
244
246
  return {
245
247
  Landing: {},
246
248
  ...K(s, { visibility: (a == null ? void 0 : a.visibility) || "public" }),
@@ -29,7 +29,7 @@ function Z(e) {
29
29
  }));
30
30
  }
31
31
  function Y(e, r) {
32
- return e ? [{ "@value": e, "@language": r }] : void 0;
32
+ return [{ "@value": e, "@language": r || "" }];
33
33
  }
34
34
  function J(e) {
35
35
  return (r) => Y(r, e);
@@ -89,7 +89,7 @@ function C(e, r, t) {
89
89
  n.fromNullable(e),
90
90
  n.map((a) => a.map(r).filter(N)),
91
91
  n.filter((a) => a.length > 0),
92
- n.map((a) => T(a, t)),
92
+ n.map((a) => E(a, t)),
93
93
  n.filter((a) => a.length > 0),
94
94
  n.map((a) => [...a])
95
95
  );
@@ -156,7 +156,7 @@ function ae(e) {
156
156
  "dct:description": t.description
157
157
  }));
158
158
  }
159
- function T(e, r) {
159
+ function E(e, r) {
160
160
  return (e ?? []).map((a) => ({
161
161
  "@type": "rdfs:Resource",
162
162
  "dct:type": r,
@@ -213,7 +213,7 @@ function le(e, r, t) {
213
213
  // Corresponds to functionalities of hardware;
214
214
  // not to be confused with functionalities of software (schema:featureList)
215
215
  "ssn-system:hasSystemCapability": u((o.functionalities ?? []).map((i) => i == null ? void 0 : i.trim()).filter((i) => !!i && i.length > 0)),
216
- "dct:references": u(T((c = o.references) == null ? void 0 : c.map((i) => ({
216
+ "dct:references": u(E((c = o.references) == null ? void 0 : c.map((i) => ({
217
217
  name: i.name ?? "",
218
218
  url: i.url ?? "",
219
219
  description: i.description
@@ -222,13 +222,13 @@ function le(e, r, t) {
222
222
  });
223
223
  }
224
224
  function U(e) {
225
- var w, y, O;
226
- const { prefixKey: r, activityLabel: t, input: a, toLanged: o, context: c } = e, i = `${r}/Grundlegende Informationen`, p = `${r}/Software`, m = `${r}/Datensätze`, x = `${r}/Hardware`, d = a[i], j = d == null ? void 0 : d.description, I = s(
225
+ var y, w, O;
226
+ const { prefixKey: r, activityLabel: t, input: a, toLanged: o, context: c } = e, i = `${r}/Grundlegende Informationen`, p = `${r}/Software`, m = `${r}/Datensätze`, x = `${r}/Hardware`, d = a[i], j = d == null ? void 0 : d.description, W = s(
227
227
  n.fromNullable(j),
228
228
  n.map((h) => h.trim()),
229
229
  n.filter((h) => h.length > 0),
230
230
  n.getOrUndefined
231
- ), L = d == null ? void 0 : d.methods, W = d == null ? void 0 : d.links, R = (w = a[p]) == null ? void 0 : w.selected, v = (y = a[m]) == null ? void 0 : y.selected, S = (O = a[x]) == null ? void 0 : O.selected, b = [
231
+ ), I = d == null ? void 0 : d.methods, L = d == null ? void 0 : d.links, R = (y = a[p]) == null ? void 0 : y.selected, v = (w = a[m]) == null ? void 0 : w.selected, S = (O = a[x]) == null ? void 0 : O.selected, b = [
232
232
  ...oe(R, c),
233
233
  ...se(v, c),
234
234
  ...le(S, o, c)
@@ -236,16 +236,16 @@ function U(e) {
236
236
  "@type": "p-plan:Step",
237
237
  "dct:identifier": "__TODO__",
238
238
  "p-plan:Activity": t,
239
- "dct:description": o(I ?? "__EMPTY__"),
239
+ "dct:description": o(W ?? "__EMPTY__"),
240
240
  "p-plan:isPrecededBy": null,
241
- "prov:used": u(ae(L)),
242
- "dct:references": u(T(W, "documentation")),
241
+ "prov:used": u(ae(I)),
242
+ "dct:references": u(E(L, "documentation")),
243
243
  "p-plan:hasInputVar": b.length > 0 ? b : void 0
244
244
  };
245
245
  return n.some(k);
246
246
  }
247
247
  function ue(e, r = {}) {
248
- var v, S, b, k, w, y, O, h, _, E, B, K, G, V;
248
+ var v, S, b, k, y, w, O, h, T, _, B, K, G, V;
249
249
  const t = {
250
250
  "@type": ["schema:Project", "https://piveau.eu/ns/voc#CustomResource"]
251
251
  }, a = (r == null ? void 0 : r.language) ?? "de", o = s(
@@ -259,7 +259,14 @@ function ue(e, r = {}) {
259
259
  n.filter((l) => l.length > 0),
260
260
  n.getOrElse(() => o ?? "__TODO__")
261
261
  ), i = J(a);
262
- t["dct:title"] = s($((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, i), n.getOrThrow), t["dct:description"] = s($((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, i), 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(f((y = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : y.projectName), n.getOrThrow), t["schema:amount"] = s(
262
+ t["dct:title"] = s(
263
+ $((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, i),
264
+ n.getOrThrowWith(() => new Error("Title is required"))
265
+ ), t["dct:description"] = s(
266
+ $((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, i),
267
+ // Don't throw here to accomondate for cancellation after submitting title only
268
+ n.getOrElse(() => i(""))
269
+ ), t["dct:identifier"] = [c], t["dcat:theme"] = s(te((k = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : k.categories), n.getOrElse(() => [])), t["schema:application"] = (y = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : y.applications, t["schema:status"] = s(f((w = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : w.projectName), n.getOrElse(() => "")), t["schema:amount"] = s(
263
270
  ee((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
264
271
  n.map((l) => {
265
272
  var g;
@@ -271,7 +278,7 @@ function ue(e, r = {}) {
271
278
  };
272
279
  }),
273
280
  n.getOrUndefined
274
- ), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(f((_ = e["Optionale Daten"]) == null ? void 0 : _.startDate), n.getOrUndefined), t["schema:endDate"] = s(f((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
281
+ ), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(f((T = e["Optionale Daten"]) == null ? void 0 : T.startDate), n.getOrUndefined), t["schema:endDate"] = s(f((_ = e["Optionale Daten"]) == null ? void 0 : _.endDate), n.getOrUndefined);
275
282
  const p = [
276
283
  C(
277
284
  (B = e["Optionale Daten"]) == null ? void 0 : B.links,
@@ -331,25 +338,25 @@ function ue(e, r = {}) {
331
338
  involvedStakeholders: "Gab es Verzoegerungen und wenn ja, was waren die Gruende?",
332
339
  dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
333
340
  budgetPlanning: "Welche Ueberlegungen sind in Ihre Entscheidung fuer eine Open-Source-Loesung eingeflossen und welche Erfahrungen haben Sie gemacht?"
334
- }, I = {
341
+ }, W = {
335
342
  projectTriggers: "Was sind Ihre wichtigsten Learnings aus dem Projekt? Was wuerden Sie beim naechsten Use Case anders machen?",
336
343
  involvedStakeholders: "Wird die Wirksamkeit Ihres Projekts ueberwacht und wenn ja, wie? Ist der erwartete Nutzen eingetreten?",
337
344
  dataCollectionMethod: "Gibt es Plaene fuer eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafuer?",
338
345
  budgetPlanning: "Welche externen Unterstuetzungsangebote haben Ihnen geholfen oder auch gefehlt?"
339
- }, L = z([
346
+ }, I = z([
340
347
  D(e["Projektphasen (optional)/Initiieren"], "Initiieren", x, 1),
341
348
  D(e["Projektphasen (optional)/Planen"], "Planen", d, 2),
342
349
  D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen", j, 3),
343
- D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", I, 4)
350
+ D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", W, 4)
344
351
  ]);
345
- t["schema:hasPart"] = u(L);
346
- const W = z([
352
+ t["schema:hasPart"] = u(I);
353
+ const L = z([
347
354
  U({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: i, context: r }),
348
355
  U({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: i, context: r }),
349
356
  U({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: i, context: r }),
350
357
  U({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: i, context: r })
351
358
  ]);
352
- return t["p-plan:hasStep"] = u(W), {
359
+ return t["p-plan:hasStep"] = u(L), {
353
360
  "@context": {
354
361
  ...X
355
362
  },
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.34",
4
+ "version": "0.2.0-alpha.35",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",