@piveau/dpi 0.1.0-beta.64 → 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.
@@ -1,4 +1,4 @@
1
- import { ref as h, reactive as T, onMounted as D, createElementBlock as c, openBlock as r, normalizeClass as S, createCommentVNode as g, createBlock as z, Fragment as M, renderList as E, createElementVNode as B, createVNode as u, unref as d, toDisplayString as N, isRef as P } from "vue";
1
+ import { ref as g, reactive as T, onMounted as D, createElementBlock as c, openBlock as r, normalizeClass as S, createCommentVNode as h, createBlock as z, Fragment as M, renderList as E, createElementVNode as B, createVNode as u, unref as d, toDisplayString as P, isRef as N } from "vue";
2
2
  import q from "../TextAreaV3.vue.js";
3
3
  import w from "../ButtonV3.vue.js";
4
4
  import W from "../ModalSimpleV3.vue.js";
@@ -25,9 +25,9 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
25
25
  },
26
26
  emits: ["update"],
27
27
  setup(a, { expose: _, emit: A }) {
28
- let s = h({});
29
- const o = a, m = A, R = h(!1), V = h(null), l = T({});
30
- let p = h(!1);
28
+ let s = g({});
29
+ const o = a, m = A, R = g(!1), V = g(null), l = T({});
30
+ let p = g(!1);
31
31
  D(() => {
32
32
  console.log("Component Mounted: accessServices received for distributionId:", o.distributionId), console.log("accessServices:", o.accessServices), o.accessServices.length === 0 && (console.log("No accessServices found, initializing first service."), m("update", [
33
33
  {
@@ -42,20 +42,20 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
42
42
  if (!t || t.trim() === "") return !1;
43
43
  const i = t.trim();
44
44
  return /\.[a-zA-Z]{2,}$/.test(i);
45
- }, v = (t) => {
45
+ }, b = (t) => {
46
46
  const i = t["dct:title"] && t["dct:title"].trim() !== "", e = t["dct:description"] && t["dct:description"].trim() !== "";
47
47
  return i || e;
48
48
  }, I = (t) => {
49
49
  const i = o.accessServices.find((e) => e.id === t);
50
50
  if (i) {
51
51
  const e = i["dcat:downloadURL"] ? i["dcat:downloadURL"].trim() : "";
52
- v(i) ? e && f(e) ? l[t] = null : l[t] = "Bitte geben Sie eine gültige URL ein." : e && !f(e) ? l[t] = "Bitte geben Sie eine gültige URL ein." : l[t] = null;
52
+ b(i) ? e && f(e) ? l[t] = null : l[t] = "Bitte geben Sie eine gültige URL ein." : e && !f(e) ? l[t] = "Bitte geben Sie eine gültige URL ein." : l[t] = null;
53
53
  }
54
54
  }, L = () => {
55
55
  let t = !1;
56
56
  return o.accessServices.forEach((i) => {
57
57
  const e = i["dcat:downloadURL"] ? i["dcat:downloadURL"].trim() : "";
58
- v(i) ? e ? f(e) || (l[i.id] = "Bitte geben Sie eine gültige URL ein.", t = !0) : (l[i.id] = "URL ist erforderlich", t = !0) : e && !f(e) && (l[i.id] = "Bitte geben Sie eine gültige URL ein.", t = !0);
58
+ b(i) ? e ? f(e) || (l[i.id] = "Bitte geben Sie eine gültige URL ein.", t = !0) : (l[i.id] = "Please enter a valid URL.", t = !0) : e && !f(e) && (l[i.id] = "Bitte geben Sie eine gültige URL ein.", t = !0);
59
59
  }), t;
60
60
  }, k = (t) => {
61
61
  switch (t) {
@@ -75,7 +75,7 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
75
75
  m("update", [...o.accessServices, i]);
76
76
  }, U = (t, i, e) => {
77
77
  const n = o.accessServices.map(
78
- (b) => b.id === e ? { ...b, [i]: t.target.value } : b
78
+ (v) => v.id === e ? { ...v, [i]: t.target.value } : v
79
79
  );
80
80
  m("update", n), setTimeout(() => {
81
81
  I(e);
@@ -124,8 +124,8 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
124
124
  size: 16,
125
125
  weight: "fill"
126
126
  }),
127
- B("span", j, N(l[e.id]), 1)
128
- ])) : g("", !0),
127
+ B("span", j, P(l[e.id]), 1)
128
+ ])) : h("", !0),
129
129
  u(x, {
130
130
  onInput: (n) => U(n, "dct:title", e.id),
131
131
  addOnText: !1,
@@ -150,7 +150,7 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
150
150
  "onUpdate:modelValue": (n) => e["dct:description"] = n,
151
151
  showDeleteButton: a.showDeleteButton
152
152
  }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "showDeleteButton"]),
153
- R.value && a.accessServices.length === 1 ? (r(), c("p", G, " Mindestens eine URL muss vorhanden sein. ")) : g("", !0)
153
+ R.value && a.accessServices.length === 1 ? (r(), c("p", G, " Mindestens eine URL muss vorhanden sein. ")) : h("", !0)
154
154
  ]),
155
155
  u(w, {
156
156
  class: "dpiV3_tempAddMore",
@@ -161,7 +161,7 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
161
161
  onClick: (n) => C(e)
162
162
  }, null, 8, ["onClick"])
163
163
  ], 2))), 128)),
164
- a.asCard ? g("", !0) : (r(), c("div", J, [
164
+ a.asCard ? h("", !0) : (r(), c("div", J, [
165
165
  u(w, {
166
166
  buttonText: "Weiteren Service hinzufügen",
167
167
  size: "small",
@@ -175,15 +175,15 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
175
175
  buttons: d(s).button,
176
176
  headerText: d(s).header,
177
177
  text: d(s).text,
178
- onClose: i[0] || (i[0] = (e) => P(p) ? p.value = !1 : p = !1),
178
+ onClose: i[0] || (i[0] = (e) => N(p) ? p.value = !1 : p = !1),
179
179
  action: d(s).action,
180
180
  onActionHandling: i[1] || (i[1] = (e) => k(e)),
181
181
  optionalString_1: d(s).optionalString_1,
182
182
  optionalString_2: d(s).optionalString_2
183
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : g("", !0)
183
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : h("", !0)
184
184
  ], 2));
185
185
  }
186
- }, oe = /* @__PURE__ */ H(K, [["__scopeId", "data-v-b735c5bd"]]);
186
+ }, oe = /* @__PURE__ */ H(K, [["__scopeId", "data-v-6fea1bf4"]]);
187
187
  export {
188
188
  oe as default
189
189
  };