@piveau/piveau-hub-ui-modules 4.2.1 → 4.3.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +98 -98
  2. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  3. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +135 -129
  4. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  5. package/dist/data-provider-interface/components/DistributionStepper.vue.mjs +60 -60
  6. package/dist/data-provider-interface/components/DistributionStepper.vue.mjs.map +1 -1
  7. package/dist/data-provider-interface/components/FileUpload.vue.mjs +2 -2
  8. package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
  9. package/dist/data-provider-interface/components/SimpleInput.vue.mjs +16 -20
  10. package/dist/data-provider-interface/components/SimpleInput.vue.mjs.map +1 -1
  11. package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +31 -31
  12. package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
  13. package/dist/data-provider-interface/components/SpatialInput.vue.mjs +90 -94
  14. package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
  15. package/dist/data-provider-interface/components/SpatialInput.vue2.mjs +2 -2
  16. package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs +41 -30
  17. package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.mjs.map +1 -1
  18. package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +19 -39
  19. package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
  20. package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs +52 -52
  21. package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs.map +1 -1
  22. package/dist/data-provider-interface/views/InputPage.vue.mjs +67 -67
  23. package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
  24. package/dist/form/Repeatable.vue.mjs +18 -18
  25. package/dist/form/Repeatable.vue.mjs.map +1 -1
  26. package/dist/piveau-hub-ui-modules.css +1 -1
  27. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
- import { ref as h, resolveComponent as V, openBlock as i, createElementBlock as r, createElementVNode as e, toDisplayString as x, createTextVNode as o, unref as s, createCommentVNode as u, withDirectives as I, isRef as L, vModelText as M, Fragment as g, renderList as b, createVNode as _, createBlock as H } from "vue";
2
- import D from "./AutocompleteInput.vue.mjs";
3
- import { onClickOutside as U } from "../../external/@vueuse/core/index";
4
- import { useRuntimeEnv as A } from "../../composables/useRuntimeEnv.mjs";
1
+ import { ref as h, watchEffect as A, resolveComponent as L, openBlock as n, createElementBlock as a, createElementVNode as t, toDisplayString as f, createTextVNode as i, unref as r, createCommentVNode as d, withDirectives as V, isRef as D, vModelText as E, Fragment as g, renderList as x, createVNode as _, createBlock as P, createStaticVNode as T } from "vue";
2
+ import U from "./AutocompleteInput.vue.mjs";
3
+ import { onClickOutside as B } from "../../external/@vueuse/core/index";
4
+ import { useRuntimeEnv as N } from "../../composables/useRuntimeEnv.mjs";
5
+ import { useI18n as $ } from "vue-i18n";
5
6
  import "./ConditionalInput.vue2.mjs";
