@piveau/dpi 0.1.0-beta.63 → 0.1.0-beta.65
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/OptionalInformation/AccessServiceV3.vue.js +15 -15
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +503 -480
- package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +3 -3
- package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +46 -46
- package/dist/data-provider-interface/components/TempResPageInModal.vue.js +140 -143
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +18 -18
- package/package.json +1 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { ref as M, reactive as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { PhWarning as
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import
|
|
8
|
-
import { useFormValues as
|
|
9
|
-
import { useEditModeInfo as
|
|
1
|
+
import { ref as M, reactive as W, watch as te, createElementBlock as m, openBlock as u, normalizeClass as w, createCommentVNode as g, createElementVNode as f, toDisplayString as D, Fragment as ae, renderList as se, unref as o, createVNode as p, withDirectives as j, vShow as q, createBlock as G } from "vue";
|
|
2
|
+
import k from "../HappyFlowComponents/ui/InputField.vue.js";
|
|
3
|
+
import le from "../HappyFlowComponents/ui/CheckboxV3.vue.js";
|
|
4
|
+
import E from "../HappyFlowComponents/ui/ButtonV3.vue.js";
|
|
5
|
+
import { PhWarning as _ } from "@phosphor-icons/vue";
|
|
6
|
+
import { useI18n as oe } from "vue-i18n";
|
|
7
|
+
import "@formkit/core";
|
|
8
|
+
import { useFormValues as re } from "../composables/useDpiFormValues.js";
|
|
9
|
+
import { useEditModeInfo as ne } from "../composables/useDpiEditMode.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import de from "../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
-
const
|
|
12
|
+
const ie = { key: 0 }, ue = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "copy-large-regular"
|
|
15
|
-
},
|
|
15
|
+
}, ce = { key: 2 }, me = { class: "dpiV3_label" }, pe = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "dpiV3_firstRow"
|
|
18
|
-
},
|
|
18
|
+
}, fe = { class: "dpiV3_firstRow_inner" }, ge = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "dpiV3_errorMessage"
|
|
21
|
-
},
|
|
21
|
+
}, ve = { class: "copy-mini-regular" }, Te = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "dpiV3_errorMessage"
|
|
24
|
-
},
|
|
24
|
+
}, De = { class: "copy-mini-regular" }, he = { class: "dpiV3_firstRow_inner" }, Me = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "dpiV3_errorMessage"
|
|
27
|
-
},
|
|
27
|
+
}, ye = { class: "copy-mini-regular" }, Ve = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "dpiV3_errorMessage"
|
|
30
|
-
},
|
|
30
|
+
}, Re = { class: "copy-mini-regular" }, _e = {
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "validation-error"
|
|
33
|
-
},
|
|
33
|
+
}, Ie = { class: "copy-mini-regular" }, ke = { class: "dpiV3_secondRowTemporal" }, Ce = {
|
|
34
34
|
__name: "TempResPageInModal",
|
|
35
35
|
props: {
|
|
36
36
|
context: Object,
|
|
37
37
|
inRap: Boolean
|
|
38
38
|
},
|
|
39
|
-
setup(h, { expose:
|
|
40
|
-
const { isEditMode:
|
|
41
|
-
let
|
|
39
|
+
setup(h, { expose: K }) {
|
|
40
|
+
const { isEditMode: Q } = ne(), { formValues: r } = re(), { t: y } = oe(), v = M([!1]), V = M([0]);
|
|
41
|
+
let n = M(), c = M([{ startDate: !1, endDate: !1, message: "" }]), s = W([
|
|
42
42
|
{
|
|
43
43
|
startDate: !1,
|
|
44
44
|
startDateMessage: "",
|
|
@@ -50,11 +50,11 @@ const ue = { key: 0 }, ce = {
|
|
|
50
50
|
endTimeMessage: ""
|
|
51
51
|
}
|
|
52
52
|
]);
|
|
53
|
-
const
|
|
53
|
+
const C = W({});
|
|
54
54
|
M();
|
|
55
|
-
let
|
|
56
|
-
const
|
|
57
|
-
|
|
55
|
+
let b = M(y("message.dataupload.menu.reset"));
|
|
56
|
+
const z = h;
|
|
57
|
+
Q.value ? (r.value.Covering["dcat:temporalResolution"] !== void 0 ? n.value = r.value.Covering["dcat:temporalResolution"]["dct:temporal"] || [] : n.value = [
|
|
58
58
|
{
|
|
59
59
|
isValid: !0,
|
|
60
60
|
type: "dct:PeriodOfTime",
|
|
@@ -66,9 +66,9 @@ const ue = { key: 0 }, ce = {
|
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
|
-
],
|
|
69
|
+
], v.value = n == null ? void 0 : n.value.map(
|
|
70
70
|
(e) => e.dataType === "dateTime"
|
|
71
|
-
), V.value = new Array(
|
|
71
|
+
), V.value = new Array(n == null ? void 0 : n.value.length).fill(0), s.length = 0, c.value = [], n.value.forEach(() => {
|
|
72
72
|
s.push({
|
|
73
73
|
startDate: !1,
|
|
74
74
|
startDateMessage: "",
|
|
@@ -79,10 +79,10 @@ const ue = { key: 0 }, ce = {
|
|
|
79
79
|
endTime: !1,
|
|
80
80
|
endTimeMessage: ""
|
|
81
81
|
}), c.value.push({ startDate: !1, endDate: !1, message: "" });
|
|
82
|
-
})) : (
|
|
82
|
+
})) : (n.value = r.value.Covering["dcat:temporalResolution"]["dct:temporal"] || [], v.value = n == null ? void 0 : n.value.map(
|
|
83
83
|
(e) => e.dataType === "dateTime"
|
|
84
84
|
));
|
|
85
|
-
const
|
|
85
|
+
const S = M([
|
|
86
86
|
{
|
|
87
87
|
isValid: !0,
|
|
88
88
|
type: "dct:PeriodOfTime",
|
|
@@ -90,20 +90,20 @@ const ue = { key: 0 }, ce = {
|
|
|
90
90
|
{ dataType: "date", "dcat:startDate": "", "dcat:endDate": "" }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
|
-
]), T = (e) =>
|
|
94
|
-
|
|
93
|
+
]), T = (e) => v.value[e] === !0;
|
|
94
|
+
te(
|
|
95
95
|
() => y("message.dataupload.menu.reset"),
|
|
96
96
|
(e) => {
|
|
97
|
-
|
|
97
|
+
b.value = e;
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
const
|
|
101
|
-
const t =
|
|
100
|
+
const X = (e) => {
|
|
101
|
+
const t = r.value.Covering["dcat:temporalResolution"]["dct:temporal"][e];
|
|
102
102
|
if (!t) return !1;
|
|
103
|
-
const
|
|
104
|
-
return
|
|
103
|
+
const i = t["dcat:startDate"] && t["dcat:startDate"].trim() !== "", l = t["dcat:endDate"] && t["dcat:endDate"].trim() !== "", a = T(e) && t.startTime && t.startTime.trim() !== "", R = T(e) && t.endTime && t.endTime.trim() !== "";
|
|
104
|
+
return i || l || a || R;
|
|
105
105
|
}, F = (e) => {
|
|
106
|
-
const t =
|
|
106
|
+
const t = r.value.Covering["dcat:temporalResolution"]["dct:temporal"][e];
|
|
107
107
|
if (!t) return !0;
|
|
108
108
|
s[e] || (s[e] = {
|
|
109
109
|
startDate: !1,
|
|
@@ -124,31 +124,31 @@ const ue = { key: 0 }, ce = {
|
|
|
124
124
|
endTime: !1,
|
|
125
125
|
endTimeMessage: ""
|
|
126
126
|
};
|
|
127
|
-
const
|
|
128
|
-
let
|
|
129
|
-
return
|
|
130
|
-
},
|
|
131
|
-
|
|
127
|
+
const i = X(e);
|
|
128
|
+
let l = !1;
|
|
129
|
+
return i && ((!t["dcat:startDate"] || t["dcat:startDate"].trim() === "") && (s[e].startDate = !0, s[e].startDateMessage = "Startdatum ist erforderlich", l = !0), (!t["dcat:endDate"] || t["dcat:endDate"].trim() === "") && (s[e].endDate = !0, s[e].endDateMessage = "Enddatum ist erforderlich", l = !0), T(e) && ((!t.startTime || t.startTime.trim() === "") && (s[e].startTime = !0, s[e].startTimeMessage = "Startzeit ist erforderlich", l = !0), (!t.endTime || t.endTime.trim() === "") && (s[e].endTime = !0, s[e].endTimeMessage = "Endzeit ist erforderlich", l = !0))), !l;
|
|
130
|
+
}, P = (e) => {
|
|
131
|
+
C[e] && clearTimeout(C[e]), C[e] = setTimeout(() => {
|
|
132
132
|
F(e);
|
|
133
133
|
}, 200);
|
|
134
|
-
},
|
|
134
|
+
}, $ = () => {
|
|
135
135
|
var t;
|
|
136
136
|
let e = !1;
|
|
137
|
-
return (t =
|
|
138
|
-
(
|
|
139
|
-
F(
|
|
137
|
+
return (t = r.value.Covering["dcat:temporalResolution"]) != null && t["dct:temporal"] && r.value.Covering["dcat:temporalResolution"]["dct:temporal"].forEach(
|
|
138
|
+
(i, l) => {
|
|
139
|
+
F(l) || (e = !0), O(l) || (e = !0);
|
|
140
140
|
}
|
|
141
141
|
), e;
|
|
142
|
-
},
|
|
143
|
-
if (
|
|
142
|
+
}, Y = () => {
|
|
143
|
+
if ($())
|
|
144
144
|
return;
|
|
145
|
-
const e =
|
|
146
|
-
(t,
|
|
145
|
+
const e = n.value.reduce(
|
|
146
|
+
(t, i) => Math.max(t, i.id || 0),
|
|
147
147
|
0
|
|
148
148
|
);
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
|
|
149
|
+
n.value.push({ id: e + 1, dataType: "date" }), b.value = y("message.dataupload.menu.delete"), Z();
|
|
150
|
+
}, Z = () => {
|
|
151
|
+
v.value.push(!1), V.value.push(0), s.push({
|
|
152
152
|
startDate: !1,
|
|
153
153
|
startDateMessage: "",
|
|
154
154
|
endDate: !1,
|
|
@@ -158,26 +158,26 @@ const ue = { key: 0 }, ce = {
|
|
|
158
158
|
endTime: !1,
|
|
159
159
|
endTimeMessage: ""
|
|
160
160
|
}), c.value.push({ startDate: !1, endDate: !1, message: "" });
|
|
161
|
-
},
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
},
|
|
161
|
+
}, L = (e, t) => {
|
|
162
|
+
const i = e.target.checked;
|
|
163
|
+
v.value[t] = i, v.value[t] ? r.value.Covering["dcat:temporalResolution"]["dct:temporal"][t].dataType = "dateTime" : (r.value.Covering["dcat:temporalResolution"]["dct:temporal"][t].dataType = "date", s[t] && (s[t].startTimeMessage = "", s[t].endTimeMessage = "")), P(t);
|
|
164
|
+
}, O = (e) => {
|
|
165
165
|
for (; c.value.length <= e; )
|
|
166
166
|
c.value.push({ startDate: !1, endDate: !1, message: "" });
|
|
167
|
-
const t =
|
|
167
|
+
const t = r.value.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:startDate"], i = r.value.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:endDate"];
|
|
168
168
|
c.value[e] || (c.value[e] = { startDate: !1, endDate: !1, message: "" }), c.value[e] = { startDate: !1, endDate: !1, message: "" };
|
|
169
|
-
let
|
|
170
|
-
if (t &&
|
|
169
|
+
let l = !0;
|
|
170
|
+
if (t && i) {
|
|
171
171
|
const a = new Date(t);
|
|
172
|
-
new Date(
|
|
172
|
+
new Date(i) < a && (c.value[e] = {
|
|
173
173
|
startDate: !0,
|
|
174
174
|
endDate: !0,
|
|
175
175
|
message: "Enddatum muss nach dem Aktualisierungsdatum liegen"
|
|
176
|
-
},
|
|
176
|
+
}, l = !1);
|
|
177
177
|
}
|
|
178
|
-
return
|
|
179
|
-
},
|
|
180
|
-
|
|
178
|
+
return S.value[0].isValid = l, l;
|
|
179
|
+
}, I = (e, t, i, l) => {
|
|
180
|
+
r.value.Covering["dcat:temporalResolution"] !== void 0 || (r.value.Covering["dcat:temporalResolution"] = {
|
|
181
181
|
isValid: !0,
|
|
182
182
|
type: "dct:PeriodOfTime",
|
|
183
183
|
"dct:temporal": [
|
|
@@ -187,13 +187,10 @@ const ue = { key: 0 }, ce = {
|
|
|
187
187
|
"dcat:endDate": ""
|
|
188
188
|
}
|
|
189
189
|
]
|
|
190
|
-
}),
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
"dcat:startDate": "",
|
|
195
|
-
"dcat:endDate": ""
|
|
196
|
-
}, g.value[e] = !1, V.value[e]++, c.value[e] = { startDate: !1, endDate: !1, message: "" }, s[e] && (s[e] = {
|
|
190
|
+
}), r.value.Covering["dcat:temporalResolution"]["dct:temporal"][t][i] = e, O(t), P(t);
|
|
191
|
+
}, x = (e) => {
|
|
192
|
+
const t = r.value.Covering["dcat:temporalResolution"]["dct:temporal"][e];
|
|
193
|
+
t && (t["dcat:startDate"] = "", t["dcat:endDate"] = "", t.startTime = "", t.endTime = "", t.dataType = "date", v.value[e] = !1, V.value[e]++, c.value[e] = { startDate: !1, endDate: !1, message: "" }, s[e] = {
|
|
197
194
|
startDate: !1,
|
|
198
195
|
startDateMessage: "",
|
|
199
196
|
endDate: !1,
|
|
@@ -202,34 +199,34 @@ const ue = { key: 0 }, ce = {
|
|
|
202
199
|
startTimeMessage: "",
|
|
203
200
|
endTime: !1,
|
|
204
201
|
endTimeMessage: ""
|
|
205
|
-
})
|
|
206
|
-
},
|
|
207
|
-
|
|
202
|
+
});
|
|
203
|
+
}, ee = (e) => {
|
|
204
|
+
r.value.Covering["dcat:temporalResolution"]["dct:temporal"].splice(
|
|
208
205
|
e,
|
|
209
206
|
1
|
|
210
|
-
),
|
|
207
|
+
), n.value = r.value.Covering["dcat:temporalResolution"]["dct:temporal"], v.value.splice(e, 1), V.value.splice(e, 1), c.value.splice(e, 1), s.splice(e, 1), z.inRap || z.context.node.input(S), n.value.length === 1 && (b.value = y("message.dataupload.menu.reset"));
|
|
211
208
|
};
|
|
212
|
-
return
|
|
213
|
-
validateAllItems:
|
|
209
|
+
return K({
|
|
210
|
+
validateAllItems: $
|
|
214
211
|
}), (e, t) => {
|
|
215
|
-
var
|
|
212
|
+
var i;
|
|
216
213
|
return u(), m("div", {
|
|
217
|
-
class:
|
|
214
|
+
class: w(["dpiV3InnerComponentWrap", { inRapModal: h.inRap }])
|
|
218
215
|
}, [
|
|
219
|
-
h.inRap ?
|
|
220
|
-
h.inRap ?
|
|
221
|
-
h.inRap ? (u(), m("div",
|
|
222
|
-
f("span",
|
|
223
|
-
])) :
|
|
224
|
-
(u(!0), m(
|
|
225
|
-
var
|
|
216
|
+
h.inRap ? g("", !0) : (u(), m("h4", ie, D(e.$t("message.dataupload.datasets.dcat:temporalResolution.title")), 1)),
|
|
217
|
+
h.inRap ? g("", !0) : (u(), m("div", ue, D(e.$t("message.dataupload.datasets.dcat:temporalResolution.description")), 1)),
|
|
218
|
+
h.inRap ? (u(), m("div", ce, [
|
|
219
|
+
f("span", me, D(e.$t("message.metadata.temporal")) + " (optional)", 1)
|
|
220
|
+
])) : g("", !0),
|
|
221
|
+
(u(!0), m(ae, null, se(((i = o(r).Covering["dcat:temporalResolution"]) == null ? void 0 : i["dct:temporal"]) || e.initializedObject, (l, a) => {
|
|
222
|
+
var R, J, U, A, B, N, H;
|
|
226
223
|
return u(), m("div", {
|
|
227
|
-
class:
|
|
224
|
+
class: w(["dpiV3AutoCompleteWrap", { marginRap: h.inRap && a + 1 < o(n).length }])
|
|
228
225
|
}, [
|
|
229
|
-
|
|
230
|
-
f("div",
|
|
231
|
-
p(
|
|
232
|
-
onInput: (
|
|
226
|
+
l != "" ? (u(), m("div", pe, [
|
|
227
|
+
f("div", fe, [
|
|
228
|
+
p(k, {
|
|
229
|
+
onInput: (d) => I(d.target.value, a, "dcat:startDate"),
|
|
233
230
|
defaultInput: !0,
|
|
234
231
|
addOnText: !1,
|
|
235
232
|
eraseable: !1,
|
|
@@ -242,19 +239,19 @@ const ue = { key: 0 }, ce = {
|
|
|
242
239
|
initialHintText: !1,
|
|
243
240
|
showEndIcon: !1,
|
|
244
241
|
inputType: "date",
|
|
245
|
-
modelValue:
|
|
246
|
-
"onUpdate:modelValue": (
|
|
247
|
-
showError: (
|
|
242
|
+
modelValue: l["dcat:startDate"],
|
|
243
|
+
"onUpdate:modelValue": (d) => l["dcat:startDate"] = d,
|
|
244
|
+
showError: (R = o(s)[a]) == null ? void 0 : R.startDate
|
|
248
245
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "showError"]),
|
|
249
|
-
(J =
|
|
250
|
-
p(
|
|
246
|
+
(J = o(s)[a]) != null && J.startDateMessage ? (u(), m("div", ge, [
|
|
247
|
+
p(o(_), {
|
|
251
248
|
size: 16,
|
|
252
249
|
weight: "fill"
|
|
253
250
|
}),
|
|
254
|
-
f("span",
|
|
255
|
-
])) :
|
|
256
|
-
|
|
257
|
-
onInput: (
|
|
251
|
+
f("span", ve, D(o(s)[a].startDateMessage), 1)
|
|
252
|
+
])) : g("", !0),
|
|
253
|
+
j(p(k, {
|
|
254
|
+
onInput: (d) => I(d.target.value, a, "startTime"),
|
|
258
255
|
defaultInput: !0,
|
|
259
256
|
addOnText: !1,
|
|
260
257
|
eraseable: !1,
|
|
@@ -267,22 +264,22 @@ const ue = { key: 0 }, ce = {
|
|
|
267
264
|
inputFieldSize: "large",
|
|
268
265
|
initialHintText: !1,
|
|
269
266
|
showEndIcon: !1,
|
|
270
|
-
modelValue:
|
|
271
|
-
"onUpdate:modelValue": (
|
|
267
|
+
modelValue: l.startTime,
|
|
268
|
+
"onUpdate:modelValue": (d) => l.startTime = d
|
|
272
269
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]), [
|
|
273
270
|
[q, T(a)]
|
|
274
271
|
]),
|
|
275
|
-
T(a) && ((U =
|
|
276
|
-
p(
|
|
272
|
+
T(a) && ((U = o(s)[a]) != null && U.startTimeMessage) ? (u(), m("div", Te, [
|
|
273
|
+
p(o(_), {
|
|
277
274
|
size: 16,
|
|
278
275
|
weight: "fill"
|
|
279
276
|
}),
|
|
280
|
-
f("span",
|
|
281
|
-
])) :
|
|
277
|
+
f("span", De, D(o(s)[a].startTimeMessage), 1)
|
|
278
|
+
])) : g("", !0)
|
|
282
279
|
]),
|
|
283
|
-
f("div",
|
|
284
|
-
p(
|
|
285
|
-
onInput: (
|
|
280
|
+
f("div", he, [
|
|
281
|
+
p(k, {
|
|
282
|
+
onInput: (d) => I(d.target.value, a, "dcat:endDate"),
|
|
286
283
|
defaultInput: !0,
|
|
287
284
|
addOnText: !1,
|
|
288
285
|
eraseable: !1,
|
|
@@ -295,19 +292,19 @@ const ue = { key: 0 }, ce = {
|
|
|
295
292
|
initialHintText: !1,
|
|
296
293
|
showEndIcon: !1,
|
|
297
294
|
inputType: "date",
|
|
298
|
-
modelValue:
|
|
299
|
-
"onUpdate:modelValue": (
|
|
300
|
-
showError: (A =
|
|
295
|
+
modelValue: l["dcat:endDate"],
|
|
296
|
+
"onUpdate:modelValue": (d) => l["dcat:endDate"] = d,
|
|
297
|
+
showError: (A = o(s)[a]) == null ? void 0 : A.endDate
|
|
301
298
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "showError"]),
|
|
302
|
-
(B =
|
|
303
|
-
p(
|
|
299
|
+
(B = o(s)[a]) != null && B.endDateMessage ? (u(), m("div", Me, [
|
|
300
|
+
p(o(_), {
|
|
304
301
|
size: 16,
|
|
305
302
|
weight: "fill"
|
|
306
303
|
}),
|
|
307
|
-
f("span",
|
|
308
|
-
])) :
|
|
309
|
-
|
|
310
|
-
onInput: (
|
|
304
|
+
f("span", ye, D(o(s)[a].endDateMessage), 1)
|
|
305
|
+
])) : g("", !0),
|
|
306
|
+
j(p(k, {
|
|
307
|
+
onInput: (d) => I(d.target.value, a, "endTime"),
|
|
311
308
|
defaultInput: !0,
|
|
312
309
|
addOnText: !1,
|
|
313
310
|
eraseable: !1,
|
|
@@ -320,32 +317,32 @@ const ue = { key: 0 }, ce = {
|
|
|
320
317
|
inputFieldSize: "large",
|
|
321
318
|
initialHintText: !1,
|
|
322
319
|
showEndIcon: !1,
|
|
323
|
-
modelValue:
|
|
324
|
-
"onUpdate:modelValue": (
|
|
320
|
+
modelValue: l.endTime,
|
|
321
|
+
"onUpdate:modelValue": (d) => l.endTime = d
|
|
325
322
|
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]), [
|
|
326
323
|
[q, T(a)]
|
|
327
324
|
]),
|
|
328
|
-
T(a) && ((N =
|
|
329
|
-
p(
|
|
325
|
+
T(a) && ((N = o(s)[a]) != null && N.endTimeMessage) ? (u(), m("div", Ve, [
|
|
326
|
+
p(o(_), {
|
|
330
327
|
size: 16,
|
|
331
328
|
weight: "fill"
|
|
332
329
|
}),
|
|
333
|
-
f("span",
|
|
334
|
-
])) :
|
|
330
|
+
f("span", Re, D(o(s)[a].endTimeMessage), 1)
|
|
331
|
+
])) : g("", !0)
|
|
335
332
|
])
|
|
336
|
-
])) :
|
|
337
|
-
(H =
|
|
338
|
-
p(
|
|
333
|
+
])) : g("", !0),
|
|
334
|
+
(H = o(c)[a]) != null && H.message ? (u(), m("div", _e, [
|
|
335
|
+
p(o(_), {
|
|
339
336
|
size: 16,
|
|
340
337
|
weight: "fill"
|
|
341
338
|
}),
|
|
342
|
-
f("span",
|
|
343
|
-
])) :
|
|
344
|
-
f("div",
|
|
339
|
+
f("span", Ie, D(o(c)[a].message), 1)
|
|
340
|
+
])) : g("", !0),
|
|
341
|
+
f("div", ke, [
|
|
345
342
|
(u(), m("div", {
|
|
346
343
|
key: `checkbox-${a}-${V.value[a]}`
|
|
347
344
|
}, [
|
|
348
|
-
p(
|
|
345
|
+
p(le, {
|
|
349
346
|
type: "checkbox",
|
|
350
347
|
state: T(a) ? "checked" : "",
|
|
351
348
|
text: {
|
|
@@ -354,42 +351,42 @@ const ue = { key: 0 }, ce = {
|
|
|
354
351
|
)
|
|
355
352
|
},
|
|
356
353
|
data: [],
|
|
357
|
-
onChange: (
|
|
354
|
+
onChange: (d) => L(d, a)
|
|
358
355
|
}, null, 8, ["state", "text", "onChange"])
|
|
359
356
|
])),
|
|
360
|
-
|
|
357
|
+
o(n).length > 1 ? (u(), G(E, {
|
|
361
358
|
key: 0,
|
|
362
|
-
buttonText:
|
|
359
|
+
buttonText: o(y)("message.dataupload.menu.delete"),
|
|
363
360
|
size: "small",
|
|
364
361
|
iconStart: "trash",
|
|
365
362
|
variant: "tertiary",
|
|
366
|
-
onClick: (
|
|
367
|
-
}, null, 8, ["buttonText", "onClick"])) : (u(), G(
|
|
363
|
+
onClick: (d) => ee(a)
|
|
364
|
+
}, null, 8, ["buttonText", "onClick"])) : (u(), G(E, {
|
|
368
365
|
key: 1,
|
|
369
|
-
buttonText:
|
|
366
|
+
buttonText: o(y)("message.dataupload.menu.reset"),
|
|
370
367
|
size: "small",
|
|
371
368
|
iconStart: "reset",
|
|
372
369
|
variant: "tertiary",
|
|
373
|
-
onClick: (
|
|
370
|
+
onClick: (d) => x(a)
|
|
374
371
|
}, null, 8, ["buttonText", "onClick"]))
|
|
375
372
|
])
|
|
376
373
|
], 2);
|
|
377
374
|
}), 256)),
|
|
378
375
|
f("div", {
|
|
379
|
-
class:
|
|
376
|
+
class: w(["dpiV3_tempAddMore", { inRapAddMore: h.inRap }])
|
|
380
377
|
}, [
|
|
381
|
-
p(
|
|
378
|
+
p(E, {
|
|
382
379
|
buttonText: e.$t("message.dataupload.datasets.dcat:temporalResolution.addMore"),
|
|
383
380
|
size: "medium",
|
|
384
381
|
iconStart: "plus",
|
|
385
382
|
variant: "tertiary",
|
|
386
|
-
onClick: t[0] || (t[0] = (
|
|
383
|
+
onClick: t[0] || (t[0] = (l) => Y())
|
|
387
384
|
}, null, 8, ["buttonText"])
|
|
388
385
|
], 2)
|
|
389
386
|
], 2);
|
|
390
387
|
};
|
|
391
388
|
}
|
|
392
|
-
},
|
|
389
|
+
}, Ae = /* @__PURE__ */ de(Ce, [["__scopeId", "data-v-f3a53dd7"]]);
|
|
393
390
|
export {
|
|
394
|
-
|
|
391
|
+
Ae as default
|
|
395
392
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
2
|
+
import { asSomeArray as pt } from "../../composables/useDpiSimpleLoader.js";
|
|
3
3
|
let d = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
-
function
|
|
4
|
+
function gt(t) {
|
|
5
5
|
return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
6
6
|
}
|
|
7
|
-
async function
|
|
8
|
-
var h, v, f, D, k, O,
|
|
7
|
+
async function ft(t, g, l, b) {
|
|
8
|
+
var h, v, f, D, k, O, R, j, w, S, I, x, L, U, B, P, C, T, G, M, q, X, z, F, $, N, E, H, W, Y, _, J, K, Q, Z, m, V, tt, it, dt, et, at, nt, ct, ot, st, lt;
|
|
9
9
|
const u = g.specification.prefixes;
|
|
10
10
|
let p = [];
|
|
11
11
|
const o = Object.keys(t);
|
|
@@ -14,7 +14,7 @@ async function ht(t, g, l, b) {
|
|
|
14
14
|
p.push(crypto.randomUUID()), d.dataset["dcat:distribution"].push({
|
|
15
15
|
"@id": `https://piveau.io/set/distribution/${p[c]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const bt = new URLSearchParams(window.location.search).get("edit");
|
|
18
18
|
let y = "";
|
|
19
19
|
try {
|
|
20
20
|
for (let c = 0; c < o.length; c++) {
|
|
@@ -33,9 +33,9 @@ async function ht(t, g, l, b) {
|
|
|
33
33
|
if (o[c] === "BasicInfos") {
|
|
34
34
|
d.dataset["dpi:isDPIv3"] = !0;
|
|
35
35
|
for (let i = 0; i < Object.keys(t.BasicInfos).length; i++)
|
|
36
|
-
Object.keys(t.BasicInfos)[i] === "dct:title" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y =
|
|
36
|
+
Object.keys(t.BasicInfos)[i] === "dct:title" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = gt(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), bt === "true" && (y = t.BasicInfos.datasetID)), Object.keys(t.BasicInfos)[i] === "dct:description" && (d.dataset["dct:description"] = t.BasicInfos["dct:description"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:modified" && (d.dataset["dct:modified"] = t.BasicInfos["dct:modified"][0] || "", d.dataset["dct:modified"]["@type"] = "http://www.w3.org/2001/XMLSchema#date"), Object.keys(t.BasicInfos)[i] === "dct:publisher" && (d.dataset["dct:publisher"] = t.BasicInfos["dct:publisher"][0] || "", d.dataset["dct:publisher"]["@type"] = "foaf:Agent"), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && (d.dataset["dcat:contactPoint"] = t.BasicInfos["dcat:contactPoint"][0] || "", d.dataset["dcat:contactPoint"]["@type"] = "vcard:Organization"), d.dataset["@type"] = "dcat:Dataset", d.meta["dcat:catalog"] = l.permissions[0].rsname, d.meta["@type"] = "dcat:CatalogRecord";
|
|
39
39
|
}
|
|
40
40
|
if (o[c] === "Covering" && Object.keys(t.Covering).length > 1)
|
|
41
41
|
for (let i = 0; i < Object.keys(t.Covering).length; i++) {
|
|
@@ -64,7 +64,7 @@ async function ht(t, g, l, b) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((
|
|
67
|
+
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((j = (R = (O = t.Covering) == null ? void 0 : O["dcatde:politicalGeocodingURI"]) == null ? void 0 : R[0]) == null ? void 0 : j.uri) != null && (d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
68
|
"@id": ((S = (w = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : w[0]) == null ? void 0 : S.uri) || ""
|
|
69
69
|
}, d.dataset["dct:spatial"] === void 0 && (d.dataset["dct:spatial"] = []), d.dataset["dct:spatial"].push({
|
|
70
70
|
"@id": ((x = (I = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : I[0]) == null ? void 0 : x.uri) || ""
|
|
@@ -72,7 +72,7 @@ async function ht(t, g, l, b) {
|
|
|
72
72
|
}
|
|
73
73
|
if (o[c] === "DistributionSimple")
|
|
74
74
|
for (let i = 0; i < t.DistributionSimple["dcat:distribution"].length; i++) {
|
|
75
|
-
if (d.distribution[i] = {}, ((
|
|
75
|
+
if (d.distribution[i] = {}, ((U = (L = t.Discoverability) == null ? void 0 : L.hvdPage[0]) == null ? void 0 : U.uri) != null && (d.distribution[i]["dcatap:applicableLegislation"] = {
|
|
76
76
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
77
77
|
}), d.distribution[i]["@type"] = "dcat:Distribution", d.distribution[i]["@id"] = `https://piveau.io/set/distribution/${p[i]}`, t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"] && (d.distribution[i]["dcat:accessURL"] = {
|
|
78
78
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"]
|
|
@@ -86,7 +86,7 @@ async function ht(t, g, l, b) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
if (Object.keys(
|
|
89
|
-
(
|
|
89
|
+
(B = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : B.policyItems
|
|
90
90
|
).length !== 0 && ((P = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : P.policyItems[0]["dcat:downloadURL"]) !== "") {
|
|
91
91
|
d.distribution[i]["odrl:hasPolicy"] = [];
|
|
92
92
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i].policyItems.length; a++)
|
|
@@ -105,12 +105,12 @@ async function ht(t, g, l, b) {
|
|
|
105
105
|
"@language": "de",
|
|
106
106
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:license"].title
|
|
107
107
|
}));
|
|
108
|
-
const e = (
|
|
108
|
+
const e = (M = (G = (T = t.DistributionSimple) == null ? void 0 : T["dcat:distribution"]) == null ? void 0 : G[i]) == null ? void 0 : M["dct:format"];
|
|
109
109
|
e && (d.distribution[i]["dct:format"] = {
|
|
110
110
|
"@id": (e == null ? void 0 : e.uri) || ""
|
|
111
111
|
}), ((z = (X = (q = t.DistributionSimple) == null ? void 0 : q["dcat:distribution"]) == null ? void 0 : X[i]) == null ? void 0 : z["dcatap:applicableLegislation"]) != null && (d.distribution[i]["dct:format"] = (N = ($ = (F = t.DistributionSimple) == null ? void 0 : F["dcat:distribution"]) == null ? void 0 : $[i]) == null ? void 0 : N["dcatap:applicableLegislation"]["@id"]);
|
|
112
112
|
const s = ((W = (H = (E = t.DistributionSimple) == null ? void 0 : E["dcat:distribution"]) == null ? void 0 : H[i]) == null ? void 0 : W.conformsToItems) || [];
|
|
113
|
-
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] =
|
|
113
|
+
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] = pt(
|
|
114
114
|
s
|
|
115
115
|
).filter(
|
|
116
116
|
(a) => a && (a["dcat:downloadURL"] || a["dct:title"])
|
|
@@ -171,8 +171,8 @@ async function ht(t, g, l, b) {
|
|
|
171
171
|
).length !== 0 && (d.distribution[i]["adms:status"] = {
|
|
172
172
|
"@id": t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri || ""
|
|
173
173
|
});
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
174
|
+
const rt = ((J = (_ = (Y = t.DistributionSimple) == null ? void 0 : Y["dcat:distribution"]) == null ? void 0 : _[i]) == null ? void 0 : J.accessServices) || [];
|
|
175
|
+
if (rt.length !== 0 && (d.distribution[i]["dcat:accessService"] = (K = pt(rt)) == null ? void 0 : K.filter(
|
|
176
176
|
(a) => a && (a["dct:title"] || a["dct:description"] || a["dcat:downloadURL"] || a["dcat:endpointURL"])
|
|
177
177
|
).map((a) => {
|
|
178
178
|
const n = {
|
|
@@ -495,7 +495,7 @@ async function ht(t, g, l, b) {
|
|
|
495
495
|
}), Object.keys(t.Additionals)[i] === "dcatde:politicalGeocodingLevelURI")
|
|
496
496
|
for (let e = 0; e < t.Additionals["dcatde:politicalGeocodingLevelURI"].length; e++)
|
|
497
497
|
d.dataset["dcatde:politicalGeocodingLevelURI"] === void 0 && (d.dataset["dcatde:politicalGeocodingLevelURI"] = []), d.dataset["dcatde:politicalGeocodingLevelURI"].push({
|
|
498
|
-
"@id": ((ot = (ct = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : ct[e]) == null ? void 0 : ot.uri) || ""
|
|
498
|
+
"@id": ((ot = (ct = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : ct[e]) == null ? void 0 : ot.uri) || ((lt = (st = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : st[e]) == null ? void 0 : lt["@id"]) || ""
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
} catch (i) {
|
|
@@ -505,7 +505,7 @@ async function ht(t, g, l, b) {
|
|
|
505
505
|
} catch (c) {
|
|
506
506
|
console.log(c);
|
|
507
507
|
}
|
|
508
|
-
let A =
|
|
508
|
+
let A = yt(d, u);
|
|
509
509
|
return { actionParams: {
|
|
510
510
|
id: y,
|
|
511
511
|
catalog: l.permissions[0].rsname,
|
|
@@ -514,7 +514,7 @@ async function ht(t, g, l, b) {
|
|
|
514
514
|
description: d.dataset["dct:description"]["@value"]
|
|
515
515
|
}, body: A };
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function yt(t, g) {
|
|
518
518
|
const l = {}, b = Object.keys(t);
|
|
519
519
|
for (let o = 0; o < b.length; o++)
|
|
520
520
|
b[o], l[b[o]] = t[b[o]];
|
|
@@ -534,5 +534,5 @@ function bt(t, g) {
|
|
|
534
534
|
return console.log(p), p;
|
|
535
535
|
}
|
|
536
536
|
export {
|
|
537
|
-
|
|
537
|
+
ft as default
|
|
538
538
|
};
|