@eodash/eodash 5.7.0 → 5.8.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.
- 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 +87 -24
- package/core/client/eodashSTAC/cql.js +64 -0
- package/core/client/eodashSTAC/createLayers.js +353 -187
- package/core/client/eodashSTAC/helpers.js +694 -110
- package/core/client/eodashSTAC/mosaic.js +422 -0
- package/core/client/plugins/axios.js +31 -1
- package/core/client/store/actions.js +1 -1
- package/core/client/store/stac.js +54 -4
- package/core/client/store/states.js +20 -2
- package/core/client/types.ts +152 -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-DEs4f_Vy.js} +2 -2
- package/dist/client/{DynamicWebComponent-CnKhYo0K.js → DynamicWebComponent-PvnV88BA.js} +1 -1
- package/dist/client/EodashChart-D-3AGKZY.js +260 -0
- package/dist/client/{EodashDatePicker-CMPDT-ce.js → EodashDatePicker-Dm_goZzs.js} +3 -3
- package/dist/client/{EodashItemFilter-BpdA8QQa.js → EodashItemFilter-CJy3zYzD.js} +2 -1
- package/dist/client/{EodashLayerControl-BHpDA4_0.js → EodashLayerControl-rL8UnpkA.js} +55 -33
- package/dist/client/{EodashLayoutSwitcher-B1fRUt7G.js → EodashLayoutSwitcher-ZRlESI9O.js} +3 -3
- package/dist/client/{EodashMapBtns-Cpned0tc.js → EodashMapBtns-CG7u2Aq8.js} +227 -112
- package/dist/client/EodashStacInfo-CJhhxthD.js +169 -0
- package/dist/client/{EodashTools-1zHz26gv.js → EodashTools-CWyK8QJT.js} +4 -4
- package/dist/client/{ExportState-DbOm8hBI.js → ExportState-BXhy5TOU.js} +20 -174
- package/dist/client/{Footer-BKg-VVkj.js → Footer-DZPvnhcT.js} +1 -1
- package/dist/client/{Header-DCrwCvmY.js → Header-CiGsDE_a.js} +2 -2
- package/dist/client/{MobileLayout-vWSHpluo.js → MobileLayout-BJHW7x5V.js} +2 -2
- package/dist/client/{PopUp-9uimfK49.js → PopUp-7_XnhvCc.js} +4 -168
- package/dist/client/{ProcessList-CTTIZa06.js → ProcessList-LL_UCbvc.js} +5 -5
- package/dist/client/VDivider-DWYM0WUr.js +168 -0
- package/dist/client/{VImg-CrmB76ZY.js → VImg-B75dgw2K.js} +2 -2
- package/dist/client/{VMain-OKZNpcEG.js → VMain-DvMmOL4f.js} +1 -1
- package/dist/client/{VTooltip-CJw2FyWk.js → VTooltip-ClWHUmWL.js} +2 -2
- package/dist/client/{WidgetsContainer-BaWOnE5R.js → WidgetsContainer-BqaWs4ch.js} +1 -1
- package/dist/client/{asWebComponent-BHWpMuE3.js → asWebComponent-IZanwL-A.js} +677 -379
- package/dist/client/{async-DSKj6g1f.js → async-CiNIOBVz.js} +31 -29
- package/dist/client/{create-layers-config-CBoYedqB.js → create-layers-config-3S3y_kZg.js} +17 -17
- package/dist/client/dialog-transition-c4ZSnzac.js +170 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-DH51zPUr.js → forwardRefs-B-c1_6yo.js} +8 -87
- package/dist/client/{handling-BrcDDlgS.js → handling-NvY8Csry.js} +3 -4
- package/dist/client/{helpers-DjZVl_WF.js → helpers-BFuh19CP.js} +1094 -194
- package/dist/client/{index-1JKE68n3.js → index-1wMAyuNL.js} +219 -67
- package/dist/client/{index-CSG_JoOA.js → index-B8jGJSTA.js} +62 -56
- package/dist/client/{index-Cu3-13Xg.js → index-BKQQJkhy.js} +167 -61
- package/dist/client/index-D0jUyol8.js +3167 -0
- package/dist/client/{index-CUjl-ZsI.js → index-KGxz5Egv.js} +2 -2
- package/dist/client/mosaic-vHvSuih6.js +459 -0
- package/dist/client/templates.js +251 -121
- package/dist/client/{transition-OHcz5Qq1.js → transition-BkyUsZh_.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 +118 -19
- package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
- package/dist/types/core/client/store/stac.d.ts +38 -8
- package/dist/types/core/client/store/states.d.ts +24 -2
- package/dist/types/core/client/types.d.ts +128 -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 +10 -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/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
- 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 +34 -34
- package/templates/baseConfig.js +37 -6
- package/templates/compare.js +61 -7
- package/templates/expert.js +24 -2
- package/templates/explore.js +12 -5
- package/templates/lite.js +13 -0
- package/widgets/EodashChart.vue +162 -21
- 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 +141 -28
- package/widgets/EodashLayerControl.vue +51 -25
- package/widgets/EodashMap/EodashMapBtns.vue +109 -48
- package/widgets/EodashMap/index.vue +91 -105
- package/widgets/EodashMap/methods/btns.js +64 -31
- 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 +58 -0
- package/widgets/EodashProcess/index.vue +136 -16
- package/widgets/EodashProcess/methods/composables.js +13 -0
- package/widgets/EodashProcess/methods/outputs.js +0 -1
- package/widgets/EodashProcess/methods/utils.js +29 -27
- 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/widgets/ExportState.vue +13 -4
- package/dist/client/EodashChart-CLDqE93C.js +0 -144
- package/dist/client/EodashStacInfo-BQspAHKH.js +0 -107
- package/dist/client/index-5Jhsa8Xe.js +0 -570
|
@@ -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 { W as eodashCollections, ak as removeLayers, a3 as sanitizeBbox, g as axios, q as mapEl, F as getLayers, L as datetime } from './helpers-BFuh19CP.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-IZanwL-A.js';
|
|
7
|
+
import { c as createLayersConfig } from './create-layers-config-3S3y_kZg.js';
|
|
8
|
+
import { b as buildCqlFilter, u as useMosaicState, a as useScheduleMosaicUpdate, c as useInitMosaic } from './mosaic-vHvSuih6.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 };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { onMounted, watch, nextTick, onUnmounted, ref, useTemplateRef, computed, openBlock, createElementBlock, createVNode, unref, createCommentVNode, createBlock,
|
|
1
|
+
import { onMounted, watch, nextTick, onUnmounted, ref, useTemplateRef, computed, openBlock, createElementBlock, createElementVNode, createVNode, unref, createCommentVNode, createBlock, withCtx, createTextVNode } from 'vue';
|
|
2
2
|
import '@eox/chart';
|
|
3
3
|
import '@eox/drawtools';
|
|
4
4
|
import '@eox/jsonform';
|
|
5
|
-
import {
|
|
5
|
+
import { L as useOnLayersUpdate, _ as _export_sfc, H as useSTAcStore, J as VBtn } from './asWebComponent-IZanwL-A.js';
|
|
6
6
|
import { storeToRefs } from 'pinia';
|
|
7
|
-
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-
|
|
8
|
-
import EodashChart from './EodashChart-
|
|
9
|
-
import { i as initProcess, u as updateJsonformIdentifier, h as handleProcesses } from './handling-
|
|
10
|
-
import {
|
|
11
|
-
import { u as updateJobsStatus, d as download, g as getDrawToolsProperties } from './async-
|
|
7
|
+
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-LL_UCbvc.js';
|
|
8
|
+
import EodashChart from './EodashChart-D-3AGKZY.js';
|
|
9
|
+
import { i as initProcess, u as updateJsonformIdentifier, h as handleProcesses } from './handling-NvY8Csry.js';
|
|
10
|
+
import { ag as getCompareLayers, F as getLayers, U as compareIndicator, Q as indicator, a5 as mapCompareEl, q as mapEl, Z as areChartsSeparateLayout, $ as compareChartSpec, _ as chartSpec } from './helpers-BFuh19CP.js';
|
|
11
|
+
import { u as updateJobsStatus, d as download, g as getDrawToolsProperties } from './async-CiNIOBVz.js';
|
|
12
12
|
import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -68,6 +68,19 @@ const useInitProcess = ({
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
if (newJsonForm) {
|
|
71
|
+
// Layer rebuilds strip drawtools' selection interactions; remount
|
|
72
|
+
// the form so initSelection re-attaches them.
|
|
73
|
+
const selectionStripped =
|
|
74
|
+
Object.values(newJsonForm.properties ?? {}).some(
|
|
75
|
+
(p) => p?.options?.drawtools?.layerId,
|
|
76
|
+
) &&
|
|
77
|
+
!mapElement.value?.selectInteractions?.[
|
|
78
|
+
"SelectLayerClickInteraction"
|
|
79
|
+
];
|
|
80
|
+
if (selectionStripped) {
|
|
81
|
+
jsonformSchema.value = null;
|
|
82
|
+
await nextTick();
|
|
83
|
+
}
|
|
71
84
|
jsonformSchema.value = newJsonForm;
|
|
72
85
|
}
|
|
73
86
|
}
|
|
@@ -140,14 +153,18 @@ function useAutoExec(
|
|
|
140
153
|
});
|
|
141
154
|
}
|
|
142
155
|
|
|
143
|
-
const _style_0 = "eox-jsonform{padding
|
|
156
|
+
const _style_0 = "eox-jsonform{padding:0 12px;min-height:0px;flex-shrink:0}.bg-surface:has(.eodash-process-container){height:calc(100% - 30px);overflow:hidden}.eodash-process-container{height:100%;display:flex;flex-direction:column;overflow:hidden}.eodash-process-content{flex-grow:1;overflow-y:auto;display:flex;flex-direction:column}.eodash-process-actions{text-align:right;padding:4px 12px;flex-shrink:0;border-top:1px solid rgba(0,0,0,.1);background:inherit}";
|
|
144
157
|
|
|
145
158
|
const _hoisted_1 = {
|
|
146
159
|
ref: "container",
|
|
147
|
-
class: "
|
|
160
|
+
class: "eodash-process-container"
|
|
161
|
+
};
|
|
162
|
+
const _hoisted_2 = { class: "eodash-process-content" };
|
|
163
|
+
const _hoisted_3 = [".schema"];
|
|
164
|
+
const _hoisted_4 = {
|
|
165
|
+
key: 0,
|
|
166
|
+
class: "eodash-process-actions"
|
|
148
167
|
};
|
|
149
|
-
const _hoisted_2 = [".schema"];
|
|
150
|
-
const _hoisted_3 = { class: "text-right" };
|
|
151
168
|
|
|
152
169
|
|
|
153
170
|
const _sfc_main = {
|
|
@@ -158,6 +175,7 @@ const _sfc_main = {
|
|
|
158
175
|
default: false,
|
|
159
176
|
},
|
|
160
177
|
vegaEmbedOptions: {
|
|
178
|
+
/** @type {import("vue").PropType<import("vega-embed").EmbedOptions>} */
|
|
161
179
|
type: Object,
|
|
162
180
|
default() {
|
|
163
181
|
return { actions: true };
|
|
@@ -178,6 +196,90 @@ const jsonformEl =
|
|
|
178
196
|
useTemplateRef("jsonformEl")
|
|
179
197
|
);
|
|
180
198
|
|
|
199
|
+
// Inject custom styles into the eox-jsonform shadow DOM to make eox-drawtools inline
|
|
200
|
+
watch(jsonformEl, (el) => {
|
|
201
|
+
if (el && el.shadowRoot) {
|
|
202
|
+
const styleId = "eodash-drawtools-inline-style";
|
|
203
|
+
if (!el.shadowRoot.getElementById(styleId)) {
|
|
204
|
+
const style = document.createElement("style");
|
|
205
|
+
style.id = styleId;
|
|
206
|
+
style.textContent = `
|
|
207
|
+
/* Compact standard form elements */
|
|
208
|
+
.form-control, .form-group {
|
|
209
|
+
margin-bottom: 8px !important;
|
|
210
|
+
}
|
|
211
|
+
.form-control > label, .form-group > label {
|
|
212
|
+
margin-bottom: 2px !important;
|
|
213
|
+
font-size: 0.9em;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Specific layout for drawtools */
|
|
217
|
+
.form-control:has(eox-drawtools) {
|
|
218
|
+
position: relative;
|
|
219
|
+
padding: 8px 12px !important;
|
|
220
|
+
border: none !important;
|
|
221
|
+
background: transparent !important;
|
|
222
|
+
margin-bottom: 8px !important;
|
|
223
|
+
}
|
|
224
|
+
.form-control:has(eox-drawtools) > label {
|
|
225
|
+
position: absolute;
|
|
226
|
+
left: 12px;
|
|
227
|
+
top: 8px;
|
|
228
|
+
margin: 0 !important;
|
|
229
|
+
width: calc(100% - 180px); /* Give label maximum available width */
|
|
230
|
+
line-height: 1.2;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: flex-start;
|
|
233
|
+
padding-top: 8px;
|
|
234
|
+
pointer-events: none; /* Let clicks pass through to buttons if they overlap slightly */
|
|
235
|
+
}
|
|
236
|
+
.form-control:has(eox-drawtools) > eox-drawtools {
|
|
237
|
+
display: block;
|
|
238
|
+
width: 100%;
|
|
239
|
+
}
|
|
240
|
+
`;
|
|
241
|
+
el.shadowRoot.appendChild(style);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const injectDrawtoolsStyle = () => {
|
|
245
|
+
const drawtools = el?.shadowRoot?.querySelector("eox-drawtools");
|
|
246
|
+
if (drawtools && drawtools.shadowRoot) {
|
|
247
|
+
if (
|
|
248
|
+
!drawtools.shadowRoot.getElementById("eodash-drawtools-indent-style")
|
|
249
|
+
) {
|
|
250
|
+
const dtStyle = document.createElement("style");
|
|
251
|
+
dtStyle.id = "eodash-drawtools-indent-style";
|
|
252
|
+
dtStyle.textContent = `
|
|
253
|
+
eox-drawtools-controller {
|
|
254
|
+
display: flex;
|
|
255
|
+
justify-content: flex-end; /* Push buttons to the right */
|
|
256
|
+
min-height: 40px;
|
|
257
|
+
width: 100%;
|
|
258
|
+
}
|
|
259
|
+
eox-drawtools-list {
|
|
260
|
+
display: block;
|
|
261
|
+
margin-top: 10px;
|
|
262
|
+
width: 100%;
|
|
263
|
+
}
|
|
264
|
+
`;
|
|
265
|
+
drawtools.shadowRoot.appendChild(dtStyle);
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return false;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
if (!injectDrawtoolsStyle()) {
|
|
273
|
+
const observer = new MutationObserver(() => {
|
|
274
|
+
if (injectDrawtoolsStyle()) {
|
|
275
|
+
observer.disconnect();
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
observer.observe(el.shadowRoot, { childList: true, subtree: true });
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
|
|
181
283
|
const isAsync = computed(
|
|
182
284
|
() =>
|
|
183
285
|
selectedStac.value?.links.filter((l) => l.endpoint === "eoxhub_workspaces")
|
|
@@ -281,59 +383,63 @@ return (_ctx, _cache) => {
|
|
|
281
383
|
|
|
282
384
|
|
|
283
385
|
return (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
(!unref(areChartsSeparateLayout))
|
|
297
|
-
? (openBlock(), createBlock(EodashChart, {
|
|
298
|
-
key: 1,
|
|
299
|
-
"vega-embed-options": __props.vegaEmbedOptions,
|
|
300
|
-
"enable-compare": __props.enableCompare
|
|
301
|
-
}, null, 8 /* PROPS */, ["vega-embed-options", "enable-compare"]))
|
|
302
|
-
: createCommentVNode("v-if", true),
|
|
303
|
-
createElementVNode("div", _hoisted_3, [
|
|
304
|
-
(showExecBtn.value)
|
|
305
|
-
? (openBlock(), createBlock(VBtn, {
|
|
306
|
-
key: 0,
|
|
307
|
-
loading: loading.value,
|
|
308
|
-
style: {"margin-right":"8px"},
|
|
309
|
-
"append-icon": [unref(mdiCogPlayOutline)],
|
|
310
|
-
onClick: startProcess,
|
|
311
|
-
density: "comfortable",
|
|
312
|
-
size: "small"
|
|
313
|
-
}, {
|
|
314
|
-
default: withCtx(() => [...(_cache[0] || (_cache[0] = [
|
|
315
|
-
createTextVNode(" Execute ", -1 /* CACHED */)
|
|
316
|
-
]))]),
|
|
317
|
-
_: 1 /* STABLE */
|
|
318
|
-
}, 8 /* PROPS */, ["loading", "append-icon"]))
|
|
386
|
+
createElementVNode("div", _hoisted_2, [
|
|
387
|
+
createVNode(ProcessList, {
|
|
388
|
+
"map-element": unref(mapElement),
|
|
389
|
+
"enable-compare": __props.enableCompare
|
|
390
|
+
}, null, 8 /* PROPS */, ["map-element", "enable-compare"]),
|
|
391
|
+
(jsonformSchema.value)
|
|
392
|
+
? (openBlock(), createElementBlock("eox-jsonform", {
|
|
393
|
+
key: jsonformKey.value,
|
|
394
|
+
ref_key: "jsonformEl",
|
|
395
|
+
ref: jsonformEl,
|
|
396
|
+
".schema": jsonformSchema.value
|
|
397
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_3))
|
|
319
398
|
: createCommentVNode("v-if", true),
|
|
320
|
-
(
|
|
321
|
-
? (openBlock(), createBlock(
|
|
399
|
+
(!unref(areChartsSeparateLayout))
|
|
400
|
+
? (openBlock(), createBlock(EodashChart, {
|
|
322
401
|
key: 1,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
onClick: downloadResults,
|
|
327
|
-
size: "small",
|
|
328
|
-
density: "comfortable"
|
|
329
|
-
}, {
|
|
330
|
-
default: withCtx(() => [...(_cache[1] || (_cache[1] = [
|
|
331
|
-
createTextVNode(" Download ", -1 /* CACHED */)
|
|
332
|
-
]))]),
|
|
333
|
-
_: 1 /* STABLE */
|
|
334
|
-
}, 8 /* PROPS */, ["append-icon"]))
|
|
402
|
+
"vega-embed-options": __props.vegaEmbedOptions,
|
|
403
|
+
"enable-compare": __props.enableCompare
|
|
404
|
+
}, null, 8 /* PROPS */, ["vega-embed-options", "enable-compare"]))
|
|
335
405
|
: createCommentVNode("v-if", true)
|
|
336
|
-
])
|
|
406
|
+
]),
|
|
407
|
+
(showExecBtn.value || (processResults.value.length && isProcessed.value && !isAsync.value))
|
|
408
|
+
? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
409
|
+
(showExecBtn.value)
|
|
410
|
+
? (openBlock(), createBlock(VBtn, {
|
|
411
|
+
key: 0,
|
|
412
|
+
loading: loading.value,
|
|
413
|
+
style: {"margin-right":"8px"},
|
|
414
|
+
"append-icon": [unref(mdiCogPlayOutline)],
|
|
415
|
+
onClick: startProcess,
|
|
416
|
+
density: "comfortable",
|
|
417
|
+
size: "small"
|
|
418
|
+
}, {
|
|
419
|
+
default: withCtx(() => [...(_cache[0] || (_cache[0] = [
|
|
420
|
+
createTextVNode(" Execute ", -1 /* CACHED */)
|
|
421
|
+
]))]),
|
|
422
|
+
_: 1 /* STABLE */
|
|
423
|
+
}, 8 /* PROPS */, ["loading", "append-icon"]))
|
|
424
|
+
: createCommentVNode("v-if", true),
|
|
425
|
+
(processResults.value.length && isProcessed.value && !isAsync.value)
|
|
426
|
+
? (openBlock(), createBlock(VBtn, {
|
|
427
|
+
key: 1,
|
|
428
|
+
color: "primary",
|
|
429
|
+
style: {"margin-right":"8px"},
|
|
430
|
+
"append-icon": [unref(mdiDownloadCircleOutline)],
|
|
431
|
+
onClick: downloadResults,
|
|
432
|
+
size: "small",
|
|
433
|
+
density: "comfortable"
|
|
434
|
+
}, {
|
|
435
|
+
default: withCtx(() => [...(_cache[1] || (_cache[1] = [
|
|
436
|
+
createTextVNode(" Download ", -1 /* CACHED */)
|
|
437
|
+
]))]),
|
|
438
|
+
_: 1 /* STABLE */
|
|
439
|
+
}, 8 /* PROPS */, ["append-icon"]))
|
|
440
|
+
: createCommentVNode("v-if", true)
|
|
441
|
+
]))
|
|
442
|
+
: createCommentVNode("v-if", true)
|
|
337
443
|
], 512 /* NEED_PATCH */))
|
|
338
444
|
}
|
|
339
445
|
}
|