@piveau/piveau-hub-ui-modules 4.4.21 → 4.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +0 -3
  2. package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
  3. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +28 -19
  4. package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
  5. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +47 -47
  6. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  7. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +138 -118
  8. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  9. package/dist/data-provider-interface/components/SpatialInput.vue.d.ts +1 -4
  10. package/dist/data-provider-interface/components/SpatialInput.vue.mjs +95 -96
  11. package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
  12. package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs +44 -38
  13. package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs.map +1 -1
  14. package/dist/data-provider-interface/composables/useDpiContext.d.ts +5 -0
  15. package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -1
  16. package/dist/data-provider-interface/composables/useDpiEditMode.mjs +33 -22
  17. package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -1
  18. package/dist/data-provider-interface/config/dcatapde/page-content-config.mjs +1 -1
  19. package/dist/data-provider-interface/config/dcatapde/page-content-config.mjs.map +1 -1
  20. package/dist/data-provider-interface/utils/inputConverter.mjs +65 -64
  21. package/dist/data-provider-interface/utils/inputConverter.mjs.map +1 -1
  22. package/dist/data-provider-interface/views/InputPage.vue.d.ts +0 -3
  23. package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.d.ts +0 -1
  24. package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.d.ts +0 -2
  25. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.d.ts +0 -1
  26. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs +88 -88
  27. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs.map +1 -1
  28. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.d.ts +0 -1
  29. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs +161 -155
  30. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs.map +1 -1
  31. package/dist/data-provider-interface/views/OverviewPage/PropertyEntry.vue.d.ts +0 -1
  32. package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +0 -3
  33. package/dist/piveau-hub-ui-modules.css +1 -1
  34. package/package.json +1 -1
@@ -1,80 +1,100 @@
1
- import { ref as v, watchEffect as E, resolveComponent as S, openBlock as n, createElementBlock as a, toDisplayString as m, createTextVNode as s, unref as l, createStaticVNode as I, createCommentVNode as u, createElementVNode as r, withDirectives as V, isRef as L, vModelText as M, Fragment as g, renderList as x, createVNode as b, createBlock as U } from "vue";
2
- import A from "./AutocompleteInput.vue.mjs";
3
- import { onClickOutside as B } from "../../external/@vueuse/core/index";
4
- import { useRuntimeEnv as H } from "../../composables/useRuntimeEnv.mjs";
5
- import { useI18n as N } from "vue-i18n";
1
+ import { getCurrentInstance as B, ref as h, watchEffect as H, resolveComponent as F, openBlock as n, createElementBlock as i, toDisplayString as g, createTextVNode as l, unref as s, createStaticVNode as $, createCommentVNode as u, createElementVNode as r, withDirectives as L, isRef as U, vModelText as D, Fragment as k, renderList as C, createVNode as w, createBlock as j } from "vue";
2
+ import O from "./AutocompleteInput.vue.mjs";
3
+ import { onClickOutside as X } from "../../external/@vueuse/core/index";
4
+ import { useRuntimeEnv as q } from "../../composables/useRuntimeEnv.mjs";
5
+ import { useStore as z } from "vuex";
6
+ import { getTranslationFor as S } from "../../utils/helpers.mjs";
7
+ import "@formkit/core";
8
+ import { useI18n as K } from "vue-i18n";
6
9
  import "./ConditionalInput.vue2.mjs";
