@eodash/eodash 5.0.0-rc.2.5 → 5.0.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/composables/DefineWidgets.js +8 -1
- package/core/client/eodash.js +9 -9
- package/core/client/eodashSTAC/createLayers.js +4 -18
- package/core/client/eodashSTAC/helpers.js +23 -0
- package/core/client/store/stac.js +3 -1
- package/core/client/types.ts +125 -19
- package/core/client/utils/states.js +9 -0
- package/dist/client/{DashboardLayout-BX3Sm_Vx.js → DashboardLayout-CkWvOMOW.js} +2 -2
- package/dist/client/{DynamicWebComponent-BqoHM1np.js → DynamicWebComponent-DYBbpvUK.js} +1 -1
- package/dist/client/{EodashDatePicker-BoWV2vc8.js → EodashDatePicker-CALmW3SI.js} +3 -83
- package/dist/client/{EodashItemFilter-127fZLyK.js → EodashItemFilter-DlQiE713.js} +1 -1
- package/dist/client/{EodashLayerControl-B-pZaizw.js → EodashLayerControl-DEzEbft7.js} +8 -2
- package/dist/client/{EodashLayoutSwitcher-DwexHfOD.js → EodashLayoutSwitcher-CDeCV8F-.js} +2 -2
- package/dist/client/{EodashMapBtns-Jfn3bpWD.js → EodashMapBtns-CktQCfa-.js} +36 -12
- package/dist/client/{EodashStacInfo-STq_bW7S.js → EodashStacInfo-DPPxDkF6.js} +7 -1
- package/dist/client/{EodashTools-uxSuJhVJ.js → EodashTools-CUaL9s4H.js} +5 -4
- package/dist/client/{ExportState-Ckcb6u01.js → ExportState-DjyIZVhl.js} +27 -12
- package/dist/client/{Footer-C8JP-coH.js → Footer-DyL0JoWt.js} +1 -1
- package/dist/client/{Header-Dxx7q9FW.js → Header-B5Dgty9l.js} +3 -3
- package/dist/client/{MobileLayout-BE19Peep.js → MobileLayout-CRsg_5Q4.js} +5 -5
- package/dist/client/{PopUp-D3IyjsN4.js → PopUp-BfB8s_ki.js} +3 -3
- package/dist/client/ProcessList-DTefwQZx.js +484 -0
- package/dist/client/{VImg-BmCNSu3X.js → VImg-FD1WVphJ.js} +2 -2
- package/dist/client/{VMain-eZDKIfmJ.js → VMain-DJKG4SvM.js} +1 -1
- package/dist/client/{VOverlay-BS-E4Z6g.js → VOverlay-BzOdRu9h.js} +15 -6
- package/dist/client/{VTooltip-BMsliOuh.js → VTooltip-CfeefrXI.js} +3 -3
- package/dist/client/{WidgetsContainer-Cl6M5R5c.js → WidgetsContainer-C2TaTdb6.js} +1 -1
- package/dist/client/{asWebComponent-Df8nUiLs.js → asWebComponent-CLhcT715.js} +100 -96
- package/dist/client/eo-dash.css +2 -2
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-lhDuXD-N.js → forwardRefs-Bon_Kku1.js} +9 -9
- package/dist/client/index-4CT7Tz83.js +85 -0
- package/dist/client/{index-Bt5GEGxl.js → index-Bm9cbtx5.js} +1 -1
- package/dist/client/{EodashMap-BSR7_wRA.js → index-CIHH_3dW.js} +101 -80
- package/dist/client/{EodashProcess-CpbZPYBp.js → index-DiGDvTQU.js} +346 -468
- package/dist/client/{transition-DHEuQX4I.js → transition-C5I57hn6.js} +1 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +9 -9
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +3 -2
- package/dist/types/core/client/types.d.ts +83 -17
- package/dist/types/core/client/utils/states.d.ts +7 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +4 -4
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +18 -18
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +2 -2
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +2 -2
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +9 -0
- package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -0
- package/dist/types/widgets/EodashMapBtns.vue.d.ts +8 -2
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +2 -0
- package/dist/types/widgets/EodashProcess/methods/async.d.ts +45 -0
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +19 -0
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +78 -0
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +54 -0
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +42 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +12 -12
- package/dist/types/widgets/EodashTools.vue.d.ts +44 -6
- package/dist/types/widgets/PopUp.vue.d.ts +4 -4
- package/package.json +27 -27
- package/widgets/EodashLayerControl.vue +8 -1
- package/widgets/{EodashMap.vue → EodashMap/index.vue} +51 -31
- package/widgets/EodashMap/methods/create-layers-config.js +151 -0
- package/{core/client/composables/EodashMap.js → widgets/EodashMap/methods/index.js} +4 -153
- package/widgets/EodashMapBtns.vue +33 -7
- package/widgets/EodashProcess/ProcessList.vue +82 -0
- package/widgets/EodashProcess/index.vue +186 -0
- package/widgets/EodashProcess/methods/async.js +209 -0
- package/widgets/EodashProcess/methods/composables.js +129 -0
- package/widgets/EodashProcess/methods/handling.js +254 -0
- package/widgets/EodashProcess/methods/outputs.js +216 -0
- package/widgets/EodashProcess/methods/utils.js +138 -0
- package/widgets/EodashStacInfo.vue +6 -0
- package/widgets/EodashTools.vue +1 -0
- package/core/client/composables/EodashProcess.js +0 -654
- package/dist/types/core/client/composables/EodashMap.d.ts +0 -6
- package/dist/types/core/client/composables/EodashProcess.d.ts +0 -162
- package/widgets/EodashProcess.vue +0 -206
- /package/dist/types/widgets/{EodashMap.vue.d.ts → EodashMap/index.vue.d.ts} +0 -0
- /package/dist/types/widgets/{EodashProcess.vue.d.ts → EodashProcess/index.vue.d.ts} +0 -0
package/dist/client/eo-dash.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a$ as EodashConstructor, b0 as register, b1 as store } from './asWebComponent-CLhcT715.js';
|
|
2
2
|
import 'vue';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef, computed, watch } from 'vue';
|
|
2
|
-
import { p as propsFactory,
|
|
2
|
+
import { p as propsFactory, aM as getCurrentInstance } from './asWebComponent-CLhcT715.js';
|
|
3
3
|
|
|
4
4
|
class Box {
|
|
5
5
|
constructor(_ref) {
|
|
@@ -62,16 +62,16 @@ function nullifyTransforms(el) {
|
|
|
62
62
|
let ta, sx, sy, dx, dy;
|
|
63
63
|
if (tx.startsWith('matrix3d(')) {
|
|
64
64
|
ta = tx.slice(9, -1).split(/, /);
|
|
65
|
-
sx =
|
|
66
|
-
sy =
|
|
67
|
-
dx =
|
|
68
|
-
dy =
|
|
65
|
+
sx = Number(ta[0]);
|
|
66
|
+
sy = Number(ta[5]);
|
|
67
|
+
dx = Number(ta[12]);
|
|
68
|
+
dy = Number(ta[13]);
|
|
69
69
|
} else if (tx.startsWith('matrix(')) {
|
|
70
70
|
ta = tx.slice(7, -1).split(/, /);
|
|
71
|
-
sx =
|
|
72
|
-
sy =
|
|
73
|
-
dx =
|
|
74
|
-
dy =
|
|
71
|
+
sx = Number(ta[0]);
|
|
72
|
+
sy = Number(ta[3]);
|
|
73
|
+
dx = Number(ta[4]);
|
|
74
|
+
dy = Number(ta[5]);
|
|
75
75
|
} else {
|
|
76
76
|
return new Box(rect);
|
|
77
77
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { resolveComponent, render, h, mergeProps } from 'vue';
|
|
2
|
+
import { E as isObject, an as consoleError } from './asWebComponent-CLhcT715.js';
|
|
3
|
+
import { V as VTooltip } from './VTooltip-CfeefrXI.js';
|
|
4
|
+
|
|
5
|
+
// Utilities
|
|
6
|
+
function useDirectiveComponent(component, props) {
|
|
7
|
+
const concreteComponent = typeof component === 'string' ? resolveComponent(component) : component;
|
|
8
|
+
const hook = mountComponent(concreteComponent, props);
|
|
9
|
+
return {
|
|
10
|
+
mounted: hook,
|
|
11
|
+
updated: hook,
|
|
12
|
+
unmounted(el) {
|
|
13
|
+
render(null, el);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function mountComponent(component, props) {
|
|
18
|
+
return function (el, binding, vnode) {
|
|
19
|
+
const _props = typeof props === 'function' ? props(binding) : props;
|
|
20
|
+
const text = binding.value?.text ?? binding.value ?? _props?.text;
|
|
21
|
+
const value = isObject(binding.value) ? binding.value : {};
|
|
22
|
+
|
|
23
|
+
// Get the children from the props or directive value, or the element's children
|
|
24
|
+
const children = () => text ?? el.textContent;
|
|
25
|
+
|
|
26
|
+
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
|
27
|
+
// and need to find the nearest parent component instance to inherit provides from
|
|
28
|
+
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
|
29
|
+
const node = h(component, mergeProps(_props, value), children);
|
|
30
|
+
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
|
31
|
+
provides
|
|
32
|
+
});
|
|
33
|
+
render(node, el);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function findComponentParent(vnode, root) {
|
|
37
|
+
// Walk the tree from root until we find the child vnode
|
|
38
|
+
const stack = new Set();
|
|
39
|
+
const walk = children => {
|
|
40
|
+
for (const child of children) {
|
|
41
|
+
if (!child) continue;
|
|
42
|
+
if (child === vnode || child.el && vnode.el && child.el === vnode.el) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
stack.add(child);
|
|
46
|
+
let result;
|
|
47
|
+
if (child.suspense) {
|
|
48
|
+
result = walk([child.ssContent]);
|
|
49
|
+
} else if (Array.isArray(child.children)) {
|
|
50
|
+
result = walk(child.children);
|
|
51
|
+
} else if (child.component?.vnode) {
|
|
52
|
+
result = walk([child.component?.subTree]);
|
|
53
|
+
}
|
|
54
|
+
if (result) {
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
stack.delete(child);
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
if (!walk([root.subTree])) {
|
|
62
|
+
consoleError('Could not find original vnode, component will not inherit provides');
|
|
63
|
+
return root;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Return the first component parent
|
|
67
|
+
const result = Array.from(stack).reverse();
|
|
68
|
+
for (const child of result) {
|
|
69
|
+
if (child.component) {
|
|
70
|
+
return child.component;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return root;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Components
|
|
77
|
+
const Tooltip = useDirectiveComponent(VTooltip, binding => {
|
|
78
|
+
return {
|
|
79
|
+
activator: 'parent',
|
|
80
|
+
location: binding.arg?.replace('-', ' '),
|
|
81
|
+
text: typeof binding.value === 'boolean' ? undefined : binding.value
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export { Tooltip as T };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransitionGroup, Transition, h, camelize } from 'vue';
|
|
2
|
-
import { g as genericComponent, p as propsFactory } from './asWebComponent-
|
|
2
|
+
import { g as genericComponent, p as propsFactory } from './asWebComponent-CLhcT715.js';
|
|
3
3
|
|
|
4
4
|
// Utilities
|
|
5
5
|
const makeTransitionProps = propsFactory({
|
|
@@ -1,56 +1,12 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, watch, nextTick, ref, toRaw, computed, createElementBlock, openBlock, createElementVNode, unref, normalizeStyle } from 'vue';
|
|
2
2
|
import '@eox/map';
|
|
3
3
|
import '@eox/map/src/plugins/advancedLayersAndSources';
|
|
4
|
-
import { a8 as
|
|
4
|
+
import { a8 as EodashCollection, a9 as eoxLayersKey, Z as useSTAcStore, aa as setMapProjFromCol, ab as posIsSetFromUrl, ac as useOnLayersUpdate, ad as mapPosition, a3 as mapEl, a2 as mapCompareEl, Y as datetime, $ as eodashCollections, a6 as layerControlFormValue, a5 as layerControlFormValueCompare, a4 as eodashCompareCollections } from './asWebComponent-CLhcT715.js';
|
|
5
5
|
import { storeToRefs } from 'pinia';
|
|
6
6
|
import log from 'loglevel';
|
|
7
7
|
import { useEventBus } from '@vueuse/core';
|
|
8
8
|
import mustache from 'mustache';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Holder for previous compare map view as it is overwritten by sync
|
|
12
|
-
* @type { import("ol").View | null} mapElement
|
|
13
|
-
*/
|
|
14
|
-
let viewHolder = null;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Handles updating {@link mapPosition} on movement on the map
|
|
18
|
-
*
|
|
19
|
-
* @param {import("vue").Ref<HTMLElement & Record<string,any> & {map:import("ol").Map } | null>} mapElement
|
|
20
|
-
* @param {import("vue").Ref<(number | undefined)[]>} mapPosition
|
|
21
|
-
*/
|
|
22
|
-
const useHandleMapMoveEnd = (mapElement, mapPosition) => {
|
|
23
|
-
/** @type {import("openlayers").EventsListenerFunctionType} */
|
|
24
|
-
const handleMoveEnd = (evt) => {
|
|
25
|
-
const map = /** @type {import("openlayers").Map | undefined} */ (
|
|
26
|
-
/** @type {any} */ (evt).map
|
|
27
|
-
);
|
|
28
|
-
const lonlat = mapElement.value?.lonLatCenter;
|
|
29
|
-
const z = map?.getView().getZoom();
|
|
30
|
-
if (
|
|
31
|
-
lonlat &&
|
|
32
|
-
!Number.isNaN(lonlat[0]) &&
|
|
33
|
-
!Number.isNaN(lonlat[1]) &&
|
|
34
|
-
!Number.isNaN(z)
|
|
35
|
-
) {
|
|
36
|
-
mapPosition.value = [lonlat[0], lonlat[1], z];
|
|
37
|
-
if (posIsSetFromUrl.value) {
|
|
38
|
-
posIsSetFromUrl.value = false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
onMounted(() => {
|
|
44
|
-
/** @type {import('ol/Map').default} */
|
|
45
|
-
(mapElement.value?.map)?.on("moveend", handleMoveEnd);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
onUnmounted(() => {
|
|
49
|
-
/** @type {import('ol/Map').default} */
|
|
50
|
-
(mapElement.value?.map)?.un("moveend", handleMoveEnd);
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
10
|
/**
|
|
55
11
|
* Creates full layer configuration from indicator and time information
|
|
56
12
|
* @param {import("stac-ts").StacCatalog
|
|
@@ -200,12 +156,56 @@ const createLayersConfig = async (
|
|
|
200
156
|
return layersCollection;
|
|
201
157
|
};
|
|
202
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Holder for previous compare map view as it is overwritten by sync
|
|
161
|
+
* @type { import("ol").View | null} mapElement
|
|
162
|
+
*/
|
|
163
|
+
let viewHolder = null;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Handles updating {@link mapPosition} on movement on the map
|
|
167
|
+
*
|
|
168
|
+
* @param {import("vue").Ref<HTMLElement & Record<string,any> & {map:import("ol").Map } | null>} mapElement
|
|
169
|
+
* @param {import("vue").Ref<(number | undefined)[]>} mapPosition
|
|
170
|
+
*/
|
|
171
|
+
const useHandleMapMoveEnd = (mapElement, mapPosition) => {
|
|
172
|
+
/** @type {import("openlayers").EventsListenerFunctionType} */
|
|
173
|
+
const handleMoveEnd = (evt) => {
|
|
174
|
+
const map = /** @type {import("openlayers").Map | undefined} */ (
|
|
175
|
+
/** @type {any} */ (evt).map
|
|
176
|
+
);
|
|
177
|
+
const lonlat = mapElement.value?.lonLatCenter;
|
|
178
|
+
const z = map?.getView().getZoom();
|
|
179
|
+
if (
|
|
180
|
+
lonlat &&
|
|
181
|
+
!Number.isNaN(lonlat[0]) &&
|
|
182
|
+
!Number.isNaN(lonlat[1]) &&
|
|
183
|
+
!Number.isNaN(z)
|
|
184
|
+
) {
|
|
185
|
+
mapPosition.value = [lonlat[0], lonlat[1], z];
|
|
186
|
+
if (posIsSetFromUrl.value) {
|
|
187
|
+
posIsSetFromUrl.value = false;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
onMounted(() => {
|
|
193
|
+
/** @type {import('ol/Map').default} */
|
|
194
|
+
(mapElement.value?.map)?.on("moveend", handleMoveEnd);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
onUnmounted(() => {
|
|
198
|
+
/** @type {import('ol/Map').default} */
|
|
199
|
+
(mapElement.value?.map)?.un("moveend", handleMoveEnd);
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
|
|
203
203
|
/**
|
|
204
204
|
* Initializes the map and updates it based on changes in the selected indicator and datetime,
|
|
205
205
|
*
|
|
206
206
|
* @param {import("vue").Ref<import("@eox/map").EOxMap| null>} mapElement
|
|
207
207
|
* @param {import("vue").Ref<import("stac-ts").StacCollection | null>} selectedIndicator
|
|
208
|
-
* @param {EodashCollection[]} eodashCols
|
|
208
|
+
* @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCols
|
|
209
209
|
* @param {import("vue").Ref<string>} datetime
|
|
210
210
|
* @param {import("vue").Ref<Record<string,any>[]>} mapLayers
|
|
211
211
|
* @param {import("vue").Ref<import("@eox/map").EOxMap| null>} partnerMap
|
|
@@ -363,7 +363,7 @@ const useInitMap = (
|
|
|
363
363
|
};
|
|
364
364
|
/**
|
|
365
365
|
*
|
|
366
|
-
* @param {EodashCollection[]} eodashCols
|
|
366
|
+
* @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCols
|
|
367
367
|
* @param {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"],undefined>>} tooltipProperties
|
|
368
368
|
*/
|
|
369
369
|
const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
|
|
@@ -394,11 +394,13 @@ function inAndOut(t) {
|
|
|
394
394
|
|
|
395
395
|
const _hoisted_1 = [".enabled"];
|
|
396
396
|
const _hoisted_2 = [".center", ".zoom", ".layers"];
|
|
397
|
-
const _hoisted_3 = [".
|
|
397
|
+
const _hoisted_3 = [".propertyTransform"];
|
|
398
|
+
const _hoisted_4 = [".layers"];
|
|
399
|
+
const _hoisted_5 = [".propertyTransform"];
|
|
398
400
|
|
|
399
401
|
|
|
400
402
|
const _sfc_main = {
|
|
401
|
-
__name: '
|
|
403
|
+
__name: 'index',
|
|
402
404
|
props: {
|
|
403
405
|
enableCompare: {
|
|
404
406
|
type: Boolean,
|
|
@@ -425,6 +427,8 @@ const props = __props;
|
|
|
425
427
|
|
|
426
428
|
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
427
429
|
const tooltipProperties = ref([]);
|
|
430
|
+
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
431
|
+
const compareTooltipProperties = ref([]);
|
|
428
432
|
/** @type {import("@eox/map").EOxMap["controls"]} */
|
|
429
433
|
const controls = {
|
|
430
434
|
Attribution: {
|
|
@@ -496,6 +500,8 @@ onMounted(() => {
|
|
|
496
500
|
eoxMap,
|
|
497
501
|
false,
|
|
498
502
|
);
|
|
503
|
+
|
|
504
|
+
useUpdateTooltipProperties(eodashCollections, compareTooltipProperties);
|
|
499
505
|
}
|
|
500
506
|
|
|
501
507
|
useInitMap(
|
|
@@ -512,35 +518,50 @@ onMounted(() => {
|
|
|
512
518
|
|
|
513
519
|
useUpdateTooltipProperties(eodashCollections, tooltipProperties);
|
|
514
520
|
|
|
515
|
-
const
|
|
521
|
+
const mainTooltipStyles = computed(() => ({
|
|
516
522
|
visibility: tooltipProperties.value.length ? "visible" : "hidden",
|
|
517
523
|
}));
|
|
524
|
+
|
|
525
|
+
const compareTooltipStyles = computed(() => ({
|
|
526
|
+
visibility: compareTooltipProperties.value.length ? "visible" : "hidden",
|
|
527
|
+
}));
|
|
518
528
|
/**
|
|
519
|
-
* @param {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
+
* @param {"main" | "compare"} map
|
|
530
|
+
**/
|
|
531
|
+
const tooltipPropertyTransform = (map) => {
|
|
532
|
+
const tooltipProps =
|
|
533
|
+
map === "main" ? tooltipProperties : compareTooltipProperties;
|
|
534
|
+
const layerControlFormVal =
|
|
535
|
+
map == "main" ? layerControlFormValue : layerControlFormValueCompare;
|
|
536
|
+
/**
|
|
537
|
+
* @param {{key:string; value:string}} param
|
|
538
|
+
* @returns {{key:string; value?:string} | undefined}
|
|
539
|
+
*/
|
|
540
|
+
return (param) => {
|
|
541
|
+
/** @type {typeof tooltipProps.value} */
|
|
542
|
+
const updatedProperties = JSON.parse(
|
|
543
|
+
mustache.render(JSON.stringify(tooltipProps.value), {
|
|
544
|
+
...(layerControlFormVal.value ?? {}),
|
|
545
|
+
}),
|
|
546
|
+
);
|
|
529
547
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
548
|
+
const tooltipProp = updatedProperties?.find(
|
|
549
|
+
(prop) => prop.id === param.key,
|
|
550
|
+
);
|
|
551
|
+
if (!tooltipProp) {
|
|
552
|
+
return undefined;
|
|
553
|
+
}
|
|
554
|
+
if (typeof param.value === "object") {
|
|
555
|
+
param.value = JSON.stringify(param.value);
|
|
556
|
+
}
|
|
557
|
+
if (!isNaN(Number(param.value))) {
|
|
558
|
+
param.value = Number(param.value).toFixed(4).toString();
|
|
559
|
+
}
|
|
540
560
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
561
|
+
return {
|
|
562
|
+
key: tooltipProp.title || tooltipProp.id,
|
|
563
|
+
value: param.value + " " + (tooltipProp.appendix || ""),
|
|
564
|
+
};
|
|
544
565
|
};
|
|
545
566
|
};
|
|
546
567
|
|
|
@@ -562,9 +583,9 @@ return (_ctx, _cache) => {
|
|
|
562
583
|
".controls": controls
|
|
563
584
|
}, [
|
|
564
585
|
createElementVNode("eox-map-tooltip", {
|
|
565
|
-
style: normalizeStyle(
|
|
566
|
-
".propertyTransform": tooltipPropertyTransform
|
|
567
|
-
}, null,
|
|
586
|
+
style: normalizeStyle(mainTooltipStyles.value),
|
|
587
|
+
".propertyTransform": tooltipPropertyTransform('main')
|
|
588
|
+
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
|
|
568
589
|
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
|
|
569
590
|
createElementVNode("eox-map", {
|
|
570
591
|
class: "fill-height fill-width overflow-none",
|
|
@@ -575,10 +596,10 @@ return (_ctx, _cache) => {
|
|
|
575
596
|
".layers": eoxMapCompareLayers.value
|
|
576
597
|
}, [
|
|
577
598
|
createElementVNode("eox-map-tooltip", {
|
|
578
|
-
style: normalizeStyle(
|
|
579
|
-
".propertyTransform": tooltipPropertyTransform
|
|
580
|
-
}, null,
|
|
581
|
-
], 40 /* PROPS, NEED_HYDRATION */,
|
|
599
|
+
style: normalizeStyle(compareTooltipStyles.value),
|
|
600
|
+
".propertyTransform": tooltipPropertyTransform('compare')
|
|
601
|
+
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
|
|
602
|
+
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
|
|
582
603
|
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))
|
|
583
604
|
}
|
|
584
605
|
}
|