@piveau/piveau-hub-ui-modules 4.2.0 → 4.3.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.
@@ -1,12 +1,12 @@
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";
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";
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";
5
5
  import "./ConditionalInput.vue2.mjs";
6
- const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
6
+ const E = { class: "formkitProperty" }, P = { class: "formkitHeader" }, S = {
7
7
  key: 0,
8
8
  class: "d-flex infoLicense py-5"
9
- }, H = /* @__PURE__ */ e("svg", {
9
+ }, B = /* @__PURE__ */ e("svg", {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: "30px",
12
12
  height: "30px",
@@ -52,14 +52,15 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
52
52
  /* @__PURE__ */ o(),
53
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
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
55
+ /* @__PURE__ */ o(`As owner of your dataset, you guarantee that it does not violate the copyright, other
56
+ intellectual property or
56
57
  privacy rights of any third party. In particular, if third party material is included in the dataset, you must
57
58
  ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if necessary.
58
59
  `),
59
60
  /* @__PURE__ */ e("br"),
60
61
  /* @__PURE__ */ e("br"),
61
62
  /* @__PURE__ */ o(`
62
- If you need further information regarding copyright issues, please contact us at
63
+ If you need further information regarding copyright issues, please contact us at
63
64
  `),
64
65
  /* @__PURE__ */ e("a", { href: "mailto:op-copyright@publications.europa.eu" }, "op-copyright@publications.europa.eu")
65
66
  ], -1), R = {
@@ -82,33 +83,33 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
82
83
  props: {
83
84
  context: Object
84
85
  },
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) => {
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) => {
90
91
  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 = "";
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 = "";
93
94
  };
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),
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),
98
99
  o(),
