@eodash/eodash 5.0.0-alpha.2.13 → 5.0.0-alpha.2.15
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/core/client/composables/index.js +36 -1
- package/core/client/eodash.js +27 -6
- package/core/client/store/States.js +4 -0
- package/core/client/store/stac.js +42 -2
- package/core/client/utils/createLayers.js +1 -1
- package/core/client/utils/eodashSTAC.js +2 -4
- package/core/client/utils/helpers.js +0 -4
- package/dist/client/{DashboardLayout-v8_zE0jH.js → DashboardLayout-DQE4aB6e.js} +2 -2
- package/dist/client/{DynamicWebComponent-DSY-5Ke4.js → DynamicWebComponent-TrDsJuF8.js} +3 -3
- package/dist/client/{EodashDatePicker-C6VRIC7r.js → EodashDatePicker-CkA9rHp6.js} +4 -4
- package/dist/client/{EodashItemFilter-BBXcouVm.js → EodashItemFilter-Bp0lcvbI.js} +3609 -3555
- package/dist/client/EodashLayerControl-lfLYqyeU.js +20963 -0
- package/dist/client/{EodashMap-DY7I6iY4.js → EodashMap--2y6XErO.js} +39009 -63663
- package/dist/client/{EodashMapBtns-k00mMvVA.js → EodashMapBtns-BSf3iUAb.js} +2 -2
- package/dist/client/{ExportState-Cf40G0wJ.js → ExportState-BTONkMIz.js} +4 -4
- package/dist/client/{Footer-DrCAj7E9.js → Footer-B7JDXdxT.js} +1 -1
- package/dist/client/{Header-BZT87lHO.js → Header-Dlumetq0.js} +4 -4
- package/dist/client/{IframeWrapper-DTynglc_.js → IframeWrapper-DRjSqhFx.js} +1 -1
- package/dist/client/{MobileLayout-BymTNZp0.js → MobileLayout-9z2X_rmU.js} +6 -6
- package/dist/client/{PopUp-CwXUqqZg.js → PopUp-CXbMBYGh.js} +6 -6
- package/dist/client/{VImg-B-YTQawu.js → VImg-Dgk5tryv.js} +2 -2
- package/dist/client/{VMain-D7s76eFm.js → VMain-Ubv9jyyL.js} +2 -2
- package/dist/client/{VOverlay-DdGIY0gS.js → VOverlay-CqZC2CbA.js} +29 -29
- package/dist/client/{WidgetsContainer-CFR37y2l.js → WidgetsContainer-CHK_3dlD.js} +3 -3
- package/dist/client/{asWebComponent-C2Gm8JDg.js → asWebComponent-Ddg71BJk.js} +4081 -4034
- package/dist/client/{decoder-Cth6J7EK-DdAwx7Hm.js → decoder-DJlmx386-DJlmx386.js} +4 -6
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-BFBakSKN.js → forwardRefs-OX_5lLJW.js} +1 -1
- package/dist/client/{helpers-VeeVIAhm.js → helpers-BCawTwFg.js} +6 -7
- package/dist/client/{index-DAqRmdAt.js → index-B_KfD-iF.js} +5 -5
- package/dist/client/{lerc-BgbQqdFI-CNkQ6JUx.js → lerc-B4lXefGh-CplqAh1B.js} +33 -33
- package/dist/client/{ssrBoot-BBelCodY.js → ssrBoot-BZTPJZkq.js} +1 -1
- package/dist/client/{transition-CxxPQppy.js → transition-Dq8XIV_D.js} +1 -1
- package/package.json +5 -5
- package/widgets/EodashItemFilter.vue +83 -4
- package/widgets/EodashLayerControl.vue +2 -7
- package/widgets/EodashMap.vue +191 -123
- package/dist/client/EodashLayerControl-BtfpgLGi.js +0 -31500
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// functions of this folder can only be consumed inside setup stores,
|
|
2
2
|
// setup functions or vue composition api components
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
currentCompareUrl,
|
|
6
|
+
currentUrl,
|
|
7
|
+
datetime,
|
|
8
|
+
indicator,
|
|
9
|
+
mapPosition,
|
|
10
|
+
} from "@/store/States";
|
|
5
11
|
import eodash from "@/eodash";
|
|
6
12
|
import { useTheme } from "vuetify/lib/framework.mjs";
|
|
7
13
|
import { onMounted, watch } from "vue";
|
|
@@ -36,6 +42,35 @@ export const useAbsoluteUrl = (rel = "", base = eodash.stacEndpoint) => {
|
|
|
36
42
|
return currentUrl;
|
|
37
43
|
};
|
|
38
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Use the absolute compare URL from a relative link
|
|
47
|
+
*
|
|
48
|
+
* @param {string} [rel=''] Default is `''`
|
|
49
|
+
* @param {string} [base=eodash.stacEndpoint] - Base URL, default value is the
|
|
50
|
+
* root stac catalog. Default is `eodash.stacEndpoint`
|
|
51
|
+
* @returns {import("vue").Ref<string>} - Returns `currentUrl`
|
|
52
|
+
* @see {@link '@/store/States.js'}
|
|
53
|
+
*/
|
|
54
|
+
export const useCompareAbsoluteUrl = (rel = "", base = eodash.stacEndpoint) => {
|
|
55
|
+
if (!rel || rel.includes("http")) {
|
|
56
|
+
currentCompareUrl.value = base;
|
|
57
|
+
return currentCompareUrl;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const st = base.split("/");
|
|
61
|
+
const arr = rel.split("/");
|
|
62
|
+
st.pop();
|
|
63
|
+
|
|
64
|
+
for (let i = 0; i < arr.length; i++) {
|
|
65
|
+
if (arr[i] == ".") continue;
|
|
66
|
+
if (arr[i] == "..") st.pop();
|
|
67
|
+
else st.push(arr[i]);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
currentCompareUrl.value = st.join("/");
|
|
71
|
+
return currentCompareUrl;
|
|
72
|
+
};
|
|
73
|
+
|
|
39
74
|
/**
|
|
40
75
|
* Updates an existing Vuetify theme. updates only the values provided in the
|
|
41
76
|
* `ThemeDefinition`
|
package/core/client/eodash.js
CHANGED
|
@@ -44,6 +44,9 @@ export const eodash = reactive({
|
|
|
44
44
|
type: "internal",
|
|
45
45
|
widget: {
|
|
46
46
|
name: "EodashMap",
|
|
47
|
+
properties: {
|
|
48
|
+
// enableCompare: true,
|
|
49
|
+
},
|
|
47
50
|
},
|
|
48
51
|
},
|
|
49
52
|
widgets: [
|
|
@@ -54,6 +57,10 @@ export const eodash = reactive({
|
|
|
54
57
|
layout: { x: 0, y: 0, w: 3, h: 8 },
|
|
55
58
|
widget: {
|
|
56
59
|
name: "EodashItemFilter",
|
|
60
|
+
properties: {
|
|
61
|
+
// enableCompare: true,
|
|
62
|
+
aggregateResults: "collection_group",
|
|
63
|
+
},
|
|
57
64
|
},
|
|
58
65
|
},
|
|
59
66
|
{
|
|
@@ -78,13 +85,27 @@ export const eodash = reactive({
|
|
|
78
85
|
properties: {
|
|
79
86
|
for: currentUrl,
|
|
80
87
|
allowHtml: "true",
|
|
81
|
-
styleOverride:
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
styleOverride: `.single-property {columns: 1!important;}
|
|
89
|
+
h1 {margin:0px!important;font-size:16px!important;}
|
|
90
|
+
header h1:after {
|
|
91
|
+
content:' ';
|
|
92
|
+
display:block;
|
|
93
|
+
border:1px solid #d0d0d0;
|
|
94
|
+
}
|
|
95
|
+
h2 {font-size:15px}
|
|
96
|
+
h3 {font-size:14px}
|
|
97
|
+
summary {cursor: pointer;}
|
|
98
|
+
#properties li > .value { font-weight: normal !important;}
|
|
99
|
+
main {padding-bottom: 10px;}
|
|
100
|
+
.footer-container {line-height:1;}
|
|
101
|
+
.footer-container button {margin-top: -10px;}
|
|
102
|
+
.footer-container small {font-size:10px;line-height:1;}`,
|
|
103
|
+
header: '["title"]',
|
|
104
|
+
tags: '["themes"]',
|
|
84
105
|
subheader: "[]",
|
|
85
|
-
properties: '["
|
|
86
|
-
featured:
|
|
87
|
-
footer: "
|
|
106
|
+
properties: '["satellite","sensor","agency","extent"]',
|
|
107
|
+
featured: '["description","providers","assets","links"]',
|
|
108
|
+
footer: '["sci:citation"]',
|
|
88
109
|
},
|
|
89
110
|
tagName: "eox-stacinfo",
|
|
90
111
|
},
|
|
@@ -2,6 +2,10 @@ import { ref } from "vue";
|
|
|
2
2
|
|
|
3
3
|
/** Currently selected STAC endpoint */
|
|
4
4
|
export const currentUrl = ref("");
|
|
5
|
+
|
|
6
|
+
/** Currently selected compare STAC endpoint */
|
|
7
|
+
export const currentCompareUrl = ref("");
|
|
8
|
+
|
|
5
9
|
/** Currently selected datetime */
|
|
6
10
|
export const datetime = ref(new Date().toISOString());
|
|
7
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
2
|
import { inject, ref } from "vue";
|
|
3
3
|
import axios from "axios";
|
|
4
|
-
import { useAbsoluteUrl } from "@/composables/index";
|
|
4
|
+
import { useAbsoluteUrl, useCompareAbsoluteUrl } from "@/composables/index";
|
|
5
5
|
import { eodashKey } from "@/utils/keys";
|
|
6
6
|
import { indicator } from "@/store/States";
|
|
7
7
|
|
|
@@ -25,6 +25,18 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
25
25
|
*/
|
|
26
26
|
const selectedStac = ref(null);
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Selected STAC object.
|
|
30
|
+
*
|
|
31
|
+
* @type {import("vue").Ref<
|
|
32
|
+
* | import("stac-ts").StacCatalog
|
|
33
|
+
* | import("stac-ts").StacCollection
|
|
34
|
+
* | import("stac-ts").StacItem
|
|
35
|
+
* | null
|
|
36
|
+
* >}
|
|
37
|
+
*/
|
|
38
|
+
const selectedCompareStac = ref(null);
|
|
39
|
+
|
|
28
40
|
const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
|
|
29
41
|
|
|
30
42
|
/**
|
|
@@ -77,5 +89,33 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
77
89
|
});
|
|
78
90
|
}
|
|
79
91
|
|
|
80
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Fetches selected stac object and assign it to `selectedCompareStac`
|
|
94
|
+
*
|
|
95
|
+
* @async
|
|
96
|
+
* @param {string} relativePath - Stac link href
|
|
97
|
+
* @returns {Promise<void>}
|
|
98
|
+
* @see {@link selectedCompareStac}
|
|
99
|
+
*/
|
|
100
|
+
async function loadSelectedCompareSTAC(relativePath = "") {
|
|
101
|
+
const absoluteUrl = useCompareAbsoluteUrl(relativePath);
|
|
102
|
+
|
|
103
|
+
await axios
|
|
104
|
+
.get(absoluteUrl.value)
|
|
105
|
+
.then((resp) => {
|
|
106
|
+
selectedCompareStac.value = resp.data;
|
|
107
|
+
})
|
|
108
|
+
.catch((err) => {
|
|
109
|
+
throw new Error("error loading the selected comparison STAC", err);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
stac,
|
|
115
|
+
loadSTAC,
|
|
116
|
+
loadSelectedSTAC,
|
|
117
|
+
loadSelectedCompareSTAC,
|
|
118
|
+
selectedStac,
|
|
119
|
+
selectedCompareStac,
|
|
120
|
+
};
|
|
81
121
|
});
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
fetchStyle,
|
|
7
7
|
generateFeatures,
|
|
8
8
|
setMapProjFromCol,
|
|
9
|
-
uid,
|
|
10
9
|
} from "./helpers";
|
|
11
10
|
import { registerProjection } from "@/store/Actions";
|
|
12
11
|
import {
|
|
@@ -159,17 +158,16 @@ export class EodashCollection {
|
|
|
159
158
|
}
|
|
160
159
|
return data;
|
|
161
160
|
}, /** @type {Record<string,import('stac-ts').StacAsset>} */ ({}));
|
|
162
|
-
|
|
163
161
|
const isSupported =
|
|
164
162
|
item.links.some((link) => ["wms", "xyz"].includes(link.rel)) ||
|
|
165
163
|
Object.keys(dataAssets).length;
|
|
166
164
|
|
|
167
165
|
if (isSupported) {
|
|
168
166
|
jsonArray.push(
|
|
169
|
-
...createLayersFromLinks(
|
|
167
|
+
...createLayersFromLinks(item.id, title, item),
|
|
170
168
|
|
|
171
169
|
...(await createLayersFromDataAssets(
|
|
172
|
-
|
|
170
|
+
`${item.collection}_${item.id}_assets`,
|
|
173
171
|
title || this.#collectionStac?.title || item.id,
|
|
174
172
|
dataAssets,
|
|
175
173
|
style,
|
|
@@ -97,7 +97,6 @@ export function extractCollectionUrls(stacObject, basepath) {
|
|
|
97
97
|
// Indicator assumes Catalog-Collection-Collection-Item
|
|
98
98
|
// TODO: this is not the most stable test approach,
|
|
99
99
|
// we should discuss potential other approaches
|
|
100
|
-
|
|
101
100
|
if (stacObject?.links && stacObject?.links[1].rel === "item") {
|
|
102
101
|
collectionUrls.push(basepath);
|
|
103
102
|
} else if (stacObject?.links[1].rel === "child") {
|
|
@@ -111,9 +110,6 @@ export function extractCollectionUrls(stacObject, basepath) {
|
|
|
111
110
|
return collectionUrls;
|
|
112
111
|
}
|
|
113
112
|
|
|
114
|
-
export const uid = () =>
|
|
115
|
-
Date.now().toString(36) + Math.random().toString(36).substring(2);
|
|
116
|
-
|
|
117
113
|
/**
|
|
118
114
|
* Assign extracted roles to layer properties
|
|
119
115
|
* @param {Record<string,any>} properties
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as y, x as m, W as x, X as d, $ as t, a0 as r, a1 as l, a9 as _, a3 as n, a6 as u, a2 as c, a4 as p, d as h, a5 as g, F as f, a7 as v, ab as w } from "./asWebComponent-
|
|
2
|
-
import { V as k } from "./VMain-
|
|
1
|
+
import { _ as y, x as m, W as x, X as d, $ as t, a0 as r, a1 as l, a9 as _, a3 as n, a6 as u, a2 as c, a4 as p, d as h, a5 as g, F as f, a7 as v, ab as w } from "./asWebComponent-Ddg71BJk.js";
|
|
2
|
+
import { V as k } from "./VMain-Ubv9jyyL.js";
|
|
3
3
|
class A extends HTMLElement {
|
|
4
4
|
static get observedAttributes() {
|
|
5
5
|
return ["gap"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const h = { class: "d-flex flex-column fill-height overflow-auto" },
|
|
1
|
+
import { bF as i, aA as m, r as p, Z as d, aM as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-Ddg71BJk.js";
|
|
2
|
+
const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
|
|
3
3
|
__name: "DynamicWebComponent",
|
|
4
4
|
props: {
|
|
5
5
|
link: {
|
|
@@ -53,5 +53,5 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, E = {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
N as default
|
|
57
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as B, o as $, g as _, y as j, av as I, c as v, r as V, d as h, a as M, b as p, aw as R, ax as O, T as U, ay as F, x as H, Z as N, az as Y, aA as z, w as G, $ as w, a6 as W, a1 as y, a3 as C, aB as K, F as L, W as Z, a9 as k, aC as q, aD as J, t as S, a0 as T, M as D, aE as Q, V as P, aF as X, aG as x, aH as tt } from "./asWebComponent-
|
|
2
|
-
import { t as et, e as at } from "./helpers-
|
|
3
|
-
import { m as ot, V as E } from "./VOverlay-
|
|
4
|
-
import { b as nt, f as st } from "./forwardRefs-
|
|
1
|
+
import { p as B, o as $, g as _, y as j, av as I, c as v, r as V, d as h, a as M, b as p, aw as R, ax as O, T as U, ay as F, x as H, Z as N, az as Y, aA as z, w as G, $ as w, a6 as W, a1 as y, a3 as C, aB as K, F as L, W as Z, a9 as k, aC as q, aD as J, t as S, a0 as T, M as D, aE as Q, V as P, aF as X, aG as x, aH as tt } from "./asWebComponent-Ddg71BJk.js";
|
|
2
|
+
import { t as et, e as at } from "./helpers-BCawTwFg.js";
|
|
3
|
+
import { m as ot, V as E } from "./VOverlay-CqZC2CbA.js";
|
|
4
|
+
import { b as nt, f as st } from "./forwardRefs-OX_5lLJW.js";
|
|
5
5
|
const rt = B({
|
|
6
6
|
id: String,
|
|
7
7
|
text: String,
|