@eodash/eodash 5.3.1 → 5.3.3

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 (50) hide show
  1. package/core/client/eodashSTAC/EodashCollection.js +25 -16
  2. package/core/client/eodashSTAC/auth.js +19 -15
  3. package/core/client/eodashSTAC/createLayers.js +55 -23
  4. package/core/client/eodashSTAC/helpers.js +91 -5
  5. package/core/client/store/states.js +1 -1
  6. package/core/client/types.ts +12 -8
  7. package/core/client/utils/states.js +32 -0
  8. package/dist/client/{DashboardLayout-BAstYnhU.js → DashboardLayout-Cp8Rv3Ef.js} +2 -2
  9. package/dist/client/{DynamicWebComponent-7v4_DFqP.js → DynamicWebComponent-CBsxC82P.js} +1 -1
  10. package/dist/client/{EodashDatePicker-IVHLv9UN.js → EodashDatePicker-Dewym-cx.js} +3 -3
  11. package/dist/client/{EodashItemFilter-BPMpnXjo.js → EodashItemFilter-CAsZpOoQ.js} +1 -1
  12. package/dist/client/{EodashLayerControl-CSnQh2tb.js → EodashLayerControl-fn-rt8Ac.js} +2 -2
  13. package/dist/client/{EodashLayoutSwitcher-CPpGM8Pb.js → EodashLayoutSwitcher-B9XqQXCS.js} +3 -3
  14. package/dist/client/{EodashMapBtns-C_jyUJ2x.js → EodashMapBtns-nFY6MIAX.js} +6 -6
  15. package/dist/client/{EodashStacInfo-DjuWc0Iz.js → EodashStacInfo-lxBKoav9.js} +1 -1
  16. package/dist/client/{EodashTimeSlider-CDh9Lf02.js → EodashTimeSlider-DI97QkNT.js} +2 -2
  17. package/dist/client/{EodashTools-DSvDUUlL.js → EodashTools-D5ShUT1g.js} +4 -4
  18. package/dist/client/{ExportState-BhjxS0jG.js → ExportState-ruNyRS2E.js} +4 -4
  19. package/dist/client/{Footer-C3PPcdjv.js → Footer-IQNyfd78.js} +1 -1
  20. package/dist/client/{Header-E5NbT7HE.js → Header-BBdi_-Lp.js} +2 -2
  21. package/dist/client/{MobileLayout-DY7OHr1k.js → MobileLayout-BfBeF-JF.js} +2 -2
  22. package/dist/client/{PopUp-CSPXdqKI.js → PopUp-DRgOmD7-.js} +2 -2
  23. package/dist/client/{ProcessList-C3HV7G0b.js → ProcessList-DxyCFQdz.js} +20 -8
  24. package/dist/client/{VImg-FoXcOnWF.js → VImg-hwmwzSwG.js} +2 -2
  25. package/dist/client/{VMain-Ck2g1QOG.js → VMain-vk4-rkw-.js} +1 -1
  26. package/dist/client/{VTooltip-F_1Zcvhp.js → VTooltip-BYUZeia1.js} +2 -2
  27. package/dist/client/{WidgetsContainer-Cq9uZEuN.js → WidgetsContainer-DXD_8rqh.js} +1 -1
  28. package/dist/client/{asWebComponent-DZeEbWG0.js → asWebComponent-DdguWGDI.js} +121 -49
  29. package/dist/client/{async-Dk79llLt.js → async-D1MvO_Z_.js} +2 -2
  30. package/dist/client/eo-dash.js +1 -1
  31. package/dist/client/{forwardRefs-BbvoXHtj.js → forwardRefs-DM-E2MfG.js} +2 -2
  32. package/dist/client/{handling-DxucYlYh.js → handling-CbgeKrqT.js} +3 -3
  33. package/dist/client/{helpers-CI_7CUmn.js → helpers-CtUlAW0N.js} +93 -7
  34. package/dist/client/{index-DcCcdbgR.js → index-BJvLt3Xf.js} +5 -5
  35. package/dist/client/{index-KrGHjH-_.js → index-BkW06-Lg.js} +33 -21
  36. package/dist/client/{index-BO5uGfUe.js → index-BxDh5v-H.js} +3 -3
  37. package/dist/client/{index-C13BiO9C.js → index-DBo0F4Fv.js} +2 -2
  38. package/dist/client/templates.js +2 -2
  39. package/dist/client/{transition-Ctkv90El.js → transition-BdzATvPB.js} +1 -1
  40. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +2 -1
  41. package/dist/types/core/client/eodashSTAC/auth.d.ts +5 -5
  42. package/dist/types/core/client/eodashSTAC/helpers.d.ts +11 -0
  43. package/dist/types/core/client/types.d.ts +1 -0
  44. package/dist/types/core/client/utils/states.d.ts +28 -0
  45. package/dist/types/templates/index.d.ts +1 -0
  46. package/package.json +6 -6
  47. package/templates/index.js +2 -0
  48. package/widgets/EodashMap/index.vue +21 -11
  49. package/widgets/EodashMap/methods/index.js +9 -7
  50. package/widgets/EodashProcess/ProcessList.vue +10 -2
@@ -1,6 +1,6 @@
1
1
  import { createVNode, Transition, mergeProps, ref, onBeforeUnmount, watch, nextTick, normalizeStyle, normalizeClass, mergeModels, useModel, createElementBlock, openBlock, withCtx, createBlock, createCommentVNode, resolveDynamicComponent, unref, renderSlot } from 'vue';
