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

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 S, computed as N, onMounted as P, createElementBlock as u, openBlock as r, normalizeClass as x, createCommentVNode as V, createBlock as q, Fragment as W, renderList as H, createElementVNode as R, createVNode as f, unref as l, isRef as O } from "vue";
1
+ import { ref as h, reactive as L, computed as N, onMounted as P, createElementBlock as u, openBlock as r, normalizeClass as x, createCommentVNode as b, createBlock as q, Fragment as W, renderList as H, createElementVNode as R, createVNode as f, unref as l, isRef as O } from "vue";
2
2
  import I from "../ButtonV3.vue.js";
3
3
  import j from "../ModalSimpleV3.vue.js";
4
4
  import w from "../InputField.vue.js";
@@ -25,9 +25,9 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
25
25
  emits: ["update", "validationChange"],
26
26
  setup(d, { expose: k, emit: _ }) {
27
27
  let s = h({});
28
- const a = d, c = _, y = h(!1), b = h(null), i = S({}), v = S({});
28
+ const a = d, c = _, y = h(!1), V = h(null), o = L({}), v = L({});
29
29
  let m = h(!1);
30
- const T = N(() => Object.values(i).some((e) => e === !0)), A = () => {
30
+ const T = N(() => Object.values(o).some((e) => e === !0)), A = () => {
31
31
  c("validationChange", T.value);
32
32
  };
33
33
  P(() => {
@@ -49,14 +49,14 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
49
49
  }, g = (e) => {
50
50
  const t = a.conformsToItems.find((n) => n.id === e);
51
51
  if (t) {
52
- const n = t["dct:title"] && t["dct:title"].trim() !== "", o = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
53
- n ? o ? p(o) ? i[e] = null : i[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : i[e] = "URL ist erforderlich" : o && !p(o) ? i[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : i[e] = null;
52
+ const n = t["dct:title"] && t["dct:title"].trim() !== "", i = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
53
+ n ? i ? p(i) ? o[e] = null : o[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : o[e] = "Bitte geben Sie eine gültige URL ein." : i && !p(i) ? o[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : o[e] = null;
54
54
  }
55
55
  }, U = () => {
56
56
  let e = !1;
57
57
  return a.conformsToItems.forEach((t) => {
58
- const n = t["dct:title"] && t["dct:title"].trim() !== "", o = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
59
- n ? o ? p(o) || (i[t.id] = "Bitte geben Sie eine gültige URL ein.", e = !0) : (i[t.id] = "URL ist erforderlich", e = !0) : o && !p(o) && (i[t.id] = "Bitte geben Sie eine gültige URL ein.", e = !0);
58
+ const n = t["dct:title"] && t["dct:title"].trim() !== "", i = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
59
+ n ? i && p(i) || (o[t.id] = "Bitte geben Sie eine gültige URL ein.", e = !0) : i && !p(i) && (o[t.id] = "Bitte geben Sie eine gültige URL ein.", e = !0);
60
60
  }), e;
61
61
  }, z = (e) => {
62
62
  switch (e) {
@@ -78,12 +78,12 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
78
78
  g(e);
79
79
  }, 800);
80
80
  }, B = (e, t, n) => {
81
- var L;
82
- (L = e == null ? void 0 : e.target) == null || L.value;
83
- const o = a.conformsToItems.map(
81
+ var S;
82
+ (S = e == null ? void 0 : e.target) == null || S.value;
83
+ const i = a.conformsToItems.map(
84
84
  (C) => C.id === n ? { ...C, [t]: e.target.value } : C
85
85
  );
86
- c("update", o), M(n);
86
+ c("update", i), M(n);
87
87
  }, $ = (e) => {
88
88
  s.value = {
89
89
  button: "Löschen",
@@ -92,12 +92,12 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
92
92
  action: "delete",
93
93
  optionalString_1: e["dct:title"],
94
94
  optionalString_2: e["dcat:downloadURL"]
95
- }, m.value = !0, b.value = e;
95
+ }, m.value = !0, V.value = e;
96
96
  }, D = () => {
97
97
  const e = a.conformsToItems.filter(
98
- (t) => t.id !== b.value.id
98
+ (t) => t.id !== V.value.id
99
99
  );
100
- delete i[b.value.id], c("update", e), A();
100
+ delete o[V.value.id], c("update", e), A();
101
101
  }, F = (e) => {
102
102
  e["dct:title"] = "", g(e.id);
103
103
  };
@@ -113,8 +113,8 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
113
113
  }, [
114
114
  R("div", J, [
115
115
  f(w, {
116
- onInput: (o) => B(o, "dcat:downloadURL", n.id),
117
- onBlur: (o) => g(n.id),
116
+ onInput: (i) => B(i, "dcat:downloadURL", n.id),
117
+ onBlur: (i) => g(n.id),
118
118
  addOnText: !1,
119
119
  datePicker: !1,
120
120
  infoIcon: !1,
@@ -125,18 +125,18 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
125
125
  label: "URL",
126
126
  showEndIcon: !1,
127
127
  modelValue: n["dcat:downloadURL"],
128
- "onUpdate:modelValue": (o) => n["dcat:downloadURL"] = o
128
+ "onUpdate:modelValue": (i) => n["dcat:downloadURL"] = i
129
129
  }, null, 8, ["onInput", "onBlur", "modelValue", "onUpdate:modelValue"]),
130
- i[n.id] ? (r(), u("div", K, [
130
+ o[n.id] ? (r(), u("div", K, [
131
131
  f(l(Z), {
132
132
  size: 16,
133
133
  weight: "fill"
134
134
  }),
135
135
  t[2] || (t[2] = R("span", { class: "copy-mini-regular" }, "Bitte geben Sie eine gültige URL ein.", -1))
136
- ])) : V("", !0),
136
+ ])) : b("", !0),
137
137
  f(w, {
138
- onInput: (o) => B(o, "dct:title", n.id),
139
- onBlur: (o) => g(n.id),
138
+ onInput: (i) => B(i, "dct:title", n.id),
139
+ onBlur: (i) => g(n.id),
140
140
  addOnText: !1,
141
141
  datePicker: !1,
142
142
  infoIcon: !1,
@@ -149,11 +149,11 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
149
149
  ),
150
150
  showEndIcon: !1,
151
151
  modelValue: n["dct:title"],
152
- "onUpdate:modelValue": (o) => n["dct:title"] = o,
152
+ "onUpdate:modelValue": (i) => n["dct:title"] = i,
153
153
  defaultInput: !d.showDeleteButton,
154
- onDeleteButtonClicked: (o) => F(n)
154
+ onDeleteButtonClicked: (i) => F(n)
155
155
  }, null, 8, ["onInput", "onBlur", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
156
- y.value && d.conformsToItems.length === 1 ? (r(), u("p", Q, " Mindestens eine URL muss vorhanden sein. ")) : V("", !0)
156
+ y.value && d.conformsToItems.length === 1 ? (r(), u("p", Q, " Mindestens eine URL muss vorhanden sein. ")) : b("", !0)
157
157
  ]),
158
158
  f(I, {
159
159
  class: "dpiV3_tempAddMore",
@@ -163,10 +163,10 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
163
163
  size: "small",
164
164
  iconStart: "trash",
165
165
  variant: "tertiary",
166
- onClick: (o) => $(n)
166
+ onClick: (i) => $(n)
167
167
  }, null, 8, ["buttonText", "onClick"])
168
168
  ], 2))), 128)),
169
- d.asCard ? V("", !0) : (r(), u("div", X, [
169
+ d.asCard ? b("", !0) : (r(), u("div", X, [
170
170
  f(I, {
171
171
  buttonText: "Weitere Standards hinzufügen",
172
172
  size: "small",
@@ -185,10 +185,10 @@ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
185
185
  onActionHandling: t[1] || (t[1] = (n) => z(n)),
186
186
  optionalString_1: l(s).optionalString_1,
187
187
  optionalString_2: l(s).optionalString_2
188
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : V("", !0)
188
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : b("", !0)
189
189
  ], 2));
190
190
  }
191
- }, de = /* @__PURE__ */ G(Y, [["__scopeId", "data-v-83f24ca4"]]);
191
+ }, de = /* @__PURE__ */ G(Y, [["__scopeId", "data-v-2c476ce8"]]);
192
192
  export {
193
193
  de as default
194
194
  };
@@ -51,17 +51,17 @@ const ie = { class: "dpiV3_LinkAndMetadata" }, le = {
51
51
  }, S = (e) => {
52
52
  const i = e["dct:title"] && e["dct:title"].trim() !== "", t = e["dct:description"] && e["dct:description"].trim() !== "", a = e["dct:format"] && e["dct:format"].trim !== "" && (typeof e["dct:format"] == "string" ? e["dct:format"].trim() !== "" : !0);
53
53
  return i || t || a;
54
- }, w = (e) => {
54
+ }, B = (e) => {
55
55
  const i = l.documentations.find((t) => t.id === e);
56
56
  if (i) {
57
57
  const t = i["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
58
58
  S(i) ? a && D(a) ? s[e] = null : s[e] = "Bitte geben Sie eine gültige URL ein." : a && !D(a) ? s[e] = "Bitte geben Sie eine gültige URL ein." : s[e] = null;
59
59
  }
60
- }, B = () => {
60
+ }, w = () => {
61
61
  let e = !1;
62
62
  return l.documentations.forEach((i) => {
63
63
  const t = i["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
64
- S(i) ? a ? D(a) || (s[i.id] = "Bitte geben Sie eine gültige URL ein.", e = !0) : (s[i.id] = "URL ist erforderlich", e = !0) : a && !D(a) && (s[i.id] = "Bitte geben Sie eine gültige URL ein.", e = !0);
64
+ S(i) ? a && D(a) || (s[i.id] = "Bitte geben Sie eine gültige URL ein.", e = !0) : a && !D(a) && (s[i.id] = "Bitte geben Sie eine gültige URL ein.", e = !0);
65
65
  }), e;
66
66
  }, M = (e) => {
67
67
  switch (e) {
@@ -77,7 +77,7 @@ const ie = { class: "dpiV3_LinkAndMetadata" }, le = {
77
77
  (T) => T["@value"].toUpperCase().startsWith(a)
78
78
  ) : d.value = [...l.fileTypes];
79
79
  }, W = () => {
80
- if (B())
80
+ if (w())
81
81
  return;
82
82
  const i = {
83
83
  id: (l.documentations.length ? Math.max(...l.documentations.map((t) => t.id)) : 0) + 1,
@@ -125,7 +125,7 @@ const ie = { class: "dpiV3_LinkAndMetadata" }, le = {
125
125
  (u) => u.id === t ? { ...u, [i]: e.target.value } : u
126
126
  );
127
127
  y("update", a), setTimeout(() => {
128
- w(t);
128
+ B(t);
129
129
  }, 0);
130
130
  }, H = (e) => {
131
131
  p.value = {
@@ -154,11 +154,11 @@ const ie = { class: "dpiV3_LinkAndMetadata" }, le = {
154
154
  break;
155
155
  }
156
156
  setTimeout(() => {
157
- w(i.id);
157
+ B(i.id);
158
158
  }, 0);
159
159
  };
160
160
  return A({
161
- validateAllItems: B
161
+ validateAllItems: w
162
162
  }), (e, i) => (g(), V("div", {
163
163
  class: L(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: r.asCard }])
164
164
  }, [
@@ -292,7 +292,7 @@ const ie = { class: "dpiV3_LinkAndMetadata" }, le = {
292
292
  }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : k("", !0)
293
293
  ], 2));
294
294
  }
295
- }, Ue = /* @__PURE__ */ ae(ne, [["__scopeId", "data-v-3284e83f"]]);
295
+ }, Ue = /* @__PURE__ */ ae(ne, [["__scopeId", "data-v-eb7428a6"]]);
296
296
  export {
297
297
  Ue as default
298
298
  };