@eodash/eodash 5.4.0 → 5.5.1

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 (114) hide show
  1. package/core/client/App.vue +1 -1
  2. package/core/client/asWebComponent.js +1 -1
  3. package/core/client/composables/DefineWidgets.js +12 -2
  4. package/core/client/eodashSTAC/EodashCollection.js +12 -13
  5. package/core/client/eodashSTAC/createLayers.js +45 -18
  6. package/core/client/eodashSTAC/helpers.js +13 -5
  7. package/core/client/eodashSTAC/parquet.js +2 -1
  8. package/core/client/eodashSTAC/triggers.js +1 -2
  9. package/core/client/store/actions.js +17 -17
  10. package/core/client/store/states.js +26 -4
  11. package/core/client/types.ts +9 -0
  12. package/core/client/utils/index.js +18 -1
  13. package/dist/client/{DashboardLayout-CQOGHPW_.js → DashboardLayout-D_590Zle.js} +2 -2
  14. package/dist/client/{DynamicWebComponent-CoLO8FEf.js → DynamicWebComponent-67cfzL4o.js} +1 -1
  15. package/dist/client/EodashChart-BsW18Em1.js +144 -0
  16. package/dist/client/{EodashDatePicker-BZeQ6bcu.js → EodashDatePicker-BwyFIBlK.js} +10 -7
  17. package/dist/client/{EodashItemFilter-CmZkk7GK.js → EodashItemFilter-CgdrG-pX.js} +2 -2
  18. package/dist/client/{EodashLayerControl-D54fY-bX.js → EodashLayerControl-V98fahVJ.js} +2 -2
  19. package/dist/client/{EodashLayoutSwitcher-BCP3FvDb.js → EodashLayoutSwitcher-B4oI5PAx.js} +3 -3
  20. package/dist/client/EodashMapBtns-Ce2tFjJK.js +433 -0
  21. package/dist/client/{EodashStacInfo-BZbmT8vT.js → EodashStacInfo-Cb28jVEr.js} +11 -15
  22. package/dist/client/{EodashTimeSlider-DIcAJr6D.js → EodashTimeSlider-B5boxpCK.js} +2 -2
  23. package/dist/client/{EodashTools-Cz6X6hsF.js → EodashTools-RwiXxELa.js} +4 -4
  24. package/dist/client/{ExportState-DFVFAgKz.js → ExportState-Cp4ftu4f.js} +46 -21
  25. package/dist/client/{Footer-DLzQcjkI.js → Footer-xGfh2LUv.js} +1 -1
  26. package/dist/client/{Header-_D9Z-zFJ.js → Header-BggV8BVC.js} +127 -17
  27. package/dist/client/MobileLayout-BwXCBKFL.js +118 -0
  28. package/dist/client/{PopUp-DwI8V2gW.js → PopUp-C6x6Rpv0.js} +8 -59
  29. package/dist/client/{ProcessList-C9eAg2Sb.js → ProcessList-DDwo71cD.js} +9 -13
  30. package/dist/client/{VImg-COXTnCWE.js → VImg-DN23k6uX.js} +2 -2
  31. package/dist/client/{VMain-C74l1bv-.js → VMain-BT2ZxPLy.js} +1 -1
  32. package/dist/client/{VTooltip-BLS-cQ9N.js → VTooltip-CAkym6KY.js} +3 -4
  33. package/dist/client/{WidgetsContainer-D-VfMRxE.js → WidgetsContainer-CLYZgRgc.js} +1 -1
  34. package/dist/client/asWebComponent-C5YMrXyg.js +9206 -0
  35. package/dist/client/{async-D4G-FOIc.js → async-DHmiD7O-.js} +6 -8
  36. package/dist/client/eo-dash.js +1 -1
  37. package/dist/client/{forwardRefs-CRMFoNYN.js → forwardRefs-YqjFe8WZ.js} +196 -37
  38. package/dist/client/{handling-DTAhQuPh.js → handling-DRaAJMSG.js} +93 -53
  39. package/dist/client/{helpers-CsjKHAcK.js → helpers-Bi-qmnbZ.js} +188 -87
  40. package/dist/client/{index-BoCcZ0l4.js → index-BtY2y1sL.js} +15 -16
  41. package/dist/client/{index-DEmHaCL3.js → index-D4GBjamF.js} +5 -3
  42. package/dist/client/{index-BIcmbjr0.js → index-DYLTaaU8.js} +27 -14
  43. package/dist/client/{index-BHilH1qx.js → index-bSHJLUNu.js} +30 -73
  44. package/dist/client/templates.js +64 -5
  45. package/dist/client/{transition-6MJLK-_H.js → transition-C4YbXuIb.js} +1 -1
  46. package/dist/node/cli.js +1 -1
  47. package/dist/types/core/client/App.vue.d.ts +16 -6
  48. package/dist/types/core/client/asWebComponent.d.ts +2 -2
  49. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +2 -1
  50. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +36 -16
  51. package/dist/types/core/client/components/EodashOverlay.vue.d.ts +2 -1
  52. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +9 -1
  53. package/dist/types/core/client/components/Footer.vue.d.ts +2 -1
  54. package/dist/types/core/client/components/Header.vue.d.ts +2 -1
  55. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +12 -6
  56. package/dist/types/core/client/components/Loading.vue.d.ts +2 -1
  57. package/dist/types/core/client/components/MobileLayout.vue.d.ts +2 -1
  58. package/dist/types/core/client/eodashSTAC/helpers.d.ts +2 -0
  59. package/dist/types/core/client/store/actions.d.ts +1 -2
  60. package/dist/types/core/client/store/states.d.ts +22 -4
  61. package/dist/types/core/client/types.d.ts +6 -1
  62. package/dist/types/core/client/utils/index.d.ts +1 -0
  63. package/dist/types/core/client/views/Dashboard.vue.d.ts +20 -8
  64. package/dist/types/templates/compare.d.ts +20 -0
  65. package/dist/types/templates/expert.d.ts +30 -1
  66. package/dist/types/widgets/EodashChart.vue.d.ts +28 -0
  67. package/dist/types/widgets/EodashDatePicker.vue.d.ts +38 -9
  68. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +88 -13
  69. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +1 -1
  70. package/dist/types/widgets/EodashItemFilter.vue.d.ts +169 -26
  71. package/dist/types/widgets/EodashLayerControl.vue.d.ts +38 -10
  72. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +22 -7
  73. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +94 -21
  74. package/dist/types/widgets/EodashMap/index.vue.d.ts +646 -93
  75. package/dist/types/widgets/EodashMap/methods/btns.d.ts +14 -0
  76. package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +24 -7
  77. package/dist/types/widgets/EodashProcess/index.vue.d.ts +26 -7
  78. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -2
  79. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +9 -14
  80. package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +2 -2
  81. package/dist/types/widgets/EodashProcess/methods/utils.d.ts +2 -2
  82. package/dist/types/widgets/EodashStacInfo.vue.d.ts +67 -18
  83. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +14 -6
  84. package/dist/types/widgets/EodashTools.vue.d.ts +437 -47
  85. package/dist/types/widgets/ExportState.vue.d.ts +26 -8
  86. package/dist/types/widgets/PopUp.vue.d.ts +61 -11
  87. package/dist/types/widgets/WidgetsContainer.vue.d.ts +22 -6
  88. package/package.json +33 -34
  89. package/templates/baseConfig.js +14 -0
  90. package/templates/compare.js +30 -3
  91. package/templates/expert.js +20 -2
  92. package/templates/lite.js +1 -1
  93. package/widgets/EodashChart.vue +139 -0
  94. package/widgets/EodashDatePicker.vue +5 -2
  95. package/widgets/EodashItemCatalog/index.vue +2 -2
  96. package/widgets/EodashItemCatalog/methods/map.js +9 -10
  97. package/widgets/EodashMap/EodashMapBtns.vue +58 -93
  98. package/widgets/EodashMap/index.vue +10 -2
  99. package/widgets/EodashMap/methods/btns.js +155 -0
  100. package/widgets/EodashMap/methods/create-layers-config.js +3 -3
  101. package/widgets/EodashMap/methods/index.js +2 -1
  102. package/widgets/EodashProcess/ProcessList.vue +2 -3
  103. package/widgets/EodashProcess/index.vue +24 -63
  104. package/widgets/EodashProcess/methods/async.js +1 -1
  105. package/widgets/EodashProcess/methods/composables.js +1 -6
  106. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +10 -6
  107. package/widgets/EodashProcess/methods/handling.js +42 -40
  108. package/widgets/EodashProcess/methods/outputs.js +44 -4
  109. package/widgets/EodashProcess/methods/utils.js +3 -5
  110. package/widgets/EodashStacInfo.vue +10 -23
  111. package/widgets/ExportState.vue +9 -15
  112. package/dist/client/EodashMapBtns-D-HulIl1.js +0 -306
  113. package/dist/client/MobileLayout-3Ko9XSfO.js +0 -118
  114. package/dist/client/asWebComponent-Bw03Jutr.js +0 -9090
@@ -1,24 +1,24 @@
1
1
  <template>
2
2
  <div ref="rootRef" class="map-buttons d-flex flex-column align-end">
3
3
  <button
4
- v-if="enableZoom"
4
+ v-if="enableZoom && !isGlobe"
5
5
  class="primary small circle small-elevate"
6
6
  @click="onMapZoomIn"
7
7
  >
8
8
  <i class="small"
9
- ><svg viewBox="0 0 24 24"><path :d="mdiPlus" /></svg
10
- ></i>
9
+ ><svg viewBox="0 0 24 24"><path :d="mdiPlus" /></svg>
10
+ </i>
11
11
  <div class="tooltip left">Zoom in</div>
12
12
  </button>
13
13
 
14
14
  <button
15
- v-if="enableZoom"
15
+ v-if="enableZoom && !isGlobe"
16
16
  class="primary small circle small-elevate"
17
17
  @click="onMapZoomOut"
18
18
  >
19
19
  <i class="small"
20
- ><svg viewBox="0 0 24 24"><path :d="mdiMinus" /></svg
21
- ></i>
20
+ ><svg viewBox="0 0 24 24"><path :d="mdiMinus" /></svg>
21
+ </i>
22
22
  <div class="tooltip left">Zoom out</div>
23
23
  </button>
