@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.
- package/dist/assets/dpi.css +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue2.js +47 -43
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +85 -82
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/InitiierenStep.vue.js +26 -25
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/PlanenStep.vue.js +26 -25
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/UmstezenStep.vue.js +27 -26
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/WeiterdenkenStep.vue.js +40 -39
- package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +93 -93
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +116 -135
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +208 -227
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/questions.js +27 -0
- package/package.json +1 -1
|
@@ -1,89 +1,90 @@
|
|
|
1
1
|
import { pipe as A } from "effect";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import { schemaProject as
|
|
5
|
-
import { getFirstItem as
|
|
6
|
-
import { isNonNullable as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import * as p from "effect/Option";
|
|
3
|
+
import * as F from "jsonld";
|
|
4
|
+
import { schemaProject as $ } from "../../schema/projectLdSchema.js";
|
|
5
|
+
import { getFirstItem as E, extractStringValue as t, extractLocalizedString as z } from "../useDpiSimpleLoader.js";
|
|
6
|
+
import { isNonNullable as f } from "./encodeProject.js";
|
|
7
|
+
import { weiterdenkenQuestions as Q, umsetzenQuestions as U, planenQuestions as R, initiierenQuestions as V } from "./questions.js";
|
|
8
|
+
import { PREFIXES as q, nonEmpty as S } from "./shared.js";
|
|
9
|
+
function j(n) {
|
|
10
|
+
const r = (n || "").trim();
|
|
11
|
+
if (!r)
|
|
11
12
|
return "";
|
|
12
13
|
try {
|
|
13
|
-
const
|
|
14
|
-
return
|
|
14
|
+
const a = new URL(r).pathname.split("/").filter(Boolean);
|
|
15
|
+
return a[a.length - 1] || "";
|
|
15
16
|
} catch {
|
|
16
|
-
return
|
|
17
|
+
return r;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
async function
|
|
20
|
-
const
|
|
21
|
-
"@context":
|
|
20
|
+
async function W(n) {
|
|
21
|
+
const r = {
|
|
22
|
+
"@context": q,
|
|
22
23
|
"@type": "schema:Project"
|
|
23
|
-
}, s = await
|
|
24
|
+
}, s = await F.frame(n, r, {
|
|
24
25
|
embed: "@always",
|
|
25
26
|
omitGraph: !0
|
|
26
|
-
}),
|
|
27
|
+
}), a = await F.compact(s, q, {
|
|
27
28
|
compactArrays: !1,
|
|
28
29
|
graph: !1
|
|
29
|
-
}),
|
|
30
|
-
if (!
|
|
30
|
+
}), d = $.safeParse(E(a == null ? void 0 : a["@graph"]));
|
|
31
|
+
if (!d.success)
|
|
31
32
|
throw new Error(`Failed to parse project
|
|
32
33
|
|
|
33
|
-
${
|
|
34
|
-
return
|
|
34
|
+
${d.error.message}`);
|
|
35
|
+
return d.data;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
37
|
+
function K(n) {
|
|
38
|
+
return S(E(n["@id"]));
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
var
|
|
41
|
-
const { visibility: s } =
|
|
40
|
+
function C(n, r) {
|
|
41
|
+
var a, d;
|
|
42
|
+
const { visibility: s } = r;
|
|
42
43
|
return {
|
|
43
44
|
"Auffindbarkeit/Sichtbarkeit": {
|
|
44
45
|
visibility: s
|
|
45
46
|
},
|
|
46
47
|
"Auffindbarkeit/Kategorien": {
|
|
47
|
-
categories: ((
|
|
48
|
+
categories: ((a = n["dcat:theme"]) == null ? void 0 : a.map(K).filter(f)) || []
|
|
48
49
|
},
|
|
49
50
|
"Auffindbarkeit/Anwendungsbereiche": {
|
|
50
|
-
applications: ((
|
|
51
|
+
applications: ((d = n["schema:application"]) == null ? void 0 : d.filter(f)) || []
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function X(n) {
|
|
55
56
|
var s;
|
|
56
|
-
const
|
|
57
|
-
name:
|
|
58
|
-
mail:
|
|
59
|
-
phone:
|
|
60
|
-
})).filter(
|
|
57
|
+
const r = (s = n["dcat:contactPoint"]) == null ? void 0 : s.map((a) => ({
|
|
58
|
+
name: S(t(a["vcard:fn"])),
|
|
59
|
+
mail: S(t(a["vcard:hasEmail"])),
|
|
60
|
+
phone: S(t(a["vcard:hasTelephone"]))
|
|
61
|
+
})).filter(f);
|
|
61
62
|
return {
|
|
62
63
|
"Grundlegende Informationen/Name": {
|
|
63
64
|
projectName: A(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
p.fromNullable(z(n["dct:title"], "de")),
|
|
66
|
+
p.flatMap((a) => S(a) ? p.some(a) : p.none()),
|
|
67
|
+
p.getOrThrowWith(() => new Error("Project name is missing"))
|
|
67
68
|
)
|
|
68
69
|
},
|
|
69
70
|
"Grundlegende Informationen/Beschreibung": {
|
|
70
71
|
projectDescription: A(
|
|
71
|
-
|
|
72
|
+
p.fromNullable(z(n["dct:description"], "de")),
|
|
72
73
|
// O.flatMap(s => nonEmpty(s) ? O.some(s) : O.none()),
|
|
73
74
|
// O.getOrThrowWith(() => new Error('Project description is missing')),
|
|
74
|
-
|
|
75
|
+
p.getOrElse(() => "")
|
|
75
76
|
)
|
|
76
77
|
},
|
|
77
78
|
"Grundlegende Informationen/Projektstatus": {
|
|
78
79
|
projectName: A(
|
|
79
|
-
|
|
80
|
+
p.fromNullable(n["schema:status"]),
|
|
80
81
|
// O.flatMap(s => nonEmpty(s) ? O.some(s) : O.none()),
|
|
81
82
|
// O.getOrThrowWith(() => new Error('Project status is missing')),
|
|
82
|
-
|
|
83
|
+
p.getOrElse(() => "")
|
|
83
84
|
)
|
|
84
85
|
},
|
|
85
86
|
"Grundlegende Informationen/Organisation": {
|
|
86
|
-
contact:
|
|
87
|
+
contact: E(r || []) || {
|
|
87
88
|
name: "",
|
|
88
89
|
mail: "",
|
|
89
90
|
phone: ""
|
|
@@ -91,86 +92,66 @@ function R(n) {
|
|
|
91
92
|
}
|
|
92
93
|
};
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
var
|
|
95
|
+
function Y(n) {
|
|
96
|
+
var r, s, a, d, g, w, P, i;
|
|
96
97
|
return {
|
|
97
98
|
"Optionale Daten": {
|
|
98
|
-
partners: ((
|
|
99
|
+
partners: ((r = n["dct:contributor"]) == null ? void 0 : r.map((c) => ({
|
|
99
100
|
name: t(c["foaf:name"]),
|
|
100
101
|
url: t(c["foaf:homepage"])
|
|
101
|
-
})).filter(
|
|
102
|
-
requiredExpertise: ((s = n["schema:skills"]) == null ? void 0 : s.map(t).filter(
|
|
103
|
-
references: ((
|
|
102
|
+
})).filter(f)) || [],
|
|
103
|
+
requiredExpertise: ((s = n["schema:skills"]) == null ? void 0 : s.map(t).filter(f)) || [],
|
|
104
|
+
references: ((d = (a = n["dct:references"]) == null ? void 0 : a.filter((c) => c["dct:type"] === "image")) == null ? void 0 : d.map((c) => ({
|
|
104
105
|
homepage: t(c["schema:url"])
|
|
105
|
-
})).filter(
|
|
106
|
+
})).filter(f)) || [],
|
|
106
107
|
startDate: t(n["schema:startDate"] || ""),
|
|
107
108
|
endDate: t(n["schema:endDate"] || ""),
|
|
108
|
-
budget: t(((
|
|
109
|
-
budgetDescription: t(((
|
|
109
|
+
budget: t(((g = n["schema:amount"]) == null ? void 0 : g["schema:value"]) || ""),
|
|
110
|
+
budgetDescription: t(((w = n["schema:amount"]) == null ? void 0 : w["schema:description"]) || ""),
|
|
110
111
|
// todo:
|
|
111
|
-
links: ((i = (
|
|
112
|
+
links: ((i = (P = n["dct:references"]) == null ? void 0 : P.filter((c) => c["dct:type"] === "documentation")) == null ? void 0 : i.map((c) => ({
|
|
112
113
|
name: t(c["dct:title"]),
|
|
113
114
|
url: t(c["schema:url"]),
|
|
114
115
|
description: t(c["dct:description"])
|
|
115
|
-
})).filter(
|
|
116
|
+
})).filter(f)) || []
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
119
|
}
|
|
119
|
-
function
|
|
120
|
-
const
|
|
121
|
-
var
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
return (Number.isNaN(
|
|
120
|
+
function J(n) {
|
|
121
|
+
const r = n["schema:hasPart"] ?? [], s = (m) => r.find((u) => u["dct:type"] === m), a = (m) => {
|
|
122
|
+
var h, D;
|
|
123
|
+
const u = /* @__PURE__ */ new Map(), k = [...(m == null ? void 0 : m["schema:question"]) ?? []].sort((e, l) => {
|
|
124
|
+
const b = Number.parseInt(t(e["schema:position"])), x = Number.parseInt(t(l["schema:position"]));
|
|
125
|
+
return (Number.isNaN(b) ? 0 : b) - (Number.isNaN(x) ? 0 : x);
|
|
125
126
|
});
|
|
126
|
-
for (const e of
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
for (const e of k) {
|
|
128
|
+
const l = (h = e["schema:text"]) == null ? void 0 : h.trim(), b = (D = e["schema:acceptedAnswer"]) == null ? void 0 : D.trim();
|
|
129
|
+
l && b && u.set(l, b);
|
|
129
130
|
}
|
|
130
|
-
return
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}, p = {
|
|
137
|
-
requirementsGatherings: "Wie haben Sie die Anforderungen erhoben und dokumentiert (z. B. durch Markterkundung, externe Berater oder Workshops)?",
|
|
138
|
-
tenderFormat: "Welche Ausschreibungsform haben Sie gewaehlt und warum? Gab es eine Vorlage oder Muster-Leistungsbeschreibung, die hilfreich war?",
|
|
139
|
-
tenderTips: "Welche Tipps haben Sie fuer eine erfolgreiche Ausschreibung?",
|
|
140
|
-
resourcePlanning: "Wie haben Sie die Ressourcenplanung fuer die Entwicklung und den Betrieb Ihres Digitalen Zwillings gestaltet und gesichert?"
|
|
141
|
-
}, k = {
|
|
142
|
-
projectTriggers: "Wie haben Sie die Zusammenarbeit mit den Dienstleistern organisiert und wie wurden relevante Stakeholder in Entscheidungsprozesse eingebunden?",
|
|
143
|
-
involvedStakeholders: "Gab es Verzoegerungen und wenn ja, was waren die Gruende?",
|
|
144
|
-
dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
|
|
145
|
-
budgetPlanning: "Welche Ueberlegungen sind in Ihre Entscheidung fuer eine Open-Source-Loesung eingeflossen und welche Erfahrungen haben Sie gemacht?"
|
|
146
|
-
}, D = {
|
|
147
|
-
projectTriggers: "Was sind Ihre wichtigsten Learnings aus dem Projekt? Was wuerden Sie beim naechsten Use Case anders machen?",
|
|
148
|
-
involvedStakeholders: "Wird die Wirksamkeit Ihres Projekts ueberwacht und wenn ja, wie? Ist der erwartete Nutzen eingetreten?",
|
|
149
|
-
dataCollectionMethod: "Gibt es Plaene fuer eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafuer?",
|
|
150
|
-
budgetPlanning: "Welche externen Unterstuetzungsangebote haben Ihnen geholfen oder auch gefehlt?"
|
|
151
|
-
}, i = (u, m) => {
|
|
152
|
-
const v = s(u), S = r(v), g = {};
|
|
153
|
-
for (const [w, e] of Object.entries(m)) {
|
|
154
|
-
const d = S.get(e);
|
|
155
|
-
d && (g[w] = d);
|
|
131
|
+
return u;
|
|
132
|
+
}, d = V, g = R, w = U, P = Q, i = (m, u) => {
|
|
133
|
+
const v = s(m), k = a(v), h = {};
|
|
134
|
+
for (const [D, e] of Object.entries(u)) {
|
|
135
|
+
const l = k.get(e);
|
|
136
|
+
l && (h[D] = l);
|
|
156
137
|
}
|
|
157
|
-
return
|
|
158
|
-
}, c = i("Initiieren",
|
|
138
|
+
return h;
|
|
139
|
+
}, c = i("Initiieren", d), y = i("Planen", g), N = i("Umsetzen", w), I = i("Weiterdenken", P);
|
|
159
140
|
return {
|
|
160
141
|
"Projektphasen (optional)": {},
|
|
161
142
|
"Projektphasen (optional)/Initiieren": c,
|
|
162
|
-
"Projektphasen (optional)/Planen":
|
|
163
|
-
"Projektphasen (optional)/Umsetzen":
|
|
164
|
-
"Projektphasen (optional)/Weiterdenken":
|
|
143
|
+
"Projektphasen (optional)/Planen": y,
|
|
144
|
+
"Projektphasen (optional)/Umsetzen": N,
|
|
145
|
+
"Projektphasen (optional)/Weiterdenken": I
|
|
165
146
|
};
|
|
166
147
|
}
|
|
167
148
|
function L(n) {
|
|
168
|
-
const
|
|
149
|
+
const r = n["p-plan:hasStep"] ?? [], s = {
|
|
169
150
|
datenerfassung: "1. Datenerfassung",
|
|
170
151
|
datenverarbeitung: "2. Datenverarbeitung",
|
|
171
152
|
datensimulation: "3. Datensimulation",
|
|
172
153
|
datenvisualisierung: "4. Datenvisualisierung"
|
|
173
|
-
},
|
|
154
|
+
}, a = {
|
|
174
155
|
"Technische Prozessschritte": {},
|
|
175
156
|
"1. Datenerfassung/Grundlegende Informationen": {},
|
|
176
157
|
"1. Datenerfassung/Software": {},
|
|
@@ -188,76 +169,76 @@ function L(n) {
|
|
|
188
169
|
"4. Datenvisualisierung/Software": {},
|
|
189
170
|
"4. Datenvisualisierung/Datensätze": {},
|
|
190
171
|
"4. Datenvisualisierung/Hardware": {}
|
|
191
|
-
},
|
|
192
|
-
for (const i of
|
|
193
|
-
const c = (t(i["p-plan:Activity"] || "") || "").trim().toLowerCase(),
|
|
194
|
-
if (!
|
|
172
|
+
}, d = (i) => `${i}/Grundlegende Informationen`, g = (i) => `${i}/Software`, w = (i) => `${i}/Datensätze`, P = (i) => `${i}/Hardware`;
|
|
173
|
+
for (const i of r) {
|
|
174
|
+
const c = (t(i["p-plan:Activity"] || "") || "").trim().toLowerCase(), y = s[c];
|
|
175
|
+
if (!y)
|
|
195
176
|
continue;
|
|
196
|
-
const
|
|
177
|
+
const N = z(i["dct:description"], "de") || "", I = N === "__EMPTY__" ? "" : N, m = (i["prov:used"] || []).map((e) => ({
|
|
197
178
|
name: t(e["dct:title"]) || ""
|
|
198
179
|
// description: extractStringValue(m['dct:description']) || undefined,
|
|
199
|
-
})).filter((e) => (e.name ?? "").length > 0),
|
|
180
|
+
})).filter((e) => (e.name ?? "").length > 0), u = (i["dct:references"] || []).filter((e) => t(e["dct:type"]) === "documentation").map((e) => ({
|
|
200
181
|
name: t(e["dct:title"]) || "",
|
|
201
182
|
url: t(e["schema:url"]) || "",
|
|
202
183
|
description: t(e["dct:description"]) || void 0
|
|
203
184
|
})).filter((e) => e.url.length > 0 && e.name.length > 0);
|
|
204
|
-
(
|
|
205
|
-
...
|
|
206
|
-
...
|
|
207
|
-
...
|
|
185
|
+
(I || m.length > 0 || u.length > 0) && (a[d(y)] = {
|
|
186
|
+
...I ? { description: I } : {},
|
|
187
|
+
...m.length > 0 ? { methods: m } : {},
|
|
188
|
+
...u.length > 0 ? { links: u } : {}
|
|
208
189
|
});
|
|
209
|
-
const v = i["p-plan:hasInputVar"] || [],
|
|
210
|
-
id:
|
|
211
|
-
functionalities: (e["schema:featureList"] || []).map((
|
|
190
|
+
const v = i["p-plan:hasInputVar"] || [], k = v.filter((e) => t(e["@type"]) === "schema:SoftwareApplication").map((e) => ({
|
|
191
|
+
id: j(t(e["dct:identifier"]) || ""),
|
|
192
|
+
functionalities: (e["schema:featureList"] || []).map((l) => t(l)).filter(f)
|
|
212
193
|
})).filter((e) => e.id.length > 0);
|
|
213
|
-
|
|
214
|
-
selected:
|
|
194
|
+
k.length > 0 && (a[g(y)] = {
|
|
195
|
+
selected: k
|
|
215
196
|
});
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
selected:
|
|
197
|
+
const h = v.filter((e) => t(e["@type"]) === "dcat:Dataset").map((e) => ({ id: j(t(e["dct:identifier"]) || "") })).filter((e) => e.id.length > 0);
|
|
198
|
+
h.length > 0 && (a[w(y)] = {
|
|
199
|
+
selected: h
|
|
219
200
|
});
|
|
220
|
-
const
|
|
221
|
-
const
|
|
201
|
+
const D = v.filter((e) => t(e["@type"]) === "ssn:System").map((e) => {
|
|
202
|
+
const l = e["ssn:deployedSystem"], b = j(t(e["dct:identifier"]) || ""), x = l && typeof l == "object" ? j(t(l["@id"]) || l["@id"]) : "", _ = b || x, G = z(e["dct:description"], "de") || void 0, H = (e["ssn:forProperty"] || []).map((o) => t(o)).filter(f), M = (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), O = (e["foaf:depiction"] || []).map((o) => K(o)).filter(f), T = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
|
|
222
203
|
name: t(o["dct:title"]) || "",
|
|
223
204
|
url: t(o["schema:url"]) || "",
|
|
224
205
|
description: t(o["dct:description"]) || void 0
|
|
225
|
-
})).filter((o) => o.url.length > 0),
|
|
206
|
+
})).filter((o) => o.url.length > 0), B = (e["ssn-system:hasSystemCapability"] || []).map((o) => t(o)).filter(f);
|
|
226
207
|
return {
|
|
227
|
-
id:
|
|
228
|
-
...
|
|
229
|
-
...
|
|
208
|
+
id: _,
|
|
209
|
+
...G ? { description: G } : {},
|
|
210
|
+
...H.length > 0 ? { forProperty: H } : {},
|
|
230
211
|
...M.length > 0 ? { locations: M } : {},
|
|
231
|
-
...
|
|
212
|
+
...O.length > 0 ? { depictions: O } : {},
|
|
232
213
|
...T.length > 0 ? { references: T } : {},
|
|
233
|
-
...
|
|
214
|
+
...B.length > 0 ? { functionalities: B } : {},
|
|
234
215
|
isHostedBy: e["sosa:isHostedBy"] || [],
|
|
235
216
|
hosts: []
|
|
236
217
|
};
|
|
237
218
|
}).filter((e) => (e.id ?? "").length > 0);
|
|
238
|
-
|
|
239
|
-
selected:
|
|
219
|
+
D.length > 0 && (a[P(y)] = {
|
|
220
|
+
selected: D
|
|
240
221
|
});
|
|
241
222
|
}
|
|
242
|
-
return
|
|
223
|
+
return a;
|
|
243
224
|
}
|
|
244
|
-
async function
|
|
245
|
-
const s = await
|
|
225
|
+
async function re(n, r) {
|
|
226
|
+
const s = await W(n);
|
|
246
227
|
return {
|
|
247
228
|
Landing: {},
|
|
248
|
-
...
|
|
249
|
-
...
|
|
250
|
-
...
|
|
251
|
-
|
|
229
|
+
...C(s, { visibility: (r == null ? void 0 : r.visibility) || "public" }),
|
|
230
|
+
...X(s),
|
|
231
|
+
...Y(s),
|
|
232
|
+
...J(s),
|
|
252
233
|
...L(s),
|
|
253
234
|
Vorschau: {}
|
|
254
235
|
};
|
|
255
236
|
}
|
|
256
237
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
238
|
+
re as decodeProject,
|
|
239
|
+
C as toAuffindbarkeit,
|
|
240
|
+
X as toGrundlegendeInformationen,
|
|
241
|
+
Y as toOptionaleDaten,
|
|
242
|
+
J as toProjektphasen,
|
|
262
243
|
L as toTechnicalProcessSteps
|
|
263
244
|
};
|