@eodash/eodash 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/core/client/components/DashboardLayout.vue +1 -2
  2. package/core/client/components/EodashOverlay.vue +4 -5
  3. package/core/client/components/MobileLayout.vue +42 -21
  4. package/core/client/composables/index.js +54 -60
  5. package/core/client/eodashSTAC/EodashCollection.js +199 -108
  6. package/core/client/eodashSTAC/auth.js +86 -0
  7. package/core/client/eodashSTAC/createLayers.js +234 -4
  8. package/core/client/eodashSTAC/helpers.js +281 -59
  9. package/core/client/eodashSTAC/parquet.js +0 -13
  10. package/core/client/eodashSTAC/triggers.js +1 -1
  11. package/core/client/store/actions.js +14 -0
  12. package/core/client/store/stac.js +46 -8
  13. package/core/client/store/states.js +6 -0
  14. package/core/client/types.ts +206 -3
  15. package/core/client/utils/bands-editor/arithmetic.js +144 -0
  16. package/core/client/utils/bands-editor/colors.js +36 -0
  17. package/core/client/utils/bands-editor/dom.js +196 -0
  18. package/core/client/utils/bands-editor/exampleSchema.json +1320 -0
  19. package/core/client/utils/bands-editor/index.js +68 -0
  20. package/core/client/utils/bands-editor/rgb.js +102 -0
  21. package/core/client/utils/index.js +5 -2
  22. package/core/client/views/Dashboard.vue +1 -1
  23. package/core/client/vite-env.d.ts +122 -0
  24. package/dist/client/{DashboardLayout-ByVs1DrY.js → DashboardLayout-Cq15p4TH.js} +5 -6
  25. package/dist/client/{DynamicWebComponent-C3W7HSQm.js → DynamicWebComponent-Cv-fPRG1.js} +1 -1
  26. package/dist/client/{EodashDatePicker-BIAf1sMT.js → EodashDatePicker-CPlJwEIO.js} +20 -22
  27. package/dist/client/{EodashItemFilter-DPznh8UB.js → EodashItemFilter-Ydebgbjj.js} +46 -31
  28. package/dist/client/EodashLayerControl-COhrkNEs.js +1517 -0
  29. package/dist/client/{EodashLayoutSwitcher-C5qTEffW.js → EodashLayoutSwitcher-pnKhTRZV.js} +4 -4
  30. package/dist/client/EodashMapBtns-Cj0Fx119.js +301 -0
  31. package/dist/client/{EodashStacInfo-CSvvF2jI.js → EodashStacInfo-Dadkg_Nj.js} +1 -1
  32. package/dist/client/EodashTimeSlider-CpoHX0S7.js +53 -0
  33. package/dist/client/{EodashTools-Cv1SXQ5y.js → EodashTools-UGBG7KC9.js} +10 -7
  34. package/dist/client/{ExportState-D-iuwaad.js → ExportState-GtJkAqeZ.js} +145 -121
  35. package/dist/client/{Footer-CyF0zRAk.js → Footer-D3ZPG5c4.js} +1 -1
  36. package/dist/client/{Header-CgD8jDKU.js → Header-z6AK-wpN.js} +2 -3
  37. package/dist/client/MobileLayout-BXNsNftb.js +118 -0
  38. package/dist/client/{PopUp-BsYLvWch.js → PopUp-BbQdjENV.js} +79 -44
  39. package/dist/client/{ProcessList-C2xsLU2_.js → ProcessList-C6VsdsYI.js} +18 -12
  40. package/dist/client/{VImg-OHe8YTs2.js → VImg-CxaMSB99.js} +203 -5
  41. package/dist/client/{VMain-PryTLU4a.js → VMain-Ds7yw0wj.js} +1 -1
  42. package/dist/client/{VTooltip-DZ0fjpB3.js → VTooltip-Cze6CEVh.js} +2 -3
  43. package/dist/client/{WidgetsContainer-B9LBadcC.js → WidgetsContainer-D66bj-JJ.js} +1 -1
  44. package/dist/client/asWebComponent-CWbNRdf9.js +8895 -0
  45. package/dist/client/{async-DkSu_u2K.js → async-BA7oWCMX.js} +69 -5
  46. package/dist/client/easing-CH0-9wR8.js +35 -0
  47. package/dist/client/eo-dash.js +1 -1
  48. package/dist/client/{VOverlay-yUn7p-Uf.js → forwardRefs-BUfxOIo-.js} +308 -28
  49. package/dist/client/{handling-CgmFXkW6.js → handling-DlNTtKB-.js} +27 -6
  50. package/dist/client/{helpers-Dy0Q13tP.js → helpers-CtE0W7iu.js} +595 -278
  51. package/dist/client/{index-skjhlH8u.js → index-CeEZIjO6.js} +26 -13
  52. package/dist/client/{index-Ch_HchK3.js → index-CsKbRDeN.js} +238 -77
  53. package/dist/client/{index-Dqj4tbx2.js → index-D4_NRKrf.js} +2 -2
  54. package/dist/client/index-DeECc3lV.js +571 -0
  55. package/dist/client/material-symbols-outlined.woff2 +0 -0
  56. package/dist/client/material-symbols-rounded.woff2 +0 -0
  57. package/dist/client/material-symbols-sharp.woff2 +0 -0
  58. package/dist/client/material-symbols-subset.woff2 +0 -0
  59. package/dist/client/templates.js +106 -49
  60. package/dist/client/{transition-C98Yn4Vo.js → transition-Byvp3L6Y.js} +1 -1
  61. package/dist/node/cli.js +6 -6
  62. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +24 -10
  63. package/dist/types/core/client/eodashSTAC/auth.d.ts +7 -0
  64. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +15 -3
  65. package/dist/types/core/client/eodashSTAC/helpers.d.ts +51 -15
  66. package/dist/types/core/client/plugins/vuetify.d.ts +14 -14
  67. package/dist/types/core/client/store/actions.d.ts +2 -0
  68. package/dist/types/core/client/store/stac.d.ts +16 -7
  69. package/dist/types/core/client/store/states.d.ts +4 -0
  70. package/dist/types/core/client/types.d.ts +171 -3
  71. package/dist/types/core/client/utils/bands-editor/arithmetic.d.ts +8 -0
  72. package/dist/types/core/client/utils/bands-editor/colors.d.ts +15 -0
  73. package/dist/types/core/client/utils/bands-editor/dom.d.ts +42 -0
  74. package/dist/types/core/client/utils/bands-editor/index.d.ts +20 -0
  75. package/dist/types/core/client/utils/bands-editor/rgb.d.ts +15 -0
  76. package/dist/types/core/client/utils/index.d.ts +1 -1
  77. package/dist/types/templates/baseConfig.d.ts +87 -1
  78. package/dist/types/templates/compare.d.ts +0 -25
  79. package/dist/types/templates/expert.d.ts +17 -21
  80. package/dist/types/templates/explore.d.ts +67 -0
  81. package/dist/types/templates/index.d.ts +1 -1
  82. package/dist/types/templates/{light.d.ts → lite.d.ts} +9 -0
  83. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +21 -0
  84. package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +49 -0
  85. package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +4 -0
  86. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +12 -0
  87. package/dist/types/widgets/EodashItemCatalog/types.d.ts +14 -0
  88. package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +6 -0
  89. package/dist/types/widgets/EodashMap/index.vue.d.ts +114 -0
  90. package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
  91. package/dist/types/widgets/EodashMap/methods/index.d.ts +1 -1
  92. package/dist/types/widgets/EodashProcess/methods/async.d.ts +1 -0
  93. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
  94. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +7 -0
  95. package/dist/types/widgets/EodashTools.vue.d.ts +10 -10
  96. package/dist/types/widgets/ExportState.vue.d.ts +2 -0
  97. package/package.json +31 -28
  98. package/templates/baseConfig.js +10 -5
  99. package/templates/compare.js +2 -22
  100. package/templates/expert.js +19 -18
  101. package/templates/explore.js +62 -0
  102. package/templates/index.js +1 -1
  103. package/templates/{light.js → lite.js} +11 -2
  104. package/widgets/EodashDatePicker.vue +15 -18
  105. package/widgets/EodashItemCatalog/index.vue +161 -0
  106. package/widgets/EodashItemCatalog/methods/filters.js +216 -0
  107. package/widgets/EodashItemCatalog/methods/handlers.js +50 -0
  108. package/widgets/EodashItemCatalog/methods/map.js +144 -0
  109. package/widgets/EodashItemCatalog/types.ts +15 -0
  110. package/widgets/EodashItemFilter.vue +35 -28
  111. package/widgets/EodashLayerControl.vue +10 -6
  112. package/widgets/EodashLayoutSwitcher.vue +1 -1
  113. package/widgets/EodashMap/EodashMapBtns.vue +278 -0
  114. package/widgets/EodashMap/index.vue +263 -38
  115. package/widgets/EodashMap/methods/create-layers-config.js +9 -6
  116. package/widgets/EodashMap/methods/index.js +27 -13
  117. package/widgets/EodashProcess/ProcessList.vue +13 -1
  118. package/widgets/EodashProcess/index.vue +17 -1
  119. package/widgets/EodashProcess/methods/async.js +22 -1
  120. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +25 -3
  121. package/widgets/EodashProcess/methods/handling.js +2 -0
  122. package/widgets/EodashProcess/methods/outputs.js +1 -0
  123. package/widgets/EodashProcess/methods/utils.js +45 -1
  124. package/widgets/EodashTimeSlider.vue +40 -0
  125. package/widgets/EodashTools.vue +7 -3
  126. package/widgets/ExportState.vue +53 -22
  127. package/dist/client/EodashLayerControl-Bhxjw4V2.js +0 -154
  128. package/dist/client/EodashMapBtns-WoGq8MuV.js +0 -173
  129. package/dist/client/MobileLayout-EKQ_kpSh.js +0 -1226
  130. package/dist/client/asWebComponent-By_7_JjS.js +0 -19193
  131. package/dist/client/forwardRefs-BXxrv98s.js +0 -272
  132. package/dist/client/index-BuhOHXKv.js +0 -199
  133. package/widgets/EodashMapBtns.vue +0 -155
