@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
@@ -1,7 +1,7 @@
1
1
  import o from "./Organisation.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0e1219e7"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c1e08c52"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,62 +1,77 @@
1
- import { defineComponent as V, computed as b, createElementBlock as s, openBlock as a, createElementVNode as t, toDisplayString as e } from "vue";
2
- import "axios";
3
- const k = { class: "dpiV3_organisation" }, y = { class: "dpiV3_organisationInfo" }, x = { class: "dpiV3_organisationData" }, D = {
1
+ import { defineComponent as f, computed as r, createElementBlock as t, openBlock as s, createElementVNode as i, unref as k, Fragment as y, toDisplayString as l } from "vue";
2
+ import { useOrganizationInfo as b } from "../composables/useOrganizationInfo.js";
3
+ import { useTwinbyUser as V } from "../composables/useTwinbyUser.js";
4
+ const T = { class: "dpiV3_organisation" }, I = { class: "dpiV3_organisationInfo" }, O = { key: 0 }, E = { key: 0 }, S = {
5
+ key: 1,
6
+ class: "not-available"
7
+ }, C = { class: "dpiV3_organisationData" }, D = {
4
8
  key: 0,
5
9
  class: "dpiV3_organisationTitle"
6
- }, I = ["src"], T = { key: 1 }, C = { class: "info-wrapper" }, N = { class: "dpiV3_organisationTitle" }, O = { class: "dpiV3_organisationTitle" }, n = "-", E = /* @__PURE__ */ V({
10
+ }, F = ["src"], L = { key: 1 }, w = { class: "info-wrapper" }, x = { class: "dpiV3_organisationTitle" }, z = { key: 0 }, B = {
11
+ key: 1,
12
+ class: "not-available"
13
+ }, N = { key: 2 }, M = {
14
+ key: 3,
15
+ class: "not-available"
16
+ }, P = { class: "dpiV3_organisationTitle" }, U = { key: 0 }, W = {
17
+ key: 1,
18
+ class: "not-available"
19
+ }, H = /* @__PURE__ */ f({
7
20
  __name: "Organisation",
8
- props: {
9
- title: {}
10
- },
11
- setup(h) {
12
- const f = h, i = b(() => ({
13
- title: f.title || "",
14
- logo: "",
15
- address: {
16
- street: "",
17
- postalCode: "",
18
- city: ""
19
- },
20
- contact: {
21
- phoneNumber: "",
22
- email: ""
21
+ setup(j) {
22
+ const { organization: u, authToken: g, startFetchPermissions: h } = V();
23
+ h();
24
+ const { resultEnhanced: o, isLoading: m } = b({
25
+ id: u,
26
+ authToken: g
27
+ }), d = r(
28
+ () => {
29
+ var a, e, p, v;
30
+ return ((e = (a = o.value) == null ? void 0 : a.publisher) == null ? void 0 : e.name) || ((p = o.value) == null ? void 0 : p.title) || ((v = o.value) == null ? void 0 : v.id) || "";
23
31
  }
24
- }));
25
- return (S, o) => {
26
- var l, r, d, p, c, u, _, g, v, m;
27
- return a(), s("div", k, [
28
- o[2] || (o[2] = t("h3", { class: "dpiV3_organisationTitle" }, " Ihre Organisation ", -1)),
29
- o[3] || (o[3] = t("p", { class: "dpiV3_organisationDescription" }, " Wenn Sie die Informationen Ihrer Organisation ändern möchten, kontaktieren Sie uns gerne. ", -1)),
30
- t("div", y, [
31
- t("p", null, e(i.value.title), 1),
32
- t("div", x, [
33
- i.value.logo ? (a(), s("div", D, [
34
- t("img", {
35
- src: i.value.logo,
32
+ ), c = r(
33
+ () => {
34
+ var a, e;
35
+ return ((e = (a = o.value) == null ? void 0 : a.catalogueFavIcon) == null ? void 0 : e[0]) || "";
36
+ }
37
+ ), n = r(() => {
38
+ var a, e;
39
+ return ((e = (a = o.value) == null ? void 0 : a.publisher) == null ? void 0 : e.address) || {};
40
+ }), _ = r(() => {
41
+ var a;
42
+ return ((a = o.value) == null ? void 0 : a.publisher) || {};
43
+ });
44
+ return (a, e) => (s(), t("div", T, [
45
+ e[2] || (e[2] = i("h3", { class: "dpiV3_organisationTitle" }, " Ihre Organisation ", -1)),
46
+ e[3] || (e[3] = i("p", { class: "dpiV3_organisationDescription" }, " Wenn Sie die Informationen Ihrer Organisation ändern möchten, kontaktieren Sie uns gerne. ", -1)),
47
+ i("div", I, [
48
+ k(m) ? (s(), t("p", O, "Lade Organisationsdaten...")) : (s(), t(y, { key: 1 }, [
49
+ d.value ? (s(), t("p", E, l(d.value), 1)) : (s(), t("p", S, " Name nicht verfügbar ")),
50
+ i("div", C, [
51
+ c.value ? (s(), t("div", D, [
52
+ i("img", {
53
+ src: c.value,
36
54
  alt: ""
37
- }, null, 8, I)
38
- ])) : (a(), s("div", T, o[0] || (o[0] = [
39
- t("div", { class: "avatar-circle" }, null, -1)
55
+ }, null, 8, F)
56
+ ])) : (s(), t("div", L, e[0] || (e[0] = [
57
+ i("div", { class: "avatar-circle" }, null, -1)
40
58
  ]))),
41
- t("div", C, [
42
- t("div", N, [
43
- t("p", null, e(((r = (l = i.value) == null ? void 0 : l.address) == null ? void 0 : r.street) || n), 1),
44
- t("p", null, e(((p = (d = i.value) == null ? void 0 : d.address) == null ? void 0 : p.postalCode) || n) + " " + e(((u = (c = i.value) == null ? void 0 : c.address) == null ? void 0 : u.city) || n), 1)
45
- ]),
46
- t("div", O, [
47
- t("p", null, e(((g = (_ = i.value) == null ? void 0 : _.contact) == null ? void 0 : g.phoneNumber) || n), 1),
48
- t("p", null, e(((m = (v = i.value) == null ? void 0 : v.contact) == null ? void 0 : m.email) || n), 1)
59
+ i("div", w, [
60
+ i("div", x, [
61
+ n.value.street ? (s(), t("p", z, l(n.value.street), 1)) : (s(), t("p", B, " Straße nicht verfügbar ")),
62
+ n.value.postalCode || n.value.locality ? (s(), t("p", N, l(n.value.postalCode || "") + " " + l(n.value.locality || ""), 1)) : (s(), t("p", M, " Ort nicht verfügbar "))
49
63
  ]),
50
- o[1] || (o[1] = t("div", { style: { position: "absolute", top: "0", left: "0", width: "320px", height: "100%", "background-color": "var(--blue-30)", "border-radius": "24px", display: "grid", "place-content": "center" } }, [
51
- t("p", null, "Keine Daten verfügbar")
52
- ], -1))
64
+ i("div", P, [
65
+ e[1] || (e[1] = i("p", { class: "not-available" }, " Telefon nicht verfügbar ", -1)),
66
+ _.value.email ? (s(), t("p", U, l(_.value.email), 1)) : (s(), t("p", W, " E-Mail nicht verfügbar "))
67
+ ])
53
68
  ])
54
69
  ])
55
- ])
56
- ]);
57
- };
70
+ ], 64))
71
+ ])
72
+ ]));
58
73
  }
59
74
  });
60
75
  export {
61
- E as default
76
+ H as default
62
77
  };
@@ -1,48 +1,55 @@
1
- import c from "axios";
1
+ import o from "axios";
2
2
  const u = async (a) => {
3
3
  try {
4
4
  let e = `${a}vocabularies/hvd-category`;
5
- return (await c.get(e)).data.result.results;
5
+ return (await o.get(e)).data.result.results;
6
6
  } catch (e) {
7
7
  throw console.error("Error fetching HVD categories:", e), e;
8
8
  }
9
9
  }, i = async (a) => {
10
10
  try {
11
11
  let e = `${a}vocabularies/data-theme`;
12
- return (await c.get(e)).data.result.results;
12
+ return (await o.get(e)).data.result.results;
13
13
  } catch (e) {
14
14
  throw console.error("Error fetching Dataset categories:", e), e;
15
15
  }
16
16
  }, g = async (a) => {
17
+ try {
18
+ let e = `${a}vocabularies/access-right`;
19
+ return (await o.get(e)).data.result.results;
20
+ } catch (e) {
21
+ throw console.error("Error fetching Dataset categories:", e), e;
22
+ }
23
+ }, h = async (a) => {
17
24
  try {
18
25
  let e = `${a}vocabularies/iana-media-types`;
19
- return (await c.get(e, {
26
+ return (await o.get(e, {
20
27
  headers: { Accept: "application/json" }
21
28
  })).data.result;
22
29
  } catch (e) {
23
30
  throw console.error("Error fetching file types:", e), e;
24
31
  }
25
- }, h = async (a) => {
32
+ }, d = async (a) => {
26
33
  try {
27
34
  let e = `${a}vocabularies/file-type`;
28
- return (await c.get(e, {
35
+ return (await o.get(e, {
29
36
  headers: { Accept: "application/json" }
30
37
  })).data.result;
31
38
  } catch (e) {
32
39
  throw console.error("Error fetching file types:", e), e;
33
40
  }
34
- }, d = async (a, e, r) => {
41
+ }, p = async (a, e, r) => {
35
42
  let l = [];
36
43
  try {
37
- let o = `${e}vocabularies/${r}`;
38
- return l = (await c.get(o)).data.result.results, l;
39
- } catch (o) {
40
- throw console.error("Error fetching Dataset categories:", o), o;
44
+ let c = `${e}vocabularies/${r}`;
45
+ return l = (await o.get(c)).data.result.results, l;
46
+ } catch (c) {
47
+ throw console.error("Error fetching Dataset categories:", c), c;
41
48
  }
42
- }, p = async (a) => {
49
+ }, y = async (a) => {
43
50
  try {
44
51
  let e = `${a}vocabularies/planned-availability`;
45
- return (await c.get(e)).data.result.results.map((l) => ({
52
+ return (await o.get(e)).data.result.results.map((l) => ({
46
53
  value: l.id,
47
54
  label: l.pref_label.de,
48
55
  uri: l.resource
@@ -50,21 +57,21 @@ const u = async (a) => {
50
57
  } catch (e) {
51
58
  throw console.error("Error fetching planned availability:", e), e;
52
59
  }
53
- }, y = async (a, e = "de") => {
60
+ }, b = async (a, e = "de") => {
54
61
  try {
55
- let r = `${a}vocabularies/language`, o = (await c.get(r)).data.result.results.map((t) => ({
62
+ let r = `${a}vocabularies/language`, c = (await o.get(r)).data.result.results.map((t) => ({
56
63
  value: t.id,
57
64
  label: `${t.pref_label[e] || t.pref_label.en || t.id} (${t.id})`,
58
65
  uri: t.resource
59
66
  }));
60
- return o.sort((t, s) => t.label.localeCompare(s.label, e)), o;
67
+ return c.sort((t, s) => t.label.localeCompare(s.label, e)), c;
61
68
  } catch (r) {
62
69
  throw console.error("Error fetching languages:", r), r;
63
70
  }
64
- }, b = async (a, e = "de") => {
71
+ }, f = async (a, e = "de") => {
65
72
  try {
66
73
  let r = `${a}vocabularies/licenses`;
67
- return (await c.get(r)).data.result.results.map((t) => {
74
+ return (await o.get(r)).data.result.results.map((t) => {
68
75
  var s;
69
76
  return {
70
77
  value: t.id,
@@ -76,10 +83,10 @@ const u = async (a) => {
76
83
  } catch (r) {
77
84
  throw console.error("Error fetching licenses:", r), r;
78
85
  }
79
- }, f = async (a, e = "de") => {
86
+ }, v = async (a, e = "de") => {
80
87
  try {
81
88
  let r = `${a}vocabularies/adms`;
82
- return (await c.get(r)).data.result.results.filter(
89
+ return (await o.get(r)).data.result.results.filter(
83
90
  (s) => s.in_scheme === "http://purl.org/adms/status/1.0" && s.resource !== "http://purl.org/adms/status/UnderDevelopment"
84
91
  ).map((s) => ({
85
92
  value: s.id,
@@ -89,10 +96,10 @@ const u = async (a) => {
89
96
  } catch (r) {
90
97
  throw console.error("Error fetching dataset status:", r), r;
91
98
  }
92
- }, v = async (a, e = "en") => {
99
+ }, w = async (a, e = "en") => {
93
100
  try {
94
101
  let r = `${a}vocabularies/spdx-checksum-algorithm`;
95
- return (await c.get(r)).data.result.results.map((t) => ({
102
+ return (await o.get(r)).data.result.results.map((t) => ({
96
103
  value: t.id,
97
104
  label: t.pref_label[e] || t.pref_label.en || t.id,
98
105
  resource: t.resource || null
@@ -102,14 +109,15 @@ const u = async (a) => {
102
109
  }
103
110
  };
104
111
  export {
105
- v as getChecksumAlgorithms,
112
+ g as getAccessRights,
113
+ w as getChecksumAlgorithms,
106
114
  i as getDatasetCategories,
107
- f as getDatasetStatus,
108
- g as getFileTypes,
109
- h as getFormatTypes,
115
+ v as getDatasetStatus,
116
+ h as getFileTypes,
117
+ d as getFormatTypes,
110
118
  u as getHvdCategories,
111
- y as getLanguages,
112
- b as getLicenses,
113
- d as getOptionalURIs,
114
- p as getPlannedAvailability
119
+ b as getLanguages,
120
+ f as getLicenses,
121
+ p as getOptionalURIs,
122
+ y as getPlannedAvailability
115
123
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AutocompleteVocab.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f52e18d3"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-35dda4e0"]]);
5
5
  export {
6
- r as default
6
+ p as default
7
7
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as K, mergeModels as P, computed as t, ref as R, toRef as W, useModel as X, watch as M, createBlock as B, openBlock as A, unref as v, createSlots as Y, withCtx as D, createElementVNode as Z, createTextVNode as w, createCommentVNode as ee, toDisplayString as re, renderSlot as oe } from "vue";
2
- import { PhSpinner as te } from "@phosphor-icons/vue";
3
- import { defineHubSearch as le } from "@piveau/sdk-vue";
1
+ import { defineComponent as W, mergeModels as P, computed as t, ref as R, toRef as X, useModel as Y, watch as k, createBlock as B, openBlock as M, unref as v, createSlots as Z, withCtx as A, createElementVNode as w, createTextVNode as ee, createCommentVNode as re, toDisplayString as oe, renderSlot as te } from "vue";
2
+ import { PhSpinner as le } from "@phosphor-icons/vue";
3
+ import { defineHubSearch as ae } from "@piveau/sdk-vue";
4
4
  import { useDebounce as p } from "@vueuse/core";
5
5
  import se from "zod";
6
- import ae from "./Autocomplete.vue.js";
7
- const ue = { class: "autocomplete-vocab__label" }, pe = /* @__PURE__ */ K({
6
+ import ue from "./Autocomplete.vue.js";
7
+ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
8
8
  __name: "AutocompleteVocab",
9
9
  props: /* @__PURE__ */ P({
10
10
  by: { default: "" },
11
- baseUrl: { default: "https://staging.bydata.de/api/hub/search" },
11
+ baseUrl: { default: "https://twin.bydata.de/api/hub/search" },
12
12
  vocabulary: {},
13
13
  resource: {},
14
14
  label: { default: "" },
@@ -19,116 +19,120 @@ const ue = { class: "autocomplete-vocab__label" }, pe = /* @__PURE__ */ K({
19
19
  disabled: { type: Boolean, default: !1 },
20
20
  isAutocompleteDisabled: { type: Boolean, default: !1 },
21
21
  postProcessFn: {},
22
- sort: { default: void 0 }
22
+ sort: { default: "title.de+asc,name.de+asc" },
23
+ authToken: { default: "" }
23
24
  }, {
24
25
  modelValue: { default: "" },
25
26
  modelModifiers: {}
26
27
  }),
27
28
  emits: /* @__PURE__ */ P(["select"], ["update:modelValue"]),
28
- setup(b, { emit: I }) {
29
- const r = b, U = I, u = t(() => !!r.vocabulary), m = t(() => r.by || u.value ? "vocabulary" : "resource"), _ = t(() => r.resource === "dataset" ? "dataset" : u.value ? "vocabulary" : m.value), k = t(() => r.resource === "dataset" ? "datasets" : u.value ? "vocabularies" : m.value === "resource" ? `resources/${r.resource}` : "vocabularies"), E = t(() => !r.isAutocompleteDisabled && !!(r.resource || r.vocabulary)), { useSearch: L, useResource: $ } = le({
29
+ setup(b, { emit: D }) {
30
+ const r = b, I = D, u = t(() => !!r.vocabulary), m = t(() => r.by || u.value ? "vocabulary" : "resource"), T = t(() => r.resource === "dataset" ? "dataset" : u.value ? "vocabulary" : m.value), U = t(() => r.resource === "dataset" ? "datasets" : u.value ? "vocabularies" : m.value === "resource" ? `resources/${r.resource}` : "vocabularies"), _ = t(() => !r.isAutocompleteDisabled && !!(r.resource || r.vocabulary)), { useSearch: $, useResource: E } = ae({
30
31
  baseUrl: r.baseUrl,
31
- index: _.value,
32
- indexDetails: k.value,
32
+ index: T.value,
33
+ indexDetails: U.value,
33
34
  schema: se.any()
34
35
  }, (e) => {
35
36
  var d, V, F;
36
- const o = (d = r.setupFn) == null ? void 0 : d.call(r, e), s = String((o == null ? void 0 : o.id) || (e == null ? void 0 : e.resource) || ""), n = String((o == null ? void 0 : o.name) || ((V = e == null ? void 0 : e.pref_label) == null ? void 0 : V.de) || ((F = e == null ? void 0 : e.pref_label) == null ? void 0 : F.en) || "");
37
+ const o = (d = r.setupFn) == null ? void 0 : d.call(r, e), a = String((o == null ? void 0 : o.id) || (e == null ? void 0 : e.resource) || ""), n = String((o == null ? void 0 : o.name) || ((V = e == null ? void 0 : e.pref_label) == null ? void 0 : V.de) || ((F = e == null ? void 0 : e.pref_label) == null ? void 0 : F.en) || "");
37
38
  return {
38
39
  ...o,
39
- id: s,
40
+ id: a,
40
41
  name: n
41
42
  };
42
- }), f = R(""), C = p(f, 300), N = t(() => r.vocabulary), { getSearchResultsEnhanced: O, isFetching: x } = L({
43
+ }), f = R(""), L = p(f, 300), z = t(() => r.vocabulary), C = t(() => ({
44
+ ...r.authToken && { Authorization: `Bearer ${r.authToken}` }
45
+ })), { getSearchResultsEnhanced: N, isFetching: O } = $({
43
46
  queryOptions: {
44
- enabled: E
47
+ enabled: _
45
48
  },
46
49
  queryParams: {
47
- q: C,
50
+ q: L,
48
51
  limit: 12,
49
52
  // ...vocabularyRef.value
50
53
  // ? { vocabulary: vocabularyRef }
51
54
  // : { resource: props.resource },
52
- vocabulary: t(() => u.value ? N.value : ""),
55
+ vocabulary: t(() => u.value ? z.value : ""),
53
56
  // resource: computed(() => props.resource || ''),
54
- sort: W(r.sort)
57
+ sort: X(r.sort)
55
58
  },
56
59
  additionalParams: t(() => ({
57
60
  resource: m.value === "resource" ? r.resource : ""
58
- }))
59
- }), z = t(() => {
60
- let e = O.value || [];
61
+ })),
62
+ headers: C
63
+ }), x = t(() => {
64
+ let e = N.value || [];
61
65
  return r.postProcessFn && (e = r.postProcessFn(e)), e;
62
- }), l = X(b, "modelValue"), y = t(() => !(!l.value || typeof l.value == "string")), T = t(() => typeof l.value == "string");
66
+ }), l = Y(b, "modelValue"), y = t(() => !(!l.value || typeof l.value == "string")), j = t(() => typeof l.value == "string");
63
67
  function i(e) {
64
68
  return String(e ?? "").trim();
65
69
  }
66
70
  const c = t(() => {
67
71
  var e;
68
72
  return typeof l.value == "string" ? i(l.value) : i((e = l.value) == null ? void 0 : e.id);
69
- }), g = t(() => T.value && !!c.value), j = t(() => g.value ? u.value ? `${r.vocabulary}/vocable` : c.value : ""), H = t(() => u.value ? { resource: c.value } : {}), {
70
- resultEnhanced: Q,
71
- isSuccess: ne,
72
- isFetching: G
73
- } = $(j, {
74
- additionalParams: H,
73
+ }), h = t(() => j.value && !!c.value), H = t(() => h.value ? u.value ? `${r.vocabulary}/vocable` : c.value : ""), Q = t(() => u.value ? { resource: c.value } : {}), {
74
+ resultEnhanced: G,
75
+ isSuccess: ie,
76
+ isFetching: J
77
+ } = E(H, {
78
+ additionalParams: Q,
75
79
  queryOptions: {
76
- enabled: g
80
+ enabled: h
77
81
  }
78
- }), h = p(G, 350), J = p(x, 350), a = R(), S = t({
82
+ }), g = p(J, 350), K = p(O, 350), s = R(), S = t({
79
83
  get: () => {
80
- var s, n;
84
+ var a, n;
81
85
  const e = c.value;
82
86
  if (!e)
83
87
  return { id: "", name: "" };
84
- const o = typeof l.value == "object" && l.value !== null ? l.value.name : i((s = a.value) == null ? void 0 : s.id) === e ? ((n = a.value) == null ? void 0 : n.name) ?? "" : "";
88
+ const o = typeof l.value == "object" && l.value !== null ? l.value.name : i((a = s.value) == null ? void 0 : a.id) === e ? ((n = s.value) == null ? void 0 : n.name) ?? "" : "";
85
89
  return { id: e, name: o };
86
90
  },
87
91
  set: (e) => {
88
92
  if (!e) {
89
- a.value = void 0, l.value = "";
93
+ s.value = void 0, l.value = "";
90
94
  return;
91
95
  }
92
96
  if (typeof e == "string") {
93
- a.value = void 0, l.value = e.trim();
97
+ s.value = void 0, l.value = e.trim();
94
98
  return;
95
99
  }
96
- a.value = e, l.value = i(e.id);
100
+ s.value = e, l.value = i(e.id);
97
101
  }
98
102
  });
99
- return M(Q, (e, o) => {
100
- e && (o && o.id === e.id || (a.value = e, y.value && (l.value = e), y.value || (l.value = i(e.id))));
101
- }, { immediate: !0 }), M(a, (e) => {
102
- e && U("select", e);
103
- }, { immediate: !0 }), (e, o) => (A(), B(ae, {
103
+ return k(G, (e, o) => {
104
+ e && (o && o.id === e.id || (s.value = e, y.value && (l.value = e), y.value || (l.value = i(e.id))));
105
+ }, { immediate: !0 }), k(s, (e) => {
106
+ e && I("select", e);
107
+ }, { immediate: !0 }), (e, o) => (M(), B(ue, {
104
108
  modelValue: S.value,
105
- "onUpdate:modelValue": o[0] || (o[0] = (s) => S.value = s),
109
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => S.value = a),
106
110
  query: f.value,
107
- "onUpdate:query": o[1] || (o[1] = (s) => f.value = s),
108
- options: z.value || [],
111
+ "onUpdate:query": o[1] || (o[1] = (a) => f.value = a),
112
+ options: x.value || [],
109
113
  label: e.label,
110
114
  "error-message": e.errorMessage,
111
115
  placeholder: e.placeholder,
112
116
  name: e.name,
113
- disabled: v(h) || r.disabled,
114
- loading: v(J)
115
- }, Y({
116
- label: D(() => [
117
- Z("div", ue, [
118
- w(re(e.label) + " ", 1),
119
- v(h) ? (A(), B(v(te), {
117
+ disabled: v(g) || r.disabled,
118
+ loading: v(K)
119
+ }, Z({
120
+ label: A(() => [
121
+ w("div", ne, [
122
+ ee(oe(e.label) + " ", 1),
123
+ v(g) ? (M(), B(v(le), {
120
124
  key: 0,
121
125
  class: "animate-spin"
122
- })) : ee("", !0)
126
+ })) : re("", !0)
123
127
  ])
124
128
  ]),
125
129
  _: 2
126
130
  }, [
127
131
  e.$slots.option ? {
128
132
  name: "option",
129
- fn: D(({ option: s, active: n, selected: q, disabled: d }) => [
130
- oe(e.$slots, "option", {
131
- option: s,
133
+ fn: A(({ option: a, active: n, selected: q, disabled: d }) => [
134
+ te(e.$slots, "option", {
135
+ option: a,
132
136
  active: n,
133
137
  selected: q,
134
138
  disabled: d
@@ -140,5 +144,5 @@ const ue = { class: "autocomplete-vocab__label" }, pe = /* @__PURE__ */ K({
140
144
  }
141
145
  });
142
146
  export {
143
- pe as default
147
+ be as default
144
148
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ProjectOrganisationStep.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7381fcf6"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c41a4fd8"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };