@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,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, render, h, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { V as VTooltip } from './VTooltip-
|
|
2
|
+
import { O as consoleError, ag as isObject } from './asWebComponent-BlFN2lkB.js';
|
|
3
|
+
import { V as VTooltip } from './VTooltip-2hAJyEoa.js';
|
|
4
4
|
|
|
5
5
|
// Utilities
|
|
6
6
|
function useDirectiveComponent(component, props) {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { useTemplateRef, ref, computed, onMounted, openBlock, createElementBlock, unref, createElementVNode, createCommentVNode } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { L as eodashCollections, _ as _export_sfc, H as useSTAcStore } from './asWebComponent-BHWpMuE3.js';
|
|
2
|
+
import { S as eodashCollections, af as removeLayers, $ as sanitizeBbox, f as axios, n as mapEl, B as getLayers, H as datetime } from './helpers-CBqIUSXJ.js';
|
|
4
3
|
import '@eox/timecontrol';
|
|
5
4
|
import '@eox/itemfilter';
|
|
6
5
|
import { storeToRefs } from 'pinia';
|
|
7
|
-
import {
|
|
6
|
+
import { _ as _export_sfc, H as useSTAcStore } from './asWebComponent-BlFN2lkB.js';
|
|
7
|
+
import { c as createLayersConfig } from './create-layers-config-u_vn5hPk.js';
|
|
8
|
+
import { b as buildCqlFilter, u as useMosaicState, a as useScheduleMosaicUpdate, c as useInitMosaic } from './mosaic-BFYLEwyx.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @param {string} stacEndpoint
|
|
11
12
|
* @param {[string, string]} selectedRange
|
|
12
13
|
* @param {import("../types").TimelineExportEventDetail["selectedRangeItems"]} selectedRangeItems
|
|
13
14
|
* @param {import("vue").Ref<import("stac-ts").StacCollection|null>} selectedStac
|
|
14
|
-
* @param {
|
|
15
|
+
* @param {import("@/types").ItemFilterFilters} filters
|
|
15
16
|
*/
|
|
16
17
|
async function createAnimationLayers(
|
|
17
18
|
stacEndpoint,
|
|
@@ -66,7 +67,7 @@ async function createAnimationLayers(
|
|
|
66
67
|
* @param {{min: string, max: string}} date
|
|
67
68
|
* @param {number[] | undefined} bbox
|
|
68
69
|
* @param {import("vue").Ref<import("stac-ts").StacCollection|null>} selectedStac
|
|
69
|
-
* @param {
|
|
70
|
+
* @param {import("@/types").ItemFilterFilters} filters
|
|
70
71
|
* @return {Promise<Array<{ layers: Record<string, any>[]; date: string }>>}
|
|
71
72
|
*/
|
|
72
73
|
async function createAPILayers(
|
|
@@ -88,7 +89,7 @@ async function createAPILayers(
|
|
|
88
89
|
);
|
|
89
90
|
url.searchParams.set("bbox", sanitizeBbox(bbox).join(","));
|
|
90
91
|
|
|
91
|
-
const stacFilter =
|
|
92
|
+
const stacFilter = buildCqlFilter(filters);
|
|
92
93
|
if (stacFilter) {
|
|
93
94
|
url.searchParams.set("filter", stacFilter);
|
|
94
95
|
}
|
|
@@ -233,53 +234,7 @@ function restoreLayersVisibility(layers) {
|
|
|
233
234
|
return layers;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
|
-
|
|
237
|
-
* Build STAC API filter string from TimeSlider filters
|
|
238
|
-
* @param {Record<string, import("../types").Filter>} filters
|
|
239
|
-
* @returns {string}
|
|
240
|
-
*/
|
|
241
|
-
function buildStacFilters(filters) {
|
|
242
|
-
if (!filters) return "";
|
|
243
|
-
|
|
244
|
-
/** @type {string[]} */
|
|
245
|
-
const stacFilters = [];
|
|
246
|
-
|
|
247
|
-
Object.values(filters).forEach((filter) => {
|
|
248
|
-
if (!filter || !filter.key) return;
|
|
249
|
-
|
|
250
|
-
// strip 'properties.' from key if present
|
|
251
|
-
const propName = filter.key.startsWith("properties.")
|
|
252
|
-
? filter.key.replace("properties.", "")
|
|
253
|
-
: filter.key;
|
|
254
|
-
|
|
255
|
-
if (filter.type === "range" && filter.state) {
|
|
256
|
-
if (
|
|
257
|
-
filter.state.min !== undefined &&
|
|
258
|
-
filter.state.min > (filter.min ?? -Infinity)
|
|
259
|
-
) {
|
|
260
|
-
stacFilters.push(`${propName}>=${filter.state.min}`);
|
|
261
|
-
}
|
|
262
|
-
if (
|
|
263
|
-
filter.state.max !== undefined &&
|
|
264
|
-
filter.state.max < (filter.max ?? Infinity)
|
|
265
|
-
) {
|
|
266
|
-
stacFilters.push(`${propName}<=${filter.state.max}`);
|
|
267
|
-
}
|
|
268
|
-
} else if (filter.type === "multiselect" && filter.stringifiedState) {
|
|
269
|
-
if (filter.stringifiedState.length > 0) {
|
|
270
|
-
stacFilters.push(`${propName} IN (${filter.stringifiedState})`);
|
|
271
|
-
}
|
|
272
|
-
} else if (filter.type === "select" && filter.stringifiedState) {
|
|
273
|
-
if (filter.stringifiedState) {
|
|
274
|
-
stacFilters.push(`${propName}='${filter.stringifiedState}'`);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
return stacFilters.join(" AND ");
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const _style_0 = "eox-itemfilter[data-v-2fc72058]{--inline-container-height: 40px}";
|
|
237
|
+
const _style_0 = "eox-itemfilter[data-v-a90da3dc]{--inline-container-height: 40px}";
|
|
283
238
|
|
|
284
239
|
const _hoisted_1 = [".for", ".animate"];
|
|
285
240
|
const _hoisted_2 = { class: "d-flex g-10 align-center" };
|
|
@@ -298,6 +253,15 @@ const _sfc_main = {
|
|
|
298
253
|
type: Boolean,
|
|
299
254
|
default: true,
|
|
300
255
|
},
|
|
256
|
+
useMosaic: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: false,
|
|
259
|
+
},
|
|
260
|
+
mosaicIndicators: {
|
|
261
|
+
/** @type {import("vue").PropType<string[]>} */
|
|
262
|
+
type: Array,
|
|
263
|
+
default: () => [],
|
|
264
|
+
},
|
|
301
265
|
},
|
|
302
266
|
setup(__props) {
|
|
303
267
|
|
|
@@ -314,6 +278,9 @@ const selectedRange = /** @type {import("vue").Ref<[string, string]>} */ (
|
|
|
314
278
|
);
|
|
315
279
|
const initDate = [startDate.toISOString().split("T")[0]];
|
|
316
280
|
|
|
281
|
+
/** @type {import("vue").Ref<import("@/types").ItemFilterFilters>} */
|
|
282
|
+
const currentFilters = ref({});
|
|
283
|
+
|
|
317
284
|
const hasMultipleItems = computed(() => {
|
|
318
285
|
return eodashCollections.some((ec) => {
|
|
319
286
|
const itemLinks = ec.collectionStac?.links.filter((l) => l.rel === "item");
|
|
@@ -322,6 +289,20 @@ const hasMultipleItems = computed(() => {
|
|
|
322
289
|
});
|
|
323
290
|
});
|
|
324
291
|
|
|
292
|
+
const store = useSTAcStore();
|
|
293
|
+
const { selectedStac, stacEndpoint } = storeToRefs(store);
|
|
294
|
+
const { mosaicEndpoint } = useMosaicState();
|
|
295
|
+
|
|
296
|
+
const isMosaicEnabled = computed(() => __props.useMosaic && !!mosaicEndpoint.value);
|
|
297
|
+
|
|
298
|
+
const scheduleMosaicUpdate = useScheduleMosaicUpdate();
|
|
299
|
+
|
|
300
|
+
useInitMosaic(
|
|
301
|
+
__props.useMosaic ? mosaicEndpoint.value : null,
|
|
302
|
+
selectedRange,
|
|
303
|
+
__props.mosaicIndicators,
|
|
304
|
+
);
|
|
305
|
+
|
|
325
306
|
/**
|
|
326
307
|
* Handles the selection event from the time control component.
|
|
327
308
|
* It finds the closest item to the "from" selected date
|
|
@@ -334,6 +315,17 @@ const onSelect = (e) => {
|
|
|
334
315
|
// Update the selected range with the new dates
|
|
335
316
|
selectedRange.value = date;
|
|
336
317
|
|
|
318
|
+
// if mosaic is enabled, we don't need to find the closest item,
|
|
319
|
+
// we just update the mosaic layer with the new time range and filters
|
|
320
|
+
if (isMosaicEnabled.value) {
|
|
321
|
+
scheduleMosaicUpdate(
|
|
322
|
+
mosaicEndpoint.value,
|
|
323
|
+
selectedRange.value,
|
|
324
|
+
currentFilters.value,
|
|
325
|
+
);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
|
|
337
329
|
const allItems = Object.keys(selectedItems ?? {}).flatMap(
|
|
338
330
|
(id) => selectedItems[id],
|
|
339
331
|
);
|
|
@@ -354,7 +346,18 @@ const onSelect = (e) => {
|
|
|
354
346
|
}
|
|
355
347
|
};
|
|
356
348
|
|
|
357
|
-
|
|
349
|
+
/**
|
|
350
|
+
* Handles filter changes from eox-itemfilter (e.g. cloud cover slider).
|
|
351
|
+
* Updates the mosaic layer with the new filter state.
|
|
352
|
+
*
|
|
353
|
+
* @param {CustomEvent<import("./types").ItemFilterEventDetail>} e
|
|
354
|
+
*/
|
|
355
|
+
const onFilter = (e) => {
|
|
356
|
+
if (!isMosaicEnabled.value) return;
|
|
357
|
+
const { filters } = e.detail;
|
|
358
|
+
currentFilters.value = filters;
|
|
359
|
+
scheduleMosaicUpdate(mosaicEndpoint.value, selectedRange.value, filters);
|
|
360
|
+
};
|
|
358
361
|
|
|
359
362
|
/**
|
|
360
363
|
*
|
|
@@ -402,6 +405,7 @@ return (_ctx, _cache) => {
|
|
|
402
405
|
".for": unref(mapEl),
|
|
403
406
|
onSelect: onSelect,
|
|
404
407
|
titleKey: "title",
|
|
408
|
+
class: "pa-4",
|
|
405
409
|
".externalMapRendering": true,
|
|
406
410
|
".animate": __props.animate,
|
|
407
411
|
".initDate": initDate
|
|
@@ -417,9 +421,11 @@ return (_ctx, _cache) => {
|
|
|
417
421
|
(__props.filters.length)
|
|
418
422
|
? (openBlock(), createElementBlock("eox-itemfilter", {
|
|
419
423
|
key: 0,
|
|
424
|
+
class: "mx-4",
|
|
420
425
|
".inlineMode": true,
|
|
421
426
|
showResults: false,
|
|
422
|
-
".filterProperties": __props.filters
|
|
427
|
+
".filterProperties": __props.filters,
|
|
428
|
+
onFilter: onFilter
|
|
423
429
|
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_3))
|
|
424
430
|
: createCommentVNode("v-if", true),
|
|
425
431
|
createElementVNode("eox-timecontrol-timelapse", { onExport: onExport }, null, 32 /* NEED_HYDRATION */)
|
|
@@ -431,6 +437,6 @@ return (_ctx, _cache) => {
|
|
|
431
437
|
}
|
|
432
438
|
|
|
433
439
|
};
|
|
434
|
-
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-
|
|
440
|
+
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-a90da3dc"]]);
|
|
435
441
|
|
|
436
442
|
export { index as default };
|