@piveau/dpi 0.2.0-alpha.19 → 0.2.0-alpha.20

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 (52) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +62 -56
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue.js +4 -53
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue2.js +58 -0
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +65 -53
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js +2 -2
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue2.js +60 -56
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +1 -1
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +67 -79
  10. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +17 -17
  11. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +411 -318
  12. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +1 -1
  13. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +1 -1
  14. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +103 -71
  15. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +130 -77
  16. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +88 -60
  17. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +111 -74
  18. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +143 -126
  19. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +32 -32
  20. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +64 -48
  21. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +29 -28
  22. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue.js +2 -2
  23. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue2.js +46 -41
  24. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
  25. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +227 -208
  26. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
  27. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +124 -106
  28. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +113 -108
  29. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +1 -1
  30. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +370 -360
  31. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +464 -182
  32. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +31 -26
  33. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +31 -92
  34. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +183 -126
  35. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +2 -2
  36. package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +95 -89
  37. package/dist/packages/dpi/src/data-provider-interface/components/DistLicense.vue.js +139 -122
  38. package/dist/packages/dpi/src/data-provider-interface/components/DistributionSimplePage.vue.js +618 -525
  39. package/dist/packages/dpi/src/data-provider-interface/components/HVDPage.vue.js +56 -55
  40. package/dist/packages/dpi/src/data-provider-interface/components/PublisherPage.vue.js +94 -89
  41. package/dist/packages/dpi/src/data-provider-interface/components/ReviewAndPublishPage.vue.js +247 -238
  42. package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue.js +4 -4
  43. package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue2.js +16 -17
  44. package/dist/packages/dpi/src/data-provider-interface/components/TempResPage.vue.js +122 -104
  45. package/dist/packages/dpi/src/data-provider-interface/components/TempResPageInModal.vue.js +249 -108
  46. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +332 -305
  47. package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyUser.js +89 -55
  48. package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +243 -199
  49. package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +24 -11
  50. package/dist/packages/dpi/src/data-provider-interface/store/modules/authStore.js +14 -12
  51. package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +317 -288
  52. package/package.json +2 -2
@@ -1,22 +1,23 @@
1
- import { ref as p, onMounted as P, createElementBlock as h, openBlock as m, normalizeClass as E, createCommentVNode as D, createBlock as W, Fragment as H, renderList as N, createElementVNode as I, createVNode as g, toDisplayString as T, unref as f, isRef as O } from "vue";
2
- import Z from "../Dropdown.vue.js";
3
- import j from "../TextAreaV3.vue.js";
4
- import L from "../ButtonV3.vue.js";
5
- import G from "../ModalSimpleV3.vue.js";
6
- import R from "../InputField.vue.js";
7
- import { useFormValues as J } from "../../../composables/useDpiFormValues.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 u, toDisplayString as x, isRef as K } from "vue";
2
+ import Q from "../Dropdown.vue.js";
3
+ import X from "../TextAreaV3.vue.js";
4
+ import R from "../ButtonV3.vue.js";
5
+ import Y from "../ModalSimpleV3.vue.js";
6
+ import $ from "../InputField.vue.js";
7
+ import { PhWarning as ee } from "@phosphor-icons/vue";
8
+ import { useFormValues as te } from "../../../composables/useDpiFormValues.js";
8
9
  /* empty css */
