@piveau/dpi 0.2.0-alpha.37 → 0.2.0-alpha.40

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 (29) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue.js +2 -2
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue2.js +94 -82
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldVeeValidate.vue.js +66 -0
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldVeeValidate.vue2.js +4 -0
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ListBox/ListboxVeeValidate.vue.js +43 -0
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ListBox/ListboxVeeValidate.vue2.js +4 -0
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue.js +2 -2
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue2.js +37 -37
  10. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/FunctionalityForm.vue.js +7 -0
  11. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/FunctionalityForm.vue2.js +126 -0
  12. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
  13. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +362 -463
  14. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue.js +2 -2
  15. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue2.js +33 -33
  16. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
  17. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +110 -211
  18. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue.js +2 -2
  19. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue2.js +50 -49
  20. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js +37 -23
  21. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +2 -2
  22. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +1000 -983
  23. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TextArea/TextAreaVeeValidate.vue.js +55 -0
  24. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TextArea/TextAreaVeeValidate.vue2.js +4 -0
  25. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +1 -1
  26. package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue.js +2 -2
  27. package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue2.js +73 -63
  28. package/dist/packages/dpi/src/utils/twinbyUtils.js +8 -0
  29. package/package.json +23 -17
@@ -0,0 +1,55 @@
1
+ import { defineComponent as m, toRef as p, computed as n, createBlock as h, openBlock as g, unref as b, isRef as c } from "vue";
2
+ import { useField as v } from "vee-validate";
3
+ import V from "../TextAreaV3.vue.js";
4
+ const y = /* @__PURE__ */ m({
5
+ __name: "TextAreaVeeValidate",
6
+ props: {
7
+ modelValue: { default: "" },
8
+ name: {},
9
+ form: {},
10
+ label: { default: "" },
11
+ placeholder: { default: "" },
12
+ hint: { default: "" },
13
+ isDisabled: { type: Boolean, default: !1 },
14
+ hintMessage: { default: "" },
15
+ countHint: { type: Boolean, default: !1 },
16
+ max: { default: "" },
17
+ help: { default: "" },
18
+ labelWeight: { default: "normal" },
19
+ showDeleteButton: { type: Boolean, default: !1 },
20
+ isDescription: { type: Boolean, default: !1 },
21
+ errorMessage: { default: "" },
22
+ text: { default: () => ({}) }
23
+ },
24
+ emits: ["update:modelValue", "deleteClicked"],
25
+ setup(d) {
26
+ const l = d, i = p(l, "name"), { value: t, errorMessage: o, meta: s } = v(i, void 0, {
27
+ syncVModel: !0,
28
+ form: l.form,
29
+ validateOnValueUpdate: !1,
30
+ validateOnMount: !1
31
+ }), u = n(() => !!((s.touched || s.dirty) && (o.value || l.errorMessage))), f = n(() => o.value || l.errorMessage || "");
32
+ return (e, a) => (g(), h(V, {
33
+ modelValue: b(t),
34
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => c(t) ? t.value = r : null),
35
+ label: e.label,
36
+ placeholder: e.placeholder,
37
+ hint: e.hint,
38
+ "is-disabled": e.isDisabled,
39
+ "show-error": u.value,
40
+ "error-message": f.value,
41
+ "hint-message": e.hintMessage,
42
+ "count-hint": e.countHint,
43
+ max: e.max,
44
+ help: e.help,
45
+ "label-weight": e.labelWeight,
46
+ "show-delete-button": e.showDeleteButton,
47
+ "is-description": e.isDescription,
48
+ text: e.text,
49
+ onDeleteClicked: a[1] || (a[1] = (r) => e.$emit("deleteClicked"))
50
+ }, null, 8, ["modelValue", "label", "placeholder", "hint", "is-disabled", "show-error", "error-message", "hint-message", "count-hint", "max", "help", "label-weight", "show-delete-button", "is-description", "text"]));
51
+ }
52
+ });
53
+ export {
54
+ y as default
55
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./TextAreaVeeValidate.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -155,7 +155,7 @@ const W = { class: "dpiV3_input-field V3-typography" }, j = { class: "dpiV3_Inpu
155
155
  ])
156
156
  ]));
157
157
  }
158
- }, Y = /* @__PURE__ */ L(q, [["__scopeId", "data-v-8b7262ed"]]);
158
+ }, Y = /* @__PURE__ */ L(q, [["__scopeId", "data-v-4cb670c1"]]);
159
159
  export {
160
160
  Y as default
161
161
  };