6
- const E = { class: "formkitProperty" }, P = { class: "formkitHeader" }, S = {
7
+ const F = { class: "formkitProperty" }, j = { class: "formkitHeader" }, O = {
7
8
  key: 0,
8
9
  class: "d-flex infoLicense py-5"
9
- }, B = /* @__PURE__ */ e("svg", {
10
+ }, R = /* @__PURE__ */ t("svg", {
10
11
  xmlns: "http://www.w3.org/2000/svg",
11
12
  width: "30px",
12
13
  height: "30px",
@@ -14,33 +15,21 @@ const E = { class: "formkitProperty" }, P = { class: "formkitHeader" }, S = {
14
15
  class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
15
16
  viewBox: "0 0 16 16"
16
17
  }, [
17
- /* @__PURE__ */ e("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
18
- /* @__PURE__ */ o(),
19
- /* @__PURE__ */ e("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
20
- ], -1), N = /* @__PURE__ */ e("p", { class: "textInfoI" }, [
21
- /* @__PURE__ */ o("For European Commission’s datasets, bear in mind that Decision "),
22
- /* @__PURE__ */ e("a", { href: "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" }, "2011/833/EU"),
23
- /* @__PURE__ */ o(` allows for their
24
- commercial reuse
25
- without prior authorisation, except for the material subject to the third party intellectual property rights.
26
- This Decision has been implemented under the `),
27
- /* @__PURE__ */ e("a", { href: "https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en" }, `Decision C(2019)
28
- 1655 final`),
29
- /* @__PURE__ */ o(` by which Creative Commons Attribution
30
- 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission’s reuse policy.
31
- Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed under
32
- the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).
33
- `),
34
- /* @__PURE__ */ e("br"),
35
- /* @__PURE__ */ e("br"),
36
- /* @__PURE__ */ o(`
37
- The Council and the European Court of Auditors have approved similar decisions on reuse. It is advisable that
38
- you check the reuse policy of your organisation before publishing or submitting your dataset.
39
- `)
40
- ], -1), j = {
18
+ /* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
19
+ /* @__PURE__ */ i(),
20
+ /* @__PURE__ */ t("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
21
+ ], -1), X = /* @__PURE__ */ T(`<div class="w-80"><p><em>For <strong>European</strong> <strong>Commission&#39;s datasets</strong>, bear in mind
22
+ that <ins>Decision 2011/833/EU</ins> <a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833]" target="_blank" rel="nofollow noopener">[link</a> ] allows for their commercial reuse without prior authorisation,
23
+ except for the material subject to the third party intellectual property rights. This Decision has been
24
+ implemented under the <ins>Decision C(2019) 1655 final</ins> <a href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&amp;lang=en]" target="_blank" rel="nofollow noopener">[link</a> ] by which Creative Commons Attribution 4.0
25
+ International Public License (CC BY 4.0) is adopted as an open licence for the Commission&#39;s reuse policy.
26
+ Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed
27
+ under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</em></p> <p><em>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have
28
+ approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your
29
+ organisation</strong> before publishing or submitting your dataset.</em></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>`, 1), z = {
41
30
  key: 1,
42
31
  class: "d-flex infoLicense py-5"
43
- }, F = /* @__PURE__ */ e("svg", {
32
+ }, K = /* @__PURE__ */ t("svg", {
44
33
  xmlns: "http://www.w3.org/2000/svg",
45
34
  width: "30px",
46
35
  height: "30px",
@@ -48,161 +37,178 @@ const E = { class: "formkitProperty" }, P = { class: "formkitHeader" }, S = {
48
37
  class: "bi bi-info-circle mx-3 mb-3 mt-1 infoboxI",
49
38
  viewBox: "0 0 16 16"
50
39
  }, [
51
- /* @__PURE__ */ e("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
52
- /* @__PURE__ */ o(),
53
- /* @__PURE__ */ e("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
54
- ], -1), O = /* @__PURE__ */ e("p", { class: "textInfoI" }, [
55
- /* @__PURE__ */ o(`As owner of your dataset, you guarantee that it does not violate the copyright, other
40
+ /* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
41
+ /* @__PURE__ */ i(),
42
+ /* @__PURE__ */ t("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
43
+ ], -1), W = /* @__PURE__ */ t("p", { class: "textInfoI" }, [
44
+ /* @__PURE__ */ i(`As owner of your dataset, you guarantee that it does not violate the copyright, other
56
45
  intellectual property or
57
46
  privacy rights of any third party. In particular, if third party material is included in the dataset, you must
58
47
  ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
59
48
  `),
60
- /* @__PURE__ */ e("br"),
61
- /* @__PURE__ */ e("br"),
62
- /* @__PURE__ */ o(`
49
+ /* @__PURE__ */ t("br"),
50
+ /* @__PURE__ */ t("br"),
51
+ /* @__PURE__ */ i(`
63
52
  If you need further information regarding copyright issues, please contact us at
64
53
  `),
65
- /* @__PURE__ */ e("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
66
- ], -1), R = {
54
+ /* @__PURE__ */ t("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
55
+ ], -1), H = {
67
56
  key: 2,
68
57
  class: "formkitCmpWrap simpleConditional"
69
- }, z = { class: "m-3" }, K = { class: "conditionalSelectDiv" }, W = { key: 0 }, X = { class: "selectListConditional" }, Y = { class: "conditionalManual" }, $ = {
58
+ }, Y = { class: "m-3" }, q = { class: "conditionalSelectDiv" }, G = { key: 0 }, J = { class: "selectListConditional" }, Q = { class: "conditionalManual" }, Z = {
70
59
  key: 0,
71
60
  class: "d-flex"
72
- }, q = { key: 0 }, G = {
61
+ }, ee = { key: 0 }, te = {
73
62
  key: 3,
74
63
  class: "formkitCmpWrap simpleConditional"
75
- }, J = { class: "m-3" }, Q = { class: "conditionalSelectDiv" }, Z = { key: 0 }, ee = { class: "selectListConditional" }, te = { class: "conditionalManual" }, oe = {
64
+ }, oe = { class: "m-3" }, ne = { class: "conditionalSelectDiv" }, ae = ["placeholder"], ie = { key: 0 }, se = { class: "selectListConditional" }, le = ["onClick"], re = { class: "conditionalManual" }, de = {
76
65
  key: 0,
77
66
  class: "d-flex"
78
- }, ne = {
79
- key: 0,
80
- class: "conditionalVocabulary"
81
67
  }, ce = {
68
+ key: 0,
69
+ class: ""
70
+ }, ue = {
71
+ key: 1,
72
+ class: "conditionalVocabulary d-flex"
73
+ }, pe = { class: "autocompleteInputSingleValue" }, xe = {
82
74
  __name: "ConditionalInput",
83
75
  props: {
84
76
  context: Object
85
77
  },
86
- setup(T) {
87
- let C = A();
88
- const t = T;
89
- let d = h(), c = h(!1), p = h(!1);
90
- const f = h(null), k = (l) => {
78
+ setup(M) {
79
+ let b = N();
80
+ const e = M, { t: k } = $();
81
+ let l = h(), u = h(!1), p = h(!1);
82
+ A(() => {
83
+ e.context.value.name && (l.value = k("message.dataupload.datasets.conditional.vocabulary")), e.context.value["foaf:name"] && (l.value = k("message.dataupload.datasets.conditional.manually"));
84
+ });
85
+ const v = h(null), C = (c) => {
91
86
  p.value = !p.value;
92
- }, w = (l) => {
93
- console.log(l.target.innerHTML), d.value = l.target.innerHTML, (l.target.innerHTML === "manually" || l.target.innerHTML === "manually") && (c.value = "manually"), (l.target.innerHTML === "Vocabulary" || l.target.innerHTML === "vocabulary") && (c.value = "vocabulary"), (l.target.innerHTML === "URL" || l.target.innerHTML === "url") && (c.value = "url"), (l.target.innerHTML === "Text" || l.target.innerHTML === "text") && (c.value = "text"), t.context.node.reset(), t.context.value = "";
87
+ }, S = () => {
88
+ e.context.node.reset();
89
+ }, w = (c, s) => {
90
+ l.value = s, u.value = c, e.context.node.reset(), e.context.value = "";
94
91
  };
95
- return U(f, (l) => p.value = !1), (l, a) => {
96
- const v = V("FormKit");
97
- return i(), r("div", E, [
98
- e("h4", P, x(t.context.attrs.identifier.charAt(0).toUpperCase() + t.context.attrs.identifier.slice(1)), 1),
99
- o(),
100
- t.context.attrs.identifier === "licence" && s(C).content.dataProviderInterface.annifIntegration ? (i(), r("div", S, [
101
- B,
102
- o(),
103
- N
104
- ])) : u("", !0),
105
- o(),
106
- t.context.attrs.identifier === "rights" && s(C).content.dataProviderInterface.annifIntegration ? (i(), r("div", j, [
107
- F,
108
- o(),
109
- O
110
- ])) : u("", !0),
111
- o(),
112
- t.context.attrs.identifier === "rights" ? (i(), r("div", R, [
113
- e("div", z, [
114
- e("div", K, [
115
- I(e("input", {
92
+ return B(v, (c) => p.value = !1), (c, s) => {
93
+ const y = L("FormKit");
94
+ return n(), a("div", F, [
95
+ t("h4", j, f(c.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1),
96
+ i(),
97
+ e.context.attrs.identifier === "licence" && r(b).content.dataProviderInterface.annifIntegration ? (n(), a("div", O, [
98
+ R,
99
+ i(),
100
+ X
101
+ ])) : d("", !0),
102
+ i(),
103
+ e.context.attrs.identifier === "rights" && r(b).content.dataProviderInterface.annifIntegration ? (n(), a("div", z, [
104
+ K,
105
+ i(),
106
+ W
107
+ ])) : d("", !0),
108
+ i(),
109
+ e.context.attrs.identifier === "rights" ? (n(), a("div", H, [
110
+ t("div", Y, [
111
+ t("div", q, [
112
+ V(t("input", {
116
113
  ref_key: "I1",
117
- ref: f,
114
+ ref: v,
118
115
  type: "text",
119
116
  class: "conditionalSelect formkit-input formkit-inner",
120
- onClick: a[0] || (a[0] = (n) => k()),
117
+ onClick: s[0] || (s[0] = (o) => C()),
121
118
  placeholder: "Choose input method",
122
- "onUpdate:modelValue": a[1] || (a[1] = (n) => L(d) ? d.value = n : d = n)
119
+ "onUpdate:modelValue": s[1] || (s[1] = (o) => D(l) ? l.value = o : l = o)
123
120
  }, null, 512), [
124
- [M, s(d)]
121
+ [E, r(l)]
125
122
  ]),
126
- o(),
127
- s(p) ? (i(), r("div", W, [
128
- e("ul", X, [
129
- (i(!0), r(g, null, b(t.context.attrs.selection, (n, m) => (i(), r("li", {
123
+ i(),
124
+ r(p) ? (n(), a("div", G, [
125
+ t("ul", J, [
126
+ (n(!0), a(g, null, x(e.context.attrs.selection, (o, m) => (n(), a("li", {
130
127
  class: "p-2 border-b border-gray-200",
131
- onClick: a[2] || (a[2] = (y) => w(y))
132
- }, x(n), 1))), 256))
128
+ onClick: s[2] || (s[2] = (I) => w(I))
129
+ }, f(o), 1))), 256))
133
130
  ])
134
- ])) : u("", !0)
131
+ ])) : d("", !0)
135
132
  ]),
136
- o(),
137
- e("div", Y, [
138
- s(c) === "url" || t.context.node.value["@type"] === "url" ? (i(), r("div", $, [
139
- _(v, {
133
+ i(),
134
+ t("div", Q, [
135
+ r(u) === "url" || e.context.node.value["@type"] === "url" ? (n(), a("div", Z, [
136
+ _(y, {
140
137
  type: "url",
141
138
  placeholder: "Please provide a valid URL",
142
139
  name: "rdfs:label",
143
140
  validation: "url",
144
141
  class: "w-100",
145
142
  identifier: "rightsUrl",
146
- modelValue: t.context.value["rdfs:value"],
147
- "onUpdate:modelValue": a[3] || (a[3] = (n) => t.context.value["rdfs:value"] = n)
143
+ modelValue: e.context.value["rdfs:value"],
144
+ "onUpdate:modelValue": s[3] || (s[3] = (o) => e.context.value["rdfs:value"] = o)
148
145
  }, null, 8, ["modelValue"])
149
- ])) : u("", !0)
146
+ ])) : d("", !0)
150
147
  ]),
151
- o(),
152
- s(c) === "text" || t.context.value["@type"] === "text" ? (i(), r("div", q, [
153
- _(v, {
148
+ i(),
149
+ r(u) === "text" || e.context.value["@type"] === "text" ? (n(), a("div", ee, [
150
+ _(y, {
154
151
  type: "text",
155
152
  placeholder: "Please provide a Text",
156
153
  name: "rdfs:label",
157
154
  class: "w-100",
158
155
  identifier: "rightsText",
159
- modelValue: t.context.value["rdfs:value"],
160
- "onUpdate:modelValue": a[4] || (a[4] = (n) => t.context.value["rdfs:value"] = n)
156
+ modelValue: e.context.value["rdfs:value"],
157
+ "onUpdate:modelValue": s[4] || (s[4] = (o) => e.context.value["rdfs:value"] = o)
161
158
  }, null, 8, ["modelValue"])
162
- ])) : u("", !0)
159
+ ])) : d("", !0)
163
160
  ])
164
- ])) : (i(), r("div", G, [
165
- e("div", J, [
166
- e("div", Q, [
167
- I(e("input", {
161
+ ])) : (n(), a("div", te, [
162
+ t("div", oe, [
163
+ t("div", ne, [
164
+ V(t("input", {
168
165
  ref_key: "I1",
169
- ref: f,
166
+ ref: v,
170
167
  type: "text",
171
168
  class: "conditionalSelect formkit-input formkit-inner",
172
- onClick: a[5] || (a[5] = (n) => k()),
173
- placeholder: "Choose input method",
174
- "onUpdate:modelValue": a[6] || (a[6] = (n) => L(d) ? d.value = n : d = n)
175
- }, null, 512), [
176
- [M, s(d)]
169
+ onClick: s[5] || (s[5] = (o) => C()),
170
+ placeholder: e.context.attrs.placeholder,
171
+ "onUpdate:modelValue": s[6] || (s[6] = (o) => D(l) ? l.value = o : l = o)
172
+ }, null, 8, ae), [
173
+ [E, r(l)]
177
174
  ]),
178
- o(),
179
- s(p) ? (i(), r("div", Z, [
180
- e("ul", ee, [
181
- (i(!0), r(g, null, b(t.context.attrs.selection, (n, m) => (i(), r("li", {
175
+ i(),
176
+ r(p) ? (n(), a("div", ie, [
177
+ t("ul", se, [
178
+ (n(!0), a(g, null, x(e.context.attrs.selection, (o, m) => (n(), a("li", {
182
179
  class: "p-2 border-b border-gray-200",
183
- onClick: a[7] || (a[7] = (y) => w(y))
184
- }, x(n), 1))), 256))
180
+ onClick: (I) => w(o, c.$t("message.dataupload.datasets.conditional." + o))
181
+ }, f(c.$t("message.dataupload.datasets.conditional." + o)), 9, le))), 256))
185
182
  ])
186
- ])) : u("", !0)
183
+ ])) : d("", !0)
187
184
  ]),
188
- o(),
189
- e("div", te, [
190
- s(c) === "manually" || Object.keys(t.context.value).length > 0 && t.context.value["foaf:name"] && s(c) != "vocabulary" ? (i(), r("div", oe, [
191
- (i(!0), r(g, null, b(t.context.attrs.options, (n, m) => (i(), H(v, {
185
+ i(),
186
+ t("div", re, [
187
+ r(u) === "manually" || Object.keys(e.context.value).length > 0 && e.context.value["foaf:name"] && r(u) != "vocabulary" ? (n(), a("div", de, [
188
+ (n(!0), a(g, null, x(e.context.attrs.options, (o, m) => (n(), P(y, {
192
189
  type: m,
193
- placeholder: m,
194
- name: n,
190
+ placeholder: c.$t("message.dataupload.datasets.individual." + o),
191
+ name: o,
195
192
  validation: m,
196
193
  class: "w-100"
197
194
  }, null, 8, ["type", "placeholder", "name", "validation"]))), 256))
198
- ])) : u("", !0)
195
+ ])) : d("", !0)
199
196
  ]),
200
- o(),
201
- s(c) === "vocabulary" || Object.keys(t.context.value).length > 0 && t.context.value.name && s(c) != "manually" ? (i(), r("div", ne, [
202
- _(D, {
203
- context: t.context
197
+ i(),
198
+ r(u) === "vocabulary" && !e.context.value.name ? (n(), a("div", ce, [
199
+ _(U, {
200
+ context: e.context
204
201
  }, null, 8, ["context"])
205
- ])) : u("", !0)
202
+ ])) : d("", !0),
203
+ i(),
204
+ e.context.value.name ? (n(), a("div", ue, [
205
+ t("a", pe, f(e.context.value.name), 1),
206
+ i(),
207
+ t("div", {
208
+ class: "removeX",
209
+ onClick: S
210
+ })
211
+ ])) : d("", !0)
206
212
  ])
207
213
  ]))
208
214
  ]);
@@ -210,6 +216,6 @@ const E = { class: "formkitProperty" }, P = { class: "formkitHeader" }, S = {
210
216
  }
211
217
  };
212
218
  export {
213
- ce as default
219
+ xe as default
214
220
  };
215
221
  //# 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 <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 <p class=\"textInfoI\">For European Commission’s datasets, bear in mind that Decision <a\n href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\">2011/833/EU</a> allows for their\n commercial reuse\n without prior authorisation, except for the material subject to the third party intellectual property rights.\n This Decision has been implemented under the <a\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en\">Decision C(2019)\n 1655 final</a> by which Creative Commons Attribution\n 4.0 International Public License (CC BY 4.0) is adopted as an open licence for the Commission’s reuse policy.\n Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed under\n the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).\n <br><br>\n The Council and the European Court of Auditors have approved similar decisions on reuse. It is advisable that\n you check the reuse policy of your organisation before publishing or submitting your dataset.\n </p>\n </div>\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\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=\"Choose input method\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode($event)\">{{ el }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'url' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" placeholder=\"Please provide a valid URL\" name=\"rdfs:label\" validation=\"url\"\n class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" placeholder=\"Please provide a Text\" name=\"rdfs:label\" class=\"w-100\"\n identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n placeholder=\"Choose input method\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode($event)\">{{ el }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\" :placeholder=\"key\" :name=\"el\"\n :validation=\"key\" class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' || Object.keys(props.context.value).length > 0\n && props.context.value.name && selectedItem != 'manually'\" class=\"conditionalVocabulary\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst selectMode = (e) => {\n\n console.log(e.target.innerHTML);\n \n selectModeVal.value = e.target.innerHTML\n\n if (e.target.innerHTML === 'manually'|| e.target.innerHTML === 'manually') { selectedItem.value = \"manually\" }\n if (e.target.innerHTML === 'Vocabulary' || e.target.innerHTML === 'vocabulary') { selectedItem.value = \"vocabulary\" }\n if (e.target.innerHTML === 'URL' ||e.target.innerHTML === 'url') { selectedItem.value = \"url\" }\n if (e.target.innerHTML === 'Text' || e.target.innerHTML === 'text') { selectedItem.value = \"text\" }\n\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>"],"names":["env","useRuntimeEnv","props","__props","selectModeVal","ref","selectedItem","showSelect","I1","openSelect","e","selectMode","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC;AAGd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAG1B,UAAMG,IAAKH,EAAI,IAAI,GAEbI,IAAa,CAACC,MAAM;AAExB,MAAAH,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMI,IAAa,CAACD,MAAM;AAExB,cAAQ,IAAIA,EAAE,OAAO,SAAS,GAE9BN,EAAc,QAAQM,EAAE,OAAO,YAE3BA,EAAE,OAAO,cAAc,cAAaA,EAAE,OAAO,cAAc,gBAAcJ,EAAa,QAAQ,cAC9FI,EAAE,OAAO,cAAc,gBAAgBA,EAAE,OAAO,cAAc,kBAAgBJ,EAAa,QAAQ,gBACnGI,EAAE,OAAO,cAAc,SAAQA,EAAE,OAAO,cAAc,WAASJ,EAAa,QAAQ,SACpFI,EAAE,OAAO,cAAc,UAAUA,EAAE,OAAO,cAAc,YAAUJ,EAAa,QAAQ,SAE3FJ,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAU,EAAeJ,GAAI,CAAAK,MAASN,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 {{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}\n </h4>\n <div v-if=\"props.context.attrs.identifier === 'licence' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI \" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p><em>For&nbsp;<strong>European</strong>&nbsp;<strong>Commission's datasets</strong>, bear in mind\n that&nbsp;<ins>Decision 2011/833/EU</ins>&nbsp;<a\n href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833]\" target=\"_blank\"\n rel=\"nofollow noopener\">[link</a>&nbsp;] allows for their commercial reuse without prior authorisation,\n except for the material subject to the third party intellectual property rights. This Decision has been\n implemented under the&nbsp;<ins>Decision C(2019) 1655 final</ins>&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\">[link</a>&nbsp;] by which Creative Commons Attribution 4.0\n International Public License (CC BY 4.0) is adopted as an open licence for the Commission's reuse policy.\n Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed\n under the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</em></p>\n <p><em>The&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.</em></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\n </div>\n <div v-if=\"props.context.attrs.identifier === 'rights' && env.content.dataProviderInterface.annifIntegration\"\n class=\"d-flex infoLicense py-5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <p class=\"textInfoI\">As owner of your dataset, you guarantee that it does not violate the copyright, other\n intellectual property or\n privacy rights of any third party. In particular, if third party material is included in the dataset, you must\n ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.\n <br><br>\n If you need further information regarding copyright issues, please contact us at\n <a href=\"mailto:op-copyright@publications.europa.eu\">op-copyright@publications.europa.eu</a>\n </p>\n </div>\n <!-- Choice between text and URL -->\n <div class=\"formkitCmpWrap simpleConditional\" v-if=\"props.context.attrs.identifier === 'rights'\">\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n placeholder=\"Choose input method\" v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode($event)\">{{ el }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'url' || props.context.node.value['@type'] === 'url'\">\n <FormKit type=\"url\" placeholder=\"Please provide a valid URL\" name=\"rdfs:label\" validation=\"url\"\n class=\"w-100\" identifier=\"rightsUrl\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'text' || props.context.value['@type'] === 'text'\">\n <FormKit type=\"text\" placeholder=\"Please provide a Text\" name=\"rdfs:label\" class=\"w-100\"\n identifier=\"rightsText\" v-model=\"props.context.value['rdfs:value']\"></FormKit>\n </div>\n </div>\n </div>\n\n <!-- Choice between manualinput and vocabulary search -->\n <div class=\"formkitCmpWrap simpleConditional\" v-else>\n <div class=\"m-3\">\n <div class=\"conditionalSelectDiv\">\n <input ref=\"I1\" type=\"text\" class=\"conditionalSelect formkit-input formkit-inner\" @click=\"openSelect($event)\"\n :placeholder=props.context.attrs.placeholder v-model=\"selectModeVal\">\n <div v-if=\"showSelect\">\n <ul class=\"selectListConditional\">\n <li v-for=\"el, index in props.context.attrs.selection\" class=\"p-2 border-b border-gray-200 \"\n @click=\"selectMode(el, $t('message.dataupload.datasets.conditional.' + el))\">{{\n $t('message.dataupload.datasets.conditional.' + el) }}</li>\n </ul>\n </div>\n </div>\n <div class=\"conditionalManual\">\n <div class=\"d-flex\" v-if=\"selectedItem === 'manually' ||\n Object.keys(props.context.value).length > 0 && props.context.value['foaf:name']\n && selectedItem != 'vocabulary'\">\n <FormKit v-for=\"el, key in props.context.attrs.options\" :type=\"key\"\n :placeholder=\"$t('message.dataupload.datasets.individual.' + el)\" :name=\"el\" :validation=\"key\"\n class=\"w-100\"></FormKit>\n </div>\n </div>\n <div v-if=\"selectedItem === 'vocabulary' && !props.context.value['name']\" class=\"\">\n <AutocompleteInput :context=\"props.context\"></AutocompleteInput>\n </div>\n <div v-if=\"props.context.value['name']\" class=\"conditionalVocabulary d-flex\">\n <a class=\"autocompleteInputSingleValue\">{{\n props.context.value['name'] }}</a>\n <div class=\"removeX\" @click=\"removeProperty\"></div>\n\n </div>\n\n\n </div>\n\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, watchEffect } from 'vue';\nimport AutocompleteInput from './AutocompleteInput.vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\n\nlet env = useRuntimeEnv()\nconst props = defineProps({\n context: Object,\n})\nconst { t } = useI18n();\nlet selectModeVal = ref()\nlet selectedItem = ref(false)\nlet showSelect = ref(false)\n\n\n\nwatchEffect(() => {\n if (props.context.value['name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'vocabulary');\n }\n if (props.context.value['foaf:name']) {\n selectModeVal.value = t('message.dataupload.datasets.conditional.' + 'manually');\n }\n});\n\nconst I1 = ref(null)\n\nconst openSelect = (e) => {\n\n showSelect.value = !showSelect.value\n\n}\nconst removeProperty = () => {\n props.context.node.reset()\n}\nconst selectMode = (e, translatedString) => {\n selectModeVal.value = translatedString\n selectedItem.value = e\n props.context.node.reset()\n props.context.value = \"\"\n}\n\nonClickOutside(I1, event => showSelect.value = false)\n\n</script>\n<style>\n.conditionalManual {\n .formkit-outer {\n width: 100%;\n }\n}\n\n.hover {\n text-decoration: underline;\n}\n\n.conditionalVocabulary {\n display: flex;\n align-items: center;\n margin: 1rem 0;\n}\n\n.w-80 {\n width: 80%;\n}\n\n.infoLicense {\n a {\n color: blue;\n }\n\n padding: 1rem;\n background-color: rgb(171, 225, 165)\n}\n\n.infoboxI {\n width: 5%;\n}\n\n.textInfoI {\n width: 95%;\n}\n</style>"],"names":["env","useRuntimeEnv","props","__props","t","useI18n","selectModeVal","ref","selectedItem","showSelect","watchEffect","I1","openSelect","e","removeProperty","selectMode","translatedString","onClickOutside","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HA,QAAIA,IAAMC,EAAe;AACzB,UAAMC,IAAQC,GAGR,EAAE,GAAAC,EAAC,IAAKC;AACd,QAAIC,IAAgBC,EAAK,GACrBC,IAAeD,EAAI,EAAK,GACxBE,IAAaF,EAAI,EAAK;AAI1B,IAAAG,EAAY,MAAM;AAChB,MAAIR,EAAM,QAAQ,MAAM,SACtBI,EAAc,QAAQF,EAAE,oDAAyD,IAE/EF,EAAM,QAAQ,MAAM,WAAW,MACjCI,EAAc,QAAQF,EAAE,kDAAuD;AAAA,IAEnF,CAAC;AAED,UAAMO,IAAKJ,EAAI,IAAI,GAEbK,IAAa,CAACC,MAAM;AAExB,MAAAJ,EAAW,QAAQ,CAACA,EAAW;AAAA,IAEjC,GACMK,IAAiB,MAAM;AAC3B,MAAAZ,EAAM,QAAQ,KAAK,MAAO;AAAA,IAC5B,GACMa,IAAa,CAACF,GAAGG,MAAqB;AAC1C,MAAAV,EAAc,QAAQU,GACtBR,EAAa,QAAQK,GACrBX,EAAM,QAAQ,KAAK,MAAO,GAC1BA,EAAM,QAAQ,QAAQ;AAAA,IACxB;AAEA,WAAAe,EAAeN,GAAI,CAAAO,MAAST,EAAW,QAAQ,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}