24
24
 
@@ -28,8 +28,8 @@
28
28
  @click="showMapState = !showMapState"
29
29
  >
30
30
  <i class="small"
31
- ><svg viewBox="0 0 24 24"><path :d="mdiMapPlus" /></svg
32
- ></i>
31
+ ><svg viewBox="0 0 24 24"><path :d="mdiMapPlus" /></svg>
32
+ </i>
33
33
  <div class="tooltip left">Extract storytelling configuration</div>
34
34
  </button>
35
35
  <ExportState v-if="exportMap" v-model="showMapState" />
@@ -40,18 +40,18 @@
40
40
  @click="changeMapProjection(availableMapProjection)"
41
41
  >
42
42
  <i class="small"
43
- ><svg viewBox="0 0 24 24"><path :d="mdiEarthBox" /></svg
44
- ></i>
43
+ ><svg viewBox="0 0 24 24"><path :d="mdiEarthBox" /></svg>
44
+ </i>
45
45
  <div class="tooltip left">Change map projection</div>
46
46
  </button>
47
47
  <button
48
- v-if="compareIndicators"
48
+ v-if="compareIndicators && !isGlobe"
49
49
  class="primary small circle small-elevate"
50
- @click="onCompareClick"
50
+ @click="onCompareClick(compareIndicators)"
51
51
  >
