@piveau/piveau-hub-ui-modules 4.1.3 → 4.1.4
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.
- package/dist/data-provider-interface/DPIMenu.vue.mjs +21 -22
- package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +182 -48
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/DistributionStepper.vue.mjs +33 -32
- package/dist/data-provider-interface/components/DistributionStepper.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/FileUpload.vue.d.ts +3 -0
- package/dist/data-provider-interface/components/FileUpload.vue.mjs +146 -139
- package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +55 -44
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatap/format-types.mjs +3 -3
- package/dist/data-provider-interface/config/dcatap/format-types.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs +108 -86
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +3 -3
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +13 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.mjs +154 -111
- package/dist/data-provider-interface/views/DraftsPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.mjs +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.mjs +27 -24
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.mjs.map +1 -1
- package/dist/form/Repeatable.vue.mjs +33 -33
- package/dist/form/Repeatable.vue.mjs.map +1 -1
- package/dist/form/inputDefinitions.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/dist/scss/_dpi-style.scss +17 -3
- package/dist/store/modules/authStore.d.ts +9 -0
- package/dist/store/modules/authStore.mjs +32 -24
- package/dist/store/modules/authStore.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.vue.mjs","sources":["../../../lib/data-provider-interface/components/FileUpload.vue"],"sourcesContent":["<template>\n <div class=\"position-relative w-100 p-3 \">\n <input type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\" @click=\"triggerDropdown()\"\n placeholder=\"Choose between fileupload and providing a URL\">\n <ul ref=\"fLoad\" v-if=\"drop.active\" class=\"selectListUpload\">\n <li @click=\"triggerDropdown(); uploadFileSwitch = true; toggleUploadUrl()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Upload a file</li>\n <li @click=\"triggerDropdown(); uploadURL = true; toggleUploadFileSwitch()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Provide an URL</li>\n </ul>\n </div>\n <div class=\"w-100 p-3 position-relative\" v-if=\"uploadURL && !uploadFileSwitch\">\n <label class=\" formkit-label w-100\" for=\"aUrlLink\">Provide an URL</label>\n <input id=\"aUrlLink\" v-model=\"URLValue\" class=\"selectInputField formkit-inner\" type=\"url\" name=\"@id\"\n @input=\"saveUrl\" validation=\"alpha_spaces:latin\" validation-visibility=\"live\">\n\n </div>\n <div v-if=\"uploadFileSwitch\" ref=\"fileupload\" class=\"p-3 w-100\"\n :class=\"`formkit-input-element formkit-input-element--${context.type}`\" :data-type=\"context.type\" v-bind=\"$attrs\">\n <input type=\"text\" v-model=\"context.model\" @blur=\"context.blurHandler\" hidden />\n <div class=\"file-div position-relative\">\n <label class=\"formkit-label\" for=\"aUrlFL\">Upload a file</label>\n <input class=\"mt-3\" type=\"file\" id=\"aUrlFL\" name=\"fileUpload\" @change=\"validateFile($event)\"\n :accept=\"validExtensions\">\n <div class=\"upload-feedback position-absolute d-flex\" style=\"right: 0\">\n <div v-if=\"isLoading\" class=\"lds-ring\">\n </div>\n <div v-if=\"success\"><i class=\"material-icons d-flex check-icon\">check_circle</i></div>\n <div v-if=\"fail\"><i class=\"material-icons d-flex close-icon\">error</i></div>\n </div>\n </div>\n <p class=\"dURLText my-3\" v-if=\"success\">{{ $t('message.metadata.downloadUrl') }}: <a :href=\"context.model\">{{\n context.model }}</a></p>\n <div v-if=\"validExtensions && validExtensions.length\" class=\"allowedTypesWrapper\">\n <p class=\"errorSub my-3 d-flex \" v-if=\"!success\">Allowed types: </p>\n <div class=\"d-flex flex-wrap w-100\">\n <span v-for=\"types in validExtensions\" :key=\"types\" class=\"mr-1 mb-1 allowedFTypes \">\n {{ types }}\n </span>\n </div>\n\n </div>\n\n\n </div>\n\n</template>\n\n<script>\n/* eslint-disable consistent-return, no-unused-vars */\nimport { mapGetters, mapActions } from 'vuex';\nimport axios from 'axios';\nimport helper from '../utils/general-helper'\nimport { getNode } from '@formkit/core'\n\nimport { reactive, ref, onMounted, computed } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { getCurrentInstance } from \"vue\";\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\n\nexport default {\n props: {\n context: {\n type: Object,\n required: true,\n },\n },\n\n data() {\n return {\n error: '',\n URLValue: '',\n uploadURL: false,\n uploadFileSwitch: false,\n checkifSet: false,\n isLoading: false,\n success: false,\n fail: false,\n validExtensions: this.$env.content.dataProviderInterface.uploadFileTypes?.split(',') || []\n };\n },\n computed: {\n\n ...mapGetters('auth', [\n 'getUserData',\n 'getIsEditMode'\n ]),\n ...mapGetters('dpiStore', [\n 'getData',\n ]),\n getCatalogue() {\n return getNode('dcat:catalog').value;\n }\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n toggleUploadUrl() {\n if (this.uploadURL) { this.uploadURL = !this.uploadURL }\n },\n toggleUploadFileSwitch() {\n if (this.uploadFileSwitch) { this.uploadFileSwitch = !this.uploadFileSwitch }\n },\n validateFile(event) {\n const file = event.target.files[0];\n const fileExtension = '.' + file.name.split('.').pop().toLowerCase();\n if (this.validExtensions && this.validExtensions.length) {\n if (!this.validExtensions.includes(fileExtension)) {\n console.log('Wrong filetype');\n } else {\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n } else {\n this.error = \"\"\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n },\n async saveUrl() {\n\n if (this.URLValue.includes('http://') || this.URLValue.includes('https://')) {\n await this.context.node.input({ '@id': this.URLValue })\n }\n else await this.context.node.input({ '@id': 'https://' + this.URLValue })\n\n },\n checkIfPresent() {\n // console.log(this.context.value['@id']);\n if (this.context.value['@id']) {\n // console.log(this.context.value['@id']);\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n },\n // finds the parent input group of a given element.\n findParentInputGroupOfElement(element) {\n // Start with the given element.\n let currentElement = element;\n\n // Traverse the DOM tree upwards.\n while (currentElement) {\n // If the current element is an input group, return it.\n if (currentElement.classList.contains('formkit-input-group-repeatable')) {\n return currentElement;\n }\n // If not, move to the parent element.\n currentElement = currentElement.parentElement;\n }\n\n // If no input group was found, return null.\n return null;\n },\n // finds the index of the distribution access URL based on the root of this component.\n findDistributionAccessUrlIndex() {\n // todo: find a more stable way to find the index of the distribution access URL.\n // this way uses the DOM tree, which is not stable.\n\n // Start at the root of this component.\n const rootElement = this.$refs.fileupload;\n\n // Find the parent input group of the root element.\n const parentInputGroup = this.findParentInputGroupOfElement(rootElement);\n if (!parentInputGroup) return null;\n\n // Get the parent element of all input groups.\n const parentOfAllInputGroups = parentInputGroup.parentElement;\n const allInputGroupsNodeList = parentOfAllInputGroups.querySelectorAll('.formkit-input-group-repeatable');\n const allInputGroupsArray = Array.from(allInputGroupsNodeList);\n\n // Find the index of the parent input group within the array of all input groups.\n const indexOfParentInputGroup = allInputGroupsArray.indexOf(parentInputGroup);\n\n return indexOfParentInputGroup;\n },\n async uploadOrReplaceFile({ file }) {\n\n const replaceEnabled = this.$env?.content?.dataProviderInterface?.enableFileUploadReplace || false;\n const wantsToReplace = this.$route.query?.edit ?? false;\n\n if (replaceEnabled && wantsToReplace) {\n const distributionIndexToReplace = this.$route.query?.edit;\n const fileIndexToReplace = this.findDistributionAccessUrlIndex();\n\n const targetDistribution = this.getData('distributions')?.[distributionIndexToReplace];\n const targetFile = targetDistribution?.['dcat:accessURL']?.[fileIndexToReplace];\n const accessUrl = targetFile?.['@id'];\n if (accessUrl) {\n const fileUploadUrl = this.$env.api.fileUploadUrl;\n\n const fileId = helper.getFileIdByAccessUrl({ accessUrl, fileUploadUrl })\n\n return await this.uploadFile(file, {\n method: 'PUT',\n url: `${this.$env.api.fileUploadUrl}data/${fileId}?catalog=${this.getCatalogue}`,\n });\n }\n\n }\n\n return await this.uploadFile(file);\n },\n async uploadFile(file, options = {}) {\n\n this.isLoading = true;\n\n const form = new FormData();\n form.append('file', file);\n\n const catalog = this.getCatalogue;\n const token = this.getUserData.rtpToken;\n\n const resolvedOptions = {\n method: 'POST',\n url: `${this.$env.api.fileUploadUrl}data?catalog=${catalog}`,\n ...options,\n };\n\n const requestOptions = {\n method: resolvedOptions.method,\n url: resolvedOptions.url,\n headers: {\n 'Content-Type': 'multipart/form-data',\n Authorization: `Bearer ${token}`,\n },\n data: form,\n };\n\n try {\n\n const result = await axios.request(requestOptions);\n const path = result.data.result.location.substring(result.data.result.location.indexOf('/') + 1);\n this.context.model = `${this.$env.api.fileUploadUrl}${path}`;\n this.isLoading = false;\n this.success = true;\n await this.context.node.input({ '@id': `${this.$env.api.fileUploadUrl}${path}` })\n // this.context.rootEmit('change');\n\n } catch (err) {\n\n this.isLoading = false;\n this.fail = true;\n console.error(err); // eslint-disable-line\n }\n },\n },\n mounted() {\n\n this.$nextTick(function () {\n\n if (this.context.value['@id']) {\n this.uploadURL = true\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n })\n },\n setup() {\n\n // let instance = getCurrentInstance().appContext.app.config.globalProperties.$env\n const env = useRuntimeEnv();\n\n var drop = reactive({\n active: false,\n })\n\n const fLoad = ref(null);\n\n onClickOutside(fLoad, event => drop.active = false)\n function triggerDropdown(e) {\n drop.active = !drop.active\n }\n\n return {\n drop,\n onClickOutside,\n triggerDropdown,\n };\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n// @import '../../../styles/bootstrap_theme';\n// @import '../../../styles/utils/css-animations';\n.dURLText {}\n\n.file-div {\n display: flex;\n align-items: center;\n}\n\n.upload-feedback {\n padding: 10px;\n}\n\n/*** MATERIAL ICONS ***/\n%modal-icon {\n font-size: 20px;\n cursor: default;\n}\n\n.check-icon {\n @extend %modal-icon;\n color: #28a745;\n}\n\n.close-icon {\n @extend %modal-icon;\n color: red;\n}\n\n.lds-ring {\n display: inline-block;\n position: relative;\n width: 30px;\n height: 30px;\n}\n\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n right: 0;\n width: 30px;\n height: 30px;\n border: 8px solid lightgray;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: lightgray transparent transparent transparent;\n}\n\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n\n.error {\n color: red;\n}\n\n.errorSub {\n color: black;\n}\n\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.allowedFTypes {\n padding: 0.5rem;\n border-radius: 5px;\n border: 1px solid lightgrey;\n}\n\n.allowedTypesWrapper {\n max-width: 100%;\n display: flex;\n flex-wrap: wrap;\n}\n</style>\n"],"names":["_sfc_main","_a","mapGetters","getNode","mapActions","event","fileExtension","element","currentElement","rootElement","parentInputGroup","allInputGroupsNodeList","file","replaceEnabled","_c","_b","wantsToReplace","_d","distributionIndexToReplace","_e","fileIndexToReplace","targetDistribution","_f","targetFile","_g","accessUrl","fileUploadUrl","fileId","helper","options","form","catalog","token","resolvedOptions","requestOptions","result","axios","path","err","useRuntimeEnv","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","e","_hoisted_1","_createElementVNode","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_12","_withScopeId","_hoisted_15","_hoisted_18","_hoisted_21","_openBlock","_createElementBlock","_Fragment","$setup","_createTextVNode","_hoisted_2","_cache","$event","$data","$options","_createCommentVNode","_hoisted_3","_hoisted_4","args","_mergeProps","$props","_ctx","_vModelText","_hoisted_7","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_16","_hoisted_17","_toDisplayString","_hoisted_19","_hoisted_20","_renderList","types"],"mappings":";;;;;;;;;AA4DA,MAAKA,IAAU;AAAA,EACb,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;;AACL,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,mBAAiBC,IAAA,KAAK,KAAK,QAAQ,sBAAsB,oBAAxC,gBAAAA,EAAyD,MAAM,SAAQ,CAAC;AAAA;EAE5F;AAAA,EACD,UAAU;AAAA,IAER,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAGA,EAAW,YAAY;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,eAAe;AACb,aAAOC,EAAQ,cAAc,EAAE;AAAA,IACjC;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,YAAY;AAAA,MACxB;AAAA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AIA,EAAe,gBAAC,UAA9CR,KAAAC,EAQM,OARN0B,IAQM;AAAA,QAPoCnB,EAAO,UAlCrDE,EAAA,IAAA,EAAA,UAkCMT,EAAoE,KAApE2B,IAAiD,iBAAe;AAAA,QAlCtExB,EAAA;AAAA,QAmCMb,EAIM,OAJNQ,IAIM;AAAA,WAHJC,EAAA,EAAA,GAAAC,EAEOC,GAtCf,MAAA2B,EAoC8BrB,EAAe,iBApC7C,CAoCqBsB,YAAb7B,EAEO,QAAA;AAAA,YAFiC,KAAK6B;AAAA,YAAO,OAAM;AAAA,eACrDA,CAAK,GAAA,CAAA;;YArClBpB,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,IAAAlB,CAAA,KAAAkB,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"FileUpload.vue.mjs","sources":["../../../lib/data-provider-interface/components/FileUpload.vue"],"sourcesContent":["<template>\n \n <div class=\"position-relative w-100 \">\n <FormKit name=\"mode\" validation=\"required\" type=\"text\" class=\"selectInputField formkit-inner \" readonly=\"readonly\"\n @click=\"triggerDropdown()\" :placeholder=\"placeholderMessage\" v-model=\"inputChoice\" :validation-messages=\"{\n required: validationMessage,\n }\" />\n <ul ref=\"fLoad\" v-if=\"drop.active\" class=\"selectListUpload\">\n <li @click=\"uploadFileSwitch = true; toggleUploadUrl()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Upload a file</li>\n <li @click=\"uploadURL = true; toggleUploadFileSwitch()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Provide an URL</li>\n </ul>\n </div>\n <div class=\"w-100 position-relative\" v-if=\"uploadURL && !uploadFileSwitch\">\n\n <FormKit id=\"aUrlLink\" v-model=\"URLValue\" class=\"selectInputField formkit-inner\" type=\"url\" name=\"@id\" @input=\"saveUrl\"\n validation=\"required|url\" validation-visibility=\"live\" :validation-messages=\"{\n required: validationMessage,\n }\" />\n\n </div>\n <div v-if=\"uploadFileSwitch\" ref=\"fileupload\" class=\"p-3 w-100\"\n :class=\"`formkit-input-element formkit-input-element--${context.type}`\" :data-type=\"context.type\" v-bind=\"$attrs\">\n <input type=\"text\" v-model=\"context.model\" @blur=\"context.blurHandler\" hidden />\n <div class=\"file-div position-relative\">\n <input class=\"mt-3\" type=\"file\" id=\"aUrlFL\" name=\"fileUpload\" @change=\"validateFile($event)\"\n :accept=\"validExtensions\">\n <div class=\"upload-feedback position-absolute d-flex\" style=\"right: 0\">\n <div v-if=\"isLoading\" class=\"lds-ring\">\n </div>\n <div v-if=\"success\"><i class=\"material-icons d-flex check-icon\">check_circle</i></div>\n <div v-if=\"fail\"><i class=\"material-icons d-flex close-icon\">error</i></div>\n </div>\n </div>\n <p class=\"dURLText my-3\" v-if=\"success\">{{ $t('message.metadata.downloadUrl') }}: <a :href=\"context.model\">{{\n context.model }}</a></p>\n <div v-if=\"validExtensions && validExtensions.length\" class=\"allowedTypesWrapper\">\n <p class=\"errorSub my-3 d-flex \" v-if=\"!success\">Allowed types: </p>\n <div class=\"d-flex flex-wrap w-100\">\n <span v-for=\"types in validExtensions\" :key=\"types\" class=\"mr-1 mb-1 allowedFTypes \">\n {{ types }}\n </span>\n </div>\n\n </div>\n\n\n </div>\n\n</template>\n\n<script>\n/* eslint-disable consistent-return, no-unused-vars */\nimport { mapGetters, mapActions } from 'vuex';\nimport axios from 'axios';\nimport helper from '../utils/general-helper'\nimport { getNode } from '@formkit/core'\n\nimport { reactive, ref, onMounted, computed } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { FormKit } from '@formkit/vue';\n\nexport default {\n props: {\n context: {\n type: Object,\n required: true,\n },\n },\n\n data() {\n return {\n inputChoice: '',\n error: '',\n URLValue: '',\n uploadURL: false,\n uploadFileSwitch: false,\n checkifSet: false,\n isLoading: false,\n success: false,\n fail: false,\n validExtensions: this.$env.content.dataProviderInterface.uploadFileTypes?.split(',') || []\n };\n },\n computed: {\n\n ...mapGetters('auth', [\n 'getUserData',\n 'getIsEditMode'\n ]),\n ...mapGetters('dpiStore', [\n 'getData',\n ]),\n getCatalogue() {\n return getNode('dcat:catalog').value;\n }\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n toggleUploadUrl() {\n this.inputChoice = \"Upload a file\"\n if (this.uploadURL) { this.uploadURL = !this.uploadURL }\n },\n toggleUploadFileSwitch() {\n this.inputChoice = \"Provide an URL\"\n if (this.uploadFileSwitch) { this.uploadFileSwitch = !this.uploadFileSwitch }\n },\n validateFile(event) {\n const file = event.target.files[0];\n const fileExtension = '.' + file.name.split('.').pop().toLowerCase();\n if (this.validExtensions && this.validExtensions.length) {\n if (!this.validExtensions.includes(fileExtension)) {\n console.log('Wrong filetype');\n } else {\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n } else {\n this.error = \"\"\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n },\n async saveUrl() {\n\n if (this.URLValue.includes('http://') || this.URLValue.includes('https://')) {\n await this.context.node.input({ '@id': this.URLValue , 'mode': this.inputChoice})\n }\n else await this.context.node.input({ '@id': 'https://' + this.URLValue , 'mode': this.inputChoice})\n\n },\n checkIfPresent() {\n // console.log(this.context.value['@id']);\n if (this.context.value['@id']) {\n // console.log(this.context.value['@id']);\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n },\n // finds the parent input group of a given element.\n findParentInputGroupOfElement(element) {\n // Start with the given element.\n let currentElement = element;\n\n // Traverse the DOM tree upwards.\n while (currentElement) {\n // If the current element is an input group, return it.\n if (currentElement.classList.contains('formkit-input-group-repeatable')) {\n return currentElement;\n }\n // If not, move to the parent element.\n currentElement = currentElement.parentElement;\n }\n\n // If no input group was found, return null.\n return null;\n },\n // finds the index of the distribution access URL based on the root of this component.\n findDistributionAccessUrlIndex() {\n // todo: find a more stable way to find the index of the distribution access URL.\n // this way uses the DOM tree, which is not stable.\n\n // Start at the root of this component.\n const rootElement = this.$refs.fileupload;\n\n // Find the parent input group of the root element.\n const parentInputGroup = this.findParentInputGroupOfElement(rootElement);\n if (!parentInputGroup) return null;\n\n // Get the parent element of all input groups.\n const parentOfAllInputGroups = parentInputGroup.parentElement;\n const allInputGroupsNodeList = parentOfAllInputGroups.querySelectorAll('.formkit-input-group-repeatable');\n const allInputGroupsArray = Array.from(allInputGroupsNodeList);\n\n // Find the index of the parent input group within the array of all input groups.\n const indexOfParentInputGroup = allInputGroupsArray.indexOf(parentInputGroup);\n\n return indexOfParentInputGroup;\n },\n async uploadOrReplaceFile({ file }) {\n\n const replaceEnabled = this.$env?.content?.dataProviderInterface?.enableFileUploadReplace || false;\n const wantsToReplace = this.$route.query?.edit ?? false;\n\n if (replaceEnabled && wantsToReplace) {\n const distributionIndexToReplace = this.$route.query?.edit;\n const fileIndexToReplace = this.findDistributionAccessUrlIndex();\n\n const targetDistribution = this.getData('distributions')?.[distributionIndexToReplace];\n const targetFile = targetDistribution?.['dcat:accessURL']?.[fileIndexToReplace];\n const accessUrl = targetFile?.['@id'];\n if (accessUrl) {\n const fileUploadUrl = this.$env.api.fileUploadUrl;\n\n const fileId = helper.getFileIdByAccessUrl({ accessUrl, fileUploadUrl })\n\n return await this.uploadFile(file, {\n method: 'PUT',\n url: `${this.$env.api.fileUploadUrl}data/${fileId}?catalog=${this.getCatalogue}`,\n });\n }\n\n }\n\n return await this.uploadFile(file);\n },\n async uploadFile(file, options = {}) {\n\n this.isLoading = true;\n\n const form = new FormData();\n form.append('file', file);\n\n const catalog = this.getCatalogue;\n const token = this.getUserData.rtpToken;\n\n const resolvedOptions = {\n method: 'POST',\n url: `${this.$env.api.fileUploadUrl}data?catalog=${catalog}`,\n ...options,\n };\n\n const requestOptions = {\n method: resolvedOptions.method,\n url: resolvedOptions.url,\n headers: {\n 'Content-Type': 'multipart/form-data',\n Authorization: `Bearer ${token}`,\n },\n data: form,\n };\n\n try {\n\n const result = await axios.request(requestOptions);\n const path = result.data.result.location.substring(result.data.result.location.indexOf('/') + 1);\n this.context.model = `${this.$env.api.fileUploadUrl}${path}`;\n this.isLoading = false;\n this.success = true;\n await this.context.node.input({ '@id': `${this.$env.api.fileUploadUrl}${path}` })\n // this.context.rootEmit('change');\n\n } catch (err) {\n\n this.isLoading = false;\n this.fail = true;\n console.error(err); // eslint-disable-line\n }\n },\n },\n mounted() {\n\n this.$nextTick(function () {\n\n if (this.context.value['@id']) {\n this.uploadURL = true\n this.URLValue = this.context.value['@id']\n this.inputChoice = \"Provide an URL\"\n return true\n }\n else false\n })\n },\n setup() {\n const env = useRuntimeEnv();\n let validationMessage = 'This property is required'\n let placeholderMessage = 'Choose between fileupload and providing a URL'\n\n var drop = reactive({\n active: false,\n })\n\n\n const fLoad = ref('fload');\n\n onClickOutside(fLoad, event => {\n drop.active = false\n })\n function triggerDropdown(e) {\n drop.active = !drop.active\n }\n\n return {\n drop,\n onClickOutside,\n triggerDropdown,\n validationMessage,\n placeholderMessage\n };\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n// @import '../../../styles/bootstrap_theme';\n// @import '../../../styles/utils/css-animations';\n.dURLText {}\n\n\n.accessUrl {\n .formkit-outer {}\n}\n\n.file-div {\n display: flex;\n align-items: center;\n}\n\n.upload-feedback {\n padding: 10px;\n}\n\n/*** MATERIAL ICONS ***/\n%modal-icon {\n font-size: 20px;\n cursor: default;\n}\n\n.check-icon {\n @extend %modal-icon;\n color: #28a745;\n}\n\n.close-icon {\n @extend %modal-icon;\n color: red;\n}\n\n.lds-ring {\n display: inline-block;\n position: relative;\n width: 30px;\n height: 30px;\n}\n\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n right: 0;\n width: 30px;\n height: 30px;\n border: 8px solid lightgray;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: lightgray transparent transparent transparent;\n}\n\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n\n.error {\n color: red;\n}\n\n.errorSub {\n color: black;\n}\n\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.allowedFTypes {\n padding: 0.5rem;\n border-radius: 5px;\n border: 1px solid lightgrey;\n}\n\n.allowedTypesWrapper {\n max-width: 100%;\n display: flex;\n flex-wrap: wrap;\n}\n</style>\n"],"names":["_sfc_main","_a","mapGetters","getNode","mapActions","event","fileExtension","element","currentElement","rootElement","parentInputGroup","allInputGroupsNodeList","file","replaceEnabled","_c","_b","wantsToReplace","_d","distributionIndexToReplace","_e","fileIndexToReplace","targetDistribution","_f","targetFile","_g","accessUrl","fileUploadUrl","fileId","helper","options","form","catalog","token","resolvedOptions","requestOptions","result","axios","path","err","useRuntimeEnv","validationMessage","placeholderMessage","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","e","_hoisted_1","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_10","_withScopeId","_createElementVNode","_hoisted_13","_hoisted_16","_hoisted_19","_openBlock","_createElementBlock","_Fragment","_createVNode","_component_FormKit","$setup","$data","_cache","$event","_createTextVNode","_hoisted_2","$options","_createCommentVNode","_hoisted_3","_mergeProps","$props","_ctx","args","_vModelText","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_14","_hoisted_15","_toDisplayString","_hoisted_17","_hoisted_18","_renderList","types"],"mappings":";;;;;;;;;;AAgEA,MAAKA,IAAU;AAAA,EACb,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;;AACL,WAAO;AAAA,MACL,aAAa;AAAA,MACb,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,YAA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AA;AAAA,UAAAH,EAAA;AAAA,UA+BmBH,EAAO,WAAlBN,EAAA,GAAAC,EAAsF,OA/B9FoB,GAAAC,EAAA,KAAAV,EAAA,IAAA,EAAA;AAAA,UAAAH,EAAA;AAAA,UAgCmBH,EAAI,QAAfN,EAAA,GAAAC,EAA4E,OAhCpFsB,IAAAC,EAAA,KAAAZ,EAAA,IAAA,EAAA;AAAA;;MAAAH,EAAA;AAAA,MAmCmCH,EAAO,WAAtCN,KAAAC,EAC0B,KAD1BwB,IAC0B;AAAA,QApC9BhB,EAmC+CiB,EAAAV,EAAA,sCAAqC,MAAE,CAAA;AAAA,QAAApB,EAC5D,KAAA;AAAA,UADgE,MAAMmB,EAAO,QAAC;AAAA,aAClGA,EAAO,QAAC,KAAK,GApCnB,GAAAjB,EAAA;AAAA,YAAAc,EAAA,IAAA,EAAA;AAAA,MAAAH,EAAA;AAAA,MAqCeH,EAAe,mBAAIA,EAAe,gBAAC,UAA9CN,KAAAC,EAQM,OARN0B,IAQM;AAAA,QAPoCrB,EAAO,UAtCrDM,EAAA,IAAA,EAAA,UAsCMX,EAAoE,KAApE2B,IAAiD,iBAAe;AAAA,QAtCtEnB,EAAA;AAAA,QAuCMb,EAIM,OAJNG,IAIM;AAAA,WAHJC,EAAA,EAAA,GAAAC,EAEOC,GA1Cf,MAAA2B,EAwC8BvB,EAAe,iBAxC7C,CAwCqBwB,YAAb7B,EAEO,QAAA;AAAA,YAFiC,KAAK6B;AAAA,YAAO,OAAM;AAAA,eACrDA,CAAK,GAAA,CAAA;;YAzClBlB,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,IAAArB,CAAA,KAAAqB,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,80 +1,91 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { getNode as
|
|
4
|
-
import { onClickOutside as
|
|
5
|
-
import "axios";
|
|
6
|
-
import { useRuntimeEnv as
|
|
7
|
-
import "lodash-es";
|
|
8
|
-
import { FormKit as
|
|
1
|
+
import { computed as b, ref as n, onMounted as j, openBlock as s, createElementBlock as d, createElementVNode as u, toDisplayString as m, createTextVNode as p, createBlock as C, unref as l, isRef as x, withDirectives as q, Fragment as _, renderList as w, createCommentVNode as B, vShow as F } from "vue";
|
|
2
|
+
import { useStore as R } from "vuex";
|
|
3
|
+
import { getNode as v } from "@formkit/core";
|
|
4
|
+
import { onClickOutside as U } from "../../external/@vueuse/core/index";
|
|
5
|
+
import A from "axios";
|
|
6
|
+
import { useRuntimeEnv as D } from "../../composables/useRuntimeEnv.mjs";
|
|
7
|
+
import { has as L, isNil as N } from "lodash-es";
|
|
8
|
+
import { FormKit as S } from "@formkit/vue";
|
|
9
9
|
import "./SimpleSelect.vue2.mjs";
|
|
10
|
-
const
|
|
10
|
+
const J = { class: "formkitProperty" }, K = { class: "position-relative formkitCmpWrap" }, T = ["onClick"], $ = ["onClick"], Z = {
|
|
11
11
|
__name: "SimpleSelect",
|
|
12
12
|
props: {
|
|
13
13
|
context: Object
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
const k = async (
|
|
23
|
-
|
|
15
|
+
setup(V) {
|
|
16
|
+
const c = V, f = b(() => g.getters["auth/getUserCatalogIds"]);
|
|
17
|
+
let t = n();
|
|
18
|
+
const g = R(), h = n(null), y = n();
|
|
19
|
+
n(!0), y.value = b(() => g.getters["auth/getIsEditMode"]);
|
|
20
|
+
let i = n([]), E = D(), a = n();
|
|
21
|
+
a = v("dcat:catalog").value, U(h, (o) => t.value = !1);
|
|
22
|
+
const k = async (o) => {
|
|
23
|
+
c.context.node.input(o.id), t.value = !t.value, v("dcat:catalog").value = o.id, a = o.name;
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
let I = async () => {
|
|
26
|
+
let o;
|
|
27
|
+
await A.get(E.api.baseUrl + "search?filter=catalogue").then((e) => o = e).catch((e) => {
|
|
28
|
+
reject(e);
|
|
29
|
+
}), o.data.result.results.forEach((e) => {
|
|
30
|
+
L(e, "title") && !N(e.title) && L(e, "id") && !N(e.id) && i.value.push({ title: Object.values(e.title)[0], id: e.id });
|
|
31
|
+
}), i.value = await i.value.filter((e) => f.value.includes(e.id)).map((e) => ({ id: e.id, name: e.title }));
|
|
32
|
+
let r = JSON.parse(JSON.stringify(i.value));
|
|
33
|
+
r.length === 1 && (a = r[0].id);
|
|
34
|
+
};
|
|
35
|
+
return j(async () => {
|
|
36
|
+
I();
|
|
37
|
+
}), (o, r) => (s(), d("div", J, [
|
|
38
|
+
u("h4", null, m(c.context.label), 1),
|
|
39
|
+
p(),
|
|
40
|
+
u("div", K, [
|
|
41
|
+
y.value.value ? (s(), C(l(S), {
|
|
31
42
|
key: 0,
|
|
32
43
|
class: "autocompleteInputfield",
|
|
33
44
|
type: "text",
|
|
34
45
|
readonly: "",
|
|
35
|
-
placeholder:
|
|
36
|
-
name:
|
|
37
|
-
}, null, 8, ["placeholder", "name"])) : (
|
|
46
|
+
placeholder: l(v)("dcat:catalog").value,
|
|
47
|
+
name: c.context.node.name
|
|
48
|
+
}, null, 8, ["placeholder", "name"])) : (s(), C(l(S), {
|
|
38
49
|
key: 1,
|
|
39
50
|
class: "autocompleteInputfield",
|
|
40
|
-
modelValue:
|
|
41
|
-
"onUpdate:modelValue":
|
|
42
|
-
placeholder:
|
|
51
|
+
modelValue: l(a),
|
|
52
|
+
"onUpdate:modelValue": r[0] || (r[0] = (e) => x(a) ? a.value = e : a = e),
|
|
53
|
+
placeholder: c.context.attrs.placeholder,
|
|
43
54
|
type: "text",
|
|
44
|
-
onClick:
|
|
55
|
+
onClick: r[1] || (r[1] = (e) => x(t) ? t.value = !l(t) : t = !l(t)),
|
|
45
56
|
validation: "required",
|
|
46
57
|
mandatory: "true",
|
|
47
58
|
readonly: "",
|
|
48
59
|
"validation-messages": {
|
|
49
60
|
required: "The catalog is required"
|
|
50
61
|
},
|
|
51
|
-
name:
|
|
62
|
+
name: c.context.node.name
|
|
52
63
|
}, null, 8, ["modelValue", "placeholder", "name"])),
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
p(),
|
|
65
|
+
q(u("ul", {
|
|
55
66
|
ref_key: "dropdownList",
|
|
56
|
-
ref:
|
|
67
|
+
ref: h,
|
|
57
68
|
class: "autocompleteResultList selectListFK"
|
|
58
69
|
}, [
|
|
59
|
-
(
|
|
70
|
+
(s(!0), d(_, null, w(l(i), (e) => (s(), d("li", {
|
|
60
71
|
key: e,
|
|
61
|
-
onClick: (
|
|
72
|
+
onClick: (O) => k(e),
|
|
62
73
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
74
|
+
}, m(e.name), 9, T))), 128)),
|
|
75
|
+
p(),
|
|
76
|
+
l(i).length === 0 ? (s(!0), d(_, { key: 0 }, w(f.value, (e) => (s(), d("li", {
|
|
66
77
|
key: e,
|
|
67
|
-
onClick: (
|
|
78
|
+
onClick: (O) => k(e),
|
|
68
79
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
69
|
-
},
|
|
80
|
+
}, m(e), 9, $))), 128)) : B("", !0)
|
|
70
81
|
], 512), [
|
|
71
|
-
[
|
|
82
|
+
[F, l(t)]
|
|
72
83
|
])
|
|
73
84
|
])
|
|
74
85
|
]));
|
|
75
86
|
}
|
|
76
87
|
};
|
|
77
88
|
export {
|
|
78
|
-
|
|
89
|
+
Z as default
|
|
79
90
|
};
|
|
80
91
|
//# sourceMappingURL=SimpleSelect.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleSelect.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleSelect.vue"],"sourcesContent":["<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useStore } from 'vuex';\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport axios from 'axios'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport {\n has,\n isNil,\n} from 'lodash-es';\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps({\n context: Object\n})\n\nconst userCats = computed(() => store.getters['auth/getUserCatalogIds']);\nlet showList = ref()\
|
|
1
|
+
{"version":3,"file":"SimpleSelect.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleSelect.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.context.label }}</h4>\n\n <div class=\"position-relative formkitCmpWrap\">\n <FormKit v-if=\"isEditMode.value\" class=\"autocompleteInputfield\" type=\"text\" readonly\n :placeholder=\"getNode('dcat:catalog').value\" :name=\"props.context.node.name\" />\n <FormKit v-else class=\"autocompleteInputfield\" v-model=\"catVal\"\n :placeholder=\"props.context.attrs.placeholder\" type=\"text\" @click=\"showList = !showList\"\n validation=\"required\" mandatory=\"true\" readonly :validation-messages=\"{\n required: 'The catalog is required',\n }\" :name=\"props.context.node.name\" />\n\n <ul ref=\"dropdownList\" v-show=\"showList\" class=\"autocompleteResultList selectListFK\">\n\n <li v-for=\"match in filteredCatalogs\" :key=\"match\" @click=\"setvalue(match)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n match.name }}\n </li>\n <li v-if=\"filteredCatalogs.length === 0\" v-for=\"idMatch in userCats\" :key=\"idMatch\"\n @click=\"setvalue(idMatch)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n idMatch }}\n </li>\n </ul>\n </div>\n\n\n </div>\n\n</template>\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useStore } from 'vuex';\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport axios from 'axios'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport {\n has,\n isNil,\n} from 'lodash-es';\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps({\n context: Object\n})\n\nconst userCats = computed(() => store.getters['auth/getUserCatalogIds']);\nlet showList = ref()\nconst store = useStore()\nconst dropdownList = ref(null)\nconst isEditMode = ref()\nlet validationTrigger = ref(true)\nisEditMode.value = computed(() => store.getters['auth/getIsEditMode']);\nlet filteredCatalogs = ref([])\nlet env = useRuntimeEnv()\nlet catVal = ref()\n\ncatVal = getNode('dcat:catalog').value\n\nonClickOutside(dropdownList, event => showList.value = false)\n\nconst setvalue = async (e) => {\n validationTrigger = false\n props.context.node.input(e.id)\n showList.value = !showList.value;\n getNode('dcat:catalog').value = e.id\n catVal = e.name\n}\nlet filterCatList = async () => {\n let cache;\n await axios\n .get(env.api.baseUrl + 'search?filter=catalogue')\n .then(response => (cache = response))\n .catch((err) => {\n reject(err);\n });\n\n cache.data.result.results.forEach((e) => {\n if (has(e, 'title') && !isNil(e.title) && has(e, 'id') && !isNil(e.id)) filteredCatalogs.value.push({ title: Object.values(e.title)[0], id: e.id })\n });\n\n filteredCatalogs.value = await filteredCatalogs.value\n .filter(item => userCats.value.includes(item.id))\n .map(item => ({ id: item.id, name: item.title }));\n\n // Check if theres only one catalog and set it directly\n\n let clone = JSON.parse(JSON.stringify(filteredCatalogs.value))\n if (clone.length === 1) {\n catVal = clone[0].id\n }\n}\n\n\nonMounted(async () => {\n filterCatList();\n});\n\n</script>\n<style>\n.selectListFK {\n max-height: 20rem;\n overflow: overlay;\n overflow-x: hidden;\n}\n</style>"],"names":["props","__props","userCats","computed","store","showList","ref","useStore","dropdownList","isEditMode","filteredCatalogs","env","useRuntimeEnv","catVal","getNode","onClickOutside","event","setvalue","e","filterCatList","cache","axios","response","err","has","isNil","item","clone","onMounted"],"mappings":";;;;;;;;;;;;;;;AA4CA,UAAMA,IAAQC,GAIRC,IAAWC,EAAS,MAAMC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AAO,EAAC;AAIpD,UAAIC,IAAQ,KAAK,MAAM,KAAK,UAAUjB,EAAiB,KAAK,CAAC;AAC7D,MAAIiB,EAAM,WAAW,MACjBd,IAASc,EAAM,CAAC,EAAE;AAAA,IAE1B;AAGA,WAAAC,EAAU,YAAY;AAClB,MAAAT;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -219,7 +219,8 @@ const t = {
|
|
|
219
219
|
"skos:exactMatch",
|
|
220
220
|
"foaf:homepage",
|
|
221
221
|
"dext:isUsedBy",
|
|
222
|
-
"dcat:endpointURL"
|
|
222
|
+
"dcat:endpointURL",
|
|
223
|
+
"dct:isPartOf"
|
|
223
224
|
],
|
|
224
225
|
// {'@id': ''} mainly used for repeated links
|
|
225
226
|
id: [
|
|
@@ -237,8 +238,7 @@ const t = {
|
|
|
237
238
|
"dct:isReferencedBy",
|
|
238
239
|
"prov:wasGeneratedBy",
|
|
239
240
|
"dct:isVersionOf",
|
|
240
|
-
"dct:hasVersion"
|
|
241
|
-
"dct:isPartOf"
|
|
241
|
+
"dct:hasVersion"
|
|
242
242
|
]
|
|
243
243
|
}, n = {
|
|
244
244
|
singularURI: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-types.mjs","sources":["../../../../lib/data-provider-interface/config/dcatap/format-types.js"],"sourcesContent":["// all properties which value is a single URI\nconst singularURI = {\n datasets: [\n \"dct:publisher\",\n \"dct:accrualPeriodicity\",\n \"dct:accessRights\",\n \"dct:type\",\n // singular URIs nested within other properties\n 'vcard:hasEmail', // contact point\n 'vcard:hasURL', // contect point\n 'dext:isUsedBy', // isUsedBy\n 'foaf:mbox', // creator\n 'foaf:homepage', // creator\n 'dct:format', // page\n ],\n distributions: [\n \"dct:format\",\n \"dct:type\",\n \"dcat:mediaType\",\n \"dcatap:availability\",\n \"dcat:compressFormat\",\n \"dcat:packageFormat\",\n \"adms:status\",\n // singular URIs nested within other properties\n 'spdx:algorithm', // checksum\n 'dcat:endpointURL', // accessservice\n \"skos:exactMatch\", // license\n ],\n catalogues: [\n 'foaf:homepage', // homepage and creator\n 'dct:publisher',\n 'dct:isPartOf',\n // singular URIs nested within other properties\n 'foaf:mbox', // creator\n 'dct:format', // page\n \"skos:exactMatch\", // license\n ],\n};\n\n// all properties with multiple URI values\nconst multipleURI = {\n datasets: [\n \"dct:language\", \n \"dct:subject\", \n \"dcat:theme\",\n \"dct:spatial\",\n \"dct:source\",\n \"dcat:landingPage\",\n \"dct:relation\",\n \"dcat:qualifiedRelation\",\n \"prov:qualifiedAttribution\",\n \"dct:isReferencedBy\",\n \"prov:wasGeneratedBy\",\n \"dct:isVersionOf\",\n \"dct:hasVersion\",\n ],\n distributions: [\n \"dcat:accessURL\",\n \"dcat:downloadURL\",\n \"dct:language\",\n \"odrl:hasPolicy\",\n ],\n catalogues: [\n \"dct:hasPart\",\n 'dct:spatial',\n 'dcat:catalog',\n 'dct:language',\n ],\n};\n\n// all properties which are typed strings\nconst typedStrings = {\n datasets: [\n \"dct:issued\",\n \"dct:modified\",\n \"dcat:spatialResolutionInMeters\",\n // nested typed strings\n 'dcat:endDate',\n 'dcat:startDate',\n ],\n distributions: [\n \"dct:issued\",\n \"dct:modified\",\n \"dcat:spatialResolutionInMeters\",\n \"dcat:byteSize\",\n ],\n catalogues: [],\n};\n\n// all properties with a singular string\nconst singularString = {\n datasets: [\n \"owl:versionInfo\",\n // nested singulat strings\n 'vcard:fn', // contactPoint\n 'vcard:hasOrganizationName', // contactPoint\n 'vcard:hasTelephone', // contactPoint\n \"vcard:country_name\", // hasAddress\n \"vcard:locality\", // hasAddress\n \"vcard:postal_code\", // hasAddress\n \"vcard:street_address\", // hasAddress\n 'rdfs:label', // conformsTo and provenance\n 'foaf:name', // creator\n ],\n distributions: [\n // nested singular string\n 'spdx:checksumValue', //checksum\n 'rdfs:label', // rights !!!\n \"skos:prefLabel\", //license\n ],\n catalogues: [\n // nested singular strings\n 'rdfs:label', // conformsTo and rights\n 'foaf:name', // creator\n \"skos:prefLabel\", // license\n ],\n};\n\n// all properties which can be provided in different languages\nconst multilingualStrings = {\n datasets: [\n \"dct:title\", // also nested within page\n \"dct:description\", // also nested within page\n \"dcat:keyword\",\n \"adms:versionNotes\",\n ],\n distributions: [\n \"dct:title\", // also nested within page\n \"dct:description\", // also nested within page\n ],\n catalogues: [\n 'dct:title', \n 'dct:description', \n ],\n};\n\n// all properties which contain grouped values\nconst groupedProperties = {\n datasets: [\n 'dcat:contactPoint',\n 'dct:creator',\n 'dext:metadataExtension',\n 'dct:provenance',\n 'dct:conformsTo',\n 'foaf:page',\n 'dct:temporal',\n 'adms:identifier',\n // nested grouped properties\n 'vcard:hasAddress',\n 'skos:notation',\n ],\n distributions: [\n 'foaf:page',\n 'dcat:accessService',\n 'spdx:checksum',\n 'dct:conformsTo',\n ],\n catalogues: [\n 'dct:creator',\n 'dct:conformsTo',\n ]\n};\n\n// for properties with dynamic input type\nconst conditionalProperties = {\n datasets: [],\n distributions: [\n 'dct:license'\n ],\n catalogues: [\n 'dct:license'\n ],\n}\n\n// some properties have additional statement included which must be added to the linked data\nconst additionalPropertyTypes = {\n 'dct:temporal': 'dct:PeriodOfTime',\n 'dct:conformsTo': 'dct:Standard',\n 'foaf:page': 'foaf:Document',\n 'dct:provenance': 'dct:ProvenanceStatement',\n 'dext:metadataExtension': 'dext:MetadataExtension',\n 'spdx:checksum': 'spdx:Checksum',\n 'dcat:accessService': 'dcat:DataService',\n 'dct:license': 'dct:LicenseDocument'\n}\n\n// some inputs need URIs in diefferent formats\nconst URIformat = {\n // {'name': '', 'resource': ''} mainly needed for vocabulary data\n voc: [\n 'dct:publisher',\n 'dcat:theme',\n \"dct:accrualPeriodicity\",\n \"dct:accessRights\",\n \"dct:type\",\n \"dct:format\",\n \"dcat:mediaType\",\n \"dcatap:availability\",\n \"dcat:compressFormat\",\n \"dcat:packageFormat\",\n 'spdx:algorithm',\n \"dct:subject\",\n \"dct:language\",\n \"adms:status\",\n \"dct:spatial\",\n\n ],\n // 'URI' mainly used for mail addresses\n string: [\n 'vcard:hasEmail',\n 'vcard:hasURL',\n 'foaf:mbox',\n \"skos:exactMatch\",\n 'foaf:homepage',\n 'dext:isUsedBy',\n 'dcat:endpointURL',\n ],\n // {'@id': ''} mainly used for repeated links\n id: [\n 'dct:source',\n \"dcat:accessURL\",\n \"dcat:downloadURL\",\n \"odrl:hasPolicy\",\n \"dct:hasPart\",\n 'dcat:catalog',\n \"dct:source\",\n \"dcat:landingPage\",\n \"dct:relation\",\n \"dcat:qualifiedRelation\",\n \"prov:qualifiedAttribution\",\n \"dct:isReferencedBy\",\n \"prov:wasGeneratedBy\",\n \"dct:isVersionOf\",\n \"dct:hasVersion\",\n
|
|
1
|
+
{"version":3,"file":"format-types.mjs","sources":["../../../../lib/data-provider-interface/config/dcatap/format-types.js"],"sourcesContent":["// all properties which value is a single URI\nconst singularURI = {\n datasets: [\n \"dct:publisher\",\n \"dct:accrualPeriodicity\",\n \"dct:accessRights\",\n \"dct:type\",\n // singular URIs nested within other properties\n 'vcard:hasEmail', // contact point\n 'vcard:hasURL', // contect point\n 'dext:isUsedBy', // isUsedBy\n 'foaf:mbox', // creator\n 'foaf:homepage', // creator\n 'dct:format', // page\n ],\n distributions: [\n \"dct:format\",\n \"dct:type\",\n \"dcat:mediaType\",\n \"dcatap:availability\",\n \"dcat:compressFormat\",\n \"dcat:packageFormat\",\n \"adms:status\",\n // singular URIs nested within other properties\n 'spdx:algorithm', // checksum\n 'dcat:endpointURL', // accessservice\n \"skos:exactMatch\", // license\n ],\n catalogues: [\n 'foaf:homepage', // homepage and creator\n 'dct:publisher',\n 'dct:isPartOf',\n // singular URIs nested within other properties\n 'foaf:mbox', // creator\n 'dct:format', // page\n \"skos:exactMatch\", // license\n ],\n};\n\n// all properties with multiple URI values\nconst multipleURI = {\n datasets: [\n \"dct:language\", \n \"dct:subject\", \n \"dcat:theme\",\n \"dct:spatial\",\n \"dct:source\",\n \"dcat:landingPage\",\n \"dct:relation\",\n \"dcat:qualifiedRelation\",\n \"prov:qualifiedAttribution\",\n \"dct:isReferencedBy\",\n \"prov:wasGeneratedBy\",\n \"dct:isVersionOf\",\n \"dct:hasVersion\",\n ],\n distributions: [\n \"dcat:accessURL\",\n \"dcat:downloadURL\",\n \"dct:language\",\n \"odrl:hasPolicy\",\n ],\n catalogues: [\n \"dct:hasPart\",\n 'dct:spatial',\n 'dcat:catalog',\n 'dct:language',\n ],\n};\n\n// all properties which are typed strings\nconst typedStrings = {\n datasets: [\n \"dct:issued\",\n \"dct:modified\",\n \"dcat:spatialResolutionInMeters\",\n // nested typed strings\n 'dcat:endDate',\n 'dcat:startDate',\n ],\n distributions: [\n \"dct:issued\",\n \"dct:modified\",\n \"dcat:spatialResolutionInMeters\",\n \"dcat:byteSize\",\n ],\n catalogues: [],\n};\n\n// all properties with a singular string\nconst singularString = {\n datasets: [\n \"owl:versionInfo\",\n // nested singulat strings\n 'vcard:fn', // contactPoint\n 'vcard:hasOrganizationName', // contactPoint\n 'vcard:hasTelephone', // contactPoint\n \"vcard:country_name\", // hasAddress\n \"vcard:locality\", // hasAddress\n \"vcard:postal_code\", // hasAddress\n \"vcard:street_address\", // hasAddress\n 'rdfs:label', // conformsTo and provenance\n 'foaf:name', // creator\n ],\n distributions: [\n // nested singular string\n 'spdx:checksumValue', //checksum\n 'rdfs:label', // rights !!!\n \"skos:prefLabel\", //license\n ],\n catalogues: [\n // nested singular strings\n 'rdfs:label', // conformsTo and rights\n 'foaf:name', // creator\n \"skos:prefLabel\", // license\n ],\n};\n\n// all properties which can be provided in different languages\nconst multilingualStrings = {\n datasets: [\n \"dct:title\", // also nested within page\n \"dct:description\", // also nested within page\n \"dcat:keyword\",\n \"adms:versionNotes\",\n ],\n distributions: [\n \"dct:title\", // also nested within page\n \"dct:description\", // also nested within page\n ],\n catalogues: [\n 'dct:title', \n 'dct:description', \n ],\n};\n\n// all properties which contain grouped values\nconst groupedProperties = {\n datasets: [\n 'dcat:contactPoint',\n 'dct:creator',\n 'dext:metadataExtension',\n 'dct:provenance',\n 'dct:conformsTo',\n 'foaf:page',\n 'dct:temporal',\n 'adms:identifier',\n // nested grouped properties\n 'vcard:hasAddress',\n 'skos:notation',\n ],\n distributions: [\n 'foaf:page',\n 'dcat:accessService',\n 'spdx:checksum',\n 'dct:conformsTo',\n ],\n catalogues: [\n 'dct:creator',\n 'dct:conformsTo',\n ]\n};\n\n// for properties with dynamic input type\nconst conditionalProperties = {\n datasets: [],\n distributions: [\n 'dct:license'\n ],\n catalogues: [\n 'dct:license'\n ],\n}\n\n// some properties have additional statement included which must be added to the linked data\nconst additionalPropertyTypes = {\n 'dct:temporal': 'dct:PeriodOfTime',\n 'dct:conformsTo': 'dct:Standard',\n 'foaf:page': 'foaf:Document',\n 'dct:provenance': 'dct:ProvenanceStatement',\n 'dext:metadataExtension': 'dext:MetadataExtension',\n 'spdx:checksum': 'spdx:Checksum',\n 'dcat:accessService': 'dcat:DataService',\n 'dct:license': 'dct:LicenseDocument'\n}\n\n// some inputs need URIs in diefferent formats\nconst URIformat = {\n // {'name': '', 'resource': ''} mainly needed for vocabulary data\n voc: [\n 'dct:publisher',\n 'dcat:theme',\n \"dct:accrualPeriodicity\",\n \"dct:accessRights\",\n \"dct:type\",\n \"dct:format\",\n \"dcat:mediaType\",\n \"dcatap:availability\",\n \"dcat:compressFormat\",\n \"dcat:packageFormat\",\n 'spdx:algorithm',\n \"dct:subject\",\n \"dct:language\",\n \"adms:status\",\n \"dct:spatial\",\n\n ],\n // 'URI' mainly used for mail addresses\n string: [\n 'vcard:hasEmail',\n 'vcard:hasURL',\n 'foaf:mbox',\n \"skos:exactMatch\",\n 'foaf:homepage',\n 'dext:isUsedBy',\n 'dcat:endpointURL',\n 'dct:isPartOf',\n ],\n // {'@id': ''} mainly used for repeated links\n id: [\n 'dct:source',\n \"dcat:accessURL\",\n \"dcat:downloadURL\",\n \"odrl:hasPolicy\",\n \"dct:hasPart\",\n 'dcat:catalog',\n \"dct:source\",\n \"dcat:landingPage\",\n \"dct:relation\",\n \"dcat:qualifiedRelation\",\n \"prov:qualifiedAttribution\",\n \"dct:isReferencedBy\",\n \"prov:wasGeneratedBy\",\n \"dct:isVersionOf\",\n \"dct:hasVersion\",\n \n ]\n}\n\nexport default {\n singularURI,\n multipleURI,\n typedStrings,\n singularString,\n multilingualStrings,\n groupedProperties,\n additionalPropertyTypes,\n conditionalProperties,\n URIformat\n};\n"],"names":["singularURI","multipleURI","typedStrings","singularString","multilingualStrings","groupedProperties","conditionalProperties","additionalPropertyTypes","URIformat","formatTypes"],"mappings":"AACA,MAAMA,IAAc;AAAA,EAChB,UAAU;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,EACH;AAAA,EACD,eAAe;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,EACH;AAAA,EACD,YAAY;AAAA,IACR;AAAA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,EACH;AACL,GAGMC,IAAc;AAAA,EAChB,UAAU;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD,eAAe;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD,YAAY;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AACL,GAGMC,IAAe;AAAA,EACjB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