@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,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,129 @@
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 P, createElementVNode as s, createCommentVNode as E, createVNode as f, toDisplayString as c, unref as g, getCurrentInstance as O } from "vue";
2
+ import { useI18n as W } from "vue-i18n";
3
+ import { getHvdCategories as B } 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 K from "../HappyFlowComponents/ui/SwitchV3.vue.js";
7
+ import N from "../HappyFlowComponents/ui/Dropdown.vue.js";
8
+ import { PhWarning as j } from "@phosphor-icons/vue";
9
+ import { useFormValues as z } 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 L from "../../_virtual/_plugin-vue_export-helper.js";
12
+ const M = { class: "V3-typography" }, U = { class: "dpiV3_Frame_831" }, A = { class: "dpiV3_Frame_840" }, R = { class: "dpiV3_title" }, q = { class: "dpiV3_intro copy-large-regular" }, G = { class: "dpiV3_Frame_830" }, J = { class: "dpiV3_Switch" }, Q = { class: "dpiV3_Switch_Label copy-large-semi-bold" }, X = { class: "dpiV3_Sub_Info copy-large-regular" }, Y = {
12
13
  key: 0,
13
14
  class: "dpiV3_errormsgWrapper"
14
- }, j = {
15
+ }, Z = {
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) => ({
20
+ setup(ee, { expose: w }) {
21
+ const { t: ae } = W(), { formValues: t } = z(), i = n(!1), o = n(""), S = n([]), H = n(null), v = 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(
25
+ () => v.value.map((e) => ({
28
26
  "@value": e.label,
29
27
  selected: !1
30
28
  }))
31
- ), w = (e) => {
32
- const t = c.value.find(
33
- (a) => a.label === e.target.innerHTML
29
+ ), I = () => {
30
+ 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);
31
+ }, k = (e) => {
32
+ const a = v.value.find(
33
+ (r) => r.label === e.target.innerHTML
34
34
  );
35
- u.context.node.input([
36
- { isValid: !0, label: t.label, uri: t.uri }
37
- ]), console.log(t);
38
- }, S = async () => {
35
+ a && (l.value[0] = {
36
+ isValid: !0,
37
+ label: a.label,
38
+ uri: a.uri
39
+ }, t.value.Discoverability.hvdPage = [
40
+ { isValid: !0, label: a.label, uri: a.uri }
41
+ ], console.log("HVD Category selected:", a));
42
+ };
43
+ T(o, (e) => {
44
+ i.value && e === "" && (l.value[0].isValid = !1, t.value.Discoverability.hvdPage = [{ isValid: !1 }], console.log(l));
45
+ });
46
+ const F = y(() => {
47
+ var e, a;
48
+ 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;
49
+ });
50
+ w({
51
+ validateHvdSelection: () => {
52
+ var e;
53
+ 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);
54
+ },
55
+ canProceed: F
56
+ });
57
+ const x = async () => {
39
58
  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)
59
+ const e = O().appContext.app.config.globalProperties.$env, r = (await B(e.api.baseUrl)).sort(
60
+ (d, u) => d.pref_label.de.localeCompare(u.pref_label.de)
42
61
  );
43
- _.value = a, c.value = a.map((n) => ({
44
- label: n.pref_label.de,
45
- uri: n.resource
62
+ S.value = r, v.value = r.map((d) => ({
63
+ label: d.pref_label.de,
64
+ uri: d.resource
46
65
  }));
47
66
  } catch (e) {
48
- console.error("Error in component:", e), h.value = e;
67
+ console.error("Error in component:", e), H.value = e;
49
68
  }
50
69
  };
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
- })
70
+ return $(() => {
71
+ x();
72
+ }), (e, a) => {
73
+ var r, d, u, h, V, m, _, b;
74
+ return P(), D("div", M, [
75
+ s("div", U, [
76
+ s("div", A, [
77
+ s("h4", R, c(e.$t("message.dataupload.datasets.hvdPage.title")), 1),
78
+ s("div", q, c(e.$t("message.dataupload.datasets.hvdPage.intro-text")), 1),
79
+ s("div", G, [
80
+ s("div", J, [
81
+ f(K, {
82
+ onSwitchToggled: I,
83
+ hasIcon: !1,
84
+ defaultChecked: !1,
85
+ disabled: !1
86
+ })
87
+ ]),
88
+ s("div", Q, c(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
66
89
  ]),
67
- o("div", L, d(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
90
+ s("div", X, c(e.$t("message.dataupload.datasets.hvdPage.sub-info")), 1),
91
+ f(N, {
92
+ dropdownWidth: "large",
93
+ isDisabled: !i.value,
94
+ type: "inputField",
95
+ modelValue: o.value,
96
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => o.value = p),
97
+ inputFieldProps: {
98
+ isDisabled: !i.value,
99
+ addOnText: !1,
100
+ initialHintText: !1,
101
+ datePicker: !1,
102
+ infoIcon: !1,
103
+ preIcon: !1,
104
+ label: "HVD-Kategorie",
105
+ dropdown_dpiV3: !0,
106
+ placeholder: "Wählen Sie eine HVD-Kategorie",
107
+ inputFieldSize: "large",
108
+ modelValue: o.value,
109
+ showError: ((h = (u = (d = (r = g(t)) == null ? void 0 : r.Discoverability) == null ? void 0 : d.hvdPage) == null ? void 0 : u[0]) == null ? void 0 : h.isValid) === !1
110
+ },
111
+ data: C.value,
112
+ onClick: a[1] || (a[1] = (p) => k(p))
113
+ }, null, 8, ["isDisabled", "modelValue", "inputFieldProps", "data"])
68
114
  ]),
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
- ]));
115
+ ((b = (_ = (m = (V = g(t)) == null ? void 0 : V.Discoverability) == null ? void 0 : m.hvdPage) == null ? void 0 : _[0]) == null ? void 0 : b.isValid) === !1 ? (P(), D("div", Y, [
116
+ f(g(j), {
117
+ size: 16,
118
+ weight: "fill"
119
+ }),
120
+ a[2] || (a[2] = s("span", { class: "copy-mini-regular" }, "Bitte wählen Sie eine HVD-Kategorie aus, bevor Sie fortfahren.", -1))
121
+ ])) : E("", !0)
122
+ ])
123
+ ]);
124
+ };
102
125
  }
103
- }, ae = /* @__PURE__ */ $(j, [["__scopeId", "data-v-9c7f317c"]]);
126
+ }, fe = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-dbd3cce6"]]);
104
127
  export {
105
- ae as default
128
+ fe as default
106
129
  };
@@ -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["dcatapde:politicalGeocodingLevelURI"] === void 0 ? (t.value.Additionals["dcatapde:politicalGeocodingLevelURI"] = [], t.value.Additionals["dcatapde:politicalGeocodingLevelURI"].push({
76
+ "@id": i
77
+ })) : t.value.Additionals["dcatapde: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-c8764ab4"]]);
79
122
  export {
80
- z as default
123
+ q as default
81
124
  };