2
- import { g as genericComponent, p as propsFactory, aj as PREFERS_REDUCED_MOTION, al as acceleratedEasing, am as deceleratedEasing, an as standardEasing, x as useProxiedModel, ao as IN_BROWSER, c as useRender, ap as focusableChildren, V as VDefaultsProvider, k as provideTheme, f as useBackgroundColor, h as useBorder, b as useDimension, i as useElevation, a8 as useLocation, a9 as usePosition, j as useRounded, q as makeThemeProps, m as makeTagProps, r as makeRoundedProps, ac as makePositionProps, ad as makeLocationProps, s as makeElevationProps, d as makeDimensionProps, e as makeComponentProps, t as makeBorderProps, aq as useDefineWidgets } from './asWebComponent-DZeEbWG0.js';
3
- import { a as animate, g as getTargetBox, n as nullifyTransforms, u as useScopeId, f as forwardRefs, m as makeVOverlayProps, V as VOverlay } from './forwardRefs-BbvoXHtj.js';
2
+ import { g as genericComponent, p as propsFactory, aj as PREFERS_REDUCED_MOTION, al as acceleratedEasing, am as deceleratedEasing, an as standardEasing, x as useProxiedModel, ao as IN_BROWSER, c as useRender, ap as focusableChildren, V as VDefaultsProvider, k as provideTheme, f as useBackgroundColor, h as useBorder, b as useDimension, i as useElevation, a8 as useLocation, a9 as usePosition, j as useRounded, q as makeThemeProps, m as makeTagProps, r as makeRoundedProps, ac as makePositionProps, ad as makeLocationProps, s as makeElevationProps, d as makeDimensionProps, e as makeComponentProps, t as makeBorderProps, aq as useDefineWidgets } from './asWebComponent-DdguWGDI.js';
3
+ import { a as animate, g as getTargetBox, n as nullifyTransforms, u as useScopeId, f as forwardRefs, m as makeVOverlayProps, V as VOverlay } from './forwardRefs-DM-E2MfG.js';
4
4
 
5
5
  // Utilities
