@piveau/piveau-hub-ui-modules 4.3.11 → 4.3.13

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 (69) hide show
  1. package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
  2. package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +29 -7
  3. package/dist/data-provider-interface/DataProviderInterface.vue.mjs +12 -69
  4. package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
  5. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +91 -2
  6. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
  7. package/dist/data-provider-interface/DataProviderInterface.vue3.mjs +5 -0
  8. package/dist/data-provider-interface/DataProviderInterface.vue3.mjs.map +1 -0
  9. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +30 -37
  10. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  11. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +103 -91
  12. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  13. package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +1 -1
  14. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs +23 -18
  15. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs.map +1 -1
  16. package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
  17. package/dist/data-provider-interface/components/Navigation.vue.d.ts +4 -4
  18. package/dist/data-provider-interface/composables/index.d.ts +2 -0
  19. package/dist/data-provider-interface/composables/useDpiContext.d.ts +17 -0
  20. package/dist/data-provider-interface/composables/useDpiContext.mjs +19 -0
  21. package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -0
  22. package/dist/data-provider-interface/composables/useDpiEditMode.d.ts +16 -0
  23. package/dist/data-provider-interface/composables/useDpiEditMode.mjs +39 -0
  24. package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -0
  25. package/dist/data-provider-interface/config/dpi-spec-config.mjs +1 -0
  26. package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
  27. package/dist/data-provider-interface/index.d.ts +2 -0
  28. package/dist/data-provider-interface/index.mjs +11 -0
  29. package/dist/data-provider-interface/index.mjs.map +1 -0
  30. package/dist/data-provider-interface/store/dpiStore.d.ts +31 -15
  31. package/dist/data-provider-interface/store/dpiStore.mjs +30 -13
  32. package/dist/data-provider-interface/store/dpiStore.mjs.map +1 -1
  33. package/dist/data-provider-interface/store/modules/autocompleteStore.d.ts +3 -1
  34. package/dist/data-provider-interface/store/modules/autocompleteStore.mjs +28 -29
  35. package/dist/data-provider-interface/store/modules/autocompleteStore.mjs.map +1 -1
  36. package/dist/data-provider-interface/store/modules/conversionStore.d.ts +6 -6
  37. package/dist/data-provider-interface/store/modules/conversionStore.mjs +21 -22
  38. package/dist/data-provider-interface/store/modules/conversionStore.mjs.map +1 -1
  39. package/dist/data-provider-interface/store/modules/formSchemaStore.d.ts +5 -3
  40. package/dist/data-provider-interface/store/modules/formSchemaStore.mjs +29 -29
  41. package/dist/data-provider-interface/store/modules/formSchemaStore.mjs.map +1 -1
  42. package/dist/data-provider-interface/store/modules/navigationStore.d.ts +1 -1
  43. package/dist/data-provider-interface/store/modules/navigationStore.mjs +13 -14
  44. package/dist/data-provider-interface/store/modules/navigationStore.mjs.map +1 -1
  45. package/dist/data-provider-interface/utils/RDFconverter.mjs +63 -60
  46. package/dist/data-provider-interface/utils/RDFconverter.mjs.map +1 -1
  47. package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +1 -1
  48. package/dist/data-provider-interface/views/InputPage.vue.d.ts +3 -3
  49. package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs +1 -1
  50. package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +1 -1
  51. package/dist/datasetDetails/DatasetDetails.vue.d.ts +1 -1
  52. package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
  53. package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +3 -3
  54. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
  55. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +3 -3
  56. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
  57. package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
  58. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
  59. package/dist/embed/EmbedDataset.vue.d.ts +1 -1
  60. package/dist/embed/EmbedDatasetSnippet.vue.d.ts +2 -2
  61. package/dist/external/@vueuse/core/index +129 -80
  62. package/dist/external/@vueuse/core/index.map +1 -1
  63. package/dist/external/@vueuse/shared/index +121 -17
  64. package/dist/external/@vueuse/shared/index.map +1 -1
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.mjs +250 -248
  67. package/dist/index.mjs.map +1 -1
  68. package/dist/piveau-hub-ui-modules.css +1 -1
  69. package/package.json +1 -1
