@eodash/eodash 5.6.1 → 5.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/core/client/components/DashboardLayout.vue +1 -1
  2. package/core/client/components/EodashOverlay.vue +27 -4
  3. package/core/client/composables/DefineEodash.js +0 -1
  4. package/core/client/composables/DefineWidgets.js +3 -1
  5. package/core/client/composables/index.js +6 -2
  6. package/core/client/eodashSTAC/EodashCollection.js +79 -45
  7. package/core/client/eodashSTAC/cql.js +64 -0
  8. package/core/client/eodashSTAC/createLayers.js +192 -125
  9. package/core/client/eodashSTAC/helpers.js +423 -97
  10. package/core/client/eodashSTAC/mosaic.js +416 -0
  11. package/core/client/plugins/axios.js +31 -1
  12. package/core/client/store/actions.js +1 -1
  13. package/core/client/store/stac.js +25 -4
  14. package/core/client/store/states.js +20 -2
  15. package/core/client/types.ts +155 -29
  16. package/core/client/utils/bands-editor/exampleSchema.json +50 -50
  17. package/core/client/utils/index.js +4 -0
  18. package/core/client/utils/states.js +10 -0
  19. package/dist/client/{DashboardLayout-CqMb7OXc.js → DashboardLayout-ePbdvUTE.js} +5 -5
  20. package/dist/client/{DynamicWebComponent-DqKqTf7l.js → DynamicWebComponent-g5SdRbjY.js} +1 -1
  21. package/dist/client/{EodashChart-PkUQfH0k.js → EodashChart-ChrkA5oS.js} +7 -6
  22. package/dist/client/{EodashDatePicker-DLJGdTtX.js → EodashDatePicker-CY1TrsDo.js} +3 -3
  23. package/dist/client/{EodashItemFilter-Dk8KjFcX.js → EodashItemFilter-DzshHDlS.js} +2 -1
  24. package/dist/client/{EodashLayerControl-CC1Cogrn.js → EodashLayerControl-DMCeMkSd.js} +70 -22
  25. package/dist/client/{EodashLayoutSwitcher-5WZYd6rr.js → EodashLayoutSwitcher-iJ8mX1rF.js} +3 -3
  26. package/dist/client/EodashMapBtns-C7Cr7q5Y.js +592 -0
  27. package/dist/client/EodashStacInfo-K7-iuXa7.js +169 -0
  28. package/dist/client/{EodashTools-CGZtTh45.js → EodashTools-BEK7e7JM.js} +4 -4
  29. package/dist/client/{ExportState-Ce0ZnrX_.js → ExportState-CqIzfMYQ.js} +6 -168
  30. package/dist/client/{Footer-CnZqEiop.js → Footer-1P0cmBOZ.js} +1 -1
  31. package/dist/client/{Header-Dr5PBIm8.js → Header-CkkBaBNh.js} +2 -2
  32. package/dist/client/MobileLayout-BPf49kDU.js +118 -0
  33. package/dist/client/{PopUp-DjvE_71e.js → PopUp-DPZq5SWI.js} +4 -168
  34. package/dist/client/{ProcessList-kf3olI7W.js → ProcessList-DuI6WpS1.js} +5 -5
  35. package/dist/client/VDivider-Bj9LG_JV.js +168 -0
  36. package/dist/client/{VImg-Bj6uWt6j.js → VImg-Ddv5OyMz.js} +2 -2
  37. package/dist/client/{VMain-Cm0UmKGi.js → VMain-7yqk_qC3.js} +1 -1
  38. package/dist/client/{VTooltip-DbBu-ky3.js → VTooltip-2hAJyEoa.js} +2 -2
  39. package/dist/client/{WidgetsContainer-CfLnd44U.js → WidgetsContainer-2DOrlwCB.js} +1 -1
  40. package/dist/client/{asWebComponent-DfULAbpq.js → asWebComponent-BlFN2lkB.js} +493 -335
  41. package/dist/client/{async-CIbKXEEe.js → async-B2H8ZwUK.js} +21 -10
  42. package/dist/client/create-layers-config-u_vn5hPk.js +182 -0
  43. package/dist/client/dialog-transition-BrMkMiNa.js +170 -0
  44. package/dist/client/eo-dash.js +1 -1
  45. package/dist/client/{forwardRefs-yj3VWOK5.js → forwardRefs-DAlror6d.js} +8 -87
  46. package/dist/client/{handling-s8xt2JwF.js → handling-B6I1V5eG.js} +123 -85
  47. package/dist/client/{helpers-DAVGYl_f.js → helpers-CBqIUSXJ.js} +3034 -1649
  48. package/dist/client/index-BWq1ZKaV.js +3168 -0
  49. package/dist/client/{index-CYz6dT7K.js → index-CJ9UI3ln.js} +2 -2
  50. package/dist/client/index-DXLz4sFR.js +442 -0
  51. package/dist/client/{index-4TrjfJ32.js → index-DhKU6KqM.js} +230 -231
  52. package/dist/client/{index-Bu8BMA9q.js → index-DjQlbWbJ.js} +70 -83
  53. package/dist/client/material-symbols-outlined.woff2 +0 -0
  54. package/dist/client/material-symbols-rounded.woff2 +0 -0
  55. package/dist/client/material-symbols-sharp.woff2 +0 -0
  56. package/dist/client/material-symbols-subset.woff2 +0 -0
  57. package/dist/client/mosaic-BFYLEwyx.js +455 -0
  58. package/dist/client/templates.js +250 -119
  59. package/dist/client/{transition-DaOsiD4u.js → transition-D_W6Wn9v.js} +1 -1
  60. package/dist/node/cli.js +5 -5
  61. package/dist/node/types.d.ts +4 -0
  62. package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
  63. package/dist/types/core/client/composables/index.d.ts +1 -3
  64. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +62 -31
  65. package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
  66. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +44 -25
  67. package/dist/types/core/client/eodashSTAC/helpers.d.ts +78 -18
  68. package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
  69. package/dist/types/core/client/store/stac.d.ts +31 -7
  70. package/dist/types/core/client/store/states.d.ts +24 -2
  71. package/dist/types/core/client/types.d.ts +131 -25
  72. package/dist/types/core/client/utils/states.d.ts +12 -0
  73. package/dist/types/templates/baseConfig.d.ts +1 -88
  74. package/dist/types/templates/compare.d.ts +32 -3
  75. package/dist/types/templates/expert.d.ts +18 -0
  76. package/dist/types/templates/explore.d.ts +9 -1
  77. package/dist/types/templates/lite.d.ts +11 -0
  78. package/dist/types/widgets/EodashChart.vue.d.ts +5 -3
  79. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +129 -2
  80. package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +28 -6
  81. package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +17 -4
  82. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +16 -4
  83. package/dist/types/widgets/EodashLayerControl.vue.d.ts +36 -17
  84. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +23 -10
  85. package/dist/types/widgets/EodashMap/index.vue.d.ts +91 -35
  86. package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -8
  87. package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -1
  88. package/dist/types/widgets/EodashMap/methods/use-map-loading.d.ts +1 -0
  89. package/dist/types/widgets/EodashProcess/index.vue.d.ts +5 -3
  90. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -1
  91. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +13 -8
  92. package/dist/types/widgets/EodashProcess/states.d.ts +1 -1
  93. package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
  94. package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +54 -0
  95. package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +34 -0
  96. package/dist/types/widgets/EodashTimeSlider/types.d.ts +52 -0
  97. package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
  98. package/package.json +46 -46
  99. package/templates/baseConfig.js +36 -6
  100. package/templates/compare.js +62 -7
  101. package/templates/expert.js +23 -0
  102. package/templates/explore.js +11 -5
  103. package/templates/lite.js +14 -0
  104. package/widgets/EodashChart.vue +1 -0
  105. package/widgets/EodashItemCatalog/index.vue +363 -35
  106. package/widgets/EodashItemCatalog/methods/filters.js +134 -70
  107. package/widgets/EodashItemCatalog/methods/handlers.js +113 -19
  108. package/widgets/EodashItemCatalog/methods/map.js +142 -28
  109. package/widgets/EodashLayerControl.vue +64 -14
  110. package/widgets/EodashMap/EodashMapBtns.vue +153 -47
  111. package/widgets/EodashMap/index.vue +101 -105
  112. package/widgets/EodashMap/methods/btns.js +37 -5
  113. package/widgets/EodashMap/methods/create-layers-config.js +18 -16
  114. package/widgets/EodashMap/methods/index.js +89 -8
  115. package/widgets/EodashMap/methods/use-map-loading.js +52 -0
  116. package/widgets/EodashProcess/index.vue +2 -1
  117. package/widgets/EodashProcess/methods/async.js +19 -8
  118. package/widgets/EodashProcess/methods/composables.js +63 -77
  119. package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +9 -5
  120. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +7 -4
  121. package/widgets/EodashProcess/methods/handling.js +105 -72
  122. package/widgets/EodashProcess/states.js +1 -1
  123. package/widgets/EodashStacInfo.vue +64 -2
  124. package/widgets/EodashTimeSlider/index.vue +208 -0
  125. package/widgets/EodashTimeSlider/methods/index.js +236 -0
  126. package/widgets/EodashTimeSlider/types.ts +54 -0
  127. package/dist/client/EodashMapBtns-BHrSDNoC.js +0 -435
  128. package/dist/client/EodashStacInfo-B90wobPc.js +0 -107
  129. package/dist/client/EodashTimeSlider-5vm7F3ju.js +0 -53
  130. package/dist/client/MobileLayout-DyMjaeif.js +0 -118
  131. package/dist/client/index-CugS__t5.js +0 -570
  132. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +0 -15
  133. package/widgets/EodashTimeSlider.vue +0 -40
