@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.
Files changed (162) hide show
  1. package/README.md +1 -0
  2. package/core/client/App.vue +8 -2
  3. package/core/client/asWebComponent.js +5 -5
  4. package/core/client/components/DashboardLayout.vue +43 -26
  5. package/core/client/components/EodashOverlay.vue +5 -6
  6. package/core/client/components/ErrorAlert.vue +2 -2
  7. package/core/client/components/Footer.vue +4 -4
  8. package/core/client/components/Header.vue +3 -3
  9. package/core/client/components/MobileLayout.vue +47 -27
  10. package/core/client/composables/DefineEodash.js +38 -43
  11. package/core/client/composables/DefineTemplate.js +4 -2
  12. package/core/client/composables/DefineWidgets.js +14 -8
  13. package/core/client/composables/index.js +273 -23
  14. package/core/client/eodashSTAC/EodashCollection.js +84 -62
  15. package/core/client/eodashSTAC/createLayers.js +30 -0
  16. package/core/client/eodashSTAC/helpers.js +159 -28
  17. package/core/client/eodashSTAC/parquet.js +145 -0
  18. package/core/client/eodashSTAC/triggers.js +6 -3
  19. package/core/client/plugins/index.js +4 -3
  20. package/core/client/plugins/vuetify.js +3 -0
  21. package/core/client/store/actions.js +21 -4
  22. package/core/client/store/stac.js +93 -56
  23. package/core/client/store/states.js +15 -5
  24. package/core/client/types.ts +59 -43
  25. package/core/client/utils/index.js +79 -0
  26. package/core/client/utils/keys.js +2 -2
  27. package/core/client/utils/states.js +30 -5
  28. package/core/client/views/Dashboard.vue +36 -32
  29. package/core/client/vite-env.d.ts +7 -0
  30. package/dist/client/{DashboardLayout-CkWvOMOW.js → DashboardLayout-Dq9Kfe6O.js} +24 -13
  31. package/dist/client/{DynamicWebComponent-DYBbpvUK.js → DynamicWebComponent-DCBMXskE.js} +1 -1
  32. package/dist/client/{EodashDatePicker-CALmW3SI.js → EodashDatePicker-DtngxU6s.js} +59 -32
  33. package/dist/client/{EodashItemFilter-DlQiE713.js → EodashItemFilter-ClQebJQt.js} +20 -10
  34. package/dist/client/{EodashLayerControl-DEzEbft7.js → EodashLayerControl-BLBds28C.js} +29 -16
  35. package/dist/client/EodashLayoutSwitcher-DQ8SfVDd.js +61 -0
  36. package/dist/client/EodashMapBtns-B89_YBDw.js +326 -0
  37. package/dist/client/{EodashStacInfo-DPPxDkF6.js → EodashStacInfo-Dt1nF06x.js} +3 -18
  38. package/dist/client/{EodashTools-CUaL9s4H.js → EodashTools-DV5ykmWc.js} +13 -13
  39. package/dist/client/{ExportState-DjyIZVhl.js → ExportState-B6zZQUmE.js} +57 -52
  40. package/dist/client/{Footer-DyL0JoWt.js → Footer-DNhXs8k6.js} +15 -13
  41. package/dist/client/{Header-B5Dgty9l.js → Header-BjhN5JY4.js} +32 -28
  42. package/dist/client/MobileLayout-JelB6w1G.js +118 -0
  43. package/dist/client/{PopUp-BfB8s_ki.js → PopUp-CgpvNr3o.js} +18 -10
  44. package/dist/client/ProcessList-vecpxThi.js +198 -0
  45. package/dist/client/{VImg-FD1WVphJ.js → VImg-CETuikH2.js} +221 -26
  46. package/dist/client/{VMain-DJKG4SvM.js → VMain-Ci9DyaGU.js} +7 -7
  47. package/dist/client/{VTooltip-CfeefrXI.js → VTooltip-J4ac48X7.js} +12 -10
  48. package/dist/client/{WidgetsContainer-C2TaTdb6.js → WidgetsContainer-CCML4TyV.js} +1 -1
  49. package/dist/client/asWebComponent-ZyEzWOOf.js +19092 -0
  50. package/dist/client/async-B7jIrM53.js +804 -0
  51. package/dist/client/eo-dash.js +1 -1
  52. package/dist/client/{VOverlay-BzOdRu9h.js → forwardRefs-BQclvjMq.js} +332 -28
  53. package/dist/client/handling-BS24aG1q.js +1227 -0
  54. package/dist/client/helpers-wXK7Ywio.js +4556 -0
  55. package/dist/client/index-4UCzZi8B.js +376 -0
  56. package/dist/client/{index-4CT7Tz83.js → index-9KR-G20t.js} +2 -2
  57. package/dist/client/{index-CIHH_3dW.js → index-B2XpdgR6.js} +227 -86
  58. package/dist/client/material-symbols-outlined.woff2 +0 -0
  59. package/dist/client/material-symbols-rounded.woff2 +0 -0
  60. package/dist/client/material-symbols-sharp.woff2 +0 -0
  61. package/dist/client/material-symbols-subset.woff2 +0 -0
  62. package/dist/client/{ssrBoot-BP7SYRyC.js → ssrBoot-Zgc_Ttvi.js} +2 -2
  63. package/dist/client/templates.js +840 -0
  64. package/dist/client/transition-yBii4fu6.js +40 -0
  65. package/dist/node/cli.js +16 -6
  66. package/dist/node/types.d.ts +1 -1
  67. package/dist/types/core/client/App.vue.d.ts +2 -2
  68. package/dist/types/core/client/asWebComponent.d.ts +1 -1
  69. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +1 -3
  70. package/dist/types/core/client/components/Footer.vue.d.ts +1 -105
  71. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +1 -1
  72. package/dist/types/core/client/components/MobileLayout.vue.d.ts +1 -324
  73. package/dist/types/core/client/composables/DefineEodash.d.ts +2 -2
  74. package/dist/types/core/client/composables/DefineTemplate.d.ts +1 -1
  75. package/dist/types/core/client/composables/DefineWidgets.d.ts +4 -4
  76. package/dist/types/core/client/composables/index.d.ts +24 -2
  77. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +9 -6
  78. package/dist/types/core/client/eodashSTAC/helpers.d.ts +25 -5
  79. package/dist/types/core/client/eodashSTAC/parquet.d.ts +2 -0
  80. package/dist/types/core/client/plugins/vuetify.d.ts +7 -4
  81. package/dist/types/core/client/store/actions.d.ts +3 -2
  82. package/dist/types/core/client/store/stac.d.ts +16 -13
  83. package/dist/types/core/client/store/states.d.ts +14 -4
  84. package/dist/types/core/client/types.d.ts +46 -31
  85. package/dist/types/core/client/utils/index.d.ts +2 -0
  86. package/dist/types/core/client/utils/keys.d.ts +4 -4
  87. package/dist/types/core/client/utils/states.d.ts +59 -47
  88. package/dist/types/core/client/views/Dashboard.vue.d.ts +2 -2
  89. package/dist/types/templates/baseConfig.d.ts +4 -0
  90. package/dist/types/templates/compare.d.ts +185 -0
  91. package/dist/types/templates/expert.d.ts +147 -0
  92. package/dist/types/templates/index.d.ts +6 -0
  93. package/dist/types/templates/light.d.ts +154 -0
  94. package/dist/types/widgets/EodashDatePicker.vue.d.ts +1 -458
  95. package/dist/types/widgets/EodashItemFilter.vue.d.ts +3 -3
  96. package/dist/types/widgets/EodashLayerControl.vue.d.ts +14 -7
  97. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +1 -3
  98. package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +12 -8
  99. package/dist/types/widgets/EodashMap/index.vue.d.ts +9 -4
  100. package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +8 -1
  101. package/dist/types/widgets/EodashProcess/index.vue.d.ts +8 -4
  102. package/dist/types/widgets/EodashProcess/methods/async.d.ts +19 -18
  103. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +3 -2
  104. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/index.d.ts +1 -0
  105. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.d.ts +6 -0
  106. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.d.ts +4 -0
  107. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +5 -0
  108. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/index.d.ts +1 -0
  109. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +12 -5
  110. package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +72 -41
  111. package/dist/types/widgets/EodashProcess/methods/utils.d.ts +41 -21
  112. package/dist/types/widgets/EodashProcess/states.d.ts +11 -0
  113. package/dist/types/widgets/EodashProcess/types.d.ts +41 -0
  114. package/dist/types/widgets/EodashStacInfo.vue.d.ts +14 -14
  115. package/dist/types/widgets/EodashTools.vue.d.ts +3 -3
  116. package/dist/types/widgets/ExportState.vue.d.ts +1 -1
  117. package/dist/types/widgets/PopUp.vue.d.ts +11 -16
  118. package/dist/types/widgets/WidgetsContainer.vue.d.ts +3 -6
  119. package/package.json +55 -45
  120. package/templates/baseConfig.js +68 -0
  121. package/templates/compare.js +142 -0
  122. package/templates/expert.js +124 -0
  123. package/templates/index.js +8 -0
  124. package/templates/light.js +139 -0
  125. package/widgets/EodashDatePicker.vue +80 -31
  126. package/widgets/EodashItemFilter.vue +26 -11
  127. package/widgets/EodashLayerControl.vue +20 -11
  128. package/widgets/EodashLayoutSwitcher.vue +6 -3
  129. package/widgets/EodashMap/EodashMapBtns.vue +269 -0
  130. package/widgets/EodashMap/index.vue +255 -45
  131. package/widgets/EodashMap/methods/create-layers-config.js +4 -3
  132. package/widgets/EodashMap/methods/index.js +33 -23
  133. package/widgets/EodashProcess/ProcessList.vue +47 -11
  134. package/widgets/EodashProcess/index.vue +55 -20
  135. package/widgets/EodashProcess/methods/async.js +99 -60
  136. package/widgets/EodashProcess/methods/composables.js +21 -14
  137. package/widgets/EodashProcess/methods/custom-endpoints/chart/index.js +35 -0
  138. package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +275 -0
  139. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +132 -0
  140. package/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.js +94 -0
  141. package/widgets/EodashProcess/methods/custom-endpoints/layers/index.js +33 -0
  142. package/widgets/EodashProcess/methods/handling.js +127 -80
  143. package/widgets/EodashProcess/methods/outputs.js +376 -125
  144. package/widgets/EodashProcess/methods/utils.js +442 -10
  145. package/widgets/EodashProcess/states.js +13 -0
  146. package/widgets/EodashProcess/types.ts +46 -0
  147. package/widgets/EodashStacInfo.vue +2 -17
  148. package/widgets/EodashTools.vue +13 -13
  149. package/widgets/WidgetsContainer.vue +1 -1
  150. package/core/client/eodash.js +0 -454
  151. package/dist/client/EodashLayoutSwitcher-CDeCV8F-.js +0 -52
  152. package/dist/client/EodashMapBtns-CktQCfa-.js +0 -131
  153. package/dist/client/MobileLayout-CRsg_5Q4.js +0 -1217
  154. package/dist/client/ProcessList-DTefwQZx.js +0 -484
  155. package/dist/client/asWebComponent-CLhcT715.js +0 -12479
  156. package/dist/client/eo-dash.css +0 -5
  157. package/dist/client/forwardRefs-Bon_Kku1.js +0 -245
  158. package/dist/client/index-Bm9cbtx5.js +0 -201
  159. package/dist/client/index-DiGDvTQU.js +0 -780
  160. package/dist/client/transition-C5I57hn6.js +0 -37
  161. package/dist/types/core/client/eodash.d.ts +0 -8
  162. package/widgets/EodashMapBtns.vue +0 -113
