@piveau/dpi 0.1.0-beta.64 → 0.1.0-beta.66

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.
@@ -1,44 +1,44 @@
1
- import { ref as M, reactive as j, watch as ae, createElementBlock as m, openBlock as u, normalizeClass as z, createCommentVNode as v, createElementVNode as f, toDisplayString as D, Fragment as se, renderList as le, unref as r, createVNode as p, withDirectives as W, vShow as q, createBlock as G } from "vue";
2
- import b from "../HappyFlowComponents/ui/InputField.vue.js";
3
- import oe from "../HappyFlowComponents/ui/CheckboxV3.vue.js";
4
- import S from "../HappyFlowComponents/ui/ButtonV3.vue.js";
5
- import { PhWarning as I } from "@phosphor-icons/vue";
6
- import { useI18n as re } from "vue-i18n";
7
- import { getNode as K } from "@formkit/core";
8
- import { useFormValues as ne } from "../composables/useDpiFormValues.js";
9
- import { useEditModeInfo as ie } from "../composables/useDpiEditMode.js";
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 ue = { key: 0 }, ce = {
12
+ const ie = { key: 0 }, ue = {
13
13
  key: 1,
14
14
  class: "copy-large-regular"
15
- }, me = { key: 2 }, pe = { class: "dpiV3_label" }, fe = {
15
+ }, ce = { key: 2 }, me = { class: "dpiV3_label" }, pe = {
16
16
  key: 0,
17
17
  class: "dpiV3_firstRow"
18
- }, ve = { class: "dpiV3_firstRow_inner" }, ge = {
18
+ }, fe = { class: "dpiV3_firstRow_inner" }, ge = {
19
19
  key: 0,
20
20
  class: "dpiV3_errorMessage"
21
- }, Te = { class: "copy-mini-regular" }, De = {
21
+ }, ve = { class: "copy-mini-regular" }, Te = {
22
22
  key: 1,
23
23
  class: "dpiV3_errorMessage"
24
- }, he = { class: "copy-mini-regular" }, Me = { class: "dpiV3_firstRow_inner" }, ye = {
24
+ }, De = { class: "copy-mini-regular" }, he = { class: "dpiV3_firstRow_inner" }, Me = {
25
25
  key: 0,
26
26
  class: "dpiV3_errorMessage"
27
- }, Ve = { class: "copy-mini-regular" }, Re = {
27
+ }, ye = { class: "copy-mini-regular" }, Ve = {
28
28
  key: 1,
29
29
  class: "dpiV3_errorMessage"
30
- }, _e = { class: "copy-mini-regular" }, Ie = {
30
+ }, Re = { class: "copy-mini-regular" }, _e = {
31
31
  key: 1,
32
32
  class: "validation-error"
33
- }, ke = { class: "copy-mini-regular" }, Ce = { class: "dpiV3_secondRowTemporal" }, be = {
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: Q }) {
40
- const { isEditMode: X } = ie(), { formValues: i } = ne(), { t: y } = re(), g = M([!1]), V = M([0]);
41
- let l = M(), c = M([{ startDate: !1, endDate: !1, message: "" }]), s = j([
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 w = j({});
53
+ const C = W({});
54
54
  M();
55
- let E = M(y("message.dataupload.menu.reset"));
56
- const k = h;
57
- X.value ? (i.value.Covering["dcat:temporalResolution"] !== void 0 ? l.value = i.value.Covering["dcat:temporalResolution"]["dct:temporal"] || [] : l.value = [
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
- ], g.value = l == null ? void 0 : l.value.map(
69
+ ], v.value = n == null ? void 0 : n.value.map(
70
70
  (e) => e.dataType === "dateTime"
71
- ), V.value = new Array(l == null ? void 0 : l.value.length).fill(0), s.length = 0, c.value = [], l.value.forEach(() => {
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
- })) : (l.value = i.value.Covering["dcat:temporalResolution"]["dct:temporal"] || [], g.value = l == null ? void 0 : l.value.map(
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 R = M([
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) => g.value[e] === !0;
94
- ae(
93
+ ]), T = (e) => v.value[e] === !0;
94
+ te(
95
95
  () => y("message.dataupload.menu.reset"),
96
96
  (e) => {
97
- E.value = e;
97
+ b.value = e;
98
98
  }
99
99
  );
100
- const Y = (e) => {
101
- const t = i.value.Covering["dcat:temporalResolution"]["dct:temporal"][e];
100
+ const X = (e) => {
101
+ const t = r.value.Covering["dcat:temporalResolution"]["dct:temporal"][e];
102
102
  if (!t) return !1;
103
- const d = t["dcat:startDate"] && t["dcat:startDate"].trim() !== "", o = t["dcat:endDate"] && t["dcat:endDate"].trim() !== "", a = T(e) && t.startTime && t.startTime.trim() !== "", _ = T(e) && t.endTime && t.endTime.trim() !== "";
104
- return d || o || a || _;
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 = i.value.Covering["dcat:temporalResolution"]["dct:temporal"][e];
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 d = Y(e);
128
- let o = !1;
129
- return d && ((!t["dcat:startDate"] || t["dcat:startDate"].trim() === "") && (s[e].startDate = !0, s[e].startDateMessage = "Startdatum ist erforderlich", o = !0), (!t["dcat:endDate"] || t["dcat:endDate"].trim() === "") && (s[e].endDate = !0, s[e].endDateMessage = "Enddatum ist erforderlich", o = !0), T(e) && ((!t.startTime || t.startTime.trim() === "") && (s[e].startTime = !0, s[e].startTimeMessage = "Startzeit ist erforderlich", o = !0), (!t.endTime || t.endTime.trim() === "") && (s[e].endTime = !0, s[e].endTimeMessage = "Endzeit ist erforderlich", o = !0))), !o;
130
- }, O = (e) => {
131
- w[e] && clearTimeout(w[e]), w[e] = setTimeout(() => {
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
- }, P = () => {
134
+ }, $ = () => {
135
135
  var t;
136
136
  let e = !1;
137
- return (t = i.value.Covering["dcat:temporalResolution"]) != null && t["dct:temporal"] && i.value.Covering["dcat:temporalResolution"]["dct:temporal"].forEach(
138
- (d, o) => {
139
- F(o) || (e = !0), $(o) || (e = !0);
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
- }, Z = () => {
143
- if (P())
142
+ }, Y = () => {
143
+ if ($())
144
144
  return;
145
- const e = l.value.reduce(
146
- (t, d) => Math.max(t, d.id || 0),
145
+ const e = n.value.reduce(
146
+ (t, i) => Math.max(t, i.id || 0),
147
147
  0
148
148
  );
149
- l.value.push({ id: e + 1, dataType: "date" }), E.value = y("message.dataupload.menu.delete"), L();
150
- }, L = () => {
151
- g.value.push(!1), V.value.push(0), s.push({
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
- }, x = (e, t) => {
162
- const d = e.target.checked;
163
- g.value[t] = d, g.value[t] ? i.value.Covering["dcat:temporalResolution"]["dct:temporal"][t].dataType = "dateTime" : (i.value.Covering["dcat:temporalResolution"]["dct:temporal"][t].dataType = "date", s[t] && (s[t].startTimeMessage = "", s[t].endTimeMessage = "")), O(t);
164
- }, $ = (e) => {
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 = i.value.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:startDate"], d = i.value.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:endDate"];
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 o = !0;
170
- if (t && d) {
169
+ let l = !0;
170
+ if (t && i) {
171
171
  const a = new Date(t);
172
- new Date(d) < a && (c.value[e] = {
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
- }, o = !1);
176
+ }, l = !1);
177
177
  }
178
- return R.value[0].isValid = o, o;
179
- }, C = (e, t, d, o) => {
180
- i.value.Covering["dcat:temporalResolution"] !== void 0 || (i.value.Covering["dcat:temporalResolution"] = {
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
- }), i.value.Covering["dcat:temporalResolution"]["dct:temporal"][t][d] = e, $(t), O(t);
191
- }, ee = (e) => {
192
- l.value[e] && (l.value[e]["dcat:startDate"] = "", l.value[e]["dcat:endDate"] = "", "startTime" in l.value[e] && (l.value[e].startTime = ""), "endTime" in l.value[e] && (l.value[e].endTime = ""), R.value[0]["dct:temporal"][e] = {
193
- dataType: "date",
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
- }), k.inRap ? K("Covering").value[Object.keys(K("Covering").value)[1]] = R : k.context.node.input(R));
206
- }, te = (e) => {
207
- i.value.Covering["dcat:temporalResolution"]["dct:temporal"].splice(
202
+ });
203
+ }, ee = (e) => {
204
+ r.value.Covering["dcat:temporalResolution"]["dct:temporal"].splice(
208
205
  e,
209
206
  1
210
- ), l.value = i.value.Covering["dcat:temporalResolution"]["dct:temporal"], g.value.splice(e, 1), V.value.splice(e, 1), c.value.splice(e, 1), s.splice(e, 1), k.inRap || k.context.node.input(R), l.value.length === 1 && (E.value = y("message.dataupload.menu.reset"));
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 Q({
213
- validateAllItems: P
209
+ return K({
210
+ validateAllItems: $
214
211
  }), (e, t) => {
215
- var d;
212
+ var i;
216
213
  return u(), m("div", {
217
- class: z(["dpiV3InnerComponentWrap", { inRapModal: h.inRap }])
214
+ class: w(["dpiV3InnerComponentWrap", { inRapModal: h.inRap }])
218
215
  }, [
219
- h.inRap ? v("", !0) : (u(), m("h4", ue, D(e.$t("message.dataupload.datasets.dcat:temporalResolution.title")), 1)),
220
- h.inRap ? v("", !0) : (u(), m("div", ce, D(e.$t("message.dataupload.datasets.dcat:temporalResolution.description")), 1)),
221
- h.inRap ? (u(), m("div", me, [
222
- f("span", pe, D(e.$t("message.metadata.temporal")) + " (optional)", 1)
223
- ])) : v("", !0),
224
- (u(!0), m(se, null, le(((d = r(i).Covering["dcat:temporalResolution"]) == null ? void 0 : d["dct:temporal"]) || e.initializedObject, (o, a) => {
225
- var _, J, U, A, B, N, H;
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: z(["dpiV3AutoCompleteWrap", { marginRap: h.inRap && a + 1 < r(l).length }])
224
+ class: w(["dpiV3AutoCompleteWrap", { marginRap: h.inRap && a + 1 < o(n).length }])
228
225
  }, [
229
- o != "" ? (u(), m("div", fe, [
230
- f("div", ve, [
231
- p(b, {
232
- onInput: (n) => C(n.target.value, a, "dcat:startDate"),
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: o["dcat:startDate"],
246
- "onUpdate:modelValue": (n) => o["dcat:startDate"] = n,
247
- showError: (_ = r(s)[a]) == null ? void 0 : _.startDate
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 = r(s)[a]) != null && J.startDateMessage ? (u(), m("div", ge, [
250
- p(r(I), {
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", Te, D(r(s)[a].startDateMessage), 1)
255
- ])) : v("", !0),
256
- W(p(b, {
257
- onInput: (n) => C(n.target.value, a, "startTime"),
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: o.startTime,
271
- "onUpdate:modelValue": (n) => o.startTime = n
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 = r(s)[a]) != null && U.startTimeMessage) ? (u(), m("div", De, [
276
- p(r(I), {
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", he, D(r(s)[a].startTimeMessage), 1)
281
- ])) : v("", !0)
277
+ f("span", De, D(o(s)[a].startTimeMessage), 1)
278
+ ])) : g("", !0)
282
279
  ]),
283
- f("div", Me, [
284
- p(b, {
285
- onInput: (n) => C(n.target.value, a, "dcat:endDate"),
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: o["dcat:endDate"],
299
- "onUpdate:modelValue": (n) => o["dcat:endDate"] = n,
300
- showError: (A = r(s)[a]) == null ? void 0 : A.endDate
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 = r(s)[a]) != null && B.endDateMessage ? (u(), m("div", ye, [
303
- p(r(I), {
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", Ve, D(r(s)[a].endDateMessage), 1)
308
- ])) : v("", !0),
309
- W(p(b, {
310
- onInput: (n) => C(n.target.value, a, "endTime"),
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: o.endTime,
324
- "onUpdate:modelValue": (n) => o.endTime = n
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 = r(s)[a]) != null && N.endTimeMessage) ? (u(), m("div", Re, [
329
- p(r(I), {
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", _e, D(r(s)[a].endTimeMessage), 1)
334
- ])) : v("", !0)
330
+ f("span", Re, D(o(s)[a].endTimeMessage), 1)
331
+ ])) : g("", !0)
335
332
  ])
336
- ])) : v("", !0),
337
- (H = r(c)[a]) != null && H.message ? (u(), m("div", Ie, [
338
- p(r(I), {
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", ke, D(r(c)[a].message), 1)
343
- ])) : v("", !0),
344
- f("div", Ce, [
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(oe, {
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: (n) => x(n, a)
354
+ onChange: (d) => L(d, a)
358
355
  }, null, 8, ["state", "text", "onChange"])
359
356
  ])),
360
- r(l).length > 1 ? (u(), G(S, {
357
+ o(n).length > 1 ? (u(), G(E, {
361
358
  key: 0,
362
- buttonText: r(y)("message.dataupload.menu.delete"),
359
+ buttonText: o(y)("message.dataupload.menu.delete"),
363
360
  size: "small",
364
361
  iconStart: "trash",
365
362
  variant: "tertiary",
366
- onClick: (n) => te(a)
367
- }, null, 8, ["buttonText", "onClick"])) : (u(), G(S, {
363
+ onClick: (d) => ee(a)
364
+ }, null, 8, ["buttonText", "onClick"])) : (u(), G(E, {
368
365
  key: 1,
369
- buttonText: r(y)("message.dataupload.menu.reset"),
366
+ buttonText: o(y)("message.dataupload.menu.reset"),
370
367
  size: "small",
371
368
  iconStart: "reset",
372
369
  variant: "tertiary",
373
- onClick: (n) => ee(a)
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: z(["dpiV3_tempAddMore", { inRapAddMore: h.inRap }])
376
+ class: w(["dpiV3_tempAddMore", { inRapAddMore: h.inRap }])
380
377
  }, [
381
- p(S, {
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] = (o) => Z())
383
+ onClick: t[0] || (t[0] = (l) => Y())
387
384
  }, null, 8, ["buttonText"])
388
385
  ], 2)
389
386
  ], 2);
390
387
  };
391
388
  }
392
- }, Be = /* @__PURE__ */ de(be, [["__scopeId", "data-v-433b3757"]]);
389
+ }, Ae = /* @__PURE__ */ de(Ce, [["__scopeId", "data-v-f3a53dd7"]]);
393
390
  export {
394
- Be as default
391
+ Ae as default
395
392
  };
@@ -1,11 +1,11 @@
1
1
  import "axios";
2
- import { asSomeArray as lt } from "../../composables/useDpiSimpleLoader.js";
2
+ import { asSomeArray as pt } from "../../composables/useDpiSimpleLoader.js";
3
3
  let d = { distribution: [], dataset: {}, meta: {} };
4
- function pt(t) {
4
+ function gt(t) {
5
5
  return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
6
6
  }
7
- async function ht(t, g, l, b) {
8
- var h, v, f, D, k, O, j, R, w, S, I, x, L, B, U, P, C, T, M, G, q, X, z, F, $, N, E, H, W, Y, _, J, K, Q, Z, m, V, tt, it, dt, et, at, nt, ct, ot;
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 rt = new URLSearchParams(window.location.search).get("edit");
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 = pt(
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
- ), rt === "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";
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" && ((R = (j = (O = t.Covering) == null ? void 0 : O["dcatde:politicalGeocodingURI"]) == null ? void 0 : j[0]) == null ? void 0 : R.uri) != null && (d.dataset["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] = {}, ((B = (L = t.Discoverability) == null ? void 0 : L.hvdPage[0]) == null ? void 0 : B.uri) != null && (d.distribution[i]["dcatap:applicableLegislation"] = {
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
- (U = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : U.policyItems
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 = (G = (M = (T = t.DistributionSimple) == null ? void 0 : T["dcat:distribution"]) == null ? void 0 : M[i]) == null ? void 0 : G["dct:format"];
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"] = lt(
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 st = ((J = (_ = (Y = t.DistributionSimple) == null ? void 0 : Y["dcat:distribution"]) == null ? void 0 : _[i]) == null ? void 0 : J.accessServices) || [];
175
- if (st.length !== 0 && (d.distribution[i]["dcat:accessService"] = (K = lt(st)) == null ? void 0 : K.filter(
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 = bt(d, u);
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 bt(t, g) {
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
- ht as default
537
+ ft as default
538
538
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.1.0-beta.64",
4
+ "version": "0.1.0-beta.66",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",