@@ -1,16 +1,66 @@
1
1
  <template>
2
- <span>
3
- <v-row class="title align-center justify-space-between">
2
+ <div class="d-flex flex-column">
3
+ <v-row
4
+ class="title align-center justify-space-between flex-shrink-0"
5
+ v-if="showTitleBlock"
6
+ >
4
7
  <h4>Catalog Items</h4>
5
- <EodashLayoutSwitcher :target="layoutTarget" :icon="layoutIcon" />
8
+ <div class="d-flex align-center">
9
+ <v-menu v-if="sortBy?.length" v-model="sortMenu" offset-y>
10
+ <template v-slot:activator="{ props: menuProps }">
11
+ <v-tooltip location="bottom">
12
+ <template #activator="{ props: tooltipProps }">
13
+ <v-btn
14
+ v-bind="{ ...menuProps, ...tooltipProps }"
15
+ icon
16
+ size="small"
17
+ color="primary"
18
+ class="mr-2"
19
+ aria-label="Sort"
20
+ variant="text"
21
+ >
22
+ <v-icon>mdi-sort</v-icon>
23
+ </v-btn>
24
+ </template>
25
+ <span>Sort items</span>
26
+ </v-tooltip>
27
+ </template>
28
+ <v-list density="compact" color="primary">
29
+ <v-list-item
30
+ v-for="option in props.sortBy"
31
+ :key="option.property"
32
+ @click="selectSort(option)"
33
+ :active="selectedSort.property === option.property"
34
+ >
35
+ <v-list-item-title>
36
+ {{ option.label }}
37
+ <v-icon
38
+ v-if="selectedSort.property === option.property"
39
+ size="x-small"
40
+ class="ml-1"
41
+ >
42
+ {{ sortOrder === "+" ? "mdi-arrow-up" : "mdi-arrow-down" }}
43
+ </v-icon>
44
+ </v-list-item-title>
45
+ </v-list-item>
46
+ </v-list>
47
+ </v-menu>
48
+ <EodashLayoutSwitcher
49
+ v-if="layoutTarget && layoutIcon"
50
+ :target="layoutTarget"
51
+ :icon="layoutIcon"
52
+ />
53
+ </div>
6
54
  </v-row>
