@piveau/dpi 0.2.0-alpha.12 → 0.2.0-alpha.14

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