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