@piveau/piveau-hub-ui-modules 4.4.1 → 4.4.3

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.
@@ -1,6 +1,6 @@
1
- import { getCurrentInstance as ee, computed as L, ref as y, onMounted as te, watch as W, watchEffect as ne, openBlock as r, createElementBlock as i, unref as u, toDisplayString as v, createCommentVNode as N, createTextVNode as p, createElementVNode as s, withDirectives as B, isRef as O, vModelText as ae, Fragment as S, renderList as V, vShow as oe, normalizeClass as le } from "vue";
1
+ import { getCurrentInstance as ee, computed as L, ref as y, onMounted as te, watch as W, watchEffect as ne, openBlock as r, createElementBlock as i, unref as u, toDisplayString as v, createCommentVNode as $, createTextVNode as p, createElementVNode as s, withDirectives as B, isRef as N, vModelText as ae, Fragment as S, renderList as V, vShow as oe, normalizeClass as le } from "vue";
2
2
  import { useStore as se } from "vuex";
3
- import { getTranslationFor as $ } from "../../utils/helpers.mjs";
3
+ import { getTranslationFor as O } from "../../utils/helpers.mjs";
4
4
  import { getNode as re } from "@formkit/core";
5
5
  import { onClickOutside as X } from "../../external/@vueuse/core/index";
6
6
  import { useI18n as ie } from "vue-i18n";
@@ -21,7 +21,7 @@ const de = { class: "formkitProperty" }, fe = {
21
21
  }, Te = ["onClick"], Ae = { class: "d-flex" }, Pe = {
22
22
  key: 1,
23
23
  class: "d-flex flex-wrap"
24
- }, Ne = ["onClick"], Oe = { class: "formkit-wrapper" }, $e = ["innerHTML"], He = {
24
+ }, $e = ["onClick"], Ne = { class: "formkit-wrapper" }, Oe = ["innerHTML"], He = {
25
25
  __name: "AutocompleteInput",
26
26
  props: {
27
27
  context: Object
@@ -54,7 +54,7 @@ const de = { class: "formkitProperty" }, fe = {
54
54
  let n = _ === "iana-media-types" || _ === "spdx-checksum-algorithm", e;
55
55
  return await R.dispatch("dpiStore/requestResourceName", { voc: _, uri: t, envs: x }).then(
56
56
  (o) => {
57
- a.context.attrs.property === "dcatde:politicalGeocodingURI" ? o != null && (e = n ? o.data.result.results.filter((l) => l.resource === t).map((l) => l.alt_label)[0].en : $(o.data.result.alt_label, "en", [])) : o != null && (e = n ? o.data.result.results.filter((l) => l.resource === t).map((l) => l.pref_label)[0].en : $(o.data.result.pref_label, "en", []));
57
+ a.context.attrs.property === "dcatde:politicalGeocodingURI" ? o != null && (e = n ? o.data.result.results.filter((l) => l.resource === t).map((l) => l.alt_label)[0].en : O(o.data.result.alt_label, "en", [])) : o != null && (e = n ? o.data.result.results.filter((l) => l.resource === t).map((l) => l.pref_label)[0].en : O(o.data.result.pref_label, "en", []));
58
58
  }
59
59
  ), e;
60
60
  }
@@ -147,7 +147,7 @@ const de = { class: "formkitProperty" }, fe = {
147
147
  let n = t.target.value;
148
148
  console.log(M), await R.dispatch("dpiStore/requestAutocompleteSuggestions", { voc: _, text: n, base: x.api.baseUrl }).then((e) => {
149
149
  const o = e.data.result.results.map((c) => ({
150
- name: $(c.pref_label, M.value, []) + " (" + c.id + ")",
150
+ name: O(c.pref_label, M.value, []) + " (" + c.id + ")",
151
151
  resource: c.resource
152
152
  }));
153
153
  o.length === 0 ? w.value = { value: { name: G } } : w.value = o;
@@ -160,9 +160,9 @@ const de = { class: "formkitProperty" }, fe = {
160
160
  x.content.dataProviderInterface.annifIntegration && I(), h.value.length > 0 && (m = h.value), m.splice(m.findIndex((n) => n.name == t.name), 1), d = m, a.context.node.input(d), A();
161
161
  }
162
162
  return (t, n) => (r(), i("div", de, [
163
- u(D) ? (r(), i("h4", fe, v(t.$t("message.dataupload.distributions." + a.context.attrs.identifier + ".label")), 1)) : N("", !0),
163
+ u(D) ? (r(), i("h4", fe, v(t.$t("message.dataupload.distributions." + a.context.attrs.identifier + ".label")), 1)) : $("", !0),
164
164
  p(),
165
- a.context.attrs.identifier != "licence" && !u(D) ? (r(), i("h4", pe, v(t.$t("message.dataupload.datasets." + a.context.attrs.identifier + ".label")), 1)) : N("", !0),
165
+ a.context.attrs.identifier != "licence" && !u(D) ? (r(), i("h4", pe, v(t.$t("message.dataupload.datasets." + a.context.attrs.identifier + ".label")), 1)) : $("", !0),
166
166
  p(),
167
167
  s("div", me, [
168
168
  s("div", ve, [
@@ -178,10 +178,10 @@ const de = { class: "formkitProperty" }, fe = {
178
178
  B(s("input", {
179
179
  class: "autocompleteInputfield",
180
180
  placeholder: a.context.attrs.placeholder,
181
- "onUpdate:modelValue": n[0] || (n[0] = (e) => O(k) ? k.value = e : k = e),
181
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => N(k) ? k.value = e : k = e),
182
182
  type: "text",
183
183
  onKeyup: n[1] || (n[1] = (e) => Y(e)),
184
- onClick: n[2] || (n[2] = (e) => O(f) ? f.value = !u(f) : f = !u(f))
184
+ onClick: n[2] || (n[2] = (e) => N(f) ? f.value = !u(f) : f = !u(f))
185
185
  }, null, 40, _e), [
186
186
  [ae, u(k)]
187
187
  ])
@@ -195,7 +195,7 @@ const de = { class: "formkitProperty" }, fe = {
195
195
  (r(!0), i(S, null, V(u(w), (e) => (r(), i("li", {
196
196
  key: e,
197
197
  onClick: (o) => {
198
- P(e), O(f) ? f.value = !u(f) : f = !u(f);
198
+ P(e), N(f) ? f.value = !u(f) : f = !u(f);
199
199
  },
200
200
  class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
201
201
  }, v(e.name), 9, ke))), 128))
@@ -251,7 +251,7 @@ const de = { class: "formkitProperty" }, fe = {
251
251
  ])
252
252
  ], 10, Te)
253
253
  ]))), 128))
254
- ])) : N("", !0)
254
+ ])) : $("", !0)
255
255
  ])
256
256
  ])) : (r(), i("div", Pe, [
257
257
  (r(!0), i(S, null, V(a.context.value, (e) => (r(), i("div", {
@@ -263,15 +263,15 @@ const de = { class: "formkitProperty" }, fe = {
263
263
  s("div", {
264
264
  class: "removeX",
265
265
  onClick: (o) => H(e)
266
- }, null, 8, Ne)
266
+ }, null, 8, $e)
267
267
  ]))), 128))
268
268
  ])),
269
269
  p(),
270
- s("div", Oe, [
270
+ s("div", Ne, [
271
271
  s("div", {
272
- innerHTML: a.context.help,
272
+ innerHTML: t.$t("message.dataupload.distributions.licence.vocabulary.help"),
273
273
  class: "formkit-help"
274
- }, null, 8, $e)
274
+ }, null, 8, Oe)
275
275
  ])
