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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/DPIMenu.vue.js +2 -2
  3. package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1 -1
  4. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +58 -53
  5. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +88 -68
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +11 -10
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +2 -2
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +101 -76
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +11 -11
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +444 -355
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +64 -28
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +108 -74
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +17 -22
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +130 -77
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +122 -85
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +111 -74
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +170 -99
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js +7 -10
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +110 -52
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +65 -86
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +29 -28
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +159 -103
  24. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsModal.vue.js +48 -48
  25. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +566 -207
  26. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +100 -53
  27. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +43 -89
  28. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +329 -100
  29. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +43 -26
  30. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +70 -38
  31. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +181 -107
  32. package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +19 -14
  33. package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +1 -1
  34. package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
  35. package/dist/data-provider-interface/components/ContactPage.vue.js +148 -100
  36. package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +32 -32
  37. package/dist/data-provider-interface/components/DistLicense.vue.js +198 -99
  38. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +950 -833
  39. package/dist/data-provider-interface/components/Dropup.vue.js +6 -6
  40. package/dist/data-provider-interface/components/HVDPage.vue.js +107 -85
  41. package/dist/data-provider-interface/components/InfoSlot.vue.js +5 -5
  42. package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +89 -46
  43. package/dist/data-provider-interface/components/PublisherPage.vue.js +111 -81
  44. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +314 -260
  45. package/dist/data-provider-interface/components/TempResPage.vue.js +267 -187
  46. package/dist/data-provider-interface/components/TempResPageInModal.vue.js +392 -0
  47. package/dist/data-provider-interface/components/TitelPage.vue.js +4 -4
  48. package/dist/data-provider-interface/components/UpdateDate.vue.js +33 -29
  49. package/dist/data-provider-interface/components/dpiV3Description.vue.js +7 -6
  50. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +397 -244
  51. package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +1 -1
  52. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +477 -96
  53. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +104 -152
  54. package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +9 -2
  55. package/dist/data-provider-interface/store/modules/authStore.js +11 -11
  56. package/dist/data-provider-interface/views/DraftsPage.vue.js +3 -3
  57. package/dist/data-provider-interface/views/InputPage.vue.js +384 -758
  58. package/dist/styles/_dpi.scss +1614 -0
  59. package/dist/styles/_maps.scss +24 -0
  60. package/dist/styles/_variables.scss +973 -0
  61. package/package.json +28 -19
  62. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +0 -46
@@ -1,4 +1,4 @@
1
- import { createElementBlock as o, createCommentVNode as p, openBlock as a, createElementVNode as n, createTextVNode as l, toDisplayString as d, Fragment as u, renderList as c, createBlock as i, resolveDynamicComponent as m, normalizeClass as g, withCtx as y } from "vue";
1
+ import { createElementBlock as o, createCommentVNode as p, openBlock as a, createElementVNode as n, createTextVNode as d, toDisplayString as l, Fragment as u, renderList as c, createBlock as i, resolveDynamicComponent as m, normalizeClass as g, withCtx as y } from "vue";
2
2
  /* empty css */
3
3
  import _ from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const h = {
@@ -25,15 +25,15 @@ const h = {
25
25
  class: "btn-group dropup"
26
26
  }, k = {
27
27
  type: "button",
28
- class: "dpi-menu-dropup-btn btn btn-default dropdown-toggle",
29
- "data-toggle": "dropdown",
28
+ class: "dpi-menu-dropup-btn btn btn-link dropdown-toggle",
29
+ "data-bs-toggle": "dropdown",
30
30
  "aria-haspopup": "true",
31
31
  "aria-expanded": "false"
32
32
  }, b = { class: "dropdown-menu" }, C = ["data-cy"];
33
33
  function w(r, s, t, B, D, N) {
34
34
  return t.show && !t.isCatalog || t.show && t.isCatalog && t.isOperator ? (a(), o("div", f, [
35
35
  n("button", k, [
36
- l(d(r.$t("message.dataupload.menu." + t.groupName)), 1),
36
+ d(l(r.$t("message.dataupload.menu." + t.groupName)), 1),
37
37
  s[0] || (s[0] = n("span", { class: "caret" }, null, -1))
38
38
  ]),
39
39
  n("ul", b, [
@@ -48,7 +48,7 @@ function w(r, s, t, B, D, N) {
48
48
  onClick: (v) => e.handler ? e.handler() : null
49
49
  }, {
50
50
  default: y(() => [
51
- l(d(r.$t("message.dataupload.menu." + e.name)), 1)
51
+ d(l(r.$t("message.dataupload.menu." + e.name)), 1)
52
52
  ]),
53
53
  _: 2
54
54
  }, 1032, ["class", "to", "href", "onClick"]))
@@ -56,7 +56,7 @@ function w(r, s, t, B, D, N) {
56
56
  ])
57
57
  ])) : p("", !0);
58
58
  }
