@piveau/piveau-hub-ui-modules 4.4.27 → 4.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +319 -0
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +43 -51
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.d.ts +319 -0
- package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +319 -0
- package/dist/data-provider-interface/views/OverviewPage.vue.mjs +66 -58
- package/dist/data-provider-interface/views/OverviewPage.vue.mjs.map +1 -1
- package/dist/form/Repeatable.vue.mjs +34 -34
- package/dist/form/Repeatable.vue.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mapGetters as
|
|
3
|
-
import
|
|
1
|
+
import w from "axios";
|
|
2
|
+
import { mapGetters as u, mapActions as y } from "vuex";
|
|
3
|
+
import b from "../components/LanguageSelector.vue.mjs";
|
|
4
4
|
import x from "./OverviewPage/DatasetOverview.vue.mjs";
|
|
5
5
|
import C from "./OverviewPage/CatalogueOverview.vue.mjs";
|
|
6
|
-
import { useIntersectionObserver as
|
|
7
|
-
import { useTemplateRef as k, ref as D, resolveComponent as
|
|
6
|
+
import { useIntersectionObserver as I } from "../../external/@vueuse/core/index";
|
|
7
|
+
import { getCurrentInstance as _, useTemplateRef as k, ref as D, resolveComponent as l, openBlock as o, createElementBlock as r, Fragment as L, createElementVNode as s, createTextVNode as n, toDisplayString as O, createVNode as V, createBlock as v, createCommentVNode as c, createStaticVNode as A } from "vue";
|
|
8
8
|
import "./OverviewPage.vue2.mjs";
|
|
9
|
-
import
|
|
10
|
-
const
|
|
9
|
+
import E from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
10
|
+
const P = {
|
|
11
11
|
components: {
|
|
12
|
-
LanguageSelector:
|
|
12
|
+
LanguageSelector: b,
|
|
13
13
|
DatasetOverview: x,
|
|
14
14
|
CatalogueOverview: C
|
|
15
15
|
},
|
|
@@ -22,16 +22,17 @@ const E = {
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
data() {
|
|
25
|
-
var
|
|
25
|
+
var a;
|
|
26
26
|
return {
|
|
27
|
-
|
|
27
|
+
instance: _().appContext.app.config.globalProperties.$env,
|
|
28
|
+
dpiLocale: ((a = this.$route.query) == null ? void 0 : a.locale) || this.$i18n.locale || this.$i18n.fallbackLocale || "en"
|
|
28
29
|
};
|
|
29
30
|
},
|
|
30
31
|
computed: {
|
|
31
|
-
...
|
|
32
|
+
...u("auth", [
|
|
32
33
|
"getIsEditMode"
|
|
33
34
|
]),
|
|
34
|
-
...
|
|
35
|
+
...u("dpiStore", [
|
|
35
36
|
"getData"
|
|
36
37
|
]),
|
|
37
38
|
showDatasetsOverview() {
|
|
@@ -42,7 +43,7 @@ const E = {
|
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
45
|
methods: {
|
|
45
|
-
...
|
|
46
|
+
...y("dpiStore", [
|
|
46
47
|
"clearAll",
|
|
47
48
|
"saveLocalstorageValues"
|
|
48
49
|
]),
|
|
@@ -96,12 +97,12 @@ const E = {
|
|
|
96
97
|
// });
|
|
97
98
|
// }
|
|
98
99
|
// },
|
|
99
|
-
checkID(
|
|
100
|
-
this.getIsEditMode || this.checkUniqueID(
|
|
100
|
+
checkID(a) {
|
|
101
|
+
this.getIsEditMode || this.checkUniqueID(a).then((e) => {
|
|
101
102
|
e || this.$router.push({
|
|
102
103
|
name: "DataProviderInterface-Input",
|
|
103
104
|
params: {
|
|
104
|
-
property:
|
|
105
|
+
property: a,
|
|
105
106
|
page: "step1"
|
|
106
107
|
},
|
|
107
108
|
query: {
|
|
@@ -111,11 +112,11 @@ const E = {
|
|
|
111
112
|
});
|
|
112
113
|
});
|
|
113
114
|
},
|
|
114
|
-
checkUniqueID(
|
|
115
|
+
checkUniqueID(a) {
|
|
115
116
|
return new Promise((e) => {
|
|
116
|
-
if (this.getData(
|
|
117
|
-
const i = `${this.$env.api.hubUrl}${
|
|
118
|
-
|
|
117
|
+
if (this.getData(a)["@id"] !== "") {
|
|
118
|
+
const i = `${this.$env.api.hubUrl}${a}/${this.getData(a)["@id"]}?useNormalizedId=true`;
|
|
119
|
+
w.head(i).then(() => {
|
|
119
120
|
e(!1);
|
|
120
121
|
}).catch(() => {
|
|
121
122
|
e(!0);
|
|
@@ -130,9 +131,9 @@ const E = {
|
|
|
130
131
|
});
|
|
131
132
|
},
|
|
132
133
|
setup() {
|
|
133
|
-
const
|
|
134
|
-
return
|
|
135
|
-
|
|
134
|
+
const a = k("overview-page"), e = D(!1);
|
|
135
|
+
return I(
|
|
136
|
+
a,
|
|
136
137
|
([{ isIntersecting: i }]) => {
|
|
137
138
|
e.value = i;
|
|
138
139
|
},
|
|
@@ -141,70 +142,77 @@ const E = {
|
|
|
141
142
|
}
|
|
142
143
|
), { overviewPageIsVisible: e };
|
|
143
144
|
}
|
|
144
|
-
},
|
|
145
|
+
}, S = {
|
|
145
146
|
ref: "overview-page",
|
|
146
147
|
class: "col-12"
|
|
147
|
-
},
|
|
148
|
+
}, M = { class: "mt-5 mb-0" }, N = { class: "row" }, T = { class: "col-10" }, q = {
|
|
148
149
|
key: 0,
|
|
149
150
|
class: "mb-3"
|
|
150
|
-
},
|
|
151
|
+
}, B = {
|
|
151
152
|
key: 1,
|
|
152
153
|
class: "mb-3"
|
|
154
|
+
}, U = {
|
|
155
|
+
key: 0,
|
|
156
|
+
class: "legalnotice py-5",
|
|
157
|
+
style: { width: "90%", margin: "0 auto" }
|
|
153
158
|
};
|
|
154
|
-
function
|
|
155
|
-
const
|
|
156
|
-
return o(),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
function $(a, e, i, p, t, d) {
|
|
160
|
+
const m = l("LanguageSelector"), h = l("DatasetOverview"), g = l("CatalogueOverview");
|
|
161
|
+
return o(), r(L, null, [
|
|
162
|
+
s("div", S, [
|
|
163
|
+
s("div", M, [
|
|
164
|
+
s("div", N, [
|
|
165
|
+
s("div", T, [
|
|
166
|
+
n(O(a.$t("message.dataupload.info.selectDisplayLanguage")) + `:
|
|
162
167
|
`, 1),
|
|
163
|
-
|
|
168
|
+
V(m, {
|
|
164
169
|
class: "ml-1",
|
|
165
|
-
modelValue:
|
|
166
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
170
|
+
modelValue: t.dpiLocale,
|
|
171
|
+
"onUpdate:modelValue": e[0] || (e[0] = (f) => t.dpiLocale = f)
|
|
167
172
|
}, null, 8, ["modelValue"])
|
|
168
173
|
])
|
|
169
174
|
])
|
|
170
175
|
]),
|
|
171
|
-
e[1] || (e[1] =
|
|
172
|
-
d.showDatasetsOverview &&
|
|
173
|
-
(o(),
|
|
174
|
-
dpiLocale:
|
|
175
|
-
key:
|
|
176
|
+
e[1] || (e[1] = n()),
|
|
177
|
+
d.showDatasetsOverview && p.overviewPageIsVisible ? (o(), r("div", q, [
|
|
178
|
+
(o(), v(h, {
|
|
179
|
+
dpiLocale: t.dpiLocale,
|
|
180
|
+
key: t.dpiLocale
|
|
176
181
|
}, null, 8, ["dpiLocale"]))
|
|
177
|
-
])) :
|
|
178
|
-
e[2] || (e[2] =
|
|
179
|
-
d.showCatalogsOverview &&
|
|
180
|
-
(o(),
|
|
181
|
-
dpiLocale:
|
|
182
|
-
key:
|
|
182
|
+
])) : c("", !0),
|
|
183
|
+
e[2] || (e[2] = n()),
|
|
184
|
+
d.showCatalogsOverview && p.overviewPageIsVisible ? (o(), r("div", B, [
|
|
185
|
+
(o(), v(g, {
|
|
186
|
+
dpiLocale: t.dpiLocale,
|
|
187
|
+
key: t.dpiLocale
|
|
183
188
|
}, null, 8, ["dpiLocale"]))
|
|
184
|
-
])) :
|
|
189
|
+
])) : c("", !0)
|
|
185
190
|
], 512),
|
|
186
|
-
e[
|
|
191
|
+
e[4] || (e[4] = n()),
|
|
192
|
+
t.instance.content.dataProviderInterface.annifIntegration ? (o(), r("div", U, e[3] || (e[3] = [
|
|
193
|
+
A(`<div class="d-flex align-items-start" data-v-a416ae97><svg xmlns="http://www.w3.org/2000/svg" width="30px" height="30px" fill="currentColor" class="bi bi-info-circle mx-3 mb-3 mt-1 infoboxI" viewBox="0 0 16 16" data-v-a416ae97><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" data-v-a416ae97></path> <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" data-v-a416ae97></path></svg> <div class="w-80" data-v-a416ae97><p data-v-a416ae97>For <strong data-v-a416ae97>European</strong> <strong data-v-a416ae97>Commission's datasets</strong>, bear in mind that <a class="external-link" href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833" target="_blank" rel="nofollow noopener" data-v-a416ae97><ins data-v-a416ae97>Decision 2011/833/EU</ins></a> allows for their commercial
|
|
187
194
|
reuse
|
|
188
195
|
without prior authorisation, except for the material subject to the third party intellectual property rights.
|
|
189
196
|
This
|
|
190
|
-
Decision has been implemented under the <a class="external-link" href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en" target="_blank" rel="nofollow noopener" data-v-
|
|
197
|
+
Decision has been implemented under the <a class="external-link" href="https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en" target="_blank" rel="nofollow noopener" data-v-a416ae97><ins data-v-a416ae97>Decision C(2019) 1655 final</ins></a> by which Creative Commons
|
|
191
198
|
Attribution 4.0
|
|
192
199
|
International Public License (CC BY 4.0) is adopted as an open licence for the Commission's reuse policy.
|
|
193
200
|
Additionally, raw data, metadata or other documents of comparable nature may alternatively be distributed
|
|
194
201
|
under
|
|
195
|
-
the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</p> <p data-v-
|
|
196
|
-
approved similar decisions on reuse. It is advisable that you check <strong data-v-
|
|
197
|
-
organisation</strong> before publishing or submitting your dataset.</p></div></div> <div class="d-flex align-items-start mt-4" data-v-
|
|
202
|
+
the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</p> <p data-v-a416ae97>The <strong data-v-a416ae97>Council</strong> and the <strong data-v-a416ae97>European Court of Auditors</strong> have
|
|
203
|
+
approved similar decisions on reuse. It is advisable that you check <strong data-v-a416ae97>the reuse policy of your
|
|
204
|
+
organisation</strong> before publishing or submitting your dataset.</p></div></div> <div class="d-flex align-items-start mt-4" data-v-a416ae97><svg xmlns="http://www.w3.org/2000/svg" width="30px" height="30px" fill="currentColor" class="bi bi-info-circle mx-3 mb-3 mt-1 infoboxI" viewBox="0 0 16 16" data-v-a416ae97><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" data-v-a416ae97></path> <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" data-v-a416ae97></path></svg> <div class="w-80" data-v-a416ae97><p data-v-a416ae97>As owner of your dataset, you guarantee that it does not violate the copyright, other intellectual property
|
|
198
205
|
or
|
|
199
206
|
privacy rights of any third party. In particular, if third party material is included in the dataset, you must
|
|
200
207
|
ensure that all necessary permissions have been obtained and appropriate acknowledgment is given, if
|
|
201
208
|
necessary.
|
|
202
|
-
</p> <p data-v-
|
|
203
|
-
at <span class="nobr" data-v-
|
|
209
|
+
</p> <p data-v-a416ae97>If you need further information regarding <strong data-v-a416ae97>licenses or copyright</strong> issues, please contact us
|
|
210
|
+
at <span class="nobr" data-v-a416ae97><a class="external-link" href="mailto:op-copyright@publications.europa.eu" target="_blank" rel="nofollow noopener" data-v-a416ae97>op-copyright@publications.europa.eu</a></span></p></div></div>`, 3)
|
|
211
|
+
]))) : c("", !0)
|
|
204
212
|
], 64);
|
|
205
213
|
}
|
|
206
|
-
const
|
|
214
|
+
const K = /* @__PURE__ */ E(P, [["render", $], ["__scopeId", "data-v-a416ae97"]]);
|
|
207
215
|
export {
|
|
208
|
-
|
|
216
|
+
K as default
|
|
209
217
|
};
|
|
210
218
|
//# sourceMappingURL=OverviewPage.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverviewPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/OverviewPage.vue"],"sourcesContent":["<template>\n <div ref=\"overview-page\" class=\"col-12\">\n <!-- LANGUAGE SELECTOR -->\n <div class=\"mt-5 mb-0\">\n <div class=\"row\">\n <div class=\"col-10 \">\n {{ $t('message.dataupload.info.selectDisplayLanguage') }}:\n <LanguageSelector class=\"ml-1\" v-model=\"dpiLocale\"></LanguageSelector>\n </div>\n </div>\n </div>\n <div class=\"mb-3\" v-if=\"showDatasetsOverview && overviewPageIsVisible\">\n <DatasetOverview :dpiLocale=\"dpiLocale\" :key=\"dpiLocale\" />\n </div>\n <div class=\"mb-3\" v-if=\"showCatalogsOverview && overviewPageIsVisible\">\n <CatalogueOverview :dpiLocale=\"dpiLocale\" :key=\"dpiLocale\" />\n </div>\n </div>\n\n <div class=\"legalnotice py-5\" style=\"width: 90%; margin: 0 auto;\">\n <div class=\"d-flex align-items-start\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind that <a\n class=\"external-link\" href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision 2011/833/EU</ins></a> allows for their commercial\n reuse\n without prior authorisation, except for the material subject to the third party intellectual property rights.\n This\n Decision has been implemented under the <a class=\"external-link\"\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a> by which Creative Commons\n 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\n the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</p>\n <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have\n approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your\n organisation</strong> before publishing or submitting your dataset.</p>\n </div>\n </div>\n <!-- <p> </p>\n <hr />\n <p> </p> -->\n\n <div class=\"d-flex align-items-start mt-4\">\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>As owner of your dataset, you guarantee that it does not violate the copyright, other intellectual property\n 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\n necessary.\n </p>\n <p>If you need further information regarding <strong>licenses or copyright</strong> issues, please contact us\n at <span class=\"nobr\"><a class=\"external-link\" href=\"mailto:op-copyright@publications.europa.eu\"\n target=\"_blank\" rel=\"nofollow noopener\">op-copyright@publications.europa.eu</a></span></p>\n </div>\n </div>\n </div>\n\n</template>\n\n<script>\n/* eslint-disable no-restricted-syntax,guard-for-in */\nimport axios from 'axios';\nimport { mapActions, mapGetters } from 'vuex';\n\nimport LanguageSelector from '../components/LanguageSelector';\nimport DatasetOverview from './OverviewPage/DatasetOverview.vue';\nimport CatalogueOverview from './OverviewPage/CatalogueOverview.vue';\n\nimport { useIntersectionObserver } from '@vueuse/core'\nimport { ref, useTemplateRef } from 'vue'\n\nexport default {\n components: {\n LanguageSelector,\n DatasetOverview,\n CatalogueOverview,\n },\n props: {\n property: {\n type: String\n },\n context: {\n type: Object,\n },\n },\n data() {\n return {\n dpiLocale: this.$route.query?.locale || this.$i18n.locale || this.$i18n.fallbackLocale || 'en',\n }\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n ...mapGetters('dpiStore', [\n 'getData',\n ]),\n showDatasetsOverview() {\n return this.property === 'datasets';\n },\n showCatalogsOverview() {\n return this.property === 'catalogues';\n }\n },\n methods: {\n ...mapActions('dpiStore', [\n 'clearAll',\n 'saveLocalstorageValues',\n ]),\n clear() {\n this.clearAll();\n },\n /*** Overview Page checker functionality ***/\n // checkDatasetMandatory() {\n // if (!JSON.parse(localStorage.getItem('dpi_mandatory'))['datasets']) {\n // this.$router.push({ \n // name: 'DataProviderInterface-Input', \n // params: { \n // property: 'datasets', \n // page: 'step1' \n // }, \n // query: { \n // error: 'mandatoryDataset', \n // locale: this.$route.query.locale \n // } \n // });\n // }\n // },\n // checkDistributionMandatory() {\n // if (!JSON.parse(localStorage.getItem('dpi_mandatory'))['distributions'].length > 0 && !JSON.parse(localStorage.getItem('dpi_mandatory'))['distributions'].every(el => el === true)) {\n // this.$router.push({\n // name: 'DataProviderInterface-Input',\n // path: '/dpi/datasets/distoverview',\n // params: {\n // property: 'datasets',\n // page: 'distoverview',\n // },\n // query: {\n // error: 'mandatoryDistribution',\n // locale: this.$route.query.locale\n // },\n // });\n // }\n // },\n // checkCatalogueMandatory() {\n // if (!JSON.parse(localStorage.getItem('dpi_mandatory'))['catalogues']) {\n // this.$router.push({ \n // name: 'DataProviderInterface-Input', \n // params: { \n // property: 'catalogues', \n // page: 'step1' \n // }, \n // query: { \n // error: 'mandatoryCatalog', \n // locale: this.$route.query.locale\n // } \n // });\n // }\n // },\n checkID(property) {\n // Check uniqueness of Dataset ID\n if (!this.getIsEditMode) {\n this.checkUniqueID(property)\n .then((isUniqueID) => {\n if (!isUniqueID) {\n // Dataset ID not unique / taken in meantime --> Redirect to step1 where the user can choose a new ID\n this.$router.push({\n name: 'DataProviderInterface-Input',\n params: {\n property: property,\n page: 'step1'\n },\n query: {\n error: 'id',\n locale: this.$route.query.locale\n }\n });\n }\n });\n }\n },\n checkUniqueID(property) {\n return new Promise((resolve) => {\n if (this.getData(property)['@id'] !== '') {\n const request = `${this.$env.api.hubUrl}${property}/${this.getData(property)['@id']}?useNormalizedId=true`;\n axios.head(request)\n .then(() => {\n resolve(false);\n })\n .catch(() => {\n resolve(true);\n });\n }\n });\n },\n },\n created() {\n this.$nextTick(() => {\n if (this.property === 'datasets') {\n // this.checkID('datasets');\n // this.checkDatasetMandatory();\n // this.checkDistributionMandatory();\n }\n\n if (this.property === 'catalogues') {\n // this.checkID('catalogues')\n // this.checkCatalogueMandatory();\n }\n });\n },\n setup() {\n const target = useTemplateRef('overview-page')\n const overviewPageIsVisible = ref(false)\n\n // Workaround.\n // Ensure the individual overview pages are only mounted whenever this overview page is visible.\n // For some reason, the form values are not reactive so on initial load, the distribution values are not displayed properly.\n // This workaround delays the initial mount of the overview page until the overview page is visible.\n // We use the IntersectionObserver to check if the overview page is visible, but we could also use more proper datamodels to determine this.\n // todo: figure out why the form values are not reactive on initial load\n useIntersectionObserver(\n target,\n ([{ isIntersecting }]) => {\n overviewPageIsVisible.value = isIntersecting\n },\n {\n rootMargin: '999999px 999999px 999999px 999999px'\n }\n )\n\n return {overviewPageIsVisible}\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.heading,\n.description,\n.arrow {\n cursor: pointer;\n}\n\n.options,\n.download {\n .dropdown-menu {\n min-width: 300px;\n\n .dropdown-item {\n &:hover {\n color: initial;\n background-color: initial;\n }\n }\n }\n}\n\n.legalnotice {\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.w-80 {\n width: 80%;\n}\n\n</style>\n"],"names":["_sfc_main","LanguageSelector","DatasetOverview","CatalogueOverview","_a","mapGetters","mapActions","property","isUniqueID","resolve","request","axios","target","useTemplateRef","overviewPageIsVisible","ref","useIntersectionObserver","isIntersecting","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_hoisted_1","_createTextVNode","_toDisplayString","_ctx","_createVNode","_component_LanguageSelector","$data","_cache","$event","$options","$setup","_hoisted_5","_createBlock","_component_DatasetOverview","_createCommentVNode","_hoisted_6","_component_CatalogueOverview","_createStaticVNode"],"mappings":";;;;;;;;;AAsFA,MAAKA,IAAU;AAAA,EACb,YAAY;AAAA,IACV,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EACD,OAAO;AAAA,IAC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EAMaC,EAAAC,EAAA,uDAAsD;AAAA,aACzD,CAAA;AAAA,YAAAC,EAAsEC,GAAA;AAAA,cAApD,OAAM;AAAA,cAPlC,YAOkDC,EAAS;AAAA,cAP3D,uBAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAOkDF,EAAS,YAAAE;AAAA;;;;MAP3DD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAN,EAAA;AAAA,MAW4BQ,EAAA,wBAAwBC,EAAqB,yBAArEd,KAAAC,EAEM,OAFNc,GAEM;AAAA,cADJC,EAA2DC,GAAA;AAAA,UAAzC,WAAWP,EAAS;AAAA,UAAG,KAAKA,EAAS;AAAA;YAZ7DQ,EAAA,IAAA,EAAA;AAAA,MAAAP,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAN,EAAA;AAAA,MAc4BQ,EAAA,wBAAwBC,EAAqB,yBAArEd,KAAAC,EAEM,OAFNkB,GAEM;AAAA,cADJH,EAA6DI,GAAA;AAAA,UAAzC,WAAWV,EAAS;AAAA,UAAG,KAAKA,EAAS;AAAA;YAf/DQ,EAAA,IAAA,EAAA;AAAA;IAAAP,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAU,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0PAAA,CAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"OverviewPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/OverviewPage.vue"],"sourcesContent":["<template>\n <div ref=\"overview-page\" class=\"col-12\">\n <!-- LANGUAGE SELECTOR -->\n <div class=\"mt-5 mb-0\">\n <div class=\"row\">\n <div class=\"col-10 \">\n {{ $t('message.dataupload.info.selectDisplayLanguage') }}:\n <LanguageSelector class=\"ml-1\" v-model=\"dpiLocale\"></LanguageSelector>\n </div>\n </div>\n </div>\n <div class=\"mb-3\" v-if=\"showDatasetsOverview && overviewPageIsVisible\">\n <DatasetOverview :dpiLocale=\"dpiLocale\" :key=\"dpiLocale\" />\n </div>\n <div class=\"mb-3\" v-if=\"showCatalogsOverview && overviewPageIsVisible\">\n <CatalogueOverview :dpiLocale=\"dpiLocale\" :key=\"dpiLocale\" />\n </div>\n </div>\n<!-- Legal notice *** Checks for ANNIF to determine that this UI is DEU -->\n <div v-if=\"instance.content.dataProviderInterface.annifIntegration\" class=\"legalnotice py-5\" style=\"width: 90%; margin: 0 auto;\">\n <div class=\"d-flex align-items-start\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" fill=\"currentColor\"\n class=\"bi bi-info-circle mx-3 mb-3 mt-1 infoboxI\" viewBox=\"0 0 16 16\">\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16\" />\n <path\n d=\"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" />\n </svg>\n <div class=\"w-80\">\n <p>For <strong>European</strong> <strong>Commission's datasets</strong>, bear in mind that <a\n class=\"external-link\" href=\"https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011D0833\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision 2011/833/EU</ins></a> allows for their commercial\n reuse\n without prior authorisation, except for the material subject to the third party intellectual property rights.\n This\n Decision has been implemented under the <a class=\"external-link\"\n href=\"https://ec.europa.eu/transparency/documents-register/detail?ref=C(2019)1655&lang=en\"\n target=\"_blank\" rel=\"nofollow noopener\"><ins>Decision C(2019) 1655 final</ins></a> by which Creative Commons\n 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\n the provisions of the Creative Commons Universal Public Domain Dedication deed (CC0 1.0).</p>\n <p>The <strong>Council</strong> and the <strong>European Court of Auditors</strong> have\n approved similar decisions on reuse. It is advisable that you check <strong>the reuse policy of your\n organisation</strong> before publishing or submitting your dataset.</p>\n </div>\n </div>\n <!-- <p> </p>\n <hr />\n <p> </p> -->\n\n <div class=\"d-flex align-items-start mt-4\">\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>As owner of your dataset, you guarantee that it does not violate the copyright, other intellectual property\n 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\n necessary.\n </p>\n <p>If you need further information regarding <strong>licenses or copyright</strong> issues, please contact us\n at <span class=\"nobr\"><a class=\"external-link\" href=\"mailto:op-copyright@publications.europa.eu\"\n target=\"_blank\" rel=\"nofollow noopener\">op-copyright@publications.europa.eu</a></span></p>\n </div>\n </div>\n </div>\n\n</template>\n\n<script>\n/* eslint-disable no-restricted-syntax,guard-for-in */\nimport axios from 'axios';\nimport { mapActions, mapGetters } from 'vuex';\n\nimport LanguageSelector from '../components/LanguageSelector';\nimport DatasetOverview from './OverviewPage/DatasetOverview.vue';\nimport CatalogueOverview from './OverviewPage/CatalogueOverview.vue';\n\nimport { useIntersectionObserver } from '@vueuse/core'\nimport { ref, useTemplateRef } from 'vue'\nimport { getCurrentInstance } from \"vue\";\n\nexport default {\n components: {\n LanguageSelector,\n DatasetOverview,\n CatalogueOverview,\n },\n props: {\n property: {\n type: String\n },\n context: {\n type: Object,\n },\n },\n data() {\n return {\n instance : getCurrentInstance().appContext.app.config.globalProperties.$env,\n dpiLocale: this.$route.query?.locale || this.$i18n.locale || this.$i18n.fallbackLocale || 'en',\n }\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n ...mapGetters('dpiStore', [\n 'getData',\n ]),\n showDatasetsOverview() {\n return this.property === 'datasets';\n },\n showCatalogsOverview() {\n return this.property === 'catalogues';\n }\n },\n methods: {\n ...mapActions('dpiStore', [\n 'clearAll',\n 'saveLocalstorageValues',\n ]),\n clear() {\n this.clearAll();\n },\n /*** Overview Page checker functionality ***/\n // checkDatasetMandatory() {\n // if (!JSON.parse(localStorage.getItem('dpi_mandatory'))['datasets']) {\n // this.$router.push({ \n // name: 'DataProviderInterface-Input', \n // params: { \n // property: 'datasets', \n // page: 'step1' \n // }, \n // query: { \n // error: 'mandatoryDataset', \n // locale: this.$route.query.locale \n // } \n // });\n // }\n // },\n // checkDistributionMandatory() {\n // if (!JSON.parse(localStorage.getItem('dpi_mandatory'))['distributions'].length > 0 && !JSON.parse(localStorage.getItem('dpi_mandatory'))['distributions'].every(el => el === true)) {\n // this.$router.push({\n // name: 'DataProviderInterface-Input',\n // path: '/dpi/datasets/distoverview',\n // params: {\n // property: 'datasets',\n // page: 'distoverview',\n // },\n // query: {\n // error: 'mandatoryDistribution',\n // locale: this.$route.query.locale\n // },\n // });\n // }\n // },\n // checkCatalogueMandatory() {\n // if (!JSON.parse(localStorage.getItem('dpi_mandatory'))['catalogues']) {\n // this.$router.push({ \n // name: 'DataProviderInterface-Input', \n // params: { \n // property: 'catalogues', \n // page: 'step1' \n // }, \n // query: { \n // error: 'mandatoryCatalog', \n // locale: this.$route.query.locale\n // } \n // });\n // }\n // },\n checkID(property) {\n // Check uniqueness of Dataset ID\n if (!this.getIsEditMode) {\n this.checkUniqueID(property)\n .then((isUniqueID) => {\n if (!isUniqueID) {\n // Dataset ID not unique / taken in meantime --> Redirect to step1 where the user can choose a new ID\n this.$router.push({\n name: 'DataProviderInterface-Input',\n params: {\n property: property,\n page: 'step1'\n },\n query: {\n error: 'id',\n locale: this.$route.query.locale\n }\n });\n }\n });\n }\n },\n checkUniqueID(property) {\n return new Promise((resolve) => {\n if (this.getData(property)['@id'] !== '') {\n const request = `${this.$env.api.hubUrl}${property}/${this.getData(property)['@id']}?useNormalizedId=true`;\n axios.head(request)\n .then(() => {\n resolve(false);\n })\n .catch(() => {\n resolve(true);\n });\n }\n });\n },\n },\n created() {\n this.$nextTick(() => {\n if (this.property === 'datasets') {\n // this.checkID('datasets');\n // this.checkDatasetMandatory();\n // this.checkDistributionMandatory();\n }\n\n if (this.property === 'catalogues') {\n // this.checkID('catalogues')\n // this.checkCatalogueMandatory();\n }\n });\n },\n setup() {\n const target = useTemplateRef('overview-page')\n const overviewPageIsVisible = ref(false)\n\n // Workaround.\n // Ensure the individual overview pages are only mounted whenever this overview page is visible.\n // For some reason, the form values are not reactive so on initial load, the distribution values are not displayed properly.\n // This workaround delays the initial mount of the overview page until the overview page is visible.\n // We use the IntersectionObserver to check if the overview page is visible, but we could also use more proper datamodels to determine this.\n // todo: figure out why the form values are not reactive on initial load\n useIntersectionObserver(\n target,\n ([{ isIntersecting }]) => {\n overviewPageIsVisible.value = isIntersecting\n },\n {\n rootMargin: '999999px 999999px 999999px 999999px'\n }\n )\n\n return {overviewPageIsVisible}\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.heading,\n.description,\n.arrow {\n cursor: pointer;\n}\n\n.options,\n.download {\n .dropdown-menu {\n min-width: 300px;\n\n .dropdown-item {\n &:hover {\n color: initial;\n background-color: initial;\n }\n }\n }\n}\n\n.legalnotice {\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.w-80 {\n width: 80%;\n}\n\n</style>\n"],"names":["_sfc_main","LanguageSelector","DatasetOverview","CatalogueOverview","getCurrentInstance","_a","mapGetters","mapActions","property","isUniqueID","resolve","request","axios","target","useTemplateRef","overviewPageIsVisible","ref","useIntersectionObserver","isIntersecting","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_hoisted_1","_createTextVNode","_toDisplayString","_ctx","_createVNode","_component_LanguageSelector","$data","_cache","$event","$options","$setup","_hoisted_5","_createBlock","_component_DatasetOverview","_createCommentVNode","_hoisted_6","_component_CatalogueOverview","_hoisted_7","_createStaticVNode"],"mappings":";;;;;;;;;AAuFA,MAAKA,IAAU;AAAA,EACb,YAAY;AAAA,IACV,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EACD,OAAO;AAAA,IACL,UAAU;AAAA,MACR,MAAM;AAAA,IACP;AAAA,IACD,SAAS;AAAA,MACP,MAAM;AAAA,IACP;AAAA,EACF;AAAA,EACD,OAAO;;AACL,WAAO;AAAA,MACL,UAAWC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AAAA,MACvE,aAAWC,IAAA,KAAK,OAAO,UAAZ,gBAAAA,EAAmB,WAAU,KAAK,MAAM,UAAU,KAAK,MAAM,kBAAkB;AAAA,IAC5F;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,IACF,CAAC;AAAA,IACD,GAAGA,EAAW,YAAY;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,uBAAuB;AACrB,aAAO,KAAK,aAAa;AAAA,IAC1B;AAAA,IACD,uBAAuB;AACrB,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,YAAY;AAAA,MACxB;AAAA,MACA;AAAA,IACF,CA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AAN,EAAA;AAAA,MAc4BQ,EAAA,wBAAwBC,EAAqB,yBAArEd,KAAAC,EAEM,OAFNkB,GAEM;AAAA,cADJH,EAA6DI,GAAA;AAAA,UAAzC,WAAWV,EAAS;AAAA,UAAG,KAAKA,EAAS;AAAA;YAf/DQ,EAAA,IAAA,EAAA;AAAA;IAAAP,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAN,EAAA;AAAA,IAmBaK,EAAA,SAAS,QAAQ,sBAAsB,oBAAlDV,EAAA,GAAAC,EAmDM,OAnDNoB,GAmDMV,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA;AAAA,MAtERW,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oPAAA,CAAA;AAAA,WAAAJ,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed as g, ref as y, resolveComponent as x, openBlock as n, createElementBlock as r, Fragment as C, renderList as $, unref as c, normalizeClass as p, toDisplayString as l, createTextVNode as u, createElementVNode as s, createVNode as R, withCtx as m, renderSlot as I } from "vue";
|
|
2
2
|
import "./Repeatable.vue2.mjs";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import N from "../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const V = { key: 0 }, w = { key: 1 }, z = { class: "horizontal-wrapper" }, A = { class: "repeatableWrap" }, B = { class: "interactionHeaderRepeatable my-1" }, D = ["onClick"], E = ["onClick", "data-key"], L = { class: "formkitWrapRepeatable" }, S = {
|
|
5
5
|
__name: "Repeatable",
|
|
6
6
|
props: {
|
|
7
7
|
context: Object
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const e =
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
setup(v) {
|
|
10
|
+
const e = v;
|
|
11
|
+
let i = g(() => e.context.value), t = y();
|
|
12
|
+
setTimeout(() => {
|
|
13
|
+
t.value = Array.isArray(i.value) && i.value.length === 0 ? [e.context.attrs.identifier] : i.value;
|
|
14
14
|
});
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
}, _ = (
|
|
18
|
-
|
|
15
|
+
const f = () => {
|
|
16
|
+
t.value.push({});
|
|
17
|
+
}, _ = (a) => {
|
|
18
|
+
t.value = t.value.filter((o) => o["@value"] !== a["@value"]), e.context.value = t.value;
|
|
19
19
|
};
|
|
20
|
-
return (
|
|
21
|
-
const
|
|
22
|
-
return n(!0),
|
|
23
|
-
class:
|
|
24
|
-
key:
|
|
20
|
+
return (a, o) => {
|
|
21
|
+
const b = x("i18n-t");
|
|
22
|
+
return n(!0), r(C, null, $(c(t), (d, h) => (n(), r("div", {
|
|
23
|
+
class: p(["repeatable formkitProperty", [e.context.attrs.identifier]]),
|
|
24
|
+
key: d
|
|
25
25
|
}, [
|
|
26
|
-
e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (n(),
|
|
27
|
-
o[2] || (o[2] =
|
|
28
|
-
s("div",
|
|
29
|
-
s("div",
|
|
26
|
+
e.context.attrs.class != null && e.context.attrs.class.includes("inDistribution") ? (n(), r("h4", V, l(a.$t("message.dataupload.distributions." + e.context.attrs.identifier + ".label")), 1)) : (n(), r("h4", w, l(a.$t("message.dataupload.datasets." + e.context.attrs.identifier + ".label")), 1)),
|
|
27
|
+
o[2] || (o[2] = u()),
|
|
28
|
+
s("div", z, [
|
|
29
|
+
s("div", A, [
|
|
30
30
|
s("div", B, [
|
|
31
|
-
|
|
31
|
+
R(b, {
|
|
32
32
|
keypath: "message.dataupload.info.repeatable",
|
|
33
33
|
scope: "global",
|
|
34
34
|
tag: "p"
|
|
35
35
|
}, {
|
|
36
|
-
add:
|
|
36
|
+
add: m(() => [
|
|
37
37
|
s("a", {
|
|
38
38
|
class: "add",
|
|
39
|
-
onClick: (
|
|
40
|
-
}, "+ " +
|
|
39
|
+
onClick: (k) => f()
|
|
40
|
+
}, "+ " + l(a.$t("message.dataupload.info.add")), 9, D)
|
|
41
41
|
]),
|
|
42
|
-
remove:
|
|
42
|
+
remove: m(() => [
|
|
43
43
|
s("a", {
|
|
44
|
-
class:
|
|
45
|
-
onClick: (
|
|
46
|
-
"data-key":
|
|
47
|
-
}, "- " +
|
|
44
|
+
class: p(["remove", { disabledRemove: e.context.value.length === 1 }]),
|
|
45
|
+
onClick: (k) => _(c(t)[h]),
|
|
46
|
+
"data-key": d
|
|
47
|
+
}, "- " + l(a.$t("message.dataupload.info.remove")), 11, E)
|
|
48
48
|
]),
|
|
49
49
|
_: 2
|
|
50
50
|
}, 1024)
|
|
51
51
|
]),
|
|
52
|
-
o[1] || (o[1] =
|
|
52
|
+
o[1] || (o[1] = u()),
|
|
53
53
|
s("div", L, [
|
|
54
|
-
|
|
54
|
+
I(a.$slots, "default", {}, void 0, !0)
|
|
55
55
|
])
|
|
56
56
|
])
|
|
57
57
|
])
|
|
58
58
|
], 2))), 128);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
},
|
|
61
|
+
}, F = /* @__PURE__ */ N(S, [["__scopeId", "data-v-f30212c9"]]);
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
F as default
|
|
64
64
|
};
|
|
65
65
|
//# sourceMappingURL=Repeatable.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Repeatable.vue.mjs","sources":["../../lib/form/Repeatable.vue"],"sourcesContent":["<template>\n <div class=\"repeatable formkitProperty\" :class=\"[props.context.attrs.identifier]\"\n v-for=\"key, repeatableIndex in cacheListRepeatable\" :key=\"key\">\n <h4 v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">{{\n $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}</h4>\n <h4 v-else>{{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}</h4>\n
|
|
1
|
+
{"version":3,"file":"Repeatable.vue.mjs","sources":["../../lib/form/Repeatable.vue"],"sourcesContent":["<template>\n\n <div class=\"repeatable formkitProperty\" :class=\"[props.context.attrs.identifier]\"\n v-for=\"key, repeatableIndex in cacheListRepeatable\" :key=\"key\">\n <h4 v-if=\"props.context.attrs.class != undefined && props.context.attrs.class.includes('inDistribution')\">{{\n $t('message.dataupload.distributions.' + props.context.attrs.identifier + '.label') }}</h4>\n <h4 v-else>{{ $t('message.dataupload.datasets.' + props.context.attrs.identifier + '.label') }}</h4>\n\n <div class=\"horizontal-wrapper\">\n <div class=\"repeatableWrap\">\n <div class=\"interactionHeaderRepeatable my-1\">\n <i18n-t keypath=\"message.dataupload.info.repeatable\" scope=\"global\" tag=\"p\">\n <template v-slot:add>\n <a class=\"add\" @click=\"addItem(repeatableIndex)\">+ {{ $t('message.dataupload.info.add') }}</a>\n </template>\n <template v-slot:remove>\n\n <a class=\"remove\" :class=\"{ disabledRemove: props.context.value.length === 1 }\"\n @click=\"removeItem(cacheListRepeatable[repeatableIndex])\" :data-key=\"key\">- {{\n $t('message.dataupload.info.remove') }}</a>\n </template>\n </i18n-t>\n </div>\n <div class=\"formkitWrapRepeatable\">\n\n <slot></slot>\n\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup>\nimport { ref, watch, computed } from 'vue';\n\nconst props = defineProps({\n context: Object\n})\n\nlet testarray = computed(() => {\n return props.context.value\n})\n\nlet cacheListRepeatable = ref();\n\nsetTimeout(() => {\n cacheListRepeatable.value = Array.isArray(testarray.value) && testarray.value.length === 0 ? [props.context.attrs.identifier] : testarray.value\n});\n\nconst addItem = () => {\n cacheListRepeatable.value.push({})\n}\n\nconst removeItem = (item) => {\n cacheListRepeatable.value = cacheListRepeatable.value.filter(obj => obj[\"@value\"] !== item['@value']);\n props.context.value = cacheListRepeatable.value;\n}\n\n</script>\n<style scoped>\n.add,\n.remove {\n padding: 0.5rem;\n margin: 0.5rem;\n border-radius: 5px;\n transition: all 200ms ease-in-out;\n}\n\n.add {\n border: 1px solid lightseagreen;\n\n &:hover {\n text-decoration: none;\n color: white;\n background-color: lightseagreen;\n }\n}\n\n.remove {\n border: 1px solid lightcoral;\n\n &:hover {\n text-decoration: none;\n color: white;\n background-color: lightcoral;\n }\n}\n\n.disabledRemove {\n &:hover {\n text-decoration: none;\n color: white;\n background-color: lightgray;\n }\n}\n</style>\n"],"names":["props","__props","testarray","computed","cacheListRepeatable","ref","addItem","removeItem","item","obj"],"mappings":";;;;;;;;;AAmCA,UAAMA,IAAQC;QAIVC,IAAYC,EAAS,MAChBH,EAAM,QAAQ,KACtB,GAEGI,IAAsBC,EAAG;AAE7B,eAAW,MAAM;AACf,MAAAD,EAAoB,QAAQ,MAAM,QAAQF,EAAU,KAAK,KAAKA,EAAU,MAAM,WAAW,IAAI,CAACF,EAAM,QAAQ,MAAM,UAAU,IAAIE,EAAU;AAAA,IAC5I,CAAC;AAED,UAAMI,IAAU,MAAM;AACpB,MAAAF,EAAoB,MAAM,KAAK,EAAE;AAAA,IACnC,GAEMG,IAAa,CAACC,MAAS;AAC3B,MAAAJ,EAAoB,QAAQA,EAAoB,MAAM,OAAO,CAAAK,MAAOA,EAAI,QAAQ,MAAMD,EAAK,QAAQ,CAAC,GACpGR,EAAM,QAAQ,QAAQI,EAAoB;AAAA,IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|