@piveau/dpi 0.2.0-alpha.1 → 0.2.0-alpha.3
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/assets/stadt.png +0 -0
- package/dist/data-provider-interface/HappyFlowComponents/AboutProject.vue.js +99 -0
- package/dist/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +35 -11
- package/dist/data-provider-interface/HappyFlowComponents/img/DataProcessingSteps.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue.js +18 -18
- package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectDescriptionStep.vue.js +10 -11
- package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +89 -67
- package/dist/data-provider-interface/HappyFlowComponents/ui/Card.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/Card.vue2.js +34 -20
- package/dist/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue2.js +62 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +60 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +45 -28
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +5 -3
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +45 -37
- package/dist/data-provider-interface/HappyFlowComponents/ui/LandingProjectStep/LandingProjectStep.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/LandingProjectStep/LandingProjectStep.vue2.js +39 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxDefinition.js +2 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxFormKit.vue.js +20 -16
- package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +41 -37
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +341 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/WipStep.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/WipStep.vue2.js +21 -15
- package/dist/data-provider-interface/components/ProgressSteps.vue.js +1 -1
- package/dist/data-provider-interface/components/ProgressSteps.vue2.js +45 -44
- package/dist/data-provider-interface/components/StepActionsSection.vue.js +2 -2
- package/dist/data-provider-interface/components/StepActionsSection.vue2.js +119 -42
- package/dist/data-provider-interface/composables/useDpiStepper.js +7 -7
- package/dist/data-provider-interface/views/InputPageProject.vue.js +328 -315
- package/dist/stories/components/LinkCard.vue.js +7 -0
- package/dist/stories/components/LinkCard.vue2.js +52 -0
- package/dist/stories/components/PartnerCard.vue.js +1 -1
- package/dist/stories/components/PartnerCard.vue2.js +18 -18
- package/dist/stories/components/ScreenshotCard.vue.js +7 -0
- package/dist/stories/components/ScreenshotCard.vue2.js +26 -0
- package/package.json +1 -1
|
@@ -1,54 +1,131 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getNode as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as B, inject as P, ref as h, watch as _, toRef as z, computed as E, createElementBlock as u, openBlock as i, createElementVNode as c, createBlock as F, createCommentVNode as I, renderSlot as g, createVNode as d, normalizeStyle as M, withDirectives as p, vShow as y, withCtx as x, Fragment as A, renderList as D, toDisplayString as L, createTextVNode as R, nextTick as $ } from "vue";
|
|
2
|
+
import { getNode as K, isNode as W } from "@formkit/core";
|
|
3
|
+
import { getValidationMessages as j } from "@formkit/validation";
|
|
4
|
+
import { useFormValues as J } from "../composables/useDpiFormValues.js";
|
|
5
|
+
import f from "../HappyFlowComponents/ui/ButtonV3.vue.js";
|
|
6
|
+
import O from "../HappyFlowComponents/ui/Card.vue.js";
|
|
7
|
+
import { dpiStepperKey as Z } from "../utils/injectionKeys.js";
|
|
8
|
+
const q = { class: "step-actions-container" }, G = { class: "step-actions" }, H = { class: "step-actions__prev-and-next" }, Q = { class: "validation-errors" }, ie = /* @__PURE__ */ B({
|
|
7
9
|
__name: "StepActionsSection",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
props: {
|
|
11
|
+
hideCancel: { type: Boolean, default: !1 },
|
|
12
|
+
hidePrevious: { type: Boolean, default: !1 },
|
|
13
|
+
hideNext: { type: Boolean, default: !1 },
|
|
14
|
+
hideValidationSummary: { type: Boolean, default: !1 },
|
|
15
|
+
cancelText: { default: "Abbrechen" },
|
|
16
|
+
previousText: { default: "Zurück" },
|
|
17
|
+
nextText: { default: "Weiter" }
|
|
18
|
+
},
|
|
19
|
+
setup(U) {
|
|
20
|
+
const { formValues: C } = J(), e = P(Z);
|
|
21
|
+
e || console.warn("dpiStepper is not provided. Please use StepActionsSection inside InputPage");
|
|
22
|
+
function S(t) {
|
|
23
|
+
return t !== void 0;
|
|
13
24
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
const r = h(!1), a = h([]);
|
|
26
|
+
function N(t) {
|
|
27
|
+
if (!t)
|
|
28
|
+
return;
|
|
29
|
+
const o = j(t);
|
|
30
|
+
!o || o.size === 0 || (a.value = [...o.entries()].flatMap(([n, k]) => k.map((w) => String(w.value))));
|
|
31
|
+
}
|
|
32
|
+
e && _(e.activeStep, () => {
|
|
33
|
+
a.value.splice(0, a.value.length), r.value = !1;
|
|
34
|
+
});
|
|
35
|
+
const T = z(e == null ? void 0 : e.steps);
|
|
36
|
+
function v(t) {
|
|
37
|
+
var n;
|
|
38
|
+
const o = (n = T.value) == null ? void 0 : n[t];
|
|
39
|
+
return o ? o.valid : !1;
|
|
40
|
+
}
|
|
41
|
+
function V() {
|
|
42
|
+
v((e == null ? void 0 : e.activeStep.value) || "") && (e == null || e.goToNextStep());
|
|
19
43
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
44
|
+
function m() {
|
|
45
|
+
window.alert("WIP");
|
|
22
46
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
47
|
+
function s() {
|
|
48
|
+
e == null || e.goToPreviousStep();
|
|
25
49
|
}
|
|
26
|
-
const
|
|
27
|
-
async function
|
|
28
|
-
if (!
|
|
50
|
+
const b = E(() => e != null && e.activeStep.value ? K(e == null ? void 0 : e.activeStep.value) : null);
|
|
51
|
+
async function l() {
|
|
52
|
+
if (!S(e))
|
|
29
53
|
return;
|
|
30
|
-
|
|
54
|
+
e.triggerValidationCurrentStep(), await $();
|
|
55
|
+
const t = b.value;
|
|
56
|
+
if (t ? !v((e == null ? void 0 : e.activeStep.value) || "") : !1) {
|
|
57
|
+
if (!W(t)) {
|
|
58
|
+
console.error("Current step node is not a FormKitNode", t);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
N(t), r.value = !0;
|
|
62
|
+
}
|
|
63
|
+
e != null && e.isLast.value ? window.alert(`Form submitted: ${JSON.stringify(C.value, null, 2)}`) : V();
|
|
31
64
|
}
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
65
|
+
return (t, o) => (i(), u("div", q, [
|
|
66
|
+
c("div", G, [
|
|
67
|
+
g(t.$slots, "default", {
|
|
68
|
+
handleCancel: m,
|
|
69
|
+
handlePrevious: s,
|
|
70
|
+
handleSubmit: l
|
|
71
|
+
}, () => [
|
|
72
|
+
d(f, {
|
|
73
|
+
style: M({ opacity: t.hideCancel ? 0 : 1 }),
|
|
74
|
+
variant: "tertiary",
|
|
75
|
+
size: "large",
|
|
76
|
+
type: "button",
|
|
77
|
+
"button-text": t.cancelText,
|
|
78
|
+
onClick: m
|
|
79
|
+
}, null, 8, ["style", "button-text"]),
|
|
80
|
+
c("div", H, [
|
|
81
|
+
g(t.$slots, "prev-and-next", {
|
|
82
|
+
hidePrevious: t.hidePrevious,
|
|
83
|
+
hideNext: t.hideNext,
|
|
84
|
+
previousText: t.previousText,
|
|
85
|
+
nextText: t.nextText,
|
|
86
|
+
handlePrevious: s,
|
|
87
|
+
handleSubmit: l
|
|
88
|
+
}, () => [
|
|
89
|
+
p(d(f, {
|
|
90
|
+
variant: "secondary",
|
|
91
|
+
size: "large",
|
|
92
|
+
type: "button",
|
|
93
|
+
"button-text": t.previousText,
|
|
94
|
+
"icon-start": "CaretLeft",
|
|
95
|
+
onClick: s
|
|
96
|
+
}, null, 8, ["button-text"]), [
|
|
97
|
+
[y, !t.hidePrevious]
|
|
98
|
+
]),
|
|
99
|
+
p(d(f, {
|
|
100
|
+
size: "large",
|
|
101
|
+
type: "button",
|
|
102
|
+
"button-text": t.nextText,
|
|
103
|
+
"icon-end": "CaretRight",
|
|
104
|
+
onClick: l
|
|
105
|
+
}, null, 8, ["button-text"]), [
|
|
106
|
+
[y, !t.hideNext]
|
|
107
|
+
])
|
|
108
|
+
], !0)
|
|
109
|
+
])
|
|
110
|
+
], !0)
|
|
111
|
+
]),
|
|
112
|
+
r.value && a.value.length ? (i(), F(O, {
|
|
113
|
+
key: 0,
|
|
114
|
+
variant: "error"
|
|
115
|
+
}, {
|
|
116
|
+
title: x(() => o[0] || (o[0] = [
|
|
117
|
+
R(" Bitte korrigieren Sie die folgenden Fehler ", -1)
|
|
118
|
+
])),
|
|
119
|
+
default: x(() => [
|
|
120
|
+
c("ul", Q, [
|
|
121
|
+
(i(!0), u(A, null, D(a.value, (n) => (i(), u("li", { key: n }, L(n), 1))), 128))
|
|
122
|
+
])
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
})) : I("", !0)
|
|
49
126
|
]));
|
|
50
127
|
}
|
|
51
128
|
});
|
|
52
129
|
export {
|
|
53
|
-
|
|
130
|
+
ie as default
|
|
54
131
|
};
|
|
@@ -2,8 +2,8 @@ import { useStepper as G } from "@vueuse/core";
|
|
|
2
2
|
import { ref as H, computed as i, provide as J } from "vue";
|
|
3
3
|
import { dpiStepperKey as M } from "../utils/injectionKeys.js";
|
|
4
4
|
import O from "../utils/useSteps.js";
|
|
5
|
-
function
|
|
6
|
-
const { steps: p, activeStep: o, stepPlugin: y, visitedSteps: B, subSteps: h, triggerValidation:
|
|
5
|
+
function Y(Q) {
|
|
6
|
+
const { steps: p, activeStep: o, stepPlugin: y, visitedSteps: B, subSteps: h, triggerValidation: n, triggerValidationCurrentStep: u } = O(), s = H([]), e = G(s, o.value), r = () => {
|
|
7
7
|
e.current.value && e.current.value !== o.value && (o.value = e.current.value);
|
|
8
8
|
}, c = (t) => {
|
|
9
9
|
s.value.includes(t) || (s.value.push(t), s.value.length === 1 && !o.value && (o.value = t, e.goTo(t)));
|
|
@@ -50,8 +50,8 @@ function X() {
|
|
|
50
50
|
isCurrent: x,
|
|
51
51
|
isBefore: d,
|
|
52
52
|
isAfter: m,
|
|
53
|
-
triggerValidation:
|
|
54
|
-
triggerValidationCurrentStep:
|
|
53
|
+
triggerValidation: n,
|
|
54
|
+
triggerValidationCurrentStep: u,
|
|
55
55
|
isLast: g
|
|
56
56
|
}), {
|
|
57
57
|
// Original API for backward compatibility (form validation steps)
|
|
@@ -69,8 +69,8 @@ function X() {
|
|
|
69
69
|
goToPreviousStep: a,
|
|
70
70
|
goToStep: A,
|
|
71
71
|
goToStepByIndex: C,
|
|
72
|
-
triggerValidation:
|
|
73
|
-
triggerValidationCurrentStep:
|
|
72
|
+
triggerValidation: n,
|
|
73
|
+
triggerValidationCurrentStep: u,
|
|
74
74
|
// Extended useStepper utilities
|
|
75
75
|
stepperSteps: V,
|
|
76
76
|
stepNames: b,
|
|
@@ -94,5 +94,5 @@ function X() {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
Y as useDpiStepper
|
|
98
98
|
};
|