@piveau/dpi 0.1.0-beta.59 → 0.1.0-beta.60
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/Dropdown.vue.js +3 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +2 -2
- package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +131 -126
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +46 -29
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +47 -45
- package/dist/data-provider-interface/components/ContactPage.vue.js +49 -49
- package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +1 -1
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +285 -315
- package/dist/data-provider-interface/components/HVDPage.vue.js +41 -42
- package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +218 -206
- package/dist/data-provider-interface/components/TempResPage.vue.js +2 -2
- package/dist/data-provider-interface/components/TitelPage.vue.js +4 -4
- package/dist/data-provider-interface/components/dpiV3Description.vue.js +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.js +13 -14
- package/package.json +1 -1
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js
CHANGED
|
@@ -54,7 +54,7 @@ const T = { class: "dpiV3_LinkAndMetadata" }, F = {
|
|
|
54
54
|
} });
|
|
55
55
|
const L = (o, e, t) => {
|
|
56
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;
|
|
57
|
+
a.value.policyItems[0] === void 0 && (a.value.policyItems = [{ "dcat:downloadURL": "" }]), a.value.policyItems[0]["dcat:downloadURL"] = o.target.value;
|
|
58
58
|
}, b = () => {
|
|
59
59
|
if (s.policyItems.length === 1) {
|
|
60
60
|
v.value = !0;
|
|
@@ -103,7 +103,7 @@ const T = { class: "dpiV3_LinkAndMetadata" }, F = {
|
|
|
103
103
|
}, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1"])) : p("", !0)
|
|
104
104
|
], 2));
|
|
105
105
|
}
|
|
106
|
-
}, G = /* @__PURE__ */ S(q, [["__scopeId", "data-v-
|
|
106
|
+
}, G = /* @__PURE__ */ S(q, [["__scopeId", "data-v-55082169"]]);
|
|
107
107
|
export {
|
|
108
108
|
G as default
|
|
109
109
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { PhWarning as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import { ref as f, computed as k, resolveComponent as S, createElementBlock as m, openBlock as o, createElementVNode as p, createBlock as V, createCommentVNode as u, toDisplayString as R, createVNode as l, withCtx as x, unref as C, Fragment as Q, renderList as X } from "vue";
|
|
2
|
+
import { useI18n as Y } from "vue-i18n";
|
|
3
|
+
import { PhWarning as ee } from "@phosphor-icons/vue";
|
|
4
|
+
import te from "./CrossOutButton.vue.js";
|
|
5
|
+
import $ from "./ButtonV3.vue.js";
|
|
6
|
+
import ae from "./SectionItems/FindabilityChips.vue.js";
|
|
7
|
+
import ie from "./SectionItems/HVDSwitch.vue.js";
|
|
8
|
+
import oe from "./SectionItems/EssentialsModal.vue.js";
|
|
9
|
+
import ne from "./SectionItems/DistributionModal.vue.js";
|
|
10
|
+
import se from "./SectionItems/CoverageModal.vue.js";
|
|
11
|
+
import le from "./SectionItems/AdditionalsModal.vue.js";
|
|
12
12
|
import "@formkit/core";
|
|
13
|
-
import { useFormValues as
|
|
13
|
+
import { useFormValues as ce } from "../../composables/useDpiFormValues.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import
|
|
16
|
-
const
|
|
15
|
+
import re from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
16
|
+
const ue = { class: "dpiV3_RapModalContainer" }, de = { class: "dpiV3_RapModalOuter" }, ve = { class: "dpiV3_RapModalInner" }, fe = { class: "dpiV3_modalHead" }, me = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "headline"
|
|
19
|
-
},
|
|
19
|
+
}, pe = { class: "dpiV3_closeButtonContainer" }, _e = { class: "dpiV3_modalBody" }, ge = { key: 0 }, he = {
|
|
20
20
|
key: 2,
|
|
21
21
|
id: "essentials"
|
|
22
|
-
},
|
|
22
|
+
}, be = {
|
|
23
23
|
key: 6,
|
|
24
24
|
class: "dpiV3_errormsgWrapper"
|
|
25
|
-
},
|
|
25
|
+
}, ye = { class: "validation-messages" }, Se = { class: "dpiV3_actionButtonWrap" }, Ve = {
|
|
26
26
|
__name: "RapModal",
|
|
27
27
|
props: {
|
|
28
28
|
isVisible: {
|
|
@@ -33,10 +33,10 @@ const ce = { class: "dpiV3_RapModalContainer" }, re = { class: "dpiV3_RapModalOu
|
|
|
33
33
|
activeSection: String
|
|
34
34
|
},
|
|
35
35
|
emits: ["close"],
|
|
36
|
-
setup(
|
|
37
|
-
const { t:
|
|
38
|
-
let
|
|
39
|
-
const { formValues: h } =
|
|
36
|
+
setup(d, { emit: A }) {
|
|
37
|
+
const { t: L } = Y(), a = d;
|
|
38
|
+
let B = f();
|
|
39
|
+
const { formValues: h } = ce(), w = A, D = f(null), _ = f(null), b = f(null), n = f(!1), y = f(null), J = {
|
|
40
40
|
findabilityHvd: "message.dataupload.datasets.rap.findability.title",
|
|
41
41
|
essentials: "message.dataupload.datasets.rap.essentials.title",
|
|
42
42
|
coverage: "message.dataupload.datasets.rap.coverage.title",
|
|
@@ -44,165 +44,170 @@ const ce = { class: "dpiV3_RapModalContainer" }, re = { class: "dpiV3_RapModalOu
|
|
|
44
44
|
additionals: "message.metadata.additionals"
|
|
45
45
|
};
|
|
46
46
|
console.log(h.value);
|
|
47
|
-
const
|
|
48
|
-
const e =
|
|
49
|
-
return e ?
|
|
50
|
-
}),
|
|
47
|
+
const E = k(() => {
|
|
48
|
+
const e = J[a.activeSection];
|
|
49
|
+
return e ? L(e) : "";
|
|
50
|
+
}), I = k(() => {
|
|
51
51
|
var i, r;
|
|
52
52
|
const e = (r = (i = h.value) == null ? void 0 : i.Discoverability) == null ? void 0 : r.discoverabilityPage;
|
|
53
53
|
return !e || !Array.isArray(e) ? !1 : e.filter((v) => v.id && v.label).length > 0;
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
}, c = k(() => h.value.BasicInfos),
|
|
54
|
+
}), K = () => a.activeSection === "findabilityHvd" && !I.value ? (n.value = !0, !1) : (n.value = !1, !0), F = () => a.activeSection === "distributions" && (console.log(y.value && !y.value.isValid), y.value && !y.value.isValid) ? (n.value = !0, !1) : (n.value = !1, !0), j = () => a.activeSection === "essentials" && _.value && !_.value.isValid ? (n.value = !0, !1) : (n.value = !1, !0), q = () => a.activeSection === "coverage" && b.value && b.value.validateAllItems() ? (n.value = !0, !1) : (n.value = !1, !0), H = () => a.activeSection === "findabilityHvd" ? K() : a.activeSection === "essentials" ? j() : a.activeSection === "coverage" ? q() : a.activeSection === "distributions" ? (console.log("hey" + F()), F()) : (n.value = !1, !0), T = k(() => a.activeSection === "findabilityHvd" && !I.value ? ["Bitte wählen Sie mindestens eine Kategorie aus, bevor Sie fortfahren."] : a.activeSection === "essentials" && _.value && !_.value.isValid ? _.value.getValidationErrorMessages() : a.activeSection === "coverage" && b.value && b.value.validateAllItems() ? ["Bitte füllen Sie alle erforderlichen Felder aus, wenn ein Feld ausgefüllt ist."] : []), N = () => {
|
|
55
|
+
H() && W();
|
|
56
|
+
}, W = () => {
|
|
57
|
+
n.value = !1, w("close");
|
|
58
|
+
}, c = k(() => h.value.BasicInfos), z = (e, t) => {
|
|
59
59
|
var i;
|
|
60
|
-
return ((i = e == null ? void 0 : e.find((r) => r["@language"] ===
|
|
61
|
-
},
|
|
60
|
+
return ((i = e == null ? void 0 : e.find((r) => r["@language"] === t)) == null ? void 0 : i["@value"]) || "";
|
|
61
|
+
}, g = (e, t) => {
|
|
62
62
|
var i;
|
|
63
|
-
return ((i = e == null ? void 0 : e[0]) == null ? void 0 : i[
|
|
64
|
-
},
|
|
65
|
-
var
|
|
66
|
-
return ((
|
|
67
|
-
},
|
|
68
|
-
title:
|
|
69
|
-
description:
|
|
70
|
-
modified:
|
|
71
|
-
publisherName:
|
|
72
|
-
publisherMail:
|
|
73
|
-
publisherWebsite:
|
|
74
|
-
contactPointName:
|
|
75
|
-
contactPointMail:
|
|
76
|
-
contactPointPhone:
|
|
77
|
-
}),
|
|
78
|
-
e[
|
|
79
|
-
const v = e[
|
|
80
|
-
v ? v["@value"] = i : e[
|
|
81
|
-
},
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
63
|
+
return ((i = e == null ? void 0 : e[0]) == null ? void 0 : i[t]) || "";
|
|
64
|
+
}, U = (e) => {
|
|
65
|
+
var t;
|
|
66
|
+
return ((t = e == null ? void 0 : e[0]) == null ? void 0 : t["@value"]) || "";
|
|
67
|
+
}, s = f({
|
|
68
|
+
title: z(c.value["dct:title"], "de"),
|
|
69
|
+
description: z(c.value["dct:description"], "de"),
|
|
70
|
+
modified: U(c.value["dct:modified"]),
|
|
71
|
+
publisherName: g(c.value["dct:publisher"], "foaf:name"),
|
|
72
|
+
publisherMail: g(c.value["dct:publisher"], "foaf:mbox"),
|
|
73
|
+
publisherWebsite: g(c.value["dct:publisher"], "foaf:homepage"),
|
|
74
|
+
contactPointName: g(c.value["dcat:contactPoint"], "vcard:fn"),
|
|
75
|
+
contactPointMail: g(c.value["dcat:contactPoint"], "vcard:hasEmail"),
|
|
76
|
+
contactPointPhone: g(c.value["dcat:contactPoint"], "vcard:hasTelephone")
|
|
77
|
+
}), O = (e, t, i, r) => {
|
|
78
|
+
e[t] || (e[t] = []);
|
|
79
|
+
const v = e[t].find((P) => P["@language"] === r);
|
|
80
|
+
v ? v["@value"] = i : e[t].push({ "@value": i, "@language": r });
|
|
81
|
+
}, Z = () => {
|
|
82
|
+
if (H()) {
|
|
83
|
+
if (a.activeSection === "essentials") {
|
|
84
|
+
const e = h.value.BasicInfos || {}, t = JSON.parse(JSON.stringify(e));
|
|
85
|
+
O(t, "dct:title", s.value.title, "de"), O(t, "dct:description", s.value.description, "de"), t["dct:publisher"] = [{
|
|
86
|
+
"foaf:name": s.value.publisherName,
|
|
87
|
+
"foaf:mbox": s.value.publisherMail,
|
|
88
|
+
"foaf:homepage": s.value.publisherWebsite
|
|
89
|
+
}], t["dcat:contactPoint"] = [{
|
|
90
|
+
"vcard:fn": s.value.contactPointName,
|
|
91
|
+
"vcard:hasEmail": s.value.contactPointMail,
|
|
92
|
+
"vcard:hasTelephone": s.value.contactPointPhone
|
|
93
|
+
}], t["dct:modified"] = [{ "@value": s.value.modified }], h.value.BasicInfos = t;
|
|
94
|
+
}
|
|
95
|
+
w("close");
|
|
96
|
+
}
|
|
94
97
|
};
|
|
95
|
-
return (e,
|
|
96
|
-
const i =
|
|
97
|
-
return o(),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
onClick:
|
|
98
|
+
return (e, t) => {
|
|
99
|
+
const i = S("findability"), r = S("coverage"), v = S("distributionRap"), P = S("additionals"), G = S("interaction");
|
|
100
|
+
return o(), m("div", ue, [
|
|
101
|
+
p("div", de, [
|
|
102
|
+
p("div", ve, [
|
|
103
|
+
p("div", fe, [
|
|
104
|
+
E.value ? (o(), m("div", me, R(E.value), 1)) : u("", !0),
|
|
105
|
+
p("div", pe, [
|
|
106
|
+
l(te, {
|
|
107
|
+
onClick: N,
|
|
105
108
|
class: "dpiV3_closeButton",
|
|
106
109
|
type: "default"
|
|
107
110
|
})
|
|
108
111
|
])
|
|
109
112
|
]),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
p("div", _e, [
|
|
114
|
+
a.activeSection === "findabilityHvd" ? (o(), m("span", ge, R(e.$t("message.metadata.categories")), 1)) : u("", !0),
|
|
115
|
+
a.activeSection === "findabilityHvd" ? (o(), V(i, {
|
|
113
116
|
key: 1,
|
|
114
117
|
class: "findability-container"
|
|
115
118
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
|
|
118
|
-
context:
|
|
119
|
+
default: x(() => [
|
|
120
|
+
l(ae, {
|
|
121
|
+
context: d.context,
|
|
119
122
|
ref_key: "findabilityChipsRef",
|
|
120
|
-
ref:
|
|
123
|
+
ref: D
|
|
121
124
|
}, null, 8, ["context"]),
|
|
122
|
-
|
|
125
|
+
l(ie, { context: d.context }, null, 8, ["context"])
|
|
123
126
|
]),
|
|
124
127
|
_: 1
|
|
125
|
-
})) :
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
context:
|
|
129
|
-
newValues:
|
|
130
|
-
modelValue:
|
|
131
|
-
"onUpdate:modelValue":
|
|
128
|
+
})) : u("", !0),
|
|
129
|
+
a.activeSection === "essentials" ? (o(), m("div", he, [
|
|
130
|
+
l(oe, {
|
|
131
|
+
context: d.context,
|
|
132
|
+
newValues: C(B),
|
|
133
|
+
modelValue: s.value,
|
|
134
|
+
"onUpdate:modelValue": t[0] || (t[0] = (M) => s.value = M),
|
|
132
135
|
ref_key: "essentialsModalRef",
|
|
133
|
-
ref:
|
|
136
|
+
ref: _
|
|
134
137
|
}, null, 8, ["context", "newValues", "modelValue"])
|
|
135
|
-
])) :
|
|
136
|
-
|
|
137
|
-
default:
|
|
138
|
-
|
|
139
|
-
context:
|
|
140
|
-
newValues:
|
|
138
|
+
])) : u("", !0),
|
|
139
|
+
a.activeSection === "coverage" ? (o(), V(r, { key: 3 }, {
|
|
140
|
+
default: x(() => [
|
|
141
|
+
l(se, {
|
|
142
|
+
context: d.context,
|
|
143
|
+
newValues: C(B),
|
|
141
144
|
ref_key: "coverageModalRef",
|
|
142
|
-
ref:
|
|
145
|
+
ref: b
|
|
143
146
|
}, null, 8, ["context", "newValues"])
|
|
144
147
|
]),
|
|
145
148
|
_: 1
|
|
146
|
-
})) :
|
|
147
|
-
|
|
148
|
-
default:
|
|
149
|
-
|
|
150
|
-
context:
|
|
151
|
-
newValues:
|
|
149
|
+
})) : u("", !0),
|
|
150
|
+
a.activeSection === "distributions" ? (o(), V(v, { key: 4 }, {
|
|
151
|
+
default: x(() => [
|
|
152
|
+
l(ne, {
|
|
153
|
+
context: d.context,
|
|
154
|
+
newValues: C(B),
|
|
155
|
+
ref_key: "distributionModalRef",
|
|
156
|
+
ref: y
|
|
152
157
|
}, null, 8, ["context", "newValues"])
|
|
153
158
|
]),
|
|
154
159
|
_: 1
|
|
155
|
-
})) :
|
|
156
|
-
|
|
157
|
-
default:
|
|
158
|
-
|
|
159
|
-
context:
|
|
160
|
-
onCloseModal:
|
|
160
|
+
})) : u("", !0),
|
|
161
|
+
a.activeSection === "additionals" ? (o(), V(P, { key: 5 }, {
|
|
162
|
+
default: x(() => [
|
|
163
|
+
l(le, {
|
|
164
|
+
context: d.context,
|
|
165
|
+
onCloseModal: W
|
|
161
166
|
}, null, 8, ["context"])
|
|
162
167
|
]),
|
|
163
168
|
_: 1
|
|
164
|
-
})) :
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
})) : u("", !0),
|
|
170
|
+
n.value && T.value.length > 0 ? (o(), m("div", be, [
|
|
171
|
+
l(C(ee), {
|
|
167
172
|
size: 16,
|
|
168
173
|
weight: "fill"
|
|
169
174
|
}),
|
|
170
|
-
|
|
171
|
-
(o(!0),
|
|
172
|
-
key:
|
|
175
|
+
p("div", ye, [
|
|
176
|
+
(o(!0), m(Q, null, X(T.value, (M) => (o(), m("span", {
|
|
177
|
+
key: M,
|
|
173
178
|
class: "copy-mini-regular"
|
|
174
|
-
},
|
|
179
|
+
}, R(M), 1))), 128))
|
|
175
180
|
])
|
|
176
|
-
])) :
|
|
181
|
+
])) : u("", !0)
|
|
177
182
|
])
|
|
178
183
|
]),
|
|
179
|
-
|
|
184
|
+
a.activeSection != "additionals" ? (o(), V(G, {
|
|
180
185
|
key: 0,
|
|
181
186
|
class: "dpiV3_interactionWrap"
|
|
182
187
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
onClick:
|
|
188
|
+
default: x(() => [
|
|
189
|
+
p("div", Se, [
|
|
190
|
+
l($, {
|
|
191
|
+
onClick: N,
|
|
187
192
|
buttonText: "Zurück",
|
|
188
193
|
size: "large",
|
|
189
194
|
iconStart: "CaretLeft",
|
|
190
195
|
variant: "tertiary"
|
|
191
196
|
}),
|
|
192
|
-
|
|
193
|
-
onClick:
|
|
197
|
+
l($, {
|
|
198
|
+
onClick: Z,
|
|
194
199
|
buttonText: "Speichern",
|
|
195
200
|
size: "large"
|
|
196
201
|
})
|
|
197
202
|
])
|
|
198
203
|
]),
|
|
199
204
|
_: 1
|
|
200
|
-
})) :
|
|
205
|
+
})) : u("", !0)
|
|
201
206
|
])
|
|
202
207
|
]);
|
|
203
208
|
};
|
|
204
209
|
}
|
|
205
|
-
},
|
|
210
|
+
}, ze = /* @__PURE__ */ re(Ve, [["__scopeId", "data-v-7bf8e6a8"]]);
|
|
206
211
|
export {
|
|
207
|
-
|
|
212
|
+
ze as default
|
|
208
213
|
};
|
package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js
CHANGED
|
@@ -1,42 +1,59 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { getLicenses as
|
|
3
|
-
import
|
|
1
|
+
import { ref as i, getCurrentInstance as d, watch as h, onMounted as v, computed as _, resolveComponent as V, createElementBlock as x, openBlock as D, createVNode as r, withCtx as M } from "vue";
|
|
2
|
+
import { getLicenses as y } from "../../services/dpiV3_apis.js";
|
|
3
|
+
import R from "../../../components/DistributionSimplePage.vue.js";
|
|
4
4
|
import "@formkit/core";
|
|
5
|
-
import { useFormValues as
|
|
6
|
-
const
|
|
5
|
+
import { useFormValues as A } from "../../../composables/useDpiFormValues.js";
|
|
6
|
+
const C = { class: "dpiV3_innerRapModalWrapper" }, E = {
|
|
7
7
|
__name: "DistributionModal",
|
|
8
8
|
props: {
|
|
9
9
|
context: Object,
|
|
10
10
|
newValues: Object
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
|
|
14
|
-
let
|
|
15
|
-
const { formValues:
|
|
16
|
-
|
|
12
|
+
setup(m, { expose: f }) {
|
|
13
|
+
i(), i(""), i([]), d().appContext.app.config.globalProperties.$env;
|
|
14
|
+
let a = i([]);
|
|
15
|
+
const { formValues: o } = A();
|
|
16
|
+
i(""), i(!1), i({ 1: !1, 2: !1 }), i([
|
|
17
17
|
{ isValid: "unset", "dcterms:license": "", title: "", uri: "" }
|
|
18
|
-
]),
|
|
19
|
-
|
|
20
|
-
}),
|
|
21
|
-
const s =
|
|
18
|
+
]), i(!1), h(o.value.DistributionSimple.length, (e) => {
|
|
19
|
+
o.value.DistributionSimple.length > 1 && console.log("halo"), console.log("halo Outer");
|
|
20
|
+
}), v(async () => {
|
|
21
|
+
const s = d().appContext.app.config.globalProperties.$env;
|
|
22
22
|
try {
|
|
23
|
-
const t = await
|
|
24
|
-
|
|
25
|
-
"@value":
|
|
26
|
-
label:
|
|
27
|
-
uri:
|
|
28
|
-
})),
|
|
23
|
+
const t = await y(s.api.baseUrl);
|
|
24
|
+
a.value = t.map((n) => ({
|
|
25
|
+
"@value": n.value,
|
|
26
|
+
label: n.label,
|
|
27
|
+
uri: n.uri
|
|
28
|
+
})), a.value.sort((n, l) => n["@value"].localeCompare(l["@value"]));
|
|
29
29
|
} catch (t) {
|
|
30
30
|
console.error("Failed to load licenses", t);
|
|
31
31
|
}
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
});
|
|
33
|
+
const g = _(() => {
|
|
34
|
+
var s, t;
|
|
35
|
+
const e = (t = (s = o.value) == null ? void 0 : s.DistributionSimple) == null ? void 0 : t["dcat:distribution"];
|
|
36
|
+
return !e || !Array.isArray(e) || e.length === 0 ? !1 : e.every((n) => n.isValid === !0);
|
|
37
|
+
});
|
|
38
|
+
return f({
|
|
39
|
+
isValid: g,
|
|
40
|
+
getValidationErrorMessages: () => {
|
|
41
|
+
var t, n;
|
|
42
|
+
const e = (n = (t = o.value) == null ? void 0 : t.DistributionSimple) == null ? void 0 : n["dcat:distribution"], s = [];
|
|
43
|
+
return !e || !Array.isArray(e) || e.length === 0 ? s.push("Bitte fügen Sie mindestens eine Distribution hinzu.") : e.some((b) => {
|
|
44
|
+
var u, p;
|
|
45
|
+
const c = (p = (u = b["dcat:accessURL"]) == null ? void 0 : u[0]) == null ? void 0 : p["@value"];
|
|
46
|
+
return !c || c.length === 0;
|
|
47
|
+
}) && s.push("Alle Distributionen müssen eine Zugriffs-URL (Access URL) haben."), s;
|
|
48
|
+
}
|
|
49
|
+
}), (e, s) => {
|
|
50
|
+
const t = V("innerRapModalItem");
|
|
51
|
+
return D(), x("div", C, [
|
|
52
|
+
r(t),
|
|
53
|
+
r(t, null, {
|
|
54
|
+
default: M(() => [
|
|
55
|
+
r(R, {
|
|
56
|
+
context: m.context,
|
|
40
57
|
inRap: !0
|
|
41
58
|
}, null, 8, ["context"])
|
|
42
59
|
]),
|
|
@@ -47,5 +64,5 @@ const x = { class: "dpiV3_innerRapModalWrapper" }, O = {
|
|
|
47
64
|
}
|
|
48
65
|
};
|
|
49
66
|
export {
|
|
50
|
-
|
|
67
|
+
E as default
|
|
51
68
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
1
|
+
import { ref as s, onMounted as V, createElementBlock as _, openBlock as p, Fragment as y, createElementVNode as f, createVNode as D, createBlock as w, toDisplayString as S, getCurrentInstance as C } from "vue";
|
|
2
|
+
import k from "../SwitchV3.vue.js";
|
|
3
3
|
import F from "../Dropdown.vue.js";
|
|
4
4
|
import { getHvdCategories as H } from "../../services/dpiV3_apis.js";
|
|
5
5
|
import { useFormValues as x } from "../../../composables/useDpiFormValues.js";
|
|
@@ -10,73 +10,75 @@ const I = { class: "dpiV3_findabilitySwitchWrapper" }, P = { class: "dpiV3_Switc
|
|
|
10
10
|
context: Object
|
|
11
11
|
},
|
|
12
12
|
setup(T) {
|
|
13
|
-
const { formValues:
|
|
14
|
-
|
|
15
|
-
const i =
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
13
|
+
const { formValues: o } = x(), r = s(!1), u = s(0), d = s("");
|
|
14
|
+
s([{ isValid: !0 }]);
|
|
15
|
+
const i = s([]), v = s([]), b = (e) => {
|
|
16
|
+
if (r.value = e, !e) {
|
|
17
|
+
d.value = "";
|
|
18
|
+
const l = o.value.Discoverability;
|
|
19
|
+
l[Object.keys(l)[1]] = [{ isValid: !1 }], i.value.forEach((a) => a.selected = !1);
|
|
20
20
|
}
|
|
21
21
|
}, h = async () => {
|
|
22
22
|
try {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const e = C().appContext.app.config.globalProperties.$env, a = (await H(e.api.baseUrl)).sort(
|
|
24
|
+
(t, n) => t.pref_label.de.localeCompare(n.pref_label.de, "de")
|
|
25
|
+
);
|
|
26
|
+
v.value = a, i.value = a.map((t) => ({
|
|
27
|
+
label: t.pref_label.de,
|
|
28
|
+
uri: t.resource,
|
|
29
|
+
"@value": t.pref_label.de,
|
|
28
30
|
selected: !1
|
|
29
31
|
})), m();
|
|
30
|
-
} catch (
|
|
31
|
-
console.error("Error in component:",
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error("Error in component:", e);
|
|
32
34
|
}
|
|
33
35
|
}, m = () => {
|
|
34
|
-
var
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
(
|
|
36
|
+
var l, a, t;
|
|
37
|
+
const e = (t = (a = (l = o.value) == null ? void 0 : l.Discoverability) == null ? void 0 : a.hvdPage) == null ? void 0 : t[0];
|
|
38
|
+
if (e && e.isValid && e.label) {
|
|
39
|
+
r.value = !0;
|
|
40
|
+
const n = i.value.find(
|
|
41
|
+
(c) => c.label === e.label || c.uri === e.uri
|
|
40
42
|
);
|
|
41
|
-
|
|
43
|
+
n && (i.value.forEach((c) => c.selected = !1), n.selected = !0, d.value = n.label), u.value++;
|
|
42
44
|
}
|
|
43
|
-
}, g = (
|
|
44
|
-
const
|
|
45
|
-
(
|
|
45
|
+
}, g = (e) => {
|
|
46
|
+
const l = i.value.find(
|
|
47
|
+
(a) => a.label === e.target.innerHTML
|
|
46
48
|
);
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
hvdUri:
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
|
|
49
|
+
if (l) {
|
|
50
|
+
o.value.DistributionSimple.hvdNotation === void 0 && (o.value.DistributionSimple.hvdNotation = {}), o.value.DistributionSimple.hvdNotation = {
|
|
51
|
+
hvdUri: l.uri
|
|
52
|
+
}, d.value = l.label;
|
|
53
|
+
const a = o.value.Discoverability;
|
|
54
|
+
a[Object.keys(a)[1]] = [
|
|
53
55
|
{
|
|
54
56
|
isValid: !0,
|
|
55
|
-
label:
|
|
56
|
-
uri:
|
|
57
|
+
label: l.label,
|
|
58
|
+
uri: l.uri
|
|
57
59
|
}
|
|
58
60
|
];
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
return V(() => {
|
|
62
64
|
h();
|
|
63
|
-
}), (
|
|
64
|
-
|
|
65
|
-
(p(),
|
|
65
|
+
}), (e, l) => (p(), _(y, null, [
|
|
66
|
+
f("div", I, [
|
|
67
|
+
(p(), w(k, {
|
|
66
68
|
onSwitchToggled: b,
|
|
67
69
|
hasIcon: !1,
|
|
68
|
-
defaultChecked:
|
|
70
|
+
defaultChecked: r.value,
|
|
69
71
|
disabled: !1,
|
|
70
|
-
key:
|
|
72
|
+
key: u.value
|
|
71
73
|
}, null, 8, ["defaultChecked"])),
|
|
72
|
-
|
|
74
|
+
f("div", P, S(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
|
|
73
75
|
]),
|
|
74
|
-
|
|
76
|
+
D(F, {
|
|
75
77
|
dropdownWidth: "large",
|
|
76
|
-
isDisabled: !
|
|
78
|
+
isDisabled: !r.value,
|
|
77
79
|
type: "inputField",
|
|
78
80
|
inputFieldProps: {
|
|
79
|
-
isDisabled: !
|
|
81
|
+
isDisabled: !r.value,
|
|
80
82
|
addOnText: !1,
|
|
81
83
|
initialHintText: !1,
|
|
82
84
|
datePicker: !1,
|
|
@@ -88,8 +90,8 @@ const I = { class: "dpiV3_findabilitySwitchWrapper" }, P = { class: "dpiV3_Switc
|
|
|
88
90
|
inputFieldSize: "large"
|
|
89
91
|
},
|
|
90
92
|
data: i.value,
|
|
91
|
-
modelValue:
|
|
92
|
-
onClick:
|
|
93
|
+
modelValue: d.value,
|
|
94
|
+
onClick: l[0] || (l[0] = (a) => g(a))
|
|
93
95
|
}, null, 8, ["isDisabled", "inputFieldProps", "data", "modelValue"])
|
|
94
96
|
], 64));
|
|
95
97
|
}
|