52
52
  <i class="small"
53
- ><svg viewBox="0 0 24 24"><path :d="compareIcon" /></svg
54
- ></i>
53
+ ><svg viewBox="0 0 24 24"><path :d="compareIcon" /></svg>
54
+ </i>
55
55
  <div class="tooltip left">Compare mode</div>
56
56
  </button>
57
57
  <button
@@ -61,12 +61,27 @@
61
61
  >
62
62
  <i class="small"
63
63
  ><svg viewBox="0 0 24 24">
64
- <path :d="mdiStarFourPointsCircleOutline" /></svg
65
- ></i>
64
+ <path :d="mdiStarFourPointsCircleOutline" />
65
+ </svg>
66
+ </i>
66
67
  <div class="tooltip left">Back to POIs</div>
67
68
  </button>
69
+ <button
70
+ v-if="enableGlobe && !isInCompareMode"
71
+ class="primary small circle small-elevate"
72
+ @click="switchGlobe"
73
+ >
74
+ <i class="small"
75
+ ><svg viewBox="0 0 24 24">
76
+ <path :d="mdiEarth" />
77
+ </svg>
78
+ </i>
79
+ <div class="tooltip left">
80
+ {{ isGlobe ? "switch to 2D" : "switch to 3D" }}
81
+ </div>
82
+ </button>
68
83
  <eox-geosearch
69
- v-if="mapEl && enableSearch"
84
+ v-if="mapEl && !isGlobe && enableSearch"
70
85
  :for="mapEl"
71
86
  :endpoint="opencageUrl"
72
87
  :params="searchParams"
@@ -96,11 +111,12 @@
96
111
  </template>
97
112
  <script setup>
98
113
  import { useTransparentPanel } from "@/composables";
99
- import { changeMapProjection, setActiveTemplate } from "@/store/actions";
114
+ import { changeMapProjection } from "@/store/actions";
100
115
  import {
101
116
  activeTemplate,
102
117
  availableMapProjection,
103
118
  comparePoi,
119
+ isGlobe,
104
120
  mapEl,
105
121
  poi,
106
122
  } from "@/store/states";
@@ -112,17 +128,22 @@ import {
112
128
  mdiMinus,
113
129
  mdiPlus,
114
130
  mdiStarFourPointsCircleOutline,
131
+ mdiEarth,
115
132
  } from "@mdi/js";
116
133
  import ExportState from "^/ExportState.vue";
117
- import { computed, ref, triggerRef } from "vue";
134
+ import { computed, ref } from "vue";
118
135
  import PopUp from "^/PopUp.vue";
119
136
  import EodashItemFilter from "^/EodashItemFilter.vue";
120
137
  import { useDisplay } from "vuetify";
121
- import { useSTAcStore } from "@/store/stac";
122
- import { storeToRefs } from "pinia";
123
138
  import { loadPOiIndicator } from "^/EodashProcess/methods/handling";
124
- import { easeOut } from "ol/easing.js";
125
-
139
+ import {
140
+ onCompareClick,
141
+ onSelectCompareIndicator,
142
+ switchGlobe,
143
+ onMapZoomOut,
144
+ onMapZoomIn,
145
+ showCompareIndicators,
146
+ } from "./methods/btns";
126
147
  import "@eox/geosearch";
127
148
 
