@eodash/eodash 5.0.0-rc.3 → 5.1.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 +42 -25
- package/core/client/components/EodashOverlay.vue +1 -1
- 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 +9 -10
- 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 +80 -47
- package/core/client/eodashSTAC/helpers.js +136 -27
- 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-t_PavJPO.js → DashboardLayout-ByVs1DrY.js} +23 -12
- package/dist/client/{DynamicWebComponent-y07rVJch.js → DynamicWebComponent-C3W7HSQm.js} +1 -1
- package/dist/client/{EodashDatePicker-CcOfyzGD.js → EodashDatePicker-BIAf1sMT.js} +59 -32
- package/dist/client/{EodashItemFilter-B9HCvIMi.js → EodashItemFilter-DPznh8UB.js} +20 -10
- package/dist/client/{EodashLayerControl-KStn7Nb_.js → EodashLayerControl-Bhxjw4V2.js} +29 -16
- package/dist/client/EodashLayoutSwitcher-C5qTEffW.js +61 -0
- package/dist/client/EodashMapBtns-WoGq8MuV.js +173 -0
- package/dist/client/{EodashStacInfo-C_hDy6Pd.js → EodashStacInfo-CSvvF2jI.js} +3 -18
- package/dist/client/{EodashTools-BXflvRf8.js → EodashTools-Cv1SXQ5y.js} +13 -13
- package/dist/client/{ExportState-C0QRemK1.js → ExportState-D-iuwaad.js} +58 -52
- package/dist/client/{Footer-7VGyGUAs.js → Footer-CyF0zRAk.js} +15 -13
- package/dist/client/{Header-BQJnXHYq.js → Header-CgD8jDKU.js} +33 -28
- package/dist/client/{MobileLayout-b8nQ-Vyl.js → MobileLayout-EKQ_kpSh.js} +69 -60
- package/dist/client/{PopUp-DgNrh9Df.js → PopUp-BsYLvWch.js} +19 -10
- package/dist/client/ProcessList-C2xsLU2_.js +191 -0
- package/dist/client/{VImg-D4eT3IQ1.js → VImg-OHe8YTs2.js} +24 -24
- package/dist/client/{VMain-C3hN2-H3.js → VMain-PryTLU4a.js} +7 -7
- package/dist/client/{VOverlay-tAeNygaA.js → VOverlay-yUn7p-Uf.js} +64 -27
- package/dist/client/{VTooltip-B0Q3iHMZ.js → VTooltip-DZ0fjpB3.js} +13 -10
- package/dist/client/{WidgetsContainer-CtDHfCYf.js → WidgetsContainer-B9LBadcC.js} +1 -1
- package/dist/client/asWebComponent-By_7_JjS.js +19193 -0
- package/dist/client/async-DkSu_u2K.js +740 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-CIFAqXaZ.js → forwardRefs-BXxrv98s.js} +31 -4
- package/dist/client/handling-CgmFXkW6.js +1212 -0
- package/dist/client/helpers-Dy0Q13tP.js +4534 -0
- package/dist/client/{index-DvcUndod.js → index-BuhOHXKv.js} +2 -4
- package/dist/client/{index-BQ16n4Sk.js → index-Ch_HchK3.js} +39 -32
- package/dist/client/{index-Cv7HBz49.js → index-Dqj4tbx2.js} +2 -2
- package/dist/client/index-skjhlH8u.js +376 -0
- package/dist/client/{ssrBoot-BP7SYRyC.js → ssrBoot-Zgc_Ttvi.js} +2 -2
- package/dist/client/templates.js +850 -0
- package/dist/client/transition-C98Yn4Vo.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 +20 -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 +45 -30
- 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 +210 -0
- package/dist/types/templates/expert.d.ts +151 -0
- package/dist/types/templates/index.d.ts +6 -0
- package/dist/types/templates/light.d.ts +145 -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/EodashMap/index.vue.d.ts +1 -4
- package/dist/types/widgets/EodashMapBtns.vue.d.ts +8 -8
- 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 +18 -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 +53 -45
- package/templates/baseConfig.js +68 -0
- package/templates/compare.js +162 -0
- package/templates/expert.js +123 -0
- package/templates/index.js +8 -0
- package/templates/light.js +130 -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/index.vue +3 -8
- package/widgets/EodashMap/methods/create-layers-config.js +4 -3
- package/widgets/EodashMap/methods/index.js +33 -23
- package/widgets/EodashMapBtns.vue +83 -41
- package/widgets/EodashProcess/ProcessList.vue +34 -10
- package/widgets/EodashProcess/index.vue +55 -20
- package/widgets/EodashProcess/methods/async.js +77 -59
- 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 +116 -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 +398 -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-DqeFO3RN.js +0 -52
- package/dist/client/EodashMapBtns-5BF27qJB.js +0 -131
- package/dist/client/ProcessList-C62SOVO6.js +0 -484
- package/dist/client/asWebComponent-BJ2NWunV.js +0 -12479
- package/dist/client/eo-dash.css +0 -5
- package/dist/client/index-Da5xXX6Q.js +0 -780
- package/dist/client/transition-Cdb4K27U.js +0 -37
- package/dist/types/core/client/eodash.d.ts +0 -8
package/README.md
CHANGED
|
@@ -43,6 +43,7 @@ npm run build -- --lib
|
|
|
43
43
|
.
|
|
44
44
|
├── core # CLI & Client source code
|
|
45
45
|
├── docs # Documentation files
|
|
46
|
+
├── templates # Base configurations and eodash templates
|
|
46
47
|
├── tests # CLI & Client component tests folder
|
|
47
48
|
├── widgets # Vue components as internal widgets.
|
|
48
49
|
├── public # Statically served directory
|
package/core/client/App.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-app>
|
|
2
|
+
<v-app class="fill-height">
|
|
3
3
|
<Suspense>
|
|
4
4
|
<Dashboard :is-web-component="isWebComponent" :config="config" />
|
|
5
5
|
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
<script setup>
|
|
14
14
|
import Dashboard from "@/views/Dashboard.vue";
|
|
15
15
|
import ErrorAlert from "./components/ErrorAlert.vue";
|
|
16
|
+
import { provideEodashInstance, useAdoptStyles } from "@/composables";
|
|
16
17
|
import { onErrorCaptured, ref } from "vue";
|
|
17
18
|
|
|
18
19
|
defineProps({
|
|
19
20
|
config: {
|
|
20
|
-
type: String,
|
|
21
|
+
type: [String, Function],
|
|
21
22
|
required: false,
|
|
22
23
|
default: undefined,
|
|
23
24
|
},
|
|
@@ -35,4 +36,9 @@ onErrorCaptured((e, inst, info) => {
|
|
|
35
36
|
info: ${info}.
|
|
36
37
|
`;
|
|
37
38
|
});
|
|
39
|
+
provideEodashInstance();
|
|
40
|
+
if (isWebComponent) {
|
|
41
|
+
// Adopt styles into the shadowRoot when running as web component
|
|
42
|
+
useAdoptStyles();
|
|
43
|
+
}
|
|
38
44
|
</script>
|
|
@@ -5,17 +5,17 @@ import { registerPlugins } from "./plugins";
|
|
|
5
5
|
* @type {import("vue").VueElementConstructor<
|
|
6
6
|
* import("vue").ExtractPropTypes<{ config: string }>>}
|
|
7
7
|
* */
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const EodashConstructor = defineCustomElement(App, {
|
|
9
|
+
//styles will be imported here using vite-plugin-vue-custom-element-style-injector
|
|
10
|
+
shadowRoot: !import.meta.env.DEV,
|
|
10
11
|
configureApp(app) {
|
|
11
12
|
registerPlugins(app);
|
|
12
13
|
},
|
|
13
14
|
});
|
|
14
|
-
|
|
15
|
-
export function register() {
|
|
15
|
+
function register() {
|
|
16
16
|
customElements.define("eo-dash", EodashConstructor);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export { default as store } from "@/store";
|
|
20
|
-
|
|
20
|
+
export { register, EodashConstructor };
|
|
21
21
|
register();
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-main>
|
|
3
|
-
<eox-layout
|
|
3
|
+
<eox-layout
|
|
4
|
+
:mediaBreakpoints="[0, 960, 1920]"
|
|
5
|
+
:gap="gap"
|
|
6
|
+
class="layout-container"
|
|
7
|
+
:style="layoutStyle"
|
|
8
|
+
>
|
|
4
9
|
<eox-layout-item
|
|
5
10
|
v-if="bgWidget?.component"
|
|
6
11
|
:key="bgWidget.id"
|
|
7
|
-
class="bg-panel
|
|
12
|
+
class="bg-panel"
|
|
8
13
|
:style="`margin: -${gap + 1}px;`"
|
|
9
14
|
x="0"
|
|
10
15
|
y="0"
|
|
@@ -25,18 +30,20 @@
|
|
|
25
30
|
:id="importedWidget.value.id.toString()"
|
|
26
31
|
v-if="importedWidget.value.component"
|
|
27
32
|
:key="importedWidget.value.id"
|
|
28
|
-
class="panel
|
|
33
|
+
class="panel"
|
|
29
34
|
:h="importedWidget.value.layout.h"
|
|
30
35
|
:w="importedWidget.value.layout.w"
|
|
31
36
|
:x="importedWidget.value.layout.x"
|
|
32
37
|
:y="importedWidget.value.layout.y"
|
|
33
38
|
>
|
|
34
39
|
<Suspense>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
<div class="bg-surface pointer">
|
|
41
|
+
<component
|
|
42
|
+
:key="importedWidget.value.id"
|
|
43
|
+
:is="importedWidget.value.component"
|
|
44
|
+
v-bind="importedWidget.value.props"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
40
47
|
</Suspense>
|
|
41
48
|
</eox-layout-item>
|
|
42
49
|
</Transition>
|
|
@@ -49,12 +56,22 @@ import "@eox/layout";
|
|
|
49
56
|
import { useDefineTemplate } from "@/composables/DefineTemplate";
|
|
50
57
|
|
|
51
58
|
const { bgWidget, importedWidgets, gap } = useDefineTemplate();
|
|
59
|
+
|
|
60
|
+
const layoutStyle = {
|
|
61
|
+
padding: gap.value + "px",
|
|
62
|
+
overflow: "hidden !important",
|
|
63
|
+
};
|
|
52
64
|
</script>
|
|
53
65
|
<style scoped>
|
|
54
66
|
.panel {
|
|
55
67
|
position: relative;
|
|
56
|
-
overflow:
|
|
68
|
+
overflow: auto;
|
|
57
69
|
z-index: 1;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.pointer {
|
|
74
|
+
pointer-events: all;
|
|
58
75
|
}
|
|
59
76
|
|
|
60
77
|
.bg-panel {
|
|
@@ -71,30 +88,30 @@ const { bgWidget, importedWidgets, gap } = useDefineTemplate();
|
|
|
71
88
|
.fade-leave-to {
|
|
72
89
|
opacity: 0;
|
|
73
90
|
}
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
.bg-surface,
|
|
92
|
+
.bg-primary {
|
|
93
|
+
backdrop-filter: blur(10px) !important;
|
|
94
|
+
border-radius: 8px;
|
|
95
|
+
border: none;
|
|
96
|
+
box-shadow:
|
|
97
|
+
0px 0px 1px rgba(24, 39, 75, 0.22),
|
|
98
|
+
0px 6px 12px -6px rgba(24, 39, 75, 0.12),
|
|
99
|
+
0px 8px 24px -4px rgba(24, 39, 75, 0.08);
|
|
100
|
+
max-height: 100%;
|
|
101
|
+
overflow: auto;
|
|
102
|
+
scrollbar-color: rgba(var(--v-theme-on-surface), 0.2) transparent;
|
|
103
|
+
scrollbar-width: thin;
|
|
104
|
+
}
|
|
105
|
+
.bg-surface {
|
|
76
106
|
background-color: rgba(
|
|
77
107
|
var(--v-theme-surface),
|
|
78
108
|
var(--v-surface-opacity, 0.8)
|
|
79
109
|
) !important;
|
|
80
|
-
border-radius: 4px;
|
|
81
|
-
border-style: solid;
|
|
82
|
-
border-width: 1px;
|
|
83
|
-
border-color: rgb(var(--v-theme-surface));
|
|
84
|
-
scrollbar-color: rgba(var(--v-theme-on-surface), 0.2) transparent;
|
|
85
|
-
scrollbar-width: thin;
|
|
86
110
|
}
|
|
87
|
-
|
|
88
|
-
backdrop-filter: blur(9.5px) !important;
|
|
111
|
+
.bg-primary {
|
|
89
112
|
background-color: rgba(
|
|
90
113
|
var(--v-theme-primary),
|
|
91
114
|
var(--v-primary-opacity, 0.8)
|
|
92
115
|
) !important;
|
|
93
|
-
border-radius: 4px;
|
|
94
|
-
border-style: solid;
|
|
95
|
-
border-width: 1px;
|
|
96
|
-
border-color: rgb(var(--v-theme-primary));
|
|
97
|
-
scrollbar-color: rgba(var(--v-theme-on-primary), 0.2) transparent;
|
|
98
|
-
scrollbar-width: thin;
|
|
99
116
|
}
|
|
100
117
|
</style>
|
|
@@ -25,9 +25,9 @@ import { mdiClose, mdiAlertCircle } from "@mdi/js";
|
|
|
25
25
|
import { inject } from "vue";
|
|
26
26
|
|
|
27
27
|
const error = defineModel({ type: String, required: true });
|
|
28
|
-
const eodash =
|
|
28
|
+
const eodash = inject(eodashKey);
|
|
29
29
|
const errorMessage =
|
|
30
|
-
eodash
|
|
30
|
+
eodash?.brand?.errorMessage ?? "something went wrong, please try again later";
|
|
31
31
|
</script>
|
|
32
32
|
<style scoped>
|
|
33
33
|
.alert {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
class="d-flex justify-end"
|
|
8
8
|
>
|
|
9
9
|
<p class="pt-0 footer-text">
|
|
10
|
-
{{ eodash
|
|
10
|
+
{{ eodash?.brand.footerText ?? "" }}
|
|
11
11
|
</p>
|
|
12
12
|
</v-footer>
|
|
13
13
|
</template>
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
import { eodashKey } from "@/utils/keys";
|
|
16
16
|
import { ref } from "vue";
|
|
17
17
|
import { inject } from "vue";
|
|
18
|
-
import { useDisplay } from "vuetify
|
|
18
|
+
import { useDisplay } from "vuetify";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Footer template ref
|
|
22
22
|
*
|
|
23
23
|
* @type {import("vue").Ref<
|
|
24
|
-
* import("vuetify/
|
|
24
|
+
* import("vuetify/components").VFooter | null
|
|
25
25
|
* >}
|
|
26
26
|
*/
|
|
27
27
|
const footer = ref(null);
|
|
28
|
-
const eodash =
|
|
28
|
+
const eodash = inject(eodashKey);
|
|
29
29
|
|
|
30
30
|
const { mdAndDown } = useDisplay();
|
|
31
31
|
</script>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-app-bar color="primary">
|
|
3
3
|
<v-app-bar-title class="header">{{ title }}</v-app-bar-title>
|
|
4
|
-
<v-img class="mx-12 logo" :src="eodash
|
|
4
|
+
<v-img class="mx-12 logo" :src="eodash?.brand?.logo" />
|
|
5
5
|
</v-app-bar>
|
|
6
6
|
</template>
|
|
7
7
|
<script setup>
|
|
8
8
|
import { eodashKey } from "@/utils/keys";
|
|
9
9
|
import { inject } from "vue";
|
|
10
10
|
|
|
11
|
-
const eodash =
|
|
11
|
+
const eodash = inject(eodashKey);
|
|
12
12
|
|
|
13
|
-
const title = eodash
|
|
13
|
+
const title = eodash?.brand?.name;
|
|
14
14
|
</script>
|
|
15
15
|
<style scoped>
|
|
16
16
|
.logo {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-main class="overflow-hidden
|
|
2
|
+
<v-main class="overflow-hidden">
|
|
3
3
|
<Suspense suspensible>
|
|
4
4
|
<component
|
|
5
5
|
id="bg-widget"
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
>
|
|
24
24
|
</div>
|
|
25
25
|
<Suspense suspensible>
|
|
26
|
-
<div
|
|
26
|
+
<div
|
|
27
|
+
class="d-flex flex-column justify-center component-container"
|
|
28
|
+
v-show="activeIdx === idx"
|
|
29
|
+
>
|
|
27
30
|
<component
|
|
28
31
|
:key="importedWidget.value.id"
|
|
29
32
|
:is="importedWidget.value.component"
|
|
@@ -70,22 +73,18 @@ onMounted(() => {
|
|
|
70
73
|
mainRectTopPx.value = mainRect.value.top + "px";
|
|
71
74
|
mainRectBtmPx.value = (mainRect.value.bottom || 48) + "px";
|
|
72
75
|
tabsHeightFromBtm.value =
|
|
73
|
-
mainRect.value.bottom + (tabs.value?.$el?.clientHeight ??
|
|
76
|
+
mainRect.value.bottom + (tabs.value?.$el?.clientHeight ?? 48) + "px";
|
|
74
77
|
});
|
|
75
78
|
</script>
|
|
76
79
|
<style scoped>
|
|
77
|
-
.main {
|
|
78
|
-
height: 91dvh;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
80
|
.panel {
|
|
82
|
-
top: v-bind("mainRectTopPx");
|
|
83
81
|
bottom: v-bind("tabsHeightFromBtm");
|
|
82
|
+
top: v-bind("mainRectTopPx");
|
|
84
83
|
position: absolute;
|
|
85
84
|
overflow: hidden;
|
|
86
85
|
width: 100%;
|
|
87
86
|
left: 0;
|
|
88
|
-
z-index:
|
|
87
|
+
z-index: 3;
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
.component-container {
|
|
@@ -103,7 +102,7 @@ onMounted(() => {
|
|
|
103
102
|
z-index: 10;
|
|
104
103
|
}
|
|
105
104
|
:deep(.bg-surface) {
|
|
106
|
-
backdrop-filter: blur(
|
|
105
|
+
backdrop-filter: blur(10px) !important;
|
|
107
106
|
background-color: rgba(
|
|
108
107
|
var(--v-theme-surface),
|
|
109
108
|
var(--v-surface-opacity, 0.8)
|
|
@@ -1,72 +1,67 @@
|
|
|
1
1
|
import store from "@/store";
|
|
2
2
|
import { eodashKey } from "@/utils/keys";
|
|
3
|
-
import { inject } from "vue";
|
|
3
|
+
import { inject, reactive } from "vue";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Handles importing user defined instance of Eodash
|
|
7
7
|
*
|
|
8
8
|
* @async
|
|
9
|
-
* @param {string | undefined} runtimeConfig
|
|
10
|
-
* @returns {Promise<import("@/types").Eodash>}
|
|
9
|
+
* @param {string | undefined| (()=> Promise<import("@/types").Eodash>) | Function} runtimeConfig
|
|
10
|
+
* @returns {Promise<import("@/types").Eodash | null | undefined>}
|
|
11
11
|
* @see {@linkplain '@/eodash.js'}
|
|
12
12
|
*/
|
|
13
13
|
export const useEodashRuntime = async (runtimeConfig) => {
|
|
14
|
+
let eodashConfig;
|
|
14
15
|
const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
|
|
15
|
-
/** @param {import("@/types").Eodash} config */
|
|
16
|
-
const assignInstance = (config) => {
|
|
17
|
-
if ("template" in config) {
|
|
18
|
-
//@ts-expect-error to do
|
|
19
|
-
delete eodash.templates;
|
|
20
|
-
//@ts-expect-error to do
|
|
21
|
-
eodash.template = config.template;
|
|
22
|
-
} else if ("templates" in config) {
|
|
23
|
-
//@ts-expect-error to do
|
|
24
|
-
delete eodash.template;
|
|
25
|
-
//@ts-expect-error to do
|
|
26
|
-
eodash.templates = config.templates;
|
|
27
|
-
}
|
|
28
|
-
/** @type {(keyof import("@/types").Eodash)[]} */ (
|
|
29
|
-
Object.keys(eodash)
|
|
30
|
-
).forEach((key) => {
|
|
31
|
-
//@ts-expect-error to do
|
|
32
|
-
eodash[key] = config[key];
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
16
|
|
|
36
17
|
if (runtimeConfig) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
await
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
)
|
|
44
|
-
|
|
18
|
+
eodashConfig =
|
|
19
|
+
typeof runtimeConfig === "function"
|
|
20
|
+
? await runtimeConfig()
|
|
21
|
+
: await import(
|
|
22
|
+
/* @vite-ignore */ new URL(runtimeConfig, import.meta.url).href
|
|
23
|
+
).then(async (m) => await m["default"]);
|
|
24
|
+
if (!eodashConfig) {
|
|
25
|
+
throw new Error(
|
|
26
|
+
"No dashboard configuration defined in the runtime config:" +
|
|
27
|
+
runtimeConfig,
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
Object.assign(eodash, eodashConfig);
|
|
31
|
+
return reactive(eodashConfig);
|
|
45
32
|
}
|
|
46
33
|
|
|
34
|
+
async function importUserConfig() {
|
|
35
|
+
/* global __userConfigExist__:readonly */
|
|
36
|
+
// injected by vite
|
|
37
|
+
if (__userConfigExist__) {
|
|
38
|
+
return import("user:config").then(async (m) => await m["default"]);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
47
41
|
try {
|
|
48
42
|
const configJs = "/config.js";
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
)
|
|
43
|
+
eodashConfig = await import(
|
|
44
|
+
/* @vite-ignore */ new URL(configJs, import.meta.url).href
|
|
45
|
+
).then(async (m) => await m["default"]);
|
|
46
|
+
if (!eodashConfig) {
|
|
47
|
+
eodashConfig = await importUserConfig();
|
|
48
|
+
}
|
|
53
49
|
} catch {
|
|
54
50
|
try {
|
|
55
|
-
|
|
56
|
-
await import("user:config").then(async (m) => await m["default"]),
|
|
57
|
-
);
|
|
51
|
+
eodashConfig = await importUserConfig();
|
|
58
52
|
} catch {
|
|
59
53
|
console.error("no dashboard configuration defined");
|
|
54
|
+
eodashConfig = null;
|
|
60
55
|
}
|
|
61
56
|
}
|
|
62
|
-
|
|
57
|
+
Object.assign(eodash, eodashConfig);
|
|
58
|
+
return reactive(eodash);
|
|
63
59
|
};
|
|
64
60
|
|
|
65
61
|
/**
|
|
66
|
-
* @
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* | import("@/types").Eodash} config
|
|
62
|
+
* @template {import("@/types").Eodash} T
|
|
63
|
+
* @param {T | ((store: typeof import("@/store").default) => Promise<T>)} config
|
|
64
|
+
* @returns {Promise<T>}
|
|
70
65
|
*/
|
|
71
66
|
export const createEodash = async (config) => {
|
|
72
67
|
if (config instanceof Function) {
|
|
@@ -15,7 +15,7 @@ import log from "loglevel";
|
|
|
15
15
|
**/
|
|
16
16
|
|
|
17
17
|
const useTemplate = () => {
|
|
18
|
-
const eodash =
|
|
18
|
+
const eodash = inject(eodashKey);
|
|
19
19
|
|
|
20
20
|
/** @type {DefinedTemplate} */
|
|
21
21
|
const definedTemplate = shallowReactive({
|
|
@@ -24,7 +24,9 @@ const useTemplate = () => {
|
|
|
24
24
|
loading: shallowRef(null),
|
|
25
25
|
gap: ref(16),
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
if (!eodash) {
|
|
28
|
+
return definedTemplate;
|
|
29
|
+
}
|
|
28
30
|
if ("template" in eodash) {
|
|
29
31
|
[definedTemplate.bgWidget] = useDefineWidgets([eodash.template.background]);
|
|
30
32
|
[definedTemplate.loading] = useDefineWidgets([eodash.template.loading]);
|
|
@@ -8,7 +8,7 @@ import { storeToRefs } from "pinia";
|
|
|
8
8
|
* props: Record<string, unknown>;
|
|
9
9
|
* title: string;
|
|
10
10
|
* id: string | number | symbol;
|
|
11
|
-
* layout: { x: number; y: number; h: number; w: number };
|
|
11
|
+
* layout: { x: number | string; y: number | string; h: number | string; w: number | string };
|
|
12
12
|
* }} DefinedWidget
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -69,19 +69,19 @@ export const useDefineWidgets = (widgetConfigs) => {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
if ("defineWidget" in (config ?? {})) {
|
|
72
|
-
const { selectedStac } = storeToRefs(useSTAcStore());
|
|
72
|
+
const { selectedStac, selectedCompareStac } = storeToRefs(useSTAcStore());
|
|
73
73
|
watch(
|
|
74
|
-
selectedStac,
|
|
75
|
-
(updatedStac) => {
|
|
74
|
+
[selectedStac, selectedCompareStac],
|
|
75
|
+
([updatedStac, updatedCompareStac]) => {
|
|
76
76
|
let definedConfig =
|
|
77
77
|
/** @type {import("@/types").FunctionalWidget} */ (
|
|
78
78
|
config
|
|
79
|
-
)?.defineWidget(updatedStac);
|
|
79
|
+
)?.defineWidget(updatedStac, updatedCompareStac);
|
|
80
80
|
if (definedConfig) {
|
|
81
81
|
definedConfig = reactive(definedConfig);
|
|
82
82
|
}
|
|
83
83
|
definedWidget.value =
|
|
84
|
-
definedWidget.value.id === definedConfig
|
|
84
|
+
definedConfig && definedWidget.value.id === definedConfig.id
|
|
85
85
|
? definedWidget.value
|
|
86
86
|
: getWidgetDefinition(definedConfig);
|
|
87
87
|
},
|
|
@@ -103,7 +103,9 @@ export const useDefineWidgets = (widgetConfigs) => {
|
|
|
103
103
|
* @param {import("@/types").StaticWidget
|
|
104
104
|
* | Omit<import("@/types").StaticWidget, "layout">
|
|
105
105
|
* | undefined
|
|
106
|
-
* | null
|
|
106
|
+
* | null
|
|
107
|
+
* | false
|
|
108
|
+
* } [config]
|
|
107
109
|
* @returns {DefinedWidget}
|
|
108
110
|
*/
|
|
109
111
|
const getWidgetDefinition = (config) => {
|
|
@@ -115,7 +117,11 @@ const getWidgetDefinition = (config) => {
|
|
|
115
117
|
id: Symbol(),
|
|
116
118
|
layout: reactive({ x: 0, y: 0, h: 0, w: 0 }),
|
|
117
119
|
};
|
|
118
|
-
|
|
120
|
+
if (!config) {
|
|
121
|
+
return importedWidget;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
switch (config.type) {
|
|
119
125
|
case "internal":
|
|
120
126
|
importedWidget.component = defineAsyncComponent({
|
|
121
127
|
loader: () => {
|