@eodash/eodash 5.3.3 → 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/DefineEodash.js +3 -1
- package/core/client/composables/DefineWidgets.js +12 -2
- package/core/client/eodashSTAC/EodashCollection.js +20 -37
- package/core/client/eodashSTAC/createLayers.js +306 -136
- package/core/client/eodashSTAC/helpers.js +60 -40
- package/core/client/eodashSTAC/parquet.js +2 -0
- package/core/client/eodashSTAC/triggers.js +5 -5
- package/core/client/store/actions.js +17 -17
- package/core/client/store/states.js +26 -4
- package/core/client/types.ts +12 -1
- package/core/client/utils/index.js +18 -1
- package/dist/client/{DashboardLayout-Cp8Rv3Ef.js → DashboardLayout-CkSgvaFF.js} +2 -2
- package/dist/client/{DynamicWebComponent-CBsxC82P.js → DynamicWebComponent-Ncsg6fb9.js} +1 -1
- package/dist/client/EodashChart-5v7adDpG.js +144 -0
- package/dist/client/{EodashDatePicker-Dewym-cx.js → EodashDatePicker-RoQJe6ss.js} +4 -4
- package/dist/client/{EodashItemFilter-CAsZpOoQ.js → EodashItemFilter-CCoVC5BE.js} +2 -2
- package/dist/client/{EodashLayerControl-fn-rt8Ac.js → EodashLayerControl-weVj7aQA.js} +2 -2
- package/dist/client/{EodashLayoutSwitcher-B9XqQXCS.js → EodashLayoutSwitcher-CL-Z9d5_.js} +3 -3
- package/dist/client/EodashMapBtns-CXU8IuPO.js +433 -0
- package/dist/client/{EodashStacInfo-lxBKoav9.js → EodashStacInfo-BbMnjf-n.js} +11 -15
- package/dist/client/{EodashTimeSlider-DI97QkNT.js → EodashTimeSlider-BZXnqfax.js} +2 -2
- package/dist/client/{EodashTools-D5ShUT1g.js → EodashTools-DUJlkkgx.js} +4 -4
- package/dist/client/{ExportState-ruNyRS2E.js → ExportState-CT3FQOHW.js} +46 -21
- package/dist/client/{Footer-IQNyfd78.js → Footer-D_iqP-1K.js} +1 -1
- package/dist/client/{Header-BBdi_-Lp.js → Header-Dzhnvsy-.js} +127 -17
- package/dist/client/MobileLayout-6Rg_PSO8.js +118 -0
- package/dist/client/{PopUp-DRgOmD7-.js → PopUp-DPPv_GSA.js} +8 -59
- package/dist/client/{ProcessList-DxyCFQdz.js → ProcessList-BIN_Mb27.js} +9 -13
- package/dist/client/{VImg-hwmwzSwG.js → VImg-DhbuvNrA.js} +2 -2
- package/dist/client/{VMain-vk4-rkw-.js → VMain-CVabY_NY.js} +1 -1
- package/dist/client/{VTooltip-BYUZeia1.js → VTooltip-Cc6au3Sn.js} +3 -4
- package/dist/client/{WidgetsContainer-DXD_8rqh.js → WidgetsContainer-ChqTJS4h.js} +1 -1
- package/dist/client/asWebComponent-DaIxULaA.js +9207 -0
- package/dist/client/{async-D1MvO_Z_.js → async-D6Lvv-fT.js} +15 -5
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-DM-E2MfG.js → forwardRefs--IccUBdR.js} +196 -37
- package/dist/client/{handling-CbgeKrqT.js → handling-DSA67d6E.js} +160 -37
- package/dist/client/{helpers-CtUlAW0N.js → helpers-BBSdbOmv.js} +239 -126
- package/dist/client/{index-DBo0F4Fv.js → index-6LlXNkke.js} +5 -3
- package/dist/client/{index-BJvLt3Xf.js → index-BS-8Y5FE.js} +34 -77
- package/dist/client/{index-BkW06-Lg.js → index-CQihL_c6.js} +55 -15
- package/dist/client/{index-BxDh5v-H.js → index-qsZhYR_6.js} +15 -16
- package/dist/client/templates.js +52 -2
- package/dist/client/{transition-BdzATvPB.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/composables/DefineEodash.d.ts +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +27 -11
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +30 -23
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +11 -4
- 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 +7 -2
- 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 -19
- package/dist/types/widgets/EodashMap/index.vue.d.ts +647 -92
- 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 +18 -11
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +2 -2
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +1 -0
- 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 +23 -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 +73 -93
- package/widgets/EodashMap/index.vue +14 -2
- package/widgets/EodashMap/methods/btns.js +155 -0
- package/widgets/EodashMap/methods/create-layers-config.js +26 -3
- package/widgets/EodashMap/methods/index.js +2 -1
- package/widgets/EodashProcess/ProcessList.vue +2 -3
- package/widgets/EodashProcess/index.vue +19 -70
- package/widgets/EodashProcess/methods/async.js +1 -1
- package/widgets/EodashProcess/methods/composables.js +13 -6
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +20 -7
- package/widgets/EodashProcess/methods/handling.js +100 -22
- package/widgets/EodashProcess/methods/outputs.js +44 -4
- package/widgets/EodashProcess/methods/utils.js +11 -1
- package/widgets/EodashStacInfo.vue +10 -23
- package/widgets/ExportState.vue +9 -15
- package/dist/client/EodashMapBtns-nFY6MIAX.js +0 -301
- package/dist/client/MobileLayout-BfBeF-JF.js +0 -118
- package/dist/client/asWebComponent-DdguWGDI.js +0 -8967
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,11 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
enableBackToPOIs: true,
|
|
37
37
|
enableSearch: true,
|
|
38
|
+
enableGlobe: true,
|
|
39
|
+
// searchParams: {
|
|
40
|
+
// countrycode: "gb,ie,fr"
|
|
41
|
+
// bounds: "-84.26514,41.58998,-77.54150,46.14246"
|
|
42
|
+
// },
|
|
38
43
|
},
|
|
39
44
|
btnsPosition: {
|
|
40
45
|
x: "12/9/9",
|
|
@@ -71,6 +76,11 @@ export default {
|
|
|
71
76
|
layout: { x: 0, y: 1, w: "3/3/2", h: 11 },
|
|
72
77
|
widget: {
|
|
73
78
|
name: "EodashLayerControl",
|
|
79
|
+
properties: {
|
|
80
|
+
cssVars: {
|
|
81
|
+
"--list-padding": "1rem",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
74
84
|
},
|
|
75
85
|
},
|
|
76
86
|
{
|
|
@@ -120,5 +130,17 @@ export default {
|
|
|
120
130
|
},
|
|
121
131
|
},
|
|
122
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
|
+
},
|
|
123
145
|
],
|
|
124
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
|