99
- t.context.attrs.identifier === "licence" && r(C).content.dataProviderInterface.annifIntegration ? (i(), l("div", B, [
100
- H,
100
+ t.context.attrs.identifier === "licence" && s(C).content.dataProviderInterface.annifIntegration ? (i(), r("div", S, [
101
+ B,
101
102
  o(),
102
103
  N
103
104
  ])) : u("", !0),
104
105
  o(),
105
- t.context.attrs.identifier === "rights" && r(C).content.dataProviderInterface.annifIntegration ? (i(), l("div", j, [
106
+ t.context.attrs.identifier === "rights" && s(C).content.dataProviderInterface.annifIntegration ? (i(), r("div", j, [
106
107
  F,
107
108
  o(),
108
109
  O
109
110
  ])) : u("", !0),
110
111
  o(),
111
- t.context.attrs.identifier === "rights" ? (i(), l("div", R, [
112
+ t.context.attrs.identifier === "rights" ? (i(), r("div", R, [
112
113
  e("div", z, [
113
114
  e("div", K, [
114
115
  I(e("input", {
@@ -118,14 +119,14 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
118
119
  class: "conditionalSelect formkit-input formkit-inner",
119
120
  onClick: a[0] || (a[0] = (n) => k()),
120
121
  placeholder: "Choose input method",
121
- "onUpdate:modelValue": a[1] || (a[1] = (n) => M(c) ? c.value = n : c = n)
122
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => L(d) ? d.value = n : d = n)
122
123
  }, null, 512), [
123
- [V, r(c)]
124
+ [M, s(d)]
124
125
  ]),
125
126
  o(),
126
- r(p) ? (i(), l("div", W, [
127
+ s(p) ? (i(), r("div", W, [
127
128
  e("ul", X, [
128
- (i(!0), l(b, null, _(t.context.attrs.selection, (n, m) => (i(), l("li", {
129
+ (i(!0), r(g, null, b(t.context.attrs.selection, (n, m) => (i(), r("li", {
129
130
  class: "p-2 border-b border-gray-200",
130
131
  onClick: a[2] || (a[2] = (y) => w(y))
131
132
  }, x(n), 1))), 256))
@@ -134,8 +135,8 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
134
135
  ]),
135
136
  o(),
136
137
  e("div", Y, [
137
- r(s) === "url" || t.context.node.value["@type"] === "url" ? (i(), l("div", $, [
138
- g(v, {
138
+ s(c) === "url" || t.context.node.value["@type"] === "url" ? (i(), r("div", $, [
139
+ _(v, {
139
140
  type: "url",
140
141
  placeholder: "Please provide a valid URL",
141
142
  name: "rdfs:label",
@@ -148,8 +149,8 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
148
149
  ])) : u("", !0)
149
150
  ]),
150
151
  o(),
151
- r(s) === "text" || t.context.value["@type"] === "text" ? (i(), l("div", q, [
152
- g(v, {
152
+ s(c) === "text" || t.context.value["@type"] === "text" ? (i(), r("div", q, [
153
+ _(v, {
153
154
  type: "text",
154
155
  placeholder: "Please provide a Text",
155
156
  name: "rdfs:label",
@@ -160,7 +161,7 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
160
161
  }, null, 8, ["modelValue"])
161
162
  ])) : u("", !0)
162
163
  ])
163
- ])) : (i(), l("div", G, [
164
+ ])) : (i(), r("div", G, [
164
165
  e("div", J, [
165
166
  e("div", Q, [
166
167
  I(e("input", {
@@ -170,14 +171,14 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
170
171
  class: "conditionalSelect formkit-input formkit-inner",
171
172
  onClick: a[5] || (a[5] = (n) => k()),
172
173
  placeholder: "Choose input method",
173
- "onUpdate:modelValue": a[6] || (a[6] = (n) => M(c) ? c.value = n : c = n)
174
+ "onUpdate:modelValue": a[6] || (a[6] = (n) => L(d) ? d.value = n : d = n)
174
175
  }, null, 512), [
175
- [V, r(c)]
176
+ [M, s(d)]
176
177
  ]),
177
178
  o(),
178
- r(p) ? (i(), l("div", Z, [
179
+ s(p) ? (i(), r("div", Z, [
179
180
  e("ul", ee, [
180
- (i(!0), l(b, null, _(t.context.attrs.selection, (n, m) => (i(), l("li", {
181
+ (i(!0), r(g, null, b(t.context.attrs.selection, (n, m) => (i(), r("li", {
181
182
  class: "p-2 border-b border-gray-200",
182
183
  onClick: a[7] || (a[7] = (y) => w(y))
183
184
  }, x(n), 1))), 256))
@@ -186,8 +187,8 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
186
187
  ]),
187
188
  o(),
188
189
  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, {
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, {
191
192
  type: m,
192
193
  placeholder: m,
193
194
  name: n,
@@ -197,8 +198,8 @@ const P = { class: "formkitProperty" }, S = { class: "formkitHeader" }, B = {
197
198
  ])) : u("", !0)
198
199
  ]),
199
200
  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, {
201
+ s(c) === "vocabulary" || Object.keys(t.context.value).length > 0 && t.context.value.name && s(c) != "manually" ? (i(), r("div", ne, [
202
+ _(D, {
202
203
  context: t.context
203
204
  }, null, 8, ["context"])
204
205
  ])) : u("", !0)
@@ -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 <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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ context?: Record<string, any> | undefined;
3
+ $props: {
4
+ readonly context?: Record<string, any> | undefined;
5
+ };
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
7
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { openBlock as s, createElementBlock as p, createVNode as r, unref as a, isRef as c } from "vue";
2
+ import { FormKit as d } from "@formkit/vue";
3
+ const u = { class: "formkitProperty w-100" }, U = {
4
+ __name: "SimpleAccessURLInput",
5
+ props: {
6
+ context: Object
7
+ },
8
+ setup(i) {
9
+ const e = i;
10
+ let t;
11
+ const n = async () => {
12
+ this.URLValue.includes("http://") || this.URLValue.includes("https://") ? await this.context.node.input({ "@id": this.URLValue }) : await this.context.node.input({ "@id": "https://" + this.URLValue });
13
+ };
14
+ return (h, l) => (s(), p("div", u, [
15
+ r(a(d), {
16
+ id: "aUrlLink",
17
+ modelValue: a(t),
18
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => c(t) ? t.value = o : t = o),
19
+ class: "selectInputField formkit-inner",
20
+ type: "url",
21
+ name: "@id",
22
+ help: e.context.help,
23
+ placeholder: e.context.attrs.placeholder,
24
+ validation: e.context.attrs.validationType,
25
+ onInput: n
26
+ }, null, 8, ["modelValue", "help", "placeholder", "validation"])
27
+ ]));
28
+ }
29
+ };
30
+ export {
31
+ U as default
32
+ };
33
+ //# sourceMappingURL=SimpleAccessURLInput.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleAccessURLInput.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleAccessURLInput.vue"],"sourcesContent":["<script setup>\n\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps({\n context: Object\n})\n\nlet URLValue\n\nconst saveUrl = async () => {\n\n if (this.URLValue.includes('http://') || this.URLValue.includes('https://')) {\n await this.context.node.input({ '@id': this.URLValue})\n }\n else await this.context.node.input({ '@id': 'https://' + this.URLValue })\n\n}\n</script>\n<template>\n <div class=\"formkitProperty w-100\">\n <FormKit id=\"aUrlLink\" v-model=\"URLValue\" class=\"selectInputField formkit-inner\" type=\"url\" name=\"@id\"\n :help=\"props.context.help\" :placeholder=\"props.context.attrs.placeholder\"\n :validation=\"props.context.attrs.validationType\" @input=\"saveUrl\" />\n </div>\n</template>\n<style></style>"],"names":["props","__props","URLValue","saveUrl"],"mappings":";;;;;;;;AAIA,UAAMA,IAAQC;AAId,QAAIC;AAEJ,UAAMC,IAAU,YAAY;AAExB,MAAI,KAAK,SAAS,SAAS,SAAS,KAAK,KAAK,SAAS,SAAS,UAAU,IACtE,MAAM,KAAK,QAAQ,KAAK,MAAM,EAAE,OAAO,KAAK,SAAQ,CAAC,IAEpD,MAAM,KAAK,QAAQ,KAAK,MAAM,EAAE,OAAO,aAAa,KAAK,UAAU;AAAA,IAE5E;;;;;;;;;;;;;;;;;"}
@@ -1872,45 +1872,43 @@ const t = {
1872
1872
  mandatory: !0,
1873
1873
  minimum: 1,
1874
1874
  children: [
1875
- {
1876
- identifier: "titleLabel",
1877
- $formkit: "text",
1878
- name: "@value",
1879
- validation: "required"
1880
- },
1881
1875
  {
1882
1876
  identifier: "language",
1883
1877
  value: "en",
1884
1878
  $formkit: "select",
1885
1879
  validation: "required",
1886
1880
  options: e,
1887
- name: "@language"
1881
+ name: "@language",
1882
+ classes: {
1883
+ outer: "w25-textfield"
1884
+ }
1885
+ },
1886
+ {
1887
+ identifier: "title",
1888
+ $formkit: "text",
1889
+ name: "@value",
1890
+ validation: "required",
1891
+ mandatory: !0,
1892
+ classes: {
1893
+ outer: "w75-textfield"
1894
+ }
1888
1895
  }
1889
1896
  ]
1890
1897
  }
1891
1898
  ]
1892
1899
  },
1893
1900
  description: {
1894
- identifier: "datasetDescription",
1901
+ identifier: "description",
1895
1902
  $formkit: "repeatable",
1896
1903
  name: "dct:description",
1897
1904
  children: [
1898
1905
  {
1899
- identifier: "datasetDescription",
1906
+ identifier: "description",
1900
1907
  $formkit: "group",
1901
1908
  name: "dct:description",
1902
1909
  mandatory: !0,
1903
1910
  minimum: 1,
1904
1911
  children: [
1905
- {
1906
- identifier: "description",
1907
- $formkit: "textarea",
1908
- name: "@value",
1909
- validation: "required",
1910
- classes: {
1911
- outer: "w25-textfield"
1912
- }
1913
- },
1914
1912
  {
1915
1913
  identifier: "language",
1916
1914
  value: "en",
@@ -1919,7 +1917,16 @@ const t = {
1919
1917
  validation: "required",
1920
1918
  name: "@language",
1921
1919
  classes: {
1922
- outer: "w75-descField"
1920
+ outer: "w25-descField"
1921
+ }
1922
+ },
1923
+ {
1924
+ identifier: "description",
1925
+ $formkit: "textarea",
1926
+ name: "@value",
1927
+ validation: "required",
1928
+ classes: {
1929
+ outer: "w75-textfield"
1923
1930
  }
1924
1931
  }
1925
1932
  ]
@@ -1927,11 +1934,12 @@ const t = {
1927
1934
  ]
1928
1935
  },
1929
1936
  publisher: {
1930
- $formkit: "auto",
1937
+ $formkit: "simpleConditional",
1931
1938
  identifier: "publisher",
1932
1939
  name: "dct:publisher",
1933
1940
  voc: "corporate-body",
1934
- id: "publisher"
1941
+ options: { text: "foaf:name", email: "foaf:mbox", url: "foaf:homepage" },
1942
+ selection: { 1: "vocabulary", 2: "manually" }
1935
1943
  },
1936
1944
  language: {
1937
1945
  identifier: "language",
@@ -1963,7 +1971,7 @@ const t = {
1963
1971
  },
1964
1972
  homepage: {
1965
1973
  identifier: "homepage",
1966
- $formkit: "url",
1974
+ $formkit: "simpleInput",
1967
1975
  name: "foaf:homepage",
1968
1976
  validation: "optional|url"
1969
1977
  },
@@ -1981,7 +1989,10 @@ const t = {
1981
1989
  identifier: "hasPartURL",
1982
1990
  $formkit: "url",
1983
1991
  name: "@id",
1984
- validation: "optional|url"
1992
+ validationType: "url",
1993
+ classes: {
1994
+ outer: "w100-textfield"
1995
+ }
1985
1996
  }
1986
1997
  ]
1987
1998
  }
@@ -1989,41 +2000,43 @@ const t = {
1989
2000
  },
1990
2001
  isPartOf: {
1991
2002
  identifier: "isPartOf",
2003
+ $formkit: "simpleInput",
1992
2004
  name: "dct:isPartOf",
1993
- $formkit: "url",
1994
- validation: "optional|url"
2005
+ validationType: "url"
1995
2006
  },
1996
2007
  rights: {
1997
2008
  identifier: "rights",
1998
- $formkit: "group",
2009
+ $formkit: "simpleConditional",
1999
2010
  name: "dct:rights",
2000
- children: [
2001
- {
2002
- identifier: "rights",
2003
- $formkit: "select",
2004
- name: "@type",
2005
- options: { url: "Provide an URL", str: "String" },
2006
- id: "rightsModeCatalogue"
2007
- },
2008
- {
2009
- identifier: "rights",
2010
- $cmp: "FormKit",
2011
- if: "$get(rightsModeCatalogue).value",
2012
- props: {
2013
- if: "$get(rightsModeCatalogue).value === url",
2014
- then: {
2015
- identifier: "rightsUrl",
2016
- type: "url",
2017
- label: "URL",
2018
- name: "rdfs:label"
2019
- },
2020
- else: {
2021
- type: "text",
2022
- name: "rdfs:label"
2023
- }
2024
- }
2025
- }
2026
- ]
2011
+ options: { url: "rdfs:label", text: "rdfs:label" },
2012
+ selection: { 1: "URL", 2: "Text" }
2013
+ // children: [
2014
+ // {
2015
+ // identifier: 'rights',
2016
+ // $formkit: "select",
2017
+ // name: '@type',
2018
+ // options: { url: 'Provide an URL', str: 'String' },
2019
+ // id: "rightsModeCatalogue"
2020
+ // },
2021
+ // {
2022
+ // identifier: 'rights',
2023
+ // $cmp: "FormKit",
2024
+ // if: "$get(rightsModeCatalogue).value",
2025
+ // props: {
2026
+ // if: "$get(rightsModeCatalogue).value === url",
2027
+ // then: {
2028
+ // identifier: 'rightsUrl',
2029
+ // type: "url",
2030
+ // label: "URL",
2031
+ // name: 'rdfs:label',
2032
+ // },
2033
+ // else: {
2034
+ // type: "text",
2035
+ // name: 'rdfs:label',
2036
+ // }
2037
+ // }
2038
+ // }
2039
+ // ]
2027
2040
  },
2028
2041
  catalog: {
2029
2042
  identifier: "catalog",
@@ -2038,8 +2051,11 @@ const t = {
2038
2051
  {
2039
2052
  identifier: "catalogURL",
2040
2053
  $formkit: "url",
2041
- validation: "optional|url",
2042
- name: "@id"
2054
+ validationType: "url",
2055
+ name: "@id",
2056
+ classes: {
2057
+ outer: "w100-textfield"
2058
+ }
2043
2059
  }
2044
2060
  ]
2045
2061
  }
@@ -2047,7 +2063,7 @@ const t = {
2047
2063
  },
2048
2064
  creator: {
2049
2065
  identifier: "creator",
2050
- $formkit: "group",
2066
+ $formkit: "formkitGroup",
2051
2067
  name: "dct:creator",
2052
2068
  children: [
2053
2069
  {
@@ -2058,24 +2074,36 @@ const t = {
2058
2074
  "": "---",
2059
2075
  "foaf:Person": "Person",
2060
2076
  "foaf:Organization": "Organization"
2077
+ },
2078
+ classes: {
2079
+ outer: "w100-textfield"
2061
2080
  }
2062
2081
  },
2063
2082
  {
2064
2083
  identifier: "creatorName",
2065
2084
  $formkit: "text",
2066
- name: "foaf:name"
2085
+ name: "foaf:name",
2086
+ classes: {
2087
+ outer: "w100-textfield"
2088
+ }
2067
2089
  },
2068
2090
  {
2069
2091
  identifier: "creatorEmail",
2070
2092
  $formkit: "email",
2071
2093
  name: "foaf:mbox",
2072
- validation: "optional|email"
2094
+ validation: "optional|email",
2095
+ classes: {
2096
+ outer: "w100-textfield"
2097
+ }
2073
2098
  },
2074
2099
  {
2075
2100
  identifier: "creatorHomepage",
2076
2101
  $formkit: "url",
2077
2102
  name: "foaf:homepage",
2078
- validation: "optional|url"
2103
+ validation: "optional|url",
2104
+ classes: {
2105
+ outer: "w100-textfield"
2106
+ }
2079
2107
  }
2080
2108
  ]
2081
2109
  }