@eodash/eodash 5.4.0 → 5.5.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/asWebComponent.js +1 -1
- package/core/client/composables/DefineWidgets.js +12 -2
- package/core/client/eodashSTAC/EodashCollection.js +3 -3
- package/core/client/eodashSTAC/createLayers.js +44 -17
- package/core/client/eodashSTAC/helpers.js +12 -5
- package/core/client/eodashSTAC/parquet.js +2 -1
- package/core/client/eodashSTAC/triggers.js +1 -2
- package/core/client/store/actions.js +17 -17
- package/core/client/store/states.js +26 -4
- package/core/client/types.ts +9 -0
- package/core/client/utils/index.js +18 -1
- package/dist/client/{DashboardLayout-CQOGHPW_.js → DashboardLayout-CkSgvaFF.js} +2 -2
- package/dist/client/{DynamicWebComponent-CoLO8FEf.js → DynamicWebComponent-Ncsg6fb9.js} +1 -1
- package/dist/client/EodashChart-5v7adDpG.js +144 -0
- package/dist/client/{EodashDatePicker-BZeQ6bcu.js → EodashDatePicker-RoQJe6ss.js} +4 -4
- package/dist/client/{EodashItemFilter-CmZkk7GK.js → EodashItemFilter-CCoVC5BE.js} +2 -2
- package/dist/client/{EodashLayerControl-D54fY-bX.js → EodashLayerControl-weVj7aQA.js} +2 -2
- package/dist/client/{EodashLayoutSwitcher-BCP3FvDb.js → EodashLayoutSwitcher-CL-Z9d5_.js} +3 -3
- package/dist/client/EodashMapBtns-CXU8IuPO.js +433 -0
- package/dist/client/{EodashStacInfo-BZbmT8vT.js → EodashStacInfo-BbMnjf-n.js} +11 -15
- package/dist/client/{EodashTimeSlider-DIcAJr6D.js → EodashTimeSlider-BZXnqfax.js} +2 -2
- package/dist/client/{EodashTools-Cz6X6hsF.js → EodashTools-DUJlkkgx.js} +4 -4
- package/dist/client/{ExportState-DFVFAgKz.js → ExportState-CT3FQOHW.js} +46 -21
- package/dist/client/{Footer-DLzQcjkI.js → Footer-D_iqP-1K.js} +1 -1
- package/dist/client/{Header-_D9Z-zFJ.js → Header-Dzhnvsy-.js} +127 -17
- package/dist/client/MobileLayout-6Rg_PSO8.js +118 -0
- package/dist/client/{PopUp-DwI8V2gW.js → PopUp-DPPv_GSA.js} +8 -59
- package/dist/client/{ProcessList-C9eAg2Sb.js → ProcessList-BIN_Mb27.js} +9 -13
- package/dist/client/{VImg-COXTnCWE.js → VImg-DhbuvNrA.js} +2 -2
- package/dist/client/{VMain-C74l1bv-.js → VMain-CVabY_NY.js} +1 -1
- package/dist/client/{VTooltip-BLS-cQ9N.js → VTooltip-Cc6au3Sn.js} +3 -4
- package/dist/client/{WidgetsContainer-D-VfMRxE.js → WidgetsContainer-ChqTJS4h.js} +1 -1
- package/dist/client/asWebComponent-DaIxULaA.js +9207 -0
- package/dist/client/{async-D4G-FOIc.js → async-D6Lvv-fT.js} +4 -4
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-CRMFoNYN.js → forwardRefs--IccUBdR.js} +196 -37
- package/dist/client/{handling-DTAhQuPh.js → handling-DSA67d6E.js} +74 -35
- package/dist/client/{helpers-CsjKHAcK.js → helpers-BBSdbOmv.js} +187 -87
- package/dist/client/{index-DEmHaCL3.js → index-6LlXNkke.js} +5 -3
- package/dist/client/{index-BHilH1qx.js → index-BS-8Y5FE.js} +22 -69
- package/dist/client/{index-BIcmbjr0.js → index-CQihL_c6.js} +27 -14
- package/dist/client/{index-BoCcZ0l4.js → index-qsZhYR_6.js} +15 -16
- package/dist/client/templates.js +48 -2
- package/dist/client/{transition-6MJLK-_H.js → transition-DFr4cXu8.js} +1 -1
- package/dist/node/cli.js +1 -1
- package/dist/types/core/client/App.vue.d.ts +16 -6
- package/dist/types/core/client/asWebComponent.d.ts +2 -2
- package/dist/types/core/client/components/DashboardLayout.vue.d.ts +2 -1
- package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +36 -16
- package/dist/types/core/client/components/EodashOverlay.vue.d.ts +2 -1
- package/dist/types/core/client/components/ErrorAlert.vue.d.ts +9 -1
- package/dist/types/core/client/components/Footer.vue.d.ts +2 -1
- package/dist/types/core/client/components/Header.vue.d.ts +2 -1
- package/dist/types/core/client/components/IframeWrapper.vue.d.ts +12 -6
- package/dist/types/core/client/components/Loading.vue.d.ts +2 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +2 -1
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +1 -0
- package/dist/types/core/client/store/actions.d.ts +1 -2
- package/dist/types/core/client/store/states.d.ts +22 -4
- package/dist/types/core/client/types.d.ts +6 -1
- package/dist/types/core/client/utils/index.d.ts +1 -0
- package/dist/types/core/client/views/Dashboard.vue.d.ts +20 -8
- package/dist/types/templates/compare.d.ts +20 -0
- package/dist/types/templates/expert.d.ts +30 -1
- package/dist/types/widgets/EodashChart.vue.d.ts +28 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +38 -9
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +88 -13
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +1 -1
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +169 -26
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +38 -10
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +22 -7
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +94 -21
- package/dist/types/widgets/EodashMap/index.vue.d.ts +646 -93
- package/dist/types/widgets/EodashMap/methods/btns.d.ts +14 -0
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +24 -7
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +26 -7
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -2
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +5 -11
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +2 -2
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +67 -18
- package/dist/types/widgets/EodashTimeSlider.vue.d.ts +14 -6
- package/dist/types/widgets/EodashTools.vue.d.ts +437 -47
- package/dist/types/widgets/ExportState.vue.d.ts +26 -8
- package/dist/types/widgets/PopUp.vue.d.ts +61 -11
- package/dist/types/widgets/WidgetsContainer.vue.d.ts +22 -6
- package/package.json +33 -34
- package/templates/baseConfig.js +2 -1
- package/templates/compare.js +28 -1
- package/templates/expert.js +19 -1
- package/widgets/EodashChart.vue +139 -0
- package/widgets/EodashItemCatalog/index.vue +2 -2
- package/widgets/EodashItemCatalog/methods/map.js +9 -10
- package/widgets/EodashMap/EodashMapBtns.vue +58 -93
- package/widgets/EodashMap/index.vue +10 -2
- package/widgets/EodashMap/methods/btns.js +155 -0
- package/widgets/EodashMap/methods/create-layers-config.js +3 -3
- package/widgets/EodashMap/methods/index.js +2 -1
- package/widgets/EodashProcess/ProcessList.vue +2 -3
- package/widgets/EodashProcess/index.vue +18 -61
- package/widgets/EodashProcess/methods/async.js +1 -1
- package/widgets/EodashProcess/methods/composables.js +0 -5
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +10 -6
- package/widgets/EodashProcess/methods/handling.js +23 -22
- package/widgets/EodashProcess/methods/outputs.js +44 -4
- package/widgets/EodashProcess/methods/utils.js +1 -1
- package/widgets/EodashStacInfo.vue +10 -23
- package/widgets/ExportState.vue +9 -15
- package/dist/client/EodashMapBtns-D-HulIl1.js +0 -306
- package/dist/client/MobileLayout-3Ko9XSfO.js +0 -118
- package/dist/client/asWebComponent-Bw03Jutr.js +0 -9090
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -65,71 +65,70 @@
|
|
|
65
65
|
"docs:generate": "npm run build:cli && npm run build:types && typedoc --options typedoc.config.json"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@eox/chart": "^1.0
|
|
68
|
+
"@eox/chart": "^1.1.0",
|
|
69
69
|
"@eox/drawtools": "^1.1.5",
|
|
70
70
|
"@eox/geosearch": "^1.1.0",
|
|
71
|
-
"@eox/itemfilter": "^1.13.
|
|
72
|
-
"@eox/jsonform": "^1.
|
|
73
|
-
"@eox/layercontrol": "^1.3.
|
|
71
|
+
"@eox/itemfilter": "^1.13.3",
|
|
72
|
+
"@eox/jsonform": "^1.8.0",
|
|
73
|
+
"@eox/layercontrol": "^1.3.2",
|
|
74
74
|
"@eox/layout": "^1.0.0",
|
|
75
|
-
"@eox/map": "^
|
|
75
|
+
"@eox/map": "^2.0.2",
|
|
76
76
|
"@eox/stacinfo": "^1.0.2",
|
|
77
|
-
"@eox/timecontrol": "^
|
|
77
|
+
"@eox/timecontrol": "^2.0.2",
|
|
78
78
|
"@eox/timeslider": "https://pkg.pr.new/EOX-A/EOxElements/@eox/timeslider@9873028",
|
|
79
|
-
"@eox/ui": "^0.
|
|
79
|
+
"@eox/ui": "^0.5.1",
|
|
80
80
|
"@mdi/js": "^7.4.47",
|
|
81
|
-
"@vitejs/plugin-vue": "^
|
|
82
|
-
"@vueuse/core": "^
|
|
81
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
82
|
+
"@vueuse/core": "^14.1.0",
|
|
83
83
|
"animated-details": "gist:2912bb049fa906671807415eb0e87188",
|
|
84
|
-
"axios": "^1.
|
|
85
|
-
"axios-cache-interceptor": "^1.
|
|
84
|
+
"axios": "^1.13.2",
|
|
85
|
+
"axios-cache-interceptor": "^1.10.0",
|
|
86
86
|
"color-legend-element": "^1.3.0",
|
|
87
|
-
"commander": "^14.0.
|
|
88
|
-
"core-js": "^3.
|
|
87
|
+
"commander": "^14.0.2",
|
|
88
|
+
"core-js": "^3.47.0",
|
|
89
89
|
"dotenv": "^17.2.3",
|
|
90
|
-
"hyparquet": "^1.
|
|
90
|
+
"hyparquet": "^1.23.3",
|
|
91
91
|
"loglevel": "^1.9.2",
|
|
92
92
|
"mustache": "^4.2.0",
|
|
93
|
-
"pinia": "^3.0.
|
|
94
|
-
"proj4": "^2.
|
|
95
|
-
"sass": "^1.
|
|
93
|
+
"pinia": "^3.0.4",
|
|
94
|
+
"proj4": "^2.20.2",
|
|
95
|
+
"sass": "^1.97.1",
|
|
96
96
|
"stac-js": "^0.1.9",
|
|
97
97
|
"stac-ts": "^1.0.4",
|
|
98
98
|
"v-calendar": "3.0.0",
|
|
99
|
-
"vega": "^5.33.0",
|
|
100
99
|
"vega-embed": "^6.29.0",
|
|
101
100
|
"vega-lite": "^5.23.0",
|
|
102
|
-
"vite": "^
|
|
101
|
+
"vite": "^7.3.0",
|
|
103
102
|
"vite-plugin-vuetify": "^2.1.2",
|
|
104
|
-
"vue": "^3.5.
|
|
105
|
-
"vuetify": "^3.
|
|
103
|
+
"vue": "^3.5.25",
|
|
104
|
+
"vuetify": "^3.11.4",
|
|
106
105
|
"webfontloader": "^1.6.28"
|
|
107
106
|
},
|
|
108
107
|
"devDependencies": {
|
|
109
|
-
"@babel/types": "^7.28.
|
|
108
|
+
"@babel/types": "^7.28.5",
|
|
110
109
|
"@eox/eslint-config": "^2.0.0",
|
|
111
|
-
"@pinia/testing": "^1.0.
|
|
110
|
+
"@pinia/testing": "^1.0.3",
|
|
112
111
|
"@types/json-schema": "^7.0.15",
|
|
113
112
|
"@types/mustache": "^4.2.6",
|
|
114
|
-
"@types/node": "^
|
|
113
|
+
"@types/node": "^25.0.3",
|
|
115
114
|
"@types/openlayers": "^4.6.23",
|
|
116
115
|
"@types/webfontloader": "^1.6.38",
|
|
117
|
-
"cypress": "^
|
|
118
|
-
"eslint": "^9.
|
|
116
|
+
"cypress": "^15.8.1",
|
|
117
|
+
"eslint": "^9.39.2",
|
|
119
118
|
"eslint-plugin-vue": "^9.33.0",
|
|
120
|
-
"pkg-pr-new": "^0.0.
|
|
121
|
-
"prettier": "^3.
|
|
122
|
-
"rollup": "^4.
|
|
119
|
+
"pkg-pr-new": "^0.0.62",
|
|
120
|
+
"prettier": "^3.7.4",
|
|
121
|
+
"rollup": "^4.54.0",
|
|
123
122
|
"terminate": "^2.8.0",
|
|
124
123
|
"tsc-alias": "^1.8.16",
|
|
125
|
-
"typedoc": "^0.28.
|
|
124
|
+
"typedoc": "^0.28.15",
|
|
126
125
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
127
|
-
"typedoc-plugin-vue": "^1.5.
|
|
126
|
+
"typedoc-plugin-vue": "^1.5.1",
|
|
128
127
|
"typedoc-vitepress-theme": "^1.1.2",
|
|
129
128
|
"typescript": "^5.9.3",
|
|
130
129
|
"vitepress": "^1.6.4",
|
|
131
|
-
"vitest": "^
|
|
132
|
-
"vue-tsc": "3.
|
|
130
|
+
"vitest": "^4.0.16",
|
|
131
|
+
"vue-tsc": "3.1.8"
|
|
133
132
|
},
|
|
134
133
|
"engines": {
|
|
135
134
|
"node": ">=20.15.1"
|
package/templates/baseConfig.js
CHANGED
|
@@ -13,7 +13,8 @@ const baseConfig = {
|
|
|
13
13
|
stacEndpoint: {
|
|
14
14
|
endpoint:
|
|
15
15
|
"https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json",
|
|
16
|
-
|
|
16
|
+
// "https://api.explorer.eopf.copernicus.eu/stac",
|
|
17
|
+
// api: true,
|
|
17
18
|
},
|
|
18
19
|
brand: {
|
|
19
20
|
noLayout: true,
|
package/templates/compare.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { includesProcess } from "@/store/actions";
|
|
1
|
+
import { includesProcess, shouldShowChartWidget } from "@/store/actions";
|
|
2
2
|
|
|
3
3
|
/** @type {import("@/types").Template} */
|
|
4
4
|
export default {
|
|
@@ -118,6 +118,33 @@ export default {
|
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
120
|
},
|
|
121
|
+
{
|
|
122
|
+
defineWidget: () =>
|
|
123
|
+
shouldShowChartWidget() && {
|
|
124
|
+
id: "ProcessResultChart",
|
|
125
|
+
type: "internal",
|
|
126
|
+
title: "Chart",
|
|
127
|
+
layout: { x: 0, y: 0, w: 6, h: 8 },
|
|
128
|
+
widget: {
|
|
129
|
+
name: "EodashChart",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
defineWidget: () =>
|
|
135
|
+
shouldShowChartWidget(true) && {
|
|
136
|
+
id: "ProcessResultChartCompare",
|
|
137
|
+
type: "internal",
|
|
138
|
+
title: "Compare Chart",
|
|
139
|
+
layout: { x: 6, y: 0, w: 6, h: 8 },
|
|
140
|
+
widget: {
|
|
141
|
+
name: "EodashChart",
|
|
142
|
+
properties: {
|
|
143
|
+
enableCompare: true,
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
121
148
|
{
|
|
122
149
|
defineWidget: (selectedSTAC) => {
|
|
123
150
|
return selectedSTAC
|
package/templates/expert.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mdiViewDashboard } from "@mdi/js";
|
|
2
|
-
import { includesProcess } from "@/store/actions";
|
|
2
|
+
import { includesProcess, shouldShowChartWidget } from "@/store/actions";
|
|
3
3
|
|
|
4
4
|
/** @type {import("@/types").Template} */
|
|
5
5
|
export default {
|
|
@@ -35,6 +35,7 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
enableBackToPOIs: true,
|
|
37
37
|
enableSearch: true,
|
|
38
|
+
enableGlobe: true,
|
|
38
39
|
// searchParams: {
|
|
39
40
|
// countrycode: "gb,ie,fr"
|
|
40
41
|
// bounds: "-84.26514,41.58998,-77.54150,46.14246"
|
|
@@ -75,6 +76,11 @@ export default {
|
|
|
75
76
|
layout: { x: 0, y: 1, w: "3/3/2", h: 11 },
|
|
76
77
|
widget: {
|
|
77
78
|
name: "EodashLayerControl",
|
|
79
|
+
properties: {
|
|
80
|
+
cssVars: {
|
|
81
|
+
"--list-padding": "1rem",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
78
84
|
},
|
|
79
85
|
},
|
|
80
86
|
{
|
|
@@ -124,5 +130,17 @@ export default {
|
|
|
124
130
|
},
|
|
125
131
|
},
|
|
126
132
|
},
|
|
133
|
+
{
|
|
134
|
+
defineWidget: () =>
|
|
135
|
+
shouldShowChartWidget() && {
|
|
136
|
+
id: "ProcessResultChart",
|
|
137
|
+
type: "internal",
|
|
138
|
+
title: "Chart",
|
|
139
|
+
layout: { x: 0, y: 0, w: 12, h: 8 },
|
|
140
|
+
widget: {
|
|
141
|
+
name: "EodashChart",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
127
145
|
],
|
|
128
146
|
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="container">
|
|
3
|
+
<div class="chart-frame">
|
|
4
|
+
<button
|
|
5
|
+
v-if="usedChartData && usedChartSpec"
|
|
6
|
+
class="chart-toggle"
|
|
7
|
+
@click="toggleLayout"
|
|
8
|
+
v-tooltip="areChartsSeparateLayout ? 'Minimize' : 'Maximize'"
|
|
9
|
+
>
|
|
10
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true">
|
|
11
|
+
<path :d="toggleIcon" />
|
|
12
|
+
</svg>
|
|
13
|
+
</button>
|
|
14
|
+
<eox-chart
|
|
15
|
+
class="pt-0"
|
|
16
|
+
v-if="usedChartData && usedChartSpec"
|
|
17
|
+
.spec="toRaw(usedChartSpec)"
|
|
18
|
+
:key="chartRenderKey"
|
|
19
|
+
.dataValues="toRaw(usedChartData)"
|
|
20
|
+
@click:item="onChartClick"
|
|
21
|
+
:style="chartStyles"
|
|
22
|
+
.opt="vegaEmbedOptions"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<script setup>
|
|
28
|
+
import "@eox/chart";
|
|
29
|
+
import {
|
|
30
|
+
computed,
|
|
31
|
+
toRaw,
|
|
32
|
+
useTemplateRef,
|
|
33
|
+
ref,
|
|
34
|
+
onMounted,
|
|
35
|
+
onBeforeUnmount,
|
|
36
|
+
} from "vue";
|
|
37
|
+
import { onChartClick } from "./EodashProcess/methods/handling";
|
|
38
|
+
import {
|
|
39
|
+
chartData,
|
|
40
|
+
compareChartData,
|
|
41
|
+
chartSpec,
|
|
42
|
+
compareChartSpec,
|
|
43
|
+
areChartsSeparateLayout,
|
|
44
|
+
} from "@/store/states";
|
|
45
|
+
import { getOverlayParent } from "@/utils";
|
|
46
|
+
import { mdiArrowCollapse, mdiArrowExpand } from "@mdi/js";
|
|
47
|
+
|
|
48
|
+
const { enableCompare, vegaEmbedOptions } = defineProps({
|
|
49
|
+
enableCompare: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
vegaEmbedOptions: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default() {
|
|
56
|
+
return { actions: true };
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const usedChartData = computed(() => {
|
|
62
|
+
return enableCompare ? compareChartData.value : chartData.value;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const usedChartSpec = computed(() => {
|
|
66
|
+
return enableCompare ? compareChartSpec.value : chartSpec.value;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const chartRenderKey = ref(0);
|
|
70
|
+
const frameHeight = ref(225);
|
|
71
|
+
const containerEl = useTemplateRef("container");
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
@type { MutationObserver | null}
|
|
75
|
+
*/
|
|
76
|
+
let observer = null;
|
|
77
|
+
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
const el = containerEl.value;
|
|
80
|
+
if (!el) return;
|
|
81
|
+
|
|
82
|
+
const parent = el.parentElement?.parentElement;
|
|
83
|
+
if (parent) {
|
|
84
|
+
const parentHeight = parent.getBoundingClientRect().height;
|
|
85
|
+
frameHeight.value = Math.max(225, Math.floor(parentHeight));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// for mobile view, the overlay panel containing chart is initially hidden
|
|
89
|
+
// we create an observer when display of overlay is not none anymore
|
|
90
|
+
const overlay = getOverlayParent(el);
|
|
91
|
+
if (!overlay) return;
|
|
92
|
+
|
|
93
|
+
observer = new MutationObserver(async () => {
|
|
94
|
+
const style = getComputedStyle(overlay);
|
|
95
|
+
const visible = style.display !== "none";
|
|
96
|
+
if (visible) {
|
|
97
|
+
// forcibly rerender chart, otherwise size of canvas is 0
|
|
98
|
+
chartRenderKey.value = Math.random();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
observer.observe(overlay, {
|
|
103
|
+
attributes: true,
|
|
104
|
+
attributeFilter: ["style", "class"],
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
onBeforeUnmount(() => {
|
|
109
|
+
observer?.disconnect();
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const chartStyles = computed(() => {
|
|
113
|
+
const styles = {
|
|
114
|
+
height: `${frameHeight.value}px`,
|
|
115
|
+
};
|
|
116
|
+
return styles;
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const toggleIcon = computed(() =>
|
|
120
|
+
areChartsSeparateLayout.value ? mdiArrowCollapse : mdiArrowExpand,
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
function toggleLayout() {
|
|
124
|
+
areChartsSeparateLayout.value = !areChartsSeparateLayout.value;
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
127
|
+
<style scoped>
|
|
128
|
+
.chart-frame {
|
|
129
|
+
position: relative;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.chart-toggle {
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 38px;
|
|
135
|
+
right: 12px;
|
|
136
|
+
z-index: 2;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
useSearchOnMapMove,
|
|
36
36
|
useRenderItemsFeatures,
|
|
37
|
-
|
|
37
|
+
useHighlightOnFeatureHover,
|
|
38
38
|
} from "./methods/map";
|
|
39
39
|
import {
|
|
40
40
|
createOnFilterHandler,
|
|
@@ -139,7 +139,7 @@ useRenderItemsFeatures(currentItems);
|
|
|
139
139
|
// Search on map move logic
|
|
140
140
|
useSearchOnMapMove(itemfilterEl, props.bboxFilter);
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
useHighlightOnFeatureHover(itemfilterEl);
|
|
143
143
|
|
|
144
144
|
onUnmounted(() => {
|
|
145
145
|
store.selectedItem = null;
|
|
@@ -23,7 +23,7 @@ export function renderItemsFeatures(features) {
|
|
|
23
23
|
},
|
|
24
24
|
layers: [],
|
|
25
25
|
};
|
|
26
|
-
mapEl.value.layers = [
|
|
26
|
+
mapEl.value.layers = [...mapEl.value.layers, analysisLayers];
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const stacItemsLayer = {
|
|
@@ -68,8 +68,8 @@ export function renderItemsFeatures(features) {
|
|
|
68
68
|
return;
|
|
69
69
|
} else {
|
|
70
70
|
//@ts-expect-error todo
|
|
71
|
-
analysisLayers.layers.
|
|
72
|
-
mapEl.value.layers = [...mapEl.value.layers]
|
|
71
|
+
analysisLayers.layers.push(stacItemsLayer);
|
|
72
|
+
mapEl.value.layers = [...mapEl.value.layers];
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -101,21 +101,20 @@ export const useSearchOnMapMove = (itemFilter, bboxFilter) => {
|
|
|
101
101
|
* @param {import("vue").Ref<import("@/types").GeoJsonFeature[]>} currentItems
|
|
102
102
|
*/
|
|
103
103
|
export const useRenderItemsFeatures = (currentItems) => {
|
|
104
|
-
const renderOnUpdate = () =>
|
|
105
|
-
useOnLayersUpdate(() => {
|
|
106
|
-
// consider cases where this is not needed
|
|
107
|
-
renderItemsFeatures(currentItems.value);
|
|
108
|
-
});
|
|
109
104
|
onMounted(() => {
|
|
110
105
|
renderItemsFeatures(currentItems.value);
|
|
111
|
-
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
useOnLayersUpdate(() => {
|
|
109
|
+
// consider cases where this is not needed
|
|
110
|
+
renderItemsFeatures(currentItems.value);
|
|
112
111
|
});
|
|
113
112
|
};
|
|
114
113
|
/**
|
|
115
114
|
*
|
|
116
115
|
* @param {import("vue").Ref<any>} itemfilterEl
|
|
117
116
|
*/
|
|
118
|
-
export function
|
|
117
|
+
export function useHighlightOnFeatureHover(itemfilterEl) {
|
|
119
118
|
/**
|
|
120
119
|
*
|
|
121
120
|
* @param {CustomEvent} evt
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div ref="rootRef" class="map-buttons d-flex flex-column align-end">
|
|
3
3
|
<button
|
|
4
|
-
v-if="enableZoom"
|
|
4
|
+
v-if="enableZoom && !isGlobe"
|
|
5
5
|
class="primary small circle small-elevate"
|
|
6
6
|
@click="onMapZoomIn"
|
|
7
7
|
>
|
|
8
8
|
<i class="small"
|
|
9
|
-
><svg viewBox="0 0 24 24"><path :d="mdiPlus" /></svg
|
|
10
|
-
|
|
9
|
+
><svg viewBox="0 0 24 24"><path :d="mdiPlus" /></svg>
|
|
10
|
+
</i>
|
|
11
11
|
<div class="tooltip left">Zoom in</div>
|
|
12
12
|
</button>
|
|
13
13
|
|
|
14
14
|
<button
|
|
15
|
-
v-if="enableZoom"
|
|
15
|
+
v-if="enableZoom && !isGlobe"
|
|
16
16
|
class="primary small circle small-elevate"
|
|
17
17
|
@click="onMapZoomOut"
|
|
18
18
|
>
|
|
19
19
|
<i class="small"
|
|
20
|
-
><svg viewBox="0 0 24 24"><path :d="mdiMinus" /></svg
|
|
21
|
-
|
|
20
|
+
><svg viewBox="0 0 24 24"><path :d="mdiMinus" /></svg>
|
|
21
|
+
</i>
|
|
22
22
|
<div class="tooltip left">Zoom out</div>
|
|
23
23
|
</button>
|
|
24
24
|
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
@click="showMapState = !showMapState"
|
|
29
29
|
>
|
|
30
30
|
<i class="small"
|
|
31
|
-
><svg viewBox="0 0 24 24"><path :d="mdiMapPlus" /></svg
|
|
32
|
-
|
|
31
|
+
><svg viewBox="0 0 24 24"><path :d="mdiMapPlus" /></svg>
|
|
32
|
+
</i>
|
|
33
33
|
<div class="tooltip left">Extract storytelling configuration</div>
|
|
34
34
|
</button>
|
|
35
35
|
<ExportState v-if="exportMap" v-model="showMapState" />
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
@click="changeMapProjection(availableMapProjection)"
|
|
41
41
|
>
|
|
42
42
|
<i class="small"
|
|
43
|
-
><svg viewBox="0 0 24 24"><path :d="mdiEarthBox" /></svg
|
|
44
|
-
|
|
43
|
+
><svg viewBox="0 0 24 24"><path :d="mdiEarthBox" /></svg>
|
|
44
|
+
</i>
|
|
45
45
|
<div class="tooltip left">Change map projection</div>
|
|
46
46
|
</button>
|
|
47
47
|
<button
|
|
48
|
-
v-if="compareIndicators"
|
|
48
|
+
v-if="compareIndicators && !isGlobe"
|
|
49
49
|
class="primary small circle small-elevate"
|
|
50
|
-
@click="onCompareClick"
|
|
50
|
+
@click="onCompareClick(compareIndicators)"
|
|
51
51
|
>
|
|
52
52
|
<i class="small"
|
|
53
|
-
><svg viewBox="0 0 24 24"><path :d="compareIcon" /></svg
|
|
54
|
-
|
|
53
|
+
><svg viewBox="0 0 24 24"><path :d="compareIcon" /></svg>
|
|
54
|
+
</i>
|
|
55
55
|
<div class="tooltip left">Compare mode</div>
|
|
56
56
|
</button>
|
|
57
57
|
<button
|
|
@@ -61,12 +61,27 @@
|
|
|
61
61
|
>
|
|
62
62
|
<i class="small"
|
|
63
63
|
><svg viewBox="0 0 24 24">
|
|
64
|
-
<path :d="mdiStarFourPointsCircleOutline"
|
|
65
|
-
|
|
64
|
+
<path :d="mdiStarFourPointsCircleOutline" />
|
|
65
|
+
</svg>
|
|
66
|
+
</i>
|
|
66
67
|
<div class="tooltip left">Back to POIs</div>
|
|
67
68
|
</button>
|
|
69
|
+
<button
|
|
70
|
+
v-if="enableGlobe && !isInCompareMode"
|
|
71
|
+
class="primary small circle small-elevate"
|
|
72
|
+
@click="switchGlobe"
|
|
73
|
+
>
|
|
74
|
+
<i class="small"
|
|
75
|
+
><svg viewBox="0 0 24 24">
|
|
76
|
+
<path :d="mdiEarth" />
|
|
77
|
+
</svg>
|
|
78
|
+
</i>
|
|
79
|
+
<div class="tooltip left">
|
|
80
|
+
{{ isGlobe ? "switch to 2D" : "switch to 3D" }}
|
|
81
|
+
</div>
|
|
82
|
+
</button>
|
|
68
83
|
<eox-geosearch
|
|
69
|
-
v-if="mapEl && enableSearch"
|
|
84
|
+
v-if="mapEl && !isGlobe && enableSearch"
|
|
70
85
|
:for="mapEl"
|
|
71
86
|
:endpoint="opencageUrl"
|
|
72
87
|
:params="searchParams"
|
|
@@ -96,11 +111,12 @@
|
|
|
96
111
|
</template>
|
|
97
112
|
<script setup>
|
|
98
113
|
import { useTransparentPanel } from "@/composables";
|
|
99
|
-
import { changeMapProjection
|
|
114
|
+
import { changeMapProjection } from "@/store/actions";
|
|
100
115
|
import {
|
|
101
116
|
activeTemplate,
|
|
102
117
|
availableMapProjection,
|
|
103
118
|
comparePoi,
|
|
119
|
+
isGlobe,
|
|
104
120
|
mapEl,
|
|
105
121
|
poi,
|
|
106
122
|
} from "@/store/states";
|
|
@@ -112,17 +128,22 @@ import {
|
|
|
112
128
|
mdiMinus,
|
|
113
129
|
mdiPlus,
|
|
114
130
|
mdiStarFourPointsCircleOutline,
|
|
131
|
+
mdiEarth,
|
|
115
132
|
} from "@mdi/js";
|
|
116
133
|
import ExportState from "^/ExportState.vue";
|
|
117
|
-
import { computed, ref
|
|
134
|
+
import { computed, ref } from "vue";
|
|
118
135
|
import PopUp from "^/PopUp.vue";
|
|
119
136
|
import EodashItemFilter from "^/EodashItemFilter.vue";
|
|
120
137
|
import { useDisplay } from "vuetify";
|
|
121
|
-
import { useSTAcStore } from "@/store/stac";
|
|
122
|
-
import { storeToRefs } from "pinia";
|
|
123
138
|
import { loadPOiIndicator } from "^/EodashProcess/methods/handling";
|
|
124
|
-
import {
|
|
125
|
-
|
|
139
|
+
import {
|
|
140
|
+
onCompareClick,
|
|
141
|
+
onSelectCompareIndicator,
|
|
142
|
+
switchGlobe,
|
|
143
|
+
onMapZoomOut,
|
|
144
|
+
onMapZoomIn,
|
|
145
|
+
showCompareIndicators,
|
|
146
|
+
} from "./methods/btns";
|
|
126
147
|
import "@eox/geosearch";
|
|
127
148
|
|
|
128
149
|
const {
|
|
@@ -133,6 +154,7 @@ const {
|
|
|
133
154
|
enableSearch,
|
|
134
155
|
enableZoom,
|
|
135
156
|
searchParams,
|
|
157
|
+
enableGlobe,
|
|
136
158
|
} = defineProps({
|
|
137
159
|
exportMap: {
|
|
138
160
|
type: Boolean,
|
|
@@ -167,22 +189,26 @@ const {
|
|
|
167
189
|
type: Boolean,
|
|
168
190
|
default: true,
|
|
169
191
|
},
|
|
192
|
+
enableGlobe: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: true,
|
|
195
|
+
},
|
|
170
196
|
});
|
|
171
|
-
|
|
172
|
-
const { resetSelectedCompareSTAC } = useSTAcStore();
|
|
197
|
+
|
|
173
198
|
const { smAndDown } = useDisplay();
|
|
174
199
|
const popupWidth = computed(() => (smAndDown.value ? "80%" : "70%"));
|
|
175
200
|
const popupHeight = computed(() => (smAndDown.value ? "90%" : "70%"));
|
|
176
201
|
|
|
177
202
|
const showMapState = ref(false);
|
|
178
|
-
const
|
|
203
|
+
const isInCompareMode = computed(
|
|
204
|
+
() =>
|
|
205
|
+
activeTemplate.value ===
|
|
206
|
+
((typeof compareIndicators === "object" &&
|
|
207
|
+
compareIndicators?.compareTemplate) ||
|
|
208
|
+
"compare"),
|
|
209
|
+
);
|
|
179
210
|
const compareIcon = computed(() =>
|
|
180
|
-
|
|
181
|
-
((typeof compareIndicators === "object" &&
|
|
182
|
-
compareIndicators?.compareTemplate) ||
|
|
183
|
-
"compare")
|
|
184
|
-
? mdiCompareRemove
|
|
185
|
-
: mdiCompare,
|
|
211
|
+
isInCompareMode.value ? mdiCompareRemove : mdiCompare,
|
|
186
212
|
);
|
|
187
213
|
const itemFilterConfig = {
|
|
188
214
|
enableHighlighting: false,
|
|
@@ -197,74 +223,13 @@ const itemFilterConfig = {
|
|
|
197
223
|
compareIndicators.itemFilterConfig),
|
|
198
224
|
};
|
|
199
225
|
|
|
200
|
-
const onCompareClick = () => {
|
|
201
|
-
showCompareIndicators.value =
|
|
202
|
-
activeTemplate.value !==
|
|
203
|
-
((typeof compareIndicators === "object" &&
|
|
204
|
-
compareIndicators.compareTemplate) ||
|
|
205
|
-
"compare");
|
|
206
|
-
|
|
207
|
-
const fallbackTemplate =
|
|
208
|
-
(typeof compareIndicators === "object" &&
|
|
209
|
-
compareIndicators.fallbackTemplate) ||
|
|
210
|
-
"expert";
|
|
211
|
-
selectedCompareStac.value = null;
|
|
212
|
-
resetSelectedCompareSTAC();
|
|
213
|
-
setActiveTemplate(fallbackTemplate);
|
|
214
|
-
triggerRef(selectedStac);
|
|
215
|
-
};
|
|
216
|
-
|
|
217
226
|
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
218
227
|
const rootRef = ref(null);
|
|
219
228
|
|
|
220
|
-
const onSelectCompareIndicator = () => {
|
|
221
|
-
const compareTemplate =
|
|
222
|
-
(typeof compareIndicators === "object" &&
|
|
223
|
-
compareIndicators.compareTemplate) ||
|
|
224
|
-
"compare";
|
|
225
|
-
setActiveTemplate(compareTemplate);
|
|
226
|
-
showCompareIndicators.value = !showCompareIndicators.value;
|
|
227
|
-
};
|
|
228
|
-
|
|
229
229
|
useTransparentPanel(rootRef);
|
|
230
230
|
|
|
231
|
-
const onMapZoomOut = () => {
|
|
232
|
-
const map = mapEl.value?.map;
|
|
233
|
-
const currentZoom = map?.getView().getZoom();
|
|
234
|
-
if (currentZoom !== undefined && currentZoom !== null) {
|
|
235
|
-
const view = map?.getView();
|
|
236
|
-
|
|
237
|
-
if (view !== undefined && view.getZoom()) {
|
|
238
|
-
view.animate({
|
|
239
|
-
zoom: currentZoom - 1,
|
|
240
|
-
duration: 250,
|
|
241
|
-
easing: easeOut,
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
const onMapZoomIn = () => {
|
|
248
|
-
const map = mapEl.value?.map;
|
|
249
|
-
const currentZoom = map?.getView().getZoom();
|
|
250
|
-
if (currentZoom !== undefined && currentZoom !== null) {
|
|
251
|
-
const view = map?.getView();
|
|
252
|
-
|
|
253
|
-
if (view !== undefined && view.getZoom()) {
|
|
254
|
-
view.animate({
|
|
255
|
-
zoom: currentZoom + 1,
|
|
256
|
-
duration: 250,
|
|
257
|
-
easing: easeOut,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
231
|
const opencageApiKey = process.env.EODASH_OPENCAGE || "NO_KEY_FOUND";
|
|
263
232
|
const opencageUrl = `https://api.opencagedata.com/geocode/v1/json?key=${opencageApiKey}`;
|
|
264
|
-
|
|
265
|
-
/*const menu = document
|
|
266
|
-
.querySelector("eox-geosearch")
|
|
267
|
-
.renderRoot.querySelector("menu");*/
|
|
268
233
|
</script>
|
|
269
234
|
|
|
270
235
|
<style scoped>
|