@piveau/dpi 0.2.0-alpha.13 → 0.2.0-alpha.15
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/DataProviderInterface.vue2.js +48 -47
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/AboutProject.vue.js +46 -48
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +48 -31
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +101 -79
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue.js +4 -94
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue2.js +128 -0
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +36 -68
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue2.js +64 -52
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectDescriptionStep.vue.js +14 -14
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectNameStep.vue.js +9 -6
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +26 -27
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectStatusStep.vue.js +8 -8
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue2.js +19 -19
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataProcessing/BasicInformationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataProcessing/BasicInformationStep.vue2.js +38 -39
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataSimulation/BasicInformationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataSimulation/BasicInformationStep.vue2.js +72 -67
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue2.js +84 -97
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +103 -88
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue2.js +18 -17
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +35 -28
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +11 -10
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +4 -3
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +46 -40
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +144 -134
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +190 -156
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue2.js +44 -38
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue2.js +73 -71
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js +4 -4
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +128 -123
- 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 +133 -131
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +50 -45
- 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 +85 -83
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js +17 -17
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +341 -341
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +38 -71
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue2.js +4 -0
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +205 -143
- package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue.js +7 -0
- package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue2.js +172 -0
- package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue.js +7 -0
- package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue2.js +44 -0
- 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 +111 -91
- package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue.js +3 -3
- package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue2.js +24 -19
- package/dist/packages/dpi/src/data-provider-interface/components/TheErrorDialog.vue.js +57 -46
- package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/ProjectDpiDevTools.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/ProjectDpiDevTools.vue2.js +137 -94
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +152 -135
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +202 -167
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiContext.js +9 -10
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiEditMode.js +89 -65
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +287 -281
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiStepper.js +82 -82
- package/dist/packages/dpi/src/data-provider-interface/composables/useDpiUtils.js +18 -9
- package/dist/packages/dpi/src/data-provider-interface/composables/useProjectActions.js +95 -0
- package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyHome.js +83 -0
- package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyUser.js +85 -0
- package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +19 -19
- package/dist/packages/dpi/src/data-provider-interface/schema/projectLdSchema.js +48 -45
- package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +333 -308
- package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +405 -409
- package/dist/packages/dpi/src/form/inputDefinitions.js +52 -53
- package/dist/packages/dpi/src/stories/components/PartnerCard.vue.js +2 -2
- package/dist/packages/dpi/src/stories/components/PartnerCard.vue2.js +14 -14
- package/dist/packages/dpi/src/stories/components/ScreenshotCard.vue.js +2 -2
- package/dist/packages/dpi/src/stories/components/ScreenshotCard.vue2.js +9 -8
- package/dist/packages/dpi/src/utils/schema/schemaProject.js +210 -0
- package/dist/packages/dpi/src/utils/schema/shared.js +23 -0
- package/package.json +5 -5
- package/dist/packages/dpi/src/data-provider-interface/components/PolGeoUriPage.vue.js +0 -124
- package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/__tests__/fixtures/theProjectForm.js +0 -281
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { defineComponent as B, mergeModels as C, useModel as L, ref as m, computed as v, watch as z, createElementBlock as c, openBlock as s, createCommentVNode as b, createBlock as h, Fragment as R, renderList as G, withDirectives as $, createElementVNode as y, vModelCheckbox as I, withCtx as U, createVNode as p } from "vue";
|
|
2
|
+
import M from "../HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js";
|
|
3
|
+
import N from "../HappyFlowComponents/ui/ButtonV3.vue.js";
|
|
4
|
+
import x from "../HappyFlowComponents/ui/Chip.vue.js";
|
|
5
|
+
import E from "../HappyFlowComponents/ui/InputField.vue.js";
|
|
6
|
+
import F from "../HappyFlowComponents/ui/ListBox/Listbox.vue.js";
|
|
7
|
+
import T from "../HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js";
|
|
8
|
+
import W from "../HappyFlowComponents/ui/ProcessSteps/ProcessStepInputCard.vue.js";
|
|
9
|
+
const D = { class: "step-section" }, K = { key: 0 }, O = ["id", "value"], P = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "step-section-actions"
|
|
12
|
+
}, ee = /* @__PURE__ */ B({
|
|
13
|
+
__name: "Spatial",
|
|
14
|
+
props: /* @__PURE__ */ C({
|
|
15
|
+
baseUrl: { default: "https://open.bydata.de/api/hub/search" },
|
|
16
|
+
options: { default: () => [
|
|
17
|
+
{ id: "continent", name: "Kontinent" },
|
|
18
|
+
{ id: "country", name: "Land" },
|
|
19
|
+
{ id: "place", name: "Ort" }
|
|
20
|
+
] }
|
|
21
|
+
}, {
|
|
22
|
+
modelValue: { default: () => [] },
|
|
23
|
+
modelModifiers: {}
|
|
24
|
+
}),
|
|
25
|
+
emits: ["update:modelValue"],
|
|
26
|
+
setup(g) {
|
|
27
|
+
const r = g, i = L(g, "modelValue"), d = m(r.options.find((a) => a.id === "place") || r.options[0]), u = m(void 0), n = m(""), f = v(() => {
|
|
28
|
+
try {
|
|
29
|
+
if (!n.value)
|
|
30
|
+
return !1;
|
|
31
|
+
const a = new URL(n.value);
|
|
32
|
+
return !!a.protocol && !!a.host;
|
|
33
|
+
} catch {
|
|
34
|
+
return !1;
|
|
35
|
+
}
|
|
36
|
+
}), S = v(() => {
|
|
37
|
+
var a;
|
|
38
|
+
return ((a = d.value) == null ? void 0 : a.id) || "";
|
|
39
|
+
});
|
|
40
|
+
z(d, (a) => {
|
|
41
|
+
a && (u.value = void 0);
|
|
42
|
+
});
|
|
43
|
+
function _(a) {
|
|
44
|
+
return a.startsWith("http://publications.europa.eu/resource/authority");
|
|
45
|
+
}
|
|
46
|
+
const w = v(() => f.value || !!u.value);
|
|
47
|
+
function A() {
|
|
48
|
+
var o;
|
|
49
|
+
const a = (o = n.value) == null ? void 0 : o.trim(), l = f.value, e = u.value, t = l ? a : e;
|
|
50
|
+
t && (i.value = [t], n.value = "", u.value = void 0);
|
|
51
|
+
}
|
|
52
|
+
return (a, l) => (s(), c("section", D, [
|
|
53
|
+
i.value.length > 0 ? (s(), c("div", K, [
|
|
54
|
+
(s(!0), c(R, null, G(i.value, (e, t) => (s(), c("div", {
|
|
55
|
+
key: `spatial-${t}`,
|
|
56
|
+
class: "functionalities"
|
|
57
|
+
}, [
|
|
58
|
+
$(y("input", {
|
|
59
|
+
id: `spatial-${t}`,
|
|
60
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => i.value = o),
|
|
61
|
+
hidden: "",
|
|
62
|
+
value: e,
|
|
63
|
+
name: "spatial",
|
|
64
|
+
type: "checkbox"
|
|
65
|
+
}, null, 8, O), [
|
|
66
|
+
[I, i.value]
|
|
67
|
+
]),
|
|
68
|
+
_(e) ? (s(), h(T, {
|
|
69
|
+
key: 0,
|
|
70
|
+
"base-url": r.baseUrl,
|
|
71
|
+
vocabulary: e == null ? void 0 : e.split("/").slice(-2)[0],
|
|
72
|
+
"resource-id": e,
|
|
73
|
+
"setup-fn": (o) => o
|
|
74
|
+
}, {
|
|
75
|
+
default: U(({ result: o }) => {
|
|
76
|
+
var V, k;
|
|
77
|
+
return [
|
|
78
|
+
p(x, {
|
|
79
|
+
as: "label",
|
|
80
|
+
for: `spatial-${t}`,
|
|
81
|
+
text: ((V = o == null ? void 0 : o.pref_label) == null ? void 0 : V.de) || ((k = o == null ? void 0 : o.pref_label) == null ? void 0 : k.en),
|
|
82
|
+
setup: {
|
|
83
|
+
"@type": "select",
|
|
84
|
+
"@icon": "suffix",
|
|
85
|
+
"@inTable": !1,
|
|
86
|
+
"@search": !1,
|
|
87
|
+
"@selected": !0
|
|
88
|
+
},
|
|
89
|
+
data: { "@value": e, URI: e }
|
|
90
|
+
}, null, 8, ["for", "text", "data"])
|
|
91
|
+
];
|
|
92
|
+
}),
|
|
93
|
+
_: 2
|
|
94
|
+
}, 1032, ["base-url", "vocabulary", "resource-id", "setup-fn"])) : (s(), h(x, {
|
|
95
|
+
key: 1,
|
|
96
|
+
as: "label",
|
|
97
|
+
for: `spatial-${t}`,
|
|
98
|
+
text: e,
|
|
99
|
+
setup: {
|
|
100
|
+
"@type": "select",
|
|
101
|
+
"@icon": "suffix",
|
|
102
|
+
"@inTable": !1,
|
|
103
|
+
"@search": !1,
|
|
104
|
+
"@selected": !0
|
|
105
|
+
},
|
|
106
|
+
data: { "@value": e, URI: e }
|
|
107
|
+
}, null, 8, ["for", "text", "data"]))
|
|
108
|
+
]))), 128))
|
|
109
|
+
])) : b("", !0),
|
|
110
|
+
i.value.length === 0 ? (s(), h(W, {
|
|
111
|
+
key: 1,
|
|
112
|
+
class: "step-section",
|
|
113
|
+
"no-delete": ""
|
|
114
|
+
}, {
|
|
115
|
+
default: U(() => {
|
|
116
|
+
var e;
|
|
117
|
+
return [
|
|
118
|
+
l[4] || (l[4] = y("h5", null, "Administrativer Bezug", -1)),
|
|
119
|
+
p(F, {
|
|
120
|
+
modelValue: d.value,
|
|
121
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => d.value = t),
|
|
122
|
+
options: r.options,
|
|
123
|
+
label: "Gebiet der Abdeckung",
|
|
124
|
+
placeholder: "Wählen Sie das Gebiet der Abdeckung."
|
|
125
|
+
}, null, 8, ["modelValue", "options"]),
|
|
126
|
+
p(M, {
|
|
127
|
+
modelValue: u.value,
|
|
128
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => u.value = t),
|
|
129
|
+
by: "vocabulary",
|
|
130
|
+
label: (e = d.value) == null ? void 0 : e.name,
|
|
131
|
+
"base-url": r.baseUrl,
|
|
132
|
+
vocabulary: S.value,
|
|
133
|
+
placeholder: "Legen Sie die räumliche Abdeckung fest.",
|
|
134
|
+
name: "spatial"
|
|
135
|
+
}, null, 8, ["modelValue", "label", "base-url", "vocabulary"]),
|
|
136
|
+
l[5] || (l[5] = y("h5", null, "oder Geodatensatz", -1)),
|
|
137
|
+
p(E, {
|
|
138
|
+
modelValue: n.value,
|
|
139
|
+
"onUpdate:modelValue": l[3] || (l[3] = (t) => n.value = t),
|
|
140
|
+
"add-on-text": !1,
|
|
141
|
+
"date-picker": !1,
|
|
142
|
+
"info-icon": !1,
|
|
143
|
+
"show-end-icon": !1,
|
|
144
|
+
"pre-icon": !1,
|
|
145
|
+
"input-type": "url",
|
|
146
|
+
label: "URL angeben",
|
|
147
|
+
placeholder: "https://example.org/geodatensatz",
|
|
148
|
+
"show-error": !!n.value && !f.value,
|
|
149
|
+
error_message: "Geben Sie eine gültige URL an",
|
|
150
|
+
"initial-hint-text": !!n.value && !f.value
|
|
151
|
+
}, null, 8, ["modelValue", "show-error", "initial-hint-text"])
|
|
152
|
+
];
|
|
153
|
+
}),
|
|
154
|
+
_: 1,
|
|
155
|
+
__: [4, 5]
|
|
156
|
+
})) : b("", !0),
|
|
157
|
+
i.value.length === 0 ? (s(), c("div", P, [
|
|
158
|
+
p(N, {
|
|
159
|
+
"button-text": "Räumliche Abdeckung hinzufügen",
|
|
160
|
+
size: "medium",
|
|
161
|
+
variant: "tertiary",
|
|
162
|
+
"icon-start": "plus",
|
|
163
|
+
disabled: !w.value,
|
|
164
|
+
onClick: A
|
|
165
|
+
}, null, 8, ["disabled"])
|
|
166
|
+
])) : b("", !0)
|
|
167
|
+
]));
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
export {
|
|
171
|
+
ee as default
|
|
172
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineComponent as r, computed as u, createElementBlock as p, openBlock as c, createElementVNode as l, toDisplayString as m, createVNode as f } from "vue";
|
|
2
|
+
import { useFormValues as g } from "../composables/useDpiFormValues.js";
|
|
3
|
+
import v from "./Spatial.vue.js";
|
|
4
|
+
import { useEditModeInfo as h } from "../composables/useDpiEditMode.js";
|
|
5
|
+
const V = { class: "dpiV3InnerComponentWrap" }, z = { class: "dropdown-container" }, I = /* @__PURE__ */ r({
|
|
6
|
+
__name: "SpatialPage",
|
|
7
|
+
props: {
|
|
8
|
+
context: Object
|
|
9
|
+
},
|
|
10
|
+
setup(A) {
|
|
11
|
+
var d;
|
|
12
|
+
const { isEditMode: o } = h(), { formValues: i } = g();
|
|
13
|
+
o.value || (i.value.Additionals || (i.value.Additionals = {}), (d = i.value.Additionals)["dct:spatial"] || (d["dct:spatial"] = [
|
|
14
|
+
{ isValid: !0 }
|
|
15
|
+
])), o.value || (i.value.Covering["dcatde:politicalGeocodingURI"] = [
|
|
16
|
+
{ isValid: !0 }
|
|
17
|
+
]);
|
|
18
|
+
const s = u({
|
|
19
|
+
get() {
|
|
20
|
+
var t, e, n;
|
|
21
|
+
return ((n = (e = (t = i.value.Additionals) == null ? void 0 : t["dct:spatial"]) == null ? void 0 : e.filter((a) => !(a.isValid && Object.keys(a).length === 1))) == null ? void 0 : n.map((a) => a["@id"])) || [];
|
|
22
|
+
},
|
|
23
|
+
set(t) {
|
|
24
|
+
i.value.Additionals || (i.value.Additionals = {}), i.value.Additionals["dct:spatial"] = [
|
|
25
|
+
...t.map((e) => ({ "@id": e }))
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (t, e) => (c(), p("div", V, [
|
|
30
|
+
e[1] || (e[1] = l("h4", null, " Legen Sie die räumliche Abdeckung Ihres Datensatzes fest (optional) ", -1)),
|
|
31
|
+
e[2] || (e[2] = l("div", { class: "copy-large-regular" }, " Bitte geben Sie an, auf welches geografische oder politische Gebiet sich Ihr Datensatz bezieht. Dies kann beispielsweise eine Stadt, eine Region, ein Land oder eine spezifische Verwaltungseinheit sein. Die Angabe des räumlichen Bezugs hilft anderen Nutzenden, Ihren Datensatz schnell im passenden Kontext zu finden und gezielt für ihre Zwecke einzusetzen. ", -1)),
|
|
32
|
+
l("div", null, m(s.value), 1),
|
|
33
|
+
l("div", z, [
|
|
34
|
+
f(v, {
|
|
35
|
+
modelValue: s.value,
|
|
36
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => s.value = n)
|
|
37
|
+
}, null, 8, ["modelValue"])
|
|
38
|
+
])
|
|
39
|
+
]));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export {
|
|
43
|
+
I as default
|
|
44
|
+
};
|
|
@@ -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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3084d41e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getNode as
|
|
3
|
-
import { getValidationMessages as
|
|
4
|
-
import { PhExclamationMark as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as W, inject as j, ref as v, watch as F, computed as I, createElementBlock as r, openBlock as o, normalizeClass as $, createElementVNode as m, createBlock as p, createCommentVNode as V, createVNode as s, renderSlot as w, unref as N, normalizeStyle as K, withDirectives as h, vShow as y, Fragment as E, withCtx as g, renderList as R, toDisplayString as O, nextTick as U } from "vue";
|
|
2
|
+
import { getNode as Z, isNode as q } from "@formkit/core";
|
|
3
|
+
import { getValidationMessages as G } from "@formkit/validation";
|
|
4
|
+
import { PhExclamationMark as H } from "@phosphor-icons/vue";
|
|
5
|
+
import l from "../HappyFlowComponents/ui/ButtonV3.vue.js";
|
|
6
|
+
import J from "../HappyFlowComponents/ui/Card.vue.js";
|
|
7
7
|
import { dpiStepperKey as Q } from "../utils/injectionKeys.js";
|
|
8
8
|
import X from "./TheCancelConfirmationDialog.vue.js";
|
|
9
|
-
|
|
9
|
+
import { useEditModeInfo as Y } from "../composables/useDpiEditMode.js";
|
|
10
|
+
const _ = { class: "step-actions" }, ee = { class: "step-actions__prev-and-next" }, te = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "validation-errors"
|
|
13
|
+
}, me = /* @__PURE__ */ W({
|
|
10
14
|
__name: "StepActionsSection",
|
|
11
15
|
props: {
|
|
12
16
|
hideCancel: { type: Boolean, default: !1 },
|
|
@@ -17,132 +21,148 @@ const Y = { class: "step-actions" }, _ = { class: "step-actions__prev-and-next"
|
|
|
17
21
|
previousText: { default: "Zurück" },
|
|
18
22
|
nextText: { default: "Weiter" },
|
|
19
23
|
nextVariant: { default: "primary" },
|
|
20
|
-
classList: {}
|
|
24
|
+
classList: {},
|
|
25
|
+
showDetailedErrorSummary: { type: Boolean, default: !1 }
|
|
21
26
|
},
|
|
22
|
-
emits: ["submit"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
return
|
|
27
|
+
emits: ["submit", "closeWithSaving"],
|
|
28
|
+
setup(ne, { emit: B }) {
|
|
29
|
+
const x = B, t = j(Q);
|
|
30
|
+
t || console.warn("dpiStepper is not provided. Please use StepActionsSection inside InputPage");
|
|
31
|
+
function C(e) {
|
|
32
|
+
return e !== void 0;
|
|
28
33
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return;
|
|
33
|
-
const n = H(t);
|
|
34
|
-
!n || n.size === 0 || (a.value = [...n.entries()].flatMap(([o, w]) => w.map((B) => String(B.value))));
|
|
35
|
-
}
|
|
36
|
-
e && D(e.activeStep, () => {
|
|
37
|
-
a.value.splice(0, a.value.length), s.value = !1;
|
|
34
|
+
const c = v(!1), u = v(!1), i = v([]);
|
|
35
|
+
t && F(t.activeStep, () => {
|
|
36
|
+
i.value.splice(0, i.value.length), u.value = !1;
|
|
38
37
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var o;
|
|
42
|
-
const n = (o = b.value) == null ? void 0 : o[t];
|
|
43
|
-
return n ? n.valid : !1;
|
|
38
|
+
function S() {
|
|
39
|
+
c.value = !0;
|
|
44
40
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
41
|
+
function f() {
|
|
42
|
+
t == null || t.goToPreviousStep();
|
|
47
43
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
44
|
+
async function b() {
|
|
45
|
+
var k, T;
|
|
46
|
+
if (!C(t))
|
|
47
|
+
return !1;
|
|
48
|
+
t.triggerValidationCurrentStep(), await U();
|
|
49
|
+
const e = t.activeStep.value;
|
|
50
|
+
if (!e)
|
|
51
|
+
return !1;
|
|
52
|
+
const n = Z(e);
|
|
53
|
+
if (!q(n))
|
|
54
|
+
return console.error("Current step node is not a FormKitNode", n), !1;
|
|
55
|
+
const a = G(n), D = !!((T = (k = t.steps) == null ? void 0 : k[e]) != null && T.valid);
|
|
56
|
+
return a && a.size > 0 || !D ? (i.value = [...a.entries()].flatMap(([oe, M]) => M.map((A) => String(A.value))), u.value = !0, !1) : (i.value.splice(0, i.value.length), u.value = !1, !0);
|
|
50
57
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
58
|
+
async function d() {
|
|
59
|
+
!C(t) || !await b() || (t != null && t.isLast.value ? x("submit") : t == null || t.goToNextStep());
|
|
53
60
|
}
|
|
54
|
-
const
|
|
55
|
-
async function
|
|
56
|
-
|
|
57
|
-
return;
|
|
58
|
-
e.triggerValidationCurrentStep(), await Z();
|
|
59
|
-
const t = P.value;
|
|
60
|
-
if (t ? !p((e == null ? void 0 : e.activeStep.value) || "") : !1) {
|
|
61
|
-
if (!G(t)) {
|
|
62
|
-
console.error("Current step node is not a FormKitNode", t);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
N(t), s.value = !0;
|
|
66
|
-
}
|
|
67
|
-
e != null && e.isLast.value ? V("submit") : k();
|
|
61
|
+
const { isEditMode: P } = Y();
|
|
62
|
+
async function z() {
|
|
63
|
+
!t || !await b() || t == null || t.goToStep(Object.keys(t.steps).pop() || "");
|
|
68
64
|
}
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
const L = I(() => t ? t == null ? void 0 : t.isLast.value : !0);
|
|
66
|
+
return (e, n) => (o(), r("div", {
|
|
67
|
+
class: $([e.classList, "step-actions-container"])
|
|
71
68
|
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
m("div", _, [
|
|
70
|
+
N(P) ? (o(), r(E, { key: 1 }, [
|
|
71
|
+
L.value ? h((o(), p(l, {
|
|
72
|
+
key: 1,
|
|
73
|
+
class: "edit-save-button",
|
|
74
|
+
size: "large",
|
|
75
|
+
variant: e.nextVariant,
|
|
76
|
+
type: "button",
|
|
77
|
+
"button-text": e.nextText,
|
|
78
|
+
"icon-end": e.nextText === "Als Entwurf Speichern" ? null : "CaretRight",
|
|
79
|
+
onClick: d
|
|
80
|
+
}, null, 8, ["variant", "button-text", "icon-end"])), [
|
|
81
|
+
[y, !e.hideNext]
|
|
82
|
+
]) : (o(), p(l, {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: "edit-save-button",
|
|
85
|
+
size: "large",
|
|
86
|
+
variant: "primary",
|
|
87
|
+
type: "button",
|
|
88
|
+
"button-text": "Speichern",
|
|
89
|
+
onClick: z
|
|
90
|
+
}))
|
|
91
|
+
], 64)) : w(e.$slots, "default", {
|
|
92
|
+
key: 0,
|
|
93
|
+
handleCancel: S,
|
|
94
|
+
handlePrevious: f,
|
|
95
|
+
handleSubmit: d
|
|
77
96
|
}, () => [
|
|
78
|
-
|
|
79
|
-
style:
|
|
97
|
+
s(l, {
|
|
98
|
+
style: K({ opacity: e.hideCancel ? 0 : 1 }),
|
|
80
99
|
variant: "tertiary",
|
|
81
100
|
size: "large",
|
|
82
101
|
type: "button",
|
|
83
|
-
"button-text":
|
|
84
|
-
onClick:
|
|
102
|
+
"button-text": e.cancelText,
|
|
103
|
+
onClick: S
|
|
85
104
|
}, null, 8, ["style", "button-text"]),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
hidePrevious:
|
|
89
|
-
hideNext:
|
|
90
|
-
previousText:
|
|
91
|
-
nextText:
|
|
92
|
-
handlePrevious:
|
|
93
|
-
handleSubmit:
|
|
105
|
+
m("div", ee, [
|
|
106
|
+
w(e.$slots, "prev-and-next", {
|
|
107
|
+
hidePrevious: e.hidePrevious,
|
|
108
|
+
hideNext: e.hideNext,
|
|
109
|
+
previousText: e.previousText,
|
|
110
|
+
nextText: e.nextText,
|
|
111
|
+
handlePrevious: f,
|
|
112
|
+
handleSubmit: d
|
|
94
113
|
}, () => [
|
|
95
|
-
|
|
114
|
+
h(s(l, {
|
|
96
115
|
variant: "secondary",
|
|
97
116
|
size: "large",
|
|
98
117
|
type: "button",
|
|
99
|
-
"button-text":
|
|
118
|
+
"button-text": e.previousText,
|
|
100
119
|
"icon-start": "CaretLeft",
|
|
101
|
-
onClick:
|
|
120
|
+
onClick: f
|
|
102
121
|
}, null, 8, ["button-text"]), [
|
|
103
|
-
[y, !
|
|
122
|
+
[y, !e.hidePrevious]
|
|
104
123
|
]),
|
|
105
|
-
|
|
124
|
+
h(s(l, {
|
|
106
125
|
size: "large",
|
|
107
|
-
variant:
|
|
126
|
+
variant: e.nextVariant,
|
|
108
127
|
type: "button",
|
|
109
|
-
"button-text":
|
|
110
|
-
"icon-end":
|
|
111
|
-
onClick:
|
|
128
|
+
"button-text": e.nextText,
|
|
129
|
+
"icon-end": e.nextText === "Als Entwurf Speichern" || e.nextText === "Projektanlage starten" ? null : "CaretRight",
|
|
130
|
+
onClick: d
|
|
112
131
|
}, null, 8, ["variant", "button-text", "icon-end"]), [
|
|
113
|
-
[y, !
|
|
132
|
+
[y, !e.hideNext]
|
|
114
133
|
])
|
|
115
134
|
], !0)
|
|
116
135
|
])
|
|
117
136
|
], !0)
|
|
118
137
|
]),
|
|
119
|
-
|
|
138
|
+
u.value && i.value.length ? (o(), p(J, {
|
|
120
139
|
key: 0,
|
|
121
140
|
variant: "error"
|
|
122
141
|
}, {
|
|
123
|
-
icon:
|
|
124
|
-
|
|
142
|
+
icon: g(() => [
|
|
143
|
+
s(N(H), {
|
|
125
144
|
size: 32,
|
|
126
145
|
color: "currentColor"
|
|
127
146
|
})
|
|
128
147
|
]),
|
|
129
|
-
title:
|
|
130
|
-
|
|
148
|
+
title: g(() => n[2] || (n[2] = [
|
|
149
|
+
m("p", null, "Fehler", -1)
|
|
131
150
|
])),
|
|
132
|
-
default:
|
|
133
|
-
|
|
134
|
-
(
|
|
135
|
-
])
|
|
151
|
+
default: g(() => [
|
|
152
|
+
e.showDetailedErrorSummary ? (o(), r("ul", te, [
|
|
153
|
+
(o(!0), r(E, null, R(i.value, (a) => (o(), r("li", { key: a }, O(a), 1))), 128))
|
|
154
|
+
])) : V("", !0)
|
|
136
155
|
]),
|
|
137
156
|
_: 1
|
|
138
|
-
})) :
|
|
139
|
-
|
|
140
|
-
modelValue:
|
|
141
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
157
|
+
})) : V("", !0),
|
|
158
|
+
s(X, {
|
|
159
|
+
modelValue: c.value,
|
|
160
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => c.value = a),
|
|
161
|
+
onCloseWithSaving: n[1] || (n[1] = (a) => x("closeWithSaving"))
|
|
142
162
|
}, null, 8, ["modelValue"])
|
|
143
163
|
], 2));
|
|
144
164
|
}
|
|
145
165
|
});
|
|
146
166
|
export {
|
|
147
|
-
|
|
167
|
+
me as default
|
|
148
168
|
};
|
package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TheCancelConfirmationDialog.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0b6e98c6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue2.js
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import g from "../
|
|
4
|
-
|
|
1
|
+
import { defineComponent as d, mergeModels as f, useModel as p, createBlock as c, openBlock as v, withCtx as o, createElementVNode as n, createVNode as a } from "vue";
|
|
2
|
+
import { useRouter as V } from "vue-router";
|
|
3
|
+
import { useProjectActions as g } from "../composables/useProjectActions.js";
|
|
4
|
+
import i from "../HappyFlowComponents/ui/ButtonV3.vue.js";
|
|
5
|
+
import h from "../HappyFlowComponents/ui/DpiModalBase.vue.js";
|
|
6
|
+
const y = /* @__PURE__ */ d({
|
|
5
7
|
__name: "TheCancelConfirmationDialog",
|
|
6
8
|
props: {
|
|
7
9
|
modelValue: { type: Boolean },
|
|
8
10
|
modelModifiers: {}
|
|
9
11
|
},
|
|
10
|
-
emits: /* @__PURE__ */
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
emits: /* @__PURE__ */ f(["closeWithoutSaving", "closeWithSaving"], ["update:modelValue"]),
|
|
13
|
+
setup(l, { emit: k }) {
|
|
14
|
+
const s = V(), t = p(l, "modelValue"), { submitDraft: u } = g();
|
|
15
|
+
async function m() {
|
|
16
|
+
await u.execute(), s.push({ name: "DPI-Home-HappyFlow" });
|
|
17
|
+
}
|
|
18
|
+
return (w, e) => (v(), c(h, {
|
|
19
|
+
modelValue: t.value,
|
|
20
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => t.value = r)
|
|
16
21
|
}, {
|
|
17
|
-
header: o(() => e[
|
|
18
|
-
|
|
22
|
+
header: o(() => e[2] || (e[2] = [
|
|
23
|
+
n("h4", { class: "cancel-header" }, " Projektanlage später fortführen ", -1)
|
|
19
24
|
])),
|
|
20
25
|
footer: o(() => [
|
|
21
|
-
i
|
|
26
|
+
a(i, {
|
|
22
27
|
"button-text": "Bearbeitung verwerfen",
|
|
23
28
|
variant: "secondary",
|
|
24
|
-
onClick: e[0] || (e[0] = (
|
|
29
|
+
onClick: e[0] || (e[0] = (r) => t.value = !1)
|
|
25
30
|
}),
|
|
26
|
-
i
|
|
31
|
+
a(i, {
|
|
27
32
|
"button-text": "Projekt als Entwurf speichern",
|
|
28
33
|
variant: "primary",
|
|
29
|
-
onClick:
|
|
34
|
+
onClick: m
|
|
30
35
|
})
|
|
31
36
|
]),
|
|
32
37
|
default: o(() => [
|
|
33
|
-
e[
|
|
38
|
+
e[3] || (e[3] = n("div", null, " Sie können die Projektanlage später fortführen und Ihren bisherigen Fortschritt entweder verwerfen oder als Entwurf speichern. ", -1))
|
|
34
39
|
]),
|
|
35
40
|
_: 1,
|
|
36
|
-
__: [
|
|
41
|
+
__: [3]
|
|
37
42
|
}, 8, ["modelValue"]));
|
|
38
43
|
}
|
|
39
44
|
});
|
|
40
45
|
export {
|
|
41
|
-
|
|
46
|
+
y as default
|
|
42
47
|
};
|