@piveau/dpi 0.1.0-beta.5 → 0.1.0-beta.50

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 (74) 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/DataProviderInterface.vue2.js +45 -40
  4. package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1 -1
  5. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +58 -53
  6. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +78 -66
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +11 -10
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +100 -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 +7 -7
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +434 -360
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +103 -71
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +17 -22
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +130 -77
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +91 -61
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +111 -74
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +170 -99
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +109 -52
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +65 -86
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +29 -28
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +153 -102
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +571 -207
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +100 -53
  24. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +34 -56
  25. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +301 -100
  26. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +46 -27
  27. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +70 -39
  28. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +182 -105
  29. package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +19 -14
  30. package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +1 -1
  31. package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
  32. package/dist/data-provider-interface/components/ContactPage.vue.js +153 -105
  33. package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +32 -32
  34. package/dist/data-provider-interface/components/DistLicense.vue.js +198 -99
  35. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +856 -790
  36. package/dist/data-provider-interface/components/Dropup.vue.js +6 -6
  37. package/dist/data-provider-interface/components/HVDPage.vue.js +105 -82
  38. package/dist/data-provider-interface/components/InfoSlot.vue.js +5 -5
  39. package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +89 -46
  40. package/dist/data-provider-interface/components/PublisherPage.vue.js +111 -81
  41. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +302 -251
  42. package/dist/data-provider-interface/components/TempResPage.vue.js +267 -187
  43. package/dist/data-provider-interface/components/TempResPageInModal.vue.js +395 -0
  44. package/dist/data-provider-interface/components/UpdateDate.vue.js +33 -29
  45. package/dist/data-provider-interface/components/dpiV3Description.vue.js +7 -6
  46. package/dist/data-provider-interface/composables/useDpiContext.js +5 -7
  47. package/dist/data-provider-interface/composables/useDpiEditMode.js +15 -13
  48. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +397 -244
  49. package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +1 -1
  50. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +478 -91
  51. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +104 -152
  52. package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +10 -3
  53. package/dist/data-provider-interface/store/index.js +32 -0
  54. package/dist/data-provider-interface/store/modules/authStore.js +301 -0
  55. package/dist/data-provider-interface/store/modules/catalogueDetailsStore.js +34 -0
  56. package/dist/data-provider-interface/store/modules/cataloguesStore.js +256 -0
  57. package/dist/data-provider-interface/store/modules/datasetDetailsStore.js +644 -0
  58. package/dist/data-provider-interface/store/modules/datasetsStore.js +361 -0
  59. package/dist/data-provider-interface/store/{dpiStore.js → modules/dpiStore.js} +11 -12
  60. package/dist/data-provider-interface/store/modules/snackbarStore.js +45 -0
  61. package/dist/data-provider-interface/views/DraftsPage.vue.js +3 -3
  62. package/dist/data-provider-interface/views/InputPage.vue.js +378 -752
  63. package/dist/index.js +4 -4
  64. package/dist/styles/_dpi.scss +1614 -0
  65. package/dist/styles/_maps.scss +24 -0
  66. package/dist/styles/_variables.scss +973 -0
  67. package/dist/utils/draftApi.js +33 -0
  68. package/dist/utils/helpers.js +36 -22
  69. package/dist/utils/identifiersApi.js +16 -0
  70. package/dist/utils/jwt.js +7 -0
  71. package/package.json +12 -7
  72. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +0 -41
  73. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +0 -46
  74. package/dist/data-provider-interface/store/modules/formSchemaStore.js +0 -94
@@ -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 === 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-389f6598"]]);
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
  };