@@ -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 e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-99116134"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e907beec"]]);
5
5
  export {
6
- e as default
6
+ r as default
7
7
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as $, inject as K, ref as v, watch as R, computed as w, createElementBlock as r, openBlock as o, normalizeClass as O, createElementVNode as p, createBlock as g, createCommentVNode as E, createVNode as s, renderSlot as N, unref as B, normalizeStyle as U, withDirectives as h, vShow as y, Fragment as P, withCtx as x, renderList as Z, toDisplayString as q, nextTick as G } from "vue";
2
- import { getNode as H, isNode as J } from "@formkit/core";
3
- import { getValidationMessages as Q } from "@formkit/validation";
4
- import { PhExclamationMark as X } from "@phosphor-icons/vue";
1
+ import { defineComponent as R, inject as O, ref as p, watch as U, computed as N, createElementBlock as s, openBlock as o, normalizeClass as Z, createElementVNode as g, createBlock as h, createCommentVNode as w, createVNode as r, renderSlot as B, unref as E, normalizeStyle as q, withDirectives as y, vShow as x, Fragment as P, withCtx as C, renderList as G, toDisplayString as H, nextTick as J } from "vue";
2
+ import { getNode as Q, isNode as X } from "@formkit/core";
3
+ import { getValidationMessages as Y } from "@formkit/validation";
4
+ import { PhExclamationMark as _ } from "@phosphor-icons/vue";
5
5
  import u from "../HappyFlowComponents/ui/ButtonV3.vue.js";
