@piveau/piveau-hub-ui-modules 4.6.24 → 4.6.25

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 (36) hide show
  1. package/dist/data-provider-interface/components/FileUpload.vue.mjs +3 -5
  2. package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
  3. package/dist/data-provider-interface/components/WidgetInput.vue.d.ts +7 -0
  4. package/dist/data-provider-interface/components/WidgetInput.vue.mjs +73 -0
  5. package/dist/data-provider-interface/components/WidgetInput.vue.mjs.map +1 -0
  6. package/dist/data-provider-interface/components/WidgetInput.vue2.mjs +5 -0
  7. package/dist/data-provider-interface/components/WidgetInput.vue2.mjs.map +1 -0
  8. package/dist/data-provider-interface/config/dcatapde_BFS/format-types.mjs +276 -0
  9. package/dist/data-provider-interface/config/dcatapde_BFS/format-types.mjs.map +1 -0
  10. package/dist/data-provider-interface/config/dcatapde_BFS/input-definition.d.ts +18 -0
  11. package/dist/data-provider-interface/config/dcatapde_BFS/input-definition.mjs +2146 -0
  12. package/dist/data-provider-interface/config/dcatapde_BFS/input-definition.mjs.map +1 -0
  13. package/dist/data-provider-interface/config/dcatapde_BFS/page-content-config.mjs +24 -0
  14. package/dist/data-provider-interface/config/dcatapde_BFS/page-content-config.mjs.map +1 -0
  15. package/dist/data-provider-interface/config/dcatapde_BFS/prefixes.mjs +28 -0
  16. package/dist/data-provider-interface/config/dcatapde_BFS/prefixes.mjs.map +1 -0
  17. package/dist/data-provider-interface/config/dcatapde_BFS/vocab-prefixes.mjs +34 -0
  18. package/dist/data-provider-interface/config/dcatapde_BFS/vocab-prefixes.mjs.map +1 -0
  19. package/dist/data-provider-interface/config/dpi-spec-config.mjs +23 -11
  20. package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
  21. package/dist/data-provider-interface/store/modules/conversionStore.mjs.map +1 -1
  22. package/dist/data-provider-interface/utils/RDFconverter.mjs +340 -173
  23. package/dist/data-provider-interface/utils/RDFconverter.mjs.map +1 -1
  24. package/dist/data-provider-interface/utils/general-helper.mjs +19 -10
  25. package/dist/data-provider-interface/utils/general-helper.mjs.map +1 -1
  26. package/dist/data-provider-interface/utils/inputConverter.mjs +148 -65
  27. package/dist/data-provider-interface/utils/inputConverter.mjs.map +1 -1
  28. package/dist/data-provider-interface/views/InputPage.vue.mjs +32 -30
  29. package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
  30. package/dist/data-provider-interface/views/OverviewPage/Properties/StringProp.vue.mjs.map +1 -1
  31. package/dist/datasetDetails/properties/DatasetDetailsProperty.vue.mjs +8 -8
  32. package/dist/datasetDetails/properties/DatasetDetailsProperty.vue.mjs.map +1 -1
  33. package/dist/form/inputDefinitions.mjs +21 -16
  34. package/dist/form/inputDefinitions.mjs.map +1 -1
  35. package/dist/piveau-hub-ui-modules.css +1 -1
  36. package/package.json +1 -1