@@ -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","removeProperty","removeMultipleProperty"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,QAAIA,IAAWC,GAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AAE3E,UAAMC,IAAQC,GAGRC,IAAQC,GAAQ,GAChB,EAAE,GAAAC,GAAE,QAAAC,MAAWC;AAErB,QAAIC,IAAeC,EAAS,MACnBR,EAAM,QAAQ,KACtB,GAEGS,GACAC,IAAMV,EAAM,QAAQ,MAAM,KAE1BW,IAAsBH,EAAS,MAC1BJ,EAAE,0CAA0C,CACpD,GACGQ,IAAsBJ,EAAS,MAC1BJ,EAAE,6CAA6C,CACvD,GACGS,IAAUC,EAAI;AAAA,MAChB,OAAO,EAAE,MAAMH,EAAqB;AAAA,IACtC,CAAC,GACGI,IAAaD,EAAK,GAClBE,IAAeF,EAAI,IAAI,GACvBG,IAAYH,EAAI,EAAE,GAClBI,IAAY,CAAA,GACZC,IAAY,CAAA,GACZC,IAAeN,EAAI;AAAA,MACrB,OAAO;AAAA,IACT,CAAC;AACmB,IAAAA,EAAM;AAC1B,QAAIO,IAAqBP,EAAI,EAAE;AAE/B,IAAAQ,GAAU,YAAY;AACpB,MAAAL,EAAU,QAAQ;AA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Q,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 </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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,QAAIA,IAAWC,GAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AAE3E,UAAMC,IAAQC,GAGRC,IAAQC,GAAQ,GAChB,EAAE,GAAAC,GAAE,QAAAC,MAAWC;AAErB,QAAIC,IAAeC,EAAS,MACnBR,EAAM,QAAQ,KACtB,GAEGS,GACAC,IAAMV,EAAM,QAAQ,MAAM,KAE1BW,IAAsBH,EAAS,MAC1BJ,EAAE,0CAA0C,CACpD,GACGQ,IAAsBJ,EAAS,MAC1BJ,EAAE,6CAA6C,CACvD,GACGS,IAAUC,EAAI;AAAA,MAChB,OAAO,EAAE,MAAMH,EAAqB;AAAA,IACtC,CAAC,GACGI,IAAaD,EAAK,GAClBE,IAAeF,EAAI,IAAI,GACvBG,IAAYH,EAAI,EAAE,GAClBI,IAAY,CAAA,GACZC,IAAY,CAAA,GACZC,IAAeN,EAAI;AAAA,MACrB,OAAO;AAAA,IACT,CAAC;AACmB,IAAAA,EAAM;AAC1B,QAAIO,IAAqBP,EAAI,EAAE;AAE/B,IAAAQ,GAAU,YAAY;AACpB,MAAAL,EAAU,QAAQ;AAAA,IACpB,CAAC;AACD,QAAIM,IAAQf,EAAS,MAAM;AACzB,UAAI;AACF,YAAIR,EAAM,QAAQ,MAAM,MAAM,SAAS,gBAAgB;AACrD,iBAAO;AAAA,MAEV,QAAe;AAAA,MAEf;AAAA,IAGH,CAAC;AACD,IAAAwB,EAAMX,GAAS,YAAY;AAAA,KAAG,GAC9BW,EAAMH,GAAoB,YAAY;AAAA,KAAG;AAEzC,UAAMI,IAAiB,OAAOC,MAAQ;AAEpC,UAAIA,KAAO,MAAW;AACpB,YAAIC,IACFjB,MAAQ,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;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,19 +1,19 @@
1
- import { ref as f, watchEffect as L, resolveComponent as M, openBlock as a, createElementBlock as n, toDisplayString as m, createTextVNode as s, unref as d, createCommentVNode as c, createElementVNode as o, withDirectives as I, isRef as V, vModelText as $, Fragment as y, renderList as x, createVNode as _, createBlock as S, createStaticVNode as U } from "vue";
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";
2
2
  import A from "./AutocompleteInput.vue.mjs";
3
3
  import { onClickOutside as B } from "../../external/@vueuse/core/index";
4
- import { useRuntimeEnv as N } from "../../composables/useRuntimeEnv.mjs";
5
- import { useI18n as P } from "vue-i18n";
4
+ import { useRuntimeEnv as H } from "../../composables/useRuntimeEnv.mjs";
5
+ import { useI18n as N } from "vue-i18n";
6
6
  import "./ConditionalInput.vue2.mjs";
