@eodash/eodash 5.7.0 → 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.
- package/core/client/components/EodashOverlay.vue +27 -4
- package/core/client/composables/DefineEodash.js +0 -1
- package/core/client/composables/DefineWidgets.js +3 -1
- package/core/client/eodashSTAC/EodashCollection.js +74 -20
- package/core/client/eodashSTAC/cql.js +64 -0
- package/core/client/eodashSTAC/createLayers.js +169 -116
- package/core/client/eodashSTAC/helpers.js +391 -98
- package/core/client/eodashSTAC/mosaic.js +416 -0
- package/core/client/plugins/axios.js +31 -1
- package/core/client/store/actions.js +1 -1
- package/core/client/store/stac.js +25 -4
- package/core/client/store/states.js +20 -2
- package/core/client/types.ts +147 -28
- package/core/client/utils/bands-editor/exampleSchema.json +50 -50
- package/core/client/utils/states.js +10 -0
- package/dist/client/{DashboardLayout-kRsmsNW5.js → DashboardLayout-ePbdvUTE.js} +2 -2
- package/dist/client/{DynamicWebComponent-CnKhYo0K.js → DynamicWebComponent-g5SdRbjY.js} +1 -1
- package/dist/client/{EodashChart-CLDqE93C.js → EodashChart-ChrkA5oS.js} +7 -6
- package/dist/client/{EodashDatePicker-CMPDT-ce.js → EodashDatePicker-CY1TrsDo.js} +3 -3
- package/dist/client/{EodashItemFilter-BpdA8QQa.js → EodashItemFilter-DzshHDlS.js} +2 -1
- package/dist/client/{EodashLayerControl-BHpDA4_0.js → EodashLayerControl-DMCeMkSd.js} +50 -20
- package/dist/client/{EodashLayoutSwitcher-B1fRUt7G.js → EodashLayoutSwitcher-iJ8mX1rF.js} +3 -3
- package/dist/client/{EodashMapBtns-Cpned0tc.js → EodashMapBtns-C7Cr7q5Y.js} +200 -86
- package/dist/client/EodashStacInfo-K7-iuXa7.js +169 -0
- package/dist/client/{EodashTools-1zHz26gv.js → EodashTools-BEK7e7JM.js} +4 -4
- package/dist/client/{ExportState-DbOm8hBI.js → ExportState-CqIzfMYQ.js} +6 -168
- package/dist/client/{Footer-BKg-VVkj.js → Footer-1P0cmBOZ.js} +1 -1
- package/dist/client/{Header-DCrwCvmY.js → Header-CkkBaBNh.js} +2 -2
- package/dist/client/{MobileLayout-vWSHpluo.js → MobileLayout-BPf49kDU.js} +2 -2
- package/dist/client/{PopUp-9uimfK49.js → PopUp-DPZq5SWI.js} +4 -168
- package/dist/client/{ProcessList-CTTIZa06.js → ProcessList-DuI6WpS1.js} +5 -5
- package/dist/client/VDivider-Bj9LG_JV.js +168 -0
- package/dist/client/{VImg-CrmB76ZY.js → VImg-Ddv5OyMz.js} +2 -2
- package/dist/client/{VMain-OKZNpcEG.js → VMain-7yqk_qC3.js} +1 -1
- package/dist/client/{VTooltip-CJw2FyWk.js → VTooltip-2hAJyEoa.js} +2 -2
- package/dist/client/{WidgetsContainer-BaWOnE5R.js → WidgetsContainer-2DOrlwCB.js} +1 -1
- package/dist/client/{asWebComponent-BHWpMuE3.js → asWebComponent-BlFN2lkB.js} +456 -306
- package/dist/client/{async-DSKj6g1f.js → async-B2H8ZwUK.js} +2 -2
- package/dist/client/{create-layers-config-CBoYedqB.js → create-layers-config-u_vn5hPk.js} +17 -17
- package/dist/client/dialog-transition-BrMkMiNa.js +170 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-DH51zPUr.js → forwardRefs-DAlror6d.js} +8 -87
- package/dist/client/{handling-BrcDDlgS.js → handling-B6I1V5eG.js} +3 -3
- package/dist/client/{helpers-DjZVl_WF.js → helpers-CBqIUSXJ.js} +794 -182
- package/dist/client/index-BWq1ZKaV.js +3168 -0
- package/dist/client/{index-CUjl-ZsI.js → index-CJ9UI3ln.js} +2 -2
- package/dist/client/{index-CSG_JoOA.js → index-DXLz4sFR.js} +62 -56
- package/dist/client/{index-1JKE68n3.js → index-DhKU6KqM.js} +211 -67
- package/dist/client/{index-Cu3-13Xg.js → index-DjQlbWbJ.js} +7 -6
- package/dist/client/mosaic-BFYLEwyx.js +455 -0
- package/dist/client/templates.js +250 -119
- package/dist/client/{transition-OHcz5Qq1.js → transition-D_W6Wn9v.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/types.d.ts +4 -0
- package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +57 -25
- package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +42 -23
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +77 -18
- package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
- package/dist/types/core/client/store/stac.d.ts +31 -7
- package/dist/types/core/client/store/states.d.ts +24 -2
- package/dist/types/core/client/types.d.ts +123 -24
- package/dist/types/core/client/utils/states.d.ts +12 -0
- package/dist/types/templates/baseConfig.d.ts +1 -100
- package/dist/types/templates/compare.d.ts +32 -3
- package/dist/types/templates/expert.d.ts +18 -0
- package/dist/types/templates/explore.d.ts +9 -1
- package/dist/types/templates/lite.d.ts +11 -0
- package/dist/types/widgets/EodashChart.vue.d.ts +5 -3
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +129 -2
- package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +28 -6
- package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +17 -4
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +16 -4
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +35 -16
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +14 -10
- package/dist/types/widgets/EodashMap/index.vue.d.ts +86 -37
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
- package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -1
- package/dist/types/widgets/EodashMap/methods/use-map-loading.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +5 -3
- package/dist/types/widgets/EodashProcess/states.d.ts +1 -1
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +3 -8
- package/dist/types/widgets/EodashTimeSlider/types.d.ts +6 -16
- package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
- package/package.json +33 -33
- package/templates/baseConfig.js +36 -6
- package/templates/compare.js +62 -7
- package/templates/expert.js +23 -0
- package/templates/explore.js +11 -5
- package/templates/lite.js +14 -0
- package/widgets/EodashChart.vue +1 -0
- package/widgets/EodashItemCatalog/index.vue +363 -35
- package/widgets/EodashItemCatalog/methods/filters.js +134 -70
- package/widgets/EodashItemCatalog/methods/handlers.js +113 -19
- package/widgets/EodashItemCatalog/methods/map.js +142 -28
- package/widgets/EodashLayerControl.vue +42 -11
- package/widgets/EodashMap/EodashMapBtns.vue +109 -48
- package/widgets/EodashMap/index.vue +89 -105
- package/widgets/EodashMap/methods/btns.js +37 -5
- package/widgets/EodashMap/methods/create-layers-config.js +16 -16
- package/widgets/EodashMap/methods/index.js +71 -8
- package/widgets/EodashMap/methods/use-map-loading.js +52 -0
- package/widgets/EodashProcess/index.vue +1 -0
- package/widgets/EodashProcess/states.js +1 -1
- package/widgets/EodashStacInfo.vue +64 -2
- package/widgets/EodashTimeSlider/index.vue +58 -2
- package/widgets/EodashTimeSlider/methods/index.js +5 -48
- package/widgets/EodashTimeSlider/types.ts +7 -17
- package/dist/client/EodashStacInfo-BQspAHKH.js +0 -107
- package/dist/client/index-5Jhsa8Xe.js +0 -570
|
@@ -1,16 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<v-row
|
|
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
|
-
<
|
|
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
|
-
</
|
|
73
|
+
</div>
|
|
24
74
|
</template>
|
|
25
75
|
|
|
26
76
|
<script setup>
|
|
27
|
-
import {
|
|
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
|
-
|
|
96
|
+
useHoverTooltip,
|
|
97
|
+
useRenderOnFeatureClick,
|
|
98
|
+
renderItemsFeatures,
|
|
38
99
|
} from "./methods/map";
|
|
39
100
|
import {
|
|
40
101
|
createOnFilterHandler,
|
|
41
102
|
createOnSelectHandler,
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
145
|
-
|
|
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
|
|
149
|
-
|
|
150
|
-
flex
|
|
151
|
-
height:
|
|
152
|
-
overflow: hidden
|
|
153
|
-
padding:
|
|
154
|
-
--eox-itemfilter-results-color: var(--v-theme-
|
|
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>
|