@piveau/dpi 0.2.0-alpha.2 → 0.2.0-alpha.4

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 (51) 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 +38 -11
  5. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +17 -17
  6. package/dist/data-provider-interface/HappyFlowComponents/ProjectTable.vue.js +94 -0
  7. package/dist/data-provider-interface/HappyFlowComponents/img/DataProcessingSteps.svg.js +4 -0
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +2 -2
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +1 -1
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue.js +18 -18
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +89 -67
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectStatusStep.vue.js +38 -0
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/Card.vue.js +2 -2
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/Card.vue2.js +34 -20
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue.js +7 -0
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue2.js +62 -0
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +7 -0
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +60 -0
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +45 -28
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +5 -3
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +45 -37
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/LandingProjectStep/LandingProjectStep.vue.js +7 -0
  24. package/dist/data-provider-interface/HappyFlowComponents/ui/LandingProjectStep/LandingProjectStep.vue2.js +40 -0
  25. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxDefinition.js +2 -1
  26. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxFormKit.vue.js +20 -16
  27. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +2 -2
  28. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +41 -37
  29. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +7 -0
  30. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +341 -0
  31. package/dist/data-provider-interface/HappyFlowComponents/ui/Projektphasen/PlanenStep.vue.js +64 -0
  32. package/dist/data-provider-interface/HappyFlowComponents/ui/Projektphasen/ProjektPhasenOverviewStep.vue.js +48 -0
  33. package/dist/data-provider-interface/HappyFlowComponents/ui/Projektphasen/UmstezenStep.vue.js +64 -0
  34. package/dist/data-provider-interface/HappyFlowComponents/ui/Projektphasen/WeiterdenkenStep.vue.js +64 -0
  35. package/dist/data-provider-interface/HappyFlowComponents/ui/WipStep.vue.js +2 -2
  36. package/dist/data-provider-interface/HappyFlowComponents/ui/WipStep.vue2.js +7 -7
  37. package/dist/data-provider-interface/components/ProgressSteps.vue.js +1 -1
  38. package/dist/data-provider-interface/components/ProgressSteps.vue2.js +45 -44
  39. package/dist/data-provider-interface/components/StepActionsSection.vue.js +2 -2
  40. package/dist/data-provider-interface/components/StepActionsSection.vue2.js +119 -42
  41. package/dist/data-provider-interface/composables/useDpiStepper.js +7 -7
  42. package/dist/data-provider-interface/views/InputPageProject.vue.js +354 -316
  43. package/dist/stories/components/DemoStepper.vue.js +2 -2
  44. package/dist/stories/components/DemoStepper.vue2.js +134 -102
  45. package/dist/stories/components/LinkCard.vue.js +7 -0
  46. package/dist/stories/components/LinkCard.vue2.js +52 -0
  47. package/dist/stories/components/PartnerCard.vue.js +2 -2
  48. package/dist/stories/components/PartnerCard.vue2.js +20 -19
  49. package/dist/stories/components/ScreenshotCard.vue.js +7 -0
  50. package/dist/stories/components/ScreenshotCard.vue2.js +25 -0
  51. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
- import { defineComponent as w, mergeModels as B, computed as f, useModel as k, createElementBlock as l, openBlock as i, Fragment as S, renderList as x, withDirectives as c, createElementVNode as s, vModelCheckbox as y, unref as a, normalizeClass as C, toDisplayString as M, vShow as m } from "vue";
1
+ import { defineComponent as O, mergeModels as V, computed as k, useModel as S, createElementBlock as i, openBlock as c, Fragment as y, renderList as x, withDirectives as a, createElementVNode as s, vModelCheckbox as C, unref as d, normalizeClass as M, toDisplayString as F, vShow as h } from "vue";
2
2
  import { looseIndexOf as b } from "@vue/shared";