7
55
  <eox-itemfilter
56
+ class="itemfilter-scroll"
8
57
  ref="itemfilter"
9
58
  titleProperty="id"
10
59
  .imageProperty="imageProperty"
11
60
  .subTitleProperty="subTitleProperty"
12
61
  .filterProperties="filterProperties"
13
62
  .items="items"
63
+ .styleOverride="itemfilterStyleOverride"
14
64
  @select="onSelectItem"
15
65
  @filter="onFilter"
16
66
  @mouseenter:result="onMouseEnterResult"
@@ -20,11 +70,20 @@
20
70
  <h4 slot="filterstitle" style="margin: 14px 8px">{{ filtersTitle }}</h4>
21
71
  <h4 slot="resultstitle" style="margin: 14px 8px">{{ resultsTitle }}</h4>
22
72
  </eox-itemfilter>
23
- </span>
73
+ </div>
24
74
  </template>
25
75
 
26
76
  <script setup>
27
- import { onUnmounted, ref, useTemplateRef } from "vue";
77
+ import {
78
+ computed,
79
+ nextTick,
80
+ onUnmounted,
81
+ ref,
82
+ useTemplateRef,
83
+ watch,
84
+ } from "vue";
85
+ import { storeToRefs } from "pinia";
86
+
28
87
  import { useSTAcStore } from "@/store/stac";