@@ -2,13 +2,13 @@ import { onMounted, watch, nextTick, ref, useTemplateRef, computed, createElemen
2
2
  import '@eox/chart';
3
3
  import '@eox/drawtools';
4
4
  import '@eox/jsonform';
5
- import { a7 as eoxLayersKey, a6 as useOnLayersUpdate, _ as _export_sfc, Y as useSTAcStore, V as VBtn } from './asWebComponent-By_7_JjS.js';
5
+ import { R as eoxLayersKey, K as useOnLayersUpdate, _ as _export_sfc, E as useSTAcStore, G as VBtn } from './asWebComponent-CWbNRdf9.js';
6
6
  import { storeToRefs } from 'pinia';
7
- import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-C2xsLU2_.js';
8
- import { i as initProcess, o as onChartClick, h as handleProcesses } from './handling-CgmFXkW6.js';
7
+ import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-C6VsdsYI.js';
8
+ import { i as initProcess, o as onChartClick, h as handleProcesses } from './handling-DlNTtKB-.js';
9
9
  import { useEventBus } from '@vueuse/core';
10
- import { u as updateJobsStatus, d as download } from './async-DkSu_u2K.js';
11
- import { C as compareIndicator, B as indicator, H as mapCompareEl, d as mapEl } from './helpers-Dy0Q13tP.js';
10
+ import { u as updateJobsStatus, d as download } from './async-BA7oWCMX.js';
11
+ import { G as compareIndicator, E as indicator, M as mapCompareEl, h as mapEl, S as compareChartEl, T as chartEl } from './helpers-CtE0W7iu.js';
12
12
  import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
13
13
 
14
14
  /**
@@ -184,6 +184,10 @@ const jsonformEl =
184
184
  /** @type {Readonly<import("vue").ShallowRef<import("@eox/jsonform").EOxJSONForm | null>>} */ (
185
185
  useTemplateRef("jsonformEl")
186
186
  );
187
+ const chartElRef =
188
+ /** @type {Readonly<import("vue").ShallowRef<import("@eox/chart").EOxChart | null>>} */ (
189
+ useTemplateRef("chartElRef")
190
+ );
187
191
  const isAsync = computed(
188
192
  () =>
189
193
  selectedStac.value?.links.filter((l) => l.endpoint === "eoxhub_workspaces")
@@ -307,6 +311,15 @@ const chartStyles = computed(() => {
307
311
  return styles;
308
312
  });
309
313
 
314
+ // Assign chart element to global state based on compare mode
315
+ watch(chartElRef, (newVal) => {
316
+ if (__props.enableCompare) {
317
+ compareChartEl.value = newVal;
318
+ } else {
319
+ chartEl.value = newVal;
320
+ }
321
+ });
322
+
310
323
  return (_ctx, _cache) => {
311
324
 
312
325
 
@@ -326,6 +339,8 @@ return (_ctx, _cache) => {
326
339
  (isProcessed.value && chartSpec.value)
327
340
  ? (openBlock(), createElementBlock("eox-chart", {
328
341
  key: 1,
342
+ ref_key: "chartElRef",
343
+ ref: chartElRef,
329
344
  class: "chart",
330
345
  ".spec": toRaw(chartSpec.value),
331
346
  ".dataValues": toRaw(chartData.value),
@@ -344,11 +359,10 @@ return (_ctx, _cache) => {
344
359
  onClick: startProcess,
345
360
  color: "primary"
346
361
  }, {
347
- default: withCtx(() => _cache[1] || (_cache[1] = [
362
+ default: withCtx(() => [...(_cache[1] || (_cache[1] = [
348
363
  createTextVNode(" Execute ", -1 /* CACHED */)
349
- ])),
350
- _: 1 /* STABLE */,
351
- __: [1]
364
+ ]))]),
365
+ _: 1 /* STABLE */
352
366
  }, 8 /* PROPS */, ["loading", "append-icon"]))
353
367
  : createCommentVNode("v-if", true),
354
368
  (processResults.value.length && isProcessed.value && !isAsync.value)
@@ -358,11 +372,10 @@ return (_ctx, _cache) => {
358
372
  "append-icon": [unref(mdiDownloadCircleOutline)],
359
373
  onClick: downloadResults
360
374
  }, {
361
- default: withCtx(() => _cache[2] || (_cache[2] = [
375
+ default: withCtx(() => [...(_cache[2] || (_cache[2] = [
362
376
  createTextVNode(" Download ", -1 /* CACHED */)
363
- ])),
364
- _: 1 /* STABLE */,
365
- __: [2]
377
+ ]))]),
378
+ _: 1 /* STABLE */
366
379
  }, 8 /* PROPS */, ["append-icon"]))
367
380
  : createCommentVNode("v-if", true)
368
381
  ])
@@ -1,11 +1,13 @@
1
- import { onMounted, onUnmounted, watch, 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 { J as setMapProjFromCol, A as mapPosition, d as mapEl, H as mapCompareEl, x as datetime } from './helpers-Dy0Q13tP.js';
4
+ import { O as setMapProjFromCol, D as mapPosition, L as sanitizeBbox, h as mapEl, M as mapCompareEl, E as indicator, G as compareIndicator, A as datetime } from './helpers-CtE0W7iu.js';
5
5
  import { storeToRefs } from 'pinia';
6
- import { a3 as EodashCollection, Y as useSTAcStore, a4 as useEmitLayersUpdate, a5 as isFirstLoad, a6 as useOnLayersUpdate, a2 as layerControlFormValue, a1 as layerControlFormValueCompare, a0 as eodashCompareCollections, $ as eodashCollections } from './asWebComponent-By_7_JjS.js';
6
+ import { O as EodashCollection, E as useSTAcStore, P as useEmitLayersUpdate, Q as isFirstLoad, K as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, N as layerControlFormValue, M as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-CWbNRdf9.js';
7
7
  import log from 'loglevel';
8
+ import { i as inAndOut } from './easing-CH0-9wR8.js';
8
9
  import mustache from 'mustache';
10
+ import EodashMapBtns from './EodashMapBtns-Cj0Fx119.js';
9
11
 
10
12
  /**
11
13
  * Creates full layer configuration from indicator and time information
@@ -15,19 +17,19 @@ import mustache from 'mustache';
15
17
  * | null
16
18
  * } selectedIndicator
17
19
  * @param {EodashCollection[]} eodashCols
18
- * @param {string} [updatedTime]
20
+ * @param {string | import("stac-ts").StacItem | null} [timeOrItem] - time as a string, or a stac item
19
21
  */
20
22
 
21
23
  const createLayersConfig = async (
22
24
  selectedIndicator,
23
25
  eodashCols,
24
- updatedTime,
26
+ timeOrItem,
25
27
  ) => {
26
28
  log.debug(
27
29
  "Creating layers config",
28
30
  selectedIndicator,
29
31
  eodashCols,
30
- updatedTime,
32
+ timeOrItem,
31
33
  );
32
34
  const layersCollection = [];
33
35
  const dataLayers = {
@@ -41,11 +43,14 @@ const createLayersConfig = async (
41
43
  };
42
44
 
43
45
  for (const ec of eodashCols) {
46
+ /** @type {Record<string,any>[]} */
44
47
  let layers;
45
- if (updatedTime) {
46
- layers = await ec.createLayersJson(new Date(updatedTime));
48
+ if (timeOrItem) {
49
+ const dateOrItem =
50
+ typeof timeOrItem === "string" ? new Date(timeOrItem) : timeOrItem;
51
+ layers = await ec.createLayersJson(dateOrItem);
47
52
  } else {
48
- layers = await ec.createLayersJson();
53
+ layers = await ec.createLayersJson(undefined);
49
54
  }
50
55
  // Add expand to all analysis layers
51
56
  layers.forEach((dl) => {
@@ -208,6 +213,7 @@ const useHandleMapMoveEnd = (mapElement, mapPosition) => {
208
213
  * @param {import("vue").Ref<Record<string,any>[]>} mapLayers
209
214
  * @param {import("vue").Ref<import("@eox/map").EOxMap| null>} partnerMap
210
215
  * @param {boolean} zoomToExtent
216
+ * @param {import("vue").Ref<import("stac-ts").StacItem | import("stac-ts").StacLink | null>} [selectedItem]
211
217
  */
212
218
  const useInitMap = (
213
219
  mapElement,
@@ -217,6 +223,7 @@ const useInitMap = (
217
223
  mapLayers,
218
224
  partnerMap,
219
225
  zoomToExtent,
226
+ selectedItem,
220
227
  ) => {
221
228
  log.debug(
222
229
  "InitMap",
@@ -225,10 +232,22 @@ const useInitMap = (
225
232
  eodashCols.values,
226
233
  datetime.value,
227
234
  );
228
-
235
+ // watch selectedItem if provided
236
+ const watching = selectedItem
237
+ ? [selectedIndicator, datetime, selectedItem]
238
+ : [selectedIndicator, datetime];
229
239
  const stopIndicatorWatcher = watch(
230
- [selectedIndicator, datetime],
231
- async ([updatedStac, updatedTime], [previousStac, previousTime]) => {
240
+ watching,
241
+ async (updated, previous) => {
242
+ const [updatedStac, updatedTime, updatedItem] =
243
+ /** @type {[import("stac-ts").StacCollection, string, import("stac-ts").StacItem | null]} */ (
244
+ selectedItem ? updated : [updated[0], updated[1], null]
245
+ );
246
+ const [previousStac, previousTime, previousItem] =
247
+ /** @type {[import("stac-ts").StacCollection, string, import("stac-ts").StacItem]} */ (
248
+ selectedItem ? previous : [previous[0], previous[1], null]
249
+ );
250
+
232
251
  if (updatedStac) {
233
252
  log.debug(
234
253
  "Selected Indicator watch triggered",
@@ -248,7 +267,9 @@ const useInitMap = (
248
267
  let layersCollection = [];
249
268
 
250
269
  const onlyTimeChanged =
251
- updatedStac?.id === previousStac?.id && updatedTime !== previousTime;
270
+ updatedStac?.id === previousStac?.id &&
271
+ (updatedTime !== previousTime ||
272
+ (updatedItem && updatedItem?.id !== previousItem?.id));
252
273
 
253
274
  const { selectedCompareStac } = storeToRefs(useSTAcStore());
254
275
  if (mapElement?.value?.id === "main") {
@@ -265,12 +286,12 @@ const useInitMap = (
265
286
  }
266
287
  }
267
288
 
268
- // We re-crate the configuration if time changed
289
+ // We re-create the configuration if time changed
269
290
  if (onlyTimeChanged) {
270
291
  layersCollection = await createLayersConfig(
271
292
  updatedStac,
272
293
  eodashCols,
273
- updatedTime,
294
+ updatedItem ?? updatedTime,
274
295
  );
275
296
  log.debug(
276
297
  "Assigned layers after changing time only",
@@ -292,7 +313,7 @@ const useInitMap = (
292
313
  layersCollection = await createLayersConfig(
293
314
  updatedStac,
294
315
  eodashCols,
295
- datetime.value,
316
+ selectedItem ? updatedItem : updatedTime,
296
317
  );
297
318
 
298
319
  // We try to set the current time selection to latest extent date
@@ -307,6 +328,7 @@ const useInitMap = (
307
328
  );
308
329
  }
309
330
  if (
331
+ !updatedItem &&
310
332
  endInterval !== null &&
311
333
  endInterval.toISOString() !== datetime.value &&
312
334
  !isFirstLoad.value
@@ -318,6 +340,7 @@ const useInitMap = (
318
340
  // Try to move map view to extent only when main
319
341
  // indicator and map changes
320
342
  if (
343
+ !updatedItem &&
321
344
  mapElement?.value?.id === "main" &&
322
345
  updatedStac.extent?.spatial.bbox &&
323
346
  !(
@@ -328,12 +351,7 @@ const useInitMap = (
328
351
  ) {
329
352
  // Sanitize extent,
330
353
  const b = updatedStac.extent?.spatial.bbox[0];
331
- const sanitizedExtent = [
332
- b?.[0] > -180 ? b?.[0] : -180,
333
- b?.[1] > -90 ? b?.[1] : -90,
334
- b?.[2] < 180 ? b?.[2] : 180,
335
- b?.[3] < 90 ? b?.[3] : 90,
336
- ];
354
+ const sanitizedExtent = sanitizeBbox([...b]);
337
355
 
338
356
  const reprojExtent = mapElement.value?.transformExtent(
339
357
  sanitizedExtent,
@@ -389,26 +407,23 @@ const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
389
407
  });
390
408
  };
391
409
 
392
- /**
393
- * @module ol/easing
394
- */
395
-
396
-
397
- /**
398
- * Start slow, speed up, and then slow down again.
399
- * @param {number} t Input between 0 and 1.
400
- * @return {number} Output between 0 and 1.
401
- * @api
402
- */
403
- function inAndOut(t) {
404
- return 3 * t * t - 2 * t * t * t;
405
- }
410
+ const _style_0 = "#cursor-coordinates[data-v-9484a41e]{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-9484a41e]{display:none}}#scale-line[data-v-9484a41e]{position:fixed;left:24px;bottom:28px;color:#fff}@media (max-width: 959px){#scale-line[data-v-9484a41e]{bottom:102px}}[data-v-9484a41e] .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-9484a41e] .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-9484a41e]{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-9484a41e]>*{pointer-events:auto}";
406
411
 
407
412
  const _hoisted_1 = [".enabled"];
408
- const _hoisted_2 = [".center", ".zoom", ".layers"];
413
+ const _hoisted_2 = [".center", ".zoom", ".layers", ".controls"];
409
414
  const _hoisted_3 = [".propertyTransform"];
410
415
  const _hoisted_4 = [".layers"];
411
416
  const _hoisted_5 = [".propertyTransform"];
417
+ const _hoisted_6 = {
418
+ key: 0,
419
+ id: "cursor-coordinates",
420
+ ref: "cursor-coords"
421
+ };
422
+ const _hoisted_7 = {
423
+ key: 1,
424
+ id: "scale-line",
425
+ ref: "scale-line"
426
+ };
412
427
 
413
428
 
414
429
  const _sfc_main = {
@@ -432,21 +447,133 @@ const _sfc_main = {
432
447
  type: Boolean,
433
448
  default: true,
434
449
  },
450
+ enableCursorCoordinates: {
451
+ type: Boolean,
452
+ default: true,
453
+ },
454
+ enableScaleLine: {
455
+ type: Boolean,
456
+ default: true,
457
+ },
458
+ btnsPosition: {
459
+ type: Object,
460
+ default: () => ({
461
+ x: "12/9/10",
462
+ y: 1,
463
+ gap: 16,
464
+ }),
465
+ },
466
+ btns: {
467
+ /** @type {import("vue").PropType<{
468
+ * enableExportMap?: boolean;
469
+ * enableChangeProjection?: boolean;
470
+ * enableBackToPOIs?: boolean;
471
+ * enableSearch?: boolean;
472
+ * enableZoom?: boolean;
473
+ * enableCompareIndicators?: boolean | {
474
+ * compareTemplate?:string;
475
+ * fallbackTemplate?:string;
476
+ * itemFilterConfig?:InstanceType<import("../EodashItemFilter.vue").default>["$props"]
477
+ * };
478
+ * }> }*/
479
+ type: Object,
480
+ default: () => ({
481
+ enableExportMap: true,
482
+ enableChangeProjection: true,
483
+ enableCompareIndicators: true,
484
+ enableBackToPOIs: true,
485
+ enableSearch: true,
486
+ enableZoom: true,
487
+ }),
488
+ },
435
489
  },
436
490
  setup(__props) {
437
491
 
438
492
  const props = __props;
439
493
 
494
+ // Responsive positioning logic
495
+ const { width } = useDisplay();
496
+
497
+ /**
498
+ * Parse responsive string values (e.g., "1/5/10") into values for different screen sizes
499
+ * Breakpoints: [0, 960, 1920] based on properties passed to eox-layout in DashboardLayout.vue
500
+ * @param {string | number} value
501
+ * @returns {number}
502
+ */
503
+ const parseResponsiveValue = (value) => {
504
+ if (typeof value === "number") {
505
+ return value;
506
+ }
507
+ if (typeof value === "string") {
508
+ const parts = value.split("/");
509
+ const currentWidth = width.value;
510
+
511
+ if (currentWidth < 960) {
512
+ return parseInt(parts[0]) || 1;
513
+ } else if (currentWidth < 1920) {
514
+ return parseInt(parts[1] || parts[0]) || 1;
515
+ } else {
516
+ return parseInt(parts[2] || parts[1] || parts[0]) || 1;
517
+ }
518
+ }
519
+ return 1;
520
+ };
521
+
522
+ const responsiveX = computed(() => parseResponsiveValue(props.btnsPosition.x));
523
+ const responsiveY = computed(() => parseResponsiveValue(props.btnsPosition.y));
524
+ const btnsProps = computed(() => ({
525
+ exportMap: props.btns.enableExportMap ?? true,
526
+ changeProjection: props.btns.enableChangeProjection ?? true,
527
+ compareIndicators: props.btns.enableCompareIndicators ?? true,
528
+ backToPOIs: props.btns.enableBackToPOIs ?? true,
529
+ enableSearch: props.btns.enableSearch ?? true,
530
+ enableZoom: props.btns.enableZoom ?? true,
531
+ }));
532
+
533
+ // Prepare containers for scale line and cursor coordinates
534
+ const scaleLineRef = useTemplateRef("scale-line");
535
+ const cursorCoordsRef = useTemplateRef("cursor-coords");
536
+
440
537
  /** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
441
538
  const tooltipProperties = ref([]);
442
539
  /** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
443
540
  const compareTooltipProperties = ref([]);
444
- /** @type {import("@eox/map").EOxMap["controls"]} */
445
- const controls = {
446
- Attribution: {
447
- collapsible: true,
448
- },
449
- };
541
+ /** @type {import("vue").ComputedRef<{
542
+ Attribution: { collapsible: boolean };
543
+ ScaleLine?: { target: HTMLElement };
544
+ MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
545
+ }>} */
546
+ const controls = computed(() => {
547
+ /** @type {{
548
+ Attribution: { collapsible: boolean };
549
+ ScaleLine?: { target: HTMLElement };
550
+ MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
551
+ }} */
552
+ const controlsObj = {
553
+ Attribution: {
554
+ collapsible: true,
555
+ },
556
+ };
557
+
558
+ if (props.enableScaleLine && scaleLineRef.value) {
559
+ controlsObj.ScaleLine = {
560
+ target: scaleLineRef.value,
561
+ };
562
+ }
563
+
564
+ if (props.enableCursorCoordinates && cursorCoordsRef.value) {
565
+ controlsObj.MousePosition = {
566
+ projection: "EPSG:4326",
567
+ coordinateFormat: (/** @type {[number, number]} */ c) => {
568
+ return `${c[1].toFixed(3)} °N, ${c[0].toFixed(3)} °E`;
569
+ },
570
+ target: cursorCoordsRef.value,
571
+ };
572
+ }
573
+
574
+ return controlsObj;
575
+ });
576
+
450
577
  const initialCenter = toRaw(props.center);
451
578
  const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
452
579
  /** @type {import("vue").Ref<Record<string,any>[]>} */
@@ -490,7 +617,8 @@ const showCompare = computed(() =>
490
617
  useHandleMapMoveEnd(eoxMap, mapPosition);
491
618
 
492
619
  onMounted(() => {
493
- const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
620
+ const { selectedCompareStac, selectedStac, selectedItem } =
621
+ storeToRefs(useSTAcStore());
494
622
  // assign map Element state to eox map
495
623
  mapEl.value = eoxMap.value;
496
624
 
@@ -520,6 +648,7 @@ onMounted(() => {
520
648
  eoxMapLayers,
521
649
  compareMap,
522
650
  props.zoomToExtent,
651
+ selectedItem,
523
652
  );
524
653
  });
525
654
 
@@ -573,44 +702,76 @@ const tooltipPropertyTransform = (map) => {
573
702
  };
574
703
 
575
704
  return (_ctx, _cache) => {
576
- return (openBlock(), createElementBlock("eox-map-compare", {
577
- class: "fill-height fill-width overflow-none",
578
- ".enabled": showCompare.value
579
- }, [
580
- createElementVNode("eox-map", {
705
+ return (openBlock(), createElementBlock("span", null, [
706
+ createElementVNode("eox-map-compare", {
581
707
  class: "fill-height fill-width overflow-none",
582
- slot: "first",
583
- ref_key: "eoxMap",
584
- ref: eoxMap,
585
- id: "main",
586
- ".animationOptions": animationOptions,
587
- ".center": unref(initialCenter),
588
- ".zoom": unref(initialZoom),
589
- ".layers": eoxMapLayers.value,
590
- ".controls": controls
708
+ ".enabled": showCompare.value
591
709
  }, [
592
- createElementVNode("eox-map-tooltip", {
593
- style: normalizeStyle(mainTooltipStyles.value),
594
- ".propertyTransform": tooltipPropertyTransform('main')
595
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
596
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
597
- createElementVNode("eox-map", {
598
- class: "fill-height fill-width overflow-none",
599
- id: "compare",
600
- slot: "second",
601
- ref_key: "compareMap",
602
- ref: compareMap,
603
- ".layers": eoxMapCompareLayers.value
710
+ createElementVNode("eox-map", {
711
+ class: "fill-height fill-width overflow-none",
712
+ slot: "first",
713
+ ref_key: "eoxMap",
714
+ ref: eoxMap,
715
+ id: "main",
716
+ ".animationOptions": animationOptions,
717
+ ".center": unref(initialCenter),
718
+ ".zoom": unref(initialZoom),
719
+ ".layers": eoxMapLayers.value,
720
+ ".controls": controls.value
721
+ }, [
722
+ createElementVNode("eox-map-tooltip", {
723
+ style: normalizeStyle(mainTooltipStyles.value),
724
+ ".propertyTransform": tooltipPropertyTransform('main')
725
+ }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
726
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
727
+ createElementVNode("eox-map", {
728
+ class: "fill-height fill-width overflow-none",
729
+ id: "compare",
730
+ slot: "second",
731
+ ref_key: "compareMap",
732
+ ref: compareMap,
733
+ ".layers": eoxMapCompareLayers.value
734
+ }, [
735
+ createElementVNode("eox-map-tooltip", {
736
+ style: normalizeStyle(compareTooltipStyles.value),
737
+ ".propertyTransform": tooltipPropertyTransform('compare')
738
+ }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
739
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
740
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1),
741
+ (__props.enableCursorCoordinates)
742
+ ? (openBlock(), createElementBlock("div", _hoisted_6, null, 512 /* NEED_PATCH */))
743
+ : createCommentVNode("v-if", true),
744
+ (__props.enableScaleLine)
745
+ ? (openBlock(), createElementBlock("span", _hoisted_7, null, 512 /* NEED_PATCH */))
746
+ : createCommentVNode("v-if", true),
747
+ createElementVNode("div", {
748
+ class: "map-buttons-container",
749
+ style: normalizeStyle(`margin: ${__props.btnsPosition.gap}px 0 ${__props.btnsPosition.gap}px 0`)
604
750
  }, [
605
- createElementVNode("eox-map-tooltip", {
606
- style: normalizeStyle(compareTooltipStyles.value),
607
- ".propertyTransform": tooltipPropertyTransform('compare')
608
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
609
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
610
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))
751
+ createCommentVNode(" prettier-ignore "),
752
+ createVNode(EodashMapBtns, {
753
+ style: normalizeStyle({
754
+ gridColumn: (unref(indicator) || unref(compareIndicator)) ? responsiveX.value : '12',
755
+ gridRow: responsiveY.value,
756
+ }),
757
+ exportMap: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.exportMap : false,
758
+ changeProjection: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.changeProjection : false
759
+ ,
760
+ compareIndicators: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.compareIndicators : false
761
+ ,
762
+ backToPOIs: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.backToPOIs : false
763
+ ,
764
+ enableSearch: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableSearch : false
765
+ ,
766
+ enableZoom: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableZoom : false
767
+
768
+ }, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom"])
769
+ ], 4 /* STYLE */)
770
+ ]))
611
771
  }
612
772
  }
613
773
 
614
774
  };
775
+ const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-9484a41e"]]);
615
776
 
616
- export { _sfc_main as default };
777
+ export { index as default };
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent, render, h, mergeProps } from 'vue';
2
- import { a9 as consoleError, E as isObject } from './asWebComponent-By_7_JjS.js';
3
- import { V as VTooltip } from './VTooltip-DZ0fjpB3.js';
2
+ import { X as consoleError, Y as isObject } from './asWebComponent-CWbNRdf9.js';
3
+ import { V as VTooltip } from './VTooltip-Cze6CEVh.js';
4
4
 
5
5
  // Utilities
6
6
  function useDirectiveComponent(component, props) {