@piveau/dpi 0.1.0-beta.39 → 0.1.0-beta.41
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/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 +1 -1
- 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/composables/useDpiSimpleLoader.js +128 -118
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +40 -28
- package/dist/data-provider-interface/views/InputPage.vue.js +375 -746
- package/package.json +2 -2
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
1
|
+
import { ref as f, reactive as O, onMounted as Z, createElementBlock as V, openBlock as h, normalizeClass as I, createCommentVNode as k, createBlock as j, Fragment as G, renderList as J, createElementVNode as x, createVNode as g, unref as c, toDisplayString as R, isRef as K } from "vue";
|
|
2
|
+
import Q from "../Dropdown.vue.js";
|
|
3
|
+
import X from "../TextAreaV3.vue.js";
|
|
4
|
+
import $ from "../ButtonV3.vue.js";
|
|
5
|
+
import Y from "../ModalSimpleV3.vue.js";
|
|
6
|
+
import A from "../InputField.vue.js";
|
|
7
|
+
import { PhWarning as ee } from "@phosphor-icons/vue";
|
|
8
|
+
import { useFormValues as te } from "../../../composables/useDpiFormValues.js";
|
|
8
9
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
const
|
|
10
|
+
import ae from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const le = { class: "dpiV3_LinkAndMetadata" }, ie = {
|
|
11
12
|
key: 0,
|
|
12
|
-
class: "
|
|
13
|
-
},
|
|
13
|
+
class: "dpiV3_errorMessage"
|
|
14
|
+
}, oe = { class: "copy-mini-regular" }, se = {
|
|
14
15
|
key: 1,
|
|
15
16
|
class: "copy-mini-regular dpiV3_text_error"
|
|
16
|
-
},
|
|
17
|
+
}, de = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "dpiV3_tempAddMore"
|
|
19
|
-
},
|
|
20
|
+
}, ne = {
|
|
20
21
|
__name: "DocumentationsV3",
|
|
21
22
|
props: {
|
|
22
23
|
documentations: { type: Array, required: !0 },
|
|
@@ -26,113 +27,125 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
26
27
|
showDeleteButton: { type: Boolean, required: !1, default: !1 }
|
|
27
28
|
},
|
|
28
29
|
emits: ["update"],
|
|
29
|
-
setup(r, { emit:
|
|
30
|
-
const { formValues:
|
|
31
|
-
let
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
function x(e, l) {
|
|
38
|
-
const t = l == null ? void 0 : l.trim();
|
|
39
|
-
return t ? B(t) ? (e.showErrorURL = !1, e.urlErrorMessage = "", !0) : (e.showErrorURL = !0, e.urlErrorMessage = "Bitte geben Sie eine gültige URL ein", !1) : (e.showErrorURL = !1, e.urlErrorMessage = "", !0);
|
|
40
|
-
}
|
|
41
|
-
P(() => {
|
|
42
|
-
o.documentations.length === 0 && V("update", [
|
|
30
|
+
setup(r, { expose: z, emit: E }) {
|
|
31
|
+
const { formValues: P } = te();
|
|
32
|
+
let p = f({});
|
|
33
|
+
const i = r, y = E, d = f([...i.fileTypes]), B = f(!1), F = f(null), o = O({});
|
|
34
|
+
let U = f(!1);
|
|
35
|
+
Z(() => {
|
|
36
|
+
i.documentations.length === 0 && y("update", [
|
|
43
37
|
{
|
|
44
38
|
id: 1,
|
|
45
39
|
"dcat:accessURL": "",
|
|
46
40
|
"dct:format": "",
|
|
47
41
|
"dct:title": "",
|
|
48
42
|
"dct:description": "",
|
|
49
|
-
"formatUri:": ""
|
|
50
|
-
showErrorURL: !1,
|
|
51
|
-
urlErrorMessage: ""
|
|
43
|
+
"formatUri:": ""
|
|
52
44
|
}
|
|
53
45
|
]);
|
|
54
46
|
});
|
|
55
|
-
const
|
|
47
|
+
const v = (e) => {
|
|
48
|
+
if (!e || e.trim() === "") return !1;
|
|
49
|
+
const l = e.trim();
|
|
50
|
+
return /\.[a-zA-Z]{2,}$/.test(l);
|
|
51
|
+
}, w = (e) => {
|
|
52
|
+
const l = e["dct:title"] && e["dct:title"].trim() !== "", t = e["dct:description"] && e["dct:description"].trim() !== "", a = e["dct:format"] && e["dct:format"].trim !== "" && (typeof e["dct:format"] == "string" ? e["dct:format"].trim() !== "" : !0);
|
|
53
|
+
return l || t || a;
|
|
54
|
+
}, L = (e) => {
|
|
55
|
+
const l = i.documentations.find((t) => t.id === e);
|
|
56
|
+
if (l) {
|
|
57
|
+
const t = l["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
|
|
58
|
+
w(l) ? a ? v(a) ? o[e] = null : o[e] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : o[e] = "URL ist erforderlich" : a && !v(a) ? o[e] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : o[e] = null;
|
|
59
|
+
}
|
|
60
|
+
}, S = () => {
|
|
61
|
+
let e = !1;
|
|
62
|
+
return i.documentations.forEach((l) => {
|
|
63
|
+
const t = l["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
|
|
64
|
+
w(l) ? a ? v(a) || (o[l.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0) : (o[l.id] = "URL ist erforderlich", e = !0) : a && !v(a) && (o[l.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0);
|
|
65
|
+
}), e;
|
|
66
|
+
}, M = (e) => {
|
|
56
67
|
switch (e) {
|
|
57
68
|
case "delete":
|
|
58
|
-
|
|
69
|
+
N();
|
|
59
70
|
break;
|
|
60
71
|
}
|
|
61
|
-
},
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
const a = typeof e == "string" ? e.trim().toUpperCase() : (
|
|
65
|
-
a.length > 0 ?
|
|
66
|
-
(
|
|
67
|
-
) :
|
|
68
|
-
},
|
|
72
|
+
}, _ = (e, l, t = null) => {
|
|
73
|
+
var n, s;
|
|
74
|
+
d.value = [...i.fileTypes];
|
|
75
|
+
const a = typeof e == "string" ? e.trim().toUpperCase() : (s = (n = e == null ? void 0 : e.target) == null ? void 0 : n.value) == null ? void 0 : s.trim().toUpperCase();
|
|
76
|
+
a.length > 0 ? d.value = i.fileTypes.filter(
|
|
77
|
+
(T) => T["@value"].toUpperCase().startsWith(a)
|
|
78
|
+
) : d.value = [...i.fileTypes];
|
|
79
|
+
}, W = () => {
|
|
80
|
+
if (S())
|
|
81
|
+
return;
|
|
69
82
|
const l = {
|
|
70
|
-
id: (
|
|
83
|
+
id: (i.documentations.length ? Math.max(...i.documentations.map((t) => t.id)) : 0) + 1,
|
|
71
84
|
"dcat:accessURL": "",
|
|
72
85
|
"dct:format": "",
|
|
73
86
|
"dct:title": "",
|
|
74
87
|
"dct:description": "",
|
|
75
|
-
"formatUri:": ""
|
|
76
|
-
showErrorURL: !1,
|
|
77
|
-
urlErrorMessage: ""
|
|
88
|
+
"formatUri:": ""
|
|
78
89
|
};
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
const t =
|
|
83
|
-
(
|
|
84
|
-
), a =
|
|
85
|
-
|
|
86
|
-
(
|
|
90
|
+
y("update", [...i.documentations, l]);
|
|
91
|
+
}, q = (e, l) => {
|
|
92
|
+
d.value = [...i.fileTypes];
|
|
93
|
+
const t = d.value.find(
|
|
94
|
+
(s) => s["@value"] === e
|
|
95
|
+
), a = f(
|
|
96
|
+
P.value.DistributionSimple["dcat:distribution"].find(
|
|
97
|
+
(s) => s.id === i.distributionId
|
|
87
98
|
)
|
|
88
|
-
),
|
|
89
|
-
a.value.documentations.find((
|
|
99
|
+
), n = f(
|
|
100
|
+
a.value.documentations.find((s) => s.id === l)
|
|
90
101
|
);
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
var
|
|
102
|
+
n.value === void 0 || (n.value.formatUri = t.uri), D(e, "dct:format", l);
|
|
103
|
+
}, D = (e, l, t) => {
|
|
104
|
+
var n, s, T;
|
|
94
105
|
let a = "";
|
|
95
106
|
if (l === "dcat:accessURL") {
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
(
|
|
107
|
+
const u = typeof e == "string" ? e : ((n = e == null ? void 0 : e.target) == null ? void 0 : n.value) ?? "";
|
|
108
|
+
a = i.documentations.map(
|
|
109
|
+
(b) => b.id === t ? { ...b, [l]: u } : b
|
|
99
110
|
);
|
|
100
111
|
} else if (l === "dct:format") {
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
(
|
|
105
|
-
) :
|
|
106
|
-
const
|
|
107
|
-
(
|
|
112
|
+
d.value = [...i.fileTypes];
|
|
113
|
+
const u = typeof e == "string" ? e.trim().toUpperCase() : (T = (s = e == null ? void 0 : e.target) == null ? void 0 : s.value) == null ? void 0 : T.trim().toUpperCase();
|
|
114
|
+
u.length > 0 ? d.value = i.fileTypes.filter(
|
|
115
|
+
(m) => m["@value"].toUpperCase().startsWith(u)
|
|
116
|
+
) : d.value = [...i.fileTypes];
|
|
117
|
+
const b = d.value.find(
|
|
118
|
+
(m) => m["@value"] === e
|
|
108
119
|
);
|
|
109
|
-
a =
|
|
110
|
-
(
|
|
120
|
+
a = i.documentations.map(
|
|
121
|
+
(m) => m.id === t ? { ...m, [l]: b["@value"], formatUri: b.uri } : m
|
|
111
122
|
);
|
|
112
123
|
} else
|
|
113
|
-
a =
|
|
114
|
-
(
|
|
124
|
+
a = i.documentations.map(
|
|
125
|
+
(u) => u.id === t ? { ...u, [l]: e.target.value } : u
|
|
115
126
|
);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
y("update", a), setTimeout(() => {
|
|
128
|
+
L(t);
|
|
129
|
+
}, 0);
|
|
130
|
+
}, H = (e) => {
|
|
131
|
+
p.value = {
|
|
119
132
|
button: "Löschen",
|
|
120
133
|
header: "Dokumentation löschen",
|
|
121
134
|
text: "Sind Sie sicher, dass Sie die Dokumentation löschen wollen?",
|
|
122
135
|
action: "delete",
|
|
123
136
|
optionalString_1: e["dct:title"],
|
|
124
137
|
optionalString_2: e["dcat:accessURL"]
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
if (
|
|
128
|
-
|
|
138
|
+
}, U.value = !0, F.value = e;
|
|
139
|
+
}, N = () => {
|
|
140
|
+
if (i.documentations.length === 1) {
|
|
141
|
+
B.value = !0;
|
|
129
142
|
return;
|
|
130
143
|
}
|
|
131
|
-
const e =
|
|
132
|
-
(l) => l.id !==
|
|
144
|
+
const e = i.documentations.filter(
|
|
145
|
+
(l) => l.id !== F.value.id
|
|
133
146
|
);
|
|
134
|
-
|
|
135
|
-
},
|
|
147
|
+
delete o[F.value.id], y("update", e);
|
|
148
|
+
}, C = (e, l) => {
|
|
136
149
|
switch (e) {
|
|
137
150
|
case "dct:description":
|
|
138
151
|
l["dct:description"] = "";
|
|
@@ -144,17 +157,22 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
144
157
|
l["dct:format"] = "";
|
|
145
158
|
break;
|
|
146
159
|
}
|
|
160
|
+
setTimeout(() => {
|
|
161
|
+
L(l.id);
|
|
162
|
+
}, 0);
|
|
147
163
|
};
|
|
148
|
-
return (
|
|
149
|
-
|
|
164
|
+
return z({
|
|
165
|
+
validateAllItems: S
|
|
166
|
+
}), (e, l) => (h(), V("div", {
|
|
167
|
+
class: I(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: r.asCard }])
|
|
150
168
|
}, [
|
|
151
|
-
(
|
|
169
|
+
(h(!0), V(G, null, J(r.documentations, (t) => (h(), V("div", {
|
|
152
170
|
key: t.id,
|
|
153
|
-
class:
|
|
171
|
+
class: I(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: r.asCard }])
|
|
154
172
|
}, [
|
|
155
|
-
|
|
156
|
-
g(
|
|
157
|
-
onInput: (a) =>
|
|
173
|
+
x("div", le, [
|
|
174
|
+
g(A, {
|
|
175
|
+
onInput: (a) => D(a, "dcat:accessURL", t.id),
|
|
158
176
|
addOnText: !1,
|
|
159
177
|
datePicker: !1,
|
|
160
178
|
infoIcon: !1,
|
|
@@ -168,15 +186,18 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
168
186
|
"message.dataupload.datasets.dcat:distribution.advanced.documentation.dcat:downloadURL-label"
|
|
169
187
|
),
|
|
170
188
|
showEndIcon: !1,
|
|
171
|
-
showError: t.showErrorURL,
|
|
172
189
|
modelValue: t["dcat:accessURL"],
|
|
173
190
|
"onUpdate:modelValue": (a) => t["dcat:accessURL"] = a
|
|
174
|
-
}, null, 8, ["onInput", "placeholder", "label", "
|
|
175
|
-
t.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
191
|
+
}, null, 8, ["onInput", "placeholder", "label", "modelValue", "onUpdate:modelValue"]),
|
|
192
|
+
o[t.id] ? (h(), V("div", ie, [
|
|
193
|
+
g(c(ee), {
|
|
194
|
+
size: 16,
|
|
195
|
+
weight: "fill"
|
|
196
|
+
}),
|
|
197
|
+
x("span", oe, R(o[t.id]), 1)
|
|
198
|
+
])) : k("", !0),
|
|
199
|
+
g(A, {
|
|
200
|
+
onInput: (a) => D(a, "dct:title", t.id),
|
|
180
201
|
addOnText: !1,
|
|
181
202
|
datePicker: !1,
|
|
182
203
|
infoIcon: !1,
|
|
@@ -193,10 +214,10 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
193
214
|
modelValue: t["dct:title"],
|
|
194
215
|
"onUpdate:modelValue": (a) => t["dct:title"] = a,
|
|
195
216
|
defaultInput: !r.showDeleteButton,
|
|
196
|
-
onDeleteButtonClicked: (a) =>
|
|
217
|
+
onDeleteButtonClicked: (a) => C("dct:title", t)
|
|
197
218
|
}, null, 8, ["onInput", "placeholder", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
|
|
198
|
-
g(
|
|
199
|
-
onInput: (a) =>
|
|
219
|
+
g(X, {
|
|
220
|
+
onInput: (a) => D(a, "dct:description", t.id),
|
|
200
221
|
hint: !1,
|
|
201
222
|
label: e.$t(
|
|
202
223
|
"message.dataupload.datasets.dcat:distribution.advanced.documentation.description"
|
|
@@ -207,11 +228,11 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
207
228
|
modelValue: t["dct:description"],
|
|
208
229
|
"onUpdate:modelValue": (a) => t["dct:description"] = a,
|
|
209
230
|
showDeleteButton: r.showDeleteButton,
|
|
210
|
-
onDeleteClicked: (a) =>
|
|
231
|
+
onDeleteClicked: (a) => C("dct:description", t)
|
|
211
232
|
}, null, 8, ["onInput", "label", "placeholder", "modelValue", "onUpdate:modelValue", "showDeleteButton", "onDeleteClicked"]),
|
|
212
|
-
g(
|
|
213
|
-
"onUpdate:modelValue": [(a) =>
|
|
214
|
-
onInput: l[0] || (l[0] = (a) =>
|
|
233
|
+
g(Q, {
|
|
234
|
+
"onUpdate:modelValue": [(a) => q(a, t.id), (a) => t["dct:format"] = a],
|
|
235
|
+
onInput: l[0] || (l[0] = (a) => _(a)),
|
|
215
236
|
dropdownWidth: "large",
|
|
216
237
|
type: "inputField",
|
|
217
238
|
modelValue: t["dct:format"],
|
|
@@ -232,15 +253,15 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
232
253
|
modelValue: t["dct:format"].uri,
|
|
233
254
|
defaultInput: !r.showDeleteButton
|
|
234
255
|
},
|
|
235
|
-
data:
|
|
256
|
+
data: d.value,
|
|
236
257
|
autocomplete: !0,
|
|
237
|
-
onDeleteDropdownField: (a) =>
|
|
258
|
+
onDeleteDropdownField: (a) => C("dct:format", t)
|
|
238
259
|
}, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data", "onDeleteDropdownField"]),
|
|
239
|
-
|
|
260
|
+
B.value && r.documentations.length === 1 ? (h(), V("p", se, R(e.$t(
|
|
240
261
|
"message.dataupload.datasets.dcat:distribution.advanced.documentation.error-message"
|
|
241
|
-
)), 1)) :
|
|
262
|
+
)), 1)) : k("", !0)
|
|
242
263
|
]),
|
|
243
|
-
g(
|
|
264
|
+
g($, {
|
|
244
265
|
class: "dpiV3_tempAddMore",
|
|
245
266
|
buttonText: e.$t(
|
|
246
267
|
"message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
|
|
@@ -248,34 +269,34 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
|
|
|
248
269
|
size: "small",
|
|
249
270
|
iconStart: "trash",
|
|
250
271
|
variant: "tertiary",
|
|
251
|
-
onClick: (a) =>
|
|
272
|
+
onClick: (a) => H(t)
|
|
252
273
|
}, null, 8, ["buttonText", "onClick"])
|
|
253
274
|
], 2))), 128)),
|
|
254
|
-
r.asCard ?
|
|
255
|
-
g(
|
|
275
|
+
r.asCard ? k("", !0) : (h(), V("div", de, [
|
|
276
|
+
g($, {
|
|
256
277
|
buttonText: e.$t(
|
|
257
278
|
"message.dataupload.datasets.dcat:distribution.advanced.documentation.add-another"
|
|
258
279
|
),
|
|
259
280
|
size: "small",
|
|
260
281
|
iconStart: "plus",
|
|
261
282
|
variant: "tertiary",
|
|
262
|
-
onClick:
|
|
283
|
+
onClick: W
|
|
263
284
|
}, null, 8, ["buttonText"])
|
|
264
285
|
])),
|
|
265
|
-
|
|
286
|
+
c(U) ? (h(), j(Y, {
|
|
266
287
|
key: 1,
|
|
267
|
-
buttons:
|
|
268
|
-
headerText:
|
|
269
|
-
text:
|
|
270
|
-
onClose: l[1] || (l[1] = (t) =>
|
|
271
|
-
action:
|
|
272
|
-
onActionHandling: l[2] || (l[2] = (t) =>
|
|
273
|
-
optionalString_1:
|
|
274
|
-
optionalString_2:
|
|
275
|
-
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) :
|
|
288
|
+
buttons: c(p).button,
|
|
289
|
+
headerText: c(p).header,
|
|
290
|
+
text: c(p).text,
|
|
291
|
+
onClose: l[1] || (l[1] = (t) => K(U) ? U.value = !1 : U = !1),
|
|
292
|
+
action: c(p).action,
|
|
293
|
+
onActionHandling: l[2] || (l[2] = (t) => M(t)),
|
|
294
|
+
optionalString_1: c(p).optionalString_1,
|
|
295
|
+
optionalString_2: c(p).optionalString_2
|
|
296
|
+
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : k("", !0)
|
|
276
297
|
], 2));
|
|
277
298
|
}
|
|
278
|
-
},
|
|
299
|
+
}, Ue = /* @__PURE__ */ ae(ne, [["__scopeId", "data-v-24c22e25"]]);
|
|
279
300
|
export {
|
|
280
|
-
|
|
301
|
+
Ue as default
|
|
281
302
|
};
|
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ref as d, onMounted as C, createElementBlock as u, openBlock as r, normalizeClass as f, createBlock as L, createCommentVNode as y, Fragment as U, renderList as h, createElementVNode as R, createVNode as k, unref as n, isRef as w } from "vue";
|
|
2
|
+
import A from "../ModalSimpleV3.vue.js";
|
|
3
|
+
import B from "../InputField.vue.js";
|
|
4
|
+
import { useFormValues as P } from "../../../composables/useDpiFormValues.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
6
|
+
import M from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const S = { class: "dpiV3_LinkAndMetadata" }, T = {
|
|
7
8
|
key: 0,
|
|
8
9
|
class: "copy-mini-regular dpiV3_text_error"
|
|
9
|
-
},
|
|
10
|
+
}, D = {
|
|
10
11
|
__name: "PolicyV3",
|
|
11
12
|
props: {
|
|
12
13
|
policyItems: { type: Array, required: !0 },
|
|
@@ -14,52 +15,51 @@ const B = { class: "dpiV3_LinkAndMetadata" }, M = {
|
|
|
14
15
|
asCard: { type: Boolean, required: !1, default: !1 }
|
|
15
16
|
},
|
|
16
17
|
emits: ["update"],
|
|
17
|
-
setup(a, { emit:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
setup(a, { emit: I }) {
|
|
19
|
+
const { formValues: v } = P();
|
|
20
|
+
let l = d({});
|
|
21
|
+
const s = a, m = I, p = d(!1), V = d(null);
|
|
22
|
+
let c = d(!1);
|
|
21
23
|
C(() => {
|
|
22
24
|
console.log(
|
|
23
25
|
"Component Mounted: policyItems received for distributionId:",
|
|
24
|
-
|
|
25
|
-
),
|
|
26
|
+
s.distributionId
|
|
27
|
+
), s.policyItems.length === 0 && m("update", [
|
|
26
28
|
{
|
|
27
29
|
id: 1,
|
|
28
30
|
"dcat:downloadURL": ""
|
|
29
31
|
}
|
|
30
32
|
]);
|
|
31
33
|
});
|
|
32
|
-
const
|
|
33
|
-
switch (
|
|
34
|
+
const g = (i) => {
|
|
35
|
+
switch (i) {
|
|
34
36
|
case "delete":
|
|
35
|
-
|
|
37
|
+
b();
|
|
36
38
|
break;
|
|
37
39
|
}
|
|
38
|
-
}, _ = (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (i.policyItems.length === 1) {
|
|
45
|
-
f.value = !0;
|
|
40
|
+
}, _ = (i, t, e) => {
|
|
41
|
+
let o = d(v.value.DistributionSimple["dcat:distribution"].find((x) => x.id === e));
|
|
42
|
+
o.value.policyItems === void 0 && (o.value.policyItems = [{ "dcat:downloadURL": "" }]), o.value.policyItems[0]["dcat:downloadURL"] = i.target.value;
|
|
43
|
+
}, b = () => {
|
|
44
|
+
if (s.policyItems.length === 1) {
|
|
45
|
+
p.value = !0;
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
(t) => t.id !==
|
|
48
|
+
const i = s.policyItems.filter(
|
|
49
|
+
(t) => t.id !== V.value.id
|
|
50
50
|
);
|
|
51
|
-
m("update",
|
|
51
|
+
m("update", i);
|
|
52
52
|
};
|
|
53
|
-
return (
|
|
54
|
-
class:
|
|
53
|
+
return (i, t) => (r(), u("div", {
|
|
54
|
+
class: f(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: a.asCard }])
|
|
55
55
|
}, [
|
|
56
|
-
(r(!0), u(
|
|
56
|
+
(r(!0), u(U, null, h(a.policyItems, (e) => (r(), u("div", {
|
|
57
57
|
key: e.id,
|
|
58
|
-
class:
|
|
58
|
+
class: f(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: a.asCard }])
|
|
59
59
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onInput: (
|
|
60
|
+
R("div", S, [
|
|
61
|
+
k(B, {
|
|
62
|
+
onInput: (o) => _(o, "dcat:downloadURL", e.id),
|
|
63
63
|
addOnText: !1,
|
|
64
64
|
datePicker: !1,
|
|
65
65
|
infoIcon: !1,
|
|
@@ -70,24 +70,24 @@ const B = { class: "dpiV3_LinkAndMetadata" }, M = {
|
|
|
70
70
|
label: "URL",
|
|
71
71
|
showEndIcon: !1,
|
|
72
72
|
modelValue: e["dcat:downloadURL"],
|
|
73
|
-
"onUpdate:modelValue": (
|
|
73
|
+
"onUpdate:modelValue": (o) => e["dcat:downloadURL"] = o
|
|
74
74
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
|
|
75
|
-
|
|
75
|
+
p.value && a.policyItems.length === 1 ? (r(), u("p", T, " Mindestens eine URL muss vorhanden sein. ")) : y("", !0)
|
|
76
76
|
])
|
|
77
77
|
], 2))), 128)),
|
|
78
|
-
n(
|
|
78
|
+
n(c) ? (r(), L(A, {
|
|
79
79
|
key: 0,
|
|
80
80
|
buttons: n(l).button,
|
|
81
81
|
headerText: n(l).header,
|
|
82
82
|
text: n(l).text,
|
|
83
|
-
onClose: t[0] || (t[0] = (e) =>
|
|
83
|
+
onClose: t[0] || (t[0] = (e) => w(c) ? c.value = !1 : c = !1),
|
|
84
84
|
action: n(l).action,
|
|
85
|
-
onActionHandling: t[1] || (t[1] = (e) =>
|
|
85
|
+
onActionHandling: t[1] || (t[1] = (e) => g(e)),
|
|
86
86
|
optionalString_1: n(l).optionalString_1
|
|
87
|
-
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1"])) :
|
|
87
|
+
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1"])) : y("", !0)
|
|
88
88
|
], 2));
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, W = /* @__PURE__ */ M(D, [["__scopeId", "data-v-1746259d"]]);
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
W as default
|
|
93
93
|
};
|