@@ -1,20 +1,28 @@
1
- import { ref as M, computed as O, resolveComponent as p, createElementBlock as g, openBlock as c, createElementVNode as m, createBlock as v, createCommentVNode as r, createVNode as i, toDisplayString as T, withCtx as _, unref as y } from "vue";
2
- import $ from "./CrossOutButton.vue.js";
3
- import C from "./ButtonV3.vue.js";
4
- import z from "./SectionItems/FindabilityChips.vue.js";
5
- import F from "./SectionItems/HVDSwitch.vue.js";
6
- import I from "./SectionItems/EssentialsModal.vue.js";
7
- import W from "./SectionItems/DistributionModal.vue.js";
8
- import H from "./SectionItems/CoverageModal.vue.js";
9
- import L from "./SectionItems/AdditionalsModal.vue.js";
1
+ import { ref as g, computed as k, resolveComponent as b, createElementBlock as f, openBlock as o, createElementVNode as m, createBlock as S, createCommentVNode as d, toDisplayString as P, createVNode as s, withCtx as V, unref as M, Fragment as Z, renderList as G } from "vue";
2
+ import { useI18n as Q } from "vue-i18n";
3
+ import { PhWarning as X } from "@phosphor-icons/vue";
4
+ import Y from "./CrossOutButton.vue.js";
5
+ import z from "./ButtonV3.vue.js";
6
+ import ee from "./SectionItems/FindabilityChips.vue.js";
7
+ import te from "./SectionItems/HVDSwitch.vue.js";
8
+ import ae from "./SectionItems/EssentialsModal.vue.js";
9
+ import ie from "./SectionItems/DistributionModal.vue.js";
10
+ import oe from "./SectionItems/CoverageModal.vue.js";
11
+ import ne from "./SectionItems/AdditionalsModal.vue.js";
10
12
  import "@formkit/core";
11
- import { useFormValues as J } from "../../composables/useDpiFormValues.js";
13
+ import { useFormValues as se } from "../../composables/useDpiFormValues.js";
12
14
  /* empty css */
