@eodash/eodash 5.0.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +1 -0
  2. package/core/client/App.vue +8 -2
  3. package/core/client/asWebComponent.js +5 -5
  4. package/core/client/components/DashboardLayout.vue +43 -26
  5. package/core/client/components/EodashOverlay.vue +5 -6
  6. package/core/client/components/ErrorAlert.vue +2 -2
  7. package/core/client/components/Footer.vue +4 -4
  8. package/core/client/components/Header.vue +3 -3
  9. package/core/client/components/MobileLayout.vue +47 -27
  10. package/core/client/composables/DefineEodash.js +38 -43
  11. package/core/client/composables/DefineTemplate.js +4 -2
  12. package/core/client/composables/DefineWidgets.js +14 -8
  13. package/core/client/composables/index.js +273 -23
  14. package/core/client/eodashSTAC/EodashCollection.js +84 -62
  15. package/core/client/eodashSTAC/createLayers.js +30 -0
  16. package/core/client/eodashSTAC/helpers.js +159 -28
  17. package/core/client/eodashSTAC/parquet.js +145 -0
  18. package/core/client/eodashSTAC/triggers.js +6 -3
  19. package/core/client/plugins/index.js +4 -3
  20. package/core/client/plugins/vuetify.js +3 -0
  21. package/core/client/store/actions.js +21 -4
  22. package/core/client/store/stac.js +93 -56
  23. package/core/client/store/states.js +15 -5
  24. package/core/client/types.ts +59 -43
  25. package/core/client/utils/index.js +79 -0
  26. package/core/client/utils/keys.js +2 -2
  27. package/core/client/utils/states.js +30 -5
  28. package/core/client/views/Dashboard.vue +36 -32
  29. package/core/client/vite-env.d.ts +7 -0
  30. package/dist/client/{DashboardLayout-CkWvOMOW.js → DashboardLayout-Dq9Kfe6O.js} +24 -13
  31. package/dist/client/{DynamicWebComponent-DYBbpvUK.js → DynamicWebComponent-DCBMXskE.js} +1 -1
  32. package/dist/client/{EodashDatePicker-CALmW3SI.js → EodashDatePicker-DtngxU6s.js} +59 -32
  33. package/dist/client/{EodashItemFilter-DlQiE713.js → EodashItemFilter-ClQebJQt.js} +20 -10
  34. package/dist/client/{EodashLayerControl-DEzEbft7.js → EodashLayerControl-BLBds28C.js} +29 -16
  35. package/dist/client/EodashLayoutSwitcher-DQ8SfVDd.js +61 -0
  36. package/dist/client/EodashMapBtns-B89_YBDw.js +326 -0
  37. package/dist/client/{EodashStacInfo-DPPxDkF6.js → EodashStacInfo-Dt1nF06x.js} +3 -18
  38. package/dist/client/{EodashTools-CUaL9s4H.js → EodashTools-DV5ykmWc.js} +13 -13
  39. package/dist/client/{ExportState-DjyIZVhl.js → ExportState-B6zZQUmE.js} +57 -52
  40. package/dist/client/{Footer-DyL0JoWt.js → Footer-DNhXs8k6.js} +15 -13
  41. package/dist/client/{Header-B5Dgty9l.js → Header-BjhN5JY4.js} +32 -28
  42. package/dist/client/MobileLayout-JelB6w1G.js +118 -0
  43. package/dist/client/{PopUp-BfB8s_ki.js → PopUp-CgpvNr3o.js} +18 -10
  44. package/dist/client/ProcessList-vecpxThi.js +198 -0
  45. package/dist/client/{VImg-FD1WVphJ.js → VImg-CETuikH2.js} +221 -26
  46. package/dist/client/{VMain-DJKG4SvM.js → VMain-Ci9DyaGU.js} +7 -7
  47. package/dist/client/{VTooltip-CfeefrXI.js → VTooltip-J4ac48X7.js} +12 -10
  48. package/dist/client/{WidgetsContainer-C2TaTdb6.js → WidgetsContainer-CCML4TyV.js} +1 -1
  49. package/dist/client/asWebComponent-ZyEzWOOf.js +19092 -0
  50. package/dist/client/async-B7jIrM53.js +804 -0
  51. package/dist/client/eo-dash.js +1 -1
  52. package/dist/client/{VOverlay-BzOdRu9h.js → forwardRefs-BQclvjMq.js} +332 -28
  53. package/dist/client/handling-BS24aG1q.js +1227 -0
  54. package/dist/client/helpers-wXK7Ywio.js +4556 -0
  55. package/dist/client/index-4UCzZi8B.js +376 -0
  56. package/dist/client/{index-4CT7Tz83.js → index-9KR-G20t.js} +2 -2
  57. package/dist/client/{index-CIHH_3dW.js → index-B2XpdgR6.js} +227 -86
  58. package/dist/client/material-symbols-outlined.woff2 +0 -0
  59. package/dist/client/material-symbols-rounded.woff2 +0 -0
  60. package/dist/client/material-symbols-sharp.woff2 +0 -0
  61. package/dist/client/material-symbols-subset.woff2 +0 -0
  62. package/dist/client/{ssrBoot-BP7SYRyC.js → ssrBoot-Zgc_Ttvi.js} +2 -2
  63. package/dist/client/templates.js +840 -0
  64. package/dist/client/transition-yBii4fu6.js +40 -0
  65. package/dist/node/cli.js +16 -6
  66. package/dist/node/types.d.ts +1 -1
  67. package/dist/types/core/client/App.vue.d.ts +2 -2
  68. package/dist/types/core/client/asWebComponent.d.ts +1 -1
  69. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +1 -3
  70. package/dist/types/core/client/components/Footer.vue.d.ts +1 -105
  71. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +1 -1
  72. package/dist/types/core/client/components/MobileLayout.vue.d.ts +1 -324
  73. package/dist/types/core/client/composables/DefineEodash.d.ts +2 -2
  74. package/dist/types/core/client/composables/DefineTemplate.d.ts +1 -1
  75. package/dist/types/core/client/composables/DefineWidgets.d.ts +4 -4
  76. package/dist/types/core/client/composables/index.d.ts +24 -2
  77. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +9 -6
  78. package/dist/types/core/client/eodashSTAC/helpers.d.ts +25 -5
  79. package/dist/types/core/client/eodashSTAC/parquet.d.ts +2 -0
  80. package/dist/types/core/client/plugins/vuetify.d.ts +7 -4
  81. package/dist/types/core/client/store/actions.d.ts +3 -2
  82. package/dist/types/core/client/store/stac.d.ts +16 -13
  83. package/dist/types/core/client/store/states.d.ts +14 -4
  84. package/dist/types/core/client/types.d.ts +46 -31
  85. package/dist/types/core/client/utils/index.d.ts +2 -0
  86. package/dist/types/core/client/utils/keys.d.ts +4 -4
  87. package/dist/types/core/client/utils/states.d.ts +59 -47
  88. package/dist/types/core/client/views/Dashboard.vue.d.ts +2 -2
  89. package/dist/types/templates/baseConfig.d.ts +4 -0
  90. package/dist/types/templates/compare.d.ts +185 -0
  91. package/dist/types/templates/expert.d.ts +147 -0
  92. package/dist/types/templates/index.d.ts +6 -0
  93. package/dist/types/templates/light.d.ts +154 -0
  94. package/dist/types/widgets/EodashDatePicker.vue.d.ts +1 -458
  95. package/dist/types/widgets/EodashItemFilter.vue.d.ts +3 -3
  96. package/dist/types/widgets/EodashLayerControl.vue.d.ts +14 -7
  97. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +1 -3
  98. package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +12 -8
  99. package/dist/types/widgets/EodashMap/index.vue.d.ts +9 -4
  100. package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +8 -1
  101. package/dist/types/widgets/EodashProcess/index.vue.d.ts +8 -4
  102. package/dist/types/widgets/EodashProcess/methods/async.d.ts +19 -18
  103. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +3 -2
  104. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/index.d.ts +1 -0
  105. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.d.ts +6 -0
  106. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.d.ts +4 -0
  107. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +5 -0
  108. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/index.d.ts +1 -0
  109. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +12 -5
  110. package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +72 -41
  111. package/dist/types/widgets/EodashProcess/methods/utils.d.ts +41 -21
  112. package/dist/types/widgets/EodashProcess/states.d.ts +11 -0
  113. package/dist/types/widgets/EodashProcess/types.d.ts +41 -0
  114. package/dist/types/widgets/EodashStacInfo.vue.d.ts +14 -14
  115. package/dist/types/widgets/EodashTools.vue.d.ts +3 -3
  116. package/dist/types/widgets/ExportState.vue.d.ts +1 -1
  117. package/dist/types/widgets/PopUp.vue.d.ts +11 -16
  118. package/dist/types/widgets/WidgetsContainer.vue.d.ts +3 -6
  119. package/package.json +55 -45
  120. package/templates/baseConfig.js +68 -0
  121. package/templates/compare.js +142 -0
  122. package/templates/expert.js +124 -0
  123. package/templates/index.js +8 -0
  124. package/templates/light.js +139 -0
  125. package/widgets/EodashDatePicker.vue +80 -31
  126. package/widgets/EodashItemFilter.vue +26 -11
  127. package/widgets/EodashLayerControl.vue +20 -11
  128. package/widgets/EodashLayoutSwitcher.vue +6 -3
  129. package/widgets/EodashMap/EodashMapBtns.vue +269 -0
  130. package/widgets/EodashMap/index.vue +255 -45
  131. package/widgets/EodashMap/methods/create-layers-config.js +4 -3
  132. package/widgets/EodashMap/methods/index.js +33 -23
  133. package/widgets/EodashProcess/ProcessList.vue +47 -11
  134. package/widgets/EodashProcess/index.vue +55 -20
  135. package/widgets/EodashProcess/methods/async.js +99 -60
  136. package/widgets/EodashProcess/methods/composables.js +21 -14
  137. package/widgets/EodashProcess/methods/custom-endpoints/chart/index.js +35 -0
  138. package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +275 -0
  139. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +132 -0
  140. package/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.js +94 -0
  141. package/widgets/EodashProcess/methods/custom-endpoints/layers/index.js +33 -0
  142. package/widgets/EodashProcess/methods/handling.js +127 -80
  143. package/widgets/EodashProcess/methods/outputs.js +376 -125
  144. package/widgets/EodashProcess/methods/utils.js +442 -10
  145. package/widgets/EodashProcess/states.js +13 -0
  146. package/widgets/EodashProcess/types.ts +46 -0
  147. package/widgets/EodashStacInfo.vue +2 -17
  148. package/widgets/EodashTools.vue +13 -13
  149. package/widgets/WidgetsContainer.vue +1 -1
  150. package/core/client/eodash.js +0 -454
  151. package/dist/client/EodashLayoutSwitcher-CDeCV8F-.js +0 -52
  152. package/dist/client/EodashMapBtns-CktQCfa-.js +0 -131
  153. package/dist/client/MobileLayout-CRsg_5Q4.js +0 -1217
  154. package/dist/client/ProcessList-DTefwQZx.js +0 -484
  155. package/dist/client/asWebComponent-CLhcT715.js +0 -12479
  156. package/dist/client/eo-dash.css +0 -5
  157. package/dist/client/forwardRefs-Bon_Kku1.js +0 -245
  158. package/dist/client/index-Bm9cbtx5.js +0 -201
  159. package/dist/client/index-DiGDvTQU.js +0 -780
  160. package/dist/client/transition-C5I57hn6.js +0 -37
  161. package/dist/types/core/client/eodash.d.ts +0 -8
  162. package/widgets/EodashMapBtns.vue +0 -113
