@piveau/piveau-hub-ui-modules 4.4.29 → 4.5.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/configurations/configureComponents.mjs +20 -18
- package/dist/configurations/configureComponents.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +59 -20
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +36 -25
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +92 -89
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +104 -107
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SpatialInput.vue.mjs +190 -148
- package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs +19 -8
- package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/composables/aucotomplete.d.ts +27 -0
- package/dist/data-provider-interface/composables/aucotomplete.mjs +52 -0
- package/dist/data-provider-interface/composables/aucotomplete.mjs.map +1 -0
- package/dist/data-provider-interface/composables/index.d.ts +4 -0
- package/dist/data-provider-interface/composables/useDpiContext.mjs +7 -9
- package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -1
- package/dist/data-provider-interface/composables/useRequestUriName.d.ts +18 -0
- package/dist/data-provider-interface/composables/useRequestUriName.mjs +59 -0
- package/dist/data-provider-interface/composables/useRequestUriName.mjs.map +1 -0
- package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.mjs +1 -1
- package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.mjs.map +1 -1
- package/dist/data-provider-interface/index.mjs +10 -6
- package/dist/data-provider-interface/index.mjs.map +1 -1
- package/dist/data-provider-interface/store/dpiStore.d.ts +0 -26
- package/dist/data-provider-interface/store/dpiStore.mjs +12 -14
- package/dist/data-provider-interface/store/dpiStore.mjs.map +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.d.ts +49 -20
- package/dist/data-provider-interface/views/InputPage.vue.mjs +125 -107
- package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.d.ts +16 -6
- package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.d.ts +32 -14
- package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.mjs +27 -31
- package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.d.ts +16 -6
- package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.d.ts +8 -3
- package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.d.ts +8 -3
- package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs +57 -47
- package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/PropertyEntry.vue.d.ts +16 -6
- package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +48 -20
- package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs +50 -36
- package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs.map +1 -1
- package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs +4 -4
- package/dist/datasetDetails/DatasetDetailsDataset.vue2.mjs.map +1 -1
- package/dist/datasetDetails/features/DatasetDetailsFeatures.vue.d.ts +3 -3
- package/dist/datasetDetails/features/DatasetDetailsFeatures.vue.mjs +3 -3
- package/dist/datasetDetails/features/DatasetDetailsFeatures.vue.mjs.map +1 -1
- package/dist/datasetDetails/features/DatasetDetailsIsUsedBy.vue.mjs +18 -18
- package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.mjs +58 -50
- package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.mjs.map +1 -1
- package/dist/external/@vueuse/core/index +3 -2
- package/dist/external/@vueuse/shared/index +86 -72
- package/dist/external/@vueuse/shared/index.map +1 -1
- package/dist/form/Repeatable.vue.d.ts +11 -10
- package/dist/form/Repeatable.vue.mjs +5 -62
- package/dist/form/Repeatable.vue.mjs.map +1 -1
- package/dist/form/Repeatable.vue2.mjs +72 -2
- package/dist/form/Repeatable.vue2.mjs.map +1 -1
- package/dist/form/Repeatable.vue3.mjs +5 -0
- package/dist/form/Repeatable.vue3.mjs.map +1 -0
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
- package/dist/data-provider-interface/store/modules/autocompleteStore.d.ts +0 -27
- package/dist/data-provider-interface/store/modules/autocompleteStore.mjs +0 -54
- package/dist/data-provider-interface/store/modules/autocompleteStore.mjs.map +0 -1
|
@@ -1,86 +1,83 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import
|
|
3
|
-
import { onClickOutside as
|
|
4
|
-
import { useRuntimeEnv as
|
|
5
|
-
import { useStore as
|
|
6
|
-
import
|
|
1
|
+
import { getCurrentInstance as N, ref as m, computed as x, watchEffect as R, resolveComponent as P, openBlock as n, createElementBlock as a, toDisplayString as v, createTextVNode as l, unref as s, createStaticVNode as L, createCommentVNode as u, createElementVNode as r, withDirectives as U, isRef as $, vModelText as M, Fragment as b, renderList as k, createVNode as C, createBlock as B } from "vue";
|
|
2
|
+
import H from "./AutocompleteInput.vue.mjs";
|
|
3
|
+
import { onClickOutside as q } from "../../external/@vueuse/core/index";
|
|
4
|
+
import { useRuntimeEnv as F } from "../../composables/useRuntimeEnv.mjs";
|
|
5
|
+
import { useStore as j } from "vuex";
|
|
6
|
+
import "../../utils/helpers.mjs";
|
|
7
7
|
import "@formkit/core";
|
|
8
|
-
import { useI18n as
|
|
8
|
+
import { useI18n as O } from "vue-i18n";
|
|
9
|
+
import { useRequestUriName as X } from "../composables/useRequestUriName.mjs";
|
|
9
10
|
import "./ConditionalInput.vue2.mjs";
|
|
10
|
-
const
|
|
11
|
+
const z = { class: "formkitProperty" }, K = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "formkitHeader"
|
|
13
|
-
},
|
|
14
|
+
}, W = {
|
|
14
15
|
key: 1,
|
|
15
16
|
class: "formkitHeader"
|
|
16
|
-
},
|
|
17
|
+
}, Y = {
|
|
17
18
|
key: 2,
|
|
18
19
|
class: "d-flex infoLicense py-5"
|
|
19
|
-
},
|
|
20
|
+
}, G = {
|
|
20
21
|
key: 3,
|
|
21
22
|
class: "d-flex infoLicense py-5"
|
|
22
|
-
},
|
|
23
|
+
}, J = {
|
|
23
24
|
key: 4,
|
|
24
25
|
class: "formkitCmpWrap simpleConditional"
|
|
25
|
-
},
|
|
26
|
+
}, Q = { class: "m-3" }, Z = { class: "conditionalSelectDiv" }, ee = ["placeholder"], te = { key: 0 }, oe = { class: "selectListConditional" }, ne = ["onClick"], ae = { class: "conditionalManual" }, ie = {
|
|
26
27
|
key: 0,
|
|
27
28
|
class: "d-flex"
|
|
28
|
-
},
|
|
29
|
+
}, se = { key: 0 }, le = {
|
|
29
30
|
key: 5,
|
|
30
31
|
class: "formkitCmpWrap simpleConditional"
|
|
31
|
-
},
|
|
32
|
+
}, re = { class: "m-3" }, de = { class: "conditionalSelectDiv" }, ue = ["placeholder"], ce = { key: 0 }, pe = { class: "selectListConditional" }, me = ["onClick"], ve = ["innerHTML"], fe = { class: "conditionalManual" }, he = {
|
|
32
33
|
key: 0,
|
|
33
34
|
class: "d-flex"
|
|
34
|
-
},
|
|
35
|
+
}, ge = {
|
|
35
36
|
key: 0,
|
|
36
37
|
class: ""
|
|
37
|
-
},
|
|
38
|
+
}, ye = {
|
|
38
39
|
key: 1,
|
|
39
40
|
class: "conditionalVocabulary d-flex"
|
|
40
|
-
},
|
|
41
|
+
}, xe = { class: "autocompleteInputSingleValue" }, be = ["innerHTML"], Ee = {
|
|
41
42
|
__name: "ConditionalInput",
|
|
42
43
|
props: {
|
|
43
44
|
context: Object
|
|
44
45
|
},
|
|
45
|
-
setup(
|
|
46
|
-
let
|
|
47
|
-
const t =
|
|
48
|
-
|
|
49
|
-
const { t: I, locale:
|
|
50
|
-
let d =
|
|
51
|
-
|
|
52
|
-
let
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
t.context.value.name
|
|
65
|
-
y.value = a;
|
|
66
|
-
}).catch((a) => {
|
|
67
|
-
console.error(a);
|
|
68
|
-
}) : y.value = t.context.value.name), d.value = I("message.dataupload.datasets.conditional.vocabulary")), t.context.value["foaf:name"] && (d.value = I("message.dataupload.datasets.conditional.manually"));
|
|
46
|
+
setup(T) {
|
|
47
|
+
let w = F();
|
|
48
|
+
const t = T;
|
|
49
|
+
N().appContext.app.config.globalProperties.$env;
|
|
50
|
+
const { t: I, locale: D } = O();
|
|
51
|
+
let d = m(), c = m(!1), p = m(!1);
|
|
52
|
+
t.context.attrs.voc, j();
|
|
53
|
+
let f = m();
|
|
54
|
+
const { execute: E, error: ke, isLoading: Ce } = X({
|
|
55
|
+
res: x(() => t.context.value.name),
|
|
56
|
+
voc: x(() => t.context.attrs.voc),
|
|
57
|
+
property: x(() => t.context.attrs.property),
|
|
58
|
+
locale: D
|
|
59
|
+
});
|
|
60
|
+
R(() => {
|
|
61
|
+
t.context.value.name && (f.value != t.context.value.name && (t.context.value.name === t.context.value.resource ? E().then((i) => {
|
|
62
|
+
f.value = i;
|
|
63
|
+
}).catch((i) => {
|
|
64
|
+
console.error(i);
|
|
65
|
+
}) : f.value = t.context.value.name), d.value = I("message.dataupload.datasets.conditional.vocabulary")), t.context.value["foaf:name"] && (d.value = I("message.dataupload.datasets.conditional.manually"));
|
|
69
66
|
});
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
},
|
|
67
|
+
const g = m(null), _ = (i) => {
|
|
68
|
+
p.value = !p.value;
|
|
69
|
+
}, S = () => {
|
|
73
70
|
t.context.node.reset();
|
|
74
|
-
},
|
|
75
|
-
d.value = e,
|
|
71
|
+
}, V = (i, e) => {
|
|
72
|
+
d.value = e, c.value = i, t.context.node.reset(), t.context.value = "";
|
|
76
73
|
};
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
return n(),
|
|
80
|
-
t.context.attrs.class != null && t.context.attrs.class.includes("inDistribution") ? (n(),
|
|
74
|
+
return q(g, (i) => p.value = !1), (i, e) => {
|
|
75
|
+
const y = P("FormKit");
|
|
76
|
+
return n(), a("div", z, [
|
|
77
|
+
t.context.attrs.class != null && t.context.attrs.class.includes("inDistribution") ? (n(), a("h4", K, v(i.$t("message.dataupload.distributions." + t.context.attrs.identifier + ".label")), 1)) : (n(), a("h4", W, v(i.$t("message.dataupload.datasets." + t.context.attrs.identifier + ".label")), 1)),
|
|
81
78
|
e[18] || (e[18] = l()),
|
|
82
|
-
t.context.attrs.identifier === "licence" && s(
|
|
83
|
-
|
|
79
|
+
t.context.attrs.identifier === "licence" && s(w).content.dataProviderInterface.annifIntegration ? (n(), a("div", Y, e[6] || (e[6] = [
|
|
80
|
+
L(`<svg xmlns="http://www.w3.org/2000/svg" width="30px" height="30px" fill="currentColor" class="bi bi-info-circle mx-3 mb-3 mt-1 infoboxI" viewBox="0 0 16 16"><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"></path> <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"></path></svg> <div class="w-80"><p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind
|
|
84
81
|
that <a 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
|
|
85
82
|
reuse without
|
|
86
83
|
prior authorisation, except for the material subject to the third party intellectual property rights. This
|
|
@@ -94,8 +91,8 @@ const W = { class: "formkitProperty" }, G = {
|
|
|
94
91
|
organisation</strong> before publishing or submitting your dataset.</p> <p>If you need further information regarding copyright issues, please contact us at <a href="mailto:op-copyright@publications.europa.eu" target="_blank" rel="nofollow noopener">op-copyright@publications.europa.eu</a></p></div>`, 3)
|
|
95
92
|
]))) : u("", !0),
|
|
96
93
|
e[19] || (e[19] = l()),
|
|
97
|
-
t.context.attrs.identifier === "rights" && s(
|
|
98
|
-
|
|
94
|
+
t.context.attrs.identifier === "rights" && s(w).content.dataProviderInterface.annifIntegration ? (n(), a("div", G, e[7] || (e[7] = [
|
|
95
|
+
L(`<svg xmlns="http://www.w3.org/2000/svg" width="30px" height="30px" fill="currentColor" class="bi bi-info-circle mx-3 mb-3 mt-1 infoboxI" viewBox="0 0 16 16"><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"></path> <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"></path></svg> <p class="textInfoI">As owner of your dataset, you guarantee that it does not violate the copyright, other
|
|
99
96
|
intellectual property or
|
|
100
97
|
privacy rights of any third party. In particular, if third party material is included in the dataset, you must
|
|
101
98
|
ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
|
|
@@ -104,36 +101,36 @@ const W = { class: "formkitProperty" }, G = {
|
|
|
104
101
|
<a href="mailto:op-copyright@publications.europa.eu">op-copyright@publications.europa.eu</a></p>`, 3)
|
|
105
102
|
]))) : u("", !0),
|
|
106
103
|
e[20] || (e[20] = l()),
|
|
107
|
-
t.context.attrs.identifier === "rights" ? (n(),
|
|
108
|
-
r("div",
|
|
109
|
-
r("div",
|
|
110
|
-
|
|
104
|
+
t.context.attrs.identifier === "rights" ? (n(), a("div", J, [
|
|
105
|
+
r("div", Q, [
|
|
106
|
+
r("div", Z, [
|
|
107
|
+
U(r("input", {
|
|
111
108
|
ref_key: "I1",
|
|
112
|
-
ref:
|
|
109
|
+
ref: g,
|
|
113
110
|
type: "text",
|
|
114
111
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
115
|
-
onClick: e[0] || (e[0] = (o) =>
|
|
112
|
+
onClick: e[0] || (e[0] = (o) => _()),
|
|
116
113
|
placeholder: t.context.attrs.placeholder,
|
|
117
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) =>
|
|
118
|
-
}, null, 8,
|
|
119
|
-
[
|
|
114
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => $(d) ? d.value = o : d = o)
|
|
115
|
+
}, null, 8, ee), [
|
|
116
|
+
[M, s(d)]
|
|
120
117
|
]),
|
|
121
118
|
e[8] || (e[8] = l()),
|
|
122
|
-
s(
|
|
123
|
-
r("ul",
|
|
124
|
-
(n(!0),
|
|
119
|
+
s(p) ? (n(), a("div", te, [
|
|
120
|
+
r("ul", oe, [
|
|
121
|
+
(n(!0), a(b, null, k(t.context.attrs.selection, (o, h) => (n(), a("li", {
|
|
125
122
|
class: "p-2 border-b border-gray-200",
|
|
126
|
-
onClick: (
|
|
127
|
-
},
|
|
123
|
+
onClick: (A) => V(o, i.$t("message.dataupload.datasets.conditional." + o))
|
|
124
|
+
}, v(i.$t("message.dataupload.datasets.conditional." + o)), 9, ne))), 256))
|
|
128
125
|
])
|
|
129
126
|
])) : u("", !0)
|
|
130
127
|
]),
|
|
131
128
|
e[9] || (e[9] = l()),
|
|
132
|
-
r("div",
|
|
133
|
-
s(
|
|
134
|
-
|
|
129
|
+
r("div", ae, [
|
|
130
|
+
s(c) === "URL" || t.context.node.value["@type"] === "url" ? (n(), a("div", ie, [
|
|
131
|
+
C(y, {
|
|
135
132
|
type: "url",
|
|
136
|
-
placeholder:
|
|
133
|
+
placeholder: i.$t("message.dataupload.datasets.conditional.URL"),
|
|
137
134
|
name: "rdfs:label",
|
|
138
135
|
validation: "url",
|
|
139
136
|
class: "w-100",
|
|
@@ -144,10 +141,10 @@ const W = { class: "formkitProperty" }, G = {
|
|
|
144
141
|
])) : u("", !0)
|
|
145
142
|
]),
|
|
146
143
|
e[10] || (e[10] = l()),
|
|
147
|
-
s(
|
|
148
|
-
|
|
144
|
+
s(c) === "Text" || t.context.value["@type"] === "text" ? (n(), a("div", se, [
|
|
145
|
+
C(y, {
|
|
149
146
|
type: "text",
|
|
150
|
-
placeholder:
|
|
147
|
+
placeholder: i.$t("message.dataupload.datasets.conditional.Text"),
|
|
151
148
|
name: "rdfs:label",
|
|
152
149
|
class: "w-100",
|
|
153
150
|
identifier: "rightsText",
|
|
@@ -156,69 +153,69 @@ const W = { class: "formkitProperty" }, G = {
|
|
|
156
153
|
}, null, 8, ["placeholder", "modelValue"])
|
|
157
154
|
])) : u("", !0)
|
|
158
155
|
])
|
|
159
|
-
])) : (n(),
|
|
160
|
-
r("div",
|
|
161
|
-
r("div",
|
|
162
|
-
|
|
156
|
+
])) : (n(), a("div", le, [
|
|
157
|
+
r("div", re, [
|
|
158
|
+
r("div", de, [
|
|
159
|
+
U(r("input", {
|
|
163
160
|
ref_key: "I1",
|
|
164
|
-
ref:
|
|
161
|
+
ref: g,
|
|
165
162
|
type: "text",
|
|
166
163
|
class: "conditionalSelect formkit-input formkit-inner",
|
|
167
|
-
onClick: e[4] || (e[4] = (o) =>
|
|
164
|
+
onClick: e[4] || (e[4] = (o) => _()),
|
|
168
165
|
placeholder: t.context.attrs.placeholder,
|
|
169
|
-
"onUpdate:modelValue": e[5] || (e[5] = (o) =>
|
|
170
|
-
}, null, 8,
|
|
171
|
-
[
|
|
166
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => $(d) ? d.value = o : d = o)
|
|
167
|
+
}, null, 8, ue), [
|
|
168
|
+
[M, s(d)]
|
|
172
169
|
]),
|
|
173
170
|
e[11] || (e[11] = l()),
|
|
174
|
-
s(
|
|
175
|
-
r("ul",
|
|
176
|
-
(n(!0),
|
|
171
|
+
s(p) ? (n(), a("div", ce, [
|
|
172
|
+
r("ul", pe, [
|
|
173
|
+
(n(!0), a(b, null, k(t.context.attrs.selection, (o, h) => (n(), a("li", {
|
|
177
174
|
class: "p-2 border-b border-gray-200",
|
|
178
|
-
onClick: (
|
|
179
|
-
},
|
|
175
|
+
onClick: (A) => V(o, i.$t("message.dataupload.datasets.conditional." + o))
|
|
176
|
+
}, v(i.$t("message.dataupload.datasets.conditional." + o)), 9, me))), 256))
|
|
180
177
|
])
|
|
181
178
|
])) : u("", !0),
|
|
182
179
|
e[12] || (e[12] = l()),
|
|
183
|
-
s(
|
|
180
|
+
s(c) === "vocabulary" ? (n(), a("div", {
|
|
184
181
|
key: 1,
|
|
185
|
-
innerHTML:
|
|
182
|
+
innerHTML: i.$t("message.dataupload.distributions.licence.vocabulary.help"),
|
|
186
183
|
class: "formkit-help position-absolute"
|
|
187
|
-
}, null, 8,
|
|
184
|
+
}, null, 8, ve)) : u("", !0)
|
|
188
185
|
]),
|
|
189
186
|
e[14] || (e[14] = l()),
|
|
190
|
-
r("div",
|
|
191
|
-
s(
|
|
192
|
-
(n(!0),
|
|
193
|
-
type:
|
|
194
|
-
placeholder:
|
|
187
|
+
r("div", fe, [
|
|
188
|
+
s(c) === "manually" || Object.keys(t.context.value).length > 0 && t.context.value["foaf:name"] && s(c) != "vocabulary" ? (n(), a("div", he, [
|
|
189
|
+
(n(!0), a(b, null, k(t.context.attrs.options, (o, h) => (n(), B(y, {
|
|
190
|
+
type: h,
|
|
191
|
+
placeholder: i.$t("message.dataupload.datasets.individual." + o),
|
|
195
192
|
name: o,
|
|
196
|
-
validation:
|
|
193
|
+
validation: h,
|
|
197
194
|
class: "w-100"
|
|
198
195
|
}, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
|
|
199
196
|
])) : u("", !0)
|
|
200
197
|
]),
|
|
201
198
|
e[15] || (e[15] = l()),
|
|
202
|
-
s(
|
|
203
|
-
|
|
199
|
+
s(c) === "vocabulary" && !t.context.value.name ? (n(), a("div", ge, [
|
|
200
|
+
C(H, {
|
|
204
201
|
context: t.context
|
|
205
202
|
}, null, 8, ["context"])
|
|
206
203
|
])) : u("", !0),
|
|
207
204
|
e[16] || (e[16] = l()),
|
|
208
|
-
t.context.value.name ? (n(),
|
|
209
|
-
r("a",
|
|
205
|
+
t.context.value.name ? (n(), a("div", ye, [
|
|
206
|
+
r("a", xe, v(s(f)), 1),
|
|
210
207
|
e[13] || (e[13] = l()),
|
|
211
208
|
r("div", {
|
|
212
209
|
class: "removeX",
|
|
213
|
-
onClick:
|
|
210
|
+
onClick: S
|
|
214
211
|
})
|
|
215
212
|
])) : u("", !0),
|
|
216
213
|
e[17] || (e[17] = l()),
|
|
217
|
-
s(
|
|
214
|
+
s(c) === "manually" ? (n(), a("div", {
|
|
218
215
|
key: 2,
|
|
219
216
|
innerHTML: t.context.attrs.info,
|
|
220
217
|
class: "formkit-help"
|
|
221
|
-
}, null, 8,
|
|
218
|
+
}, null, 8, be)) : u("", !0)
|
|
222
219
|
])
|
|
223
220
|
]))
|
|
224
221
|
]);
|
|
@@ -226,6 +223,6 @@ const W = { class: "formkitProperty" }, G = {
|
|
|
226
223
|
}
|
|
227
224
|
};
|
|
228
225
|
export {
|
|
229
|
-
|
|
226
|
+
Ee as default
|
|
230
227
|
};
|
|
231
228
|
//# 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>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind\n that <a 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\n prior authorisation, except for the material subject to the third party intellectual property rights. This\n Decision has been implemented under the <a\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\n Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission's\n reuse policy. Additionally, raw data, metadata or other documents of comparable nature may alternatively be\n distributed under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0\n 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 <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 </div>\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\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 v-if=\"selectedItem === 'vocabulary'\"\n v-html=\"$t('message.dataupload.distributions.licence.vocabulary.help')\"\n class=\"formkit-help position-absolute\">\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\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n resolvedUriName }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n <div v-if=\"selectedItem === 'manually'\" v-html=\"props.context.attrs.info\" class=\"formkit-help\"></div>\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\n\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { ref, watch, computed, onMounted, watchEffect } from 'vue';\nimport { useStore } from 'vuex';\nimport { getTranslationFor } from \"../../utils/helpers\";\nimport { getCurrentInstance } from \"vue\";\nimport { getNode } from '@formkit/core'\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\nconst { t, locale } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\nlet voc = props.context.attrs.voc;\nconst store = useStore();\nlet resolvedUriName = ref();\n\nconst requestURIname = async (res) => {\n\nif (res != undefined) {\n let vocMatch =\n voc === \"iana-media-types\" ||\n voc === \"spdx-checksum-algorithm\";\n\n let name;\n\n await store.dispatch('dpiStore/requestResourceName', { voc: voc, uri: res, envs: instance }).then(\n (response) => {\n if (props.context.attrs.property === 'dcatde:politicalGeocodingURI') {\n if (response != undefined) {\n let result = vocMatch\n ? response.data.result.results\n .filter((dataset) => dataset.resource === res)\n .map((dataset) => dataset.alt_label)[0].en\n : getTranslationFor(response.data.result.alt_label, locale.value, []);\n name = result;\n }\n } else {\n\n if (response != undefined) {\n let result = vocMatch\n ? response.data.result.results\n .filter((dataset) => dataset.resource === res)\n .map((dataset) => dataset.pref_label)[0].en\n : getTranslationFor(response.data.result.pref_label, locale.value, []);\n name = result;\n\n }\n }\n }\n );\n\n return name\n}\n\n}\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n if (resolvedUriName.value != props.context.value.name) {\n\n if (props.context.value.name === props.context.value.resource) {\n requestURIname(props.context.value.name).then(result => {\n resolvedUriName.value = result;\n }).catch(error => {\n console.error(error);\n })\n }\n else {\n resolvedUriName.value = props.context.value.name\n }\n }\n\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\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","instance","getCurrentInstance","t","locale","useI18n","selectModeVal","ref","selectedItem","showSelect","voc","store","useStore","resolvedUriName","requestURIname","res","vocMatch","name","response","dataset","getTranslationFor","watchEffect","result","error","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkJA,QAAIA,IAAMC,EAAc;AACxB,UAAMC,IAAQC;AAGX,QAACC,IAAWC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AACtE,UAAC,EAAE,GAAAC,GAAG,QAAAC,MAAWC;AACtB,QAAIC,IAAgBC,EAAI,GACpBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK,GACtBG,IAAMX,EAAM,QAAQ,MAAM;AAC9B,UAAMY,IAAQC,EAAQ;AACtB,QAAIC,IAAkBN,EAAG;AAEzB,UAAMO,IAAiB,OAAOC,MAAQ;AAEtC,UAAIA,KAAO,MAAW;AACpB,YAAIC,IACFN,MAAQ,sBACRA,MAAQ,2BAENO;AAEJ,qBAAMN,EAAM,SAAS,gCAAgC,EAAE,KAAKD,GAAK,KAAKK,GAAK,MAAMd,EAAQ,CAAE,EAAE;AAAA,UAC3F,CAACiB,MAAa;AACZ,YAAInB,EAAM,QAAQ,MAAM,aAAa,iCAC/BmB,KAAY,SAMdD,IALaD,IACTE,EAAS,KAAK,OAAO,QACpB,OAAO,CAACC,MAAYA,EAAQ,aAAaJ,CAAG,EAC5C,IAAI,CAACI,MAAYA,EAAQ,SAAS,EAAE,CAAC,EAAE,KACxCC,EAAkBF,EAAS,KAAK,OAAO,WAAWd,EAAO,OAAO,CAAA,CAAE,KAKpEc,KAAY,SAMdD,IALaD,IACTE,EAAS,KAAK,OAAO,QACpB,OAAO,CAACC,MAAYA,EAAQ,aAAaJ,CAAG,EAC5C,IAAI,CAACI,MAAYA,EAAQ,UAAU,EAAE,CAAC,EAAE,KACzCC,EAAkBF,EAAS,KAAK,OAAO,YAAYd,EAAO,OAAO,CAAA,CAAE;AAAA,UAK7E;AAAA,QACJ,GAESa;AAAA,MACT;AAAA,IAEA;AAEA,IAAAI,EAAY,MAAM;AAChB,MAAItB,EAAM,QAAQ,MAAM,SAClBc,EAAgB,SAASd,EAAM,QAAQ,MAAM,SAE3CA,EAAM,QAAQ,MAAM,SAASA,EAAM,QAAQ,MAAM,WACnDe,EAAef,EAAM,QAAQ,MAAM,IAAI,EAAE,KAAK,CAAAuB,MAAU;AACtD,QAAAT,EAAgB,QAAQS;AAAA,MAClC,CAAS,EAAE,MAAM,CAAAC,MAAS;AAChB,gBAAQ,MAAMA,CAAK;AAAA,MAC7B,CAAS,IAGDV,EAAgB,QAAQd,EAAM,QAAQ,MAAM,OAIhDO,EAAc,QAAQH,EAAE,oDAAyD,IAE/EJ,EAAM,QAAQ,MAAM,WAAW,MACjCO,EAAc,QAAQH,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAGD,UAAMqB,IAAKjB,EAAI,IAAI,GAEbkB,IAAa,CAACC,MAAM;AAExB,MAAAjB,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMkB,IAAiB,MAAM;AAC3B,MAAA5B,EAAM,QAAQ,KAAK,MAAM;AAAA,IAC3B,GACM6B,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAvB,EAAc,QAAQuB,GACtBrB,EAAa,QAAQkB,GACrB3B,EAAM,QAAQ,KAAK,MAAM,GACzBA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAA+B,EAAeN,GAAI,CAAAO,MAAStB,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\n that <a 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\n prior authorisation, except for the material subject to the third party intellectual property rights. This\n Decision has been implemented under the <a\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\n Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission's\n reuse policy. Additionally, raw data, metadata or other documents of comparable nature may alternatively be\n distributed under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0\n 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 <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 </div>\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\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 v-if=\"selectedItem === 'vocabulary'\"\n v-html=\"$t('message.dataupload.distributions.licence.vocabulary.help')\"\n class=\"formkit-help position-absolute\">\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\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n resolvedUriName }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n <div v-if=\"selectedItem === 'manually'\" v-html=\"props.context.attrs.info\" class=\"formkit-help\"></div>\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\n\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { ref, watch, computed, onMounted, watchEffect, toRef } from 'vue';\nimport { useStore } from 'vuex';\nimport { getTranslationFor } from \"../../utils/helpers\";\nimport { getCurrentInstance } from \"vue\";\nimport { getNode } from '@formkit/core'\nimport { useI18n } from 'vue-i18n';\nimport { useRequestUriName } from '../composables/useRequestUriName';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\nconst { t, locale } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\nlet voc = props.context.attrs.voc;\nconst store = useStore();\nlet resolvedUriName = ref();\n\nconst { execute: requestURIname, error: requestURInameError, isLoading: requestURInameLoading } = useRequestUriName({\n res: computed(() => props.context.value.name),\n voc: computed(() => props.context.attrs.voc),\n property: computed(() => props.context.attrs.property),\n locale,\n})\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n if (resolvedUriName.value != props.context.value.name) {\n\n if (props.context.value.name === props.context.value.resource) {\n requestURIname().then(result => {\n resolvedUriName.value = result;\n }).catch(error => {\n console.error(error);\n })\n }\n else {\n resolvedUriName.value = props.context.value.name\n }\n }\n\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","getCurrentInstance","t","locale","useI18n","selectModeVal","ref","selectedItem","showSelect","useStore","resolvedUriName","requestURIname","requestURInameError","requestURInameLoading","useRequestUriName","computed","watchEffect","result","error","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmJA,QAAIA,IAAMC,EAAc;AACxB,UAAMC,IAAQC;AAGC,IAAAC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AACtE,UAAC,EAAE,GAAAC,GAAG,QAAAC,MAAWC;AACtB,QAAIC,IAAgBC,EAAI,GACpBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAChB,IAAAP,EAAM,QAAQ,MAAM,KAChBU,EAAU;AACxB,QAAIC,IAAkBJ,EAAG;AAEzB,UAAM,EAAE,SAASK,GAAgB,OAAOC,IAAqB,WAAWC,GAAuB,IAAGC,EAAkB;AAAA,MAClH,KAAKC,EAAS,MAAMhB,EAAM,QAAQ,MAAM,IAAI;AAAA,MAC5C,KAAKgB,EAAS,MAAMhB,EAAM,QAAQ,MAAM,GAAG;AAAA,MAC3C,UAAUgB,EAAS,MAAMhB,EAAM,QAAQ,MAAM,QAAQ;AAAA,MACrD,QAAAI;AAAA,IACF,CAAC;AAED,IAAAa,EAAY,MAAM;AAChB,MAAIjB,EAAM,QAAQ,MAAM,SAClBW,EAAgB,SAASX,EAAM,QAAQ,MAAM,SAE3CA,EAAM,QAAQ,MAAM,SAASA,EAAM,QAAQ,MAAM,WACnDY,EAAgB,EAAC,KAAK,CAAAM,MAAU;AAC9B,QAAAP,EAAgB,QAAQO;AAAA,MAClC,CAAS,EAAE,MAAM,CAAAC,MAAS;AAChB,gBAAQ,MAAMA,CAAK;AAAA,MAC7B,CAAS,IAGDR,EAAgB,QAAQX,EAAM,QAAQ,MAAM,OAIhDM,EAAc,QAAQH,EAAE,oDAAyD,IAE/EH,EAAM,QAAQ,MAAM,WAAW,MACjCM,EAAc,QAAQH,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMiB,IAAKb,EAAI,IAAI,GAEbc,IAAa,CAACC,MAAM;AAExB,MAAAb,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMc,IAAiB,MAAM;AAC3B,MAAAvB,EAAM,QAAQ,KAAK,MAAM;AAAA,IAC3B,GACMwB,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAnB,EAAc,QAAQmB,GACtBjB,EAAa,QAAQc,GACrBtB,EAAM,QAAQ,KAAK,MAAM,GACzBA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAA0B,EAAeN,GAAI,CAAAO,MAASlB,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|