@piveau/dpi 0.1.0-beta.39 → 0.1.0-beta.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.
- package/dist/assets/dpi.css +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +393 -314
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +105 -69
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +95 -57
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +83 -55
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +116 -75
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +145 -124
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +41 -41
- package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +123 -108
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +440 -258
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +37 -32
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +6 -6
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +183 -126
- package/dist/data-provider-interface/components/ContactPage.vue.js +95 -89
- package/dist/data-provider-interface/components/DistLicense.vue.js +224 -133
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +401 -396
- package/dist/data-provider-interface/components/HVDPage.vue.js +56 -55
- package/dist/data-provider-interface/components/PublisherPage.vue.js +94 -89
- package/dist/data-provider-interface/components/TempResPage.vue.js +122 -104
- package/dist/data-provider-interface/components/TempResPageInModal.vue.js +249 -108
- package/dist/data-provider-interface/components/VisibilityPage.vue.js +86 -0
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +128 -118
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +40 -28
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +4 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.js +421 -767
- package/dist/form/inputDefinitions.js +15 -10
- package/package.json +2 -2
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { ref as h, reactive as T, onMounted as z, createElementBlock as c, openBlock as r, normalizeClass as L, createCommentVNode as g, createBlock as D, Fragment as M, renderList as E, createElementVNode as S, createVNode as u, unref as d, toDisplayString as N, isRef as P } from "vue";
|
|
2
|
+
import q from "../TextAreaV3.vue.js";
|
|
3
|
+
import w from "../ButtonV3.vue.js";
|
|
4
|
+
import W from "../ModalSimpleV3.vue.js";
|
|
5
|
+
import _ from "../InputField.vue.js";
|
|
6
|
+
import { PhWarning as $ } from "@phosphor-icons/vue";
|
|
6
7
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
const
|
|
8
|
+
import H from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
|
|
9
10
|
key: 0,
|
|
11
|
+
class: "dpiV3_errorMessage"
|
|
12
|
+
}, j = { class: "copy-mini-regular" }, G = {
|
|
13
|
+
key: 1,
|
|
10
14
|
class: "copy-mini-regular dpiV3_text_error"
|
|
11
|
-
},
|
|
15
|
+
}, J = {
|
|
12
16
|
key: 0,
|
|
13
17
|
class: "dpiV3_tempAddMore"
|
|
14
|
-
},
|
|
18
|
+
}, K = {
|
|
15
19
|
__name: "AccessServiceV3",
|
|
16
20
|
props: {
|
|
17
21
|
accessServices: { type: Array, required: !0 },
|
|
@@ -20,12 +24,12 @@ const z = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
20
24
|
showDeleteButton: { type: Boolean, required: !1, default: !1 }
|
|
21
25
|
},
|
|
22
26
|
emits: ["update"],
|
|
23
|
-
setup(a, { emit:
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
console.log("Component Mounted: accessServices received for distributionId:",
|
|
27
|
+
setup(a, { expose: A, emit: R }) {
|
|
28
|
+
let s = h({});
|
|
29
|
+
const l = a, m = R, x = h(!1), V = h(null), o = T({});
|
|
30
|
+
let p = h(!1);
|
|
31
|
+
z(() => {
|
|
32
|
+
console.log("Component Mounted: accessServices received for distributionId:", l.distributionId), console.log("accessServices:", l.accessServices), l.accessServices.length === 0 && (console.log("No accessServices found, initializing first service."), m("update", [
|
|
29
33
|
{
|
|
30
34
|
id: 1,
|
|
31
35
|
"dcat:downloadURL": "",
|
|
@@ -34,54 +38,79 @@ const z = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
34
38
|
}
|
|
35
39
|
]));
|
|
36
40
|
});
|
|
37
|
-
const
|
|
38
|
-
|
|
41
|
+
const f = (t) => {
|
|
42
|
+
if (!t || t.trim() === "") return !1;
|
|
43
|
+
const i = t.trim();
|
|
44
|
+
return /\.[a-zA-Z]{2,}$/.test(i);
|
|
45
|
+
}, B = (t) => {
|
|
46
|
+
const i = t["dct:title"] && t["dct:title"].trim() !== "", e = t["dct:description"] && t["dct:description"].trim() !== "";
|
|
47
|
+
return i || e;
|
|
48
|
+
}, I = (t) => {
|
|
49
|
+
const i = l.accessServices.find((e) => e.id === t);
|
|
50
|
+
if (i) {
|
|
51
|
+
const e = i["dcat:downloadURL"] ? i["dcat:downloadURL"].trim() : "";
|
|
52
|
+
B(i) ? e ? f(e) ? o[t] = null : o[t] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : o[t] = "URL ist erforderlich" : e && !f(e) ? o[t] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : o[t] = null;
|
|
53
|
+
}
|
|
54
|
+
}, b = () => {
|
|
55
|
+
let t = !1;
|
|
56
|
+
return l.accessServices.forEach((i) => {
|
|
57
|
+
const e = i["dcat:downloadURL"] ? i["dcat:downloadURL"].trim() : "";
|
|
58
|
+
B(i) ? e ? f(e) || (o[i.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", t = !0) : (o[i.id] = "URL ist erforderlich", t = !0) : e && !f(e) && (o[i.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", t = !0);
|
|
59
|
+
}), t;
|
|
60
|
+
}, k = (t) => {
|
|
61
|
+
switch (t) {
|
|
39
62
|
case "delete":
|
|
40
|
-
|
|
63
|
+
F();
|
|
41
64
|
break;
|
|
42
65
|
}
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
66
|
+
}, y = () => {
|
|
67
|
+
if (b())
|
|
68
|
+
return;
|
|
69
|
+
const i = {
|
|
70
|
+
id: (l.accessServices.length ? Math.max(...l.accessServices.map((e) => e.id)) : 0) + 1,
|
|
46
71
|
"dcat:downloadURL": "",
|
|
47
72
|
"dct:title": "",
|
|
48
73
|
"dct:description": ""
|
|
49
74
|
};
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
const
|
|
53
|
-
(v) => v.id === e ? { ...v, [
|
|
75
|
+
m("update", [...l.accessServices, i]);
|
|
76
|
+
}, U = (t, i, e) => {
|
|
77
|
+
const n = l.accessServices.map(
|
|
78
|
+
(v) => v.id === e ? { ...v, [i]: t.target.value } : v
|
|
54
79
|
);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
80
|
+
m("update", n), setTimeout(() => {
|
|
81
|
+
I(e);
|
|
82
|
+
}, 0);
|
|
83
|
+
}, C = (t) => {
|
|
84
|
+
s.value = {
|
|
58
85
|
button: "Löschen",
|
|
59
86
|
header: "Datenservice löschen",
|
|
60
87
|
text: "Sind Sie sicher, dass Sie den Service löschen wollen?",
|
|
61
88
|
action: "delete",
|
|
62
|
-
optionalString_1:
|
|
63
|
-
optionalString_2:
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
if (
|
|
67
|
-
|
|
89
|
+
optionalString_1: t["dct:title"],
|
|
90
|
+
optionalString_2: t["dcat:downloadURL"]
|
|
91
|
+
}, p.value = !0, V.value = t;
|
|
92
|
+
}, F = () => {
|
|
93
|
+
if (l.accessServices.length === 1) {
|
|
94
|
+
x.value = !0;
|
|
68
95
|
return;
|
|
69
96
|
}
|
|
70
|
-
const
|
|
71
|
-
(
|
|
97
|
+
const t = l.accessServices.filter(
|
|
98
|
+
(i) => i.id !== V.value.id
|
|
72
99
|
);
|
|
73
|
-
|
|
100
|
+
delete o[V.value.id], m("update", t);
|
|
74
101
|
};
|
|
75
|
-
return (
|
|
76
|
-
|
|
102
|
+
return A({
|
|
103
|
+
validateAllItems: b
|
|
104
|
+
}), (t, i) => (r(), c("div", {
|
|
105
|
+
class: L(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: a.asCard }])
|
|
77
106
|
}, [
|
|
78
|
-
(
|
|
107
|
+
(r(!0), c(M, null, E(a.accessServices, (e) => (r(), c("div", {
|
|
79
108
|
key: e.id,
|
|
80
|
-
class:
|
|
109
|
+
class: L(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: a.asCard }])
|
|
81
110
|
}, [
|
|
82
|
-
|
|
83
|
-
u(
|
|
84
|
-
onInput: (
|
|
111
|
+
S("div", O, [
|
|
112
|
+
u(_, {
|
|
113
|
+
onInput: (n) => U(n, "dcat:downloadURL", e.id),
|
|
85
114
|
addOnText: !1,
|
|
86
115
|
datePicker: !1,
|
|
87
116
|
infoIcon: !1,
|
|
@@ -92,10 +121,17 @@ const z = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
92
121
|
label: "URL",
|
|
93
122
|
showEndIcon: !1,
|
|
94
123
|
modelValue: e["dcat:downloadURL"],
|
|
95
|
-
"onUpdate:modelValue": (
|
|
124
|
+
"onUpdate:modelValue": (n) => e["dcat:downloadURL"] = n
|
|
96
125
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
|
|
97
|
-
|
|
98
|
-
|
|
126
|
+
o[e.id] ? (r(), c("div", Z, [
|
|
127
|
+
u(d($), {
|
|
128
|
+
size: 16,
|
|
129
|
+
weight: "fill"
|
|
130
|
+
}),
|
|
131
|
+
S("span", j, N(o[e.id]), 1)
|
|
132
|
+
])) : g("", !0),
|
|
133
|
+
u(_, {
|
|
134
|
+
onInput: (n) => U(n, "dct:title", e.id),
|
|
99
135
|
addOnText: !1,
|
|
100
136
|
datePicker: !1,
|
|
101
137
|
infoIcon: !1,
|
|
@@ -106,52 +142,52 @@ const z = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
106
142
|
label: "Titel (optional)",
|
|
107
143
|
showEndIcon: !1,
|
|
108
144
|
modelValue: e["dct:title"],
|
|
109
|
-
"onUpdate:modelValue": (
|
|
145
|
+
"onUpdate:modelValue": (n) => e["dct:title"] = n,
|
|
110
146
|
defaultInput: !a.showDeleteButton
|
|
111
147
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "defaultInput"]),
|
|
112
|
-
u(
|
|
113
|
-
onInput: (
|
|
148
|
+
u(q, {
|
|
149
|
+
onInput: (n) => U(n, "dct:description", e.id),
|
|
114
150
|
hint: !1,
|
|
115
151
|
label: "Beschreibung (optional)",
|
|
116
152
|
placeholder: "Bitte Beschreibung eingeben...",
|
|
117
153
|
modelValue: e["dct:description"],
|
|
118
|
-
"onUpdate:modelValue": (
|
|
154
|
+
"onUpdate:modelValue": (n) => e["dct:description"] = n,
|
|
119
155
|
showDeleteButton: a.showDeleteButton
|
|
120
156
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "showDeleteButton"]),
|
|
121
|
-
|
|
157
|
+
x.value && a.accessServices.length === 1 ? (r(), c("p", G, " Mindestens eine URL muss vorhanden sein. ")) : g("", !0)
|
|
122
158
|
]),
|
|
123
|
-
u(
|
|
159
|
+
u(w, {
|
|
124
160
|
class: "dpiV3_tempAddMore",
|
|
125
161
|
buttonText: "Löschen",
|
|
126
162
|
size: "small",
|
|
127
163
|
iconStart: "trash",
|
|
128
164
|
variant: "tertiary",
|
|
129
|
-
onClick: (
|
|
165
|
+
onClick: (n) => C(e)
|
|
130
166
|
}, null, 8, ["onClick"])
|
|
131
167
|
], 2))), 128)),
|
|
132
|
-
a.asCard ?
|
|
133
|
-
u(
|
|
168
|
+
a.asCard ? g("", !0) : (r(), c("div", J, [
|
|
169
|
+
u(w, {
|
|
134
170
|
buttonText: "Weiteren Service hinzufügen",
|
|
135
171
|
size: "small",
|
|
136
172
|
iconStart: "plus",
|
|
137
173
|
variant: "tertiary",
|
|
138
|
-
onClick:
|
|
174
|
+
onClick: y
|
|
139
175
|
})
|
|
140
176
|
])),
|
|
141
|
-
d(
|
|
177
|
+
d(p) ? (r(), D(W, {
|
|
142
178
|
key: 1,
|
|
143
|
-
buttons: d(
|
|
144
|
-
headerText: d(
|
|
145
|
-
text: d(
|
|
146
|
-
onClose:
|
|
147
|
-
action: d(
|
|
148
|
-
onActionHandling:
|
|
149
|
-
optionalString_1: d(
|
|
150
|
-
optionalString_2: d(
|
|
151
|
-
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) :
|
|
179
|
+
buttons: d(s).button,
|
|
180
|
+
headerText: d(s).header,
|
|
181
|
+
text: d(s).text,
|
|
182
|
+
onClose: i[0] || (i[0] = (e) => P(p) ? p.value = !1 : p = !1),
|
|
183
|
+
action: d(s).action,
|
|
184
|
+
onActionHandling: i[1] || (i[1] = (e) => k(e)),
|
|
185
|
+
optionalString_1: d(s).optionalString_1,
|
|
186
|
+
optionalString_2: d(s).optionalString_2
|
|
187
|
+
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : g("", !0)
|
|
152
188
|
], 2));
|
|
153
189
|
}
|
|
154
|
-
},
|
|
190
|
+
}, oe = /* @__PURE__ */ H(K, [["__scopeId", "data-v-a722a31b"]]);
|
|
155
191
|
export {
|
|
156
|
-
|
|
192
|
+
oe as default
|
|
157
193
|
};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { ref as s, onMounted as
|
|
2
|
-
import { getLicenses as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ref as s, onMounted as k, getCurrentInstance as B, watch as w, createElementBlock as c, openBlock as p, Fragment as F, createCommentVNode as g, createVNode as f, normalizeClass as N, unref as m, createElementVNode as b, toDisplayString as z } from "vue";
|
|
2
|
+
import { getLicenses as _ } from "../../services/dpiV3_apis.js";
|
|
3
|
+
import S from "../Dropdown.vue.js";
|
|
4
|
+
import E from "../InputField.vue.js";
|
|
5
|
+
import { PhWarning as y } from "@phosphor-icons/vue";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import
|
|
7
|
-
const
|
|
7
|
+
import P from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
|
+
const M = { key: 0 }, U = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "dpiV3_errorMessage"
|
|
11
|
+
}, H = { class: "copy-mini-regular" }, O = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "dpiV3_errorMessage"
|
|
14
|
+
}, W = { class: "copy-mini-regular" }, q = {
|
|
8
15
|
__name: "ChangeLicenseV3",
|
|
9
16
|
props: {
|
|
10
17
|
distributionId: { type: Number, required: !1 },
|
|
@@ -14,63 +21,80 @@ const k = { key: 0 }, y = {
|
|
|
14
21
|
asCard: { type: Boolean, default: !1 }
|
|
15
22
|
},
|
|
16
23
|
emits: ["addChangeLicense", "deleteButtonClicked"],
|
|
17
|
-
setup(o, { emit:
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
setup(o, { expose: D, emit: x }) {
|
|
25
|
+
let h = s([]);
|
|
26
|
+
const d = s(null), u = s(null);
|
|
27
|
+
k(async () => {
|
|
28
|
+
const t = B().appContext.app.config.globalProperties.$env;
|
|
21
29
|
try {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
"@value":
|
|
25
|
-
label:
|
|
30
|
+
const n = await _(t.api.baseUrl);
|
|
31
|
+
h.value = n.map((L) => ({
|
|
32
|
+
"@value": L.value,
|
|
33
|
+
label: L.label
|
|
26
34
|
}));
|
|
27
|
-
} catch (
|
|
28
|
-
console.error("Failed to load licenses",
|
|
35
|
+
} catch (n) {
|
|
36
|
+
console.error("Failed to load licenses", n);
|
|
29
37
|
}
|
|
30
38
|
});
|
|
31
|
-
const
|
|
39
|
+
const a = o, i = s(a.changeLicenseText);
|
|
32
40
|
s([]);
|
|
33
|
-
const
|
|
34
|
-
l.value =
|
|
41
|
+
const l = s(a.changeLicenseDropdownText), v = x, r = () => {
|
|
42
|
+
const e = typeof l.value == "string" ? l.value.trim() : "", t = typeof i.value == "string" ? i.value.trim() : "";
|
|
43
|
+
let n = !1;
|
|
44
|
+
return d.value = null, u.value = null, e && (e.toLowerCase().includes("cc-by") || e.toLowerCase().includes("cc by")) && (t || (u.value = "Nennung des Datenbereitstellers ist erforderlich für diese Lizenz", n = !0)), t && !e && (d.value = "Lizenz ist erforderlich wenn Nennung des Datenbereitstellers ausgefüllt ist", n = !0), n;
|
|
45
|
+
}, T = (e) => {
|
|
46
|
+
var n;
|
|
47
|
+
const t = typeof e == "string" ? e : ((n = e == null ? void 0 : e.target) == null ? void 0 : n.value) ?? "";
|
|
48
|
+
i.value = t, v(
|
|
35
49
|
"addChangeLicense",
|
|
50
|
+
i.value,
|
|
36
51
|
l.value,
|
|
37
|
-
a.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
a.distributionId
|
|
53
|
+
), setTimeout(() => {
|
|
54
|
+
r();
|
|
55
|
+
}, 0);
|
|
56
|
+
}, V = (e) => {
|
|
57
|
+
l.value = e, v(
|
|
42
58
|
"addChangeLicense",
|
|
59
|
+
i.value,
|
|
43
60
|
l.value,
|
|
44
|
-
a.
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
a.distributionId
|
|
62
|
+
), setTimeout(() => {
|
|
63
|
+
r();
|
|
64
|
+
}, 0);
|
|
47
65
|
};
|
|
48
|
-
|
|
49
|
-
() =>
|
|
50
|
-
(
|
|
51
|
-
|
|
66
|
+
w(
|
|
67
|
+
() => a.changeLicenseDropdownText,
|
|
68
|
+
(e) => {
|
|
69
|
+
l.value = e;
|
|
52
70
|
}
|
|
53
|
-
),
|
|
54
|
-
() =>
|
|
55
|
-
(
|
|
56
|
-
|
|
71
|
+
), w(
|
|
72
|
+
() => a.changeLicenseText,
|
|
73
|
+
(e) => {
|
|
74
|
+
i.value = e;
|
|
57
75
|
}
|
|
58
76
|
);
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
const C = () => {
|
|
78
|
+
l.value = "", setTimeout(() => {
|
|
79
|
+
r();
|
|
80
|
+
}, 0);
|
|
81
|
+
}, I = () => {
|
|
82
|
+
i.value = "", setTimeout(() => {
|
|
83
|
+
r();
|
|
84
|
+
}, 0);
|
|
63
85
|
};
|
|
64
|
-
return (
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
return D({
|
|
87
|
+
validate: r
|
|
88
|
+
}), (e, t) => (p(), c(F, null, [
|
|
89
|
+
o.asCard ? g("", !0) : (p(), c("p", M, " Die von Ihnen gewählte Lizenz bestimmt, wie andere Ihre Daten verwenden und teilen können. Je einfacher die Lizenz, desto besser. Um eine Wiederverwendung zu erleichtern, ist die Auswahl eines bereits verbreiteten Lizenzstandards zu empfehlen. ")),
|
|
90
|
+
f(S, {
|
|
67
91
|
"onUpdate:modelValue": [
|
|
68
|
-
|
|
69
|
-
|
|
92
|
+
t[0] || (t[0] = (n) => V(n)),
|
|
93
|
+
t[1] || (t[1] = (n) => l.value = n)
|
|
70
94
|
],
|
|
71
95
|
dropdownWidth: "large",
|
|
72
96
|
type: "inputField",
|
|
73
|
-
modelValue:
|
|
97
|
+
modelValue: l.value,
|
|
74
98
|
inputFieldProps: {
|
|
75
99
|
addOnText: !1,
|
|
76
100
|
initialHintText: !1,
|
|
@@ -81,17 +105,24 @@ const k = { key: 0 }, y = {
|
|
|
81
105
|
dropdown_dpiV3: !0,
|
|
82
106
|
placeholder: "Geben Sie die Lizenz ein...",
|
|
83
107
|
inputFieldSize: "large",
|
|
84
|
-
modelValue:
|
|
108
|
+
modelValue: l.value,
|
|
85
109
|
defaultInput: !o.showDeleteButton
|
|
86
110
|
},
|
|
87
|
-
data:
|
|
88
|
-
onDeleteDropdownField:
|
|
89
|
-
class:
|
|
111
|
+
data: m(h),
|
|
112
|
+
onDeleteDropdownField: C,
|
|
113
|
+
class: N({ dpiV3_Space3: o.showDeleteButton })
|
|
90
114
|
}, null, 8, ["modelValue", "inputFieldProps", "data", "class"]),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
115
|
+
d.value ? (p(), c("div", U, [
|
|
116
|
+
f(m(y), {
|
|
117
|
+
size: 16,
|
|
118
|
+
weight: "fill"
|
|
119
|
+
}),
|
|
120
|
+
b("span", H, z(d.value), 1)
|
|
121
|
+
])) : g("", !0),
|
|
122
|
+
f(E, {
|
|
123
|
+
onInput: t[2] || (t[2] = (n) => T(n)),
|
|
124
|
+
modelValue: i.value,
|
|
125
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => i.value = n),
|
|
95
126
|
addOnText: !1,
|
|
96
127
|
datePicker: !1,
|
|
97
128
|
infoIcon: !1,
|
|
@@ -102,12 +133,19 @@ const k = { key: 0 }, y = {
|
|
|
102
133
|
label: "Nennung des Datenbereitstellers",
|
|
103
134
|
showEndIcon: !1,
|
|
104
135
|
defaultInput: !o.showDeleteButton,
|
|
105
|
-
onDeleteButtonClicked:
|
|
136
|
+
onDeleteButtonClicked: I,
|
|
106
137
|
supportingHintMessage: "Dieser Namensnennungstext stellt sicher, dass die Lizenzbedingungen eingehalten werden."
|
|
107
|
-
}, null, 8, ["modelValue", "defaultInput"])
|
|
138
|
+
}, null, 8, ["modelValue", "defaultInput"]),
|
|
139
|
+
u.value ? (p(), c("div", O, [
|
|
140
|
+
f(m(y), {
|
|
141
|
+
size: 16,
|
|
142
|
+
weight: "fill"
|
|
143
|
+
}),
|
|
144
|
+
b("span", W, z(u.value), 1)
|
|
145
|
+
])) : g("", !0)
|
|
108
146
|
], 64));
|
|
109
147
|
}
|
|
110
|
-
},
|
|
148
|
+
}, R = /* @__PURE__ */ P(q, [["__scopeId", "data-v-5c32864f"]]);
|
|
111
149
|
export {
|
|
112
|
-
|
|
150
|
+
R as default
|
|
113
151
|
};
|
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { ref as n, onMounted as
|
|
2
|
-
import { useFormValues as
|
|
3
|
-
import { getChecksumAlgorithms as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { ref as n, onMounted as _, getCurrentInstance as A, watch as g, createElementBlock as f, openBlock as v, Fragment as E, createVNode as d, createCommentVNode as x, normalizeClass as z, createElementVNode as I, unref as V, toDisplayString as b } from "vue";
|
|
2
|
+
import { useFormValues as N } from "../../../composables/useDpiFormValues.js";
|
|
3
|
+
import { getChecksumAlgorithms as M } from "../../services/dpiV3_apis.js";
|
|
4
|
+
import O from "../Dropdown.vue.js";
|
|
5
|
+
import U from "../InputField.vue.js";
|
|
6
|
+
import { PhWarning as w } from "@phosphor-icons/vue";
|
|
6
7
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
const
|
|
8
|
+
import q from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const H = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "dpiV3_errorMessage"
|
|
12
|
+
}, W = { class: "copy-mini-regular" }, G = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "dpiV3_errorMessage"
|
|
15
|
+
}, $ = { class: "copy-mini-regular" }, j = {
|
|
9
16
|
__name: "ChecksumV3",
|
|
10
17
|
props: {
|
|
11
18
|
distributionId: { type: Number, required: !1 },
|
|
@@ -16,63 +23,70 @@ const P = {
|
|
|
16
23
|
distIndex: { type: Number, required: !1 }
|
|
17
24
|
},
|
|
18
25
|
emits: ["addChecksum", "deleteButtonClicked"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
26
|
+
setup(r, { expose: D, emit: T }) {
|
|
27
|
+
const c = n([]), { formValues: m } = N(), i = n(null), u = n(null);
|
|
28
|
+
_(async () => {
|
|
29
|
+
const t = A().appContext.app.config.globalProperties.$env;
|
|
23
30
|
try {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
"@value":
|
|
27
|
-
label:
|
|
31
|
+
const e = await M(t.api.baseUrl);
|
|
32
|
+
c.value = e.map((p) => ({
|
|
33
|
+
"@value": p.value,
|
|
34
|
+
label: p.label,
|
|
28
35
|
selected: !1,
|
|
29
|
-
uri:
|
|
36
|
+
uri: p.resource
|
|
30
37
|
}));
|
|
31
|
-
} catch (
|
|
32
|
-
console.error("Failed to load checksum algorithms:",
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.error("Failed to load checksum algorithms:", e);
|
|
33
40
|
}
|
|
34
41
|
});
|
|
35
|
-
const o =
|
|
42
|
+
const o = r, s = n(o.checksumText);
|
|
36
43
|
n([]);
|
|
37
|
-
const
|
|
38
|
-
let
|
|
39
|
-
const
|
|
40
|
-
|
|
44
|
+
const a = n(o.checksumDropdownText), h = T;
|
|
45
|
+
let k = "";
|
|
46
|
+
const y = () => {
|
|
47
|
+
const l = s.value && s.value.trim() !== "", t = a.value && a.value.trim() !== "";
|
|
48
|
+
let e = !1;
|
|
49
|
+
return l || t ? (l ? u.value = null : (u.value = "Prüfsumme ist erforderlich", e = !0), t ? i.value = null : (i.value = "Algorithmus ist erforderlich", e = !0)) : (u.value = null, i.value = null), !e;
|
|
50
|
+
}, C = () => !y(), F = (l) => {
|
|
51
|
+
s.value = l.target.value, h(
|
|
41
52
|
"addChecksum",
|
|
53
|
+
s.value,
|
|
42
54
|
a.value,
|
|
43
|
-
u.value,
|
|
44
55
|
o.distributionId
|
|
45
56
|
);
|
|
46
|
-
},
|
|
47
|
-
|
|
57
|
+
}, S = (l) => {
|
|
58
|
+
var t;
|
|
59
|
+
a.value = l, k = ((t = c.value.find((e) => e["@value"] === l)) == null ? void 0 : t.uri) || "", h(
|
|
48
60
|
"addChecksum",
|
|
61
|
+
s.value,
|
|
49
62
|
a.value,
|
|
50
|
-
u.value,
|
|
51
63
|
o.distributionId,
|
|
52
|
-
|
|
64
|
+
k
|
|
53
65
|
);
|
|
54
66
|
};
|
|
55
|
-
|
|
67
|
+
g(
|
|
56
68
|
() => o.checksumDropdownText,
|
|
57
69
|
(l) => {
|
|
58
|
-
|
|
70
|
+
a.value = l;
|
|
59
71
|
}
|
|
60
|
-
),
|
|
72
|
+
), g(
|
|
61
73
|
() => o.checksumText,
|
|
62
74
|
(l) => {
|
|
63
|
-
|
|
75
|
+
s.value = l;
|
|
64
76
|
}
|
|
65
77
|
);
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
78
|
+
const B = () => {
|
|
79
|
+
m.value.DistributionSimple["dcat:distribution"][o.distIndex].checksum.uri = "", m.value.DistributionSimple["dcat:distribution"][o.distIndex].checksum["spdx:checksum"] = "", a.value = "", i.value = null;
|
|
80
|
+
}, P = () => {
|
|
81
|
+
m.value.DistributionSimple["dcat:distribution"][o.distIndex].checksum.title = "", s.value = "", u.value = null;
|
|
70
82
|
};
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
return D({
|
|
84
|
+
validateAllItems: C
|
|
85
|
+
}), (l, t) => (v(), f(E, null, [
|
|
86
|
+
d(U, {
|
|
87
|
+
onInput: t[0] || (t[0] = (e) => F(e)),
|
|
88
|
+
modelValue: s.value,
|
|
89
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => s.value = e),
|
|
76
90
|
addOnText: !1,
|
|
77
91
|
datePicker: !1,
|
|
78
92
|
infoIcon: !1,
|
|
@@ -82,18 +96,25 @@ const P = {
|
|
|
82
96
|
initialHintText: !1,
|
|
83
97
|
label: "Prüfsumme",
|
|
84
98
|
showEndIcon: !1,
|
|
85
|
-
defaultInput: !
|
|
86
|
-
onDeleteButtonClicked:
|
|
87
|
-
class:
|
|
99
|
+
defaultInput: !r.showDeleteButton,
|
|
100
|
+
onDeleteButtonClicked: P,
|
|
101
|
+
class: z({ dpiV3_Space3: r.showDeleteButton })
|
|
88
102
|
}, null, 8, ["modelValue", "defaultInput", "class"]),
|
|
89
|
-
f(
|
|
103
|
+
u.value ? (v(), f("div", H, [
|
|
104
|
+
d(V(w), {
|
|
105
|
+
size: 16,
|
|
106
|
+
weight: "fill"
|
|
107
|
+
}),
|
|
108
|
+
I("span", W, b(u.value), 1)
|
|
109
|
+
])) : x("", !0),
|
|
110
|
+
d(O, {
|
|
90
111
|
"onUpdate:modelValue": [
|
|
91
|
-
|
|
92
|
-
|
|
112
|
+
t[2] || (t[2] = (e) => S(e)),
|
|
113
|
+
t[3] || (t[3] = (e) => a.value = e)
|
|
93
114
|
],
|
|
94
115
|
dropdownWidth: "large",
|
|
95
116
|
type: "inputField",
|
|
96
|
-
modelValue:
|
|
117
|
+
modelValue: a.value,
|
|
97
118
|
inputFieldProps: {
|
|
98
119
|
addOnText: !1,
|
|
99
120
|
initialHintText: !1,
|
|
@@ -104,15 +125,22 @@ const P = {
|
|
|
104
125
|
dropdown_dpiV3: !0,
|
|
105
126
|
placeholder: "Geben Sie den Algorithmus ein...",
|
|
106
127
|
inputFieldSize: "large",
|
|
107
|
-
modelValue:
|
|
108
|
-
defaultInput: !
|
|
128
|
+
modelValue: a.value,
|
|
129
|
+
defaultInput: !r.showDeleteButton
|
|
109
130
|
},
|
|
110
|
-
data:
|
|
111
|
-
onDeleteDropdownField:
|
|
112
|
-
}, null, 8, ["modelValue", "inputFieldProps", "data"])
|
|
131
|
+
data: c.value,
|
|
132
|
+
onDeleteDropdownField: B
|
|
133
|
+
}, null, 8, ["modelValue", "inputFieldProps", "data"]),
|
|
134
|
+
i.value ? (v(), f("div", G, [
|
|
135
|
+
d(V(w), {
|
|
136
|
+
size: 16,
|
|
137
|
+
weight: "fill"
|
|
138
|
+
}),
|
|
139
|
+
I("span", $, b(i.value), 1)
|
|
140
|
+
])) : x("", !0)
|
|
113
141
|
], 64));
|
|
114
142
|
}
|
|
115
|
-
},
|
|
143
|
+
}, ee = /* @__PURE__ */ q(j, [["__scopeId", "data-v-d9583dd7"]]);
|
|
116
144
|
export {
|
|
117
|
-
|
|
145
|
+
ee as default
|
|
118
146
|
};
|