@piveau/piveau-hub-ui-modules 4.4.0-beta.2 → 4.4.0

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 (98) hide show
  1. package/dist/catalogues/CatalogPage.vue.mjs +23 -22
  2. package/dist/catalogues/CatalogPage.vue.mjs.map +1 -1
  3. package/dist/composables/head/useDatasetDetailsDatasetHead.mjs +19 -15
  4. package/dist/composables/head/useDatasetDetailsDatasetHead.mjs.map +1 -1
  5. package/dist/composables/useRuntimeEnv.d.ts +1 -1
  6. package/dist/configurations/config-schema/apiSchema.d.ts +3 -3
  7. package/dist/configurations/config-schema/apiSchema.mjs +1 -1
  8. package/dist/configurations/config-schema/apiSchema.mjs.map +1 -1
  9. package/dist/configurations/config-schema/configSchema.d.ts +5 -5
  10. package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
  11. package/dist/data-provider-interface/DPIMenu.vue.mjs +3 -3
  12. package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
  13. package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +29 -7
  14. package/dist/data-provider-interface/DataProviderInterface.vue.mjs +12 -69
  15. package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
  16. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +91 -2
  17. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
  18. package/dist/data-provider-interface/DataProviderInterface.vue3.mjs +5 -0
  19. package/dist/data-provider-interface/DataProviderInterface.vue3.mjs.map +1 -0
  20. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +66 -65
  21. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  22. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +127 -115
  23. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  24. package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +1 -1
  25. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs +25 -19
  26. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs.map +1 -1
  27. package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
  28. package/dist/data-provider-interface/components/Navigation.vue.d.ts +5 -5
  29. package/dist/data-provider-interface/composables/index.d.ts +2 -0
  30. package/dist/data-provider-interface/composables/useDpiContext.d.ts +17 -0
  31. package/dist/data-provider-interface/composables/useDpiContext.mjs +19 -0
  32. package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -0
  33. package/dist/data-provider-interface/composables/useDpiEditMode.d.ts +16 -0
  34. package/dist/data-provider-interface/composables/useDpiEditMode.mjs +41 -0
  35. package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -0
  36. package/dist/data-provider-interface/config/dcatap/input-definition.mjs +28 -2
  37. package/dist/data-provider-interface/config/dcatap/input-definition.mjs.map +1 -1
  38. package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +5 -2
  39. package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
  40. package/dist/data-provider-interface/config/dpi-spec-config.mjs +1 -0
  41. package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
  42. package/dist/data-provider-interface/index.d.ts +2 -0
  43. package/dist/data-provider-interface/index.mjs +11 -0
  44. package/dist/data-provider-interface/index.mjs.map +1 -0
  45. package/dist/data-provider-interface/store/dpiStore.d.ts +31 -15
  46. package/dist/data-provider-interface/store/dpiStore.mjs +30 -13
  47. package/dist/data-provider-interface/store/dpiStore.mjs.map +1 -1
  48. package/dist/data-provider-interface/store/modules/autocompleteStore.d.ts +3 -1
  49. package/dist/data-provider-interface/store/modules/autocompleteStore.mjs +28 -29
  50. package/dist/data-provider-interface/store/modules/autocompleteStore.mjs.map +1 -1
  51. package/dist/data-provider-interface/store/modules/conversionStore.d.ts +6 -6
  52. package/dist/data-provider-interface/store/modules/conversionStore.mjs +21 -22
  53. package/dist/data-provider-interface/store/modules/conversionStore.mjs.map +1 -1
  54. package/dist/data-provider-interface/store/modules/formSchemaStore.d.ts +5 -3
  55. package/dist/data-provider-interface/store/modules/formSchemaStore.mjs +29 -29
  56. package/dist/data-provider-interface/store/modules/formSchemaStore.mjs.map +1 -1
  57. package/dist/data-provider-interface/store/modules/navigationStore.d.ts +1 -1
  58. package/dist/data-provider-interface/store/modules/navigationStore.mjs +13 -14
  59. package/dist/data-provider-interface/store/modules/navigationStore.mjs.map +1 -1
  60. package/dist/data-provider-interface/utils/RDFconverter.mjs +63 -60
  61. package/dist/data-provider-interface/utils/RDFconverter.mjs.map +1 -1
  62. package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +2 -2
  63. package/dist/data-provider-interface/views/InputPage.vue.d.ts +3 -3
  64. package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs +1 -1
  65. package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +1 -1
  66. package/dist/datasetDetails/DatasetDetails.vue.d.ts +1 -1
  67. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs +1 -1
  68. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs.map +1 -1
  69. package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs.map +1 -1
  70. package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
  71. package/dist/datasetDetails/distributions/Distribution.vue.mjs +45 -43
  72. package/dist/datasetDetails/distributions/Distribution.vue.mjs.map +1 -1
  73. package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +3 -3
  74. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
  75. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.d.ts +1 -0
  76. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs +18 -14
  77. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs.map +1 -1
  78. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +3 -3
  79. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs +68 -57
  80. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs.map +1 -1
  81. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue2.mjs +2 -2
  82. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
  83. package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
  84. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
  85. package/dist/embed/EmbedDataset.vue.d.ts +1 -1
  86. package/dist/embed/EmbedDatasetSnippet.vue.d.ts +2 -2
  87. package/dist/external/@vueuse/core/index +129 -80
  88. package/dist/external/@vueuse/core/index.map +1 -1
  89. package/dist/external/@vueuse/shared/index +121 -17
  90. package/dist/external/@vueuse/shared/index.map +1 -1
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.mjs +250 -248
  93. package/dist/index.mjs.map +1 -1
  94. package/dist/piveau-hub-ui-modules.css +1 -1
  95. package/dist/services/datasetService.d.ts +1 -1
  96. package/dist/services/datasetService.mjs +2 -2
  97. package/dist/services/datasetService.mjs.map +1 -1
  98. 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-f901edd8"), e = e(), z(), e), R = {
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-f901edd8"]]);
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,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A8BiBD,EAAA,YAAY,YAAvBN,KAAAC,EASM,OATNmB,GASM;AAAA,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,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AAA,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,6 +1,20 @@
1
- declare const _default: import('vue').DefineComponent<Readonly<{
2
- name?: any;
3
- }>, any, {
1
+ import { DpiContext } from './composables/useDpiContext';
2
+ import { PropType } from 'vue';
3
+
4
+ declare const _default: import('vue').DefineComponent<{
5
+ name: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ };
9
+ dpiContext: {
10
+ type: PropType<DpiContext>;
11
+ default: () => undefined;
12
+ };
13
+ }, {
14
+ resolvedDpiContext: import('vue').ComputedRef<DpiContext>;
15
+ key: import('vue').ComputedRef<string>;
16
+ isReady: import('vue').ComputedRef<boolean>;
17
+ }, {
4
18
  property: string | string[];
5
19
  id: string | string[];
6
20
  }, {
@@ -11,9 +25,17 @@ declare const _default: import('vue').DefineComponent<Readonly<{
11
25
  handleScroll(): void;
12
26
  populateDraftAndEdit: import('vuex').ActionMethod;
13
27
  saveLocalstorageValues: import('vuex').ActionMethod;
14
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
15
- name?: any;
16
- }>>>, {
17
- readonly name?: any;
28
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
29
+ name: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ dpiContext: {
34
+ type: PropType<DpiContext>;
35
+ default: () => undefined;
36
+ };
37
+ }>>, {
38
+ name: string;
39
+ dpiContext: DpiContext;
18
40
  }, {}>;
19
41
  export default _default;
@@ -1,78 +1,21 @@
1
- import { defineAsyncComponent as s, resolveComponent as n, openBlock as t, createElementBlock as i, createBlock as d } from "vue";
2
- import { mapGetters as p, mapActions as a } from "vuex";
3
- import "./DataProviderInterface.vue2.mjs";
4
- import c from "../_virtual/_plugin-vue_export-helper.mjs";
5
- const m = {
6
- name: "DataProviderInterface",
7
- components: {
8
- InputPage: s(() => import("./views/InputPage.vue.mjs"))
9
- },
10
- props: ["name"],
11
- metaInfo() {
12
- return {
13
- title: `${this.$t("message.metadata.upload")} | ${this.$t("message.header.navigation.data.datasets")}`,
14
- meta: [
15
- { name: "description", vmid: "description", content: `${this.$t("message.datasets.meta.description")}` },
16
- { name: "keywords", vmid: "keywords", content: `${this.$env.metadata.keywords} ${this.$t("message.datasets.meta.description")}}` },
17
- { name: "robots", content: "noindex, follow" }
18
- ]
19
- };
20
- },
21
- data() {
22
- return {
23
- property: this.$route.params.property,
24
- id: this.$route.params.id
25
- };
26
- },
27
- computed: {
28
- ...p("auth", [
29
- "getIsEditMode"
30
- ]),
31
- mode() {
32
- return this.property === "catalogues" ? this.getIsEditMode ? this.$t("message.dataupload.menu.editCatalogue") : this.$t("message.dataupload.createNewCatalogue") : this.property === "datasets" ? this.getIsEditMode ? this.$t("message.dataupload.menu.editDataset") : this.$t("message.dataupload.createNewDataset") : "Edit Distribution";
33
- }
34
- },
35
- methods: {
36
- ...a("dpiStore", [
37
- "saveLocalstorageValues"
38
- ]),
39
- ...a("auth", [
40
- "populateDraftAndEdit"
41
- ]),
42
- getClearPath() {
43
- return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;
44
- },
45
- handleScroll() {
46
- try {
47
- document.getElementById("stepperAnchor").offsetTop >= 35 ? document.getElementById("stepperAnchor").classList.add("border-bottom-lightgray") : document.getElementById("stepperAnchor").classList.remove("border-bottom-lightgray");
48
- } catch {
49
- }
50
- }
51
- },
52
- created() {
53
- window.addEventListener("scroll", this.handleScroll), this.populateDraftAndEdit();
54
- },
55
- mounted() {
56
- this.saveLocalstorageValues(this.property);
57
- },
58
- unmounted() {
59
- window.removeEventListener("scroll", this.handleScroll);
60
- }
61
- };
62
- function l(e, u, h, g, o, $) {
1
+ import t from "./DataProviderInterface.vue2.mjs";
2
+ import { resolveComponent as n, openBlock as o, createElementBlock as i, createBlock as a, createCommentVNode as c } from "vue";
3
+ import "./DataProviderInterface.vue3.mjs";
4
+ import p from "../_virtual/_plugin-vue_export-helper.mjs";
5
+ function s(e, f, m, l, d, u) {
63
6
  const r = n("router-view");
64
- return t(), i("div", {
7
+ return o(), i("div", {
65
8
  class: "d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100",
66
- key: o.property
9
+ key: e.property
67
10
  }, [
68
- (t(), d(r, {
11
+ e.isReady ? (o(), a(r, {
69
12
  ref: "view",
70
- key: e.$route.query.edit
71
- }))
13
+ key: e.key
14
+ })) : c("", !0)
72
15
  ]);
73
16
  }
74
- const E = /* @__PURE__ */ c(m, [["render", l]]);
17
+ const w = /* @__PURE__ */ p(t, [["render", s]]);
75
18
  export {
76
- E as default
19
+ w as default
77
20
  };
78
21
  //# sourceMappingURL=DataProviderInterface.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataProviderInterface.vue.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view ref=\"view\" :key=\"$route.query.edit\">\n </router-view>\n </div>\n</template>\n\n<script>\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { defineAsyncComponent } from 'vue';\nimport { mapActions, mapGetters } from 'vuex';\n\nexport default {\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage')),\n },\n props: ['name'],\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\").offsetTop >= 35) {\n document.getElementById(\"stepperAnchor\").classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\").classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n};\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_sfc_main","defineAsyncComponent","mapGetters","mapActions","_createElementBlock","$data","_createBlock","_component_router_view","_ctx"],"mappings":";;;;AAaA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,WAAWC,EAAqB,MAAM,OAAO,2BAAmB,CAAC;AAAA,EAClE;AAAA,EACD,OAAO,CAAC,MAAM;AAAA,EACd,WAAW;AACT,WAAO;AAAA,MACL,OAAO,GAAG,KAAK,GAAG,yBAAyB,CAAC,MAAM,KAAK,GAAG,yCAAyC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AU,KAAK,YAAY,GACnD,KAAK,qBAAoB;AAAA,EAC1B;AAAA,EACD,UAAU;AACR,SAAK,uBAAuB,KAAK,QAAQ;AAAA,EAC1C;AAAA,EACD,YAAY;AACV,WAAO,oBAAoB,UAAU,KAAK,YAAY;AAAA,EACvD;AACH;;;cApFEC,EAIM,OAAA;AAAA,IAJD,OAAM;AAAA,IAAyG,KAAKC,EAAQ;AAAA;UAE/HC,EACcC,GAAA;AAAA,MADD,KAAI;AAAA,MAAQ,KAAKC,EAAA,OAAO,MAAM;AAAA;;;;"}
1
+ {"version":3,"file":"DataProviderInterface.vue.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view v-if=\"isReady\" ref=\"view\" :key=\"key\">\n </router-view>\n </div>\n</template>\n\n<script lang=\"ts\">\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { DpiContext, setupDpiContext } from './composables/useDpiContext';\nimport { computed, defineAsyncComponent, defineComponent, PropType , ref, toRef, toRefs, watch, watchEffect} from 'vue';\nimport { mapActions, mapGetters, useStore } from 'vuex';\nimport dpiSpecs from './config/dpi-spec-config';\nimport { useRuntimeEnv } from '../composables/useRuntimeEnv';\nimport { useRoute } from 'vue-router';\nimport { useAsyncState, watchOnce } from '@vueuse/core';\nimport { useDpiEditMode } from './composables/useDpiEditMode';\n\n\n\nexport default defineComponent({\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage.vue')),\n },\n props: {\n name: {\n type: String,\n default: '',\n },\n dpiContext: {\n type: Object as PropType<DpiContext>,\n default: () => undefined,\n }\n },\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\")?.offsetTop || 0 >= 35) {\n document.getElementById(\"stepperAnchor\")?.classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\")?.classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n setup(props) {\n const route = useRoute()\n const store = useStore()\n const env = useRuntimeEnv()\n const userSpec = env.content.dataProviderInterface.specification as 'dcatap' | 'dcatapde' | 'dcatapdeODB'\n const fallbackSpec = dpiSpecs[userSpec]\n const dpiContext = toRef(props, 'dpiContext')\n\n const resolvedDpiContext = computed<DpiContext>(() => {\n return dpiContext.value || {\n specification: fallbackSpec,\n specificationName: userSpec\n }\n })\n\n setupDpiContext(resolvedDpiContext)\n\n watchEffect(() => {\n store.dispatch('dpiStore/setSpecification', resolvedDpiContext.value.specification)\n store.dispatch('dpiStore/setSpecificationname', resolvedDpiContext.value.specificationName)\n })\n\n const key = computed(() => {\n return `${route.query.key}@${resolvedDpiContext.value.specificationName}`\n })\n\n const { isReady } = useDpiEditMode(resolvedDpiContext)\n\n return {\n resolvedDpiContext,\n key,\n isReady,\n }\n\n }\n});\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_resolveComponent","property","_createElementBlock","isReady","_ctx","_openBlock","_createBlock","_component_router_view","_createCommentVNode"],"mappings":";;;;;YACEA,EAIM,aAAA;SAJmHC,EAAQ,GAAAC,EAAA,OAAA;AAAA,IAAA,OAAA;AAAA,IAE5GC,KAAAA,EAAAA;AAAAA,EAAAA,GAAAA;AAAAA,IAASC,EAAA,WAAAC,KAAoBC,EAAAC,GAAA;AAAA,MAAA,KAAA;AAAA,MAHpD,KAAAH,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
@@ -1,5 +1,94 @@
1
- const e = "";
1
+ import { setupDpiContext as l } from "./composables/useDpiContext.mjs";
2
+ import { defineComponent as u, defineAsyncComponent as h, toRef as f, computed as i, watchEffect as g } from "vue";
3
+ import { mapGetters as v, mapActions as r, useStore as $ } from "vuex";
4
+ import { config as y } from "./config/dpi-spec-config.mjs";
5
+ import { useRuntimeEnv as E } from "../composables/useRuntimeEnv.mjs";
6
+ import { useRoute as S } from "vue-router";
7
+ import { useDpiEditMode as w } from "./composables/useDpiEditMode.mjs";
8
+ const L = u({
9
+ name: "DataProviderInterface",
10
+ components: {
11
+ InputPage: h(() => import("./views/InputPage.vue.mjs"))
12
+ },
13
+ props: {
14
+ name: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ dpiContext: {
19
+ type: Object,
20
+ default: () => {
21
+ }
22
+ }
23
+ },
24
+ metaInfo() {
25
+ return {
26
+ title: `${this.$t("message.metadata.upload")} | ${this.$t("message.header.navigation.data.datasets")}`,
27
+ meta: [
28
+ { name: "description", vmid: "description", content: `${this.$t("message.datasets.meta.description")}` },
29
+ { name: "keywords", vmid: "keywords", content: `${this.$env.metadata.keywords} ${this.$t("message.datasets.meta.description")}}` },
30
+ { name: "robots", content: "noindex, follow" }
31
+ ]
32
+ };
33
+ },
34
+ data() {
35
+ return {
36
+ property: this.$route.params.property,
37
+ id: this.$route.params.id
38
+ };
39
+ },
40
+ computed: {
41
+ ...v("auth", [
42
+ "getIsEditMode"
43
+ ]),
44
+ mode() {
45
+ return this.property === "catalogues" ? this.getIsEditMode ? this.$t("message.dataupload.menu.editCatalogue") : this.$t("message.dataupload.createNewCatalogue") : this.property === "datasets" ? this.getIsEditMode ? this.$t("message.dataupload.menu.editDataset") : this.$t("message.dataupload.createNewDataset") : "Edit Distribution";
46
+ }
47
+ },
48
+ methods: {
49
+ ...r("dpiStore", [
50
+ "saveLocalstorageValues"
51
+ ]),
52
+ ...r("auth", [
53
+ "populateDraftAndEdit"
54
+ ]),
55
+ getClearPath() {
56
+ return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;
57
+ },
58
+ handleScroll() {
59
+ var o, a, t;
60
+ try {
61
+ (o = document.getElementById("stepperAnchor")) != null && o.offsetTop || 0 >= 35 ? (a = document.getElementById("stepperAnchor")) == null || a.classList.add("border-bottom-lightgray") : (t = document.getElementById("stepperAnchor")) == null || t.classList.remove("border-bottom-lightgray");
62
+ } catch {
63
+ }
64
+ }
65
+ },
66
+ created() {
67
+ window.addEventListener("scroll", this.handleScroll), this.populateDraftAndEdit();
68
+ },
69
+ mounted() {
70
+ this.saveLocalstorageValues(this.property);
71
+ },
72
+ unmounted() {
73
+ window.removeEventListener("scroll", this.handleScroll);
74
+ },
75
+ setup(o) {
76
+ const a = S(), t = $(), s = E().content.dataProviderInterface.specification, d = y[s], p = f(o, "dpiContext"), e = i(() => p.value || {
77
+ specification: d,
78
+ specificationName: s
79
+ });
80
+ l(e), g(() => {
81
+ t.dispatch("dpiStore/setSpecification", e.value.specification), t.dispatch("dpiStore/setSpecificationname", e.value.specificationName);
82
+ });
83
+ const c = i(() => `${a.query.key}@${e.value.specificationName}`), { isReady: m } = w();
84
+ return {
85
+ resolvedDpiContext: e,
86
+ key: c,
87
+ isReady: m
88
+ };
89
+ }
90
+ });
2
91
  export {
3
- e as default
92
+ L as default
4
93
  };
5
94
  //# sourceMappingURL=DataProviderInterface.vue2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataProviderInterface.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"DataProviderInterface.vue2.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view v-if=\"isReady\" ref=\"view\" :key=\"key\">\n </router-view>\n </div>\n</template>\n\n<script lang=\"ts\">\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { DpiContext, setupDpiContext } from './composables/useDpiContext';\nimport { computed, defineAsyncComponent, defineComponent, PropType , ref, toRef, toRefs, watch, watchEffect} from 'vue';\nimport { mapActions, mapGetters, useStore } from 'vuex';\nimport dpiSpecs from './config/dpi-spec-config';\nimport { useRuntimeEnv } from '../composables/useRuntimeEnv';\nimport { useRoute } from 'vue-router';\nimport { useAsyncState, watchOnce } from '@vueuse/core';\nimport { useDpiEditMode } from './composables/useDpiEditMode';\n\n\n\nexport default defineComponent({\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage.vue')),\n },\n props: {\n name: {\n type: String,\n default: '',\n },\n dpiContext: {\n type: Object as PropType<DpiContext>,\n default: () => undefined,\n }\n },\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\")?.offsetTop || 0 >= 35) {\n document.getElementById(\"stepperAnchor\")?.classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\")?.classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n setup(props) {\n const route = useRoute()\n const store = useStore()\n const env = useRuntimeEnv()\n const userSpec = env.content.dataProviderInterface.specification as 'dcatap' | 'dcatapde' | 'dcatapdeODB'\n const fallbackSpec = dpiSpecs[userSpec]\n const dpiContext = toRef(props, 'dpiContext')\n\n const resolvedDpiContext = computed<DpiContext>(() => {\n return dpiContext.value || {\n specification: fallbackSpec,\n specificationName: userSpec\n }\n })\n\n setupDpiContext(resolvedDpiContext)\n\n watchEffect(() => {\n store.dispatch('dpiStore/setSpecification', resolvedDpiContext.value.specification)\n store.dispatch('dpiStore/setSpecificationname', resolvedDpiContext.value.specificationName)\n })\n\n const key = computed(() => {\n return `${route.query.key}@${resolvedDpiContext.value.specificationName}`\n })\n\n const { isReady } = useDpiEditMode(resolvedDpiContext)\n\n return {\n resolvedDpiContext,\n key,\n isReady,\n }\n\n }\n});\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_sfc_main","defineComponent","defineAsyncComponent","mapGetters","mapActions","_a","_b","_c","props","route","useRoute","store","useStore","userSpec","useRuntimeEnv","fallbackSpec","dpiSpecs","dpiContext","toRef","res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iB,EACxE,GAEK,EAAE,SAAAK,EAAA,IAAYC,EAAiC;AAE9C,WAAA;AAAA,MACL,oBAAAN;AAAA,MACA,KAAAI;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAGJ;AACF,CAAC;"}
@@ -0,0 +1,5 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
5
+ //# sourceMappingURL=DataProviderInterface.vue3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataProviderInterface.vue3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}