29
88
  import {
30
89
  createExternalFilter,
@@ -34,17 +93,26 @@ import {
34
93
  import {
35
94
  useSearchOnMapMove,
36
95
  useRenderItemsFeatures,
37
- useHighlightOnFeatureHover,
96
+ useHoverTooltip,
97
+ useRenderOnFeatureClick,
98
+ renderItemsFeatures,
38
99
  } from "./methods/map";
39
100
  import {
40
101
  createOnFilterHandler,
41
102
  createOnSelectHandler,
42
- onMouseEnterResult,
43
- onMouseLeaveResult,
103
+ createOnMouseEnterResult,
104
+ createOnMouseLeaveResult,
44
105
  } from "./methods/handlers";
45
- import axios from "@/plugins/axios";
46
106
  import { mdiViewDashboard } from "@mdi/js";
47
107
  import EodashLayoutSwitcher from "^/EodashLayoutSwitcher.vue";
108
+ import { mapCompareEl, mapEl, mapPosition } from "@/store/states";
109
+ import axios from "@/plugins/axios";
110
+ import {
111
+ useInitMosaic,
112
+ renderLatestMosaic,
113
+ useScheduleMosaicUpdate,
114
+ useMosaicState,
115
+ } from "@/eodashSTAC/mosaic";
48
116
 
49
117
  if (!customElements.get("eox-itemfilter")) {
50
118
  await import("@eox/itemfilter");
@@ -56,6 +124,19 @@ const props = defineProps({
56
124
  type: String,
57
125
  default: "Explore Catalog",
58
126
  },
127
+ hoverProperties: {
128
+ /** @type {import("vue").PropType<string[]>} */
129
+ type: Array,
130
+ default: () => ["datetime", "eo:cloud_cover"],
131
+ },
132
+ sortBy: {
133
+ /** @type {import("vue").PropType<{ property: string, label: string }[]>} */
134
+ type: Array,
135
+ default: () => [
136
+ { property: "datetime", label: "Date" },
137
+ { property: "eo:cloud_cover", label: "Cloud Cover" },
138
+ ],
139
+ },
59
140
  layoutTarget: {
60
141
  type: String,
61
142
  default: "lite",
@@ -72,6 +153,10 @@ const props = defineProps({
72
153
  type: String,
73
154
  default: "Items:",
74
155
  },
156
+ datetimeFilter: {
157
+ type: Boolean,
158
+ default: false,
159
+ },
75
160
  bboxFilter: {
76
161
  type: Boolean,
77
162
  default: true,
@@ -80,6 +165,10 @@ const props = defineProps({
80
165
  type: String,
81
166
  default: "assets.thumbnail.href",
82
167
  },
168
+ showTitleBlock: {
169
+ type: Boolean,
170
+ default: true,
171
+ },
83
172
  filters: {
84
173
  /** @type {import("vue").PropType<import("./types").FiltersConfig>} */
85
174
  type: Array,
@@ -90,72 +179,311 @@ const props = defineProps({
90
179
  title: "Cloud Cover (%)",
91
180
  min: 0,
92
181
  max: 100,
182
+ step: 1,
183
+ state: {
184
+ min: 0,
185
+ max: 30,
186
+ },
93
187
  icon: `<svg style="height: 1rem; transform: translateY(-2px); fill: currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>weather-cloudy</title><path d="M6,19A5,5 0 0,1 1,14A5,5 0 0,1 6,9C7,6.65 9.3,5 12,5C15.43,5 18.24,7.66 18.5,11.03L19,11A4,4 0 0,1 23,15A4,4 0 0,1 19,19H6M19,13H17V12A5,5 0 0,0 12,7C9.5,7 7.45,8.82 7.06,11.19C6.73,11.07 6.37,11 6,11A3,3 0 0,0 3,14A3,3 0 0,0 6,17H19A2,2 0 0,0 21,15A2,2 0 0,0 19,13Z" /></svg>`,
94
188
  unitLabel: "%",
95
189
  },
96
190
  ],
97
191
  },
192
+ enableCompare: {
193
+ type: Boolean,
194
+ default: false,
195
+ },
196
+ useMosaic: {
197
+ type: Boolean,
198
+ default: false,
199
+ },
200
+ mosaicIndicators: {
201
+ /** @type {import("vue").PropType<string[]>} */
202
+ type: Array,
203
+ required: false,
204
+ },
205
+ stacEndpoint: {
206
+ type: String,
207
+ default: null,
208
+ },
209
+ searchLimit: {
210
+ type: Number,
211
+ default: 100,
212
+ },
213
+ stacItemsStyle: {
214
+ type: Object,
215
+ required: false,
216
+ },
217
+ stacItemsInteractionStyle: {
218
+ type: Object,
219
+ required: false,
220
+ },
98
221
  });
99
222
 
100
- // Store and template refs
101
- const store = useSTAcStore();
102
223
  const itemfilterEl = useTemplateRef("itemfilter");
103
224
 
225
+ // Sorting states
226
+ const sortMenu = ref(false);
227
+ const sortOrder = ref("-");
228
+ const selectedSort = ref(props.sortBy?.[0] ?? "");
229
+ const sortByParam = ref("-datetime");
230
+
231
+ function updateSortByParam() {
232
+ sortByParam.value = `${sortOrder.value === "+" ? "" : "-"}${
233
+ selectedSort.value.property
234
+ }`;
235
+ }
236
+ /**
237
+ * Handle sort option selection
238
+ * @param {{ property: string, label: string }} option
239
+ */
240
+ function selectSort(option) {
241
+ if (selectedSort.value.property === option.property) {
242
+ // Flip order if same property
243
+ sortOrder.value = sortOrder.value === "-" ? "+" : "-";
244
+ } else {
245
+ selectedSort.value = option;
246
+ // default to descending when changing property
247
+ sortOrder.value = "-";
248
+ }
249
+ updateSortByParam();
250
+ sortMenu.value = false;
251
+ if (itemfilterEl.value) {
252
+ itemfilterEl.value.search();
253
+ }
254
+ }
255
+
256
+ const store = useSTAcStore();
257
+ const { selectedItem, selectedCompareItem } = storeToRefs(store);
258
+
259
+ const catalogEndpoint = computed(
260
+ () => props.stacEndpoint || store.stacEndpoint,
261
+ );
262
+ const {
263
+ isItemView,
264
+ latestLayer,
265
+ visibilityThreshold,
266
+ returnToOverview,
267
+ mosaicEndpoint,
268
+ } = useMosaicState();
269
+
270
+ const isMosaicEnabled = computed(
271
+ () => props.useMosaic && !!mosaicEndpoint.value,
272
+ );
273
+
274
+ const activeSelectedItem =
275
+ /** @type {import("vue").Ref<import("stac-ts").StacItem | null>} */ (
276
+ props.enableCompare ? selectedCompareItem : selectedItem
277
+ );
278
+
279
+ if (props.useMosaic) {
280
+ const unsubscribeReturn = returnToOverview.on(() => {
281
+ activeSelectedItem.value = null;
282
+ });
283
+ onUnmounted(() => {
284
+ unsubscribeReturn();
285
+ isItemView.value = false;
286
+ });
287
+ }
288
+
289
+ onUnmounted(() => {
290
+ activeSelectedItem.value = null;
291
+ });
292
+
104
293
  // Reactive state
105
294
  /** @type {import("vue").Ref<import("@/types").GeoJsonFeature[]>} */
106
295
  const currentItems = ref([]);
107
296
 
297
+ const items = currentItems.value;
298
+
108
299
  // Initial data fetch
109
- await axios
110
- .get(store.stacEndpoint + "/search?limit=100")
111
- .then((res) => (currentItems.value = res.data.features));
112
300
 
113
- const items = currentItems.value;
301
+ if (catalogEndpoint.value) {
302
+ await axios
303
+ .get(catalogEndpoint.value + `/search?limit=${props.searchLimit}`)
304
+ .then((res) => (currentItems.value = res.data.features));
305
+ }
114
306
 
115
- const filterProperties = createFilterProperties(props.filters);
307
+ const filterProperties = createFilterProperties(
308
+ props.filters,
309
+ props.datetimeFilter,
310
+ );
116
311
 
117
312
  const subTitleProperty = createSubtitleProperty(props.filters);
118
313
 
119
314
  const externalFilterHandler = createExternalFilter(
120
315
  props.filters,
121
316
  props.bboxFilter,
317
+ props.datetimeFilter,
318
+ currentItems,
319
+ sortByParam,
320
+ props.searchLimit,
321
+ activeSelectedItem,
322
+ catalogEndpoint,
323
+ );
324
+
325
+ watch(activeSelectedItem, (item) => {
326
+ if (itemfilterEl.value) {
327
+ itemfilterEl.value.selectedResult = item ?? null;
328
+ }
329
+
330
+ if (isMosaicEnabled.value) {
331
+ isItemView.value = !!item;
332
+ }
333
+
334
+ // restore mosaic when item is deselected
335
+ if (!isMosaicEnabled.value || item) return;
336
+ if (latestLayer.value) {
337
+ renderLatestMosaic();
338
+ renderItemsFeatures(
339
+ currentItems.value,
340
+ props.enableCompare ? mapCompareEl : mapEl,
341
+ props.hoverProperties,
342
+ props.stacItemsStyle,
343
+ props.stacItemsInteractionStyle,
344
+ );
345
+ nextTick(() => {
346
+ const z = mapPosition.value[2] ?? 0;
347
+ const layer = mapEl.value?.getLayerById(
348
+ /** @type {string} */ (latestLayer.value?.properties?.id),
349
+ );
350
+ layer?.setVisible(z >= visibilityThreshold.value);
351
+ });
352
+ }
353
+ });
354
+
355
+ // re-add items features after mosaic layer is rendered
356
+ watch(
357
+ () => latestLayer.value,
358
+ (layer) => {
359
+ if (!isMosaicEnabled.value || !layer) return;
360
+ renderItemsFeatures(
361
+ currentItems.value,
362
+ props.enableCompare ? mapCompareEl : mapEl,
363
+ props.hoverProperties,
364
+ props.stacItemsStyle,
365
+ props.stacItemsInteractionStyle,
366
+ );
367
+ },
122
368
  );
123
369
 
370
+ const scheduleMosaicUpdate = useScheduleMosaicUpdate();
371
+
124
372
  // Event handlers
125
- /**
126
- * @param {CustomEvent} evt
127
- */
128
- const onFilter = createOnFilterHandler(currentItems);
373
+ const onFilter = createOnFilterHandler({
374
+ currentItems,
375
+ mapElement: props.enableCompare ? mapCompareEl : mapEl,
376
+ hoverProperties: props.hoverProperties,
377
+ stacItemsStyle: props.stacItemsStyle,
378
+ stacItemsInteractionStyle: props.stacItemsInteractionStyle,
379
+ itemfilterEl,
380
+ selectedItemRef: activeSelectedItem,
381
+ mosaicOptions: isMosaicEnabled.value
382
+ ? {
383
+ isMosaicEnabled,
384
+ getMosaicEndpoint: () => mosaicEndpoint.value,
385
+ scheduleMosaicUpdate,
386
+ }
387
+ : null,
388
+ });
129
389
 
130
390
  /**
131
391
  * @param {CustomEvent} evt
132
392
  */
133
- const onSelectItem = createOnSelectHandler(store);
393
+ const onSelectItem = createOnSelectHandler(
394
+ store,
395
+ props.enableCompare,
396
+ props.enableCompare ? mapCompareEl : mapEl,
397
+ );
134
398
 
135
399
  // composables
136
400
 
137
401
  // Render items features on the map
138
- useRenderItemsFeatures(currentItems);
402
+ useRenderItemsFeatures(
403
+ currentItems,
404
+ props.enableCompare ? mapCompareEl : mapEl,
405
+ props.hoverProperties,
406
+ props.stacItemsStyle,
407
+ props.stacItemsInteractionStyle,
408
+ );
139
409
  // Search on map move logic
140
- useSearchOnMapMove(itemfilterEl, props.bboxFilter);
410
+ useSearchOnMapMove(
411
+ itemfilterEl,
412
+ props.bboxFilter,
413
+ props.enableCompare ? mapCompareEl : mapEl,
414
+ );
415
+ // Render on feature click
416
+ useRenderOnFeatureClick(
417
+ itemfilterEl,
418
+ store,
419
+ props.enableCompare ? mapCompareEl : mapEl,
420
+ props.enableCompare,
421
+ );
422
+ // initialize mosaic and keep in sync with map state
423
+ useInitMosaic(
424
+ props.useMosaic ? mosaicEndpoint.value : null,
425
+ undefined,
426
+ props.mosaicIndicators,
427
+ );
141
428
 
142
- useHighlightOnFeatureHover(itemfilterEl);
429
+ // highlight on feature hover
430
+ useHoverTooltip(props.hoverProperties);
431
+ const onMouseEnterResult = createOnMouseEnterResult(
432
+ props.enableCompare ? mapCompareEl : mapEl,
433
+ );
434
+ const onMouseLeaveResult = createOnMouseLeaveResult(
435
+ props.enableCompare ? mapCompareEl : mapEl,
436
+ );
143
437
 
144
- onUnmounted(() => {
145
- store.selectedItem = null;
146
- });
438
+ const itemfilterStyleOverride = `
439
+ li.highlighted {
440
+ background-color: rgb(var(--v-theme-primary)) !important;
441
+ color: rgb(var(--v-theme-on-primary)) !important;
442
+ }
443
+ li.highlighted .subtitle {
444
+ opacity: 0.85;
445
+ }
446
+ .title-container.truncate,
447
+ .title.truncate,
448
+ .subtitle.truncate {
449
+ white-space: normal !important;
450
+ overflow: visible !important;
451
+ text-overflow: unset !important;
452
+ }
453
+ .title {
454
+ display: block;
455
+ line-height: 1.25;
456
+ overflow-wrap: anywhere;
457
+ word-break: break-word;
458
+ }
459
+ nav.responsive i.small {
460
+ width: 72px !important;
461
+ height: 72px !important;
462
+ min-width: 72px;
463
+ min-height: 72px;
464
+ flex: 0 0 72px;
465
+ }
466
+ nav.responsive i.small .image {
467
+ width: 100%;
468
+ height: 100%;
469
+ object-fit: cover;
470
+ border-radius: 8px;
471
+ padding:4px;
472
+ }
473
+ `;
147
474
  </script>
148
- <style scoped lang="scss">
149
- eox-itemfilter {
150
- flex-basis: 20%;
151
- height: 100%;
152
- overflow: hidden !important;
153
- padding: 1rem;
154
- --eox-itemfilter-results-color: var(--v-theme-surface) !important;
475
+ <style scoped>
476
+ .itemfilter-scroll {
477
+ flex: 1;
478
+ min-height: 0;
479
+ overflow: hidden;
480
+ padding: 0.5rem;
481
+ --eox-itemfilter-results-color: var(--v-theme-primary) !important;
155
482
  }
483
+
156
484
  .title {
157
- // padding: 1em;
158
485
  padding: 1em;
159
486
  margin: 0.2em;
487
+ flex-shrink: 0;
160
488
  }
161
489
  </style>