6
6
  const makeVDialogTransitionProps = propsFactory({
@@ -1,9 +1,9 @@
1
- import { ref, createVNode, normalizeStyle, normalizeClass, createElementVNode, toRefs, onMounted, createElementBlock, openBlock, createBlock, createCommentVNode, unref, withCtx, Fragment, renderList, toDisplayString, withDirectives, toRef } from 'vue';
1
+ import { ref, createVNode, normalizeStyle, normalizeClass, createElementVNode, toRefs, onMounted, createElementBlock, openBlock, createBlock, createCommentVNode, unref, withCtx, Fragment, renderList, withDirectives, createTextVNode, toDisplayString, toRef } from 'vue';
2
2
  import { mdiUploadBox, mdiDownloadBox, mdiTrashCanOutline } from '@mdi/js';
3
- import { g as genericComponent, p as propsFactory, k as provideTheme, U as useDensity, c as useRender, q as makeThemeProps, m as makeTagProps, W as makeDensityProps, e as makeComponentProps, o as convertToUnit, _ as _export_sfc, E as useSTAcStore, K as useOnLayersUpdate, G as VBtn } from './asWebComponent-DZeEbWG0.js';
4
- import { G as compareIndicator, E as indicator } from './helpers-CI_7CUmn.js';
5
- import { u as updateJobsStatus, j as getJobStatusUrl, l as loadProcess, k as downloadPreviousResults, m as deleteJob } from './async-Dk79llLt.js';
6
- import { T as Tooltip } from './index-C13BiO9C.js';
3
+ import { g as genericComponent, p as propsFactory, k as provideTheme, U as useDensity, c as useRender, q as makeThemeProps, m as makeTagProps, W as makeDensityProps, e as makeComponentProps, o as convertToUnit, _ as _export_sfc, E as useSTAcStore, K as useOnLayersUpdate, H as VIcon, G as VBtn } from './asWebComponent-DdguWGDI.js';
4
+ import { H as compareIndicator, F as indicator } from './helpers-CtUlAW0N.js';
5
+ import { u as updateJobsStatus, j as getJobStatusUrl, l as loadProcess, k as downloadPreviousResults, m as deleteJob } from './async-D1MvO_Z_.js';
6
+ import { T as Tooltip } from './index-DBo0F4Fv.js';
7
7
 
8
8
  /**
9
9
  * The list of job result from the server
@@ -90,6 +90,7 @@ const _sfc_main = {
90
90
  },
91
91
  setup(__props) {
92
92
 
93
+ /* eslint-disable @typescript-eslint/no-unused-vars */
93
94
 
94
95
  const { selectedStac, selectedCompareStac } = toRefs(useSTAcStore());
95
96
  const currentJobs = __props.enableCompare ? compareJobs : jobs;
@@ -103,6 +104,7 @@ onMounted(() => {
103
104
  useOnLayersUpdate(() => updateJobsStatus(currentJobs, currentIndicator.value));
104
105
 
105
106
  return (_ctx, _cache) => {
107
+
106
108
 
107
109
 
108
110
 
@@ -115,7 +117,7 @@ return (_ctx, _cache) => {
115
117
  style: {"background-color":"transparent"}
116
118
  }, {
117
119
  default: withCtx(() => [
118
- _cache[0] || (_cache[0] = createElementVNode("thead", null, [
120
+ _cache[1] || (_cache[1] = createElementVNode("thead", null, [
119
121
  createElementVNode("tr", null, [
120
122
  createElementVNode("th", { class: "text-left" }, "Executed on"),
121
123
  createElementVNode("th", { class: "text-left" }, "Status"),
@@ -130,11 +132,21 @@ return (_ctx, _cache) => {
130
132
  key: item.jobID
131
133
  }, [
132
134
  createElementVNode("td", null, [
133
- createElementVNode("a", {
135
+ withDirectives((openBlock(), createElementBlock("a", {
134
136
  class: "processUrl",
135
137
  target: "_blank",
136
138
  href: unref(getJobStatusUrl)(item.jobID, unref(currentIndicator))
137
- }, toDisplayString(new Date(item.job_start_datetime).toISOString().slice(0, 16)), 9 /* TEXT, PROPS */, _hoisted_1)
139
+ }, [
140
+ createTextVNode(toDisplayString(new Date(item.job_start_datetime).toISOString().slice(0, 16)) + " ", 1 /* TEXT */),
141
+ createVNode(VIcon, null, {
142
+ default: withCtx(() => [...(_cache[0] || (_cache[0] = [
143
+ createTextVNode("mdi-open-in-new", -1 /* CACHED */)
144
+ ]))]),
145
+ _: 1 /* STABLE */
146
+ })
147
+ ], 8 /* PROPS */, _hoisted_1)), [
148
+ [Tooltip, 'Process details']
149
+ ])
138
150
  ]),
139
151
  createElementVNode("td", null, toDisplayString(item.status), 1 /* TEXT */),
140
152
  createElementVNode("td", _hoisted_2, [
@@ -1,6 +1,6 @@
1
1
  import { h, TransitionGroup, Transition, camelize, createElementVNode, normalizeStyle, normalizeClass, computed, shallowRef, ref, watch, onBeforeMount, nextTick, onBeforeUnmount, toRef, withDirectives, createVNode, mergeProps, Fragment, vShow } from 'vue';
2
- import { ai as SUPPORTS_INTERSECTION, g as genericComponent, aj as PREFERS_REDUCED_MOTION, p as propsFactory, b as useDimension, c as useRender, d as makeDimensionProps, e as makeComponentProps, f as useBackgroundColor, j as useRounded, ak as getCurrentInstance, o as convertToUnit, r as makeRoundedProps } from './asWebComponent-DZeEbWG0.js';
3
- import { m as makeTransitionProps$1, M as MaybeTransition } from './transition-Ctkv90El.js';
2
+ import { ai as SUPPORTS_INTERSECTION, g as genericComponent, aj as PREFERS_REDUCED_MOTION, p as propsFactory, b as useDimension, c as useRender, d as makeDimensionProps, e as makeComponentProps, f as useBackgroundColor, j as useRounded, ak as getCurrentInstance, o as convertToUnit, r as makeRoundedProps } from './asWebComponent-DdguWGDI.js';
3
+ import { m as makeTransitionProps$1, M as MaybeTransition } from './transition-BdzATvPB.js';
4
4
 
5
5
  // Utilities
6
6
  function mounted(el, binding) {
@@ -1,5 +1,5 @@
1
1
  import { createVNode, normalizeStyle, normalizeClass, createElementVNode } from 'vue';
2
- import { g as genericComponent, p as propsFactory, b as useDimension, a as useLayout, c as useRender, m as makeTagProps, d as makeDimensionProps, e as makeComponentProps } from './asWebComponent-DZeEbWG0.js';
2
+ import { g as genericComponent, p as propsFactory, b as useDimension, a as useLayout, c as useRender, m as makeTagProps, d as makeDimensionProps, e as makeComponentProps } from './asWebComponent-DdguWGDI.js';
3
3
  import { u as useSsrBoot } from './ssrBoot-Zgc_Ttvi.js';
4
4
 
5
5
  const makeVMainProps = propsFactory({
@@ -1,6 +1,6 @@
1
1
  import { useId, toRef, ref, computed, mergeProps, createVNode } from 'vue';
2
- import { u as useScopeId, f as forwardRefs, m as makeVOverlayProps, V as VOverlay } from './forwardRefs-BbvoXHtj.js';
3
- import { g as genericComponent, p as propsFactory, x as useProxiedModel, c as useRender, Z as omit } from './asWebComponent-DZeEbWG0.js';
2
+ import { u as useScopeId, f as forwardRefs, m as makeVOverlayProps, V as VOverlay } from './forwardRefs-DM-E2MfG.js';
3
+ import { g as genericComponent, p as propsFactory, x as useProxiedModel, c as useRender, Z as omit } from './asWebComponent-DdguWGDI.js';
4
4
 
5
5
  const makeVTooltipProps = propsFactory({
6
6
  id: String,
@@ -1,5 +1,5 @@
1
1
  import { ref, onMounted, nextTick, createElementBlock, openBlock, Fragment, renderList, unref, createElementVNode, toDisplayString, normalizeStyle, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
2
- import { aq as useDefineWidgets, a as useLayout } from './asWebComponent-DZeEbWG0.js';
2
+ import { aq as useDefineWidgets, a as useLayout } from './asWebComponent-DdguWGDI.js';
3
3
  import 'animated-details';
4
4
 
5
5
  const _sfc_main = {
@@ -1,9 +1,9 @@
1
1
  import { watch, onScopeDispose, effectScope, capitalize, reactive, watchEffect, toRef, shallowRef, Fragment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, unref, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, toRaw, toRefs, toValue, createVNode, mergeProps, createElementVNode, normalizeClass, getCurrentScope, onBeforeUnmount, readonly, onMounted, useId, onDeactivated, onActivated, nextTick, shallowReactive, onUnmounted, isRef, normalizeStyle, onUpdated, Text, Transition, resolveDynamicComponent, withDirectives, toDisplayString, useModel, createBlock, createCommentVNode, openBlock, withCtx, createTextVNode, defineAsyncComponent, onErrorCaptured, Suspense, createElementBlock, normalizeProps, withAsyncContext, defineCustomElement } from 'vue';
2
2
  import { storeToRefs, defineStore, createPinia } from 'pinia';
3
- import { r as registerProjection, c as createLayerID, e as extractRoles, g as getProjectionCode, f as fetchStyle, a as extractLayerConfig, b as addTooltipInteraction, d as createAssetID, m as mergeGeojsons, h as mapEl, i as isSTACItem, j as axios, k as extractLayerTimeValues, l as fetchApiItems, n as getDatetimeProperty, o as fetchAllStyles, p as getLayers, q as getCompareLayers, s as findLayer, t as replaceLayer, u as generateFeatures, v as extractLayerLegend, w as extractCollectionUrls, x as generateLinksFromItems, y as revokeCollectionBlobUrls, z as currentUrl, A as datetime, B as poi, C as activeTemplate, D as mapPosition, E as indicator, F as currentCompareUrl, G as compareIndicator, H as comparePoi, I as states, J as actions } from './helpers-CI_7CUmn.js';
3
+ import { r as registerProjection, c as createLayerID, e as extractRoles, g as getProjectionCode, f as fetchStyle, a as extractLayerConfig, b as addTooltipInteraction, d as createAssetID, m as mergeGeojsons, h as mapEl, i as isSTACItem, j as axios, k as extractLayerTimeValues, l as fetchApiItems, n as getDatetimeProperty, o as fetchAllStyles, p as getLayers, q as getCompareLayers, s as findLayer, t as findLayersByLayerPrefix, u as replaceLayersInStructure, v as generateFeatures, w as extractLayerLegend, x as extractCollectionUrls, y as generateLinksFromItems, z as revokeCollectionBlobUrls, A as currentUrl, B as datetime, C as poi, D as activeTemplate, E as mapPosition, F as indicator, G as currentCompareUrl, H as compareIndicator, I as comparePoi, J as states, K as actions } from './helpers-CtUlAW0N.js';
4
4
  import log from 'loglevel';
5
5
  import { useEventBus, useMutationObserver, createSharedComposable } from '@vueuse/core';
6
- import { mdiSnowflake, mdiLightningBolt, mdiLeaf, mdiCurrencyEur, mdiWeatherWindy, mdiSetCenter, mdiHospitalBoxOutline, mdiImageFilterHdr, mdiWater, mdiBarley, mdiClose, mdiAlertCircle, mdiPlus, mdiMenuDown, mdiChevronLeft, mdiChevronRight } from '@mdi/js';
6
+ import { mdiWrench, mdiSnowflake, mdiVolleyball, mdiHiking, mdiLightningBolt, mdiLeaf, mdiAccountMultiple, mdiCurrencyEur, mdiWeatherWindy, mdiSetCenter, mdiHospitalBoxOutline, mdiImageFilterHdr, mdiWater, mdiBarley, mdiClose, mdiAlertCircle, mdiPlus, mdiMenuDown, mdiChevronLeft, mdiChevronRight } from '@mdi/js';
7
7
  import { Item, Collection } from 'stac-js';
8
8
  import { toAbsolute } from 'stac-js/src/http.js';
9
9
  import { parquetRead } from 'hyparquet';
@@ -3513,10 +3513,22 @@ const dataThemesBrands = {
3513
3513
  icon: mdiWeatherWindy,
3514
3514
  color: "#475faf",
3515
3515
  },
3516
+ climate: {
3517
+ icon: mdiWeatherWindy,
3518
+ color: "#475faf",
3519
+ },
3516
3520
  economy: {
3517
3521
  icon: mdiCurrencyEur,
3518
3522
  color: "#8E81AF",
3519
3523
  },
3524
+ commerce: {
3525
+ icon: mdiCurrencyEur,
3526
+ color: "#8E81AF",
3527
+ },
3528
+ society: {
3529
+ icon: mdiAccountMultiple,
3530
+ color: "#8ac501",
3531
+ },
3520
3532
  biomass: {
3521
3533
  icon: mdiLeaf,
3522
3534
  color: "#009E73",
@@ -3525,10 +3537,26 @@ const dataThemesBrands = {
3525
3537
  icon: mdiLightningBolt,
3526
3538
  color: "#a1280a",
3527
3539
  },
3540
+ energy: {
3541
+ icon: mdiLightningBolt,
3542
+ color: "#475faf",
3543
+ },
3544
+ tourism: {
3545
+ icon: mdiHiking,
3546
+ color: "#80510aff",
3547
+ },
3548
+ sport: {
3549
+ icon: mdiVolleyball,
3550
+ color: "#e98e65ff",
3551
+ },
3528
3552
  cryosphere: {
3529
3553
  icon: mdiSnowflake,
3530
3554
  color: "#42C7B8",
3531
3555
  },
3556
+ industry: {
3557
+ icon: mdiWrench,
3558
+ color: "#8d845cff",
3559
+ },
3532
3560
  };
3533
3561
 
3534
3562
  function handleAuthenticationOfLink(item, linkOrAsset) {
@@ -3547,7 +3575,9 @@ function handleAuthenticationOfLink(item, linkOrAsset) {
3547
3575
  // case "oauth2":
3548
3576
  // todo add more handlers when needed
3549
3577
  default:
3550
- console.error(`eodash does not support referenced authentication scheme ${authRef}`);
3578
+ console.error(
3579
+ `eodash does not support referenced authentication scheme ${authRef}`
3580
+ );
3551
3581
  }
3552
3582
  }
3553
3583
  }
@@ -3563,7 +3593,9 @@ function handleApiKeyBasedAuth(schemeDef, href) {
3563
3593
  if (envValue) {
3564
3594
  url = setQueryParam(href, apiKey, envValue);
3565
3595
  } else {
3566
- console.error(`env variable ${envVar} for authentication parameter ${apiKey} not set`);
3596
+ console.error(
3597
+ `env variable ${envVar} for authentication parameter ${apiKey} not set`
3598
+ );
3567
3599
  }
3568
3600
  break;
3569
3601
  }
@@ -3610,7 +3642,7 @@ async function createLayersFromAssets(
3610
3642
  let geoTIFFSources = [];
3611
3643
  /** @type {number|null} */
3612
3644
  let geoTIFFIdx = null;
3613
- // let geoJsonLayers = [];
3645
+
3614
3646
  let geoJsonIdx = 0;
3615
3647
  let geoJsonAttributions = [];
3616
3648
 
@@ -3684,14 +3716,41 @@ async function createLayersFromAssets(
3684
3716
  );
3685
3717
  continue;
3686
3718
  }
3687
- const features = responseData.map((item) => {
3688
- return {
3689
- type: "Feature",
3690
- geometry: item.geometry,
3691
- // we pass the item making sure to remove geometry to avoid duplication
3692
- properties: { ...item, geometry: undefined },
3693
- };
3719
+ /** @type {Record<string,any>[]} */
3720
+ const features = [];
3721
+ responseData.forEach((ftr, i) => {
3722
+ const { geometry, ...properties } = ftr;
3723
+ if (
3724
+ geometry.type === "MultiPoint" ||
3725
+ geometry.type === "MultiPolygon"
3726
+ ) {
3727
+ geometry.coordinates.forEach(
3728
+ (
3729
+ /** @type {Record<string,any>[]} */ coordPair,
3730
+ /** @type {number} */ j,
3731
+ ) => {
3732
+ const singleGeometry = {
3733
+ type: geometry.type === "MultiPoint" ? "Point" : "Polygon",
3734
+ coordinates: coordPair,
3735
+ };
3736
+ features.push({
3737
+ type: "Feature",
3738
+ id: `${i}_${j}`,
3739
+ properties,
3740
+ geometry: singleGeometry,
3741
+ });
3742
+ },
3743
+ );
3744
+ } else {
3745
+ features.push({
3746
+ type: "Feature",
3747
+ properties,
3748
+ id: `${i}`,
3749
+ geometry: geometry,
3750
+ });
3751
+ }
3694
3752
  });
3753
+
3695
3754
  const geojson = {
3696
3755
  type: "FeatureCollection",
3697
3756
  features: features,
@@ -3713,7 +3772,7 @@ async function createLayersFromAssets(
3713
3772
  source: {
3714
3773
  type: "Vector",
3715
3774
  url: await mergeGeojsons(geoJsonSources),
3716
- format: {"type": "GeoJSON", "dataProjection": projection},
3775
+ format: { type: "GeoJSON", dataProjection: projection },
3717
3776
  attributions: geoJsonAttributions,
3718
3777
  },
3719
3778
  properties: {
@@ -3787,7 +3846,8 @@ const createLayersFromLinks = async (
3787
3846
  const wmsArray = item.links.filter((l) => l.rel === "wms");
3788
3847
  const wmtsArray = item.links.filter((l) => l.rel === "wmts");
3789
3848
  const xyzArray = item.links.filter((l) => l.rel === "xyz") ?? [];
3790
- const vectorTileArray = item.links.filter((l) => l.rel === "vector-tile") ?? [];
3849
+ const vectorTileArray =
3850
+ item.links.filter((l) => l.rel === "vector-tile") ?? [];
3791
3851
 
3792
3852
  // Taking projection code from main map view, as main view defines
3793
3853
  // projection for comparison map
@@ -3984,7 +4044,9 @@ const createLayersFromLinks = async (
3984
4044
  (vectorTileLink?.["proj:epsg"] || vectorTileLink?.["eodash:proj4_def"]);
3985
4045
 
3986
4046
  await registerProjection(vectorTileLinkProjection);
3987
- const projectionCode = getProjectionCode(vectorTileLinkProjection || "EPSG:3857");
4047
+ const projectionCode = getProjectionCode(
4048
+ vectorTileLinkProjection || "EPSG:3857",
4049
+ );
3988
4050
  const linkId = createLayerID(
3989
4051
  collectionId,
3990
4052
  item.id,
@@ -3992,18 +4054,19 @@ const createLayersFromLinks = async (
3992
4054
  viewProjectionCode,
3993
4055
  );
3994
4056
  log.debug("Vector Tile Layer added", linkId);
3995
- const key = /** @type {string | undefined} */ (vectorTileLink["key"]) || undefined;
4057
+ const key =
4058
+ /** @type {string | undefined} */ (vectorTileLink["key"]) || undefined;
3996
4059
  // fetch styles and separate them by their mapping between links and assets
3997
4060
  const styles = await fetchStyle(item, itemUrl, key);
3998
4061
  // get the correct style which is not attached to a link
3999
- let { layerConfig, style } = extractLayerConfig(
4000
- linkId ?? "",
4001
- styles,
4002
- );
4003
-
4062
+ let { layerConfig, style } = extractLayerConfig(linkId ?? "", styles);
4063
+
4004
4064
  let href = vectorTileLink.href;
4005
4065
  if ("auth:schemes" in item && "auth:refs" in vectorTileLink) {
4006
- href = handleAuthenticationOfLink(/** @type { import("@/types").StacAuthItem} */ (item), /** @type { import("@/types").StacAuthLink} */ (vectorTileLink));
4066
+ href = handleAuthenticationOfLink(
4067
+ /** @type { import("@/types").StacAuthItem} */ (item),
4068
+ /** @type { import("@/types").StacAuthLink} */ (vectorTileLink),
4069
+ );
4007
4070
  }
4008
4071
  const json = {
4009
4072
  type: "VectorTile",
@@ -4014,17 +4077,18 @@ const createLayersFromLinks = async (
4014
4077
  roles: vectorTileLink.roles,
4015
4078
  layerDatetime,
4016
4079
  ...(layerConfig && {
4017
- layerConfig: {
4018
- ...layerConfig,
4019
- style,
4020
- },
4021
- }),
4080
+ layerConfig: {
4081
+ ...layerConfig,
4082
+ style,
4083
+ },
4084
+ }),
4022
4085
  },
4023
4086
  source: {
4024
4087
  type: "VectorTile",
4025
4088
  format: {
4026
4089
  type: "MVT",
4027
4090
  idProperty: vectorTileLink.idProperty,
4091
+ layers: vectorTileLink.layers,
4028
4092
  },
4029
4093
  url: href,
4030
4094
  projection: projectionCode,
@@ -4354,8 +4418,9 @@ class EodashCollection {
4354
4418
  return data;
4355
4419
  }, /** @type {Record<string,import('stac-ts').StacAsset>} */ ({}));
4356
4420
  const isSupported =
4357
- item.links.some((link) => ["wms", "xyz", "wmts", "vector-tile"].includes(link.rel)) ||
4358
- Object.keys(dataAssets).length;
4421
+ item.links.some((link) =>
4422
+ ["wms", "xyz", "wmts", "vector-tile"].includes(link.rel),
4423
+ ) || Object.keys(dataAssets).length;
4359
4424
 
4360
4425
  if (isSupported) {
4361
4426
  // Checking for potential legend asset
@@ -4507,14 +4572,18 @@ class EodashCollection {
4507
4572
  **/
4508
4573
  async getItem(date) {
4509
4574
  if (!date) {
4510
- return (await this.getItems(false, true))?.[0];
4575
+ const items = await this.getItems(false, true);
4576
+ // in case no datetime property is found, return the last item
4577
+ return items && items.at(-1);
4511
4578
  }
4512
4579
 
4513
4580
  const items = await this.getItems();
4514
4581
  const datetimeProperty = getDatetimeProperty(items);
4515
4582
  if (!datetimeProperty) {
4516
- // in case no datetime property is found, return the first item
4517
- return (await this.getItems(false, true))?.[0];
4583
+ // in case no datetime property is found, return the last item
4584
+ const items = await this.getItems(false, true);
4585
+ // in case no datetime property is found, return the last item
4586
+ return items && items.at(-1);
4518
4587
  }
4519
4588
  return (await this.getItems())?.sort((a, b) => {
4520
4589
  const distanceA = Math.abs(
@@ -4550,9 +4619,9 @@ class EodashCollection {
4550
4619
  const aggregatedTooltips = [
4551
4620
  ...new Map(
4552
4621
  styles
4553
- .flatMap(style => style.tooltip || [])
4554
- .map(entry => [entry.id, entry])
4555
- ).values()
4622
+ .flatMap((style) => style.tooltip || [])
4623
+ .map((entry) => [entry.id, entry]),
4624
+ ).values(),
4556
4625
  ];
4557
4626
  this.#tooltipProperties = aggregatedTooltips ?? [];
4558
4627
  return this.#tooltipProperties;
@@ -4605,15 +4674,18 @@ class EodashCollection {
4605
4674
  currentLayers = getCompareLayers();
4606
4675
  }
4607
4676
 
4608
- /** @type {string | undefined} */
4609
- const oldLayerID = findLayer(currentLayers, layer)?.properties?.id;
4677
+ const oldLayer = findLayer(currentLayers, layer);
4678
+
4679
+ const toBeReplacedLayers = findLayersByLayerPrefix(currentLayers, oldLayer);
4610
4680
 
4611
- if (!oldLayerID) {
4681
+ if (!toBeReplacedLayers) {
4612
4682
  return;
4613
4683
  }
4614
-
4615
- //@ts-expect-error TODO
4616
- const updatedLayers = replaceLayer(currentLayers, oldLayerID, newLayers);
4684
+ const updatedLayers = replaceLayersInStructure(
4685
+ currentLayers,
4686
+ toBeReplacedLayers,
4687
+ newLayers,
4688
+ );
4617
4689
 
4618
4690
  return updatedLayers;
4619
4691
  }
@@ -4637,7 +4709,7 @@ class EodashCollection {
4637
4709
  );
4638
4710
 
4639
4711
  return [
4640
- //@ts-expect-error indicator instead of item
4712
+ //@ts-expect-error indicator instead of item
4641
4713
  ...(await createLayersFromLinks(
4642
4714
  indicator?.id ?? "",
4643
4715
  indicator?.title || indicator.id,
@@ -7973,7 +8045,7 @@ const ErrorAlert = /*#__PURE__*/_export_sfc(_sfc_main$4, [['styles',[_style_0$2]
7973
8045
  const internalWidgets = (() => {
7974
8046
  /** @type {Record<string, () => Promise<import("vue").Component>>} */
7975
8047
  const importMap = {
7976
- .../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-IVHLv9UN.js'),"/widgets/EodashItemCatalog/index.vue": () => import('./index-BO5uGfUe.js'),"/widgets/EodashItemFilter.vue": () => import('./EodashItemFilter-BPMpnXjo.js'),"/widgets/EodashLayerControl.vue": () => import('./EodashLayerControl-CSnQh2tb.js'),"/widgets/EodashLayoutSwitcher.vue": () => import('./EodashLayoutSwitcher-CPpGM8Pb.js'),"/widgets/EodashMap/EodashMapBtns.vue": () => import('./EodashMapBtns-C_jyUJ2x.js'),"/widgets/EodashMap/index.vue": () => import('./index-KrGHjH-_.js'),"/widgets/EodashProcess/ProcessList.vue": () => import('./ProcessList-C3HV7G0b.js').then(n => n.a),"/widgets/EodashProcess/index.vue": () => import('./index-DcCcdbgR.js'),"/widgets/EodashStacInfo.vue": () => import('./EodashStacInfo-DjuWc0Iz.js'),"/widgets/EodashTimeSlider.vue": () => import('./EodashTimeSlider-CDh9Lf02.js'),"/widgets/EodashTools.vue": () => import('./EodashTools-DSvDUUlL.js'),"/widgets/ExportState.vue": () => import('./ExportState-BhjxS0jG.js'),"/widgets/PopUp.vue": () => import('./PopUp-CSPXdqKI.js'),"/widgets/WidgetsContainer.vue": () => import('./WidgetsContainer-Cq9uZEuN.js')}),
8048
+ .../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-Dewym-cx.js'),"/widgets/EodashItemCatalog/index.vue": () => import('./index-BxDh5v-H.js'),"/widgets/EodashItemFilter.vue": () => import('./EodashItemFilter-CAsZpOoQ.js'),"/widgets/EodashLayerControl.vue": () => import('./EodashLayerControl-fn-rt8Ac.js'),"/widgets/EodashLayoutSwitcher.vue": () => import('./EodashLayoutSwitcher-B9XqQXCS.js'),"/widgets/EodashMap/EodashMapBtns.vue": () => import('./EodashMapBtns-nFY6MIAX.js'),"/widgets/EodashMap/index.vue": () => import('./index-BkW06-Lg.js'),"/widgets/EodashProcess/ProcessList.vue": () => import('./ProcessList-DxyCFQdz.js').then(n => n.a),"/widgets/EodashProcess/index.vue": () => import('./index-BJvLt3Xf.js'),"/widgets/EodashStacInfo.vue": () => import('./EodashStacInfo-lxBKoav9.js'),"/widgets/EodashTimeSlider.vue": () => import('./EodashTimeSlider-DI97QkNT.js'),"/widgets/EodashTools.vue": () => import('./EodashTools-D5ShUT1g.js'),"/widgets/ExportState.vue": () => import('./ExportState-ruNyRS2E.js'),"/widgets/PopUp.vue": () => import('./PopUp-DRgOmD7-.js'),"/widgets/WidgetsContainer.vue": () => import('./WidgetsContainer-DXD_8rqh.js')}),
7977
8049
  .../* #__PURE__ */ Object.assign({}),
7978
8050
  };
7979
8051
  for (const key in importMap) {
@@ -8099,7 +8171,7 @@ const getWidgetDefinition = (config) => {
8099
8171
 
8100
8172
  case "web-component":
8101
8173
  importedWidget.component = defineAsyncComponent({
8102
- loader: () => import('./DynamicWebComponent-7v4_DFqP.js'),
8174
+ loader: () => import('./DynamicWebComponent-CBsxC82P.js'),
8103
8175
  suspensible: true,
8104
8176
  });
8105
8177
  importedWidget.props = reactive(config.widget);
@@ -8496,7 +8568,7 @@ return (_ctx, _cache) => {
8496
8568
 
8497
8569
  };
8498
8570
 
8499
- const version = "5.3.1";
8571
+ const version = "5.3.3";
8500
8572
  const pkgJson = {
8501
8573
  version};
8502
8574
 
@@ -8606,15 +8678,15 @@ const { smAndDown } = useDisplay();
8606
8678
 
8607
8679
  const TemplateComponent = computed(() =>
8608
8680
  smAndDown.value
8609
- ? defineAsyncComponent(() => import('./MobileLayout-DY7OHr1k.js'))
8610
- : defineAsyncComponent(() => import('./DashboardLayout-BAstYnhU.js')),
8681
+ ? defineAsyncComponent(() => import('./MobileLayout-BfBeF-JF.js'))
8682
+ : defineAsyncComponent(() => import('./DashboardLayout-Cp8Rv3Ef.js')),
8611
8683
  );
8612
8684
 
8613
8685
  const HeaderComponent = defineAsyncComponent(
8614
- () => import('./Header-E5NbT7HE.js'),
8686
+ () => import('./Header-BBdi_-Lp.js'),
8615
8687
  );
8616
8688
  const FooterComponent = defineAsyncComponent(
8617
- () => import('./Footer-C3PPcdjv.js'),
8689
+ () => import('./Footer-IQNyfd78.js'),
8618
8690
  );
8619
8691
 
8620
8692
  const error = ref("");
@@ -1,5 +1,5 @@
1
- import { q as getCompareLayers, p as getLayers, t as replaceLayer, a as extractLayerConfig, v as extractLayerLegend, m as mergeGeojsons, j as axios, U as axios$1, G as compareIndicator, E as indicator } from './helpers-CI_7CUmn.js';
2
- import { P as useEmitLayersUpdate } from './asWebComponent-DZeEbWG0.js';
1
+ import { q as getCompareLayers, p as getLayers, V as replaceLayer, a as extractLayerConfig, w as extractLayerLegend, m as mergeGeojsons, j as axios, W as axios$1, H as compareIndicator, F as indicator } from './helpers-CtUlAW0N.js';
2
+ import { P as useEmitLayersUpdate } from './asWebComponent-DdguWGDI.js';
3
3
  import { isMulti } from '@eox/jsonform/src/custom-inputs/spatial/utils';
4
4
  import log from 'loglevel';
5
5
 
@@ -1,2 +1,2 @@
1
- export { aI as EodashConstructor, aH as register, aJ as store } from './asWebComponent-DZeEbWG0.js';
1
+ export { aI as EodashConstructor, aH as register, aJ as store } from './asWebComponent-DdguWGDI.js';
2
2
  import 'vue';
@@ -1,6 +1,6 @@
1
1
  import { computed, watch, onScopeDispose, nextTick, ref, watchEffect, effectScope, inject, mergeProps, shallowRef, onMounted, toRef, reactive, provide, toValue, toRaw, readonly, warn, onBeforeUnmount, createElementVNode, Fragment, createVNode, Teleport, withDirectives, vShow, Transition } from 'vue';
2
- import { ar as isOn, as as eventName, p as propsFactory, at as destructComputed, au as parseAnchor, av as flipSide, aw as flipAlign, ax as flipCorner, ay as CircularBuffer, az as deepEqual, X as consoleError, aA as getAxis, o as convertToUnit, v as clamp, ao as IN_BROWSER, y as useToggleScope, aB as defer, ak as getCurrentInstance, aC as templateRef, aD as matchesSelector, D as useDisplay, q as makeThemeProps, d as makeDimensionProps, e as makeComponentProps, g as genericComponent, x as useProxiedModel, k as provideTheme, l as useRtl, f as useBackgroundColor, b as useDimension, aE as useRouter, aF as useBackButton, an as standardEasing, c as useRender } from './asWebComponent-DZeEbWG0.js';
3
- import { m as makeTransitionProps, M as MaybeTransition } from './transition-Ctkv90El.js';
2
+ import { ar as isOn, as as eventName, p as propsFactory, at as destructComputed, au as parseAnchor, av as flipSide, aw as flipAlign, ax as flipCorner, ay as CircularBuffer, az as deepEqual, X as consoleError, aA as getAxis, o as convertToUnit, v as clamp, ao as IN_BROWSER, y as useToggleScope, aB as defer, ak as getCurrentInstance, aC as templateRef, aD as matchesSelector, D as useDisplay, q as makeThemeProps, d as makeDimensionProps, e as makeComponentProps, g as genericComponent, x as useProxiedModel, k as provideTheme, l as useRtl, f as useBackgroundColor, b as useDimension, aE as useRouter, aF as useBackButton, an as standardEasing, c as useRender } from './asWebComponent-DdguWGDI.js';
3
+ import { m as makeTransitionProps, M as MaybeTransition } from './transition-BdzATvPB.js';
4
4
 
5
5
  class Box {
6
6
  constructor(args) {
@@ -1,8 +1,8 @@
1
1
  import log from 'loglevel';
2
- import { s as separateEndpointLinks, c as createTiffLayerDefinition, p as pollProcessStatus, e as extractAsyncResults, u as updateJobsStatus, a as creatAsyncProcessLayerDefinitions, g as getBboxProperty, b as generateTimePairs, f as updateJsonformSchemaTarget, h as extractGeometries, i as applyProcessLayersToMap } from './async-Dk79llLt.js';
3
- import { j as axios, a as extractLayerConfig, G as compareIndicator, E as indicator, w as extractCollectionUrls, F as currentCompareUrl, z as currentUrl, x as generateLinksFromItems, n as getDatetimeProperty, A as datetime, H as comparePoi, B as poi } from './helpers-CI_7CUmn.js';
2
+ import { s as separateEndpointLinks, c as createTiffLayerDefinition, p as pollProcessStatus, e as extractAsyncResults, u as updateJobsStatus, a as creatAsyncProcessLayerDefinitions, g as getBboxProperty, b as generateTimePairs, f as updateJsonformSchemaTarget, h as extractGeometries, i as applyProcessLayersToMap } from './async-D1MvO_Z_.js';
3
+ import { j as axios, a as extractLayerConfig, H as compareIndicator, F as indicator, x as extractCollectionUrls, G as currentCompareUrl, A as currentUrl, y as generateLinksFromItems, n as getDatetimeProperty, B as datetime, I as comparePoi, C as poi } from './helpers-CtUlAW0N.js';
4
4
  import mustache from 'mustache';
5
- import { Q as isFirstLoad, E as useSTAcStore, S as readParquetItems, T as useGetSubCodeId } from './asWebComponent-DZeEbWG0.js';
5
+ import { Q as isFirstLoad, E as useSTAcStore, S as readParquetItems, T as useGetSubCodeId } from './asWebComponent-DdguWGDI.js';
6
6
  import { toAbsolute } from 'stac-js/src/http.js';
7
7
 
8
8
  ////// --- CHARTS --- //////