@piveau/dpi 0.2.0-alpha.17 → 0.2.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import o from "./StepActionsSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3084d41e"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-07a97d66"]]);
5
5
  export {
6
6
  c as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, inject as j, ref as v, watch as F, computed as I, createElementBlock as r, openBlock as o, normalizeClass as $, createElementVNode as m, createBlock as p, createCommentVNode as V, createVNode as s, renderSlot as w, unref as N, normalizeStyle as K, withDirectives as h, vShow as y, Fragment as E, withCtx as g, renderList as R, toDisplayString as O, nextTick as U } from "vue";
1
+ import { defineComponent as W, inject as j, ref as v, watch as F, computed as I, createElementBlock as r, openBlock as o, normalizeClass as $, createElementVNode as m, createBlock as p, createCommentVNode as V, createVNode as s, renderSlot as w, unref as E, normalizeStyle as K, withDirectives as h, vShow as y, Fragment as N, withCtx as g, renderList as R, toDisplayString as O, nextTick as U } from "vue";
2
2
  import { getNode as Z, isNode as q } from "@formkit/core";
3
3
  import { getValidationMessages as G } from "@formkit/validation";
4
4
  import { PhExclamationMark as H } from "@phosphor-icons/vue";
@@ -52,6 +52,7 @@ const _ = { class: "step-actions" }, ee = { class: "step-actions__prev-and-next"
52
52
  const n = Z(e);
53
53
  if (!q(n))
54
54
  return console.error("Current step node is not a FormKitNode", n), !1;
55
+ n.clearErrors(!0);
55
56
  const a = G(n), D = !!((T = (k = t.steps) == null ? void 0 : k[e]) != null && T.valid);
56
57
  return a && a.size > 0 || !D ? (i.value = [...a.entries()].flatMap(([oe, M]) => M.map((A) => String(A.value))), u.value = !0, !1) : (i.value.splice(0, i.value.length), u.value = !1, !0);
57
58
  }
