@eodash/eodash 5.0.0-rc.2.4 → 5.0.0-rc.3
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 -17
- package/core/client/eodashSTAC/helpers.js +23 -0
- package/core/client/store/stac.js +3 -1
- package/core/client/types.ts +127 -21
- package/core/client/utils/states.js +9 -0
- package/core/client/vite-env.d.ts +0 -13
- package/dist/client/{DashboardLayout-D1UcB3RV.js → DashboardLayout-t_PavJPO.js} +2 -2
- package/dist/client/{DynamicWebComponent-DtZ_mHL9.js → DynamicWebComponent-y07rVJch.js} +1 -1
- package/dist/client/{EodashDatePicker-CYU0MZX5.js → EodashDatePicker-CcOfyzGD.js} +3 -83
- package/dist/client/{EodashItemFilter-SE9oW3oZ.js → EodashItemFilter-B9HCvIMi.js} +1 -1
- package/dist/client/{EodashLayerControl-BuGe29Nt.js → EodashLayerControl-KStn7Nb_.js} +8 -2
- package/dist/client/{EodashLayoutSwitcher-6wLl-Gtd.js → EodashLayoutSwitcher-DqeFO3RN.js} +2 -2
- package/dist/client/{EodashMapBtns-BWWu6eHG.js → EodashMapBtns-5BF27qJB.js} +36 -12
- package/dist/client/{EodashStacInfo-DjRSGLHM.js → EodashStacInfo-C_hDy6Pd.js} +7 -1
- package/dist/client/{EodashTools-CJ4hBH_X.js → EodashTools-BXflvRf8.js} +5 -4
- package/dist/client/{ExportState-BqnlEpzR.js → ExportState-C0QRemK1.js} +27 -12
- package/dist/client/{Footer-C_3WrfI4.js → Footer-7VGyGUAs.js} +1 -1
- package/dist/client/{Header-D_hcGpNG.js → Header-BQJnXHYq.js} +3 -3
- package/dist/client/{MobileLayout-CDbupC9v.js → MobileLayout-b8nQ-Vyl.js} +5 -5
- package/dist/client/{PopUp-Ba6mY2jQ.js → PopUp-DgNrh9Df.js} +3 -3
- package/dist/client/ProcessList-C62SOVO6.js +484 -0
- package/dist/client/{VImg-Yc9F9pYq.js → VImg-D4eT3IQ1.js} +2 -2
- package/dist/client/{VMain-BiS7HPEk.js → VMain-C3hN2-H3.js} +1 -1
- package/dist/client/{VOverlay-B9mxXaCv.js → VOverlay-tAeNygaA.js} +15 -6
- package/dist/client/{VTooltip-XJLaLrZQ.js → VTooltip-B0Q3iHMZ.js} +3 -3
- package/dist/client/{WidgetsContainer-DRVb_73N.js → WidgetsContainer-CtDHfCYf.js} +1 -1
- package/dist/client/{asWebComponent-DZpMGxEY.js → asWebComponent-BJ2NWunV.js} +100 -95
- package/dist/client/eo-dash.css +2 -2
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-BtkfywIE.js → forwardRefs-CIFAqXaZ.js} +9 -9
- package/dist/client/{EodashMap-DhVCoYMi.js → index-BQ16n4Sk.js} +103 -78
- package/dist/client/index-Cv7HBz49.js +85 -0
- package/dist/client/{EodashProcess-GSj_LMsK.js → index-Da5xXX6Q.js} +349 -443
- package/dist/client/{index-f55xuyof.js → index-DvcUndod.js} +1 -1
- package/dist/client/{transition-CtL4BoVi.js → transition-Cdb4K27U.js} +1 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +9 -9
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +11 -6
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +6 -5
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +383 -2
- package/dist/types/core/client/types.d.ts +85 -19
- 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 +30 -29
- package/widgets/EodashLayerControl.vue +8 -1
- package/widgets/{EodashMap.vue → EodashMap/index.vue} +53 -29
- 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 -624
- 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 -208
- /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
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
showIndicatorsBtn: boolean;
|
|
3
|
+
showLayoutSwitcher: boolean;
|
|
2
4
|
layoutTarget: string;
|
|
3
5
|
layoutIcon: string;
|
|
4
|
-
itemFilterConfig: Record<string, any>;
|
|
5
|
-
showLayoutSwitcher: boolean;
|
|
6
6
|
indicatorBtnText: string;
|
|
7
|
-
|
|
7
|
+
itemFilterConfig: Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never> & {
|
|
8
|
+
readonly enableCompare?: boolean | undefined;
|
|
9
|
+
readonly filtersTitle?: string | undefined;
|
|
10
|
+
readonly resultsTitle?: string | undefined;
|
|
11
|
+
readonly titleProperty?: string | undefined;
|
|
12
|
+
readonly imageProperty?: string | undefined;
|
|
13
|
+
readonly subTitleProperty?: string | undefined;
|
|
14
|
+
readonly resultType?: string | undefined;
|
|
15
|
+
readonly cssVars?: string | Record<string, any> | undefined;
|
|
16
|
+
readonly enableHighlighting?: boolean | undefined;
|
|
17
|
+
readonly expandMultipleFilters?: boolean | undefined;
|
|
18
|
+
readonly expandMultipleResults?: boolean | undefined;
|
|
19
|
+
readonly filterProperties?: {
|
|
20
|
+
keys: string[];
|
|
21
|
+
title: string;
|
|
22
|
+
type: string;
|
|
23
|
+
expanded?: boolean;
|
|
24
|
+
}[] | undefined;
|
|
25
|
+
readonly aggregateResults?: string | undefined;
|
|
26
|
+
};
|
|
8
27
|
$props: {
|
|
28
|
+
readonly showIndicatorsBtn?: boolean | undefined;
|
|
29
|
+
readonly showLayoutSwitcher?: boolean | undefined;
|
|
9
30
|
readonly layoutTarget?: string | undefined;
|
|
10
31
|
readonly layoutIcon?: string | undefined;
|
|
11
|
-
readonly itemFilterConfig?: Record<string, any> | undefined;
|
|
12
|
-
readonly showLayoutSwitcher?: boolean | undefined;
|
|
13
32
|
readonly indicatorBtnText?: string | undefined;
|
|
14
|
-
readonly
|
|
33
|
+
readonly itemFilterConfig?: (Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never> & {
|
|
34
|
+
readonly enableCompare?: boolean | undefined;
|
|
35
|
+
readonly filtersTitle?: string | undefined;
|
|
36
|
+
readonly resultsTitle?: string | undefined;
|
|
37
|
+
readonly titleProperty?: string | undefined;
|
|
38
|
+
readonly imageProperty?: string | undefined;
|
|
39
|
+
readonly subTitleProperty?: string | undefined;
|
|
40
|
+
readonly resultType?: string | undefined;
|
|
41
|
+
readonly cssVars?: string | Record<string, any> | undefined;
|
|
42
|
+
readonly enableHighlighting?: boolean | undefined;
|
|
43
|
+
readonly expandMultipleFilters?: boolean | undefined;
|
|
44
|
+
readonly expandMultipleResults?: boolean | undefined;
|
|
45
|
+
readonly filterProperties?: {
|
|
46
|
+
keys: string[];
|
|
47
|
+
title: string;
|
|
48
|
+
type: string;
|
|
49
|
+
expanded?: boolean;
|
|
50
|
+
}[] | undefined;
|
|
51
|
+
readonly aggregateResults?: string | undefined;
|
|
52
|
+
}) | undefined;
|
|
15
53
|
};
|
|
16
54
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {
|
|
17
55
|
rootEl: HTMLDivElement;
|
|
@@ -4,16 +4,16 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
-
height: string;
|
|
8
|
-
maxHeight: string;
|
|
9
7
|
maxWidth: string;
|
|
8
|
+
maxHeight: string;
|
|
10
9
|
width: string;
|
|
10
|
+
height: string;
|
|
11
11
|
widget?: import("../core/client/types").Widget<"compiletime"> | undefined;
|
|
12
12
|
$props: {
|
|
13
|
-
readonly height?: string | undefined;
|
|
14
|
-
readonly maxHeight?: string | undefined;
|
|
15
13
|
readonly maxWidth?: string | undefined;
|
|
14
|
+
readonly maxHeight?: string | undefined;
|
|
16
15
|
readonly width?: string | undefined;
|
|
16
|
+
readonly height?: string | undefined;
|
|
17
17
|
readonly widget?: import("../core/client/types").Widget<"compiletime"> | undefined;
|
|
18
18
|
};
|
|
19
19
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLSpanElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -56,64 +56,65 @@
|
|
|
56
56
|
"docs:dev": "vitepress dev docs --port 3333",
|
|
57
57
|
"docs:build": "npm run docs:generate && vitepress build docs",
|
|
58
58
|
"docs:preview": "vitepress preview docs",
|
|
59
|
-
"docs:generate": "typedoc --options typedoc.config.json"
|
|
59
|
+
"docs:generate": "npm run build:cli && npm run build:types && typedoc --options typedoc.config.json"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@eox/chart": "^0.
|
|
63
|
-
"@eox/drawtools": "^0.
|
|
64
|
-
"@eox/itemfilter": "^1.
|
|
65
|
-
"@eox/jsonform": "^0.
|
|
66
|
-
"@eox/layercontrol": "^0.29.
|
|
62
|
+
"@eox/chart": "^0.4.0",
|
|
63
|
+
"@eox/drawtools": "^0.14.2",
|
|
64
|
+
"@eox/itemfilter": "^1.8.0",
|
|
65
|
+
"@eox/jsonform": "^0.16.1",
|
|
66
|
+
"@eox/layercontrol": "^0.29.1",
|
|
67
67
|
"@eox/layout": "^0.3.0",
|
|
68
|
-
"@eox/map": "^1.
|
|
68
|
+
"@eox/map": "^1.20.0",
|
|
69
69
|
"@eox/stacinfo": "^0.6.2",
|
|
70
|
-
"@eox/timecontrol": "^0.12.
|
|
70
|
+
"@eox/timecontrol": "^0.12.3",
|
|
71
71
|
"@mdi/js": "^7.4.47",
|
|
72
|
-
"@vitejs/plugin-vue": "^5.2.
|
|
72
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
73
73
|
"@vueuse/core": "^12.0.0",
|
|
74
74
|
"animated-details": "gist:2912bb049fa906671807415eb0e87188",
|
|
75
|
-
"axios": "^1.
|
|
76
|
-
"axios-cache-interceptor": "^1.
|
|
75
|
+
"axios": "^1.8.4",
|
|
76
|
+
"axios-cache-interceptor": "^1.7.0",
|
|
77
77
|
"color-legend-element": "^1.3.0",
|
|
78
78
|
"commander": "^12.1.0",
|
|
79
|
-
"core-js": "^3.
|
|
79
|
+
"core-js": "^3.41.0",
|
|
80
80
|
"loglevel": "^1.9.2",
|
|
81
81
|
"mustache": "^4.2.0",
|
|
82
|
-
"pinia": "^
|
|
83
|
-
"sass": "^1.
|
|
82
|
+
"pinia": "^3.0.1",
|
|
83
|
+
"sass": "^1.86.0",
|
|
84
84
|
"stac-js": "^0.0.9",
|
|
85
85
|
"stac-ts": "^1.0.4",
|
|
86
86
|
"v-calendar": "3.0.0",
|
|
87
|
-
"vega": "^5.
|
|
87
|
+
"vega": "^5.33.0",
|
|
88
88
|
"vega-embed": "^6.29.0",
|
|
89
89
|
"vega-lite": "^5.23.0",
|
|
90
|
-
"vite": "^6.2.
|
|
90
|
+
"vite": "^6.2.3",
|
|
91
91
|
"vite-plugin-vuetify": "^2.1.0",
|
|
92
92
|
"vue": "^3.5.0",
|
|
93
|
-
"vuetify": "^3.7.
|
|
93
|
+
"vuetify": "^3.7.18",
|
|
94
94
|
"webfontloader": "^1.6.28"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@babel/types": "^7.
|
|
97
|
+
"@babel/types": "^7.27.0",
|
|
98
98
|
"@eox/eslint-config": "^2.0.0",
|
|
99
99
|
"@pinia/testing": "^0.1.7",
|
|
100
|
+
"@types/json-schema": "^7.0.15",
|
|
100
101
|
"@types/mustache": "^4.2.5",
|
|
101
|
-
"@types/node": "^22.13.
|
|
102
|
+
"@types/node": "^22.13.13",
|
|
102
103
|
"@types/openlayers": "^4.6.23",
|
|
103
104
|
"@types/webfontloader": "^1.6.38",
|
|
104
105
|
"cypress": "^13.17.0",
|
|
105
|
-
"eslint": "^9.
|
|
106
|
-
"eslint-plugin-vue": "^9.
|
|
106
|
+
"eslint": "^9.23.0",
|
|
107
|
+
"eslint-plugin-vue": "^9.33.0",
|
|
107
108
|
"pkg-pr-new": "^0.0.39",
|
|
108
|
-
"prettier": "^3.5.
|
|
109
|
-
"rollup": "^4.
|
|
109
|
+
"prettier": "^3.5.3",
|
|
110
|
+
"rollup": "^4.37.0",
|
|
110
111
|
"terminate": "^2.8.0",
|
|
111
|
-
"tsc-alias": "^1.8.
|
|
112
|
-
"typedoc": "^0.
|
|
113
|
-
"typedoc-plugin-markdown": "^4.
|
|
114
|
-
"typedoc-plugin-vue": "^1.
|
|
112
|
+
"tsc-alias": "^1.8.11",
|
|
113
|
+
"typedoc": "^0.28.1",
|
|
114
|
+
"typedoc-plugin-markdown": "^4.6.0",
|
|
115
|
+
"typedoc-plugin-vue": "^1.5.0",
|
|
115
116
|
"typedoc-vitepress-theme": "^1.1.2",
|
|
116
|
-
"typescript": "^5.
|
|
117
|
+
"typescript": "^5.8.2",
|
|
117
118
|
"unplugin-fonts": "^1.3.1",
|
|
118
119
|
"vitepress": "^1.6.3",
|
|
119
120
|
"vitest": "^1.6.1",
|
|
@@ -28,12 +28,15 @@ import {
|
|
|
28
28
|
eodashCollections,
|
|
29
29
|
eodashCompareCollections,
|
|
30
30
|
layerControlFormValue,
|
|
31
|
+
layerControlFormValueCompare,
|
|
31
32
|
} from "@/utils/states";
|
|
32
33
|
import { storeToRefs } from "pinia";
|
|
33
34
|
import { useSTAcStore } from "@/store/stac";
|
|
34
35
|
|
|
35
36
|
const props = defineProps({
|
|
36
37
|
map: {
|
|
38
|
+
/** @type {import("vue").PropType<"first" | "second">} */
|
|
39
|
+
//@ts-expect-error todo
|
|
37
40
|
type: String,
|
|
38
41
|
default: "first",
|
|
39
42
|
},
|
|
@@ -119,7 +122,11 @@ const debouncedHandleDateTime = (evt) => {
|
|
|
119
122
|
* @param {Event & {detail:{layer:import("ol/layer").Layer;jsonformValue:Record<string,any>}}} evt
|
|
120
123
|
*/
|
|
121
124
|
const onLayerConfigChange = (evt) => {
|
|
122
|
-
|
|
125
|
+
if (props.map === "second") {
|
|
126
|
+
layerControlFormValueCompare.value = evt.detail.jsonformValue;
|
|
127
|
+
} else {
|
|
128
|
+
layerControlFormValue.value = evt.detail.jsonformValue;
|
|
129
|
+
}
|
|
123
130
|
};
|
|
124
131
|
|
|
125
132
|
const styleOverride = `
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
.controls="controls"
|
|
16
16
|
>
|
|
17
17
|
<eox-map-tooltip
|
|
18
|
-
:style="
|
|
19
|
-
.propertyTransform="tooltipPropertyTransform"
|
|
18
|
+
:style="mainTooltipStyles"
|
|
19
|
+
.propertyTransform="tooltipPropertyTransform('main')"
|
|
20
20
|
/>
|
|
21
21
|
</eox-map>
|
|
22
22
|
<eox-map
|
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
slot="second"
|
|
26
26
|
ref="compareMap"
|
|
27
27
|
.layers="eoxMapCompareLayers"
|
|
28
|
-
|
|
28
|
+
>
|
|
29
|
+
<eox-map-tooltip
|
|
30
|
+
:style="compareTooltipStyles"
|
|
31
|
+
.propertyTransform="tooltipPropertyTransform('compare')"
|
|
32
|
+
/>
|
|
33
|
+
</eox-map>
|
|
29
34
|
</eox-map-compare>
|
|
30
35
|
</template>
|
|
31
36
|
<script setup>
|
|
@@ -39,12 +44,13 @@ import {
|
|
|
39
44
|
eodashCollections,
|
|
40
45
|
eodashCompareCollections,
|
|
41
46
|
layerControlFormValue,
|
|
47
|
+
layerControlFormValueCompare,
|
|
42
48
|
} from "@/utils/states";
|
|
43
49
|
import {
|
|
44
50
|
useHandleMapMoveEnd,
|
|
45
51
|
useInitMap,
|
|
46
52
|
useUpdateTooltipProperties,
|
|
47
|
-
} from "
|
|
53
|
+
} from "^/EodashMap/methods";
|
|
48
54
|
import { inAndOut } from "ol/easing.js";
|
|
49
55
|
import mustache from "mustache";
|
|
50
56
|
|
|
@@ -71,6 +77,8 @@ const props = defineProps({
|
|
|
71
77
|
|
|
72
78
|
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
73
79
|
const tooltipProperties = ref([]);
|
|
80
|
+
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
81
|
+
const compareTooltipProperties = ref([]);
|
|
74
82
|
/** @type {import("@eox/map").EOxMap["controls"]} */
|
|
75
83
|
const controls = {
|
|
76
84
|
Attribution: {
|
|
@@ -142,6 +150,8 @@ onMounted(() => {
|
|
|
142
150
|
eoxMap,
|
|
143
151
|
false,
|
|
144
152
|
);
|
|
153
|
+
|
|
154
|
+
useUpdateTooltipProperties(eodashCollections, compareTooltipProperties);
|
|
145
155
|
}
|
|
146
156
|
|
|
147
157
|
useInitMap(
|
|
@@ -158,36 +168,50 @@ onMounted(() => {
|
|
|
158
168
|
|
|
159
169
|
useUpdateTooltipProperties(eodashCollections, tooltipProperties);
|
|
160
170
|
|
|
161
|
-
const
|
|
171
|
+
const mainTooltipStyles = computed(() => ({
|
|
162
172
|
visibility: tooltipProperties.value.length ? "visible" : "hidden",
|
|
163
173
|
}));
|
|
174
|
+
|
|
175
|
+
const compareTooltipStyles = computed(() => ({
|
|
176
|
+
visibility: compareTooltipProperties.value.length ? "visible" : "hidden",
|
|
177
|
+
}));
|
|
164
178
|
/**
|
|
165
|
-
* @param {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
179
|
+
* @param {"main" | "compare"} map
|
|
180
|
+
**/
|
|
181
|
+
const tooltipPropertyTransform = (map) => {
|
|
182
|
+
const tooltipProps =
|
|
183
|
+
map === "main" ? tooltipProperties : compareTooltipProperties;
|
|
184
|
+
const layerControlFormVal =
|
|
185
|
+
map == "main" ? layerControlFormValue : layerControlFormValueCompare;
|
|
186
|
+
/**
|
|
187
|
+
* @param {{key:string; value:string}} param
|
|
188
|
+
* @returns {{key:string; value?:string} | undefined}
|
|
189
|
+
*/
|
|
190
|
+
return (param) => {
|
|
191
|
+
/** @type {typeof tooltipProps.value} */
|
|
192
|
+
const updatedProperties = JSON.parse(
|
|
193
|
+
mustache.render(JSON.stringify(tooltipProps.value), {
|
|
194
|
+
...(layerControlFormVal.value ?? {}),
|
|
195
|
+
}),
|
|
196
|
+
);
|
|
175
197
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
param.value
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
const tooltipProp = updatedProperties?.find(
|
|
199
|
+
(prop) => prop.id === param.key,
|
|
200
|
+
);
|
|
201
|
+
if (!tooltipProp) {
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
if (typeof param.value === "object") {
|
|
205
|
+
param.value = JSON.stringify(param.value);
|
|
206
|
+
}
|
|
207
|
+
if (!isNaN(Number(param.value))) {
|
|
208
|
+
param.value = Number(param.value).toFixed(4).toString();
|
|
209
|
+
}
|
|
187
210
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
211
|
+
return {
|
|
212
|
+
key: tooltipProp.title || tooltipProp.id,
|
|
213
|
+
value: param.value + " " + (tooltipProp.appendix || ""),
|
|
214
|
+
};
|
|
191
215
|
};
|
|
192
216
|
};
|
|
193
217
|
</script>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { EodashCollection } from "@/eodashSTAC/EodashCollection";
|
|
2
|
+
import log from "loglevel";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates full layer configuration from indicator and time information
|
|
6
|
+
* @param {import("stac-ts").StacCatalog
|
|
7
|
+
* | import("stac-ts").StacCollection
|
|
8
|
+
* | import("stac-ts").StacItem
|
|
9
|
+
* | null
|
|
10
|
+
* } selectedIndicator
|
|
11
|
+
* @param {EodashCollection[]} eodashCols
|
|
12
|
+
* @param {string} [updatedTime]
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export const createLayersConfig = async (
|
|
16
|
+
selectedIndicator,
|
|
17
|
+
eodashCols,
|
|
18
|
+
updatedTime,
|
|
19
|
+
) => {
|
|
20
|
+
log.debug(
|
|
21
|
+
"Creating layers config",
|
|
22
|
+
selectedIndicator,
|
|
23
|
+
eodashCols,
|
|
24
|
+
updatedTime,
|
|
25
|
+
);
|
|
26
|
+
const layersCollection = [];
|
|
27
|
+
const dataLayers = {
|
|
28
|
+
type: "Group",
|
|
29
|
+
properties: {
|
|
30
|
+
id: "AnalysisGroup",
|
|
31
|
+
title: "Data Layers",
|
|
32
|
+
layerControlExpand: true,
|
|
33
|
+
},
|
|
34
|
+
layers: /** @type {Record<string,any>[]}*/ ([]),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
for (const ec of eodashCols) {
|
|
38
|
+
let layers;
|
|
39
|
+
if (updatedTime) {
|
|
40
|
+
layers = await ec.createLayersJson(new Date(updatedTime));
|
|
41
|
+
} else {
|
|
42
|
+
layers = await ec.createLayersJson();
|
|
43
|
+
}
|
|
44
|
+
// Add expand to all analysis layers
|
|
45
|
+
layers.forEach((dl) => {
|
|
46
|
+
dl.properties.layerControlExpand = true;
|
|
47
|
+
dl.properties.layerControlToolsExpand = true;
|
|
48
|
+
});
|
|
49
|
+
dataLayers.layers.push(...layers);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
layersCollection.push(dataLayers);
|
|
53
|
+
const indicatorLayers =
|
|
54
|
+
//@ts-expect-error indicator is collection
|
|
55
|
+
await EodashCollection.getIndicatorLayers(selectedIndicator);
|
|
56
|
+
const geodbLayer = EodashCollection.getGeoDBLayer(eodashCols);
|
|
57
|
+
if (geodbLayer) {
|
|
58
|
+
dataLayers.layers.unshift(geodbLayer);
|
|
59
|
+
}
|
|
60
|
+
const baseLayers = {
|
|
61
|
+
type: "Group",
|
|
62
|
+
properties: {
|
|
63
|
+
id: "BaseLayersGroup",
|
|
64
|
+
title: "Base Layers",
|
|
65
|
+
},
|
|
66
|
+
layers: /** @type {Record<string,any>[]}*/ ([]),
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const indicatorBaseLayers = indicatorLayers.filter(
|
|
70
|
+
(l) => l.properties.group === "baselayer",
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
if (indicatorBaseLayers.length) {
|
|
74
|
+
// Only one baselayer can be set to visible, let's first set all to
|
|
75
|
+
// false that have not a dedicated property visible, then check
|
|
76
|
+
// if there are more then one visible and only allow one
|
|
77
|
+
let counter = 0;
|
|
78
|
+
let lastPos = 0;
|
|
79
|
+
for (let indx = 0; indx < indicatorBaseLayers.length; indx++) {
|
|
80
|
+
const bl = indicatorBaseLayers[indx];
|
|
81
|
+
if (!("visible" in bl.properties)) {
|
|
82
|
+
bl.properties.visible = false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (bl.properties.visible) {
|
|
86
|
+
counter++;
|
|
87
|
+
lastPos = indx;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// if none visible set the last one as visible
|
|
92
|
+
if (counter === 0) {
|
|
93
|
+
indicatorBaseLayers[0].properties.visible = true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// disable all apart from last
|
|
97
|
+
if (counter > 0) {
|
|
98
|
+
indicatorBaseLayers.forEach((bl, indx) => {
|
|
99
|
+
if (indx !== lastPos) {
|
|
100
|
+
bl.properties.visible = false;
|
|
101
|
+
} else {
|
|
102
|
+
bl.properties.visible = true;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
baseLayers.layers.push(...indicatorBaseLayers);
|
|
108
|
+
|
|
109
|
+
// Add exclusive to baselayers and make sure only one is selected
|
|
110
|
+
baseLayers.layers.forEach((bl) => {
|
|
111
|
+
bl.properties.layerControlExclusive = true;
|
|
112
|
+
});
|
|
113
|
+
} else {
|
|
114
|
+
// Default to some baselayer
|
|
115
|
+
baseLayers.layers.push({
|
|
116
|
+
type: "Tile",
|
|
117
|
+
properties: {
|
|
118
|
+
id: "osm",
|
|
119
|
+
title: "Background",
|
|
120
|
+
layerControlExclusive: true,
|
|
121
|
+
},
|
|
122
|
+
source: {
|
|
123
|
+
type: "OSM",
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (baseLayers.layers.length) {
|
|
129
|
+
layersCollection.push(baseLayers);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const overlayLayers = {
|
|
133
|
+
type: "Group",
|
|
134
|
+
properties: {
|
|
135
|
+
id: "OverlayGroup",
|
|
136
|
+
title: "Overlay Layers",
|
|
137
|
+
},
|
|
138
|
+
layers: /** @type {Record<string,any>[]}*/ ([]),
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const indicatorOverlays = indicatorLayers.filter(
|
|
142
|
+
(l) => l.properties.group === "overlay",
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
if (indicatorOverlays.length) {
|
|
146
|
+
overlayLayers.layers.push(...indicatorOverlays);
|
|
147
|
+
layersCollection.unshift(overlayLayers);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return layersCollection;
|
|
151
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createLayersConfig } from "./create-layers-config";
|
|
2
2
|
import { setMapProjFromCol } from "@/eodashSTAC/triggers";
|
|
3
3
|
import { nextTick, onMounted, onUnmounted, watch } from "vue";
|
|
4
4
|
import log from "loglevel";
|
|
@@ -7,7 +7,7 @@ import { storeToRefs } from "pinia";
|
|
|
7
7
|
import { useEventBus } from "@vueuse/core";
|
|
8
8
|
import { eoxLayersKey } from "@/utils/keys";
|
|
9
9
|
import { posIsSetFromUrl } from "@/utils/states";
|
|
10
|
-
import { useOnLayersUpdate } from "
|
|
10
|
+
import { useOnLayersUpdate } from "@/composables";
|
|
11
11
|
/**
|
|
12
12
|
* Holder for previous compare map view as it is overwritten by sync
|
|
13
13
|
* @type { import("ol").View | null} mapElement
|
|
@@ -52,161 +52,12 @@ export const useHandleMapMoveEnd = (mapElement, mapPosition) => {
|
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* Creates full layer configuration from indicator and time information
|
|
57
|
-
* @param {import("stac-ts").StacCatalog
|
|
58
|
-
* | import("stac-ts").StacCollection
|
|
59
|
-
* | import("stac-ts").StacItem
|
|
60
|
-
* | null
|
|
61
|
-
* } selectedIndicator
|
|
62
|
-
* @param {EodashCollection[]} eodashCols
|
|
63
|
-
* @param {string} [updatedTime]
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
const createLayersConfig = async (
|
|
67
|
-
selectedIndicator,
|
|
68
|
-
eodashCols,
|
|
69
|
-
updatedTime,
|
|
70
|
-
) => {
|
|
71
|
-
log.debug(
|
|
72
|
-
"Creating layers config",
|
|
73
|
-
selectedIndicator,
|
|
74
|
-
eodashCols,
|
|
75
|
-
updatedTime,
|
|
76
|
-
);
|
|
77
|
-
const layersCollection = [];
|
|
78
|
-
const dataLayers = {
|
|
79
|
-
type: "Group",
|
|
80
|
-
properties: {
|
|
81
|
-
id: "AnalysisGroup",
|
|
82
|
-
title: "Data Layers",
|
|
83
|
-
layerControlExpand: true,
|
|
84
|
-
},
|
|
85
|
-
layers: /** @type {Record<string,any>[]}*/ ([]),
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
for (const ec of eodashCols) {
|
|
89
|
-
let layers;
|
|
90
|
-
if (updatedTime) {
|
|
91
|
-
layers = await ec.createLayersJson(new Date(updatedTime));
|
|
92
|
-
} else {
|
|
93
|
-
layers = await ec.createLayersJson();
|
|
94
|
-
}
|
|
95
|
-
// Add expand to all analysis layers
|
|
96
|
-
layers.forEach((dl) => {
|
|
97
|
-
dl.properties.layerControlExpand = true;
|
|
98
|
-
dl.properties.layerControlToolsExpand = true;
|
|
99
|
-
});
|
|
100
|
-
dataLayers.layers.push(...layers);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
layersCollection.push(dataLayers);
|
|
104
|
-
const indicatorLayers =
|
|
105
|
-
//@ts-expect-error indicator is collection
|
|
106
|
-
await EodashCollection.getIndicatorLayers(selectedIndicator);
|
|
107
|
-
const geodbLayer = EodashCollection.getGeoDBLayer(eodashCols);
|
|
108
|
-
if (geodbLayer) {
|
|
109
|
-
dataLayers.layers.unshift(geodbLayer);
|
|
110
|
-
}
|
|
111
|
-
const baseLayers = {
|
|
112
|
-
type: "Group",
|
|
113
|
-
properties: {
|
|
114
|
-
id: "BaseLayersGroup",
|
|
115
|
-
title: "Base Layers",
|
|
116
|
-
},
|
|
117
|
-
layers: /** @type {Record<string,any>[]}*/ ([]),
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const indicatorBaseLayers = indicatorLayers.filter(
|
|
121
|
-
(l) => l.properties.group === "baselayer",
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
if (indicatorBaseLayers.length) {
|
|
125
|
-
// Only one baselayer can be set to visible, let's first set all to
|
|
126
|
-
// false that have not a dedicated property visible, then check
|
|
127
|
-
// if there are more then one visible and only allow one
|
|
128
|
-
let counter = 0;
|
|
129
|
-
let lastPos = 0;
|
|
130
|
-
for (let indx = 0; indx < indicatorBaseLayers.length; indx++) {
|
|
131
|
-
const bl = indicatorBaseLayers[indx];
|
|
132
|
-
if (!("visible" in bl.properties)) {
|
|
133
|
-
bl.properties.visible = false;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (bl.properties.visible) {
|
|
137
|
-
counter++;
|
|
138
|
-
lastPos = indx;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// if none visible set the last one as visible
|
|
143
|
-
if (counter === 0) {
|
|
144
|
-
indicatorBaseLayers[0].properties.visible = true;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// disable all apart from last
|
|
148
|
-
if (counter > 0) {
|
|
149
|
-
indicatorBaseLayers.forEach((bl, indx) => {
|
|
150
|
-
if (indx !== lastPos) {
|
|
151
|
-
bl.properties.visible = false;
|
|
152
|
-
} else {
|
|
153
|
-
bl.properties.visible = true;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
baseLayers.layers.push(...indicatorBaseLayers);
|
|
159
|
-
|
|
160
|
-
// Add exclusive to baselayers and make sure only one is selected
|
|
161
|
-
baseLayers.layers.forEach((bl) => {
|
|
162
|
-
bl.properties.layerControlExclusive = true;
|
|
163
|
-
});
|
|
164
|
-
} else {
|
|
165
|
-
// Default to some baselayer
|
|
166
|
-
baseLayers.layers.push({
|
|
167
|
-
type: "Tile",
|
|
168
|
-
properties: {
|
|
169
|
-
id: "osm",
|
|
170
|
-
title: "Background",
|
|
171
|
-
layerControlExclusive: true,
|
|
172
|
-
},
|
|
173
|
-
source: {
|
|
174
|
-
type: "OSM",
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (baseLayers.layers.length) {
|
|
180
|
-
layersCollection.push(baseLayers);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const overlayLayers = {
|
|
184
|
-
type: "Group",
|
|
185
|
-
properties: {
|
|
186
|
-
id: "OverlayGroup",
|
|
187
|
-
title: "Overlay Layers",
|
|
188
|
-
},
|
|
189
|
-
layers: /** @type {Record<string,any>[]}*/ ([]),
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const indicatorOverlays = indicatorLayers.filter(
|
|
193
|
-
(l) => l.properties.group === "overlay",
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
if (indicatorOverlays.length) {
|
|
197
|
-
overlayLayers.layers.push(...indicatorOverlays);
|
|
198
|
-
layersCollection.unshift(overlayLayers);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return layersCollection;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
55
|
/**
|
|
205
56
|
* Initializes the map and updates it based on changes in the selected indicator and datetime,
|
|
206
57
|
*
|
|
207
58
|
* @param {import("vue").Ref<import("@eox/map").EOxMap| null>} mapElement
|
|
208
59
|
* @param {import("vue").Ref<import("stac-ts").StacCollection | null>} selectedIndicator
|
|
209
|
-
* @param {EodashCollection[]} eodashCols
|
|
60
|
+
* @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCols
|
|
210
61
|
* @param {import("vue").Ref<string>} datetime
|
|
211
62
|
* @param {import("vue").Ref<Record<string,any>[]>} mapLayers
|
|
212
63
|
* @param {import("vue").Ref<import("@eox/map").EOxMap| null>} partnerMap
|
|
@@ -364,7 +215,7 @@ export const useInitMap = (
|
|
|
364
215
|
};
|
|
365
216
|
/**
|
|
366
217
|
*
|
|
367
|
-
* @param {EodashCollection[]} eodashCols
|
|
218
|
+
* @param {import("@/eodashSTAC/EodashCollection").EodashCollection[]} eodashCols
|
|
368
219
|
* @param {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"],undefined>>} tooltipProperties
|
|
369
220
|
*/
|
|
370
221
|
export const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
|