@eodash/eodash 5.6.0 → 5.6.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/eodashSTAC/EodashCollection.js +5 -1
- package/core/client/eodashSTAC/helpers.js +4 -4
- package/dist/client/{DashboardLayout-DkKDhfgH.js → DashboardLayout-CqMb7OXc.js} +2 -2
- package/dist/client/{DynamicWebComponent-BrpkA-e3.js → DynamicWebComponent-DqKqTf7l.js} +1 -1
- package/dist/client/{EodashChart-p7_1FRlF.js → EodashChart-PkUQfH0k.js} +4 -4
- package/dist/client/{EodashDatePicker-HK0Jl7wQ.js → EodashDatePicker-DLJGdTtX.js} +3 -3
- package/dist/client/{EodashItemFilter-BYQDA78B.js → EodashItemFilter-Dk8KjFcX.js} +1 -1
- package/dist/client/{EodashLayerControl-NcrNncGn.js → EodashLayerControl-CC1Cogrn.js} +2 -2
- package/dist/client/{EodashLayoutSwitcher-CC2Znd0I.js → EodashLayoutSwitcher-5WZYd6rr.js} +3 -3
- package/dist/client/{EodashMapBtns-BJSh7qT-.js → EodashMapBtns-BHrSDNoC.js} +6 -6
- package/dist/client/{EodashStacInfo-BA-0UjvT.js → EodashStacInfo-B90wobPc.js} +31 -31
- package/dist/client/{EodashTimeSlider-GDv1hbw7.js → EodashTimeSlider-5vm7F3ju.js} +2 -2
- package/dist/client/{EodashTools-CWmoH0g_.js → EodashTools-CGZtTh45.js} +4 -4
- package/dist/client/{ExportState-CfAfX4RN.js → ExportState-Ce0ZnrX_.js} +4 -4
- package/dist/client/{Footer-DLGxQTZt.js → Footer-CnZqEiop.js} +1 -1
- package/dist/client/{Header-eyEyyzD6.js → Header-Dr5PBIm8.js} +2 -2
- package/dist/client/{MobileLayout-RzLOyXwL.js → MobileLayout-DyMjaeif.js} +2 -2
- package/dist/client/{PopUp-WNs6Io2N.js → PopUp-DjvE_71e.js} +2 -2
- package/dist/client/{ProcessList-RzVqbd5E.js → ProcessList-kf3olI7W.js} +4 -4
- package/dist/client/{VImg-GKUTFoV-.js → VImg-Bj6uWt6j.js} +2 -2
- package/dist/client/{VMain-D7_72mHr.js → VMain-Cm0UmKGi.js} +1 -1
- package/dist/client/{VTooltip-BbmvtvYw.js → VTooltip-DbBu-ky3.js} +2 -2
- package/dist/client/{WidgetsContainer-Dw5d7SOW.js → WidgetsContainer-CfLnd44U.js} +1 -1
- package/dist/client/{asWebComponent-DDt7V3Bl.js → asWebComponent-DfULAbpq.js} +13 -9
- package/dist/client/{async-CT3KEV52.js → async-CIbKXEEe.js} +10 -20
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-CVzxyoSq.js → forwardRefs-yj3VWOK5.js} +2 -2
- package/dist/client/{handling-C285F_Mq.js → handling-s8xt2JwF.js} +390 -90
- package/dist/client/{helpers-CZFH0EVN.js → helpers-DAVGYl_f.js} +4 -4
- package/dist/client/{index-B-m7V3Kb.js → index-4TrjfJ32.js} +3 -3
- package/dist/client/{index-B_6H-N14.js → index-Bu8BMA9q.js} +39 -31
- package/dist/client/{index-DgOXD7wd.js → index-CYz6dT7K.js} +2 -2
- package/dist/client/{index-CF3ZMzTz.js → index-CugS__t5.js} +3 -3
- package/dist/client/templates.js +1 -1
- package/dist/client/{transition-C2gnrWg0.js → transition-DaOsiD4u.js} +1 -1
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -2
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +6 -6
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +3 -1
- package/dist/types/widgets/EodashProcess/methods/template-helpers.d.ts +99 -0
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +1 -6
- package/dist/types/widgets/EodashProcess/types.d.ts +1 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +10 -10
- package/package.json +1 -1
- package/widgets/EodashProcess/index.vue +16 -12
- package/widgets/EodashProcess/methods/composables.js +18 -15
- package/widgets/EodashProcess/methods/handling.js +78 -62
- package/widgets/EodashProcess/methods/outputs.js +74 -29
- package/widgets/EodashProcess/methods/template-helpers.js +246 -0
- package/widgets/EodashProcess/methods/utils.js +7 -17
- package/widgets/EodashProcess/types.ts +1 -0
- package/widgets/EodashStacInfo.vue +30 -30
|
@@ -2,14 +2,14 @@ import { onMounted, watch, nextTick, ref, useTemplateRef, computed, openBlock, c
|
|
|
2
2
|
import '@eox/chart';
|
|
3
3
|
import '@eox/drawtools';
|
|
4
4
|
import '@eox/jsonform';
|
|
5
|
-
import { U as eoxLayersKey, N as useOnLayersUpdate, _ as _export_sfc, H as useSTAcStore, J as VBtn } from './asWebComponent-
|
|
5
|
+
import { U as eoxLayersKey, N as useOnLayersUpdate, _ as _export_sfc, H as useSTAcStore, J as VBtn } from './asWebComponent-DfULAbpq.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-
|
|
7
|
+
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-kf3olI7W.js';
|
|
8
|
+
import EodashChart from './EodashChart-PkUQfH0k.js';
|
|
9
|
+
import { i as initProcess, u as updateJsonformIdentifier, h as handleProcesses } from './handling-s8xt2JwF.js';
|
|
10
10
|
import { useEventBus } from '@vueuse/core';
|
|
11
|
-
import { u as updateJobsStatus, d as download, g as
|
|
12
|
-
import { I as compareIndicator, F as indicator, S as mapCompareEl, i as mapEl, M as areChartsSeparateLayout, O as compareChartSpec, N as chartSpec } from './helpers-
|
|
11
|
+
import { u as updateJobsStatus, d as download, g as getDrawToolsProperties } from './async-CIbKXEEe.js';
|
|
12
|
+
import { I as compareIndicator, F as indicator, S as mapCompareEl, i as mapEl, M as areChartsSeparateLayout, O as compareChartSpec, N as chartSpec } from './helpers-DAVGYl_f.js';
|
|
13
13
|
import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -19,7 +19,6 @@ import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
|
|
|
19
19
|
* @async
|
|
20
20
|
* @param {Object} params
|
|
21
21
|
* @param {import("vue").Ref<import("stac-ts").StacCollection | null>} params.selectedStac
|
|
22
|
-
* @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} params.jsonformEl
|
|
23
22
|
* @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema
|
|
24
23
|
* @param {import("vue").Ref<any[]>} params.processResults
|
|
25
24
|
* @param {import("vue").Ref<boolean>} params.isProcessed
|
|
@@ -29,7 +28,6 @@ import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
|
|
|
29
28
|
*/
|
|
30
29
|
const useInitProcess = ({
|
|
31
30
|
selectedStac,
|
|
32
|
-
jsonformEl,
|
|
33
31
|
jsonformSchema,
|
|
34
32
|
isProcessed,
|
|
35
33
|
processResults,
|
|
@@ -45,7 +43,6 @@ const useInitProcess = ({
|
|
|
45
43
|
await initProcess({
|
|
46
44
|
enableCompare: mapElement?.id === "compare",
|
|
47
45
|
selectedStac,
|
|
48
|
-
jsonformEl,
|
|
49
46
|
jsonformSchema,
|
|
50
47
|
isProcessed,
|
|
51
48
|
processResults,
|
|
@@ -57,7 +54,6 @@ const useInitProcess = ({
|
|
|
57
54
|
await initProcess({
|
|
58
55
|
enableCompare: mapElement?.id === "compare",
|
|
59
56
|
selectedStac,
|
|
60
|
-
jsonformEl,
|
|
61
57
|
jsonformSchema,
|
|
62
58
|
isProcessed,
|
|
63
59
|
loading,
|
|
@@ -67,9 +63,8 @@ const useInitProcess = ({
|
|
|
67
63
|
});
|
|
68
64
|
}
|
|
69
65
|
});
|
|
70
|
-
|
|
71
|
-
const evtKey =
|
|
72
|
-
mapElement?.id === "compare" ? "compareLayers:updated" : "layers:updated";
|
|
66
|
+
const enableCompare = mapElement?.id === "compare";
|
|
67
|
+
const evtKey = enableCompare ? "compareLayers:updated" : "layers:updated";
|
|
73
68
|
useOnLayersUpdate(async (evt, _payload) => {
|
|
74
69
|
if (
|
|
75
70
|
evt == "layertime:updated" ||
|
|
@@ -77,19 +72,28 @@ const useInitProcess = ({
|
|
|
77
72
|
evt == "time:updated" ||
|
|
78
73
|
evt == "compareTime:updated"
|
|
79
74
|
) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
75
|
+
const shouldMainJsonFormUpdate =
|
|
76
|
+
["layertime:updated", "time:updated"].includes(evt) && !enableCompare;
|
|
77
|
+
const shouldCompareJsonFormUpdate =
|
|
78
|
+
["compareLayertime:updated", "compareTime:updated"].includes(evt) &&
|
|
79
|
+
enableCompare;
|
|
80
|
+
// we need to update jsonform on time change in cases when the feature selection layer was time-based, so that it attaches to a correct new layer
|
|
81
|
+
if (shouldMainJsonFormUpdate || shouldCompareJsonFormUpdate) {
|
|
82
|
+
const newJsonForm = await updateJsonformIdentifier({
|
|
83
|
+
jsonformSchema: jsonformSchema.value,
|
|
84
|
+
// @ts-expect-error TODO payload coming from time update events is not an object with layers property
|
|
85
|
+
newLayers: _payload,
|
|
86
|
+
enableCompare,
|
|
87
|
+
});
|
|
88
|
+
jsonformSchema.value = newJsonForm;
|
|
89
|
+
}
|
|
85
90
|
}
|
|
86
91
|
if (evt !== evtKey) {
|
|
87
92
|
return;
|
|
88
93
|
}
|
|
89
94
|
await initProcess({
|
|
90
|
-
enableCompare
|
|
95
|
+
enableCompare,
|
|
91
96
|
selectedStac,
|
|
92
|
-
jsonformEl,
|
|
93
97
|
jsonformSchema,
|
|
94
98
|
isProcessed,
|
|
95
99
|
processResults,
|
|
@@ -212,13 +216,15 @@ const currentIndicator = __props.enableCompare ? compareIndicator : indicator;
|
|
|
212
216
|
const currentJobs = __props.enableCompare ? compareJobs : jobs;
|
|
213
217
|
|
|
214
218
|
const jsonformKey = computed(
|
|
215
|
-
() =>
|
|
219
|
+
() =>
|
|
220
|
+
currentIndicator.value +
|
|
221
|
+
mapElement.value?.id +
|
|
222
|
+
JSON.stringify(jsonformSchema.value),
|
|
216
223
|
);
|
|
217
224
|
|
|
218
225
|
useInitProcess({
|
|
219
226
|
selectedStac: currentSelectedStac,
|
|
220
227
|
mapElement: mapElement.value,
|
|
221
|
-
jsonformEl,
|
|
222
228
|
jsonformSchema,
|
|
223
229
|
isProcessed,
|
|
224
230
|
processResults,
|
|
@@ -245,15 +251,17 @@ const downloadResults = () => {
|
|
|
245
251
|
};
|
|
246
252
|
|
|
247
253
|
const startProcess = async () => {
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
const drawToolsProperties = getDrawToolsProperties(jsonformSchema.value);
|
|
255
|
+
|
|
256
|
+
const anyDrawtoolPropertyEmpty = drawToolsProperties.some(
|
|
257
|
+
(drawToolsProperty) =>
|
|
258
|
+
//@ts-expect-error jsonfrom.value is not typed
|
|
259
|
+
Array.isArray(jsonformEl.value?.value[drawToolsProperty]) &&
|
|
260
|
+
//@ts-expect-error jsonfrom.value is not typed
|
|
261
|
+
!jsonformEl.value?.value[drawToolsProperty].length,
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
if (anyDrawtoolPropertyEmpty) {
|
|
257
265
|
isProcessed.value = false;
|
|
258
266
|
const usedChartSpec = __props.enableCompare ? compareChartSpec : chartSpec;
|
|
259
267
|
usedChartSpec.value = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, render, h, mergeProps } from 'vue';
|
|
2
|
-
import { a0 as consoleError, a1 as isObject } from './asWebComponent-
|
|
3
|
-
import { V as VTooltip } from './VTooltip-
|
|
2
|
+
import { a0 as consoleError, a1 as isObject } from './asWebComponent-DfULAbpq.js';
|
|
3
|
+
import { V as VTooltip } from './VTooltip-DbBu-ky3.js';
|
|
4
4
|
|
|
5
5
|
// Utilities
|
|
6
6
|
function useDirectiveComponent(component, props) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, withAsyncContext, useTemplateRef, ref, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, unref, toDisplayString } from 'vue';
|
|
2
|
-
import { H as useSTAcStore, N as useOnLayersUpdate, _ as _export_sfc, O as VRow } from './asWebComponent-
|
|
3
|
-
import { F as indicator, i as mapEl, R as sanitizeBbox, d as axios } from './helpers-
|
|
2
|
+
import { H as useSTAcStore, N as useOnLayersUpdate, _ as _export_sfc, O as VRow } from './asWebComponent-DfULAbpq.js';
|
|
3
|
+
import { F as indicator, i as mapEl, R as sanitizeBbox, d as axios } from './helpers-DAVGYl_f.js';
|
|
4
4
|
import { i as inAndOut } from './easing-CH0-9wR8.js';
|
|
5
5
|
import { mdiViewDashboard } from '@mdi/js';
|
|
6
|
-
import _sfc_main$1 from './EodashLayoutSwitcher-
|
|
6
|
+
import _sfc_main$1 from './EodashLayoutSwitcher-5WZYd6rr.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
*
|
package/dist/client/templates.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mdiViewDashboardVariant, mdiViewDashboard } from '@mdi/js';
|
|
2
|
-
import { P as includesProcess, Q as shouldShowChartWidget } from './helpers-
|
|
2
|
+
import { P as includesProcess, Q as shouldShowChartWidget } from './helpers-DAVGYl_f.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Special values that tell deepmerge to perform a certain action.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeProps, h, TransitionGroup, Transition } from 'vue';
|
|
2
|
-
import { p as propsFactory, a1 as isObject, aH as onlyDefinedProps } from './asWebComponent-
|
|
2
|
+
import { p as propsFactory, a1 as isObject, aH as onlyDefinedProps } from './asWebComponent-DfULAbpq.js';
|
|
3
3
|
|
|
4
4
|
// Utilities
|
|
5
5
|
const makeTransitionProps = propsFactory({
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
* @param {() => Promise<void>} startProcess
|
|
8
8
|
**/
|
|
9
9
|
export function useAutoExec(autoExec: import("vue").Ref<boolean>, jsonformEl: import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>, jsonformSchema: import("vue").Ref<Record<string, any> | null>, startProcess: () => Promise<void>): void;
|
|
10
|
-
export function useInitProcess({ selectedStac,
|
|
10
|
+
export function useInitProcess({ selectedStac, jsonformSchema, isProcessed, processResults, loading, isPolling, mapElement, }: {
|
|
11
11
|
selectedStac: import("vue").Ref<import("stac-ts").StacCollection | null>;
|
|
12
|
-
jsonformEl: import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>;
|
|
13
12
|
jsonformSchema: import("vue").Ref<Record<string, any> | null>;
|
|
14
13
|
processResults: import("vue").Ref<any[]>;
|
|
15
14
|
isProcessed: import("vue").Ref<boolean>;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* @async
|
|
6
6
|
* @param {Object} params
|
|
7
7
|
* @param {import("vue").Ref<import("stac-ts").StacCollection | null>} params.selectedStac
|
|
8
|
-
* @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} params.jsonformEl
|
|
9
8
|
* @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema
|
|
10
9
|
* @param {import("vue").Ref<any[]>} params.processResults
|
|
11
10
|
* @param {import("vue").Ref<boolean>} params.isProcessed
|
|
@@ -13,9 +12,8 @@
|
|
|
13
12
|
* @param {import("vue").Ref<boolean>} params.isPolling
|
|
14
13
|
* @param {boolean} params.enableCompare
|
|
15
14
|
*/
|
|
16
|
-
export function initProcess({ selectedStac,
|
|
15
|
+
export function initProcess({ selectedStac, jsonformSchema, isProcessed, processResults, loading, isPolling, enableCompare, }: {
|
|
17
16
|
selectedStac: import("vue").Ref<import("stac-ts").StacCollection | null>;
|
|
18
|
-
jsonformEl: import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>;
|
|
19
17
|
jsonformSchema: import("vue").Ref<Record<string, any> | null>;
|
|
20
18
|
processResults: import("vue").Ref<any[]>;
|
|
21
19
|
isProcessed: import("vue").Ref<boolean>;
|
|
@@ -31,12 +29,14 @@ export function initProcess({ selectedStac, jsonformEl, jsonformSchema, isProces
|
|
|
31
29
|
* @param {Object} params
|
|
32
30
|
* @param {Record<string,any> | null} params.jsonformSchema params.jsonformSchema
|
|
33
31
|
* @param {Record<string, any>[] | undefined} params.newLayers params.newLayers
|
|
34
|
-
* @
|
|
32
|
+
* @param { boolean } params.enableCompare params.enableCompare
|
|
33
|
+
* @returns {Promise<Record<string,any> | null>} updated jsonform schema
|
|
35
34
|
*/
|
|
36
|
-
export function updateJsonformIdentifier({ jsonformSchema, newLayers }: {
|
|
35
|
+
export function updateJsonformIdentifier({ jsonformSchema, newLayers, enableCompare, }: {
|
|
37
36
|
jsonformSchema: Record<string, any> | null;
|
|
38
37
|
newLayers: Record<string, any>[] | undefined;
|
|
39
|
-
|
|
38
|
+
enableCompare: boolean;
|
|
39
|
+
}): Promise<Record<string, any> | null>;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @param {object} params
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @param {object} options
|
|
3
3
|
* @param {import("stac-ts").StacLink[] | undefined} options.links
|
|
4
4
|
* @param {Record<string,any> | undefined} options.jsonformValue
|
|
5
|
+
* @param {Record<string,any> | undefined} [options.rawJsonformValue]
|
|
5
6
|
* @param {string} options.specUrl
|
|
6
7
|
* @param {(input:import("../../EodashProcess/types").CustomEnpointInput)=>Promise<Record<string,any>[] | undefined | null>} [options.customEndpointsHandler]
|
|
7
8
|
* @param {import("vue").Ref<boolean>} options.isPolling
|
|
@@ -11,9 +12,10 @@
|
|
|
11
12
|
* @param {boolean} [options.enableCompare=false] - Whether to enable compare mode
|
|
12
13
|
* @returns {Promise<[import("vega-embed").VisualizationSpec | null,Record<string,any>|null]>}
|
|
13
14
|
**/
|
|
14
|
-
export function processCharts({ links, jsonformValue, specUrl, customEndpointsHandler, jsonformSchema, selectedStac, isPolling, jobs, enableCompare, }: {
|
|
15
|
+
export function processCharts({ links, jsonformValue, rawJsonformValue, specUrl, customEndpointsHandler, jsonformSchema, selectedStac, isPolling, jobs, enableCompare, }: {
|
|
15
16
|
links: import("stac-ts").StacLink[] | undefined;
|
|
16
17
|
jsonformValue: Record<string, any> | undefined;
|
|
18
|
+
rawJsonformValue?: Record<string, any> | undefined;
|
|
17
19
|
specUrl: string;
|
|
18
20
|
customEndpointsHandler?: ((input: import("../../EodashProcess/types").CustomEnpointInput) => Promise<Record<string, any>[] | undefined | null>) | undefined;
|
|
19
21
|
isPolling: import("vue").Ref<boolean>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns form value keys that match the multiQuery configuration.
|
|
3
|
+
* @param {Record<string, any> | undefined} jsonformValue
|
|
4
|
+
* @param {Record<string, any>} jsonformSchema
|
|
5
|
+
* @returns {string[]}
|
|
6
|
+
*/
|
|
7
|
+
export function getMultiQueryMatches(jsonformValue: Record<string, any> | undefined, jsonformSchema: Record<string, any>): string[];
|
|
8
|
+
/**
|
|
9
|
+
* Extracts iterable scalar values for a multiQuery field.
|
|
10
|
+
* Wraps single values in an array; returns empty array for undefined.
|
|
11
|
+
* @param {string} match - The multiQuery field name
|
|
12
|
+
* @param {Record<string, any>} jsonformValue
|
|
13
|
+
* @returns {any[]}
|
|
14
|
+
*/
|
|
15
|
+
export function getScalarMultiQueryValues(match: string, jsonformValue: Record<string, any>): any[];
|
|
16
|
+
/**
|
|
17
|
+
* Extracts iterable values for a POST multiQuery field.
|
|
18
|
+
* For GeoJSON fields, uses rawJsonformValue to get original Feature objects
|
|
19
|
+
* (before extractGeometries stringifies them). For scalar fields, delegates
|
|
20
|
+
* to getScalarMultiQueryValues.
|
|
21
|
+
* @param {string} match - The multiQuery field name
|
|
22
|
+
* @param {Record<string, any>} jsonformValue - Form values after geometry extraction
|
|
23
|
+
* @param {Record<string, any> | undefined} rawJsonformValue - Form values before geometry extraction
|
|
24
|
+
* @param {Record<string, any>} jsonformSchema
|
|
25
|
+
* @returns {any[]}
|
|
26
|
+
*/
|
|
27
|
+
export function getPostMultiQueryValues(match: string, jsonformValue: Record<string, any>, rawJsonformValue: Record<string, any> | undefined, jsonformSchema: Record<string, any>): any[];
|
|
28
|
+
/**
|
|
29
|
+
* Extracts individual GeoJSON Feature objects from a value that may be
|
|
30
|
+
* a FeatureCollection, a single Feature, or an array of Features.
|
|
31
|
+
* Filters for valid Features with geometry and deduplicates.
|
|
32
|
+
* @param {any} value
|
|
33
|
+
* @returns {Record<string, any>[]}
|
|
34
|
+
*/
|
|
35
|
+
export function getGeoJsonMultiQueryValues(value: any): Record<string, any>[];
|
|
36
|
+
/**
|
|
37
|
+
* Removes duplicate values using JSON serialization as the identity key.
|
|
38
|
+
* @param {any[]} values
|
|
39
|
+
* @returns {any[]}
|
|
40
|
+
*/
|
|
41
|
+
export function dedupeMultiQueryValues(values: any[]): any[];
|
|
42
|
+
/**
|
|
43
|
+
* Builds the Mustache rendering context for one multiQuery iteration.
|
|
44
|
+
* Spreads the full form value, overrides the matched field with the current
|
|
45
|
+
* iteration value, and adds a 1-based `multiQueryIndex`.
|
|
46
|
+
* @param {Record<string, any>} jsonformValue
|
|
47
|
+
* @param {string} match - The multiQuery field name being iterated
|
|
48
|
+
* @param {any} value - The current iteration value
|
|
49
|
+
* @param {number} index - Zero-based iteration index
|
|
50
|
+
* @returns {Record<string, any>}
|
|
51
|
+
*/
|
|
52
|
+
export function createMultiQueryContext(jsonformValue: Record<string, any>, match: string, value: any, index: number): Record<string, any>;
|
|
53
|
+
/**
|
|
54
|
+
* Flattens an array of POST responses into a single values array.
|
|
55
|
+
* Each response that is itself an array is spread; scalars are wrapped.
|
|
56
|
+
* @param {any[]} values
|
|
57
|
+
* @returns {any[]}
|
|
58
|
+
*/
|
|
59
|
+
export function aggregateInlineResponses(values: any[]): any[];
|
|
60
|
+
/**
|
|
61
|
+
* Renders a JSON body template string with the given context.
|
|
62
|
+
* Primary path: parses the template as JSON, then recursively renders each
|
|
63
|
+
* node (preserving object-valued placeholders as raw JSON).
|
|
64
|
+
* Fallback: treats the template as a Mustache string, renders, then parses.
|
|
65
|
+
* @param {string} bodyTemplate - JSON template string (may contain Mustache placeholders)
|
|
66
|
+
* @param {Record<string, any>} context - Values to substitute into the template
|
|
67
|
+
* @returns {any} Parsed JSON body ready for POST
|
|
68
|
+
*/
|
|
69
|
+
export function renderJsonBodyTemplate(bodyTemplate: string, context: Record<string, any>): any;
|
|
70
|
+
/**
|
|
71
|
+
* Recursively renders a parsed JSON template node with context values.
|
|
72
|
+
* - Arrays and objects are traversed recursively.
|
|
73
|
+
* - Exact placeholders (where the entire string value is `"{{path}}"` or
|
|
74
|
+
* `"{{{path}}}"`) are resolved to their original typed value (object, array,
|
|
75
|
+
* number, etc.) instead of being stringified. This is critical for embedding
|
|
76
|
+
* GeoJSON geometry objects in POST bodies.
|
|
77
|
+
* - Partial placeholders and mixed strings use standard Mustache interpolation.
|
|
78
|
+
* @param {any} templateNode
|
|
79
|
+
* @param {Record<string, any>} context
|
|
80
|
+
* @returns {any}
|
|
81
|
+
*/
|
|
82
|
+
export function renderTemplateNode(templateNode: any, context: Record<string, any>): any;
|
|
83
|
+
/**
|
|
84
|
+
* Resolves a dot/bracket-notation path against a context object.
|
|
85
|
+
* Supports paths like `"feature.geometry"` or `"list[0].name"`.
|
|
86
|
+
* @param {Record<string, any>} context
|
|
87
|
+
* @param {string} path
|
|
88
|
+
* @returns {any}
|
|
89
|
+
*/
|
|
90
|
+
export function resolveTemplatePath(context: Record<string, any>, path: string): any;
|
|
91
|
+
/**
|
|
92
|
+
* Deep-clones objects via JSON round-trip to prevent template rendering
|
|
93
|
+
* from mutating the original context values. This also strips non-JSON-
|
|
94
|
+
* serializable properties (e.g. OL Feature methods from drawtools),
|
|
95
|
+
* producing clean plain objects. Primitives pass through.
|
|
96
|
+
* @param {any} value
|
|
97
|
+
* @returns {any}
|
|
98
|
+
*/
|
|
99
|
+
export function cloneTemplateValue(value: any): any;
|
|
@@ -53,11 +53,6 @@ export function creatAsyncProcessLayerDefinitions(processResults: import("../../
|
|
|
53
53
|
* @returns {import("../../EodashProcess/types").AsyncProcessResults}
|
|
54
54
|
*/
|
|
55
55
|
export function extractAsyncResults(resultItem: import("../../EodashProcess/types").EOxHubProcessResults): import("../../EodashProcess/types").AsyncProcessResults;
|
|
56
|
-
/**
|
|
57
|
-
* Updates the jsonform schema to target the compare map
|
|
58
|
-
* @param {Record<string,any> | null | undefined} jsonformSchema
|
|
59
|
-
*/
|
|
60
|
-
export function updateJsonformSchemaTarget(jsonformSchema: Record<string, any> | null | undefined): any;
|
|
61
56
|
export function download(fileName: string, content: string | Record<string, any>): void;
|
|
62
|
-
export function
|
|
57
|
+
export function getDrawToolsProperties(jsonformSchema: any): string[];
|
|
63
58
|
export function applyProcessLayersToMap(mapElement: import("@eox/map").EOxMap | null, processLayers: import("@eox/map").EoxLayer[]): void;
|
|
@@ -13,7 +13,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
13
13
|
* filter?: (item: any) => boolean
|
|
14
14
|
* })[]
|
|
15
15
|
* >}
|
|
16
|
-
|
|
16
|
+
*/
|
|
17
17
|
type: import("vue").PropType<(string | {
|
|
18
18
|
key: string;
|
|
19
19
|
filter?: (item: any) => boolean;
|
|
@@ -28,7 +28,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
28
28
|
* filter?: (item: any) => boolean
|
|
29
29
|
* })[]
|
|
30
30
|
* >}
|
|
31
|
-
|
|
31
|
+
*/
|
|
32
32
|
type: import("vue").PropType<(string | {
|
|
33
33
|
key: string;
|
|
34
34
|
filter?: (item: any) => boolean;
|
|
@@ -43,7 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
43
43
|
* filter?: (item: any) => boolean
|
|
44
44
|
* })[]
|
|
45
45
|
* >}
|
|
46
|
-
|
|
46
|
+
*/
|
|
47
47
|
type: import("vue").PropType<(string | {
|
|
48
48
|
key: string;
|
|
49
49
|
filter?: (item: any) => boolean;
|
|
@@ -58,7 +58,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
58
58
|
* filter?: (item: any) => boolean
|
|
59
59
|
* })[]
|
|
60
60
|
* >}
|
|
61
|
-
|
|
61
|
+
*/
|
|
62
62
|
type: import("vue").PropType<(string | {
|
|
63
63
|
key: string;
|
|
64
64
|
filter?: (item: any) => boolean;
|
|
@@ -73,7 +73,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
73
73
|
* filter?: (item: any) => boolean
|
|
74
74
|
* })[]
|
|
75
75
|
* >}
|
|
76
|
-
|
|
76
|
+
*/
|
|
77
77
|
type: import("vue").PropType<(string | {
|
|
78
78
|
key: string;
|
|
79
79
|
filter?: (item: any) => boolean;
|
|
@@ -93,7 +93,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
93
93
|
* filter?: (item: any) => boolean
|
|
94
94
|
* })[]
|
|
95
95
|
* >}
|
|
96
|
-
|
|
96
|
+
*/
|
|
97
97
|
type: import("vue").PropType<(string | {
|
|
98
98
|
key: string;
|
|
99
99
|
filter?: (item: any) => boolean;
|
|
@@ -108,7 +108,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
108
108
|
* filter?: (item: any) => boolean
|
|
109
109
|
* })[]
|
|
110
110
|
* >}
|
|
111
|
-
|
|
111
|
+
*/
|
|
112
112
|
type: import("vue").PropType<(string | {
|
|
113
113
|
key: string;
|
|
114
114
|
filter?: (item: any) => boolean;
|
|
@@ -123,7 +123,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
123
123
|
* filter?: (item: any) => boolean
|
|
124
124
|
* })[]
|
|
125
125
|
* >}
|
|
126
|
-
|
|
126
|
+
*/
|
|
127
127
|
type: import("vue").PropType<(string | {
|
|
128
128
|
key: string;
|
|
129
129
|
filter?: (item: any) => boolean;
|
|
@@ -138,7 +138,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
138
138
|
* filter?: (item: any) => boolean
|
|
139
139
|
* })[]
|
|
140
140
|
* >}
|
|
141
|
-
|
|
141
|
+
*/
|
|
142
142
|
type: import("vue").PropType<(string | {
|
|
143
143
|
key: string;
|
|
144
144
|
filter?: (item: any) => boolean;
|
|
@@ -153,7 +153,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
153
153
|
* filter?: (item: any) => boolean
|
|
154
154
|
* })[]
|
|
155
155
|
* >}
|
|
156
|
-
|
|
156
|
+
*/
|
|
157
157
|
type: import("vue").PropType<(string | {
|
|
158
158
|
key: string;
|
|
159
159
|
filter?: (item: any) => boolean;
|
package/package.json
CHANGED
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
compareChartSpec,
|
|
61
61
|
areChartsSeparateLayout,
|
|
62
62
|
} from "@/store/states";
|
|
63
|
-
import { download,
|
|
63
|
+
import { download, getDrawToolsProperties } from "./methods/utils";
|
|
64
64
|
import { compareJobs, jobs } from "./states";
|
|
65
65
|
import { mdiCogPlayOutline, mdiDownloadCircleOutline } from "@mdi/js";
|
|
66
66
|
|
|
@@ -111,13 +111,15 @@ const currentIndicator = enableCompare ? compareIndicator : indicator;
|
|
|
111
111
|
const currentJobs = enableCompare ? compareJobs : jobs;
|
|
112
112
|
|
|
113
113
|
const jsonformKey = computed(
|
|
114
|
-
() =>
|
|
114
|
+
() =>
|
|
115
|
+
currentIndicator.value +
|
|
116
|
+
mapElement.value?.id +
|
|
117
|
+
JSON.stringify(jsonformSchema.value),
|
|
115
118
|
);
|
|
116
119
|
|
|
117
120
|
useInitProcess({
|
|
118
121
|
selectedStac: currentSelectedStac,
|
|
119
122
|
mapElement: mapElement.value,
|
|
120
|
-
jsonformEl,
|
|
121
123
|
jsonformSchema,
|
|
122
124
|
isProcessed,
|
|
123
125
|
processResults,
|
|
@@ -144,15 +146,17 @@ const downloadResults = () => {
|
|
|
144
146
|
};
|
|
145
147
|
|
|
146
148
|
const startProcess = async () => {
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
149
|
+
const drawToolsProperties = getDrawToolsProperties(jsonformSchema.value);
|
|
150
|
+
|
|
151
|
+
const anyDrawtoolPropertyEmpty = drawToolsProperties.some(
|
|
152
|
+
(drawToolsProperty) =>
|
|
153
|
+
//@ts-expect-error jsonfrom.value is not typed
|
|
154
|
+
Array.isArray(jsonformEl.value?.value[drawToolsProperty]) &&
|
|
155
|
+
//@ts-expect-error jsonfrom.value is not typed
|
|
156
|
+
!jsonformEl.value?.value[drawToolsProperty].length,
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
if (anyDrawtoolPropertyEmpty) {
|
|
156
160
|
isProcessed.value = false;
|
|
157
161
|
const usedChartSpec = enableCompare ? compareChartSpec : chartSpec;
|
|
158
162
|
usedChartSpec.value = null;
|
|
@@ -3,7 +3,6 @@ import { useEventBus } from "@vueuse/core";
|
|
|
3
3
|
import { nextTick, onMounted, watch } from "vue";
|
|
4
4
|
import { eoxLayersKey } from "@/utils/keys";
|
|
5
5
|
import { useOnLayersUpdate } from "@/composables";
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Composable resposible of timing the Initialization of the process
|
|
9
8
|
*
|
|
@@ -11,7 +10,6 @@ import { useOnLayersUpdate } from "@/composables";
|
|
|
11
10
|
* @async
|
|
12
11
|
* @param {Object} params
|
|
13
12
|
* @param {import("vue").Ref<import("stac-ts").StacCollection | null>} params.selectedStac
|
|
14
|
-
* @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} params.jsonformEl
|
|
15
13
|
* @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema
|
|
16
14
|
* @param {import("vue").Ref<any[]>} params.processResults
|
|
17
15
|
* @param {import("vue").Ref<boolean>} params.isProcessed
|
|
@@ -21,7 +19,6 @@ import { useOnLayersUpdate } from "@/composables";
|
|
|
21
19
|
*/
|
|
22
20
|
export const useInitProcess = ({
|
|
23
21
|
selectedStac,
|
|
24
|
-
jsonformEl,
|
|
25
22
|
jsonformSchema,
|
|
26
23
|
isProcessed,
|
|
27
24
|
processResults,
|
|
@@ -37,7 +34,6 @@ export const useInitProcess = ({
|
|
|
37
34
|
await initProcess({
|
|
38
35
|
enableCompare: mapElement?.id === "compare",
|
|
39
36
|
selectedStac,
|
|
40
|
-
jsonformEl,
|
|
41
37
|
jsonformSchema,
|
|
42
38
|
isProcessed,
|
|
43
39
|
processResults,
|
|
@@ -49,7 +45,6 @@ export const useInitProcess = ({
|
|
|
49
45
|
await initProcess({
|
|
50
46
|
enableCompare: mapElement?.id === "compare",
|
|
51
47
|
selectedStac,
|
|
52
|
-
jsonformEl,
|
|
53
48
|
jsonformSchema,
|
|
54
49
|
isProcessed,
|
|
55
50
|
loading,
|
|
@@ -59,9 +54,8 @@ export const useInitProcess = ({
|
|
|
59
54
|
});
|
|
60
55
|
}
|
|
61
56
|
});
|
|
62
|
-
|
|
63
|
-
const evtKey =
|
|
64
|
-
mapElement?.id === "compare" ? "compareLayers:updated" : "layers:updated";
|
|
57
|
+
const enableCompare = mapElement?.id === "compare";
|
|
58
|
+
const evtKey = enableCompare ? "compareLayers:updated" : "layers:updated";
|
|
65
59
|
useOnLayersUpdate(async (evt, _payload) => {
|
|
66
60
|
if (
|
|
67
61
|
evt == "layertime:updated" ||
|
|
@@ -69,19 +63,28 @@ export const useInitProcess = ({
|
|
|
69
63
|
evt == "time:updated" ||
|
|
70
64
|
evt == "compareTime:updated"
|
|
71
65
|
) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
const shouldMainJsonFormUpdate =
|
|
67
|
+
["layertime:updated", "time:updated"].includes(evt) && !enableCompare;
|
|
68
|
+
const shouldCompareJsonFormUpdate =
|
|
69
|
+
["compareLayertime:updated", "compareTime:updated"].includes(evt) &&
|
|
70
|
+
enableCompare;
|
|
71
|
+
// we need to update jsonform on time change in cases when the feature selection layer was time-based, so that it attaches to a correct new layer
|
|
72
|
+
if (shouldMainJsonFormUpdate || shouldCompareJsonFormUpdate) {
|
|
73
|
+
const newJsonForm = await updateJsonformIdentifier({
|
|
74
|
+
jsonformSchema: jsonformSchema.value,
|
|
75
|
+
// @ts-expect-error TODO payload coming from time update events is not an object with layers property
|
|
76
|
+
newLayers: _payload,
|
|
77
|
+
enableCompare,
|
|
78
|
+
});
|
|
79
|
+
jsonformSchema.value = newJsonForm;
|
|
80
|
+
}
|
|
77
81
|
}
|
|
78
82
|
if (evt !== evtKey) {
|
|
79
83
|
return;
|
|
80
84
|
}
|
|
81
85
|
await initProcess({
|
|
82
|
-
enableCompare
|
|
86
|
+
enableCompare,
|
|
83
87
|
selectedStac,
|
|
84
|
-
jsonformEl,
|
|
85
88
|
jsonformSchema,
|
|
86
89
|
isProcessed,
|
|
87
90
|
processResults,
|