@piveau/piveau-hub-ui-modules 4.3.4 → 4.3.5
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 +3 -3
- package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +52 -52
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs +2 -2
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +5 -2
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ const M = {
|
|
|
21
21
|
loading: !1,
|
|
22
22
|
error: null,
|
|
23
23
|
message: "",
|
|
24
|
-
confirm: "",
|
|
24
|
+
confirm: "Ok",
|
|
25
25
|
confirmHandler: () => null
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -318,7 +318,7 @@ const M = {
|
|
|
318
318
|
created() {
|
|
319
319
|
this.setupKeycloakWatcher();
|
|
320
320
|
}
|
|
321
|
-
}, N = (e) => (S("data-v-
|
|
321
|
+
}, N = (e) => (S("data-v-f7ab70fb"), e = e(), z(), e), R = {
|
|
322
322
|
id: "wrapper",
|
|
323
323
|
"data-cy": "dpi-menu"
|
|
324
324
|
}, E = { key: 0 }, H = { class: "text-white" }, x = { style: { "margin-top": "1%" } }, F = { class: "btn-group dropup" }, B = {
|
|
@@ -403,7 +403,7 @@ function K(e, a, o, s, t, r) {
|
|
|
403
403
|
}, 8, ["loading", "confirm", "onConfirm"])
|
|
404
404
|
]);
|
|
405
405
|
}
|
|
406
|
-
const se = /* @__PURE__ */ L(M, [["render", K], ["__scopeId", "data-v-
|
|
406
|
+
const se = /* @__PURE__ */ L(M, [["render", K], ["__scopeId", "data-v-f7ab70fb"]]);
|
|
407
407
|
export {
|
|
408
408
|
se as default
|
|
409
409
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DPIMenu.vue.mjs","sources":["../../lib/data-provider-interface/DPIMenu.vue"],"sourcesContent":["<template>\n <div id=\"wrapper\" data-cy=\"dpi-menu\">\n <nav v-if=\"visible\">\n <div>\n <h4 class=\"text-white\">{{ $t('message.dataupload.menu.dpi') }}</h4>\n </div>\n\n <div style=\"margin-top:1%;\">\n <dropup v-for=\"(group, index) in menuGroups\" :key=\"`Group${index}`\" :groupName=\"group.group\"\n :groupItems=\"group.items\" :show=\"$env.content.dataProviderInterface.buttons[group.group]\"\n :isOperator=\"getUserData.roles.includes('operator')\" :isCatalog=\"group.group === 'Catalogue' ? true : false\">\n </dropup>\n <ul>\n <div class=\"btn-group dropup\">\n <li v-for=\"(menuItem, index) in menuItems\" :key=\"`Menu${index}`\">\n <button type=\"button\" class=\"btn btn-default\" @click=\"scrollToTop()\">\n <!-- Menu items are either buttons or router-link -->\n <!-- depending if they have a 'to' or 'handler' property -->\n <component :is=\"menuItem.handler ? 'button' : 'router-link'\" :class=\"{ 'disabled': menuItem.disabled }\"\n :to=\"menuItem.to\" @click.native=\"menuItem.handler ? menuItem.handler() : null\">\n {{ menuItem.handler }}\n {{ menuItem.name }}\n </component>\n </button>\n </li>\n </div>\n </ul>\n </div>\n\n\n <div v-if=\"getUserData.userName\" class=\"logoutWrap\">\n <slot name=\"right\" :get-user-data=\"getUserData\">\n <small class=\"text-white\">{{ $t('message.dataupload.menu.loggedInAs') }} {{ getUserData.userName\n }}</small>\n <br>\n <button type=\"button\" class=\"btn btn-default logout\">\n <router-link :to=\"{ name: 'Logout' }\">{{ $t('message.dataupload.menu.logout') }}</router-link>\n </button>\n </slot>\n </div>\n </nav>\n\n <app-confirmation-dialog id=\"DPIMenuModal\" :loading=\"modal.loading\" :confirm=\"modal.confirm\"\n @confirm=\"modal.confirmHandler\">\n {{ modal.message }}\n </app-confirmation-dialog>\n </div>\n</template>\n\n<script>\nimport axios from 'axios';\nimport $ from 'jquery';\nimport { has, isEmpty } from 'lodash-es';\nimport { mapGetters, mapActions } from 'vuex';\nimport Dropup from './components/Dropup';\nimport { useWindowScroll } from '@vueuse/core'\n\nexport default {\n name: 'DPI-menu',\n components: {\n Dropup\n },\n props: {},\n data() {\n return {\n visible: true,\n modal: {\n show: false,\n loading: false,\n error: null,\n message: '',\n confirm: '',\n confirmHandler: () => null,\n },\n };\n },\n setup() {\n const scrollToTop = () => {\n let { x, y } = useWindowScroll({ behavior: 'smooth' })\n y.value = 0\n\n }\n return {\n scrollToTop\n }\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getCatalog',\n 'getID',\n 'getLoading',\n 'getTitle',\n 'getDescription',\n ]),\n ...mapGetters('auth', [\n 'getUserData',\n ]),\n menuGroups() {\n return [\n {\n group: 'Dataset',\n items: [\n {\n key: 'create-dataset',\n name: 'createDataset',\n to: {\n name: 'DataProviderInterface-Input',\n query: { locale: this.$route.query.locale, edit: false }, // if edit is false -> reset is triggered\n params: { property: 'datasets' },\n },\n },\n {\n name: 'deleteDataset',\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: this.$t('message.dataupload.menu.datasetDeletion.message'),\n confirm: this.$t('message.dataupload.menu.datasetDeletion.confirm'),\n confirmHandler: () => this.handleDelete({ id: this.getID, property: 'datasets', catalog: this.getCatalog.id }),\n },\n };\n $('#modal').modal({ show: true });\n },\n },\n {\n key: 'edit-dataset',\n name: 'editDataset',\n onlyAuthorizedDatasetPage: true,\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n to: {\n name: 'DataProviderInterface-Edit',\n params: {\n catalog: this.getCatalog.id || 'undefined',\n property: 'datasets',\n id: this.getID || 'undefined',\n },\n query: {\n draft: false,\n locale: this.$route.query.locale,\n },\n },\n },\n \n {\n key: 'draft-dataset',\n name: 'setToDraft',\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: this.$t('message.dataupload.menu.markAsDraft.message'),\n confirm: this.$t('message.dataupload.menu.markAsDraft.confirm'),\n confirmHandler: () => this.handleMarkAsDraft({\n id: this.getID, catalog: this.getCatalog.id, title: this.getTitle, description: this.getDescription,\n }),\n },\n };\n $('#modal').modal({ show: true });\n },\n },\n {\n key: 'register-dataset',\n name: 'registerDoi',\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: this.$t('message.dataupload.menu.registerADoi.message'),\n confirm: this.$t('message.dataupload.menu.registerADoi.confirm'),\n confirmHandler: () => this.handleRegisterDoi({ id: this.getID, catalog: this.getCatalog.id, type: this.$env.content.dataProviderInterface.doiRegistrationService.persistentIdentifierType || 'mock' }),\n },\n };\n $('#modal').modal({ show: true });\n },\n },\n ],\n },\n {\n group: 'Catalogue',\n items: [\n {\n name: 'CreateCatalogue',\n to: {\n name: 'DataProviderInterface-Input',\n query: { locale: this.$route.query.locale, edit: false },\n params: { property: 'catalogues' }\n },\n },\n {\n name: 'DeleteCatalogue',\n disabled: !this.isLocatedOnAuthorizedCatalogPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: 'Are you sure you want to delete this catalogue? This can not be reverted!',\n confirm: 'Delete catlogue (irreversible)',\n confirmHandler: () => this.handleDelete({ id: this.$route.params.ctlg_id, property: 'catalogues', catalog: this.$route.params.ctlg_id }),\n },\n };\n $('#modal').modal({ show: true });\n }\n },\n {\n name: 'EditCatalog',\n onlyAuthorizedDatasetPage: true,\n disabled: !this.isLocatedOnAuthorizedCatalogPage,\n to: {\n name: 'DataProviderInterface-Edit',\n params: {\n catalog: this.$route.params.ctlg_id ? this.$route.params.ctlg_id : 'undefined',\n property: 'catalogues',\n id: this.getID || 'undefined',\n },\n query: {\n draft: false,\n locale: this.$route.query.locale,\n }\n }\n },\n ],\n },\n ];\n },\n menuItems() {\n return [\n {\n name: this.$t('message.dataupload.menu.draftDatasets'),\n to: { name: 'DataProviderInterface-Draft', query: { locale: this.$route.query.locale } },\n },\n {\n name: this.$t('message.dataupload.menu.myCatalogues'),\n to: { name: 'DataProviderInterface-UserCatalogues', query: { locale: this.$route.query.locale } },\n },\n {\n name: this.$t('message.dataupload.menu.userProfile'),\n to: { name: 'DataProviderInterface-UserProfile', query: { locale: this.$route.query.locale } },\n },\n ];\n },\n isLocatedOnAuthorizedDatasetPage() {\n // Never return true while loading\n if (this.getLoading) return false;\n\n // Is the user located on the correct page?\n const isOnDatasetDetailsPage = this.$route.name === 'DatasetDetailsDataset';\n if (!isOnDatasetDetailsPage) return false;\n const datasetId = isOnDatasetDetailsPage && this.$route.params.ds_id;\n\n // Does user have permission on dataset (based on current datasetDetails state)?\n const permissions = this.getUserData && this.getUserData.permissions;\n const catalogId = this.getCatalog && this.getCatalog.id;\n const hasPermission = permissions.find(permission => permission.rsname === catalogId);\n\n // Does the user have permission on the current dataset details page?\n return hasPermission\n && isOnDatasetDetailsPage\n && datasetId === this.getID;\n },\n isLocatedOnAuthorizedCatalogPage() {\n // never return true while loading\n if (this.getLoading) return false;\n\n // is the user located on the correct page?\n const onCatalogPage = this.$route.name === 'CatalogueDetails';\n if (!onCatalogPage) return false;\n const catalogId = onCatalogPage && this.$route.params.ctlg_id;\n\n const permissions = this.getUserData && this.getUserData.permissions;\n const hasPermission = permissions.find(permission => permission.rsname === catalogId);\n\n // does user have permission on current catalogue\n return hasPermission && onCatalogPage;\n }\n },\n methods: {\n ...mapActions('auth', [\n 'updateUserData',\n ]),\n ...mapActions('snackbar', [\n 'showSnackbar',\n ]),\n setupKeycloakWatcher() {\n if (this.$keycloak && this.$keycloak.authenticated) {\n // Set up watcher here since we this.$keycloak might not be available.\n // If this.$keycloak is ensured, move this watcher out of this created hook.\n this.$watch('$keycloak.token', async (newToken) => {\n if (!newToken) return;\n\n let rtpToken = this.$keycloak.rtpToken;\n if (!rtpToken) {\n const rtpTokenFn = this.$keycloak.getRtpToken;\n if (rtpTokenFn) {\n const res = (await rtpTokenFn({ autoRefresh: true }));\n rtpToken = res;\n }\n }\n\n this.updateUserData({\n authToken: newToken,\n rtpToken: rtpToken,\n hubUrl: this.$env.api.hubUrl,\n });\n }, { immediate: true });\n\n this.$watch('$keycloak.rtpToken', (newRtpToken) => {\n if (!newRtpToken) return;\n\n this.updateUserData({\n authToken: this.$keycloak.token,\n rtpToken: newRtpToken,\n hubUrl: this.$env.api.hubUrl,\n });\n });\n }\n },\n async handleConfirm(action, argsObj, { successMessage, errorMessage }) {\n this.modal.loading = true;\n try {\n // Sleep for 250ms for better UX\n this.$Progress.start();\n await new Promise(resolve => setTimeout(resolve, 250));\n\n this.$Progress.set(25);\n await this.$store.dispatch(action, argsObj);\n\n // Successful DOI registration\n this.showSnackbar({\n message: successMessage,\n variant: 'success',\n });\n await new Promise(resolve => setTimeout(resolve, 250));\n\n this.$Progress.finish();\n } catch (ex) {\n this.$Progress.fail();\n // eslint-disable-next-line no-console\n console.error(ex);\n\n const maybeErrorStatusMsg = ex.response && ex.response.data && ex.response.data.message;\n\n this.modal = {\n ...this.modal,\n ...{\n // Need to translate this\n message: 'DOI registration is not possible, the following error occured: ' + ex.response.data,\n confirm: 'Okay',\n confirmHandler: () => $('#modal').modal('hide'),\n },\n };\n\n\n console.log(ex.response.data);\n let customErrorMessage = typeof errorMessage === 'string' && errorMessage;\n customErrorMessage = typeof errorMessage === 'function' && errorMessage(ex);\n // customErrorMessage = typeof errorMessage === 'object' && errorMessage.prefix && `${errorMessage.prefix}${maybeErrorStatusMsg && ` — ${maybeErrorStatusMsg}`}`;\n customErrorMessage = typeof errorMessage === 'object' && errorMessage.prefix + \" - \" + ex.response.data;\n\n console.log(errorMessage);\n const errorMsg = customErrorMessage || maybeErrorStatusMsg || ex.message || 'An error occurred';\n // show snackbar\n this.showSnackbar({\n message: errorMsg,\n variant: 'error',\n });\n } finally {\n this.modal.loading = false;\n $('#modal').modal('hide');\n }\n },\n async handleRegisterDoi({ id, catalog, type = 'eu-ra-doi' }) {\n await this.handleConfirm(\n 'auth/createPersistentIdentifier',\n { id, catalog, type },\n {\n successMessage: this.$te('message.snackbar.doiRegistration.success') ? this.$t('message.snackbar.doiRegistration.success') : 'Successfully registered DOI',\n errorMessage: { prefix: this.$te('message.snackbar.doiRegistration.error') ? this.$t('message.snackbar.doiRegistration.error') : 'DOI registration failed' },\n\n },\n );\n },\n async handleMarkAsDraft({\n id, catalog, title, description,\n }) {\n await this.handleConfirm('auth/putDatasetToDraft', {\n id, catalog, title, description,\n }, {\n successMessage: this.$te('message.snackbar.markAsDraft.success') ? this.$t('message.snackbar.markAsDraft.success') : 'Dataset successfully marked as draft',\n errorMessage: { prefix: this.$te('message.snackbar.markAsDraft.error') ? this.$t('message.snackbar.markAsDraft.error') : 'Failed to mark dataset as draft' },\n });\n\n this.$router.push({ name: 'DataProviderInterface-Draft', query: { locale: this.$route.query.locale } }).catch(() => { });\n },\n async handleDelete({ id, property, catalog }) {\n // todo: create user dataset api (and maybe integrate to store)\n // For now, do request manually using axios\n\n this.modal.loading = true;\n this.$Progress.start();\n try {\n let endpoint;\n\n if (property === 'datasets') {\n\n endpoint = `${this.$env.api.hubUrl}datasets/${id}?useNormalizedId=true&catalogue=${catalog}`;\n } else if (property === 'catalogues') {\n endpoint = `${this.$env.api.hubUrl}catalogues/${id}`\n }\n\n await axios.delete(endpoint, {\n\n headers: {\n 'Content-Type': 'text/turtle',\n Authorization: `Bearer ${this.getUserData.rtpToken}`,\n },\n });\n\n let successMessage;\n if (property === 'datasets') {\n successMessage = this.$te('message.snackbar.deleteDataset.success') ? this.$t('message.snackbar.deleteDataset.success') : 'Dataset successfully deleted';\n } else if (property === 'catalogues') {\n successMessage = this.$te('message.snackbar.deleteCatalog.success') ? this.$t('message.snackbar.deleteCatalog.success') : 'Catalog successfully deleted';\n }\n\n\n this.showSnackbar({\n message: successMessage,\n variant: 'success',\n });\n this.$Progress.finish();\n\n // Redirect to Home\n this.$router.push({ name: 'Datasets', query: { locale: this.$route.query.locale, refresh: true } }).catch(() => { });\n } catch (ex) {\n this.$Progress.fail();\n\n let errorMessage;\n\n if (property === 'datasets') {\n errorMessage = this.$te('message.snackbar.deleteDataset.error') ? this.$t('message.snackbar.deleteDataset.error') : 'Failed to delete dataset';\n } else if (property === 'catalogues') {\n errorMessage = this.$te('message.snackbar.deleteCatalog.error') ? this.$t('message.snackbar.deleteCatalog.error') : 'Failed to delete catalog';\n }\n\n this.showSnackbar({\n message: `${errorMessage}${ex.response?.data ? ` — ${ex.response?.data}` : ex.message}`,\n variant: 'error',\n });\n } finally {\n this.modal.loading = false;\n $('#modal').modal('hide');\n }\n },\n },\n created() {\n this.setupKeycloakWatcher();\n },\n};\n</script>\n\n<style lang=\"scss\" scoped>\n#wrapper {\n background: linear-gradient(90deg, #082b7a, #0e47cb);\n width: 100%;\n position: sticky;\n bottom: 0;\n z-index: 999;\n}\n\nnav {\n max-width: 1400px;\n display: flex;\n flex-direction: row;\n margin: 0 auto;\n justify-content: space-between;\n font-size: 1rem;\n align-items: center;\n}\n\nul {\n float: right;\n\n li {\n display: inline;\n\n a {\n color: white;\n }\n }\n}\n\nbutton a {\n color: white;\n}\n\n.logout {\n display: block;\n margin: 0 auto;\n border: 1px solid white;\n padding: 0.1rem 1.5rem;\n}\n\n.logoutWrap {\n width: 14rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n</style>\n"],"names":["_sfc_main","Dropup","x","y","useWindowScroll","mapGetters","$","isOnDatasetDetailsPage","datasetId","permissions","catalogId","permission","onCatalogPage","mapActions","newToken","rtpToken","rtpTokenFn","newRtpToken","action","argsObj","successMessage","errorMessage","resolve","ex","maybeErrorStatusMsg","customErrorMessage","errorMsg","id","catalog","type","title","description","property","endpoint","axios","_a","_b","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_7","_createElementVNode","_openBlock","_createElementBlock","_hoisted_1","$data","_hoisted_2","_toDisplayString","_ctx","_createTextVNode","_Fragment","_renderList","$options","group","index","_createBlock","_component_dropup","menuItem","$setup","_resolveDynamicComponent","_normalizeClass","_withCtx","_hoisted_6","_renderSlot","_hoisted_8","_hoisted_9","_createVNode","_component_router_link","_createCommentVNode","_component_app_confirmation_dialog"],"mappings":";;;;;;;;;AAyDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAAC;AAAA,EACD;AAAA,EACD,OAAO,CAAE;AAAA,EACT,OAAO;AACL,WAAO;AAAA,MACL,SAAS;AAAA,MACT,OAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,QACT,OAAO;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,gBAAgB,MAAM;AAAA,MACvB;AAAA;EAEJ;AAAA,EACD,QAAQ;AAMN,WAAO;AAAA,MACL,aANkB,MAAM;AACxB,YAAI,EAAE,GAAAC,GAAG,GAAAC,MAAMC,EAAgB,EAAE,UAAU,UAAU;AACrD,QAAAD,EAAE,QAAQ;AAAA,MAEZ;AAAA,IAGA;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGE,EAAW,kBAAkB;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAGA,EAAW,QAAQ;AAAA,MACpB;AAAA,IACF,CAAC;AAAA,IACD,aAAa;AACX,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,YACL;AAAA,cACE,KAAK;AAAA,cACL,MAAM;AAAA,cACN,IAAI;AAAA,gBACF,MAAM;AAAA,gBACN,OAAO,EAAE,QAAQ,KAAK,OAAO,MAAM,QAAQ,MAAM,GAAO;AAAA;AAAA,gBACxD,QAAQ,EAAE,UAAU,WAAY;AAAA,cACjC;AAAA,YACF;AAAA,YACD;AAAA,cACE,MAAM;AAAA,cACN,UAAU,CAAC,KAAK;AAAA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AA,QARJC,EAOOf,EAPa,QAAA,SAAA,EAAA,aAAeA,EAAA,YAAW,GAA9C,MAOO;AAAA,UANLP,EACY,SADZD,GAA6BO,EAAAC,EAAA,4CAA2C,MAACD,EAAGC,EAAW,YAAC,QAAQ,GAAA,CAAA;AAAA,UAhC1GC,EAAA;AAAA,UAkCYe;AAAA,UAlCZf,EAAA;AAAA,UAmCUR,EAES,UAFTwB,GAES;AAAA,YADPC,EAA8FC,GAAA,EAAhF,IAAI,EAAkB,MAAA,SAAA,KAAA;AAAA,cApChD,SAAAN,EAoCkD,MAA0C;AAAA,gBApC5FZ,EAAAF,EAoCqDC,EAAE,GAAA,gCAAA,CAAA,GAAA,CAAA;AAAA;cApCvD,GAAA;AAAA;;;YAAAoB,EAAA,IAAA,EAAA;AAAA,UAAAA,EAAA,IAAA,EAAA;AAAA,IAAAnB,EAAA;AAAA,IA0CIiB,EAG0BG,GAAA;AAAA,MAHD,IAAG;AAAA,MAAgB,SAASxB,EAAK,MAAC;AAAA,MAAU,SAASA,EAAK,MAAC;AAAA,MACjF,WAASA,EAAK,MAAC;AAAA;MA3CtB,SAAAgB,EA4CM,MAAmB;AAAA,QA5CzBZ,EA4CSF,EAAAF,EAAA,MAAM,OAAO,GAAA,CAAA;AAAA;MA5CtB,GAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"DPIMenu.vue.mjs","sources":["../../lib/data-provider-interface/DPIMenu.vue"],"sourcesContent":["<template>\n <div id=\"wrapper\" data-cy=\"dpi-menu\">\n <nav v-if=\"visible\">\n <div>\n <h4 class=\"text-white\">{{ $t('message.dataupload.menu.dpi') }}</h4>\n </div>\n\n <div style=\"margin-top:1%;\">\n <dropup v-for=\"(group, index) in menuGroups\" :key=\"`Group${index}`\" :groupName=\"group.group\"\n :groupItems=\"group.items\" :show=\"$env.content.dataProviderInterface.buttons[group.group]\"\n :isOperator=\"getUserData.roles.includes('operator')\" :isCatalog=\"group.group === 'Catalogue' ? true : false\">\n </dropup>\n <ul>\n <div class=\"btn-group dropup\">\n <li v-for=\"(menuItem, index) in menuItems\" :key=\"`Menu${index}`\">\n <button type=\"button\" class=\"btn btn-default\" @click=\"scrollToTop()\">\n <!-- Menu items are either buttons or router-link -->\n <!-- depending if they have a 'to' or 'handler' property -->\n <component :is=\"menuItem.handler ? 'button' : 'router-link'\" :class=\"{ 'disabled': menuItem.disabled }\"\n :to=\"menuItem.to\" @click.native=\"menuItem.handler ? menuItem.handler() : null\">\n {{ menuItem.handler }}\n {{ menuItem.name }}\n </component>\n </button>\n </li>\n </div>\n </ul>\n </div>\n\n\n <div v-if=\"getUserData.userName\" class=\"logoutWrap\">\n <slot name=\"right\" :get-user-data=\"getUserData\">\n <small class=\"text-white\">{{ $t('message.dataupload.menu.loggedInAs') }} {{ getUserData.userName\n }}</small>\n <br>\n <button type=\"button\" class=\"btn btn-default logout\">\n <router-link :to=\"{ name: 'Logout' }\">{{ $t('message.dataupload.menu.logout') }}</router-link>\n </button>\n </slot>\n </div>\n </nav>\n\n <app-confirmation-dialog id=\"DPIMenuModal\" :loading=\"modal.loading\" :confirm=\"modal.confirm\"\n @confirm=\"modal.confirmHandler\">\n {{ modal.message }}\n </app-confirmation-dialog>\n </div>\n</template>\n\n<script>\nimport axios from 'axios';\nimport $ from 'jquery';\nimport { has, isEmpty } from 'lodash-es';\nimport { mapGetters, mapActions } from 'vuex';\nimport Dropup from './components/Dropup';\nimport { useWindowScroll } from '@vueuse/core'\n\nexport default {\n name: 'DPI-menu',\n components: {\n Dropup\n },\n props: {},\n data() {\n return {\n visible: true,\n modal: {\n show: false,\n loading: false,\n error: null,\n message: '',\n confirm: 'Ok',\n confirmHandler: () => null,\n },\n };\n },\n setup() {\n const scrollToTop = () => {\n let { x, y } = useWindowScroll({ behavior: 'smooth' })\n y.value = 0\n\n }\n return {\n scrollToTop\n }\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getCatalog',\n 'getID',\n 'getLoading',\n 'getTitle',\n 'getDescription',\n ]),\n ...mapGetters('auth', [\n 'getUserData',\n ]),\n menuGroups() {\n return [\n {\n group: 'Dataset',\n items: [\n {\n key: 'create-dataset',\n name: 'createDataset',\n to: {\n name: 'DataProviderInterface-Input',\n query: { locale: this.$route.query.locale, edit: false }, // if edit is false -> reset is triggered\n params: { property: 'datasets' },\n },\n },\n {\n name: 'deleteDataset',\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: this.$t('message.dataupload.menu.datasetDeletion.message'),\n confirm: this.$t('message.dataupload.menu.datasetDeletion.confirm'),\n confirmHandler: () => this.handleDelete({ id: this.getID, property: 'datasets', catalog: this.getCatalog.id }),\n },\n };\n $('#modal').modal({ show: true });\n },\n },\n {\n key: 'edit-dataset',\n name: 'editDataset',\n onlyAuthorizedDatasetPage: true,\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n to: {\n name: 'DataProviderInterface-Edit',\n params: {\n catalog: this.getCatalog.id || 'undefined',\n property: 'datasets',\n id: this.getID || 'undefined',\n },\n query: {\n draft: false,\n locale: this.$route.query.locale,\n },\n },\n },\n \n {\n key: 'draft-dataset',\n name: 'setToDraft',\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: this.$t('message.dataupload.menu.markAsDraft.message'),\n confirm: this.$t('message.dataupload.menu.markAsDraft.confirm'),\n confirmHandler: () => this.handleMarkAsDraft({\n id: this.getID, catalog: this.getCatalog.id, title: this.getTitle, description: this.getDescription,\n }),\n },\n };\n $('#modal').modal({ show: true });\n },\n },\n {\n key: 'register-dataset',\n name: 'registerDoi',\n disabled: !this.isLocatedOnAuthorizedDatasetPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: this.$t('message.dataupload.menu.registerADoi.message'),\n confirm: this.$t('message.dataupload.menu.registerADoi.confirm'),\n confirmHandler: () => this.handleRegisterDoi({ id: this.getID, catalog: this.getCatalog.id, type: this.$env.content.dataProviderInterface.doiRegistrationService.persistentIdentifierType || 'mock' }),\n },\n };\n $('#modal').modal({ show: true });\n },\n },\n ],\n },\n {\n group: 'Catalogue',\n items: [\n {\n name: 'CreateCatalogue',\n to: {\n name: 'DataProviderInterface-Input',\n query: { locale: this.$route.query.locale, edit: false },\n params: { property: 'catalogues' }\n },\n },\n {\n name: 'DeleteCatalogue',\n disabled: !this.isLocatedOnAuthorizedCatalogPage,\n handler: () => {\n this.modal = {\n ...this.modal,\n ...{\n message: 'Are you sure you want to delete this catalogue? This can not be reverted!',\n confirm: 'Delete catlogue (irreversible)',\n confirmHandler: () => this.handleDelete({ id: this.$route.params.ctlg_id, property: 'catalogues', catalog: this.$route.params.ctlg_id }),\n },\n };\n $('#modal').modal({ show: true });\n }\n },\n {\n name: 'EditCatalog',\n onlyAuthorizedDatasetPage: true,\n disabled: !this.isLocatedOnAuthorizedCatalogPage,\n to: {\n name: 'DataProviderInterface-Edit',\n params: {\n catalog: this.$route.params.ctlg_id ? this.$route.params.ctlg_id : 'undefined',\n property: 'catalogues',\n id: this.getID || 'undefined',\n },\n query: {\n draft: false,\n locale: this.$route.query.locale,\n }\n }\n },\n ],\n },\n ];\n },\n menuItems() {\n return [\n {\n name: this.$t('message.dataupload.menu.draftDatasets'),\n to: { name: 'DataProviderInterface-Draft', query: { locale: this.$route.query.locale } },\n },\n {\n name: this.$t('message.dataupload.menu.myCatalogues'),\n to: { name: 'DataProviderInterface-UserCatalogues', query: { locale: this.$route.query.locale } },\n },\n {\n name: this.$t('message.dataupload.menu.userProfile'),\n to: { name: 'DataProviderInterface-UserProfile', query: { locale: this.$route.query.locale } },\n },\n ];\n },\n isLocatedOnAuthorizedDatasetPage() {\n // Never return true while loading\n if (this.getLoading) return false;\n\n // Is the user located on the correct page?\n const isOnDatasetDetailsPage = this.$route.name === 'DatasetDetailsDataset';\n if (!isOnDatasetDetailsPage) return false;\n const datasetId = isOnDatasetDetailsPage && this.$route.params.ds_id;\n\n // Does user have permission on dataset (based on current datasetDetails state)?\n const permissions = this.getUserData && this.getUserData.permissions;\n const catalogId = this.getCatalog && this.getCatalog.id;\n const hasPermission = permissions.find(permission => permission.rsname === catalogId);\n\n // Does the user have permission on the current dataset details page?\n return hasPermission\n && isOnDatasetDetailsPage\n && datasetId === this.getID;\n },\n isLocatedOnAuthorizedCatalogPage() {\n // never return true while loading\n if (this.getLoading) return false;\n\n // is the user located on the correct page?\n const onCatalogPage = this.$route.name === 'CatalogueDetails';\n if (!onCatalogPage) return false;\n const catalogId = onCatalogPage && this.$route.params.ctlg_id;\n\n const permissions = this.getUserData && this.getUserData.permissions;\n const hasPermission = permissions.find(permission => permission.rsname === catalogId);\n\n // does user have permission on current catalogue\n return hasPermission && onCatalogPage;\n }\n },\n methods: {\n ...mapActions('auth', [\n 'updateUserData',\n ]),\n ...mapActions('snackbar', [\n 'showSnackbar',\n ]),\n setupKeycloakWatcher() {\n if (this.$keycloak && this.$keycloak.authenticated) {\n // Set up watcher here since we this.$keycloak might not be available.\n // If this.$keycloak is ensured, move this watcher out of this created hook.\n this.$watch('$keycloak.token', async (newToken) => {\n if (!newToken) return;\n\n let rtpToken = this.$keycloak.rtpToken;\n if (!rtpToken) {\n const rtpTokenFn = this.$keycloak.getRtpToken;\n if (rtpTokenFn) {\n const res = (await rtpTokenFn({ autoRefresh: true }));\n rtpToken = res;\n }\n }\n\n this.updateUserData({\n authToken: newToken,\n rtpToken: rtpToken,\n hubUrl: this.$env.api.hubUrl,\n });\n }, { immediate: true });\n\n this.$watch('$keycloak.rtpToken', (newRtpToken) => {\n if (!newRtpToken) return;\n\n this.updateUserData({\n authToken: this.$keycloak.token,\n rtpToken: newRtpToken,\n hubUrl: this.$env.api.hubUrl,\n });\n });\n }\n },\n async handleConfirm(action, argsObj, { successMessage, errorMessage }) {\n this.modal.loading = true;\n try {\n // Sleep for 250ms for better UX\n this.$Progress.start();\n await new Promise(resolve => setTimeout(resolve, 250));\n\n this.$Progress.set(25);\n await this.$store.dispatch(action, argsObj);\n\n // Successful DOI registration\n this.showSnackbar({\n message: successMessage,\n variant: 'success',\n });\n await new Promise(resolve => setTimeout(resolve, 250));\n\n this.$Progress.finish();\n } catch (ex) {\n this.$Progress.fail();\n // eslint-disable-next-line no-console\n console.error(ex);\n\n const maybeErrorStatusMsg = ex.response && ex.response.data && ex.response.data.message;\n\n this.modal = {\n ...this.modal,\n ...{\n // Need to translate this\n message: 'DOI registration is not possible, the following error occured: ' + ex.response.data,\n confirm: 'Okay',\n confirmHandler: () => $('#modal').modal('hide'),\n },\n };\n\n\n console.log(ex.response.data);\n let customErrorMessage = typeof errorMessage === 'string' && errorMessage;\n customErrorMessage = typeof errorMessage === 'function' && errorMessage(ex);\n // customErrorMessage = typeof errorMessage === 'object' && errorMessage.prefix && `${errorMessage.prefix}${maybeErrorStatusMsg && ` — ${maybeErrorStatusMsg}`}`;\n customErrorMessage = typeof errorMessage === 'object' && errorMessage.prefix + \" - \" + ex.response.data;\n\n console.log(errorMessage);\n const errorMsg = customErrorMessage || maybeErrorStatusMsg || ex.message || 'An error occurred';\n // show snackbar\n this.showSnackbar({\n message: errorMsg,\n variant: 'error',\n });\n } finally {\n this.modal.loading = false;\n $('#modal').modal('hide');\n }\n },\n async handleRegisterDoi({ id, catalog, type = 'eu-ra-doi' }) {\n await this.handleConfirm(\n 'auth/createPersistentIdentifier',\n { id, catalog, type },\n {\n successMessage: this.$te('message.snackbar.doiRegistration.success') ? this.$t('message.snackbar.doiRegistration.success') : 'Successfully registered DOI',\n errorMessage: { prefix: this.$te('message.snackbar.doiRegistration.error') ? this.$t('message.snackbar.doiRegistration.error') : 'DOI registration failed' },\n\n },\n );\n },\n async handleMarkAsDraft({\n id, catalog, title, description,\n }) {\n await this.handleConfirm('auth/putDatasetToDraft', {\n id, catalog, title, description,\n }, {\n successMessage: this.$te('message.snackbar.markAsDraft.success') ? this.$t('message.snackbar.markAsDraft.success') : 'Dataset successfully marked as draft',\n errorMessage: { prefix: this.$te('message.snackbar.markAsDraft.error') ? this.$t('message.snackbar.markAsDraft.error') : 'Failed to mark dataset as draft' },\n });\n\n this.$router.push({ name: 'DataProviderInterface-Draft', query: { locale: this.$route.query.locale } }).catch(() => { });\n },\n async handleDelete({ id, property, catalog }) {\n // todo: create user dataset api (and maybe integrate to store)\n // For now, do request manually using axios\n\n this.modal.loading = true;\n this.$Progress.start();\n try {\n let endpoint;\n\n if (property === 'datasets') {\n\n endpoint = `${this.$env.api.hubUrl}datasets/${id}?useNormalizedId=true&catalogue=${catalog}`;\n } else if (property === 'catalogues') {\n endpoint = `${this.$env.api.hubUrl}catalogues/${id}`\n }\n\n await axios.delete(endpoint, {\n\n headers: {\n 'Content-Type': 'text/turtle',\n Authorization: `Bearer ${this.getUserData.rtpToken}`,\n },\n });\n\n let successMessage;\n if (property === 'datasets') {\n successMessage = this.$te('message.snackbar.deleteDataset.success') ? this.$t('message.snackbar.deleteDataset.success') : 'Dataset successfully deleted';\n } else if (property === 'catalogues') {\n successMessage = this.$te('message.snackbar.deleteCatalog.success') ? this.$t('message.snackbar.deleteCatalog.success') : 'Catalog successfully deleted';\n }\n\n\n this.showSnackbar({\n message: successMessage,\n variant: 'success',\n });\n this.$Progress.finish();\n\n // Redirect to Home\n this.$router.push({ name: 'Datasets', query: { locale: this.$route.query.locale, refresh: true } }).catch(() => { });\n } catch (ex) {\n this.$Progress.fail();\n\n let errorMessage;\n\n if (property === 'datasets') {\n errorMessage = this.$te('message.snackbar.deleteDataset.error') ? this.$t('message.snackbar.deleteDataset.error') : 'Failed to delete dataset';\n } else if (property === 'catalogues') {\n errorMessage = this.$te('message.snackbar.deleteCatalog.error') ? this.$t('message.snackbar.deleteCatalog.error') : 'Failed to delete catalog';\n }\n\n this.showSnackbar({\n message: `${errorMessage}${ex.response?.data ? ` — ${ex.response?.data}` : ex.message}`,\n variant: 'error',\n });\n } finally {\n this.modal.loading = false;\n $('#modal').modal('hide');\n }\n },\n },\n created() {\n this.setupKeycloakWatcher();\n },\n};\n</script>\n\n<style lang=\"scss\" scoped>\n#wrapper {\n background: linear-gradient(90deg, #082b7a, #0e47cb);\n width: 100%;\n position: sticky;\n bottom: 0;\n z-index: 999;\n}\n\nnav {\n max-width: 1400px;\n display: flex;\n flex-direction: row;\n margin: 0 auto;\n justify-content: space-between;\n font-size: 1rem;\n align-items: center;\n}\n\nul {\n float: right;\n\n li {\n display: inline;\n\n a {\n color: white;\n }\n }\n}\n\nbutton a {\n color: white;\n}\n\n.logout {\n display: block;\n margin: 0 auto;\n border: 1px solid white;\n padding: 0.1rem 1.5rem;\n}\n\n.logoutWrap {\n width: 14rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n</style>\n"],"names":["_sfc_main","Dropup","x","y","useWindowScroll","mapGetters","$","isOnDatasetDetailsPage","datasetId","permissions","catalogId","permission","onCatalogPage","mapActions","newToken","rtpToken","rtpTokenFn","newRtpToken","action","argsObj","successMessage","errorMessage","resolve","ex","maybeErrorStatusMsg","customErrorMessage","errorMsg","id","catalog","type","title","description","property","endpoint","axios","_a","_b","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_7","_createElementVNode","_openBlock","_createElementBlock","_hoisted_1","$data","_hoisted_2","_toDisplayString","_ctx","_createTextVNode","_Fragment","_renderList","$options","group","index","_createBlock","_component_dropup","menuItem","$setup","_resolveDynamicComponent","_normalizeClass","_withCtx","_hoisted_6","_renderSlot","_hoisted_8","_hoisted_9","_createVNode","_component_router_link","_createCommentVNode","_component_app_confirmation_dialog"],"mappings":";;;;;;;;;AAyDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAAC;AAAA,EACD;AAAA,EACD,OAAO,CAAE;AAAA,EACT,OAAO;AACL,WAAO;AAAA,MACL,SAAS;AAAA,MACT,OAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,QACT,OAAO;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,gBAAgB,MAAM;AAAA,MACvB;AAAA;EAEJ;AAAA,EAC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IAAAnB,EAAA;AAAA,IA0CIiB,EAG0BG,GAAA;AAAA,MAHD,IAAG;AAAA,MAAgB,SAASxB,EAAK,MAAC;AAAA,MAAU,SAASA,EAAK,MAAC;AAAA,MACjF,WAASA,EAAK,MAAC;AAAA;MA3CtB,SAAAgB,EA4CM,MAAmB;AAAA,QA5CzBZ,EA4CSF,EAAAF,EAAA,MAAM,OAAO,GAAA,CAAA;AAAA;MA5CtB,GAAA;AAAA;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as f, watchEffect as
|
|
1
|
+
import { ref as f, watchEffect as L, resolveComponent as M, openBlock as a, createElementBlock as n, toDisplayString as m, createTextVNode as s, unref as d, createCommentVNode as c, createElementVNode as o, withDirectives as I, isRef as V, vModelText as $, Fragment as y, renderList as x, createVNode as _, createBlock as S, createStaticVNode as U } from "vue";
|
|
2
2
|
import A from "./AutocompleteInput.vue.mjs";
|
|
3
3
|
import { onClickOutside as B } from "../../external/@vueuse/core/index";
|
|
4
4
|
import { useRuntimeEnv as N } from "../../composables/useRuntimeEnv.mjs";
|
|
5
5
|
import { useI18n as P } from "vue-i18n";
|
|
6
6
|
import "./ConditionalInput.vue2.mjs";
|
|
7
|
-
const
|
|
7
|
+
const j = { class: "formkitProperty" }, F = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "formkitHeader"
|
|
10
|
-
},
|
|
10
|
+
}, R = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "formkitHeader"
|
|
13
13
|
}, O = {
|
|
@@ -22,17 +22,17 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
22
22
|
viewBox: "0 0 16 16"
|
|
23
23
|
}, [
|
|
24
24
|
/* @__PURE__ */ o("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ s(),
|
|
26
26
|
/* @__PURE__ */ o("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
|
|
27
|
-
], -1), z = /* @__PURE__ */ U(`<div class="w-80"><p
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
], -1), z = /* @__PURE__ */ U(`<div class="w-80"><p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind that <a class="external-link" href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" target="_blank" rel="nofollow noopener"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial
|
|
28
|
+
reuse without prior authorisation, except for the material subject to the third party intellectual property
|
|
29
|
+
rights. This Decision has been implemented under the <a class="external-link" href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en" target="_blank" rel="nofollow noopener"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative
|
|
30
|
+
Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the
|
|
31
|
+
Commission's reuse policy. Additionally, raw data, metadata or other documents of comparable nature may
|
|
32
|
+
alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication
|
|
33
|
+
deed (CC0 1.0).</p> <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have
|
|
34
|
+
approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your
|
|
35
|
+
organisation</strong> before publishing or submitting your dataset.</p> <p>If you need further information regarding copyright issues, please contact us at <span class="nobr"><a class="external-link" href="mailto:op-copyright@publications.europa.eu" target="_blank" rel="nofollow noopener">op-copyright@publications.europa.eu<sup><img class="rendericon" src="https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif" alt="" width="13" height="12" align="absmiddle" border="0"></sup></a></span></p></div>`, 1), H = {
|
|
36
36
|
key: 3,
|
|
37
37
|
class: "d-flex infoLicense py-5"
|
|
38
38
|
}, K = /* @__PURE__ */ o("svg", {
|
|
@@ -44,17 +44,17 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
44
44
|
viewBox: "0 0 16 16"
|
|
45
45
|
}, [
|
|
46
46
|
/* @__PURE__ */ o("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ s(),
|
|
48
48
|
/* @__PURE__ */ o("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
|
|
49
49
|
], -1), W = /* @__PURE__ */ o("p", { class: "textInfoI" }, [
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ s(`As owner of your dataset, you guarantee that it does not violate the copyright, other
|
|
51
51
|
intellectual property or
|
|
52
52
|
privacy rights of any third party. In particular, if third party material is included in the dataset, you must
|
|
53
53
|
ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
|
|
54
54
|
`),
|
|
55
55
|
/* @__PURE__ */ o("br"),
|
|
56
56
|
/* @__PURE__ */ o("br"),
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ s(`
|
|
58
58
|
If you need further information regarding copyright issues, please contact us at
|
|
59
59
|
`),
|
|
60
60
|
/* @__PURE__ */ o("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
|
|
@@ -67,7 +67,7 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
67
67
|
}, ae = { key: 0 }, ne = {
|
|
68
68
|
key: 5,
|
|
69
69
|
class: "formkitCmpWrap simpleConditional"
|
|
70
|
-
},
|
|
70
|
+
}, se = { class: "m-3" }, ie = { class: "conditionalSelectDiv" }, le = ["placeholder"], re = { key: 0 }, de = { class: "selectListConditional" }, ce = ["onClick"], ue = { class: "conditionalManual" }, pe = {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: "d-flex"
|
|
73
73
|
}, me = {
|
|
@@ -85,33 +85,33 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
85
85
|
let b = N();
|
|
86
86
|
const e = D, { t: k } = P();
|
|
87
87
|
let r = f(), u = f(!1), p = f(!1);
|
|
88
|
-
|
|
88
|
+
L(() => {
|
|
89
89
|
e.context.value.name && (r.value = k("message.dataupload.datasets.conditional.vocabulary")), e.context.value["foaf:name"] && (r.value = k("message.dataupload.datasets.conditional.manually"));
|
|
90
90
|
});
|
|
91
91
|
const v = f(null), C = (l) => {
|
|
92
92
|
p.value = !p.value;
|
|
93
93
|
}, E = () => {
|
|
94
94
|
e.context.node.reset();
|
|
95
|
-
}, w = (l,
|
|
96
|
-
r.value =
|
|
95
|
+
}, w = (l, i) => {
|
|
96
|
+
r.value = i, u.value = l, e.context.node.reset(), e.context.value = "";
|
|
97
97
|
};
|
|
98
|
-
return B(v, (l) => p.value = !1), (l,
|
|
99
|
-
const
|
|
100
|
-
return a(), n("div",
|
|
101
|
-
e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (a(), n("h4",
|
|
102
|
-
|
|
98
|
+
return B(v, (l) => p.value = !1), (l, i) => {
|
|
99
|
+
const g = M("FormKit");
|
|
100
|
+
return a(), n("div", j, [
|
|
101
|
+
e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (a(), n("h4", F, m(l.$t("message.dataupload.distributions." + e.context.attrs.identifier + ".label")), 1)) : (a(), n("h4", R, m(l.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
|
|
102
|
+
s(),
|
|
103
103
|
e.context.attrs.identifier === "licence" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", O, [
|
|
104
104
|
X,
|
|
105
|
-
|
|
105
|
+
s(),
|
|
106
106
|
z
|
|
107
107
|
])) : c("", !0),
|
|
108
|
-
|
|
108
|
+
s(),
|
|
109
109
|
e.context.attrs.identifier === "rights" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", H, [
|
|
110
110
|
K,
|
|
111
|
-
|
|
111
|
+
s(),
|
|
112
112
|
W
|
|
113
113
|
])) : c("", !0),
|
|
114
|
-
|
|
114
|
+
s(),
|
|
115
115
|
e.context.attrs.identifier === "rights" ? (a(), n("div", Y, [
|
|
116
116
|
o("div", q, [
|
|
117
117
|
o("div", G, [
|
|
@@ -120,26 +120,26 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
120
120
|
ref: v,
|
|
121
121
|
type: "text",
|
|
122
122
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
123
|
-
onClick:
|
|
123
|
+
onClick: i[0] || (i[0] = (t) => C()),
|
|
124
124
|
placeholder: e.context.attrs.placeholder,
|
|
125
|
-
"onUpdate:modelValue":
|
|
125
|
+
"onUpdate:modelValue": i[1] || (i[1] = (t) => V(r) ? r.value = t : r = t)
|
|
126
126
|
}, null, 8, J), [
|
|
127
127
|
[$, d(r)]
|
|
128
128
|
]),
|
|
129
|
-
|
|
129
|
+
s(),
|
|
130
130
|
d(p) ? (a(), n("div", Q, [
|
|
131
131
|
o("ul", Z, [
|
|
132
|
-
(a(!0), n(
|
|
132
|
+
(a(!0), n(y, null, x(e.context.attrs.selection, (t, h) => (a(), n("li", {
|
|
133
133
|
class: "p-2 border-b border-gray-200",
|
|
134
|
-
onClick: (
|
|
134
|
+
onClick: (T) => w(t, l.$t("message.dataupload.datasets.conditional." + t))
|
|
135
135
|
}, m(l.$t("message.dataupload.datasets.conditional." + t)), 9, ee))), 256))
|
|
136
136
|
])
|
|
137
137
|
])) : c("", !0)
|
|
138
138
|
]),
|
|
139
|
-
|
|
139
|
+
s(),
|
|
140
140
|
o("div", te, [
|
|
141
141
|
d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div", oe, [
|
|
142
|
-
_(
|
|
142
|
+
_(g, {
|
|
143
143
|
type: "url",
|
|
144
144
|
placeholder: l.$t("message.dataupload.datasets.conditional.URL"),
|
|
145
145
|
name: "rdfs:label",
|
|
@@ -147,51 +147,51 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
147
147
|
class: "w-100",
|
|
148
148
|
identifier: "rightsUrl",
|
|
149
149
|
modelValue: e.context.value["rdfs:value"],
|
|
150
|
-
"onUpdate:modelValue":
|
|
150
|
+
"onUpdate:modelValue": i[2] || (i[2] = (t) => e.context.value["rdfs:value"] = t)
|
|
151
151
|
}, null, 8, ["placeholder", "modelValue"])
|
|
152
152
|
])) : c("", !0)
|
|
153
153
|
]),
|
|
154
|
-
|
|
154
|
+
s(),
|
|
155
155
|
d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div", ae, [
|
|
156
|
-
_(
|
|
156
|
+
_(g, {
|
|
157
157
|
type: "text",
|
|
158
158
|
placeholder: l.$t("message.dataupload.datasets.conditional.Text"),
|
|
159
159
|
name: "rdfs:label",
|
|
160
160
|
class: "w-100",
|
|
161
161
|
identifier: "rightsText",
|
|
162
162
|
modelValue: e.context.value["rdfs:value"],
|
|
163
|
-
"onUpdate:modelValue":
|
|
163
|
+
"onUpdate:modelValue": i[3] || (i[3] = (t) => e.context.value["rdfs:value"] = t)
|
|
164
164
|
}, null, 8, ["placeholder", "modelValue"])
|
|
165
165
|
])) : c("", !0)
|
|
166
166
|
])
|
|
167
167
|
])) : (a(), n("div", ne, [
|
|
168
|
-
o("div",
|
|
169
|
-
o("div",
|
|
168
|
+
o("div", se, [
|
|
169
|
+
o("div", ie, [
|
|
170
170
|
I(o("input", {
|
|
171
171
|
ref_key: "I1",
|
|
172
172
|
ref: v,
|
|
173
173
|
type: "text",
|
|
174
174
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
175
|
-
onClick:
|
|
175
|
+
onClick: i[4] || (i[4] = (t) => C()),
|
|
176
176
|
placeholder: e.context.attrs.placeholder,
|
|
177
|
-
"onUpdate:modelValue":
|
|
177
|
+
"onUpdate:modelValue": i[5] || (i[5] = (t) => V(r) ? r.value = t : r = t)
|
|
178
178
|
}, null, 8, le), [
|
|
179
179
|
[$, d(r)]
|
|
180
180
|
]),
|
|
181
|
-
|
|
181
|
+
s(),
|
|
182
182
|
d(p) ? (a(), n("div", re, [
|
|
183
183
|
o("ul", de, [
|
|
184
|
-
(a(!0), n(
|
|
184
|
+
(a(!0), n(y, null, x(e.context.attrs.selection, (t, h) => (a(), n("li", {
|
|
185
185
|
class: "p-2 border-b border-gray-200",
|
|
186
|
-
onClick: (
|
|
186
|
+
onClick: (T) => w(t, l.$t("message.dataupload.datasets.conditional." + t))
|
|
187
187
|
}, m(l.$t("message.dataupload.datasets.conditional." + t)), 9, ce))), 256))
|
|
188
188
|
])
|
|
189
189
|
])) : c("", !0)
|
|
190
190
|
]),
|
|
191
|
-
|
|
191
|
+
s(),
|
|
192
192
|
o("div", ue, [
|
|
193
193
|
d(u) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && d(u) != "vocabulary" ? (a(), n("div", pe, [
|
|
194
|
-
(a(!0), n(
|
|
194
|
+
(a(!0), n(y, null, x(e.context.attrs.options, (t, h) => (a(), S(g, {
|
|
195
195
|
type: h,
|
|
196
196
|
placeholder: l.$t("message.dataupload.datasets.individual." + t),
|
|
197
197
|
name: t,
|
|
@@ -200,16 +200,16 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
200
200
|
}, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
|
|
201
201
|
])) : c("", !0)
|
|
202
202
|
]),
|
|
203
|
-
|
|
203
|
+
s(),
|
|
204
204
|
d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div", me, [
|
|
205
205
|
_(A, {
|
|
206
206
|
context: e.context
|
|
207
207
|
}, null, 8, ["context"])
|
|
208
208
|
])) : c("", !0),
|
|
209
|
-
|
|
209
|
+
s(),
|
|
210
210
|
e.context.value.name ? (a(), n("div", he, [
|
|
211
211
|
o("a", fe, m(e.context.value.name), 1),
|
|
212
|
-
|
|
212
|
+
s(),
|
|
213
213
|
o("div", {
|
|
214
214
|
class: "removeX",
|
|
215
215
|
onClick: E
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/ConditionalInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <!-- <h4 class=\"formkitHeader\">{{ props.context.attrs.identifier.charAt(0).toUpperCase() +\n props.context.attrs.identifier.slice(1) }}</h4> -->\n <h4 class=\"formkitHeader\"\n v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 class=\"formkitHeader\" v-else>\n {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p><em>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind\n that <ins>Decision 2011/833/EU</ins> <a\n href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833]\" target=\"_blank\"\n rel=\"nofollow noopener\">[link</a> ] allows for their commercial reuse without prior authorisation,\n except for the material subject to the third party intellectual property rights. This Decision has been\n implemented under the <ins>Decision C(2019) 1655 final</ins> <a\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en]\"\n target=\"_blank\" rel=\"nofollow noopener\">[link</a> ] by which Creative Commons Attribution 4.0\n International Public License (CC BY 4.0) is adopted as an open licence for the Commission's reuse policy.\n Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed\n under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</em></p>\n <p><em>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have\n approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your\n organisation</strong> before publishing or submitting your dataset.</em></p>\n <p>If you need further information regarding copyright issues, please contact us at <a\n href=\"mailto:op-copyright@publications.europa.eu\" target=\"_blank\"\n rel=\"nofollow noopener\">op-copyright@publications.europa.eu</a></p>\n </div>\n\n\n </div>\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=\"props.context.attrs.placeholder\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'URL' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" :placeholder=\"$t('message.dataupload.datasets.conditional.URL')\" name=\"rdfs:label\" validation=\"url\"\n class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'Text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" :placeholder=\"$t('message.dataupload.datasets.conditional.Text')\" name=\"rdfs:label\" class=\"w-100\"\n identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ConditionalInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/ConditionalInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <!-- <h4 class=\"formkitHeader\">{{ props.context.attrs.identifier.charAt(0).toUpperCase() +\n props.context.attrs.identifier.slice(1) }}</h4> -->\n <h4 class=\"formkitHeader\"\n v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 class=\"formkitHeader\" v-else>\n {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind that <a\n class=\"external-link\" href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial\n reuse without prior authorisation, except for the material subject to the third party intellectual property\n rights. This Decision has been implemented under the <a class=\"external-link\"\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative\n Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the\n Commission's reuse policy. Additionally, raw data, metadata or other documents of comparable nature may\n alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication\n deed (CC0 1.0).</p>\n <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have\n approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your\n organisation</strong> before publishing or submitting your dataset.</p>\n <p>If you need further information regarding copyright issues, please contact us at <span class=\"nobr\"><a\n class=\"external-link\" href=\"mailto:op-copyright@publications.europa.eu\" target=\"_blank\"\n rel=\"nofollow noopener\">op-copyright@publications.europa.eu<sup><img class=\"rendericon\"\n src=\"https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif\" alt=\"\" width=\"13\"\n height=\"12\" align=\"absmiddle\" border=\"0\" /></sup></a></span></p>\n\n </div>\n\n\n </div>\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=\"props.context.attrs.placeholder\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'URL' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" :placeholder=\"$t('message.dataupload.datasets.conditional.URL')\" name=\"rdfs:label\"\n validation=\"url\" class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\">\n </FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'Text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" :placeholder=\"$t('message.dataupload.datasets.conditional.Text')\" name=\"rdfs:label\"\n class=\"w-100\" identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwIA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1084,13 +1084,13 @@ const t = {
|
|
|
1084
1084
|
voc: "licence",
|
|
1085
1085
|
class: "property inDistribution",
|
|
1086
1086
|
options: { text: "dct:title", textarea: "skos:prefLabel", url: "skos:exactMatch" },
|
|
1087
|
-
selection: { 1: "
|
|
1087
|
+
selection: { 1: "vocabulary", 2: "manually" }
|
|
1088
1088
|
},
|
|
1089
1089
|
title: {
|
|
1090
1090
|
identifier: "title",
|
|
1091
1091
|
$formkit: "repeatable",
|
|
1092
1092
|
name: "dct:title",
|
|
1093
|
-
class: "property inDistribution",
|
|
1093
|
+
class: "property inDistribution langStringInput mandatory",
|
|
1094
1094
|
children: [
|
|
1095
1095
|
{
|
|
1096
1096
|
identifier: "title",
|