@piveau/piveau-hub-ui-modules 4.4.0-beta.2 → 4.4.1

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 (100) hide show
  1. package/dist/catalogues/CatalogPage.vue.mjs +23 -22
  2. package/dist/catalogues/CatalogPage.vue.mjs.map +1 -1
  3. package/dist/composables/head/useDatasetDetailsDatasetHead.mjs +19 -15
  4. package/dist/composables/head/useDatasetDetailsDatasetHead.mjs.map +1 -1
  5. package/dist/composables/useRuntimeEnv.d.ts +1 -1
  6. package/dist/configurations/config-schema/apiSchema.d.ts +3 -3
  7. package/dist/configurations/config-schema/apiSchema.mjs +1 -1
  8. package/dist/configurations/config-schema/apiSchema.mjs.map +1 -1
  9. package/dist/configurations/config-schema/configSchema.d.ts +5 -5
  10. package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
  11. package/dist/data-provider-interface/DPIMenu.vue.mjs +3 -3
  12. package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
  13. package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +29 -7
  14. package/dist/data-provider-interface/DataProviderInterface.vue.mjs +12 -69
  15. package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
  16. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +91 -2
  17. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
  18. package/dist/data-provider-interface/DataProviderInterface.vue3.mjs +5 -0
  19. package/dist/data-provider-interface/DataProviderInterface.vue3.mjs.map +1 -0
  20. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +66 -65
  21. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  22. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +127 -115
  23. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  24. package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +1 -1
  25. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs +25 -19
  26. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs.map +1 -1
  27. package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
  28. package/dist/data-provider-interface/components/Navigation.vue.d.ts +5 -5
  29. package/dist/data-provider-interface/components/SpatialInput.vue.mjs +79 -81
  30. package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
  31. package/dist/data-provider-interface/composables/index.d.ts +2 -0
  32. package/dist/data-provider-interface/composables/useDpiContext.d.ts +17 -0
  33. package/dist/data-provider-interface/composables/useDpiContext.mjs +19 -0
  34. package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -0
  35. package/dist/data-provider-interface/composables/useDpiEditMode.d.ts +16 -0
  36. package/dist/data-provider-interface/composables/useDpiEditMode.mjs +41 -0
  37. package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -0
  38. package/dist/data-provider-interface/config/dcatap/input-definition.mjs +28 -2
  39. package/dist/data-provider-interface/config/dcatap/input-definition.mjs.map +1 -1
  40. package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +5 -2
  41. package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
  42. package/dist/data-provider-interface/config/dpi-spec-config.mjs +1 -0
  43. package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
  44. package/dist/data-provider-interface/index.d.ts +2 -0
  45. package/dist/data-provider-interface/index.mjs +11 -0
  46. package/dist/data-provider-interface/index.mjs.map +1 -0
  47. package/dist/data-provider-interface/store/dpiStore.d.ts +31 -15
  48. package/dist/data-provider-interface/store/dpiStore.mjs +30 -13
  49. package/dist/data-provider-interface/store/dpiStore.mjs.map +1 -1
  50. package/dist/data-provider-interface/store/modules/autocompleteStore.d.ts +3 -1
  51. package/dist/data-provider-interface/store/modules/autocompleteStore.mjs +28 -29
  52. package/dist/data-provider-interface/store/modules/autocompleteStore.mjs.map +1 -1
  53. package/dist/data-provider-interface/store/modules/conversionStore.d.ts +6 -6
  54. package/dist/data-provider-interface/store/modules/conversionStore.mjs +21 -22
  55. package/dist/data-provider-interface/store/modules/conversionStore.mjs.map +1 -1
  56. package/dist/data-provider-interface/store/modules/formSchemaStore.d.ts +5 -3
  57. package/dist/data-provider-interface/store/modules/formSchemaStore.mjs +29 -29
  58. package/dist/data-provider-interface/store/modules/formSchemaStore.mjs.map +1 -1
  59. package/dist/data-provider-interface/store/modules/navigationStore.d.ts +1 -1
  60. package/dist/data-provider-interface/store/modules/navigationStore.mjs +13 -14
  61. package/dist/data-provider-interface/store/modules/navigationStore.mjs.map +1 -1
  62. package/dist/data-provider-interface/utils/RDFconverter.mjs +63 -60
  63. package/dist/data-provider-interface/utils/RDFconverter.mjs.map +1 -1
  64. package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +2 -2
  65. package/dist/data-provider-interface/views/InputPage.vue.d.ts +3 -3
  66. package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs +1 -1
  67. package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +1 -1
  68. package/dist/datasetDetails/DatasetDetails.vue.d.ts +1 -1
  69. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs +1 -1
  70. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs.map +1 -1
  71. package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs.map +1 -1
  72. package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
  73. package/dist/datasetDetails/distributions/Distribution.vue.mjs +45 -43
  74. package/dist/datasetDetails/distributions/Distribution.vue.mjs.map +1 -1
  75. package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +3 -3
  76. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
  77. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.d.ts +1 -0
  78. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs +18 -14
  79. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs.map +1 -1
  80. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +3 -3
  81. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs +68 -57
  82. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs.map +1 -1
  83. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue2.mjs +2 -2
  84. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
  85. package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
  86. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
  87. package/dist/embed/EmbedDataset.vue.d.ts +1 -1
  88. package/dist/embed/EmbedDatasetSnippet.vue.d.ts +2 -2
  89. package/dist/external/@vueuse/core/index +129 -80
  90. package/dist/external/@vueuse/core/index.map +1 -1
  91. package/dist/external/@vueuse/shared/index +121 -17
  92. package/dist/external/@vueuse/shared/index.map +1 -1
  93. package/dist/index.d.ts +1 -0
  94. package/dist/index.mjs +250 -248
  95. package/dist/index.mjs.map +1 -1
  96. package/dist/piveau-hub-ui-modules.css +1 -1
  97. package/dist/services/datasetService.d.ts +1 -1
  98. package/dist/services/datasetService.mjs +2 -2
  99. package/dist/services/datasetService.mjs.map +1 -1
  100. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { getCurrentInstance as D, ref as f, watch as _, onMounted as M, nextTick as P, reactive as j, openBlock as i, createElementBlock as l, unref as p, createElementVNode as c, toDisplayString as b, createTextVNode as d, withDirectives as L, vShow as q, createCommentVNode as h, Fragment as w, renderList as x, isRef as g, vModelText as B } from "vue";
1
+ import { getCurrentInstance as B, ref as f, watch as w, onMounted as D, nextTick as M, reactive as P, openBlock as l, createElementBlock as i, unref as p, createElementVNode as c, toDisplayString as m, createTextVNode as d, withDirectives as A, vShow as j, createCommentVNode as y, Fragment as C, renderList as S, isRef as b, vModelText as q } from "vue";
2
2
  import { useStore as J } from "vuex";
3
- import { getTranslationFor as $ } from "../../utils/helpers.mjs";
4
- import { onClickOutside as S } from "../../external/@vueuse/core/index";
3
+ import { getTranslationFor as L } from "../../utils/helpers.mjs";
4
+ import { onClickOutside as _ } from "../../external/@vueuse/core/index";
5
5
  import { useRoute as W } from "vue-router";
6
6
  import "./SpatialInput.vue2.mjs";
7
7
  import X from "../../_virtual/_plugin-vue_export-helper.mjs";