@@ -87,7 +87,7 @@ const M = E({
87
87
  var d, f, a, p, i, m, g;
88
88
  const e = ((a = (f = (d = this.$env) == null ? void 0 : d.content) == null ? void 0 : f.dataProviderInterface) == null ? void 0 : a.enableFileUploadReplace) || !1, r = ((p = this.$route.query) == null ? void 0 : p.edit) ?? !1;
89
89
  if (e && r) {
90
- const b = (i = this.$route.query) == null ? void 0 : i.edit, w = this.findDistributionAccessUrlIndex(), h = (m = this.getData("distributions")) == null ? void 0 : m[b], v = (g = h == null ? void 0 : h["dcat:accessURL"]) == null ? void 0 : g[w], U = v == null ? void 0 : v["@id"];
90
+ const w = (i = this.$route.query) == null ? void 0 : i.edit, b = this.findDistributionAccessUrlIndex(), h = (m = this.getData("distributions")) == null ? void 0 : m[w], v = (g = h == null ? void 0 : h["dcat:accessURL"]) == null ? void 0 : g[b], U = v == null ? void 0 : v["@id"];
91
91
  if (U) {
92
92
  const k = this.$env.api.fileUploadUrl, R = V.getFileIdByAccessUrl({ accessUrl: U, fileUploadUrl: k });
93
93
  return await this.uploadFile(t, {
@@ -102,9 +102,7 @@ const M = E({
102
102
  this.isLoading = !0;
103
103
  const r = new FormData();
104
104
  r.append("file", t);
105
- const d = this.catalogId;
106
- debugger;
107
- const f = this.getUserData.rtpToken, a = {
105
+ const d = this.catalogId, f = this.getUserData.rtpToken, a = {
108
106
  method: "POST",
109
107
  url: `${this.$env.api.fileUploadUrl}data?catalog=${d}`,
110
108
  ...e
@@ -298,7 +296,7 @@ function ae(t, e, r, d, f, a) {
298
296
  ], 16, J)) : u("", !0)
299
297
  ], 64);
300
298
  }
301
- const $e = /* @__PURE__ */ K(M, [["render", ae], ["__scopeId", "data-v-1ed0ff85"]]);
299
+ const $e = /* @__PURE__ */ K(M, [["render", ae], ["__scopeId", "data-v-79a163c0"]]);
302
300
  export {
303
301
  $e as default
304
302
  };
@@ -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 \">\n <FormKit name=\"mode\" validation=\"required\" type=\"text\" class=\"selectInputField formkit-inner \" readonly=\"readonly\"\n @click=\"triggerDropdown()\" :placeholder=\"t('message.dataupload.info.preferredInput')\" v-model=\"inputChoice\" :validation-messages=\"{\n required: t('message.dataupload.info.preferredInput'),\n }\" />\n <ul ref=\"fLoad\" v-if=\"drop.active\" class=\"selectListUpload fileuploadList\">\n <li @click=\"uploadFileSwitch = true; toggleUploadUrl()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{$t('message.dataupload.datasets.conditional.fileupload')}}</li>\n <li @click=\"uploadURL = true; toggleUploadFileSwitch()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{$t('message.dataupload.datasets.conditional.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\" :placeholder=\"context.attrs.placeholder\"\n @input=\"saveUrl\" validation=\"required|url\" validation-visibility=\"live\" :validation-messages=\"{\n required: t('message.dataupload.datasets.conditional.URL'),\n url: t('message.dataupload.info.urlFormat')\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\" :disabled=\"isLoading || !catalogId\">\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, defineComponent } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { FormKit, useFormKitNodeById } from '@formkit/vue';\nimport { useI18n } from 'vue-i18n';\nimport { useDpiContext } from '../composables';\n\nexport default defineComponent({\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 \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 },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n toggleUploadUrl() {\n this.inputChoice = this.t('message.dataupload.datasets.conditional.fileupload')\n if (this.uploadURL) { this.uploadURL = !this.uploadURL }\n },\n toggleUploadFileSwitch() {\n this.inputChoice = this.t('message.dataupload.datasets.conditional.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.catalogId}`,\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.catalogId;\n debugger;\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 { t } = useI18n();\n const env = useRuntimeEnv();\n \n\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 const dpiContext = useDpiContext();\n\n const catalogIdFromFormkit = useFormKitNodeById('catalog')\n\n const catalogId = computed(() =>\n // Extract from catalog input field\n catalogIdFromFormkit?.value.value\n // Try to recover if catalog is empty for some reason\n || dpiContext.value.edit?.catalog \n );\n\n return {\n drop,\n onClickOutside,\n triggerDropdown,\n t,\n catalogId,\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\n.fileuploadList {\n width: 96.7%;\n}\n</style>\n"],"names":["_sfc_main","defineComponent","_a","mapGetters","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","useI18n","useRuntimeEnv","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","e","dpiContext","useDpiContext","catalogIdFromFormkit","useFormKitNodeById","catalogId","computed","_hoisted_1","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_12","_hoisted_15","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createVNode","_component_FormKit","_ctx","_cache","$event","_createTextVNode","_hoisted_2","_createCommentVNode","_hoisted_3","_mergeProps","args","_vModelText","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_toDisplayString","_hoisted_13","_hoisted_14","_renderList","types"],"mappings":";;;;;;;;;;;;;;;AAkEA,MAAKA,IAAaC,EAAa;AAAA,EAC7B,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,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MAEN,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,EACF;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,YAAY;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,kBAAkB;AAChB,WAAK,cAAc,KAAK,EAAE,oDAAoD,GAC1E,KAAK,cAAa,KAAK,YAAY,CAAC,KAAK;AAAA,IAC9C;AAAA,IACD,yBAAyB;AACvB,WAAK,cAAc,KAAK,EAAE,6CAA6C,GACnE,KAAK,qBAAoB,KAAK,mBAAmB,CAAC,KAAK;AAAA,IAC5D;AAAA,IACD,aAAaC,GAAO;AAElB,YAAMC,IAAgB,MADTD,EAAM,OAAO,MAAM,CAAC,EACA,KAAK,MAAM,GAAG,EAAE,MAAM;AACvD,MAAI,KAAK,mBAAmB,KAAK,gBAAgB,SAC1C,KAAK,gBAAgB,SAASC,CAAa,IAG9C,KAAK,oBAAoB,EAAE,MAAMD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J,EAAqD,KAAlD,EAAA,OAAM,mCAAkC,GAAC,SAAK,EAAA;AAAA,iBAhC1EQ,EAAA,IAAA,EAAA;AAAA;;MAAAJ,EAAA,EAAA,MAAAA,EAAA,EAAA,IAAAE,EAAA;AAAA,MAmCmCH,EAAO,WAAtCN,KAAAC,EAC0B,KAD1BmB,IAC0B;AAAA,QApC9BX,EAmC+CY,EAAAf,EAAA,sCAAqC,MAAE,CAAA;AAAA,QAAAH,EAC5D,KAAA;AAAA,UADgE,MAAMG,EAAO,QAAC;AAAA,aAClGA,EAAO,QAAC,KAAK,GApCnB,GAAAR,EAAA;AAAA,YAAAa,EAAA,IAAA,EAAA;AAAA,MAAAJ,EAAA,EAAA,MAAAA,EAAA,EAAA,IAAAE,EAAA;AAAA,MAqCeH,EAAe,mBAAIA,EAAe,gBAAC,UAA9CN,KAAAC,EAQM,OARNqB,IAQM;AAAA,QAPoChB,EAAO,UAtCrDK,EAAA,IAAA,EAAA,UAsCMV,EAAoE,KAApEsB,IAAiD,iBAAe;AAAA,QAtCtEhB,EAAA,EAAA,MAAAA,EAAA,EAAA,IAAAE,EAAA;AAAA,QAuCMN,EAIM,OAJNJ,IAIM;AAAA,WAHJC,EAAA,EAAA,GAAAC,EAEOC,GA1Cf,MAAAsB,EAwC8BlB,EAAe,iBAxC7C,CAwCqBmB,YAAbxB,EAEO,QAAA;AAAA,YAFiC,KAAKwB;AAAA,YAAO,OAAM;AAAA,eACrDA,CAAK,GAAA,CAAA;;YAzClBd,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,IAAAhB,CAAA,KAAAgB,EAAA,IAAA,EAAA;AAAA;;;"}
1
+ {"version":3,"file":"FileUpload.vue.mjs","sources":["../../../lib/data-provider-interface/components/FileUpload.vue"],"sourcesContent":["<template>\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=\"t('message.dataupload.info.preferredInput')\" v-model=\"inputChoice\" :validation-messages=\"{\n required: t('message.dataupload.info.preferredInput'),\n }\" />\n <ul ref=\"fLoad\" v-if=\"drop.active\" class=\"selectListUpload fileuploadList\">\n <li @click=\"uploadFileSwitch = true; toggleUploadUrl()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{$t('message.dataupload.datasets.conditional.fileupload')}}</li>\n <li @click=\"uploadURL = true; toggleUploadFileSwitch()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{$t('message.dataupload.datasets.conditional.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\" :placeholder=\"context.attrs.placeholder\"\n @input=\"saveUrl\" validation=\"required|url\" validation-visibility=\"live\" :validation-messages=\"{\n required: t('message.dataupload.datasets.conditional.URL'),\n url: t('message.dataupload.info.urlFormat')\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\" :disabled=\"isLoading || !catalogId\">\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, defineComponent } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { FormKit, useFormKitNodeById } from '@formkit/vue';\nimport { useI18n } from 'vue-i18n';\nimport { useDpiContext } from '../composables';\n\nexport default defineComponent({\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 \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 },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n toggleUploadUrl() {\n this.inputChoice = this.t('message.dataupload.datasets.conditional.fileupload')\n if (this.uploadURL) { this.uploadURL = !this.uploadURL }\n },\n toggleUploadFileSwitch() {\n this.inputChoice = this.t('message.dataupload.datasets.conditional.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.catalogId}`,\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.catalogId;\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 { t } = useI18n();\n const env = useRuntimeEnv();\n \n\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 const dpiContext = useDpiContext();\n\n const catalogIdFromFormkit = useFormKitNodeById('catalog')\n\n const catalogId = computed(() =>\n // Extract from catalog input field\n catalogIdFromFormkit?.value.value\n // Try to recover if catalog is empty for some reason\n || dpiContext.value.edit?.catalog \n );\n\n return {\n drop,\n onClickOutside,\n triggerDropdown,\n t,\n catalogId,\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\n.fileuploadList {\n width: 96.7%;\n}\n</style>\n"],"names":["_sfc_main","defineComponent","_a","mapGetters","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","useI18n","useRuntimeEnv","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","e","dpiContext","useDpiContext","catalogIdFromFormkit","useFormKitNodeById","catalogId","computed","_hoisted_1","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_12","_hoisted_15","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createVNode","_component_FormKit","_ctx","_cache","$event","_createTextVNode","_hoisted_2","_createCommentVNode","_hoisted_3","_mergeProps","args","_vModelText","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_toDisplayString","_hoisted_13","_hoisted_14","_renderList","types"],"mappings":";;;;;;;;;;;;;;;AAkEA,MAAKA,IAAaC,EAAa;AAAA,EAC7B,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,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MAEN,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,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IM,OAJNJ,IAIM;AAAA,WAHJC,EAAA,EAAA,GAAAC,EAEOC,GA1Cf,MAAAsB,EAwC8BlB,EAAe,iBAxC7C,CAwCqBmB,YAAbxB,EAEO,QAAA;AAAA,YAFiC,KAAKwB;AAAA,YAAO,OAAM;AAAA,eACrDA,CAAK,GAAA,CAAA;;YAzClBd,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,IAAAhB,CAAA,KAAAgB,EAAA,IAAA,EAAA;AAAA;;;"}
@@ -0,0 +1,7 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ context?: Record<string, any> | undefined;
3
+ $props: {
4
+ readonly context?: Record<string, any> | undefined;
5
+ };
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
@@ -0,0 +1,73 @@
1
+ import { ref as n, openBlock as r, createElementBlock as u, createElementVNode as s, createTextVNode as p, unref as g, withDirectives as _, Fragment as k, renderList as y, toDisplayString as C, vShow as D, normalizeClass as w, createCommentVNode as h } from "vue";
2
+ import { getNode as m } from "@formkit/core";
3
+ import "./WidgetInput.vue2.mjs";
4
+ import B from "../../_virtual/_plugin-vue_export-helper.mjs";
5
+ const I = { class: "formkitProperty" }, N = { class: "formkitCmpWrap d-flex p-3 w-100" }, T = { class: "formkit-inner" }, V = ["value"], S = {
6
+ ref: "dropdownListWidget",
7
+ class: "autocompleteResultList"
8
+ }, q = ["onClick"], A = {
9
+ __name: "WidgetInput",
10
+ props: {
11
+ context: Object
12
+ },
13
+ setup(b) {
14
+ const t = b;
15
+ let v = n(m("Distributions").value.distributionList), a = n(!1);
16
+ const L = () => {
17
+ f(), t.context.value.type != "LeadingWidget" && !c.value ? (t.context.node.input("LeadingWidget"), a.value = !a.value) : (c.value = !1, a.value = !1, i.value = "Widget", t.context.node.input("Widget"));
18
+ }, l = n(!1), W = n(["Distribution", "Widget", "Report"]);
19
+ let c = n(!1), i = n("");
20
+ t.context.value != null ? t.context.value === "LeadingWidget" ? i.value = "Widget" : i.value = t.context.value : i.value = "Distribution", console.log(i);
21
+ const f = () => {
22
+ v.value = m("Distributions").value.distributionList;
23
+ for (let o = 0; o < v.value.length; o++)
24
+ v.value[o].Mandatory["pv:DistributionType"] === "LeadingWidget" && (c.value = !0);
25
+ }, x = (o) => {
26
+ f(), t.context.node.input(o), i.value = o;
27
+ };
28
+ return (o, e) => (r(), u("div", I, [
29
+ e[3] || (e[3] = s("h4", { class: "" }, "Tag", -1)),
30
+ e[4] || (e[4] = p()),
31
+ s("div", N, [
32
+ s("div", T, [
33
+ s("input", {
34
+ readonly: "",
35
+ placeholder: "Wählen Sie die Art des Widgets aus",
36
+ class: "formkit-input",
37
+ type: "text",
38
+ name: "mode",
39
+ "aria-required": "true",
40
+ value: g(i),
41
+ "aria-describedby": "input_164-rule_required",
42
+ onClick: e[0] || (e[0] = (d) => l.value = !l.value)
43
+ }, null, 8, V),
44
+ e[1] || (e[1] = p()),
45
+ _(s("ul", S, [
46
+ (r(!0), u(k, null, y(W.value, (d) => (r(), u("li", {
47
+ key: d,
48
+ onClick: (E) => {
49
+ x(d), l.value = !l.value;
50
+ },
51
+ class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
52
+ }, C(d), 9, q))), 128))
53
+ ], 512), [
54
+ [D, l.value]
55
+ ])
56
+ ]),
57
+ e[2] || (e[2] = p()),
58
+ g(i) === "Widget" ? (r(), u("button", {
59
+ key: 0,
60
+ class: w(["ml-3 widgetButton", { activeLeading: g(a) || t.context.value === "LeadingWidget" }]),
61
+ type: "button",
62
+ onClick: L
63
+ }, `
64
+ Leading
65
+ `, 2)) : h("", !0)
66
+ ])
67
+ ]));
68
+ }
69
+ }, z = /* @__PURE__ */ B(A, [["__scopeId", "data-v-b72bd63e"]]);
70
+ export {
71
+ z as default
72
+ };
73
+ //# sourceMappingURL=WidgetInput.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/WidgetInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4 class=\"\">Tag</h4>\n\n <div class=\"formkitCmpWrap d-flex p-3 w-100\">\n\n <div class=\"formkit-inner\">\n <input readonly=\"\" placeholder=\"Wählen Sie die Art des Widgets aus\" class=\"formkit-input\" type=\"text\"\n name=\"mode\" aria-required=\"true\" :value=\"widgetType\" aria-describedby=\"input_164-rule_required\"\n @click=\"activeList = !activeList\">\n <ul ref=\"dropdownListWidget\" 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\n }}\n </li>\n </ul>\n </div>\n\n <!-- Liste Distribution/ Widget/ Report --- leading kann nur 1 sein und auch nur ein widget -->\n <button class=\"ml-3 widgetButton\" v-if=\"widgetType === 'Widget' \"\n :class=\"{ activeLeading: activeButton || props.context.value === 'LeadingWidget', }\" type=\"button\"\n @click=\"isLeading\">\n Leading\n </button>\n </div>\n </div>\n\n\n\n</template>\n<script setup>\nimport { ref, watch } from 'vue';\nimport { getNode } from '@formkit/core'\n\nconst props = defineProps({\n context: Object\n})\nlet disList = ref(getNode('Distributions').value['distributionList'])\nlet activeButton = ref(false)\n\nconst isLeading = () => {\n\n checkForLead()\n\n // console.log(props.context.value['type']);\n if (props.context.value['type'] != 'LeadingWidget' && !activeLeadingWidget.value) {\n props.context.node.input('LeadingWidget')\n activeButton.value = !activeButton.value\n } else {\n activeLeadingWidget.value = false\n activeButton.value = false\n widgetType.value = \"Widget\"\n props.context.node.input('Widget')\n }\n\n}\nconst activeList = ref(false)\nconst matches = ref(['Distribution', 'Widget', 'Report'])\nlet activeLeadingWidget = ref(false)\nlet widgetType = ref('')\n\n\n// Init every dis as distribution if there's nothing set - default state\n\n\nif (props.context.value != undefined) {\n if (props.context.value === 'LeadingWidget') {\n widgetType.value = 'Widget'\n } else widgetType.value = props.context.value\n} else widgetType.value = 'Distribution'\n\nconsole.log(widgetType);\n\n\nconst checkForLead = () => {\n disList.value = getNode('Distributions').value['distributionList']\n for (let index = 0; index < disList.value.length; index++) {\n \n if (disList.value[index]['Mandatory']['pv:DistributionType'] === 'LeadingWidget') {\n activeLeadingWidget.value = true\n }\n\n }\n}\n\nconst setValue = (item) => {\n checkForLead()\n props.context.node.input(item)\n widgetType.value = item\n}\n</script>\n<style scoped>\n.formkit-inner:focus-within {\n margin-top: 0;\n}\n\n.formkit-inner {\n\n flex-grow: 1;\n\n}\n\n.formkitCmpWrap {\n position: relative;\n}\n\n.widgetButton {\n border-color: lightgray;\n\n &:hover {\n background-color: green;\n color: white;\n }\n\n}\n\n.activeLeading {\n background-color: green;\n color: white;\n border-color: green;\n\n}\n</style>"],"names":["props","__props","disList","ref","getNode","activeButton","isLeading","checkForLead","activeLeadingWidget","widgetType","activeList","matches","index","setValue","item"],"mappings":";;;;;;;;;;;;;AAkCA,UAAMA,IAAQC;AAGX,QAACC,IAAUC,EAAIC,EAAQ,eAAe,EAAE,MAAM,gBAAmB,GAChEC,IAAeF,EAAI,EAAK;AAE5B,UAAMG,IAAY,MAAM;AAEpB,MAAAC,EAAa,GAGTP,EAAM,QAAQ,MAAM,QAAW,mBAAmB,CAACQ,EAAoB,SACvER,EAAM,QAAQ,KAAK,MAAM,eAAe,GACxCK,EAAa,QAAQ,CAACA,EAAa,UAEnCG,EAAoB,QAAQ,IAC5BH,EAAa,QAAQ,IACrBI,EAAW,QAAQ,UACnBT,EAAM,QAAQ,KAAK,MAAM,QAAQ;AAAA,IAGzC,GACMU,IAAaP,EAAI,EAAK,GACtBQ,IAAUR,EAAI,CAAC,gBAAgB,UAAU,QAAQ,CAAC;AACxD,QAAIK,IAAsBL,EAAI,EAAK,GAC/BM,IAAaN,EAAI,EAAE;AAMrB,IAAEH,EAAM,QAAQ,SAAS,OACnBA,EAAM,QAAQ,UAAU,kBACxBS,EAAW,QAAQ,WAChBA,EAAW,QAAQT,EAAM,QAAQ,QACrCS,EAAW,QAAQ,gBAE1B,QAAQ,IAAIA,CAAU;AAGtB,UAAMF,IAAe,MAAM;AACvB,MAAAL,EAAQ,QAAQE,EAAQ,eAAe,EAAE,MAAM;AAC/C,eAASQ,IAAQ,GAAGA,IAAQV,EAAQ,MAAM,QAAQU;AAE9C,QAAIV,EAAQ,MAAMU,CAAK,EAAE,UAAa,qBAAqB,MAAM,oBAC7DJ,EAAoB,QAAQ;AAAA,IAIxC,GAEMK,IAAW,CAACC,MAAS;AACvB,MAAAP,EAAa,GACbP,EAAM,QAAQ,KAAK,MAAMc,CAAI,GAC7BL,EAAW,QAAQK;AAAA,IACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
5
+ //# sourceMappingURL=WidgetInput.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetInput.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,276 @@
1
+ const t = {
2
+ datasets: [
3
+ "dct:accrualPeriodicity",
4
+ "dct:accessRights",
5
+ "dct:type",
6
+ "dcatap:availability",
7
+ "dcatde:qualityProcessURI",
8
+ // singular URIs nested within other properties
9
+ "vcard:hasEmail",
10
+ // contact point
11
+ "vcard:hasURL",
12
+ // contect point
13
+ "dext:isUsedBy",
14
+ // isUsedBy
15
+ "foaf:mbox",
16
+ // creator, publisher
17
+ "foaf:homepage",
18
+ // creator, publisher
19
+ "dct:format"
20
+ // page
21
+ ],
22
+ distributions: [
23
+ "dct:format",
24
+ "dct:type",
25
+ "dcat:mediaType",
26
+ "dcatap:availability",
27
+ "dcat:compressFormat",
28
+ "dcat:packageFormat",
29
+ "adms:status",
30
+ // singular URIs nested within other properties
31
+ "spdx:algorithm",
32
+ // checksum
33
+ "dcat:endpointURL",
34
+ // accessservice
35
+ "skos:exactMatch",
36
+ // license,
37
+ "dct:license"
38
+ ],
39
+ catalogues: [
40
+ "foaf:homepage",
41
+ // homepage and creator
42
+ "dct:isPartOf",
43
+ // singular URIs nested within other properties
44
+ "foaf:mbox",
45
+ // creator
46
+ "dct:format",
47
+ // page
48
+ "skos:exactMatch"
49
+ // license
50
+ ]
51
+ }, a = {
52
+ datasets: [
53
+ "dcatde:politicalGeocodingLevelURI",
54
+ "dcatde:politicalGeocodingURI",
55
+ "dcatde:contributorID",
56
+ "dct:language",
57
+ "dct:subject",
58
+ "dcat:theme",
59
+ "dct:source",
60
+ "dcat:landingPage",
61
+ "dct:relation",
62
+ "dcat:qualifiedRelation",
63
+ "prov:qualifiedAttribution",
64
+ "dct:isReferencedBy",
65
+ "prov:wasGeneratedBy",
66
+ "dct:isVersionOf",
67
+ "dct:hasVersion",
68
+ "dct:references",
69
+ "dct:spatial"
70
+ ],
71
+ distributions: [
72
+ "dcat:accessURL",
73
+ "dcat:downloadURL",
74
+ "dct:language",
75
+ "odrl:hasPolicy"
76
+ ],
77
+ catalogues: [
78
+ "dct:hasPart",
79
+ "dcat:catalog",
80
+ "dct:language",
81
+ "dct:spatial"
82
+ ]
83
+ }, e = {
84
+ datasets: [
85
+ "dct:issued",
86
+ "dct:modified",
87
+ "dcat:spatialResolutionInMeters",
88
+ // nested typed strings
89
+ "dcat:endDate",
90
+ "dcat:startDate"
91
+ ],
92
+ distributions: [
93
+ "dct:issued",
94
+ "dct:modified",
95
+ "dcat:spatialResolutionInMeters",
96
+ "pv:DistributionType",
97
+ "dcat:byteSize"
98
+ ],
99
+ catalogues: []
100
+ }, c = {
101
+ datasets: [
102
+ "owl:versionInfo",
103
+ // nested singulat strings
104
+ "vcard:fn",
105
+ // contactPoint
106
+ "vcard:hasOrganizationName",
107
+ // contactPoint
108
+ "vcard:hasTelephone",
109
+ // contactPoint
110
+ "vcard:country_name",
111
+ // hasAddress
112
+ "vcard:locality",
113
+ // hasAddress
114
+ "vcard:postal_code",
115
+ // hasAddress
116
+ "vcard:street_address",
117
+ // hasAddress
118
+ "rdfs:label",
119
+ // conformsTo and provenance
120
+ "foaf:name"
121
+ // creator, publisher
122
+ ],
123
+ distributions: [
124
+ // nested singular string
125
+ "spdx:checksumValue",
126
+ //checksum
127
+ "rdfs:label",
128
+ // rights !!!
129
+ "skos:prefLabel"
130
+ //license
131
+ ],
132
+ catalogues: [
133
+ // nested singular strings
134
+ "rdfs:label",
135
+ // conformsTo and rights
136
+ "foaf:name",
137
+ // creator
138
+ "skos:prefLabel"
139
+ // license
140
+ ]
141
+ }, d = {
142
+ datasets: [
143
+ "dct:title",
144
+ // also nested within page
145
+ "dct:description",
146
+ // also nested within page
147
+ "dcat:keyword",
148
+ "adms:versionNotes",
149
+ "dcatde:geocodingDescription",
150
+ "dcatde:legalBasis"
151
+ ],
152
+ distributions: [
153
+ "dct:title",
154
+ // also nested within page
155
+ "dct:description",
156
+ // also nested within page
157
+ "dcatde:licenseAttributionByText"
158
+ ],
159
+ catalogues: [
160
+ "dct:title",
161
+ "dct:description"
162
+ ]
163
+ }, s = {
164
+ datasets: [
165
+ "dcat:contactPoint",
166
+ "dct:creator",
167
+ "dext:metadataExtension",
168
+ "dct:provenance",
169
+ "dct:conformsTo",
170
+ "foaf:page",
171
+ "dct:temporal",
172
+ "adms:identifier",
173
+ // nested grouped properties
174
+ "vcard:hasAddress",
175
+ "skos:notation",
176
+ "dct:contributor",
177
+ "dcatde:originator",
178
+ "dcatde:maintainer"
179
+ ],
180
+ distributions: [
181
+ "foaf:page",
182
+ "dcat:accessService",
183
+ "spdx:checksum",
184
+ "dct:conformsTo"
185
+ ],
186
+ catalogues: [
187
+ "dct:creator",
188
+ "dct:conformsTo"
189
+ ]
190
+ }, o = {
191
+ datasets: [
192
+ "dct:publisher"
193
+ ],
194
+ distributions: [],
195
+ catalogues: [
196
+ "dct:publisher",
197
+ "dct:license"
198
+ ]
199
+ }, i = {
200
+ "dct:temporal": "dct:PeriodOfTime",
201
+ "dct:conformsTo": "dct:Standard",
202
+ "foaf:page": "foaf:Document",
203
+ "dct:provenance": "dct:ProvenanceStatement",
204
+ "dext:metadataExtension": "dext:MetadataExtension",
205
+ "spdx:checksum": "spdx:Checksum",
206
+ "dcat:accessService": "dcat:DataService",
207
+ "dct:publisher": "foaf:Agent"
208
+ }, r = {
209
+ // {'name': '', 'resource': ''} mainly needed for vocabulary data
210
+ voc: [
211
+ "dct:publisher",
212
+ "dcat:theme",
213
+ "dct:accrualPeriodicity",
214
+ "dct:accessRights",
215
+ "dct:type",
216
+ "dct:format",
217
+ "dcat:mediaType",
218
+ "dcatap:availability",
219
+ "dcat:compressFormat",
220
+ "dcat:packageFormat",
221
+ "spdx:algorithm",
222
+ "dct:subject",
223
+ "dct:language",
224
+ "adms:status",
225
+ "dct:spatial",
226
+ "dcatde:politicalGeocodingLevelURI",
227
+ "dcatde:contributorID",
228
+ "dcatde:politicalGeocodingURI",
229
+ "dct:license"
230
+ ],
231
+ // 'URI' mainly used for mail addresses
232
+ string: [
233
+ "vcard:hasEmail",
234
+ "vcard:hasURL",
235
+ "foaf:mbox",
236
+ "skos:exactMatch",
237
+ "foaf:homepage",
238
+ "dext:isUsedBy",
239
+ "dcat:endpointURL",
240
+ "dcatde:qualityProcessURI"
241
+ ],
242
+ // {'@id': ''} mainly used for repeated links
243
+ id: [
244
+ "dct:source",
245
+ "dcat:accessURL",
246
+ "dcat:downloadURL",
247
+ "odrl:hasPolicy",
248
+ "dct:hasPart",
249
+ "dcat:catalog",
250
+ "dct:source",
251
+ "dcat:landingPage",
252
+ "dct:relation",
253
+ "dcat:qualifiedRelation",
254
+ "prov:qualifiedAttribution",
255
+ "dct:isReferencedBy",
256
+ "prov:wasGeneratedBy",
257
+ "dct:isVersionOf",
258
+ "dct:hasVersion",
259
+ "dct:isPartOf",
260
+ "dct:references"
261
+ ]
262
+ }, n = {
263
+ singularURI: t,
264
+ multipleURI: a,
265
+ typedStrings: e,
266
+ singularString: c,
267
+ multilingualStrings: d,
268
+ groupedProperties: s,
269
+ additionalPropertyTypes: i,
270
+ conditionalProperties: o,
271
+ URIformat: r
272
+ };
273
+ export {
274
+ n as default
275
+ };
276
+ //# sourceMappingURL=format-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-types.mjs","sources":["../../../../lib/data-provider-interface/config/dcatapde_BFS/format-types.js"],"sourcesContent":["// all properties which value is a single URI\nconst singularURI = {\n datasets: [\n \"dct:accrualPeriodicity\",\n \"dct:accessRights\",\n \"dct:type\",\n \"dcatap:availability\",\n \"dcatde:qualityProcessURI\",\n\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, publisher\n 'foaf:homepage', // creator, publisher\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 'dct:license'\n ],\n catalogues: [\n 'foaf:homepage', // homepage and creator\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 \"dcatde:politicalGeocodingLevelURI\",\n \"dcatde:politicalGeocodingURI\",\n \"dcatde:contributorID\",\n \"dct:language\",\n \"dct:subject\",\n \"dcat:theme\",\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 \"dct:references\",\n \"dct:spatial\",\n ],\n distributions: [\n \"dcat:accessURL\",\n \"dcat:downloadURL\",\n \"dct:language\",\n \"odrl:hasPolicy\",\n ],\n catalogues: [\n \"dct:hasPart\",\n 'dcat:catalog',\n 'dct:language',\n 'dct:spatial',\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 \"pv:DistributionType\",\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, publisher\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 \"dcatde:geocodingDescription\",\n \"dcatde:legalBasis\",\n \n ],\n distributions: [\n \"dct:title\", // also nested within page\n \"dct:description\", // also nested within page\n \"dcatde:licenseAttributionByText\",\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 \"dct:contributor\",\n \"dcatde:originator\",\n \"dcatde:maintainer\",\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// some properties provide the ability to choose the input type and therefore the respective fields which will be provided\nconst conditionalProperties = {\n datasets: [\n 'dct:publisher',\n ],\n distributions: [],\n catalogues: [\n 'dct:publisher',\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:publisher': 'foaf:Agent',\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 \"dcatde:politicalGeocodingLevelURI\",\n \"dcatde:contributorID\",\n \"dcatde:politicalGeocodingURI\",\n 'dct:license'\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 'dcatde:qualityProcessURI',\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 'dct:isPartOf',\n \"dct:references\",\n ]\n}\n\nexport default {\n singularURI,\n multipleURI,\n typedStrings,\n singularString,\n multilingualStrings,\n groupedProperties,\n additionalPropertyTypes,\n conditionalProperties,\n URIformat,\n};"],"names":["singularURI","multipleURI","typedStrings","singularString","multilingualStrings","groupedProperties","conditionalProperties","additionalPropertyTypes","URIformat","formatTypesDCATAPDE_BFS"],"mappings":"AACA,MAAMA,IAAc;AAAA,EAChB,UAAU;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;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,IACA;AAAA,EACH;AAAA,EACD,YAAY;AAAA,IACR;AAAA;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,I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AAE;AACJ;"}
@@ -0,0 +1,18 @@
1
+ import { FormKitSchemaDefinition } from '@formkit/core';
2
+
3
+ /**
4
+ * Available properties for datasets.
5
+ */
6
+ export type DcatApDatasetsProperty = "datasetID" | "overview" | "politicalGeocodingLevelURI" | "politicalGeocodingURI" | "availabilityDE" | "geocodingDescription" | "legalBasis" | "qualityProcessURI" | "references" | "contributor" | "contributorID" | "originator" | "maintainer" | "description" | "title" | "contactPoint" | "subject" | "keyword" | "publisher" | "spatial" | "temporal" | "theme" | "accessRights" | "creator" | "conformsTo" | "page" | "accrualPeriodicity" | "hasVersion" | "isVersionOf" | "source" | "identifier" | "isReferencedBy" | "landingPage" | "language" | "admsIdentifier" | "provenance" | "qualifiedAttribution" | "wasGeneratedBy" | "qualifiedRelation" | "relation" | "issued" | "modified" | "spatialResolutionInMeters" | "temporalResolution" | "type" | "versionInfo" | "versionNotes" | "catalog" | "isUsedBy";
7
+ /**
8
+ * Available properties for distributions.
9
+ */
10
+ export type DcatApDistributionsProperty = "accessURL" | "isWidget" | "licenseAttributionByText" | "availabilityDisDE" | "availability" | "description" | "format" | "title" | "byteSize" | "conformsTo" | "issued" | "modified" | "rights" | "spatialResolutionInMeters" | "temporalResolution" | "mediaType" | "downloadUrl" | "accessService" | "checksum" | "compressFormat" | "packageFormat" | "page" | "language" | "licence" | "conformsTo" | "issued" | "modified" | "rights" | "spatialResolutionInMeters" | "temporalResolution" | "type" | "hasPolicy" | "status";
11
+ export type DcatApCataloguesProperty = "datasetID" | "overview" | "availabilityCatDE" | "title" | "description" | "publisher" | "language" | "licence" | "spatial" | "homepage" | "hasPart" | "isPartOf" | "rights" | "catalog" | "creator";
12
+ export type InputDefinition = {
13
+ datasets: Record<DcatApDatasetsProperty, FormKitSchemaDefinition>;
14
+ distributions: Record<DcatApDistributionsProperty, FormKitSchemaDefinition>;
15
+ catalogues: Record<DcatApCataloguesProperty, FormKitSchemaDefinition>;
16
+ };
17
+ declare const dcatapProperties: InputDefinition;
18
+ export default dcatapProperties;