@piveau/dpi 0.1.0-beta.7 → 0.1.0-beta.70

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.
Files changed (62) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/DPIMenu.vue.js +2 -2
  3. package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1 -1
  4. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +58 -53
  5. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +88 -68
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +11 -10
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +2 -2
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +101 -76
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +11 -11
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +444 -355
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +64 -28
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +108 -74
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +17 -22
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +130 -77
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +122 -85
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +111 -74
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +170 -99
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js +7 -10
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +110 -52
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +65 -86
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +29 -28
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +159 -103
  24. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsModal.vue.js +48 -48
  25. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +566 -207
  26. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +100 -53
  27. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +43 -89
  28. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +329 -100
  29. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +43 -26
  30. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +70 -38
  31. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +181 -107
  32. package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +19 -14
  33. package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +1 -1
  34. package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
  35. package/dist/data-provider-interface/components/ContactPage.vue.js +148 -100
  36. package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +32 -32
  37. package/dist/data-provider-interface/components/DistLicense.vue.js +198 -99
  38. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +950 -833
  39. package/dist/data-provider-interface/components/Dropup.vue.js +6 -6
  40. package/dist/data-provider-interface/components/HVDPage.vue.js +107 -85
  41. package/dist/data-provider-interface/components/InfoSlot.vue.js +5 -5
  42. package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +89 -46
  43. package/dist/data-provider-interface/components/PublisherPage.vue.js +111 -81
  44. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +314 -260
  45. package/dist/data-provider-interface/components/TempResPage.vue.js +267 -187
  46. package/dist/data-provider-interface/components/TempResPageInModal.vue.js +392 -0
  47. package/dist/data-provider-interface/components/TitelPage.vue.js +4 -4
  48. package/dist/data-provider-interface/components/UpdateDate.vue.js +33 -29
  49. package/dist/data-provider-interface/components/dpiV3Description.vue.js +7 -6
  50. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +397 -244
  51. package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +1 -1
  52. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +477 -96
  53. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +104 -152
  54. package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +9 -2
  55. package/dist/data-provider-interface/store/modules/authStore.js +11 -11
  56. package/dist/data-provider-interface/views/DraftsPage.vue.js +3 -3
  57. package/dist/data-provider-interface/views/InputPage.vue.js +389 -760
  58. package/dist/styles/_dpi.scss +1614 -0
  59. package/dist/styles/_maps.scss +24 -0
  60. package/dist/styles/_variables.scss +973 -0
  61. package/package.json +28 -19
  62. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +0 -46
@@ -1,16 +1,20 @@
1
- import { ref as m, onMounted as U, createElementBlock as u, openBlock as s, normalizeClass as V, createCommentVNode as I, createBlock as y, Fragment as L, renderList as A, createElementVNode as R, createVNode as p, unref as i, isRef as M } from "vue";
2
- import b from "../ButtonV3.vue.js";
3
- import z from "../ModalSimpleV3.vue.js";
4
- import x from "../InputField.vue.js";
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
+ import I from "../ButtonV3.vue.js";
3
+ import j from "../ModalSimpleV3.vue.js";
4
+ import w from "../InputField.vue.js";
5
+ import { PhWarning as Z } from "@phosphor-icons/vue";
5
6
  /* empty css */
6
- import D from "../../../../_virtual/_plugin-vue_export-helper.js";
7
- const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
7
+ import G from "../../../../_virtual/_plugin-vue_export-helper.js";
8
+ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
8
9
  key: 0,
