@piveau/dpi 0.2.0-alpha.47 → 0.2.0-alpha.49

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 (58) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue.js +1 -1
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue2.js +64 -49
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +38 -30
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js +2 -2
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue2.js +59 -55
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +129 -98
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +3 -3
  10. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +148 -135
  11. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +5 -5
  12. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +317 -296
  13. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +77 -0
  14. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +58 -56
  15. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +97 -90
  16. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +35 -35
  17. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +86 -86
  18. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js +7 -10
  19. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +9 -8
  20. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +2 -2
  21. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue.js +2 -2
  22. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue2.js +55 -50
  23. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js +8 -8
  24. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
  25. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +92 -91
  26. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
  27. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +49 -48
  28. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +122 -117
  29. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsModal.vue.js +48 -48
  30. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +289 -293
  31. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +32 -30
  32. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +46 -29
  33. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +264 -221
  34. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +41 -35
  35. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +63 -65
  36. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +36 -35
  37. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
  38. package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +121 -108
  39. package/dist/packages/dpi/src/data-provider-interface/components/DiscoverabilityPage.vue.js +1 -1
  40. package/dist/packages/dpi/src/data-provider-interface/components/DistLicense.vue.js +102 -100
  41. package/dist/packages/dpi/src/data-provider-interface/components/DistributionSimplePage.vue.js +657 -600
  42. package/dist/packages/dpi/src/data-provider-interface/components/HVDPage.vue.js +41 -42
  43. package/dist/packages/dpi/src/data-provider-interface/components/PublisherPage.vue.js +161 -130
  44. package/dist/packages/dpi/src/data-provider-interface/components/ReviewAndPublishPage.vue.js +272 -239
  45. package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue.js +3 -3
  46. package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue2.js +94 -82
  47. package/dist/packages/dpi/src/data-provider-interface/components/TempResPage.vue.js +81 -81
  48. package/dist/packages/dpi/src/data-provider-interface/components/TempResPageInModal.vue.js +138 -141
  49. package/dist/packages/dpi/src/data-provider-interface/components/TitelPage.vue.js +4 -4
  50. package/dist/packages/dpi/src/data-provider-interface/components/VisibilityPage.vue.js +4 -3
  51. package/dist/packages/dpi/src/data-provider-interface/components/dpiV3Description.vue.js +1 -1
  52. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +255 -242
  53. package/dist/packages/dpi/src/data-provider-interface/composables/useOrganizationInfo.js +48 -0
  54. package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +80 -84
  55. package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +2 -2
  56. package/dist/packages/dpi/src/data-provider-interface/store/modules/authStore.js +1 -3
  57. package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +226 -250
  58. package/package.json +2 -2