9
- import K from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
10
- const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
10
+ import ae from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
11
+ const le = { class: "dpiV3_LinkAndMetadata" }, ie = {
11
12
  key: 0,
12
- class: "validation-error"
13
- }, Y = { class: "copy-mini-regular" }, ee = {
13
+ class: "dpiV3_errorMessage"
14
+ }, oe = { class: "copy-mini-regular" }, se = {
14
15
  key: 1,
15
16
  class: "copy-mini-regular dpiV3_text_error"
16
- }, te = {
17
+ }, de = {
17
18
  key: 0,
18
19
  class: "dpiV3_tempAddMore"
19
- }, ae = {
20
+ }, ne = {
20
21
  __name: "DocumentationsV3",
21
22
  props: {
22
23
  documentations: { type: Array, required: !0 },
@@ -26,113 +27,121 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
26
27
  showDeleteButton: { type: Boolean, required: !1, default: !1 }
27
28
  },
28
29
  emits: ["update"],
29
- setup(r, { emit: S }) {
30
- const { formValues: $ } = J();
31
- let c = p({});
32
- const o = r, V = S, s = p([...o.fileTypes]), k = p(!1), C = p(null);
33
- let b = p(!1);
34
- function B(e) {
35
- return /^(https?:\/\/)?(www\.)?[-\w@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-\w()@:%+.~#?&/=]*)$/.test(e);
36
- }
37
- function x(e, l) {
38
- const t = l == null ? void 0 : l.trim();
39
- return t ? B(t) ? (e.showErrorURL = !1, e.urlErrorMessage = "", !0) : (e.showErrorURL = !0, e.urlErrorMessage = "Bitte geben Sie eine gültige URL ein", !1) : (e.showErrorURL = !1, e.urlErrorMessage = "", !0);
40
- }
41
- P(() => {
42
- o.documentations.length === 0 && V("update", [
30
+ setup(r, { expose: A, emit: z }) {
31
+ const { formValues: E } = te();
32
+ let p = f({});
33
+ const i = r, y = z, d = f([...i.fileTypes]), P = f(!1), F = f(null), o = O({});
34
+ let U = f(!1);
35
+ Z(() => {
36
+ i.documentations.length === 0 && y("update", [
43
37
  {
44
38
  id: 1,
45
39
  "dcat:accessURL": "",
46
40
  "dct:format": "",
47
41
  "dct:title": "",
48
42
  "dct:description": "",
49
- "formatUri:": "",
50
- showErrorURL: !1,
51
- urlErrorMessage: ""
43
+ "formatUri:": ""
52
44
  }
53
45
  ]);
54
46
  });
55
- const A = (e) => {
47
+ const D = (e) => {
48
+ if (!e || e.trim() === "") return !1;
49
+ const l = e.trim();
50
+ return /\.[a-zA-Z]{2,}$/.test(l);
51
+ }, C = (e) => {
52
+ const l = 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 l || t || a;
54
+ }, S = (e) => {
55
+ const l = i.documentations.find((t) => t.id === e);
56
+ if (l) {
57
+ const t = l["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
58
+ C(l) ? a ? D(a) ? o[e] = null : o[e] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : o[e] = "Bitte geben Sie eine gültige URL ein." : a && !D(a) ? o[e] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : o[e] = null;
59
+ }
60
+ }, w = () => {
61
+ let e = !1;
62
+ return i.documentations.forEach((l) => {
63
+ const t = l["dcat:accessURL"], a = typeof t == "string" ? t.trim() : "";
64
+ C(l) ? a ? D(a) || (o[l.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0) : (o[l.id] = "URL ist erforderlich", e = !0) : a && !D(a) && (o[l.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0);
65
+ }), e;
66
+ }, M = (e) => {
56
67
  switch (e) {
57
68
  case "delete":
58
- q();
69
+ N();
59
70
  break;
60
71
  }
61
- }, F = (e, l, t = null) => {
62
- var u, i;
63
- s.value = [...o.fileTypes];
64
- const a = typeof e == "string" ? e.trim().toUpperCase() : (i = (u = e == null ? void 0 : e.target) == null ? void 0 : u.value) == null ? void 0 : i.trim().toUpperCase();
65
- a.length > 0 ? s.value = o.fileTypes.filter(
66
- (v) => v["@value"].toUpperCase().startsWith(a)
67
- ) : s.value = [...fileTypes.value];
68
- }, M = () => {
72
+ }, _ = (e, l, t = null) => {
73
+ var n, s;
74
+ d.value = [...i.fileTypes];
75
+ const a = typeof e == "string" ? e.trim().toUpperCase() : (s = (n = e == null ? void 0 : e.target) == null ? void 0 : n.value) == null ? void 0 : s.trim().toUpperCase();
76
+ a.length > 0 ? d.value = i.fileTypes.filter(
77
+ (T) => T["@value"].toUpperCase().startsWith(a)
78
+ ) : d.value = [...i.fileTypes];
79
+ }, W = () => {
80
+ if (w())
81
+ return;
69
82
  const l = {
70
- id: (o.documentations.length ? Math.max(...o.documentations.map((t) => t.id)) : 0) + 1,
83
+ id: (i.documentations.length ? Math.max(...i.documentations.map((t) => t.id)) : 0) + 1,
71
84
  "dcat:accessURL": "",
72
85
  "dct:format": "",
73
86
  "dct:title": "",
74
87
  "dct:description": "",
75
- "formatUri:": "",
76
- showErrorURL: !1,
77
- urlErrorMessage: ""
88
+ "formatUri:": ""
78
89
  };
79
- V("update", [...o.documentations, l]);
80
- }, z = (e, l) => {
81
- s.value = [...o.fileTypes];
82
- const t = s.value.find(
83
- (i) => i["@value"] === e
84
- ), a = p(
85
- $.value.DistributionSimple["dcat:distribution"].find(
86
- (i) => i.id === o.distributionId
90
+ y("update", [...i.documentations, l]);
91
+ }, q = (e, l) => {
92
+ d.value = [...i.fileTypes];
93
+ const t = d.value.find(
94
+ (s) => s["@value"] === e
95
+ ), a = f(
96
+ E.value.DistributionSimple["dcat:distribution"].find(
97
+ (s) => s.id === i.distributionId
87
98
  )
88
- ), u = p(
89
- a.value.documentations.find((i) => i.id === l)
99
+ ), n = f(
100
+ a.value.documentations.find((s) => s.id === l)
90
101
  );
91
- u.value === void 0 || (u.value.formatUri = t.uri), U(e, "dct:format", l);
92
- }, U = (e, l, t) => {
93
- var u, i, v;
102
+ n.value === void 0 || (n.value.formatUri = t.uri), v(e, "dct:format", l);
103
+ }, v = (e, l, t) => {
104
+ var n, s, T;
94
105
  let a = "";
95
106
  if (l === "dcat:accessURL") {
96
- const n = ((u = e == null ? void 0 : e.target) == null ? void 0 : u.value) || e, w = o.documentations.find((d) => d.id === t);
97
- x(w, n), a = o.documentations.map(
98
- (d) => d.id === t ? { ...d, [l]: n } : d
107
+ const c = typeof e == "string" ? e : ((n = e == null ? void 0 : e.target) == null ? void 0 : n.value) ?? "";
108
+ a = i.documentations.map(
109
+ (b) => b.id === t ? { ...b, [l]: c } : b
99
110
  );
100
111
  } else if (l === "dct:format") {
101
- s.value = [...o.fileTypes];
102
- const n = typeof e == "string" ? e.trim().toUpperCase() : (v = (i = e == null ? void 0 : e.target) == null ? void 0 : i.value) == null ? void 0 : v.trim().toUpperCase();
103
- n.length > 0 ? s.value = o.fileTypes.filter(
104
- (d) => d["@value"].toUpperCase().startsWith(n)
105
- ) : s.value = [...o.fileTypes];
106
- const w = s.value.find(
107
- (d) => d["@value"] === e
112
+ d.value = [...i.fileTypes];
113
+ const c = typeof e == "string" ? e.trim().toUpperCase() : (T = (s = e == null ? void 0 : e.target) == null ? void 0 : s.value) == null ? void 0 : T.trim().toUpperCase();
114
+ c.length > 0 ? d.value = i.fileTypes.filter(
115
+ (m) => m["@value"].toUpperCase().startsWith(c)
116
+ ) : d.value = [...i.fileTypes];
117
+ const b = d.value.find(
118
+ (m) => m["@value"] === e
108
119
  );
109
- a = o.documentations.map(
110
- (d) => d.id === t ? { ...d, [l]: w["@value"], formatUri: w.uri } : d
120
+ a = i.documentations.map(
121
+ (m) => m.id === t ? { ...m, [l]: b["@value"], formatUri: b.uri } : m
111
122
  );
112
123
  } else
113
- a = o.documentations.map(
114
- (n) => n.id === t ? { ...n, [l]: e.target.value } : n
124
+ a = i.documentations.map(
125
+ (c) => c.id === t ? { ...c, [l]: e.target.value } : c
115
126
  );
116
- V("update", a);
117
- }, _ = (e) => {
118
- c.value = {
127
+ y("update", a), setTimeout(() => {
128
+ S(t);
129
+ }, 0);
130
+ }, H = (e) => {
131
+ p.value = {
119
132
  button: "Löschen",
120
133
  header: "Dokumentation löschen",
121
134
  text: "Sind Sie sicher, dass Sie die Dokumentation löschen wollen?",
122
135
  action: "delete",
123
136
  optionalString_1: e["dct:title"],
124
137
  optionalString_2: e["dcat:accessURL"]
125
- }, b.value = !0, C.value = e;
126
- }, q = () => {
127
- if (o.documentations.length === 1) {
128
- k.value = !0;
129
- return;
130
- }
131
- const e = o.documentations.filter(
132
- (l) => l.id !== C.value.id
138
+ }, U.value = !0, F.value = e;
139
+ }, N = () => {
140
+ const e = i.documentations.filter(
141
+ (l) => l.id !== F.value.id
133
142
  );
134
- V("update", e);
135
- }, y = (e, l) => {
143
+ delete o[F.value.id], y("update", e);
144
+ }, B = (e, l) => {
136
145
  switch (e) {
137
146
  case "dct:description":
138
147
  l["dct:description"] = "";
@@ -144,17 +153,22 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
144
153
  l["dct:format"] = "";
145
154
  break;
146
155
  }
156
+ setTimeout(() => {
157
+ S(l.id);
158
+ }, 0);
147
159
  };
148
- return (e, l) => (m(), h("div", {
149
- class: E(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: r.asCard }])
160
+ return A({
161
+ validateAllItems: w
162
+ }), (e, l) => (g(), V("div", {
163
+ class: L(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: r.asCard }])
150
164
  }, [
151
- (m(!0), h(H, null, N(r.documentations, (t) => (m(), h("div", {
165
+ (g(!0), V(G, null, J(r.documentations, (t) => (g(), V("div", {
152
166
  key: t.id,
153
- class: E(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: r.asCard }])
167
+ class: L(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: r.asCard }])
154
168
  }, [
155
- I("div", Q, [
156
- g(R, {
157
- onInput: (a) => U(a, "dcat:accessURL", t.id),
169
+ I("div", le, [
170
+ h($, {
171
+ onInput: (a) => v(a, "dcat:accessURL", t.id),
158
172
  addOnText: !1,
159
173
  datePicker: !1,
160
174
  infoIcon: !1,
@@ -168,15 +182,18 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
168
182
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.dcat:downloadURL-label"
169
183
  ),
170
184
  showEndIcon: !1,
171
- showError: t.showErrorURL,
172
185
  modelValue: t["dcat:accessURL"],
173
186
  "onUpdate:modelValue": (a) => t["dcat:accessURL"] = a
174
- }, null, 8, ["onInput", "placeholder", "label", "showError", "modelValue", "onUpdate:modelValue"]),
175
- t.showErrorURL && t.urlErrorMessage ? (m(), h("div", X, [
176
- I("span", Y, T(t.urlErrorMessage), 1)
177
- ])) : D("", !0),
178
- g(R, {
179
- onInput: (a) => U(a, "dct:title", t.id),
187
+ }, null, 8, ["onInput", "placeholder", "label", "modelValue", "onUpdate:modelValue"]),
188
+ o[t.id] ? (g(), V("div", ie, [
189
+ h(u(ee), {
190
+ size: 16,
191
+ weight: "fill"
192
+ }),
193
+ I("span", oe, x(o[t.id]), 1)
194
+ ])) : k("", !0),
195
+ h($, {
196
+ onInput: (a) => v(a, "dct:title", t.id),
180
197
  addOnText: !1,
181
198
  datePicker: !1,
182
199
  infoIcon: !1,
@@ -193,10 +210,10 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
193
210
  modelValue: t["dct:title"],
194
211
  "onUpdate:modelValue": (a) => t["dct:title"] = a,
195
212
  defaultInput: !r.showDeleteButton,
196
- onDeleteButtonClicked: (a) => y("dct:title", t)
213
+ onDeleteButtonClicked: (a) => B("dct:title", t)
197
214
  }, null, 8, ["onInput", "placeholder", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
198
- g(j, {
199
- onInput: (a) => U(a, "dct:description", t.id),
215
+ h(X, {
216
+ onInput: (a) => v(a, "dct:description", t.id),
200
217
  hint: !1,
201
218
  label: e.$t(
202
219
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.description"
@@ -207,11 +224,11 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
207
224
  modelValue: t["dct:description"],
208
225
  "onUpdate:modelValue": (a) => t["dct:description"] = a,
209
226
  showDeleteButton: r.showDeleteButton,
210
- onDeleteClicked: (a) => y("dct:description", t)
227
+ onDeleteClicked: (a) => B("dct:description", t)
211
228
  }, null, 8, ["onInput", "label", "placeholder", "modelValue", "onUpdate:modelValue", "showDeleteButton", "onDeleteClicked"]),
212
- g(Z, {
213
- "onUpdate:modelValue": [(a) => z(a, t.id), (a) => t["dct:format"] = a],
214
- onInput: l[0] || (l[0] = (a) => F(a)),
229
+ h(Q, {
230
+ "onUpdate:modelValue": [(a) => q(a, t.id), (a) => t["dct:format"] = a],
231
+ onInput: l[0] || (l[0] = (a) => _(a)),
215
232
  dropdownWidth: "large",
216
233
  type: "inputField",
217
234
  modelValue: t["dct:format"],
@@ -232,15 +249,15 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
232
249
  modelValue: t["dct:format"].uri,
233
250
  defaultInput: !r.showDeleteButton
234
251
  },
235
- data: s.value,
252
+ data: d.value,
236
253
  autocomplete: !0,
237
- onDeleteDropdownField: (a) => y("dct:format", t)
254
+ onDeleteDropdownField: (a) => B("dct:format", t)
238
255
  }, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data", "onDeleteDropdownField"]),
239
- k.value && r.documentations.length === 1 ? (m(), h("p", ee, T(e.$t(
256
+ P.value && r.documentations.length === 1 ? (g(), V("p", se, x(e.$t(
240
257
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.error-message"
241
- )), 1)) : D("", !0)
258
+ )), 1)) : k("", !0)
242
259
  ]),
243
- g(L, {
260
+ h(R, {
244
261
  class: "dpiV3_tempAddMore",
245
262
  buttonText: e.$t(
246
263
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
@@ -248,34 +265,34 @@ const Q = { class: "dpiV3_LinkAndMetadata" }, X = {
248
265
  size: "small",
249
266
  iconStart: "trash",
250
267
  variant: "tertiary",
251
- onClick: (a) => _(t)
268
+ onClick: (a) => H(t)
252
269
  }, null, 8, ["buttonText", "onClick"])
253
270
  ], 2))), 128)),
254
- r.asCard ? D("", !0) : (m(), h("div", te, [
255
- g(L, {
271
+ r.asCard ? k("", !0) : (g(), V("div", de, [
272
+ h(R, {
256
273
  buttonText: e.$t(
257
274
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.add-another"
258
275
  ),
259
276
  size: "small",
260
277
  iconStart: "plus",
261
278
  variant: "tertiary",
262
- onClick: M
279
+ onClick: W
263
280
  }, null, 8, ["buttonText"])
264
281
  ])),
265
- f(b) ? (m(), W(G, {
282
+ u(U) ? (g(), j(Y, {
266
283
  key: 1,
267
- buttons: f(c).button,
268
- headerText: f(c).header,
269
- text: f(c).text,
270
- onClose: l[1] || (l[1] = (t) => O(b) ? b.value = !1 : b = !1),
271
- action: f(c).action,
272
- onActionHandling: l[2] || (l[2] = (t) => A(t)),
273
- optionalString_1: f(c).optionalString_1,
274
- optionalString_2: f(c).optionalString_2
275
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : D("", !0)
284
+ buttons: u(p).button,
285
+ headerText: u(p).header,
286
+ text: u(p).text,
287
+ onClose: l[1] || (l[1] = (t) => K(U) ? U.value = !1 : U = !1),
288
+ action: u(p).action,
289
+ onActionHandling: l[2] || (l[2] = (t) => M(t)),
290
+ optionalString_1: u(p).optionalString_1,
291
+ optionalString_2: u(p).optionalString_2
292
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : k("", !0)
276
293
  ], 2));
277
294
  }
278
- }, pe = /* @__PURE__ */ K(ae, [["__scopeId", "data-v-541b2d96"]]);
295
+ }, Ue = /* @__PURE__ */ ae(ne, [["__scopeId", "data-v-cf202935"]]);
279
296
  export {
280
- pe as default
297
+ Ue as default
281
298
  };
@@ -1,4 +1,4 @@
1
- import { ref as d, getCurrentInstance as _, onMounted as P, computed as S, watch as z, createElementBlock as g, openBlock as c, Fragment as w, createCommentVNode as h, renderList as W, unref as r, normalizeClass as $, createVNode as V, createBlock as A } from "vue";
1
+ import { ref as d, getCurrentInstance as _, onMounted as P, computed as S, watch as z, createElementBlock as g, openBlock as c, Fragment as h, createCommentVNode as w, renderList as W, unref as r, normalizeClass as $, createVNode as V, createBlock as A } from "vue";
2
2
  import { getLanguages as N } from "../../services/dpiV3_apis.js";
3
3
  import U from "../Dropdown.vue.js";
4
4
  import q from "../ButtonV3.vue.js";
@@ -19,68 +19,68 @@ const Q = {
19
19
  },
20
20
  emits: ["addLanguage", "deleteButtonClicked"],
21
21
  setup(v, { emit: C }) {
22
- const i = v;
22
+ const n = v;
23
23
  let l = d([{ label: "", "@value": "", uri: "" }]), u = {};
24
24
  const { formValues: k } = H(), { t: f } = E(), y = () => {
25
25
  l.value.push({});
26
26
  }, b = _(), B = b.appContext.app.config.globalProperties.$env, I = b.appContext.app.config.globalProperties.$i18n.locale;
27
27
  let p = d([]);
28
28
  u = k.value.DistributionSimple["dcat:distribution"].find(
29
- (e) => e.id === i.distributionId
29
+ (e) => e.id === n.distributionId
30
30
  ) || {}, P(async () => {
31
- var e, n, a;
32
- ((n = (e = u["dct:language"]) == null ? void 0 : e[0]) == null ? void 0 : n.label) !== "" && (l.value = u["dct:language"]), p.value = (a = u["dct:language"]) == null ? void 0 : a.map((t) => t.label);
31
+ var e;
32
+ u["dct:language"].length > 0 && (l.value = u["dct:language"]), p.value = (e = u["dct:language"]) == null ? void 0 : e.map((a) => a.label);
33
33
  try {
34
- const t = await N(B.api.baseUrl, I);
35
- s.value = t.map((o) => ({
36
- "@value": o.label,
37
- label: o.label,
38
- uri: o.uri
34
+ const a = await N(B.api.baseUrl, I);
35
+ s.value = a.map((t) => ({
36
+ "@value": t.label,
37
+ label: t.label,
38
+ uri: t.uri
39
39
  }));
40
- } catch (t) {
41
- console.error("Failed to load language data", t);
40
+ } catch (a) {
41
+ console.error("Failed to load language data", a);
42
42
  }
43
43
  });
44
44
  const s = d([]);
45
45
  let L = d(p);
46
46
  console.log("Titelliste", L);
47
- const O = C, F = (e, n) => {
48
- l.value.length > 1 ? (l.value[n] = {
47
+ const O = C, F = (e, a) => {
48
+ l.value.length > 1 ? (l.value[a] = {
49
49
  label: e,
50
- uri: s.value.find((a) => a["@value"] === e).uri || ""
50
+ uri: s.value.find((t) => t["@value"] === e).uri || ""
51
51
  }, u["dct:language"] = l.value) : (l.value[0] = {
52
52
  "@value": e,
53
- uri: s.value.find((a) => a["@value"] === e).uri || ""
54
- }, u["dct:language"][0] = l.value[0], s.value.find((a) => a["@value"] === e).uri);
53
+ uri: s.value.find((t) => t["@value"] === e).uri || ""
54
+ }, u["dct:language"][0] = l.value[0], s.value.find((t) => t["@value"] === e).uri);
55
55
  }, m = d(""), x = (e) => {
56
56
  m.value = e, console.log(m);
57
57
  }, T = S(() => s.value.filter(
58
58
  (e) => {
59
- var n, a, t, o;
60
- return (o = (n = e["@value"]) == null ? void 0 : n.toLowerCase()) == null ? void 0 : o.trim().startsWith((t = (a = m.value) == null ? void 0 : a.toLowerCase()) == null ? void 0 : t.trim());
59
+ var a, t, o, i;
60
+ return (i = (a = e["@value"]) == null ? void 0 : a.toLowerCase()) == null ? void 0 : i.trim().startsWith((o = (t = m.value) == null ? void 0 : t.toLowerCase()) == null ? void 0 : o.trim());
61
61
  }
62
62
  ));
63
63
  z(
64
- () => i.languageText,
64
+ () => n.languageText,
65
65
  (e) => {
66
66
  p.value = e;
67
67
  }
68
68
  );
69
69
  const D = () => {
70
- console.log("delete clicked"), O("deleteButtonClicked", i.distributionId);
70
+ console.log("delete clicked"), O("deleteButtonClicked", n.distributionId);
71
71
  };
72
- return (e, n) => (c(), g(w, null, [
73
- (c(!0), g(w, null, W(r(l), (a, t) => (c(), g("div", {
72
+ return (e, a) => (c(), g(h, null, [
73
+ (c(!0), g(h, null, W(r(l), (t, o) => (c(), g("div", {
74
74
  class: $([{
75
- repeatableOuter: !i.inOverview,
76
- dpiV3AutoCompleteWrap: !i.inOverview
75
+ repeatableOuter: !n.inOverview,
76
+ dpiV3AutoCompleteWrap: !n.inOverview
77
77
  }, "langDropdown"])
78
78
  }, [
79
79
  V(U, {
80
- "onUpdate:modelValue": [(o) => F(o, t), (o) => r(l)[t].label = o],
80
+ "onUpdate:modelValue": [(i) => F(i, o), (i) => r(l)[o].label = i],
81
81
  dropdownWidth: "large",
82
82
  type: "inputField",
83
- modelValue: r(l)[t].label,
83
+ modelValue: r(l)[o].label,
84
84
  inputFieldProps: {
85
85
  addOnText: !1,
86
86
  initialHintText: !1,
@@ -95,28 +95,28 @@ const Q = {
95
95
  "message.dataupload.datasets.dcat:distribution.advanced.language-placeholder"
96
96
  ),
97
97
  inputFieldSize: "large",
98
- modelValue: r(p)[t],
98
+ modelValue: r(p)[o],
99
99
  defaultInput: !v.showDeleteButton
100
100
  },
101
101
  data: T.value,
102
102
  onDeleteDropdownField: D,
103
103
  onInput: x
104
104
  }, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data"]),
105
- i.inOverview ? h("", !0) : (c(), A(M, {
105
+ n.inOverview ? w("", !0) : (c(), A(M, {
106
106
  key: 0,
107
107
  "button-text": "löschen",
108
108
  class: "rightAlign",
109
- onClick: (o) => r(l).splice(t, 1)
109
+ onClick: (i) => r(l).splice(o, 1)
110
110
  }, null, 8, ["onClick"]))
111
111
  ], 2))), 256)),
112
- i.inOverview ? h("", !0) : (c(), g("div", Q, [
112
+ n.inOverview ? w("", !0) : (c(), g("div", Q, [
113
113
  V(q, {
114
114
  buttonText: "Weitere hinzufügen",
115
115
  size: "large",
116
116
  iconStart: "plus",
117
117
  variant: "tertiary",
118
118
  class: "mt-3",
119
- onClick: n[0] || (n[0] = (a) => y())
119
+ onClick: a[0] || (a[0] = (t) => y())
120
120
  })
121
121
  ]))
122
122
  ], 64));