@@ -67,7 +68,7 @@ const _ = { class: "step-actions" }, ee = { class: "step-actions__prev-and-next"
67
68
  class: $([e.classList, "step-actions-container"])
68
69
  }, [
69
70
  m("div", _, [
70
- N(P) ? (o(), r(E, { key: 1 }, [
71
+ E(P) ? (o(), r(N, { key: 1 }, [
71
72
  L.value ? h((o(), p(l, {
72
73
  key: 1,
73
74
  class: "edit-save-button",
@@ -140,7 +141,7 @@ const _ = { class: "step-actions" }, ee = { class: "step-actions__prev-and-next"
140
141
  variant: "error"
141
142
  }, {
142
143
  icon: g(() => [
143
- s(N(H), {
144
+ s(E(H), {
144
145
  size: 32,
145
146
  color: "currentColor"
146
147
  })
@@ -150,7 +151,7 @@ const _ = { class: "step-actions" }, ee = { class: "step-actions__prev-and-next"
150
151
  ])),
151
152
  default: g(() => [
152
153
  e.showDetailedErrorSummary ? (o(), r("ul", te, [
153
- (o(!0), r(E, null, R(i.value, (a) => (o(), r("li", { key: a }, O(a), 1))), 128))
154
+ (o(!0), r(N, null, R(i.value, (a) => (o(), r("li", { key: a }, O(a), 1))), 128))
154
155
  ])) : V("", !0)
155
156
  ]),
156
157
  _: 1
@@ -11,18 +11,18 @@ function H(e, r) {
11
11
  "@type": r
12
12
  };
13
13
  }
14
- function z(e, r) {
15
- const t = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), i = t.endsWith("/") ? t : `${t}/`, a = r.trim().replace(/^\/+/, "");
14
+ function z(e, r, t) {
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
- return new URL(a, i).toString();
17
+ return new URL(a, o).toString();
18
18
  } catch {
19
- return `${i}${a}`;
19
+ return `${o}${a}`;
20
20
  }
21
21
  }
22
22
  function Z(e) {
23
23
  return (e ?? []).map((t) => {
24
- var i, a;
25
- return { name: (i = t.name) == null ? void 0 : i.trim(), url: (a = t.url) == null ? void 0 : a.trim() };
24
+ var i, o;
25
+ return { name: (i = t.name) == null ? void 0 : i.trim(), url: (o = t.url) == null ? void 0 : o.trim() };
26
26
  }).filter((t) => !!t.name && t.name.length > 0).map((t) => ({
27
27
  "foaf:name": t.name,
28
28
  ...t.url && t.url.length > 0 ? { "foaf:homepage": t.url } : {}
@@ -40,7 +40,7 @@ function W(e) {
40
40
  "@id": e
41
41
  };
42
42
  }
43
- function P(e) {
43
+ function U(e) {
44
44
  return e != null;
45
45
  }
46
46
  function ee(e, r = "http://www.w3.org/2001/XMLSchema#string") {
@@ -70,12 +70,12 @@ function ne(e) {
70
70
  function te(e) {
71
71
  return s(
72
72
  n.fromNullable(e),
73
- n.map((r) => r.map((t) => W(t)).filter(P)),
73
+ n.map((r) => r.map((t) => W(t)).filter(U)),
74
74
  n.filter((r) => r.length > 0),
75
75
  n.map((r) => [...r])
76
76
  );
77
77
  }
78
- function C(e, r) {
78
+ function $(e, r) {
79
79
  return s(
80
80
  m(e),
81
81
  n.flatMap((t) => n.fromNullable(r(t)))
@@ -84,10 +84,10 @@ function C(e, r) {
84
84
  function re(e) {
85
85
  return A(e).flatMap((r) => [...r]);
86
86
  }
87
- function $(e, r, t) {
87
+ function C(e, r, t) {
88
88
  return s(
89
89
  n.fromNullable(e),
90
- n.map((i) => i.map(r).filter(P)),
90
+ n.map((i) => i.map(r).filter(U)),
91
91
  n.filter((i) => i.length > 0),
92
92
  n.map((i) => T(i, t)),
93
93
  n.filter((i) => i.length > 0),
@@ -103,13 +103,13 @@ function M(e) {
103
103
  for (const [t, i] of Object.entries(e)) {
104
104
  if (i == null)
105
105
  continue;
106
- const a = M(i);
107
- a != null && (r[t] = a);
106
+ const o = M(i);
107
+ o != null && (r[t] = o);
108
108
  }
109
109
  return r;
110
110
  }
111
111
  function A(e) {
112
- return e.map(n.getOrUndefined).filter(P);
112
+ return e.map(n.getOrUndefined).filter(U);
113
113
  }
114
114
  function f(e) {
115
115
  const r = e ? [...e] : [];
@@ -117,17 +117,17 @@ function f(e) {
117
117
  }
118
118
  function ie(e, r) {
119
119
  const t = e ?? {}, i = [];
120
- let a = 1;
121
- for (const [c, o] of Object.entries(r)) {
120
+ let o = 1;
121
+ for (const [c, a] of Object.entries(r)) {
122
122
  const p = s(
123
123
  n.fromNullable(t[c]),
124
124
  n.map((u) => u.trim()),
125
125
  n.filter((u) => u.length > 0),
126
126
  n.map((u) => ({
127
127
  "@type": "schema:Question",
128
- "schema:text": o,
128
+ "schema:text": a,
129
129
  "schema:acceptedAnswer": u,
130
- "schema:position": { "@value": String(a++), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
130
+ "schema:position": { "@value": String(o++), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
131
131
  })),
132
132
  n.getOrUndefined
133
133
  );
@@ -136,20 +136,20 @@ function ie(e, r) {
136
136
  return i;
137
137
  }
138
138
  function D(e, r, t, i) {
139
- const a = ie(e, t);
140
- return a.length === 0 ? n.none() : n.some({
139
+ const o = ie(e, t);
140
+ return o.length === 0 ? n.none() : n.some({
141
141
  "@type": "schema:QAPage",
142
142
  "dct:identifier": "__TODO__",
143
143
  "dct:type": r,
144
- "schema:question": a,
144
+ "schema:question": o,
145
145
  "p-plan:isPrecededBy": null,
146
146
  "schema:position": { "@value": String(i), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
147
147
  });
148
148
  }
149
149
  function ae(e) {
150
150
  return (e ?? []).map((t) => {
151
- var i, a;
152
- return { name: (i = t.name) == null ? void 0 : i.trim(), description: (a = t.description) == null ? void 0 : a.trim() };
151
+ var i, o;
152
+ return { name: (i = t.name) == null ? void 0 : i.trim(), description: (o = t.description) == null ? void 0 : o.trim() };
153
153
  }).filter((t) => !!t.name && t.name.length > 0 && !!t.description && t.description.length > 0).map((t) => ({
154
154
  "@type": "prov:used",
155
155
  "dct:title": t.name,
@@ -163,14 +163,14 @@ function T(e, r) {
163
163
  "schema:url": i.url,
164
164
  "dct:title": s(
165
165
  n.fromNullable(i.name),
166
- n.map((a) => a.trim()),
167
- n.filter((a) => a.length > 0),
166
+ n.map((o) => o.trim()),
167
+ n.filter((o) => o.length > 0),
168
168
  n.getOrElse(() => r)
169
169
  ),
170
170
  "dct:description": s(
171
171
  n.fromNullable(i.description),
172
- n.map((a) => a.trim()),
173
- n.filter((a) => a.length > 0),
172
+ n.map((o) => o.trim()),
173
+ n.filter((o) => o.length > 0),
174
174
  n.getOrUndefined
175
175
  )
176
176
  }));
@@ -178,64 +178,64 @@ function T(e, r) {
178
178
  function oe(e, r) {
179
179
  return (e ?? []).map((i) => ({
180
180
  "@type": "schema:SoftwareApplication",
181
- "dct:identifier": z(r.baseRepoUrl, i.id),
182
- "schema:featureList": f((i.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0))
181
+ "dct:identifier": z(r.baseRepoUrl, i.id, "resources/software"),
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": z(r.baseRepoUrl, i.id)
188
+ "dct:identifier": z(r.baseRepoUrl, i.id, "datasets")
189
189
  }));
190
190
  }
191
191
  function le(e, r, t) {
192
- return (e ?? []).map((a) => {
192
+ return (e ?? []).map((o) => {
193
193
  var c;
194
194
  return {
195
195
  "@type": "ssn:System",
196
- "dct:identifier": z(t.baseRepoUrl, a.id),
196
+ "dct:identifier": z(t.baseRepoUrl, o.id, "resources/hardware"),
197
197
  "dct:description": s(
198
- n.fromNullable(a.description),
199
- n.map((o) => o.trim()),
200
- n.filter((o) => o.length > 0),
201
- n.flatMap((o) => n.fromNullable(r(o))),
198
+ n.fromNullable(o.description),
199
+ n.map((a) => a.trim()),
200
+ n.filter((a) => a.length > 0),
201
+ n.flatMap((a) => n.fromNullable(r(a))),
202
202
  n.getOrUndefined
203
203
  ),
204
- "ssn:deployedSystem": W(a.id),
205
- "ssn:forProperty": f((a.forProperty ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0)),
206
- "sosa:hasLocation": f((a.locations ?? []).map((o) => ({
204
+ "ssn:deployedSystem": W(o.id),
205
+ "ssn:forProperty": f((o.forProperty ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
206
+ "sosa:hasLocation": f((o.locations ?? []).map((a) => ({
207
207
  "@type": "dct:Location",
208
- "geo:lat": o.lat,
209
- "geo:long": o.lng
208
+ "geo:lat": a.lat,
209
+ "geo:long": a.lng
210
210
  }))),
211
- "foaf:depiction": f((a.depictions ?? []).map((o) => W(o)).filter(P)),
211
+ "foaf:depiction": f((o.depictions ?? []).map((a) => W(a)).filter(U)),
212
212
  // Corresponds to functionalities of hardware;
213
213
  // not to be confused with functionalities of software (schema:featureList)
214
- "ssn-system:hasSystemCapability": f((a.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0)),
215
- "dct:references": f(T((c = a.references) == null ? void 0 : c.map((o) => ({
216
- name: o.name ?? "",
217
- url: o.url ?? "",
218
- description: o.description
219
- })).filter((o) => o.url.length > 0 && ((o == null ? void 0 : o.name) || "").length > 0), "documentation"))
214
+ "ssn-system:hasSystemCapability": f((o.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
215
+ "dct:references": f(T((c = o.references) == null ? void 0 : c.map((a) => ({
216
+ name: a.name ?? "",
217
+ url: a.url ?? "",
218
+ description: a.description
219
+ })).filter((a) => a.url.length > 0 && ((a == null ? void 0 : a.name) || "").length > 0), "documentation"))
220
220
  };
221
221
  });
222
222
  }
223
- function U(e) {
223
+ function P(e) {
224
224
  var w, y, O;
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(
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], N = d == null ? void 0 : d.description, j = s(
226
226
  n.fromNullable(N),
227
227
  n.map((h) => h.trim()),
228
228
  n.filter((h) => h.length > 0),
229
229
  n.getOrUndefined
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),
230
+ ), I = d == null ? void 0 : d.methods, L = 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
+ ...oe(R, c),
232
232
  ...se(v, c),
233
- ...le(S, a, c)
233
+ ...le(S, o, c)
234
234
  ], k = {
235
235
  "@type": "p-plan:Step",
236
236
  "dct:identifier": "__TODO__",
237
237
  "p-plan:Activity": t,
238
- "dct:description": a(j ?? "__EMPTY__"),
238
+ "dct:description": o(j ?? "__EMPTY__"),
239
239
  "p-plan:isPrecededBy": null,
240
240
  "prov:used": f(ae(I)),
241
241
  "dct:references": f(T(L, "documentation")),
@@ -244,10 +244,10 @@ function U(e) {
244
244
  return n.some(k);
245
245
  }
246
246
  function ue(e, r = {}) {
247
- var v, S, b, k, w, y, O, h, R, E, K, B, G, V;
247
+ var v, S, b, k, w, y, O, h, _, E, K, B, G, V;
248
248
  const t = {
249
249
  "@type": ["schema:Project", "https://piveau.eu/ns/voc#CustomResource"]
250
- }, i = (r == null ? void 0 : r.language) ?? "de", a = s(
250
+ }, i = (r == null ? void 0 : r.language) ?? "de", o = s(
251
251
  m((v = e["Grundlegende Informationen/Name"]) == null ? void 0 : v.projectName),
252
252
  n.map((l) => Q(l)),
253
253
  n.filter((l) => l.length > 0),
@@ -256,9 +256,9 @@ function ue(e, r = {}) {
256
256
  n.fromNullable(r == null ? void 0 : r.identifier),
257
257
  n.map((l) => l.trim()),
258
258
  n.filter((l) => l.length > 0),
259
- n.getOrElse(() => a ?? "__TODO__")
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(
259
+ n.getOrElse(() => o ?? "__TODO__")
260
+ ), a = J(i);
261
+ t["dct:title"] = s($((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, a), n.getOrThrow), t["dct:description"] = s($((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, a), 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
262
  ee((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
263
263
  n.map((l) => {
264
264
  var g;
@@ -270,9 +270,9 @@ function ue(e, r = {}) {
270
270
  };
271
271
  }),
272
272
  n.getOrUndefined
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);
273
+ ), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(m((_ = e["Optionale Daten"]) == null ? void 0 : _.startDate), n.getOrUndefined), t["schema:endDate"] = s(m((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
274
274
  const p = [
275
- $(
275
+ C(
276
276
  (K = e["Optionale Daten"]) == null ? void 0 : K.links,
277
277
  (l) => {
278
278
  const g = s(m(l.url), n.getOrUndefined);
@@ -285,7 +285,7 @@ function ue(e, r = {}) {
285
285
  },
286
286
  "documentation"
287
287
  ),
288
- $(
288
+ C(
289
289
  (B = e["Optionale Daten"]) == null ? void 0 : B.references,
290
290
  (l) => {
291
291
  const g = s(m(l.homepage), n.getOrUndefined);
@@ -343,10 +343,10 @@ function ue(e, r = {}) {
343
343
  ]);
344
344
  t["schema:hasPart"] = f(I);
345
345
  const L = A([
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 })
346
+ P({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: a, context: r }),
347
+ P({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: a, context: r }),
348
+ P({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: a, context: r }),
349
+ P({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: a, context: r })
350
350
  ]);
351
351
  return t["p-plan:hasStep"] = f(L), {
352
352
  "@context": {
@@ -357,7 +357,7 @@ function ue(e, r = {}) {
357
357
  }
358
358
  export {
359
359
  ue as encodeProject,
360
- P as isNonNullable,
360
+ U as isNonNullable,
361
361
  Q as slugify,
362
362
  Y as toLangedValue,
363
363
  W as toNodeReference,