@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,14 +1,42 @@
1
- import { mergeModels as u, ref as p, getCurrentInstance as m, useModel as r, createElementBlock as f, openBlock as c, createElementVNode as n, createVNode as o, toDisplayString as i } from "vue";
2
- import s from "../InputField.vue.js";
3
- import V from "../TextAreaV3.vue.js";
1
+ import { mergeModels as H, ref as R, getCurrentInstance as z, useModel as x, computed as W, watch as l, createElementBlock as u, openBlock as d, createElementVNode as s, createVNode as i, createCommentVNode as h, unref as p, toDisplayString as n } from "vue";
2
+ import g from "../InputField.vue.js";
3
+ import F from "../TextAreaV3.vue.js";
4
+ import { PhWarning as m } from "@phosphor-icons/vue";
4
5
  import "@formkit/core";
5
6
  import "@formkit/vue";
6
- import { useFormValues as b } from "../../../composables/useDpiFormValues.js";
7
+ import { useFormValues as O } from "../../../composables/useDpiFormValues.js";
7
8
  /* empty css */
8
- import I from "../../../../_virtual/_plugin-vue_export-helper.js";
9
- const g = { class: "dpiV3_innerRapModalWrapper" }, v = { class: "dpiV3_innerRapModalWrapper__section" }, M = { class: "dpiV3_innerRapModalWrapper__section" }, h = { class: "headline-5 gap3BottomAsMargin" }, P = { class: "dpiV3_innerRapModalWrapper__section" }, E = { class: "headline-5 gap3BottomAsMargin" }, $ = {
9
+ import Y from "../../../../_virtual/_plugin-vue_export-helper.js";
10
+ const Z = { class: "dpiV3_innerRapModalWrapper" }, L = { class: "dpiV3_innerRapModalWrapper__section" }, j = {
11
+ key: 0,
12
+ class: "dpiV3_field_error_text"
13
+ }, q = { class: "copy-mini-regular" }, J = { class: "topSpacing" }, G = {
14
+ key: 0,
15
+ class: "dpiV3_field_error_text"
16
+ }, K = { class: "copy-mini-regular" }, Q = { class: "topSpacing" }, X = {
17
+ key: 0,
18
+ class: "dpiV3_field_error_text"
19
+ }, ee = { class: "copy-mini-regular" }, te = { class: "dpiV3_innerRapModalWrapper__section" }, re = { class: "headline-5 gap3BottomAsMargin" }, ae = { class: "topSpacing" }, se = {
20
+ key: 0,
21
+ class: "dpiV3_field_error_text"
22
+ }, ie = { class: "copy-mini-regular" }, oe = { class: "topSpacing" }, le = {
23
+ key: 0,
24
+ class: "dpiV3_field_error_text"
25
+ }, ne = { class: "copy-mini-regular" }, ue = { class: "topSpacing" }, de = {
26
+ key: 0,
27
+ class: "dpiV3_field_error_text"
28
+ }, ce = { class: "copy-mini-regular" }, he = { class: "dpiV3_innerRapModalWrapper__section" }, pe = { class: "headline-5 gap3BottomAsMargin" }, me = { class: "topSpacing" }, ge = {
29
+ key: 0,
30
+ class: "dpiV3_field_error_text"
31
+ }, fe = { class: "copy-mini-regular" }, ve = { class: "topSpacing" }, Ee = {
32
+ key: 0,
33
+ class: "dpiV3_field_error_text"
34
+ }, be = { class: "copy-mini-regular" }, Me = { class: "topSpacing" }, Pe = {
35
+ key: 0,
36
+ class: "dpiV3_field_error_text"
37
+ }, we = { class: "copy-mini-regular" }, _e = {
10
38
  __name: "EssentialsModal",
11
- props: /* @__PURE__ */ u({
39
+ props: /* @__PURE__ */ H({
12
40
  context: Object,
13
41
  newValues: Object
14
42
  }, {
@@ -21,114 +49,315 @@ const g = { class: "dpiV3_innerRapModalWrapper" }, v = { class: "dpiV3_innerRapM
21
49
  publisherWebsite: "",
22
50
  contactPointName: "",
23
51
  contactPointMail: "",
24
- contactPointPhone: ""
52
+ contactPointPhone: "",
53
+ // Error state properties
54
+ showErrorTitle: !1,
55
+ titleErrorMessage: "",
56
+ showErrorDescription: !1,
57
+ descriptionErrorMessage: "",
58
+ showErrorPublisherName: !1,
59
+ publisherNameErrorMessage: "",
60
+ showErrorPublisherMail: !1,
61
+ publisherMailErrorMessage: "",
62
+ showErrorPublisherWebsite: !1,
63
+ publisherWebsiteErrorMessage: "",
64
+ showErrorContactPointName: !1,
65
+ contactPointNameErrorMessage: "",
66
+ showErrorContactPointMail: !1,
67
+ contactPointMailErrorMessage: "",
68
+ showErrorContactPointPhone: !1,
69
+ contactPointPhoneErrorMessage: "",
70
+ modified: "",
71
+ showErrorModified: !1,
72
+ modifiedErrorMessage: ""
25
73
  } },
26
74
  modelModifiers: {}
27
75
  }),
28
76
  emits: ["update:modelValue"],
29
- setup(d) {
30
- p([]), m().appContext.app.config.globalProperties.$env;
31
- const { formValues: T } = b(), e = r(d, "modelValue");
32
- return (t, a) => (c(), f("div", g, [
33
- n("div", v, [
34
- o(s, {
35
- class: "gap5BottomAsMargin",
77
+ setup(S, { expose: y }) {
78
+ R([]), z().appContext.app.config.globalProperties.$env;
79
+ const { formValues: Ve } = O(), e = x(S, "modelValue"), f = (t) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim()), w = (t) => {
80
+ if (!t || t.trim() === "")
81
+ return !0;
82
+ const r = t.replace(/[\s\-().]/g, "");
83
+ if (!/^[+]?\d+$/.test(r))
84
+ return !1;
85
+ const a = r.replace(/\D/g, "");
86
+ return a.length >= 6 && a.length <= 15;
87
+ }, b = (t) => !t || !t.trim() ? !1 : t.trim().length >= 2, M = (t) => {
88
+ try {
89
+ const r = t.trim(), a = r.startsWith("http://") || r.startsWith("https://") ? r : `https://${r}`;
90
+ return new URL(a), !0;
91
+ } catch {
92
+ return !1;
93
+ }
94
+ }, D = (t) => {
95
+ if (!t) return !1;
96
+ const r = new Date(t);
97
+ if (isNaN(r.getTime())) return !1;
98
+ const a = r.getFullYear(), c = /* @__PURE__ */ new Date();
99
+ c.setHours(0, 0, 0, 0);
100
+ const E = new Date(r);
101
+ return E.setHours(0, 0, 0, 0), a >= 1950 && E <= c;
102
+ }, v = (t) => !t || !t.trim() ? !1 : /[a-zA-Z0-9]/.test(t.trim()), P = (t) => t && t.trim().length > 0, o = (t, r) => {
103
+ switch (t) {
104
+ case "title":
105
+ return v(r) ? (e.value.showErrorTitle = !1, e.value.titleErrorMessage = "", !0) : (e.value.showErrorTitle = !0, e.value.titleErrorMessage = "Bitte geben Sie einen Titel ein, bevor Sie fortfahren.", !1);
106
+ case "description":
107
+ return P(r) ? (e.value.showErrorDescription = !1, e.value.descriptionErrorMessage = "", !0) : (e.value.showErrorDescription = !0, e.value.descriptionErrorMessage = "Bitte geben Sie eine Beschreibung ein, bevor Sie fortfahren.", !1);
108
+ case "modified":
109
+ if (!r)
110
+ return e.value.showErrorModified = !0, e.value.modifiedErrorMessage = "Bitte geben Sie ein Aktualisierungsdatum ein.", !1;
111
+ const a = new Date(r), c = /* @__PURE__ */ new Date();
112
+ return new Date(a.getFullYear(), a.getMonth(), a.getDate()), new Date(c.getFullYear(), c.getMonth(), c.getDate()), isNaN(a.getTime()) ? (e.value.showErrorModified = !0, e.value.modifiedErrorMessage = "Bitte geben Sie ein gültiges Datum ein.", !1) : a.getFullYear() < 1950 ? (e.value.showErrorModified = !0, e.value.modifiedErrorMessage = "Das Jahr darf nicht vor 1950 liegen.", !1) : a > c ? (e.value.showErrorModified = !0, e.value.modifiedErrorMessage = "Das Datum darf nicht in der Zukunft liegen.", !1) : (e.value.showErrorModified = !1, e.value.modifiedErrorMessage = "", !0);
113
+ case "publisherName":
114
+ return v(r) ? (e.value.showErrorPublisherName = !1, e.value.publisherNameErrorMessage = "", !0) : (e.value.showErrorPublisherName = !0, e.value.publisherNameErrorMessage = "Bitte geben Sie einen gültigen Organisationsnamen ein.", !1);
115
+ case "publisherMail":
116
+ return !r || !r.trim() || !f(r) ? (e.value.showErrorPublisherMail = !0, e.value.publisherMailErrorMessage = "Bitte geben Sie eine gültige E-Mail-Adresse ein.", !1) : (e.value.showErrorPublisherMail = !1, e.value.publisherMailErrorMessage = "", !0);
117
+ case "publisherWebsite":
118
+ return !r || !r.trim() || !M(r) ? (e.value.showErrorPublisherWebsite = !0, e.value.publisherWebsiteErrorMessage = "Bitte geben Sie eine gültige URL ein.", !1) : (e.value.showErrorPublisherWebsite = !1, e.value.publisherWebsiteErrorMessage = "", !0);
119
+ case "contactPointName":
120
+ return b(r) ? (e.value.showErrorContactPointName = !1, e.value.contactPointNameErrorMessage = "", !0) : (e.value.showErrorContactPointName = !0, e.value.contactPointNameErrorMessage = "Bitte geben Sie einen gültigen Namen ein (mindestens 2 Zeichen).", !1);
121
+ case "contactPointMail":
122
+ return !r || !r.trim() || !f(r) ? (e.value.showErrorContactPointMail = !0, e.value.contactPointMailErrorMessage = "Bitte geben Sie eine gültige E-Mail-Adresse ein.", !1) : (e.value.showErrorContactPointMail = !1, e.value.contactPointMailErrorMessage = "", !0);
123
+ case "contactPointPhone":
124
+ return r && r.trim() && !w(r) ? (e.value.showErrorContactPointPhone = !0, e.value.contactPointPhoneErrorMessage = "Bitte geben Sie eine gültige Telefonnummer ein.", !1) : (e.value.showErrorContactPointPhone = !1, e.value.contactPointPhoneErrorMessage = "", !0);
125
+ default:
126
+ return !0;
127
+ }
128
+ }, T = W(() => {
129
+ var _, V, N, I;
130
+ const t = v(e.value.title), r = P(e.value.description), a = D(e.value.modified), c = v(e.value.publisherName), E = ((_ = e.value.publisherMail) == null ? void 0 : _.trim()) && f(e.value.publisherMail), $ = ((V = e.value.publisherWebsite) == null ? void 0 : V.trim()) && M(e.value.publisherWebsite), k = b(e.value.contactPointName), U = ((N = e.value.contactPointMail) == null ? void 0 : N.trim()) && f(e.value.contactPointMail), A = !((I = e.value.contactPointPhone) != null && I.trim()) || w(e.value.contactPointPhone);
131
+ return t && r && c && E && $ && k && U && A && a;
132
+ });
133
+ l(() => e.value.title, (t) => o("title", t)), l(() => e.value.description, (t) => o("description", t)), l(() => e.value.publisherName, (t) => o("publisherName", t)), l(() => e.value.publisherMail, (t) => o("publisherMail", t)), l(() => e.value.publisherWebsite, (t) => o("publisherWebsite", t)), l(() => e.value.contactPointMail, (t) => o("contactPointMail", t)), l(() => e.value.contactPointName, (t) => o("contactPointName", t)), l(() => e.value.contactPointMail, (t) => o("contactPointMail", t)), l(() => e.value.contactPointPhone, (t) => o("contactPointPhone", t)), l(() => e.value.modified, (t) => o("modified", t));
134
+ const B = W(() => {
135
+ var t, r, a;
136
+ return {
137
+ title: !v(e.value.title),
138
+ description: !P(e.value.description),
139
+ publisherName: !v(e.value.publisherName),
140
+ publisherMail: !((t = e.value.publisherMail) != null && t.trim()) || !f(e.value.publisherMail),
141
+ publisherWebsite: !((r = e.value.publisherWebsite) != null && r.trim()) || !M(e.value.publisherWebsite),
142
+ contactPointName: !b(e.value.contactPointName),
143
+ // Now always validated
144
+ contactPointMail: !((a = e.value.contactPointMail) != null && a.trim()) || !f(e.value.contactPointMail)
145
+ };
146
+ }), C = () => {
147
+ const t = [];
148
+ return e.value.showErrorTitle && t.push(e.value.titleErrorMessage), e.value.showErrorDescription && t.push(e.value.descriptionErrorMessage), e.value.showErrorPublisherName && t.push(e.value.publisherNameErrorMessage), e.value.showErrorPublisherMail && t.push(e.value.publisherMailErrorMessage), e.value.showErrorPublisherWebsite && t.push(e.value.publisherWebsiteErrorMessage), e.value.showErrorContactPointName && t.push(e.value.contactPointNameErrorMessage), e.value.showErrorContactPointMail && t.push(e.value.contactPointMailErrorMessage), e.value.showErrorContactPointPhone && t.push(e.value.contactPointPhoneErrorMessage), e.value.showErrorModified && t.push(e.value.modifiedErrorMessage), t.length > 0 ? t : ["Bitte füllen Sie alle erforderlichen Felder korrekt aus."];
149
+ };
150
+ return l(() => e.value, () => {
151
+ }, { deep: !0 }), y({
152
+ isValid: T,
153
+ validationErrors: B,
154
+ getValidationErrorMessages: C,
155
+ validateField: o
156
+ }), (t, r) => (d(), u("div", Z, [
157
+ s("div", L, [
158
+ i(g, {
159
+ class: "",
36
160
  label: t.$t("message.metadata.title"),
37
161
  modelValue: e.value.title,
38
- "onUpdate:modelValue": a[0] || (a[0] = (l) => e.value.title = l),
162
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => e.value.title = a),
39
163
  placeholder: "",
40
164
  infoIcon: !1,
41
165
  preIcon: !1,
42
166
  initialHintText: !1,
43
- showEndIcon: !1
44
- }, null, 8, ["label", "modelValue"]),
45
- o(V, {
46
- class: "gap5BottomAsMargin",
47
- label: t.$t("message.metadata.description"),
48
- modelValue: e.value.description,
49
- "onUpdate:modelValue": a[1] || (a[1] = (l) => e.value.description = l)
50
- }, null, 8, ["label", "modelValue"]),
51
- o(s, {
52
- label: t.$t("message.dataupload.datasets.rap.essentials.modifiedHeader"),
53
- infoIcon: !1,
54
- preIcon: !1,
55
- datePicker: !0,
56
167
  showEndIcon: !1,
57
- modelValue: e.value.modified,
58
- "onUpdate:modelValue": a[2] || (a[2] = (l) => e.value.modified = l),
59
- defaultInput: !0,
60
- inputType: "date",
61
- initialHintText: !1
62
- }, null, 8, ["label", "modelValue"])
168
+ showError: e.value.showErrorTitle
169
+ }, null, 8, ["label", "modelValue", "showError"]),
170
+ e.value.showErrorTitle && e.value.titleErrorMessage ? (d(), u("div", j, [
171
+ i(p(m), {
172
+ size: 16,
173
+ weight: "fill"
174
+ }),
175
+ s("span", q, n(e.value.titleErrorMessage), 1)
176
+ ])) : h("", !0),
177
+ s("div", J, [
178
+ i(F, {
179
+ class: "",
180
+ label: t.$t("message.metadata.description"),
181
+ modelValue: e.value.description,
182
+ "onUpdate:modelValue": r[1] || (r[1] = (a) => e.value.description = a),
183
+ showError: e.value.showErrorDescription
184
+ }, null, 8, ["label", "modelValue", "showError"]),
185
+ e.value.showErrorDescription && e.value.descriptionErrorMessage ? (d(), u("div", G, [
186
+ i(p(m), {
187
+ size: 16,
188
+ weight: "fill"
189
+ }),
190
+ s("span", K, n(e.value.descriptionErrorMessage), 1)
191
+ ])) : h("", !0)
192
+ ]),
193
+ s("div", Q, [
194
+ i(g, {
195
+ label: t.$t("message.dataupload.datasets.rap.essentials.modifiedHeader"),
196
+ infoIcon: !1,
197
+ preIcon: !1,
198
+ datePicker: !0,
199
+ showEndIcon: !1,
200
+ modelValue: e.value.modified,
201
+ "onUpdate:modelValue": r[2] || (r[2] = (a) => e.value.modified = a),
202
+ defaultInput: !0,
203
+ inputType: "date",
204
+ showError: e.value.showErrorModified,
205
+ initialHintText: !1
206
+ }, null, 8, ["label", "modelValue", "showError"]),
207
+ e.value.showErrorModified && e.value.modifiedErrorMessage ? (d(), u("div", X, [
208
+ i(p(m), {
209
+ size: 16,
210
+ weight: "fill"
211
+ }),
212
+ s("span", ee, n(e.value.modifiedErrorMessage), 1)
213
+ ])) : h("", !0)
214
+ ])
63
215
  ]),
64
- n("div", M, [
65
- n("h5", h, i(t.$t("message.metadata.publisher")), 1),
66
- o(s, {
67
- label: t.$t("message.dataupload.datasets.dct:publisher.nameInput.title"),
68
- infoIcon: !1,
69
- preIcon: !1,
70
- initialHintText: !1,
71
- showEndIcon: !1,
72
- class: "gap5BottomAsMargin",
73
- modelValue: e.value.publisherName,
74
- "onUpdate:modelValue": a[3] || (a[3] = (l) => e.value.publisherName = l)
75
- }, null, 8, ["label", "modelValue"]),
76
- o(s, {
77
- label: t.$t("message.dataupload.datasets.dct:publisher.mailInput.title"),
78
- infoIcon: !1,
79
- preIcon: !1,
80
- initialHintText: !1,
81
- showEndIcon: !1,
82
- class: "gap5BottomAsMargin",
83
- modelValue: e.value.publisherMail,
84
- "onUpdate:modelValue": a[4] || (a[4] = (l) => e.value.publisherMail = l)
85
- }, null, 8, ["label", "modelValue"]),
86
- o(s, {
87
- label: t.$t("message.dataupload.datasets.dct:publisher.websiteInput.title"),
88
- addOnText: !0,
89
- infoIcon: !1,
90
- preIcon: !1,
91
- initialHintText: !1,
92
- showEndIcon: !1,
93
- modelValue: e.value.publisherWebsite,
94
- "onUpdate:modelValue": a[5] || (a[5] = (l) => e.value.publisherWebsite = l)
95
- }, null, 8, ["label", "modelValue"])
216
+ s("div", te, [
217
+ s("h5", re, n(t.$t("message.metadata.publisher")), 1),
218
+ s("div", ae, [
219
+ i(g, {
220
+ label: t.$t("message.dataupload.datasets.dct:publisher.nameInput.title"),
221
+ infoIcon: !1,
222
+ preIcon: !1,
223
+ placeholder: t.$t("message.dataupload.datasets.dct:publisher.nameInput.placeholder"),
224
+ initialHintText: !1,
225
+ showEndIcon: !1,
226
+ class: "",
227
+ modelValue: e.value.publisherName,
228
+ "onUpdate:modelValue": r[3] || (r[3] = (a) => e.value.publisherName = a),
229
+ showError: e.value.showErrorPublisherName,
230
+ error_message: "Bitte geben Sie einen gültigen Organisationsnamen ein."
231
+ }, null, 8, ["label", "placeholder", "modelValue", "showError"]),
232
+ e.value.showErrorPublisherName && e.value.publisherNameErrorMessage ? (d(), u("div", se, [
233
+ i(p(m), {
234
+ size: 16,
235
+ weight: "fill"
236
+ }),
237
+ s("span", ie, n(e.value.publisherNameErrorMessage), 1)
238
+ ])) : h("", !0)
239
+ ]),
240
+ s("div", oe, [
241
+ i(g, {
242
+ label: t.$t("message.dataupload.datasets.dct:publisher.mailInput.title"),
243
+ placeholder: t.$t("message.dataupload.datasets.dct:publisher.mailInput.placeholder"),
244
+ infoIcon: !1,
245
+ preIcon: !1,
246
+ initialHintText: !1,
247
+ showEndIcon: !1,
248
+ class: "",
249
+ modelValue: e.value.publisherMail,
250
+ "onUpdate:modelValue": r[4] || (r[4] = (a) => e.value.publisherMail = a),
251
+ showError: e.value.showErrorPublisherMail,
252
+ error_message: "Bitte geben Sie eine gültige E-Mail-Adresse ein."
253
+ }, null, 8, ["label", "placeholder", "modelValue", "showError"]),
254
+ e.value.showErrorPublisherMail && e.value.publisherMailErrorMessage ? (d(), u("div", le, [
255
+ i(p(m), {
256
+ size: 16,
257
+ weight: "fill"
258
+ }),
259
+ s("span", ne, n(e.value.publisherMailErrorMessage), 1)
260
+ ])) : h("", !0)
261
+ ]),
262
+ s("div", ue, [
263
+ i(g, {
264
+ label: t.$t("message.dataupload.datasets.dct:publisher.websiteInput.title"),
265
+ placeholder: t.$t("message.dataupload.datasets.dct:publisher.websiteInput.placeholder"),
266
+ infoIcon: !1,
267
+ preIcon: !1,
268
+ initialHintText: !1,
269
+ showEndIcon: !1,
270
+ modelValue: e.value.publisherWebsite,
271
+ "onUpdate:modelValue": r[5] || (r[5] = (a) => e.value.publisherWebsite = a),
272
+ showError: e.value.showErrorPublisherWebsite,
273
+ error_message: "Bitte geben Sie eine gültige URL ein."
274
+ }, null, 8, ["label", "placeholder", "modelValue", "showError"]),
275
+ e.value.showErrorPublisherWebsite && e.value.publisherWebsiteErrorMessage ? (d(), u("div", de, [
276
+ i(p(m), {
277
+ size: 16,
278
+ weight: "fill"
279
+ }),
280
+ s("span", ce, n(e.value.publisherWebsiteErrorMessage), 1)
281
+ ])) : h("", !0)
282
+ ])
96
283
  ]),
97
- n("div", P, [
98
- n("h5", E, i(t.$t("message.header.subnav.contact")), 1),
99
- o(s, {
100
- modelValue: e.value.contactPointName,
101
- "onUpdate:modelValue": a[6] || (a[6] = (l) => e.value.contactPointName = l),
102
- label: t.$t("message.dataupload.datasets.dcat:contactPoint.nameInput.title"),
103
- infoIcon: !1,
104
- preIcon: !1,
105
- initialHintText: !1,
106
- showEndIcon: !1,
107
- class: "gap5BottomAsMargin"
108
- }, null, 8, ["modelValue", "label"]),
109
- o(s, {
110
- label: t.$t("message.dataupload.datasets.dcat:contactPoint.mailInput.title"),
111
- infoIcon: !1,
112
- preIcon: !1,
113
- initialHintText: !1,
114
- showEndIcon: !1,
115
- class: "gap5BottomAsMargin",
116
- modelValue: e.value.contactPointMail,
117
- "onUpdate:modelValue": a[7] || (a[7] = (l) => e.value.contactPointMail = l)
118
- }, null, 8, ["label", "modelValue"]),
119
- o(s, {
120
- label: t.$t("message.dataupload.datasets.dcat:contactPoint.telInput.title"),
121
- infoIcon: !1,
122
- preIcon: !1,
123
- initialHintText: !1,
124
- showEndIcon: !1,
125
- modelValue: e.value.contactPointPhone,
126
- "onUpdate:modelValue": a[8] || (a[8] = (l) => e.value.contactPointPhone = l)
127
- }, null, 8, ["label", "modelValue"])
284
+ s("div", he, [
285
+ s("h5", pe, n(t.$t("message.header.subnav.contact")), 1),
286
+ s("div", me, [
287
+ i(g, {
288
+ modelValue: e.value.contactPointName,
289
+ "onUpdate:modelValue": r[6] || (r[6] = (a) => e.value.contactPointName = a),
290
+ label: t.$t("message.dataupload.datasets.dcat:contactPoint.nameInput.title"),
291
+ placeholder: t.$t(
292
+ "message.dataupload.datasets.dcat:contactPoint.nameInput.placeholder"
293
+ ),
294
+ infoIcon: !1,
295
+ preIcon: !1,
296
+ initialHintText: !1,
297
+ showEndIcon: !1,
298
+ class: "",
299
+ showError: e.value.showErrorContactPointName,
300
+ error_message: "Bitte geben Sie einen gültigen Namen ein (mindestens 2 Zeichen)."
301
+ }, null, 8, ["modelValue", "label", "placeholder", "showError"]),
302
+ e.value.showErrorContactPointName && e.value.contactPointNameErrorMessage ? (d(), u("div", ge, [
303
+ i(p(m), {
304
+ size: 16,
305
+ weight: "fill"
306
+ }),
307
+ s("span", fe, n(e.value.contactPointNameErrorMessage), 1)
308
+ ])) : h("", !0)
309
+ ]),
310
+ s("div", ve, [
311
+ i(g, {
312
+ label: t.$t("message.dataupload.datasets.dcat:contactPoint.mailInput.title"),
313
+ infoIcon: !1,
314
+ preIcon: !1,
315
+ initialHintText: !1,
316
+ placeholder: t.$t(
317
+ "message.dataupload.datasets.dcat:contactPoint.mailInput.placeholder"
318
+ ),
319
+ showEndIcon: !1,
320
+ class: "",
321
+ modelValue: e.value.contactPointMail,
322
+ "onUpdate:modelValue": r[7] || (r[7] = (a) => e.value.contactPointMail = a),
323
+ showError: e.value.showErrorContactPointMail,
324
+ error_message: "Bitte geben Sie eine gültige E-Mail-Adresse ein."
325
+ }, null, 8, ["label", "placeholder", "modelValue", "showError"]),
326
+ e.value.showErrorContactPointMail && e.value.contactPointMailErrorMessage ? (d(), u("div", Ee, [
327
+ i(p(m), {
328
+ size: 16,
329
+ weight: "fill"
330
+ }),
331
+ s("span", be, n(e.value.contactPointMailErrorMessage), 1)
332
+ ])) : h("", !0)
333
+ ]),
334
+ s("div", Me, [
335
+ i(g, {
336
+ label: t.$t("message.dataupload.datasets.dcat:contactPoint.telInput.title"),
337
+ infoIcon: !1,
338
+ placeholder: t.$t(
339
+ "message.dataupload.datasets.dcat:contactPoint.telInput.placeholder"
340
+ ),
341
+ preIcon: !1,
342
+ initialHintText: !1,
343
+ showEndIcon: !1,
344
+ modelValue: e.value.contactPointPhone,
345
+ "onUpdate:modelValue": r[8] || (r[8] = (a) => e.value.contactPointPhone = a),
346
+ showError: e.value.showErrorContactPointPhone,
347
+ error_message: "Bitte geben Sie eine gültige Telefonnummer ein."
348
+ }, null, 8, ["label", "placeholder", "modelValue", "showError"]),
349
+ e.value.showErrorContactPointPhone && e.value.contactPointPhoneErrorMessage ? (d(), u("div", Pe, [
350
+ i(p(m), {
351
+ size: 16,
352
+ weight: "fill"
353
+ }),
354
+ s("span", we, n(e.value.contactPointPhoneErrorMessage), 1)
355
+ ])) : h("", !0)
356
+ ])
128
357
  ])
129
358
  ]));
130
359
  }
131
- }, R = /* @__PURE__ */ I($, [["__scopeId", "data-v-eeaac3aa"]]);
360
+ }, $e = /* @__PURE__ */ Y(_e, [["__scopeId", "data-v-ea4362eb"]]);
132
361
  export {
133
- R as default
362
+ $e as default
134
363
  };
@@ -1,45 +1,62 @@
1
- import { ref as s, getCurrentInstance as _, onMounted as m, createElementBlock as n, openBlock as r, Fragment as y, renderList as h, createBlock as g } from "vue";
1
+ import { ref as f, getCurrentInstance as y, computed as g, onMounted as m, createElementBlock as n, openBlock as c, Fragment as _, renderList as h, createBlock as D } from "vue";
2
2
  import "@formkit/core";
3
- import { getDatasetCategories as x } from "../../services/dpiV3_apis.js";
4
- import C from "../Chip.vue.js";
5
- import { useFormValues as k } from "../../../composables/useDpiFormValues.js";
3
+ import { getDatasetCategories as P } from "../../services/dpiV3_apis.js";
4
+ import I from "../Chip.vue.js";
5
+ import { useFormValues as C } from "../../../composables/useDpiFormValues.js";
6
6
  /* empty css */
7
- import I from "../../../../_virtual/_plugin-vue_export-helper.js";
8
- const D = { class: "dpiV3_fChipWrap" }, F = {
7
+ import x from "../../../../_virtual/_plugin-vue_export-helper.js";
8
+ const k = { class: "dpiV3_fChipWrap" }, V = {
9
9
  __name: "FindabilityChips",
10
10
  props: {
11
11
  context: Object
12
12
  },
13
- setup(c) {
14
- const u = c, i = s([]), p = _().appContext.app.config.globalProperties.$env, a = s(u.context.attrs["final-values"].Discoverability.discoverabilityPage), d = (t) => {
13
+ setup(F) {
14
+ const o = f([]), d = y().appContext.app.config.globalProperties.$env, { formValues: i } = C(), v = g(() => {
15
+ var t;
16
+ return (((t = i.value.Discoverability) == null ? void 0 : t.discoverabilityPage) || []).filter((l) => l.id);
17
+ }), u = (e) => {
15
18
  try {
16
- return a.value.find((l) => l.id === t.id);
19
+ return v.value.find((t) => t.id === e.id);
17
20
  } catch {
21
+ return !1;
18
22
  }
19
- }, { formValues: o } = k();
20
- async function f() {
23
+ };
24
+ async function p() {
21
25
  try {
22
- i.value = await x(p.api.baseUrl), i.value.sort((t, l) => t.pref_label.de.localeCompare(l.pref_label.de));
23
- } catch (t) {
24
- console.log(t);
26
+ o.value = await P(d.api.baseUrl), o.value.sort((e, t) => e.pref_label.de.localeCompare(t.pref_label.de));
27
+ } catch (e) {
28
+ console.log(e);
25
29
  }
26
30
  }
27
- function v(t) {
28
- a.value.find((e) => e.id === t.id) ? a.value = a.value.filter((e) => e.id !== t.id) : a.value.push({ id: t.id, uri: t.resource, label: t.pref_label.de }), a.value.length > 1 ? a.value.find((e) => e.isValid = !0) : a.value.find((e) => e.isValid = !1), o.value.Discoverability[Object.keys(o.value.Discoverability)[0]] = a, console.log(a);
31
+ function b(e) {
32
+ i.value.Discoverability || (i.value.Discoverability = {}), i.value.Discoverability.discoverabilityPage || (i.value.Discoverability.discoverabilityPage = [{ isValid: !0 }]);
33
+ const t = i.value.Discoverability.discoverabilityPage;
34
+ if (t.find((a) => a.id === e.id))
35
+ i.value.Discoverability.discoverabilityPage = t.filter((a) => a.id !== e.id);
36
+ else {
37
+ const a = {
38
+ id: e.id,
39
+ uri: e.resource,
40
+ label: e.pref_label.de
41
+ };
42
+ i.value.Discoverability.discoverabilityPage.push(a);
43
+ }
44
+ const r = i.value.Discoverability.discoverabilityPage.filter((a) => a.id), s = i.value.Discoverability.discoverabilityPage.find((a) => a.hasOwnProperty("isValid"));
45
+ s ? s.isValid = r.length > 0 : i.value.Discoverability.discoverabilityPage.unshift({ isValid: r.length > 0 }), console.log("Updated discoverabilityPage:", i.value.Discoverability.discoverabilityPage);
29
46
  }
30
47
  return m(() => {
31
- f();
32
- }), (t, l) => (r(), n("div", D, [
33
- (r(!0), n(y, null, h(i.value, (e, b) => (r(), g(C, {
34
- key: b,
35
- text: e.pref_label.de,
36
- data: { "@value": e.value, URI: e.URI },
37
- setup: { "@type": "select", "@inTable": !1, "@findability": !0, "@selected": d(e) },
38
- onClick: (V) => v(e)
48
+ p();
49
+ }), (e, t) => (c(), n("div", k, [
50
+ (c(!0), n(_, null, h(o.value, (l, r) => (c(), D(I, {
51
+ key: r,
52
+ text: l.pref_label.de,
53
+ data: { "@value": l.value, URI: l.URI },
54
+ setup: { "@type": "select", "@inTable": !1, "@findability": !0, "@selected": u(l) },
55
+ onClick: (s) => b(l)
39
56
  }, null, 8, ["text", "data", "setup", "onClick"]))), 128))
40
57
  ]));
41
58
  }
42
- }, P = /* @__PURE__ */ I(F, [["__scopeId", "data-v-9f64c670"]]);
59
+ }, L = /* @__PURE__ */ x(V, [["__scopeId", "data-v-0071bef7"]]);
43
60
  export {
44
- P as default
61
+ L as default
45
62
  };