3
- import D from "../HappyFlowComponents/img/Circle.svg.js";
4
- import E from "../HappyFlowComponents/img/CircleFill.svg.js";
5
- const F = { class: "progress-steps" }, U = ["value"], j = { class: "progress-step__headline" }, z = ["src"], I = { class: "progress-step__content" }, L = { class: "progress-step__content-line-container" }, P = { class: "progress-steps progress-steps--substep" }, R = ["value"], q = { class: "progress-step__headline" }, A = ["src"], G = { class: "progress-step__content" }, H = { class: "progress-step__content-line-container" }, W = /* @__PURE__ */ w({
3
+ import B from "../HappyFlowComponents/img/Circle.svg.js";
4
+ import D from "../HappyFlowComponents/img/CircleFill.svg.js";
5
+ const w = { class: "progress-steps" }, U = ["value"], j = { class: "progress-step__headline" }, z = ["src"], I = { class: "progress-step__content" }, L = { class: "progress-step__content-line-container" }, P = { class: "progress-steps progress-steps--substep" }, R = ["value"], q = { class: "progress-step__headline" }, A = ["src"], G = { class: "progress-step__content" }, H = { class: "progress-step__content-line-container" }, W = /* @__PURE__ */ O({
6
6
  __name: "ProgressSteps",
7
- props: /* @__PURE__ */ B({
7
+ props: /* @__PURE__ */ V({
8
8
  steps: {},
9
9
  currentStep: {},
10
- visitedSteps: { default: () => [] }
10
+ visitedSteps: { default: () => [] },
11
+ hideFirst: { type: Boolean, default: !1 }
11
12
  }, {
12
13
  checked: {
13
14
  default: () => []
@@ -19,89 +20,89 @@ const F = { class: "progress-steps" }, U = ["value"], j = { class: "progress-ste
19
20
  currentModifiers: {}
20
21
  }),
21
22
  emits: ["update:checked", "update:current"],
22
- setup(p) {
23
- const v = p, h = f(() => {
24
- const n = {};
25
- return v.steps.forEach((e) => {
26
- const t = e.includes("/") ? e.split("/")[0] : e;
27
- n[t] || (n[t] = []), n[t].push(e);
28
- }), Object.entries(n).map(([e, t]) => ({ name: e, substeps: t }));
23
+ setup(u) {
24
+ const p = u, g = k(() => {
25
+ const t = {};
26
+ return (p.hideFirst ? p.steps.slice(1) : p.steps).forEach((e) => {
27
+ const o = e.includes("/") ? e.split("/")[0] : e;
28
+ t[o] || (t[o] = []), t[o].push(e);
29
+ }), Object.entries(t).map(([e, o]) => ({ name: e, substeps: o }));
29
30
  });
30
- function N(n) {
31
- return n.includes("/") ? n.split("/")[1] : n;
31
+ function E(t) {
32
+ return t.includes("/") ? t.split("/")[1] : t;
32
33
  }
33
- function g(n) {
34
- return !n.includes("/");
34
+ function f(t) {
35
+ return !t.includes("/");
35
36
  }
36
- const o = k(p, "checked");
37
- function d(n) {
38
- return b(o.value, n) !== -1;
37
+ const l = S(u, "checked");
38
+ function _(t) {
39
+ return b(l.value, t) !== -1;
39
40
  }
40
- const u = k(p, "current");
41
- return f(() => b(v.steps, u.value)), (n, e) => (i(), l("div", F, [
42
- (i(!0), l(S, null, x(h.value, (t, O) => (i(), l("div", {
43
- key: t.name,
41
+ const m = S(u, "current");
42
+ return k(() => b(p.steps, m.value)), (t, n) => (c(), i("div", w, [
43
+ (c(!0), i(y, null, x(g.value, (e, o) => (c(), i("div", {
44
+ key: e.name,
44
45
  class: "progress-step"
45
46
  }, [
46
- c(s("input", {
47
- "onUpdate:modelValue": e[0] || (e[0] = (r) => o.value = r),
47
+ a(s("input", {
48
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => l.value = r),
48
49
  name: "progress-step",
49
50
  type: "checkbox",
50
51
  class: "progress-input",
51
- value: t.name
52
+ value: e.name
52
53
  }, null, 8, U), [
53
- [y, o.value]
54
+ [C, l.value]
54
55
  ]),
55
56
  s("div", j, [
56
57
  s("img", {
57
- src: d(t.name) ? a(E) : a(D),
58
+ src: _(e.name) ? d(D) : d(B),
58
59
  class: "progress-step__headline__icon",
59
60
  alt: ""
60
61
  }, null, 8, z),
61
62
  s("span", {
62
- class: C({ "progress-step__headline__span--checked": u.value === t.name })
63
- }, M(t.name), 3)
63
+ class: M({ "progress-step__headline__span--checked": m.value === e.name })
64
+ }, F(e.name), 3)
64
65
  ]),
65
66
  s("div", I, [
66
- c(s("div", L, e[2] || (e[2] = [
67
+ a(s("div", L, n[2] || (n[2] = [
67
68
  s("div", { class: "progress-step__content-line" }, null, -1)
68
69
  ]), 512), [
69
- [m, O < h.value.length - 1]
70
+ [h, o < g.value.length - 1]
70
71
  ]),
71
- c(s("div", P, [
72
- (i(!0), l(S, null, x(t.substeps.filter((r) => !g(r)), (r, V) => (i(), l("div", {
72
+ a(s("div", P, [
73
+ (c(!0), i(y, null, x(e.substeps.filter((r) => !f(r)), (r, N) => (c(), i("div", {
73
74
  key: r,
74
75
  class: "progress-step"
75
76
  }, [
76
- c(s("input", {
77
- "onUpdate:modelValue": e[1] || (e[1] = (_) => o.value = _),
77
+ a(s("input", {
78
+ "onUpdate:modelValue": n[1] || (n[1] = (v) => l.value = v),
78
79
  name: "progress-step",
79
80
  type: "checkbox",
80
81
  class: "progress-input",
81
82
  value: r
82
83
  }, null, 8, R), [
83
- [y, o.value]
84
+ [C, l.value]
84
85
  ]),
85
86
  s("div", q, [
86
87
  s("img", {
87
- src: d(r) ? a(E) : a(D),
88
+ src: _(r) ? d(D) : d(B),
88
89
  class: "progress-step__headline__icon",
89
90
  alt: ""
90
91
  }, null, 8, A),
91
92
  s("span", {
92
- class: C({ "progress-step__headline__span--checked": u.value === r })
93
- }, M(N(r)), 3)
93
+ class: M({ "progress-step__headline__span--checked": m.value === r })
94
+ }, F(E(r)), 3)
94
95
  ]),
95
96
  s("div", G, [
96
- c(s("div", H, e[3] || (e[3] = [
97
+ a(s("div", H, n[3] || (n[3] = [
97
98
  s("div", { class: "progress-step__content-line" }, null, -1)
98
99
  ]), 512), [
99
- [m, V < t.substeps.filter((_) => !g(_)).length - 1]
100
+ [h, N < e.substeps.filter((v) => !f(v)).length - 1]
100
101
  ])
101
102
  ])
102
103
  ]))), 128))
103
104
  ], 512), [
104
- [m, !d(t.name)]
105
+ [h, !_(e.name)]
105
106
  ])
106
107
  ])
107
108
  ]))), 128))
@@ -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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8eb9e37a"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-25697b7a"]]);
5
5
  export {
6
- a as default
6
+ c as default
7
7
  };
@@ -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
  };