@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.
- package/dist/catalogues/CatalogPage.vue.mjs +23 -22
- package/dist/catalogues/CatalogPage.vue.mjs.map +1 -1
- package/dist/composables/head/useDatasetDetailsDatasetHead.mjs +19 -15
- package/dist/composables/head/useDatasetDetailsDatasetHead.mjs.map +1 -1
- package/dist/composables/useRuntimeEnv.d.ts +1 -1
- package/dist/configurations/config-schema/apiSchema.d.ts +3 -3
- package/dist/configurations/config-schema/apiSchema.mjs +1 -1
- package/dist/configurations/config-schema/apiSchema.mjs.map +1 -1
- package/dist/configurations/config-schema/configSchema.d.ts +5 -5
- package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
- package/dist/data-provider-interface/DPIMenu.vue.mjs +3 -3
- package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +29 -7
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs +12 -69
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +91 -2
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue3.mjs +5 -0
- package/dist/data-provider-interface/DataProviderInterface.vue3.mjs.map +1 -0
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +66 -65
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +127 -115
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +1 -1
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs +25 -19
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
- package/dist/data-provider-interface/components/Navigation.vue.d.ts +5 -5
- package/dist/data-provider-interface/composables/index.d.ts +2 -0
- package/dist/data-provider-interface/composables/useDpiContext.d.ts +17 -0
- package/dist/data-provider-interface/composables/useDpiContext.mjs +19 -0
- package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.d.ts +16 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.mjs +41 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -0
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs +28 -2
- package/dist/data-provider-interface/config/dcatap/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +5 -2
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
- package/dist/data-provider-interface/config/dpi-spec-config.mjs +1 -0
- package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
- package/dist/data-provider-interface/index.d.ts +2 -0
- package/dist/data-provider-interface/index.mjs +11 -0
- package/dist/data-provider-interface/index.mjs.map +1 -0
- package/dist/data-provider-interface/store/dpiStore.d.ts +31 -15
- package/dist/data-provider-interface/store/dpiStore.mjs +30 -13
- package/dist/data-provider-interface/store/dpiStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/autocompleteStore.d.ts +3 -1
- package/dist/data-provider-interface/store/modules/autocompleteStore.mjs +28 -29
- package/dist/data-provider-interface/store/modules/autocompleteStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/conversionStore.d.ts +6 -6
- package/dist/data-provider-interface/store/modules/conversionStore.mjs +21 -22
- package/dist/data-provider-interface/store/modules/conversionStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/formSchemaStore.d.ts +5 -3
- package/dist/data-provider-interface/store/modules/formSchemaStore.mjs +29 -29
- package/dist/data-provider-interface/store/modules/formSchemaStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/navigationStore.d.ts +1 -1
- package/dist/data-provider-interface/store/modules/navigationStore.mjs +13 -14
- package/dist/data-provider-interface/store/modules/navigationStore.mjs.map +1 -1
- package/dist/data-provider-interface/utils/RDFconverter.mjs +63 -60
- package/dist/data-provider-interface/utils/RDFconverter.mjs.map +1 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +2 -2
- package/dist/data-provider-interface/views/InputPage.vue.d.ts +3 -3
- package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs +1 -1
- package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +1 -1
- package/dist/datasetDetails/DatasetDetails.vue.d.ts +1 -1
- package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs +1 -1
- package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs.map +1 -1
- package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs.map +1 -1
- package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
- package/dist/datasetDetails/distributions/Distribution.vue.mjs +45 -43
- package/dist/datasetDetails/distributions/Distribution.vue.mjs.map +1 -1
- package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +3 -3
- package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
- package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.d.ts +1 -0
- package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs +18 -14
- package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs.map +1 -1
- package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +3 -3
- package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs +68 -57
- package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs.map +1 -1
- package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue2.mjs +2 -2
- package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
- package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
- package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
- package/dist/embed/EmbedDataset.vue.d.ts +1 -1
- package/dist/embed/EmbedDatasetSnippet.vue.d.ts +2 -2
- package/dist/external/@vueuse/core/index +129 -80
- package/dist/external/@vueuse/core/index.map +1 -1
- package/dist/external/@vueuse/shared/index +121 -17
- package/dist/external/@vueuse/shared/index.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +250 -248
- package/dist/index.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/dist/services/datasetService.d.ts +1 -1
- package/dist/services/datasetService.mjs +2 -2
- package/dist/services/datasetService.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as f, watchEffect as
|
|
1
|
+
import { ref as f, watchEffect as D, resolveComponent as E, openBlock as a, createElementBlock as n, toDisplayString as m, createTextVNode as s, unref as d, createCommentVNode as c, createElementVNode as t, withDirectives as I, isRef as V, vModelText as T, Fragment as y, renderList as _, createVNode as x, createBlock as S, createStaticVNode as U } from "vue";
|
|
2
2
|
import A from "./AutocompleteInput.vue.mjs";
|
|
3
3
|
import { onClickOutside as B } from "../../external/@vueuse/core/index";
|
|
4
|
-
import { useRuntimeEnv as
|
|
5
|
-
import { useI18n as
|
|
4
|
+
import { useRuntimeEnv as H } from "../../composables/useRuntimeEnv.mjs";
|
|
5
|
+
import { useI18n as N } from "vue-i18n";
|
|
6
6
|
import "./ConditionalInput.vue2.mjs";
|
|
7
|
-
const
|
|
7
|
+
const P = { class: "formkitProperty" }, j = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "formkitHeader"
|
|
10
|
-
},
|
|
10
|
+
}, F = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "formkitHeader"
|
|
13
|
-
},
|
|
13
|
+
}, R = {
|
|
14
14
|
key: 2,
|
|
15
15
|
class: "d-flex infoLicense py-5"
|
|
16
|
-
},
|
|
16
|
+
}, O = /* @__PURE__ */ t("svg", {
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
18
|
width: "30px",
|
|
19
19
|
height: "30px",
|
|
@@ -21,21 +21,21 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
21
21
|
class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
|
|
22
22
|
viewBox: "0 0 16 16"
|
|
23
23
|
}, [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
], -1),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
/* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
|
|
25
|
+
/* @__PURE__ */ s(),
|
|
26
|
+
/* @__PURE__ */ t("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
|
|
27
|
+
], -1), X = /* @__PURE__ */ U(`<div class="w-80"><p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind that <a class="external-link" href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" target="_blank" rel="nofollow noopener"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial
|
|
28
|
+
reuse without prior authorisation, except for the material subject to the third party intellectual property
|
|
29
|
+
rights. This Decision has been implemented under the <a class="external-link" href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en" target="_blank" rel="nofollow noopener"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative
|
|
30
|
+
Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the
|
|
31
|
+
Commission's reuse policy. Additionally, raw data, metadata or other documents of comparable nature may
|
|
32
|
+
alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication
|
|
33
|
+
deed (CC0 1.0).</p> <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have
|
|
34
|
+
approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your
|
|
35
|
+
organisation</strong> before publishing or submitting your dataset.</p> <p>If you need further information regarding copyright issues, please contact us at <span class="nobr"><a class="external-link" href="mailto:op-copyright@publications.europa.eu" target="_blank" rel="nofollow noopener">op-copyright@publications.europa.eu<sup><img class="rendericon" src="https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif" alt="" width="13" height="12" align="absmiddle" border="0"></sup></a></span></p></div>`, 1), z = { class: "formkit-wrapper" }, K = ["innerHTML"], W = {
|
|
36
36
|
key: 3,
|
|
37
37
|
class: "d-flex infoLicense py-5"
|
|
38
|
-
},
|
|
38
|
+
}, Y = /* @__PURE__ */ t("svg", {
|
|
39
39
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
40
|
width: "30px",
|
|
41
41
|
height: "30px",
|
|
@@ -43,178 +43,190 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
43
43
|
class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
|
|
44
44
|
viewBox: "0 0 16 16"
|
|
45
45
|
}, [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
], -1),
|
|
50
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
|
|
47
|
+
/* @__PURE__ */ s(),
|
|
48
|
+
/* @__PURE__ */ t("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
|
|
49
|
+
], -1), q = /* @__PURE__ */ t("p", { class: "textInfoI" }, [
|
|
50
|
+
/* @__PURE__ */ s(`As owner of your dataset, you guarantee that it does not violate the copyright, other
|
|
51
51
|
intellectual property or
|
|
52
52
|
privacy rights of any third party. In particular, if third party material is included in the dataset, you must
|
|
53
53
|
ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
|
|
54
54
|
`),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ t("br"),
|
|
56
|
+
/* @__PURE__ */ t("br"),
|
|
57
|
+
/* @__PURE__ */ s(`
|
|
58
58
|
If you need further information regarding copyright issues, please contact us at
|
|
59
59
|
`),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
], -1),
|
|
60
|
+
/* @__PURE__ */ t("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
|
|
61
|
+
], -1), G = {
|
|
62
62
|
key: 4,
|
|
63
63
|
class: "formkitCmpWrap simpleConditional"
|
|
64
|
-
},
|
|
64
|
+
}, J = { class: "m-3" }, Q = { class: "conditionalSelectDiv" }, Z = ["placeholder"], ee = { key: 0 }, te = { class: "selectListConditional" }, oe = ["onClick"], ae = { class: "conditionalManual" }, ne = {
|
|
65
65
|
key: 0,
|
|
66
66
|
class: "d-flex"
|
|
67
|
-
},
|
|
67
|
+
}, se = { key: 0 }, ie = {
|
|
68
68
|
key: 5,
|
|
69
69
|
class: "formkitCmpWrap simpleConditional"
|
|
70
|
-
},
|
|
70
|
+
}, le = { class: "m-3" }, re = { class: "conditionalSelectDiv" }, de = ["placeholder"], ce = { key: 0 }, ue = { class: "selectListConditional" }, pe = ["onClick"], me = { class: "conditionalManual" }, he = {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: "d-flex"
|
|
73
|
-
},
|
|
73
|
+
}, fe = {
|
|
74
74
|
key: 0,
|
|
75
75
|
class: ""
|
|
76
|
-
},
|
|
76
|
+
}, ve = {
|
|
77
77
|
key: 1,
|
|
78
78
|
class: "conditionalVocabulary d-flex"
|
|
79
|
-
},
|
|
79
|
+
}, ge = { class: "autocompleteInputSingleValue" }, ye = ["innerHTML"], Ie = {
|
|
80
80
|
__name: "ConditionalInput",
|
|
81
81
|
props: {
|
|
82
82
|
context: Object
|
|
83
83
|
},
|
|
84
|
-
setup(
|
|
85
|
-
let b =
|
|
86
|
-
const e =
|
|
84
|
+
setup(L) {
|
|
85
|
+
let b = H();
|
|
86
|
+
const e = L, { t: k } = N();
|
|
87
87
|
let r = f(), u = f(!1), p = f(!1);
|
|
88
|
-
|
|
88
|
+
D(() => {
|
|
89
89
|
e.context.value.name && (r.value = k("message.dataupload.datasets.conditional.vocabulary")), e.context.value["foaf:name"] && (r.value = k("message.dataupload.datasets.conditional.manually"));
|
|
90
90
|
});
|
|
91
|
-
const v = f(null), C = (
|
|
91
|
+
const v = f(null), C = (i) => {
|
|
92
92
|
p.value = !p.value;
|
|
93
|
-
},
|
|
93
|
+
}, M = () => {
|
|
94
94
|
e.context.node.reset();
|
|
95
|
-
}, w = (
|
|
96
|
-
r.value =
|
|
95
|
+
}, w = (i, l) => {
|
|
96
|
+
r.value = l, u.value = i, e.context.node.reset(), e.context.value = "";
|
|
97
97
|
};
|
|
98
|
-
return B(v, (
|
|
99
|
-
const
|
|
100
|
-
return a(), n("div",
|
|
101
|
-
e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (a(), n("h4",
|
|
102
|
-
|
|
103
|
-
e.context.attrs.identifier === "licence" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div",
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
return B(v, (i) => p.value = !1), (i, l) => {
|
|
99
|
+
const g = E("FormKit");
|
|
100
|
+
return a(), n("div", P, [
|
|
101
|
+
e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (a(), n("h4", j, m(i.$t("message.dataupload.distributions." + e.context.attrs.identifier + ".label")), 1)) : (a(), n("h4", F, m(i.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
|
|
102
|
+
s(),
|
|
103
|
+
e.context.attrs.identifier === "licence" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", R, [
|
|
104
|
+
O,
|
|
105
|
+
s(),
|
|
106
|
+
X
|
|
107
107
|
])) : c("", !0),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
s(),
|
|
109
|
+
t("div", z, [
|
|
110
|
+
t("div", {
|
|
111
|
+
innerHTML: i.$t("message.dataupload.distributions.licence.vocabulary.help"),
|
|
112
|
+
class: "formkit-help"
|
|
113
|
+
}, null, 8, K)
|
|
114
|
+
]),
|
|
115
|
+
s(),
|
|
116
|
+
e.context.attrs.identifier === "rights" && d(b).content.dataProviderInterface.annifIntegration ? (a(), n("div", W, [
|
|
117
|
+
Y,
|
|
118
|
+
s(),
|
|
119
|
+
q
|
|
113
120
|
])) : c("", !0),
|
|
114
|
-
|
|
115
|
-
e.context.attrs.identifier === "rights" ? (a(), n("div",
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
I(
|
|
121
|
+
s(),
|
|
122
|
+
e.context.attrs.identifier === "rights" ? (a(), n("div", G, [
|
|
123
|
+
t("div", J, [
|
|
124
|
+
t("div", Q, [
|
|
125
|
+
I(t("input", {
|
|
119
126
|
ref_key: "I1",
|
|
120
127
|
ref: v,
|
|
121
128
|
type: "text",
|
|
122
129
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
123
|
-
onClick:
|
|
130
|
+
onClick: l[0] || (l[0] = (o) => C()),
|
|
124
131
|
placeholder: e.context.attrs.placeholder,
|
|
125
|
-
"onUpdate:modelValue":
|
|
126
|
-
}, null, 8,
|
|
127
|
-
[
|
|
132
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => V(r) ? r.value = o : r = o)
|
|
133
|
+
}, null, 8, Z), [
|
|
134
|
+
[T, d(r)]
|
|
128
135
|
]),
|
|
129
|
-
|
|
130
|
-
d(p) ? (a(), n("div",
|
|
131
|
-
|
|
132
|
-
(a(!0), n(
|
|
136
|
+
s(),
|
|
137
|
+
d(p) ? (a(), n("div", ee, [
|
|
138
|
+
t("ul", te, [
|
|
139
|
+
(a(!0), n(y, null, _(e.context.attrs.selection, (o, h) => (a(), n("li", {
|
|
133
140
|
class: "p-2 border-b border-gray-200",
|
|
134
|
-
onClick: (
|
|
135
|
-
}, m(
|
|
141
|
+
onClick: ($) => w(o, i.$t("message.dataupload.datasets.conditional." + o))
|
|
142
|
+
}, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, oe))), 256))
|
|
136
143
|
])
|
|
137
144
|
])) : c("", !0)
|
|
138
145
|
]),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div",
|
|
142
|
-
|
|
146
|
+
s(),
|
|
147
|
+
t("div", ae, [
|
|
148
|
+
d(u) === "URL" || e.context.node.value["@type"] === "url" ? (a(), n("div", ne, [
|
|
149
|
+
x(g, {
|
|
143
150
|
type: "url",
|
|
144
|
-
placeholder:
|
|
151
|
+
placeholder: i.$t("message.dataupload.datasets.conditional.URL"),
|
|
145
152
|
name: "rdfs:label",
|
|
146
153
|
validation: "url",
|
|
147
154
|
class: "w-100",
|
|
148
155
|
identifier: "rightsUrl",
|
|
149
156
|
modelValue: e.context.value["rdfs:value"],
|
|
150
|
-
"onUpdate:modelValue":
|
|
157
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => e.context.value["rdfs:value"] = o)
|
|
151
158
|
}, null, 8, ["placeholder", "modelValue"])
|
|
152
159
|
])) : c("", !0)
|
|
153
160
|
]),
|
|
154
|
-
|
|
155
|
-
d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div",
|
|
156
|
-
|
|
161
|
+
s(),
|
|
162
|
+
d(u) === "Text" || e.context.value["@type"] === "text" ? (a(), n("div", se, [
|
|
163
|
+
x(g, {
|
|
157
164
|
type: "text",
|
|
158
|
-
placeholder:
|
|
165
|
+
placeholder: i.$t("message.dataupload.datasets.conditional.Text"),
|
|
159
166
|
name: "rdfs:label",
|
|
160
167
|
class: "w-100",
|
|
161
168
|
identifier: "rightsText",
|
|
162
169
|
modelValue: e.context.value["rdfs:value"],
|
|
163
|
-
"onUpdate:modelValue":
|
|
170
|
+
"onUpdate:modelValue": l[3] || (l[3] = (o) => e.context.value["rdfs:value"] = o)
|
|
164
171
|
}, null, 8, ["placeholder", "modelValue"])
|
|
165
172
|
])) : c("", !0)
|
|
166
173
|
])
|
|
167
|
-
])) : (a(), n("div",
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
I(
|
|
174
|
+
])) : (a(), n("div", ie, [
|
|
175
|
+
t("div", le, [
|
|
176
|
+
t("div", re, [
|
|
177
|
+
I(t("input", {
|
|
171
178
|
ref_key: "I1",
|
|
172
179
|
ref: v,
|
|
173
180
|
type: "text",
|
|
174
181
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
175
|
-
onClick:
|
|
182
|
+
onClick: l[4] || (l[4] = (o) => C()),
|
|
176
183
|
placeholder: e.context.attrs.placeholder,
|
|
177
|
-
"onUpdate:modelValue":
|
|
178
|
-
}, null, 8,
|
|
179
|
-
[
|
|
184
|
+
"onUpdate:modelValue": l[5] || (l[5] = (o) => V(r) ? r.value = o : r = o)
|
|
185
|
+
}, null, 8, de), [
|
|
186
|
+
[T, d(r)]
|
|
180
187
|
]),
|
|
181
|
-
|
|
182
|
-
d(p) ? (a(), n("div",
|
|
183
|
-
|
|
184
|
-
(a(!0), n(
|
|
188
|
+
s(),
|
|
189
|
+
d(p) ? (a(), n("div", ce, [
|
|
190
|
+
t("ul", ue, [
|
|
191
|
+
(a(!0), n(y, null, _(e.context.attrs.selection, (o, h) => (a(), n("li", {
|
|
185
192
|
class: "p-2 border-b border-gray-200",
|
|
186
|
-
onClick: (
|
|
187
|
-
}, m(
|
|
193
|
+
onClick: ($) => w(o, i.$t("message.dataupload.datasets.conditional." + o))
|
|
194
|
+
}, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, pe))), 256))
|
|
188
195
|
])
|
|
189
196
|
])) : c("", !0)
|
|
190
197
|
]),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
d(u) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && d(u) != "vocabulary" ? (a(), n("div",
|
|
194
|
-
(a(!0), n(
|
|
198
|
+
s(),
|
|
199
|
+
t("div", me, [
|
|
200
|
+
d(u) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && d(u) != "vocabulary" ? (a(), n("div", he, [
|
|
201
|
+
(a(!0), n(y, null, _(e.context.attrs.options, (o, h) => (a(), S(g, {
|
|
195
202
|
type: h,
|
|
196
|
-
placeholder:
|
|
197
|
-
name:
|
|
203
|
+
placeholder: i.$t("message.dataupload.datasets.individual." + o),
|
|
204
|
+
name: o,
|
|
198
205
|
validation: h,
|
|
199
206
|
class: "w-100"
|
|
200
207
|
}, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
|
|
201
208
|
])) : c("", !0)
|
|
202
209
|
]),
|
|
203
|
-
|
|
204
|
-
d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div",
|
|
205
|
-
|
|
210
|
+
s(),
|
|
211
|
+
d(u) === "vocabulary" && !e.context.value.name ? (a(), n("div", fe, [
|
|
212
|
+
x(A, {
|
|
206
213
|
context: e.context
|
|
207
214
|
}, null, 8, ["context"])
|
|
208
215
|
])) : c("", !0),
|
|
209
|
-
|
|
210
|
-
e.context.value.name ? (a(), n("div",
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
216
|
+
s(),
|
|
217
|
+
e.context.value.name ? (a(), n("div", ve, [
|
|
218
|
+
t("a", ge, m(e.context.value.name), 1),
|
|
219
|
+
s(),
|
|
220
|
+
t("div", {
|
|
214
221
|
class: "removeX",
|
|
215
|
-
onClick:
|
|
222
|
+
onClick: M
|
|
216
223
|
})
|
|
217
|
-
])) : c("", !0)
|
|
224
|
+
])) : c("", !0),
|
|
225
|
+
s(),
|
|
226
|
+
t("div", {
|
|
227
|
+
innerHTML: e.context.help,
|
|
228
|
+
class: "formkit-help"
|
|
229
|
+
}, null, 8, ye)
|
|
218
230
|
])
|
|
219
231
|
]))
|
|
220
232
|
]);
|
|
@@ -222,6 +234,6 @@ const F = { class: "formkitProperty" }, R = {
|
|
|
222
234
|
}
|
|
223
235
|
};
|
|
224
236
|
export {
|
|
225
|
-
|
|
237
|
+
Ie as default
|
|
226
238
|
};
|
|
227
239
|
//# 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 class=\"formkitHeader\">{{ props.context.attrs.identifier.charAt(0).toUpperCase() +\n props.context.attrs.identifier.slice(1) }}</h4> -->\n <h4 class=\"formkitHeader\"\n v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 class=\"formkitHeader\" v-else>\n {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p><em>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind\n that <ins>Decision 2011/833/EU</ins> <a\n href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833]\" target=\"_blank\"\n rel=\"nofollow noopener\">[link</a> ] allows for their commercial reuse without prior authorisation,\n except for the material subject to the third party intellectual property rights. This Decision has been\n implemented under the <ins>Decision C(2019) 1655 final</ins> <a\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en]\"\n target=\"_blank\" rel=\"nofollow noopener\">[link</a> ] by which Creative Commons Attribution 4.0\n International Public License (CC BY 4.0) is adopted as an open licence for the Commission's reuse policy.\n Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed\n under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</em></p>\n <p><em>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have\n approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your\n organisation</strong> before publishing or submitting your dataset.</em></p>\n <p>If you need further information regarding copyright issues, please contact us at <a\n href=\"mailto:op-copyright@publications.europa.eu\" target=\"_blank\"\n rel=\"nofollow noopener\">op-copyright@publications.europa.eu</a></p>\n </div>\n\n\n </div>\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=\"props.context.attrs.placeholder\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'URL' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" :placeholder=\"$t('message.dataupload.datasets.conditional.URL')\" name=\"rdfs:label\" validation=\"url\"\n class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'Text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" :placeholder=\"$t('message.dataupload.datasets.conditional.Text')\" name=\"rdfs:label\" class=\"w-100\"\n identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ConditionalInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/ConditionalInput.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <!-- <h4 class=\"formkitHeader\">{{ props.context.attrs.identifier.charAt(0).toUpperCase() +\n props.context.attrs.identifier.slice(1) }}</h4> -->\n <h4 class=\"formkitHeader\"\n v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">\n {{ $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <h4 class=\"formkitHeader\" v-else>\n {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind that <a\n class=\"external-link\" href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision 2011/833/EU</ins></a>] allows for their commercial\n reuse without prior authorisation, except for the material subject to the third party intellectual property\n rights. This Decision has been implemented under the <a class=\"external-link\"\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a>] by which Creative\n Commons Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the\n Commission's reuse policy. Additionally, raw data, metadata or other documents of comparable nature may\n alternatively be distributed under the provisions of the Creative Commons Universal Public Domain Dedication\n deed (CC0 1.0).</p>\n <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have\n approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your\n organisation</strong> before publishing or submitting your dataset.</p>\n <p>If you need further information regarding copyright issues, please contact us at <span class=\"nobr\"><a\n class=\"external-link\" href=\"mailto:op-copyright@publications.europa.eu\" target=\"_blank\"\n rel=\"nofollow noopener\">op-copyright@publications.europa.eu<sup><img class=\"rendericon\"\n src=\"https://citnet.tech.ec.europa.eu/CITnet/jira/images/icons/mail_small.gif\" alt=\"\" width=\"13\"\n height=\"12\" align=\"absmiddle\" border=\"0\" /></sup></a></span></p>\n\n </div>\n </div>\n <div class=\"formkit-wrapper\">\n <div v-html=\"$t('message.dataupload.distributions.licence.vocabulary.help')\" class=\"formkit-help\"></div>\n </div>\n\n\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=\"props.context.attrs.placeholder\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'URL' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" :placeholder=\"$t('message.dataupload.datasets.conditional.URL')\" name=\"rdfs:label\"\n validation=\"url\" class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\">\n </FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'Text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" :placeholder=\"$t('message.dataupload.datasets.conditional.Text')\" name=\"rdfs:label\"\n class=\"w-100\" identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n <div v-html=\"props.context.help\" class=\"formkit-help\"></div>\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>\n"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,8 +5,8 @@ declare const _default: import('vue').DefineComponent<Readonly<{
|
|
|
5
5
|
}>, any, {}, {
|
|
6
6
|
token(): any;
|
|
7
7
|
redirectUri(): string;
|
|
8
|
-
getUserData: import('vuex').Computed;
|
|
9
8
|
getIsDraft: import('vuex').Computed;
|
|
9
|
+
getUserData: import('vuex').Computed;
|
|
10
10
|
}, {
|
|
11
11
|
setupEditPage(): Promise<void>;
|
|
12
12
|
convertToInput: import('vuex').ActionMethod;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { mapGetters as
|
|
2
|
-
import { openBlock as
|
|
1
|
+
import { mapGetters as s, mapActions as o } from "vuex";
|
|
2
|
+
import { openBlock as i, createElementBlock as n, createElementVNode as c } from "vue";
|
|
3
3
|
import p from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const d = {
|
|
5
5
|
props: ["id", "property", "catalog"],
|
|
6
6
|
data() {
|
|
7
7
|
return {};
|
|
8
8
|
},
|
|
9
9
|
computed: {
|
|
10
|
-
...
|
|
10
|
+
...s("auth", [
|
|
11
11
|
"getIsDraft",
|
|
12
12
|
"getUserData"
|
|
13
13
|
]),
|
|
@@ -19,34 +19,40 @@ const h = {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
methods: {
|
|
22
|
-
...
|
|
22
|
+
...o("auth", [
|
|
23
23
|
"setIsEditMode",
|
|
24
24
|
"setIsDraft"
|
|
25
25
|
]),
|
|
26
|
-
...
|
|
26
|
+
...o("dpiStore", [
|
|
27
27
|
"convertToInput"
|
|
28
28
|
]),
|
|
29
29
|
async setupEditPage() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
this.$router.push({
|
|
31
|
+
name: "DataProviderInterface-Input",
|
|
32
|
+
params: { property: this.property },
|
|
33
|
+
query: {
|
|
34
|
+
locale: this.$route.query.locale,
|
|
35
|
+
edit: !0,
|
|
36
|
+
id: !this.getIsDraft && this.property === "catalogues" ? this.catalog : this.id,
|
|
37
|
+
catalog: this.catalog,
|
|
38
|
+
fromDraft: this.getIsDraft ? "true" : void 0
|
|
39
|
+
}
|
|
34
40
|
});
|
|
35
41
|
}
|
|
36
42
|
},
|
|
37
|
-
beforeRouteEnter(
|
|
38
|
-
|
|
39
|
-
e.fullPath.startsWith(
|
|
43
|
+
beforeRouteEnter(a, e, r) {
|
|
44
|
+
r((t) => {
|
|
45
|
+
e.fullPath.startsWith(t.redirectUri) ? t.$router.go(-1) : t.setupEditPage();
|
|
40
46
|
});
|
|
41
47
|
}
|
|
42
|
-
},
|
|
43
|
-
|
|
48
|
+
}, u = { style: { height: "370px" } }, h = /* @__PURE__ */ c("div", { class: "spinner" }, null, -1), l = [
|
|
49
|
+
h
|
|
44
50
|
];
|
|
45
|
-
function f(
|
|
46
|
-
return
|
|
51
|
+
function f(a, e, r, t, g, m) {
|
|
52
|
+
return i(), n("div", u, l);
|
|
47
53
|
}
|
|
48
|
-
const
|
|
54
|
+
const D = /* @__PURE__ */ p(d, [["render", f]]);
|
|
49
55
|
export {
|
|
50
|
-
|
|
56
|
+
D as default
|
|
51
57
|
};
|
|
52
58
|
//# sourceMappingURL=DataFetchingComponent.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataFetchingComponent.vue.mjs","sources":["../../../lib/data-provider-interface/components/DataFetchingComponent.vue"],"sourcesContent":["<template>\n <div style=\"height:370px;\">\n <div class=\"spinner\"></div>\n </div>\n</template>\n\n<script>\nimport { mapActions, mapGetters } from 'vuex';\n\nexport default {\n props: ['id', 'property', 'catalog'],\n data() {\n return {};\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsDraft',\n 'getUserData',\n ]),\n token() {\n return this.getUserData.rtpToken;\n },\n redirectUri() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}`;\n },\n },\n methods: {\n ...mapActions('auth', [\n 'setIsEditMode',\n 'setIsDraft',\n ]),\n ...mapActions('dpiStore', [\n 'convertToInput',\n ]),\n async setupEditPage() {\n let endpoint;\n this.setIsEditMode(true);\n const specification = this.$env.content.dataProviderInterface.specification;\n\n if (this.getIsDraft) {\n this.setIsDraft(true);\n endpoint = `${this.$env.api.hubUrl}drafts/datasets/${this.id}.nt?catalogue=${this.catalog}`;\n await this.convertToInput({endpoint, token: this.token, property: this.property, id: this.id, specification: specification });\n } else {\n this.setIsDraft(false);\n if (this.property === 'catalogues') {\n endpoint = `${this.$env.api.hubUrl}catalogues/${this.catalog}.nt`;\n await this.convertToInput({endpoint, token: this.token, property: this.property, id: this.catalog, specification: specification });\n } else {\n endpoint = `${this.$env.api.hubUrl}datasets/${this.id}.nt?useNormalizedId=true`;\n await this.convertToInput({endpoint, token: this.token, property: this.property, id: this.id, specification: specification });\n } \n }\n\n this.$router.push(this.redirectUri).catch(() => {});\n },\n },\n beforeRouteEnter(to, from, next) {\n next(vm => {\n if (from.fullPath.startsWith(vm.redirectUri)) {\n vm.$router.go(-1);\n } else vm.setupEditPage();\n });\n },\n};\n</script>\n"],"names":["_sfc_main","mapGetters","mapActions","
|
|
1
|
+
{"version":3,"file":"DataFetchingComponent.vue.mjs","sources":["../../../lib/data-provider-interface/components/DataFetchingComponent.vue"],"sourcesContent":["<template>\n <div style=\"height:370px;\">\n <div class=\"spinner\"></div>\n </div>\n</template>\n\n<script>\nimport { mapActions, mapGetters } from 'vuex';\n\nexport default {\n props: ['id', 'property', 'catalog'],\n data() {\n return {};\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsDraft',\n 'getUserData',\n ]),\n token() {\n return this.getUserData.rtpToken;\n },\n redirectUri() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}`;\n },\n },\n methods: {\n ...mapActions('auth', [\n 'setIsEditMode',\n 'setIsDraft',\n ]),\n ...mapActions('dpiStore', [\n 'convertToInput',\n ]),\n async setupEditPage() {\n this.$router.push({\n name: 'DataProviderInterface-Input',\n params: { property: this.property },\n query: { \n locale: this.$route.query.locale,\n edit: true,\n id: !this.getIsDraft && this.property === 'catalogues'\n ? this.catalog\n : this.id,\n catalog: this.catalog,\n fromDraft: this.getIsDraft ? 'true' : undefined,\n },\n })\n\n return;\n\n let endpoint;\n this.setIsEditMode(true);\n const specification = this.$env.content.dataProviderInterface.specification;\n\n if (this.getIsDraft) {\n this.setIsDraft(true);\n endpoint = `${this.$env.api.hubUrl}drafts/datasets/${this.id}.nt?catalogue=${this.catalog}`;\n await this.convertToInput({endpoint, token: this.token, property: this.property, id: this.id, specification: specification });\n } else {\n this.setIsDraft(false);\n if (this.property === 'catalogues') {\n endpoint = `${this.$env.api.hubUrl}catalogues/${this.catalog}.nt`;\n await this.convertToInput({endpoint, token: this.token, property: this.property, id: this.catalog, specification: specification });\n } else {\n endpoint = `${this.$env.api.hubUrl}datasets/${this.id}.nt?useNormalizedId=true`;\n await this.convertToInput({endpoint, token: this.token, property: this.property, id: this.id, specification: specification });\n } \n }\n\n this.$router.push(this.redirectUri).catch(() => {});\n },\n },\n beforeRouteEnter(to, from, next) {\n next(vm => {\n if (from.fullPath.startsWith(vm.redirectUri)) {\n vm.$router.go(-1);\n } else vm.setupEditPage();\n });\n },\n};\n</script>\n"],"names":["_sfc_main","mapGetters","mapActions","to","from","next","vm","_hoisted_1","_createElementVNode","_hoisted_2","_createElementBlock","_hoisted_3"],"mappings":";;;AASA,MAAKA,IAAU;AAAA,EACb,OAAO,CAAC,MAAM,YAAY,SAAS;AAAA,EACnC,OAAO;AACL,WAAO;EACR;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,QAAQ;AACN,aAAO,KAAK,YAAY;AAAA,IACzB;AAAA,IACD,cAAc;AACZ,aAAO,GAAG,KAAK,KAAK,QAAQ,sBAAsB,QAAQ,IAAI,KAAK,QAAQ,WAAW,KAAK,MAAM,MAAM;AAAA,IACxG;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAGA,EAAW,YAAY;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,MAAM,gBAAgB;AACpB,WAAK,QAAQ,KAAK;AAAA,QAChB,MAAM;AAAA,QACN,QAAQ,EAAE,UAAU,KAAK,SAAU;AAAA,QACnC,OAAO;AAAA,UACL,QAAQ,KAAK,OAAO,MAAM;AAAA,UAC1B,MAAM;AAAA,UACN,IAAI,CAAC,KAAK,cAAc,KAAK,aAAa,eACtC,KAAK,UACL,KAAK;AAAA,UACT,SAAS,KAAK;AAAA,UACd,WAAW,KAAK,aAAa,SAAS;AAAA,QACvC;AAAA,OACF;AAAA,IAwBF;AAAA,EACF;AAAA,EACD,iBAAiBC,GAAIC,GAAMC,GAAM;AAC/B,IAAAA,EAAK,CAAAC,MAAM;AACT,MAAIF,EAAK,SAAS,WAAWE,EAAG,WAAW,IACzCA,EAAG,QAAQ,GAAG,EAAE,IACXA,EAAG;IACZ,CAAC;AAAA,EACF;AACH,GA/EOC,IAAA,EAAA,OAAA,EAAqB,QAAA,QAAA,EAAA,OACxBC,gBAAAA,EAA2B,OAAA,EAAtB,OAAM,aAAS,MAAA,EAAA;EAApBC;;;cADFC,EAEM,OAFNH,GADFI,CAAA;;;"}
|
|
@@ -29,8 +29,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
29
29
|
}, {
|
|
30
30
|
getCatalogue(): unknown;
|
|
31
31
|
getData: import('vuex').Computed;
|
|
32
|
-
getUserData: import('vuex').Computed;
|
|
33
32
|
getIsEditMode: import('vuex').Computed;
|
|
33
|
+
getUserData: import('vuex').Computed;
|
|
34
34
|
}, {
|
|
35
35
|
toggleUploadUrl(): void;
|
|
36
36
|
toggleUploadFileSwitch(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<Readonly<{
|
|
2
2
|
steps?: any;
|
|
3
|
-
previousStep?: any;
|
|
4
3
|
nextStep?: any;
|
|
4
|
+
previousStep?: any;
|
|
5
5
|
goToNextStep?: any;
|
|
6
6
|
goToPreviousStep?: any;
|
|
7
7
|
}>, {
|
|
@@ -18,7 +18,7 @@ declare const _default: import('vue').DefineComponent<Readonly<{
|
|
|
18
18
|
hubUrl: string;
|
|
19
19
|
qualityBaseUrl: string;
|
|
20
20
|
similarityBaseUrl: string;
|
|
21
|
-
|
|
21
|
+
similarityServiceName: string;
|
|
22
22
|
fileUploadUrl: string;
|
|
23
23
|
sparqlUrl: string;
|
|
24
24
|
gazetteerBaseUrl: string;
|
|
@@ -352,9 +352,9 @@ declare const _default: import('vue').DefineComponent<Readonly<{
|
|
|
352
352
|
}, {
|
|
353
353
|
formErrorCount(): boolean;
|
|
354
354
|
getData: import('vuex').Computed;
|
|
355
|
-
getUserData: import('vuex').Computed;
|
|
356
355
|
getIsEditMode: import('vuex').Computed;
|
|
357
356
|
getIsDraft: import('vuex').Computed;
|
|
357
|
+
getUserData: import('vuex').Computed;
|
|
358
358
|
}, {
|
|
359
359
|
closeModal(): void;
|
|
360
360
|
handleIDError(): void;
|
|
@@ -372,14 +372,14 @@ declare const _default: import('vue').DefineComponent<Readonly<{
|
|
|
372
372
|
setIsDraft: import('vuex').ActionMethod;
|
|
373
373
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
|
|
374
374
|
steps?: any;
|
|
375
|
-
previousStep?: any;
|
|
376
375
|
nextStep?: any;
|
|
376
|
+
previousStep?: any;
|
|
377
377
|
goToNextStep?: any;
|
|
378
378
|
goToPreviousStep?: any;
|
|
379
379
|
}>>>, {
|
|
380
380
|
readonly steps?: any;
|
|
381
|
-
readonly previousStep?: any;
|
|
382
381
|
readonly nextStep?: any;
|
|
382
|
+
readonly previousStep?: any;
|
|
383
383
|
readonly goToNextStep?: any;
|
|
384
384
|
readonly goToPreviousStep?: any;
|
|
385
385
|
}, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface DpiSpecification {
|
|
4
|
+
pageConent?: object;
|
|
5
|
+
inputDefinition: object;
|
|
6
|
+
prefixes: object;
|
|
7
|
+
formatTypes: object;
|
|
8
|
+
vocabPrefixes: object;
|
|
9
|
+
}
|
|
10
|
+
export interface DpiContext {
|
|
11
|
+
specification: DpiSpecification;
|
|
12
|
+
specificationName: string;
|
|
13
|
+
}
|
|
14
|
+
export type ComputedDpiContext = ComputedRef<DpiContext>;
|
|
15
|
+
export declare const dpiContextKey: InjectionKey<ComputedDpiContext>;
|
|
16
|
+
export declare function useDpiContext(): ComputedDpiContext;
|
|
17
|
+
export declare function setupDpiContext(context: MaybeRefOrGetter<DpiContext>): void;
|