@piveau/dpi 0.2.0-alpha.14 → 0.2.0-alpha.16
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/AboutProject.vue.js +46 -48
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +48 -31
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +107 -88
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue2.js +86 -62
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +36 -68
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectDescriptionStep.vue.js +14 -14
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectNameStep.vue.js +7 -4
- 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 +26 -27
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectStatusStep.vue.js +8 -8
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue2.js +19 -19
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataProcessing/BasicInformationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataProcessing/BasicInformationStep.vue2.js +38 -39
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataSimulation/BasicInformationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataSimulation/BasicInformationStep.vue2.js +72 -67
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue2.js +84 -97
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +103 -88
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue2.js +140 -116
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +36 -29
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +11 -10
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +4 -3
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +46 -40
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +144 -134
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +189 -155
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue2.js +44 -38
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +128 -123
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +50 -45
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js +17 -17
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +367 -379
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +38 -71
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue2.js +4 -0
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +157 -141
- package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue.js +7 -0
- package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue2.js +172 -0
- package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue.js +7 -0
- package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue2.js +44 -0
- package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue2.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/components/TheErrorDialog.vue.js +57 -46
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +20 -20
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +68 -70
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiEditMode.js +61 -59
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +185 -180
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiStepper.js +60 -61
- package/dist/packages/dpi/src/data-provider-interface/composables/useProjectActions.js +76 -46
- package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyHome.js +67 -34
- package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyUser.js +85 -0
- package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +19 -19
- package/dist/packages/dpi/src/data-provider-interface/schema/projectLdSchema.js +98 -94
- package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +333 -308
- package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +314 -307
- package/dist/packages/dpi/src/form/inputDefinitions.js +52 -53
- package/dist/packages/dpi/src/stories/components/PartnerCard.vue.js +2 -2
- package/dist/packages/dpi/src/stories/components/PartnerCard.vue2.js +14 -14
- package/dist/packages/dpi/src/stories/components/ScreenshotCard.vue.js +2 -2
- package/dist/packages/dpi/src/stories/components/ScreenshotCard.vue2.js +9 -8
- package/package.json +5 -5
- package/dist/packages/dpi/src/data-provider-interface/components/PolGeoUriPage.vue.js +0 -124
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/__tests__/fixtures/theProjectForm.js +0 -281
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { pipe as s } from "effect";
|
|
2
2
|
import * as n from "effect/Option";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
function Z(e) {
|
|
3
|
+
import { PREFIXES as F } from "./shared.js";
|
|
4
|
+
function Q(e) {
|
|
6
5
|
return e.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
7
6
|
}
|
|
8
|
-
function
|
|
7
|
+
function H(e, r) {
|
|
9
8
|
if (e)
|
|
10
9
|
return {
|
|
11
10
|
"@value": e,
|
|
12
11
|
"@type": r
|
|
13
12
|
};
|
|
14
13
|
}
|
|
15
|
-
function
|
|
14
|
+
function z(e, r) {
|
|
16
15
|
const t = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), i = t.endsWith("/") ? t : `${t}/`, a = r.trim().replace(/^\/+/, "");
|
|
17
16
|
try {
|
|
18
17
|
return new URL(a, i).toString();
|
|
@@ -20,7 +19,7 @@ function T(e, r) {
|
|
|
20
19
|
return `${i}${a}`;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
|
-
function
|
|
22
|
+
function Z(e) {
|
|
24
23
|
return (e ?? []).map((t) => {
|
|
25
24
|
var i, a;
|
|
26
25
|
return { name: (i = t.name) == null ? void 0 : i.trim(), url: (a = t.url) == null ? void 0 : a.trim() };
|
|
@@ -29,11 +28,11 @@ function Y(e) {
|
|
|
29
28
|
...t.url && t.url.length > 0 ? { "foaf:homepage": t.url } : {}
|
|
30
29
|
}));
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function Y(e, r) {
|
|
33
32
|
return e ? [{ "@value": e, "@language": r }] : void 0;
|
|
34
33
|
}
|
|
35
|
-
function
|
|
36
|
-
return (r) =>
|
|
34
|
+
function J(e) {
|
|
35
|
+
return (r) => Y(r, e);
|
|
37
36
|
}
|
|
38
37
|
function W(e) {
|
|
39
38
|
if (e)
|
|
@@ -41,56 +40,56 @@ function W(e) {
|
|
|
41
40
|
"@id": e
|
|
42
41
|
};
|
|
43
42
|
}
|
|
44
|
-
function
|
|
43
|
+
function P(e) {
|
|
45
44
|
return e != null;
|
|
46
45
|
}
|
|
47
|
-
function
|
|
46
|
+
function ee(e, r = "http://www.w3.org/2001/XMLSchema#string") {
|
|
48
47
|
return s(
|
|
49
48
|
n.fromNullable(e),
|
|
50
49
|
n.map((t) => t.trim()),
|
|
51
50
|
n.filter((t) => t.length > 0),
|
|
52
|
-
n.flatMap((t) => n.fromNullable(
|
|
51
|
+
n.flatMap((t) => n.fromNullable(H(t, r)))
|
|
53
52
|
);
|
|
54
53
|
}
|
|
55
|
-
const
|
|
54
|
+
const q = (e) => (e ?? "").trim(), X = (e) => e.length > 0;
|
|
56
55
|
function m(e) {
|
|
57
56
|
return s(
|
|
58
57
|
n.fromNullable(e ?? void 0),
|
|
59
|
-
n.map(
|
|
58
|
+
n.map(q),
|
|
60
59
|
n.filter(X)
|
|
61
60
|
);
|
|
62
61
|
}
|
|
63
|
-
function
|
|
62
|
+
function ne(e) {
|
|
64
63
|
return s(
|
|
65
64
|
n.fromNullable(e),
|
|
66
|
-
n.map((r) => r.map(
|
|
65
|
+
n.map((r) => r.map(q).filter(X)),
|
|
67
66
|
n.filter((r) => r.length > 0),
|
|
68
67
|
n.map((r) => [...r])
|
|
69
68
|
);
|
|
70
69
|
}
|
|
71
|
-
function
|
|
70
|
+
function te(e) {
|
|
72
71
|
return s(
|
|
73
72
|
n.fromNullable(e),
|
|
74
|
-
n.map((r) => r.map((t) => W(t)).filter(
|
|
73
|
+
n.map((r) => r.map((t) => W(t)).filter(P)),
|
|
75
74
|
n.filter((r) => r.length > 0),
|
|
76
75
|
n.map((r) => [...r])
|
|
77
76
|
);
|
|
78
77
|
}
|
|
79
|
-
function
|
|
78
|
+
function C(e, r) {
|
|
80
79
|
return s(
|
|
81
80
|
m(e),
|
|
82
81
|
n.flatMap((t) => n.fromNullable(r(t)))
|
|
83
82
|
);
|
|
84
83
|
}
|
|
85
|
-
function
|
|
84
|
+
function re(e) {
|
|
86
85
|
return A(e).flatMap((r) => [...r]);
|
|
87
86
|
}
|
|
88
|
-
function
|
|
87
|
+
function $(e, r, t) {
|
|
89
88
|
return s(
|
|
90
89
|
n.fromNullable(e),
|
|
91
|
-
n.map((i) => i.map(r).filter(
|
|
90
|
+
n.map((i) => i.map(r).filter(P)),
|
|
92
91
|
n.filter((i) => i.length > 0),
|
|
93
|
-
n.map((i) =>
|
|
92
|
+
n.map((i) => T(i, t)),
|
|
94
93
|
n.filter((i) => i.length > 0),
|
|
95
94
|
n.map((i) => [...i])
|
|
96
95
|
);
|
|
@@ -110,13 +109,13 @@ function M(e) {
|
|
|
110
109
|
return r;
|
|
111
110
|
}
|
|
112
111
|
function A(e) {
|
|
113
|
-
return e.map(n.getOrUndefined).filter(
|
|
112
|
+
return e.map(n.getOrUndefined).filter(P);
|
|
114
113
|
}
|
|
115
114
|
function f(e) {
|
|
116
115
|
const r = e ? [...e] : [];
|
|
117
116
|
return r.length > 0 ? r : void 0;
|
|
118
117
|
}
|
|
119
|
-
function
|
|
118
|
+
function ie(e, r) {
|
|
120
119
|
const t = e ?? {}, i = [];
|
|
121
120
|
let a = 1;
|
|
122
121
|
for (const [c, o] of Object.entries(r)) {
|
|
@@ -137,7 +136,7 @@ function ae(e, r) {
|
|
|
137
136
|
return i;
|
|
138
137
|
}
|
|
139
138
|
function D(e, r, t, i) {
|
|
140
|
-
const a =
|
|
139
|
+
const a = ie(e, t);
|
|
141
140
|
return a.length === 0 ? n.none() : n.some({
|
|
142
141
|
"@type": "schema:QAPage",
|
|
143
142
|
"dct:identifier": "__TODO__",
|
|
@@ -147,7 +146,7 @@ function D(e, r, t, i) {
|
|
|
147
146
|
"schema:position": { "@value": String(i), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
|
|
148
147
|
});
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function ae(e) {
|
|
151
150
|
return (e ?? []).map((t) => {
|
|
152
151
|
var i, a;
|
|
153
152
|
return { name: (i = t.name) == null ? void 0 : i.trim(), description: (a = t.description) == null ? void 0 : a.trim() };
|
|
@@ -157,7 +156,7 @@ function oe(e) {
|
|
|
157
156
|
"dct:description": t.description
|
|
158
157
|
}));
|
|
159
158
|
}
|
|
160
|
-
function
|
|
159
|
+
function T(e, r) {
|
|
161
160
|
return (e ?? []).map((i) => ({
|
|
162
161
|
"@type": "rdfs:Resource",
|
|
163
162
|
"dct:type": r,
|
|
@@ -176,25 +175,25 @@ function z(e, r) {
|
|
|
176
175
|
)
|
|
177
176
|
}));
|
|
178
177
|
}
|
|
179
|
-
function
|
|
178
|
+
function oe(e, r) {
|
|
180
179
|
return (e ?? []).map((i) => ({
|
|
181
180
|
"@type": "schema:SoftwareApplication",
|
|
182
|
-
"dct:identifier":
|
|
181
|
+
"dct:identifier": z(r.baseRepoUrl, i.id),
|
|
183
182
|
"schema:featureList": f((i.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0))
|
|
184
183
|
}));
|
|
185
184
|
}
|
|
186
|
-
function
|
|
185
|
+
function se(e, r) {
|
|
187
186
|
return (e ?? []).map((i) => ({
|
|
188
187
|
"@type": "dcat:Dataset",
|
|
189
|
-
"dct:identifier":
|
|
188
|
+
"dct:identifier": z(r.baseRepoUrl, i.id)
|
|
190
189
|
}));
|
|
191
190
|
}
|
|
192
|
-
function
|
|
191
|
+
function le(e, r, t) {
|
|
193
192
|
return (e ?? []).map((a) => {
|
|
194
193
|
var c;
|
|
195
194
|
return {
|
|
196
195
|
"@type": "ssn:System",
|
|
197
|
-
"dct:identifier":
|
|
196
|
+
"dct:identifier": z(t.baseRepoUrl, a.id),
|
|
198
197
|
"dct:description": s(
|
|
199
198
|
n.fromNullable(a.description),
|
|
200
199
|
n.map((o) => o.trim()),
|
|
@@ -209,11 +208,11 @@ function ce(e, r, t) {
|
|
|
209
208
|
"geo:lat": o.lat,
|
|
210
209
|
"geo:long": o.lng
|
|
211
210
|
}))),
|
|
212
|
-
"foaf:depiction": f((a.depictions ?? []).map((o) => W(o)).filter(
|
|
211
|
+
"foaf:depiction": f((a.depictions ?? []).map((o) => W(o)).filter(P)),
|
|
213
212
|
// Corresponds to functionalities of hardware;
|
|
214
213
|
// not to be confused with functionalities of software (schema:featureList)
|
|
215
214
|
"ssn-system:hasSystemCapability": f((a.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0)),
|
|
216
|
-
"dct:references": f(
|
|
215
|
+
"dct:references": f(T((c = a.references) == null ? void 0 : c.map((o) => ({
|
|
217
216
|
name: o.name ?? "",
|
|
218
217
|
url: o.url ?? "",
|
|
219
218
|
description: o.description
|
|
@@ -221,36 +220,36 @@ function ce(e, r, t) {
|
|
|
221
220
|
};
|
|
222
221
|
});
|
|
223
222
|
}
|
|
224
|
-
function
|
|
223
|
+
function U(e) {
|
|
225
224
|
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`,
|
|
227
|
-
n.fromNullable(
|
|
225
|
+
const { prefixKey: r, activityLabel: t, input: i, toLanged: a, context: c } = e, o = `${r}/Grundlegende Informationen`, p = `${r}/Software`, u = `${r}/Datensätze`, x = `${r}/Hardware`, d = i[o], N = d == null ? void 0 : d.description, j = s(
|
|
226
|
+
n.fromNullable(N),
|
|
228
227
|
n.map((h) => h.trim()),
|
|
229
228
|
n.filter((h) => h.length > 0),
|
|
230
229
|
n.getOrUndefined
|
|
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[
|
|
232
|
-
...
|
|
233
|
-
...
|
|
234
|
-
...
|
|
230
|
+
), 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[x]) == null ? void 0 : O.selected, b = [
|
|
231
|
+
...oe(_, c),
|
|
232
|
+
...se(v, c),
|
|
233
|
+
...le(S, a, c)
|
|
235
234
|
], k = {
|
|
236
235
|
"@type": "p-plan:Step",
|
|
237
236
|
"dct:identifier": "__TODO__",
|
|
238
237
|
"p-plan:Activity": t,
|
|
239
238
|
"dct:description": a(j ?? "__EMPTY__"),
|
|
240
239
|
"p-plan:isPrecededBy": null,
|
|
241
|
-
"prov:used": f(
|
|
242
|
-
"dct:references": f(
|
|
240
|
+
"prov:used": f(ae(I)),
|
|
241
|
+
"dct:references": f(T(L, "documentation")),
|
|
243
242
|
"p-plan:hasInputVar": b.length > 0 ? b : void 0
|
|
244
243
|
};
|
|
245
244
|
return n.some(k);
|
|
246
245
|
}
|
|
247
|
-
function
|
|
246
|
+
function ue(e, r = {}) {
|
|
248
247
|
var v, S, b, k, w, y, O, h, R, E, K, B, G, V;
|
|
249
248
|
const t = {
|
|
250
249
|
"@type": ["schema:Project", "https://piveau.eu/ns/voc#CustomResource"]
|
|
251
250
|
}, i = (r == null ? void 0 : r.language) ?? "de", a = s(
|
|
252
251
|
m((v = e["Grundlegende Informationen/Name"]) == null ? void 0 : v.projectName),
|
|
253
|
-
n.map((l) =>
|
|
252
|
+
n.map((l) => Q(l)),
|
|
254
253
|
n.filter((l) => l.length > 0),
|
|
255
254
|
n.getOrUndefined
|
|
256
255
|
), c = s(
|
|
@@ -258,9 +257,9 @@ function de(e, r = {}) {
|
|
|
258
257
|
n.map((l) => l.trim()),
|
|
259
258
|
n.filter((l) => l.length > 0),
|
|
260
259
|
n.getOrElse(() => a ?? "__TODO__")
|
|
261
|
-
), o =
|
|
262
|
-
t["dct:title"] = s(
|
|
263
|
-
|
|
260
|
+
), o = J(i);
|
|
261
|
+
t["dct:title"] = s(C((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, o), n.getOrThrow), t["dct:description"] = s(C((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, o), n.getOrThrow), t["dct:identifier"] = [c], t["dcat:theme"] = s(te((k = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : k.categories), n.getOrThrow), t["schema:application"] = (w = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : w.applications, t["schema:status"] = s(m((y = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : y.projectName), n.getOrThrow), t["schema:amount"] = s(
|
|
262
|
+
ee((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
|
|
264
263
|
n.map((l) => {
|
|
265
264
|
var g;
|
|
266
265
|
return {
|
|
@@ -271,9 +270,9 @@ function de(e, r = {}) {
|
|
|
271
270
|
};
|
|
272
271
|
}),
|
|
273
272
|
n.getOrUndefined
|
|
274
|
-
), t["schema:skills"] = s(
|
|
273
|
+
), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(m((R = e["Optionale Daten"]) == null ? void 0 : R.startDate), n.getOrUndefined), t["schema:endDate"] = s(m((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
|
|
275
274
|
const p = [
|
|
276
|
-
|
|
275
|
+
$(
|
|
277
276
|
(K = e["Optionale Daten"]) == null ? void 0 : K.links,
|
|
278
277
|
(l) => {
|
|
279
278
|
const g = s(m(l.url), n.getOrUndefined);
|
|
@@ -286,7 +285,7 @@ function de(e, r = {}) {
|
|
|
286
285
|
},
|
|
287
286
|
"documentation"
|
|
288
287
|
),
|
|
289
|
-
|
|
288
|
+
$(
|
|
290
289
|
(B = e["Optionale Daten"]) == null ? void 0 : B.references,
|
|
291
290
|
(l) => {
|
|
292
291
|
const g = s(m(l.homepage), n.getOrUndefined);
|
|
@@ -299,7 +298,7 @@ function de(e, r = {}) {
|
|
|
299
298
|
},
|
|
300
299
|
"image"
|
|
301
300
|
)
|
|
302
|
-
], u =
|
|
301
|
+
], u = re(p);
|
|
303
302
|
t["dct:references"] = u.length > 0 ? u : void 0, t["dcat:contactPoint"] = s(
|
|
304
303
|
n.fromNullable((G = e["Grundlegende Informationen/Organisation"]) == null ? void 0 : G.contact),
|
|
305
304
|
n.map((l) => ({
|
|
@@ -312,11 +311,11 @@ function de(e, r = {}) {
|
|
|
312
311
|
n.getOrUndefined
|
|
313
312
|
), t["dct:contributor"] = s(
|
|
314
313
|
n.fromNullable((V = e["Optionale Daten"]) == null ? void 0 : V.partners),
|
|
315
|
-
n.map((l) =>
|
|
314
|
+
n.map((l) => Z(l)),
|
|
316
315
|
n.filter((l) => l.length > 0),
|
|
317
316
|
n.getOrUndefined
|
|
318
317
|
);
|
|
319
|
-
const
|
|
318
|
+
const x = {
|
|
320
319
|
projectTriggers: "Was waren Ausloeser fuer das Projekt (z. B. rechtliche oder politische Vorgaben, intrinsische Motivation oder inspirierende Projekte aus anderen Kommunen)?",
|
|
321
320
|
involvedStakeholders: "Welche relevanten Akteure innerhalb oder ausserhalb Ihrer Organisation haben Sie fruehzeitig involviert (z. B. um politische Rueckendeckung sicherzustellen)?",
|
|
322
321
|
dataCollectionMethod: "Wie haben Sie den Bestand vorhandener Daten erhoben?",
|
|
@@ -326,7 +325,7 @@ function de(e, r = {}) {
|
|
|
326
325
|
tenderFormat: "Welche Ausschreibungsform haben Sie gewaehlt und warum? Gab es eine Vorlage oder Muster-Leistungsbeschreibung, die hilfreich war?",
|
|
327
326
|
tenderTips: "Welche Tipps haben Sie fuer eine erfolgreiche Ausschreibung?",
|
|
328
327
|
resourcePlanning: "Wie haben Sie die Ressourcenplanung fuer die Entwicklung und den Betrieb Ihres Digitalen Zwillings gestaltet und gesichert?"
|
|
329
|
-
},
|
|
328
|
+
}, N = {
|
|
330
329
|
projectTriggers: "Wie haben Sie die Zusammenarbeit mit den Dienstleistern organisiert und wie wurden relevante Stakeholder in Entscheidungsprozesse eingebunden?",
|
|
331
330
|
involvedStakeholders: "Gab es Verzoegerungen und wenn ja, was waren die Gruende?",
|
|
332
331
|
dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
|
|
@@ -337,31 +336,30 @@ function de(e, r = {}) {
|
|
|
337
336
|
dataCollectionMethod: "Gibt es Plaene fuer eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafuer?",
|
|
338
337
|
budgetPlanning: "Welche externen Unterstuetzungsangebote haben Ihnen geholfen oder auch gefehlt?"
|
|
339
338
|
}, I = A([
|
|
340
|
-
D(e["Projektphasen (optional)/Initiieren"], "Initiieren",
|
|
339
|
+
D(e["Projektphasen (optional)/Initiieren"], "Initiieren", x, 1),
|
|
341
340
|
D(e["Projektphasen (optional)/Planen"], "Planen", d, 2),
|
|
342
|
-
D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen",
|
|
341
|
+
D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen", N, 3),
|
|
343
342
|
D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", j, 4)
|
|
344
343
|
]);
|
|
345
344
|
t["schema:hasPart"] = f(I);
|
|
346
345
|
const L = A([
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
346
|
+
U({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: o, context: r }),
|
|
347
|
+
U({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: o, context: r }),
|
|
348
|
+
U({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: o, context: r }),
|
|
349
|
+
U({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: o, context: r })
|
|
351
350
|
]);
|
|
352
351
|
return t["p-plan:hasStep"] = f(L), {
|
|
353
352
|
"@context": {
|
|
354
|
-
...
|
|
353
|
+
...F
|
|
355
354
|
},
|
|
356
355
|
"@graph": M(t)
|
|
357
356
|
};
|
|
358
357
|
}
|
|
359
|
-
console.log(JSON.stringify(de(Q), null, 2));
|
|
360
358
|
export {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
359
|
+
ue as encodeProject,
|
|
360
|
+
P as isNonNullable,
|
|
361
|
+
Q as slugify,
|
|
362
|
+
Y as toLangedValue,
|
|
365
363
|
W as toNodeReference,
|
|
366
|
-
|
|
364
|
+
H as toTypedValue
|
|
367
365
|
};
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { getResource as
|
|
2
|
-
import { useAsyncState as
|
|
3
|
-
import
|
|
4
|
-
import { computed as
|
|
5
|
-
import { useRoute as
|
|
6
|
-
import { useStore as
|
|
7
|
-
import { useRuntimeEnv as
|
|
8
|
-
import { decodeProject as
|
|
9
|
-
import { useDpiContext as
|
|
10
|
-
import { useDpiSimpleLoader as
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { getResource as w, getDataset as L } from "@piveau/sdk-core/hubRepo";
|
|
2
|
+
import { useAsyncState as Q } from "@vueuse/core";
|
|
3
|
+
import "axios";
|
|
4
|
+
import { computed as o, toValue as u, watchEffect as A, watch as x } from "vue";
|
|
5
|
+
import { useRoute as E } from "vue-router";
|
|
6
|
+
import { useStore as U } from "vuex";
|
|
7
|
+
import { useRuntimeEnv as z } from "../../composables/useRuntimeEnv.js";
|
|
8
|
+
import { decodeProject as F } from "./project-transformer/decodeProject.js";
|
|
9
|
+
import { useDpiContext as N } from "./useDpiContext.js";
|
|
10
|
+
import { useDpiSimpleLoader as P } from "./useDpiSimpleLoader.js";
|
|
11
|
+
function Y(n, c) {
|
|
12
|
+
var b, D;
|
|
13
|
+
const e = E(), s = U(), d = z(), y = o(() => {
|
|
14
|
+
var r, i;
|
|
15
|
+
return ((i = (r = u(n)) == null ? void 0 : r.edit) == null ? void 0 : i.enabled) ?? e.query.edit === "true";
|
|
16
|
+
}), l = o(() => {
|
|
17
|
+
var r, i;
|
|
18
|
+
return ((i = (r = u(n)) == null ? void 0 : r.edit) == null ? void 0 : i.id) ?? e.query.id;
|
|
19
|
+
}), p = o(() => {
|
|
20
|
+
var r, i;
|
|
21
|
+
return ((i = (r = u(n)) == null ? void 0 : r.edit) == null ? void 0 : i.fromDraft) ?? e.query.fromDraft ?? s.getters["auth/getIsDraft"];
|
|
21
22
|
});
|
|
22
|
-
|
|
23
|
-
const t =
|
|
24
|
-
var
|
|
25
|
-
const r = p.value,
|
|
26
|
-
return { endpoint: r ? `${d.api.hubUrl}drafts/datasets/${l.value}.jsonld?catalogue=${e.query.catalog}` : e.params.property === "catalogues" ? `${d.api.hubUrl}catalogues/${e.query.catalog}.jsonld` : `${d.api.hubUrl}datasets/${l.value}.jsonld?useNormalizedId=true`, token:
|
|
27
|
-
}), { state: a, execute:
|
|
28
|
-
async () => c ? await
|
|
23
|
+
y.value && (localStorage.setItem("dpi_editmode", "false"), s.dispatch("auth/setIsEditMode", !1));
|
|
24
|
+
const t = o(() => {
|
|
25
|
+
var q, I;
|
|
26
|
+
const r = p.value, i = (q = s.getters["auth/getUserData"]) == null ? void 0 : q.rtpToken, m = (I = s.getters["auth/getUserData"]) == null ? void 0 : I.authToken, $ = e.params.property, j = e.params.id;
|
|
27
|
+
return { endpoint: r ? `${d.api.hubUrl}drafts/datasets/${l.value}.jsonld?catalogue=${e.query.catalog}` : e.params.property === "catalogues" ? `${d.api.hubUrl}catalogues/${e.query.catalog}.jsonld` : `${d.api.hubUrl}datasets/${l.value}.jsonld?useNormalizedId=true`, token: i, property: $, id: j, authToken: m };
|
|
28
|
+
}), { state: a, execute: k, isLoading: v, error: S } = Q(
|
|
29
|
+
async () => c ? await w({
|
|
29
30
|
baseUrl: d.api.hubUrl,
|
|
30
31
|
type: "project",
|
|
31
32
|
id: l.value,
|
|
32
33
|
authToken: t.value.authToken,
|
|
33
34
|
catalogId: e.query.catalog
|
|
34
|
-
}) : (await
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
}) : (await L({
|
|
36
|
+
baseUrl: d.api.hubUrl,
|
|
37
|
+
id: l.value,
|
|
38
|
+
authToken: t.value.authToken,
|
|
39
|
+
catalogId: e.query.catalog
|
|
39
40
|
})).data,
|
|
40
41
|
void 0,
|
|
41
42
|
{
|
|
@@ -45,68 +46,69 @@ function W(n, c) {
|
|
|
45
46
|
A(() => {
|
|
46
47
|
a.value && console.log("the json.value = ", a.value);
|
|
47
48
|
});
|
|
48
|
-
const f =
|
|
49
|
-
|
|
49
|
+
const f = o(() => !!l.value && (!!t.value.token || !!t.value.authToken));
|
|
50
|
+
x(f, () => {
|
|
50
51
|
if (!f.value)
|
|
51
52
|
return;
|
|
52
53
|
const r = p.value;
|
|
53
|
-
s.dispatch("auth/setIsEditMode", !0), s.dispatch("auth/setIsDraft", r),
|
|
54
|
+
s.dispatch("auth/setIsEditMode", !0), s.dispatch("auth/setIsDraft", r), k();
|
|
54
55
|
}, { immediate: !0 });
|
|
55
|
-
const { isReady:
|
|
56
|
+
const { isReady: h, result: T, isMaterialized: g, errors: M } = P(a, {
|
|
56
57
|
enabled: f,
|
|
57
58
|
hubSearchUrl: d.api.baseUrl,
|
|
58
59
|
transform: c ? async (r) => {
|
|
59
|
-
var
|
|
60
|
-
return
|
|
61
|
-
visibility: ["public", "restricted", "private", "internal"].includes((
|
|
60
|
+
var i, m;
|
|
61
|
+
return F(r, {
|
|
62
|
+
visibility: ["public", "restricted", "private", "internal"].includes((i = e == null ? void 0 : e.query) == null ? void 0 : i.visibility) ? (m = e == null ? void 0 : e.query) == null ? void 0 : m.visibility : "public"
|
|
62
63
|
});
|
|
63
|
-
} : void 0
|
|
64
|
-
|
|
64
|
+
} : void 0,
|
|
65
|
+
visibility: ["public", "restricted", "internal"].includes((b = e == null ? void 0 : e.query) == null ? void 0 : b.visibility) ? (D = e == null ? void 0 : e.query) == null ? void 0 : D.visibility : "public"
|
|
66
|
+
}), R = o(() => {
|
|
65
67
|
var r;
|
|
66
|
-
return (r = u(n).edit) != null && r.enabled ? !!s.getters["dpiStore/getSpecificationName"] && !
|
|
68
|
+
return (r = u(n).edit) != null && r.enabled ? !!s.getters["dpiStore/getSpecificationName"] && !v.value && h.value && g.value : !0;
|
|
67
69
|
});
|
|
68
|
-
return
|
|
70
|
+
return o(() => {
|
|
69
71
|
}), {
|
|
70
72
|
inEditModeAndRptAvailable: f,
|
|
71
|
-
isReady:
|
|
72
|
-
result:
|
|
73
|
-
isSimpleLoaderReady:
|
|
73
|
+
isReady: R,
|
|
74
|
+
result: T,
|
|
75
|
+
isSimpleLoaderReady: h,
|
|
74
76
|
isMaterialized: g,
|
|
75
|
-
fetchError:
|
|
76
|
-
parsingErrors:
|
|
77
|
-
isLoading:
|
|
77
|
+
fetchError: S,
|
|
78
|
+
parsingErrors: M,
|
|
79
|
+
isLoading: v,
|
|
78
80
|
jsonld: a
|
|
79
81
|
};
|
|
80
82
|
}
|
|
81
|
-
function
|
|
82
|
-
const n =
|
|
83
|
+
function Z() {
|
|
84
|
+
const n = E(), c = U(), e = N();
|
|
83
85
|
if (!e || !e.value)
|
|
84
86
|
throw new Error("DpiContext not found");
|
|
85
|
-
const s =
|
|
87
|
+
const s = o(() => {
|
|
86
88
|
var t, a;
|
|
87
89
|
return ((a = (t = u(e)) == null ? void 0 : t.edit) == null ? void 0 : a.id) ?? n.query.id;
|
|
88
|
-
}), d =
|
|
90
|
+
}), d = o(() => {
|
|
89
91
|
var t, a;
|
|
90
92
|
return ((a = (t = u(e)) == null ? void 0 : t.edit) == null ? void 0 : a.fromDraft) ?? n.query.fromDraft ?? c.getters["auth/getIsDraft"];
|
|
91
|
-
}),
|
|
93
|
+
}), y = o(() => {
|
|
92
94
|
var t, a;
|
|
93
95
|
return ((a = (t = u(e)) == null ? void 0 : t.edit) == null ? void 0 : a.enabled) ?? n.query.edit;
|
|
94
|
-
}), l =
|
|
96
|
+
}), l = o(() => {
|
|
95
97
|
var t;
|
|
96
98
|
return !!((t = u(e).edit) != null && t.enabled);
|
|
97
|
-
}), p =
|
|
99
|
+
}), p = o(() => {
|
|
98
100
|
var t, a;
|
|
99
101
|
return (a = (t = u(e)) == null ? void 0 : t.edit) == null ? void 0 : a.catalog;
|
|
100
102
|
});
|
|
101
103
|
return {
|
|
102
104
|
editIdQuery: s,
|
|
103
105
|
editFromDraft: d,
|
|
104
|
-
editQuery:
|
|
106
|
+
editQuery: y,
|
|
105
107
|
isEditMode: l,
|
|
106
108
|
catalogId: p
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
111
|
export {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
Y as useDpiEditMode,
|
|
113
|
+
Z as useEditModeInfo
|
|
112
114
|
};
|