@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
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { onMounted, onUnmounted, watch,
|
|
1
|
+
import { onMounted, onUnmounted, watch, computed, useTemplateRef, ref, toRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, normalizeStyle, createVNode } from 'vue';
|
|
2
2
|
import '@eox/map';
|
|
3
3
|
import '@eox/map/src/plugins/advancedLayersAndSources';
|
|
4
|
-
import {
|
|
4
|
+
import { K as setMapProjFromCol, B as mapPosition, d as mapEl, I as mapCompareEl, C as indicator, D as compareIndicator, y as datetime } from './helpers-wXK7Ywio.js';
|
|
5
5
|
import { storeToRefs } from 'pinia';
|
|
6
|
+
import { M as EodashCollection, E as useSTAcStore, N as useEmitLayersUpdate, O as isFirstLoad, P as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, L as layerControlFormValue, K as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-ZyEzWOOf.js';
|
|
6
7
|
import log from 'loglevel';
|
|
7
|
-
import {
|
|
8
|
+
import { i as inAndOut, E as EodashMapBtns } from './EodashMapBtns-B89_YBDw.js';
|
|
8
9
|
import mustache from 'mustache';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -59,9 +60,10 @@ const createLayersConfig = async (
|
|
|
59
60
|
const indicatorLayers =
|
|
60
61
|
//@ts-expect-error indicator is collection
|
|
61
62
|
await EodashCollection.getIndicatorLayers(selectedIndicator);
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
const observationPointsLayer =
|
|
64
|
+
EodashCollection.getObservationPointsLayer(eodashCols);
|
|
65
|
+
if (observationPointsLayer) {
|
|
66
|
+
dataLayers.layers.unshift(observationPointsLayer);
|
|
65
67
|
}
|
|
66
68
|
const baseLayers = {
|
|
67
69
|
type: "Group",
|
|
@@ -183,9 +185,6 @@ const useHandleMapMoveEnd = (mapElement, mapPosition) => {
|
|
|
183
185
|
!Number.isNaN(z)
|
|
184
186
|
) {
|
|
185
187
|
mapPosition.value = [lonlat[0], lonlat[1], z];
|
|
186
|
-
if (posIsSetFromUrl.value) {
|
|
187
|
-
posIsSetFromUrl.value = false;
|
|
188
|
-
}
|
|
189
188
|
}
|
|
190
189
|
};
|
|
191
190
|
|
|
@@ -227,7 +226,6 @@ const useInitMap = (
|
|
|
227
226
|
eodashCols.values,
|
|
228
227
|
datetime.value,
|
|
229
228
|
);
|
|
230
|
-
const layersEvent = useEventBus(eoxLayersKey);
|
|
231
229
|
|
|
232
230
|
const stopIndicatorWatcher = watch(
|
|
233
231
|
[selectedIndicator, datetime],
|
|
@@ -280,9 +278,14 @@ const useInitMap = (
|
|
|
280
278
|
JSON.parse(JSON.stringify(layersCollection)),
|
|
281
279
|
);
|
|
282
280
|
mapLayers.value = layersCollection;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
281
|
+
|
|
282
|
+
useEmitLayersUpdate(
|
|
283
|
+
mapElement.value?.id === "compare"
|
|
284
|
+
? "compareTime:updated"
|
|
285
|
+
: "time:updated",
|
|
286
|
+
mapElement.value,
|
|
287
|
+
layersCollection,
|
|
288
|
+
);
|
|
286
289
|
return;
|
|
287
290
|
}
|
|
288
291
|
|
|
@@ -306,7 +309,8 @@ const useInitMap = (
|
|
|
306
309
|
}
|
|
307
310
|
if (
|
|
308
311
|
endInterval !== null &&
|
|
309
|
-
endInterval.toISOString() !== datetime.value
|
|
312
|
+
endInterval.toISOString() !== datetime.value &&
|
|
313
|
+
!isFirstLoad.value
|
|
310
314
|
) {
|
|
311
315
|
datetime.value = endInterval.toISOString();
|
|
312
316
|
}
|
|
@@ -317,7 +321,11 @@ const useInitMap = (
|
|
|
317
321
|
if (
|
|
318
322
|
mapElement?.value?.id === "main" &&
|
|
319
323
|
updatedStac.extent?.spatial.bbox &&
|
|
320
|
-
!
|
|
324
|
+
!(
|
|
325
|
+
isFirstLoad.value &&
|
|
326
|
+
mapPosition.value?.[0] &&
|
|
327
|
+
mapPosition.value?.[1]
|
|
328
|
+
)
|
|
321
329
|
) {
|
|
322
330
|
// Sanitize extent,
|
|
323
331
|
const b = updatedStac.extent?.spatial.bbox[0];
|
|
@@ -337,9 +345,6 @@ const useInitMap = (
|
|
|
337
345
|
(mapElement.value).zoomExtent = reprojExtent;
|
|
338
346
|
}
|
|
339
347
|
}
|
|
340
|
-
if (posIsSetFromUrl.value) {
|
|
341
|
-
posIsSetFromUrl.value = false;
|
|
342
|
-
}
|
|
343
348
|
|
|
344
349
|
log.debug(
|
|
345
350
|
"Assigned layers",
|
|
@@ -347,11 +352,13 @@ const useInitMap = (
|
|
|
347
352
|
);
|
|
348
353
|
mapLayers.value = layersCollection;
|
|
349
354
|
// Emit event to update layers
|
|
350
|
-
await
|
|
351
|
-
mapElement.value?.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
+
await useEmitLayersUpdate(
|
|
356
|
+
mapElement.value?.id === "compare"
|
|
357
|
+
? "compareLayers:updated"
|
|
358
|
+
: "layers:updated",
|
|
359
|
+
mapElement.value,
|
|
360
|
+
mapLayers.value,
|
|
361
|
+
);
|
|
355
362
|
}
|
|
356
363
|
},
|
|
357
364
|
{ immediate: true },
|
|
@@ -366,8 +373,14 @@ const useInitMap = (
|
|
|
366
373
|
* @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCols
|
|
367
374
|
* @param {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"],undefined>>} tooltipProperties
|
|
368
375
|
*/
|
|
376
|
+
|
|
369
377
|
const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
|
|
370
|
-
useOnLayersUpdate(async () => {
|
|
378
|
+
useOnLayersUpdate(async (evt, _payload) => {
|
|
379
|
+
if (evt.includes("compare")) {
|
|
380
|
+
// TODO: support compare map tooltips
|
|
381
|
+
// Do not update tooltip properties on compare map
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
371
384
|
const tooltips = [];
|
|
372
385
|
for (const ec of eodashCols) {
|
|
373
386
|
tooltips.push(...(await ec.getToolTipProperties()));
|
|
@@ -377,26 +390,23 @@ const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
|
|
|
377
390
|
});
|
|
378
391
|
};
|
|
379
392
|
|
|
380
|
-
|
|
381
|
-
* @module ol/easing
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Start slow, speed up, and then slow down again.
|
|
387
|
-
* @param {number} t Input between 0 and 1.
|
|
388
|
-
* @return {number} Output between 0 and 1.
|
|
389
|
-
* @api
|
|
390
|
-
*/
|
|
391
|
-
function inAndOut(t) {
|
|
392
|
-
return 3 * t * t - 2 * t * t * t;
|
|
393
|
-
}
|
|
393
|
+
const _style_0 = "#cursor-coordinates[data-v-8d648956]{position:fixed;left:24px;bottom:54px;color:#000000e6;font-size:11px;font-family:var(--eox-body-font-family);background:#fffe;border-radius:4px;border:none;padding:0 3px;max-height:24px}@media (max-width: 959px){#cursor-coordinates[data-v-8d648956]{display:none}}#scale-line[data-v-8d648956]{position:fixed;left:24px;bottom:28px;color:#fff}@media (max-width: 959px){#scale-line[data-v-8d648956]{bottom:102px}}[data-v-8d648956] .ol-scale-line{background:#fffe!important;border-radius:4px!important;border:none!important;padding:0 3px 3px!important;font-size:10px!important;font-family:var(--eox-body-font-family);max-height:20px}[data-v-8d648956] .ol-scale-line-inner{display:flex;justify-content:center;border:1px solid rgba(0,0,0,.5)!important;border-top:none!important;color:#333!important;font-weight:500!important;transform:translateY(1px)}.map-buttons-container[data-v-8d648956]{position:fixed;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(12,1fr);pointer-events:none;z-index:1}.map-buttons-container[data-v-8d648956]>*{pointer-events:auto}";
|
|
394
394
|
|
|
395
395
|
const _hoisted_1 = [".enabled"];
|
|
396
|
-
const _hoisted_2 = [".center", ".zoom", ".layers"];
|
|
396
|
+
const _hoisted_2 = [".center", ".zoom", ".layers", ".controls"];
|
|
397
397
|
const _hoisted_3 = [".propertyTransform"];
|
|
398
398
|
const _hoisted_4 = [".layers"];
|
|
399
399
|
const _hoisted_5 = [".propertyTransform"];
|
|
400
|
+
const _hoisted_6 = {
|
|
401
|
+
key: 0,
|
|
402
|
+
id: "cursor-coordinates",
|
|
403
|
+
ref: "cursor-coords"
|
|
404
|
+
};
|
|
405
|
+
const _hoisted_7 = {
|
|
406
|
+
key: 1,
|
|
407
|
+
id: "scale-line",
|
|
408
|
+
ref: "scale-line"
|
|
409
|
+
};
|
|
400
410
|
|
|
401
411
|
|
|
402
412
|
const _sfc_main = {
|
|
@@ -410,35 +420,132 @@ const _sfc_main = {
|
|
|
410
420
|
center: {
|
|
411
421
|
//@ts-expect-error todo
|
|
412
422
|
type: Array,
|
|
413
|
-
default: () => [15, 48],
|
|
423
|
+
default: () => [mapPosition.value?.[0] ?? 15, mapPosition.value?.[1] ?? 48],
|
|
414
424
|
},
|
|
415
425
|
zoom: {
|
|
416
426
|
type: Number,
|
|
417
|
-
default: 4,
|
|
427
|
+
default: mapPosition.value?.[2] ?? 4,
|
|
418
428
|
},
|
|
419
429
|
zoomToExtent: {
|
|
420
430
|
type: Boolean,
|
|
421
431
|
default: true,
|
|
422
432
|
},
|
|
433
|
+
enableCursorCoordinates: {
|
|
434
|
+
type: Boolean,
|
|
435
|
+
default: true,
|
|
436
|
+
},
|
|
437
|
+
enableScaleLine: {
|
|
438
|
+
type: Boolean,
|
|
439
|
+
default: true,
|
|
440
|
+
},
|
|
441
|
+
btnsPosition: {
|
|
442
|
+
type: Object,
|
|
443
|
+
default: () => ({
|
|
444
|
+
x: "12/9/10",
|
|
445
|
+
y: 1,
|
|
446
|
+
gap: 16,
|
|
447
|
+
}),
|
|
448
|
+
},
|
|
449
|
+
btns: {
|
|
450
|
+
type: Object,
|
|
451
|
+
default: () => ({
|
|
452
|
+
enableExportMap: true,
|
|
453
|
+
enableChangeProjection: true,
|
|
454
|
+
enableCompareIndicators: true,
|
|
455
|
+
enableBackToPOIs: true,
|
|
456
|
+
enableSearch: true,
|
|
457
|
+
enableZoom: true,
|
|
458
|
+
}),
|
|
459
|
+
},
|
|
423
460
|
},
|
|
424
461
|
setup(__props) {
|
|
425
462
|
|
|
426
463
|
const props = __props;
|
|
427
464
|
|
|
465
|
+
// Responsive positioning logic
|
|
466
|
+
const { width } = useDisplay();
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Parse responsive string values (e.g., "1/5/10") into values for different screen sizes
|
|
470
|
+
* Breakpoints: [0, 960, 1920] based on properties passed to eox-layout in DashboardLayout.vue
|
|
471
|
+
* @param {string | number} value
|
|
472
|
+
* @returns {number}
|
|
473
|
+
*/
|
|
474
|
+
const parseResponsiveValue = (value) => {
|
|
475
|
+
if (typeof value === "number") {
|
|
476
|
+
return value;
|
|
477
|
+
}
|
|
478
|
+
if (typeof value === "string") {
|
|
479
|
+
const parts = value.split("/");
|
|
480
|
+
const currentWidth = width.value;
|
|
481
|
+
|
|
482
|
+
if (currentWidth < 960) {
|
|
483
|
+
return parseInt(parts[0]) || 1;
|
|
484
|
+
} else if (currentWidth < 1920) {
|
|
485
|
+
return parseInt(parts[1] || parts[0]) || 1;
|
|
486
|
+
} else {
|
|
487
|
+
return parseInt(parts[2] || parts[1] || parts[0]) || 1;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return 1;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
const responsiveX = computed(() => parseResponsiveValue(props.btnsPosition.x));
|
|
494
|
+
const responsiveY = computed(() => parseResponsiveValue(props.btnsPosition.y));
|
|
495
|
+
const btnsProps = computed(() => ({
|
|
496
|
+
exportMap: props.btns.enableExportMap ?? true,
|
|
497
|
+
changeProjection: props.btns.enableChangeProjection ?? true,
|
|
498
|
+
compareIndicators: props.btns.enableCompareIndicators ?? true,
|
|
499
|
+
backToPOIs: props.btns.enableBackToPOIs ?? true,
|
|
500
|
+
enableSearch: props.btns.enableSearch ?? true,
|
|
501
|
+
enableZoom: props.btns.enableZoom ?? true,
|
|
502
|
+
}));
|
|
503
|
+
|
|
504
|
+
// Prepare containers for scale line and cursor coordinates
|
|
505
|
+
const scaleLineRef = useTemplateRef("scale-line");
|
|
506
|
+
const cursorCoordsRef = useTemplateRef("cursor-coords");
|
|
507
|
+
|
|
428
508
|
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
429
509
|
const tooltipProperties = ref([]);
|
|
430
510
|
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
431
511
|
const compareTooltipProperties = ref([]);
|
|
432
|
-
/** @type {import("
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
]);
|
|
512
|
+
/** @type {import("vue").ComputedRef<{
|
|
513
|
+
Attribution: { collapsible: boolean };
|
|
514
|
+
ScaleLine?: { target: HTMLElement };
|
|
515
|
+
MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
|
|
516
|
+
}>} */
|
|
517
|
+
const controls = computed(() => {
|
|
518
|
+
/** @type {{
|
|
519
|
+
Attribution: { collapsible: boolean };
|
|
520
|
+
ScaleLine?: { target: HTMLElement };
|
|
521
|
+
MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
|
|
522
|
+
}} */
|
|
523
|
+
const controlsObj = {
|
|
524
|
+
Attribution: {
|
|
525
|
+
collapsible: true,
|
|
526
|
+
},
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
if (props.enableScaleLine && scaleLineRef.value) {
|
|
530
|
+
controlsObj.ScaleLine = {
|
|
531
|
+
target: scaleLineRef.value,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (props.enableCursorCoordinates && cursorCoordsRef.value) {
|
|
536
|
+
controlsObj.MousePosition = {
|
|
537
|
+
projection: "EPSG:4326",
|
|
538
|
+
coordinateFormat: (/** @type {[number, number]} */ c) => {
|
|
539
|
+
return `${c[1].toFixed(3)} °N, ${c[0].toFixed(3)} °E`;
|
|
540
|
+
},
|
|
541
|
+
target: cursorCoordsRef.value,
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return controlsObj;
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
const initialCenter = toRaw(props.center);
|
|
442
549
|
const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
|
|
443
550
|
/** @type {import("vue").Ref<Record<string,any>[]>} */
|
|
444
551
|
const eoxMapLayers = ref([
|
|
@@ -492,7 +599,6 @@ onMounted(() => {
|
|
|
492
599
|
if (props.enableCompare) {
|
|
493
600
|
useInitMap(
|
|
494
601
|
compareMap,
|
|
495
|
-
//@ts-expect-error todo selectedStac as collection
|
|
496
602
|
selectedCompareStac,
|
|
497
603
|
eodashCompareCollections,
|
|
498
604
|
datetime,
|
|
@@ -506,7 +612,6 @@ onMounted(() => {
|
|
|
506
612
|
|
|
507
613
|
useInitMap(
|
|
508
614
|
eoxMap,
|
|
509
|
-
//@ts-expect-error todo selectedStac as collection
|
|
510
615
|
selectedStac,
|
|
511
616
|
eodashCollections,
|
|
512
617
|
datetime,
|
|
@@ -566,44 +671,80 @@ const tooltipPropertyTransform = (map) => {
|
|
|
566
671
|
};
|
|
567
672
|
|
|
568
673
|
return (_ctx, _cache) => {
|
|
569
|
-
return (openBlock(), createElementBlock("
|
|
570
|
-
|
|
571
|
-
".enabled": showCompare.value
|
|
572
|
-
}, [
|
|
573
|
-
createElementVNode("eox-map", {
|
|
674
|
+
return (openBlock(), createElementBlock("span", null, [
|
|
675
|
+
createElementVNode("eox-map-compare", {
|
|
574
676
|
class: "fill-height fill-width overflow-none",
|
|
575
|
-
|
|
576
|
-
ref_key: "eoxMap",
|
|
577
|
-
ref: eoxMap,
|
|
578
|
-
id: "main",
|
|
579
|
-
".animationOptions": animationOptions,
|
|
580
|
-
".center": unref(initialCenter),
|
|
581
|
-
".zoom": unref(initialZoom),
|
|
582
|
-
".layers": eoxMapLayers.value,
|
|
583
|
-
".controls": controls
|
|
677
|
+
".enabled": showCompare.value
|
|
584
678
|
}, [
|
|
585
|
-
createElementVNode("eox-map
|
|
586
|
-
|
|
587
|
-
"
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
679
|
+
createElementVNode("eox-map", {
|
|
680
|
+
class: "fill-height fill-width overflow-none",
|
|
681
|
+
slot: "first",
|
|
682
|
+
ref_key: "eoxMap",
|
|
683
|
+
ref: eoxMap,
|
|
684
|
+
id: "main",
|
|
685
|
+
".animationOptions": animationOptions,
|
|
686
|
+
".center": unref(initialCenter),
|
|
687
|
+
".zoom": unref(initialZoom),
|
|
688
|
+
".layers": eoxMapLayers.value,
|
|
689
|
+
".controls": controls.value
|
|
690
|
+
}, [
|
|
691
|
+
createElementVNode("eox-map-tooltip", {
|
|
692
|
+
style: normalizeStyle(mainTooltipStyles.value),
|
|
693
|
+
".propertyTransform": tooltipPropertyTransform('main')
|
|
694
|
+
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
|
|
695
|
+
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
|
|
696
|
+
createElementVNode("eox-map", {
|
|
697
|
+
class: "fill-height fill-width overflow-none",
|
|
698
|
+
id: "compare",
|
|
699
|
+
slot: "second",
|
|
700
|
+
ref_key: "compareMap",
|
|
701
|
+
ref: compareMap,
|
|
702
|
+
".layers": eoxMapCompareLayers.value
|
|
703
|
+
}, [
|
|
704
|
+
createElementVNode("eox-map-tooltip", {
|
|
705
|
+
style: normalizeStyle(compareTooltipStyles.value),
|
|
706
|
+
".propertyTransform": tooltipPropertyTransform('compare')
|
|
707
|
+
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
|
|
708
|
+
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
|
|
709
|
+
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1),
|
|
710
|
+
(__props.enableCursorCoordinates)
|
|
711
|
+
? (openBlock(), createElementBlock("div", _hoisted_6, null, 512 /* NEED_PATCH */))
|
|
712
|
+
: createCommentVNode("v-if", true),
|
|
713
|
+
(__props.enableScaleLine)
|
|
714
|
+
? (openBlock(), createElementBlock("span", _hoisted_7, null, 512 /* NEED_PATCH */))
|
|
715
|
+
: createCommentVNode("v-if", true),
|
|
716
|
+
createElementVNode("div", {
|
|
717
|
+
class: "map-buttons-container",
|
|
718
|
+
style: normalizeStyle(`margin: ${__props.btnsPosition.gap}px 0 ${__props.btnsPosition.gap}px 0`)
|
|
597
719
|
}, [
|
|
598
|
-
|
|
599
|
-
style: normalizeStyle(
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
720
|
+
createVNode(EodashMapBtns, {
|
|
721
|
+
style: normalizeStyle({
|
|
722
|
+
gridColumn: unref(indicator) || unref(compareIndicator) ? responsiveX.value : '12',
|
|
723
|
+
gridRow: responsiveY.value,
|
|
724
|
+
}),
|
|
725
|
+
exportMap: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.exportMap : false,
|
|
726
|
+
changeProjection:
|
|
727
|
+
(unref(indicator) || unref(compareIndicator)) ? btnsProps.value.changeProjection : false
|
|
728
|
+
,
|
|
729
|
+
compareIndicators:
|
|
730
|
+
(unref(indicator) || unref(compareIndicator)) ? btnsProps.value.compareIndicators : false
|
|
731
|
+
,
|
|
732
|
+
backToPOIs:
|
|
733
|
+
(unref(indicator) || unref(compareIndicator)) ? btnsProps.value.backToPOIs : false
|
|
734
|
+
,
|
|
735
|
+
enableSearch:
|
|
736
|
+
(unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableSearch : false
|
|
737
|
+
,
|
|
738
|
+
enableZoom:
|
|
739
|
+
(unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableZoom : false
|
|
740
|
+
|
|
741
|
+
}, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom"])
|
|
742
|
+
], 4 /* STYLE */)
|
|
743
|
+
]))
|
|
604
744
|
}
|
|
605
745
|
}
|
|
606
746
|
|
|
607
747
|
};
|
|
748
|
+
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-8d648956"]]);
|
|
608
749
|
|
|
609
|
-
export {
|
|
750
|
+
export { index as default };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef, onMounted,
|
|
1
|
+
import { shallowRef, onMounted, toRef, readonly } from 'vue';
|
|
2
2
|
|
|
3
3
|
// Utilities
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ function useSsrBoot() {
|
|
|
10
10
|
isBooted.value = true;
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
const ssrBootStyles =
|
|
13
|
+
const ssrBootStyles = toRef(() => !isBooted.value ? {
|
|
14
14
|
transition: 'none !important'
|
|
15
15
|
} : undefined);
|
|
16
16
|
return {
|