7
- const j = { class: "formkitProperty" }, F = {
7
+ const P = { class: "formkitProperty" }, j = {
8
8
  key: 0,
9
9
  class: "formkitHeader"
10
- }, R = {
10
+ }, F = {
11
11
  key: 1,
12
12
  class: "formkitHeader"
13
- }, O = {
13
+ }, R = {
14
14
  key: 2,
15
15
  class: "d-flex infoLicense py-5"
16
- }, X = /* @__PURE__ */ o("svg", {
16
+ }, O = /* @__PURE__ */ t("svg", {
17
17
  xmlns: "http://www.w3.org/2000/svg",
18
18
  width: "30px",
19
19
  height: "30px",
@@ -21,10 +21,10 @@ const j = { class: "formkitProperty" }, F = {
21
21
  class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
22
22
  viewBox: "0 0 16 16"
23
23
  }, [
24
- /* @__PURE__ */ o("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" }),
24
+ /* @__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" }),
25
25
  /* @__PURE__ */ s(),
26
- /* @__PURE__ */ o("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" })
27
- ], -1), z = /* @__PURE__ */ U(`<div class="w-80"><p>For <strong>European</strong> <strong>Commission&#39;s datasets</strong>, bear in mind that <a class="external-link" href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" target="_blank" rel="nofollow noopener"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial
26
+ /* @__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" })
27
+ ], -1), X = /* @__PURE__ */ U(`<div class="w-80"><p>For <strong>European</strong> <strong>Commission&#39;s datasets</strong>, bear in mind that <a class="external-link" href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" target="_blank" rel="nofollow noopener"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial
28
28
  reuse without prior authorisation, except for the material subject to the third party intellectual property
29
29
  rights. This Decision has been implemented under the <a class="external-link" href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en" target="_blank" rel="nofollow noopener"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative
30
30
  Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the
@@ -32,10 +32,10 @@ const j = { class: "formkitProperty" }, F = {
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), H = {
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 = {
36
36
  key: 3,
37
37
  class: "d-flex infoLicense py-5"
38
- }, K = /* @__PURE__ */ o("svg", {
38
+ }, Y = /* @__PURE__ */ t("svg", {
39
39
  xmlns: "http://www.w3.org/2000/svg",
40
40
  width: "30px",
41
41
  height: "30px",
@@ -43,178 +43,190 @@ const j = { class: "formkitProperty" }, F = {
43
43
  class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
44
44
  viewBox: "0 0 16 16"
45
45
  }, [
46
- /* @__PURE__ */ o("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" }),
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
- /* @__PURE__ */ o("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), W = /* @__PURE__ */ o("p", { class: "textInfoI" }, [
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" }, [
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
53
53
  ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
54
54
  `),
55
- /* @__PURE__ */ o("br"),
56
- /* @__PURE__ */ o("br"),
55
+ /* @__PURE__ */ t("br"),
56
+ /* @__PURE__ */ t("br"),
57
57
  /* @__PURE__ */ s(`
58
58
  If you need further information regarding copyright issues, please contact us at
59
59
  `),
60
- /* @__PURE__ */ o("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
61
- ], -1), Y = {
60
+ /* @__PURE__ */ t("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
61
+ ], -1), G = {
62
62
  key: 4,
63
63
  class: "formkitCmpWrap simpleConditional"
64
- }, q = { class: "m-3" }, G = { class: "conditionalSelectDiv" }, J = ["placeholder"], Q = { key: 0 }, Z = { class: "selectListConditional" }, ee = ["onClick"], te = { class: "conditionalManual" }, oe = {
64
+ }, J = { class: "m-3" }, Q = { class: "conditionalSelectDiv" }, Z = ["placeholder"], ee = { key: 0 }, te = { class: "selectListConditional" }, oe = ["onClick"], ae = { class: "conditionalManual" }, ne = {
65
65
  key: 0,
66
66
  class: "d-flex"
67
- }, ae = { key: 0 }, ne = {
67
+ }, se = { key: 0 }, ie = {
68
68
  key: 5,
69
69
  class: "formkitCmpWrap simpleConditional"
70
- }, se = { class: "m-3" }, ie = { class: "conditionalSelectDiv" }, le = ["placeholder"], re = { key: 0 }, de = { class: "selectListConditional" }, ce = ["onClick"], ue = { class: "conditionalManual" }, pe = {
70
+ }, le = { class: "m-3" }, re = { class: "conditionalSelectDiv" }, de = ["placeholder"], ce = { key: 0 }, ue = { class: "selectListConditional" }, pe = ["onClick"], me = { class: "conditionalManual" }, he = {
71
71
  key: 0,
72
72
  class: "d-flex"
73
- }, me = {
73
+ }, fe = {
74
74
  key: 0,
75
75
  class: ""
76
- }, he = {
76
+ }, ve = {
77
77
  key: 1,
78
78
  class: "conditionalVocabulary d-flex"
79
- }, fe = { class: "autocompleteInputSingleValue" }, ke = {
79
+ }, ge = { class: "autocompleteInputSingleValue" }, ye = ["innerHTML"], Ie = {
80
80
  __name: "ConditionalInput",
81
81
  props: {
82
82
  context: Object
83
83
  },
84
- setup(D) {
85
- let b = N();
86
- const e = D, { t: k } = P();
84
+ setup(L) {
85
+ let b = H();
86
+ const e = L, { t: k } = N();
87
87
  let r = f(), u = f(!1), p = f(!1);
88
- L(() => {
88
+ D(() => {
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 = (l) => {
91
+ const v = f(null), C = (i) => {
92
92
  p.value = !p.value;
93
- }, E = () => {
93
+ }, M = () => {
94
94
  e.context.node.reset();
95
- }, w = (l, i) => {
96
- r.value = i, u.value = l, e.context.node.reset(), e.context.value = "";
95
+ }, w = (i, l) => {
96
+ r.value = l, u.value = i, e.context.node.reset(), e.context.value = "";
97
97
  };
98
- return B(v, (l) => p.value = !1), (l, i) => {
99
- const g = M("FormKit");
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", R, m(l.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
98
+ return B(v, (i) => p.value = !1), (i, l) => {
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)),
102
102
  s(),
103
- e.context.attrs.identifier === "licence" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", O, [
104
- X,
103
+ e.context.attrs.identifier === "licence" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", R, [
104
+ O,
105
105
  s(),
106
- z
106
+ X
107
107
  ])) : c("", !0),
108
108
  s(),
109
- e.context.attrs.identifier === "rights" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", H, [
110
- K,
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,
111
118
  s(),
112
- W
119
+ q
113
120
  ])) : c("", !0),
114
121
  s(),
115
- e.context.attrs.identifier === "rights" ? (a(), n("div", Y, [
116
- o("div", q, [
117
- o("div", G, [
118
- I(o("input", {
122
+ e.context.attrs.identifier === "rights" ? (a(), n("div", G, [
123
+ t("div", J, [
124
+ t("div", Q, [
125
+ I(t("input", {
119
126
  ref_key: "I1",
120
127
  ref: v,
121
128
  type: "text",
122
129
  class: "conditionalSelect formkit-input formkit-inner",
123
- onClick: i[0] || (i[0] = (t) => C()),
130
+ onClick: l[0] || (l[0] = (o) => C()),
124
131
  placeholder: e.context.attrs.placeholder,
125
- "onUpdate:modelValue": i[1] || (i[1] = (t) => V(r) ? r.value = t : r = t)
126
- }, null, 8, J), [
127
- [$, d(r)]
132
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => V(r) ? r.value = o : r = o)
133
+ }, null, 8, Z), [
134
+ [T, d(r)]
128
135
  ]),
129
136
  s(),
130
- d(p) ? (a(), n("div", Q, [
131
- o("ul", Z, [
132
- (a(!0), n(y, null, x(e.context.attrs.selection, (t, h) => (a(), n("li", {
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", {
133
140
  class: "p-2 border-b border-gray-200",
134
- onClick: (T) => w(t, l.$t("message.dataupload.datasets.conditional." + t))
135
- }, m(l.$t("message.dataupload.datasets.conditional." + t)), 9, ee))), 256))
141
+ onClick: ($) => w(o, i.$t("message.dataupload.datasets.conditional." + o))
142
+ }, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, oe))), 256))
136
143
  ])
137
144
  ])) : c("", !0)
138
145
  ]),
139
146
  s(),
140
- o("div", te, [
141
- d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div", oe, [
142
- _(g, {
147
+ t("div", ae, [
148
+ d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div", ne, [
149
+ x(g, {
143
150
  type: "url",
144
- placeholder: l.$t("message.dataupload.datasets.conditional.URL"),
151
+ placeholder: i.$t("message.dataupload.datasets.conditional.URL"),
145
152
  name: "rdfs:label",
146
153
  validation: "url",
147
154
  class: "w-100",
148
155
  identifier: "rightsUrl",
149
156
  modelValue: e.context.value["rdfs:value"],
150
- "onUpdate:modelValue": i[2] || (i[2] = (t) => e.context.value["rdfs:value"] = t)
157
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => e.context.value["rdfs:value"] = o)
151
158
  }, null, 8, ["placeholder", "modelValue"])
152
159
  ])) : c("", !0)
153
160
  ]),
154
161
  s(),
155
- d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div", ae, [
156
- _(g, {
162
+ d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div", se, [
163
+ x(g, {
157
164
  type: "text",
158
- placeholder: l.$t("message.dataupload.datasets.conditional.Text"),
165
+ placeholder: i.$t("message.dataupload.datasets.conditional.Text"),
159
166
  name: "rdfs:label",
160
167
  class: "w-100",
161
168
  identifier: "rightsText",
162
169
  modelValue: e.context.value["rdfs:value"],
163
- "onUpdate:modelValue": i[3] || (i[3] = (t) => e.context.value["rdfs:value"] = t)
170
+ "onUpdate:modelValue": l[3] || (l[3] = (o) => e.context.value["rdfs:value"] = o)
164
171
  }, null, 8, ["placeholder", "modelValue"])
165
172
  ])) : c("", !0)
166
173
  ])
167
- ])) : (a(), n("div", ne, [
168
- o("div", se, [
169
- o("div", ie, [
170
- I(o("input", {
174
+ ])) : (a(), n("div", ie, [
175
+ t("div", le, [
176
+ t("div", re, [
177
+ I(t("input", {
171
178
  ref_key: "I1",
172
179
  ref: v,
173
180
  type: "text",
174
181
  class: "conditionalSelect formkit-input formkit-inner",
175
- onClick: i[4] || (i[4] = (t) => C()),
182
+ onClick: l[4] || (l[4] = (o) => C()),
176
183
  placeholder: e.context.attrs.placeholder,
177
- "onUpdate:modelValue": i[5] || (i[5] = (t) => V(r) ? r.value = t : r = t)
178
- }, null, 8, le), [
179
- [$, d(r)]
184
+ "onUpdate:modelValue": l[5] || (l[5] = (o) => V(r) ? r.value = o : r = o)
185
+ }, null, 8, de), [
186
+ [T, d(r)]
180
187
  ]),
181
188
  s(),
182
- d(p) ? (a(), n("div", re, [
183
- o("ul", de, [
184
- (a(!0), n(y, null, x(e.context.attrs.selection, (t, h) => (a(), n("li", {
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", {
185
192
  class: "p-2 border-b border-gray-200",
186
- onClick: (T) => w(t, l.$t("message.dataupload.datasets.conditional." + t))
187
- }, m(l.$t("message.dataupload.datasets.conditional." + t)), 9, ce))), 256))
193
+ onClick: ($) => w(o, i.$t("message.dataupload.datasets.conditional." + o))
194
+ }, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, pe))), 256))
188
195
  ])
189
196
  ])) : c("", !0)
190
197
  ]),
191
198
  s(),
192
- o("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, (t, h) => (a(), S(g, {
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, {
195
202
  type: h,
196
- placeholder: l.$t("message.dataupload.datasets.individual." + t),
197
- name: t,
203
+ placeholder: i.$t("message.dataupload.datasets.individual." + o),
204
+ name: o,
198
205
  validation: h,
199
206
  class: "w-100"
200
207
  }, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
201
208
  ])) : c("", !0)
202
209
  ]),
203
210
  s(),
204
- d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div", me, [
205
- _(A, {
211
+ d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div", fe, [
212
+ x(A, {
206
213
  context: e.context
207
214
  }, null, 8, ["context"])
208
215
  ])) : c("", !0),
209
216
  s(),
210
- e.context.value.name ? (a(), n("div", he, [
211
- o("a", fe, m(e.context.value.name), 1),
217
+ e.context.value.name ? (a(), n("div", ve, [
218
+ t("a", ge, m(e.context.value.name), 1),
212
219
  s(),
213
- o("div", {
220
+ t("div", {
214
221
  class: "removeX",
215
- onClick: E
222
+ onClick: M
216
223
  })
217
- ])) : c("", !0)
224
+ ])) : c("", !0),
225
+ s(),
226
+ t("div", {
227
+ innerHTML: e.context.help,
228
+ class: "formkit-help"
229
+ }, null, 8, ye)
218
230
  ])
219
231
  ]))
220
232
  ]);
@@ -222,6 +234,6 @@ const j = { class: "formkitProperty" }, F = {
222
234
  }
223
235
  };
224
236
  export {
225
- ke as default
237
+ Ie as default
226
238
  };
227
239
  //# 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\n\n </div>\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\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>"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwIA,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 <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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,8 +5,8 @@ declare const _default: import('vue').DefineComponent<Readonly<{
5
5
  }>, any, {}, {
6
6
  token(): any;
7
7
  redirectUri(): string;
8
- getUserData: import('vuex').Computed;
9
8
  getIsDraft: import('vuex').Computed;
9
+ getUserData: import('vuex').Computed;
10
10
  }, {
11
11
  setupEditPage(): Promise<void>;
12
12
  convertToInput: import('vuex').ActionMethod;
@@ -1,13 +1,13 @@
1
- import { mapGetters as o, mapActions as r } from "vuex";
2
- import { openBlock as a, createElementBlock as n, createElementVNode as c } from "vue";
1
+ import { mapGetters as s, mapActions as o } from "vuex";
2
+ import { openBlock as i, createElementBlock as n, createElementVNode as c } from "vue";
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const h = {
4
+ const d = {
5
5
  props: ["id", "property", "catalog"],
6
6
  data() {
7
7
  return {};
8
8
  },
9
9
  computed: {
10
- ...o("auth", [
10
+ ...s("auth", [
11
11
  "getIsDraft",
12
12
  "getUserData"
13
13
  ]),
@@ -19,34 +19,39 @@ const h = {
19
19
  }
20
20
  },
21
21
  methods: {
22
- ...r("auth", [
22
+ ...o("auth", [
23
23
  "setIsEditMode",
24
24
  "setIsDraft"
25
25
  ]),
26
- ...r("dpiStore", [
26
+ ...o("dpiStore", [
27
27
  "convertToInput"
28
28
  ]),
29
29
  async setupEditPage() {
30
- let t;
31
- this.setIsEditMode(!0);
32
- const e = this.$env.content.dataProviderInterface.specification;
33
- this.getIsDraft ? (this.setIsDraft(!0), t = `${this.$env.api.hubUrl}drafts/datasets/${this.id}.nt?catalogue=${this.catalog}`, await this.convertToInput({ endpoint: t, token: this.token, property: this.property, id: this.id, specification: e })) : (this.setIsDraft(!1), this.property === "catalogues" ? (t = `${this.$env.api.hubUrl}catalogues/${this.catalog}.nt`, await this.convertToInput({ endpoint: t, token: this.token, property: this.property, id: this.catalog, specification: e })) : (t = `${this.$env.api.hubUrl}datasets/${this.id}.nt?useNormalizedId=true`, await this.convertToInput({ endpoint: t, token: this.token, property: this.property, id: this.id, specification: e }))), this.$router.push(this.redirectUri).catch(() => {
30
+ this.$router.push({
31
+ name: "DataProviderInterface-Input",
32
+ params: { property: this.property },
33
+ query: {
34
+ locale: this.$route.query.locale,
35
+ edit: !this.getIsDraft && this.property === "catalogues" ? this.catalog : this.id,
36
+ catalog: this.catalog,
37
+ fromDraft: this.getIsDraft ? "true" : void 0
38
+ }
34
39
  });
35
40
  }
36
41
  },
37
- beforeRouteEnter(t, e, s) {
38
- s((i) => {
39
- e.fullPath.startsWith(i.redirectUri) ? i.$router.go(-1) : i.setupEditPage();
42
+ beforeRouteEnter(a, e, r) {
43
+ r((t) => {
44
+ e.fullPath.startsWith(t.redirectUri) ? t.$router.go(-1) : t.setupEditPage();
40
45
  });
41
46
  }
42
- }, d = { style: { height: "370px" } }, u = /* @__PURE__ */ c("div", { class: "spinner" }, null, -1), l = [
47
+ }, h = { style: { height: "370px" } }, u = /* @__PURE__ */ c("div", { class: "spinner" }, null, -1), l = [
43
48
  u
44
49
  ];
45
- function f(t, e, s, i, $, g) {
46
- return a(), n("div", d, l);
50
+ function f(a, e, r, t, g, m) {
51
+ return i(), n("div", h, l);
47
52
  }
48
- const v = /* @__PURE__ */ p(h, [["render", f]]);
53
+ const D = /* @__PURE__ */ p(d, [["render", f]]);
49
54
  export {
50
- v as default
55
+ D as default
51
56
  };
52
57
  //# sourceMappingURL=DataFetchingComponent.vue.mjs.map