@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
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ref as h, reactive as R, computed as N, onMounted as P, createElementBlock as u, openBlock as r, normalizeClass as S, createCommentVNode as V, createBlock as q, Fragment as W, renderList as H, createElementVNode as I, createVNode as f, unref as l, isRef as O } from "vue";
|
|
2
|
+
import w from "../ButtonV3.vue.js";
|
|
3
|
+
import j from "../ModalSimpleV3.vue.js";
|
|
4
|
+
import k from "../InputField.vue.js";
|
|
5
|
+
import { PhWarning as Z } from "@phosphor-icons/vue";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import
|
|
7
|
-
const
|
|
7
|
+
import G from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
|
+
const J = { class: "dpiV3_LinkAndMetadata" }, K = {
|
|
8
9
|
key: 0,
|
|
10
|
+
class: "dpiV3_errorMessage"
|
|
11
|
+
}, Q = {
|
|
12
|
+
key: 1,
|
|
9
13
|
class: "copy-mini-regular dpiV3_text_error"
|
|
10
|
-
},
|
|
14
|
+
}, X = {
|
|
11
15
|
key: 0,
|
|
12
16
|
class: "dpiV3_tempAddMore"
|
|
13
|
-
},
|
|
17
|
+
}, Y = {
|
|
14
18
|
__name: "ConformsToV3",
|
|
15
19
|
props: {
|
|
16
20
|
conformsToItems: { type: Array, required: !0 },
|
|
@@ -18,16 +22,19 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
18
22
|
asCard: { type: Boolean, required: !1, default: !1 },
|
|
19
23
|
showDeleteButton: { type: Boolean, required: !1, default: !1 }
|
|
20
24
|
},
|
|
21
|
-
emits: ["update"],
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
U(() => {
|
|
25
|
+
emits: ["update", "validationChange"],
|
|
26
|
+
setup(d, { expose: _, emit: y }) {
|
|
27
|
+
let s = h({});
|
|
28
|
+
const i = d, c = y, C = h(!1), v = h(null), a = R({}), b = R({});
|
|
29
|
+
let m = h(!1);
|
|
30
|
+
const U = N(() => Object.values(a).some((e) => e === !0)), z = () => {
|
|
31
|
+
c("validationChange", U.value);
|
|
32
|
+
};
|
|
33
|
+
P(() => {
|
|
27
34
|
console.log(
|
|
28
35
|
"Component Mounted: conformsToItems received for distributionId:",
|
|
29
|
-
|
|
30
|
-
), console.log("conformsToItems:",
|
|
36
|
+
i.distributionId
|
|
37
|
+
), console.log("conformsToItems:", i.conformsToItems), i.conformsToItems.length === 0 && (console.log("No conformsToItems found, initializing first documentation."), c("update", [
|
|
31
38
|
{
|
|
32
39
|
id: 1,
|
|
33
40
|
"dcat:downloadURL": "",
|
|
@@ -35,57 +42,83 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
35
42
|
}
|
|
36
43
|
]));
|
|
37
44
|
});
|
|
38
|
-
const
|
|
45
|
+
const p = (e) => {
|
|
46
|
+
if (!e || e.trim() === "") return !1;
|
|
47
|
+
const t = e.trim();
|
|
48
|
+
return /\.[a-zA-Z]{2,}$/.test(t);
|
|
49
|
+
}, g = (e) => {
|
|
50
|
+
const t = i.conformsToItems.find((o) => o.id === e);
|
|
51
|
+
if (t) {
|
|
52
|
+
const o = t["dct:title"] && t["dct:title"].trim() !== "", n = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
|
|
53
|
+
o ? n ? p(n) ? a[e] = null : a[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : a[e] = "URL ist erforderlich" : n && !p(n) ? a[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : a[e] = null;
|
|
54
|
+
}
|
|
55
|
+
}, B = () => {
|
|
56
|
+
let e = !1;
|
|
57
|
+
return i.conformsToItems.forEach((t) => {
|
|
58
|
+
const o = t["dct:title"] && t["dct:title"].trim() !== "", n = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
|
|
59
|
+
o ? n ? p(n) || (a[t.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0) : (a[t.id] = "URL ist erforderlich", e = !0) : n && !p(n) && (a[t.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0);
|
|
60
|
+
}), e;
|
|
61
|
+
}, A = (e) => {
|
|
39
62
|
switch (e) {
|
|
40
63
|
case "delete":
|
|
41
|
-
|
|
64
|
+
D();
|
|
42
65
|
break;
|
|
43
66
|
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
}, E = () => {
|
|
68
|
+
if (B())
|
|
69
|
+
return;
|
|
70
|
+
const t = {
|
|
71
|
+
id: (i.conformsToItems.length ? Math.max(...i.conformsToItems.map((o) => o.id)) : 0) + 1,
|
|
47
72
|
"dcat:downloadURL": "",
|
|
48
73
|
"dct:title": ""
|
|
49
74
|
};
|
|
50
|
-
c("update", [...
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
75
|
+
c("update", [...i.conformsToItems, t]);
|
|
76
|
+
}, M = (e) => {
|
|
77
|
+
b[e] && clearTimeout(b[e]), b[e] = setTimeout(() => {
|
|
78
|
+
g(e);
|
|
79
|
+
}, 800);
|
|
80
|
+
}, x = (e, t, o) => {
|
|
81
|
+
var L;
|
|
82
|
+
(L = e == null ? void 0 : e.target) == null || L.value;
|
|
83
|
+
const n = i.conformsToItems.map(
|
|
84
|
+
(T) => T.id === o ? { ...T, [t]: e.target.value } : T
|
|
56
85
|
);
|
|
57
|
-
c("update", o);
|
|
58
|
-
},
|
|
59
|
-
|
|
86
|
+
c("update", n), M(o);
|
|
87
|
+
}, $ = (e) => {
|
|
88
|
+
s.value = {
|
|
60
89
|
button: "Löschen",
|
|
61
90
|
header: "Standard löschen",
|
|
62
91
|
text: "Sind Sie sicher, dass Sie diesen Standard löschen wollen?",
|
|
63
92
|
action: "delete",
|
|
64
93
|
optionalString_1: e["dct:title"],
|
|
65
94
|
optionalString_2: e["dcat:downloadURL"]
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
if (
|
|
69
|
-
|
|
95
|
+
}, m.value = !0, v.value = e;
|
|
96
|
+
}, D = () => {
|
|
97
|
+
if (i.conformsToItems.length === 1) {
|
|
98
|
+
C.value = !0;
|
|
70
99
|
return;
|
|
71
100
|
}
|
|
72
|
-
const e =
|
|
73
|
-
(
|
|
101
|
+
const e = i.conformsToItems.filter(
|
|
102
|
+
(t) => t.id !== v.value.id
|
|
74
103
|
);
|
|
75
|
-
c("update", e);
|
|
76
|
-
},
|
|
77
|
-
e["dct:title"] = "";
|
|
104
|
+
delete a[v.value.id], c("update", e), z();
|
|
105
|
+
}, F = (e) => {
|
|
106
|
+
e["dct:title"] = "", g(e.id);
|
|
78
107
|
};
|
|
79
|
-
return (
|
|
80
|
-
|
|
108
|
+
return _({
|
|
109
|
+
validateAllItems: B,
|
|
110
|
+
hasValidationErrors: U
|
|
111
|
+
}), (e, t) => (r(), u("div", {
|
|
112
|
+
class: S(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: d.asCard }])
|
|
81
113
|
}, [
|
|
82
|
-
(
|
|
83
|
-
key:
|
|
84
|
-
class:
|
|
114
|
+
(r(!0), u(W, null, H(d.conformsToItems, (o) => (r(), u("div", {
|
|
115
|
+
key: o.id,
|
|
116
|
+
class: S(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: d.asCard }])
|
|
85
117
|
}, [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
onInput: (
|
|
118
|
+
I("div", J, [
|
|
119
|
+
f(k, {
|
|
120
|
+
onInput: (n) => x(n, "dcat:downloadURL", o.id),
|
|
121
|
+
onBlur: (n) => g(o.id),
|
|
89
122
|
addOnText: !1,
|
|
90
123
|
datePicker: !1,
|
|
91
124
|
infoIcon: !1,
|
|
@@ -95,11 +128,19 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
95
128
|
initialHintText: !1,
|
|
96
129
|
label: "URL",
|
|
97
130
|
showEndIcon: !1,
|
|
98
|
-
modelValue:
|
|
99
|
-
"onUpdate:modelValue": (
|
|
100
|
-
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
modelValue: o["dcat:downloadURL"],
|
|
132
|
+
"onUpdate:modelValue": (n) => o["dcat:downloadURL"] = n
|
|
133
|
+
}, null, 8, ["onInput", "onBlur", "modelValue", "onUpdate:modelValue"]),
|
|
134
|
+
a[o.id] ? (r(), u("div", K, [
|
|
135
|
+
f(l(Z), {
|
|
136
|
+
size: 16,
|
|
137
|
+
weight: "fill"
|
|
138
|
+
}),
|
|
139
|
+
t[2] || (t[2] = I("span", { class: "copy-mini-regular" }, "URL ist erforderlich", -1))
|
|
140
|
+
])) : V("", !0),
|
|
141
|
+
f(k, {
|
|
142
|
+
onInput: (n) => x(n, "dct:title", o.id),
|
|
143
|
+
onBlur: (n) => g(o.id),
|
|
103
144
|
addOnText: !1,
|
|
104
145
|
datePicker: !1,
|
|
105
146
|
infoIcon: !1,
|
|
@@ -111,14 +152,14 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
111
152
|
"message.dataupload.datasets.dcat:distribution.distribution-title.label"
|
|
112
153
|
),
|
|
113
154
|
showEndIcon: !1,
|
|
114
|
-
modelValue:
|
|
115
|
-
"onUpdate:modelValue": (
|
|
116
|
-
defaultInput: !
|
|
117
|
-
onDeleteButtonClicked: (
|
|
118
|
-
}, null, 8, ["onInput", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
|
|
119
|
-
|
|
155
|
+
modelValue: o["dct:title"],
|
|
156
|
+
"onUpdate:modelValue": (n) => o["dct:title"] = n,
|
|
157
|
+
defaultInput: !d.showDeleteButton,
|
|
158
|
+
onDeleteButtonClicked: (n) => F(o)
|
|
159
|
+
}, null, 8, ["onInput", "onBlur", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
|
|
160
|
+
C.value && d.conformsToItems.length === 1 ? (r(), u("p", Q, " Mindestens eine URL muss vorhanden sein. ")) : V("", !0)
|
|
120
161
|
]),
|
|
121
|
-
|
|
162
|
+
f(w, {
|
|
122
163
|
class: "dpiV3_tempAddMore",
|
|
123
164
|
buttonText: e.$t(
|
|
124
165
|
"message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
|
|
@@ -126,32 +167,32 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
|
|
|
126
167
|
size: "small",
|
|
127
168
|
iconStart: "trash",
|
|
128
169
|
variant: "tertiary",
|
|
129
|
-
onClick: (
|
|
170
|
+
onClick: (n) => $(o)
|
|
130
171
|
}, null, 8, ["buttonText", "onClick"])
|
|
131
172
|
], 2))), 128)),
|
|
132
|
-
|
|
133
|
-
|
|
173
|
+
d.asCard ? V("", !0) : (r(), u("div", X, [
|
|
174
|
+
f(w, {
|
|
134
175
|
buttonText: "Weitere Standards hinzufügen",
|
|
135
176
|
size: "small",
|
|
136
177
|
iconStart: "plus",
|
|
137
178
|
variant: "tertiary",
|
|
138
|
-
onClick:
|
|
179
|
+
onClick: E
|
|
139
180
|
})
|
|
140
181
|
])),
|
|
141
|
-
|
|
182
|
+
l(m) ? (r(), q(j, {
|
|
142
183
|
key: 1,
|
|
143
|
-
buttons:
|
|
144
|
-
headerText:
|
|
145
|
-
text:
|
|
146
|
-
onClose:
|
|
147
|
-
action:
|
|
148
|
-
onActionHandling:
|
|
149
|
-
optionalString_1:
|
|
150
|
-
optionalString_2:
|
|
151
|
-
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) :
|
|
184
|
+
buttons: l(s).button,
|
|
185
|
+
headerText: l(s).header,
|
|
186
|
+
text: l(s).text,
|
|
187
|
+
onClose: t[0] || (t[0] = (o) => O(m) ? m.value = !1 : m = !1),
|
|
188
|
+
action: l(s).action,
|
|
189
|
+
onActionHandling: t[1] || (t[1] = (o) => A(o)),
|
|
190
|
+
optionalString_1: l(s).optionalString_1,
|
|
191
|
+
optionalString_2: l(s).optionalString_2
|
|
192
|
+
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : V("", !0)
|
|
152
193
|
], 2));
|
|
153
194
|
}
|
|
154
|
-
},
|
|
195
|
+
}, de = /* @__PURE__ */ G(Y, [["__scopeId", "data-v-bc09c0ae"]]);
|
|
155
196
|
export {
|
|
156
|
-
|
|
197
|
+
de as default
|
|
157
198
|
};
|