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

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 +384 -758
  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,4 +1,4 @@
1
- import { ref as u, watch as T, createElementBlock as v, openBlock as s, Fragment as D, createBlock as c, createCommentVNode as y } from "vue";
1
+ import { ref as u, watch as T, createElementBlock as v, openBlock as s, Fragment as D, createBlock as y, createCommentVNode as c } from "vue";
2
2
  import k from "../Dropdown.vue.js";
3
3
  const B = {
4
4
  __name: "FileFormatV3",
@@ -56,7 +56,7 @@ const B = {
56
56
  n.value = a;
57
57
  }
58
58
  ), (a, e) => (s(), v(D, null, [
59
- o.fileFormatType === "dcat:mediaType" ? (s(), c(k, {
59
+ o.fileFormatType === "dcat:mediaType" ? (s(), y(k, {
60
60
  key: 0,
61
61
  onInput: e[0] || (e[0] = (t) => m(t)),
62
62
  "onUpdate:modelValue": [
@@ -81,10 +81,9 @@ const B = {
81
81
  defaultInput: !o.showDeleteButton
82
82
  },
83
83
  data: d.value,
84
- autocomplete: !0,
85
84
  onDeleteDropdownField: e[3] || (e[3] = (t) => F("dcat:mediaType"))
86
- }, null, 8, ["modelValue", "inputFieldProps", "data"])) : y("", !0),
87
- o.fileFormatType === "dcat:compressFormat" ? (s(), c(k, {
85
+ }, null, 8, ["modelValue", "inputFieldProps", "data"])) : c("", !0),
86
+ o.fileFormatType === "dcat:compressFormat" ? (s(), y(k, {
88
87
  key: 1,
89
88
  onInput: e[4] || (e[4] = (t) => m(t)),
90
89
  "onUpdate:modelValue": [
@@ -109,10 +108,9 @@ const B = {
109
108
  defaultInput: !o.showDeleteButton
110
109
  },
111
110
  data: d.value,
112
- autocomplete: !0,
113
111
  onDeleteDropdownField: e[7] || (e[7] = (t) => F("dcat:compressFormat"))
114
- }, null, 8, ["modelValue", "inputFieldProps", "data"])) : y("", !0),
115
- o.fileFormatType === "dcat:packageFormat" ? (s(), c(k, {
112
+ }, null, 8, ["modelValue", "inputFieldProps", "data"])) : c("", !0),
113
+ o.fileFormatType === "dcat:packageFormat" ? (s(), y(k, {
116
114
  key: 2,
117
115
  onInput: e[8] || (e[8] = (t) => m(t)),
118
116
  "onUpdate:modelValue": [
@@ -137,9 +135,8 @@ const B = {
137
135
  defaultInput: !o.showDeleteButton
138
136
  },
139
137
  data: d.value,
140
- autocomplete: !0,
141
138
  onDeleteDropdownField: e[11] || (e[11] = (t) => F("dcat:packageFormat"))
142
- }, null, 8, ["modelValue", "inputFieldProps", "data"])) : y("", !0)
139
+ }, null, 8, ["modelValue", "inputFieldProps", "data"])) : c("", !0)
143
140
  ], 64));
144
141
  }
145
142
  };
@@ -1,70 +1,128 @@
1
- import { onMounted as b, getCurrentInstance as v, ref as p, watch as x, createBlock as I, openBlock as w, unref as g } from "vue";
2
- import { getLanguages as B } from "../../services/dpiV3_apis.js";
3
- import F from "../Dropdown.vue.js";
4
- import { useI18n as V } from "vue-i18n";
5
- const h = {
1
+ import { ref as d, getCurrentInstance as S, onMounted as _, computed as P, 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
+ import { getLanguages as N } from "../../services/dpiV3_apis.js";
3
+ import U from "../Dropdown.vue.js";
4
+ import q from "../ButtonV3.vue.js";
5
+ import M from "../TextButtonSmall.vue.js";
6
+ import { useI18n as E } from "vue-i18n";
7
+ import { useFormValues as H } from "../../../composables/useDpiFormValues.js";
8
+ /* empty css */
9
+ const Q = {
10
+ key: 0,
11
+ class: "dpiV3_tempAddMore"
12
+ }, ee = {
6
13
  __name: "LanguageV3",
7
14
  props: {
8
15
  distributionId: { type: Number, required: !1 },
9
16
  showDeleteButton: { type: Boolean, default: !1 },
10
- languageText: { type: String, default: "" }
17
+ languageText: { type: String, default: "" },
18
+ inOverview: { type: Boolean, default: !1 }
11
19
  },
12
20
  emits: ["addLanguage", "deleteButtonClicked"],
13
- setup(i, { emit: c }) {
14
- const { t: r } = V();
15
- b(async () => {
16
- const e = v(), a = e.appContext.app.config.globalProperties.$env, t = e.appContext.app.config.globalProperties.$i18n.locale;
21
+ setup(v, { emit: C }) {
22
+ const n = v;
23
+ let l = d([{ label: "", "@value": "", uri: "" }]), u = {};
24
+ const { formValues: k } = H(), { t: f } = E(), y = () => {
25
+ l.value.push({});
26
+ }, b = S(), B = b.appContext.app.config.globalProperties.$env, L = b.appContext.app.config.globalProperties.$i18n.locale;
27
+ let p = d([]);
28
+ u = k.value.DistributionSimple["dcat:distribution"].find(
29
+ (e) => e.id === n.distributionId
30
+ ) || {}, _(async () => {
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);
17
33
  try {
18
- const d = await B(a.api.baseUrl, t);
19
- o.value = d.map((u) => ({
20
- "@value": u.label,
21
- label: u.label,
22
- uri: u.uri
34
+ const a = await N(B.api.baseUrl, L);
35
+ s.value = a.map((t) => ({
36
+ "@value": t.label,
37
+ label: t.label,
38
+ uri: t.uri
23
39
  }));
24
- } catch (d) {
25
- console.error("Failed to load language data", d);
40
+ } catch (a) {
41
+ console.error("Failed to load language data", a);
26
42
  }
27
43
  });
28
- const l = i, o = p([]), n = p(l.languageText), s = c, f = (e) => {
29
- console.log(o.value);
30
- let a = o.value.find((t) => t["@value"] === e).uri || "";
31
- s("addLanguage", e, l.distributionId, a);
32
- };
33
- x(
34
- () => l.languageText,
44
+ const s = d([]);
45
+ let I = d(p);
46
+ console.log("Titelliste", I);
47
+ const O = C, F = (e, a) => {
48
+ l.value.length > 1 ? (l.value[a] = {
49
+ label: e,
50
+ uri: s.value.find((t) => t["@value"] === e).uri || ""
51
+ }, u["dct:language"] = l.value) : (l.value[0] = {
52
+ "@value": e,
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
+ }, m = d(""), x = (e) => {
56
+ m.value = e, console.log(m);
57
+ }, T = P(() => s.value.filter(
58
+ (e) => {
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
+ }
62
+ ));
63
+ z(
64
+ () => n.languageText,
35
65
  (e) => {
36
- n.value = e;
66
+ p.value = e;
37
67
  }
38
68
  );
39
- const m = () => {
40
- console.log("delete clicked"), s("deleteButtonClicked", l.distributionId);
69
+ const D = () => {
70
+ console.log("delete clicked"), O("deleteButtonClicked", n.distributionId);
41
71
  };
42
- return (e, a) => (w(), I(F, {
43
- "onUpdate:modelValue": [
44
- a[0] || (a[0] = (t) => f(t)),
45
- a[1] || (a[1] = (t) => n.value = t)
46
- ],
47
- dropdownWidth: "large",
48
- type: "inputField",
49
- modelValue: n.value,
50
- inputFieldProps: {
51
- addOnText: !1,
52
- initialHintText: !1,
53
- datePicker: !1,
54
- infoIcon: !1,
55
- preIcon: !1,
56
- label: g(r)("message.dataupload.datasets.dcat:distribution.advanced.dct:language") + " (optional)",
57
- dropdown_dpiV3: !0,
58
- placeholder: g(r)("message.dataupload.datasets.dcat:distribution.advanced.language-placeholder"),
59
- inputFieldSize: "large",
60
- modelValue: n.value,
61
- defaultInput: !i.showDeleteButton
62
- },
63
- data: o.value,
64
- onDeleteDropdownField: m
65
- }, null, 8, ["modelValue", "inputFieldProps", "data"]));
72
+ return (e, a) => (c(), g(h, null, [
73
+ (c(!0), g(h, null, W(r(l), (t, o) => (c(), g("div", {
74
+ class: $([{
75
+ repeatableOuter: !n.inOverview,
76
+ dpiV3AutoCompleteWrap: !n.inOverview
77
+ }, "langDropdown"])
78
+ }, [
79
+ V(U, {
80
+ "onUpdate:modelValue": [(i) => F(i, o), (i) => r(l)[o].label = i],
81
+ dropdownWidth: "large",
82
+ type: "inputField",
83
+ modelValue: r(l)[o].label,
84
+ inputFieldProps: {
85
+ addOnText: !1,
86
+ initialHintText: !1,
87
+ datePicker: !1,
88
+ infoIcon: !1,
89
+ preIcon: !1,
90
+ label: r(f)(
91
+ "message.dataupload.datasets.dcat:distribution.advanced.dct:language"
92
+ ) + " (optional)",
93
+ dropdown_dpiV3: !0,
94
+ placeholder: r(f)(
95
+ "message.dataupload.datasets.dcat:distribution.advanced.language-placeholder"
96
+ ),
97
+ inputFieldSize: "large",
98
+ modelValue: r(p)[o],
99
+ defaultInput: !v.showDeleteButton
100
+ },
101
+ data: T.value,
102
+ onDeleteDropdownField: D,
103
+ onInput: x
104
+ }, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data"]),
105
+ n.inOverview ? w("", !0) : (c(), A(M, {
106
+ key: 0,
107
+ "button-text": "Löschen",
108
+ class: "rightAlign",
109
+ iconStart: "trash",
110
+ onClick: (i) => r(l).splice(o, 1)
111
+ }, null, 8, ["onClick"]))
112
+ ], 2))), 256)),
113
+ n.inOverview ? w("", !0) : (c(), g("div", Q, [
114
+ V(q, {
115
+ buttonText: "Weitere hinzufügen",
116
+ size: "large",
117
+ iconStart: "plus",
118
+ variant: "tertiary",
119
+ class: "mt-3",
120
+ onClick: a[0] || (a[0] = (t) => y())
121
+ })
122
+ ]))
123
+ ], 64));
66
124
  }
67
125
  };
68
126
  export {
69
- h as default
127
+ ee as default
70
128
  };
@@ -1,16 +1,16 @@
1
- import { ref as m, onMounted as w, createElementBlock as c, openBlock as d, normalizeClass as g, createCommentVNode as f, createBlock as R, Fragment as L, renderList as U, createElementVNode as A, createVNode as y, unref as s, isRef as S } from "vue";
2
- import h from "../ButtonV3.vue.js";
3
- import P from "../ModalSimpleV3.vue.js";
4
- import M from "../InputField.vue.js";
1
+ import { ref as i, onMounted as R, createElementBlock as c, openBlock as l, normalizeClass as y, createBlock as h, createCommentVNode as p, Fragment as A, renderList as C, createElementVNode as k, createVNode as w, toDisplayString as P, unref as n, isRef as B } from "vue";
2
+ import E from "../ModalSimpleV3.vue.js";
3
+ import D from "../InputField.vue.js";
4
+ import { useFormValues as M } from "../../../composables/useDpiFormValues.js";
5
5
  /* empty css */
6
- import T from "../../../../_virtual/_plugin-vue_export-helper.js";
7
- const B = { class: "dpiV3_LinkAndMetadata" }, z = {
6
+ import S from "../../../../_virtual/_plugin-vue_export-helper.js";
7
+ const T = { class: "dpiV3_LinkAndMetadata" }, F = {
8
8
  key: 0,
9
9
  class: "copy-mini-regular dpiV3_text_error"
10
- }, E = {
11
- key: 0,
12
- class: "dpiV3_tempAddMore"
13
10
  }, N = {
11
+ key: 1,
12
+ class: "copy-mini-regular dpiV3_text_error"
13
+ }, q = {
14
14
  __name: "PolicyV3",
15
15
  props: {
16
16
  policyItems: { type: Array, required: !0 },
@@ -18,66 +18,63 @@ const B = { class: "dpiV3_LinkAndMetadata" }, z = {
18
18
  asCard: { type: Boolean, required: !1, default: !1 }
19
19
  },
20
20
  emits: ["update"],
21
- setup(n, { emit: V }) {
22
- let i = m({});
23
- const a = n, u = V, I = m(!1), v = m(null);
24
- let r = m(!1);
25
- w(() => {
21
+ setup(d, { expose: I, emit: V }) {
22
+ const { formValues: _ } = M();
23
+ let r = i({});
24
+ const u = i({}), s = d, f = V, v = i(!1), g = i(null);
25
+ let m = i(!1);
26
+ R(() => {
26
27
  console.log(
27
28
  "Component Mounted: policyItems received for distributionId:",
28
- a.distributionId
29
- ), a.policyItems.length === 0 && u("update", [
29
+ s.distributionId
30
+ ), s.policyItems.length === 0 && f("update", [
30
31
  {
31
32
  id: 1,
32
33
  "dcat:downloadURL": ""
33
34
  }
34
35
  ]);
35
36
  });
36
- const x = (t) => {
37
- switch (t) {
37
+ const U = (o) => {
38
+ switch (o) {
38
39
  case "delete":
39
- _();
40
+ b();
40
41
  break;
41
42
  }
42
- }, k = () => {
43
- const o = {
44
- id: (a.policyItems.length ? Math.max(...a.policyItems.map((e) => e.id)) : 0) + 1,
45
- "dcat:downloadURL": ""
43
+ };
44
+ I({ validateAllItems: () => {
45
+ const o = (e) => {
46
+ if (!e || e.trim() === "") return !1;
47
+ const t = e.trim();
48
+ return /\.[a-zA-Z]{2,}$/.test(t);
46
49
  };
47
- u("update", [...a.policyItems, o]);
48
- }, b = (t, o, e) => {
49
- const l = a.policyItems.map(
50
- (p) => p.id === e ? { ...p, [o]: t.target.value } : p
51
- );
52
- u("update", l);
53
- }, C = (t) => {
54
- i.value = {
55
- button: "Löschen",
56
- header: "Regelwerk löschen",
57
- text: "Sind Sie sicher, dass Sie dieses Regelwerk löschen wollen?",
58
- action: "delete",
59
- optionalString_1: t["dcat:downloadURL"]
60
- }, r.value = !0, v.value = t;
61
- }, _ = () => {
62
- if (a.policyItems.length === 1) {
63
- I.value = !0;
50
+ s.policyItems.forEach((e) => {
51
+ const t = e["dcat:downloadURL"] ? e["dcat:downloadURL"].trim() : "";
52
+ t && !o(t) ? u.value[e.id] = "Bitte geben Sie eine gültige URL ein." : delete u.value[e.id];
53
+ });
54
+ } });
55
+ const L = (o, e, t) => {
56
+ let a = i(_.value.DistributionSimple["dcat:distribution"].find((x) => x.id === t));
57
+ a.value.policyItems[0] === void 0 && (a.value.policyItems = [{ "dcat:downloadURL": "" }]), a.value.policyItems[0]["dcat:downloadURL"] = o.target.value;
58
+ }, b = () => {
59
+ if (s.policyItems.length === 1) {
60
+ v.value = !0;
64
61
  return;
65
62
  }
66
- const t = a.policyItems.filter(
67
- (o) => o.id !== v.value.id
63
+ const o = s.policyItems.filter(
64
+ (e) => e.id !== g.value.id
68
65
  );
69
- u("update", t);
66
+ f("update", o);
70
67
  };
71
- return (t, o) => (d(), c("div", {
72
- class: g(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: n.asCard }])
68
+ return (o, e) => (l(), c("div", {
69
+ class: y(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: d.asCard }])
73
70
  }, [
74
- (d(!0), c(L, null, U(n.policyItems, (e) => (d(), c("div", {
75
- key: e.id,
76
- class: g(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: n.asCard }])
71
+ (l(!0), c(A, null, C(d.policyItems, (t) => (l(), c("div", {
72
+ key: t.id,
73
+ class: y(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: d.asCard }])
77
74
  }, [
78
- A("div", B, [
79
- y(M, {
80
- onInput: (l) => b(l, "dcat:downloadURL", e.id),
75
+ k("div", T, [
76
+ w(D, {
77
+ onInput: (a) => L(a, "dcat:downloadURL", t.id),
81
78
  addOnText: !1,
82
79
  datePicker: !1,
83
80
  infoIcon: !1,
@@ -87,44 +84,26 @@ const B = { class: "dpiV3_LinkAndMetadata" }, z = {
87
84
  initialHintText: !1,
88
85
  label: "URL",
89
86
  showEndIcon: !1,
90
- modelValue: e["dcat:downloadURL"],
91
- "onUpdate:modelValue": (l) => e["dcat:downloadURL"] = l
87
+ modelValue: t["dcat:downloadURL"],
88
+ "onUpdate:modelValue": (a) => t["dcat:downloadURL"] = a
92
89
  }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
93
- I.value && n.policyItems.length === 1 ? (d(), c("p", z, " Mindestens eine URL muss vorhanden sein. ")) : f("", !0)
94
- ]),
95
- y(h, {
96
- class: "dpiV3_tempAddMore",
97
- buttonText: t.$t(
98
- "message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
99
- ),
100
- size: "small",
101
- iconStart: "trash",
102
- variant: "tertiary",
103
- onClick: (l) => C(e)
104
- }, null, 8, ["buttonText", "onClick"])
90
+ u.value[t.id] ? (l(), c("p", F, P(u.value[t.id]), 1)) : p("", !0),
91
+ v.value && d.policyItems.length === 1 ? (l(), c("p", N, " Mindestens eine URL muss vorhanden sein. ")) : p("", !0)
92
+ ])
105
93
  ], 2))), 128)),
106
- n.asCard ? f("", !0) : (d(), c("div", E, [
107
- y(h, {
108
- buttonText: "Weiteres Regelwerk hinzufügen",
109
- size: "small",
110
- iconStart: "plus",
111
- variant: "tertiary",
112
- onClick: k
113
- })
114
- ])),
115
- s(r) ? (d(), R(P, {
116
- key: 1,
117
- buttons: s(i).button,
118
- headerText: s(i).header,
119
- text: s(i).text,
120
- onClose: o[0] || (o[0] = (e) => S(r) ? r.value = !1 : r = !1),
121
- action: s(i).action,
122
- onActionHandling: o[1] || (o[1] = (e) => x(e)),
123
- optionalString_1: s(i).optionalString_1
124
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1"])) : f("", !0)
94
+ n(m) ? (l(), h(E, {
95
+ key: 0,
96
+ buttons: n(r).button,
97
+ headerText: n(r).header,
98
+ text: n(r).text,
99
+ onClose: e[0] || (e[0] = (t) => B(m) ? m.value = !1 : m = !1),
100
+ action: n(r).action,
101
+ onActionHandling: e[1] || (e[1] = (t) => U(t)),
102
+ optionalString_1: n(r).optionalString_1
103
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1"])) : p("", !0)
125
104
  ], 2));
126
105
  }
127
- }, O = /* @__PURE__ */ T(N, [["__scopeId", "data-v-0c42c576"]]);
106
+ }, G = /* @__PURE__ */ S(q, [["__scopeId", "data-v-55082169"]]);
128
107
  export {
129
- O as default
108
+ G as default
130
109
  };
@@ -1,7 +1,7 @@
1
- import { ref as i, onMounted as f, getCurrentInstance as m, watch as v, createBlock as S, openBlock as b } from "vue";
2
- import { getDatasetStatus as x } from "../../services/dpiV3_apis.js";
3
- import w from "../Dropdown.vue.js";
4
- const V = {
1
+ import { ref as d, onMounted as f, getCurrentInstance as v, watch as m, createBlock as S, openBlock as b } from "vue";
2
+ import { getDatasetStatus as g } from "../../services/dpiV3_apis.js";
3
+ import x from "../Dropdown.vue.js";
4
+ const T = {
5
5
  __name: "StatusV3",
6
6
  props: {
7
7
  distributionId: { type: Number, required: !1 },
@@ -9,41 +9,42 @@ const V = {
9
9
  statusText: { type: String, default: "" }
10
10
  },
11
11
  emits: ["addStatus", "deleteButtonClicked"],
12
- setup(n, { emit: r }) {
13
- const s = i([]);
12
+ setup(u, { emit: i }) {
13
+ const l = d([]);
14
14
  f(async () => {
15
- const e = m().appContext.app.config.globalProperties.$env;
15
+ const t = v().appContext.app.config.globalProperties.$env;
16
16
  try {
17
- const t = await x(e.api.baseUrl);
18
- s.value = t.map((u) => ({
19
- "@value": u.label,
20
- value: u.value,
17
+ const e = await g(t.api.baseUrl);
18
+ console.log(e), l.value = e.flatMap((o) => o.value === "OP_DATPRO" ? [] : o.value === "DEVELOP" ? [] : o.value === "DISCONT" ? [] : [{
19
+ "@value": o.label,
20
+ uri: o.resource,
21
21
  selected: !1
22
- }));
23
- } catch (t) {
24
- console.error("Failed to load dataset status data:", t);
22
+ }]);
23
+ } catch (e) {
24
+ console.error("Failed to load dataset status data:", e);
25
25
  }
26
26
  });
27
- const o = n, l = i(o.statusText), d = r, p = (a) => {
28
- d("addStatus", a, o.distributionId);
27
+ const n = u, s = d(n.statusText), r = i, p = (a) => {
28
+ const t = l.value.find((e) => e["@value"] === a);
29
+ console.log(t, l), r("addStatus", t, n.distributionId);
29
30
  };
30
- v(
31
- () => o.statusText,
31
+ m(
32
+ () => n.statusText,
32
33
  (a) => {
33
- l.value = a;
34
+ s.value = a;
34
35
  }
35
36
  );
36
37
  const c = () => {
37
- d("deleteButtonClicked", o.distributionId);
38
+ r("deleteButtonClicked", n.distributionId);
38
39
  };
39
- return (a, e) => (b(), S(w, {
40
+ return (a, t) => (b(), S(x, {
40
41
  "onUpdate:modelValue": [
41
- e[0] || (e[0] = (t) => p(t)),
42
- e[1] || (e[1] = (t) => l.value = t)
42
+ t[0] || (t[0] = (e) => p(e)),
43
+ t[1] || (t[1] = (e) => s.value = e)
43
44
  ],
44
45
  dropdownWidth: "large",
45
46
  type: "inputField",
46
- modelValue: l.value,
47
+ modelValue: s.value,
47
48
  inputFieldProps: {
48
49
  addOnText: !1,
49
50
  initialHintText: !1,
@@ -54,14 +55,14 @@ const V = {
54
55
  dropdown_dpiV3: !0,
55
56
  placeholder: "Geben Sie den Status ein...",
56
57
  inputFieldSize: "large",
57
- modelValue: l.value,
58
- defaultInput: !n.showDeleteButton
58
+ modelValue: s.value,
59
+ defaultInput: !u.showDeleteButton
59
60
  },
60
- data: s.value,
61
+ data: l.value,
61
62
  onDeleteDropdownField: c
62
63
  }, null, 8, ["modelValue", "inputFieldProps", "data"]));
63
64
  }
64
65
  };
65
66
  export {
66
- V as default
67
+ T as default
67
68
  };