@eodash/eodash 5.0.0 → 5.2.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/README.md +1 -0
- package/core/client/App.vue +8 -2
- package/core/client/asWebComponent.js +5 -5
- package/core/client/components/DashboardLayout.vue +43 -26
- package/core/client/components/EodashOverlay.vue +5 -6
- package/core/client/components/ErrorAlert.vue +2 -2
- package/core/client/components/Footer.vue +4 -4
- package/core/client/components/Header.vue +3 -3
- package/core/client/components/MobileLayout.vue +47 -27
- package/core/client/composables/DefineEodash.js +38 -43
- package/core/client/composables/DefineTemplate.js +4 -2
- package/core/client/composables/DefineWidgets.js +14 -8
- package/core/client/composables/index.js +273 -23
- package/core/client/eodashSTAC/EodashCollection.js +84 -62
- package/core/client/eodashSTAC/createLayers.js +30 -0
- package/core/client/eodashSTAC/helpers.js +159 -28
- package/core/client/eodashSTAC/parquet.js +145 -0
- package/core/client/eodashSTAC/triggers.js +6 -3
- package/core/client/plugins/index.js +4 -3
- package/core/client/plugins/vuetify.js +3 -0
- package/core/client/store/actions.js +21 -4
- package/core/client/store/stac.js +93 -56
- package/core/client/store/states.js +15 -5
- package/core/client/types.ts +59 -43
- package/core/client/utils/index.js +79 -0
- package/core/client/utils/keys.js +2 -2
- package/core/client/utils/states.js +30 -5
- package/core/client/views/Dashboard.vue +36 -32
- package/core/client/vite-env.d.ts +7 -0
- package/dist/client/{DashboardLayout-CkWvOMOW.js → DashboardLayout-Dq9Kfe6O.js} +24 -13
- package/dist/client/{DynamicWebComponent-DYBbpvUK.js → DynamicWebComponent-DCBMXskE.js} +1 -1
- package/dist/client/{EodashDatePicker-CALmW3SI.js → EodashDatePicker-DtngxU6s.js} +59 -32
- package/dist/client/{EodashItemFilter-DlQiE713.js → EodashItemFilter-ClQebJQt.js} +20 -10
- package/dist/client/{EodashLayerControl-DEzEbft7.js → EodashLayerControl-BLBds28C.js} +29 -16
- package/dist/client/EodashLayoutSwitcher-DQ8SfVDd.js +61 -0
- package/dist/client/EodashMapBtns-B89_YBDw.js +326 -0
- package/dist/client/{EodashStacInfo-DPPxDkF6.js → EodashStacInfo-Dt1nF06x.js} +3 -18
- package/dist/client/{EodashTools-CUaL9s4H.js → EodashTools-DV5ykmWc.js} +13 -13
- package/dist/client/{ExportState-DjyIZVhl.js → ExportState-B6zZQUmE.js} +57 -52
- package/dist/client/{Footer-DyL0JoWt.js → Footer-DNhXs8k6.js} +15 -13
- package/dist/client/{Header-B5Dgty9l.js → Header-BjhN5JY4.js} +32 -28
- package/dist/client/MobileLayout-JelB6w1G.js +118 -0
- package/dist/client/{PopUp-BfB8s_ki.js → PopUp-CgpvNr3o.js} +18 -10
- package/dist/client/ProcessList-vecpxThi.js +198 -0
- package/dist/client/{VImg-FD1WVphJ.js → VImg-CETuikH2.js} +221 -26
- package/dist/client/{VMain-DJKG4SvM.js → VMain-Ci9DyaGU.js} +7 -7
- package/dist/client/{VTooltip-CfeefrXI.js → VTooltip-J4ac48X7.js} +12 -10
- package/dist/client/{WidgetsContainer-C2TaTdb6.js → WidgetsContainer-CCML4TyV.js} +1 -1
- package/dist/client/asWebComponent-ZyEzWOOf.js +19092 -0
- package/dist/client/async-B7jIrM53.js +804 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{VOverlay-BzOdRu9h.js → forwardRefs-BQclvjMq.js} +332 -28
- package/dist/client/handling-BS24aG1q.js +1227 -0
- package/dist/client/helpers-wXK7Ywio.js +4556 -0
- package/dist/client/index-4UCzZi8B.js +376 -0
- package/dist/client/{index-4CT7Tz83.js → index-9KR-G20t.js} +2 -2
- package/dist/client/{index-CIHH_3dW.js → index-B2XpdgR6.js} +227 -86
- package/dist/client/material-symbols-outlined.woff2 +0 -0
- package/dist/client/material-symbols-rounded.woff2 +0 -0
- package/dist/client/material-symbols-sharp.woff2 +0 -0
- package/dist/client/material-symbols-subset.woff2 +0 -0
- package/dist/client/{ssrBoot-BP7SYRyC.js → ssrBoot-Zgc_Ttvi.js} +2 -2
- package/dist/client/templates.js +840 -0
- package/dist/client/transition-yBii4fu6.js +40 -0
- package/dist/node/cli.js +16 -6
- package/dist/node/types.d.ts +1 -1
- package/dist/types/core/client/App.vue.d.ts +2 -2
- package/dist/types/core/client/asWebComponent.d.ts +1 -1
- package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +1 -3
- package/dist/types/core/client/components/Footer.vue.d.ts +1 -105
- package/dist/types/core/client/components/IframeWrapper.vue.d.ts +1 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +1 -324
- package/dist/types/core/client/composables/DefineEodash.d.ts +2 -2
- package/dist/types/core/client/composables/DefineTemplate.d.ts +1 -1
- package/dist/types/core/client/composables/DefineWidgets.d.ts +4 -4
- package/dist/types/core/client/composables/index.d.ts +24 -2
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +9 -6
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +25 -5
- package/dist/types/core/client/eodashSTAC/parquet.d.ts +2 -0
- package/dist/types/core/client/plugins/vuetify.d.ts +7 -4
- package/dist/types/core/client/store/actions.d.ts +3 -2
- package/dist/types/core/client/store/stac.d.ts +16 -13
- package/dist/types/core/client/store/states.d.ts +14 -4
- package/dist/types/core/client/types.d.ts +46 -31
- package/dist/types/core/client/utils/index.d.ts +2 -0
- package/dist/types/core/client/utils/keys.d.ts +4 -4
- package/dist/types/core/client/utils/states.d.ts +59 -47
- package/dist/types/core/client/views/Dashboard.vue.d.ts +2 -2
- package/dist/types/templates/baseConfig.d.ts +4 -0
- package/dist/types/templates/compare.d.ts +185 -0
- package/dist/types/templates/expert.d.ts +147 -0
- package/dist/types/templates/index.d.ts +6 -0
- package/dist/types/templates/light.d.ts +154 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +1 -458
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +3 -3
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +14 -7
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +1 -3
- package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +12 -8
- package/dist/types/widgets/EodashMap/index.vue.d.ts +9 -4
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +8 -1
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +8 -4
- package/dist/types/widgets/EodashProcess/methods/async.d.ts +19 -18
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +3 -2
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/index.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.d.ts +6 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.d.ts +4 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +5 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/index.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +12 -5
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +72 -41
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +41 -21
- package/dist/types/widgets/EodashProcess/states.d.ts +11 -0
- package/dist/types/widgets/EodashProcess/types.d.ts +41 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +14 -14
- package/dist/types/widgets/EodashTools.vue.d.ts +3 -3
- package/dist/types/widgets/ExportState.vue.d.ts +1 -1
- package/dist/types/widgets/PopUp.vue.d.ts +11 -16
- package/dist/types/widgets/WidgetsContainer.vue.d.ts +3 -6
- package/package.json +55 -45
- package/templates/baseConfig.js +68 -0
- package/templates/compare.js +142 -0
- package/templates/expert.js +124 -0
- package/templates/index.js +8 -0
- package/templates/light.js +139 -0
- package/widgets/EodashDatePicker.vue +80 -31
- package/widgets/EodashItemFilter.vue +26 -11
- package/widgets/EodashLayerControl.vue +20 -11
- package/widgets/EodashLayoutSwitcher.vue +6 -3
- package/widgets/EodashMap/EodashMapBtns.vue +269 -0
- package/widgets/EodashMap/index.vue +255 -45
- package/widgets/EodashMap/methods/create-layers-config.js +4 -3
- package/widgets/EodashMap/methods/index.js +33 -23
- package/widgets/EodashProcess/ProcessList.vue +47 -11
- package/widgets/EodashProcess/index.vue +55 -20
- package/widgets/EodashProcess/methods/async.js +99 -60
- package/widgets/EodashProcess/methods/composables.js +21 -14
- package/widgets/EodashProcess/methods/custom-endpoints/chart/index.js +35 -0
- package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +275 -0
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +132 -0
- package/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.js +94 -0
- package/widgets/EodashProcess/methods/custom-endpoints/layers/index.js +33 -0
- package/widgets/EodashProcess/methods/handling.js +127 -80
- package/widgets/EodashProcess/methods/outputs.js +376 -125
- package/widgets/EodashProcess/methods/utils.js +442 -10
- package/widgets/EodashProcess/states.js +13 -0
- package/widgets/EodashProcess/types.ts +46 -0
- package/widgets/EodashStacInfo.vue +2 -17
- package/widgets/EodashTools.vue +13 -13
- package/widgets/WidgetsContainer.vue +1 -1
- package/core/client/eodash.js +0 -454
- package/dist/client/EodashLayoutSwitcher-CDeCV8F-.js +0 -52
- package/dist/client/EodashMapBtns-CktQCfa-.js +0 -131
- package/dist/client/MobileLayout-CRsg_5Q4.js +0 -1217
- package/dist/client/ProcessList-DTefwQZx.js +0 -484
- package/dist/client/asWebComponent-CLhcT715.js +0 -12479
- package/dist/client/eo-dash.css +0 -5
- package/dist/client/forwardRefs-Bon_Kku1.js +0 -245
- package/dist/client/index-Bm9cbtx5.js +0 -201
- package/dist/client/index-DiGDvTQU.js +0 -780
- package/dist/client/transition-C5I57hn6.js +0 -37
- package/dist/types/core/client/eodash.d.ts +0 -8
- package/widgets/EodashMapBtns.vue +0 -113
package/core/client/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @group Eodash */
|
|
2
|
-
export interface WebComponentProps
|
|
2
|
+
export interface WebComponentProps {
|
|
3
3
|
/**
|
|
4
4
|
* Imports web component file, either using a URL or an import function.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@ export interface WebComponentProps<T extends ExecutionTime = "compiletime"> {
|
|
|
14
14
|
* import maps are not available in runtime config
|
|
15
15
|
* :::
|
|
16
16
|
*/
|
|
17
|
-
link?:
|
|
17
|
+
link?: string | (() => Promise<unknown>);
|
|
18
18
|
/**
|
|
19
19
|
* Exported Constructor, needs to be provided if the web component is not
|
|
20
20
|
* registered in by the [link](#link) provided
|
|
@@ -58,33 +58,47 @@ export interface WidgetsContainerProps {
|
|
|
58
58
|
* @group Eodash
|
|
59
59
|
* */
|
|
60
60
|
export interface Layout {
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Horizontal start position. Integer between 1 and 12 or numbers seperated by "/" for different breakpoints
|
|
63
|
+
* @example "3/2/1"
|
|
64
|
+
*/
|
|
65
|
+
x: number | string;
|
|
66
|
+
/**
|
|
67
|
+
* Vertical start position. Integer between 1 and 12 or numbers seperated by "/" for different breakpoints
|
|
68
|
+
* @example "3/2/1"
|
|
69
|
+
*/
|
|
70
|
+
y: number | string;
|
|
71
|
+
/**
|
|
72
|
+
* Width. Integer between 1 and 12 or numbers seperated by "/" for different breakpoints
|
|
73
|
+
* @example "3/2/1"
|
|
74
|
+
*/
|
|
75
|
+
w: number | string;
|
|
76
|
+
/**
|
|
77
|
+
* Height. Integer between 1 and 12 or numbers seperated by "/" for different breakpoints
|
|
78
|
+
* @example "3/2/1"
|
|
79
|
+
*/
|
|
80
|
+
h: number | string;
|
|
69
81
|
}
|
|
70
82
|
/**
|
|
71
83
|
* Widget type: `web-component` API
|
|
72
84
|
*
|
|
73
85
|
* @group Eodash
|
|
74
86
|
*/
|
|
75
|
-
export interface WebComponentWidget
|
|
87
|
+
export interface WebComponentWidget {
|
|
76
88
|
id: number | string | symbol;
|
|
77
89
|
title: string;
|
|
78
90
|
/** Widget position and size. */
|
|
79
91
|
layout: Layout;
|
|
80
|
-
widget: WebComponentProps
|
|
92
|
+
widget: WebComponentProps;
|
|
81
93
|
type: "web-component";
|
|
82
94
|
}
|
|
83
95
|
// Internal Widget Interfaces
|
|
84
96
|
/** @group Widgets */
|
|
85
97
|
export interface TEodashMap {
|
|
86
98
|
name: "EodashMap";
|
|
87
|
-
properties?: InstanceType<
|
|
99
|
+
properties?: InstanceType<
|
|
100
|
+
typeof import("^/EodashMap/index.vue").default
|
|
101
|
+
>["$props"];
|
|
88
102
|
}
|
|
89
103
|
|
|
90
104
|
/** @group Widgets */
|
|
@@ -123,7 +137,7 @@ export interface TEodashStacInfo {
|
|
|
123
137
|
export interface TEodashProcess {
|
|
124
138
|
name: "EodashProcess";
|
|
125
139
|
properties?: InstanceType<
|
|
126
|
-
typeof import("^/EodashProcess.vue").default
|
|
140
|
+
typeof import("^/EodashProcess/index.vue").default
|
|
127
141
|
>["$props"];
|
|
128
142
|
}
|
|
129
143
|
|
|
@@ -219,7 +233,7 @@ export interface IFrameWidget {
|
|
|
219
233
|
type: "iframe";
|
|
220
234
|
}
|
|
221
235
|
/** @group Eodash */
|
|
222
|
-
export interface FunctionalWidget
|
|
236
|
+
export interface FunctionalWidget {
|
|
223
237
|
/**
|
|
224
238
|
* Provides a functional definition of widgets, gets triggered whenever a STAC
|
|
225
239
|
* object is selected, and only renders the returned configuration if the `id`
|
|
@@ -228,20 +242,17 @@ export interface FunctionalWidget<T extends ExecutionTime = "compiletime"> {
|
|
|
228
242
|
* @param selectedSTAC - Currently selected STAC object
|
|
229
243
|
*/
|
|
230
244
|
defineWidget: (
|
|
231
|
-
selectedSTAC:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
| import("stac-ts").StacItem
|
|
235
|
-
| null,
|
|
236
|
-
) => StaticWidget<T> | undefined | null;
|
|
245
|
+
selectedSTAC: import("stac-ts").StacCollection | null,
|
|
246
|
+
selectedCompareSTAC?: import("stac-ts").StacCollection | null,
|
|
247
|
+
) => StaticWidget | undefined | null | false;
|
|
237
248
|
}
|
|
238
249
|
/**
|
|
239
250
|
* There are 3 types of Widgets:
|
|
240
251
|
*
|
|
241
252
|
* @group Eodash
|
|
242
253
|
*/
|
|
243
|
-
export type StaticWidget
|
|
244
|
-
| WebComponentWidget
|
|
254
|
+
export type StaticWidget =
|
|
255
|
+
| WebComponentWidget
|
|
245
256
|
| InternalComponentWidget
|
|
246
257
|
| IFrameWidget;
|
|
247
258
|
/**
|
|
@@ -256,16 +267,14 @@ export type StaticWidget<T extends ExecutionTime = "compiletime"> =
|
|
|
256
267
|
*
|
|
257
268
|
* @group Eodash
|
|
258
269
|
*/
|
|
259
|
-
export type Widget
|
|
260
|
-
| StaticWidget<T>
|
|
261
|
-
| FunctionalWidget<T>;
|
|
270
|
+
export type Widget = StaticWidget | FunctionalWidget;
|
|
262
271
|
|
|
263
272
|
/** @group Eodash */
|
|
264
|
-
export type BackgroundWidget
|
|
265
|
-
| Omit<WebComponentWidget
|
|
273
|
+
export type BackgroundWidget =
|
|
274
|
+
| Omit<WebComponentWidget, "layout" | "title" | "slidable">
|
|
266
275
|
| Omit<InternalComponentWidget, "layout" | "title" | "slidable">
|
|
267
276
|
| Omit<IFrameWidget, "layout" | "title" | "slidable">
|
|
268
|
-
| Omit<FunctionalWidget
|
|
277
|
+
| Omit<FunctionalWidget, "layout" | "slidable">;
|
|
269
278
|
/**
|
|
270
279
|
* Dashboard rendered widgets specification. 3 types of widgets are supported:
|
|
271
280
|
* `"iframe"`, `"internal"`, and `"web-component"`. A specific object should be
|
|
@@ -273,30 +282,25 @@ export type BackgroundWidget<T extends ExecutionTime = "compiletime"> =
|
|
|
273
282
|
*
|
|
274
283
|
* @group Eodash
|
|
275
284
|
*/
|
|
276
|
-
export interface Template
|
|
285
|
+
export interface Template {
|
|
277
286
|
/** Gap between widgets */
|
|
278
287
|
gap?: number;
|
|
279
288
|
/** Loading widget */
|
|
280
|
-
loading?: BackgroundWidget
|
|
289
|
+
loading?: BackgroundWidget;
|
|
281
290
|
/**
|
|
282
291
|
* Widget rendered as the dashboard background. Has the same specifications of
|
|
283
292
|
* {@link Widget} without the `title` and `layout` properties
|
|
284
293
|
*/
|
|
285
|
-
background?: BackgroundWidget
|
|
294
|
+
background?: BackgroundWidget;
|
|
286
295
|
/** Array of widgets that will be rendered as dashboard panels. */
|
|
287
|
-
widgets: Widget
|
|
296
|
+
widgets: Widget[];
|
|
288
297
|
}
|
|
289
298
|
/** @group Eodash */
|
|
290
|
-
export type MultiTemplates
|
|
291
|
-
string,
|
|
292
|
-
Template<T>
|
|
293
|
-
>;
|
|
299
|
+
export type MultiTemplates = Record<string, Template>;
|
|
294
300
|
|
|
295
301
|
/** @ignore */
|
|
296
302
|
export type StacEndpoint = `${string}/catalog.json`;
|
|
297
303
|
|
|
298
|
-
/** @group Eodash */
|
|
299
|
-
type ExecutionTime = "runtime" | "compiletime";
|
|
300
304
|
/** @group Eodash */
|
|
301
305
|
export interface EodashFont {
|
|
302
306
|
/**
|
|
@@ -312,9 +316,13 @@ export interface EodashFont {
|
|
|
312
316
|
*
|
|
313
317
|
* @group Eodash
|
|
314
318
|
*/
|
|
315
|
-
export type Eodash
|
|
319
|
+
export type Eodash = {
|
|
316
320
|
/** Instance ID. */
|
|
317
321
|
id?: string;
|
|
322
|
+
/** Object containing potential special configuration options */
|
|
323
|
+
options?: {
|
|
324
|
+
useSubCode?: boolean;
|
|
325
|
+
};
|
|
318
326
|
/** Root STAC catalog endpoint */
|
|
319
327
|
stacEndpoint: StacEndpoint;
|
|
320
328
|
/** Brand specifications. */
|
|
@@ -338,7 +346,7 @@ export type Eodash<T extends ExecutionTime = "compiletime"> = {
|
|
|
338
346
|
* Dashboard theme as a custom [vuetifyJs
|
|
339
347
|
* theme](https://vuetifyjs.com/en/features/theme/).
|
|
340
348
|
*/
|
|
341
|
-
theme?: import("vuetify
|
|
349
|
+
theme?: import("vuetify").ThemeDefinition & {
|
|
342
350
|
collectionsPalette?: string[];
|
|
343
351
|
};
|
|
344
352
|
/** Text applied to the footer. */
|
|
@@ -347,11 +355,11 @@ export type Eodash<T extends ExecutionTime = "compiletime"> = {
|
|
|
347
355
|
} & (
|
|
348
356
|
| {
|
|
349
357
|
/** Template configuration */
|
|
350
|
-
template: Template
|
|
358
|
+
template: Template;
|
|
351
359
|
}
|
|
352
360
|
| {
|
|
353
361
|
/** Multiple templates configuration */
|
|
354
|
-
templates: MultiTemplates
|
|
362
|
+
templates: MultiTemplates;
|
|
355
363
|
}
|
|
356
364
|
);
|
|
357
365
|
/////////
|
|
@@ -436,3 +444,11 @@ export type EodashStyleJson = import("ol/style/flat").FlatStyleLike & {
|
|
|
436
444
|
jsonform?: import("json-schema").JSONSchema7;
|
|
437
445
|
tooltip?: { id: string; title?: string; appendix?: string }[];
|
|
438
446
|
};
|
|
447
|
+
|
|
448
|
+
export type LayersEventBusKeys =
|
|
449
|
+
| "layers:updated"
|
|
450
|
+
| "time:updated"
|
|
451
|
+
| "process:updated"
|
|
452
|
+
| "compareLayers:updated"
|
|
453
|
+
| "compareTime:updated"
|
|
454
|
+
| "compareProcess:updated";
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import log from "loglevel";
|
|
2
2
|
import { collectionsPalette } from "./states";
|
|
3
|
+
import {
|
|
4
|
+
extractCollectionUrls,
|
|
5
|
+
generateLinksFromItems,
|
|
6
|
+
revokeCollectionBlobUrls,
|
|
7
|
+
} from "@/eodashSTAC/helpers";
|
|
8
|
+
import { EodashCollection } from "@/eodashSTAC/EodashCollection";
|
|
9
|
+
import { toAbsolute } from "stac-js/src/http.js";
|
|
10
|
+
import { readParquetItems } from "@/eodashSTAC/parquet";
|
|
3
11
|
import WebFontLoader from "webfontloader";
|
|
4
12
|
|
|
5
13
|
/**
|
|
@@ -141,3 +149,74 @@ export const setCollectionsPalette = (colors) => {
|
|
|
141
149
|
collectionsPalette.splice(0, collectionsPalette.length);
|
|
142
150
|
collectionsPalette.push(...colors);
|
|
143
151
|
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Updates the eodash collections by fetching and processing collection data from specified URLs
|
|
155
|
+
* @param {import("stac-ts").StacCollection} selectedStac - The indicator object
|
|
156
|
+
* @param {string} absoluteUrl - The absolute indicator URL
|
|
157
|
+
* @param {import('@/eodashSTAC/EodashCollection').EodashCollection[]} eodashCollections - The array of existing eodash collections to be updated
|
|
158
|
+
* @param {string[]} colorPalette - The color palette to assign to each collection
|
|
159
|
+
* @async
|
|
160
|
+
* @description This function extracts collection URLs from the indicator, fetches collection data,
|
|
161
|
+
* processes parquet items if available, and updates the eodashCollections array with new collection data.
|
|
162
|
+
* Each collection is assigned a color from a predefined palette.
|
|
163
|
+
*/
|
|
164
|
+
export const updateEodashCollections = async (
|
|
165
|
+
eodashCollections,
|
|
166
|
+
selectedStac,
|
|
167
|
+
absoluteUrl,
|
|
168
|
+
colorPalette,
|
|
169
|
+
) => {
|
|
170
|
+
// init eodash collections
|
|
171
|
+
const collectionUrls = extractCollectionUrls(selectedStac, absoluteUrl);
|
|
172
|
+
|
|
173
|
+
await Promise.all(
|
|
174
|
+
collectionUrls.map((cu, idx) => {
|
|
175
|
+
return new Promise((resolve, _reject) => {
|
|
176
|
+
const ec = new EodashCollection(cu);
|
|
177
|
+
ec.fetchCollection().then((col) => {
|
|
178
|
+
// assign color from the palette
|
|
179
|
+
ec.color = colorPalette[idx % colorPalette.length];
|
|
180
|
+
|
|
181
|
+
const parquetAsset = Object.values(col.assets ?? {}).find(
|
|
182
|
+
(asset) =>
|
|
183
|
+
asset.type === "application/vnd.apache.parquet" &&
|
|
184
|
+
asset.roles?.includes("collection-mirror"),
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
if (!parquetAsset) {
|
|
188
|
+
resolve(ec);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
readParquetItems(toAbsolute(parquetAsset.href, cu)).then((items) => {
|
|
193
|
+
col.links.push(...generateLinksFromItems(items));
|
|
194
|
+
resolve(ec);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
}),
|
|
199
|
+
).then(async (collections) => {
|
|
200
|
+
// revoke old blob urls in the previous collections. see generateLinksFromItems in "../eodashSTAC/helpers.js"
|
|
201
|
+
eodashCollections.forEach((ec) => {
|
|
202
|
+
revokeCollectionBlobUrls(ec);
|
|
203
|
+
});
|
|
204
|
+
// empty array from old collections
|
|
205
|
+
eodashCollections.splice(0, eodashCollections.length);
|
|
206
|
+
// update eodashCollections
|
|
207
|
+
eodashCollections.push(...collections);
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @param {Element | string} selector
|
|
213
|
+
*/
|
|
214
|
+
export const getElement = (selector) => {
|
|
215
|
+
const eoDash = document.querySelector("eo-dash");
|
|
216
|
+
if (!eoDash) {
|
|
217
|
+
//@ts-expect-error selectior can be a string or an Element
|
|
218
|
+
return document.querySelector(selector);
|
|
219
|
+
}
|
|
220
|
+
//@ts-expect-error selectior can be a string or an Element
|
|
221
|
+
return eoDash.shadowRoot?.querySelector(selector);
|
|
222
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `eodash` injection key.
|
|
3
|
-
*
|
|
3
|
+
* @type {import("vue").InjectionKey<import("@/types").Eodash>}
|
|
4
4
|
* @see {@link "@/plugins/index.js"}
|
|
5
5
|
*/
|
|
6
6
|
export const eodashKey = Symbol("eodash");
|
|
7
|
-
/** @type {import("@vueuse/core").EventBusKey<"
|
|
7
|
+
/** @type {import("@vueuse/core").EventBusKey<import("@/types").LayersEventBusKeys>} */
|
|
8
8
|
export const eoxLayersKey = Symbol("eoxMapLayers");
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
mdiCurrencyEur,
|
|
4
4
|
mdiHospitalBoxOutline,
|
|
5
5
|
mdiImageFilterHdr,
|
|
6
|
+
mdiLeaf,
|
|
7
|
+
mdiLightningBolt,
|
|
6
8
|
mdiSetCenter,
|
|
9
|
+
mdiSnowflake,
|
|
7
10
|
mdiWater,
|
|
8
11
|
mdiWeatherWindy,
|
|
9
12
|
} from "@mdi/js";
|
|
@@ -27,8 +30,8 @@ export const eodashCollections = shallowReactive([]);
|
|
|
27
30
|
*/
|
|
28
31
|
export const eodashCompareCollections = shallowReactive([]);
|
|
29
32
|
|
|
30
|
-
/** whether the
|
|
31
|
-
export const
|
|
33
|
+
/** whether it's the first load of the app, used to track if there are params in the url */
|
|
34
|
+
export const isFirstLoad = ref(false);
|
|
32
35
|
|
|
33
36
|
/**
|
|
34
37
|
* Current value of the layer control JSON form for the latest layer the user interacted with.
|
|
@@ -66,13 +69,21 @@ export const dataThemesBrands = {
|
|
|
66
69
|
icon: mdiWater,
|
|
67
70
|
color: "#73A6C7",
|
|
68
71
|
},
|
|
72
|
+
oceans: {
|
|
73
|
+
icon: mdiWater,
|
|
74
|
+
color: "#6DA2C5",
|
|
75
|
+
},
|
|
69
76
|
land: {
|
|
70
77
|
icon: mdiImageFilterHdr,
|
|
71
78
|
color: "#019E73",
|
|
72
79
|
},
|
|
73
80
|
health: {
|
|
74
81
|
icon: mdiHospitalBoxOutline,
|
|
75
|
-
color: "#
|
|
82
|
+
color: "#32322C",
|
|
83
|
+
},
|
|
84
|
+
"covid-19": {
|
|
85
|
+
icon: mdiHospitalBoxOutline,
|
|
86
|
+
color: "#32322C",
|
|
76
87
|
},
|
|
77
88
|
combined: {
|
|
78
89
|
icon: mdiSetCenter,
|
|
@@ -82,10 +93,24 @@ export const dataThemesBrands = {
|
|
|
82
93
|
icon: mdiWeatherWindy,
|
|
83
94
|
color: "#475faf",
|
|
84
95
|
},
|
|
96
|
+
atmosphere: {
|
|
97
|
+
icon: mdiWeatherWindy,
|
|
98
|
+
color: "#475faf",
|
|
99
|
+
},
|
|
85
100
|
economy: {
|
|
86
101
|
icon: mdiCurrencyEur,
|
|
87
102
|
color: "#8E81AF",
|
|
88
103
|
},
|
|
104
|
+
biomass: {
|
|
105
|
+
icon: mdiLeaf,
|
|
106
|
+
color: "#009E73",
|
|
107
|
+
},
|
|
108
|
+
extremes: {
|
|
109
|
+
icon: mdiLightningBolt,
|
|
110
|
+
color: "#a1280a",
|
|
111
|
+
},
|
|
112
|
+
cryosphere: {
|
|
113
|
+
icon: mdiSnowflake,
|
|
114
|
+
color: "#42C7B8",
|
|
115
|
+
},
|
|
89
116
|
};
|
|
90
|
-
/** used for switching in and out of compare mode @see {@link widgets/EodashMapBtns.vue} */
|
|
91
|
-
export const switchToCompare = ref(true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<HeaderComponent v-if="!eodash
|
|
2
|
+
<HeaderComponent v-if="!eodash?.brand.noLayout" />
|
|
3
3
|
<ErrorAlert v-model="error" />
|
|
4
4
|
<EodashOverlay />
|
|
5
5
|
<Suspense>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
</Suspense>
|
|
13
|
-
<FooterComponent v-if="!eodash
|
|
13
|
+
<FooterComponent v-if="!eodash?.brand.noLayout" />
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script setup>
|
|
@@ -18,7 +18,7 @@ import { useEodashRuntime } from "@/composables/DefineEodash";
|
|
|
18
18
|
import { useURLSearchParametersSync, useUpdateTheme } from "@/composables";
|
|
19
19
|
import { useSTAcStore } from "@/store/stac";
|
|
20
20
|
import { computed, defineAsyncComponent, onErrorCaptured, ref } from "vue";
|
|
21
|
-
import { useDisplay } from "vuetify
|
|
21
|
+
import { useDisplay } from "vuetify";
|
|
22
22
|
import { loadFont } from "@/utils";
|
|
23
23
|
import Loading from "@/components/Loading.vue";
|
|
24
24
|
import ErrorAlert from "@/components/ErrorAlert.vue";
|
|
@@ -26,7 +26,7 @@ import EodashOverlay from "@/components/EodashOverlay.vue";
|
|
|
26
26
|
|
|
27
27
|
const props = defineProps({
|
|
28
28
|
config: {
|
|
29
|
-
type: String,
|
|
29
|
+
type: [String, Function],
|
|
30
30
|
},
|
|
31
31
|
isWebComponent: {
|
|
32
32
|
type: Boolean,
|
|
@@ -37,18 +37,25 @@ const props = defineProps({
|
|
|
37
37
|
useURLSearchParametersSync();
|
|
38
38
|
|
|
39
39
|
const eodash = await useEodashRuntime(props.config);
|
|
40
|
+
if (!eodash) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
"Eodash configuration is not defined. Please provide a valid configuration file or object.",
|
|
43
|
+
);
|
|
44
|
+
}
|
|
40
45
|
|
|
41
46
|
const theme = useUpdateTheme("dashboardTheme", {
|
|
42
|
-
...(eodash
|
|
47
|
+
...(eodash?.brand?.theme ?? {}),
|
|
43
48
|
});
|
|
44
|
-
theme.
|
|
49
|
+
theme.change("dashboardTheme");
|
|
45
50
|
|
|
46
|
-
await loadFont(eodash
|
|
51
|
+
await loadFont(eodash?.brand?.font, props.isWebComponent);
|
|
47
52
|
|
|
48
|
-
const { loadSTAC } = useSTAcStore();
|
|
49
|
-
|
|
53
|
+
const { loadSTAC, init } = useSTAcStore();
|
|
54
|
+
init(eodash.stacEndpoint);
|
|
55
|
+
await loadSTAC(eodash.stacEndpoint);
|
|
50
56
|
|
|
51
57
|
const { smAndDown } = useDisplay();
|
|
58
|
+
|
|
52
59
|
const TemplateComponent = computed(() =>
|
|
53
60
|
smAndDown.value
|
|
54
61
|
? defineAsyncComponent(() => import(`@/components/MobileLayout.vue`))
|
|
@@ -62,7 +69,7 @@ const FooterComponent = defineAsyncComponent(
|
|
|
62
69
|
() => import(`@/components/Footer.vue`),
|
|
63
70
|
);
|
|
64
71
|
|
|
65
|
-
const templateHeight =
|
|
72
|
+
const templateHeight = "100%";
|
|
66
73
|
|
|
67
74
|
const error = ref("");
|
|
68
75
|
onErrorCaptured((e, comp, info) => {
|
|
@@ -75,37 +82,34 @@ onErrorCaptured((e, comp, info) => {
|
|
|
75
82
|
</script>
|
|
76
83
|
<style>
|
|
77
84
|
.loading-container {
|
|
78
|
-
height:
|
|
85
|
+
height: 100%;
|
|
79
86
|
display: flex;
|
|
80
87
|
align-items: center;
|
|
81
88
|
justify-content: center;
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
div.v-application__wrap {
|
|
85
|
-
|
|
92
|
+
height: 100%;
|
|
93
|
+
min-height: 100%;
|
|
86
94
|
}
|
|
87
95
|
eo-dash {
|
|
88
96
|
overflow: hidden;
|
|
97
|
+
display: block;
|
|
89
98
|
}
|
|
90
99
|
/* set eox-elements colors css vars to match the theme */
|
|
91
|
-
|
|
92
|
-
eox-
|
|
93
|
-
eox-
|
|
94
|
-
eox-
|
|
95
|
-
eox-
|
|
96
|
-
eox-
|
|
97
|
-
eox-
|
|
98
|
-
eox-
|
|
99
|
-
eox-
|
|
100
|
-
--
|
|
101
|
-
--eox-
|
|
102
|
-
--eox-
|
|
103
|
-
--eox-
|
|
104
|
-
--eox-
|
|
105
|
-
|
|
106
|
-
--eox-success-color: rgb(var(--v-theme-success));
|
|
107
|
-
--eox-warning-color: rgb(var(--v-theme-warning));
|
|
108
|
-
--range-slider-color: rgb(var(--v-theme-primary));
|
|
109
|
-
--range-slider-track-color: rgb(var(--v-theme-on-primary));
|
|
110
|
-
} */
|
|
100
|
+
:root {
|
|
101
|
+
--eox-theme-light-primary: var(--v-theme-primary) !important;
|
|
102
|
+
--eox-theme-light-on-primary: var(--v-theme-on-primary) !important;
|
|
103
|
+
--eox-theme-light-secondary: var(--v-theme-secondary) !important;
|
|
104
|
+
--eox-theme-light-on-secondary: var(--v-theme-on-secondary) !important;
|
|
105
|
+
--eox-theme-light-surface: var(--v-theme-surface) !important;
|
|
106
|
+
--eox-theme-light-on-surface: var(--v-theme-on-surface) !important;
|
|
107
|
+
--eox-theme-light-background: var(--v-theme-background) !important;
|
|
108
|
+
--eox-theme-light-on-background: var(--v-theme-on-background) !important;
|
|
109
|
+
--eox-theme-light-accent: var(--v-theme-accent) !important;
|
|
110
|
+
--eox-theme-light-error: var(--v-theme-error) !important;
|
|
111
|
+
--eox-theme-light-info: var(--v-theme-info) !important;
|
|
112
|
+
--eox-theme-light-success: var(--v-theme-success) !important;
|
|
113
|
+
--eox-theme-light-warning: var(--v-theme-warning) !important;
|
|
114
|
+
}
|
|
111
115
|
</style>
|
|
@@ -23,3 +23,10 @@ declare module "stac-js/src/http.js" {
|
|
|
23
23
|
const toAbsolute: (...args: string[]) => string;
|
|
24
24
|
export { toAbsolute };
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
declare const __userConfigExist__: boolean;
|
|
28
|
+
declare module "@eox/ui/vuetify/blueprint.js" {
|
|
29
|
+
import type { Blueprint } from "vuetify";
|
|
30
|
+
const eox: Blueprint;
|
|
31
|
+
export { eox };
|
|
32
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { createBlock, openBlock, withCtx, createElementVNode,
|
|
1
|
+
import { createBlock, openBlock, withCtx, createElementVNode, unref, createElementBlock, createCommentVNode, normalizeStyle, Suspense, resolveDynamicComponent, mergeProps, Fragment, renderList, Transition } from 'vue';
|
|
2
2
|
import '@eox/layout';
|
|
3
|
-
import { _ as _export_sfc,
|
|
4
|
-
import { V as VMain } from './VMain-
|
|
3
|
+
import { _ as _export_sfc, u as useDefineTemplate } from './asWebComponent-ZyEzWOOf.js';
|
|
4
|
+
import { V as VMain } from './VMain-Ci9DyaGU.js';
|
|
5
|
+
|
|
6
|
+
const _style_0 = ".panel[data-v-4126a8ae]{position:relative;overflow:auto;z-index:1;pointer-events:none}.pointer[data-v-4126a8ae]{pointer-events:all}.bg-panel[data-v-4126a8ae]{z-index:0;border-radius:0!important}.fade-enter-active[data-v-4126a8ae],.fade-leave-active[data-v-4126a8ae]{transition:opacity .25s ease}.fade-enter-from[data-v-4126a8ae],.fade-leave-to[data-v-4126a8ae]{opacity:0}.bg-surface[data-v-4126a8ae],.bg-primary[data-v-4126a8ae]{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;max-height:100%;overflow:auto;scrollbar-color:rgba(var(--v-theme-on-surface),.2) transparent;scrollbar-width:thin}.bg-surface[data-v-4126a8ae]{background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.bg-primary[data-v-4126a8ae]{background-color:rgba(var(--v-theme-primary),var(--v-primary-opacity, .8))!important}";
|
|
5
7
|
|
|
6
8
|
const _hoisted_1 = ["gap"];
|
|
7
9
|
const _hoisted_2 = ["id", "h", "w", "x", "y"];
|
|
10
|
+
const _hoisted_3 = { class: "bg-surface pointer" };
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
const _sfc_main = {
|
|
@@ -13,19 +16,26 @@ const _sfc_main = {
|
|
|
13
16
|
|
|
14
17
|
const { bgWidget, importedWidgets, gap } = useDefineTemplate();
|
|
15
18
|
|
|
19
|
+
const layoutStyle = {
|
|
20
|
+
padding: gap.value + "px",
|
|
21
|
+
overflow: "hidden !important",
|
|
22
|
+
};
|
|
23
|
+
|
|
16
24
|
return (_ctx, _cache) => {
|
|
17
25
|
|
|
18
26
|
|
|
19
|
-
return (openBlock(), createBlock(VMain,
|
|
27
|
+
return (openBlock(), createBlock(VMain, { class: "pa-0" }, {
|
|
20
28
|
default: withCtx(() => [
|
|
21
29
|
createElementVNode("eox-layout", {
|
|
30
|
+
mediaBreakpoints: [0, 960, 1920],
|
|
22
31
|
gap: unref(gap),
|
|
23
|
-
|
|
32
|
+
class: "layout-container",
|
|
33
|
+
style: layoutStyle
|
|
24
34
|
}, [
|
|
25
35
|
(unref(bgWidget)?.component)
|
|
26
36
|
? (openBlock(), createElementBlock("eox-layout-item", {
|
|
27
37
|
key: unref(bgWidget).id,
|
|
28
|
-
class: "bg-panel
|
|
38
|
+
class: "bg-panel",
|
|
29
39
|
style: normalizeStyle(`margin: -${unref(gap) + 1}px;`),
|
|
30
40
|
x: "0",
|
|
31
41
|
y: "0",
|
|
@@ -50,7 +60,7 @@ return (_ctx, _cache) => {
|
|
|
50
60
|
? (openBlock(), createElementBlock("eox-layout-item", {
|
|
51
61
|
id: importedWidget.value.id.toString(),
|
|
52
62
|
key: importedWidget.value.id,
|
|
53
|
-
class: "panel
|
|
63
|
+
class: "panel",
|
|
54
64
|
h: importedWidget.value.layout.h,
|
|
55
65
|
w: importedWidget.value.layout.w,
|
|
56
66
|
x: importedWidget.value.layout.x,
|
|
@@ -58,10 +68,11 @@ return (_ctx, _cache) => {
|
|
|
58
68
|
}, [
|
|
59
69
|
(openBlock(), createBlock(Suspense, null, {
|
|
60
70
|
default: withCtx(() => [
|
|
61
|
-
(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
createElementVNode("div", _hoisted_3, [
|
|
72
|
+
(openBlock(), createBlock(resolveDynamicComponent(importedWidget.value.component), mergeProps({
|
|
73
|
+
key: importedWidget.value.id
|
|
74
|
+
}, { ref_for: true }, importedWidget.value.props), null, 16 /* FULL_PROPS */))
|
|
75
|
+
])
|
|
65
76
|
]),
|
|
66
77
|
_: 2 /* DYNAMIC */
|
|
67
78
|
}, 1024 /* DYNAMIC_SLOTS */))
|
|
@@ -71,7 +82,7 @@ return (_ctx, _cache) => {
|
|
|
71
82
|
_: 2 /* DYNAMIC */
|
|
72
83
|
}, 1024 /* DYNAMIC_SLOTS */))
|
|
73
84
|
}), 128 /* KEYED_FRAGMENT */))
|
|
74
|
-
],
|
|
85
|
+
], 8 /* PROPS */, _hoisted_1)
|
|
75
86
|
]),
|
|
76
87
|
_: 1 /* STABLE */
|
|
77
88
|
}))
|
|
@@ -79,6 +90,6 @@ return (_ctx, _cache) => {
|
|
|
79
90
|
}
|
|
80
91
|
|
|
81
92
|
};
|
|
82
|
-
const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-
|
|
93
|
+
const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-4126a8ae"]]);
|
|
83
94
|
|
|
84
95
|
export { DashboardLayout as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withAsyncContext, ref, onMounted, onUnmounted, createElementBlock, openBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { E as useSTAcStore } from './asWebComponent-ZyEzWOOf.js';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
5
5
|
|