@eodash/eodash 5.0.0-alpha.1.9 → 5.0.0-alpha.2.1
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/LICENSE +21 -0
- package/README.md +1 -1
- package/bin/cli.js +15 -8
- package/bin/main.js +9 -0
- package/bin/serverConfig.js +58 -29
- package/bin/types.d.ts +52 -0
- package/bin/utils.js +70 -20
- package/core/App.vue +10 -12
- package/core/SuspensedDashboard.ce.vue +65 -0
- package/core/asWebComponent.d.ts +18 -0
- package/core/asWebComponent.js +12 -0
- package/core/components/DashboardLayout.vue +11 -25
- package/core/components/DynamicWebComponent.vue +6 -6
- package/core/components/Footer.vue +11 -12
- package/core/components/Header.vue +5 -29
- package/core/components/Loading.vue +27 -0
- package/core/components/MobileLayout.vue +34 -63
- package/core/composables/DefineEodash.js +57 -0
- package/core/composables/DefineWidgets.js +26 -15
- package/core/composables/index.js +139 -67
- package/core/eodash.js +100 -0
- package/core/main.js +2 -4
- package/core/plugins/index.js +3 -12
- package/core/plugins/vuetify.js +5 -2
- package/core/store/Actions.js +0 -28
- package/core/store/States.js +12 -3
- package/core/store/stac.js +7 -5
- package/core/types.d.ts +149 -124
- package/core/utils/eodashSTAC.js +164 -0
- package/core/utils/helpers.js +40 -0
- package/core/utils/index.js +28 -0
- package/core/utils/keys.js +6 -0
- package/core/views/Dashboard.vue +33 -23
- package/core/vite-env.d.ts +16 -2
- package/dist/.gitkeep +0 -0
- package/dist/DashboardLayout-Dp8AnYD9.js +141 -0
- package/dist/DynamicWebComponent-BrHVTesn.js +57 -0
- package/dist/EodashDatePicker-D_udZ26j.js +1645 -0
- package/dist/EodashItemFilter-BLAGx2UD.js +51 -0
- package/dist/EodashMap-Bxl_aqY2.js +53405 -0
- package/dist/Footer-AohCH8U7.js +118 -0
- package/dist/Header-DC50S6GR.js +609 -0
- package/dist/IframeWrapper-Dd9zrX9s.js +19 -0
- package/dist/MobileLayout-CgToA7Gp.js +523 -0
- package/dist/VBtn-Bz7ruRUg.js +1106 -0
- package/dist/VMain-BHfWJU2j.js +35 -0
- package/dist/WidgetsContainer-DxfCu0I3.js +122 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/asWebComponent-C8rb3b1D.js +11323 -0
- package/dist/basedecoder-Qm25PwVp-CHo5Pomv.js +89 -0
- package/dist/color-DpYEub1f.js +115 -0
- package/dist/decoder-kAoyGIq9-BBR5CgzS.js +10 -0
- package/dist/deflate-Be2Arps5-hDqMz3RA.js +10 -0
- package/dist/dimensions-CJaGeSrj.js +53 -0
- package/dist/eo-dash.js +6 -0
- package/dist/eox-itemfilter-DcQkRD2l.js +7537 -0
- package/dist/eox-map-BJ9SIixs.js +36205 -0
- package/dist/eox-stacinfo-B-YrT7Ug.js +13698 -0
- package/dist/forwardRefs-Bxeu9Obx.js +142 -0
- package/dist/index-DTkOfh2g.js +152 -0
- package/dist/index-Sa2Vg_gx.js +65 -0
- package/dist/jpeg-DNfUpLwy-Fjan-04T.js +515 -0
- package/dist/lerc-C9VL9kri-cIdbW0sg.js +1029 -0
- package/dist/lzw-BOMhmEDy-Dboc93VO.js +84 -0
- package/dist/packbits-DaUD6MLm-Bu1PoTGa.js +24 -0
- package/dist/pako.esm-C3kYPGGQ-BMki8cQY.js +1087 -0
- package/dist/raw-CcGKjn8q-DFOt-i8n.js +9 -0
- package/dist/ssrBoot-D-b4-M19.js +17 -0
- package/dist/style.css +5 -0
- package/dist/webfontloader-CyOFAuFB.js +471 -0
- package/dist/webimage-D2c098k3-DLj1LQxB.js +19 -0
- package/package.json +40 -12
- package/widgets/EodashDatePicker.vue +56 -0
- package/widgets/EodashItemFilter.vue +60 -0
- package/widgets/EodashMap.vue +82 -0
- package/widgets/WidgetsContainer.vue +1 -1
- package/core/composables/DefineConfig.js +0 -45
- package/core/eodashConfig.js +0 -136
- package/core/plugins/router.js +0 -20
- package/core/store/Keys.js +0 -6
package/core/eodash.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { reactive } from "vue";
|
|
2
|
+
import { currentUrl } from "./store/States";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Reactive Edoash Instance Object. provided globally in the app,
|
|
6
|
+
* and used as an intermediate object to make user defined instances config reactive.
|
|
7
|
+
* @type {import("./types").Eodash}
|
|
8
|
+
*/
|
|
9
|
+
export const eodash = reactive({
|
|
10
|
+
id: "demo",
|
|
11
|
+
stacEndpoint: "https://esa-eodash.github.io/RACE-catalog/RACE/catalog.json",
|
|
12
|
+
brand: {
|
|
13
|
+
noLayout: true,
|
|
14
|
+
name: "Demo",
|
|
15
|
+
font: {
|
|
16
|
+
family: "Roboto",
|
|
17
|
+
},
|
|
18
|
+
theme: {
|
|
19
|
+
colors: {
|
|
20
|
+
primary: "#fff",
|
|
21
|
+
secondary: "#fff",
|
|
22
|
+
surface: "#fff",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
footerText: "Demo configuration of eodash client",
|
|
26
|
+
},
|
|
27
|
+
template: {
|
|
28
|
+
loading: {
|
|
29
|
+
id: Symbol(),
|
|
30
|
+
type: "web-component",
|
|
31
|
+
widget: {
|
|
32
|
+
// https://uiball.com/ldrs/
|
|
33
|
+
link: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/mirage.js",
|
|
34
|
+
tagName: "l-mirage",
|
|
35
|
+
properties: {
|
|
36
|
+
class: "align-self-center justify-self-center",
|
|
37
|
+
size: "120",
|
|
38
|
+
speed: "2.5",
|
|
39
|
+
color: "#004170"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
background: {
|
|
44
|
+
id: Symbol(),
|
|
45
|
+
type: "internal",
|
|
46
|
+
widget: {
|
|
47
|
+
name: "EodashMap",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
widgets: [
|
|
51
|
+
{
|
|
52
|
+
id: Symbol(),
|
|
53
|
+
type: "internal",
|
|
54
|
+
title: "itemfilter",
|
|
55
|
+
layout: { x: 0, y: 0, w: 3, h: 12 },
|
|
56
|
+
slidable: false,
|
|
57
|
+
widget: {
|
|
58
|
+
name: "EodashItemFilter",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: Symbol(),
|
|
63
|
+
type: "internal",
|
|
64
|
+
title: "datepicker",
|
|
65
|
+
layout: { x: 5, y: 11, w: 2, h: 1 },
|
|
66
|
+
slidable: false,
|
|
67
|
+
widget: {
|
|
68
|
+
name: "EodashDatePicker",
|
|
69
|
+
properties: {
|
|
70
|
+
inline: true,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: Symbol(),
|
|
76
|
+
title: "Information",
|
|
77
|
+
layout: { x: 9, y: 0, w: 3, h: 12 },
|
|
78
|
+
widget: {
|
|
79
|
+
link: async () => await import("@eox/stacinfo"),
|
|
80
|
+
properties: {
|
|
81
|
+
for: currentUrl,
|
|
82
|
+
allowHtml: "true",
|
|
83
|
+
styleOverride:
|
|
84
|
+
"#properties li > .value {font-weight: normal !important;}",
|
|
85
|
+
header: "[]",
|
|
86
|
+
|
|
87
|
+
subheader: "[]",
|
|
88
|
+
properties: '["description"]',
|
|
89
|
+
featured: "[]",
|
|
90
|
+
footer: "[]",
|
|
91
|
+
},
|
|
92
|
+
tagName: "eox-stacinfo",
|
|
93
|
+
},
|
|
94
|
+
type: "web-component",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export default eodash;
|
package/core/main.js
CHANGED
package/core/plugins/index.js
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* plugins/index.ts
|
|
3
|
-
*
|
|
4
|
-
* Automatically included in `./src/main.ts`
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Plugins
|
|
8
1
|
import vuetify from './vuetify';
|
|
9
|
-
import router from './router';
|
|
10
2
|
import { createPinia } from 'pinia';
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
3
|
+
import eodash from '@/eodash';
|
|
4
|
+
import { eodashKey } from '@/utils/keys';
|
|
13
5
|
import store from '../store';
|
|
14
6
|
|
|
15
7
|
export const pinia = createPinia();
|
|
@@ -21,7 +13,6 @@ export function registerPlugins(app) {
|
|
|
21
13
|
window.eodashStore = store;
|
|
22
14
|
|
|
23
15
|
app.use(vuetify)
|
|
24
|
-
.use(router)
|
|
25
16
|
.use(pinia)
|
|
26
|
-
.provide(
|
|
17
|
+
.provide(eodashKey, eodash);
|
|
27
18
|
}
|
package/core/plugins/vuetify.js
CHANGED
|
@@ -10,9 +10,10 @@ import 'vuetify/styles';
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
import { createVuetify } from 'vuetify';
|
|
13
|
+
// import {} from "vuetify"
|
|
13
14
|
|
|
14
15
|
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
|
|
15
|
-
|
|
16
|
+
const vuetify = createVuetify({
|
|
16
17
|
theme: {
|
|
17
18
|
themes: {
|
|
18
19
|
dashboardTheme: {},
|
|
@@ -24,4 +25,6 @@ export default createVuetify({
|
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
|
-
})
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export default vuetify
|
package/core/store/Actions.js
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* loads font in the app using `webfontloader`
|
|
3
|
-
* @param {string} [family="Roboto"]
|
|
4
|
-
* @param {string} [link]
|
|
5
|
-
* @returns {Promise<string>} - font family name
|
|
6
|
-
* @see {@link "https://github.com/typekit/webfontloader "}
|
|
7
|
-
*/
|
|
8
|
-
export const loadFont = async (family = "Roboto", link) => {
|
|
9
|
-
const WebFontLoader = (await import('webfontloader')).default;
|
|
10
|
-
if (link) {
|
|
11
|
-
WebFontLoader.load({
|
|
12
|
-
custom: {
|
|
13
|
-
// Use FVD notation to include families https://github.com/typekit/fvd
|
|
14
|
-
families: [family],
|
|
15
|
-
// Path to stylesheet that defines font-face
|
|
16
|
-
urls: [link],
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
WebFontLoader.load({
|
|
22
|
-
google: {
|
|
23
|
-
families: [family]
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return family;
|
|
28
|
-
};
|
package/core/store/States.js
CHANGED
|
@@ -4,9 +4,18 @@ import { ref } from "vue";
|
|
|
4
4
|
* currently selected STAC endpoint
|
|
5
5
|
*/
|
|
6
6
|
export const currentUrl = ref('');
|
|
7
|
+
/**
|
|
8
|
+
* currently selected datetime
|
|
9
|
+
*/
|
|
10
|
+
export const datetime = ref(new Date().toISOString());
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Currently selected indicator
|
|
14
|
+
*/
|
|
15
|
+
export const indicator = ref("")
|
|
7
16
|
|
|
8
17
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {import("vue").Ref<
|
|
18
|
+
* Current map position
|
|
19
|
+
* @type {import("vue").Ref<(number|undefined)[]>}
|
|
11
20
|
*/
|
|
12
|
-
export const
|
|
21
|
+
export const mapPosition = ref([])
|
package/core/store/stac.js
CHANGED
|
@@ -2,7 +2,8 @@ import { defineStore } from 'pinia';
|
|
|
2
2
|
import { inject, ref } from 'vue';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { useAbsoluteUrl } from '@/composables/index';
|
|
5
|
-
import {
|
|
5
|
+
import { eodashKey } from '@/utils/keys';
|
|
6
|
+
import { indicator } from '@/store/States';
|
|
6
7
|
|
|
7
8
|
export const useSTAcStore = defineStore('stac', () => {
|
|
8
9
|
/**
|
|
@@ -14,22 +15,22 @@ export const useSTAcStore = defineStore('stac', () => {
|
|
|
14
15
|
/**
|
|
15
16
|
* selected STAC object.
|
|
16
17
|
* @type {import('vue').Ref<import('stac-ts').StacCatalog |
|
|
17
|
-
*
|
|
18
|
+
* import('stac-ts').StacCollection |import('stac-ts').StacItem
|
|
18
19
|
* | null>}
|
|
19
20
|
*/
|
|
20
21
|
const selectedStac = ref(null);
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
const
|
|
24
|
+
const eodash = /** @type {import("@/types").Eodash} */(inject(eodashKey));
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* fetches root stac catalog and assign it to `stac`
|
|
27
28
|
* @async
|
|
28
|
-
* @param {import("@/types").StacEndpoint} [url =
|
|
29
|
+
* @param {import("@/types").StacEndpoint} [url = eodash.stacEndpoint]
|
|
29
30
|
* @returns {Promise<void>}
|
|
30
31
|
* @see {@link stac}
|
|
31
32
|
*/
|
|
32
|
-
async function loadSTAC(url =
|
|
33
|
+
async function loadSTAC(url = eodash.stacEndpoint) {
|
|
33
34
|
await axios.get(url).then(resp => {
|
|
34
35
|
const links = /** @type {import('stac-ts').StacCatalog} */(resp.data).links.map(link => {
|
|
35
36
|
if (!link.title) {
|
|
@@ -54,6 +55,7 @@ export const useSTAcStore = defineStore('stac', () => {
|
|
|
54
55
|
|
|
55
56
|
await axios.get(absoluteUrl.value).then(resp => {
|
|
56
57
|
selectedStac.value = resp.data;
|
|
58
|
+
indicator.value = selectedStac.value?.id ?? "";
|
|
57
59
|
}).catch(err => console.error(err));
|
|
58
60
|
}
|
|
59
61
|
|