@piveau/dpi 0.2.0-alpha.20 → 0.2.0-alpha.22
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/DataProviderInterface.vue.js +22 -16
- package/dist/packages/dpi/src/data-provider-interface/DataProviderInterface.vue2.js +34 -32
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +87 -71
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue2.js +88 -73
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +70 -55
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue2.js +50 -49
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ButtonV3.vue.js +115 -83
- 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 +108 -105
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +111 -107
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +127 -122
- package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue2.js +72 -68
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +38 -38
- package/dist/packages/dpi/src/data-provider-interface/composables/useDebouncedLoading.js +11 -0
- package/dist/packages/dpi/src/data-provider-interface/composables/useProjectActions.js +37 -37
- package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +218 -216
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ function H(e, r) {
|
|
|
11
11
|
"@type": r
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function P(e, r, t) {
|
|
15
15
|
const i = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), o = i.endsWith("/") ? i : `${i}/`, c = r.trim().replace(/^\/+/, ""), a = t ? `${t}/${c}` : c;
|
|
16
16
|
try {
|
|
17
17
|
return new URL(a, o).toString();
|
|
@@ -34,13 +34,13 @@ function Y(e, r) {
|
|
|
34
34
|
function J(e) {
|
|
35
35
|
return (r) => Y(r, e);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function M(e) {
|
|
38
38
|
if (e)
|
|
39
39
|
return {
|
|
40
40
|
"@id": e
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function N(e) {
|
|
44
44
|
return e != null;
|
|
45
45
|
}
|
|
46
46
|
function ee(e, r = "http://www.w3.org/2001/XMLSchema#string") {
|
|
@@ -70,7 +70,7 @@ function ne(e) {
|
|
|
70
70
|
function te(e) {
|
|
71
71
|
return s(
|
|
72
72
|
n.fromNullable(e),
|
|
73
|
-
n.map((r) => r.map((t) =>
|
|
73
|
+
n.map((r) => r.map((t) => M(t)).filter(N)),
|
|
74
74
|
n.filter((r) => r.length > 0),
|
|
75
75
|
n.map((r) => [...r])
|
|
76
76
|
);
|
|
@@ -82,34 +82,34 @@ function $(e, r) {
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
function re(e) {
|
|
85
|
-
return
|
|
85
|
+
return z(e).flatMap((r) => [...r]);
|
|
86
86
|
}
|
|
87
87
|
function C(e, r, t) {
|
|
88
88
|
return s(
|
|
89
89
|
n.fromNullable(e),
|
|
90
|
-
n.map((i) => i.map(r).filter(
|
|
90
|
+
n.map((i) => i.map(r).filter(N)),
|
|
91
91
|
n.filter((i) => i.length > 0),
|
|
92
92
|
n.map((i) => T(i, t)),
|
|
93
93
|
n.filter((i) => i.length > 0),
|
|
94
94
|
n.map((i) => [...i])
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function A(e) {
|
|
98
98
|
if (e == null || typeof e != "object")
|
|
99
99
|
return e;
|
|
100
100
|
if (Array.isArray(e))
|
|
101
|
-
return e.map((i) =>
|
|
101
|
+
return e.map((i) => A(i)).filter((i) => i != null);
|
|
102
102
|
const r = {};
|
|
103
103
|
for (const [t, i] of Object.entries(e)) {
|
|
104
104
|
if (i == null)
|
|
105
105
|
continue;
|
|
106
|
-
const o =
|
|
106
|
+
const o = A(i);
|
|
107
107
|
o != null && (r[t] = o);
|
|
108
108
|
}
|
|
109
109
|
return r;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
return e.map(n.getOrUndefined).filter(
|
|
111
|
+
function z(e) {
|
|
112
|
+
return e.map(n.getOrUndefined).filter(N);
|
|
113
113
|
}
|
|
114
114
|
function f(e) {
|
|
115
115
|
const r = e ? [...e] : [];
|
|
@@ -178,14 +178,14 @@ function T(e, r) {
|
|
|
178
178
|
function oe(e, r) {
|
|
179
179
|
return (e ?? []).map((i) => ({
|
|
180
180
|
"@type": "schema:SoftwareApplication",
|
|
181
|
-
"dct:identifier":
|
|
181
|
+
"dct:identifier": P(r.baseRepoUrl, i.id, "resources/software"),
|
|
182
182
|
"schema:featureList": f((i.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0))
|
|
183
183
|
}));
|
|
184
184
|
}
|
|
185
185
|
function se(e, r) {
|
|
186
186
|
return (e ?? []).map((i) => ({
|
|
187
187
|
"@type": "dcat:Dataset",
|
|
188
|
-
"dct:identifier":
|
|
188
|
+
"dct:identifier": P(r.baseRepoUrl, i.id, "datasets")
|
|
189
189
|
}));
|
|
190
190
|
}
|
|
191
191
|
function le(e, r, t) {
|
|
@@ -193,7 +193,7 @@ function le(e, r, t) {
|
|
|
193
193
|
var c;
|
|
194
194
|
return {
|
|
195
195
|
"@type": "ssn:System",
|
|
196
|
-
"dct:identifier":
|
|
196
|
+
"dct:identifier": P(t.baseRepoUrl, o.id, "resources/hardware"),
|
|
197
197
|
"dct:description": s(
|
|
198
198
|
n.fromNullable(o.description),
|
|
199
199
|
n.map((a) => a.trim()),
|
|
@@ -201,14 +201,14 @@ function le(e, r, t) {
|
|
|
201
201
|
n.flatMap((a) => n.fromNullable(r(a))),
|
|
202
202
|
n.getOrUndefined
|
|
203
203
|
),
|
|
204
|
-
"ssn:deployedSystem":
|
|
204
|
+
"ssn:deployedSystem": M(P(t.baseRepoUrl, o.id, "resources/hardware")),
|
|
205
205
|
"ssn:forProperty": f((o.forProperty ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
|
|
206
206
|
"sosa:hasLocation": f((o.locations ?? []).map((a) => ({
|
|
207
207
|
"@type": "dct:Location",
|
|
208
208
|
"geo:lat": a.lat,
|
|
209
209
|
"geo:long": a.lng
|
|
210
210
|
}))),
|
|
211
|
-
"foaf:depiction": f((o.depictions ?? []).map((a) =>
|
|
211
|
+
"foaf:depiction": f((o.depictions ?? []).map((a) => M(a)).filter(N)),
|
|
212
212
|
// Corresponds to functionalities of hardware;
|
|
213
213
|
// not to be confused with functionalities of software (schema:featureList)
|
|
214
214
|
"ssn-system:hasSystemCapability": f((o.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
|
|
@@ -220,14 +220,14 @@ function le(e, r, t) {
|
|
|
220
220
|
};
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function U(e) {
|
|
224
224
|
var w, y, O;
|
|
225
|
-
const { prefixKey: r, activityLabel: t, input: i, toLanged: o, context: c } = e, a = `${r}/Grundlegende Informationen`, p = `${r}/Software`, u = `${r}/Datensätze`, x = `${r}/Hardware`, d = i[a],
|
|
226
|
-
n.fromNullable(
|
|
225
|
+
const { prefixKey: r, activityLabel: t, input: i, toLanged: o, context: c } = e, a = `${r}/Grundlegende Informationen`, p = `${r}/Software`, u = `${r}/Datensätze`, x = `${r}/Hardware`, d = i[a], j = d == null ? void 0 : d.description, I = s(
|
|
226
|
+
n.fromNullable(j),
|
|
227
227
|
n.map((h) => h.trim()),
|
|
228
228
|
n.filter((h) => h.length > 0),
|
|
229
229
|
n.getOrUndefined
|
|
230
|
-
),
|
|
230
|
+
), L = d == null ? void 0 : d.methods, W = d == null ? void 0 : d.links, R = (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
231
|
...oe(R, c),
|
|
232
232
|
...se(v, c),
|
|
233
233
|
...le(S, o, c)
|
|
@@ -235,10 +235,10 @@ function P(e) {
|
|
|
235
235
|
"@type": "p-plan:Step",
|
|
236
236
|
"dct:identifier": "__TODO__",
|
|
237
237
|
"p-plan:Activity": t,
|
|
238
|
-
"dct:description": o(
|
|
238
|
+
"dct:description": o(I ?? "__EMPTY__"),
|
|
239
239
|
"p-plan:isPrecededBy": null,
|
|
240
|
-
"prov:used": f(ae(
|
|
241
|
-
"dct:references": f(T(
|
|
240
|
+
"prov:used": f(ae(L)),
|
|
241
|
+
"dct:references": f(T(W, "documentation")),
|
|
242
242
|
"p-plan:hasInputVar": b.length > 0 ? b : void 0
|
|
243
243
|
};
|
|
244
244
|
return n.some(k);
|
|
@@ -325,41 +325,41 @@ function ue(e, r = {}) {
|
|
|
325
325
|
tenderFormat: "Welche Ausschreibungsform haben Sie gewaehlt und warum? Gab es eine Vorlage oder Muster-Leistungsbeschreibung, die hilfreich war?",
|
|
326
326
|
tenderTips: "Welche Tipps haben Sie fuer eine erfolgreiche Ausschreibung?",
|
|
327
327
|
resourcePlanning: "Wie haben Sie die Ressourcenplanung fuer die Entwicklung und den Betrieb Ihres Digitalen Zwillings gestaltet und gesichert?"
|
|
328
|
-
},
|
|
328
|
+
}, j = {
|
|
329
329
|
projectTriggers: "Wie haben Sie die Zusammenarbeit mit den Dienstleistern organisiert und wie wurden relevante Stakeholder in Entscheidungsprozesse eingebunden?",
|
|
330
330
|
involvedStakeholders: "Gab es Verzoegerungen und wenn ja, was waren die Gruende?",
|
|
331
331
|
dataCollectionMethod: "Welche Schnittstellen wurden genutzt und traten technische Herausforderungen auf?",
|
|
332
332
|
budgetPlanning: "Welche Ueberlegungen sind in Ihre Entscheidung fuer eine Open-Source-Loesung eingeflossen und welche Erfahrungen haben Sie gemacht?"
|
|
333
|
-
},
|
|
333
|
+
}, I = {
|
|
334
334
|
projectTriggers: "Was sind Ihre wichtigsten Learnings aus dem Projekt? Was wuerden Sie beim naechsten Use Case anders machen?",
|
|
335
335
|
involvedStakeholders: "Wird die Wirksamkeit Ihres Projekts ueberwacht und wenn ja, wie? Ist der erwartete Nutzen eingetreten?",
|
|
336
336
|
dataCollectionMethod: "Gibt es Plaene fuer eine Skalierung oder Weiterentwicklung? Wenn ja, wie sichern Sie die Finanzierung dafuer?",
|
|
337
337
|
budgetPlanning: "Welche externen Unterstuetzungsangebote haben Ihnen geholfen oder auch gefehlt?"
|
|
338
|
-
},
|
|
338
|
+
}, L = z([
|
|
339
339
|
D(e["Projektphasen (optional)/Initiieren"], "Initiieren", x, 1),
|
|
340
340
|
D(e["Projektphasen (optional)/Planen"], "Planen", d, 2),
|
|
341
|
-
D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen",
|
|
342
|
-
D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken",
|
|
341
|
+
D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen", j, 3),
|
|
342
|
+
D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", I, 4)
|
|
343
343
|
]);
|
|
344
|
-
t["schema:hasPart"] = f(
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
344
|
+
t["schema:hasPart"] = f(L);
|
|
345
|
+
const W = z([
|
|
346
|
+
U({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: a, context: r }),
|
|
347
|
+
U({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: a, context: r }),
|
|
348
|
+
U({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: a, context: r }),
|
|
349
|
+
U({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: a, context: r })
|
|
350
350
|
]);
|
|
351
|
-
return t["p-plan:hasStep"] = f(
|
|
351
|
+
return t["p-plan:hasStep"] = f(W), {
|
|
352
352
|
"@context": {
|
|
353
353
|
...F
|
|
354
354
|
},
|
|
355
|
-
"@graph":
|
|
355
|
+
"@graph": A(t)
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
export {
|
|
359
359
|
ue as encodeProject,
|
|
360
|
-
|
|
360
|
+
N as isNonNullable,
|
|
361
361
|
Q as slugify,
|
|
362
362
|
Y as toLangedValue,
|
|
363
|
-
|
|
363
|
+
M as toNodeReference,
|
|
364
364
|
H as toTypedValue
|
|
365
365
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useDebounce as i } from "@vueuse/core";
|
|
2
|
+
import { computed as e, toValue as r } from "vue";
|
|
3
|
+
function c(n, d = 500) {
|
|
4
|
+
const o = e(() => r(n)), u = i(o, d, {});
|
|
5
|
+
return {
|
|
6
|
+
isLoading: e(() => !!o.value || !!u.value)
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as useDebouncedLoading
|
|
11
|
+
};
|
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
import { putResource as y } from "@piveau/sdk-core/hubRepo";
|
|
2
2
|
import { useAsyncState as E } from "@vueuse/core";
|
|
3
3
|
import { computed as I } from "vue";
|
|
4
|
-
import { useStore as
|
|
5
|
-
import { useRuntimeEnv as
|
|
6
|
-
import { slugify as
|
|
7
|
-
import { useEditModeInfo as
|
|
4
|
+
import { useStore as w } from "vuex";
|
|
5
|
+
import { useRuntimeEnv as $ } from "../../composables/useRuntimeEnv.js";
|
|
6
|
+
import { slugify as j, encodeProject as S } from "./project-transformer/encodeProject.js";
|
|
7
|
+
import { useEditModeInfo as U } from "./useDpiEditMode.js";
|
|
8
8
|
import { useFormValues as P } from "./useDpiFormValues.js";
|
|
9
9
|
import { useErrorDialog as T } from "./useErrorDialog.js";
|
|
10
10
|
import { useTwinbyUser as D } from "./useTwinbyUser.js";
|
|
11
11
|
async function M(d) {
|
|
12
|
-
var
|
|
12
|
+
var i, t, u, f;
|
|
13
13
|
const {
|
|
14
|
-
baseUrl:
|
|
14
|
+
baseUrl: s,
|
|
15
15
|
formValues: e,
|
|
16
16
|
isEditMode: m,
|
|
17
17
|
editIdQuery: p,
|
|
18
18
|
authToken: v,
|
|
19
|
-
catalogId:
|
|
20
|
-
} = d,
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
id:
|
|
19
|
+
catalogId: n
|
|
20
|
+
} = d, c = m ? p : j((t = (i = e.value) == null ? void 0 : i["Grundlegende Informationen/Name"]) == null ? void 0 : t.projectName), o = S(e.value, { language: "de" });
|
|
21
|
+
let r = (f = (u = e.value) == null ? void 0 : u["Auffindbarkeit/Sichtbarkeit"]) == null ? void 0 : f.visibility;
|
|
22
|
+
r || (r = "public"), await y({
|
|
23
|
+
id: c,
|
|
24
24
|
// todo
|
|
25
25
|
// publicationStatus: editFromDraft.value ? 'draft' : 'published',
|
|
26
26
|
publicationStatus: "draft",
|
|
27
|
-
baseUrl:
|
|
27
|
+
baseUrl: s || "https://twin.bydata.de/api/hub/repo",
|
|
28
28
|
type: "project",
|
|
29
|
-
data:
|
|
30
|
-
accessLevel:
|
|
31
|
-
catalogId:
|
|
29
|
+
data: o,
|
|
30
|
+
accessLevel: r,
|
|
31
|
+
catalogId: n || "catalog-1",
|
|
32
32
|
authToken: v
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
function L(d) {
|
|
36
36
|
var b, g, h, k;
|
|
37
|
-
const
|
|
37
|
+
const s = w(), e = $(), { openErrorDialog: m } = T(), {
|
|
38
38
|
onSuccess: p = () => {
|
|
39
|
-
|
|
39
|
+
s.dispatch("snackbar/showSnackbar", {
|
|
40
40
|
message: "Projekt erfolgreich gespeichert",
|
|
41
41
|
variant: "success"
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
44
|
onError: v
|
|
45
|
-
} = d || {}, { formValues:
|
|
45
|
+
} = d || {}, { formValues: n } = P(), { organization: c, catalogProject: o } = D({
|
|
46
46
|
keycloak: ((g = (b = e.authentication) == null ? void 0 : b.keycloak) == null ? void 0 : g.url) || "https://keycloak.twin.bydata.de",
|
|
47
47
|
realm: ((k = (h = e.authentication) == null ? void 0 : h.keycloak) == null ? void 0 : k.realm) || "piveau",
|
|
48
48
|
audience: "piveau-hub-repo"
|
|
49
|
-
}),
|
|
50
|
-
var
|
|
51
|
-
return (l = (
|
|
52
|
-
}), { editIdQuery:
|
|
49
|
+
}), r = I(() => {
|
|
50
|
+
var a, l;
|
|
51
|
+
return (l = (a = s.getters) == null ? void 0 : a["auth/getUserData"]) == null ? void 0 : l.authToken;
|
|
52
|
+
}), { editIdQuery: i, isEditMode: t, catalogId: u } = U();
|
|
53
53
|
return {
|
|
54
54
|
submitDraft: E(async () => {
|
|
55
55
|
await M({
|
|
56
|
-
formValues:
|
|
56
|
+
formValues: n,
|
|
57
57
|
isEditMode: t.value,
|
|
58
|
-
editIdQuery:
|
|
59
|
-
authToken:
|
|
58
|
+
editIdQuery: i.value,
|
|
59
|
+
authToken: r.value,
|
|
60
60
|
baseUrl: e.api.hubUrl,
|
|
61
|
-
catalogId: t.value ?
|
|
62
|
-
});
|
|
61
|
+
catalogId: t.value ? u.value : o.value
|
|
62
|
+
}), await new Promise((a) => setTimeout(a, 700));
|
|
63
63
|
}, null, {
|
|
64
64
|
immediate: !1,
|
|
65
65
|
onSuccess: p,
|
|
66
|
-
onError: (
|
|
66
|
+
onError: (a) => {
|
|
67
67
|
const l = new Error(
|
|
68
|
-
`Fehler beim Speichern des Projekts: ${
|
|
68
|
+
`Fehler beim Speichern des Projekts: ${a}
|
|
69
69
|
|
|
70
|
-
${JSON.stringify(
|
|
70
|
+
${JSON.stringify(n.value)}
|
|
71
71
|
|
|
72
|
-
authToken: ${
|
|
72
|
+
authToken: ${r.value}
|
|
73
73
|
|
|
74
|
-
catalogId: ${
|
|
74
|
+
catalogId: ${u.value}
|
|
75
75
|
|
|
76
76
|
isEditMode: ${t.value}
|
|
77
77
|
|
|
78
|
-
editIdQuery: ${
|
|
78
|
+
editIdQuery: ${i.value}
|
|
79
79
|
|
|
80
80
|
baseUrl: ${e.api.hubUrl}
|
|
81
81
|
|
|
82
|
-
catalogProject: ${
|
|
82
|
+
catalogProject: ${o.value}
|
|
83
83
|
|
|
84
|
-
organization: ${
|
|
84
|
+
organization: ${c.value}`
|
|
85
85
|
);
|
|
86
86
|
m(l);
|
|
87
87
|
}
|
|
88
88
|
}),
|
|
89
|
-
organization:
|
|
90
|
-
catalogProject:
|
|
89
|
+
organization: c,
|
|
90
|
+
catalogProject: o
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
export {
|