@@ -1,16 +1,20 @@
1
- import { useCssVars, ref, useTemplateRef, customRef, computed, reactive, toRef, watch, onMounted, createElementBlock, openBlock, createVNode, unref, createSlots, withCtx, createElementVNode, withDirectives, createCommentVNode, createBlock, mergeProps, toHandlers } from 'vue';
1
+ import { useCssVars, ref, useTemplateRef, customRef, computed, reactive, watch, onMounted, createElementBlock, openBlock, createVNode, unref, createSlots, withCtx, createElementVNode, withDirectives, createCommentVNode, createBlock, mergeProps, toHandlers } from 'vue';
2
2
  import { DatePicker } from 'v-calendar';
3
- import { r as useDisplay, Y as datetime, Z as useSTAcStore, $ as eodashCollections, a0 as collectionsPalette, a1 as makePanelTransparent, V as VBtn, v as VIcon } from './asWebComponent-CLhcT715.js';
3
+ import { _ as _export_sfc, D as useDisplay, E as useSTAcStore, F as useTransparentPanel, G as VBtn, H as VIcon, I as eodashCollections, J as eodashCompareCollections } from './asWebComponent-ZyEzWOOf.js';
4
+ import { y as datetime, k as getDatetimeProperty } from './helpers-wXK7Ywio.js';
4
5
  import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
