@piveau/dpi 0.2.0-alpha.5 → 0.2.0-alpha.6
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/ui/ListBox/Listbox.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/AreYouSureToSkipCard.vue.js +31 -0
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/AreYouSureToSkipCard.vue2.js +4 -0
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue2.js +62 -55
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue2.js +76 -69
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue2.js +83 -94
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js +27 -42
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/ProjektPhasenOverviewStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/components/ProgressSteps.vue.js +1 -1
- 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 +52 -45
- package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +250 -224
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FormKit as
|
|
1
|
+
import { defineComponent as $, ref as v, computed as c, watch as M, toRef as W, createBlock as m, openBlock as o, withCtx as u, createCommentVNode as x, createVNode as s, createElementBlock as S, createElementVNode as y, unref as f, isRef as K, Fragment as D, renderList as B, createTextVNode as I, toDisplayString as L, nextTick as j } from "vue";
|
|
2
|
+
import { FormKit as R } from "@formkit/vue";
|
|
3
|
+
import "@phosphor-icons/vue";
|
|
3
4
|
import { defineHubSearch as q } from "@piveau/sdk-vue";
|
|
4
5
|
import J from "zod";
|
|
5
6
|
import Q from "../../../components/StepActionsSection.vue.js";
|
|
@@ -8,134 +9,118 @@ import Y from "../Card.vue.js";
|
|
|
8
9
|
import Z from "../Chip.vue.js";
|
|
9
10
|
import ee from "../DpiModalBase.vue.js";
|
|
10
11
|
import te from "../SummaryBox.vue.js";
|
|
11
|
-
import ne from "./
|
|
12
|
+
import ne from "./AreYouSureToSkipCard.vue.js";
|
|
13
|
+
import re from "./ProcessStepBase.vue.js";
|
|
12
14
|
/* empty css */
|
|
13
|
-
import
|
|
14
|
-
import { useProcessStepResources as
|
|
15
|
-
const
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "software-step__card-list--empty"
|
|
18
|
-
}, ae = {
|
|
15
|
+
import z from "./SoftwareForm.vue.js";
|
|
16
|
+
import { useProcessStepResources as oe, ensureHasOneResource as ie } from "./utils.js";
|
|
17
|
+
const ae = {
|
|
19
18
|
key: 1,
|
|
19
|
+
class: "software-step__card-list--empty"
|
|
20
|
+
}, le = {
|
|
21
|
+
key: 2,
|
|
20
22
|
class: "software-step__card-list"
|
|
21
|
-
},
|
|
23
|
+
}, ue = { class: "functionalities" }, se = { class: "" }, De = /* @__PURE__ */ $({
|
|
22
24
|
__name: "SoftwareStep",
|
|
23
25
|
props: {
|
|
24
26
|
stepGroup: {},
|
|
25
27
|
edit: { type: Boolean }
|
|
26
28
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
+
setup(T) {
|
|
30
|
+
const b = T, d = v(!1), r = v([]), { useResources: C } = q({
|
|
29
31
|
baseUrl: "https://twin.bydata.de/api/hub/search",
|
|
30
32
|
index: "resource",
|
|
31
33
|
indexDetails: "resources/software",
|
|
32
34
|
schema: J.any()
|
|
33
35
|
}, (e) => {
|
|
34
|
-
var
|
|
35
|
-
const t = String((e == null ? void 0 : e.id) || ""),
|
|
36
|
+
var p, l;
|
|
37
|
+
const t = String((e == null ? void 0 : e.id) || ""), i = String(((p = e == null ? void 0 : e.name) == null ? void 0 : p.de) || ((l = e == null ? void 0 : e.name) == null ? void 0 : l.en) || "");
|
|
36
38
|
return {
|
|
37
39
|
...e,
|
|
38
40
|
id: t,
|
|
39
|
-
name:
|
|
41
|
+
name: i
|
|
40
42
|
};
|
|
41
|
-
}),
|
|
43
|
+
}), _ = C(c(() => r.value.map((e) => ({
|
|
42
44
|
resourceId: e.id
|
|
43
|
-
})))),
|
|
44
|
-
const
|
|
45
|
+
})))), E = c(() => _.value.every((e) => e.isSuccess)), V = c(() => E.value ? _.value.map((e, t) => {
|
|
46
|
+
const i = e.resultEnhanced;
|
|
45
47
|
return {
|
|
46
|
-
id:
|
|
47
|
-
name: (
|
|
48
|
-
functionalities:
|
|
48
|
+
id: i.id,
|
|
49
|
+
name: (i == null ? void 0 : i.name) || "",
|
|
50
|
+
functionalities: r.value[t].functionalities
|
|
49
51
|
};
|
|
50
|
-
}) : []), a =
|
|
52
|
+
}) : []), a = v(""), F = c(() => {
|
|
51
53
|
var e;
|
|
52
|
-
return [...((e =
|
|
53
|
-
}),
|
|
54
|
-
|
|
55
|
-
!e && t &&
|
|
54
|
+
return [...((e = r.value.find((t) => t.id === a.value)) == null ? void 0 : e.functionalities) || []];
|
|
55
|
+
}), w = v(0);
|
|
56
|
+
M(d, (e, t) => {
|
|
57
|
+
!e && t && w.value++;
|
|
56
58
|
});
|
|
57
59
|
function H(e) {
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
function g(e) {
|
|
61
|
-
return i.value.findIndex((t) => t.id === e);
|
|
60
|
+
return r.value.find((t) => t.id === e);
|
|
62
61
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
t !== -1 && i.value.splice(t, 1);
|
|
62
|
+
function k(e) {
|
|
63
|
+
return r.value.findIndex((t) => t.id === e);
|
|
66
64
|
}
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
function N(e) {
|
|
66
|
+
const t = k(e);
|
|
67
|
+
t !== -1 && r.value.splice(t, 1);
|
|
69
68
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
69
|
+
async function U(e) {
|
|
70
|
+
H(e) && (a.value = e, w.value++, await j(), d.value = !0);
|
|
72
71
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
t !== -1 && (i.value.splice(t, 1), i.value.splice(t, 0, e.software), a.value = "", d.value = !1);
|
|
72
|
+
function g(e) {
|
|
73
|
+
r.value.push(e), d.value = !1, a.value = "";
|
|
76
74
|
}
|
|
77
|
-
function A() {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
id: "9121b609-c2e1-4aa8-a602-f26869717c85",
|
|
81
|
-
functionalities: [
|
|
82
|
-
"Interaktive Dashboards"
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: "78302e16-32b1-44ed-896c-b92da0d2029f",
|
|
87
|
-
functionalities: [
|
|
88
|
-
"Entscheidungsunterstuetzungswerkzeuge",
|
|
89
|
-
"Benutzerdefinierte Ebenen",
|
|
90
|
-
"Echtzeit-Integration von Sensordaten"
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
];
|
|
94
|
-
i.value = [...e];
|
|
75
|
+
function A(e) {
|
|
76
|
+
const t = k(e.id);
|
|
77
|
+
t !== -1 && (r.value.splice(t, 1), r.value.splice(t, 0, e.software), a.value = "", d.value = !1);
|
|
95
78
|
}
|
|
96
|
-
const G = c(() =>
|
|
97
|
-
return (e, t) => (
|
|
79
|
+
const G = c(() => r.value.length > 0 ? "Weiter" : "Weiter ohne Software"), O = c(() => r.value.length > 0 ? "primary" : "secondary"), { count: h, realCount: P } = oe(b.stepGroup || "", W(b.edit));
|
|
80
|
+
return (e, t) => (o(), m(re, {
|
|
98
81
|
title: "Geben Sie Informationen zur verwendeten Software an",
|
|
99
82
|
subtitle: "Die Software wird zentral von uns verwaltet. Sie können in diesem Schritt auswählen, welche Software Sie verwendet haben. Sobald Sie eine Software zugeordnet haben, geben Sie bitte an, welche Funktionalitäten der Software Sie für diesen Schritt benötigt haben."
|
|
100
83
|
}, {
|
|
101
|
-
default: u(({ confirm:
|
|
102
|
-
|
|
103
|
-
s(
|
|
104
|
-
modelValue:
|
|
105
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) =>
|
|
106
|
-
type: "
|
|
84
|
+
default: u(({ confirm: i }) => [
|
|
85
|
+
x("", !0),
|
|
86
|
+
s(f(R), {
|
|
87
|
+
modelValue: f(h),
|
|
88
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => K(h) ? h.value = n : null),
|
|
89
|
+
type: "hidden",
|
|
90
|
+
name: "__resourceCount",
|
|
91
|
+
hidden: "",
|
|
107
92
|
"aria-hidden": "",
|
|
108
|
-
"validation-rules": { ensureHasOneResource:
|
|
93
|
+
"validation-rules": { ensureHasOneResource: f(ie) },
|
|
109
94
|
validation: "+ensureHasOneResource",
|
|
110
95
|
"validation-visibility": "live",
|
|
111
96
|
"validation-messages": { ensureHasOneResource: "Sie müssen pro Schritt mindestens eine Software, einen Datensatz oder eine Hardware zuordnen, um fortfahren zu können." }
|
|
112
97
|
}, null, 8, ["modelValue", "validation-rules"]),
|
|
113
|
-
s(
|
|
114
|
-
modelValue:
|
|
115
|
-
"onUpdate:modelValue": t[1] || (t[1] = (n) =>
|
|
98
|
+
s(f(R), {
|
|
99
|
+
modelValue: r.value,
|
|
100
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
|
|
116
101
|
name: "selected",
|
|
117
102
|
type: "list",
|
|
118
103
|
hidden: "",
|
|
119
104
|
"aria-hidden": ""
|
|
120
105
|
}, null, 8, ["modelValue"]),
|
|
121
|
-
|
|
122
|
-
(
|
|
123
|
-
key:
|
|
106
|
+
V.value.length ? (o(), S("section", le, [
|
|
107
|
+
(o(!0), S(D, null, B(V.value, (n, p) => (o(), m(X, {
|
|
108
|
+
key: p,
|
|
124
109
|
class: "software-card",
|
|
125
|
-
onEdit: (l) =>
|
|
126
|
-
onDelete: (l) =>
|
|
110
|
+
onEdit: (l) => U(n.id),
|
|
111
|
+
onDelete: (l) => i({ id: n.id, resourceType: "Software", resource: n.name, callback: N })
|
|
127
112
|
}, {
|
|
128
113
|
"sub-title": u(() => t[5] || (t[5] = [
|
|
129
|
-
|
|
114
|
+
I(" Name ", -1)
|
|
130
115
|
])),
|
|
131
116
|
title: u(() => [
|
|
132
|
-
|
|
117
|
+
I(L(n.name), 1)
|
|
133
118
|
]),
|
|
134
119
|
default: u(() => [
|
|
135
120
|
s(te, { title: "Genutzte Funktionalitäten" }, {
|
|
136
121
|
default: u(() => [
|
|
137
|
-
|
|
138
|
-
(
|
|
122
|
+
y("div", ue, [
|
|
123
|
+
(o(!0), S(D, null, B(n.functionalities, (l) => (o(), m(Z, {
|
|
139
124
|
key: l,
|
|
140
125
|
text: l,
|
|
141
126
|
data: { "@value": "", URI: "" },
|
|
@@ -148,42 +133,46 @@ const re = {
|
|
|
148
133
|
]),
|
|
149
134
|
_: 2
|
|
150
135
|
}, 1032, ["onEdit", "onDelete"]))), 128))
|
|
151
|
-
])) : (
|
|
136
|
+
])) : (o(), S("section", ae, [
|
|
152
137
|
s(Y, {
|
|
153
138
|
small: "",
|
|
154
139
|
class: "empty-card"
|
|
155
140
|
}, {
|
|
156
141
|
default: u(() => t[4] || (t[4] = [
|
|
157
|
-
|
|
142
|
+
y("p", { class: "copy-large-regular empty-card-text" }, " Aktuell haben Sie noch keine Software im Prozessschritt hinterlegt. ", -1)
|
|
158
143
|
])),
|
|
159
144
|
_: 1,
|
|
160
145
|
__: [4]
|
|
161
146
|
})
|
|
162
147
|
])),
|
|
163
|
-
s(
|
|
164
|
-
exclude:
|
|
165
|
-
onSubmit:
|
|
148
|
+
s(z, {
|
|
149
|
+
exclude: r.value.map((n) => n.id),
|
|
150
|
+
onSubmit: g
|
|
166
151
|
}, null, 8, ["exclude"]),
|
|
167
|
-
|
|
152
|
+
y("section", se, [
|
|
168
153
|
s(Q, {
|
|
169
154
|
"next-text": G.value,
|
|
170
155
|
"next-variant": O.value
|
|
171
|
-
}, null, 8, ["next-text", "next-variant"])
|
|
156
|
+
}, null, 8, ["next-text", "next-variant"]),
|
|
157
|
+
f(P) === 0 ? (o(), m(ne, {
|
|
158
|
+
key: 0,
|
|
159
|
+
"resource-label": "Software"
|
|
160
|
+
})) : x("", !0)
|
|
172
161
|
]),
|
|
173
162
|
s(ee, {
|
|
174
163
|
modelValue: d.value,
|
|
175
164
|
"onUpdate:modelValue": t[3] || (t[3] = (n) => d.value = n)
|
|
176
165
|
}, {
|
|
177
166
|
default: u(() => [
|
|
178
|
-
a.value ? (
|
|
179
|
-
key:
|
|
167
|
+
a.value ? (o(), m(z, {
|
|
168
|
+
key: w.value,
|
|
180
169
|
modelValue: a.value,
|
|
181
170
|
"onUpdate:modelValue": t[2] || (t[2] = (n) => a.value = n),
|
|
182
|
-
functionalities:
|
|
183
|
-
exclude:
|
|
184
|
-
onSubmit:
|
|
185
|
-
onPatch:
|
|
186
|
-
}, null, 8, ["modelValue", "functionalities", "exclude"])) :
|
|
171
|
+
functionalities: F.value,
|
|
172
|
+
exclude: r.value.map((n) => n.id),
|
|
173
|
+
onSubmit: g,
|
|
174
|
+
onPatch: A
|
|
175
|
+
}, null, 8, ["modelValue", "functionalities", "exclude"])) : x("", !0)
|
|
187
176
|
]),
|
|
188
177
|
_: 1
|
|
189
178
|
}, 8, ["modelValue"])
|
|
@@ -193,5 +182,5 @@ const re = {
|
|
|
193
182
|
}
|
|
194
183
|
});
|
|
195
184
|
export {
|
|
196
|
-
|
|
185
|
+
De as default
|
|
197
186
|
};
|
package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js
CHANGED
|
@@ -1,49 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function
|
|
1
|
+
import { useFormKitNodeById as u } from "@formkit/vue";
|
|
2
|
+
import { computed as o, toValue as m } from "vue";
|
|
3
|
+
const y = 999;
|
|
4
|
+
function h(e) {
|
|
5
5
|
if (e != null && !(Array.isArray(e) && e.length === 0) && !(typeof e == "object" && Object.keys(e).length === 0) && !(typeof e == "string" && e.trim() === ""))
|
|
6
6
|
return e;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
var t, r
|
|
11
|
-
return ((
|
|
12
|
-
}),
|
|
13
|
-
var t, r, o;
|
|
14
|
-
return ((o = (r = (t = u.value) == null ? void 0 : t._value) == null ? void 0 : r.selected) == null ? void 0 : o.length) ?? 0;
|
|
15
|
-
}), h = a(() => {
|
|
16
|
-
var t, r, o;
|
|
17
|
-
return ((o = (r = (t = f.value) == null ? void 0 : t._value) == null ? void 0 : r.selected) == null ? void 0 : o.length) ?? 0;
|
|
18
|
-
});
|
|
19
|
-
return {
|
|
20
|
-
model: a({
|
|
21
|
-
get() {
|
|
22
|
-
const t = p(c);
|
|
23
|
-
return {
|
|
24
|
-
Software: t ? i.value : 999,
|
|
25
|
-
Datensätze: t ? d.value : 999,
|
|
26
|
-
Hardware: t ? h.value : 999
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
set() {
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function O(e) {
|
|
35
|
-
const c = ["Software", "Datensätze", "Hardware"], n = e.at("$parent"), u = n == null ? void 0 : n.name, [f, i] = (u == null ? void 0 : u.split("/")) || [];
|
|
36
|
-
if (c.filter((s) => s !== i).every((s) => {
|
|
8
|
+
function w(e, i) {
|
|
9
|
+
const l = u(`${e}/Software`), d = u(`${e}/Datensätze`), f = u(`${e}/Hardware`), n = (t) => Array.isArray(t) ? t.length : 0, s = o(() => {
|
|
10
|
+
var t, r;
|
|
11
|
+
return n((r = (t = l.value) == null ? void 0 : t._value) == null ? void 0 : r.selected);
|
|
12
|
+
}), c = o(() => {
|
|
37
13
|
var t, r;
|
|
38
|
-
return (
|
|
39
|
-
})) {
|
|
40
|
-
|
|
41
|
-
return
|
|
42
|
-
}
|
|
43
|
-
|
|
14
|
+
return n((r = (t = d.value) == null ? void 0 : t._value) == null ? void 0 : r.selected);
|
|
15
|
+
}), a = o(() => {
|
|
16
|
+
var t, r;
|
|
17
|
+
return n((r = (t = f.value) == null ? void 0 : t._value) == null ? void 0 : r.selected);
|
|
18
|
+
}), v = o({
|
|
19
|
+
get() {
|
|
20
|
+
return !m(i) ? String(y) : String(s.value + c.value + a.value);
|
|
21
|
+
},
|
|
22
|
+
set() {
|
|
23
|
+
}
|
|
24
|
+
}), S = o(() => s.value + c.value + a.value);
|
|
25
|
+
return { count: v, softwareSelected: s, datasetsSelected: c, hardwareSelected: a, realCount: S };
|
|
26
|
+
}
|
|
27
|
+
function A(e) {
|
|
28
|
+
return Number((e == null ? void 0 : e._value) ?? 0) > 0;
|
|
44
29
|
}
|
|
45
30
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
A as ensureHasOneResource,
|
|
32
|
+
h as looseRenderable,
|
|
33
|
+
w as useProcessStepResources
|
|
49
34
|
};
|
|
@@ -42,7 +42,7 @@ const v = { class: "project-phasen-overview" }, m = { class: "project-phasen-ove
|
|
|
42
42
|
])
|
|
43
43
|
]));
|
|
44
44
|
}
|
|
45
|
-
}, w = /* @__PURE__ */ h(j, [["__scopeId", "data-v-
|
|
45
|
+
}, w = /* @__PURE__ */ h(j, [["__scopeId", "data-v-71eb4095"]]);
|
|
46
46
|
export {
|
|
47
47
|
w as default
|
|
48
48
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ProgressSteps.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-599e3d1c"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -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
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-74ea6547"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getNode as
|
|
3
|
-
import { getValidationMessages as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { defineComponent as P, inject as B, ref as p, watch as z, toRef as E, computed as F, createElementBlock as c, openBlock as r, createElementVNode as d, createBlock as M, createCommentVNode as _, renderSlot as g, createVNode as i, normalizeStyle as I, withDirectives as x, vShow as y, withCtx as f, Fragment as A, renderList as D, toDisplayString as L, createTextVNode as R, unref as $, nextTick as K } from "vue";
|
|
2
|
+
import { getNode as W, isNode as j } from "@formkit/core";
|
|
3
|
+
import { getValidationMessages as J } from "@formkit/validation";
|
|
4
|
+
import { PhExclamationMark as O } from "@phosphor-icons/vue";
|
|
5
|
+
import { useFormValues as Z } from "../composables/useDpiFormValues.js";
|
|
6
|
+
import v from "../HappyFlowComponents/ui/ButtonV3.vue.js";
|
|
7
|
+
import q from "../HappyFlowComponents/ui/Card.vue.js";
|
|
8
|
+
import { dpiStepperKey as G } from "../utils/injectionKeys.js";
|
|
9
|
+
const H = { class: "step-actions-container" }, Q = { class: "step-actions" }, U = { class: "step-actions__prev-and-next" }, X = { class: "validation-errors" }, le = /* @__PURE__ */ P({
|
|
9
10
|
__name: "StepActionsSection",
|
|
10
11
|
props: {
|
|
11
12
|
hideCancel: { type: Boolean, default: !1 },
|
|
@@ -17,93 +18,93 @@ const q = { class: "step-actions-container" }, G = { class: "step-actions" }, H
|
|
|
17
18
|
nextText: { default: "Weiter" },
|
|
18
19
|
nextVariant: { default: "primary" }
|
|
19
20
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const { formValues: C } =
|
|
21
|
+
setup(Y) {
|
|
22
|
+
const { formValues: C } = Z(), e = B(G);
|
|
22
23
|
e || console.warn("dpiStepper is not provided. Please use StepActionsSection inside InputPage");
|
|
23
24
|
function S(t) {
|
|
24
25
|
return t !== void 0;
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
+
const s = p(!1), a = p([]);
|
|
27
28
|
function V(t) {
|
|
28
29
|
if (!t)
|
|
29
30
|
return;
|
|
30
|
-
const n =
|
|
31
|
+
const n = J(t);
|
|
31
32
|
!n || n.size === 0 || (a.value = [...n.entries()].flatMap(([o, k]) => k.map((w) => String(w.value))));
|
|
32
33
|
}
|
|
33
34
|
e && z(e.activeStep, () => {
|
|
34
|
-
a.value.splice(0, a.value.length),
|
|
35
|
+
a.value.splice(0, a.value.length), s.value = !1;
|
|
35
36
|
});
|
|
36
37
|
const N = E(e == null ? void 0 : e.steps);
|
|
37
|
-
function
|
|
38
|
+
function m(t) {
|
|
38
39
|
var o;
|
|
39
40
|
const n = (o = N.value) == null ? void 0 : o[t];
|
|
40
41
|
return n ? n.valid : !1;
|
|
41
42
|
}
|
|
42
43
|
function T() {
|
|
43
|
-
|
|
44
|
+
m((e == null ? void 0 : e.activeStep.value) || "") && (e == null || e.goToNextStep());
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function h() {
|
|
46
47
|
window.alert("WIP");
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
+
function l() {
|
|
49
50
|
e == null || e.goToPreviousStep();
|
|
50
51
|
}
|
|
51
|
-
const b = F(() => e != null && e.activeStep.value ?
|
|
52
|
-
async function
|
|
52
|
+
const b = F(() => e != null && e.activeStep.value ? W(e == null ? void 0 : e.activeStep.value) : null);
|
|
53
|
+
async function u() {
|
|
53
54
|
if (!S(e))
|
|
54
55
|
return;
|
|
55
|
-
e.triggerValidationCurrentStep(), await
|
|
56
|
+
e.triggerValidationCurrentStep(), await K();
|
|
56
57
|
const t = b.value;
|
|
57
|
-
if (t ? !
|
|
58
|
-
if (!
|
|
58
|
+
if (t ? !m((e == null ? void 0 : e.activeStep.value) || "") : !1) {
|
|
59
|
+
if (!j(t)) {
|
|
59
60
|
console.error("Current step node is not a FormKitNode", t);
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
V(t),
|
|
63
|
+
V(t), s.value = !0;
|
|
63
64
|
}
|
|
64
65
|
e != null && e.isLast.value ? window.alert(`Form submitted: ${JSON.stringify(C.value, null, 2)}`) : T();
|
|
65
66
|
}
|
|
66
|
-
return (t, n) => (
|
|
67
|
-
|
|
67
|
+
return (t, n) => (r(), c("div", H, [
|
|
68
|
+
d("div", Q, [
|
|
68
69
|
g(t.$slots, "default", {
|
|
69
|
-
handleCancel:
|
|
70
|
-
handlePrevious:
|
|
71
|
-
handleSubmit:
|
|
70
|
+
handleCancel: h,
|
|
71
|
+
handlePrevious: l,
|
|
72
|
+
handleSubmit: u
|
|
72
73
|
}, () => [
|
|
73
|
-
|
|
74
|
-
style:
|
|
74
|
+
i(v, {
|
|
75
|
+
style: I({ opacity: t.hideCancel ? 0 : 1 }),
|
|
75
76
|
variant: "tertiary",
|
|
76
77
|
size: "large",
|
|
77
78
|
type: "button",
|
|
78
79
|
"button-text": t.cancelText,
|
|
79
|
-
onClick:
|
|
80
|
+
onClick: h
|
|
80
81
|
}, null, 8, ["style", "button-text"]),
|
|
81
|
-
|
|
82
|
+
d("div", U, [
|
|
82
83
|
g(t.$slots, "prev-and-next", {
|
|
83
84
|
hidePrevious: t.hidePrevious,
|
|
84
85
|
hideNext: t.hideNext,
|
|
85
86
|
previousText: t.previousText,
|
|
86
87
|
nextText: t.nextText,
|
|
87
|
-
handlePrevious:
|
|
88
|
-
handleSubmit:
|
|
88
|
+
handlePrevious: l,
|
|
89
|
+
handleSubmit: u
|
|
89
90
|
}, () => [
|
|
90
|
-
|
|
91
|
+
x(i(v, {
|
|
91
92
|
variant: "secondary",
|
|
92
93
|
size: "large",
|
|
93
94
|
type: "button",
|
|
94
95
|
"button-text": t.previousText,
|
|
95
96
|
"icon-start": "CaretLeft",
|
|
96
|
-
onClick:
|
|
97
|
+
onClick: l
|
|
97
98
|
}, null, 8, ["button-text"]), [
|
|
98
99
|
[y, !t.hidePrevious]
|
|
99
100
|
]),
|
|
100
|
-
|
|
101
|
+
x(i(v, {
|
|
101
102
|
size: "large",
|
|
102
103
|
variant: t.nextVariant,
|
|
103
104
|
type: "button",
|
|
104
105
|
"button-text": t.nextText,
|
|
105
106
|
"icon-end": "CaretRight",
|
|
106
|
-
onClick:
|
|
107
|
+
onClick: u
|
|
107
108
|
}, null, 8, ["variant", "button-text"]), [
|
|
108
109
|
[y, !t.hideNext]
|
|
109
110
|
])
|
|
@@ -111,23 +112,29 @@ const q = { class: "step-actions-container" }, G = { class: "step-actions" }, H
|
|
|
111
112
|
])
|
|
112
113
|
], !0)
|
|
113
114
|
]),
|
|
114
|
-
|
|
115
|
+
s.value && a.value.length ? (r(), M(q, {
|
|
115
116
|
key: 0,
|
|
116
117
|
variant: "error"
|
|
117
118
|
}, {
|
|
118
|
-
|
|
119
|
+
icon: f(() => [
|
|
120
|
+
i($(O), {
|
|
121
|
+
size: 32,
|
|
122
|
+
color: "currentColor"
|
|
123
|
+
})
|
|
124
|
+
]),
|
|
125
|
+
title: f(() => n[0] || (n[0] = [
|
|
119
126
|
R(" Bitte korrigieren Sie die folgenden Fehler ", -1)
|
|
120
127
|
])),
|
|
121
|
-
default:
|
|
122
|
-
|
|
123
|
-
(
|
|
128
|
+
default: f(() => [
|
|
129
|
+
d("ul", X, [
|
|
130
|
+
(r(!0), c(A, null, D(a.value, (o) => (r(), c("li", { key: o }, L(o), 1))), 128))
|
|
124
131
|
])
|
|
125
132
|
]),
|
|
126
133
|
_: 1
|
|
127
|
-
})) :
|
|
134
|
+
})) : _("", !0)
|
|
128
135
|
]));
|
|
129
136
|
}
|
|
130
137
|
});
|
|
131
138
|
export {
|
|
132
|
-
|
|
139
|
+
le as default
|
|
133
140
|
};
|