10
+ class: "dpiV3_errorMessage"
11
+ }, Q = {
12
+ key: 1,
9
13
  class: "copy-mini-regular dpiV3_text_error"
10
- }, F = {
14
+ }, X = {
11
15
  key: 0,
12
16
  class: "dpiV3_tempAddMore"
13
- }, N = {
17
+ }, Y = {
14
18
  __name: "ConformsToV3",
15
19
  props: {
16
20
  conformsToItems: { type: Array, required: !0 },
@@ -18,12 +22,15 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
18
22
  asCard: { type: Boolean, required: !1, default: !1 },
19
23
  showDeleteButton: { type: Boolean, required: !1, default: !1 }
20
24
  },
21
- emits: ["update"],
22
- setup(l, { emit: S }) {
23
- let d = m({});
24
- const a = l, c = S, g = m(!1), C = m(null);
25
- let r = m(!1);
26
- U(() => {
25
+ emits: ["update", "validationChange"],
26
+ setup(d, { expose: k, emit: _ }) {
27
+ let s = h({});
28
+ const a = d, c = _, y = h(!1), V = h(null), o = L({}), v = L({});
29
+ let m = h(!1);
30
+ const T = N(() => Object.values(o).some((e) => e === !0)), A = () => {
31
+ c("validationChange", T.value);
32
+ };
33
+ P(() => {
27
34
  console.log(
28
35
  "Component Mounted: conformsToItems received for distributionId:",
29
36
  a.distributionId
@@ -35,57 +42,79 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
35
42
  }
36
43
  ]));
37
44
  });
38
- const v = (e) => {
45
+ const p = (e) => {
46
+ if (!e || e.trim() === "") return !1;
47
+ const t = e.trim();
48
+ return /\.[a-zA-Z]{2,}$/.test(t);
49
+ }, g = (e) => {
50
+ const t = a.conformsToItems.find((n) => n.id === e);
51
+ if (t) {
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
+ }
55
+ }, U = () => {
56
+ let e = !1;
57
+ return a.conformsToItems.forEach((t) => {
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
+ }), e;
61
+ }, z = (e) => {
39
62
  switch (e) {
40
63
  case "delete":
41
- w();
64
+ D();
42
65
  break;
43
66
  }
44
- }, k = () => {
45
- const n = {
46
- id: (a.conformsToItems.length ? Math.max(...a.conformsToItems.map((t) => t.id)) : 0) + 1,
67
+ }, E = () => {
68
+ if (U())
69
+ return;
70
+ const t = {
71
+ id: (a.conformsToItems.length ? Math.max(...a.conformsToItems.map((n) => n.id)) : 0) + 1,
47
72
  "dcat:downloadURL": "",
48
73
  "dct:title": ""
49
74
  };
50
- c("update", [...a.conformsToItems, n]);
51
- }, T = (e, n, t) => {
52
- var h;
53
- (h = e == null ? void 0 : e.target) == null || h.value;
54
- const o = a.conformsToItems.map(
55
- (f) => f.id === t ? { ...f, [n]: e.target.value } : f
75
+ c("update", [...a.conformsToItems, t]);
76
+ }, M = (e) => {
77
+ v[e] && clearTimeout(v[e]), v[e] = setTimeout(() => {
78
+ g(e);
79
+ }, 800);
80
+ }, B = (e, t, n) => {
81
+ var S;
82
+ (S = e == null ? void 0 : e.target) == null || S.value;
83
+ const i = a.conformsToItems.map(
84
+ (C) => C.id === n ? { ...C, [t]: e.target.value } : C
56
85
  );
57
- c("update", o);
58
- }, _ = (e) => {
59
- d.value = {
86
+ c("update", i), M(n);
87
+ }, $ = (e) => {
88
+ s.value = {
60
89
  button: "Löschen",
61
90
  header: "Standard löschen",
62
91
  text: "Sind Sie sicher, dass Sie diesen Standard löschen wollen?",
63
92
  action: "delete",
64
93
  optionalString_1: e["dct:title"],
65
94
  optionalString_2: e["dcat:downloadURL"]
66
- }, r.value = !0, C.value = e;
67
- }, w = () => {
68
- if (a.conformsToItems.length === 1) {
69
- g.value = !0;
70
- return;
71
- }
95
+ }, m.value = !0, V.value = e;
96
+ }, D = () => {
72
97
  const e = a.conformsToItems.filter(
73
- (n) => n.id !== C.value.id
98
+ (t) => t.id !== V.value.id
74
99
  );
75
- c("update", e);
76
- }, B = (e) => {
77
- e["dct:title"] = "";
100
+ delete o[V.value.id], c("update", e), A();
101
+ }, F = (e) => {
102
+ e["dct:title"] = "", g(e.id);
78
103
  };
79
- return (e, n) => (s(), u("div", {
80
- class: V(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: l.asCard }])
104
+ return k({
105
+ validateAllItems: U,
106
+ hasValidationErrors: T
107
+ }), (e, t) => (r(), u("div", {
108
+ class: x(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: d.asCard }])
81
109
  }, [
82
- (s(!0), u(L, null, A(l.conformsToItems, (t) => (s(), u("div", {
83
- key: t.id,
84
- class: V(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: l.asCard }])
110
+ (r(!0), u(W, null, H(d.conformsToItems, (n) => (r(), u("div", {
111
+ key: n.id,
112
+ class: x(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: d.asCard }])
85
113
  }, [
86
- R("div", $, [
87
- p(x, {
88
- onInput: (o) => T(o, "dcat:downloadURL", t.id),
114
+ R("div", J, [
115
+ f(w, {
116
+ onInput: (i) => B(i, "dcat:downloadURL", n.id),
117
+ onBlur: (i) => g(n.id),
89
118
  addOnText: !1,
90
119
  datePicker: !1,
91
120
  infoIcon: !1,
@@ -95,11 +124,19 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
95
124
  initialHintText: !1,
96
125
  label: "URL",
97
126
  showEndIcon: !1,
98
- modelValue: t["dcat:downloadURL"],
99
- "onUpdate:modelValue": (o) => t["dcat:downloadURL"] = o
100
- }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
101
- p(x, {
102
- onInput: (o) => T(o, "dct:title", t.id),
127
+ modelValue: n["dcat:downloadURL"],
128
+ "onUpdate:modelValue": (i) => n["dcat:downloadURL"] = i
129
+ }, null, 8, ["onInput", "onBlur", "modelValue", "onUpdate:modelValue"]),
130
+ o[n.id] ? (r(), u("div", K, [
131
+ f(l(Z), {
132
+ size: 16,
133
+ weight: "fill"
134
+ }),
135
+ t[2] || (t[2] = R("span", { class: "copy-mini-regular" }, "Bitte geben Sie eine gültige URL ein.", -1))
136
+ ])) : b("", !0),
137
+ f(w, {
138
+ onInput: (i) => B(i, "dct:title", n.id),
139
+ onBlur: (i) => g(n.id),
103
140
  addOnText: !1,
104
141
  datePicker: !1,
105
142
  infoIcon: !1,
@@ -111,14 +148,14 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
111
148
  "message.dataupload.datasets.dcat:distribution.distribution-title.label"
112
149
  ),
113
150
  showEndIcon: !1,
114
- modelValue: t["dct:title"],
115
- "onUpdate:modelValue": (o) => t["dct:title"] = o,
116
- defaultInput: !l.showDeleteButton,
117
- onDeleteButtonClicked: (o) => B(t)
118
- }, null, 8, ["onInput", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
119
- g.value && l.conformsToItems.length === 1 ? (s(), u("p", E, " Mindestens eine URL muss vorhanden sein. ")) : I("", !0)
151
+ modelValue: n["dct:title"],
152
+ "onUpdate:modelValue": (i) => n["dct:title"] = i,
153
+ defaultInput: !d.showDeleteButton,
154
+ onDeleteButtonClicked: (i) => F(n)
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. ")) : b("", !0)
120
157
  ]),
121
- p(b, {
158
+ f(I, {
122
159
  class: "dpiV3_tempAddMore",
123
160
  buttonText: e.$t(
124
161
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
@@ -126,32 +163,32 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
126
163
  size: "small",
127
164
  iconStart: "trash",
128
165
  variant: "tertiary",
129
- onClick: (o) => _(t)
166
+ onClick: (i) => $(n)
130
167
  }, null, 8, ["buttonText", "onClick"])
131
168
  ], 2))), 128)),
132
- l.asCard ? I("", !0) : (s(), u("div", F, [
133
- p(b, {
169
+ d.asCard ? b("", !0) : (r(), u("div", X, [
170
+ f(I, {
134
171
  buttonText: "Weitere Standards hinzufügen",
135
172
  size: "small",
136
173
  iconStart: "plus",
137
174
  variant: "tertiary",
138
- onClick: k
175
+ onClick: E
139
176
  })
140
177
  ])),
141
- i(r) ? (s(), y(z, {
178
+ l(m) ? (r(), q(j, {
142
179
  key: 1,
143
- buttons: i(d).button,
144
- headerText: i(d).header,
145
- text: i(d).text,
146
- onClose: n[0] || (n[0] = (t) => M(r) ? r.value = !1 : r = !1),
147
- action: i(d).action,
148
- onActionHandling: n[1] || (n[1] = (t) => v(t)),
149
- optionalString_1: i(d).optionalString_1,
150
- optionalString_2: i(d).optionalString_2
151
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : I("", !0)
180
+ buttons: l(s).button,
181
+ headerText: l(s).header,
182
+ text: l(s).text,
183
+ onClose: t[0] || (t[0] = (n) => O(m) ? m.value = !1 : m = !1),
184
+ action: l(s).action,
185
+ onActionHandling: t[1] || (t[1] = (n) => z(n)),
186
+ optionalString_1: l(s).optionalString_1,
187
+ optionalString_2: l(s).optionalString_2
188
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : b("", !0)
152
189
  ], 2));
153
190
  }
154
- }, G = /* @__PURE__ */ D(N, [["__scopeId", "data-v-aab2720a"]]);
191
+ }, de = /* @__PURE__ */ G(Y, [["__scopeId", "data-v-2c476ce8"]]);
155
192
  export {
156
- G as default
193
+ de as default
157
194
  };
@@ -1,18 +1,23 @@
1
- import { ref as p, onMounted as A, createElementBlock as m, openBlock as r, normalizeClass as I, createCommentVNode as V, createBlock as F, Fragment as L, renderList as R, createElementVNode as z, createVNode as u, toDisplayString as M, unref as i, isRef as q } from "vue";
2
- import E from "../Dropdown.vue.js";
3
- import P from "../TextAreaV3.vue.js";
4
- import y from "../ButtonV3.vue.js";
5
- import H from "../ModalSimpleV3.vue.js";
6
- import C from "../InputField.vue.js";
1
+ import { ref as f, reactive as O, onMounted as Z, createElementBlock as V, openBlock as g, normalizeClass as L, createCommentVNode as k, createBlock as j, Fragment as G, renderList as J, createElementVNode as I, createVNode as h, unref as c, toDisplayString as R, isRef as K } from "vue";
2
+ import Q from "../Dropdown.vue.js";
3
+ import X from "../TextAreaV3.vue.js";
4
+ import $ from "../ButtonV3.vue.js";
5
+ import Y from "../ModalSimpleV3.vue.js";
6
+ import x from "../InputField.vue.js";
7
+ import { PhWarning as ee } from "@phosphor-icons/vue";
8
+ import { useFormValues as te } from "../../../composables/useDpiFormValues.js";
7
9
  /* empty css */
8
- import N from "../../../../_virtual/_plugin-vue_export-helper.js";
9
- const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
10
+ import ae from "../../../../_virtual/_plugin-vue_export-helper.js";
11
+ const ie = { class: "dpiV3_LinkAndMetadata" }, le = {
10
12
  key: 0,
13
+ class: "dpiV3_errorMessage"
14
+ }, se = { class: "copy-mini-regular" }, oe = {
15
+ key: 1,
11
16
  class: "copy-mini-regular dpiV3_text_error"
12
- }, O = {
17
+ }, de = {
13
18
  key: 0,
14
19
  class: "dpiV3_tempAddMore"
15
- }, j = {
20
+ }, ne = {
16
21
  __name: "DocumentationsV3",
17
22
  props: {
18
23
  documentations: { type: Array, required: !0 },
@@ -22,90 +27,148 @@ const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
22
27
  showDeleteButton: { type: Boolean, required: !1, default: !1 }
23
28
  },
24
29
  emits: ["update"],
25
- setup(l, { emit: T }) {
26
- let n = p({});
27
- const o = l, f = T, h = p([...o.fileTypes]), D = p(!1), v = p(null);
28
- let c = p(!1);
29
- A(() => {
30
- o.documentations.length === 0 && f("update", [
30
+ setup(r, { expose: A, emit: E }) {
31
+ const { formValues: z } = te();
32
+ let p = f({});
33
+ const l = r, y = E, d = f([...l.fileTypes]), P = f(!1), F = f(null), s = O({});
34
+ let U = f(!1);
35
+ Z(() => {
36
+ l.documentations.length === 0 && y("update", [
31
37
  {
32
38
  id: 1,
33
- "dcat:downloadURL": "",
39
+ "dcat:accessURL": "",
34
40
  "dct:format": "",
35
41
  "dct:title": "",
36
- "dct:description": ""
42
+ "dct:description": "",
43
+ "formatUri:": ""
37
44
  }
38
45
  ]);
39
46
  });
40
- const U = (e) => {
47
+ const D = (e) => {
48
+ if (!e || e.trim() === "") return !1;
49
+ const i = e.trim();
50
+ return /\.[a-zA-Z]{2,}$/.test(i);
51
+ }, S = (e) => {
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
+ return i || t || a;
54
+ }, B = (e) => {
55
+ const i = l.documentations.find((t) => t.id === e);
56
+ if (i) {
57
+ const t = i["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
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
+ }
60
+ }, w = () => {
61
+ let e = !1;
62
+ return l.documentations.forEach((i) => {
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) : a && !D(a) && (s[i.id] = "Bitte geben Sie eine gültige URL ein.", e = !0);
65
+ }), e;
66
+ }, M = (e) => {
41
67
  switch (e) {
42
68
  case "delete":
43
- B();
69
+ N();
44
70
  break;
45
71
  }
46
- }, S = () => {
47
- const d = {
48
- id: (o.documentations.length ? Math.max(...o.documentations.map((t) => t.id)) : 0) + 1,
49
- "dcat:downloadURL": "",
72
+ }, _ = (e, i, t = null) => {
73
+ var n, o;
74
+ d.value = [...l.fileTypes];
75
+ const a = typeof e == "string" ? e.trim().toUpperCase() : (o = (n = e == null ? void 0 : e.target) == null ? void 0 : n.value) == null ? void 0 : o.trim().toUpperCase();
76
+ a.length > 0 ? d.value = l.fileTypes.filter(
77
+ (T) => T["@value"].toUpperCase().startsWith(a)
78
+ ) : d.value = [...l.fileTypes];
79
+ }, W = () => {
80
+ if (w())
81
+ return;
82
+ const i = {
83
+ id: (l.documentations.length ? Math.max(...l.documentations.map((t) => t.id)) : 0) + 1,
84
+ "dcat:accessURL": "",
50
85
  "dct:format": "",
51
86
  "dct:title": "",
52
- "dct:description": ""
87
+ "dct:description": "",
88
+ "formatUri:": ""
53
89
  };
54
- f("update", [...o.documentations, d]);
55
- }, b = (e, d, t) => {
56
- var k, w;
57
- if (d === "dct:format") {
58
- h.value = [...o.fileTypes];
59
- const s = typeof e == "string" ? e.trim().toUpperCase() : (w = (k = e == null ? void 0 : e.target) == null ? void 0 : k.value) == null ? void 0 : w.trim().toUpperCase();
60
- s.length > 0 ? h.value = o.fileTypes.filter(
61
- (x) => x["@value"].toUpperCase().startsWith(s)
62
- ) : h.value = [...o.fileTypes];
63
- }
64
- const a = o.documentations.map(
65
- (s) => s.id === t ? { ...s, [d]: e.target.value } : s
90
+ y("update", [...l.documentations, i]);
91
+ }, q = (e, i) => {
92
+ d.value = [...l.fileTypes];
93
+ const t = d.value.find(
94
+ (o) => o["@value"] === e
95
+ ), a = f(
96
+ z.value.DistributionSimple["dcat:distribution"].find(
97
+ (o) => o.id === l.distributionId
98
+ )
99
+ ), n = f(
100
+ a.value.documentations.find((o) => o.id === i)
66
101
  );
67
- f("update", a);
68
- }, $ = (e) => {
69
- n.value = {
102
+ n.value === void 0 || (n.value.formatUri = t.uri), v(e, "dct:format", i);
103
+ }, v = (e, i, t) => {
104
+ var n, o, T;
105
+ let a = "";
106
+ if (i === "dcat:accessURL") {
107
+ const u = typeof e == "string" ? e : ((n = e == null ? void 0 : e.target) == null ? void 0 : n.value) ?? "";
108
+ a = l.documentations.map(
109
+ (b) => b.id === t ? { ...b, [i]: u } : b
110
+ );
111
+ } else if (i === "dct:format") {
112
+ d.value = [...l.fileTypes];
113
+ const u = typeof e == "string" ? e.trim().toUpperCase() : (T = (o = e == null ? void 0 : e.target) == null ? void 0 : o.value) == null ? void 0 : T.trim().toUpperCase();
114
+ u.length > 0 ? d.value = l.fileTypes.filter(
115
+ (m) => m["@value"].toUpperCase().startsWith(u)
116
+ ) : d.value = [...l.fileTypes];
117
+ const b = d.value.find(
118
+ (m) => m["@value"] === e
119
+ );
120
+ a = l.documentations.map(
121
+ (m) => m.id === t ? { ...m, [i]: b["@value"], formatUri: b.uri } : m
122
+ );
123
+ } else
124
+ a = l.documentations.map(
125
+ (u) => u.id === t ? { ...u, [i]: e.target.value } : u
126
+ );
127
+ y("update", a), setTimeout(() => {
128
+ B(t);
129
+ }, 0);
130
+ }, H = (e) => {
131
+ p.value = {
70
132
  button: "Löschen",
71
133
  header: "Dokumentation löschen",
72
134
  text: "Sind Sie sicher, dass Sie die Dokumentation löschen wollen?",
73
135
  action: "delete",
74
136
  optionalString_1: e["dct:title"],
75
- optionalString_2: e["dcat:downloadURL"]
76
- }, c.value = !0, v.value = e;
77
- }, B = () => {
78
- if (o.documentations.length === 1) {
79
- D.value = !0;
80
- return;
81
- }
82
- const e = o.documentations.filter(
83
- (d) => d.id !== v.value.id
137
+ optionalString_2: e["dcat:accessURL"]
138
+ }, U.value = !0, F.value = e;
139
+ }, N = () => {
140
+ const e = l.documentations.filter(
141
+ (i) => i.id !== F.value.id
84
142
  );
85
- f("update", e);
86
- }, g = (e, d) => {
143
+ delete s[F.value.id], y("update", e);
144
+ }, C = (e, i) => {
87
145
  switch (e) {
88
146
  case "dct:description":
89
- d["dct:description"] = "";
147
+ i["dct:description"] = "";
90
148
  break;
91
149
  case "dct:title":
92
- d["dct:title"] = "";
150
+ i["dct:title"] = "";
93
151
  break;
94
152
  case "dct:format":
95
- d["dct:format"] = "";
153
+ i["dct:format"] = "";
96
154
  break;
97
155
  }
156
+ setTimeout(() => {
157
+ B(i.id);
158
+ }, 0);
98
159
  };
99
- return (e, d) => (r(), m("div", {
100
- class: I(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: l.asCard }])
160
+ return A({
161
+ validateAllItems: w
162
+ }), (e, i) => (g(), V("div", {
163
+ class: L(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: r.asCard }])
101
164
  }, [
102
- (r(!0), m(L, null, R(l.documentations, (t) => (r(), m("div", {
165
+ (g(!0), V(G, null, J(r.documentations, (t) => (g(), V("div", {
103
166
  key: t.id,
104
- class: I(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: l.asCard }])
167
+ class: L(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: r.asCard }])
105
168
  }, [
106
- z("div", W, [
107
- u(C, {
108
- onInput: (a) => b(a, "dcat:downloadURL", t.id),
169
+ I("div", ie, [
170
+ h(x, {
171
+ onInput: (a) => v(a, "dcat:accessURL", t.id),
109
172
  addOnText: !1,
110
173
  datePicker: !1,
111
174
  infoIcon: !1,
@@ -119,11 +182,18 @@ const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
119
182
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.dcat:downloadURL-label"
120
183
  ),
121
184
  showEndIcon: !1,
122
- modelValue: t["dcat:downloadURL"],
123
- "onUpdate:modelValue": (a) => t["dcat:downloadURL"] = a
185
+ modelValue: t["dcat:accessURL"],
186
+ "onUpdate:modelValue": (a) => t["dcat:accessURL"] = a
124
187
  }, null, 8, ["onInput", "placeholder", "label", "modelValue", "onUpdate:modelValue"]),
125
- u(C, {
126
- onInput: (a) => b(a, "dct:title", t.id),
188
+ s[t.id] ? (g(), V("div", le, [
189
+ h(c(ee), {
190
+ size: 16,
191
+ weight: "fill"
192
+ }),
193
+ I("span", se, R(s[t.id]), 1)
194
+ ])) : k("", !0),
195
+ h(x, {
196
+ onInput: (a) => v(a, "dct:title", t.id),
127
197
  addOnText: !1,
128
198
  datePicker: !1,
129
199
  infoIcon: !1,
@@ -139,11 +209,11 @@ const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
139
209
  showEndIcon: !1,
140
210
  modelValue: t["dct:title"],
141
211
  "onUpdate:modelValue": (a) => t["dct:title"] = a,
142
- defaultInput: !l.showDeleteButton,
143
- onDeleteButtonClicked: (a) => g("dct:title", t)
212
+ defaultInput: !r.showDeleteButton,
213
+ onDeleteButtonClicked: (a) => C("dct:title", t)
144
214
  }, null, 8, ["onInput", "placeholder", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
145
- u(P, {
146
- onInput: (a) => b(a, "dct:description", t.id),
215
+ h(X, {
216
+ onInput: (a) => v(a, "dct:description", t.id),
147
217
  hint: !1,
148
218
  label: e.$t(
149
219
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.description"
@@ -153,21 +223,22 @@ const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
153
223
  ),
154
224
  modelValue: t["dct:description"],
155
225
  "onUpdate:modelValue": (a) => t["dct:description"] = a,
156
- showDeleteButton: l.showDeleteButton,
157
- onDeleteClicked: (a) => g("dct:description", t)
226
+ showDeleteButton: r.showDeleteButton,
227
+ onDeleteClicked: (a) => C("dct:description", t)
158
228
  }, null, 8, ["onInput", "label", "placeholder", "modelValue", "onUpdate:modelValue", "showDeleteButton", "onDeleteClicked"]),
159
- u(E, {
160
- onInput: (a) => b(a, "dct:format", t.id),
229
+ h(Q, {
230
+ "onUpdate:modelValue": [(a) => q(a, t.id), (a) => t["dct:format"] = a],
231
+ onInput: i[0] || (i[0] = (a) => _(a)),
161
232
  dropdownWidth: "large",
162
233
  type: "inputField",
163
234
  modelValue: t["dct:format"],
164
- "onUpdate:modelValue": (a) => t["dct:format"] = a,
165
235
  inputFieldProps: {
166
236
  addOnText: !1,
167
237
  initialHintText: !1,
168
238
  datePicker: !1,
169
239
  infoIcon: !1,
170
- preIcon: !1,
240
+ preIcon: !0,
241
+ showEndIcon: !1,
171
242
  label: e.$t("message.dataupload.datasets.dcat:distribution.format.label") + " (optional)",
172
243
  dropdown_dpiV3: !0,
173
244
  placeholder: e.$t(
@@ -175,18 +246,18 @@ const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
175
246
  ),
176
247
  inputFieldSize: "large",
177
248
  autocomplete: "true",
178
- modelValue: t["dct:format"],
179
- defaultInput: !l.showDeleteButton
249
+ modelValue: t["dct:format"].uri,
250
+ defaultInput: !r.showDeleteButton
180
251
  },
181
- data: h.value,
252
+ data: d.value,
182
253
  autocomplete: !0,
183
- onDeleteDropdownField: (a) => g("dct:format", t)
184
- }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "inputFieldProps", "data", "onDeleteDropdownField"]),
185
- D.value && l.documentations.length === 1 ? (r(), m("p", _, M(e.$t(
254
+ onDeleteDropdownField: (a) => C("dct:format", t)
255
+ }, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data", "onDeleteDropdownField"]),
256
+ P.value && r.documentations.length === 1 ? (g(), V("p", oe, R(e.$t(
186
257
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.error-message"
187
- )), 1)) : V("", !0)
258
+ )), 1)) : k("", !0)
188
259
  ]),
189
- u(y, {
260
+ h($, {
190
261
  class: "dpiV3_tempAddMore",
191
262
  buttonText: e.$t(
192
263
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
@@ -194,34 +265,34 @@ const W = { class: "dpiV3_LinkAndMetadata" }, _ = {
194
265
  size: "small",
195
266
  iconStart: "trash",
196
267
  variant: "tertiary",
197
- onClick: (a) => $(t)
268
+ onClick: (a) => H(t)
198
269
  }, null, 8, ["buttonText", "onClick"])
199
270
  ], 2))), 128)),
200
- l.asCard ? V("", !0) : (r(), m("div", O, [
201
- u(y, {
271
+ r.asCard ? k("", !0) : (g(), V("div", de, [
272
+ h($, {
202
273
  buttonText: e.$t(
203
274
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.add-another"
204
275
  ),
205
276
  size: "small",
206
277
  iconStart: "plus",
207
278
  variant: "tertiary",
208
- onClick: S
279
+ onClick: W
209
280
  }, null, 8, ["buttonText"])
210
281
  ])),
211
- i(c) ? (r(), F(H, {
282
+ c(U) ? (g(), j(Y, {
212
283
  key: 1,
213
- buttons: i(n).button,
214
- headerText: i(n).header,
215
- text: i(n).text,
216
- onClose: d[0] || (d[0] = (t) => q(c) ? c.value = !1 : c = !1),
217
- action: i(n).action,
218
- onActionHandling: d[1] || (d[1] = (t) => U(t)),
219
- optionalString_1: i(n).optionalString_1,
220
- optionalString_2: i(n).optionalString_2
221
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : V("", !0)
284
+ buttons: c(p).button,
285
+ headerText: c(p).header,
286
+ text: c(p).text,
287
+ onClose: i[1] || (i[1] = (t) => K(U) ? U.value = !1 : U = !1),
288
+ action: c(p).action,
289
+ onActionHandling: i[2] || (i[2] = (t) => M(t)),
290
+ optionalString_1: c(p).optionalString_1,
291
+ optionalString_2: c(p).optionalString_2
292
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : k("", !0)
222
293
  ], 2));
223
294
  }
224
- }, te = /* @__PURE__ */ N(j, [["__scopeId", "data-v-d3575856"]]);
295
+ }, Ue = /* @__PURE__ */ ae(ne, [["__scopeId", "data-v-eb7428a6"]]);
225
296
  export {
226
- te as default
297
+ Ue as default
227
298
  };