@piveau/dpi 0.2.0-alpha.62 → 0.2.0-alpha.64

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.
@@ -1,373 +1,354 @@
1
1
  import { pipe as s } from "effect";
2
- import * as n from "effect/Option";
3
- import { PREFIXES as X } from "./shared.js";
4
- function F(e) {
2
+ import * as t from "effect/Option";
3
+ import { initiierenQuestions as H, planenQuestions as W, umsetzenQuestions as F, weiterdenkenQuestions as Y } from "./questions.js";
4
+ import { PREFIXES as J } from "./shared.js";
5
+ function Z(e) {
5
6
  return e.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
6
7
  }
7
- function Q(e, r) {
8
+ function ee(e, r) {
8
9
  if (e)
9
10
  return {
10
11
  "@value": e,
11
12
  "@type": r
12
13
  };
13
14
  }
14
- function P(e, r, t) {
15
- const a = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), o = a.endsWith("/") ? a : `${a}/`, c = r.trim().replace(/^\/+/, ""), i = t ? `${t}/${c}` : c;
15
+ function S(e, r, n) {
16
+ const i = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), o = i.endsWith("/") ? i : `${i}/`, c = r.trim().replace(/^\/+/, ""), a = n ? `${n}/${c}` : c;
16
17
  try {
17
- return new URL(i, o).toString();
18
+ return new URL(a, o).toString();
18
19
  } catch {
19
- return `${o}${i}`;
20
+ return `${o}${a}`;
20
21
  }
21
22
  }
22
- function Z(e) {
23
- return (e ?? []).map((t) => {
24
- var a, o;
25
- return { name: (a = t.name) == null ? void 0 : a.trim(), url: (o = t.url) == null ? void 0 : o.trim() };
26
- }).filter((t) => !!t.name && t.name.length > 0).map((t) => ({
27
- "foaf:name": t.name,
28
- ...t.url && t.url.length > 0 ? { "foaf:homepage": t.url } : {}
23
+ function te(e) {
24
+ return (e ?? []).map((n) => {
25
+ var i, o;
26
+ return { name: (i = n.name) == null ? void 0 : i.trim(), url: (o = n.url) == null ? void 0 : o.trim() };
27
+ }).filter((n) => !!n.name && n.name.length > 0).map((n) => ({
28
+ "foaf:name": n.name,
29
+ ...n.url && n.url.length > 0 ? { "foaf:homepage": n.url } : {}
29
30
  }));
30
31
  }
31
- function Y(e, r) {
32
+ function ne(e, r) {
32
33
  return [{ "@value": e, "@language": r || "" }];
33
34
  }
34
- function J(e) {
35
- return (r) => Y(r, e);
35
+ function re(e) {
36
+ return (r) => ne(r, e);
36
37
  }
37
- function M(e) {
38
+ function I(e) {
38
39
  if (e)
39
40
  return {
40
41
  "@id": e
41
42
  };
42
43
  }
43
- function N(e) {
44
+ function P(e) {
44
45
  return e != null;
45
46
  }
46
- function ee(e, r = "http://www.w3.org/2001/XMLSchema#string") {
47
+ function ae(e, r = "http://www.w3.org/2001/XMLSchema#string") {
47
48
  return s(
48
- n.fromNullable(e),
49
- n.map((t) => t.trim()),
50
- n.filter((t) => t.length > 0),
51
- n.flatMap((t) => n.fromNullable(Q(t, r)))
49
+ t.fromNullable(e),
50
+ t.map((n) => n.trim()),
51
+ t.filter((n) => n.length > 0),
52
+ t.flatMap((n) => t.fromNullable(ee(n, r)))
52
53
  );
53
54
  }
54
- const q = (e) => (e ?? "").trim(), H = (e) => e.length > 0;
55
+ const X = (e) => (e ?? "").trim(), C = (e) => e.length > 0;
55
56
  function f(e) {
56
57
  return s(
57
- n.fromNullable(e ?? void 0),
58
- n.map(q),
59
- n.filter(H)
58
+ t.fromNullable(e ?? void 0),
59
+ t.map(X),
60
+ t.filter(C)
60
61
  );
61
62
  }
62
- function ne(e) {
63
+ function ie(e) {
63
64
  return s(
64
- n.fromNullable(e),
65
- n.map((r) => r.map(q).filter(H)),
66
- n.filter((r) => r.length > 0),
67
- n.map((r) => [...r])
65
+ t.fromNullable(e),
66
+ t.map((r) => r.map(X).filter(C)),
67
+ t.filter((r) => r.length > 0),
68
+ t.map((r) => [...r])
68
69
  );
69
70
  }
70
- function te(e) {
71
+ function oe(e) {
71
72
  return s(
72
- n.fromNullable(e),
73
- n.map((r) => r.map((t) => M(t)).filter(N)),
74
- n.filter((r) => r.length > 0),
75
- n.map((r) => [...r])
73
+ t.fromNullable(e),
74
+ t.map((r) => r.map((n) => I(n)).filter(P)),
75
+ t.filter((r) => r.length > 0),
76
+ t.map((r) => [...r])
76
77
  );
77
78
  }
78
- function $(e, r) {
79
+ function G(e, r) {
79
80
  return s(
80
81
  f(e),
81
- n.flatMap((t) => n.fromNullable(r(t)))
82
+ t.flatMap((n) => t.fromNullable(r(n)))
82
83
  );
83
84
  }
84
- function re(e) {
85
- return z(e).flatMap((r) => [...r]);
85
+ function se(e) {
86
+ return R(e).flatMap((r) => [...r]);
86
87
  }
87
- function C(e, r, t) {
88
+ function V(e, r, n) {
88
89
  return s(
89
- n.fromNullable(e),
90
- n.map((a) => a.map(r).filter(N)),
91
- n.filter((a) => a.length > 0),
92
- n.map((a) => E(a, t)),
93
- n.filter((a) => a.length > 0),
94
- n.map((a) => [...a])
90
+ t.fromNullable(e),
91
+ t.map((i) => i.map(r).filter(P)),
92
+ t.filter((i) => i.length > 0),
93
+ t.map((i) => E(i, n)),
94
+ t.filter((i) => i.length > 0),
95
+ t.map((i) => [...i])
95
96
  );
96
97
  }
97
- function A(e) {
98
+ function M(e) {
98
99
  if (e == null || typeof e != "object")
99
100
  return e;
100
101
  if (Array.isArray(e))
101
- return e.map((a) => A(a)).filter((a) => a != null);
102
+ return e.map((i) => M(i)).filter((i) => i != null);
102
103
  const r = {};
103
- for (const [t, a] of Object.entries(e)) {
104
- if (a == null)
104
+ for (const [n, i] of Object.entries(e)) {
105
+ if (i == null)
105
106
  continue;
106
- const o = A(a);
107
- o != null && (r[t] = o);
107
+ const o = M(i);
108
+ o != null && (r[n] = o);
108
109
  }
109
110
  return r;
110
111
  }
111
- function z(e) {
112
- return e.map(n.getOrUndefined).filter(N);
112
+ function R(e) {
113
+ return e.map(t.getOrUndefined).filter(P);
113
114
  }
114
- function u(e) {
115
+ function m(e) {
115
116
  const r = e ? [...e] : [];
116
117
  return r.length > 0 ? r : void 0;
117
118
  }
118
- function ie(e, r) {
119
- const t = e ?? {}, a = [];
119
+ function le(e, r) {
120
+ const n = e ?? {}, i = [];
120
121
  let o = 1;
121
- for (const [c, i] of Object.entries(r)) {
122
- const p = s(
123
- n.fromNullable(t[c]),
124
- n.map((m) => m.trim()),
125
- n.filter((m) => m.length > 0),
126
- n.map((m) => ({
122
+ for (const [c, a] of Object.entries(r)) {
123
+ const g = s(
124
+ t.fromNullable(n[c]),
125
+ t.map((u) => u.trim()),
126
+ t.filter((u) => u.length > 0),
127
+ t.map((u) => ({
127
128
  "@type": "schema:Question",
128
- "schema:text": i,
129
- "schema:acceptedAnswer": m,
129
+ "schema:text": a,
130
+ "schema:acceptedAnswer": u,
130
131
  "schema:position": { "@value": String(o++), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
131
132
  })),
132
- n.getOrUndefined
133
+ t.getOrUndefined
133
134
  );
134
- p && a.push(p);
135
+ g && i.push(g);
135
136
  }
136
- return a;
137
+ return i;
137
138
  }
138
- function D(e, r, t, a) {
139
- const o = ie(e, t);
140
- return o.length === 0 ? n.none() : n.some({
139
+ function N(e, r, n, i) {
140
+ const o = le(e, n);
141
+ return o.length === 0 ? t.none() : t.some({
141
142
  "@type": "schema:QAPage",
142
143
  "dct:identifier": "__TODO__",
143
144
  "dct:type": r,
144
145
  "schema:question": o,
145
146
  "p-plan:isPrecededBy": null,
146
- "schema:position": { "@value": String(a), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
147
+ "schema:position": { "@value": String(i), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
147
148
  });
148
149
  }
149
- function ae(e) {
150
- return (e ?? []).map((t) => {
151
- var a, o;
152
- return { name: (a = t.name) == null ? void 0 : a.trim(), description: (o = t.description) == null ? void 0 : o.trim() };
153
- }).filter((t) => !!t.name && t.name.length > 0 && !!t.description && t.description.length > 0).map((t) => ({
150
+ function ce(e) {
151
+ return (e ?? []).map((n) => {
152
+ var i, o;
153
+ return { name: (i = n.name) == null ? void 0 : i.trim(), description: (o = n.description) == null ? void 0 : o.trim() };
154
+ }).filter((n) => !!n.name && n.name.length > 0 && !!n.description && n.description.length > 0).map((n) => ({
154
155
  "@type": "prov:used",
155
- "dct:title": t.name,
156
- "dct:description": t.description
156
+ "dct:title": n.name,
157
+ "dct:description": n.description
157
158
  }));
158
159
  }
159
160
  function E(e, r) {
160
- return (e ?? []).map((a) => ({
161
+ return (e ?? []).map((i) => ({
161
162
  "@type": "rdfs:Resource",
162
163
  "dct:type": r,
163
- "schema:url": a.url,
164
+ "schema:url": i.url,
164
165
  "dct:title": s(
165
- n.fromNullable(a.name),
166
- n.map((o) => o.trim()),
167
- n.filter((o) => o.length > 0),
168
- n.getOrElse(() => r)
166
+ t.fromNullable(i.name),
167
+ t.map((o) => o.trim()),
168
+ t.filter((o) => o.length > 0),
169
+ t.getOrElse(() => r)
169
170
  ),
170
171
  "dct:description": s(
171
- n.fromNullable(a.description),
172
- n.map((o) => o.trim()),
173
- n.filter((o) => o.length > 0),
174
- n.getOrUndefined
172
+ t.fromNullable(i.description),
173
+ t.map((o) => o.trim()),
174
+ t.filter((o) => o.length > 0),
175
+ t.getOrUndefined
175
176
  )
176
177
  }));
177
178
  }
178
- function oe(e, r) {
179
- return (e ?? []).map((a) => ({
179
+ function de(e, r) {
180
+ return (e ?? []).map((i) => ({
180
181
  "@type": "schema:SoftwareApplication",
181
- "dct:identifier": P(r.baseRepoUrl, a.id, "resources/software"),
182
- "schema:featureList": u((a.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0))
182
+ "dct:identifier": S(r.baseRepoUrl, i.id, "resources/software"),
183
+ "schema:featureList": m((i.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0))
183
184
  }));
184
185
  }
185
- function se(e, r) {
186
- return (e ?? []).map((a) => ({
186
+ function me(e, r) {
187
+ return (e ?? []).map((i) => ({
187
188
  "@type": "dcat:Dataset",
188
- "dct:identifier": P(r.baseRepoUrl, a.id, "datasets")
189
+ "dct:identifier": S(r.baseRepoUrl, i.id, "datasets")
189
190
  }));
190
191
  }
191
- function le(e, r, t) {
192
+ function ue(e, r, n) {
192
193
  return (e ?? []).map((o) => {
193
194
  var c;
194
195
  return {
195
196
  "@type": "ssn:System",
196
- "dct:identifier": P(t.baseRepoUrl, o.id, "resources/hardware"),
197
+ "dct:identifier": S(n.baseRepoUrl, o.id, "resources/hardware"),
197
198
  "dct:description": s(
198
- n.fromNullable(o.description),
199
- n.map((i) => i.trim()),
200
- n.filter((i) => i.length > 0),
201
- n.flatMap((i) => n.fromNullable(r(i))),
202
- n.getOrUndefined
199
+ t.fromNullable(o.description),
200
+ t.map((a) => a.trim()),
201
+ t.filter((a) => a.length > 0),
202
+ t.flatMap((a) => t.fromNullable(r(a))),
203
+ t.getOrUndefined
203
204
  ),
204
- "ssn:deployedSystem": M(P(t.baseRepoUrl, o.id, "resources/hardware")),
205
- "ssn:forProperty": u((o.forProperty ?? []).map((i) => i == null ? void 0 : i.trim()).filter((i) => !!i && i.length > 0)),
206
- "sosa:hasLocation": u((o.locations ?? []).map((i) => ({
205
+ "ssn:deployedSystem": I(S(n.baseRepoUrl, o.id, "resources/hardware")),
206
+ "ssn:forProperty": m((o.forProperty ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
207
+ "sosa:hasLocation": m((o.locations ?? []).map((a) => ({
207
208
  "@type": "dct:Location",
208
- "geo:lat": i.lat,
209
- "geo:long": i.lng
209
+ "geo:lat": a.lat,
210
+ "geo:long": a.lng
210
211
  }))),
211
- "foaf:depiction": u((o.depictions ?? []).map((i) => M(i)).filter(N)),
212
- "sosa:isHostedBy": u((o.isHostedBy ?? []).map((i) => i == null ? void 0 : i.trim()).filter((i) => !!i && i.length > 0)),
212
+ "foaf:depiction": m((o.depictions ?? []).map((a) => I(a)).filter(P)),
213
+ "sosa:isHostedBy": m((o.isHostedBy ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
213
214
  // Corresponds to functionalities of hardware;
214
215
  // not to be confused with functionalities of software (schema:featureList)
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(E((c = o.references) == null ? void 0 : c.map((i) => ({
217
- name: i.name ?? "",
218
- url: i.url ?? "",
219
- description: i.description
220
- })).filter((i) => i.url.length > 0 && ((i == null ? void 0 : i.name) || "").length > 0), "documentation"))
216
+ "ssn-system:hasSystemCapability": m((o.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
217
+ "dct:references": m(E((c = o.references) == null ? void 0 : c.map((a) => ({
218
+ name: a.name ?? "",
219
+ url: a.url ?? "",
220
+ description: a.description
221
+ })).filter((a) => a.url.length > 0 && ((a == null ? void 0 : a.name) || "").length > 0), "documentation"))
221
222
  };
222
223
  });
223
224
  }
224
- function U(e) {
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
- n.fromNullable(j),
228
- n.map((h) => h.trim()),
229
- n.filter((h) => h.length > 0),
230
- n.getOrUndefined
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
- ...oe(R, c),
233
- ...se(v, c),
234
- ...le(S, o, c)
235
- ], k = {
225
+ function x(e) {
226
+ var O, b, w;
227
+ const { prefixKey: r, activityLabel: n, input: i, toLanged: o, context: c } = e, a = `${r}/Grundlegende Informationen`, g = `${r}/Software`, u = `${r}/Datensätze`, L = `${r}/Hardware`, d = i[a], k = d == null ? void 0 : d.description, _ = s(
228
+ t.fromNullable(k),
229
+ t.map((h) => h.trim()),
230
+ t.filter((h) => h.length > 0),
231
+ t.getOrUndefined
232
+ ), j = d == null ? void 0 : d.methods, A = d == null ? void 0 : d.links, K = (O = i[g]) == null ? void 0 : O.selected, v = (b = i[u]) == null ? void 0 : b.selected, D = (w = i[L]) == null ? void 0 : w.selected, y = [
233
+ ...de(K, c),
234
+ ...me(v, c),
235
+ ...ue(D, o, c)
236
+ ], U = {
236
237
  "@type": "p-plan:Step",
237
238
  "dct:identifier": "__TODO__",
238
- "p-plan:Activity": t,
239
- "dct:description": o(W ?? "__EMPTY__"),
239
+ "p-plan:Activity": n,
240
+ "dct:description": o(_ ?? "__EMPTY__"),
240
241
  "p-plan:isPrecededBy": null,
241
- "prov:used": u(ae(I)),
242
- "dct:references": u(E(L, "documentation")),
243
- "p-plan:hasInputVar": b.length > 0 ? b : void 0
242
+ "prov:used": m(ce(j)),
243
+ "dct:references": m(E(A, "documentation")),
244
+ "p-plan:hasInputVar": y.length > 0 ? y : void 0
244
245
  };
245
- return n.some(k);
246
+ return t.some(U);
246
247
  }
247
- function ue(e, r = {}) {
248
- var v, S, b, k, y, w, O, h, T, _, B, K, G, V;
249
- const t = {
248
+ function he(e, r = {}) {
249
+ var v, D, y, U, O, b, w, h, T, $, z, Q, q, B;
250
+ const n = {
250
251
  "@type": ["schema:Project", "https://piveau.eu/ns/voc#CustomResource"]
251
- }, a = (r == null ? void 0 : r.language) ?? "de", o = s(
252
+ }, i = (r == null ? void 0 : r.language) ?? "de", o = s(
252
253
  f((v = e["Grundlegende Informationen/Name"]) == null ? void 0 : v.projectName),
253
- n.map((l) => F(l)),
254
- n.filter((l) => l.length > 0),
255
- n.getOrUndefined
254
+ t.map((l) => Z(l)),
255
+ t.filter((l) => l.length > 0),
256
+ t.getOrUndefined
256
257
  ), c = s(
257
- n.fromNullable(r == null ? void 0 : r.identifier),
258
- n.map((l) => l.trim()),
259
- n.filter((l) => l.length > 0),
260
- n.getOrElse(() => o ?? "__TODO__")
261
- ), i = J(a);
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),
258
+ t.fromNullable(r == null ? void 0 : r.identifier),
259
+ t.map((l) => l.trim()),
260
+ t.filter((l) => l.length > 0),
261
+ t.getOrElse(() => o ?? "__TODO__")
262
+ ), a = re(i);
263
+ n["dct:title"] = s(
264
+ G((D = e["Grundlegende Informationen/Name"]) == null ? void 0 : D.projectName, a),
265
+ t.getOrThrowWith(() => new Error("Title is required"))
266
+ ), n["dct:description"] = s(
267
+ G((y = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : y.projectDescription, a),
267
268
  // 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(
270
- ee((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
271
- n.map((l) => {
272
- var g;
269
+ t.getOrElse(() => a(""))
270
+ ), n["dct:identifier"] = [c], n["dcat:theme"] = s(oe((U = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : U.categories), t.getOrElse(() => [])), n["schema:application"] = (O = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : O.applications, n["schema:status"] = s(f((b = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : b.projectName), t.getOrElse(() => "")), n["schema:amount"] = s(
271
+ ae((w = e["Optionale Daten"]) == null ? void 0 : w.budget, "http://www.w3.org/2001/XMLSchema#integer"),
272
+ t.map((l) => {
273
+ var p;
273
274
  return {
274
275
  "@type": "schema:MonetaryAmount",
275
276
  "schema:currency": "EUR",
276
277
  "schema:value": l,
277
- "schema:description": s(f((g = e["Optionale Daten"]) == null ? void 0 : g.budgetDescription), n.getOrUndefined)
278
+ "schema:description": s(f((p = e["Optionale Daten"]) == null ? void 0 : p.budgetDescription), t.getOrUndefined)
278
279
  };
279
280
  }),
280
- 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);
282
- const p = [
283
- C(
284
- (B = e["Optionale Daten"]) == null ? void 0 : B.links,
281
+ t.getOrUndefined
282
+ ), n["schema:skills"] = s(ie((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), t.getOrUndefined), n["schema:startDate"] = s(f((T = e["Optionale Daten"]) == null ? void 0 : T.startDate), t.getOrUndefined), n["schema:endDate"] = s(f(($ = e["Optionale Daten"]) == null ? void 0 : $.endDate), t.getOrUndefined);
283
+ const g = [
284
+ V(
285
+ (z = e["Optionale Daten"]) == null ? void 0 : z.links,
285
286
  (l) => {
286
- const g = s(f(l.url), n.getOrUndefined);
287
- if (g)
287
+ const p = s(f(l.url), t.getOrUndefined);
288
+ if (p)
288
289
  return {
289
- url: g,
290
- name: s(f(l.name), n.getOrUndefined),
291
- description: s(f(l.description), n.getOrUndefined)
290
+ url: p,
291
+ name: s(f(l.name), t.getOrUndefined),
292
+ description: s(f(l.description), t.getOrUndefined)
292
293
  };
293
294
  },
294
295
  "documentation"
295
296
  ),
296
- C(
297
- (K = e["Optionale Daten"]) == null ? void 0 : K.references,
297
+ V(
298
+ (Q = e["Optionale Daten"]) == null ? void 0 : Q.references,
298
299
  (l) => {
299
- const g = s(f(l.homepage), n.getOrUndefined);
300
- if (g)
300
+ const p = s(f(l.homepage), t.getOrUndefined);
301
+ if (p)
301
302
  return {
302
- url: g,
303
+ url: p,
303
304
  name: void 0,
304
305
  description: void 0
305
306
  };
306
307
  },
307
308
  "image"
308
309
  )
309
- ], m = re(p);
310
- t["dct:references"] = m.length > 0 ? m : void 0, t["dcat:contactPoint"] = s(
311
- n.fromNullable((G = e["Grundlegende Informationen/Organisation"]) == null ? void 0 : G.contact),
312
- n.map((l) => ({
310
+ ], u = se(g);
311
+ n["dct:references"] = u.length > 0 ? u : void 0, n["dcat:contactPoint"] = s(
312
+ t.fromNullable((q = e["Grundlegende Informationen/Organisation"]) == null ? void 0 : q.contact),
313
+ t.map((l) => ({
313
314
  "@type": "vcard:Kind",
314
315
  "vcard:fn": l.name,
315
316
  "vcard:hasEmail": l.mail,
316
317
  "vcard:hasTelephone": l.phone
317
318
  })),
318
- n.map((l) => [l]),
319
- n.getOrUndefined
320
- ), t["dct:contributor"] = s(
321
- n.fromNullable((V = e["Optionale Daten"]) == null ? void 0 : V.partners),
322
- n.map((l) => Z(l)),
323
- n.filter((l) => l.length > 0),
324
- n.getOrUndefined
319
+ t.map((l) => [l]),
320
+ t.getOrUndefined
321
+ ), n["dct:contributor"] = s(
322
+ t.fromNullable((B = e["Optionale Daten"]) == null ? void 0 : B.partners),
323
+ t.map((l) => te(l)),
324
+ t.filter((l) => l.length > 0),
325
+ t.getOrUndefined
325
326
  );
326
- const x = {
327
- projectTriggers: "Was waren Ausloeser fuer das Projekt (z. B. rechtliche oder politische Vorgaben, intrinsische Motivation oder inspirierende Projekte aus anderen Kommunen)?",
328
- involvedStakeholders: "Welche relevanten Akteure innerhalb oder ausserhalb Ihrer Organisation haben Sie fruehzeitig involviert (z. B. um politische Rueckendeckung sicherzustellen)?",
329
- dataCollectionMethod: "Wie haben Sie den Bestand vorhandener Daten erhoben?",
330
- budgetPlanning: "Wie haben Sie das erste Budget berechnet und nachhaltig gesichert?"
331
- }, d = {
332
- requirementsGatherings: "Wie haben Sie die Anforderungen erhoben und dokumentiert (z. B. durch Markterkundung, externe Berater oder Workshops)?",
333
- tenderFormat: "Welche Ausschreibungsform haben Sie gewaehlt und warum? Gab es eine Vorlage oder Muster-Leistungsbeschreibung, die hilfreich war?",
334
- tenderTips: "Welche Tipps haben Sie fuer eine erfolgreiche Ausschreibung?",
335
- resourcePlanning: "Wie haben Sie die Ressourcenplanung fuer die Entwicklung und den Betrieb Ihres Digitalen Zwillings gestaltet und gesichert?"
336
- }, j = {
337
- projectTriggers: "Wie haben Sie die Zusammenarbeit mit den Dienstleistern organisiert und wie wurden relevante Stakeholder in Entscheidungsprozesse eingebunden?",
338
- involvedStakeholders: "Gab es Verzoegerungen und wenn ja, was waren die Gruende?",
339
- dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
340
- budgetPlanning: "Welche Ueberlegungen sind in Ihre Entscheidung fuer eine Open-Source-Loesung eingeflossen und welche Erfahrungen haben Sie gemacht?"
341
- }, W = {
342
- projectTriggers: "Was sind Ihre wichtigsten Learnings aus dem Projekt? Was wuerden Sie beim naechsten Use Case anders machen?",
343
- involvedStakeholders: "Wird die Wirksamkeit Ihres Projekts ueberwacht und wenn ja, wie? Ist der erwartete Nutzen eingetreten?",
344
- dataCollectionMethod: "Gibt es Plaene fuer eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafuer?",
345
- budgetPlanning: "Welche externen Unterstuetzungsangebote haben Ihnen geholfen oder auch gefehlt?"
346
- }, I = z([
347
- D(e["Projektphasen (optional)/Initiieren"], "Initiieren", x, 1),
348
- D(e["Projektphasen (optional)/Planen"], "Planen", d, 2),
349
- D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen", j, 3),
350
- D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", W, 4)
327
+ const L = H, d = W, k = F, _ = Y, j = R([
328
+ N(e["Projektphasen (optional)/Initiieren"], "Initiieren", L, 1),
329
+ N(e["Projektphasen (optional)/Planen"], "Planen", d, 2),
330
+ N(e["Projektphasen (optional)/Umsetzen"], "Umsetzen", k, 3),
331
+ N(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", _, 4)
351
332
  ]);
352
- t["schema:hasPart"] = u(I);
353
- const L = z([
354
- U({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: i, context: r }),
355
- U({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: i, context: r }),
356
- U({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: i, context: r }),
357
- U({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: i, context: r })
333
+ n["schema:hasPart"] = m(j);
334
+ const A = R([
335
+ x({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: a, context: r }),
336
+ x({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: a, context: r }),
337
+ x({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: a, context: r }),
338
+ x({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: a, context: r })
358
339
  ]);
359
- return t["p-plan:hasStep"] = u(L), {
340
+ return n["p-plan:hasStep"] = m(A), {
360
341
  "@context": {
361
- ...X
342
+ ...J
362
343
  },
363
- "@graph": A(t)
344
+ "@graph": M(n)
364
345
  };
365
346
  }
366
347
  export {
367
- ue as encodeProject,
368
- N as isNonNullable,
369
- F as slugify,
370
- Y as toLangedValue,
371
- M as toNodeReference,
372
- Q as toTypedValue
348
+ he as encodeProject,
349
+ P as isNonNullable,
350
+ Z as slugify,
351
+ ne as toLangedValue,
352
+ I as toNodeReference,
353
+ ee as toTypedValue
373
354
  };
@@ -0,0 +1,27 @@
1
+ const e = {
2
+ projectTriggers: "Was waren Auslöser für das Projekt (z.B. rechtliche oder politische Vorgaben, intrinsische Motivation oder inspirierende Projekte aus anderen Kommunen)?",
3
+ involvedStakeholders: "Welche relevanten Akteure - innerhalb oder außerhalb Ihrer Organisation - haben Sie frühzeitig involviert (z.B. um politische Rückendeckung sicherzustellen)?",
4
+ dataCollectionMethod: "Wie haben Sie den Bestand vorhandener Daten erhoben?",
5
+ budgetPlanning: "Wie haben Sie das (erste) Budget berechnet und nachhaltig gesichert?"
6
+ }, n = {
7
+ requirementsGatherings: "Wie haben Sie die Anforderungen erhoben und dokumentiert (z.B. durch Markterkundung, externe Berater oder Workshops)?",
8
+ tenderFormat: "Welche Ausschreibungsform haben Sie gewählt und warum? Gab es eine Vorlage oder Muster-Leistungsbeschreibung, die hilfreich war und die Sie teilen können?",
9
+ tenderTips: "Welche Tipps haben Sie für eine erfolgreiche Ausschreibung?",
10
+ resourcePlanning: "Wie haben Sie die Ressourcenplanung für die Entwicklung und den Betrieb Ihres Digitalen Zwillings gestaltet und gesichert?"
11
+ }, r = {
12
+ projectTriggers: "Wie haben Sie die Zusammenarbeit mit den Dienstleistern organisiert und wie wurden relevante Stakeholder in Entscheidungsprozesse eingebunden (z.B. Meetingstruktur oder Frameworks)?",
13
+ involvedStakeholders: "Gab es Verzögerungen und wenn ja, was waren die Gründe?",
14
+ dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
15
+ budgetPlanning: "Welche Überlegungen sind in Ihre Entscheidung für eine Open-Source-Lösung geflossen und welche Erfahrungen haben Sie bisher damit gemacht?"
16
+ }, i = {
17
+ projectTriggers: "Was sind Ihre wichtigsten Learnings aus dem Projekt? Was würden Sie beim nächsten Use Case anders machen?",
18
+ involvedStakeholders: "Wird die Wirksamkeit Ihres Projekts überwacht und wenn ja, wie? Ist der erwartete Nutzen eingetreten (z.B. ökologisch, sozial oder monetär)?",
19
+ dataCollectionMethod: "Gibt es Pläne für eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafür?",
20
+ budgetPlanning: "Welche externen Unterstützungsangebote haben Ihnen geholfen oder auch gefehlt (z.B. Förderprogramme, Netzwerke, Austausch mit anderen Kommunen)?"
21
+ };
22
+ export {
23
+ e as initiierenQuestions,
24
+ n as planenQuestions,
25
+ r as umsetzenQuestions,
26
+ i as weiterdenkenQuestions
27
+ };
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.62",
4
+ "version": "0.2.0-alpha.64",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",