59
- const E = /* @__PURE__ */ _(h, [["render", w], ["__scopeId", "data-v-5be20074"]]);
59
+ const E = /* @__PURE__ */ _(h, [["render", w], ["__scopeId", "data-v-1ccdad48"]]);
60
60
  export {
61
61
  E as default
62
62
  };
@@ -1,106 +1,128 @@
1
- import { ref as i, computed as D, onMounted as P, createElementBlock as m, openBlock as f, createElementVNode as o, createCommentVNode as C, createVNode as v, toDisplayString as d, unref as p, getCurrentInstance as H } from "vue";
2
- import { useI18n as I } from "vue-i18n";
3
- import { getHvdCategories as x } from "../HappyFlowComponents/services/dpiV3_apis.js";
1
+ import { ref as n, computed as y, watch as T, onMounted as $, createElementBlock as D, openBlock as g, createElementVNode as s, createCommentVNode as B, createBlock as E, toDisplayString as v, createVNode as P, unref as f, getCurrentInstance as O } from "vue";
2
+ import { useI18n as W } from "vue-i18n";
3
+ import { getHvdCategories as K } from "../HappyFlowComponents/services/dpiV3_apis.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import k from "../HappyFlowComponents/ui/SwitchV3.vue.js";
7
- import F from "../HappyFlowComponents/ui/Dropdown.vue.js";
8
- import { PhWarning as T } from "@phosphor-icons/vue";
6
+ import N from "../HappyFlowComponents/ui/SwitchV3.vue.js";
7
+ import j from "../HappyFlowComponents/ui/Dropdown.vue.js";
8
+ import { PhWarning as z } from "@phosphor-icons/vue";
9
+ import { useFormValues as L } from "../composables/useDpiFormValues.js";
9
10
  /* empty css */