13
- import j from "../../../_virtual/_plugin-vue_export-helper.js";
14
- const q = { class: "dpiV3_RapModalContainer" }, D = { class: "dpiV3_RapModalOuter" }, U = { class: "dpiV3_RapModalInner" }, Z = { class: "dpiV3_modalHead" }, A = { class: "dpiV3_closeButtonContainer" }, G = { class: "dpiV3_modalBody" }, K = { key: 0 }, Q = {
15
+ import le from "../../../_virtual/_plugin-vue_export-helper.js";
16
+ const ce = { class: "dpiV3_RapModalContainer" }, re = { class: "dpiV3_RapModalOuter" }, de = { class: "dpiV3_RapModalInner" }, ue = { class: "dpiV3_modalHead" }, ve = {
17
+ key: 0,
18
+ class: "headline"
19
+ }, fe = { class: "dpiV3_closeButtonContainer" }, me = { class: "dpiV3_modalBody" }, pe = { key: 0 }, _e = {
15
20
  key: 2,
16
21
  id: "essentials"
17
- }, X = { class: "dpiV3_actionButtonWrap" }, Y = {
22
+ }, ge = {
23
+ key: 6,
24
+ class: "dpiV3_errormsgWrapper"
25
+ }, he = { class: "validation-messages" }, ye = { class: "dpiV3_actionButtonWrap" }, be = {
18
26
  __name: "RapModal",
19
27
  props: {
20
28
  isVisible: {
@@ -25,133 +33,176 @@ const q = { class: "dpiV3_RapModalContainer" }, D = { class: "dpiV3_RapModalOute
25
33
  activeSection: String
26
34
  },
27
35
  emits: ["close"],
28
- setup(s, { emit: P }) {
29
- const l = s;
30
- let h = M();
31
- const { formValues: V } = J(), S = P, x = () => {
32
- S("close");
33
- }, n = O(() => V.value.BasicInfos), k = (t, e) => {
34
- var a;
35
- return ((a = t == null ? void 0 : t.find((u) => u["@language"] === e)) == null ? void 0 : a["@value"]) || "";
36
- }, d = (t, e) => {
36
+ setup(u, { emit: O }) {
37
+ const { t: $ } = Q(), t = u;
38
+ let C = g();
39
+ const { formValues: h } = se(), R = O, A = g(null), p = g(null), y = g(null), l = g(!1), L = {
40
+ findabilityHvd: "message.dataupload.datasets.rap.findability.title",
41
+ essentials: "message.dataupload.datasets.rap.essentials.title",
42
+ coverage: "message.dataupload.datasets.rap.coverage.title",
43
+ distributions: "message.metadata.distributions",
44
+ additionals: "message.metadata.additionals"
45
+ };
46
+ console.log(h.value);
47
+ const w = k(() => {
48
+ const e = L[t.activeSection];
49
+ return e ? $(e) : "";
50
+ }), E = k(() => {
51
+ var i, r;
52
+ const e = (r = (i = h.value) == null ? void 0 : i.Discoverability) == null ? void 0 : r.discoverabilityPage;
53
+ return !e || !Array.isArray(e) ? !1 : e.filter((v) => v.id && v.label).length > 0;
54
+ }), D = () => t.activeSection === "findabilityHvd" && !E.value ? (l.value = !0, !1) : (l.value = !1, !0), J = () => t.activeSection === "essentials" && p.value && !p.value.isValid ? (l.value = !0, !1) : (l.value = !1, !0), K = () => t.activeSection === "coverage" && y.value && y.value.validateAllItems() ? (l.value = !0, !1) : (l.value = !1, !0), I = () => t.activeSection === "findabilityHvd" ? D() : t.activeSection === "essentials" ? J() : t.activeSection === "coverage" ? K() : (l.value = !1, !0), F = k(() => t.activeSection === "findabilityHvd" && !E.value ? ["Bitte wählen Sie mindestens eine Kategorie aus, bevor Sie fortfahren."] : t.activeSection === "essentials" && p.value && !p.value.isValid ? p.value.getValidationErrorMessages() : t.activeSection === "coverage" && y.value && y.value.validateAllItems() ? ["Bitte füllen Sie alle erforderlichen Felder aus, wenn ein Feld ausgefüllt ist."] : []), H = () => {
55
+ I() && T();
56
+ }, T = () => {
57
+ l.value = !1, R("close");
58
+ }, c = k(() => h.value.BasicInfos), N = (e, a) => {
59
+ var i;
60
+ return ((i = e == null ? void 0 : e.find((r) => r["@language"] === a)) == null ? void 0 : i["@value"]) || "";
61
+ }, _ = (e, a) => {
62
+ var i;
63
+ return ((i = e == null ? void 0 : e[0]) == null ? void 0 : i[a]) || "";
64
+ }, j = (e) => {
37
65
  var a;
38
- return ((a = t == null ? void 0 : t[0]) == null ? void 0 : a[e]) || "";
39
- }, w = (t) => {
40
- var e;
41
- return ((e = t == null ? void 0 : t[0]) == null ? void 0 : e["@value"]) || "";
42
- }, o = M({
43
- title: k(n.value["dct:title"], "de"),
44
- description: k(n.value["dct:description"], "de"),
45
- modified: w(n.value["dct:modified"]),
46
- publisherName: d(n.value["dct:publisher"], "foaf:name"),
47
- publisherMail: d(n.value["dct:publisher"], "foaf:mbox"),
48
- publisherWebsite: d(n.value["dct:publisher"], "foaf:homepage"),
49
- contactPointName: d(n.value["dcat:contactPoint"], "vcard:fn"),
50
- contactPointMail: d(n.value["dcat:contactPoint"], "vcard:hasEmail"),
51
- contactPointPhone: d(n.value["dcat:contactPoint"], "vcard:hasTelephone")
52
- }), B = (t, e, a, u) => {
53
- t[e] || (t[e] = []);
54
- const f = t[e].find((b) => b["@language"] === u);
55
- f ? f["@value"] = a : t[e].push({ "@value": a, "@language": u });
56
- }, R = () => {
57
- const t = JSON.parse(JSON.stringify(V.value.BasicInfos));
58
- B(t, "dct:title", o.value.title, "de"), B(t, "dct:description", o.value.description, "de"), t["dct:publisher"] = [{
59
- "foaf:name": o.value.publisherName,
60
- "foaf:mbox": o.value.publisherMail,
61
- "foaf:homepage": o.value.publisherWebsite
62
- }], t["dcat:contactPoint"] = [{
63
- "vcard:fn": o.value.contactPointName,
64
- "vcard:hasEmail": o.value.contactPointMail,
65
- "vcard:hasTelephone": o.value.contactPointPhone
66
- }], t["dct:modified"] = [{ "@value": o.value.modified }], V.value.BasicInfos = t, S("close");
66
+ return ((a = e == null ? void 0 : e[0]) == null ? void 0 : a["@value"]) || "";
67
+ }, n = g({
68
+ title: N(c.value["dct:title"], "de"),
69
+ description: N(c.value["dct:description"], "de"),
70
+ modified: j(c.value["dct:modified"]),
71
+ publisherName: _(c.value["dct:publisher"], "foaf:name"),
72
+ publisherMail: _(c.value["dct:publisher"], "foaf:mbox"),
73
+ publisherWebsite: _(c.value["dct:publisher"], "foaf:homepage"),
74
+ contactPointName: _(c.value["dcat:contactPoint"], "vcard:fn"),
75
+ contactPointMail: _(c.value["dcat:contactPoint"], "vcard:hasEmail"),
76
+ contactPointPhone: _(c.value["dcat:contactPoint"], "vcard:hasTelephone")
77
+ }), W = (e, a, i, r) => {
78
+ e[a] || (e[a] = []);
79
+ const v = e[a].find((B) => B["@language"] === r);
80
+ v ? v["@value"] = i : e[a].push({ "@value": i, "@language": r });
81
+ }, q = () => {
82
+ if (!I())
83
+ return;
84
+ const e = JSON.parse(JSON.stringify(h.value.BasicInfos));
85
+ W(e, "dct:title", n.value.title, "de"), W(e, "dct:description", n.value.description, "de"), e["dct:publisher"] = [{
86
+ "foaf:name": n.value.publisherName,
87
+ "foaf:mbox": n.value.publisherMail,
88
+ "foaf:homepage": n.value.publisherWebsite
89
+ }], e["dcat:contactPoint"] = [{
90
+ "vcard:fn": n.value.contactPointName,
91
+ "vcard:hasEmail": n.value.contactPointMail,
92
+ "vcard:hasTelephone": n.value.contactPointPhone
93
+ }], e["dct:modified"] = [{ "@value": n.value.modified }], h.value.BasicInfos = e, R("close");
67
94
  };
68
- return (t, e) => {
69
- const a = p("findability"), u = p("coverage"), f = p("distributionRap"), b = p("additionals"), E = p("interaction");
70
- return c(), g("div", q, [
71
- m("div", D, [
72
- m("div", U, [
73
- m("div", Z, [
74
- m("div", A, [
75
- i($, {
76
- onClick: x,
95
+ return (e, a) => {
96
+ const i = b("findability"), r = b("coverage"), v = b("distributionRap"), B = b("additionals"), U = b("interaction");
97
+ return o(), f("div", ce, [
98
+ m("div", re, [
99
+ m("div", de, [
100
+ m("div", ue, [
101
+ w.value ? (o(), f("div", ve, P(w.value), 1)) : d("", !0),
102
+ m("div", fe, [
103
+ s(Y, {
104
+ onClick: H,
77
105
  class: "dpiV3_closeButton",
78
106
  type: "default"
79
107
  })
80
108
  ])
81
109
  ]),
82
- m("div", G, [
83
- l.activeSection === "findabilityHvd" ? (c(), g("span", K, T(t.$t("message.metadata.categories")), 1)) : r("", !0),
84
- l.activeSection === "findabilityHvd" ? (c(), v(a, { key: 1 }, {
85
- default: _(() => [
86
- i(z, { context: s.context }, null, 8, ["context"]),
87
- i(F, { context: s.context }, null, 8, ["context"])
110
+ m("div", me, [
111
+ t.activeSection === "findabilityHvd" ? (o(), f("span", pe, P(e.$t("message.metadata.categories")), 1)) : d("", !0),
112
+ t.activeSection === "findabilityHvd" ? (o(), S(i, {
113
+ key: 1,
114
+ class: "findability-container"
115
+ }, {
116
+ default: V(() => [
117
+ s(ee, {
118
+ context: u.context,
119
+ ref_key: "findabilityChipsRef",
120
+ ref: A
121
+ }, null, 8, ["context"]),
122
+ s(te, { context: u.context }, null, 8, ["context"])
88
123
  ]),
89
124
  _: 1
90
- })) : r("", !0),
91
- l.activeSection === "essentials" ? (c(), g("div", Q, [
92
- i(I, {
93
- context: s.context,
94
- newValues: y(h),
95
- modelValue: o.value,
96
- "onUpdate:modelValue": e[0] || (e[0] = (N) => o.value = N)
125
+ })) : d("", !0),
126
+ t.activeSection === "essentials" ? (o(), f("div", _e, [
127
+ s(ae, {
128
+ context: u.context,
129
+ newValues: M(C),
130
+ modelValue: n.value,
131
+ "onUpdate:modelValue": a[0] || (a[0] = (x) => n.value = x),
132
+ ref_key: "essentialsModalRef",
133
+ ref: p
97
134
  }, null, 8, ["context", "newValues", "modelValue"])
98
- ])) : r("", !0),
99
- l.activeSection === "coverage" ? (c(), v(u, { key: 3 }, {
100
- default: _(() => [
101
- i(H, {
102
- context: s.context,
103
- newValues: y(h)
135
+ ])) : d("", !0),
136
+ t.activeSection === "coverage" ? (o(), S(r, { key: 3 }, {
137
+ default: V(() => [
138
+ s(oe, {
139
+ context: u.context,
140
+ newValues: M(C),
141
+ ref_key: "coverageModalRef",
142
+ ref: y
104
143
  }, null, 8, ["context", "newValues"])
105
144
  ]),
106
145
  _: 1
107
- })) : r("", !0),
108
- l.activeSection === "distributions" ? (c(), v(f, { key: 4 }, {
109
- default: _(() => [
110
- i(W, {
111
- context: s.context,
112
- newValues: y(h)
146
+ })) : d("", !0),
147
+ t.activeSection === "distributions" ? (o(), S(v, { key: 4 }, {
148
+ default: V(() => [
149
+ s(ie, {
150
+ context: u.context,
151
+ newValues: M(C)
113
152
  }, null, 8, ["context", "newValues"])
114
153
  ]),
115
154
  _: 1
116
- })) : r("", !0),
117
- l.activeSection === "additionals" ? (c(), v(b, { key: 5 }, {
118
- default: _(() => [
119
- i(L, {
120
- context: s.context,
121
- onCloseModal: x
155
+ })) : d("", !0),
156
+ t.activeSection === "additionals" ? (o(), S(B, { key: 5 }, {
157
+ default: V(() => [
158
+ s(ne, {
159
+ context: u.context,
160
+ onCloseModal: T
122
161
  }, null, 8, ["context"])
123
162
  ]),
124
163
  _: 1
125
- })) : r("", !0)
164
+ })) : d("", !0),
165
+ l.value && F.value.length > 0 ? (o(), f("div", ge, [
166
+ s(M(X), {
167
+ size: 16,
168
+ weight: "fill"
169
+ }),
170
+ m("div", he, [
171
+ (o(!0), f(Z, null, G(F.value, (x) => (o(), f("span", {
172
+ key: x,
173
+ class: "copy-mini-regular"
174
+ }, P(x), 1))), 128))
175
+ ])
176
+ ])) : d("", !0)
126
177
  ])
127
178
  ]),
128
- l.activeSection != "additionals" ? (c(), v(E, {
179
+ t.activeSection != "additionals" ? (o(), S(U, {
129
180
  key: 0,
130
181
  class: "dpiV3_interactionWrap"
131
182
  }, {
132
- default: _(() => [
133
- m("div", X, [
134
- i(C, {
135
- onClick: x,
183
+ default: V(() => [
184
+ m("div", ye, [
185
+ s(z, {
186
+ onClick: H,
136
187
  buttonText: "Zurück",
137
188
  size: "large",
138
189
  iconStart: "CaretLeft",
139
190
  variant: "tertiary"
140
191
  }),
141
- i(C, {
142
- onClick: R,
192
+ s(z, {
193
+ onClick: q,
143
194
  buttonText: "Speichern",
144
195
  size: "large"
145
196
  })
146
197
  ])
147
198
  ]),
148
199
  _: 1
149
- })) : r("", !0)
200
+ })) : d("", !0)
150
201
  ])
151
202
  ]);
152
203
  };
153
204
  }
154
- }, pt = /* @__PURE__ */ j(Y, [["__scopeId", "data-v-dcb88501"]]);
205
+ }, Ne = /* @__PURE__ */ le(be, [["__scopeId", "data-v-cc6239a1"]]);
155
206
  export {
156
- pt as default
207
+ Ne as default
157
208
  };