@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.
Files changed (43) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/assets/stadt.png +0 -0
  3. package/dist/data-provider-interface/HappyFlowComponents/AboutProject.vue.js +99 -0
  4. package/dist/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +35 -11
  5. package/dist/data-provider-interface/HappyFlowComponents/img/DataProcessingSteps.svg.js +4 -0
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +2 -2
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +1 -1
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue.js +18 -18
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectDescriptionStep.vue.js +10 -11
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +89 -67
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/Card.vue.js +2 -2
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/Card.vue2.js +34 -20
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue.js +7 -0
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue2.js +62 -0
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +7 -0
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +60 -0
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +45 -28
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +5 -3
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +45 -37
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/LandingProjectStep/LandingProjectStep.vue.js +7 -0
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/LandingProjectStep/LandingProjectStep.vue2.js +39 -0
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxDefinition.js +2 -1
  24. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxFormKit.vue.js +20 -16
  25. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +2 -2
  26. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +41 -37
  27. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +7 -0
  28. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +341 -0
  29. package/dist/data-provider-interface/HappyFlowComponents/ui/WipStep.vue.js +2 -2
  30. package/dist/data-provider-interface/HappyFlowComponents/ui/WipStep.vue2.js +21 -15
  31. package/dist/data-provider-interface/components/ProgressSteps.vue.js +1 -1
  32. package/dist/data-provider-interface/components/ProgressSteps.vue2.js +45 -44
  33. package/dist/data-provider-interface/components/StepActionsSection.vue.js +2 -2
  34. package/dist/data-provider-interface/components/StepActionsSection.vue2.js +119 -42
  35. package/dist/data-provider-interface/composables/useDpiStepper.js +7 -7
  36. package/dist/data-provider-interface/views/InputPageProject.vue.js +328 -315
  37. package/dist/stories/components/LinkCard.vue.js +7 -0
  38. package/dist/stories/components/LinkCard.vue2.js +52 -0
  39. package/dist/stories/components/PartnerCard.vue.js +1 -1
  40. package/dist/stories/components/PartnerCard.vue2.js +18 -18
  41. package/dist/stories/components/ScreenshotCard.vue.js +7 -0
  42. package/dist/stories/components/ScreenshotCard.vue2.js +26 -0
  43. package/package.json +1 -1
@@ -1,54 +1,131 @@
1
- import { defineComponent as d, inject as g, toRef as b, computed as V, createElementBlock as _, openBlock as y, createVNode as o, nextTick as h } from "vue";
2
- import { getNode as x } from "@formkit/core";
3
- import { useFormValues as C } from "../composables/useDpiFormValues.js";
4
- import r from "../HappyFlowComponents/ui/ButtonV3.vue.js";
5
- import { dpiStepperKey as N } from "../utils/injectionKeys.js";
6
- const S = { class: "step-actions" }, E = /* @__PURE__ */ d({
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
- setup(k) {
9
- const { formValues: s } = C(), t = g(N);
10
- t || console.warn("dpiStepper is not provided. Please use StepActionsSection inside InputPage");
11
- function u(e) {
12
- return e !== void 0;
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 c = b(t == null ? void 0 : t.steps);
15
- function a(e) {
16
- var i;
17
- const n = (i = c.value) == null ? void 0 : i[e];
18
- return n ? n.valid : !1;
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 l() {
21
- a((t == null ? void 0 : t.activeStep.value) || "") && (t == null || t.goToNextStep());
44
+ function m() {
45
+ window.alert("WIP");
22
46
  }
23
- function f() {
24
- t == null || t.goToPreviousStep();
47
+ function s() {
48
+ e == null || e.goToPreviousStep();
25
49
  }
26
- const m = V(() => t != null && t.activeStep.value ? x(t == null ? void 0 : t.activeStep.value) : null);
27
- async function v() {
28
- if (!u(t))
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
- t.triggerValidationCurrentStep(), await h(), (m.value ? !a((t == null ? void 0 : t.activeStep.value) || "") : !1) && (t == null || t.triggerValidationCurrentStep()), t != null && t.isLast.value ? window.alert(`Form submitted: ${JSON.stringify(s.value, null, 2)}`) : l();
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 (e, n) => (y(), _("div", S, [
33
- o(r, {
34
- variant: "tertiary",
35
- type: "button",
36
- "button-text": "Abbrechen"
37
- }),
38
- o(r, {
39
- variant: "secondary",
40
- type: "button",
41
- "button-text": "Zurück",
42
- onClick: f
43
- }),
44
- o(r, {
45
- type: "button",
46
- "button-text": "Weiter",
47
- onClick: v
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
- E as default
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 X() {
6
- const { steps: p, activeStep: o, stepPlugin: y, visitedSteps: B, subSteps: h, triggerValidation: u, triggerValidationCurrentStep: n } = O(), s = H([]), e = G(s, o.value), r = () => {
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: u,
54
- triggerValidationCurrentStep: n,
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: u,
73
- triggerValidationCurrentStep: n,
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
- X as useDpiStepper
97
+ Y as useDpiStepper
98
98
  };