@@ -11,64 +11,64 @@ const z = { class: "d-flex flex-column w-100 spatialWrap" }, H = {
11
11
  }, Q = { class: "autocompleteInputSingleValue" }, Y = { key: 1 }, Z = { class: "w-100 d-flex" }, ee = { class: "d-flex position-relative m-3 w-100" }, te = ["placeholder"], ae = {
12
12
  key: 0,
13
13
  class: "d-flex position-relative m-3 w-100"
14
- }, oe = { class: "w-100" }, se = {
14
+ }, se = { class: "w-100" }, oe = {
15
15
  key: 1,
16
16
  class: "d-flex position-relative m-3 w-100"
17
- }, ie = { class: "w-100" }, le = ["onClick"], ne = {
17
+ }, le = { class: "w-100" }, ie = ["placeholder"], ne = ["onClick"], re = {
18
18
  key: 0,
19
19
  class: "m-3"
20
- }, re = {
20
+ }, ce = {
21
21
  key: 0,
22
22
  class: "w-100"
23
- }, ce = ["placeholder"], de = ["onClick"], ue = {
23
+ }, de = ["placeholder"], ue = ["onClick"], pe = {
24
24
  data() {
25
25
  return {
26
26
  man: !1,
27
27
  vocSearch: !1
28
28
  };
29
29
  }
30
- }, pe = /* @__PURE__ */ Object.assign(ue, {
30
+ }, fe = /* @__PURE__ */ Object.assign(pe, {
31
31
  __name: "SpatialInput",
32
32
  props: {
33
33
  context: Object
34
34
  },
35
35
  setup(E) {
36
- let C = D().appContext.app.config.globalProperties.$env, U = W();
36
+ let R = B().appContext.app.config.globalProperties.$env, $ = W();
37
37
  const n = E;
38
- let y = f([]), s = f({}), v = f({}), k = f({}), I = f({});
39
- const V = J();
40
- n.context.attrs.identifier === "politicalGeocodingURI" && y.value.push({ item: "Municipality Key", active: !1 }, { item: "Regional Key", active: !1 }, { item: "Municipal Association Key", active: !1 }, { item: "District Key", active: !1 }, { item: "Government District Key", active: !1 }, { item: "State Key", active: !1 }), n.context.attrs.identifier === "spatial" && y.value.push({ item: "Country", active: !1 }, { item: "Place", active: !1 }, { item: "Continent", active: !1 }), _(s, async () => {
38
+ let g = f([]), o = f({}), v = f({}), k = f({}), I = f({});
39
+ const U = J();
40
+ n.context.attrs.identifier === "politicalGeocodingURI" && g.value.push({ item: "Municipality Key", active: !1 }, { item: "Regional Key", active: !1 }, { item: "Municipal Association Key", active: !1 }, { item: "District Key", active: !1 }, { item: "Government District Key", active: !1 }, { item: "State Key", active: !1 }), n.context.attrs.identifier === "spatial" && g.value.push({ item: "Country", active: !1 }, { item: "Place", active: !1 }, { item: "Continent", active: !1 }), w(o, async () => {
41
41
  K();
42
- }), _(v, async () => {
42
+ }), w(v, async () => {
43
43
  v.value = v.value.toLowerCase();
44
- }), _(I, async () => {
44
+ }), w(I, async () => {
45
45
  n.context.node.input({ name: I, resource: I });
46
- }), M(async () => {
47
- k = [{ name: "--- Type in anything for a live search of the vocabulary ---", resource: "invalid" }], await P(), n.context.value.name === void 0 || n.context.value.name === "" ? o.activeValue = !1 : o.activeValue = !0;
46
+ }), D(async () => {
47
+ k = [{ name: "--- Type in anything for a live search of the vocabulary ---", resource: "invalid" }], await M(), n.context.value.name === void 0 || n.context.value.name === "" ? s.activeValue = !1 : s.activeValue = !0;
48
48
  });
49
49
  function G() {
50
- y.value.forEach((e) => {
50
+ g.value.forEach((e) => {
51
51
  e.active = !1;
52
52
  });
53
53
  }
54
54
  function O(e) {
55
- o.activeValue = !1, n.context.node.input({});
55
+ s.activeValue = !1, n.context.node.input({});
56
56
  }
57
57
  function F(e) {
58
- let a = JSON.parse(localStorage.getItem(`dpi_${U.params.property}`)), t;
58
+ let a = JSON.parse(localStorage.getItem(`dpi_${$.params.property}`)), t;
59
59
  n.context.attrs.identifier === "politicalGeocodingURI" ? t = a.Advised["dcatde:politicalGeocodingURI"] : t = a.Advised["dct:spatial"], t.forEach((r, u) => {
60
60
  Object.keys(r).length === 0 && t.splice(u, 1);
61
- }), t.push(n.context.node._value), n.context.attrs.identifier === "politicalGeocodingURI" ? a.Advised["dcatde:politicalGeocodingURI"] = t : a.Advised["dct:spatial"] = t, localStorage.setItem(`dpi_${U.params.property}`, JSON.stringify(a));
61
+ }), t.push(n.context.node._value), n.context.attrs.identifier === "politicalGeocodingURI" ? a.Advised["dcatde:politicalGeocodingURI"] = t : a.Advised["dct:spatial"] = t, localStorage.setItem(`dpi_${$.params.property}`, JSON.stringify(a));
62
62
  }
63
63
  const K = async () => {
64
64
  let e = v.value;
65
65
  if (n.context.attrs.identifier === "politicalGeocodingURI") {
66
66
  e = "political-geocoding-" + e.toLowerCase().replaceAll(" ", "-");
67
67
  try {
68
- let a = s.value;
69
- await V.dispatch("dpiStore/requestAutocompleteSuggestions", { voc: e, text: a, base: C.api.baseUrl }).then((t) => {
68
+ let a = o.value;
69
+ await U.dispatch("dpiStore/requestAutocompleteSuggestions", { voc: e, text: a, base: R.api.baseUrl }).then((t) => {
70
70
  k = t.data.result.results.map((u) => ({
71
- name: $(u.alt_label, "en", []) + " (" + u.id + ")",
71
+ name: L(u.alt_label, "en", []) + " (" + u.id + ")",
72
72
  resource: u.resource
73
73
  }));
74
74
  });
@@ -76,39 +76,39 @@ const z = { class: "d-flex flex-column w-100 spatialWrap" }, H = {
76
76
  }
77
77
  } else
78
78
  try {
79
- let a = s.value;
80
- await V.dispatch("dpiStore/requestAutocompleteSuggestions", { voc: e, text: a, base: C.api.baseUrl }).then((t) => {
79
+ let a = o.value;
80
+ await U.dispatch("dpiStore/requestAutocompleteSuggestions", { voc: e, text: a, base: R.api.baseUrl }).then((t) => {
81
81
  k = t.data.result.results.map((u) => ({
82
- name: $(u.pref_label, "en", []) + " (" + u.id + ")",
82
+ name: L(u.pref_label, "en", []) + " (" + u.id + ")",
83
83
  resource: u.resource
84
84
  }));
85
85
  });
86
86
  } catch {
87
87
  }
88
88
  };
89
- var o = j({
89
+ var s = P({
90
90
  first: !1,
91
91
  second: !1,
92
92
  third: !1,
93
93
  activeValue: !1
94
94
  });
95
- const T = f(null), A = f(null), R = f(null);
96
- S(T, (e) => o.first = !1), S(A, (e) => o.second = !1), S(R, (e) => o.third = !1);
97
- function m(e) {
98
- e === "showTable" && (o.first = !o.first), e === "showVocTable" && (o.second = !o.second), e === "showVocEntries" && (o.third === !0 || (o.third = !o.third));
95
+ const x = f(null), T = f(null), V = f(null);
96
+ _(x, (e) => s.first = !1), _(T, (e) => s.second = !1), _(V, (e) => s.third = !1);
97
+ function h(e) {
98
+ e === "showTable" && (s.first = !s.first), e === "showVocTable" && (s.second = !s.second), e === "showVocEntries" && (s.third === !0 || (s.third = !s.third));
99
99
  }
100
100
  function N(e) {
101
101
  n.context.node.input({ name: e.target.value, resource: e.target.value });
102
102
  }
103
- return (e, a) => (i(), l("div", z, [
104
- !n.context.attrs.multiple && p(o).activeValue ? (i(), l("div", H, [
105
- c("a", Q, b(n.context.value.name), 1),
103
+ return (e, a) => (l(), i("div", z, [
104
+ !n.context.attrs.multiple && p(s).activeValue ? (l(), i("div", H, [
105
+ c("a", Q, m(n.context.value.name), 1),
106
106
  d(),
107
107
  c("div", {
108
108
  class: "removeX",
109
109
  onClick: O
110
110
  })
111
- ])) : (i(), l("div", Y, [
111
+ ])) : (l(), i("div", Y, [
112
112
  c("div", Z, [
113
113
  c("div", ee, [
114
114
  c("input", {
@@ -117,36 +117,35 @@ const z = { class: "d-flex flex-column w-100 spatialWrap" }, H = {
117
117
  class: "selectInputField formkit-inner",
118
118
  readonly: "readonly",
119
119
  placeholder: e.$t("message.dataupload.info.preferredInput"),
120
- onClick: a[0] || (a[0] = (t) => m("showTable"))
120
+ onClick: a[0] || (a[0] = (t) => h("showTable"))
121
121
  }, null, 8, te),
122
122
  d(),
123
- L(c("ul", {
123
+ A(c("ul", {
124
124
  ref_key: "I1",
125
- ref: T,
125
+ ref: x,
126
126
  class: "spatialListUpload"
127
127
  }, [
128
128
  c("li", {
129
129
  onClick: a[1] || (a[1] = (t) => {
130
- m("showTable"), e.man = !0, e.vocSearch && (e.vocSearch = !1);
130
+ h("showTable"), e.man = !0, e.vocSearch && (e.vocSearch = !1);
131
131
  }),
132
132
  class: "p-2 border-b border-gray-200 choosableItemsAC"
133
- }, b(e.$t("message.dataupload.datasets.conditional.manually")), 1),
133
+ }, m(e.$t("message.dataupload.datasets.conditional.manually")), 1),
134
134
  d(),
135
135
  c("li", {
136
136
  onClick: a[2] || (a[2] = (t) => {
137
- m("showTable"), e.vocSearch = !0, e.man && (e.man = !1);
137
+ h("showTable"), e.vocSearch = !0, e.man && (e.man = !1);
138
138
  }),
139
139
  class: "p-2 border-b border-gray-200 choosableItemsAC"
140
- }, b(e.$t("message.dataupload.datasets.conditional.vocabulary")), 1)
140
+ }, m(e.$t("message.dataupload.datasets.conditional.vocabulary")), 1)
141
141
  ], 512), [
142
- [q, p(o).first]
142
+ [j, p(s).first]
143
143
  ])
144
144
  ]),
145
145
  d(),
146
- e.man ? (i(), l("div", ae, [
147
- c("label", oe, [
148
- d(` Provide an URL
149
- `),
146
+ e.man ? (l(), i("div", ae, [
147
+ c("label", se, [
148
+ d(m(e.$te("message.dataupload.datasets.isReferencedByUrl.placeholder") ? e.$t("message.dataupload.datasets.isReferencedByUrl.placeholder") : "Provide an URL") + " ", 1),
150
149
  c("input", {
151
150
  type: "URL",
152
151
  class: "selectInputField formkit-inner",
@@ -154,84 +153,83 @@ const z = { class: "d-flex flex-column w-100 spatialWrap" }, H = {
154
153
  onInput: a[3] || (a[3] = (t) => N(t))
155
154
  }, null, 32)
156
155
  ])
157
- ])) : h("", !0),
156
+ ])) : y("", !0),
158
157
  d(),
159
- e.vocSearch ? (i(), l("div", se, [
160
- c("label", ie, [
161
- d(` Choose type of vocabulary
162
- `),
158
+ e.vocSearch ? (l(), i("div", oe, [
159
+ c("label", le, [
160
+ d(m(e.$te("message.dataupload.datasets.contributorType.placeholder") ? e.$t("message.dataupload.datasets.contributorType.placeholder") : "Choose type of vocabulary") + " ", 1),
163
161
  c("input", {
164
162
  id: "I2",
165
163
  type: "text",
166
164
  class: "selectInputField formkit-inner",
167
165
  readonly: "readonly",
168
- placeholder: "Search the vocabulary",
166
+ placeholder: e.$te("message.dataupload.datasets.accessRights.placeholder") ? e.$t("message.dataupload.datasets.accessRights.placeholder") : "Choose type of vocabulary",
169
167
  onClick: a[4] || (a[4] = (t) => {
170
- m("showVocTable");
168
+ h("showVocTable");
171
169
  })
172
- })
170
+ }, null, 8, ie)
173
171
  ]),
174
172
  d(),
175
- p(o).second ? (i(), l("ul", {
173
+ p(s).second ? (l(), i("ul", {
176
174
  key: 0,
177
175
  ref_key: "I2",
178
- ref: A,
176
+ ref: T,
179
177
  class: "spatialListUpload"
180
178
  }, [
181
- (i(!0), l(w, null, x(p(y), (t) => (i(), l("li", {
179
+ (l(!0), i(C, null, S(p(g), (t) => (l(), i("li", {
182
180
  key: t,
183
181
  class: "p-2 border-b border-gray-200 choosableItemsAC",
184
182
  onClick: (r) => {
185
- G(), t.active = !t.active, m("showVocTable"), g(s) ? s.value = "" : s = "", g(v) ? v.value = t.item : v = t.item;
183
+ G(), t.active = !t.active, h("showVocTable"), b(o) ? o.value = "" : o = "", b(v) ? v.value = t.item : v = t.item;
186
184
  }
187
- }, b(t.item), 9, le))), 128))
188
- ], 512)) : h("", !0)
189
- ])) : h("", !0)
185
+ }, m(t.item), 9, ne))), 128))
186
+ ], 512)) : y("", !0)
187
+ ])) : y("", !0)
190
188
  ]),
191
189
  d(),
192
- e.vocSearch ? (i(), l("div", ne, [
193
- (i(!0), l(w, null, x(p(y), (t) => (i(), l("div", {
190
+ e.vocSearch ? (l(), i("div", re, [
191
+ (l(!0), i(C, null, S(p(g), (t) => (l(), i("div", {
194
192
  key: t,
195
193
  class: "position-relative"
196
194
  }, [
197
- t.active ? (i(), l("label", re, [
198
- d(" Search the vocabulary "),
199
- L(c("input", {
195
+ t.active ? (l(), i("label", ce, [
196
+ d(m(e.$te("message.dataupload.datasets.accessRights.placeholder") ? e.$t("message.dataupload.datasets.accessRights.placeholder") : "Choose type of vocabulary") + " ", 1),
197
+ A(c("input", {
200
198
  id: "I3",
201
199
  type: "text",
202
- "onUpdate:modelValue": a[5] || (a[5] = (r) => g(s) ? s.value = r : s = r),
200
+ "onUpdate:modelValue": a[5] || (a[5] = (r) => b(o) ? o.value = r : o = r),
203
201
  class: "selectInputField formkit-inner",
204
202
  placeholder: t.item,
205
203
  onClick: a[6] || (a[6] = (r) => {
206
- m("showVocEntries"), g(s) ? s.value = "" : s = "";
204
+ h("showVocEntries"), b(o) ? o.value = "" : o = "";
207
205
  })
208
- }, null, 8, ce), [
209
- [B, p(s)]
206
+ }, null, 8, de), [
207
+ [q, p(o)]
210
208
  ])
211
- ])) : h("", !0),
209
+ ])) : y("", !0),
212
210
  d(),
213
- p(o).third && t.active ? (i(), l("ul", {
211
+ p(s).third && t.active ? (l(), i("ul", {
214
212
  key: 1,
215
213
  ref_for: !0,
216
214
  ref_key: "I3",
217
- ref: R,
215
+ ref: V,
218
216
  class: "spatialListUpload"
219
217
  }, [
220
- (i(!0), l(w, null, x(p(k), (r) => (i(), l("li", {
218
+ (l(!0), i(C, null, S(p(k), (r) => (l(), i("li", {
221
219
  key: r,
222
220
  class: "p-2 border-b border-gray-200 choosableItemsAC",
223
221
  onClick: (u) => {
224
- n.context.node.input(r), g(s) ? s.value = r.name : s = r.name, m("showVocEntries"), p(o).third = !1, F();
222
+ n.context.node.input(r), b(o) ? o.value = r.name : o = r.name, h("showVocEntries"), p(s).third = !1, F();
225
223
  }
226
- }, b(r.name), 9, de))), 128))
227
- ], 512)) : h("", !0)
224
+ }, m(r.name), 9, ue))), 128))
225
+ ], 512)) : y("", !0)
228
226
  ]))), 128))
229
- ])) : h("", !0)
227
+ ])) : y("", !0)
230
228
  ]))
231
229
  ]));
232
230
  }
233
- }), ke = /* @__PURE__ */ X(pe, [["__scopeId", "data-v-0e6763cf"]]);
231
+ }), Ie = /* @__PURE__ */ X(fe, [["__scopeId", "data-v-ae82dba1"]]);
234
232
  export {
235
- ke as default
233
+ Ie as default
236
234
  };
237
235
  //# sourceMappingURL=SpatialInput.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpatialInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/SpatialInput.vue"],"sourcesContent":["<script setup>\n\nimport { ref, reactive, watch, computed, onBeforeMount, onMounted, nextTick } from 'vue';\nimport { useStore } from 'vuex';\nimport { getTranslationFor } from \"../../utils/helpers\";\nimport { onClickOutside } from '@vueuse/core'\nimport { getCurrentInstance } from \"vue\";\nimport { useRoute } from 'vue-router';\n\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\nlet route = useRoute();\n\nconst props = defineProps({\n context: Object,\n})\n// let listOfVoc: [{ item: 'Country', active: false }, { item: 'Place', active: false }, { item: 'Continent', active: false }],\nlet listOfVoc = ref([])\nlet inputText = ref({})\nlet voc = ref({})\nlet matches = ref({})\nlet manURL = ref({})\nconst store = useStore();\n\nif (props.context.attrs.identifier === 'politicalGeocodingURI') {\n listOfVoc.value.push({ item: 'Municipality Key', active: false }, { item: 'Regional Key', active: false }, { item: 'Municipal Association Key', active: false }, { item: 'District Key', active: false }, { item: 'Government District Key', active: false }, { item: 'State Key', active: false })\n\n}\nif (props.context.attrs.identifier === 'spatial') {\n listOfVoc.value.push({ item: 'Country', active: false }, { item: 'Place', active: false }, { item: 'Continent', active: false })\n}\n\nwatch(inputText, async () => {\n getAutocompleteSuggestions();\n})\nwatch(voc, async () => {\n voc.value = voc.value.toLowerCase();\n})\nwatch(manURL, async () => {\n props.context.node.input({ 'name': manURL, 'resource': manURL })\n})\nonMounted(async () => {\n matches = [{ name: '--- Type in anything for a live search of the vocabulary ---', resource: 'invalid' }]\n\n await nextTick()\n // DOM loaded\n if (props.context.value.name === undefined || props.context.value.name === \"\") {\n showTable.activeValue = false\n } else showTable.activeValue = true\n // console.log(showTable.activeValue);\n\n});\n\nfunction closeAll() {\n listOfVoc.value.forEach(element => {\n element.active = false;\n });\n}\nfunction removeProperty(e) {\n // props.context.value = {}\n showTable.activeValue = false\n props.context.node.input({})\n}\nfunction saveToLocal(el) {\n\n let pathToLocalStorage = JSON.parse(localStorage.getItem(`dpi_${route.params.property}`));\n let arr\n if (props.context.attrs.identifier === 'politicalGeocodingURI') {\n arr = pathToLocalStorage.Advised['dcatde:politicalGeocodingURI'];\n }\n else arr = pathToLocalStorage.Advised['dct:spatial'];\n\n arr.forEach((element, index) => {\n if (Object.keys(element).length === 0) {\n arr.splice(index, 1)\n }\n })\n arr.push(props.context.node._value)\n if (props.context.attrs.identifier === 'politicalGeocodingURI') {\n pathToLocalStorage.Advised['dcatde:politicalGeocodingURI'] = arr\n }\n else pathToLocalStorage.Advised['dct:spatial'] = arr\n\n localStorage.setItem(`dpi_${route.params.property}`, JSON.stringify(pathToLocalStorage))\n}\nconst getAutocompleteSuggestions = async () => {\n let vocCache = voc.value\n\n if (props.context.attrs.identifier === 'politicalGeocodingURI') {\n\n vocCache = 'political-geocoding-' + vocCache.toLowerCase().replaceAll(\" \", '-')\n\n try {\n let text = inputText.value;\n await store.dispatch('dpiStore/requestAutocompleteSuggestions', { voc: vocCache, text: text, base: instance.api.baseUrl }).then((response) => {\n const results = response.data.result.results.map((r) => ({\n name: getTranslationFor(r.alt_label, 'en', []) + \" (\" + r.id + \")\",\n resource: r.resource,\n }));\n matches = results;\n });\n } catch (error) {\n }\n }\n else {\n try {\n let text = inputText.value;\n await store.dispatch('dpiStore/requestAutocompleteSuggestions', { voc: vocCache, text: text, base: instance.api.baseUrl }).then((response) => {\n const results = response.data.result.results.map((r) => ({\n name: getTranslationFor(r.pref_label, 'en', []) + \" (\" + r.id + \")\",\n resource: r.resource,\n }));\n matches = results;\n });\n } catch (error) {\n }\n }\n\n}\n\nvar showTable = reactive({\n first: false,\n second: false,\n third: false,\n activeValue: false\n})\n\nconst I1 = ref(null);\nconst I2 = ref(null);\nconst I3 = ref(null);\n\nonClickOutside(I1, event => showTable.first = false)\nonClickOutside(I2, event => showTable.second = false)\nonClickOutside(I3, event => showTable.third = false)\nfunction activeInput(e) {\n\n // console.log('in', showTable);\n if (e === \"showTable\") showTable.first = !showTable.first;\n if (e === \"showVocTable\") showTable.second = !showTable.second;\n if (e === \"showVocEntries\") {\n if (showTable.third === true) {\n }\n else showTable.third = !showTable.third;\n }\n}\nfunction manURLInput(e) {\n props.context.node.input({ 'name': e.target.value, 'resource': e.target.value })\n}\n// console.log(voc);\n</script>\n\n<template>\n <div class=\"d-flex flex-column w-100 spatialWrap\">\n <div class=\"d-flex formkit-inner mx-3 mb-3\" v-if=\"!props.context.attrs.multiple && showTable.activeValue\">\n <!-- <div class=\"infoI\">\n <div class=\"tooltipFormkit\">{{ props.context.attrs.info }}</div>\n </div> -->\n <a class=\"autocompleteInputSingleValue \">{{ props.context.value.name }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n </div>\n <div v-else>\n <div class=\" w-100 d-flex\">\n <div class=\"d-flex position-relative m-3 w-100\">\n <input id=\"I1\" type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\"\n :placeholder=\"$t('message.dataupload.info.preferredInput')\"\n @click=\"activeInput('showTable')\" />\n <ul ref=\"I1\" v-show=\"showTable.first\" class=\"spatialListUpload\">\n <li @click=\"activeInput('showTable'); man = true; if (vocSearch) { vocSearch = false; };\"\n class=\"p-2 border-b border-gray-200 choosableItemsAC\">\n {{ $t('message.dataupload.datasets.conditional.manually') }}\n </li>\n <li @click=\"activeInput('showTable'); vocSearch = true; if (man) { man = false }\"\n class=\"p-2 border-b border-gray-200 choosableItemsAC\">\n {{ $t('message.dataupload.datasets.conditional.vocabulary') }}\n </li>\n </ul>\n </div>\n <div v-if=\"man\" class=\"d-flex position-relative m-3 w-100\">\n <label class=\"w-100\"> Provide an URL\n <input type=\"URL\" class=\"selectInputField formkit-inner\" placeholder=\"URL\"\n @input=\"manURLInput($event)\">\n </label>\n </div>\n <div v-if=\"vocSearch\" class=\"d-flex position-relative m-3 w-100\">\n <label class=\"w-100\"> Choose type of vocabulary\n <input id=\"I2\" type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\"\n placeholder=\"Search the vocabulary\" @click=\"activeInput('showVocTable');\">\n </label>\n <ul ref=\"I2\" v-if=\"showTable.second\" class=\"spatialListUpload\">\n <li v-for=\"el in listOfVoc\" :key=\"el\" class=\"p-2 border-b border-gray-200 choosableItemsAC\"\n @click=\" closeAll(); el.active = !el.active; activeInput('showVocTable'); inputText = ''; voc = el.item\">\n {{ el.item }}</li>\n </ul>\n </div>\n </div>\n <div class=\"m-3\" v-if=\"vocSearch\">\n <div v-for=\"el in listOfVoc\" :key=\"el\" class=\"position-relative\">\n <label class=\"w-100\" v-if=\"el.active\"> Search the vocabulary <input id=\"I3\" type=\"text\"\n v-model=\"inputText\" class=\"selectInputField formkit-inner\" :placeholder=\"el.item\"\n @click=\"activeInput('showVocEntries'); inputText = ''\">\n </label>\n <ul ref=\"I3\" v-if=\"showTable.third && el.active\" class=\"spatialListUpload\">\n <li v-for=\"el in matches\" :key=\"el\" class=\"p-2 border-b border-gray-200 choosableItemsAC\"\n @click=\"props.context.node.input(el); inputText = el.name; activeInput('showVocEntries'); showTable.third = false; saveToLocal(el)\">\n {{ el.name }}</li>\n </ul>\n </div>\n\n </div>\n\n </div>\n </div>\n</template>\n\n<script>\n\nexport default {\n data() {\n return {\n man: false,\n vocSearch: false,\n }\n },\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.spatialWrap label {\n font-family: var(--fk-font-family-label);\n font-size: var(--fk-font-size-label);\n font-weight: var(--fk-font-weight-label);\n line-height: var(--fk-line-height-label);\n}\n\n.spatialWrap {\n .spatialListUpload {\n width: 100%;\n left: 0;\n top: 78px;\n }\n}\n</style>\n"],"names":["__default__","instance","getCurrentInstance","route","useRoute","props","__props","listOfVoc","ref","inputText","voc","matches","manURL","store","useStore","watch","getAutocompleteSuggestions","onMounted","nextTick","showTable","closeAll","element","removeProperty","saveToLocal","el","pathToLocalStorage","arr","index","vocCache","text","response","r","getTranslationFor","reactive","I1","I2","I3","onClickOutside","event","activeInput","manURLInput"],"mappings":";;;;;;;;;;;;;;;;;;;;;;2CAuNAA,KAAe;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,KAAK;AAAA,MACL,WAAW;AAAA,IACd;AAAA,EACJ;AAEL;;;;;;AAtNA,QAAIC,IAAWC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB,MACvEC,IAAQC,EAAQ;AAEpB,UAAMC,IAAQC;AAId,QAAIC,IAAYC,EAAI,EAAE,GAClBC,IAAYD,EAAI,EAAE,GAClBE,IAAMF,EAAI,EAAE,GACZG,IAAUH,EAAI,EAAE,GAChBI,IAASJ,EAAI,EAAE;AACnB,UAAMK,IAAQC,EAAQ;AAEtB,IAAIT,EAAM,QAAQ,MAAM,eAAe,2BACnCE,EAAU,MAAM,KAAK,EAAE,MAAM,oBAAoB,QAAQ,GAAK,GAAI,EAAE,MAAM,gBAAgB,QAAQ,GAAK,GAAI,EAAE,MAAM,6BAA6B,QAAQ,GAAO,GAAE,EAAE,MAAM,gBAAgB,QAAQ,GAAO,GAAE,EAAE,MAAM,2BAA2B,QAAQ,GAAK,GAAI,EAAE,MAAM,aAAa,QAAQ,IAAO,GAGlSF,EAAM,QAAQ,MAAM,eAAe,aACnCE,EAAU,MAAM,KAAK,EAAE,MAAM,WAAW,QAAQ,MAAS,EAAE,MAAM,SAAS,QAAQ,MAAS,EAAE,MAAM,aAAa,QAAQ,IAAO,GAGnIQ,EAAMN,GAAW,YAAY;AACzB,MAAAO;IACJ,CAAC,GACDD,EAAML,GAAK,YAAY;AACnB,MAAAA,EAAI,QAAQA,EAAI,MAAM,YAAW;AAAA,IACrC,CAAC,GACDK,EAAMH,GAAQ,YAAY;AACtB,MAAAP,EAAM,QAAQ,KAAK,MAAM,EAAE,MAAQO,GAAQ,UAAYA,GAAQ;AAAA,IACnE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D,aAASoB,EAAY,GAAG;AAGpB,MAAI,MAAM,gBAAapB,EAAU,QAAQ,CAACA,EAAU,QAChD,MAAM,mBAAgBA,EAAU,SAAS,CAACA,EAAU,SACpD,MAAM,qBACFA,EAAU,UAAU,OAEnBA,EAAU,QAAQ,CAACA,EAAU;AAAA,IAE1C;AACA,aAASqB,EAAY,GAAG;AACpB,MAAAnC,EAAM,QAAQ,KAAK,MAAM,EAAE,MAAQ,EAAE,OAAO,OAAO,UAAY,EAAE,OAAO,MAAK,CAAE;AAAA,IACnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SpatialInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/SpatialInput.vue"],"sourcesContent":["<script setup>\n\nimport { ref, reactive, watch, computed, onBeforeMount, onMounted, nextTick } from 'vue';\nimport { useStore } from 'vuex';\nimport { getTranslationFor } from \"../../utils/helpers\";\nimport { onClickOutside } from '@vueuse/core'\nimport { getCurrentInstance } from \"vue\";\nimport { useRoute } from 'vue-router';\n\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\nlet route = useRoute();\n\nconst props = defineProps({\n context: Object,\n})\n// let listOfVoc: [{ item: 'Country', active: false }, { item: 'Place', active: false }, { item: 'Continent', active: false }],\nlet listOfVoc = ref([])\nlet inputText = ref({})\nlet voc = ref({})\nlet matches = ref({})\nlet manURL = ref({})\nconst store = useStore();\n\nif (props.context.attrs.identifier === 'politicalGeocodingURI') {\n listOfVoc.value.push({ item: 'Municipality Key', active: false }, { item: 'Regional Key', active: false }, { item: 'Municipal Association Key', active: false }, { item: 'District Key', active: false }, { item: 'Government District Key', active: false }, { item: 'State Key', active: false })\n\n}\nif (props.context.attrs.identifier === 'spatial') {\n listOfVoc.value.push({ item: 'Country', active: false }, { item: 'Place', active: false }, { item: 'Continent', active: false })\n}\n\nwatch(inputText, async () => {\n getAutocompleteSuggestions();\n})\nwatch(voc, async () => {\n voc.value = voc.value.toLowerCase();\n})\nwatch(manURL, async () => {\n props.context.node.input({ 'name': manURL, 'resource': manURL })\n})\nonMounted(async () => {\n matches = [{ name: '--- Type in anything for a live search of the vocabulary ---', resource: 'invalid' }]\n\n await nextTick()\n // DOM loaded\n if (props.context.value.name === undefined || props.context.value.name === \"\") {\n showTable.activeValue = false\n } else showTable.activeValue = true\n // console.log(showTable.activeValue);\n\n});\n\nfunction closeAll() {\n listOfVoc.value.forEach(element => {\n element.active = false;\n });\n}\nfunction removeProperty(e) {\n // props.context.value = {}\n showTable.activeValue = false\n props.context.node.input({})\n}\nfunction saveToLocal(el) {\n\n let pathToLocalStorage = JSON.parse(localStorage.getItem(`dpi_${route.params.property}`));\n let arr\n if (props.context.attrs.identifier === 'politicalGeocodingURI') {\n arr = pathToLocalStorage.Advised['dcatde:politicalGeocodingURI'];\n }\n else arr = pathToLocalStorage.Advised['dct:spatial'];\n\n arr.forEach((element, index) => {\n if (Object.keys(element).length === 0) {\n arr.splice(index, 1)\n }\n })\n arr.push(props.context.node._value)\n if (props.context.attrs.identifier === 'politicalGeocodingURI') {\n pathToLocalStorage.Advised['dcatde:politicalGeocodingURI'] = arr\n }\n else pathToLocalStorage.Advised['dct:spatial'] = arr\n\n localStorage.setItem(`dpi_${route.params.property}`, JSON.stringify(pathToLocalStorage))\n}\nconst getAutocompleteSuggestions = async () => {\n let vocCache = voc.value\n\n if (props.context.attrs.identifier === 'politicalGeocodingURI') {\n\n vocCache = 'political-geocoding-' + vocCache.toLowerCase().replaceAll(\" \", '-')\n\n try {\n let text = inputText.value;\n await store.dispatch('dpiStore/requestAutocompleteSuggestions', { voc: vocCache, text: text, base: instance.api.baseUrl }).then((response) => {\n const results = response.data.result.results.map((r) => ({\n name: getTranslationFor(r.alt_label, 'en', []) + \" (\" + r.id + \")\",\n resource: r.resource,\n }));\n matches = results;\n });\n } catch (error) {\n }\n }\n else {\n try {\n let text = inputText.value;\n await store.dispatch('dpiStore/requestAutocompleteSuggestions', { voc: vocCache, text: text, base: instance.api.baseUrl }).then((response) => {\n const results = response.data.result.results.map((r) => ({\n name: getTranslationFor(r.pref_label, 'en', []) + \" (\" + r.id + \")\",\n resource: r.resource,\n }));\n matches = results;\n });\n } catch (error) {\n }\n }\n\n}\n\nvar showTable = reactive({\n first: false,\n second: false,\n third: false,\n activeValue: false\n})\n\nconst I1 = ref(null);\nconst I2 = ref(null);\nconst I3 = ref(null);\n\nonClickOutside(I1, event => showTable.first = false)\nonClickOutside(I2, event => showTable.second = false)\nonClickOutside(I3, event => showTable.third = false)\nfunction activeInput(e) {\n\n // console.log('in', showTable);\n if (e === \"showTable\") showTable.first = !showTable.first;\n if (e === \"showVocTable\") showTable.second = !showTable.second;\n if (e === \"showVocEntries\") {\n if (showTable.third === true) {\n }\n else showTable.third = !showTable.third;\n }\n}\nfunction manURLInput(e) {\n props.context.node.input({ 'name': e.target.value, 'resource': e.target.value })\n}\n// console.log(voc);\n</script>\n\n<template>\n <div class=\"d-flex flex-column w-100 spatialWrap\">\n <div class=\"d-flex formkit-inner mx-3 mb-3\" v-if=\"!props.context.attrs.multiple && showTable.activeValue\">\n <!-- <div class=\"infoI\">\n <div class=\"tooltipFormkit\">{{ props.context.attrs.info }}</div>\n </div> -->\n <a class=\"autocompleteInputSingleValue \">{{ props.context.value.name }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n </div>\n <div v-else>\n <div class=\" w-100 d-flex\">\n <div class=\"d-flex position-relative m-3 w-100\">\n <input id=\"I1\" type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\"\n :placeholder=\"$t('message.dataupload.info.preferredInput')\"\n @click=\"activeInput('showTable')\" />\n <ul ref=\"I1\" v-show=\"showTable.first\" class=\"spatialListUpload\">\n <li @click=\"activeInput('showTable'); man = true; if (vocSearch) { vocSearch = false; };\"\n class=\"p-2 border-b border-gray-200 choosableItemsAC\">\n {{ $t('message.dataupload.datasets.conditional.manually') }}\n </li>\n <li @click=\"activeInput('showTable'); vocSearch = true; if (man) { man = false }\"\n class=\"p-2 border-b border-gray-200 choosableItemsAC\">\n {{ $t('message.dataupload.datasets.conditional.vocabulary') }}\n </li>\n </ul>\n </div>\n <div v-if=\"man\" class=\"d-flex position-relative m-3 w-100\">\n <label class=\"w-100\">\n <!-- todo: I borrowed this from another input. Maybe refactor? -->\n {{ $te('message.dataupload.datasets.isReferencedByUrl.placeholder') ? $t('message.dataupload.datasets.isReferencedByUrl.placeholder') : 'Provide an URL' }}\n <input type=\"URL\" class=\"selectInputField formkit-inner\" placeholder=\"URL\"\n @input=\"manURLInput($event)\">\n </label>\n </div>\n <div v-if=\"vocSearch\" class=\"d-flex position-relative m-3 w-100\">\n <!-- todo: I borrowed this from another input. Maybe refactor? -->\n <label class=\"w-100\"> {{ $te('message.dataupload.datasets.contributorType.placeholder') ? $t('message.dataupload.datasets.contributorType.placeholder') : 'Choose type of vocabulary' }} \n <input id=\"I2\" type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\"\n :placeholder=\"$te('message.dataupload.datasets.accessRights.placeholder') ? $t('message.dataupload.datasets.accessRights.placeholder') : 'Choose type of vocabulary'\" @click=\"activeInput('showVocTable');\">\n </label>\n <ul ref=\"I2\" v-if=\"showTable.second\" class=\"spatialListUpload\">\n <li v-for=\"el in listOfVoc\" :key=\"el\" class=\"p-2 border-b border-gray-200 choosableItemsAC\"\n @click=\" closeAll(); el.active = !el.active; activeInput('showVocTable'); inputText = ''; voc = el.item\">\n {{ el.item }}</li>\n </ul>\n </div>\n </div>\n <div class=\"m-3\" v-if=\"vocSearch\">\n <div v-for=\"el in listOfVoc\" :key=\"el\" class=\"position-relative\">\n <label class=\"w-100\" v-if=\"el.active\">\n <!-- todo: I borrowed this from another input. Maybe refactor? -->\n {{ $te('message.dataupload.datasets.accessRights.placeholder') ? $t('message.dataupload.datasets.accessRights.placeholder') : 'Choose type of vocabulary' }} \n <input id=\"I3\" type=\"text\"\n v-model=\"inputText\" class=\"selectInputField formkit-inner\" :placeholder=\"el.item\"\n @click=\"activeInput('showVocEntries'); inputText = ''\"\n >\n </label>\n <ul ref=\"I3\" v-if=\"showTable.third && el.active\" class=\"spatialListUpload\">\n <li v-for=\"el in matches\" :key=\"el\" class=\"p-2 border-b border-gray-200 choosableItemsAC\"\n @click=\"props.context.node.input(el); inputText = el.name; activeInput('showVocEntries'); showTable.third = false; saveToLocal(el)\">\n {{ el.name }}</li>\n </ul>\n </div>\n\n </div>\n\n </div>\n </div>\n</template>\n\n<script>\n\nexport default {\n data() {\n return {\n man: false,\n vocSearch: false,\n }\n },\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.spatialWrap label {\n font-family: var(--fk-font-family-label);\n font-size: var(--fk-font-size-label);\n font-weight: var(--fk-font-weight-label);\n line-height: var(--fk-line-height-label);\n}\n\n.spatialWrap {\n .spatialListUpload {\n width: 100%;\n left: 0;\n top: 78px;\n }\n}\n</style>\n"],"names":["__default__","instance","getCurrentInstance","route","useRoute","props","__props","listOfVoc","ref","inputText","voc","matches","manURL","store","useStore","watch","getAutocompleteSuggestions","onMounted","nextTick","showTable","closeAll","element","removeProperty","saveToLocal","el","pathToLocalStorage","arr","index","vocCache","text","response","r","getTranslationFor","reactive","I1","I2","I3","onClickOutside","event","activeInput","manURLInput"],"mappings":";;;;;;;;;;;;;;;;;;;;;;2CA8NAA,KAAe;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,KAAK;AAAA,MACL,WAAW;AAAA,IACd;AAAA,EACJ;AAEL;;;;;;AA7NA,QAAIC,IAAWC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB,MACvEC,IAAQC,EAAQ;AAEpB,UAAMC,IAAQC;AAId,QAAIC,IAAYC,EAAI,EAAE,GAClBC,IAAYD,EAAI,EAAE,GAClBE,IAAMF,EAAI,EAAE,GACZG,IAAUH,EAAI,EAA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;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from './useDpiContext';
2
+ export * from './useDpiStepper';
@@ -0,0 +1,17 @@
1
+ import { ComputedRef, InjectionKey, MaybeRefOrGetter } from 'vue';
2
+
3
+ export interface DpiSpecification {
4
+ pageConent?: object;
5
+ inputDefinition: object;
6
+ prefixes: object;
7
+ formatTypes: object;
8
+ vocabPrefixes: object;
9
+ }
10
+ export interface DpiContext {
11
+ specification: DpiSpecification;
12
+ specificationName: string;
13
+ }
14
+ export type ComputedDpiContext = ComputedRef<DpiContext>;
15
+ export declare const dpiContextKey: InjectionKey<ComputedDpiContext>;
16
+ export declare function useDpiContext(): ComputedDpiContext;
17
+ export declare function setupDpiContext(context: MaybeRefOrGetter<DpiContext>): void;
@@ -0,0 +1,19 @@
1
+ import { getCurrentInstance as n, inject as i, provide as r, computed as u, toValue as p } from "vue";
2
+ const o = Symbol("dpiContext");
3
+ function c() {
4
+ if (!n())
5
+ throw new Error("[useDpiContext] useDpiContext must be used inside a setup function");
6
+ const e = i(o);
7
+ if (!e)
8
+ throw new Error("[useDpiContext] DPI Context not found. Did you forget to inject it?");
9
+ return e;
10
+ }
11
+ function x(t) {
12
+ r(o, u(() => p(t)));
13
+ }
14
+ export {
15
+ o as dpiContextKey,
16
+ x as setupDpiContext,
17
+ c as useDpiContext
18
+ };
19
+ //# sourceMappingURL=useDpiContext.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDpiContext.mjs","sources":["../../../lib/data-provider-interface/composables/useDpiContext.ts"],"sourcesContent":["import { FormKitLibrary } from \"@formkit/core\"\nimport { computed, ComputedRef, getCurrentInstance, inject, InjectionKey, MaybeRefOrGetter, provide, toValue } from \"vue\"\n\nexport interface DpiSpecification {\n pageConent?: object\n inputDefinition: object\n prefixes: object\n formatTypes: object\n vocabPrefixes: object\n}\n\nexport interface DpiContext {\n specification: DpiSpecification\n specificationName: string\n}\n\nexport type ComputedDpiContext = ComputedRef<DpiContext>\n\nexport const dpiContextKey: InjectionKey<ComputedDpiContext> = Symbol('dpiContext')\n\nexport function useDpiContext(): ComputedDpiContext {\n const vm = getCurrentInstance();\n if (!vm) throw new Error('[useDpiContext] useDpiContext must be used inside a setup function')\n\n const dpiContext = inject(dpiContextKey)\n\n if (!dpiContext) {\n throw new Error('[useDpiContext] DPI Context not found. Did you forget to inject it?')\n }\n\n return dpiContext\n}\n\nexport function setupDpiContext(context: MaybeRefOrGetter<DpiContext>) {\n provide(dpiContextKey, computed(() => toValue(context)))\n}"],"names":["dpiContextKey","useDpiContext","getCurrentInstance","dpiContext","inject","setupDpiContext","context","provide","computed","toValue"],"mappings":";AAkBa,MAAAA,IAAkD,OAAO,YAAY;AAE3E,SAASC,IAAoC;AAElD,MAAI,CADOC;AACI,UAAA,IAAI,MAAM,oEAAoE;AAEvF,QAAAC,IAAaC,EAAOJ,CAAa;AAEvC,MAAI,CAACG;AACG,UAAA,IAAI,MAAM,qEAAqE;AAGhF,SAAAA;AACT;AAEO,SAASE,EAAgBC,GAAuC;AACrE,EAAAC,EAAQP,GAAeQ,EAAS,MAAMC,EAAQH,CAAO,CAAC,CAAC;AACzD;"}
@@ -0,0 +1,16 @@
1
+ import { DpiContext } from './useDpiContext';
2
+ import { MaybeRefOrGetter } from 'vue';
3
+
4
+ /**
5
+ * Use this composable in the DataProviderInterface to fetch a dataset from the Hub API and
6
+ * convert it to a form input via localStorage. This composable is used when the user navigates to a dataset
7
+ * by clicking on the "Edit" on the DatasetDetails page or in DraftsPage
8
+ *
9
+ *
10
+ * @param dpiContext - The DPI context as returned by `useDpiContext`.
11
+ * @returns The computed properties described above.
12
+ */
13
+ export declare function useDpiEditMode(dpiContext: MaybeRefOrGetter<DpiContext>): {
14
+ isReady: import('vue').ComputedRef<boolean>;
15
+ error: import('vue').Ref<unknown>;
16
+ };
@@ -0,0 +1,41 @@
1
+ import { useRoute as h } from "vue-router";
2
+ import { computed as o } from "vue";
3
+ import { useStore as g } from "vuex";
4
+ import { useRuntimeEnv as y } from "../../composables/useRuntimeEnv.mjs";
5
+ import { useAsyncState as v } from "../../external/@vueuse/core/index";
6
+ import { watchOnce as D } from "../../external/@vueuse/shared/index";
7
+ function M(I) {
8
+ const e = h(), t = g(), s = y(), r = o(() => e.query.id), u = o(() => e.query.fromDraft || t.getters["auth/getIsDraft"]), n = o(() => {
9
+ var i;
10
+ const a = u.value, m = (i = t.getters["auth/getUserData"]) == null ? void 0 : i.rtpToken, f = e.params.property, l = e.params.id;
11
+ return t.dispatch("auth/setIsEditMode", !0), t.dispatch("auth/setIsDraft", a), { endpoint: a ? `${s.api.hubUrl}drafts/datasets/${r.value}.nt?catalogue=${e.query.catalog}` : e.params.property === "catalogues" ? `${s.api.hubUrl}catalogues/${e.query.catalog}.nt` : `${s.api.hubUrl}datasets/${r.value}.nt?useNormalizedId=true`, token: m, property: f, id: l };
12
+ }), { execute: c, isLoading: d, error: p } = v(
13
+ async () => await t.dispatch(
14
+ "dpiStore/convertToInput",
15
+ n.value
16
+ ),
17
+ void 0,
18
+ {
19
+ immediate: !1
20
+ }
21
+ );
22
+ return D(
23
+ r,
24
+ () => {
25
+ if (!r.value)
26
+ return;
27
+ const a = u.value;
28
+ t.dispatch("auth/setIsEditMode", !0), t.dispatch("auth/setIsDraft", a), c();
29
+ },
30
+ {
31
+ immediate: !0
32
+ }
33
+ ), {
34
+ isReady: o(() => !!t.getters["dpiStore/getSpecificationName"] && !d.value),
35
+ error: p
36
+ };
37
+ }
38
+ export {
39
+ M as useDpiEditMode
40
+ };
41
+ //# sourceMappingURL=useDpiEditMode.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDpiEditMode.mjs","sources":["../../../lib/data-provider-interface/composables/useDpiEditMode.ts"],"sourcesContent":["import { useRoute } from \"vue-router\";\nimport { type DpiContext } from \"./useDpiContext\";\nimport { computed, MaybeRefOrGetter } from \"vue\";\nimport { useStore } from \"vuex\";\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv\";\nimport { useAsyncState, watchOnce } from \"@vueuse/core\";\n\n /**\n * Use this composable in the DataProviderInterface to fetch a dataset from the Hub API and\n * convert it to a form input via localStorage. This composable is used when the user navigates to a dataset\n * by clicking on the \"Edit\" on the DatasetDetails page or in DraftsPage\n *\n *\n * @param dpiContext - The DPI context as returned by `useDpiContext`.\n * @returns The computed properties described above.\n */\nexport function useDpiEditMode(dpiContext: MaybeRefOrGetter<DpiContext>) {\n const route = useRoute();\n const store = useStore();\n const env = useRuntimeEnv();\n\n const editIdQuery = computed(() => {\n return route.query.id;\n });\n\n const editFromDraft = computed(() => {\n return route.query.fromDraft || store.getters[\"auth/getIsDraft\"];\n });\n\n const requestParams = computed(() => {\n const isDraft = editFromDraft.value;\n const token = store.getters[\"auth/getUserData\"]?.rtpToken;\n const property = route.params.property;\n const id = route.params.id;\n\n store.dispatch(\"auth/setIsEditMode\", true);\n store.dispatch(\"auth/setIsDraft\", isDraft);\n\n const endpoint = isDraft\n ? `${env.api.hubUrl}drafts/datasets/${editIdQuery.value}.nt?catalogue=${route.query.catalog}`\n : route.params.property === \"catalogues\"\n ? `${env.api.hubUrl}catalogues/${route.query.catalog}.nt`\n : `${env.api.hubUrl}datasets/${editIdQuery.value}.nt?useNormalizedId=true`;\n return { endpoint, token, property, id };\n });\n\n const { execute, isLoading, error } = useAsyncState(\n async () => {\n return await store.dispatch(\n \"dpiStore/convertToInput\",\n requestParams.value\n );\n },\n undefined,\n {\n immediate: false,\n }\n );\n\n watchOnce(\n editIdQuery,\n () => {\n if (!editIdQuery.value) return;\n const isDraft = editFromDraft.value;\n store.dispatch(\"auth/setIsEditMode\", true);\n store.dispatch(\"auth/setIsDraft\", isDraft);\n execute();\n },\n {\n immediate: true,\n }\n );\n\n // Ensure dpiStore contains a specification before rendering the input page.\n // Maybe it's not needed but better safe than sorry.\n const isReady = computed(() => {\n return !!store.getters[\"dpiStore/getSpecificationName\"] && !isLoading.value;\n });\n\n return {\n isReady,\n error,\n }\n}\n"],"names":["useDpiEditMode","dpiContext","route","useRoute","store","useStore","env","useRuntimeEnv","editIdQuery","computed","editFromDraft","requestParams","isDraft","token","_a","property","id","execute","isLoading","error","useAsyncState","watchOnce"],"mappings":";;;;;;AAgBO,SAASA,EAAeC,GAA0C;AACvE,QAAMC,IAAQC,KACRC,IAAQC,KACRC,IAAMC,KAENC,IAAcC,EAAS,MACpBP,EAAM,MAAM,EACpB,GAEKQ,IAAgBD,EAAS,MACtBP,EAAM,MAAM,aAAaE,EAAM,QAAQ,iBAAiB,CAChE,GAEKO,IAAgBF,EAAS,MAAM;;AACnC,UAAMG,IAAUF,EAAc,OACxBG,KAAQC,IAAAV,EAAM,QAAQ,kBAAkB,MAAhC,gBAAAU,EAAmC,UAC3CC,IAAWb,EAAM,OAAO,UACxBc,IAAKd,EAAM,OAAO;AAElB,WAAAE,EAAA,SAAS,sBAAsB,EAAI,GACnCA,EAAA,SAAS,mBAAmBQ,CAAO,GAOlC,EAAE,UALQA,IACb,GAAGN,EAAI,IAAI,MAAM,mBAAmBE,EAAY,KAAK,iBAAiBN,EAAM,MAAM,OAAO,KACzFA,EAAM,OAAO,aAAa,eAC1B,GAAGI,EAAI,IAAI,MAAM,cAAcJ,EAAM,MAAM,OAAO,QAClD,GAAGI,EAAI,IAAI,MAAM,YAAYE,EAAY,KAAK,4BAC/B,OAAAK,GAAO,UAAAE,GAAU,IAAAC,EAAG;AAAA,EAAA,CACxC,GAEK,EAAE,SAAAC,GAAS,WAAAC,GAAW,OAAAC,EAAU,IAAAC;AAAA,IACpC,YACS,MAAMhB,EAAM;AAAA,MACjB;AAAA,MACAO,EAAc;AAAA,IAAA;AAAA,IAGlB;AAAA,IACA;AAAA,MACE,WAAW;AAAA,IACb;AAAA,EAAA;AAGF,SAAAU;AAAA,IACEb;AAAA,IACA,MAAM;AACJ,UAAI,CAACA,EAAY;AAAO;AACxB,YAAMI,IAAUF,EAAc;AACxB,MAAAN,EAAA,SAAS,sBAAsB,EAAI,GACnCA,EAAA,SAAS,mBAAmBQ,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