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

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