@piveau/piveau-hub-ui-modules 4.6.6 → 4.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +83 -59
  2. package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
  3. package/dist/data-provider-interface/composables/useFormSchema.d.ts +5 -1
  4. package/dist/data-provider-interface/composables/useFormSchema.mjs +28 -30
  5. package/dist/data-provider-interface/composables/useFormSchema.mjs.map +1 -1
  6. package/dist/data-provider-interface/utils/translation-helper.mjs +18 -19
  7. package/dist/data-provider-interface/utils/translation-helper.mjs.map +1 -1
  8. package/dist/data-provider-interface/views/InputPage.vue.mjs +60 -59
  9. package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
  10. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.d.ts +1 -0
  11. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs +45 -35
  12. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs.map +1 -1
  13. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue2.mjs +2 -2
  14. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue.d.ts +35 -0
  15. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue.mjs +102 -0
  16. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue.mjs.map +1 -0
  17. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue2.mjs +5 -0
  18. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue2.mjs.map +1 -0
  19. package/dist/piveau-hub-ui-modules.css +1 -1
  20. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- const _ = "";
1
+ const e = "";
2
2
  export {
3
- _ as default
3
+ e as default
4
4
  };
5
5
  //# sourceMappingURL=DistributionActions.vue2.mjs.map