@@ -0,0 +1,77 @@
1
+ import { ref as c, onMounted as m, getCurrentInstance as h, watch as v, createBlock as b, openBlock as R, unref as u } from "vue";
2
+ import { getAccessRights as I } from "../../services/dpiV3_apis.js";
3
+ import V from "../Dropdown.vue.js";
4
+ import { useI18n as w } from "vue-i18n";
5
+ import { useFormValues as F } from "../../../composables/useDpiFormValues.js";
6
+ const D = {
7
+ __name: "AccessRightsV3",
8
+ props: {
9
+ distributionId: { type: Number, required: !1 },
10
+ showDeleteButton: { type: Boolean, default: !1 },
11
+ accessRightsProp: { type: String, default: "" }
12
+ },
13
+ emits: ["addAccessRights", "deleteButtonClicked"],
14
+ setup(n, { emit: p }) {
15
+ const { t: d } = w(), { formValues: y } = F(), s = c([]);
16
+ m(async () => {
17
+ const t = h().appContext.app.config.globalProperties.$env;
18
+ try {
19
+ const e = await I(t.api.baseUrl);
20
+ console.log(e), s.value = e.map((a) => ({
21
+ "@value": a.pref_label.de,
22
+ label: a.pref_label.de,
23
+ uri: a.resource
24
+ }));
25
+ } catch (e) {
26
+ console.error("Failed to load planned availability data", e);
27
+ }
28
+ });
29
+ const o = n, i = c(o.accessRightsProp), r = p, f = (l, t) => {
30
+ let e = {
31
+ uri: s.value.find((a) => a["@value"] === l).uri || "",
32
+ label: s.value.find((a) => a["@value"] === l).label || ""
33
+ };
34
+ r("addAccessRights", e, o.distributionId);
35
+ };
36
+ v(
37
+ () => o.accessRightsProp,
38
+ (l) => {
39
+ i.value = l;
40
+ }
41
+ );
42
+ const g = () => {
43
+ console.log("delete clicked"), r("deleteButtonClicked", o.distributionId);
44
+ };
45
+ return (l, t) => (R(), b(V, {
46
+ "onUpdate:modelValue": [
47
+ t[0] || (t[0] = (e) => f(e)),
48
+ t[1] || (t[1] = (e) => i.value = e)
49
+ ],
50
+ dropdownWidth: "large",
51
+ type: "inputField",
52
+ modelValue: i.value,
53
+ inputFieldProps: {
54
+ addOnText: !1,
55
+ initialHintText: !1,
56
+ datePicker: !1,
57
+ infoIcon: !1,
58
+ preIcon: !1,
59
+ label: u(d)(
60
+ "message.dataupload.datasets.dcat:distribution.advanced.dct:accessRights"
61
+ ) + " (optional)",
62
+ dropdown_dpiV3: !0,
63
+ placeholder: u(d)(
64
+ "message.dataupload.datasets.dcat:distribution.advanced.dct:accessRights"
65
+ ) + " hinzufügen",
66
+ inputFieldSize: "large",
67
+ modelValue: i.value,
68
+ defaultInput: !n.showDeleteButton
69
+ },
70
+ data: s.value,
71
+ onDeleteDropdownField: g
72
+ }, null, 8, ["modelValue", "inputFieldProps", "data"]));
73
+ }
74
+ };
75
+ export {
76
+ D as default
77
+ };
@@ -1,9 +1,9 @@
1
- import { ref as h, reactive as T, onMounted as z, createElementBlock as c, openBlock as r, normalizeClass as b, createCommentVNode as g, createBlock as D, Fragment as M, renderList as E, createElementVNode as L, createVNode as u, unref as d, toDisplayString as N, isRef as P } from "vue";
2
- import q from "../TextAreaV3.vue.js";
3
- import S from "../ButtonV3.vue.js";
4
- import W from "../ModalSimpleV3.vue.js";
5
- import w from "../InputField.vue.js";
6
- import { PhWarning as $ } from "@phosphor-icons/vue";
1
+ import { ref as g, reactive as F, onMounted as T, createElementBlock as c, openBlock as r, normalizeClass as L, createCommentVNode as h, createBlock as z, Fragment as M, renderList as E, createElementVNode as w, createVNode as u, unref as a, toDisplayString as P, isRef as $ } from "vue";
2
+ import N from "../TextAreaV3.vue.js";
3
+ import x from "../ButtonV3.vue.js";
4
+ import q from "../ModalSimpleV3.vue.js";
5
+ import S from "../InputField.vue.js";
6
+ import { PhWarning as W } from "@phosphor-icons/vue";
7
7
  /* empty css */
8
8
  import H from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
9
9
  const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
@@ -24,11 +24,11 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
24
24
  showDeleteButton: { type: Boolean, required: !1, default: !1 }
25
25
  },
26
26
  emits: ["update"],
