@piveau/piveau-hub-ui-modules 4.6.10 → 4.6.11
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/components/SimpleSelect.vue.mjs +34 -34
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
- package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -0
- package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.mjs +128 -125
- package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/dist/widgets/ResourceAccessPopup.vue.mjs +8 -8
- package/dist/widgets/ResourceAccessPopup.vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { computed as u, ref as i, watch as N, onMounted as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { getNode as
|
|
4
|
-
import { onClickOutside as
|
|
5
|
-
import
|
|
6
|
-
import { useRuntimeEnv as
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { FormKit as
|
|
1
|
+
import { computed as u, ref as i, watch as N, onMounted as X, nextTick as O, openBlock as a, createElementBlock as d, createElementVNode as h, toDisplayString as V, createTextVNode as k, withDirectives as $, createVNode as z, unref as M, vShow as T, Fragment as U, renderList as j, createCommentVNode as A } from "vue";
|
|
2
|
+
import { useStore as Y } from "vuex";
|
|
3
|
+
import { getNode as Z } from "@formkit/core";
|
|
4
|
+
import { onClickOutside as g, useAsyncState as ee } from "../../external/@vueuse/core/index";
|
|
5
|
+
import te from "axios";
|
|
6
|
+
import { useRuntimeEnv as se } from "../../composables/useRuntimeEnv.mjs";
|
|
7
|
+
import { useI18n as le } from "vue-i18n";
|
|
8
|
+
import { FormKit as D } from "@formkit/vue";
|
|
9
9
|
import "./SimpleSelect.vue2.mjs";
|
|
10
|
-
const
|
|
10
|
+
const re = { class: "formkitProperty" }, oe = { class: "position-relative formkitCmpWrap" }, ne = { key: 0 }, ue = ["onClick"], ie = ["onClick"], be = {
|
|
11
11
|
__name: "SimpleSelect",
|
|
12
12
|
props: {
|
|
13
13
|
context: Object
|
|
14
14
|
},
|
|
15
15
|
setup(q) {
|
|
16
|
-
const m = q, { locale: B, fallbackLocale: K } =
|
|
16
|
+
const m = q, { locale: B, fallbackLocale: K } = le({ useScope: "global" });
|
|
17
17
|
u(() => localStorage.getItem("dpi_duplicate"));
|
|
18
|
-
const w = u(() => I.getters["auth/getUserCatalogIds"]), v = i(!1), I =
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
18
|
+
const w = u(() => I.getters["auth/getUserCatalogIds"]), v = i(!1), I = Y(), L = i(null), Q = i(), P = i(!0);
|
|
19
|
+
Q.value = u(() => I.getters["auth/getIsEditMode"]);
|
|
20
|
+
const W = se(), f = i(""), c = i(""), S = i(!1);
|
|
21
|
+
g(L, (l) => v.value = !1);
|
|
22
22
|
const y = async (l) => {
|
|
23
|
-
l.id ? (c.value = l.id, f.value = l.name) : (c.value = l, f.value = l), v.value = !1;
|
|
24
|
-
}, { execute:
|
|
23
|
+
P.value = !1, l.id ? (c.value = l.id, f.value = l.name) : (c.value = l, f.value = l), v.value = !1;
|
|
24
|
+
}, { execute: G, state: o, isReady: R, error: E } = ee(async () => await te.get(W.api.baseUrl + "search?filter=catalogue&limit=1000"), { data: { result: { results: [] } } }, { immediate: !1 }), H = u(() => S.value && !!o.value && R.value);
|
|
25
25
|
N(E, () => {
|
|
26
26
|
console.error(E.value);
|
|
27
27
|
});
|
|
28
28
|
const F = u(() => {
|
|
29
29
|
var l, e, s, r;
|
|
30
30
|
return ((r = (s = (e = (l = o == null ? void 0 : o.value) == null ? void 0 : l.data) == null ? void 0 : e.result) == null ? void 0 : s.results) == null ? void 0 : r.length) > 0;
|
|
31
|
-
}),
|
|
31
|
+
}), J = u(() => {
|
|
32
32
|
var l, e, s, r;
|
|
33
33
|
return F && ((r = (s = (e = (l = o == null ? void 0 : o.value) == null ? void 0 : l.data) == null ? void 0 : e.result) == null ? void 0 : s.results) == null ? void 0 : r.length) === 1;
|
|
34
34
|
}), x = u(() => {
|
|
@@ -43,31 +43,31 @@ const le = { class: "formkitProperty" }, re = { class: "position-relative formki
|
|
|
43
43
|
return t != null && t.title ? typeof (t == null ? void 0 : t.title) == "string" ? b = t == null ? void 0 : t.title : typeof (t == null ? void 0 : t.title) == "object" && (b = (t == null ? void 0 : t.title[B.value]) || (t == null ? void 0 : t.title[K.value]) || ((_ = Object.values(t == null ? void 0 : t.title)) == null ? void 0 : _[0]) || n) : b = n, { id: n, name: b || n };
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
|
-
return N(
|
|
46
|
+
return N(J, (l) => {
|
|
47
47
|
if (l) {
|
|
48
48
|
const e = o.value.data.result.results[0];
|
|
49
49
|
y({ id: e.id, name: e.name });
|
|
50
50
|
}
|
|
51
|
-
}, { immediate: !0 }),
|
|
51
|
+
}, { immediate: !0 }), X(async () => {
|
|
52
52
|
var s, r, p;
|
|
53
|
-
await
|
|
54
|
-
const l = ((r = (s =
|
|
53
|
+
await G(), await O();
|
|
54
|
+
const l = ((r = (s = Z) == null ? void 0 : s("dcat:catalog")) == null ? void 0 : r.value) || void 0, e = (p = x.value) == null ? void 0 : p.find((C) => C.id === l);
|
|
55
55
|
e && y({ id: e.id, name: e.name }), await O(), S.value = !0;
|
|
56
|
-
}), (l, e) => (a(), d("div",
|
|
56
|
+
}), (l, e) => (a(), d("div", re, [
|
|
57
57
|
h("h4", null, V(m.context.label), 1),
|
|
58
58
|
e[6] || (e[6] = k()),
|
|
59
|
-
h("div",
|
|
60
|
-
|
|
61
|
-
$(z(M(
|
|
59
|
+
h("div", oe, [
|
|
60
|
+
H.value ? (a(), d("div", ne, [
|
|
61
|
+
$(z(M(D), {
|
|
62
62
|
modelValue: c.value,
|
|
63
63
|
"onUpdate:modelValue": e[0] || (e[0] = (s) => c.value = s),
|
|
64
64
|
name: `${m.context.node.name}`,
|
|
65
65
|
type: "text"
|
|
66
66
|
}, null, 8, ["modelValue", "name"]), [
|
|
67
|
-
[
|
|
67
|
+
[T, !1]
|
|
68
68
|
]),
|
|
69
69
|
e[4] || (e[4] = k()),
|
|
70
|
-
z(M(
|
|
70
|
+
z(M(D), {
|
|
71
71
|
class: "autocompleteInputfield",
|
|
72
72
|
modelValue: f.value,
|
|
73
73
|
"onUpdate:modelValue": e[1] || (e[1] = (s) => f.value = s),
|
|
@@ -87,26 +87,26 @@ const le = { class: "formkitProperty" }, re = { class: "position-relative formki
|
|
|
87
87
|
ref: L,
|
|
88
88
|
class: "autocompleteResultList selectListFK catSelectList"
|
|
89
89
|
}, [
|
|
90
|
-
(a(!0), d(
|
|
90
|
+
(a(!0), d(U, null, j(x.value, (s) => (a(), d("li", {
|
|
91
91
|
key: s,
|
|
92
92
|
onClick: (r) => y(s),
|
|
93
93
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
94
|
-
}, V(s.name), 9,
|
|
94
|
+
}, V(s.name), 9, ue))), 128)),
|
|
95
95
|
e[3] || (e[3] = k()),
|
|
96
|
-
x.value.length === 0 ? (a(!0), d(
|
|
96
|
+
x.value.length === 0 ? (a(!0), d(U, { key: 0 }, j(w.value, (s) => (a(), d("li", {
|
|
97
97
|
key: s,
|
|
98
98
|
onClick: (r) => y(s),
|
|
99
99
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
100
|
-
}, V(s), 9,
|
|
100
|
+
}, V(s), 9, ie))), 128)) : A("", !0)
|
|
101
101
|
], 512), [
|
|
102
|
-
[
|
|
102
|
+
[T, v.value]
|
|
103
103
|
])
|
|
104
|
-
])) :
|
|
104
|
+
])) : A("", !0)
|
|
105
105
|
])
|
|
106
106
|
]));
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
export {
|
|
110
|
-
|
|
110
|
+
be as default
|
|
111
111
|
};
|
|
112
112
|
//# sourceMappingURL=SimpleSelect.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleSelect.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleSelect.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.context.label }}</h4>\n <div class=\"position-relative formkitCmpWrap\">\n\n <div v-if=\"isReady\">\n <FormKit v-show=\"false\" v-model=\"catId\" :name=\"`${props.context.node.name}`\" type=\"text\" />\n <FormKit class=\"autocompleteInputfield\" v-model=\"catVal\" :placeholder=\"props.context.attrs.placeholder\"\n type=\"text\" @click=\"showList = !showList\" validation=\"required\" mandatory=\"true\" :validation-messages=\"{\n required: props.context.attrs.placeholder,\n }\" :name=\"`${props.context.node.name}__displayedValue`\" />\n <ul ref=\"dropdownList\" v-show=\"showList\" class=\"autocompleteResultList selectListFK catSelectList\">\n <li v-for=\"match in filteredCatalogs\" :key=\"match\" @click=\"setvalue(match)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n match.name }}\n </li>\n <li v-if=\"filteredCatalogs.length === 0\" v-for=\"idMatch in userCats\" :key=\"idMatch\" @click=\"setvalue(idMatch)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n idMatch }}\n </li>\n </ul>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, computed, onMounted, watch, nextTick } from 'vue';\nimport { useStore } from 'vuex';\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport axios from 'axios'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\nimport { useAsyncState } from '@vueuse/core';\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps({\n context: Object\n})\n\nconst { locale, fallbackLocale } = useI18n({ useScope: 'global' })\n\nconst isDuplicate = computed(() => localStorage.getItem('dpi_duplicate'))\nconst userCats = computed(() => store.getters['auth/getUserCatalogIds']);\nconst showList = ref(false)\nconst store = useStore()\nconst dropdownList = ref(null)\nconst isEditMode = ref()\nconst validationTrigger = ref(true)\nisEditMode.value = computed(() => store.getters['auth/getIsEditMode']);\nconst env = useRuntimeEnv()\nconst catVal = ref('')\nconst catId = ref('')\nconst hasMounted = ref(false)\n\nonClickOutside(dropdownList, event => showList.value = false)\n\nconst setvalue = async (e) => {\n validationTrigger = false\n if (e.id) {\n catId.value = e.id\n catVal.value = e.name\n } else {\n catId.value = e\n catVal.value = e\n }\n\n showList.value = false\n}\n\nconst { execute: filterCatList, state: catalogListData, isReady: isQueryReady, error } = useAsyncState(async () => {\n const catalogListData = await axios.get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n return catalogListData\n}, { data: { result: { results: [] } } }, { immediate: false })\n\nconst isReady = computed(() => hasMounted.value && !!catalogListData.value && isQueryReady.value)\n\nwatch(error, () => {\n console.error(error.value)\n})\n\nconst hasResults = computed(() => {\n return catalogListData?.value?.data?.result?.results?.length > 0\n})\n\nconst hasOneResultOnly = computed(() => {\n return hasResults && catalogListData?.value?.data?.result?.results?.length === 1\n})\n\n/**\n * Computes list of users' authorized catalogs in { id: string; name: string } format\n */\nconst filteredCatalogs = computed(() => {\n if (!hasResults.value || !isQueryReady.value) return []\n\n const allCatalogs = catalogListData.value?.data?.result?.results || []\n const authorizedCatalogs = allCatalogs.filter(catalog => userCats.value?.includes(catalog.id))\n\n // map to { id: string; name: string } pairs\n const authorizedCatalogsDataModel = authorizedCatalogs.map((catalog) => {\n const id = catalog?.id || ''\n let title = ''\n\n if (!catalog?.title) title = id\n else if (typeof catalog?.title === 'string') title = catalog?.title\n else if (typeof catalog?.title === 'object') title
|
|
1
|
+
{"version":3,"file":"SimpleSelect.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleSelect.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.context.label }}</h4>\n <div class=\"position-relative formkitCmpWrap\">\n\n <div v-if=\"isReady\">\n <FormKit v-show=\"false\" v-model=\"catId\" :name=\"`${props.context.node.name}`\" type=\"text\" />\n <FormKit class=\"autocompleteInputfield\" v-model=\"catVal\" :placeholder=\"props.context.attrs.placeholder\"\n type=\"text\" @click=\"showList = !showList\" validation=\"required\" mandatory=\"true\" :validation-messages=\"{\n required: props.context.attrs.placeholder,\n }\" :name=\"`${props.context.node.name}__displayedValue`\" />\n <ul ref=\"dropdownList\" v-show=\"showList\" class=\"autocompleteResultList selectListFK catSelectList\">\n <li v-for=\"match in filteredCatalogs\" :key=\"match\" @click=\"setvalue(match)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n match.name }}\n </li>\n <li v-if=\"filteredCatalogs.length === 0\" v-for=\"idMatch in userCats\" :key=\"idMatch\" @click=\"setvalue(idMatch)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n idMatch }}\n </li>\n </ul>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, computed, onMounted, watch, nextTick } from 'vue';\nimport { useStore } from 'vuex';\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport axios from 'axios'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\nimport { useAsyncState } from '@vueuse/core';\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps({\n context: Object\n})\n\nconst { locale, fallbackLocale } = useI18n({ useScope: 'global' })\n\nconst isDuplicate = computed(() => localStorage.getItem('dpi_duplicate'))\nconst userCats = computed(() => store.getters['auth/getUserCatalogIds']);\nconst showList = ref(false)\nconst store = useStore()\nconst dropdownList = ref(null)\nconst isEditMode = ref()\nconst validationTrigger = ref(true)\nisEditMode.value = computed(() => store.getters['auth/getIsEditMode']);\nconst env = useRuntimeEnv()\nconst catVal = ref('')\nconst catId = ref('')\nconst hasMounted = ref(false)\n\nonClickOutside(dropdownList, event => showList.value = false)\n\nconst setvalue = async (e) => {\n validationTrigger.value = false\n if (e.id) {\n catId.value = e.id\n catVal.value = e.name\n } else {\n catId.value = e\n catVal.value = e\n }\n\n showList.value = false\n}\n\nconst { execute: filterCatList, state: catalogListData, isReady: isQueryReady, error } = useAsyncState(async () => {\n const catalogListData = await axios.get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n return catalogListData\n}, { data: { result: { results: [] } } }, { immediate: false })\n\nconst isReady = computed(() => hasMounted.value && !!catalogListData.value && isQueryReady.value)\n\nwatch(error, () => {\n console.error(error.value)\n})\n\nconst hasResults = computed(() => {\n return catalogListData?.value?.data?.result?.results?.length > 0\n})\n\nconst hasOneResultOnly = computed(() => {\n return hasResults && catalogListData?.value?.data?.result?.results?.length === 1\n})\n\n/**\n * Computes list of users' authorized catalogs in { id: string; name: string } format\n */\nconst filteredCatalogs = computed(() => {\n if (!hasResults.value || !isQueryReady.value) return []\n\n const allCatalogs = catalogListData.value?.data?.result?.results || []\n const authorizedCatalogs = allCatalogs.filter(catalog => userCats.value?.includes(catalog.id))\n\n // map to { id: string; name: string } pairs\n const authorizedCatalogsDataModel = authorizedCatalogs.map((catalog) => {\n const id = catalog?.id || ''\n let title = ''\n\n if (!catalog?.title) title = id\n else if (typeof catalog?.title === 'string') title = catalog?.title\n else if (typeof catalog?.title === 'object') title =\n catalog?.title[locale.value]\n || catalog?.title[fallbackLocale.value]\n || Object.values(catalog?.title)?.[0]\n || id\n\n return { id, name: title || id }\n });\n return authorizedCatalogsDataModel\n})\n\nwatch(hasOneResultOnly, (yes) => {\n if (yes) {\n const result = catalogListData.value.data.result.results[0]\n setvalue({ id: result.id, name: result.name })\n }\n}, { immediate: true })\n\nonMounted(async () => {\n await filterCatList()\n await nextTick()\n const catalogIdToLoadForEdit = getNode?.('dcat:catalog')?.value || undefined\n const maybeFoundCatalogFromQuery = filteredCatalogs.value?.find(item => item.id === catalogIdToLoadForEdit)\n if (maybeFoundCatalogFromQuery) {\n setvalue({ id: maybeFoundCatalogFromQuery.id, name: maybeFoundCatalogFromQuery.name })\n }\n await nextTick()\n hasMounted.value = true\n});\n\n</script>\n<style>\n.catSelectList {\n width: 97.3% !important;\n margin: 0 1rem;\n}\n\n.selectListFK {\n\n max-height: 20rem;\n overflow: overlay;\n overflow-x: hidden;\n}\n</style>\n"],"names":["props","__props","locale","fallbackLocale","useI18n","computed","userCats","store","showList","ref","useStore","dropdownList","isEditMode","validationTrigger","env","useRuntimeEnv","catVal","catId","hasMounted","onClickOutside","event","setvalue","e","filterCatList","catalogListData","isQueryReady","error","useAsyncState","axios","isReady","watch","hasResults","_d","_c","_b","_a","hasOneResultOnly","filteredCatalogs","catalog","id","title","yes","result","onMounted","nextTick","catalogIdToLoadForEdit","getNode","maybeFoundCatalogFromQuery","item"],"mappings":"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"}
|
|
@@ -38,6 +38,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
38
38
|
trackAndDownloadAllDistributions(): Promise<void>;
|
|
39
39
|
downloadAllDistributions(): Promise<void>;
|
|
40
40
|
beforeWindowUnload(e: any): void;
|
|
41
|
+
openRessourceAccessPopup(): void;
|
|
42
|
+
onClose(e: any): void;
|
|
41
43
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
42
44
|
small?: any;
|
|
43
45
|
primary?: any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { mapGetters as
|
|
2
|
-
import { onUnmounted as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { has as T, isNil as
|
|
5
|
-
import
|
|
6
|
-
import { saveAs as
|
|
7
|
-
import
|
|
8
|
-
import { getTranslationFor as
|
|
1
|
+
import { mapGetters as C } from "vuex";
|
|
2
|
+
import { onUnmounted as _, resolveComponent as I, openBlock as m, createElementBlock as h, createBlock as y, withCtx as F, createElementVNode as l, createTextVNode as w, toDisplayString as u, normalizeStyle as S, createCommentVNode as f } from "vue";
|
|
3
|
+
import { useRouter as U } from "vue-router";
|
|
4
|
+
import { has as T, isNil as M } from "lodash-es";
|
|
5
|
+
import O from "axios";
|
|
6
|
+
import { saveAs as R } from "file-saver";
|
|
7
|
+
import k from "jquery";
|
|
8
|
+
import { getTranslationFor as Z } from "../../utils/helpers.mjs";
|
|
9
9
|
import x from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
10
10
|
const $ = {
|
|
11
11
|
name: "DownloadAllDistributions",
|
|
@@ -19,25 +19,25 @@ const $ = {
|
|
|
19
19
|
"small"
|
|
20
20
|
],
|
|
21
21
|
computed: {
|
|
22
|
-
...
|
|
22
|
+
...C("datasetDetails", [
|
|
23
23
|
"getDistributions",
|
|
24
24
|
"getTitle",
|
|
25
25
|
"getCatalog",
|
|
26
26
|
"getLanguages"
|
|
27
27
|
]),
|
|
28
28
|
files() {
|
|
29
|
-
const s = (
|
|
30
|
-
if (T(
|
|
31
|
-
const
|
|
32
|
-
return
|
|
29
|
+
const s = (t) => t.lastIndexOf(".") !== -1 ? t.substring(0, t.lastIndexOf(".")) : t, e = (t) => {
|
|
30
|
+
if (T(t, "format.id") && !M(t.format.id)) {
|
|
31
|
+
const a = t.format.id;
|
|
32
|
+
return a.lastIndexOf(".") === -1 ? a.toLowerCase() : a.substring(a.lastIndexOf(".") + 1, a.length).toLowerCase();
|
|
33
33
|
}
|
|
34
34
|
return "";
|
|
35
|
-
},
|
|
36
|
-
return this.getDistributions.map((
|
|
37
|
-
title:
|
|
38
|
-
...
|
|
39
|
-
format: t
|
|
40
|
-
csvReportTitle: o(
|
|
35
|
+
}, r = (t, a) => `${s(this.getDistributionTitle(t)).substring(0, this.bulkDownload.MAX_FILE_TITLE_LENGTH).replace(/\//g, " ").trim()}-${a}` || `${s(this.getDistributionDescription(t)).substring(0, this.bulkDownload.MAX_FILE_TITLE_LENGTH).replace(/\//g, " ").trim()}-${a}`, i = (t) => this.showDownloadUrls(t) ? { accessUrl: `${t.accessUrl[0]}`, downloadUrl: `${t.downloadUrls[0]}` } : { accessUrl: `${t.accessUrl[0]}` }, o = (t) => this.getDistributionTitle(t).replace(/,/g, "") || this.getDistributionDescription(t).replace(/,/g, "");
|
|
36
|
+
return this.getDistributions.map((t, a) => ({
|
|
37
|
+
title: r(t, a + 1),
|
|
38
|
+
...i(t),
|
|
39
|
+
format: e(t),
|
|
40
|
+
csvReportTitle: o(t)
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
43
|
},
|
|
@@ -61,48 +61,48 @@ const $ = {
|
|
|
61
61
|
};
|
|
62
62
|
},
|
|
63
63
|
methods: {
|
|
64
|
-
getTranslationFor:
|
|
65
|
-
async fetchDistributionFiles(s,
|
|
64
|
+
getTranslationFor: Z,
|
|
65
|
+
async fetchDistributionFiles(s, e, r, i) {
|
|
66
66
|
const o = [];
|
|
67
67
|
let d = `filename,status, issue_cause downloadURL, issue_cause accessURL
|
|
68
|
-
`,
|
|
69
|
-
const
|
|
70
|
-
this.cancelDownloadAllAxiosRequestSource =
|
|
71
|
-
const b = this.$bulkDownloadAxiosInstance, A = { responseType: "blob", cancelToken: this.cancelDownloadAllAxiosRequestSource.token, timeout: this.bulkDownload.TIMEOUT_MS },
|
|
72
|
-
const v =
|
|
68
|
+
`, t;
|
|
69
|
+
const a = ["wms", "wfs"], L = O.CancelToken;
|
|
70
|
+
this.cancelDownloadAllAxiosRequestSource = L.source();
|
|
71
|
+
const b = this.$bulkDownloadAxiosInstance, A = { responseType: "blob", cancelToken: this.cancelDownloadAllAxiosRequestSource.token, timeout: this.bulkDownload.TIMEOUT_MS }, E = e.map(async (n) => {
|
|
72
|
+
const v = a.find((g) => g === n.format);
|
|
73
73
|
if (v)
|
|
74
|
-
o.push([
|
|
74
|
+
o.push([n.csvReportTitle, "issue", `We can't download ${v} files using the download all button. Please try to download this file using the download button next to the file name.`]);
|
|
75
75
|
else {
|
|
76
|
-
let g = !0,
|
|
77
|
-
T(
|
|
78
|
-
g = !0,
|
|
79
|
-
}) :
|
|
80
|
-
g = !0, o.push([
|
|
81
|
-
})), g ||
|
|
76
|
+
let g = !0, p, D = n.format;
|
|
77
|
+
T(n, "downloadUrl") ? p = await b.get(n.downloadUrl, A).then((c) => c.status === 200 ? (g = !1, !n.format.length > 0 && (D = i(c.headers["content-type"])), o.push([n.csvReportTitle, "delivered"]), c.data) : Promise.reject(new Error(c.statusText))).catch((c) => {
|
|
78
|
+
g = !0, t = c;
|
|
79
|
+
}) : t = "no download url available", this.isUrlInvalid(n.downloadUrl) && o.push([n.csvReportTitle, "issue", "url is invalid"]), g && (p = await b.get(n.accessUrl, A).then((c) => c.status === 200 ? (g = !1, n.format.length > 0 && (D = i(c.headers["content-type"])), o.push([n.csvReportTitle, "delivered", t]), c.data) : Promise.reject(new Error(c.statusText))).catch((c) => {
|
|
80
|
+
g = !0, o.push([n.csvReportTitle, "issue", t, c]);
|
|
81
|
+
})), g || r.file(`${n.title}.${D}`, p, { binary: !0 }), this.isDownloadAllDistributionsCanceled ? (this.downloadedFilesCounter = 0, this.downloadProgress = 0, this.failedDownloads = 0) : (this.downloadedFilesCounter += 1, this.downloadProgress = Math.floor(100 * this.downloadedFilesCounter / this.getDistributions.length), g && (this.failedDownloads += 1));
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
await Promise.all(
|
|
85
|
-
d +=
|
|
84
|
+
await Promise.all(E), o.forEach((n) => {
|
|
85
|
+
d += n.join(","), d += `
|
|
86
86
|
`;
|
|
87
87
|
}), s.file("file_report.csv", d, { binary: !0 });
|
|
88
88
|
},
|
|
89
89
|
hideDownloadAllModal() {
|
|
90
|
-
|
|
90
|
+
k("#downloadAllModal").modal("hide");
|
|
91
91
|
},
|
|
92
|
-
generateAndSaveZip(s,
|
|
92
|
+
generateAndSaveZip(s, e) {
|
|
93
93
|
this.isDownloadAllDistributionsCanceled || (this.numberOfFilesToZip = Object.keys(s.files).length, this.isGeneratingZip = !0);
|
|
94
|
-
class
|
|
94
|
+
class r {
|
|
95
95
|
constructor(o) {
|
|
96
96
|
this.message = o, this.name = "UserInterruptException";
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
s.generateAsync({ type: "blob", compression: "DEFLATE" }, () => {
|
|
100
100
|
if (this.isDownloadAllDistributionsCanceled)
|
|
101
|
-
throw new
|
|
102
|
-
}).then((
|
|
103
|
-
this.isGeneratingZip = !1, this.isGeneratingZipDone = !0, this.isLoadingAllDistributionFiles = !1, this.downloadAllSuccess = !0,
|
|
104
|
-
}).catch((
|
|
105
|
-
this.isGeneratingZip = !1, this.isDownloadAllDistributionsCanceled = !1, this.isLoadingAllDistributionFiles = !1, this.downloadAllError = !0, this.downloadedFilesCounter = 0, this.downloadProgress = 0, this.numberOfFilesToZip = 0, console.warn(
|
|
101
|
+
throw new r("user canceled generate zip operation");
|
|
102
|
+
}).then((i) => {
|
|
103
|
+
this.isGeneratingZip = !1, this.isGeneratingZipDone = !0, this.isLoadingAllDistributionFiles = !1, this.downloadAllSuccess = !0, R(i, e);
|
|
104
|
+
}).catch((i) => {
|
|
105
|
+
this.isGeneratingZip = !1, this.isDownloadAllDistributionsCanceled = !1, this.isLoadingAllDistributionFiles = !1, this.downloadAllError = !0, this.downloadedFilesCounter = 0, this.downloadProgress = 0, this.numberOfFilesToZip = 0, console.warn(i);
|
|
106
106
|
});
|
|
107
107
|
},
|
|
108
108
|
cancelDownloadAll(s) {
|
|
@@ -119,170 +119,173 @@ const $ = {
|
|
|
119
119
|
), await this.downloadAllDistributions();
|
|
120
120
|
},
|
|
121
121
|
async downloadAllDistributions() {
|
|
122
|
-
this.downloadedFilesCounter = 0, this.downloadProgress = 0, this.failedDownloads = 0, this.numberOfFilesToZip = 0, this.isGeneratingZip = !1, this.isGeneratingZipDone = !1, this.isLoadingAllDistributionFiles = !0, this.isDownloadAllDistributionsCanceled = !1, this.downloadAllSuccess = !1, this.downloadAllError = !1;
|
|
122
|
+
k("#downloadAllModal").modal("show"), this.downloadedFilesCounter = 0, this.downloadProgress = 0, this.failedDownloads = 0, this.numberOfFilesToZip = 0, this.isGeneratingZip = !1, this.isGeneratingZipDone = !1, this.isLoadingAllDistributionFiles = !0, this.isDownloadAllDistributionsCanceled = !1, this.downloadAllSuccess = !1, this.downloadAllError = !1;
|
|
123
123
|
const s = (d) => {
|
|
124
|
-
const
|
|
125
|
-
return d.substring(
|
|
126
|
-
}, { default:
|
|
127
|
-
await this.fetchDistributionFiles(
|
|
124
|
+
const t = d.lastIndexOf("/") + 1, a = d.indexOf(";") !== -1 ? d.indexOf(";") : d.length;
|
|
125
|
+
return d.substring(t, a);
|
|
126
|
+
}, { default: e } = await import("jszip"), r = new e(), i = `${this.getTranslationFor(this.getTitle, this.$route.query.locale, this.getLanguages)}.zip`, o = r.folder(this.getTranslationFor(this.getCatalog.title, this.$route.query.locale, this.getLanguages));
|
|
127
|
+
await this.fetchDistributionFiles(r, this.files, o, s), await this.generateAndSaveZip(r, i);
|
|
128
128
|
},
|
|
129
129
|
// handle navigation to extern website (cancel bulk download and hide modal)
|
|
130
130
|
beforeWindowUnload(s) {
|
|
131
131
|
this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled && (s.preventDefault(), s.returnValue = "");
|
|
132
|
+
},
|
|
133
|
+
openRessourceAccessPopup() {
|
|
134
|
+
this.openModal(this.trackAndDownloadAllDistributions, !0);
|
|
135
|
+
},
|
|
136
|
+
onClose(s) {
|
|
137
|
+
console.log("CLOSING");
|
|
132
138
|
}
|
|
133
139
|
},
|
|
134
140
|
created() {
|
|
135
141
|
window.addEventListener("beforeunload", this.beforeWindowUnload);
|
|
136
142
|
},
|
|
143
|
+
// mounted() {
|
|
144
|
+
// setTimeout(() => {
|
|
145
|
+
// const modal = document.getElementById('externalAccess');
|
|
146
|
+
// modal.addEventListener('click', function() {
|
|
147
|
+
// console.log("CLOSING");
|
|
148
|
+
// });
|
|
149
|
+
// })
|
|
150
|
+
// },
|
|
137
151
|
beforeUnmount() {
|
|
138
152
|
window.removeEventListener("beforeunload", this.beforeWindowUnload);
|
|
139
153
|
},
|
|
140
154
|
setup() {
|
|
141
|
-
const s =
|
|
142
|
-
|
|
143
|
-
s.beforeEach((
|
|
144
|
-
this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled ? window.confirm(this.$t("message.datasetDetails.datasets.leavePageWindow.text")) ? (this.hideDownloadAllModal(), this.cancelDownloadAll(this.cancelDownloadAllAxiosRequestSource),
|
|
155
|
+
const s = U();
|
|
156
|
+
_(() => {
|
|
157
|
+
s.beforeEach((e, r, i) => {
|
|
158
|
+
this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled ? window.confirm(this.$t("message.datasetDetails.datasets.leavePageWindow.text")) ? (this.hideDownloadAllModal(), this.cancelDownloadAll(this.cancelDownloadAllAxiosRequestSource), i()) : i(!1) : (this.hideDownloadAllModal(), i());
|
|
145
159
|
})();
|
|
146
160
|
});
|
|
147
161
|
}
|
|
148
162
|
}, G = {
|
|
149
163
|
key: 0,
|
|
150
164
|
class: "dsd-download-all-distributions-button"
|
|
151
|
-
},
|
|
165
|
+
}, P = {
|
|
152
166
|
class: "modal fade",
|
|
167
|
+
"data-backdrop": "static",
|
|
168
|
+
"data-keyboard": "false",
|
|
153
169
|
id: "downloadAllModal",
|
|
170
|
+
ref: "downloadAllModal",
|
|
154
171
|
tabindex: "-1",
|
|
155
172
|
role: "dialog",
|
|
156
173
|
"aria-labelledby": "download progress",
|
|
157
174
|
"aria-hidden": "true"
|
|
158
|
-
},
|
|
175
|
+
}, N = {
|
|
159
176
|
class: "modal-dialog",
|
|
160
177
|
role: "document"
|
|
161
178
|
}, q = { class: "modal-content" }, j = { class: "modal-header" }, z = { class: "modal-title" }, V = { class: "modal-body" }, W = { class: "progress" }, H = ["aria-valuenow"], X = { class: "d-flex justify-content-between align-items-center" }, B = ["title"], J = { class: "d-flex justify-content-between align-items-center" }, K = { key: 0 }, Q = { key: 1 }, Y = {
|
|
162
179
|
key: 0,
|
|
163
180
|
class: "spinner-grow text-primary",
|
|
164
181
|
role: "status"
|
|
165
|
-
},
|
|
182
|
+
}, ee = {
|
|
166
183
|
key: 1,
|
|
167
184
|
class: "material-icons check-icon"
|
|
168
|
-
},
|
|
169
|
-
type: "button",
|
|
170
|
-
class: "btn btn-secondary",
|
|
171
|
-
"data-dismiss": "modal"
|
|
172
|
-
}, ot = {
|
|
185
|
+
}, te = { class: "modal-footer" }, se = {
|
|
173
186
|
key: 2,
|
|
174
187
|
type: "button",
|
|
175
188
|
class: "btn btn-success",
|
|
176
189
|
"data-dismiss": "modal"
|
|
177
190
|
};
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
return s.getDistributions.length > 1 && s.getCatalog.is_part_of !== "erpd" ? (
|
|
181
|
-
o.isLoadingAllDistributionFiles ? (
|
|
191
|
+
function oe(s, e, r, i, o, d) {
|
|
192
|
+
const t = I("pv-button");
|
|
193
|
+
return s.getDistributions.length > 1 && s.getCatalog.is_part_of !== "erpd" ? (m(), h("div", G, [
|
|
194
|
+
o.isLoadingAllDistributionFiles ? (m(), y(t, {
|
|
182
195
|
key: 0,
|
|
183
|
-
small:
|
|
196
|
+
small: r.small,
|
|
184
197
|
rounded: !0,
|
|
185
|
-
primary:
|
|
198
|
+
primary: r.primary,
|
|
186
199
|
download: !0,
|
|
187
|
-
class: "download-all-btn"
|
|
188
|
-
"data-toggle": "modal",
|
|
189
|
-
"data-target": "#downloadAllModal"
|
|
200
|
+
class: "download-all-btn"
|
|
190
201
|
}, {
|
|
191
|
-
default: F(() =>
|
|
192
|
-
|
|
193
|
-
|
|
202
|
+
default: F(() => [
|
|
203
|
+
e[2] || (e[2] = l("div", { class: "loading-spinner" }, null, -1)),
|
|
204
|
+
w(" " + u(s.$t("message.datasetDetails.datasets.downloadAll")), 1)
|
|
205
|
+
]),
|
|
194
206
|
_: 1
|
|
195
|
-
}, 8, ["small", "primary"])) : (
|
|
207
|
+
}, 8, ["small", "primary"])) : (m(), y(t, {
|
|
196
208
|
key: 1,
|
|
197
209
|
class: "download-all-btn",
|
|
198
|
-
small:
|
|
210
|
+
small: r.small,
|
|
199
211
|
rounded: !0,
|
|
200
|
-
primary:
|
|
212
|
+
primary: r.primary,
|
|
201
213
|
download: !0,
|
|
202
|
-
action:
|
|
214
|
+
action: d.openRessourceAccessPopup
|
|
203
215
|
}, {
|
|
204
216
|
default: F(() => [
|
|
205
|
-
|
|
217
|
+
w(u(s.$t("message.datasetDetails.datasets.downloadAll")), 1)
|
|
206
218
|
]),
|
|
207
219
|
_: 1
|
|
208
220
|
}, 8, ["small", "primary", "action"])),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
t[3] || (t[3] = m()),
|
|
216
|
-
t[4] || (t[4] = i("button", {
|
|
217
|
-
type: "button",
|
|
218
|
-
class: "close",
|
|
219
|
-
"data-dismiss": "modal",
|
|
220
|
-
"aria-label": "Close"
|
|
221
|
-
}, [
|
|
222
|
-
i("span", { "aria-hidden": "true" }, "×")
|
|
223
|
-
], -1))
|
|
221
|
+
e[12] || (e[12] = w()),
|
|
222
|
+
l("div", P, [
|
|
223
|
+
l("div", N, [
|
|
224
|
+
l("div", q, [
|
|
225
|
+
l("div", j, [
|
|
226
|
+
l("h3", z, u(s.$t("message.datasetDetails.datasets.modal.downloadProgress")), 1)
|
|
224
227
|
]),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
228
|
+
e[10] || (e[10] = w()),
|
|
229
|
+
l("div", V, [
|
|
230
|
+
l("div", W, [
|
|
231
|
+
l("div", {
|
|
229
232
|
class: "progress-bar",
|
|
230
233
|
role: "progressbar",
|
|
231
|
-
style:
|
|
234
|
+
style: S({ width: `${o.downloadProgress}%` }),
|
|
232
235
|
"aria-valuenow": o.downloadProgress,
|
|
233
236
|
"aria-valuemin": "0",
|
|
234
237
|
"aria-valuemax": "100"
|
|
235
238
|
}, null, 12, H)
|
|
236
239
|
]),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
e[6] || (e[6] = w()),
|
|
241
|
+
l("div", null, u(s.$t("message.datasetDetails.datasets.modal.downloadingFiles")) + " " + u(o.downloadedFilesCounter.toLocaleString("fi")) + "/" + u(s.getDistributions.length.toLocaleString("fi")), 1),
|
|
242
|
+
e[7] || (e[7] = w()),
|
|
243
|
+
l("div", X, [
|
|
244
|
+
l("div", null, u(s.$t("message.datasetDetails.datasets.modal.notDownloaded")) + " " + u(o.failedDownloads.toLocaleString("fi")), 1),
|
|
245
|
+
e[3] || (e[3] = w()),
|
|
246
|
+
l("i", {
|
|
244
247
|
class: "material-icons help-icon",
|
|
245
248
|
"data-toggle": "tooltip",
|
|
246
249
|
"data-placement": "bottom",
|
|
247
250
|
title: s.$t("message.datasetDetails.datasets.modal.notDownloadedTooltip")
|
|
248
251
|
}, "help", 8, B)
|
|
249
252
|
]),
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
o.isLoadingAllDistributionFiles && o.numberOfFilesToZip > 0 ? (
|
|
253
|
+
e[8] || (e[8] = w()),
|
|
254
|
+
l("div", J, [
|
|
255
|
+
l("div", null, [
|
|
256
|
+
w(u(s.$t("message.datasetDetails.datasets.modal.zipNumberOfFiles", { number: o.numberOfFilesToZip.toLocaleString("fi") })) + " ", 1),
|
|
257
|
+
o.isLoadingAllDistributionFiles && o.numberOfFilesToZip > 0 ? (m(), h("span", K, u(s.$t("message.datasetDetails.datasets.modal.coupleOfMinutes")), 1)) : o.isLoadingAllDistributionFiles ? (m(), h("span", Q, u(s.$t("message.datasetDetails.datasets.modal.waitingForDownload")), 1)) : f("", !0)
|
|
255
258
|
]),
|
|
256
|
-
|
|
257
|
-
o.isGeneratingZip ? (
|
|
258
|
-
|
|
259
|
-
]))) : o.isGeneratingZipDone ? (
|
|
259
|
+
e[5] || (e[5] = w()),
|
|
260
|
+
o.isGeneratingZip ? (m(), h("div", Y, e[4] || (e[4] = [
|
|
261
|
+
l("span", { class: "sr-only" }, "Loading...", -1)
|
|
262
|
+
]))) : o.isGeneratingZipDone ? (m(), h("i", ee, "check_circle")) : f("", !0)
|
|
260
263
|
])
|
|
261
264
|
]),
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
t[11] || (t[11] = m()),
|
|
266
|
-
!o.downloadAllSuccess && !o.downloadAllError ? (w(), h("button", {
|
|
265
|
+
e[11] || (e[11] = w()),
|
|
266
|
+
l("div", te, [
|
|
267
|
+
!o.downloadAllSuccess && !o.downloadAllError ? (m(), h("button", {
|
|
267
268
|
key: 0,
|
|
268
269
|
type: "button",
|
|
269
270
|
class: "btn btn-danger",
|
|
270
271
|
"data-dismiss": "modal",
|
|
271
|
-
onClick:
|
|
272
|
-
}, u(s.$t("message.datasetDetails.datasets.modal.cancel")), 1)) :
|
|
272
|
+
onClick: e[0] || (e[0] = (a) => d.cancelDownloadAll(o.cancelDownloadAllAxiosRequestSource))
|
|
273
|
+
}, u(s.$t("message.datasetDetails.datasets.modal.cancel")), 1)) : f("", !0),
|
|
274
|
+
e[9] || (e[9] = w()),
|
|
275
|
+
o.downloadAllError ? (m(), h("button", {
|
|
273
276
|
key: 1,
|
|
274
277
|
type: "button",
|
|
275
278
|
class: "btn btn-danger",
|
|
276
|
-
onClick:
|
|
277
|
-
}, u(s.$t("message.datasetDetails.datasets.modal.error")), 1)) : o.downloadAllSuccess ? (
|
|
279
|
+
onClick: e[1] || (e[1] = (a) => d.trackAndDownloadAllDistributions())
|
|
280
|
+
}, u(s.$t("message.datasetDetails.datasets.modal.error")), 1)) : o.downloadAllSuccess ? (m(), h("button", se, u(s.$t("message.datasetDetails.datasets.modal.okay")), 1)) : f("", !0)
|
|
278
281
|
])
|
|
279
282
|
])
|
|
280
283
|
])
|
|
281
|
-
])
|
|
284
|
+
], 512)
|
|
282
285
|
])) : f("", !0);
|
|
283
286
|
}
|
|
284
|
-
const
|
|
287
|
+
const me = /* @__PURE__ */ x($, [["render", oe]]);
|
|
285
288
|
export {
|
|
286
|
-
|
|
289
|
+
me as default
|
|
287
290
|
};
|
|
288
291
|
//# sourceMappingURL=DownloadAllDistributions.vue.mjs.map
|