276
276
  ]))
277
277
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"AutocompleteInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/AutocompleteInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n\n <!-- need to make a condition for the licence property of the distribution - otherwise the dropdown doesnt work-->\n\n <h4 class=\"formkitHeader\" v-if=\"inDis\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 v-if=\"props.context.attrs.identifier != 'licence' && !inDis\">{{ $t('message.dataupload.datasets.' +\n props.context.attrs.identifier + '.label') }}</h4>\n\n <div class=\"formkitCmpWrap\">\n\n <div class=\"formkit-outer\">\n <div class=\"d-flex formkit-inner\" v-if=\"!props.context.attrs.multiple && props.context.value.name\">\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=\"d-flex align-items-center justify-content-center formkit-inner mb-2\">\n <!-- <div class=\"infoI\">\n <div class=\"tooltipFormkit\">{{ props.context.attrs.info }}</div>\n </div> -->\n <input class=\"autocompleteInputfield\" :placeholder=\"props.context.attrs.placeholder\" v-model=\"inputText\"\n type=\"text\" v-on:keyup=\"getAutocompleteSuggestions($event)\" @click=\"activeList = !activeList\">\n </div>\n <ul ref=\"dropdownList\" v-show=\"activeList\" class=\"autocompleteResultList\">\n <li v-for=\"match in matches\" :key=\"match\" @click=\"setValue(match); activeList = !activeList\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{ match.name }}\n </li>\n </ul>\n <div v-if=\"instance.content.dataProviderInterface.annifIntegration && props.context.attrs.annifTheme\"\n class=\"d-flex flex-wrap\">\n <div v-for=\"item in listOfValues\" :key=\"item\">\n <div class=\"activeResultsAutocompleteWrapper\">\n <div class=\"d-flex\" @click=\"item.activeValue = !item.activeValue;\">\n <span>{{ item.name }}</span>\n <div class=\"removeX\" @click=\"removeMultipleProperty(item)\"></div>\n </div>\n </div>\n </div>\n <div class=\"w-100 mt-4\">\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h3>{{ $t('message.dataupload.info.suggestions') }}</h3>\n <!-- span>{{ $t('message.dataupload.info.suggestionText') }}</span -->\n <button class=\"navlikeButton\" type=\"button\"\n @click=\"fillAnnifsuggestions(); annifTrigger.value = true\">{{ $t('message.dataupload.info.tryIt')\n }}</button>\n </div>\n <div class=\"annifresultContainer\" v-if=\"annifTrigger.value\">\n <div v-for=\"item in annifSelectionList\" :key=\"item\" class=\"d-flex \">\n <div class=\"activeResultsAutocompleteWrapper annifResults\"\n :class=\"{ loadMore: item.resource === 'invalid' }\"\n @click=\"item.activeValue = !item.activeValue; updateAnnifselection(item)\">\n <div class=\"d-flex\">\n <span>{{ item.name }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n <div v-else class=\"d-flex flex-wrap\">\n <div class=\"activeResultsAutocompleteWrapper\" v-for=\"item in props.context.value\" :key=\"item\">\n <span>{{ item.name }}</span>\n <div class=\"removeX\" @click=\"removeMultipleProperty(item)\"></div>\n </div>\n </div>\n <div class=\"formkit-wrapper\">\n <div v-html=\"props.context.help\" class=\"formkit-help\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup>\nimport { ref, watch, computed, onMounted, watchEffect } from 'vue';\nimport { useStore } from 'vuex';\nimport { getTranslationFor } from \"../../utils/helpers\";\nimport { getCurrentInstance } from \"vue\";\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport { useI18n } from 'vue-i18n';\n\nimport qs from 'qs';\nimport axios from 'axios';\n\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\n\nconst props = defineProps({\n context: Object\n})\nconst store = useStore();\nconst { t,locale } = useI18n();\n\nlet listOfValues = computed(() => {\n return props.context.value;\n})\n\nlet selection;\nlet voc = props.context.attrs.voc;\n\nlet matchesSearchstring = computed(() => {\n return t('message.dataupload.info.searchVocabulary')\n})\nlet matchesNothingFound = computed(() => {\n return t('message.dataupload.info.matchesNothingFound')\n})\nlet matches = ref({\n value: { name: matchesSearchstring }\n})\nlet activeList = ref()\nlet dropdownList = ref(null)\nlet inputText = ref({})\nlet cacheList = [];\nlet annifList = [];\nlet annifTrigger = ref({\n value: false\n});\nlet initialValues = ref();\nlet annifSelectionList = ref({})\n\nonMounted(async () => {\n inputText.value = \"\"\n});\nlet inDis = computed(() => {\n try {\n if (props.context.attrs.class.includes(\"inDistribution\")) {\n return true\n }\n } catch (error) {\n\n }\n\n\n});\nwatch(matches, async () => { })\nwatch(annifSelectionList, async () => { })\n\nconst requestURIname = async (res) => {\n\n if (res != undefined) {\n let vocMatch =\n voc === \"iana-media-types\" ||\n voc === \"spdx-checksum-algorithm\";\n\n let name;\n\n await store.dispatch('dpiStore/requestResourceName', { voc: voc, uri: res, envs: instance }).then(\n (response) => {\n if (props.context.attrs.property === 'dcatde:politicalGeocodingURI') {\n if (response != undefined) {\n let result = vocMatch\n ? response.data.result.results\n .filter((dataset) => dataset.resource === res)\n .map((dataset) => dataset.alt_label)[0].en\n : getTranslationFor(response.data.result.alt_label, 'en', []);\n name = result;\n }\n } else {\n\n if (response != undefined) {\n let result = vocMatch\n ? response.data.result.results\n .filter((dataset) => dataset.resource === res)\n .map((dataset) => dataset.pref_label)[0].en\n : getTranslationFor(response.data.result.pref_label, 'en', []);\n name = result;\n\n }\n }\n }\n );\n return name\n }\n\n}\n\nwatchEffect(async () => {\n const values = listOfValues.value;\n\n // single URI's\n if (values.hasOwnProperty('name')) {\n if (values.name === values.resource) {\n let uriName;\n if (!props.context.attrs.multiple) {\n uriName = requestURIname(values.resource)\n props.context.node.input({ name: await uriName, resource: values.resource })\n\n }\n }\n }\n // multiple URI's\n if (values.length >= 1) {\n let uriNameList = [];\n for (let index = 0; index < values.length; index++) {\n if (values[index].name === values[index].resource) {\n uriNameList.push({ name: await requestURIname(values[index].resource), resource: values[index].resource })\n props.context.node.input(uriNameList)\n }\n }\n }\n});\nfunction findPropertyToUpdate(trigger) {\n\n let finalPath = { step: '', prop: props.context.node.name }\n let pathToLocalStorage = JSON.parse(localStorage.getItem('dpi_datasets'));\n\n for (let index = 0; index < Object.keys(pathToLocalStorage).length; index++) {\n for (let innerIndex = 0; innerIndex < Object.keys(pathToLocalStorage)[index].length; innerIndex++) {\n let ntry = Object.entries((pathToLocalStorage))\n try {\n Object.keys(ntry[index][innerIndex]).filter(e => {\n if (e === props.context.node.name) {\n finalPath.step = ntry[index][0]\n\n if (trigger === 'erase') {\n\n selection = {}\n pathToLocalStorage[finalPath.step][finalPath.prop] = selection\n }\n if (typeof selection === 'object') {\n\n pathToLocalStorage[finalPath.step][finalPath.prop] = selection\n }\n else pathToLocalStorage[finalPath.step][finalPath.prop] = selection\n localStorage.setItem('dpi_datasets', JSON.stringify(pathToLocalStorage))\n }\n });\n } catch (error) {\n }\n }\n }\n\n window.removeEventListener(\"click\", onClickOutside);\n}\nonClickOutside(dropdownList, event => activeList.value = false)\nlet annifHandlerTheme = async (input, limit) => {\n\n let finalLimit = 10;\n if (limit != undefined) {\n finalLimit = finalLimit + 10\n }\n\n let query = qs.stringify({\n 'text': input,\n 'limit': finalLimit\n });\n\n\n var config = {\n method: 'post',\n url: voc == \"eurovoc\"\n ? instance.content.dataProviderInterface.annifLinkSubject\n : instance.content.dataProviderInterface.annifLinkTheme,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Accept': 'application/json'\n },\n data: query\n };\n\n let list = []\n\n axios(config)\n .then(async (response) => {\n\n for (let i = 0; i < response.data.results.length; i++) {\n\n\n annifList[i] = { \"name\": response.data.results[i].label, \"resource\": response.data.results[i].uri, \"activeValue\": false }\n }\n let annifCacheList = []\n if (listOfValues.value.length > 0) {\n listOfValues.value.forEach(element => {\n annifCacheList.push({ \"name\": element.name, \"resource\": element.resource, \"activeValue\": true })\n });\n }\n if (response.data.results.length > 9) {\n annifList[annifList.length + 1] = { \"name\": \"...\", \"resource\": \"invalid\", \"activeValue\": false }\n }\n\n annifSelectionList.value = eraseDuplicates(annifCacheList, annifList)\n\n })\n .catch(function (error) {\n console.log(error);\n });\n}\nasync function updateAnnifselection(item) {\n\n if (item.resource === 'invalid') {\n fillAnnifsuggestions(5);\n }\n else {\n setValue({ name: item.name, resource: item.resource })\n fillAnnifsuggestions()\n }\n}\nfunction eraseDuplicates(array1, array2) {\n\n let mergedArray = array1.concat(array2);\n let filteredArray = [];\n let resourceSet = new Set();\n\n mergedArray.forEach(obj => {\n if (!resourceSet.has(obj.resource)) {\n resourceSet.add(obj.resource);\n if (!obj.activeValue) {\n filteredArray.push(obj);\n }\n }\n });\n\n\n return filteredArray;\n}\nconst fillAnnifsuggestions = async (limitChange) => {\n\n let arr = getNode('Mandatory').value['dct:description']\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]['@language'] === 'en') {\n if (limitChange != undefined) {\n await annifHandlerTheme(arr[i]['@value'], 5)\n }\n else await annifHandlerTheme(arr[i]['@value'])\n }\n }\n\n}\n\n// Need to append the classes to the formkit-outer element\nprops.context.classes.outer += ' autocompleteInput ' + props.context.attrs.identifier\n\nconst setValue = async (e) => {\n if (Object.keys(e).length === 1) {\n return\n }\n if (listOfValues.value.length > 0) {\n\n cacheList = listOfValues.value\n }\n\n // when its a multi input\n if (props.context.attrs.multiple) {\n // check for doubled values\n if (cacheList.length != 0) {\n let filteredProperty = { name: e.name, resource: e.resource };\n let filteredList = cacheList.filter((element) => element.name != e.name);\n filteredList.push(filteredProperty)\n selection = filteredList;\n await props.context.node.input(selection);\n\n }\n else {\n cacheList.push({ name: e.name, resource: e.resource })\n selection = cacheList\n await props.context.node.input(selection);\n }\n\n }\n else if (e.resource === \"invalid\") return\n else if (e === \"erase\") { await props.context.node.input({}); findPropertyToUpdate(e) }\n else {\n selection = { name: e.name, resource: e.resource };\n await props.context.node.input(selection);\n }\n findPropertyToUpdate();\n}\n\nconst getAutocompleteSuggestions = async (e) => {\n let innerText = e.target.value\nconsole.log(locale);\n\n\n await store.dispatch('dpiStore/requestAutocompleteSuggestions', { voc: voc, text: innerText, base: instance.api.baseUrl }).then((response) => {\n const results = response.data.result.results.map((r) => ({\n name: getTranslationFor(r.pref_label, locale.value, []) + \" (\" + r.id + \")\",\n resource: r.resource,\n }));\n if (results.length === 0) {\n matches.value = { value: { name: matchesNothingFound } }\n }\n else matches.value = results;\n });\n}\n\nfunction removeProperty(e) {\n props.context.node.input({})\n setValue('erase');\n}\nfunction removeMultipleProperty(e) {\n\n if (instance.content.dataProviderInterface.annifIntegration) {\n fillAnnifsuggestions()\n }\n if (listOfValues.value.length > 0) {\n cacheList = listOfValues.value\n }\n // Get Index in the array where all values of the Span are stored and cut it out of the list of Values\n cacheList.splice(cacheList.findIndex((element) => element.name == e.name), 1)\n selection = cacheList;\n props.context.node.input(selection);\n findPropertyToUpdate();\n}\n</script>\n"],"names":["instance","getCurrentInstance","props","__props","store","useStore","t","locale","useI18n","listOfValues","computed","selection","voc","matchesSearchstring","matchesNothingFound","matches","ref","activeList","dropdownList","inputText","cacheList","annifList","annifTrigger","annifSelectionList","onMounted","inDis","watch","requestURIname","res","vocMatch","name","response","dataset","getTranslationFor","watchEffect","values","uriName","uriNameList","index","findPropertyToUpdate","trigger","finalPath","pathToLocalStorage","innerIndex","ntry","e","onClickOutside","event","annifHandlerTheme","input","limit","finalLimit","query","qs","config","axios","i","annifCacheList","element","eraseDuplicates","error","updateAnnifselection","item","fillAnnifsuggestions","setValue","array1","array2","mergedArray","filteredArray","resourceSet","obj","limitChange","arr","getNode","filteredProperty","filteredList","getAutocompleteSuggestions","innerText","results","r","remov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;AAE1C,QAAA4B;;IACF,GAEMqC,IAA6B,OAAO/B,MAAM;AAC9C,UAAIgC,IAAYhC,EAAE,OAAO;AAC3B,cAAQ,IAAItC,CAAM,GAGhB,MAAMH,EAAM,SAAS,2CAA2C,EAAE,KAAKQ,GAAK,MAAMiE,GAAW,MAAM7E,EAAS,IAAI,QAAS,CAAA,EAAE,KAAK,CAAC+B,MAAa;AAC5I,cAAM+C,IAAU/C,EAAS,KAAK,OAAO,QAAQ,IAAI,CAACgD,OAAO;AAAA,UACvD,MAAM9C,EAAkB8C,EAAE,YAAYxE,EAAO,OAAO,CAAA,CAAE,IAAI,OAAOwE,EAAE,KAAK;AAAA,UACxE,UAAUA,EAAE;AAAA,QACb,EAAC;AACF,QAAID,EAAQ,WAAW,IACrB/D,EAAQ,QAAQ,EAAE,OAAO,EAAE,MAAMD,EAAmB,EAAI,IAErDC,EAAQ,QAAQ+D;AAAA,MACzB,CAAG;AAAA,IACH;AAEA,aAASE,EAAenC,GAAG;AACzB,MAAA3C,EAAM,QAAQ,KAAK,MAAM,CAAA,CAAE,GAC3B8D,EAAS,OAAO;AAAA,IAClB;AACA,aAASiB,EAAuBpC,GAAG;AAEjC,MAAI7C,EAAS,QAAQ,sBAAsB,oBACzC+D,EAAsB,GAEpBtD,EAAa,MAAM,SAAS,MAC9BW,IAAYX,EAAa,QAG3BW,EAAU,OAAOA,EAAU,UAAU,CAACsC,MAAYA,EAAQ,QAAQb,EAAE,IAAI,GAAG,CAAC,GAC5ElC,IAAYS,GACZlB,EAAM,QAAQ,KAAK,MAAMS,CAAS,GAClC4B;IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"AutocompleteInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/AutocompleteInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n\n <!-- need to make a condition for the licence property of the distribution - otherwise the dropdown doesnt work-->\n\n <h4 class=\"formkitHeader\" v-if=\"inDis\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 v-if=\"props.context.attrs.identifier != 'licence' && !inDis\">{{ $t('message.dataupload.datasets.' +\n props.context.attrs.identifier + '.label') }}</h4>\n\n <div class=\"formkitCmpWrap\">\n\n <div class=\"formkit-outer\">\n <div class=\"d-flex formkit-inner\" v-if=\"!props.context.attrs.multiple && props.context.value.name\">\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=\"d-flex align-items-center justify-content-center formkit-inner mb-2\">\n <!-- <div class=\"infoI\">\n <div class=\"tooltipFormkit\">{{ props.context.attrs.info }}</div>\n </div> -->\n <input class=\"autocompleteInputfield\" :placeholder=\"props.context.attrs.placeholder\" v-model=\"inputText\"\n type=\"text\" v-on:keyup=\"getAutocompleteSuggestions($event)\" @click=\"activeList = !activeList\">\n </div>\n <ul ref=\"dropdownList\" v-show=\"activeList\" class=\"autocompleteResultList\">\n <li v-for=\"match in matches\" :key=\"match\" @click=\"setValue(match); activeList = !activeList\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{ match.name }}\n </li>\n </ul>\n <div v-if=\"instance.content.dataProviderInterface.annifIntegration && props.context.attrs.annifTheme\"\n class=\"d-flex flex-wrap\">\n <div v-for=\"item in listOfValues\" :key=\"item\">\n <div class=\"activeResultsAutocompleteWrapper\">\n <div class=\"d-flex\" @click=\"item.activeValue = !item.activeValue;\">\n <span>{{ item.name }}</span>\n <div class=\"removeX\" @click=\"removeMultipleProperty(item)\"></div>\n </div>\n </div>\n </div>\n <div class=\"w-100 mt-4\">\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h3>{{ $t('message.dataupload.info.suggestions') }}</h3>\n <!-- span>{{ $t('message.dataupload.info.suggestionText') }}</span -->\n <button class=\"navlikeButton\" type=\"button\"\n @click=\"fillAnnifsuggestions(); annifTrigger.value = true\">{{ $t('message.dataupload.info.tryIt')\n }}</button>\n </div>\n <div class=\"annifresultContainer\" v-if=\"annifTrigger.value\">\n <div v-for=\"item in annifSelectionList\" :key=\"item\" class=\"d-flex \">\n <div class=\"activeResultsAutocompleteWrapper annifResults\"\n :class=\"{ loadMore: item.resource === 'invalid' }\"\n @click=\"item.activeValue = !item.activeValue; updateAnnifselection(item)\">\n <div class=\"d-flex\">\n <span>{{ item.name }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n <div v-else class=\"d-flex flex-wrap\">\n <div class=\"activeResultsAutocompleteWrapper\" v-for=\"item in props.context.value\" :key=\"item\">\n <span>{{ item.name }}</span>\n <div class=\"removeX\" @click=\"removeMultipleProperty(item)\"></div>\n </div>\n </div>\n\n <div class=\"formkit-wrapper\">\n <div v-html=\"$t('message.dataupload.distributions.licence.vocabulary.help')\" class=\"formkit-help\"></div>\n </div>\n <!-- div class=\"formkit-wrapper\">\n <div v-html=\"props.context.help\" class=\"formkit-help\"></div>\n </div -->\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup>\nimport { ref, watch, computed, onMounted, watchEffect } from 'vue';\nimport { useStore } from 'vuex';\nimport { getTranslationFor } from \"../../utils/helpers\";\nimport { getCurrentInstance } from \"vue\";\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport { useI18n } from 'vue-i18n';\n\nimport qs from 'qs';\nimport axios from 'axios';\n\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\n\nconst props = defineProps({\n context: Object\n})\nconst store = useStore();\nconst { t,locale } = useI18n();\n\nlet listOfValues = computed(() => {\n return props.context.value;\n})\n\nlet selection;\nlet voc = props.context.attrs.voc;\n\nlet matchesSearchstring = computed(() => {\n return t('message.dataupload.info.searchVocabulary')\n})\nlet matchesNothingFound = computed(() => {\n return t('message.dataupload.info.matchesNothingFound')\n})\nlet matches = ref({\n value: { name: matchesSearchstring }\n})\nlet activeList = ref()\nlet dropdownList = ref(null)\nlet inputText = ref({})\nlet cacheList = [];\nlet annifList = [];\nlet annifTrigger = ref({\n value: false\n});\nlet initialValues = ref();\nlet annifSelectionList = ref({})\n\nonMounted(async () => {\n inputText.value = \"\"\n});\nlet inDis = computed(() => {\n try {\n if (props.context.attrs.class.includes(\"inDistribution\")) {\n return true\n }\n } catch (error) {\n\n }\n\n\n});\nwatch(matches, async () => { })\nwatch(annifSelectionList, async () => { })\n\nconst requestURIname = async (res) => {\n\n if (res != undefined) {\n let vocMatch =\n voc === \"iana-media-types\" ||\n voc === \"spdx-checksum-algorithm\";\n\n let name;\n\n await store.dispatch('dpiStore/requestResourceName', { voc: voc, uri: res, envs: instance }).then(\n (response) => {\n if (props.context.attrs.property === 'dcatde:politicalGeocodingURI') {\n if (response != undefined) {\n let result = vocMatch\n ? response.data.result.results\n .filter((dataset) => dataset.resource === res)\n .map((dataset) => dataset.alt_label)[0].en\n : getTranslationFor(response.data.result.alt_label, 'en', []);\n name = result;\n }\n } else {\n\n if (response != undefined) {\n let result = vocMatch\n ? response.data.result.results\n .filter((dataset) => dataset.resource === res)\n .map((dataset) => dataset.pref_label)[0].en\n : getTranslationFor(response.data.result.pref_label, 'en', []);\n name = result;\n\n }\n }\n }\n );\n return name\n }\n\n}\n\nwatchEffect(async () => {\n const values = listOfValues.value;\n\n // single URI's\n if (values.hasOwnProperty('name')) {\n if (values.name === values.resource) {\n let uriName;\n if (!props.context.attrs.multiple) {\n uriName = requestURIname(values.resource)\n props.context.node.input({ name: await uriName, resource: values.resource })\n\n }\n }\n }\n // multiple URI's\n if (values.length >= 1) {\n let uriNameList = [];\n for (let index = 0; index < values.length; index++) {\n if (values[index].name === values[index].resource) {\n uriNameList.push({ name: await requestURIname(values[index].resource), resource: values[index].resource })\n props.context.node.input(uriNameList)\n }\n }\n }\n});\nfunction findPropertyToUpdate(trigger) {\n\n let finalPath = { step: '', prop: props.context.node.name }\n let pathToLocalStorage = JSON.parse(localStorage.getItem('dpi_datasets'));\n\n for (let index = 0; index < Object.keys(pathToLocalStorage).length; index++) {\n for (let innerIndex = 0; innerIndex < Object.keys(pathToLocalStorage)[index].length; innerIndex++) {\n let ntry = Object.entries((pathToLocalStorage))\n try {\n Object.keys(ntry[index][innerIndex]).filter(e => {\n if (e === props.context.node.name) {\n finalPath.step = ntry[index][0]\n\n if (trigger === 'erase') {\n\n selection = {}\n pathToLocalStorage[finalPath.step][finalPath.prop] = selection\n }\n if (typeof selection === 'object') {\n\n pathToLocalStorage[finalPath.step][finalPath.prop] = selection\n }\n else pathToLocalStorage[finalPath.step][finalPath.prop] = selection\n localStorage.setItem('dpi_datasets', JSON.stringify(pathToLocalStorage))\n }\n });\n } catch (error) {\n }\n }\n }\n\n window.removeEventListener(\"click\", onClickOutside);\n}\nonClickOutside(dropdownList, event => activeList.value = false)\nlet annifHandlerTheme = async (input, limit) => {\n\n let finalLimit = 10;\n if (limit != undefined) {\n finalLimit = finalLimit + 10\n }\n\n let query = qs.stringify({\n 'text': input,\n 'limit': finalLimit\n });\n\n\n var config = {\n method: 'post',\n url: voc == \"eurovoc\"\n ? instance.content.dataProviderInterface.annifLinkSubject\n : instance.content.dataProviderInterface.annifLinkTheme,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Accept': 'application/json'\n },\n data: query\n };\n\n let list = []\n\n axios(config)\n .then(async (response) => {\n\n for (let i = 0; i < response.data.results.length; i++) {\n\n\n annifList[i] = { \"name\": response.data.results[i].label, \"resource\": response.data.results[i].uri, \"activeValue\": false }\n }\n let annifCacheList = []\n if (listOfValues.value.length > 0) {\n listOfValues.value.forEach(element => {\n annifCacheList.push({ \"name\": element.name, \"resource\": element.resource, \"activeValue\": true })\n });\n }\n if (response.data.results.length > 9) {\n annifList[annifList.length + 1] = { \"name\": \"...\", \"resource\": \"invalid\", \"activeValue\": false }\n }\n\n annifSelectionList.value = eraseDuplicates(annifCacheList, annifList)\n\n })\n .catch(function (error) {\n console.log(error);\n });\n}\nasync function updateAnnifselection(item) {\n\n if (item.resource === 'invalid') {\n fillAnnifsuggestions(5);\n }\n else {\n setValue({ name: item.name, resource: item.resource })\n fillAnnifsuggestions()\n }\n}\nfunction eraseDuplicates(array1, array2) {\n\n let mergedArray = array1.concat(array2);\n let filteredArray = [];\n let resourceSet = new Set();\n\n mergedArray.forEach(obj => {\n if (!resourceSet.has(obj.resource)) {\n resourceSet.add(obj.resource);\n if (!obj.activeValue) {\n filteredArray.push(obj);\n }\n }\n });\n\n\n return filteredArray;\n}\nconst fillAnnifsuggestions = async (limitChange) => {\n\n let arr = getNode('Mandatory').value['dct:description']\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]['@language'] === 'en') {\n if (limitChange != undefined) {\n await annifHandlerTheme(arr[i]['@value'], 5)\n }\n else await annifHandlerTheme(arr[i]['@value'])\n }\n }\n\n}\n\n// Need to append the classes to the formkit-outer element\nprops.context.classes.outer += ' autocompleteInput ' + props.context.attrs.identifier\n\nconst setValue = async (e) => {\n if (Object.keys(e).length === 1) {\n return\n }\n if (listOfValues.value.length > 0) {\n\n cacheList = listOfValues.value\n }\n\n // when its a multi input\n if (props.context.attrs.multiple) {\n // check for doubled values\n if (cacheList.length != 0) {\n let filteredProperty = { name: e.name, resource: e.resource };\n let filteredList = cacheList.filter((element) => element.name != e.name);\n filteredList.push(filteredProperty)\n selection = filteredList;\n await props.context.node.input(selection);\n\n }\n else {\n cacheList.push({ name: e.name, resource: e.resource })\n selection = cacheList\n await props.context.node.input(selection);\n }\n\n }\n else if (e.resource === \"invalid\") return\n else if (e === \"erase\") { await props.context.node.input({}); findPropertyToUpdate(e) }\n else {\n selection = { name: e.name, resource: e.resource };\n await props.context.node.input(selection);\n }\n findPropertyToUpdate();\n}\n\nconst getAutocompleteSuggestions = async (e) => {\n let innerText = e.target.value\nconsole.log(locale);\n\n\n await store.dispatch('dpiStore/requestAutocompleteSuggestions', { voc: voc, text: innerText, base: instance.api.baseUrl }).then((response) => {\n const results = response.data.result.results.map((r) => ({\n name: getTranslationFor(r.pref_label, locale.value, []) + \" (\" + r.id + \")\",\n resource: r.resource,\n }));\n if (results.length === 0) {\n matches.value = { value: { name: matchesNothingFound } }\n }\n else matches.value = results;\n });\n}\n\nfunction removeProperty(e) {\n props.context.node.input({})\n setValue('erase');\n}\nfunction removeMultipleProperty(e) {\n\n if (instance.content.dataProviderInterface.annifIntegration) {\n fillAnnifsuggestions()\n }\n if (listOfValues.value.length > 0) {\n cacheList = listOfValues.value\n }\n // Get Index in the array where all values of the Span are stored and cut it out of the list of Values\n cacheList.splice(cacheList.findIndex((element) => element.name == e.name), 1)\n selection = cacheList;\n props.context.node.input(selection);\n findPropertyToUpdate();\n}\n</script>\n"],"names":["instance","getCurrentInstance","props","__props","store","useStore","t","locale","useI18n","listOfValues","computed","selection","voc","matchesSearchstring","matchesNothingFound","matches","ref","activeList","dropdownList","inputText","cacheList","annifList","annifTrigger","annifSelectionList","onMounted","inDis","watch","requestURIname","res","vocMatch","name","response","dataset","getTranslationFor","watchEffect","values","uriName","uriNameList","index","findPropertyToUpdate","trigger","finalPath","pathToLocalStorage","innerIndex","ntry","e","onClickOutside","event","annifHandlerTheme","input","limit","finalLimit","query","qs","config","axios","i","annifCacheList","element","eraseDuplicates","error","updateAnnifselection","item","fillAnnifsuggestions","setValue","array1","array2","mergedArray","filteredArray","resourceSet","obj","limitChange","arr","getNode","filteredProperty","filteredList","getAutocompleteSuggestions","innerText","results","r","removeProperty","removeMultipleProperty"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,QAAIA,IAAWC,GAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AAE3E,UAAMC,IAAQC,GAGRC,IAAQC,GAAQ,GAChB,EAAE,GAAAC,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W,MAAM7E,EAAS,IAAI,QAAS,CAAA,EAAE,KAAK,CAAC+B,MAAa;AAC5I,cAAM+C,IAAU/C,EAAS,KAAK,OAAO,QAAQ,IAAI,CAACgD,OAAO;AAAA,UACvD,MAAM9C,EAAkB8C,EAAE,YAAYxE,EAAO,OAAO,CAAA,CAAE,IAAI,OAAOwE,EAAE,KAAK;AAAA,UACxE,UAAUA,EAAE;AAAA,QACb,EAAC;AACF,QAAID,EAAQ,WAAW,IACrB/D,EAAQ,QAAQ,EAAE,OAAO,EAAE,MAAMD,EAAmB,EAAI,IAErDC,EAAQ,QAAQ+D;AAAA,MACzB,CAAG;AAAA,IACH;AAEA,aAASE,EAAenC,GAAG;AACzB,MAAA3C,EAAM,QAAQ,KAAK,MAAM,CAAA,CAAE,GAC3B8D,EAAS,OAAO;AAAA,IAClB;AACA,aAASiB,EAAuBpC,GAAG;AAEjC,MAAI7C,EAAS,QAAQ,sBAAsB,oBACzC+D,EAAsB,GAEpBtD,EAAa,MAAM,SAAS,MAC9BW,IAAYX,EAAa,QAG3BW,EAAU,OAAOA,EAAU,UAAU,CAACsC,MAAYA,EAAQ,QAAQb,EAAE,IAAI,GAAG,CAAC,GAC5ElC,IAAYS,GACZlB,EAAM,QAAQ,KAAK,MAAMS,CAAS,GAClC4B;IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,13 @@
1
- import { ref as f, watchEffect as D, resolveComponent as E, openBlock as a, createElementBlock as n, toDisplayString as m, createTextVNode as s, unref as d, createCommentVNode as c, createElementVNode as t, withDirectives as I, isRef as V, vModelText as T, Fragment as y, renderList as _, createVNode as x, createBlock as S, createStaticVNode as U } from "vue";
1
+ import { ref as f, watchEffect as M, resolveComponent as E, openBlock as a, createElementBlock as n, toDisplayString as m, createTextVNode as s, unref as d, createCommentVNode as c, createElementVNode as t, withDirectives as I, isRef as V, vModelText as T, Fragment as y, renderList as x, createVNode as _, createBlock as S, createStaticVNode as U } from "vue";
2
2
  import A from "./AutocompleteInput.vue.mjs";
3
3
  import { onClickOutside as B } from "../../external/@vueuse/core/index";
4
- import { useRuntimeEnv as H } from "../../composables/useRuntimeEnv.mjs";
5
- import { useI18n as N } from "vue-i18n";
4
+ import { useRuntimeEnv as N } from "../../composables/useRuntimeEnv.mjs";
5
+ import { useI18n as P } from "vue-i18n";
6
6
  import "./ConditionalInput.vue2.mjs";
7
- const P = { class: "formkitProperty" }, j = {
7
+ const j = { class: "formkitProperty" }, F = {
8
8
  key: 0,
9
9
  class: "formkitHeader"
10
- }, F = {
10
+ }, H = {
11
11
  key: 1,
12
12
  class: "formkitHeader"
13
13
  }, R = {
@@ -32,10 +32,10 @@ const P = { class: "formkitProperty" }, j = {
32
32
  alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication
33
33
  deed (CC0 1.0).</p> <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have
34
34
  approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your
35
- organisation</strong> before publishing or submitting your dataset.</p> <p>If you need further information regarding copyright issues, please contact us at <span class="nobr"><a class="external-link" href="mailto:op-copyright@publications.europa.eu" target="_blank" rel="nofollow noopener">op-copyright@publications.europa.eu<sup><img class="rendericon" src="https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif" alt="" width="13" height="12" align="absmiddle" border="0"></sup></a></span></p></div>`, 1), z = { class: "formkit-wrapper" }, K = ["innerHTML"], W = {
35
+ organisation</strong> before publishing or submitting your dataset.</p> <p>If you need further information regarding copyright issues, please contact us at <span class="nobr"><a class="external-link" href="mailto:op-copyright@publications.europa.eu" target="_blank" rel="nofollow noopener">op-copyright@publications.europa.eu<sup><img class="rendericon" src="https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif" alt="" width="13" height="12" align="absmiddle" border="0"></sup></a></span></p></div>`, 1), z = {
36
36
  key: 3,
37
37
  class: "d-flex infoLicense py-5"
38
- }, Y = /* @__PURE__ */ t("svg", {
38
+ }, K = /* @__PURE__ */ t("svg", {
39
39
  xmlns: "http://www.w3.org/2000/svg",
40
40
  width: "30px",
41
41
  height: "30px",
@@ -46,7 +46,7 @@ const P = { class: "formkitProperty" }, j = {
46
46
  /* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
47
47
  /* @__PURE__ */ s(),
48
48
  /* @__PURE__ */ t("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
49
- ], -1), q = /* @__PURE__ */ t("p", { class: "textInfoI" }, [
49
+ ], -1), W = /* @__PURE__ */ t("p", { class: "textInfoI" }, [
50
50
  /* @__PURE__ */ s(`As owner of your dataset, you guarantee that it does not violate the copyright, other
51
51
  intellectual property or
52
52
  privacy rights of any third party. In particular, if third party material is included in the dataset, you must
@@ -58,47 +58,47 @@ const P = { class: "formkitProperty" }, j = {
58
58
  If you need further information regarding copyright issues, please contact us at
59
59
  `),
60
60
  /* @__PURE__ */ t("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
61
- ], -1), G = {
61
+ ], -1), Y = {
62
62
  key: 4,
63
63
  class: "formkitCmpWrap simpleConditional"
64
- }, J = { class: "m-3" }, Q = { class: "conditionalSelectDiv" }, Z = ["placeholder"], ee = { key: 0 }, te = { class: "selectListConditional" }, oe = ["onClick"], ae = { class: "conditionalManual" }, ne = {
64
+ }, q = { class: "m-3" }, G = { class: "conditionalSelectDiv" }, J = ["placeholder"], Q = { key: 0 }, Z = { class: "selectListConditional" }, ee = ["onClick"], te = { class: "conditionalManual" }, oe = {
65
65
  key: 0,
66
66
  class: "d-flex"
67
- }, se = { key: 0 }, ie = {
67
+ }, ae = { key: 0 }, ne = {
68
68
  key: 5,
69
69
  class: "formkitCmpWrap simpleConditional"
70
- }, le = { class: "m-3" }, re = { class: "conditionalSelectDiv" }, de = ["placeholder"], ce = { key: 0 }, ue = { class: "selectListConditional" }, pe = ["onClick"], me = { class: "conditionalManual" }, he = {
70
+ }, se = { class: "m-3" }, ie = { class: "conditionalSelectDiv" }, le = ["placeholder"], re = { key: 0 }, de = { class: "selectListConditional" }, ce = ["onClick"], ue = { class: "conditionalManual" }, pe = {
71
71
  key: 0,
72
72
  class: "d-flex"
73
- }, fe = {
73
+ }, me = {
74
74
  key: 0,
75
75
  class: ""
76
- }, ve = {
76
+ }, he = {
77
77
  key: 1,
78
78
  class: "conditionalVocabulary d-flex"
79
- }, ge = { class: "autocompleteInputSingleValue" }, ye = ["innerHTML"], Ie = {
79
+ }, fe = { class: "autocompleteInputSingleValue" }, ve = ["innerHTML"], Ce = {
80
80
  __name: "ConditionalInput",
81
81
  props: {
82
82
  context: Object
83
83
  },
84
- setup(L) {
85
- let b = H();
86
- const e = L, { t: k } = N();
84
+ setup($) {
85
+ let b = N();
86
+ const e = $, { t: k } = P();
87
87
  let r = f(), u = f(!1), p = f(!1);
88
- D(() => {
88
+ M(() => {
89
89
  e.context.value.name && (r.value = k("message.dataupload.datasets.conditional.vocabulary")), e.context.value["foaf:name"] && (r.value = k("message.dataupload.datasets.conditional.manually"));
90
90
  });
91
- const v = f(null), C = (i) => {
91
+ const v = f(null), C = (l) => {
92
92
  p.value = !p.value;
93
- }, M = () => {
93
+ }, D = () => {
94
94
  e.context.node.reset();
95
- }, w = (i, l) => {
96
- r.value = l, u.value = i, e.context.node.reset(), e.context.value = "";
95
+ }, w = (l, i) => {
96
+ r.value = i, u.value = l, e.context.node.reset(), e.context.value = "";
97
97
  };
98
- return B(v, (i) => p.value = !1), (i, l) => {
98
+ return B(v, (l) => p.value = !1), (l, i) => {
99
99
  const g = E("FormKit");
100
- return a(), n("div", P, [
101
- e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (a(), n("h4", j, m(i.$t("message.dataupload.distributions." + e.context.attrs.identifier + ".label")), 1)) : (a(), n("h4", F, m(i.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
100
+ return a(), n("div", j, [
101
+ e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (a(), n("h4", F, m(l.$t("message.dataupload.distributions." + e.context.attrs.identifier + ".label")), 1)) : (a(), n("h4", H, m(l.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
102
102
  s(),
103
103
  e.context.attrs.identifier === "licence" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", R, [
104
104
  O,
@@ -106,101 +106,94 @@ const P = { class: "formkitProperty" }, j = {
106
106
  X
107
107
  ])) : c("", !0),
108
108
  s(),
109
- t("div", z, [
110
- t("div", {
111
- innerHTML: i.$t("message.dataupload.distributions.licence.vocabulary.help"),
112
- class: "formkit-help"
113
- }, null, 8, K)
114
- ]),
115
- s(),
116
- e.context.attrs.identifier === "rights" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", W, [
117
- Y,
109
+ e.context.attrs.identifier === "rights" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", z, [
110
+ K,
118
111
  s(),
119
- q
112
+ W
120
113
  ])) : c("", !0),
121
114
  s(),
122
- e.context.attrs.identifier === "rights" ? (a(), n("div", G, [
123
- t("div", J, [
124
- t("div", Q, [
115
+ e.context.attrs.identifier === "rights" ? (a(), n("div", Y, [
116
+ t("div", q, [
117
+ t("div", G, [
125
118
  I(t("input", {
126
119
  ref_key: "I1",
127
120
  ref: v,
128
121
  type: "text",
129
122
  class: "conditionalSelect formkit-input formkit-inner",
130
- onClick: l[0] || (l[0] = (o) => C()),
123
+ onClick: i[0] || (i[0] = (o) => C()),
131
124
  placeholder: e.context.attrs.placeholder,
132
- "onUpdate:modelValue": l[1] || (l[1] = (o) => V(r) ? r.value = o : r = o)
133
- }, null, 8, Z), [
125
+ "onUpdate:modelValue": i[1] || (i[1] = (o) => V(r) ? r.value = o : r = o)
126
+ }, null, 8, J), [
134
127
  [T, d(r)]
135
128
  ]),
136
129
  s(),
137
- d(p) ? (a(), n("div", ee, [
138
- t("ul", te, [
139
- (a(!0), n(y, null, _(e.context.attrs.selection, (o, h) => (a(), n("li", {
130
+ d(p) ? (a(), n("div", Q, [
131
+ t("ul", Z, [
132
+ (a(!0), n(y, null, x(e.context.attrs.selection, (o, h) => (a(), n("li", {
140
133
  class: "p-2 border-b border-gray-200",
141
- onClick: ($) => w(o, i.$t("message.dataupload.datasets.conditional." + o))
142
- }, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, oe))), 256))
134
+ onClick: (L) => w(o, l.$t("message.dataupload.datasets.conditional." + o))
135
+ }, m(l.$t("message.dataupload.datasets.conditional." + o)), 9, ee))), 256))
143
136
  ])
144
137
  ])) : c("", !0)
145
138
  ]),
146
139
  s(),
147
- t("div", ae, [
148
- d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div", ne, [
149
- x(g, {
140
+ t("div", te, [
141
+ d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div", oe, [
142
+ _(g, {
150
143
  type: "url",
151
- placeholder: i.$t("message.dataupload.datasets.conditional.URL"),
144
+ placeholder: l.$t("message.dataupload.datasets.conditional.URL"),
152
145
  name: "rdfs:label",
153
146
  validation: "url",
154
147
  class: "w-100",
155
148
  identifier: "rightsUrl",
156
149
  modelValue: e.context.value["rdfs:value"],
157
- "onUpdate:modelValue": l[2] || (l[2] = (o) => e.context.value["rdfs:value"] = o)
150
+ "onUpdate:modelValue": i[2] || (i[2] = (o) => e.context.value["rdfs:value"] = o)
158
151
  }, null, 8, ["placeholder", "modelValue"])
159
152
  ])) : c("", !0)
160
153
  ]),
161
154
  s(),
162
- d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div", se, [
163
- x(g, {
155
+ d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div", ae, [
156
+ _(g, {
164
157
  type: "text",
165
- placeholder: i.$t("message.dataupload.datasets.conditional.Text"),
158
+ placeholder: l.$t("message.dataupload.datasets.conditional.Text"),
166
159
  name: "rdfs:label",
167
160
  class: "w-100",
168
161
  identifier: "rightsText",
169
162
  modelValue: e.context.value["rdfs:value"],
170
- "onUpdate:modelValue": l[3] || (l[3] = (o) => e.context.value["rdfs:value"] = o)
163
+ "onUpdate:modelValue": i[3] || (i[3] = (o) => e.context.value["rdfs:value"] = o)
171
164
  }, null, 8, ["placeholder", "modelValue"])
172
165
  ])) : c("", !0)
173
166
  ])
174
- ])) : (a(), n("div", ie, [
175
- t("div", le, [
176
- t("div", re, [
167
+ ])) : (a(), n("div", ne, [
168
+ t("div", se, [
169
+ t("div", ie, [
177
170
  I(t("input", {
178
171
  ref_key: "I1",
179
172
  ref: v,
180
173
  type: "text",
181
174
  class: "conditionalSelect formkit-input formkit-inner",
182
- onClick: l[4] || (l[4] = (o) => C()),
175
+ onClick: i[4] || (i[4] = (o) => C()),
183
176
  placeholder: e.context.attrs.placeholder,
184
- "onUpdate:modelValue": l[5] || (l[5] = (o) => V(r) ? r.value = o : r = o)
185
- }, null, 8, de), [
177
+ "onUpdate:modelValue": i[5] || (i[5] = (o) => V(r) ? r.value = o : r = o)
178
+ }, null, 8, le), [
186
179
  [T, d(r)]
187
180
  ]),
188
181
  s(),
189
- d(p) ? (a(), n("div", ce, [
190
- t("ul", ue, [
191
- (a(!0), n(y, null, _(e.context.attrs.selection, (o, h) => (a(), n("li", {
182
+ d(p) ? (a(), n("div", re, [
183
+ t("ul", de, [
184
+ (a(!0), n(y, null, x(e.context.attrs.selection, (o, h) => (a(), n("li", {
192
185
  class: "p-2 border-b border-gray-200",
193
- onClick: ($) => w(o, i.$t("message.dataupload.datasets.conditional." + o))
194
- }, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, pe))), 256))
186
+ onClick: (L) => w(o, l.$t("message.dataupload.datasets.conditional." + o))
187
+ }, m(l.$t("message.dataupload.datasets.conditional." + o)), 9, ce))), 256))
195
188
  ])
196
189
  ])) : c("", !0)
197
190
  ]),
198
191
  s(),
199
- t("div", me, [
200
- d(u) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && d(u) != "vocabulary" ? (a(), n("div", he, [
201
- (a(!0), n(y, null, _(e.context.attrs.options, (o, h) => (a(), S(g, {
192
+ t("div", ue, [
193
+ d(u) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && d(u) != "vocabulary" ? (a(), n("div", pe, [
194
+ (a(!0), n(y, null, x(e.context.attrs.options, (o, h) => (a(), S(g, {
202
195
  type: h,
203
- placeholder: i.$t("message.dataupload.datasets.individual." + o),
196
+ placeholder: l.$t("message.dataupload.datasets.individual." + o),
204
197
  name: o,
205
198
  validation: h,
206
199
  class: "w-100"
@@ -208,25 +201,25 @@ const P = { class: "formkitProperty" }, j = {
208
201
  ])) : c("", !0)
209
202
  ]),
210
203
  s(),
211
- d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div", fe, [
212
- x(A, {
204
+ d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div", me, [
205
+ _(A, {
213
206
  context: e.context
214
207
  }, null, 8, ["context"])
215
208
  ])) : c("", !0),
216
209
  s(),
217
- e.context.value.name ? (a(), n("div", ve, [
218
- t("a", ge, m(e.context.value.name), 1),
210
+ e.context.value.name ? (a(), n("div", he, [
211
+ t("a", fe, m(e.context.value.name), 1),
219
212
  s(),
220
213
  t("div", {
221
214
  class: "removeX",
222
- onClick: M
215
+ onClick: D
223
216
  })
224
217
  ])) : c("", !0),
225
218
  s(),
226
219
  t("div", {
227
220
  innerHTML: e.context.help,
228
221
  class: "formkit-help"
229
- }, null, 8, ye)
222
+ }, null, 8, ve)
230
223
  ])
231
224
  ]))
232
225
  ]);
@@ -234,6 +227,6 @@ const P = { class: "formkitProperty" }, j = {
234
227
  }
235
228
  };
236
229
  export {
237
- Ie as default
230
+ Ce as default
238
231
  };
239
232
  //# sourceMappingURL=ConditionalInput.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/ConditionalInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <!-- <h4 class=\"formkitHeader\">{{ props.context.attrs.identifier.charAt(0).toUpperCase() +\n props.context.attrs.identifier.slice(1) }}</h4> -->\n <h4 class=\"formkitHeader\"\n v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 class=\"formkitHeader\" v-else>\n {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p>For <strong>European</strong>&nbsp;<strong>Commission's datasets</strong>, bear in mind that&nbsp;<a\n class=\"external-link\" href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial\n reuse without prior authorisation, except for the material subject to the third party intellectual property\n rights. This Decision has been implemented under the&nbsp;<a class=\"external-link\"\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative\n Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the\n Commission's reuse policy. Additionally, raw data, metadata or other documents of comparable nature may\n alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication\n deed (CC0 1.0).</p>\n <p>The&nbsp;<strong>Council</strong>&nbsp;and the&nbsp;<strong>European Court of Auditors</strong>&nbsp;have\n approved similar decisions on reuse. It is advisable that you check&nbsp;<strong>the reuse policy of your\n organisation</strong>&nbsp;before publishing or submitting your dataset.</p>\n <p>If you need further information regarding copyright issues, please contact us at&nbsp;<span class=\"nobr\"><a\n class=\"external-link\" href=\"mailto:op-copyright@publications.europa.eu\" target=\"_blank\"\n rel=\"nofollow noopener\">op-copyright@publications.europa.eu<sup><img class=\"rendericon\"\n src=\"https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif\" alt=\"\" width=\"13\"\n height=\"12\" align=\"absmiddle\" border=\"0\" /></sup></a></span></p>\n\n </div>\n </div>\n <div class=\"formkit-wrapper\">\n <div v-html=\"$t('message.dataupload.distributions.licence.vocabulary.help')\" class=\"formkit-help\"></div>\n </div>\n\n\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=\"props.context.attrs.placeholder\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'URL' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" :placeholder=\"$t('message.dataupload.datasets.conditional.URL')\" name=\"rdfs:label\"\n validation=\"url\" class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\">\n </FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'Text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" :placeholder=\"$t('message.dataupload.datasets.conditional.Text')\" name=\"rdfs:label\"\n class=\"w-100\" identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n <div v-html=\"props.context.help\" class=\"formkit-help\"></div>\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>\n"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ConditionalInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/ConditionalInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <!-- <h4 class=\"formkitHeader\">{{ props.context.attrs.identifier.charAt(0).toUpperCase() +\n props.context.attrs.identifier.slice(1) }}</h4> -->\n <h4 class=\"formkitHeader\"\n v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 class=\"formkitHeader\" v-else>\n {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p>For <strong>European</strong>&nbsp;<strong>Commission's datasets</strong>, bear in mind that&nbsp;<a\n class=\"external-link\" href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial\n reuse without prior authorisation, except for the material subject to the third party intellectual property\n rights. This Decision has been implemented under the&nbsp;<a class=\"external-link\"\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative\n Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the\n Commission's reuse policy. Additionally, raw data, metadata or other documents of comparable nature may\n alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication\n deed (CC0 1.0).</p>\n <p>The&nbsp;<strong>Council</strong>&nbsp;and the&nbsp;<strong>European Court of Auditors</strong>&nbsp;have\n approved similar decisions on reuse. It is advisable that you check&nbsp;<strong>the reuse policy of your\n organisation</strong>&nbsp;before publishing or submitting your dataset.</p>\n <p>If you need further information regarding copyright issues, please contact us at&nbsp;<span class=\"nobr\"><a\n class=\"external-link\" href=\"mailto:op-copyright@publications.europa.eu\" target=\"_blank\"\n rel=\"nofollow noopener\">op-copyright@publications.europa.eu<sup><img class=\"rendericon\"\n src=\"https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif\" alt=\"\" width=\"13\"\n height=\"12\" align=\"absmiddle\" border=\"0\" /></sup></a></span></p>\n\n </div>\n </div>\n\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=\"props.context.attrs.placeholder\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'URL' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" :placeholder=\"$t('message.dataupload.datasets.conditional.URL')\" name=\"rdfs:label\"\n validation=\"url\" class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\">\n </FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'Text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" :placeholder=\"$t('message.dataupload.datasets.conditional.Text')\" name=\"rdfs:label\"\n class=\"w-100\" identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n <div v-html=\"props.context.help\" class=\"formkit-help\"></div>\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>\n"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuIA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,11 @@
1
1
  declare const _default: import('vue').DefineComponent<{
2
- value: {
2
+ modelValue: {
3
3
  type: StringConstructor;
4
4
  default: string;
5
5
  };
6
- }, any, {
6
+ }, {
7
+ locale: import('vue').Ref<string>;
8
+ }, {
7
9
  languages: {
8
10
  bg: string;
9
11
  cs: string;
@@ -30,17 +32,12 @@ declare const _default: import('vue').DefineComponent<{
30
32
  fi: string;
31
33
  sv: string;
32
34
  };
33
- }, {
34
- locale: {
35
- get(): any;
36
- set(newLocale: any): void;
37
- };
38
- }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
39
- value: {
35
+ }, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
36
+ modelValue: {
40
37
  type: StringConstructor;
41
38
  default: string;
42
39
  };
43
40
  }>>, {
44
- value: string;
41
+ modelValue: string;
45
42
  }, {}>;
46
43
  export default _default;