@@ -1,10 +1,11 @@
1
- import { onMounted, onUnmounted, watch, nextTick, ref, toRaw, computed, createElementBlock, openBlock, createElementVNode, unref, normalizeStyle } from 'vue';
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 { a8 as EodashCollection, a9 as eoxLayersKey, Z as useSTAcStore, aa as setMapProjFromCol, ab as posIsSetFromUrl, ac as useOnLayersUpdate, ad as mapPosition, a3 as mapEl, a2 as mapCompareEl, Y as datetime, $ as eodashCollections, a6 as layerControlFormValue, a5 as layerControlFormValueCompare, a4 as eodashCompareCollections } from './asWebComponent-CLhcT715.js';
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 { useEventBus } from '@vueuse/core';
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 geodbLayer = EodashCollection.getGeoDBLayer(eodashCols);
63
- if (geodbLayer) {
64
- dataLayers.layers.unshift(geodbLayer);
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
- await nextTick(() => {
284
- layersEvent.emit("time:updated", mapLayers.value);
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
- !posIsSetFromUrl.value
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 nextTick(() => {
351
- mapElement.value?.updateComplete.then(() => {
352
- layersEvent.emit("layers:updated", mapLayers.value);
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("@eox/map").EOxMap["controls"]} */
433
- const controls = {
434
- Attribution: {
435
- collapsible: true,
436
- },
437
- };
438
- const initialCenter = toRaw([
439
- mapPosition.value?.[0] ?? props.center?.[0],
440
- mapPosition.value?.[1] ?? props.center?.[1],
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("eox-map-compare", {
570
- class: "fill-height fill-width overflow-none",
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
- slot: "first",
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-tooltip", {
586
- style: normalizeStyle(mainTooltipStyles.value),
587
- ".propertyTransform": tooltipPropertyTransform('main')
588
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
589
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
590
- createElementVNode("eox-map", {
591
- class: "fill-height fill-width overflow-none",
592
- id: "compare",
593
- slot: "second",
594
- ref_key: "compareMap",
595
- ref: compareMap,
596
- ".layers": eoxMapCompareLayers.value
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
- createElementVNode("eox-map-tooltip", {
599
- style: normalizeStyle(compareTooltipStyles.value),
600
- ".propertyTransform": tooltipPropertyTransform('compare')
601
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
602
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
603
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))
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 { _sfc_main as default };
750
+ export { index as default };
@@ -1,4 +1,4 @@
1
- import { shallowRef, onMounted, computed, readonly } from 'vue';
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 = computed(() => !isBooted.value ? {
13
+ const ssrBootStyles = toRef(() => !isBooted.value ? {
14
14
  transition: 'none !important'
15
15
  } : undefined);
16
16
  return {