6
- import Y from "../HappyFlowComponents/ui/Card.vue.js";
7
- import { dpiStepperKey as _ } from "../utils/injectionKeys.js";
8
- import ee from "./TheCancelConfirmationDialog.vue.js";
9
- import { useEditModeInfo as te } from "../composables/useDpiEditMode.js";
10
- const ne = { class: "step-actions" }, ae = { class: "step-actions__prev-and-next" }, oe = {
6
+ import ee from "../HappyFlowComponents/ui/Card.vue.js";
7
+ import { dpiStepperKey as te } from "../utils/injectionKeys.js";
8
+ import ne from "./TheCancelConfirmationDialog.vue.js";
9
+ import { useEditModeInfo as ae } from "../composables/useDpiEditMode.js";
10
+ const oe = { class: "step-actions" }, ie = { class: "step-actions__prev-and-next" }, le = {
11
11
  key: 0,
12
12
  class: "validation-errors"
13
- }, ge = /* @__PURE__ */ $({
13
+ }, ye = /* @__PURE__ */ R({
14
14
  __name: "StepActionsSection",
15
15
  props: {
16
16
  hideCancel: { type: Boolean, default: !1 },
@@ -28,53 +28,61 @@ const ne = { class: "step-actions" }, ae = { class: "step-actions__prev-and-next
28
28
  },
29
29
  emits: ["submit", "closeWithSaving"],
30
30
  setup(z, { emit: L }) {
31
- const l = z, C = L, t = K(_);
31
+ const l = z, b = L, t = O(te);
32
32
  t || console.warn("dpiStepper is not provided. Please use StepActionsSection inside InputPage");
33
33
  function S(e) {
34
34
  return e !== void 0;
35
35
  }
36
- const f = v(!1), d = v(!1), i = v([]);
37
- t && R(t.activeStep, () => {
36
+ const f = p(!1), d = p(!1), i = p([]);
37
+ t && U(t.activeStep, () => {
38
38
  i.value.splice(0, i.value.length), d.value = !1;
39
39
  });
40
- function b() {
40
+ function T() {
41
41
  f.value = !0;
42
42
  }
43
- function m() {
43
+ function v() {
44
44
  t == null || t.goToPreviousStep();
45
45
  }
46
- async function k() {
47
- var T, V;
46
+ async function m() {
47
+ var k, V;
48
48
  if (!S(t))
49
49
  return !1;
50
- t.triggerValidationCurrentStep(), await G();
50
+ t.triggerValidationCurrentStep(), await J();
51
51
  const e = t.activeStep.value;
52
52
  if (!e)
53
53
  return !1;
54
- const n = H(e);
55
- if (!J(n))
54
+ const n = Q(e);
55
+ if (!X(n))
56
56
  return console.error("Current step node is not a FormKitNode", n), !1;
57
57
  n.clearErrors(!0);
58
- const a = Q(n), j = !!((V = (T = t.steps) == null ? void 0 : T[e]) != null && V.valid);
59
- return a && a.size > 0 || !j ? (i.value = [...a.entries()].flatMap(([le, F]) => F.map((I) => String(I.value))), d.value = !0, !1) : (i.value.splice(0, i.value.length), d.value = !1, !0);
58
+ const a = Y(n), I = !!((V = (k = t.steps) == null ? void 0 : k[e]) != null && V.valid);
59
+ return a && a.size > 0 || !I ? (i.value = [...a.entries()].flatMap(([re, $]) => $.map((K) => String(K.value))), d.value = !0, !1) : (i.value.splice(0, i.value.length), d.value = !1, !0);
60
+ }
61
+ function D(e, n) {
62
+ m().then((a) => {
63
+ a ? e() : n && typeof n == "function" && n();
64
+ });
65
+ }
66
+ function M() {
67
+ t == null || t.goToNextStep();
60
68
  }
61
69
  async function c() {
62
- !S(t) || !await k() || (t != null && t.isLast.value ? C("submit") : t == null || t.goToNextStep());
70
+ !S(t) || !await m() || (t != null && t.isLast.value ? b("submit") : t == null || t.goToNextStep());
63
71
  }
64
- const { isEditMode: D } = te();
65
- async function M() {
66
- !t || !await k() || t == null || t.goToStep(Object.keys(t.steps).pop() || "");
72
+ const { isEditMode: A } = ae();
73
+ async function W() {
74
+ !t || !await m() || t == null || t.goToStep(Object.keys(t.steps).pop() || "");
67
75
  }
68
- const A = w(() => t ? t == null ? void 0 : t.isLast.value : !0), W = w(() => [
76
+ const j = N(() => t ? t == null ? void 0 : t.isLast.value : !0), F = N(() => [
69
77
  { "step-actions-container--compact": l.compact },
70
78
  l.classList
71
79
  ]);
72
- return (e, n) => (o(), r("div", {
73
- class: O([W.value, "step-actions-container"])
80
+ return (e, n) => (o(), s("div", {
81
+ class: Z([F.value, "step-actions-container"])
74
82
  }, [
75
- p("div", ne, [
76
- B(D) ? (o(), r(P, { key: 1 }, [
77
- A.value ? h((o(), g(u, {
83
+ g("div", oe, [
84
+ E(A) ? (o(), s(P, { key: 1 }, [
85
+ j.value ? y((o(), h(u, {
78
86
  key: 1,
79
87
  class: "edit-save-button",
80
88
  size: "large",
@@ -85,51 +93,53 @@ const ne = { class: "step-actions" }, ae = { class: "step-actions__prev-and-next
85
93
  loading: l.loading,
86
94
  onClick: c
87
95
  }, null, 8, ["variant", "button-text", "icon-end", "loading"])), [
88
- [y, !e.hideNext]
89
- ]) : (o(), g(u, {
96
+ [x, !e.hideNext]
97
+ ]) : (o(), h(u, {
90
98
  key: 0,
91
99
  class: "edit-save-button",
92
100
  size: "large",
93
101
  variant: "primary",
94
102
  type: "button",
95
103
  "button-text": "Speichern",
96
- onClick: M
104
+ onClick: W
97
105
  }))
98
- ], 64)) : N(e.$slots, "default", {
106
+ ], 64)) : B(e.$slots, "default", {
99
107
  key: 0,
100
- handleCancel: b,
101
- handlePrevious: m,
108
+ handleCancel: T,
109
+ handlePrevious: v,
102
110
  handleSubmit: c
103
111
  }, () => [
104
- s(u, {
105
- style: U({ opacity: e.hideCancel ? 0 : 1 }),
112
+ r(u, {
113
+ style: q({ opacity: e.hideCancel ? 0 : 1 }),
106
114
  variant: "tertiary",
107
115
  size: "large",
108
116
  type: "button",
109
117
  "button-text": e.cancelText,
110
- onClick: b
118
+ onClick: T
111
119
  }, null, 8, ["style", "button-text"]),
112
- p("div", ae, [
113
- N(e.$slots, "prev-and-next", {
120
+ g("div", ie, [
121
+ B(e.$slots, "prev-and-next", {
114
122
  hidePrevious: e.hidePrevious,
115
123
  hideNext: e.hideNext,
116
124
  previousText: e.previousText,
117
125
  nextText: e.nextText,
118
- handlePrevious: m,
126
+ handleNext: M,
127
+ handlePrevious: v,
119
128
  handleSubmit: c,
120
- loading: l.loading
129
+ loading: l.loading,
130
+ validate: D
121
131
  }, () => [
122
- h(s(u, {
132
+ y(r(u, {
123
133
  variant: "secondary",
124
134
  size: "large",
125
135
  type: "button",
126
136
  "button-text": e.previousText,
127
137
  "icon-start": "CaretLeft",
128
- onClick: m
138
+ onClick: v
129
139
  }, null, 8, ["button-text"]), [
130
- [y, !e.hidePrevious]
140
+ [x, !e.hidePrevious]
131
141
  ]),
132
- h(s(u, {
142
+ y(r(u, {
133
143
  size: "large",
134
144
  variant: e.nextVariant,
135
145
  type: "button",
@@ -138,40 +148,40 @@ const ne = { class: "step-actions" }, ae = { class: "step-actions__prev-and-next
138
148
  loading: l.loading,
139
149
  onClick: c
140
150
  }, null, 8, ["variant", "button-text", "icon-end", "loading"]), [
141
- [y, !e.hideNext]
151
+ [x, !e.hideNext]
142
152
  ])
143
153
  ], !0)
144
154
  ])
145
155
  ], !0)
146
156
  ]),
147
- d.value && i.value.length ? (o(), g(Y, {
157
+ d.value && i.value.length ? (o(), h(ee, {
148
158
  key: 0,
149
159
  variant: "error"
150
160
  }, {
151
- icon: x(() => [
152
- s(B(X), {
161
+ icon: C(() => [
162
+ r(E(_), {
153
163
  size: 32,
154
164
  color: "currentColor"
155
165
  })
156
166
  ]),
157
- title: x(() => n[2] || (n[2] = [
158
- p("p", { style: { margin: "0" } }, " Fehler ", -1)
167
+ title: C(() => n[2] || (n[2] = [
168
+ g("p", { style: { margin: "0" } }, " Fehler ", -1)
159
169
  ])),
160
- default: x(() => [
161
- e.showDetailedErrorSummary ? (o(), r("ul", oe, [
162
- (o(!0), r(P, null, Z(i.value, (a) => (o(), r("li", { key: a }, q(a), 1))), 128))
163
- ])) : E("", !0)
170
+ default: C(() => [
171
+ e.showDetailedErrorSummary ? (o(), s("ul", le, [
172
+ (o(!0), s(P, null, G(i.value, (a) => (o(), s("li", { key: a }, H(a), 1))), 128))
173
+ ])) : w("", !0)
164
174
  ]),
165
175
  _: 1
166
- })) : E("", !0),
167
- s(ee, {
176
+ })) : w("", !0),
177
+ r(ne, {
168
178
  modelValue: f.value,
169
179
  "onUpdate:modelValue": n[0] || (n[0] = (a) => f.value = a),
170
- onCloseWithSaving: n[1] || (n[1] = (a) => C("closeWithSaving"))
180
+ onCloseWithSaving: n[1] || (n[1] = (a) => b("closeWithSaving"))
171
181
  }, null, 8, ["modelValue"])
172
182
  ], 2));
173
183
  }
174
184
  });
175
185
  export {
176
- ge as default
186
+ ye as default
177
187
  };
@@ -0,0 +1,8 @@
1
+ const r = "Bitte geben Sie eine korrekte URL ein.";
2
+ function t(e) {
3
+ return `${e} ist erforderlich.`;
4
+ }
5
+ export {
6
+ r as URL_MSG,
7
+ t as generateIsRequiredMsg
8
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.2.0-alpha.37",
4
+ "version": "0.2.0-alpha.40",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",
@@ -36,6 +36,17 @@
36
36
  "node": ">=18.18.0",
37
37
  "pnpm": ">=10.0.0"
38
38
  },
39
+ "scripts": {
40
+ "dev": "histoire dev",
41
+ "build": "vite build",
42
+ "preview": "vite preview",
43
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
44
+ "story:dev": "histoire dev",
45
+ "story:build": "histoire build",
46
+ "story:preview": "histoire preview",
47
+ "prepublishOnly": "vite build",
48
+ "test": "vitest"
49
+ },
39
50
  "dependencies": {
40
51
  "@rdfjs/dataset": "2.0.2",
41
52
  "@vee-validate/zod": "^4.15.1",
@@ -97,20 +108,15 @@
97
108
  "name": "node",
98
109
  "onFail": "error"
99
110
  },
100
- "packageManager": {
101
- "name": "pnpm",
102
- "version": ">=10.13.1",
103
- "onFail": "error"
104
- }
105
- },
106
- "scripts": {
107
- "dev": "histoire dev",
108
- "build": "vite build",
109
- "preview": "vite preview",
110
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
111
- "story:dev": "histoire dev",
112
- "story:build": "histoire build",
113
- "story:preview": "histoire preview",
114
- "test": "vitest"
111
+ "packageManager": [
112
+ {
113
+ "name": "pnpm",
114
+ "version": ">=10.13.1",
115
+ "onFail": "error"
116
+ },
117
+ {
118
+ "name": "npm"
119
+ }
120
+ ]
115
121
  }
116
- }
122
+ }