128
149
  const {
@@ -133,6 +154,7 @@ const {
133
154
  enableSearch,
134
155
  enableZoom,
135
156
  searchParams,
157
+ enableGlobe,
136
158
  } = defineProps({
137
159
  exportMap: {
138
160
  type: Boolean,
@@ -167,22 +189,26 @@ const {
167
189
  type: Boolean,
168
190
  default: true,
169
191
  },
192
+ enableGlobe: {
193
+ type: Boolean,
194
+ default: true,
195
+ },
170
196
  });
171
- const { selectedStac, selectedCompareStac } = storeToRefs(useSTAcStore());
172
- const { resetSelectedCompareSTAC } = useSTAcStore();
197
+
173
198
  const { smAndDown } = useDisplay();
174
199
  const popupWidth = computed(() => (smAndDown.value ? "80%" : "70%"));
175
200
  const popupHeight = computed(() => (smAndDown.value ? "90%" : "70%"));
176
201
 
177
202
  const showMapState = ref(false);
178
- const showCompareIndicators = ref(false);
203
+ const isInCompareMode = computed(
204
+ () =>
205
+ activeTemplate.value ===
206
+ ((typeof compareIndicators === "object" &&
207
+ compareIndicators?.compareTemplate) ||
208
+ "compare"),
209
+ );
179
210
  const compareIcon = computed(() =>
180
- activeTemplate.value ===
181
- ((typeof compareIndicators === "object" &&
182
- compareIndicators?.compareTemplate) ||
183
- "compare")
184
- ? mdiCompareRemove
185
- : mdiCompare,
211
+ isInCompareMode.value ? mdiCompareRemove : mdiCompare,
186
212
  );
187
213
  const itemFilterConfig = {
188
214
  enableHighlighting: false,
@@ -197,74 +223,13 @@ const itemFilterConfig = {
197
223
  compareIndicators.itemFilterConfig),
198
224
  };
199
225
 
200
- const onCompareClick = () => {
201
- showCompareIndicators.value =
202
- activeTemplate.value !==
203
- ((typeof compareIndicators === "object" &&
204
- compareIndicators.compareTemplate) ||
205
- "compare");
206
-
207
- const fallbackTemplate =
208
- (typeof compareIndicators === "object" &&
209
- compareIndicators.fallbackTemplate) ||
210
- "expert";
211
- selectedCompareStac.value = null;
212
- resetSelectedCompareSTAC();
213
- setActiveTemplate(fallbackTemplate);
214
- triggerRef(selectedStac);
215
- };
216
-
217
226
  /** @type {import("vue").Ref<HTMLDivElement|null>} */
218
227
  const rootRef = ref(null);
219
228
 
220
- const onSelectCompareIndicator = () => {
221
- const compareTemplate =
222
- (typeof compareIndicators === "object" &&
223
- compareIndicators.compareTemplate) ||
224
- "compare";
225
- setActiveTemplate(compareTemplate);
226
- showCompareIndicators.value = !showCompareIndicators.value;
227
- };
228
-
229
229
  useTransparentPanel(rootRef);
230
230
 
231
- const onMapZoomOut = () => {
232
- const map = mapEl.value?.map;
233
- const currentZoom = map?.getView().getZoom();
234
- if (currentZoom !== undefined && currentZoom !== null) {
235
- const view = map?.getView();
236
-
237
- if (view !== undefined && view.getZoom()) {
238
- view.animate({
239
- zoom: currentZoom - 1,
240
- duration: 250,
241
- easing: easeOut,
242
- });
243
- }
244
- }
245
- };
246
-
247
- const onMapZoomIn = () => {
248
- const map = mapEl.value?.map;
249
- const currentZoom = map?.getView().getZoom();
250
- if (currentZoom !== undefined && currentZoom !== null) {
251
- const view = map?.getView();
252
-
253
- if (view !== undefined && view.getZoom()) {
254
- view.animate({
255
- zoom: currentZoom + 1,
256
- duration: 250,
257
- easing: easeOut,
258
- });
259
- }
260
- }
261
- };
262
231
  const opencageApiKey = process.env.EODASH_OPENCAGE || "NO_KEY_FOUND";
263
232
  const opencageUrl = `https://api.opencagedata.com/geocode/v1/json?key=${opencageApiKey}`;
264
-
265
- /*const menu = document
266
- .querySelector("eox-geosearch")
267
- .renderRoot.querySelector("menu");*/
268
233
  </script>
269
234
 
270
235
  <style scoped>
@@ -46,7 +46,7 @@
46
46
  <!-- prettier-ignore -->
47
47
  <EodashMapBtns
48
48
  :style="{
49
- gridColumn: (indicator || compareIndicator || poi) ? responsiveX : '12',
49
+ gridColumn: (indicator || compareIndicator || poi) && !isGlobe ? responsiveX : '12',
50
50
  gridRow: responsiveY,
51
51
  }"
52
52
  :exportMap="(indicator || compareIndicator || poi) ? btnsProps.exportMap : false"
@@ -60,6 +60,7 @@
60
60
  "
61
61
  :enableZoom="(indicator || compareIndicator || poi) ? btnsProps.enableZoom : false
62
62
  "
63
+ :enableGlobe="(indicator || compareIndicator || poi) ? btnsProps.enableGlobe : false"
63
64
  :searchParams="btnsProps.searchParams"
64
65
  />
65
66
  </div>
@@ -77,6 +78,7 @@ import {
77
78
  indicator,
78
79
  compareIndicator,
79
80
  poi,
81
+ isGlobe,
80
82
  } from "@/store/states";
81
83
  import { storeToRefs } from "pinia";
82
84
  import { useSTAcStore } from "@/store/stac";
@@ -139,6 +141,7 @@ const props = defineProps({
139
141
  * enableSearch?: boolean;
140
142
  * searchParams?: object;
141
143
  * enableZoom?: boolean;
144
+ * enableGlobe?: boolean;
142
145
  * enableCompareIndicators?: boolean | {
143
146
  * compareTemplate?:string;
144
147
  * fallbackTemplate?:string;
@@ -153,6 +156,7 @@ const props = defineProps({
153
156
  enableBackToPOIs: true,
154
157
  enableSearch: true,
155
158
  enableZoom: true,
159
+ enableGlobe: true,
156
160
  searchParams: {},
157
161
  }),
158
162
  },
@@ -195,9 +199,13 @@ const btnsProps = computed(() => ({
195
199
  backToPOIs: props.btns.enableBackToPOIs ?? true,
196
200
  enableSearch: props.btns.enableSearch ?? true,
197
201
  enableZoom: props.btns.enableZoom ?? true,
202
+ enableGlobe: props.btns.enableGlobe ?? true,
198
203
  searchParams: props.btns.searchParams,
199
204
  }));
200
205
 
206
+ if (btnsProps.value.enableGlobe) {
207
+ await import("@eox/map/src/plugins/globe");
208
+ }
201
209
  // Prepare containers for scale line and cursor coordinates
202
210
  const scaleLineRef = useTemplateRef("scale-line");
203
211
  const cursorCoordsRef = useTemplateRef("cursor-coords");
@@ -386,7 +394,7 @@ onMounted(() => {
386
394
  left: 24px;
387
395
  bottom: 54px; /* Tighter spacing: watermark at 6px + ~48px */
388
396
  color: rgba(0, 0, 0, 0.9);
389
- font-size: 11px;
397
+ font-size: 10px;
390
398
  font-family: var(--eox-body-font-family);
391
399
  background: #fffe;
392
400
  border-radius: 4px;
@@ -0,0 +1,155 @@
1
+ import { getLayers, setActiveTemplate } from "@/store/actions";
2
+ import { useSTAcStore } from "@/store/stac";
3
+ import { activeTemplate, isGlobe, mapEl } from "@/store/states";
4
+ import { easeOut } from "ol/easing.js";
5
+ import { storeToRefs } from "pinia";
6
+ import { ref } from "vue";
7
+ import { triggerRef } from "vue";
8
+
9
+ export const switchGlobe = () => {
10
+ if (!mapEl.value) {
11
+ return;
12
+ }
13
+ if (!isGlobe.value) {
14
+ mapEl.value.layers = addCorsAnonym([...getLayers()]);
15
+ }
16
+ mapEl.value.projection = isGlobe.value ? "EPSG:3857" : "globe";
17
+ if (isGlobe.value) {
18
+ showAllPanels();
19
+ } else hideAllPanels();
20
+ isGlobe.value = !isGlobe.value;
21
+ };
22
+
23
+ function hideAllPanels() {
24
+ const allPanels = document.querySelectorAll(
25
+ "eox-layout-item:not([class='bg-panel'])",
26
+ );
27
+ allPanels.forEach((panel) => {
28
+ if (!panel || !(panel instanceof HTMLElement)) {
29
+ return;
30
+ }
31
+ panel.style.display = "none";
32
+ });
33
+ }
34
+ function showAllPanels() {
35
+ const allPanels = document.querySelectorAll(
36
+ "eox-layout-item:not([class='bg-panel'])",
37
+ );
38
+ allPanels.forEach((panel) => {
39
+ if (!panel || !(panel instanceof HTMLElement)) {
40
+ return;
41
+ }
42
+ panel.style.display = "";
43
+ });
44
+ }
45
+ /**
46
+ *
47
+ * @param {import("@eox/map").EoxLayer[]} layers
48
+ * @return {import("@eox/map").EoxLayer[]}
49
+ */
50
+ function addCorsAnonym(layers) {
51
+ //@ts-expect-error todo
52
+ return layers.map((layer) => {
53
+ if (layer.type === "Group") {
54
+ layer.layers = addCorsAnonym([...(layer.layers ?? [])]);
55
+ return layer;
56
+ }
57
+ // check if not mapbox style as a fix for ts error
58
+ if (layer.type === "MapboxStyle") {
59
+ return layer;
60
+ }
61
+
62
+ return {
63
+ ...layer,
64
+ ...(layer.source && {
65
+ source: {
66
+ ...layer.source,
67
+ crossOrigin: "anonymous",
68
+ },
69
+ ...(layer.sources && {
70
+ sources: layer.sources.map((source) => ({
71
+ ...source,
72
+ crossOrigin: "anonymous",
73
+ })),
74
+ }),
75
+ }),
76
+ };
77
+ });
78
+ }
79
+
80
+ export const onMapZoomOut = () => {
81
+ const map = mapEl.value?.map;
82
+ const currentZoom = map?.getView().getZoom();
83
+ if (currentZoom !== undefined && currentZoom !== null) {
84
+ const view = map?.getView();
85
+
86
+ if (view !== undefined && view.getZoom()) {
87
+ view.animate({
88
+ zoom: currentZoom - 1,
89
+ duration: 250,
90
+ easing: easeOut,
91
+ });
92
+ }
93
+ }
94
+ };
95
+
96
+ export const onMapZoomIn = () => {
97
+ const map = mapEl.value?.map;
98
+ const currentZoom = map?.getView().getZoom();
99
+ if (currentZoom !== undefined && currentZoom !== null) {
100
+ const view = map?.getView();
101
+
102
+ if (view !== undefined && view.getZoom()) {
103
+ view.animate({
104
+ zoom: currentZoom + 1,
105
+ duration: 250,
106
+ easing: easeOut,
107
+ });
108
+ }
109
+ }
110
+ };
111
+
112
+ export const showCompareIndicators = ref(false);
113
+ /**
114
+ *
115
+ * @param {boolean | {
116
+ * compareTemplate?:string;
117
+ * fallbackTemplate?:string;
118
+ * itemFilterConfig?:Partial<InstanceType<import("./EodashItemFilter.vue").default>["$props"]>
119
+ * }} compareIndicators
120
+ */
121
+ export const onSelectCompareIndicator = (compareIndicators) => {
122
+ const compareTemplate =
123
+ (typeof compareIndicators === "object" &&
124
+ compareIndicators.compareTemplate) ||
125
+ "compare";
126
+ setActiveTemplate(compareTemplate);
127
+ showCompareIndicators.value = !showCompareIndicators.value;
128
+ };
129
+
130
+ /**
131
+ *
132
+ * @param {boolean | {
133
+ * compareTemplate?:string;
134
+ * fallbackTemplate?:string;
135
+ * itemFilterConfig?:Partial<InstanceType<import("./EodashItemFilter.vue").default>["$props"]>
136
+ * }} compareIndicators
137
+ */
138
+ export const onCompareClick = (compareIndicators) => {
139
+ const { selectedStac, selectedCompareStac } = storeToRefs(useSTAcStore());
140
+ const { resetSelectedCompareSTAC } = useSTAcStore();
141
+ showCompareIndicators.value =
142
+ activeTemplate.value !==
143
+ ((typeof compareIndicators === "object" &&
144
+ compareIndicators.compareTemplate) ||
145
+ "compare");
146
+
147
+ const fallbackTemplate =
148
+ (typeof compareIndicators === "object" &&
149
+ compareIndicators.fallbackTemplate) ||
150
+ "expert";
151
+ selectedCompareStac.value = null;
152
+ resetSelectedCompareSTAC();
153
+ setActiveTemplate(fallbackTemplate);
154
+ triggerRef(selectedStac);
155
+ };
@@ -82,7 +82,7 @@ export const createLayersConfig = async (
82
82
  const observationPointsLayer =
83
83
  EodashCollection.getObservationPointsLayer(eodashCols);
84
84
  if (observationPointsLayer) {
85
- dataLayers.layers.unshift(observationPointsLayer);
85
+ dataLayers.layers.push(observationPointsLayer);
86
86
  }
87
87
  const baseLayers = {
88
88
  type: "Group",
@@ -153,7 +153,7 @@ export const createLayersConfig = async (
153
153
  }
154
154
 
155
155
  if (baseLayers.layers.length) {
156
- layersCollection.push(baseLayers);
156
+ layersCollection.unshift(baseLayers);
157
157
  }
158
158
 
159
159
  const overlayLayers = {
@@ -171,7 +171,7 @@ export const createLayersConfig = async (
171
171
 
172
172
  if (indicatorOverlays.length) {
173
173
  overlayLayers.layers.push(...indicatorOverlays);
174
- layersCollection.unshift(overlayLayers);
174
+ layersCollection.push(overlayLayers);
175
175
  }
176
176
 
177
177
  return layersCollection;
@@ -8,6 +8,7 @@ import { isFirstLoad } from "@/utils/states";
8
8
  import { useEmitLayersUpdate, useOnLayersUpdate } from "@/composables";
9
9
  import { mapPosition } from "@/store/states";
10
10
  import { sanitizeBbox } from "@/eodashSTAC/helpers";
11
+ import { transformExtent } from "@eox/map";
11
12
  /**
12
13
  * Holder for previous compare map view as it is overwritten by sync
13
14
  * @type { import("ol").View | null} mapElement
@@ -201,7 +202,7 @@ export const useInitMap = (
201
202
  const b = updatedStac.extent?.spatial.bbox[0];
202
203
  const sanitizedExtent = sanitizeBbox([...b]);
203
204
 
204
- const reprojExtent = mapElement.value?.transformExtent(
205
+ const reprojExtent = transformExtent(
205
206
  sanitizedExtent,
206
207
  "EPSG:4326",
207
208
  mapElement.value?.map?.getView().getProjection(),
@@ -25,8 +25,8 @@
25
25
  >{{
26
26
  new Date(item.job_start_datetime).toISOString().slice(0, 16)
27
27
  }}
28
- <v-icon>mdi-open-in-new</v-icon></a
29
- >
28
+ <v-icon :icon="[mdiOpenInNew]" />
29
+ </a>
30
30
  </td>
31
31
  <td>{{ item.status }}</td>
32
32
  <td style="padding: 0px">
@@ -73,7 +73,6 @@
73
73
  </div>
74
74
  </template>
75
75
  <script setup>
76
- /* eslint-disable @typescript-eslint/no-unused-vars */
77
76
  import {
78
77
  mdiUploadBox,
79
78
  mdiDownloadBox,