7
- const P = { class: "formkitProperty" }, F = {
10
+ const W = { class: "formkitProperty" }, G = {
8
11
  key: 0,
9
12
  class: "formkitHeader"
10
- }, R = {
13
+ }, Y = {
11
14
  key: 1,
12
15
  class: "formkitHeader"
13
- }, j = {
16
+ }, J = {
14
17
  key: 2,
15
18
  class: "d-flex infoLicense py-5"
16
- }, O = {
19
+ }, Q = {
17
20
  key: 3,
18
21
  class: "d-flex infoLicense py-5"
19
- }, X = {
22
+ }, Z = {
20
23
  key: 4,
21
24
  class: "formkitCmpWrap simpleConditional"
22
- }, z = { class: "m-3" }, K = { class: "conditionalSelectDiv" }, W = ["placeholder"], Y = { key: 0 }, q = { class: "selectListConditional" }, G = ["onClick"], J = { class: "conditionalManual" }, Q = {
25
+ }, ee = { class: "m-3" }, te = { class: "conditionalSelectDiv" }, oe = ["placeholder"], ae = { key: 0 }, ne = { class: "selectListConditional" }, ie = ["onClick"], se = { class: "conditionalManual" }, le = {
23
26
  key: 0,
24
27
  class: "d-flex"
25
- }, Z = { key: 0 }, tt = {
28
+ }, re = { key: 0 }, de = {
26
29
  key: 5,
27
30
  class: "formkitCmpWrap simpleConditional"
28
- }, et = { class: "m-3" }, ot = { class: "conditionalSelectDiv" }, nt = ["placeholder"], at = { key: 0 }, it = { class: "selectListConditional" }, st = ["onClick"], lt = ["innerHTML"], rt = { class: "conditionalManual" }, dt = {
31
+ }, ue = { class: "m-3" }, ce = { class: "conditionalSelectDiv" }, pe = ["placeholder"], me = { key: 0 }, fe = { class: "selectListConditional" }, ve = ["onClick"], he = ["innerHTML"], ge = { class: "conditionalManual" }, ye = {
29
32
  key: 0,
30
33
  class: "d-flex"
31
- }, ut = {
34
+ }, xe = {
32
35
  key: 0,
33
36
  class: ""
34
- }, ct = {
37
+ }, be = {
35
38
  key: 1,
36
39
  class: "conditionalVocabulary d-flex"
37
- }, pt = { class: "autocompleteInputSingleValue" }, mt = ["innerHTML"], bt = {
40
+ }, ke = { class: "autocompleteInputSingleValue" }, Ce = ["innerHTML"], De = {
38
41
  __name: "ConditionalInput",
39
42
  props: {
40
43
  context: Object
41
44
  },
42
- setup(T) {
43
- let k = H();
44
- const e = T, { t: C } = N();
45
- let d = v(), c = v(!1), p = v(!1);
46
- E(() => {
47
- e.context.value.name && (d.value = C("message.dataupload.datasets.conditional.vocabulary")), e.context.value["foaf:name"] && (d.value = C("message.dataupload.datasets.conditional.manually"));
45
+ setup(E) {
46
+ let _ = q();
47
+ const t = E;
48
+ let A = B().appContext.app.config.globalProperties.$env;
49
+ const { t: I, locale: V } = K();
50
+ let d = h(), p = h(!1), v = h(!1), x = t.context.attrs.voc;
51
+ const N = z();
52
+ let y = h();
53
+ H(() => {
54
+ t.context.value.name && (y.value != t.context.value.name && (t.context.value.name === t.context.value.resource ? P(t.context.value.name).then((a) => {
55
+ y.value = a;
56
+ }).catch((a) => {
57
+ console.error(a);
58
+ }) : 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"));
48
59
  });
49
- const h = v(null), w = (i) => {
50
- p.value = !p.value;
51
- }, $ = () => {
52
- e.context.node.reset();
53
- }, _ = (i, t) => {
54
- d.value = t, c.value = i, e.context.node.reset(), e.context.value = "";
60
+ const P = async (a) => {
61
+ if (a != null) {
62
+ let e = x === "iana-media-types" || x === "spdx-checksum-algorithm", m;
63
+ return await N.dispatch("dpiStore/requestResourceName", { voc: x, uri: a, envs: A }).then(
64
+ (o) => {
65
+ t.context.attrs.property === "dcatde:politicalGeocodingURI" ? o != null && (m = e ? o.data.result.results.filter((c) => c.resource === a).map((c) => c.alt_label)[0].en : S(o.data.result.alt_label, V.value, [])) : o != null && (m = e ? o.data.result.results.filter((c) => c.resource === a).map((c) => c.pref_label)[0].en : S(o.data.result.pref_label, V.value, []));
66
+ }
67
+ ), m;
68
+ }
69
+ }, b = h(null), M = (a) => {
70
+ v.value = !v.value;
71
+ }, R = () => {
72
+ t.context.node.reset();
73
+ }, T = (a, e) => {
74
+ d.value = e, p.value = a, t.context.node.reset(), t.context.value = "";
55
75
  };
56
- return B(h, (i) => p.value = !1), (i, t) => {
57
- const y = S("FormKit");
58
- return n(), a("div", P, [
59
- e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (n(), a("h4", F, m(i.$t("message.dataupload.distributions." + e.context.attrs.identifier + ".label")), 1)) : (n(), a("h4", R, m(i.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
60
- t[18] || (t[18] = s()),
61
- e.context.attrs.identifier === "licence" && l(k).content.dataProviderInterface.annifIntegration ? (n(), a("div", j, t[6] || (t[6] = [
62
- I(`<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&#39;s datasets</strong>, bear in mind
63
- 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
64
- reuse without
65
- prior authorisation, except for the material subject to the third party intellectual property rights. This
66
- Decision has been implemented under the  <a href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en]" target="_blank" rel="nofollow noopener"><ins>Decision C(2019) 1655 final</ins></a>  by which Creative
67
- Commons
68
- Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission&#39;s
69
- reuse policy. Additionally, raw data, metadata or other documents of comparable nature may alternatively be
70
- distributed under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0
71
- 1.0).</p> <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have
72
- approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your
73
- 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)
76
+ return X(b, (a) => v.value = !1), (a, e) => {
77
+ const m = F("FormKit");
78
+ return n(), i("div", W, [
79
+ t.context.attrs.class != null && t.context.attrs.class.includes("inDistribution") ? (n(), i("h4", G, g(a.$t("message.dataupload.distributions." + t.context.attrs.identifier + ".label")), 1)) : (n(), i("h4", Y, g(a.$t("message.dataupload.datasets." + t.context.attrs.identifier + ".label")), 1)),
80
+ e[18] || (e[18] = l()),
81
+ t.context.attrs.identifier === "licence" && s(_).content.dataProviderInterface.annifIntegration ? (n(), i("div", J, e[6] || (e[6] = [
82
+ $(`<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&#39;s datasets</strong>, bear in mind
83
+ 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
84
+ reuse without
85
+ prior authorisation, except for the material subject to the third party intellectual property rights. This
86
+ Decision has been implemented under the  <a href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en]" target="_blank" rel="nofollow noopener"><ins>Decision C(2019) 1655 final</ins></a>  by which Creative
87
+ Commons
88
+ Attribution 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission&#39;s
89
+ reuse policy. Additionally, raw data, metadata or other documents of comparable nature may alternatively be
90
+ distributed under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0
91
+ 1.0).</p> <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have
92
+ approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your
93
+ 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)
74
94
  ]))) : u("", !0),
75
- t[19] || (t[19] = s()),
76
- e.context.attrs.identifier === "rights" && l(k).content.dataProviderInterface.annifIntegration ? (n(), a("div", O, t[7] || (t[7] = [
77
- I(`<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
95
+ e[19] || (e[19] = l()),
96
+ t.context.attrs.identifier === "rights" && s(_).content.dataProviderInterface.annifIntegration ? (n(), i("div", Q, e[7] || (e[7] = [
97
+ $(`<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
78
98
  intellectual property or
79
99
  privacy rights of any third party. In particular, if third party material is included in the dataset, you must
80
100
  ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
@@ -82,122 +102,122 @@ const P = { class: "formkitProperty" }, F = {
82
102
  If you need further information regarding copyright issues, please contact us at
83
103
  <a href="mailto:op-copyright@publications.europa.eu">op-copyright@publications.europa.eu</a></p>`, 3)
84
104
  ]))) : u("", !0),
85
- t[20] || (t[20] = s()),
86
- e.context.attrs.identifier === "rights" ? (n(), a("div", X, [
87
- r("div", z, [
88
- r("div", K, [
89
- V(r("input", {
105
+ e[20] || (e[20] = l()),
106
+ t.context.attrs.identifier === "rights" ? (n(), i("div", Z, [
107
+ r("div", ee, [
108
+ r("div", te, [
109
+ L(r("input", {
90
110
  ref_key: "I1",
91
- ref: h,
111
+ ref: b,
92
112
  type: "text",
93
113
  class: "conditionalSelect formkit-input formkit-inner",
94
- onClick: t[0] || (t[0] = (o) => w()),
95
- placeholder: e.context.attrs.placeholder,
96
- "onUpdate:modelValue": t[1] || (t[1] = (o) => L(d) ? d.value = o : d = o)
97
- }, null, 8, W), [
98
- [M, l(d)]
114
+ onClick: e[0] || (e[0] = (o) => M()),
115
+ placeholder: t.context.attrs.placeholder,
116
+ "onUpdate:modelValue": e[1] || (e[1] = (o) => U(d) ? d.value = o : d = o)
117
+ }, null, 8, oe), [
118
+ [D, s(d)]
99
119
  ]),
100
- t[8] || (t[8] = s()),
101
- l(p) ? (n(), a("div", Y, [
102
- r("ul", q, [
103
- (n(!0), a(g, null, x(e.context.attrs.selection, (o, f) => (n(), a("li", {
120
+ e[8] || (e[8] = l()),
121
+ s(v) ? (n(), i("div", ae, [
122
+ r("ul", ne, [
123
+ (n(!0), i(k, null, C(t.context.attrs.selection, (o, f) => (n(), i("li", {
104
124
  class: "p-2 border-b border-gray-200",
105
- onClick: (D) => _(o, i.$t("message.dataupload.datasets.conditional." + o))
106
- }, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, G))), 256))
125
+ onClick: (c) => T(o, a.$t("message.dataupload.datasets.conditional." + o))
126
+ }, g(a.$t("message.dataupload.datasets.conditional." + o)), 9, ie))), 256))
107
127
  ])
108
128
  ])) : u("", !0)
109
129
  ]),
110
- t[9] || (t[9] = s()),
111
- r("div", J, [
112
- l(c) === "URL" || e.context.node.value["@type"] === "url" ? (n(), a("div", Q, [
113
- b(y, {
130
+ e[9] || (e[9] = l()),
131
+ r("div", se, [
132
+ s(p) === "URL" || t.context.node.value["@type"] === "url" ? (n(), i("div", le, [
133
+ w(m, {
114
134
  type: "url",
115
- placeholder: i.$t("message.dataupload.datasets.conditional.URL"),
135
+ placeholder: a.$t("message.dataupload.datasets.conditional.URL"),
116
136
  name: "rdfs:label",
117
137
  validation: "url",
118
138
  class: "w-100",
119
139
  identifier: "rightsUrl",
120
- modelValue: e.context.value["rdfs:value"],
121
- "onUpdate:modelValue": t[2] || (t[2] = (o) => e.context.value["rdfs:value"] = o)
140
+ modelValue: t.context.value["rdfs:value"],
141
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => t.context.value["rdfs:value"] = o)
122
142
  }, null, 8, ["placeholder", "modelValue"])
123
143
  ])) : u("", !0)
124
144
  ]),
125
- t[10] || (t[10] = s()),
126
- l(c) === "Text" || e.context.value["@type"] === "text" ? (n(), a("div", Z, [
127
- b(y, {
145
+ e[10] || (e[10] = l()),
146
+ s(p) === "Text" || t.context.value["@type"] === "text" ? (n(), i("div", re, [
147
+ w(m, {
128
148
  type: "text",
129
- placeholder: i.$t("message.dataupload.datasets.conditional.Text"),
149
+ placeholder: a.$t("message.dataupload.datasets.conditional.Text"),
130
150
  name: "rdfs:label",
131
151
  class: "w-100",
132
152
  identifier: "rightsText",
133
- modelValue: e.context.value["rdfs:value"],
134
- "onUpdate:modelValue": t[3] || (t[3] = (o) => e.context.value["rdfs:value"] = o)
153
+ modelValue: t.context.value["rdfs:value"],
154
+ "onUpdate:modelValue": e[3] || (e[3] = (o) => t.context.value["rdfs:value"] = o)
135
155
  }, null, 8, ["placeholder", "modelValue"])
136
156
  ])) : u("", !0)
137
157
  ])
138
- ])) : (n(), a("div", tt, [
139
- r("div", et, [
140
- r("div", ot, [
141
- V(r("input", {
158
+ ])) : (n(), i("div", de, [
159
+ r("div", ue, [
160
+ r("div", ce, [
161
+ L(r("input", {
142
162
  ref_key: "I1",
143
- ref: h,
163
+ ref: b,
144
164
  type: "text",
145
165
  class: "conditionalSelect formkit-input formkit-inner",
146
- onClick: t[4] || (t[4] = (o) => w()),
147
- placeholder: e.context.attrs.placeholder,
148
- "onUpdate:modelValue": t[5] || (t[5] = (o) => L(d) ? d.value = o : d = o)
149
- }, null, 8, nt), [
150
- [M, l(d)]
166
+ onClick: e[4] || (e[4] = (o) => M()),
167
+ placeholder: t.context.attrs.placeholder,
168
+ "onUpdate:modelValue": e[5] || (e[5] = (o) => U(d) ? d.value = o : d = o)
169
+ }, null, 8, pe), [
170
+ [D, s(d)]
151
171
  ]),
152
- t[11] || (t[11] = s()),
153
- l(p) ? (n(), a("div", at, [
154
- r("ul", it, [
155
- (n(!0), a(g, null, x(e.context.attrs.selection, (o, f) => (n(), a("li", {
172
+ e[11] || (e[11] = l()),
173
+ s(v) ? (n(), i("div", me, [
174
+ r("ul", fe, [
175
+ (n(!0), i(k, null, C(t.context.attrs.selection, (o, f) => (n(), i("li", {
156
176
  class: "p-2 border-b border-gray-200",
157
- onClick: (D) => _(o, i.$t("message.dataupload.datasets.conditional." + o))
158
- }, m(i.$t("message.dataupload.datasets.conditional." + o)), 9, st))), 256))
177
+ onClick: (c) => T(o, a.$t("message.dataupload.datasets.conditional." + o))
178
+ }, g(a.$t("message.dataupload.datasets.conditional." + o)), 9, ve))), 256))
159
179
  ])
160
180
  ])) : u("", !0),
161
- t[12] || (t[12] = s()),
162
- l(c) === "vocabulary" ? (n(), a("div", {
181
+ e[12] || (e[12] = l()),
182
+ s(p) === "vocabulary" ? (n(), i("div", {
163
183
  key: 1,
164
- innerHTML: i.$t("message.dataupload.distributions.licence.vocabulary.help"),
184
+ innerHTML: a.$t("message.dataupload.distributions.licence.vocabulary.help"),
165
185
  class: "formkit-help position-absolute"
166
- }, null, 8, lt)) : u("", !0)
186
+ }, null, 8, he)) : u("", !0)
167
187
  ]),
168
- t[14] || (t[14] = s()),
169
- r("div", rt, [
170
- l(c) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && l(c) != "vocabulary" ? (n(), a("div", dt, [
171
- (n(!0), a(g, null, x(e.context.attrs.options, (o, f) => (n(), U(y, {
188
+ e[14] || (e[14] = l()),
189
+ r("div", ge, [
190
+ s(p) === "manually" || Object.keys(t.context.value).length > 0 && t.context.value["foaf:name"] && s(p) != "vocabulary" ? (n(), i("div", ye, [
191
+ (n(!0), i(k, null, C(t.context.attrs.options, (o, f) => (n(), j(m, {
172
192
  type: f,
173
- placeholder: i.$t("message.dataupload.datasets.individual." + o),
193
+ placeholder: a.$t("message.dataupload.datasets.individual." + o),
174
194
  name: o,
175
195
  validation: f,
176
196
  class: "w-100"
177
197
  }, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
178
198
  ])) : u("", !0)
179
199
  ]),
180
- t[15] || (t[15] = s()),
181
- l(c) === "vocabulary" && !e.context.value.name ? (n(), a("div", ut, [
182
- b(A, {
183
- context: e.context
200
+ e[15] || (e[15] = l()),
201
+ s(p) === "vocabulary" && !t.context.value.name ? (n(), i("div", xe, [
202
+ w(O, {
203
+ context: t.context
184
204
  }, null, 8, ["context"])
185
205
  ])) : u("", !0),
186
- t[16] || (t[16] = s()),
187
- e.context.value.name ? (n(), a("div", ct, [
188
- r("a", pt, m(e.context.value.name), 1),
189
- t[13] || (t[13] = s()),
206
+ e[16] || (e[16] = l()),
207
+ t.context.value.name ? (n(), i("div", be, [
208
+ r("a", ke, g(s(y)), 1),
209
+ e[13] || (e[13] = l()),
190
210
  r("div", {
191
211
  class: "removeX",
192
- onClick: $
212
+ onClick: R
193
213
  })
194
214
  ])) : u("", !0),
195
- t[17] || (t[17] = s()),
196
- l(c) === "manually" ? (n(), a("div", {
215
+ e[17] || (e[17] = l()),
216
+ s(p) === "manually" ? (n(), i("div", {
197
217
  key: 2,
198
- innerHTML: e.context.attrs.info,
218
+ innerHTML: t.context.attrs.info,
199
219
  class: "formkit-help"
200
- }, null, 8, mt)) : u("", !0)
220
+ }, null, 8, Ce)) : u("", !0)
201
221
  ])
202
222
  ]))
203
223
  ]);
@@ -205,6 +225,6 @@ const P = { class: "formkitProperty" }, F = {
205
225
  }
206
226
  };
207
227
  export {
208
- bt as default
228
+ De as default
209
229
  };
210
230
  //# 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&nbsp;<strong>European</strong>&nbsp;<strong>Commission's datasets</strong>, bear in mind\n that&nbsp;&nbsp;<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&nbsp;&nbsp;<a\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en]\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a>&nbsp; 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&nbsp;<strong>Council</strong>&nbsp;and the&nbsp;<strong>European Court of Auditors</strong>&nbsp;have\n approved similar decisions on reuse. It is advisable that you check&nbsp;<strong>the reuse policy of your\n organisation</strong>&nbsp;before publishing or submitting your dataset.</p>\n <p>If you need further information regarding copyright issues, please contact us at&nbsp;<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'\" v-html=\"$t('message.dataupload.distributions.licence.vocabulary.help')\" 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 props.context.value['name'] }}</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>\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,EAAc;AACxB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAI,GACpBC,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,MAAM;AAAA,IAC3B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAM,GACzBA,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&nbsp;<strong>European</strong>&nbsp;<strong>Commission's datasets</strong>, bear in mind\n that&nbsp;&nbsp;<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&nbsp;&nbsp;<a\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en]\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a>&nbsp; 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&nbsp;<strong>Council</strong>&nbsp;and the&nbsp;<strong>European Court of Auditors</strong>&nbsp;have\n approved similar decisions on reuse. It is advisable that you check&nbsp;<strong>the reuse policy of your\n organisation</strong>&nbsp;before publishing or submitting your dataset.</p>\n <p>If you need further information regarding copyright issues, please contact us at&nbsp;<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\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\nconst requestURIname = async (res) => {\n\n if (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}\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","watchEffect","requestURIname","result","error","res","vocMatch","name","response","dataset","getTranslationFor","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;AAIzB,IAAAO,EAAY,MAAM;AAChB,MAAIf,EAAM,QAAQ,MAAM,SAClBc,EAAgB,SAASd,EAAM,QAAQ,MAAM,SAE3CA,EAAM,QAAQ,MAAM,SAASA,EAAM,QAAQ,MAAM,WACnDgB,EAAehB,EAAM,QAAQ,MAAM,IAAI,EAAE,KAAK,CAAAiB,MAAU;AACtD,QAAAH,EAAgB,QAAQG;AAAA,MAClC,CAAS,EAAE,MAAM,CAAAC,MAAS;AAChB,gBAAQ,MAAMA,CAAK;AAAA,MAC7B,CAAS,IAGDJ,EAAgB,QAAQd,EAAM,QAAQ,MAAM,OAIhDO,EAAc,QAAQH,EAAE,oDAAyD,IAE/EJ,EAAM,QAAQ,MAAM,WAAW,MACjCO,EAAc,QAAQH,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMY,IAAiB,OAAOG,MAAQ;AAEpC,UAAIA,KAAO,MAAW;AACpB,YAAIC,IACFT,MAAQ,sBACRA,MAAQ,2BAENU;AAEJ,qBAAMT,EAAM,SAAS,gCAAgC,EAAE,KAAKD,GAAK,KAAKQ,GAAK,MAAMjB,EAAQ,CAAE,EAAE;AAAA,UAC3F,CAACoB,MAAa;AACZ,YAAItB,EAAM,QAAQ,MAAM,aAAa,iCAC/BsB,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,WAAWjB,EAAO,OAAO,CAAA,CAAE,KAKpEiB,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,YAAYjB,EAAO,OAAO,CAAA,CAAE;AAAA,UAK7E;AAAA,QACN,GAEWgB;AAAA,MACT;AAAA,IAEF,GACMI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,8 +3,5 @@ declare const _default: import('vue').DefineComponent<{}, {
3
3
  $props: {
4
4
  readonly context?: Record<string, any> | undefined;
5
5
  };
6
- }, {
7
- man: boolean;
8
- vocSearch: boolean;
9
- }, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
7
  export default _default;