5
6
  import log from 'loglevel';
6
- import { T as Tooltip } from './index-4CT7Tz83.js';
7
+ import { storeToRefs } from 'pinia';
8
+ import { T as Tooltip } from './index-9KR-G20t.js';
9
+
10
+ const _style_0 = ".vc-popover-content{--vc-nav-hover-bg: rgba(var(--v-theme-on-surface), .1);--vc-nav-item-active-color: rgb(var(--v-theme-on-secondary));--vc-nav-item-active-bg: rgba(var(--v-theme-secondary), .8);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .5)}.vc-container{--vc-day-content-hover-bg: rgba(var(--v-theme-on-surface), .2);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .4);--vc-header-arrow-hover-bg: rgba(var(--v-theme-secondary), .1)}.vc-attr{--vc-accent-600: rgba(var(--v-theme-secondary), .8)}.datePicker{--vc-day-content-hover-bg: red}@media (min-width: 960px){.datePicker{position:absolute;bottom:0;left:0;right:0;margin-inline:auto;width:fit-content}}.vc-day-content{color:#5e5e5e;font-weight:400}.vc-highlight-content-solid{color:#fff!important}.vc-popover-content-wrapper{transform:var(--254ea936)!important}.vc-date-picker-content,.datePicker{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.vc-popover-caret.direction-top.align-left{clip-path:polygon(0% 0%,100% 0%,0% 100%,0% 100%)}.vc-bordered{border:none}";
7
11
 
