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