27
- setup(a, { expose: _, emit: A }) {
28
- let s = h({});
29
- const o = a, m = A, R = h(!1), V = h(null), l = T({});
30
- let p = h(!1);
31
- z(() => {
27
+ setup(d, { expose: _, emit: A }) {
28
+ let s = g({});
29
+ const o = d, m = A, R = g(!1), V = g(null), l = F({});
30
+ let p = g(!1);
31
+ T(() => {
32
32
  console.log("Component Mounted: accessServices received for distributionId:", o.distributionId), console.log("accessServices:", o.accessServices), o.accessServices.length === 0 && (console.log("No accessServices found, initializing first service."), m("update", [
33
33
  {
34
34
  id: 1,
@@ -42,29 +42,29 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
42
42
  if (!t || t.trim() === "") return !1;
43
43
  const i = t.trim();
44
44
  return /\.[a-zA-Z]{2,}$/.test(i);
45
- }, v = (t) => {
45
+ }, b = (t) => {
46
46
  const i = t["dct:title"] && t["dct:title"].trim() !== "", e = t["dct:description"] && t["dct:description"].trim() !== "";
47
47
  return i || e;
48
- }, I = (t) => {
48
+ }, k = (t) => {
49
49
  const i = o.accessServices.find((e) => e.id === t);
50
50
  if (i) {
51
51
  const e = i["dcat:downloadURL"] ? i["dcat:downloadURL"].trim() : "";
52
- v(i) ? e ? f(e) ? l[t] = null : l[t] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : l[t] = "Bitte geben Sie eine gültige URL ein." : e && !f(e) ? l[t] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)" : l[t] = null;
52
+ b(i) ? e && f(e) ? l[t] = null : l[t] = "Bitte geben Sie eine gültige URL ein." : e && !f(e) ? l[t] = "Bitte geben Sie eine gültige URL ein." : l[t] = null;
53
53
  }
54
- }, x = () => {
54
+ }, B = () => {
55
55
  let t = !1;
56
56
  return o.accessServices.forEach((i) => {
57
57
  const e = i["dcat:downloadURL"] ? i["dcat:downloadURL"].trim() : "";
58
- v(i) ? e ? f(e) || (l[i.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", t = !0) : (l[i.id] = "URL ist erforderlich", t = !0) : e && !f(e) && (l[i.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", t = !0);
58
+ b(i) ? e ? f(e) || (l[i.id] = "Bitte geben Sie eine gültige URL ein.", t = !0) : (l[i.id] = "Please enter a valid URL.", t = !0) : e && !f(e) && (l[i.id] = "Bitte geben Sie eine gültige URL ein.", t = !0);
59
59
  }), t;
60
- }, k = (t) => {
60
+ }, C = (t) => {
61
61
  switch (t) {
62
62
  case "delete":
63
- F();
63
+ y();
64
64
  break;
65
65
  }
66
- }, y = () => {
67
- if (x())
66
+ }, D = () => {
67
+ if (B())
68
68
  return;
69
69
  const i = {
70
70
  id: (o.accessServices.length ? Math.max(...o.accessServices.map((e) => e.id)) : 0) + 1,
@@ -75,12 +75,12 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
75
75
  m("update", [...o.accessServices, i]);
76
76
  }, U = (t, i, e) => {
77
77
  const n = o.accessServices.map(
78
- (B) => B.id === e ? { ...B, [i]: t.target.value } : B
78
+ (v) => v.id === e ? { ...v, [i]: t.target.value } : v
79
79
  );
80
80
  m("update", n), setTimeout(() => {
81
- I(e);
81
+ k(e);
82
82
  }, 0);
83
- }, C = (t) => {
83
+ }, I = (t) => {
84
84
  s.value = {
85
85
  button: "Löschen",
86
86
  header: "Datenservice löschen",
@@ -89,23 +89,23 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
89
89
  optionalString_1: t["dct:title"],
90
90
  optionalString_2: t["dcat:downloadURL"]
91
91
  }, p.value = !0, V.value = t;
92
- }, F = () => {
92
+ }, y = () => {
93
93
  const t = o.accessServices.filter(
94
94
  (i) => i.id !== V.value.id
95
95
  );
96
96
  delete l[V.value.id], m("update", t);
97
97
  };
98
98
  return _({
99
- validateAllItems: x
99
+ validateAllItems: B
100
100
  }), (t, i) => (r(), c("div", {
101
- class: b(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: a.asCard }])
101
+ class: L(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: d.asCard }])
102
102
  }, [
103
- (r(!0), c(M, null, E(a.accessServices, (e) => (r(), c("div", {
103
+ (r(!0), c(M, null, E(d.accessServices, (e) => (r(), c("div", {
104
104
  key: e.id,
105
- class: b(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: a.asCard }])
105
+ class: L(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: d.asCard }])
106
106
  }, [
107
- L("div", O, [
108
- u(w, {
107
+ w("div", O, [
108
+ u(S, {
109
109
  onInput: (n) => U(n, "dcat:downloadURL", e.id),
110
110
  addOnText: !1,
111
111
  datePicker: !1,
@@ -120,17 +120,18 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
120
120
  "onUpdate:modelValue": (n) => e["dcat:downloadURL"] = n
121
121
  }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
122
122
  l[e.id] ? (r(), c("div", Z, [
123
- u(d($), {
123
+ u(a(W), {
124
124
  size: 16,
125
125
  weight: "fill"
126
126
  }),
127
- L("span", j, N(l[e.id]), 1)
128
- ])) : g("", !0),
129
- u(w, {
127
+ w("span", j, P(l[e.id]), 1)
128
+ ])) : h("", !0),
129
+ u(S, {
130
130
  onInput: (n) => U(n, "dct:title", e.id),
131
131
  addOnText: !1,
132
132
  datePicker: !1,
133
133
  infoIcon: !1,
134
+ onDeleteButtonClicked: (n) => e["dct:title"] = "",
134
135
  placeholder: "Bitte Titel eingeben...",
135
136
  preIcon: !1,
136
137
  inputFieldSize: "large",
@@ -139,51 +140,52 @@ const O = { class: "dpiV3_LinkAndMetadata" }, Z = {
139
140
  showEndIcon: !1,
140
141
  modelValue: e["dct:title"],
141
142
  "onUpdate:modelValue": (n) => e["dct:title"] = n,
142
- defaultInput: !a.showDeleteButton
143
- }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "defaultInput"]),
144
- u(q, {
143
+ defaultInput: !d.showDeleteButton
144
+ }, null, 8, ["onInput", "onDeleteButtonClicked", "modelValue", "onUpdate:modelValue", "defaultInput"]),
145
+ u(N, {
145
146
  onInput: (n) => U(n, "dct:description", e.id),
146
147
  hint: !1,
148
+ onDeleteClicked: (n) => e["dct:description"] = "",
147
149
  label: "Beschreibung (optional)",
148
150
  placeholder: "Bitte Beschreibung eingeben...",
149
151
  modelValue: e["dct:description"],
150
152
  "onUpdate:modelValue": (n) => e["dct:description"] = n,
151
- showDeleteButton: a.showDeleteButton
152
- }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue", "showDeleteButton"]),
153
- R.value && a.accessServices.length === 1 ? (r(), c("p", G, " Mindestens eine URL muss vorhanden sein. ")) : g("", !0)
153
+ showDeleteButton: d.showDeleteButton
154
+ }, null, 8, ["onInput", "onDeleteClicked", "modelValue", "onUpdate:modelValue", "showDeleteButton"]),
155
+ R.value && d.accessServices.length === 1 ? (r(), c("p", G, " Mindestens eine URL muss vorhanden sein. ")) : h("", !0)
154
156
  ]),
155
- u(S, {
157
+ u(x, {
156
158
  class: "dpiV3_tempAddMore",
157
159
  buttonText: "Löschen",
158
160
  size: "small",
159
161
  iconStart: "trash",
160
162
  variant: "tertiary",
161
- onClick: (n) => C(e)
163
+ onClick: (n) => I(e)
162
164
  }, null, 8, ["onClick"])
163
165
  ], 2))), 128)),
164
- a.asCard ? g("", !0) : (r(), c("div", J, [
165
- u(S, {
166
+ d.asCard ? h("", !0) : (r(), c("div", J, [
167
+ u(x, {
166
168
  buttonText: "Weiteren Service hinzufügen",
167
169
  size: "small",
168
170
  iconStart: "plus",
169
171
  variant: "tertiary",
170
- onClick: y
172
+ onClick: D
171
173
  })
172
174
  ])),
173
- d(p) ? (r(), D(W, {
175
+ a(p) ? (r(), z(q, {
174
176
  key: 1,
175
- buttons: d(s).button,
176
- headerText: d(s).header,
177
- text: d(s).text,
178
- onClose: i[0] || (i[0] = (e) => P(p) ? p.value = !1 : p = !1),
179
- action: d(s).action,
180
- onActionHandling: i[1] || (i[1] = (e) => k(e)),
181
- optionalString_1: d(s).optionalString_1,
182
- optionalString_2: d(s).optionalString_2
183
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : g("", !0)
177
+ buttons: a(s).button,
178
+ headerText: a(s).header,
179
+ text: a(s).text,
180
+ onClose: i[0] || (i[0] = (e) => $(p) ? p.value = !1 : p = !1),
181
+ action: a(s).action,
182
+ onActionHandling: i[1] || (i[1] = (e) => C(e)),
183
+ optionalString_1: a(s).optionalString_1,
184
+ optionalString_2: a(s).optionalString_2
185
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : h("", !0)
184
186
  ], 2));
185
187
  }
186
- }, oe = /* @__PURE__ */ H(K, [["__scopeId", "data-v-9f224f36"]]);
188
+ }, oe = /* @__PURE__ */ H(K, [["__scopeId", "data-v-c7145fc8"]]);
187
189
  export {
188
190
  oe as default
189
191
  };
@@ -1,18 +1,18 @@
1
- import { ref as n, onMounted as P, getCurrentInstance as A, watch as g, createElementBlock as f, openBlock as v, createVNode as d, createCommentVNode as x, normalizeClass as E, createElementVNode as V, unref as b, toDisplayString as I } from "vue";
1
+ import { ref as r, onMounted as P, getCurrentInstance as E, watch as C, createElementBlock as v, openBlock as h, normalizeClass as k, createElementVNode as g, createCommentVNode as b, createVNode as d, unref as I, toDisplayString as w } from "vue";
2
2
  import { useFormValues as z } from "../../../composables/useDpiFormValues.js";
3
3
  import { getChecksumAlgorithms as M } from "../../services/dpiV3_apis.js";
4
4
  import N from "../Dropdown.vue.js";
5
- import O from "../InputField.vue.js";
6
- import { PhWarning as w } from "@phosphor-icons/vue";
5
+ import q from "../InputField.vue.js";
6
+ import { PhWarning as y } from "@phosphor-icons/vue";
7
7
  /* empty css */
8
- import U from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
9
- const q = { class: "dpiV3_LinkAndMetadata" }, H = {
8
+ import O from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
9
+ const U = {
10
10
  key: 0,
11
11
  class: "dpiV3_errorMessage"
12
- }, W = { class: "copy-mini-regular" }, G = {
13
- key: 1,
12
+ }, W = { class: "copy-mini-regular" }, H = {
13
+ key: 0,
14
14
  class: "dpiV3_errorMessage"
15
- }, L = { class: "copy-mini-regular" }, $ = {
15
+ }, G = { class: "copy-mini-regular" }, L = {
16
16
  __name: "ChecksumV3",
17
17
  props: {
18
18
  distributionId: { type: Number, required: !1 },
@@ -20,59 +20,60 @@ const q = { class: "dpiV3_LinkAndMetadata" }, H = {
20
20
  checksumText: { type: String, default: "" },
21
21
  checksumDropdownText: { type: String, default: "" },
22
22
  uri: { type: String, default: "" },
23
- distIndex: { type: Number, required: !1 }
23
+ distIndex: { type: Number, required: !1 },
24
+ asCard: { type: Boolean, required: !1, default: !1 }
24
25
  },
25
26
  emits: ["addChecksum", "deleteButtonClicked"],
26
- setup(r, { expose: D, emit: T }) {
27
- const c = n([]), { formValues: m } = z(), o = n(null), u = n(null);
27
+ setup(n, { expose: T, emit: D }) {
28
+ const c = r([]), { formValues: m } = z(), o = r(null), u = r(null);
28
29
  P(async () => {
29
- const t = A().appContext.app.config.globalProperties.$env;
30
+ const l = E().appContext.app.config.globalProperties.$env;
30
31
  try {
31
- const e = await M(t.api.baseUrl);
32
- c.value = e.map((p) => ({
33
- "@value": p.value,
34
- label: p.label,
32
+ const e = await M(l.api.baseUrl);
33
+ c.value = e.map((f) => ({
34
+ "@value": f.value,
35
+ label: f.label,
35
36
  selected: !1,
36
- uri: p.resource
37
+ uri: f.resource
37
38
  }));
38
39
  } catch (e) {
39
40
  console.error("Failed to load checksum algorithms:", e);
40
41
  }
41
42
  });
42
- const s = r, i = n(s.checksumText);
43
- n([]);
44
- const a = n(s.checksumDropdownText), h = T;
45
- let k = "";
46
- const y = () => {
47
- const l = i.value && i.value.trim() !== "", t = a.value && a.value.trim() !== "";
43
+ const s = n, i = r(s.checksumText);
44
+ r([]);
45
+ const a = r(s.checksumDropdownText), V = D;
46
+ let x = "";
47
+ const p = () => {
48
+ const t = i.value && i.value.trim() !== "", l = a.value && a.value.trim() !== "";
48
49
  let e = !1;
49
- return l || t ? (l ? u.value = null : (u.value = "Prüfsumme ist erforderlich", e = !0), t ? o.value = null : (o.value = "Algorithmus ist erforderlich", e = !0)) : (u.value = null, o.value = null), !e;
50
- }, C = () => !y(), F = (l) => {
51
- i.value = l.target.value, h(
50
+ return t || l ? (t ? u.value = null : (u.value = "Prüfsumme ist erforderlich", e = !0), l ? o.value = null : (o.value = "Algorithmus ist erforderlich", e = !0)) : (u.value = null, o.value = null), !e;
51
+ }, F = () => !p(), S = (t) => {
52
+ i.value = t.target.value, V(
52
53
  "addChecksum",
53
54
  i.value,
54
55
  a.value,
55
56
  s.distributionId
56
- );
57
- }, S = (l) => {
58
- var t;
59
- a.value = l, k = ((t = c.value.find((e) => e["@value"] === l)) == null ? void 0 : t.uri) || "", h(
57
+ ), p();
58
+ }, A = (t) => {
59
+ var l;
60
+ a.value = t, x = ((l = c.value.find((e) => e["@value"] === t)) == null ? void 0 : l.uri) || "", V(
60
61
  "addChecksum",
61
62
  i.value,
62
63
  a.value,
63
64
  s.distributionId,
64
- k
65
- );
65
+ x
66
+ ), p();
66
67
  };
67
- g(
68
+ C(
68
69
  () => s.checksumDropdownText,
69
- (l) => {
70
- a.value = l;
70
+ (t) => {
71
+ a.value = t;
71
72
  }
72
- ), g(
73
+ ), C(
73
74
  () => s.checksumText,
74
- (l) => {
75
- i.value = l;
75
+ (t) => {
76
+ i.value = t;
76
77
  }
77
78
  );
78
79
  const _ = () => {
@@ -80,67 +81,73 @@ const q = { class: "dpiV3_LinkAndMetadata" }, H = {
80
81
  }, B = () => {
81
82
  m.value.DistributionSimple["dcat:distribution"][s.distIndex].checksum.title = "", i.value = "", u.value = null;
82
83
  };
83
- return D({
84
- validateAllItems: C
85
- }), (l, t) => (v(), f("div", q, [
86
- d(O, {
87
- onInput: t[0] || (t[0] = (e) => F(e)),
88
- modelValue: i.value,
89
- "onUpdate:modelValue": t[1] || (t[1] = (e) => i.value = e),
90
- addOnText: !1,
91
- datePicker: !1,
92
- infoIcon: !1,
93
- placeholder: "Bitte Prüfsumme eingeben...",
94
- preIcon: !1,
95
- inputFieldSize: "large",
96
- initialHintText: !1,
97
- label: "Prüfsumme",
98
- showEndIcon: !1,
99
- defaultInput: !r.showDeleteButton,
100
- onDeleteButtonClicked: B,
101
- class: E({ dpiV3_Space3: r.showDeleteButton })
102
- }, null, 8, ["modelValue", "defaultInput", "class"]),
103
- u.value ? (v(), f("div", H, [
104
- d(b(w), {
105
- size: 16,
106
- weight: "fill"
107
- }),
108
- V("span", W, I(u.value), 1)
109
- ])) : x("", !0),
110
- d(N, {
111
- "onUpdate:modelValue": [
112
- t[2] || (t[2] = (e) => S(e)),
113
- t[3] || (t[3] = (e) => a.value = e)
114
- ],
115
- dropdownWidth: "large",
116
- type: "inputField",
117
- modelValue: a.value,
118
- inputFieldProps: {
84
+ return T({
85
+ validateAllItems: F
86
+ }), (t, l) => (h(), v("div", {
87
+ class: k(["dpiV3_LinkAndMetadata", { dpiV3_docAllAsCard: n.asCard }])
88
+ }, [
89
+ g("div", {
90
+ class: k(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: n.asCard }])
91
+ }, [
92
+ d(q, {
93
+ onInput: l[0] || (l[0] = (e) => S(e)),
94
+ modelValue: i.value,
95
+ "onUpdate:modelValue": l[1] || (l[1] = (e) => i.value = e),
119
96
  addOnText: !1,
120
- initialHintText: !1,
121
97
  datePicker: !1,
122
98
  infoIcon: !1,
99
+ placeholder: "Bitte Prüfsumme eingeben...",
123
100
  preIcon: !1,
124
- label: "Algorithmus",
125
- dropdown_dpiV3: !0,
126
- placeholder: "Geben Sie den Algorithmus ein...",
127
101
  inputFieldSize: "large",
102
+ initialHintText: !1,
103
+ label: "Prüfsumme",
104
+ showEndIcon: !1,
105
+ defaultInput: !0,
106
+ onDeleteButtonClicked: B,
107
+ class: k({ dpiV3_Space3: n.showDeleteButton })
108
+ }, null, 8, ["modelValue", "class"]),
109
+ u.value ? (h(), v("div", U, [
110
+ d(I(y), {
111
+ size: 16,
112
+ weight: "fill"
113
+ }),
114
+ g("span", W, w(u.value), 1)
115
+ ])) : b("", !0),
116
+ d(N, {
117
+ "onUpdate:modelValue": [
118
+ l[2] || (l[2] = (e) => A(e)),
119
+ l[3] || (l[3] = (e) => a.value = e)
120
+ ],
121
+ dropdownWidth: "large",
122
+ type: "inputField",
128
123
  modelValue: a.value,
129
- defaultInput: !r.showDeleteButton
130
- },
131
- data: c.value,
132
- onDeleteDropdownField: _
133
- }, null, 8, ["modelValue", "inputFieldProps", "data"]),
134
- o.value ? (v(), f("div", G, [
135
- d(b(w), {
124
+ inputFieldProps: {
125
+ addOnText: !1,
126
+ initialHintText: !1,
127
+ datePicker: !1,
128
+ infoIcon: !1,
129
+ preIcon: !1,
130
+ label: "Algorithmus",
131
+ dropdown_dpiV3: !0,
132
+ placeholder: "Geben Sie den Algorithmus ein...",
133
+ inputFieldSize: "large",
134
+ modelValue: a.value,
135
+ defaultInput: !0
136
+ },
137
+ data: c.value,
138
+ onDeleteDropdownField: _
139
+ }, null, 8, ["modelValue", "inputFieldProps", "data"])
140
+ ], 2),
141
+ o.value ? (h(), v("div", H, [
142
+ d(I(y), {
136
143
  size: 16,
137
144
  weight: "fill"
138
145
  }),
139
- V("span", L, I(o.value), 1)
140
- ])) : x("", !0)
141
- ]));
146
+ g("span", G, w(o.value), 1)
147
+ ])) : b("", !0)
148
+ ], 2));
142
149
  }
143
- }, ee = /* @__PURE__ */ U($, [["__scopeId", "data-v-a8f1bd35"]]);
150
+ }, Z = /* @__PURE__ */ O(L, [["__scopeId", "data-v-a3888031"]]);
144
151
  export {
145
- ee as default
152
+ Z as default
146
153
  };