@piveau/piveau-hub-ui-modules 4.1.3 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-provider-interface/DPIMenu.vue.mjs +21 -22
- package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +182 -48
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/DistributionStepper.vue.mjs +33 -32
- package/dist/data-provider-interface/components/DistributionStepper.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/FileUpload.vue.d.ts +3 -0
- package/dist/data-provider-interface/components/FileUpload.vue.mjs +146 -139
- package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +55 -44
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatap/format-types.mjs +3 -3
- package/dist/data-provider-interface/config/dcatap/format-types.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs +108 -86
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +3 -3
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +13 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.mjs +154 -111
- package/dist/data-provider-interface/views/DraftsPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.mjs +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.mjs +27 -24
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.mjs.map +1 -1
- package/dist/form/Repeatable.vue.mjs +33 -33
- package/dist/form/Repeatable.vue.mjs.map +1 -1
- package/dist/form/inputDefinitions.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/dist/scss/_dpi-style.scss +17 -3
- package/dist/store/modules/authStore.d.ts +9 -0
- package/dist/store/modules/authStore.mjs +32 -24
- package/dist/store/modules/authStore.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import w from "axios";
|
|
2
2
|
import m from "jquery";
|
|
3
3
|
import "lodash-es";
|
|
4
|
-
import { mapGetters as
|
|
5
|
-
import
|
|
6
|
-
import { useWindowScroll as
|
|
7
|
-
import { resolveComponent as f, openBlock as d, createElementBlock as h, createElementVNode as l, toDisplayString as c, createTextVNode as u, Fragment as
|
|
4
|
+
import { mapGetters as $, mapActions as k } from "vuex";
|
|
5
|
+
import A from "./components/Dropup.vue.mjs";
|
|
6
|
+
import { useWindowScroll as T } from "../external/@vueuse/core/index";
|
|
7
|
+
import { resolveComponent as f, openBlock as d, createElementBlock as h, createElementVNode as l, toDisplayString as c, createTextVNode as u, Fragment as y, renderList as b, createBlock as C, resolveDynamicComponent as U, normalizeClass as q, withCtx as D, renderSlot as S, createVNode as P, createCommentVNode as v, pushScopeId as z, popScopeId as L } from "vue";
|
|
8
8
|
import "./DPIMenu.vue2.mjs";
|
|
9
9
|
import O from "../_virtual/_plugin-vue_export-helper.mjs";
|
|
10
10
|
const M = {
|
|
11
11
|
name: "DPI-menu",
|
|
12
12
|
components: {
|
|
13
|
-
Dropup:
|
|
13
|
+
Dropup: A
|
|
14
14
|
},
|
|
15
15
|
props: {},
|
|
16
16
|
data() {
|
|
@@ -29,20 +29,20 @@ const M = {
|
|
|
29
29
|
setup() {
|
|
30
30
|
return {
|
|
31
31
|
scrollToTop: () => {
|
|
32
|
-
let { x: t, y: o } =
|
|
32
|
+
let { x: t, y: o } = T({ behavior: "smooth" });
|
|
33
33
|
o.value = 0;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
computed: {
|
|
38
|
-
|
|
38
|
+
...$("datasetDetails", [
|
|
39
39
|
"getCatalog",
|
|
40
40
|
"getID",
|
|
41
41
|
"getLoading",
|
|
42
42
|
"getTitle",
|
|
43
43
|
"getDescription"
|
|
44
44
|
]),
|
|
45
|
-
|
|
45
|
+
...$("auth", [
|
|
46
46
|
"getUserData"
|
|
47
47
|
]),
|
|
48
48
|
menuGroups() {
|
|
@@ -203,10 +203,10 @@ const M = {
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
methods: {
|
|
206
|
-
...
|
|
206
|
+
...k("auth", [
|
|
207
207
|
"updateUserData"
|
|
208
208
|
]),
|
|
209
|
-
...
|
|
209
|
+
...k("snackbar", [
|
|
210
210
|
"showSnackbar"
|
|
211
211
|
]),
|
|
212
212
|
setupKeycloakWatcher() {
|
|
@@ -311,7 +311,7 @@ const M = {
|
|
|
311
311
|
created() {
|
|
312
312
|
this.setupKeycloakWatcher();
|
|
313
313
|
}
|
|
314
|
-
}, N = (e) => (z("data-v-
|
|
314
|
+
}, N = (e) => (z("data-v-6f96de4e"), e = e(), L(), e), R = {
|
|
315
315
|
id: "wrapper",
|
|
316
316
|
"data-cy": "dpi-menu"
|
|
317
317
|
}, x = { key: 0 }, E = { class: "text-white" }, H = { style: { "margin-top": "1%" } }, F = { class: "btn-group dropup" }, B = {
|
|
@@ -322,7 +322,7 @@ const M = {
|
|
|
322
322
|
class: "btn btn-default logout"
|
|
323
323
|
};
|
|
324
324
|
function K(e, t, o, s, a, r) {
|
|
325
|
-
const i = f("dropup"), g = f("router-link"),
|
|
325
|
+
const i = f("dropup"), g = f("router-link"), _ = f("app-confirmation-dialog");
|
|
326
326
|
return d(), h("div", R, [
|
|
327
327
|
a.visible ? (d(), h("nav", x, [
|
|
328
328
|
l("div", null, [
|
|
@@ -330,9 +330,8 @@ function K(e, t, o, s, a, r) {
|
|
|
330
330
|
]),
|
|
331
331
|
u(),
|
|
332
332
|
l("div", H, [
|
|
333
|
-
(d(!0), h(
|
|
333
|
+
(d(!0), h(y, null, b(r.menuGroups, (n, p) => (d(), C(i, {
|
|
334
334
|
key: `Group${p}`,
|
|
335
|
-
onClick: t[0] || (t[0] = ($) => s.scrollToTop()),
|
|
336
335
|
groupName: n.group,
|
|
337
336
|
groupItems: n.items,
|
|
338
337
|
show: e.$env.content.dataProviderInterface.buttons[n.group],
|
|
@@ -342,18 +341,18 @@ function K(e, t, o, s, a, r) {
|
|
|
342
341
|
u(),
|
|
343
342
|
l("ul", null, [
|
|
344
343
|
l("div", F, [
|
|
345
|
-
(d(!0), h(
|
|
344
|
+
(d(!0), h(y, null, b(r.menuItems, (n, p) => (d(), h("li", {
|
|
346
345
|
key: `Menu${p}`
|
|
347
346
|
}, [
|
|
348
347
|
l("button", {
|
|
349
348
|
type: "button",
|
|
350
349
|
class: "btn btn-default",
|
|
351
|
-
onClick: t[
|
|
350
|
+
onClick: t[0] || (t[0] = (I) => s.scrollToTop())
|
|
352
351
|
}, [
|
|
353
|
-
(d(),
|
|
352
|
+
(d(), C(U(n.handler ? "button" : "router-link"), {
|
|
354
353
|
class: q({ disabled: n.disabled }),
|
|
355
354
|
to: n.to,
|
|
356
|
-
onClick: (
|
|
355
|
+
onClick: (I) => n.handler ? n.handler() : null
|
|
357
356
|
}, {
|
|
358
357
|
default: D(() => [
|
|
359
358
|
u(c(n.handler) + " " + c(n.name), 1)
|
|
@@ -380,10 +379,10 @@ function K(e, t, o, s, a, r) {
|
|
|
380
379
|
})
|
|
381
380
|
])
|
|
382
381
|
], !0)
|
|
383
|
-
])) :
|
|
384
|
-
])) :
|
|
382
|
+
])) : v("", !0)
|
|
383
|
+
])) : v("", !0),
|
|
385
384
|
u(),
|
|
386
|
-
P(
|
|
385
|
+
P(_, {
|
|
387
386
|
id: "DPIMenuModal",
|
|
388
387
|
loading: a.modal.loading,
|
|
389
388
|
confirm: a.modal.confirm,
|
|
@@ -396,7 +395,7 @@ function K(e, t, o, s, a, r) {
|
|
|
396
395
|
}, 8, ["loading", "confirm", "onConfirm"])
|
|
397
396
|
]);
|
|
398
397
|
}
|
|
399
|
-
const se = /* @__PURE__ */ O(M, [["render", K], ["__scopeId", "data-v-
|
|
398
|
+
const se = /* @__PURE__ */ O(M, [["render", K], ["__scopeId", "data-v-6f96de4e"]]);
|
|
400
399
|
export {
|
|
401
400
|
se as default
|
|
402
401
|
};
|
|
@@ -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}`\" @click=\"scrollToTop()\"\n :groupName=\"group.group\" :groupItems=\"group.items\"\n :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><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: this.$t('message.dataupload.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: this.$t('message.dataupload.menu.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: this.$t('message.dataupload.menu.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 key: 'draft-dataset',\n name: this.$t('message.dataupload.menu.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: this.$t('message.dataupload.menu.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: 'Create Catalogue',\n to: {\n name: 'DataProviderInterface-Input',\n query: { locale: this.$route.query.locale, edit: false },\n params: { property: 'catalogues' }\n },\n },\n {\n name: 'Delete Catalogue',\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: 'Edit Catalog',\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: 'My Catalogues',\n to: { name: 'DataProviderInterface-UserCatalogues', query: { locale: this.$route.query.locale } },\n },\n {\n name: 'User profile',\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 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\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 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: 13rem;\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","$setup","menuItem","_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,KAAK,GAAG,kCAAkC;AAAA,cAChD,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,KAAK,GAAG,uCAAuC;AAAA,cACrD,UA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AAGC,EAAW,YAAC,QAAQ,GAAA,CAAA;AAAA,UACpFgB;AAAA,UAlCtBf,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}`\" \n :groupName=\"group.group\" :groupItems=\"group.items\"\n :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><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: this.$t('message.dataupload.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: this.$t('message.dataupload.menu.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: this.$t('message.dataupload.menu.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 key: 'draft-dataset',\n name: this.$t('message.dataupload.menu.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: this.$t('message.dataupload.menu.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: 'Create Catalogue',\n to: {\n name: 'DataProviderInterface-Input',\n query: { locale: this.$route.query.locale, edit: false },\n params: { property: 'catalogues' }\n },\n },\n {\n name: 'Delete Catalogue',\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: 'Edit Catalog',\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: 'My Catalogues',\n to: { name: 'DataProviderInterface-UserCatalogues', query: { locale: this.$route.query.locale } },\n },\n {\n name: 'User profile',\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 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\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 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: 13rem;\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,M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tF,SAAAI,EAqBkB,MAAsB;AAAA,oBArBxCZ,EAqBqBF,EAAAU,EAAS,OAAO,IAAG,MACnBV,EAAAU,EAAS,IAAI,GAAA,CAAA;AAAA;kBAtBlC,GAAA;AAAA;;;;;;MAAAR,EAAA;AAAA,MA+BiBD,EAAA,YAAY,YAAvBN,KAAAC,EAQM,OARNmB,GAQM;AAAA,QAPJC,EAMOf,EANa,QAAA,SAAA,EAAA,aAAeA,EAAA,YAAW,GAA9C,MAMO;AAAA,UALLP,EACY,SADZD,GAA6BO,EAAAC,EAAA,4CAA2C,MAACD,EAAGC,EAAW,YAAC,QAAQ,GAAA,CAAA;AAAA,UACpFgB;AAAA,UAlCtBf,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,80 +1,214 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import { onClickOutside as
|
|
1
|
+
import { ref as h, resolveComponent as T, openBlock as i, createElementBlock as l, createElementVNode as e, toDisplayString as x, createTextVNode as o, unref as r, createCommentVNode as u, withDirectives as I, isRef as M, vModelText as V, Fragment as b, renderList as _, createVNode as g, createBlock as D } from "vue";
|
|
2
|
+
import U from "./AutocompleteInput.vue.mjs";
|
|
3
|
+
import { onClickOutside as A } from "../../external/@vueuse/core/index";
|
|
4
|
+
import { useRuntimeEnv as E } from "../../composables/useRuntimeEnv.mjs";
|
|
4
5
|
import "./ConditionalInput.vue2.mjs";
|
|
5
|
-
const
|
|
6
|
+
const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "d-flex infoLicense py-5"
|
|
9
|
+
}, H = /* @__PURE__ */ e("svg", {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
width: "30px",
|
|
12
|
+
height: "30px",
|
|
13
|
+
fill: "currentColor",
|
|
14
|
+
class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
|
|
15
|
+
viewBox: "0 0 16 16"
|
|
16
|
+
}, [
|
|
17
|
+
/* @__PURE__ */ e("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" }),
|
|
18
|
+
/* @__PURE__ */ o(),
|
|
19
|
+
/* @__PURE__ */ e("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" })
|
|
20
|
+
], -1), N = /* @__PURE__ */ e("p", { class: "textInfoI" }, [
|
|
21
|
+
/* @__PURE__ */ o("For European Commission’s datasets, bear in mind that Decision "),
|
|
22
|
+
/* @__PURE__ */ e("a", { href: "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" }, "2011/833/EU"),
|
|
23
|
+
/* @__PURE__ */ o(` allows for their
|
|
24
|
+
commercial reuse
|
|
25
|
+
without prior authorisation, except for the material subject to the third party intellectual property rights.
|
|
26
|
+
This Decision has been implemented under the `),
|
|
27
|
+
/* @__PURE__ */ e("a", { href: "https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en" }, `Decision C(2019)
|
|
28
|
+
1655 final`),
|
|
29
|
+
/* @__PURE__ */ o(` by which Creative Commons Attribution
|
|
30
|
+
4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission’s reuse policy.
|
|
31
|
+
Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed under
|
|
32
|
+
the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).
|
|
33
|
+
`),
|
|
34
|
+
/* @__PURE__ */ e("br"),
|
|
35
|
+
/* @__PURE__ */ e("br"),
|
|
36
|
+
/* @__PURE__ */ o(`
|
|
37
|
+
The Council and the European Court of Auditors have approved similar decisions on reuse. It is advisable that
|
|
38
|
+
you check the reuse policy of your organisation before publishing or submitting your dataset.
|
|
39
|
+
`)
|
|
40
|
+
], -1), j = {
|
|
41
|
+
key: 1,
|
|
42
|
+
class: "d-flex infoLicense py-5"
|
|
43
|
+
}, F = /* @__PURE__ */ e("svg", {
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
width: "30px",
|
|
46
|
+
height: "30px",
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
|
|
49
|
+
viewBox: "0 0 16 16"
|
|
50
|
+
}, [
|
|
51
|
+
/* @__PURE__ */ e("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" }),
|
|
52
|
+
/* @__PURE__ */ o(),
|
|
53
|
+
/* @__PURE__ */ e("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" })
|
|
54
|
+
], -1), O = /* @__PURE__ */ e("p", { class: "textInfoI" }, [
|
|
55
|
+
/* @__PURE__ */ o(`As owner of your dataset, you guarantee that it does not violate the copyright, other intellectual property or
|
|
56
|
+
privacy rights of any third party. In particular, if third party material is included in the dataset, you must
|
|
57
|
+
ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
|
|
58
|
+
`),
|
|
59
|
+
/* @__PURE__ */ e("br"),
|
|
60
|
+
/* @__PURE__ */ e("br"),
|
|
61
|
+
/* @__PURE__ */ o(`
|
|
62
|
+
If you need further information regarding copyright issues, please contact us at
|
|
63
|
+
`),
|
|
64
|
+
/* @__PURE__ */ e("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
|
|
65
|
+
], -1), R = {
|
|
66
|
+
key: 2,
|
|
67
|
+
class: "formkitCmpWrap simpleConditional"
|
|
68
|
+
}, z = { class: "m-3" }, K = { class: "conditionalSelectDiv" }, W = { key: 0 }, X = { class: "selectListConditional" }, Y = { class: "conditionalManual" }, $ = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "d-flex"
|
|
71
|
+
}, q = { key: 0 }, G = {
|
|
72
|
+
key: 3,
|
|
73
|
+
class: "formkitCmpWrap simpleConditional"
|
|
74
|
+
}, J = { class: "m-3" }, Q = { class: "conditionalSelectDiv" }, Z = { key: 0 }, ee = { class: "selectListConditional" }, te = { class: "conditionalManual" }, oe = {
|
|
6
75
|
key: 0,
|
|
7
76
|
class: "d-flex"
|
|
8
|
-
},
|
|
77
|
+
}, ne = {
|
|
9
78
|
key: 0,
|
|
10
79
|
class: "conditionalVocabulary"
|
|
11
|
-
},
|
|
80
|
+
}, ce = {
|
|
12
81
|
__name: "ConditionalInput",
|
|
13
82
|
props: {
|
|
14
83
|
context: Object
|
|
15
84
|
},
|
|
16
|
-
setup(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
85
|
+
setup(L) {
|
|
86
|
+
let C = E();
|
|
87
|
+
const t = L;
|
|
88
|
+
let c = h(), s = h(!1), p = h(!1);
|
|
89
|
+
const f = h(null), k = (d) => {
|
|
90
|
+
p.value = !p.value;
|
|
91
|
+
}, w = (d) => {
|
|
92
|
+
c.value = d.target.innerHTML, d.target.innerHTML === "Manually" && (s.value = "manually"), d.target.innerHTML === "Vocabulary" && (s.value = "vocabulary"), d.target.innerHTML === "URL" && (s.value = "url"), d.target.innerHTML === "Text" && (s.value = "text"), t.context.node.reset(), t.context.value = "";
|
|
23
93
|
};
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
94
|
+
return A(f, (d) => p.value = !1), (d, a) => {
|
|
95
|
+
const v = T("FormKit");
|
|
96
|
+
return i(), l("div", P, [
|
|
97
|
+
e("h4", S, x(t.context.attrs.identifier.charAt(0).toUpperCase() + t.context.attrs.identifier.slice(1)), 1),
|
|
98
|
+
o(),
|
|
99
|
+
t.context.attrs.identifier === "licence" && r(C).content.dataProviderInterface.annifIntegration ? (i(), l("div", B, [
|
|
100
|
+
H,
|
|
101
|
+
o(),
|
|
102
|
+
N
|
|
103
|
+
])) : u("", !0),
|
|
104
|
+
o(),
|
|
105
|
+
t.context.attrs.identifier === "rights" && r(C).content.dataProviderInterface.annifIntegration ? (i(), l("div", j, [
|
|
106
|
+
F,
|
|
107
|
+
o(),
|
|
108
|
+
O
|
|
109
|
+
])) : u("", !0),
|
|
110
|
+
o(),
|
|
111
|
+
t.context.attrs.identifier === "rights" ? (i(), l("div", R, [
|
|
112
|
+
e("div", z, [
|
|
113
|
+
e("div", K, [
|
|
114
|
+
I(e("input", {
|
|
115
|
+
ref_key: "I1",
|
|
116
|
+
ref: f,
|
|
117
|
+
type: "text",
|
|
118
|
+
class: "conditionalSelect formkit-input formkit-inner",
|
|
119
|
+
onClick: a[0] || (a[0] = (n) => k()),
|
|
120
|
+
placeholder: "Choose input method",
|
|
121
|
+
"onUpdate:modelValue": a[1] || (a[1] = (n) => M(c) ? c.value = n : c = n)
|
|
122
|
+
}, null, 512), [
|
|
123
|
+
[V, r(c)]
|
|
124
|
+
]),
|
|
125
|
+
o(),
|
|
126
|
+
r(p) ? (i(), l("div", W, [
|
|
127
|
+
e("ul", X, [
|
|
128
|
+
(i(!0), l(b, null, _(t.context.attrs.selection, (n, m) => (i(), l("li", {
|
|
129
|
+
class: "p-2 border-b border-gray-200",
|
|
130
|
+
onClick: a[2] || (a[2] = (y) => w(y))
|
|
131
|
+
}, x(n), 1))), 256))
|
|
132
|
+
])
|
|
133
|
+
])) : u("", !0)
|
|
134
|
+
]),
|
|
135
|
+
o(),
|
|
136
|
+
e("div", Y, [
|
|
137
|
+
r(s) === "url" || t.context.node.value["@type"] === "url" ? (i(), l("div", $, [
|
|
138
|
+
g(v, {
|
|
139
|
+
type: "url",
|
|
140
|
+
placeholder: "Please provide a valid URL",
|
|
141
|
+
name: "rdfs:label",
|
|
142
|
+
validation: "url",
|
|
143
|
+
class: "w-100",
|
|
144
|
+
identifier: "rightsUrl",
|
|
145
|
+
modelValue: t.context.value["rdfs:value"],
|
|
146
|
+
"onUpdate:modelValue": a[3] || (a[3] = (n) => t.context.value["rdfs:value"] = n)
|
|
147
|
+
}, null, 8, ["modelValue"])
|
|
148
|
+
])) : u("", !0)
|
|
149
|
+
]),
|
|
150
|
+
o(),
|
|
151
|
+
r(s) === "text" || t.context.value["@type"] === "text" ? (i(), l("div", q, [
|
|
152
|
+
g(v, {
|
|
153
|
+
type: "text",
|
|
154
|
+
placeholder: "Please provide a Text",
|
|
155
|
+
name: "rdfs:label",
|
|
156
|
+
class: "w-100",
|
|
157
|
+
identifier: "rightsText",
|
|
158
|
+
modelValue: t.context.value["rdfs:value"],
|
|
159
|
+
"onUpdate:modelValue": a[4] || (a[4] = (n) => t.context.value["rdfs:value"] = n)
|
|
160
|
+
}, null, 8, ["modelValue"])
|
|
161
|
+
])) : u("", !0)
|
|
162
|
+
])
|
|
163
|
+
])) : (i(), l("div", G, [
|
|
164
|
+
e("div", J, [
|
|
165
|
+
e("div", Q, [
|
|
166
|
+
I(e("input", {
|
|
33
167
|
ref_key: "I1",
|
|
34
168
|
ref: f,
|
|
35
169
|
type: "text",
|
|
36
170
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
37
|
-
onClick:
|
|
171
|
+
onClick: a[5] || (a[5] = (n) => k()),
|
|
38
172
|
placeholder: "Choose input method",
|
|
39
|
-
"onUpdate:modelValue":
|
|
173
|
+
"onUpdate:modelValue": a[6] || (a[6] = (n) => M(c) ? c.value = n : c = n)
|
|
40
174
|
}, null, 512), [
|
|
41
|
-
[
|
|
175
|
+
[V, r(c)]
|
|
42
176
|
]),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(
|
|
177
|
+
o(),
|
|
178
|
+
r(p) ? (i(), l("div", Z, [
|
|
179
|
+
e("ul", ee, [
|
|
180
|
+
(i(!0), l(b, null, _(t.context.attrs.selection, (n, m) => (i(), l("li", {
|
|
47
181
|
class: "p-2 border-b border-gray-200",
|
|
48
|
-
onClick:
|
|
49
|
-
},
|
|
182
|
+
onClick: a[7] || (a[7] = (y) => w(y))
|
|
183
|
+
}, x(n), 1))), 256))
|
|
50
184
|
])
|
|
51
|
-
])) :
|
|
185
|
+
])) : u("", !0)
|
|
52
186
|
]),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
(
|
|
57
|
-
type:
|
|
58
|
-
placeholder:
|
|
59
|
-
name:
|
|
60
|
-
validation:
|
|
187
|
+
o(),
|
|
188
|
+
e("div", te, [
|
|
189
|
+
r(s) === "manually" || Object.keys(t.context.value).length > 0 && t.context.value["foaf:name"] && r(s) != "vocabulary" ? (i(), l("div", oe, [
|
|
190
|
+
(i(!0), l(b, null, _(t.context.attrs.options, (n, m) => (i(), D(v, {
|
|
191
|
+
type: m,
|
|
192
|
+
placeholder: m,
|
|
193
|
+
name: n,
|
|
194
|
+
validation: m,
|
|
61
195
|
class: "w-100"
|
|
62
196
|
}, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
|
|
63
|
-
])) :
|
|
197
|
+
])) : u("", !0)
|
|
64
198
|
]),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
context:
|
|
199
|
+
o(),
|
|
200
|
+
r(s) === "vocabulary" || Object.keys(t.context.value).length > 0 && t.context.value.name && r(s) != "manually" ? (i(), l("div", ne, [
|
|
201
|
+
g(U, {
|
|
202
|
+
context: t.context
|
|
69
203
|
}, null, 8, ["context"])
|
|
70
|
-
])) :
|
|
204
|
+
])) : u("", !0)
|
|
71
205
|
])
|
|
72
|
-
])
|
|
206
|
+
]))
|
|
73
207
|
]);
|
|
74
208
|
};
|
|
75
209
|
}
|
|
76
210
|
};
|
|
77
211
|
export {
|
|
78
|
-
|
|
212
|
+
ce as default
|
|
79
213
|
};
|
|
80
214
|
//# sourceMappingURL=ConditionalInput.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/ConditionalInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.context.attrs.identifier }}</h4>\n <div class=\"formkitCmpWrap simpleConditional\">\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=\"Choose input method\" 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($event)\">{{ 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\" :placeholder=\"key\" :name=\"el\"\n :validation=\"key\" class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' || Object.keys(props.context.value).length > 0\n && props.context.value.name && selectedItem != 'manually'\" class=\"conditionalVocabulary\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\n\nconst props = defineProps({\n context: Object,\n})\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst selectMode = (e) => {\n selectModeVal.value = e.target.innerHTML\n\n if (e.target.innerHTML === '
|
|
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() + props.context.attrs.identifier.slice(1) }}</h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\" 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\">For European Commission’s datasets, bear in mind that Decision <a\n href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\">2011/833/EU</a> allows for their\n commercial reuse\n without prior authorisation, except for the material subject to the third party intellectual property rights.\n This Decision has been implemented under the <a\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en\">Decision C(2019)\n 1655 final</a> by which Creative Commons Attribution\n 4.0 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 under\n the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).\n <br><br>\n The Council and the European Court of Auditors have approved similar decisions on reuse. It is advisable that\n you check the reuse policy of your organisation before publishing or submitting your dataset.\n </p>\n </div>\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\" 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 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=\"Choose input method\" 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($event)\">{{ 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=\"Please provide a valid 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=\"Please provide a 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=\"Choose input method\" 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($event)\">{{ 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\" :placeholder=\"key\" :name=\"el\"\n :validation=\"key\" class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' || Object.keys(props.context.value).length > 0\n && props.context.value.name && selectedItem != 'manually'\" class=\"conditionalVocabulary\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst selectMode = (e) => {\n selectModeVal.value = e.target.innerHTML\n\n if (e.target.innerHTML === 'Manually') { selectedItem.value = \"manually\" }\n if (e.target.innerHTML === 'Vocabulary') { selectedItem.value = \"vocabulary\" }\n if (e.target.innerHTML === 'URL') { selectedItem.value = \"url\" }\n if (e.target.innerHTML === 'Text') { selectedItem.value = \"text\" }\n\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.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n.infoboxI{\n width: 5%;\n}\n.textInfoI{\n width: 95%;\n}\n</style>"],"names":["env","useRuntimeEnv","props","__props","selectModeVal","ref","selectedItem","showSelect","I1","openSelect","e","selectMode","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC;AAGd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAG1B,UAAMG,IAAKH,EAAI,IAAI,GAEbI,IAAa,CAACC,MAAM;AAExB,MAAAH,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMI,IAAa,CAACD,MAAM;AACxB,MAAAN,EAAc,QAAQM,EAAE,OAAO,WAE3BA,EAAE,OAAO,cAAc,eAAcJ,EAAa,QAAQ,aAC1DI,EAAE,OAAO,cAAc,iBAAgBJ,EAAa,QAAQ,eAC5DI,EAAE,OAAO,cAAc,UAASJ,EAAa,QAAQ,QACrDI,EAAE,OAAO,cAAc,WAAUJ,EAAa,QAAQ,SAE1DJ,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAU,EAAeJ,GAAI,CAAAK,MAASN,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|