8
12
  const _hoisted_1 = {
9
13
  ref: "rootRef",
10
14
  class: "datePicker"
11
15
  };
12
16
  const _hoisted_2 = {
13
- class: "bg-surface d-flex flex-row align-center justify-center pb-1",
17
+ class: "d-flex flex-row align-center justify-center pb-1",
14
18
  style: {"overflow":"hidden","width":"100%"}
15
19
  };
16
20
  const _hoisted_3 = {
@@ -52,7 +56,7 @@ const _sfc_main = {
52
56
  setup(__props) {
53
57
 
54
58
  useCssVars(_ctx => ({
55
- "f4706d8a": (transform.value)
59
+ "254ea936": (transform.value)
56
60
  }));
57
61
 
58
62
  const { lgAndDown } = useDisplay();
@@ -121,24 +125,49 @@ const maskedCurrentDate = computed(() =>
121
125
  */
122
126
  const attributes = reactive([]);
123
127
 
124
- const selectedStac = toRef(useSTAcStore(), "selectedStac");
128
+ const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
125
129
 
126
130
  watch(
127
- selectedStac,
128
- async (updatedStac, previousStac) => {
129
- if (updatedStac && previousStac?.id !== updatedStac.id) {
130
- log.debug("Datepicker selected STAC change triggered");
131
- // remove old values
132
- attributes.splice(0, attributes.length);
131
+ [selectedStac, selectedCompareStac],
132
+ async ([updatedStac, updatedCompareStac]) => {
133
+ attributes.splice(0, attributes.length);
134
+ if (!updatedStac && !updatedCompareStac) {
135
+ log.debug("No STAC selected, clearing datepicker attributes");
136
+ return;
137
+ }
133
138
 
134
- for (let idx = 0; idx < eodashCollections.length; idx++) {
135
- log.debug("Retrieving dates", eodashCollections[idx]);
136
- await eodashCollections[idx].fetchCollection();
139
+ const attrs =
140
+ /** @type {Partial<import("v-calendar/dist/types/src/utils/attribute").AttributeConfig>[]} */ ([
141
+ ...(await fetchCollectionsAttributes(eodashCollections)),
142
+ ...(await fetchCollectionsAttributes(eodashCompareCollections)),
143
+ ]);
144
+ attributes.push(...attrs);
145
+ },
146
+ { immediate: true },
147
+ );
148
+
149
+ /**
150
+ *
151
+ * @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCollections
152
+ */
153
+ async function fetchCollectionsAttributes(eodashCollections) {
154
+ if (!eodashCollections || !eodashCollections.length) {
155
+ return [];
156
+ }
137
157
 
158
+ return await Promise.all(
159
+ eodashCollections.map((ec, idx) => {
160
+ return ec.fetchCollection().then(() => {
161
+ const dateProperty = getDatetimeProperty(ec.getItems());
162
+ if (!dateProperty) {
163
+ return [];
164
+ }
138
165
  const dates = [
139
166
  ...new Set(
140
- eodashCollections[idx].getItems()?.reduce((valid, it) => {
141
- const parsed = Date.parse(/** @type {string} */ (it.datetime));
167
+ ec.getItems()?.reduce((valid, item) => {
168
+ const parsed = Date.parse(
169
+ /** @type {string} */ (item[dateProperty]),
170
+ );
142
171
  if (parsed) {
143
172
  valid.push(new Date(parsed));
144
173
  }
@@ -146,12 +175,11 @@ watch(
146
175
  }, /** @type {Date[]} */ ([])),
147
176
  ),
148
177
  ];
149
- attributes.push({
178
+ return {
150
179
  key: "id-" + idx.toString() + Math.random().toString(16).slice(2),
151
180
  dot: {
152
181
  style: {
153
- backgroundColor:
154
- collectionsPalette[idx % collectionsPalette.length],
182
+ backgroundColor: ec.color,
155
183
  },
156
184
  },
157
185
  dates,
@@ -161,13 +189,11 @@ watch(
161
189
  "font-weight": "bold",
162
190
  },
163
191
  },
164
- });
165
- }
166
- }
167
- },
168
- { immediate: true },
169
- );
170
-
192
+ };
193
+ });
194
+ }),
195
+ );
196
+ }
171
197
  /**
172
198
  * @param {boolean} reverse
173
199
  */
@@ -202,7 +228,7 @@ onMounted(() => {
202
228
  : "translate3d(0px,-80px,0)";
203
229
  });
204
230
 
205
- makePanelTransparent(rootEl);
231
+ useTransparentPanel(rootEl);
206
232
 
207
233
  return (_ctx, _cache) => {
208
234
 
@@ -218,7 +244,7 @@ return (_ctx, _cache) => {
218
244
  attributes: attributes,
219
245
  masks: masks.value,
220
246
  expanded: "",
221
- class: "bg-surface overflow-auto",
247
+ class: "overflow-auto",
222
248
  style: {"background-color":"transparent","max-width":"100%"}
223
249
  }, createSlots({ _: 2 /* DYNAMIC */ }, [
224
250
  (__props.toggleCalendar)
@@ -234,7 +260,7 @@ return (_ctx, _cache) => {
234
260
  variant: "text",
235
261
  onClick: _cache[0] || (_cache[0] = $event => (jumpDate(true))),
236
262
  class: "py-2",
237
- style: {"flex-shrink":"1"}
263
+ style: {"flex-shrink":"1","padding":"0"}
238
264
  }, {
239
265
  default: withCtx(() => [
240
266
  createVNode(VIcon, {
@@ -265,7 +291,7 @@ return (_ctx, _cache) => {
265
291
  variant: "text",
266
292
  onClick: _cache[1] || (_cache[1] = $event => (jumpDate(false))),
267
293
  class: "py-2",
268
- style: {"flex-shrink":"1"}
294
+ style: {"flex-shrink":"1","padding":"0"}
269
295
  }, {
270
296
  default: withCtx(() => [
271
297
  createVNode(VIcon, {
@@ -346,5 +372,6 @@ return (_ctx, _cache) => {
346
372
  }
347
373
 
348
374
  };
375
+ const EodashDatePicker = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]]]);
349
376
 
350
- export { _sfc_main as default };
377
+ export { EodashDatePicker as default };
@@ -1,7 +1,9 @@
1
1
  import { computed, ref, createElementBlock, openBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
2
- import { r as useDisplay, Z as useSTAcStore } from './asWebComponent-CLhcT715.js';
2
+ import { _ as _export_sfc, E as useSTAcStore, O as isFirstLoad } from './asWebComponent-ZyEzWOOf.js';
3
3
  import '@eox/itemfilter';
4
4
 
5
+ const _style_0 = "eox-itemfilter[data-v-1be0ec61]{--form-flex-direction: row}@media (max-width: 768px){eox-itemfilter[data-v-1be0ec61]{--form-flex-direction: column}}";
6
+
5
7
  const _hoisted_1 = [".items"];
6
8
  const _hoisted_2 = {
7
9
  slot: "filterstitle",
@@ -55,6 +57,7 @@ const _sfc_main = {
55
57
  enableHighlighting: { type: Boolean, default: true },
56
58
  expandMultipleFilters: { type: Boolean, default: true },
57
59
  expandMultipleResults: { type: Boolean, default: true },
60
+ styleOverride: { type: String, default: "" },
58
61
  filterProperties: {
59
62
  /** @type {import("vue").PropType<{
60
63
  * keys:string[];
@@ -66,13 +69,15 @@ const _sfc_main = {
66
69
  default: () => [
67
70
  {
68
71
  keys: ["title", "themes", "description"],
69
- title: "Search",
72
+ title: "Search by name or description",
70
73
  type: "text",
74
+ expanded: true,
71
75
  },
72
76
  {
73
77
  key: "themes",
74
- title: "Theme Filter",
78
+ title: "Filter by theme",
75
79
  type: "multiselect",
80
+ expanded: true,
76
81
  },
77
82
  ],
78
83
  },
@@ -80,6 +85,7 @@ const _sfc_main = {
80
85
  emits: ["select"],
81
86
  setup(__props, { emit: __emit }) {
82
87
 
88
+ const store = useSTAcStore();
83
89
  const emit = __emit;
84
90
 
85
91
  const props = __props;
@@ -88,8 +94,10 @@ const props = __props;
88
94
  */
89
95
  const selectIndicator = async (item) => {
90
96
  if (item) {
91
- // Reset compare stac to empty
92
- store.resetSelectedCompareSTAC();
97
+ if (isFirstLoad.value) {
98
+ // prevent the map from jumping to the initial position
99
+ isFirstLoad.value = false;
100
+ }
93
101
  await store.loadSelectedSTAC(item.href);
94
102
  emit("select", item);
95
103
  } else {
@@ -103,6 +111,8 @@ const selectCompareIndicator = (item) => {
103
111
  if (item) {
104
112
  store.loadSelectedCompareSTAC(item.href);
105
113
  emit("select", item);
114
+ } else {
115
+ store.resetSelectedCompareSTAC();
106
116
  }
107
117
  };
108
118
  /** @param {any} evt*/
@@ -114,7 +124,7 @@ const onSelect = async (evt) => {
114
124
  selectIndicator(item);
115
125
  }
116
126
  };
117
- const { smAndDown } = useDisplay();
127
+
118
128
  const config = computed(() => ({
119
129
  titleProperty: props.titleProperty,
120
130
  enableHighlighting: props.enableHighlighting,
@@ -125,13 +135,12 @@ const config = computed(() => ({
125
135
  imageProperty: props.imageProperty,
126
136
  aggregateResults: props.aggregateResults,
127
137
  style: props.cssVars,
128
- filterProperties: smAndDown.value ? "" : props.filterProperties,
138
+ filterProperties: props.filterProperties,
139
+ styleOverride: props.styleOverride,
129
140
  }));
130
141
  /** @type {import("vue").Ref<HTMLElement & Record<string,any> | null>} */
131
142
  const eoxItemFilter = ref(null);
132
143
 
133
- const store = useSTAcStore();
134
-
135
144
  return (_ctx, _cache) => {
136
145
  return (openBlock(), createElementBlock("eox-itemfilter", mergeProps({ class: "fill-height" }, config.value, {
137
146
  ref_key: "eoxItemFilter",
@@ -147,5 +156,6 @@ return (_ctx, _cache) => {
147
156
  }
148
157
 
149
158
  };
159
+ const EodashItemFilter = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-1be0ec61"]]);
150
160
 
151
- export { _sfc_main as default };
161
+ export { EodashItemFilter as default };
@@ -1,19 +1,21 @@
1
- import { computed, ref, createElementBlock, openBlock, createCommentVNode, mergeProps, unref } from 'vue';
1
+ import { computed, ref, createElementBlock, openBlock, createCommentVNode, mergeProps, unref, renderSlot, createElementVNode, toDisplayString } from 'vue';
2
2
  import '@eox/layercontrol';
3
3
  import '@eox/jsonform';
4
4
  import '@eox/timecontrol';
5
5
  import 'color-legend-element';
6
- import { Z as useSTAcStore, a2 as mapCompareEl, a3 as mapEl, a4 as eodashCompareCollections, $ as eodashCollections, a5 as layerControlFormValueCompare, a6 as layerControlFormValue, a7 as getColFromLayer } from './asWebComponent-CLhcT715.js';
6
+ import { I as mapCompareEl, d as mapEl, J as getColFromLayer } from './helpers-wXK7Ywio.js';
7
+ import { _ as _export_sfc, E as useSTAcStore, K as layerControlFormValueCompare, L as layerControlFormValue, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-ZyEzWOOf.js';
7
8
  import { storeToRefs } from 'pinia';
8
9
 
9
- const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
10
+ const _style_0 = "eox-layercontrol[data-v-88d02d9c]{overflow:auto}";
11
+
12
+ const _hoisted_1 = { class: "d-flex flex-column" };
10
13
  const _hoisted_2 = ["for"];
14
+ const _hoisted_3 = {
15
+ key: 0,
16
+ class: "mt-2 mb-2"
17
+ };
11
18
 
12
- const styleOverride = `
13
- input[type="range"] {
14
- background:transparent !important;
15
- }
16
- `;
17
19
 
18
20
  const _sfc_main = {
19
21
  __name: 'EodashLayerControl',
@@ -28,6 +30,10 @@ const _sfc_main = {
28
30
  type: Array,
29
31
  default: () => ["datetime", "info", "config", "legend", "opacity"],
30
32
  },
33
+ title: {
34
+ type: String || Boolean,
35
+ default: "Layers",
36
+ },
31
37
  cssVars: {
32
38
  type: Object,
33
39
  },
@@ -66,7 +72,6 @@ const handleDatetimeUpdate = async (evt) => {
66
72
  let updatedLayers = [];
67
73
 
68
74
  if (ec) {
69
- await ec.fetchCollection();
70
75
  updatedLayers = await ec.updateLayerJson(
71
76
  datetime,
72
77
  layer.get("id"),
@@ -116,26 +121,34 @@ const onLayerConfigChange = (evt) => {
116
121
  }
117
122
  };
118
123
 
119
-
120
124
  return (_ctx, _cache) => {
121
125
  return (openBlock(), createElementBlock("span", _hoisted_1, [
122
126
  (showControls.value)
123
- ? (openBlock(), createElementBlock("eox-layercontrol", mergeProps({ key: 0 }, config, {
127
+ ? (openBlock(), createElementBlock("eox-layercontrol", mergeProps({ key: unref(mapElement) }, config, {
124
128
  for: unref(mapElement),
125
129
  "onDatetime:updated": debouncedHandleDateTime,
126
- class: "fill-height",
127
130
  toolsAsList: "true",
128
131
  style: {"--eox-background-color":"transparent"},
129
132
  ref_key: "eoxLayercontrol",
130
133
  ref: eoxLayercontrol,
131
- "on:layerConfig:change": onLayerConfigChange,
132
- ".styleOverride": styleOverride
133
- }), null, 48 /* FULL_PROPS, NEED_HYDRATION */, _hoisted_2))
134
+ "on:layerConfig:change": onLayerConfigChange
135
+ }), [
136
+ renderSlot(_ctx.$slots, "layerstitle", {}, () => [
137
+ createElementVNode("div", null, [
138
+ (__props.title)
139
+ ? (openBlock(), createElementBlock("p", _hoisted_3, [
140
+ createElementVNode("strong", null, toDisplayString(__props.title), 1 /* TEXT */)
141
+ ]))
142
+ : createCommentVNode("v-if", true)
143
+ ])
144
+ ], true)
145
+ ], 16 /* FULL_PROPS */, _hoisted_2))
134
146
  : createCommentVNode("v-if", true)
135
147
  ]))
136
148
  }
137
149
  }
138
150
 
139
151
  };
152
+ const EodashLayerControl = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-88d02d9c"]]);
140
153
 
141
- export { _sfc_main as default };
154
+ export { EodashLayerControl as default };
@@ -0,0 +1,61 @@
1
+ import { ref, createElementBlock, openBlock, createBlock, unref, withCtx, createVNode, mergeProps } from 'vue';
2
+ import { A as activeTemplate } from './helpers-wXK7Ywio.js';
3
+ import { mdiViewDashboard } from '@mdi/js';
4
+ import { D as useDisplay, F as useTransparentPanel, H as VIcon } from './asWebComponent-ZyEzWOOf.js';
5
+ import { V as VTooltip } from './VTooltip-J4ac48X7.js';
6
+
7
+ const _sfc_main = {
8
+ __name: 'EodashLayoutSwitcher',
9
+ props: {
10
+ target: {
11
+ type: String,
12
+ default: "main",
13
+ },
14
+ // mdi/js icon
15
+ icon: {
16
+ type: String,
17
+ default: mdiViewDashboard,
18
+ },
19
+ },
20
+ setup(__props) {
21
+
22
+ const { mobile } = useDisplay();
23
+
24
+
25
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
26
+ const rootRef = ref(null);
27
+ useTransparentPanel(rootRef);
28
+
29
+ return (_ctx, _cache) => {
30
+
31
+
32
+
33
+ return (openBlock(), createElementBlock("div", {
34
+ ref_key: "rootRef",
35
+ ref: rootRef
36
+ }, [
37
+ (!unref(mobile))
38
+ ? (openBlock(), createBlock(VTooltip, {
39
+ key: 0,
40
+ text: `Switch to ${__props.target} mode`
41
+ }, {
42
+ activator: withCtx(({ props }) => [
43
+ createVNode(VIcon, mergeProps(props, {
44
+ onClick: _cache[0] || (_cache[0] = $event => (activeTemplate.value = __props.target)),
45
+ icon: [__props.icon]
46
+ }), null, 16 /* FULL_PROPS */, ["icon"])
47
+ ]),
48
+ _: 1 /* STABLE */
49
+ }, 8 /* PROPS */, ["text"]))
50
+ : (openBlock(), createBlock(VIcon, {
51
+ key: 1,
52
+ onClick: _cache[1] || (_cache[1] = $event => (activeTemplate.value = __props.target)),
53
+ icon: [__props.icon]
54
+ }, null, 8 /* PROPS */, ["icon"]))
55
+ ], 512 /* NEED_PATCH */))
56
+ }
57
+ }
58
+
59
+ };
60
+
61
+ export { _sfc_main as default };