@eodash/eodash 5.7.0 → 5.8.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/components/EodashOverlay.vue +27 -4
- package/core/client/composables/DefineEodash.js +0 -1
- package/core/client/composables/DefineWidgets.js +3 -1
- package/core/client/eodashSTAC/EodashCollection.js +87 -24
- package/core/client/eodashSTAC/cql.js +64 -0
- package/core/client/eodashSTAC/createLayers.js +353 -187
- package/core/client/eodashSTAC/helpers.js +694 -110
- package/core/client/eodashSTAC/mosaic.js +422 -0
- package/core/client/plugins/axios.js +31 -1
- package/core/client/store/actions.js +1 -1
- package/core/client/store/stac.js +54 -4
- package/core/client/store/states.js +20 -2
- package/core/client/types.ts +152 -28
- package/core/client/utils/bands-editor/exampleSchema.json +50 -50
- package/core/client/utils/states.js +10 -0
- package/dist/client/{DashboardLayout-kRsmsNW5.js → DashboardLayout-DEs4f_Vy.js} +2 -2
- package/dist/client/{DynamicWebComponent-CnKhYo0K.js → DynamicWebComponent-PvnV88BA.js} +1 -1
- package/dist/client/EodashChart-D-3AGKZY.js +260 -0
- package/dist/client/{EodashDatePicker-CMPDT-ce.js → EodashDatePicker-Dm_goZzs.js} +3 -3
- package/dist/client/{EodashItemFilter-BpdA8QQa.js → EodashItemFilter-CJy3zYzD.js} +2 -1
- package/dist/client/{EodashLayerControl-BHpDA4_0.js → EodashLayerControl-rL8UnpkA.js} +55 -33
- package/dist/client/{EodashLayoutSwitcher-B1fRUt7G.js → EodashLayoutSwitcher-ZRlESI9O.js} +3 -3
- package/dist/client/{EodashMapBtns-Cpned0tc.js → EodashMapBtns-CG7u2Aq8.js} +227 -112
- package/dist/client/EodashStacInfo-CJhhxthD.js +169 -0
- package/dist/client/{EodashTools-1zHz26gv.js → EodashTools-CWyK8QJT.js} +4 -4
- package/dist/client/{ExportState-DbOm8hBI.js → ExportState-BXhy5TOU.js} +20 -174
- package/dist/client/{Footer-BKg-VVkj.js → Footer-DZPvnhcT.js} +1 -1
- package/dist/client/{Header-DCrwCvmY.js → Header-CiGsDE_a.js} +2 -2
- package/dist/client/{MobileLayout-vWSHpluo.js → MobileLayout-BJHW7x5V.js} +2 -2
- package/dist/client/{PopUp-9uimfK49.js → PopUp-7_XnhvCc.js} +4 -168
- package/dist/client/{ProcessList-CTTIZa06.js → ProcessList-LL_UCbvc.js} +5 -5
- package/dist/client/VDivider-DWYM0WUr.js +168 -0
- package/dist/client/{VImg-CrmB76ZY.js → VImg-B75dgw2K.js} +2 -2
- package/dist/client/{VMain-OKZNpcEG.js → VMain-DvMmOL4f.js} +1 -1
- package/dist/client/{VTooltip-CJw2FyWk.js → VTooltip-ClWHUmWL.js} +2 -2
- package/dist/client/{WidgetsContainer-BaWOnE5R.js → WidgetsContainer-BqaWs4ch.js} +1 -1
- package/dist/client/{asWebComponent-BHWpMuE3.js → asWebComponent-IZanwL-A.js} +677 -379
- package/dist/client/{async-DSKj6g1f.js → async-CiNIOBVz.js} +31 -29
- package/dist/client/{create-layers-config-CBoYedqB.js → create-layers-config-3S3y_kZg.js} +17 -17
- package/dist/client/dialog-transition-c4ZSnzac.js +170 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-DH51zPUr.js → forwardRefs-B-c1_6yo.js} +8 -87
- package/dist/client/{handling-BrcDDlgS.js → handling-NvY8Csry.js} +3 -4
- package/dist/client/{helpers-DjZVl_WF.js → helpers-BFuh19CP.js} +1094 -194
- package/dist/client/{index-1JKE68n3.js → index-1wMAyuNL.js} +219 -67
- package/dist/client/{index-CSG_JoOA.js → index-B8jGJSTA.js} +62 -56
- package/dist/client/{index-Cu3-13Xg.js → index-BKQQJkhy.js} +167 -61
- package/dist/client/index-D0jUyol8.js +3167 -0
- package/dist/client/{index-CUjl-ZsI.js → index-KGxz5Egv.js} +2 -2
- package/dist/client/mosaic-vHvSuih6.js +459 -0
- package/dist/client/templates.js +251 -121
- package/dist/client/{transition-OHcz5Qq1.js → transition-BkyUsZh_.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/types.d.ts +4 -0
- package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +57 -25
- package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +42 -23
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +118 -19
- package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
- package/dist/types/core/client/store/stac.d.ts +38 -8
- package/dist/types/core/client/store/states.d.ts +24 -2
- package/dist/types/core/client/types.d.ts +128 -24
- package/dist/types/core/client/utils/states.d.ts +12 -0
- package/dist/types/templates/baseConfig.d.ts +1 -100
- package/dist/types/templates/compare.d.ts +32 -3
- package/dist/types/templates/expert.d.ts +18 -0
- package/dist/types/templates/explore.d.ts +10 -1
- package/dist/types/templates/lite.d.ts +11 -0
- package/dist/types/widgets/EodashChart.vue.d.ts +5 -3
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +129 -2
- package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +28 -6
- package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +17 -4
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +16 -4
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +35 -16
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +14 -10
- package/dist/types/widgets/EodashMap/index.vue.d.ts +86 -37
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
- package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -1
- package/dist/types/widgets/EodashMap/methods/use-map-loading.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +5 -3
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
- package/dist/types/widgets/EodashProcess/states.d.ts +1 -1
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +3 -8
- package/dist/types/widgets/EodashTimeSlider/types.d.ts +6 -16
- package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
- package/package.json +34 -34
- package/templates/baseConfig.js +37 -6
- package/templates/compare.js +61 -7
- package/templates/expert.js +24 -2
- package/templates/explore.js +12 -5
- package/templates/lite.js +13 -0
- package/widgets/EodashChart.vue +162 -21
- package/widgets/EodashItemCatalog/index.vue +363 -35
- package/widgets/EodashItemCatalog/methods/filters.js +134 -70
- package/widgets/EodashItemCatalog/methods/handlers.js +113 -19
- package/widgets/EodashItemCatalog/methods/map.js +141 -28
- package/widgets/EodashLayerControl.vue +51 -25
- package/widgets/EodashMap/EodashMapBtns.vue +109 -48
- package/widgets/EodashMap/index.vue +91 -105
- package/widgets/EodashMap/methods/btns.js +64 -31
- package/widgets/EodashMap/methods/create-layers-config.js +16 -16
- package/widgets/EodashMap/methods/index.js +71 -8
- package/widgets/EodashMap/methods/use-map-loading.js +58 -0
- package/widgets/EodashProcess/index.vue +136 -16
- package/widgets/EodashProcess/methods/composables.js +13 -0
- package/widgets/EodashProcess/methods/outputs.js +0 -1
- package/widgets/EodashProcess/methods/utils.js +29 -27
- package/widgets/EodashProcess/states.js +1 -1
- package/widgets/EodashStacInfo.vue +64 -2
- package/widgets/EodashTimeSlider/index.vue +58 -2
- package/widgets/EodashTimeSlider/methods/index.js +5 -48
- package/widgets/EodashTimeSlider/types.ts +7 -17
- package/widgets/ExportState.vue +13 -4
- package/dist/client/EodashChart-CLDqE93C.js +0 -144
- package/dist/client/EodashStacInfo-BQspAHKH.js +0 -107
- package/dist/client/index-5Jhsa8Xe.js +0 -570
package/widgets/EodashChart.vue
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="container">
|
|
3
|
-
<div
|
|
2
|
+
<div ref="container" class="eodash-chart-wrapper">
|
|
3
|
+
<div
|
|
4
|
+
class="chart-frame"
|
|
5
|
+
:style="{ paddingBottom: hasBindings ? '25px' : '0px' }"
|
|
6
|
+
>
|
|
4
7
|
<button
|
|
5
8
|
v-if="usedChartData && usedChartSpec"
|
|
6
9
|
class="chart-toggle"
|
|
@@ -12,9 +15,8 @@
|
|
|
12
15
|
</svg>
|
|
13
16
|
</button>
|
|
14
17
|
<eox-chart
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.spec="toRaw(usedChartSpec)"
|
|
18
|
+
v-if="usedChartData && renderedChartSpec"
|
|
19
|
+
.spec="toRaw(renderedChartSpec)"
|
|
18
20
|
:key="chartRenderKey"
|
|
19
21
|
.dataValues="toRaw(usedChartData)"
|
|
20
22
|
@click:item="onChartClick"
|
|
@@ -33,6 +35,8 @@ import {
|
|
|
33
35
|
ref,
|
|
34
36
|
onMounted,
|
|
35
37
|
onBeforeUnmount,
|
|
38
|
+
watch,
|
|
39
|
+
nextTick,
|
|
36
40
|
} from "vue";
|
|
37
41
|
import { onChartClick } from "./EodashProcess/methods/handling";
|
|
38
42
|
import {
|
|
@@ -51,6 +55,7 @@ const { enableCompare, vegaEmbedOptions } = defineProps({
|
|
|
51
55
|
default: false,
|
|
52
56
|
},
|
|
53
57
|
vegaEmbedOptions: {
|
|
58
|
+
/** @type {import("vue").PropType<import("vega-embed").EmbedOptions>} */
|
|
54
59
|
type: Object,
|
|
55
60
|
default() {
|
|
56
61
|
return { actions: true };
|
|
@@ -66,27 +71,136 @@ const usedChartSpec = computed(() => {
|
|
|
66
71
|
return enableCompare ? compareChartSpec.value : chartSpec.value;
|
|
67
72
|
});
|
|
68
73
|
|
|
74
|
+
const hasBindings = computed(() => {
|
|
75
|
+
const spec = usedChartSpec.value;
|
|
76
|
+
if (!spec) return false;
|
|
77
|
+
|
|
78
|
+
// Recursively search for any object with a 'bind' key that represents a physical UI input
|
|
79
|
+
let found = false;
|
|
80
|
+
/** @param {any} obj */
|
|
81
|
+
const searchBindings = (obj) => {
|
|
82
|
+
if (found || !obj || typeof obj !== "object") return;
|
|
83
|
+
|
|
84
|
+
// UI bindings that take up physical DOM space are objects with an 'input' property.
|
|
85
|
+
if (
|
|
86
|
+
"bind" in obj &&
|
|
87
|
+
typeof obj.bind === "object" &&
|
|
88
|
+
obj.bind !== null &&
|
|
89
|
+
"input" in obj.bind
|
|
90
|
+
) {
|
|
91
|
+
found = true;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
Object.values(obj).forEach(searchBindings);
|
|
95
|
+
};
|
|
96
|
+
searchBindings(spec);
|
|
97
|
+
return found;
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const renderedChartSpec = ref(null);
|
|
101
|
+
|
|
102
|
+
watch(
|
|
103
|
+
usedChartSpec,
|
|
104
|
+
(newSpec) => {
|
|
105
|
+
if (!newSpec) {
|
|
106
|
+
renderedChartSpec.value = null;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Create a deep copy so we can safely mutate it
|
|
111
|
+
const adjustedSpec = JSON.parse(JSON.stringify(newSpec));
|
|
112
|
+
|
|
113
|
+
// Force the chart to be fully responsive to its CSS container
|
|
114
|
+
adjustedSpec.height = "container";
|
|
115
|
+
adjustedSpec.width = "container";
|
|
116
|
+
|
|
117
|
+
// Delay passing the spec to eox-chart until the next DOM update cycle.
|
|
118
|
+
// This ensures the dynamic chartStyles are physically applied
|
|
119
|
+
// to the container BEFORE Vega calculates its canvas size.
|
|
120
|
+
nextTick(() => {
|
|
121
|
+
renderedChartSpec.value = adjustedSpec;
|
|
122
|
+
chartRenderKey.value = Math.random(); // Force eox-chart to completely remount
|
|
123
|
+
|
|
124
|
+
// Force a browser-level resize event after the chart mounts.
|
|
125
|
+
// This tells Vega to re-read the container dimensions once the CSS has finished painting.
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
window.dispatchEvent(new Event("resize"));
|
|
128
|
+
}, 150);
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
{ immediate: true },
|
|
132
|
+
);
|
|
133
|
+
|
|
69
134
|
const chartRenderKey = ref(0);
|
|
70
|
-
const frameHeight = ref(225);
|
|
71
135
|
const containerEl = useTemplateRef("container");
|
|
72
136
|
|
|
73
|
-
/**
|
|
74
|
-
@type { MutationObserver | null}
|
|
75
|
-
*/
|
|
137
|
+
/** @type {MutationObserver | null} */
|
|
76
138
|
let observer = null;
|
|
139
|
+
/** @type {number | null} */
|
|
140
|
+
let styleInterval = null;
|
|
77
141
|
|
|
78
142
|
onMounted(() => {
|
|
79
143
|
const el = containerEl.value;
|
|
80
144
|
if (!el) return;
|
|
81
145
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
146
|
+
// Continuously inject basic styling for the bindings form to make it look decent
|
|
147
|
+
styleInterval = window.setInterval(() => {
|
|
148
|
+
if (el) {
|
|
149
|
+
const eoxChart = el.querySelector("eox-chart");
|
|
150
|
+
if (eoxChart && eoxChart.shadowRoot) {
|
|
151
|
+
if (!eoxChart.shadowRoot.querySelector("#eodash-chart-styles")) {
|
|
152
|
+
const style = document.createElement("style");
|
|
153
|
+
style.id = "eodash-chart-styles";
|
|
154
|
+
style.innerHTML = `
|
|
155
|
+
* {
|
|
156
|
+
box-sizing: border-box !important;
|
|
157
|
+
}
|
|
158
|
+
#vis {
|
|
159
|
+
min-height: 100px !important;
|
|
160
|
+
flex: 1 1 auto !important;
|
|
161
|
+
}
|
|
162
|
+
:host, .vega-embed {
|
|
163
|
+
display: flex !important;
|
|
164
|
+
flex-direction: column !important;
|
|
165
|
+
height: 100% !important;
|
|
166
|
+
padding: 0 !important;
|
|
167
|
+
margin: 0 !important;
|
|
168
|
+
}
|
|
169
|
+
.vega-bindings {
|
|
170
|
+
flex: 0 0 auto !important;
|
|
171
|
+
display: flex !important;
|
|
172
|
+
flex-wrap: wrap;
|
|
173
|
+
gap: 2px !important;
|
|
174
|
+
background: rgba(255, 255, 255, 0.85);
|
|
175
|
+
padding: 6px 12px !important;
|
|
176
|
+
border-radius: 6px;
|
|
177
|
+
box-shadow: 0 2px 5px rgba(0,0,0,0.15);
|
|
178
|
+
margin: 0 !important;
|
|
179
|
+
margin-top: -10px !important;
|
|
180
|
+
z-index: 10;
|
|
181
|
+
}
|
|
182
|
+
.vega-bindings:empty {
|
|
183
|
+
display: none !important;
|
|
184
|
+
}
|
|
185
|
+
.vega-embed > canvas, .vega-embed > svg {
|
|
186
|
+
height: 100% !important;
|
|
187
|
+
max-width: 100% !important;
|
|
188
|
+
object-fit: contain;
|
|
189
|
+
}
|
|
190
|
+
.vega-bind {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
gap: 6px;
|
|
194
|
+
margin-bottom: 0 !important;
|
|
195
|
+
}
|
|
196
|
+
`;
|
|
197
|
+
eoxChart.shadowRoot.appendChild(style);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, 200);
|
|
87
202
|
|
|
88
|
-
//
|
|
89
|
-
// we create an observer when display of overlay is not none anymore
|
|
203
|
+
// For mobile view, handle overlay display changes
|
|
90
204
|
const overlay = getOverlayParent(el);
|
|
91
205
|
if (!overlay) return;
|
|
92
206
|
|
|
@@ -94,7 +208,6 @@ onMounted(() => {
|
|
|
94
208
|
const style = getComputedStyle(overlay);
|
|
95
209
|
const visible = style.display !== "none";
|
|
96
210
|
if (visible) {
|
|
97
|
-
// forcibly rerender chart, otherwise size of canvas is 0
|
|
98
211
|
chartRenderKey.value = Math.random();
|
|
99
212
|
}
|
|
100
213
|
});
|
|
@@ -107,13 +220,14 @@ onMounted(() => {
|
|
|
107
220
|
|
|
108
221
|
onBeforeUnmount(() => {
|
|
109
222
|
observer?.disconnect();
|
|
223
|
+
if (styleInterval) window.clearInterval(styleInterval);
|
|
110
224
|
});
|
|
111
225
|
|
|
112
226
|
const chartStyles = computed(() => {
|
|
113
|
-
|
|
114
|
-
height:
|
|
227
|
+
return {
|
|
228
|
+
height: "100%",
|
|
229
|
+
width: "100%",
|
|
115
230
|
};
|
|
116
|
-
return styles;
|
|
117
231
|
});
|
|
118
232
|
|
|
119
233
|
const toggleIcon = computed(() =>
|
|
@@ -124,14 +238,41 @@ function toggleLayout() {
|
|
|
124
238
|
areChartsSeparateLayout.value = !areChartsSeparateLayout.value;
|
|
125
239
|
}
|
|
126
240
|
</script>
|
|
241
|
+
|
|
242
|
+
<style>
|
|
243
|
+
/* Force the outer dashboard panel wrapping this component to utilize 100% height in fullscreen mode */
|
|
244
|
+
.bg-surface:has(.eodash-chart-wrapper) {
|
|
245
|
+
height: 100%;
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-direction: column;
|
|
248
|
+
}
|
|
249
|
+
</style>
|
|
250
|
+
|
|
127
251
|
<style scoped>
|
|
252
|
+
.eodash-chart-wrapper {
|
|
253
|
+
height: 100%; /* Force full height in fullscreen layout */
|
|
254
|
+
flex-grow: 1;
|
|
255
|
+
min-height: 180px; /* Prevent chart from becoming unusably small */
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-direction: column;
|
|
258
|
+
}
|
|
259
|
+
|
|
128
260
|
.chart-frame {
|
|
129
261
|
position: relative;
|
|
262
|
+
flex-grow: 1;
|
|
263
|
+
min-height: 180px; /* Prevent chart from becoming unusably small */
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
eox-chart {
|
|
269
|
+
flex-grow: 1;
|
|
270
|
+
min-height: 0;
|
|
130
271
|
}
|
|
131
272
|
|
|
132
273
|
.chart-toggle {
|
|
133
274
|
position: absolute;
|
|
134
|
-
top:
|
|
275
|
+
top: 8px;
|
|
135
276
|
right: 46px;
|
|
136
277
|
z-index: 2;
|
|
137
278
|
cursor: pointer;
|