@eodash/eodash 5.1.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/client/components/DashboardLayout.vue +1 -2
- package/core/client/components/EodashOverlay.vue +4 -5
- package/core/client/components/MobileLayout.vue +42 -21
- package/core/client/composables/index.js +54 -60
- package/core/client/eodashSTAC/EodashCollection.js +199 -108
- package/core/client/eodashSTAC/auth.js +86 -0
- package/core/client/eodashSTAC/createLayers.js +234 -4
- package/core/client/eodashSTAC/helpers.js +281 -59
- package/core/client/eodashSTAC/parquet.js +0 -13
- package/core/client/eodashSTAC/triggers.js +1 -1
- package/core/client/store/actions.js +14 -0
- package/core/client/store/stac.js +46 -8
- package/core/client/store/states.js +6 -0
- package/core/client/types.ts +206 -3
- package/core/client/utils/bands-editor/arithmetic.js +144 -0
- package/core/client/utils/bands-editor/colors.js +36 -0
- package/core/client/utils/bands-editor/dom.js +196 -0
- package/core/client/utils/bands-editor/exampleSchema.json +1320 -0
- package/core/client/utils/bands-editor/index.js +68 -0
- package/core/client/utils/bands-editor/rgb.js +102 -0
- package/core/client/utils/index.js +5 -2
- package/core/client/views/Dashboard.vue +1 -1
- package/core/client/vite-env.d.ts +122 -0
- package/dist/client/{DashboardLayout-ByVs1DrY.js → DashboardLayout-Cq15p4TH.js} +5 -6
- package/dist/client/{DynamicWebComponent-C3W7HSQm.js → DynamicWebComponent-Cv-fPRG1.js} +1 -1
- package/dist/client/{EodashDatePicker-BIAf1sMT.js → EodashDatePicker-CPlJwEIO.js} +20 -22
- package/dist/client/{EodashItemFilter-DPznh8UB.js → EodashItemFilter-Ydebgbjj.js} +46 -31
- package/dist/client/EodashLayerControl-COhrkNEs.js +1517 -0
- package/dist/client/{EodashLayoutSwitcher-C5qTEffW.js → EodashLayoutSwitcher-pnKhTRZV.js} +4 -4
- package/dist/client/EodashMapBtns-Cj0Fx119.js +301 -0
- package/dist/client/{EodashStacInfo-CSvvF2jI.js → EodashStacInfo-Dadkg_Nj.js} +1 -1
- package/dist/client/EodashTimeSlider-CpoHX0S7.js +53 -0
- package/dist/client/{EodashTools-Cv1SXQ5y.js → EodashTools-UGBG7KC9.js} +10 -7
- package/dist/client/{ExportState-D-iuwaad.js → ExportState-GtJkAqeZ.js} +145 -121
- package/dist/client/{Footer-CyF0zRAk.js → Footer-D3ZPG5c4.js} +1 -1
- package/dist/client/{Header-CgD8jDKU.js → Header-z6AK-wpN.js} +2 -3
- package/dist/client/MobileLayout-BXNsNftb.js +118 -0
- package/dist/client/{PopUp-BsYLvWch.js → PopUp-BbQdjENV.js} +79 -44
- package/dist/client/{ProcessList-C2xsLU2_.js → ProcessList-C6VsdsYI.js} +18 -12
- package/dist/client/{VImg-OHe8YTs2.js → VImg-CxaMSB99.js} +203 -5
- package/dist/client/{VMain-PryTLU4a.js → VMain-Ds7yw0wj.js} +1 -1
- package/dist/client/{VTooltip-DZ0fjpB3.js → VTooltip-Cze6CEVh.js} +2 -3
- package/dist/client/{WidgetsContainer-B9LBadcC.js → WidgetsContainer-D66bj-JJ.js} +1 -1
- package/dist/client/asWebComponent-CWbNRdf9.js +8895 -0
- package/dist/client/{async-DkSu_u2K.js → async-BA7oWCMX.js} +69 -5
- package/dist/client/easing-CH0-9wR8.js +35 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{VOverlay-yUn7p-Uf.js → forwardRefs-BUfxOIo-.js} +308 -28
- package/dist/client/{handling-CgmFXkW6.js → handling-DlNTtKB-.js} +27 -6
- package/dist/client/{helpers-Dy0Q13tP.js → helpers-CtE0W7iu.js} +595 -278
- package/dist/client/{index-skjhlH8u.js → index-CeEZIjO6.js} +26 -13
- package/dist/client/{index-Ch_HchK3.js → index-CsKbRDeN.js} +238 -77
- package/dist/client/{index-Dqj4tbx2.js → index-D4_NRKrf.js} +2 -2
- package/dist/client/index-DeECc3lV.js +571 -0
- package/dist/client/material-symbols-outlined.woff2 +0 -0
- package/dist/client/material-symbols-rounded.woff2 +0 -0
- package/dist/client/material-symbols-sharp.woff2 +0 -0
- package/dist/client/material-symbols-subset.woff2 +0 -0
- package/dist/client/templates.js +106 -49
- package/dist/client/{transition-C98Yn4Vo.js → transition-Byvp3L6Y.js} +1 -1
- package/dist/node/cli.js +6 -6
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +24 -10
- package/dist/types/core/client/eodashSTAC/auth.d.ts +7 -0
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +15 -3
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +51 -15
- package/dist/types/core/client/plugins/vuetify.d.ts +14 -14
- package/dist/types/core/client/store/actions.d.ts +2 -0
- package/dist/types/core/client/store/stac.d.ts +16 -7
- package/dist/types/core/client/store/states.d.ts +4 -0
- package/dist/types/core/client/types.d.ts +171 -3
- package/dist/types/core/client/utils/bands-editor/arithmetic.d.ts +8 -0
- package/dist/types/core/client/utils/bands-editor/colors.d.ts +15 -0
- package/dist/types/core/client/utils/bands-editor/dom.d.ts +42 -0
- package/dist/types/core/client/utils/bands-editor/index.d.ts +20 -0
- package/dist/types/core/client/utils/bands-editor/rgb.d.ts +15 -0
- package/dist/types/core/client/utils/index.d.ts +1 -1
- package/dist/types/templates/baseConfig.d.ts +87 -1
- package/dist/types/templates/compare.d.ts +0 -25
- package/dist/types/templates/expert.d.ts +17 -21
- package/dist/types/templates/explore.d.ts +67 -0
- package/dist/types/templates/index.d.ts +1 -1
- package/dist/types/templates/{light.d.ts → lite.d.ts} +9 -0
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +21 -0
- package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +49 -0
- package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +4 -0
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +12 -0
- package/dist/types/widgets/EodashItemCatalog/types.d.ts +14 -0
- package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +6 -0
- package/dist/types/widgets/EodashMap/index.vue.d.ts +114 -0
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
- package/dist/types/widgets/EodashMap/methods/index.d.ts +1 -1
- package/dist/types/widgets/EodashProcess/methods/async.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
- package/dist/types/widgets/EodashTimeSlider.vue.d.ts +7 -0
- package/dist/types/widgets/EodashTools.vue.d.ts +10 -10
- package/dist/types/widgets/ExportState.vue.d.ts +2 -0
- package/package.json +31 -28
- package/templates/baseConfig.js +10 -5
- package/templates/compare.js +2 -22
- package/templates/expert.js +19 -18
- package/templates/explore.js +62 -0
- package/templates/index.js +1 -1
- package/templates/{light.js → lite.js} +11 -2
- package/widgets/EodashDatePicker.vue +15 -18
- package/widgets/EodashItemCatalog/index.vue +161 -0
- package/widgets/EodashItemCatalog/methods/filters.js +216 -0
- package/widgets/EodashItemCatalog/methods/handlers.js +50 -0
- package/widgets/EodashItemCatalog/methods/map.js +144 -0
- package/widgets/EodashItemCatalog/types.ts +15 -0
- package/widgets/EodashItemFilter.vue +35 -28
- package/widgets/EodashLayerControl.vue +10 -6
- package/widgets/EodashLayoutSwitcher.vue +1 -1
- package/widgets/EodashMap/EodashMapBtns.vue +278 -0
- package/widgets/EodashMap/index.vue +263 -38
- package/widgets/EodashMap/methods/create-layers-config.js +9 -6
- package/widgets/EodashMap/methods/index.js +27 -13
- package/widgets/EodashProcess/ProcessList.vue +13 -1
- package/widgets/EodashProcess/index.vue +17 -1
- package/widgets/EodashProcess/methods/async.js +22 -1
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +25 -3
- package/widgets/EodashProcess/methods/handling.js +2 -0
- package/widgets/EodashProcess/methods/outputs.js +1 -0
- package/widgets/EodashProcess/methods/utils.js +45 -1
- package/widgets/EodashTimeSlider.vue +40 -0
- package/widgets/EodashTools.vue +7 -3
- package/widgets/ExportState.vue +53 -22
- package/dist/client/EodashLayerControl-Bhxjw4V2.js +0 -154
- package/dist/client/EodashMapBtns-WoGq8MuV.js +0 -173
- package/dist/client/MobileLayout-EKQ_kpSh.js +0 -1226
- package/dist/client/asWebComponent-By_7_JjS.js +0 -19193
- package/dist/client/forwardRefs-BXxrv98s.js +0 -272
- package/dist/client/index-BuhOHXKv.js +0 -199
- package/widgets/EodashMapBtns.vue +0 -155
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="eodash-overlay"
|
|
2
|
+
<div class="eodash-overlay">
|
|
3
3
|
<p>
|
|
4
4
|
<a href="https://github.com/eodash/eodash" target="_blank"
|
|
5
5
|
>eodash v{{ version }}</a
|
|
@@ -41,10 +41,9 @@ const base64Logo = btoa(eoxLogo);
|
|
|
41
41
|
z-index: 9999;
|
|
42
42
|
pointer-events: none;
|
|
43
43
|
p {
|
|
44
|
-
position:
|
|
45
|
-
bottom:
|
|
46
|
-
left:
|
|
47
|
-
transform: translate(-50%, -50%);
|
|
44
|
+
position: fixed;
|
|
45
|
+
bottom: 6px;
|
|
46
|
+
left: 24px;
|
|
48
47
|
color: rgba(var(--v-theme-on-secondary), 1);
|
|
49
48
|
}
|
|
50
49
|
a {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-main class="overflow-hidden">
|
|
2
|
+
<v-main class="overflow-hidden pa-0">
|
|
3
3
|
<Suspense suspensible>
|
|
4
4
|
<component
|
|
5
5
|
id="bg-widget"
|
|
@@ -18,9 +18,17 @@
|
|
|
18
18
|
class="pa-2 panel bg-surface"
|
|
19
19
|
>
|
|
20
20
|
<div class="d-flex py-2 justify-end align-end">
|
|
21
|
-
<
|
|
22
|
-
|
|
21
|
+
<button
|
|
22
|
+
class="circle small transparent close-btn"
|
|
23
|
+
@click="activeIdx = -1"
|
|
23
24
|
>
|
|
25
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
26
|
+
<title>close</title>
|
|
27
|
+
<path
|
|
28
|
+
d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
</button>
|
|
24
32
|
</div>
|
|
25
33
|
<Suspense suspensible>
|
|
26
34
|
<div
|
|
@@ -37,20 +45,17 @@
|
|
|
37
45
|
</div>
|
|
38
46
|
</template>
|
|
39
47
|
|
|
40
|
-
<
|
|
41
|
-
ref="tabs"
|
|
42
|
-
align-tabs="center"
|
|
43
|
-
bg-color="surface"
|
|
44
|
-
class="tabs"
|
|
45
|
-
show-arrows
|
|
46
|
-
v-model="activeIdx"
|
|
47
|
-
>
|
|
48
|
+
<nav class="tabbed tabs">
|
|
48
49
|
<template v-for="(importedWidget, idx) in importedWidgets" :key="idx">
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
<a
|
|
51
|
+
v-if="importedWidget.value.component"
|
|
52
|
+
:class="{ active: activeIdx === idx }"
|
|
53
|
+
@click="activeIdx = activeIdx === idx ? -1 : idx"
|
|
54
|
+
>
|
|
55
|
+
<span>{{ importedWidget.value.title }}</span>
|
|
56
|
+
</a>
|
|
52
57
|
</template>
|
|
53
|
-
</
|
|
58
|
+
</nav>
|
|
54
59
|
</v-main>
|
|
55
60
|
</template>
|
|
56
61
|
<script setup>
|
|
@@ -63,8 +68,6 @@ const { mainRect } = useLayout();
|
|
|
63
68
|
|
|
64
69
|
const activeIdx = ref(-1);
|
|
65
70
|
|
|
66
|
-
/** @type {import("vue").Ref<import("vuetify/components").VTabs | null>} */
|
|
67
|
-
const tabs = ref(null);
|
|
68
71
|
const tabsHeightFromBtm = ref("");
|
|
69
72
|
const mainRectTopPx = ref("");
|
|
70
73
|
const mainRectBtmPx = ref("");
|
|
@@ -72,11 +75,22 @@ const mainRectBtmPx = ref("");
|
|
|
72
75
|
onMounted(() => {
|
|
73
76
|
mainRectTopPx.value = mainRect.value.top + "px";
|
|
74
77
|
mainRectBtmPx.value = (mainRect.value.bottom || 48) + "px";
|
|
75
|
-
tabsHeightFromBtm.value =
|
|
76
|
-
mainRect.value.bottom + (tabs.value?.$el?.clientHeight ?? 48) + "px";
|
|
78
|
+
tabsHeightFromBtm.value = mainRect.value.bottom + 48 + 32 + "px"; // 48px nav height + 32px bottom offset
|
|
77
79
|
});
|
|
78
80
|
</script>
|
|
79
81
|
<style scoped>
|
|
82
|
+
@import url("@eox/ui/style.css");
|
|
83
|
+
|
|
84
|
+
#bg-widget {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
width: 100%;
|
|
91
|
+
height: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
80
94
|
.panel {
|
|
81
95
|
bottom: v-bind("tabsHeightFromBtm");
|
|
82
96
|
top: v-bind("mainRectTopPx");
|
|
@@ -97,9 +111,16 @@ onMounted(() => {
|
|
|
97
111
|
}
|
|
98
112
|
|
|
99
113
|
.tabs {
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
position: fixed;
|
|
115
|
+
bottom: 32px;
|
|
116
|
+
left: 12px;
|
|
117
|
+
right: 12px;
|
|
118
|
+
width: calc(100% - 24px);
|
|
119
|
+
height: 48px;
|
|
102
120
|
z-index: 10;
|
|
121
|
+
background: white;
|
|
122
|
+
border-radius: 24px;
|
|
123
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
103
124
|
}
|
|
104
125
|
:deep(.bg-surface) {
|
|
105
126
|
backdrop-filter: blur(10px) !important;
|
|
@@ -22,6 +22,7 @@ import { setCollectionsPalette } from "@/utils";
|
|
|
22
22
|
import mustache from "mustache";
|
|
23
23
|
import { toAbsolute } from "stac-js/src/http.js";
|
|
24
24
|
import axios from "@/plugins/axios";
|
|
25
|
+
import { storeToRefs } from "pinia";
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
/** @type {import('@/types').Eodash | null}*/
|
|
@@ -57,68 +58,60 @@ export function useEodash() {
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @param {string} [rel=''] Default is `''`
|
|
63
|
-
* @param {string} [base=eodash.stacEndpoint] - Base URL, default value is the
|
|
64
|
-
* root stac catalog. Default is `eodash.stacEndpoint`
|
|
65
|
-
* @returns {import("vue").Ref<string>} - Returns `currentUrl`
|
|
66
|
-
* @see {@link '@/store/states.js'}
|
|
61
|
+
* @param {import("vue").Ref<string>} absoluteUrl
|
|
62
|
+
* @returns
|
|
67
63
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
const createUseAbsoluteUrl = (absoluteUrl) => {
|
|
65
|
+
/**
|
|
66
|
+
* Creates an absolute URL from a relative link and assignes it to `currentUrl`
|
|
67
|
+
*
|
|
68
|
+
* @param {string} [rel=''] Default is `''`
|
|
69
|
+
* @param {string} [base=eodash.stacEndpoint] - Base URL, default value is the
|
|
70
|
+
* root stac catalog. Default is `eodash.stacEndpoint`
|
|
71
|
+
* @returns {import("vue").Ref<string>} - Returns `currentUrl`
|
|
72
|
+
* @see {@link '@/store/states.js'}
|
|
73
|
+
*/
|
|
74
|
+
return (rel = "", base) => {
|
|
75
|
+
const { stacEndpoint, isApi } = storeToRefs(useSTAcStore());
|
|
76
|
+
if (!base) {
|
|
77
|
+
base = stacEndpoint.value ?? undefined;
|
|
78
|
+
if (!base) {
|
|
79
|
+
console.warn(
|
|
80
|
+
"[eodash] No base URL provided for absolute URL construction.",
|
|
81
|
+
);
|
|
82
|
+
return absoluteUrl;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (isApi.value) {
|
|
86
|
+
absoluteUrl.value = base + `/collections/${rel}`;
|
|
87
|
+
return absoluteUrl;
|
|
88
|
+
}
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
export const useCompareAbsoluteUrl = (
|
|
101
|
-
rel = "",
|
|
102
|
-
base = inject(eodashKey)?.stacEndpoint,
|
|
103
|
-
) => {
|
|
104
|
-
if (!rel || rel.includes("http") || !base) {
|
|
105
|
-
currentCompareUrl.value = rel;
|
|
106
|
-
return currentCompareUrl;
|
|
107
|
-
}
|
|
90
|
+
if (rel.includes("http")) {
|
|
91
|
+
absoluteUrl.value = rel;
|
|
92
|
+
return absoluteUrl;
|
|
93
|
+
}
|
|
94
|
+
if (!rel) {
|
|
95
|
+
absoluteUrl.value = base;
|
|
96
|
+
return absoluteUrl;
|
|
97
|
+
}
|
|
108
98
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
const st = base.split("/");
|
|
100
|
+
const arr = rel.split("/");
|
|
101
|
+
st.pop();
|
|
112
102
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
for (let i = 0; i < arr.length; i++) {
|
|
104
|
+
if (arr[i] == ".") continue;
|
|
105
|
+
if (arr[i] == "..") st.pop();
|
|
106
|
+
else st.push(arr[i]);
|
|
107
|
+
}
|
|
118
108
|
|
|
119
|
-
|
|
120
|
-
|
|
109
|
+
absoluteUrl.value = st.join("/");
|
|
110
|
+
return absoluteUrl;
|
|
111
|
+
};
|
|
121
112
|
};
|
|
113
|
+
export const useAbsoluteUrl = createUseAbsoluteUrl(currentUrl);
|
|
114
|
+
export const useCompareAbsoluteUrl = createUseAbsoluteUrl(currentCompareUrl);
|
|
122
115
|
|
|
123
116
|
/**
|
|
124
117
|
* Updates an existing Vuetify theme. updates only the values provided in the
|
|
@@ -178,7 +171,6 @@ export const useURLSearchParametersSync = () => {
|
|
|
178
171
|
}
|
|
179
172
|
case "indicator": {
|
|
180
173
|
log.debug("Found indicator key in url");
|
|
181
|
-
const eodash = inject(eodashKey);
|
|
182
174
|
const match = store.stac?.find(
|
|
183
175
|
(link) => useGetSubCodeId(link) == value,
|
|
184
176
|
);
|
|
@@ -187,7 +179,7 @@ export const useURLSearchParametersSync = () => {
|
|
|
187
179
|
if (searchParams.has("poi")) {
|
|
188
180
|
const indicatorUrl = toAbsolute(
|
|
189
181
|
match.href,
|
|
190
|
-
|
|
182
|
+
store.stacEndpoint ?? "",
|
|
191
183
|
);
|
|
192
184
|
// fetch indicator stac collection without rendering it
|
|
193
185
|
/** @type {import("stac-ts").StacCollection} */
|
|
@@ -224,7 +216,9 @@ export const useURLSearchParametersSync = () => {
|
|
|
224
216
|
await store.loadSelectedSTAC(poiAbsoluteUrl, true);
|
|
225
217
|
}
|
|
226
218
|
} else {
|
|
227
|
-
await store.loadSelectedSTAC(
|
|
219
|
+
await store.loadSelectedSTAC(
|
|
220
|
+
/** @type {string} */ (store.isApi ? match.id : match.href),
|
|
221
|
+
);
|
|
228
222
|
}
|
|
229
223
|
}
|
|
230
224
|
break;
|
|
@@ -384,7 +378,7 @@ export const useEmitLayersUpdate = async (event, mapEl, layers) => {
|
|
|
384
378
|
return;
|
|
385
379
|
}
|
|
386
380
|
|
|
387
|
-
|
|
381
|
+
mapEl.map.once("loadend", async () => {
|
|
388
382
|
await emit();
|
|
389
383
|
res(true);
|
|
390
384
|
});
|