@@ -0,0 +1,35 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ isUrlInvalid?: any;
3
+ distribution?: any;
4
+ getVisualisationLink?: any;
5
+ previewLinkCallback?: any;
6
+ openIfValidUrl?: any;
7
+ showTooltipVisualiseButton?: any;
8
+ }, {}, {
9
+ showVisualisationButton: any;
10
+ visualisationLinkFormats: string[];
11
+ geoLinkFormats: {
12
+ wms: string;
13
+ geojson: string;
14
+ fiware_cb: string;
15
+ 'fiware-cb': string;
16
+ };
17
+ geoLink: any;
18
+ }, {
19
+ getGeoLink(): any;
20
+ getCatalog: import('vuex').Computed;
21
+ getID: import('vuex').Computed;
22
+ }, {
23
+ showGeoLink(distribution: any): boolean;
24
+ showVisualisationLink(distribution: any): any;
25
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
26
+ isUrlInvalid?: any;
27
+ distribution?: any;
28
+ getVisualisationLink?: any;
29
+ previewLinkCallback?: any;
30
+ openIfValidUrl?: any;
31
+ showTooltipVisualiseButton?: any;
32
+ }> & Readonly<{}>, {}, {}, {
33
+ AppLink: any;
34
+ }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
35
+ export default _default;
@@ -0,0 +1,102 @@
1
+ import g from "../../../widgets/AppLink.vue.mjs";
2
+ import { has as n, isNil as i } from "lodash-es";
3
+ import { mapGetters as k } from "vuex";
4
+ import { openBlock as r, createElementBlock as c, toDisplayString as m } from "vue";
5
+ import "./DistributionVisualizeButton.vue2.mjs";
6
+ import p from "../../../_virtual/_plugin-vue_export-helper.mjs";
7
+ const d = {
8
+ name: "DistributionVisualizeButton",
9
+ components: {
10
+ AppLink: g
11
+ },
12
+ props: [
13
+ "showTooltipVisualiseButton",
14
+ "isUrlInvalid",
15
+ "getVisualisationLink",
16
+ "distribution",
17
+ "openIfValidUrl",
18
+ "previewLinkCallback"
19
+ ],
20
+ data() {
21
+ var e, t, s, a;
22
+ return {
23
+ showVisualisationButton: (e = this.$env.content.datasetDetails.distributions) == null ? void 0 : e.showVisualisation,
24
+ visualisationLinkFormats: [
25
+ "csv",
26
+ "tsv",
27
+ "ods",
28
+ "xlsx",
29
+ "xls"
30
+ ],
31
+ geoLinkFormats: {
32
+ wms: "WMS",
33
+ geojson: "GeoJSON",
34
+ fiware_cb: "fiware_cb",
35
+ "fiware-cb": "fiware_cb"
36
+ },
37
+ geoLink: (a = (s = (t = this.$env) == null ? void 0 : t.datasetDetails) == null ? void 0 : s.distributions) == null ? void 0 : a.geoLink
38
+ };
39
+ },
40
+ computed: {
41
+ ...k("datasetDetails", [
42
+ "getCatalog",
43
+ "getID"
44
+ ]),
45
+ getGeoLink() {
46
+ var s;
47
+ let t = this.distribution.format.label.toLowerCase();
48
+ if (t = this.geoLinkFormats[t], this.geoLink) {
49
+ const a = {
50
+ catalog: this.getCatalog.id,
51
+ dataset: this.getID,
52
+ distribution: this.distribution.id,
53
+ type: t,
54
+ lang: this.$route.query.locale,
55
+ accessUrl: (s = this.distribution) == null ? void 0 : s.accessUrl[0]
56
+ };
57
+ for (let o in a)
58
+ this.geoLink = this.geoLink.replace(`{${o}}`, a[o]);
59
+ return this.geoLink;
60
+ }
61
+ return `/geo-viewer/?catalog=${this.getCatalog.id}&dataset=${this.getID}&distribution=${this.distribution.id}&type=${t}&lang=${this.$route.query.locale}`;
62
+ }
63
+ },
64
+ methods: {
65
+ showGeoLink(e) {
66
+ if (!n(e, "format.label") || i(e.format.label) || !n(e, "id") || i(e.id) || !n(e, "accessUrl[0]"))
67
+ return !1;
68
+ const t = e.format.label.toLowerCase();
69
+ return Object.keys(this.geoLinkFormats).includes(t);
70
+ },
71
+ showVisualisationLink(e) {
72
+ var s, a, o;
73
+ if (!n(e, "format.label") || i((s = e == null ? void 0 : e.format) == null ? void 0 : s.label) || i(e == null ? void 0 : e.downloadUrls[0]) && i(e == null ? void 0 : e.accessUrl[0]))
74
+ return !1;
75
+ const t = (o = (a = e == null ? void 0 : e.format) == null ? void 0 : a.id) == null ? void 0 : o.toLowerCase();
76
+ return t && this.visualisationLinkFormats.includes(t);
77
+ }
78
+ }
79
+ }, h = { class: "position-relative d-inline-block ml-1 mb-1" }, u = ["href"], w = {
80
+ key: 2,
81
+ class: "d-flex justify-content-between p-0 pl-2 pr-2 w-100 rounded-lg btn-color dropdown-button text-opacity-0"
82
+ };
83
+ function L(e, t, s, a, o, l) {
84
+ return r(), c("div", h, [
85
+ o.showVisualisationButton && l.showVisualisationLink(s.distribution) ? (r(), c("div", {
86
+ key: 0,
87
+ class: "distribution-action btn btn-sm visualise-btn pt-0",
88
+ onClick: t[0] || (t[0] = (f) => e.$emit("displayVisualisation", e.getDownloadUrl))
89
+ }, m(e.$t("message.datasetDetails.preview")), 1)) : l.showGeoLink(s.distribution) ? (r(), c("a", {
90
+ key: 1,
91
+ onClick: t[1] || (t[1] = (f) => e.$emit("track-link", l.getGeoLink, "link")),
92
+ href: l.getGeoLink,
93
+ target: "_blank",
94
+ class: "d-flex justify-content-between btn btn-sm btn-primary p-0 pl-2 pr-2 w-100 rounded-lg btn-color dropdown-button"
95
+ }, m(e.$t("message.datasetDetails.preview")), 9, u)) : (r(), c("span", w, m(e.$t("message.datasetDetails.preview")), 1))
96
+ ]);
97
+ }
98
+ const _ = /* @__PURE__ */ p(d, [["render", L], ["__scopeId", "data-v-fc58797b"]]);
99
+ export {
100
+ _ as default
101
+ };
102
+ //# sourceMappingURL=DistributionVisualizeButton.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DistributionVisualizeButton.vue.mjs","sources":["../../../../lib/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue"],"sourcesContent":["<template>\n <div class=\"position-relative d-inline-block ml-1 mb-1\">\n <div v-if=\"showVisualisationButton && showVisualisationLink(distribution)\" class=\"distribution-action btn btn-sm visualise-btn pt-0\" @click=\"$emit('displayVisualisation', getDownloadUrl)\">{{ $t('message.datasetDetails.preview') }}</div>\n <a @click=\"$emit('track-link', getGeoLink, 'link')\"\n v-else-if=\"showGeoLink(distribution)\"\n :href=\"getGeoLink\"\n target=\"_blank\"\n class=\"d-flex justify-content-between btn btn-sm btn-primary p-0 pl-2 pr-2 w-100 rounded-lg btn-color dropdown-button\">\n {{ $t('message.datasetDetails.preview') }}\n </a>\n <span v-else class=\"d-flex justify-content-between p-0 pl-2 pr-2 w-100 rounded-lg btn-color dropdown-button text-opacity-0\">{{ $t('message.datasetDetails.preview') }}</span>\n </div>\n </template>\n <script>\n import AppLink from \"../../../widgets/AppLink\";\n import {has, isNil} from \"lodash\";\n import {mapGetters} from \"vuex\";\n \n export default {\n name: \"DistributionVisualizeButton\",\n components: {\n AppLink,\n },\n props: [\n 'showTooltipVisualiseButton',\n 'isUrlInvalid',\n 'getVisualisationLink',\n 'distribution',\n 'openIfValidUrl',\n 'previewLinkCallback'\n ],\n data() {\n return {\n showVisualisationButton: this.$env.content.datasetDetails.distributions?.showVisualisation,\n visualisationLinkFormats: [\n 'csv',\n 'tsv',\n 'ods',\n 'xlsx',\n 'xls',\n ],\n geoLinkFormats: {\n wms: 'WMS',\n geojson: 'GeoJSON',\n fiware_cb: 'fiware_cb',\n 'fiware-cb': 'fiware_cb',\n },\n geoLink: this.$env?.datasetDetails?.distributions?.geoLink,\n };\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getCatalog',\n 'getID'\n ]),\n getGeoLink() {\n const format = this.distribution.format.label;\n let f = format.toLowerCase();\n // Use correct Case Sensitive strings\n f = this.geoLinkFormats[f];\n if (this.geoLink) {\n const geoLinkVariables = {\n catalog: this.getCatalog.id,\n dataset: this.getID,\n distribution: this.distribution.id,\n type: f,\n lang: this.$route.query.locale,\n accessUrl: this.distribution?.accessUrl[0],\n }\n // Inject variables into geo link\n for (let linkVariable in geoLinkVariables) {\n this.geoLink = this.geoLink.replace(`{${linkVariable}}`, geoLinkVariables[linkVariable]);\n }\n // Return Geo Visualisation Link\n return this.geoLink;\n // return `/geo-viewer/?dataset=${distributionID}&type=${f}&lang=${this.$route.query.locale}`;\n }\n // Return default Geo Visualisation Link if no link in user-config provided\n return `/geo-viewer/?catalog=${this.getCatalog.id}&dataset=${this.getID}&distribution=${this.distribution.id}&type=${f}&lang=${this.$route.query.locale}`;\n }\n },\n methods: {\n showGeoLink(distribution) {\n if (!has(distribution, 'format.label') || isNil(distribution.format.label) || !has(distribution, 'id') || isNil(distribution.id) || !has(distribution, 'accessUrl[0]')) return false;\n const f = distribution.format.label.toLowerCase();\n return Object.keys(this.geoLinkFormats).includes(f);\n },\n showVisualisationLink(distribution) {\n if (!has(distribution, 'format.label') || isNil(distribution?.format?.label)\n || (isNil(distribution?.downloadUrls[0]) && isNil(distribution?.accessUrl[0]))) return false;\n const f = distribution?.format?.id?.toLowerCase();\n return f && this.visualisationLinkFormats.includes(f);\n }\n }\n }\n </script>\n <style scoped lang=\"scss\">\n .disabled {\n cursor: not-allowed;\n pointer-events: none;\n text-decoration: none;\n color: gray;\n }\n .text-opacity-0 {\n opacity: 0;\n cursor: default!important;\n }\n\n .visualise-btn {\n color: #0e47cb;\n vertical-align: text-bottom;\n text-decoration: none;\n }\n </style>\n "],"names":["_sfc_main","AppLink","_a","_d","_c","_b","mapGetters","f","geoLinkVariables","linkVariable","distribution","has","isNil","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","$data","$options","$props","_cache","$event","_ctx","_toDisplayString","_hoisted_3"],"mappings":";;;;;;AAkBE,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,SAAAC;AAAA,EACD;AAAA,EACD,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACD,OAAO;;AACL,WAAO;AAAA,MACL,0BAAyBC,IAAA,KAAK,KAAK,QAAQ,eAAe,kBAAjC,gBAAAA,EAAgD;AAAA,MACzE,0BAA0B;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACD,gBAAg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"}
@@ -0,0 +1,5 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
5
+ //# sourceMappingURL=DistributionVisualizeButton.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DistributionVisualizeButton.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}