10
- import $ from "../../_virtual/_plugin-vue_export-helper.js";
11
- const W = { class: "V3-typography" }, B = { class: "dpiV3_Frame_831" }, E = { class: "dpiV3_Frame_840" }, K = { class: "dpiV3_title" }, N = { class: "dpiV3_intro copy-large-regular" }, O = { class: "dpiV3_Frame_830" }, z = { class: "dpiV3_Switch" }, L = { class: "dpiV3_Switch_Label copy-large-semi-bold" }, M = { class: "dpiV3_Sub_Info copy-large-regular" }, U = {
11
+ import M from "../../_virtual/_plugin-vue_export-helper.js";
12
+ const U = { class: "V3-typography" }, A = { class: "dpiV3_Frame_831" }, R = { class: "dpiV3_Frame_840" }, q = { class: "dpiV3_title" }, G = { class: "dpiV3_intro copy-large-regular" }, J = { class: "dpiV3_Frame_830" }, Q = { class: "dpiV3_Switch" }, X = { class: "dpiV3_Switch_Label copy-large-semi-bold" }, Y = { class: "dpiV3_Sub_Info copy-large-regular" }, Z = {
12
13
  key: 0,
13
14
  class: "dpiV3_errormsgWrapper"
14
- }, j = {
15
+ }, ee = {
15
16
  __name: "HVDPage",
16
17
  props: {
17
18
  context: Object
18
19
  },
19
- setup(g) {
20
- const { t: A } = I(), s = i(!1), r = i(""), _ = i([]), h = i(null), c = i([]);
21
- let l = i([{ isValid: !0 }]);
22
- const V = (e) => {
23
- s.value = !e, s.value ? (l.value[0] = { isValid: !1 }, r.value = "") : (l.value[0] = { isValid: !0 }, r.value = ""), console.log("switchStateValue: ", s.value);
24
- }, u = g;
25
- u.context.node.value.length === 0 && u.context.node.input(l.value);
26
- const b = D(
27
- () => c.value.map((e) => ({
28
- "@value": e.label,
29
- selected: !1
30
- }))
31
- ), w = (e) => {
32
- const t = c.value.find(
33
- (a) => a.label === e.target.innerHTML
20
+ setup(ae, { expose: w }) {
21
+ const { t: le } = W(), { formValues: t } = L(), i = n(!1), o = n(""), S = n([]), H = n(null), u = n([]);
22
+ let l = n([{ isValid: !0 }]);
23
+ Object.keys(t.value.Discoverability.hvdPage).length === 0 && (t.value.Discoverability.hvdPage = l.value);
24
+ const C = y(() => u.value.map((a) => ({
25
+ "@value": a.label,
26
+ selected: !1
27
+ }))), k = () => {
28
+ i.value = !i.value, i.value ? (l.value[0] = { isValid: "unset" }, o.value = "", t.value.Discoverability.hvdPage = [{ isValid: "unset" }]) : (t.value.Discoverability.hvdPage = [{ isValid: !0 }], l.value[0] = { isValid: !0 }, o.value = ""), console.log("switchStateValue: ", i.value), console.log("validation state: ", l.value[0].isValid);
29
+ }, I = (e) => {
30
+ const a = u.value.find(
31
+ (r) => r.label === e.target.innerHTML
34
32
  );
35
- u.context.node.input([
36
- { isValid: !0, label: t.label, uri: t.uri }
37
- ]), console.log(t);
38
- }, S = async () => {
33
+ a && (l.value[0] = {
34
+ isValid: !0,
35
+ label: a.label,
36
+ uri: a.uri
37
+ }, t.value.Discoverability.hvdPage = [
38
+ { isValid: !0, label: a.label, uri: a.uri }
39
+ ], console.log("HVD Category selected:", a));
40
+ };
41
+ T(o, (e) => {
42
+ i.value && e === "" && (l.value[0].isValid = !1, t.value.Discoverability.hvdPage = [{ isValid: !1 }], console.log(l));
43
+ });
44
+ const F = y(() => {
45
+ var e, a;
46
+ return i.value ? ((e = l.value[0]) == null ? void 0 : e.isValid) === !0 && ((a = l.value[0]) == null ? void 0 : a.label) && o.value !== "" : !0;
47
+ });
48
+ w({
49
+ validateHvdSelection: () => {
50
+ var e;
51
+ return i.value && !(o.value !== "" && ((e = l.value[0]) == null ? void 0 : e.isValid) === !0) ? (l.value[0].isValid = !1, t.value.Discoverability.hvdPage = [{ isValid: !1 }], !1) : (l.value[0].isValid = !0, !0);
52
+ },
53
+ canProceed: F
54
+ });
55
+ const x = async () => {
39
56
  try {
40
- const e = H().appContext.app.config.globalProperties.$env, a = (await x(e.api.baseUrl)).sort(
41
- (n, y) => n.pref_label.de.localeCompare(y.pref_label.de)
57
+ const e = O().appContext.app.config.globalProperties.$env, r = (await K(e.api.baseUrl)).sort(
58
+ (d, c) => d.pref_label.de.localeCompare(c.pref_label.de, "de")
42
59
  );
43
- _.value = a, c.value = a.map((n) => ({
44
- label: n.pref_label.de,
45
- uri: n.resource
60
+ S.value = r, u.value = r.map((d) => ({
61
+ label: d.pref_label.de,
62
+ uri: d.resource
46
63
  }));
47
64
  } catch (e) {
48
- console.error("Error in component:", e), h.value = e;
65
+ console.error("Error in component:", e), H.value = e;
49
66
  }
50
67
  };
51
- return P(() => {
52
- S();
53
- }), (e, t) => (f(), m("div", W, [
54
- o("div", B, [
55
- o("div", E, [
56
- o("h4", K, d(e.$t("message.dataupload.datasets.hvdPage.title")), 1),
57
- o("div", N, d(e.$t("message.dataupload.datasets.hvdPage.intro-text")), 1),
58
- o("div", O, [
59
- o("div", z, [
60
- v(k, {
61
- onSwitchToggled: t[0] || (t[0] = (a) => p(l)[0].isValid === !0 ? V(s.value) : (p(l)[0].isValid = !0, s.value = !s.value)),
62
- hasIcon: !1,
63
- defaultChecked: !1,
64
- disabled: !1
65
- })
68
+ return $(() => {
69
+ x();
70
+ }), (e, a) => {
71
+ var r, d, c, h, V, m, _, b;
72
+ return g(), D("div", U, [
73
+ s("div", A, [
74
+ s("div", R, [
75
+ s("h4", q, v(e.$t("message.dataupload.datasets.hvdPage.title")), 1),
76
+ s("div", G, v(e.$t("message.dataupload.datasets.hvdPage.intro-text")), 1),
77
+ s("div", J, [
78
+ s("div", Q, [
79
+ P(N, {
80
+ onSwitchToggled: k,
81
+ hasIcon: !1,
82
+ defaultChecked: !1,
83
+ disabled: !1
84
+ })
85
+ ]),
86
+ s("div", X, v(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
66
87
  ]),
67
- o("div", L, d(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
88
+ s("div", Y, v(e.$t("message.dataupload.datasets.hvdPage.sub-info")), 1),
89
+ (g(), E(j, {
90
+ key: u.value.length,
91
+ dropdownWidth: "large",
92
+ isDisabled: !i.value,
93
+ type: "inputField",
94
+ modelValue: o.value,
95
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => o.value = p),
96
+ inputFieldProps: {
97
+ isDisabled: !i.value,
98
+ addOnText: !1,
99
+ initialHintText: !1,
100
+ datePicker: !1,
101
+ infoIcon: !1,
102
+ preIcon: !1,
103
+ label: "HVD-Kategorie",
104
+ dropdown_dpiV3: !0,
105
+ placeholder: "Wählen Sie eine HVD-Kategorie",
106
+ inputFieldSize: "large",
107
+ modelValue: o.value,
108
+ showError: ((h = (c = (d = (r = f(t)) == null ? void 0 : r.Discoverability) == null ? void 0 : d.hvdPage) == null ? void 0 : c[0]) == null ? void 0 : h.isValid) === !1
109
+ },
110
+ data: C.value,
111
+ onClick: a[1] || (a[1] = (p) => I(p))
112
+ }, null, 8, ["isDisabled", "modelValue", "inputFieldProps", "data"]))
68
113
  ]),
69
- o("div", M, d(e.$t("message.dataupload.datasets.hvdPage.sub-info")), 1),
70
- v(F, {
71
- dropdownWidth: "large",
72
- isDisabled: !s.value,
73
- type: "inputField",
74
- modelValue: r.value,
75
- "onUpdate:modelValue": t[1] || (t[1] = (a) => r.value = a),
76
- inputFieldProps: {
77
- isDisabled: !s.value,
78
- addOnText: !1,
79
- initialHintText: !1,
80
- datePicker: !1,
81
- infoIcon: !1,
82
- preIcon: !1,
83
- label: "HVD-Kategorie",
84
- dropdown_dpiV3: !0,
85
- placeholder: "Wählen Sie eine HVD-Kategorie",
86
- inputFieldSize: "large",
87
- modelValue: r.value
88
- },
89
- data: b.value,
90
- onClick: t[2] || (t[2] = (a) => w(a))
91
- }, null, 8, ["isDisabled", "modelValue", "inputFieldProps", "data"])
92
- ]),
93
- p(l).find((a) => a.isValid === !1) ? (f(), m("div", U, [
94
- v(p(T), {
95
- size: 16,
96
- weight: "fill"
97
- }),
98
- t[3] || (t[3] = o("span", { class: "copy-mini-regular" }, "Bitte wählen Sie eine HVD-Kategorie aus, bevor Sie fortfahren.", -1))
99
- ])) : C("", !0)
100
- ])
101
- ]));
114
+ ((b = (_ = (m = (V = f(t)) == null ? void 0 : V.Discoverability) == null ? void 0 : m.hvdPage) == null ? void 0 : _[0]) == null ? void 0 : b.isValid) === !1 ? (g(), D("div", Z, [
115
+ P(f(z), {
116
+ size: 16,
117
+ weight: "fill"
118
+ }),
119
+ a[2] || (a[2] = s("span", { class: "copy-mini-regular" }, "Bitte wählen Sie eine HVD-Kategorie aus, bevor Sie fortfahren.", -1))
120
+ ])) : B("", !0)
121
+ ])
122
+ ]);
123
+ };
102
124
  }
103
- }, ae = /* @__PURE__ */ $(j, [["__scopeId", "data-v-9c7f317c"]]);
125
+ }, fe = /* @__PURE__ */ M(ee, [["__scopeId", "data-v-456bbea4"]]);
104
126
  export {
105
- ae as default
127
+ fe as default
106
128
  };
@@ -43,7 +43,7 @@ const _ = "collapsed", y = {
43
43
  t.parentNode.classList.toggle(_), this.isCollapsed = !this.isCollapsed;
44
44
  }
45
45
  }
46
- }, x = ["for"], b = { class: "" }, C = { class: "form-label" }, k = {
46
+ }, b = ["for"], x = { class: "" }, C = { class: "form-label" }, k = {
47
47
  key: 0,
48
48
  class: "infoButton"
49
49
  }, S = ["title"], v = {
@@ -60,22 +60,22 @@ function E(t, o, e, n, L, c) {
60
60
  "data-cy": "collapsible-input-group-button",
61
61
  onClick: o[0] || (o[0] = g((...u) => c.toggleCollapse && c.toggleCollapse(...u), ["prevent", "stop"]))
62
62
  }, [
63
- i("div", b, [
63
+ i("div", x, [
64
64
  i("span", C, d(e.context.label), 1),
65
65
  e.info ? (r(), l("a", k, [
66
66
  i("i", {
67
67
  class: "material-icons",
68
68
  title: e.info,
69
- "data-toggle": "tooltip",
69
+ "data-bs-toggle": "tooltip",
70
70
  "data-placement": "top"
71
71
  }, "info", 8, S)
72
72
  ])) : p("", !0)
73
73
  ]),
74
74
  e.context.isSubField() ? p("", !0) : (r(), l("i", v, d(t.isCollapsed ? "expand_more" : "expand_less"), 1))
75
75
  ])
76
- ], 8, x);
76
+ ], 8, b);
77
77
  }
78
- const I = /* @__PURE__ */ h(y, [["render", E], ["__scopeId", "data-v-202359cc"]]);
78
+ const I = /* @__PURE__ */ h(y, [["render", E], ["__scopeId", "data-v-1ec93458"]]);
79
79
  export {
80
80
  I as default
81
81
  };
@@ -1,81 +1,124 @@
1
- import { ref as n, getCurrentInstance as V, createElementBlock as c, openBlock as u, createElementVNode as i, toDisplayString as p, createVNode as f, createCommentVNode as y, unref as r } from "vue";
2
- import x from "../HappyFlowComponents/ui/Dropdown.vue.js";
3
- import { filterGeocodingURIs as P } from "../HappyFlowComponents/services/dpiV3_apis.js";
4
- import { PhMagnifyingGlass as G } from "@phosphor-icons/vue";
1
+ import { ref as n, getCurrentInstance as k, computed as L, createElementBlock as v, openBlock as g, createElementVNode as s, toDisplayString as I, createVNode as G, createCommentVNode as b, unref as f } from "vue";
2
+ import R from "../HappyFlowComponents/ui/Dropdown.vue.js";
3
+ import { filterGeocodingURIs as w } from "../HappyFlowComponents/services/dpiV3_apis.js";
4
+ import { PhMagnifyingGlass as P } from "@phosphor-icons/vue";
5
+ import { useFormValues as S } from "../composables/useDpiFormValues.js";
5
6
  /* empty css */
6
- import w from "../../_virtual/_plugin-vue_export-helper.js";
7
- import { useEditModeInfo as S } from "../composables/useDpiEditMode.js";
8
- const T = { class: "dpiV3InnerComponentWrap" }, U = { class: "copy-large-regular" }, k = { class: "dropdown-container" }, E = {
7
+ import C from "../../_virtual/_plugin-vue_export-helper.js";
8
+ import { useEditModeInfo as x } from "../composables/useDpiEditMode.js";
9
+ const A = { class: "dpiV3InnerComponentWrap" }, E = { class: "copy-large-regular" }, K = { class: "dropdown-container" }, T = {
9
10
  key: 0,
10
11
  class: "empty-state-message"
11
- }, C = {
12
+ }, D = {
13
+ key: 1,
14
+ class: "validation-error"
15
+ }, F = {
12
16
  __name: "PolGeoUriPage",
13
17
  props: {
14
18
  context: Object
15
19
  },
16
- setup(g) {
17
- const { isEditMode: m } = S();
18
- let o = n([]), v = V().appContext.app.config.globalProperties.$env, s;
19
- const a = n(!1), l = n(!1), b = n(""), d = g;
20
- m.value || d.context.node.input([{ isValid: !0 }]);
21
- const h = async (e) => {
22
- clearTimeout(s), b.value = e, s = setTimeout(async () => {
20
+ setup(B) {
21
+ const { isEditMode: y } = x(), { formValues: t } = S();
22
+ let o = n([]), _ = k().appContext.app.config.globalProperties.$env, m;
23
+ const l = n(!1), d = n(!1), c = n(""), r = n(!1), u = L(() => c.value && d.value && !l.value && o.value.length === 0 && !r.value);
24
+ y.value || (t.value.Covering["dcatde:politicalGeocodingURI"] = [
25
+ { isValid: !0 }
26
+ ]);
27
+ const U = async (e) => {
28
+ clearTimeout(m), c.value = e, r.value = !1, m = setTimeout(async () => {
23
29
  if (e !== "")
24
30
  try {
25
- a.value = !0, l.value = !0, o.value = await P(e, v.api.baseUrl);
26
- } catch (t) {
27
- console.log("Error fetching geocoding data:", t), o.value = [];
31
+ l.value = !0, d.value = !0, o.value = await w(e, _.api.baseUrl), h();
32
+ } catch (a) {
33
+ console.log("Error fetching geocoding data:", a), o.value = [], h();
28
34
  } finally {
29
- a.value = !1;
35
+ l.value = !1;
30
36
  }
31
37
  else
32
- o.value = [], l.value = !1;
38
+ o.value = [], d.value = !1, r.value = !1, t.value.Covering["dcatde:politicalGeocodingURI"] = [
39
+ { isValid: !0 }
40
+ ];
33
41
  }, 500);
34
- }, _ = (e, t) => {
35
- d.context.node.input([{
36
- isValid: !0,
37
- uri: e.resource,
38
- id: e.id,
39
- label: e.alt_label.de,
40
- inVoc: t
41
- }]);
42
+ }, h = () => {
43
+ u.value, t.value.Covering["dcatde:politicalGeocodingURI"] = [
44
+ { isValid: !0 }
45
+ ];
46
+ }, V = (e, a) => {
47
+ r.value = !0, t.value.Covering["dcatde:politicalGeocodingURI"] = [
48
+ {
49
+ isValid: !0,
50
+ uri: e.resource,
51
+ id: e.id,
52
+ label: e.alt_label.de,
53
+ inVoc: a
54
+ }
55
+ ];
56
+ const p = e.resource.split("/").slice(-2, -1)[0];
57
+ let i = "";
58
+ switch (p) {
59
+ case "districtKey":
60
+ i = "http://dcat-ap.de/def/politicalGeocoding/Level/administrativeDistrict";
61
+ break;
62
+ case "stateKey":
63
+ i = "http://dcat-ap.de/def/politicalGeocoding/Level/state";
64
+ break;
65
+ case "regionalKey":
66
+ i = "http://dcat-ap.de/def/politicalGeocoding/Level/european";
67
+ break;
68
+ case "municipalAssociationKey":
69
+ i = "http://dcat-ap.de/def/politicalGeocoding/Level/federal";
70
+ break;
71
+ case "municipalityKey":
72
+ i = "http://dcat-ap.de/def/politicalGeocoding/Level/municipality";
73
+ break;
74
+ }
75
+ t.value.Additionals["dcatde:politicalGeocodingLevelURI"] === void 0 ? (t.value.Additionals["dcatde:politicalGeocodingLevelURI"] = [], t.value.Additionals["dcatde:politicalGeocodingLevelURI"].push({
76
+ "@id": i
77
+ })) : t.value.Additionals["dcatde:politicalGeocodingLevelURI"] = [
78
+ { "@id": i }
79
+ ];
42
80
  };
43
- return (e, t) => (u(), c("div", T, [
44
- i("h4", null, p(e.$t("message.dataupload.datasets.dcatde:politicalGeocodingURI.title")), 1),
45
- i("div", U, p(e.$t("message.dataupload.datasets.dcatde:politicalGeocodingURI.description")), 1),
46
- i("div", k, [
47
- f(x, {
81
+ return (e, a) => (g(), v("div", A, [
82
+ s("h4", null, I(e.$t("message.dataupload.datasets.dcatde:politicalGeocodingURI.title")), 1),
83
+ s("div", E, I(e.$t(
84
+ "message.dataupload.datasets.dcatde:politicalGeocodingURI.description"
85
+ )), 1),
86
+ s("div", K, [
87
+ G(R, {
48
88
  dropdownWidth: "large",
49
89
  type: "inputField",
50
- onInput: t[0] || (t[0] = (I) => h(I)),
90
+ onInput: a[0] || (a[0] = (p) => U(p)),
51
91
  inputFieldProps: {
52
92
  addOnText: !1,
53
93
  initialHintText: !1,
54
94
  datePicker: !1,
55
95
  infoIcon: !1,
56
- preIcon: !1,
96
+ preIcon: !0,
97
+ showEndIcon: !1,
57
98
  label: "Geopolitische Abdeckung",
58
99
  dropdown_dpiV3: !0,
59
100
  placeholder: "Geben Sie die geopolitische Abdeckung ein..",
60
101
  inputFieldSize: "large",
61
- autocomplete: "true"
102
+ autocomplete: "true",
103
+ error: u.value
62
104
  },
63
- onValueSent: _,
64
- data: r(o),
105
+ onValueSent: V,
106
+ data: f(o),
65
107
  multi: "true",
66
108
  autocomplete: !0,
67
109
  buttonText: "Dropdown",
68
110
  text: "Dropdown",
69
- loading: a.value
70
- }, null, 8, ["data", "loading"]),
71
- l.value && !a.value && r(o).length === 0 ? (u(), c("div", E, [
72
- f(r(G), { size: 16 }),
73
- t[1] || (t[1] = i("span", null, "Keine Ergebnisse gefunden. Bitte versuchen Sie einen anderen Suchbegriff.", -1))
74
- ])) : y("", !0)
111
+ loading: l.value
112
+ }, null, 8, ["inputFieldProps", "data", "loading"]),
113
+ d.value && !l.value && f(o).length === 0 ? (g(), v("div", T, [
114
+ G(f(P), { size: 16 }),
115
+ a[1] || (a[1] = s("span", null, "Keine Ergebnisse gefunden. Bitte versuchen Sie einen anderen Suchbegriff.", -1))
116
+ ])) : b("", !0),
117
+ u.value && c.value ? (g(), v("div", D, " Bitte wählen Sie einen gültigen Wert aus der Liste aus. ")) : b("", !0)
75
118
  ])
76
119
  ]));
77
120
  }
78
- }, z = /* @__PURE__ */ w(C, [["__scopeId", "data-v-c2bfbeff"]]);
121
+ }, q = /* @__PURE__ */ C(F, [["__scopeId", "data-v-cfb18351"]]);
79
122
  export {
80
- z as default
123
+ q as default
81
124
  };