@eodash/eodash 5.0.0 → 5.2.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/README.md +1 -0
- package/core/client/App.vue +8 -2
- package/core/client/asWebComponent.js +5 -5
- package/core/client/components/DashboardLayout.vue +43 -26
- package/core/client/components/EodashOverlay.vue +5 -6
- package/core/client/components/ErrorAlert.vue +2 -2
- package/core/client/components/Footer.vue +4 -4
- package/core/client/components/Header.vue +3 -3
- package/core/client/components/MobileLayout.vue +47 -27
- package/core/client/composables/DefineEodash.js +38 -43
- package/core/client/composables/DefineTemplate.js +4 -2
- package/core/client/composables/DefineWidgets.js +14 -8
- package/core/client/composables/index.js +273 -23
- package/core/client/eodashSTAC/EodashCollection.js +84 -62
- package/core/client/eodashSTAC/createLayers.js +30 -0
- package/core/client/eodashSTAC/helpers.js +159 -28
- package/core/client/eodashSTAC/parquet.js +145 -0
- package/core/client/eodashSTAC/triggers.js +6 -3
- package/core/client/plugins/index.js +4 -3
- package/core/client/plugins/vuetify.js +3 -0
- package/core/client/store/actions.js +21 -4
- package/core/client/store/stac.js +93 -56
- package/core/client/store/states.js +15 -5
- package/core/client/types.ts +59 -43
- package/core/client/utils/index.js +79 -0
- package/core/client/utils/keys.js +2 -2
- package/core/client/utils/states.js +30 -5
- package/core/client/views/Dashboard.vue +36 -32
- package/core/client/vite-env.d.ts +7 -0
- package/dist/client/{DashboardLayout-CkWvOMOW.js → DashboardLayout-Dq9Kfe6O.js} +24 -13
- package/dist/client/{DynamicWebComponent-DYBbpvUK.js → DynamicWebComponent-DCBMXskE.js} +1 -1
- package/dist/client/{EodashDatePicker-CALmW3SI.js → EodashDatePicker-DtngxU6s.js} +59 -32
- package/dist/client/{EodashItemFilter-DlQiE713.js → EodashItemFilter-ClQebJQt.js} +20 -10
- package/dist/client/{EodashLayerControl-DEzEbft7.js → EodashLayerControl-BLBds28C.js} +29 -16
- package/dist/client/EodashLayoutSwitcher-DQ8SfVDd.js +61 -0
- package/dist/client/EodashMapBtns-B89_YBDw.js +326 -0
- package/dist/client/{EodashStacInfo-DPPxDkF6.js → EodashStacInfo-Dt1nF06x.js} +3 -18
- package/dist/client/{EodashTools-CUaL9s4H.js → EodashTools-DV5ykmWc.js} +13 -13
- package/dist/client/{ExportState-DjyIZVhl.js → ExportState-B6zZQUmE.js} +57 -52
- package/dist/client/{Footer-DyL0JoWt.js → Footer-DNhXs8k6.js} +15 -13
- package/dist/client/{Header-B5Dgty9l.js → Header-BjhN5JY4.js} +32 -28
- package/dist/client/MobileLayout-JelB6w1G.js +118 -0
- package/dist/client/{PopUp-BfB8s_ki.js → PopUp-CgpvNr3o.js} +18 -10
- package/dist/client/ProcessList-vecpxThi.js +198 -0
- package/dist/client/{VImg-FD1WVphJ.js → VImg-CETuikH2.js} +221 -26
- package/dist/client/{VMain-DJKG4SvM.js → VMain-Ci9DyaGU.js} +7 -7
- package/dist/client/{VTooltip-CfeefrXI.js → VTooltip-J4ac48X7.js} +12 -10
- package/dist/client/{WidgetsContainer-C2TaTdb6.js → WidgetsContainer-CCML4TyV.js} +1 -1
- package/dist/client/asWebComponent-ZyEzWOOf.js +19092 -0
- package/dist/client/async-B7jIrM53.js +804 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{VOverlay-BzOdRu9h.js → forwardRefs-BQclvjMq.js} +332 -28
- package/dist/client/handling-BS24aG1q.js +1227 -0
- package/dist/client/helpers-wXK7Ywio.js +4556 -0
- package/dist/client/index-4UCzZi8B.js +376 -0
- package/dist/client/{index-4CT7Tz83.js → index-9KR-G20t.js} +2 -2
- package/dist/client/{index-CIHH_3dW.js → index-B2XpdgR6.js} +227 -86
- 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/{ssrBoot-BP7SYRyC.js → ssrBoot-Zgc_Ttvi.js} +2 -2
- package/dist/client/templates.js +840 -0
- package/dist/client/transition-yBii4fu6.js +40 -0
- package/dist/node/cli.js +16 -6
- package/dist/node/types.d.ts +1 -1
- package/dist/types/core/client/App.vue.d.ts +2 -2
- package/dist/types/core/client/asWebComponent.d.ts +1 -1
- package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +1 -3
- package/dist/types/core/client/components/Footer.vue.d.ts +1 -105
- package/dist/types/core/client/components/IframeWrapper.vue.d.ts +1 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +1 -324
- package/dist/types/core/client/composables/DefineEodash.d.ts +2 -2
- package/dist/types/core/client/composables/DefineTemplate.d.ts +1 -1
- package/dist/types/core/client/composables/DefineWidgets.d.ts +4 -4
- package/dist/types/core/client/composables/index.d.ts +24 -2
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +9 -6
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +25 -5
- package/dist/types/core/client/eodashSTAC/parquet.d.ts +2 -0
- package/dist/types/core/client/plugins/vuetify.d.ts +7 -4
- package/dist/types/core/client/store/actions.d.ts +3 -2
- package/dist/types/core/client/store/stac.d.ts +16 -13
- package/dist/types/core/client/store/states.d.ts +14 -4
- package/dist/types/core/client/types.d.ts +46 -31
- package/dist/types/core/client/utils/index.d.ts +2 -0
- package/dist/types/core/client/utils/keys.d.ts +4 -4
- package/dist/types/core/client/utils/states.d.ts +59 -47
- package/dist/types/core/client/views/Dashboard.vue.d.ts +2 -2
- package/dist/types/templates/baseConfig.d.ts +4 -0
- package/dist/types/templates/compare.d.ts +185 -0
- package/dist/types/templates/expert.d.ts +147 -0
- package/dist/types/templates/index.d.ts +6 -0
- package/dist/types/templates/light.d.ts +154 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +1 -458
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +3 -3
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +14 -7
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +1 -3
- package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +12 -8
- package/dist/types/widgets/EodashMap/index.vue.d.ts +9 -4
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +8 -1
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +8 -4
- package/dist/types/widgets/EodashProcess/methods/async.d.ts +19 -18
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +3 -2
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/index.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.d.ts +6 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.d.ts +4 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +5 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/index.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +12 -5
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +72 -41
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +41 -21
- package/dist/types/widgets/EodashProcess/states.d.ts +11 -0
- package/dist/types/widgets/EodashProcess/types.d.ts +41 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +14 -14
- package/dist/types/widgets/EodashTools.vue.d.ts +3 -3
- package/dist/types/widgets/ExportState.vue.d.ts +1 -1
- package/dist/types/widgets/PopUp.vue.d.ts +11 -16
- package/dist/types/widgets/WidgetsContainer.vue.d.ts +3 -6
- package/package.json +55 -45
- package/templates/baseConfig.js +68 -0
- package/templates/compare.js +142 -0
- package/templates/expert.js +124 -0
- package/templates/index.js +8 -0
- package/templates/light.js +139 -0
- package/widgets/EodashDatePicker.vue +80 -31
- package/widgets/EodashItemFilter.vue +26 -11
- package/widgets/EodashLayerControl.vue +20 -11
- package/widgets/EodashLayoutSwitcher.vue +6 -3
- package/widgets/EodashMap/EodashMapBtns.vue +269 -0
- package/widgets/EodashMap/index.vue +255 -45
- package/widgets/EodashMap/methods/create-layers-config.js +4 -3
- package/widgets/EodashMap/methods/index.js +33 -23
- package/widgets/EodashProcess/ProcessList.vue +47 -11
- package/widgets/EodashProcess/index.vue +55 -20
- package/widgets/EodashProcess/methods/async.js +99 -60
- package/widgets/EodashProcess/methods/composables.js +21 -14
- package/widgets/EodashProcess/methods/custom-endpoints/chart/index.js +35 -0
- package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +275 -0
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +132 -0
- package/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.js +94 -0
- package/widgets/EodashProcess/methods/custom-endpoints/layers/index.js +33 -0
- package/widgets/EodashProcess/methods/handling.js +127 -80
- package/widgets/EodashProcess/methods/outputs.js +376 -125
- package/widgets/EodashProcess/methods/utils.js +442 -10
- package/widgets/EodashProcess/states.js +13 -0
- package/widgets/EodashProcess/types.ts +46 -0
- package/widgets/EodashStacInfo.vue +2 -17
- package/widgets/EodashTools.vue +13 -13
- package/widgets/WidgetsContainer.vue +1 -1
- package/core/client/eodash.js +0 -454
- package/dist/client/EodashLayoutSwitcher-CDeCV8F-.js +0 -52
- package/dist/client/EodashMapBtns-CktQCfa-.js +0 -131
- package/dist/client/MobileLayout-CRsg_5Q4.js +0 -1217
- package/dist/client/ProcessList-DTefwQZx.js +0 -484
- package/dist/client/asWebComponent-CLhcT715.js +0 -12479
- package/dist/client/eo-dash.css +0 -5
- package/dist/client/forwardRefs-Bon_Kku1.js +0 -245
- package/dist/client/index-Bm9cbtx5.js +0 -201
- package/dist/client/index-DiGDvTQU.js +0 -780
- package/dist/client/transition-C5I57hn6.js +0 -37
- package/dist/types/core/client/eodash.d.ts +0 -8
- package/widgets/EodashMapBtns.vue +0 -113
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
:attributes="attributes"
|
|
7
7
|
:masks="masks"
|
|
8
8
|
expanded
|
|
9
|
-
class="
|
|
9
|
+
class="overflow-auto"
|
|
10
10
|
style="background-color: transparent; max-width: 100%"
|
|
11
11
|
>
|
|
12
12
|
<template v-if="toggleCalendar" #default="{ inputValue, inputEvents }">
|
|
13
13
|
<div
|
|
14
|
-
class="
|
|
14
|
+
class="d-flex flex-row align-center justify-center pb-1"
|
|
15
15
|
style="overflow: hidden; width: 100%"
|
|
16
16
|
>
|
|
17
17
|
<v-btn
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
variant="text"
|
|
23
23
|
@click="jumpDate(true)"
|
|
24
24
|
class="py-2"
|
|
25
|
-
style="flex-shrink: 1"
|
|
25
|
+
style="flex-shrink: 1; padding: 0"
|
|
26
26
|
>
|
|
27
27
|
<v-icon :icon="[mdiRayEndArrow]" />
|
|
28
28
|
</v-btn>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
v-tooltip:bottom="'Set date to latest available dataset'"
|
|
53
53
|
@click="jumpDate(false)"
|
|
54
54
|
class="py-2"
|
|
55
|
-
style="flex-shrink: 1"
|
|
55
|
+
style="flex-shrink: 1; padding: 0"
|
|
56
56
|
>
|
|
57
57
|
<v-icon :icon="[mdiRayStartArrow]" />
|
|
58
58
|
</v-btn>
|
|
@@ -119,7 +119,6 @@ import {
|
|
|
119
119
|
reactive,
|
|
120
120
|
ref,
|
|
121
121
|
customRef,
|
|
122
|
-
toRef,
|
|
123
122
|
onMounted,
|
|
124
123
|
computed,
|
|
125
124
|
useTemplateRef,
|
|
@@ -127,9 +126,11 @@ import {
|
|
|
127
126
|
import { useSTAcStore } from "@/store/stac";
|
|
128
127
|
import { datetime } from "@/store/states";
|
|
129
128
|
import { mdiRayStartArrow, mdiRayEndArrow } from "@mdi/js";
|
|
130
|
-
import { eodashCollections,
|
|
129
|
+
import { eodashCollections, eodashCompareCollections } from "@/utils/states";
|
|
131
130
|
import log from "loglevel";
|
|
132
|
-
import {
|
|
131
|
+
import { useTransparentPanel } from "@/composables";
|
|
132
|
+
import { getDatetimeProperty } from "@/eodashSTAC/helpers";
|
|
133
|
+
import { storeToRefs } from "pinia";
|
|
133
134
|
|
|
134
135
|
const { lgAndDown } = useDisplay();
|
|
135
136
|
|
|
@@ -214,24 +215,49 @@ defineProps({
|
|
|
214
215
|
*/
|
|
215
216
|
const attributes = reactive([]);
|
|
216
217
|
|
|
217
|
-
const selectedStac =
|
|
218
|
+
const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
|
|
218
219
|
|
|
219
220
|
watch(
|
|
220
|
-
selectedStac,
|
|
221
|
-
async (updatedStac,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
221
|
+
[selectedStac, selectedCompareStac],
|
|
222
|
+
async ([updatedStac, updatedCompareStac]) => {
|
|
223
|
+
attributes.splice(0, attributes.length);
|
|
224
|
+
if (!updatedStac && !updatedCompareStac) {
|
|
225
|
+
log.debug("No STAC selected, clearing datepicker attributes");
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const attrs =
|
|
230
|
+
/** @type {Partial<import("v-calendar/dist/types/src/utils/attribute").AttributeConfig>[]} */ ([
|
|
231
|
+
...(await fetchCollectionsAttributes(eodashCollections)),
|
|
232
|
+
...(await fetchCollectionsAttributes(eodashCompareCollections)),
|
|
233
|
+
]);
|
|
234
|
+
attributes.push(...attrs);
|
|
235
|
+
},
|
|
236
|
+
{ immediate: true },
|
|
237
|
+
);
|
|
226
238
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCollections
|
|
242
|
+
*/
|
|
243
|
+
async function fetchCollectionsAttributes(eodashCollections) {
|
|
244
|
+
if (!eodashCollections || !eodashCollections.length) {
|
|
245
|
+
return [];
|
|
246
|
+
}
|
|
230
247
|
|
|
248
|
+
return await Promise.all(
|
|
249
|
+
eodashCollections.map((ec, idx) => {
|
|
250
|
+
return ec.fetchCollection().then(() => {
|
|
251
|
+
const dateProperty = getDatetimeProperty(ec.getItems());
|
|
252
|
+
if (!dateProperty) {
|
|
253
|
+
return [];
|
|
254
|
+
}
|
|
231
255
|
const dates = [
|
|
232
256
|
...new Set(
|
|
233
|
-
|
|
234
|
-
const parsed = Date.parse(
|
|
257
|
+
ec.getItems()?.reduce((valid, item) => {
|
|
258
|
+
const parsed = Date.parse(
|
|
259
|
+
/** @type {string} */ (item[dateProperty]),
|
|
260
|
+
);
|
|
235
261
|
if (parsed) {
|
|
236
262
|
valid.push(new Date(parsed));
|
|
237
263
|
}
|
|
@@ -239,12 +265,11 @@ watch(
|
|
|
239
265
|
}, /** @type {Date[]} */ ([])),
|
|
240
266
|
),
|
|
241
267
|
];
|
|
242
|
-
|
|
268
|
+
return {
|
|
243
269
|
key: "id-" + idx.toString() + Math.random().toString(16).slice(2),
|
|
244
270
|
dot: {
|
|
245
271
|
style: {
|
|
246
|
-
backgroundColor:
|
|
247
|
-
collectionsPalette[idx % collectionsPalette.length],
|
|
272
|
+
backgroundColor: ec.color,
|
|
248
273
|
},
|
|
249
274
|
},
|
|
250
275
|
dates,
|
|
@@ -254,13 +279,11 @@ watch(
|
|
|
254
279
|
"font-weight": "bold",
|
|
255
280
|
},
|
|
256
281
|
},
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
);
|
|
263
|
-
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
}),
|
|
285
|
+
);
|
|
286
|
+
}
|
|
264
287
|
/**
|
|
265
288
|
* @param {boolean} reverse
|
|
266
289
|
*/
|
|
@@ -295,7 +318,7 @@ onMounted(() => {
|
|
|
295
318
|
: "translate3d(0px,-80px,0)";
|
|
296
319
|
});
|
|
297
320
|
|
|
298
|
-
|
|
321
|
+
useTransparentPanel(rootEl);
|
|
299
322
|
</script>
|
|
300
323
|
<style>
|
|
301
324
|
.vc-popover-content {
|
|
@@ -320,7 +343,10 @@ makePanelTransparent(rootEl);
|
|
|
320
343
|
.datePicker {
|
|
321
344
|
position: absolute;
|
|
322
345
|
bottom: 0;
|
|
323
|
-
|
|
346
|
+
left: 0;
|
|
347
|
+
right: 0;
|
|
348
|
+
margin-inline: auto;
|
|
349
|
+
width: fit-content;
|
|
324
350
|
}
|
|
325
351
|
}
|
|
326
352
|
.vc-day-content {
|
|
@@ -335,4 +361,27 @@ makePanelTransparent(rootEl);
|
|
|
335
361
|
.vc-popover-content-wrapper {
|
|
336
362
|
transform: v-bind("transform") !important;
|
|
337
363
|
}
|
|
364
|
+
|
|
365
|
+
.vc-date-picker-content,
|
|
366
|
+
.datePicker {
|
|
367
|
+
backdrop-filter: blur(10px) !important;
|
|
368
|
+
border-radius: 8px;
|
|
369
|
+
border: none;
|
|
370
|
+
box-shadow:
|
|
371
|
+
0px 0px 1px rgba(24, 39, 75, 0.22),
|
|
372
|
+
0px 6px 12px -6px rgba(24, 39, 75, 0.12),
|
|
373
|
+
0px 8px 24px -4px rgba(24, 39, 75, 0.08);
|
|
374
|
+
background-color: rgba(
|
|
375
|
+
var(--v-theme-surface),
|
|
376
|
+
var(--v-surface-opacity, 0.8)
|
|
377
|
+
) !important;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.vc-popover-caret.direction-top.align-left {
|
|
381
|
+
clip-path: polygon(0% 0%, 100% 0%, 0% 100%, 0% 100%);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.vc-bordered {
|
|
385
|
+
border: none;
|
|
386
|
+
}
|
|
338
387
|
</style>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
<script setup>
|
|
16
16
|
import { useSTAcStore } from "@/store/stac";
|
|
17
|
+
import { isFirstLoad } from "@/utils/states";
|
|
17
18
|
import "@eox/itemfilter";
|
|
18
|
-
|
|
19
19
|
import { computed, ref } from "vue";
|
|
20
|
-
import { useDisplay } from "vuetify/lib/framework.mjs";
|
|
21
20
|
|
|
21
|
+
const store = useSTAcStore();
|
|
22
22
|
const emit = defineEmits(["select"]);
|
|
23
23
|
|
|
24
24
|
const props = defineProps({
|
|
@@ -61,6 +61,7 @@ const props = defineProps({
|
|
|
61
61
|
enableHighlighting: { type: Boolean, default: true },
|
|
62
62
|
expandMultipleFilters: { type: Boolean, default: true },
|
|
63
63
|
expandMultipleResults: { type: Boolean, default: true },
|
|
64
|
+
styleOverride: { type: String, default: "" },
|
|
64
65
|
filterProperties: {
|
|
65
66
|
/** @type {import("vue").PropType<{
|
|
66
67
|
* keys:string[];
|
|
@@ -72,13 +73,15 @@ const props = defineProps({
|
|
|
72
73
|
default: () => [
|
|
73
74
|
{
|
|
74
75
|
keys: ["title", "themes", "description"],
|
|
75
|
-
title: "Search",
|
|
76
|
+
title: "Search by name or description",
|
|
76
77
|
type: "text",
|
|
78
|
+
expanded: true,
|
|
77
79
|
},
|
|
78
80
|
{
|
|
79
81
|
key: "themes",
|
|
80
|
-
title: "
|
|
82
|
+
title: "Filter by theme",
|
|
81
83
|
type: "multiselect",
|
|
84
|
+
expanded: true,
|
|
82
85
|
},
|
|
83
86
|
],
|
|
84
87
|
},
|
|
@@ -88,8 +91,10 @@ const props = defineProps({
|
|
|
88
91
|
*/
|
|
89
92
|
const selectIndicator = async (item) => {
|
|
90
93
|
if (item) {
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
if (isFirstLoad.value) {
|
|
95
|
+
// prevent the map from jumping to the initial position
|
|
96
|
+
isFirstLoad.value = false;
|
|
97
|
+
}
|
|
93
98
|
await store.loadSelectedSTAC(item.href);
|
|
94
99
|
emit("select", item);
|
|
95
100
|
} else {
|
|
@@ -104,7 +109,7 @@ const selectCompareIndicator = (item) => {
|
|
|
104
109
|
store.loadSelectedCompareSTAC(item.href);
|
|
105
110
|
emit("select", item);
|
|
106
111
|
} else {
|
|
107
|
-
|
|
112
|
+
store.resetSelectedCompareSTAC();
|
|
108
113
|
}
|
|
109
114
|
};
|
|
110
115
|
/** @param {any} evt*/
|
|
@@ -116,7 +121,7 @@ const onSelect = async (evt) => {
|
|
|
116
121
|
selectIndicator(item);
|
|
117
122
|
}
|
|
118
123
|
};
|
|
119
|
-
|
|
124
|
+
|
|
120
125
|
const config = computed(() => ({
|
|
121
126
|
titleProperty: props.titleProperty,
|
|
122
127
|
enableHighlighting: props.enableHighlighting,
|
|
@@ -127,10 +132,20 @@ const config = computed(() => ({
|
|
|
127
132
|
imageProperty: props.imageProperty,
|
|
128
133
|
aggregateResults: props.aggregateResults,
|
|
129
134
|
style: props.cssVars,
|
|
130
|
-
filterProperties:
|
|
135
|
+
filterProperties: props.filterProperties,
|
|
136
|
+
styleOverride: props.styleOverride,
|
|
131
137
|
}));
|
|
132
138
|
/** @type {import("vue").Ref<HTMLElement & Record<string,any> | null>} */
|
|
133
139
|
const eoxItemFilter = ref(null);
|
|
134
|
-
|
|
135
|
-
const store = useSTAcStore();
|
|
136
140
|
</script>
|
|
141
|
+
|
|
142
|
+
<style scoped>
|
|
143
|
+
eox-itemfilter {
|
|
144
|
+
--form-flex-direction: row;
|
|
145
|
+
}
|
|
146
|
+
@media (max-width: 768px) {
|
|
147
|
+
eox-itemfilter {
|
|
148
|
+
--form-flex-direction: column;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span class="d-flex flex-column
|
|
2
|
+
<span class="d-flex flex-column">
|
|
3
3
|
<eox-layercontrol
|
|
4
4
|
v-if="showControls"
|
|
5
|
+
:key="mapElement"
|
|
5
6
|
v-bind="config"
|
|
6
7
|
:for="mapElement"
|
|
7
8
|
@datetime:updated="debouncedHandleDateTime"
|
|
8
|
-
class="fill-height"
|
|
9
9
|
toolsAsList="true"
|
|
10
10
|
style="--eox-background-color: transparent"
|
|
11
11
|
ref="eoxLayercontrol"
|
|
12
12
|
@layerConfig:change="onLayerConfigChange"
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
>
|
|
14
|
+
<slot name="layerstitle">
|
|
15
|
+
<div>
|
|
16
|
+
<p v-if="title" class="mt-2 mb-2">
|
|
17
|
+
<strong>{{ title }}</strong>
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
</slot>
|
|
21
|
+
</eox-layercontrol>
|
|
15
22
|
</span>
|
|
16
23
|
</template>
|
|
17
24
|
<script setup>
|
|
@@ -44,6 +51,10 @@ const props = defineProps({
|
|
|
44
51
|
type: Array,
|
|
45
52
|
default: () => ["datetime", "info", "config", "legend", "opacity"],
|
|
46
53
|
},
|
|
54
|
+
title: {
|
|
55
|
+
type: String || Boolean,
|
|
56
|
+
default: "Layers",
|
|
57
|
+
},
|
|
47
58
|
cssVars: {
|
|
48
59
|
type: Object,
|
|
49
60
|
},
|
|
@@ -79,7 +90,6 @@ const handleDatetimeUpdate = async (evt) => {
|
|
|
79
90
|
let updatedLayers = [];
|
|
80
91
|
|
|
81
92
|
if (ec) {
|
|
82
|
-
await ec.fetchCollection();
|
|
83
93
|
updatedLayers = await ec.updateLayerJson(
|
|
84
94
|
datetime,
|
|
85
95
|
layer.get("id"),
|
|
@@ -128,10 +138,9 @@ const onLayerConfigChange = (evt) => {
|
|
|
128
138
|
layerControlFormValue.value = evt.detail.jsonformValue;
|
|
129
139
|
}
|
|
130
140
|
};
|
|
131
|
-
|
|
132
|
-
const styleOverride = `
|
|
133
|
-
input[type="range"] {
|
|
134
|
-
background:transparent !important;
|
|
135
|
-
}
|
|
136
|
-
`;
|
|
137
141
|
</script>
|
|
142
|
+
<style scoped>
|
|
143
|
+
eox-layercontrol {
|
|
144
|
+
overflow: auto;
|
|
145
|
+
}
|
|
146
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div ref="rootRef">
|
|
3
|
-
<v-tooltip :text="`Switch to ${target} mode`">
|
|
3
|
+
<v-tooltip v-if="!mobile" :text="`Switch to ${target} mode`">
|
|
4
4
|
<template v-slot:activator="{ props }">
|
|
5
5
|
<v-icon
|
|
6
6
|
v-bind="props"
|
|
@@ -9,15 +9,18 @@
|
|
|
9
9
|
></v-icon>
|
|
10
10
|
</template>
|
|
11
11
|
</v-tooltip>
|
|
12
|
+
<v-icon v-else @click="activeTemplate = target" :icon="[icon]"></v-icon>
|
|
12
13
|
</div>
|
|
13
14
|
</template>
|
|
14
15
|
|
|
15
16
|
<script setup>
|
|
16
17
|
import { activeTemplate } from "@/store/states";
|
|
17
18
|
import { mdiViewDashboard } from "@mdi/js";
|
|
18
|
-
import {
|
|
19
|
+
import { useTransparentPanel } from "@/composables";
|
|
19
20
|
import { ref } from "vue";
|
|
21
|
+
import { useDisplay } from "vuetify/lib/composables/display";
|
|
20
22
|
|
|
23
|
+
const { mobile } = useDisplay();
|
|
21
24
|
defineProps({
|
|
22
25
|
target: {
|
|
23
26
|
type: String,
|
|
@@ -32,5 +35,5 @@ defineProps({
|
|
|
32
35
|
|
|
33
36
|
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
34
37
|
const rootRef = ref(null);
|
|
35
|
-
|
|
38
|
+
useTransparentPanel(rootRef);
|
|
36
39
|
</script>
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="rootRef" class="map-buttons d-flex flex-column align-end">
|
|
3
|
+
<button
|
|
4
|
+
v-if="enableZoom"
|
|
5
|
+
class="primary small circle small-elevate"
|
|
6
|
+
@click="onMapZoomIn"
|
|
7
|
+
>
|
|
8
|
+
<i class="small"
|
|
9
|
+
><svg viewBox="0 0 24 24"><path :d="mdiPlus" /></svg
|
|
10
|
+
></i>
|
|
11
|
+
<div class="tooltip left">Zoom in</div>
|
|
12
|
+
</button>
|
|
13
|
+
|
|
14
|
+
<button
|
|
15
|
+
v-if="enableZoom"
|
|
16
|
+
class="primary small circle small-elevate"
|
|
17
|
+
@click="onMapZoomOut"
|
|
18
|
+
>
|
|
19
|
+
<i class="small"
|
|
20
|
+
><svg viewBox="0 0 24 24"><path :d="mdiMinus" /></svg
|
|
21
|
+
></i>
|
|
22
|
+
<div class="tooltip left">Zoom out</div>
|
|
23
|
+
</button>
|
|
24
|
+
|
|
25
|
+
<button
|
|
26
|
+
v-if="exportMap"
|
|
27
|
+
class="primary small circle small-elevate"
|
|
28
|
+
@click="showMapState = !showMapState"
|
|
29
|
+
>
|
|
30
|
+
<i class="small"
|
|
31
|
+
><svg viewBox="0 0 24 24"><path :d="mdiMapPlus" /></svg
|
|
32
|
+
></i>
|
|
33
|
+
<div class="tooltip left">Extract storytelling configuration</div>
|
|
34
|
+
</button>
|
|
35
|
+
<ExportState v-if="exportMap" v-model="showMapState" />
|
|
36
|
+
|
|
37
|
+
<button
|
|
38
|
+
v-if="changeProjection && !!availableMapProjection"
|
|
39
|
+
class="primary small circle small-elevate"
|
|
40
|
+
@click="changeMapProjection(availableMapProjection)"
|
|
41
|
+
>
|
|
42
|
+
<i class="small"
|
|
43
|
+
><svg viewBox="0 0 24 24"><path :d="mdiEarthBox" /></svg
|
|
44
|
+
></i>
|
|
45
|
+
<div class="tooltip left">Change map projection</div>
|
|
46
|
+
</button>
|
|
47
|
+
<button
|
|
48
|
+
v-if="compareIndicators"
|
|
49
|
+
class="primary small circle small-elevate"
|
|
50
|
+
@click="onCompareClick"
|
|
51
|
+
>
|
|
52
|
+
<i class="small"
|
|
53
|
+
><svg viewBox="0 0 24 24"><path :d="compareIcon" /></svg
|
|
54
|
+
></i>
|
|
55
|
+
<div class="tooltip left">Compare mode</div>
|
|
56
|
+
</button>
|
|
57
|
+
<button
|
|
58
|
+
v-if="backToPOIs && (poi || comparePoi)"
|
|
59
|
+
class="primary small circle small-elevate"
|
|
60
|
+
@click="loadPOiIndicator()"
|
|
61
|
+
>
|
|
62
|
+
<i class="small"
|
|
63
|
+
><svg viewBox="0 0 24 24">
|
|
64
|
+
<path :d="mdiStarFourPointsCircleOutline" /></svg
|
|
65
|
+
></i>
|
|
66
|
+
<div class="tooltip left">Back to POIs</div>
|
|
67
|
+
</button>
|
|
68
|
+
<eox-geosearch
|
|
69
|
+
v-if="mapEl && enableSearch"
|
|
70
|
+
:for="mapEl"
|
|
71
|
+
:endpoint="opencageUrl"
|
|
72
|
+
class="geosearch-detached"
|
|
73
|
+
label="Search"
|
|
74
|
+
small
|
|
75
|
+
button
|
|
76
|
+
list-direction="left"
|
|
77
|
+
results-direction="down"
|
|
78
|
+
tooltip="Search"
|
|
79
|
+
tooltip-direction="left"
|
|
80
|
+
></eox-geosearch>
|
|
81
|
+
<PopUp
|
|
82
|
+
v-model="showCompareIndicators"
|
|
83
|
+
:maxWidth="popupWidth"
|
|
84
|
+
:width="popupWidth"
|
|
85
|
+
:max-height="popupHeight"
|
|
86
|
+
:height="popupHeight"
|
|
87
|
+
>
|
|
88
|
+
<EodashItemFilter
|
|
89
|
+
:enableCompare="true"
|
|
90
|
+
:enableHighlighting="false"
|
|
91
|
+
resultType="cards"
|
|
92
|
+
style="--select-filter-max-items: 8"
|
|
93
|
+
filters-title="Select an indicator to compare"
|
|
94
|
+
subTitleProperty="subtitle"
|
|
95
|
+
imageProperty="thumbnail"
|
|
96
|
+
aggregateResults="collection_group"
|
|
97
|
+
results-title=""
|
|
98
|
+
@select="onSelectCompareIndicator"
|
|
99
|
+
/>
|
|
100
|
+
</PopUp>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
<script setup>
|
|
104
|
+
import { useTransparentPanel } from "@/composables";
|
|
105
|
+
import { changeMapProjection, setActiveTemplate } from "@/store/actions";
|
|
106
|
+
import {
|
|
107
|
+
activeTemplate,
|
|
108
|
+
availableMapProjection,
|
|
109
|
+
comparePoi,
|
|
110
|
+
mapEl,
|
|
111
|
+
poi,
|
|
112
|
+
} from "@/store/states";
|
|
113
|
+
import {
|
|
114
|
+
mdiCompare,
|
|
115
|
+
mdiCompareRemove,
|
|
116
|
+
mdiEarthBox,
|
|
117
|
+
mdiMapPlus,
|
|
118
|
+
mdiMinus,
|
|
119
|
+
mdiPlus,
|
|
120
|
+
mdiStarFourPointsCircleOutline,
|
|
121
|
+
} from "@mdi/js";
|
|
122
|
+
import ExportState from "^/ExportState.vue";
|
|
123
|
+
import { computed, ref, triggerRef } from "vue";
|
|
124
|
+
import PopUp from "^/PopUp.vue";
|
|
125
|
+
import EodashItemFilter from "^/EodashItemFilter.vue";
|
|
126
|
+
import { useDisplay } from "vuetify";
|
|
127
|
+
import { useSTAcStore } from "@/store/stac";
|
|
128
|
+
import { storeToRefs } from "pinia";
|
|
129
|
+
import { loadPOiIndicator } from "^/EodashProcess/methods/handling";
|
|
130
|
+
import { easeOut } from "ol/easing.js";
|
|
131
|
+
|
|
132
|
+
import "@eox/geosearch";
|
|
133
|
+
|
|
134
|
+
const {
|
|
135
|
+
compareIndicators,
|
|
136
|
+
changeProjection,
|
|
137
|
+
exportMap,
|
|
138
|
+
backToPOIs,
|
|
139
|
+
enableSearch,
|
|
140
|
+
enableZoom,
|
|
141
|
+
} = defineProps({
|
|
142
|
+
exportMap: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
default: true,
|
|
145
|
+
},
|
|
146
|
+
changeProjection: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: true,
|
|
149
|
+
},
|
|
150
|
+
compareIndicators: {
|
|
151
|
+
/** @type {import("vue").PropType<boolean | {compareTemplate?:string;fallbackTemplate?:string}> }*/
|
|
152
|
+
type: [Boolean, Object],
|
|
153
|
+
default: true,
|
|
154
|
+
},
|
|
155
|
+
backToPOIs: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
default: true,
|
|
158
|
+
},
|
|
159
|
+
enableSearch: {
|
|
160
|
+
type: Boolean,
|
|
161
|
+
default: true,
|
|
162
|
+
},
|
|
163
|
+
enableZoom: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: true,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
const { selectedStac, selectedCompareStac } = storeToRefs(useSTAcStore());
|
|
169
|
+
const { resetSelectedCompareSTAC } = useSTAcStore();
|
|
170
|
+
const { smAndDown } = useDisplay();
|
|
171
|
+
const popupWidth = computed(() => (smAndDown.value ? "80%" : "70%"));
|
|
172
|
+
const popupHeight = computed(() => (smAndDown.value ? "90%" : "70%"));
|
|
173
|
+
|
|
174
|
+
const showMapState = ref(false);
|
|
175
|
+
const showCompareIndicators = ref(false);
|
|
176
|
+
const compareIcon = computed(() =>
|
|
177
|
+
activeTemplate.value ===
|
|
178
|
+
((typeof compareIndicators === "object" &&
|
|
179
|
+
compareIndicators?.compareTemplate) ||
|
|
180
|
+
"compare")
|
|
181
|
+
? mdiCompareRemove
|
|
182
|
+
: mdiCompare,
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
const onCompareClick = () => {
|
|
186
|
+
showCompareIndicators.value =
|
|
187
|
+
activeTemplate.value !==
|
|
188
|
+
((typeof compareIndicators === "object" &&
|
|
189
|
+
compareIndicators.compareTemplate) ||
|
|
190
|
+
"compare");
|
|
191
|
+
|
|
192
|
+
const fallbackTemplate =
|
|
193
|
+
(typeof compareIndicators === "object" &&
|
|
194
|
+
compareIndicators.fallbackTemplate) ||
|
|
195
|
+
"expert";
|
|
196
|
+
selectedCompareStac.value = null;
|
|
197
|
+
resetSelectedCompareSTAC();
|
|
198
|
+
setActiveTemplate(fallbackTemplate);
|
|
199
|
+
triggerRef(selectedStac);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
203
|
+
const rootRef = ref(null);
|
|
204
|
+
|
|
205
|
+
const onSelectCompareIndicator = () => {
|
|
206
|
+
const compareTemplate =
|
|
207
|
+
(typeof compareIndicators === "object" &&
|
|
208
|
+
compareIndicators.compareTemplate) ||
|
|
209
|
+
"compare";
|
|
210
|
+
setActiveTemplate(compareTemplate);
|
|
211
|
+
showCompareIndicators.value = !showCompareIndicators.value;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
useTransparentPanel(rootRef);
|
|
215
|
+
|
|
216
|
+
const onMapZoomOut = () => {
|
|
217
|
+
const map = mapEl.value?.map;
|
|
218
|
+
const currentZoom = map?.getView().getZoom();
|
|
219
|
+
if (currentZoom !== undefined && currentZoom !== null) {
|
|
220
|
+
const view = map?.getView();
|
|
221
|
+
|
|
222
|
+
if (view !== undefined && view.getZoom()) {
|
|
223
|
+
view.animate({
|
|
224
|
+
zoom: currentZoom - 1,
|
|
225
|
+
duration: 250,
|
|
226
|
+
easing: easeOut,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
const onMapZoomIn = () => {
|
|
233
|
+
const map = mapEl.value?.map;
|
|
234
|
+
const currentZoom = map?.getView().getZoom();
|
|
235
|
+
if (currentZoom !== undefined && currentZoom !== null) {
|
|
236
|
+
const view = map?.getView();
|
|
237
|
+
|
|
238
|
+
if (view !== undefined && view.getZoom()) {
|
|
239
|
+
view.animate({
|
|
240
|
+
zoom: currentZoom + 1,
|
|
241
|
+
duration: 250,
|
|
242
|
+
easing: easeOut,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
const opencageApiKey = process.env.EODASH_OPENCAGE || "NO_KEY_FOUND";
|
|
248
|
+
const opencageUrl = `https://api.opencagedata.com/geocode/v1/json?key=${opencageApiKey}`;
|
|
249
|
+
|
|
250
|
+
/*const menu = document
|
|
251
|
+
.querySelector("eox-geosearch")
|
|
252
|
+
.renderRoot.querySelector("menu");*/
|
|
253
|
+
</script>
|
|
254
|
+
|
|
255
|
+
<style scoped>
|
|
256
|
+
@import url("@eox/ui/style.css");
|
|
257
|
+
|
|
258
|
+
.map-buttons button {
|
|
259
|
+
margin-bottom: 5px;
|
|
260
|
+
background-color: var(--primary);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* Container constraints removal */
|
|
264
|
+
eox-geosearch {
|
|
265
|
+
position: relative !important;
|
|
266
|
+
overflow: visible !important;
|
|
267
|
+
z-index: 10;
|
|
268
|
+
}
|
|
269
|
+
</style>
|