@eodash/eodash 5.0.0-alpha.2.5 → 5.0.0-alpha.2.6
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 +19 -5
- package/core/client/App.vue +6 -7
- package/core/client/SuspensedDashboard.ce.vue +58 -40
- package/core/client/asWebComponent.d.ts +10 -5
- package/core/client/asWebComponent.js +6 -6
- package/core/client/components/DashboardLayout.vue +35 -16
- package/core/client/components/DynamicWebComponent.vue +44 -44
- package/core/client/components/ErrorAlert.vue +19 -7
- package/core/client/components/Footer.vue +28 -14
- package/core/client/components/Header.vue +4 -4
- package/core/client/components/IframeWrapper.vue +3 -3
- package/core/client/components/Loading.vue +17 -18
- package/core/client/components/MobileLayout.vue +48 -26
- package/core/client/composables/DefineEodash.js +38 -29
- package/core/client/composables/DefineWidgets.js +101 -81
- package/core/client/composables/index.js +32 -29
- package/core/client/eodash.js +44 -39
- package/core/client/main.js +2 -2
- package/core/client/plugins/index.js +9 -10
- package/core/client/plugins/vuetify.js +9 -10
- package/core/client/render.js +4 -5
- package/core/client/store/States.js +8 -13
- package/core/client/store/index.js +14 -11
- package/core/client/store/stac.js +51 -37
- package/core/client/types.d.ts +169 -201
- package/core/client/utils/eodashSTAC.js +130 -49
- package/core/client/utils/helpers.js +18 -20
- package/core/client/utils/index.js +17 -10
- package/core/client/utils/keys.js +2 -2
- package/core/client/views/Dashboard.vue +53 -36
- package/core/client/vite-env.d.ts +19 -17
- package/dist/client/{DashboardLayout-BYROtP-7.js → DashboardLayout-BuDcv6LM.js} +9 -9
- package/dist/client/{DynamicWebComponent-BQhxFPM0.js → DynamicWebComponent-BEP4rVce.js} +2 -2
- package/dist/client/EodashDatePicker-oFb1zt5E.js +1211 -0
- package/dist/client/{EodashItemFilter-DIBDAHcc.js → EodashItemFilter-BElmgrST.js} +4 -6
- package/dist/client/{EodashMap-C6jJ2Lb_.js → EodashMap-DXyOgcEd.js} +13131 -14490
- package/dist/client/{Footer-BVIZms1S.js → Footer-CoPx6UXQ.js} +3 -3
- package/dist/client/{Header-TsTL1d2R.js → Header-C-zX31Ys.js} +169 -167
- package/dist/client/{IframeWrapper-XKChM78a.js → IframeWrapper-2w2ye0zM.js} +1 -1
- package/dist/client/{MobileLayout-BlGcMQra.js → MobileLayout-C9OVcP12.js} +45 -57
- package/dist/client/{VMain-C9XV5Lyg.js → VMain-Dm43jd43.js} +2 -2
- package/dist/client/{WidgetsContainer-BQXHnZpa.js → WidgetsContainer-BS87sLqk.js} +10 -3
- package/dist/client/{asWebComponent-CbdGxelK.js → asWebComponent-CpQUVi2N.js} +5508 -5561
- package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
- package/dist/client/{decoder-HRvnjnEI-CHAYOWhz.js → decoder-CP4lv0Kb-BHrv68IA.js} +1 -1
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
- package/dist/client/eo-dash.js +3 -3
- package/dist/client/eodashSTAC-Q7kbX1Gy.js +2788 -0
- package/dist/client/{eox-itemfilter-DcQkRD2l.js → eox-itemfilter-TaBxgqq_.js} +1002 -974
- package/dist/client/{eox-map-C3DL31fp.js → eox-map-L7abwKTR.js} +5677 -5695
- package/dist/client/{forwardRefs-CyCJOFsz.js → forwardRefs-BVFQ82G4.js} +12 -21
- package/dist/client/{index-CabQjjQg.js → index-dOzyv_xR.js} +1 -1
- package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
- package/dist/client/{lerc-_E46UbWQ-TxBH4OeK.js → lerc-DzVumYtB-rm1Xco54.js} +5 -7
- package/dist/client/{lzw-BOMhmEDy-Dboc93VO.js → lzw-LAGDNbSC-DkP96qO9.js} +1 -1
- package/dist/client/{packbits-DaUD6MLm-Bu1PoTGa.js → packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
- package/dist/client/{pako.esm-C3kYPGGQ-BMki8cQY.js → pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
- package/dist/client/{raw-CcGKjn8q-DFOt-i8n.js → raw-CMGvRjfu-BRi6E4i1.js} +1 -1
- package/dist/client/{ssrBoot-DWJ-z4I-.js → ssrBoot-L9KejErM.js} +1 -1
- package/dist/client/style.css +2 -2
- package/dist/client/{transition-BlLt41wg.js → transition-DCePIwYR.js} +1 -1
- package/dist/client/{webfontloader-CyOFAuFB.js → webfontloader-qotgY98I.js} +56 -92
- package/dist/client/{webimage-D2c098k3-DLj1LQxB.js → webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
- package/dist/node/cli.js +1 -1
- package/dist/node/types.d.ts +32 -38
- package/package.json +11 -11
- package/widgets/EodashDatePicker.vue +94 -43
- package/widgets/EodashItemFilter.vue +13 -10
- package/widgets/EodashMap.vue +87 -20
- package/widgets/WidgetsContainer.vue +45 -27
- package/dist/client/EodashDatePicker-CFltnt5d.js +0 -1194
- package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
- package/dist/client/http-ZWiLaAeR.js +0 -1337
package/core/client/eodash.js
CHANGED
|
@@ -2,13 +2,14 @@ import { reactive } from "vue";
|
|
|
2
2
|
import { currentUrl } from "./store/States";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Reactive Edoash Instance Object. provided globally in the app,
|
|
6
|
-
*
|
|
5
|
+
* Reactive Edoash Instance Object. provided globally in the app, and used as an
|
|
6
|
+
* intermediate object to make user defined instances config reactive.
|
|
7
|
+
*
|
|
7
8
|
* @type {import("./types").Eodash}
|
|
8
9
|
*/
|
|
9
10
|
export const eodash = reactive({
|
|
10
11
|
id: "demo",
|
|
11
|
-
stacEndpoint: "https://
|
|
12
|
+
stacEndpoint: "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
12
13
|
brand: {
|
|
13
14
|
noLayout: true,
|
|
14
15
|
name: "Demo",
|
|
@@ -33,9 +34,9 @@ export const eodash = reactive({
|
|
|
33
34
|
class: "align-self-center justify-self-center",
|
|
34
35
|
size: "120",
|
|
35
36
|
speed: "2.5",
|
|
36
|
-
color: "#004170"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
37
|
+
color: "#004170",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
39
40
|
},
|
|
40
41
|
background: {
|
|
41
42
|
id: Symbol(),
|
|
@@ -56,43 +57,47 @@ export const eodash = reactive({
|
|
|
56
57
|
},
|
|
57
58
|
{
|
|
58
59
|
defineWidget: (selectedSTAC) => {
|
|
59
|
-
return selectedSTAC
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
return selectedSTAC
|
|
61
|
+
? {
|
|
62
|
+
id: "Information",
|
|
63
|
+
title: "Information",
|
|
64
|
+
layout: { x: 9, y: 0, w: 3, h: 12 },
|
|
65
|
+
type: "web-component",
|
|
66
|
+
widget: {
|
|
67
|
+
link: async () => await import("@eox/stacinfo"),
|
|
68
|
+
properties: {
|
|
69
|
+
for: currentUrl,
|
|
70
|
+
allowHtml: "true",
|
|
71
|
+
styleOverride:
|
|
72
|
+
"#properties li > .value {font-weight: normal !important;}",
|
|
73
|
+
header: "[]",
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
subheader: "[]",
|
|
76
|
+
properties: '["description"]',
|
|
77
|
+
featured: "[]",
|
|
78
|
+
footer: "[]",
|
|
79
|
+
},
|
|
80
|
+
tagName: "eox-stacinfo",
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
: null;
|
|
84
|
+
},
|
|
82
85
|
},
|
|
83
86
|
{
|
|
84
87
|
defineWidget: (selectedSTAC) => {
|
|
85
|
-
return selectedSTAC
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
return selectedSTAC
|
|
89
|
+
? {
|
|
90
|
+
id: "Datepicker",
|
|
91
|
+
type: "internal",
|
|
92
|
+
layout: { x: 5, y: 10, w: 1, h: 1 },
|
|
93
|
+
title: "Datepicker",
|
|
94
|
+
widget: {
|
|
95
|
+
name: "EodashDatePicker",
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
: null;
|
|
99
|
+
},
|
|
100
|
+
},
|
|
96
101
|
],
|
|
97
102
|
},
|
|
98
103
|
});
|
package/core/client/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createEodash } from
|
|
2
|
-
export { default as store } from "@/store"
|
|
1
|
+
export { createEodash } from "@/composables/DefineEodash";
|
|
2
|
+
export { default as store } from "@/store";
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import vuetify from
|
|
2
|
-
import { createPinia } from
|
|
3
|
-
import eodash from
|
|
4
|
-
import VCalendar from
|
|
5
|
-
import { eodashKey } from
|
|
6
|
-
import store from
|
|
1
|
+
import vuetify from "./vuetify";
|
|
2
|
+
import { createPinia } from "pinia";
|
|
3
|
+
import eodash from "@/eodash";
|
|
4
|
+
import VCalendar from "v-calendar";
|
|
5
|
+
import { eodashKey } from "@/utils/keys";
|
|
6
|
+
import store from "../store";
|
|
7
7
|
|
|
8
8
|
export const pinia = createPinia();
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* @param {import('vue').App} app
|
|
12
|
-
*/
|
|
10
|
+
/** @param {import("vue").App} app */
|
|
13
11
|
export function registerPlugins(app) {
|
|
14
12
|
window.eodashStore = store;
|
|
15
13
|
|
|
16
|
-
app
|
|
14
|
+
app
|
|
15
|
+
.use(vuetify)
|
|
17
16
|
.use(pinia)
|
|
18
17
|
// Use plugin with optional defaults
|
|
19
18
|
.use(VCalendar, {})
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Plugins/vuetify.ts
|
|
3
3
|
*
|
|
4
4
|
* Framework documentation: https://vuetifyjs.com`
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Styles
|
|
8
|
-
import
|
|
8
|
+
import "vuetify/styles";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
import { mdiChevronLeft, mdiChevronRight, mdiMenuDown } from "@mdi/js"
|
|
10
|
+
import { createVuetify } from "vuetify";
|
|
11
|
+
import { mdiChevronLeft, mdiChevronRight, mdiMenuDown } from "@mdi/js";
|
|
13
12
|
|
|
14
13
|
const vuetify = createVuetify({
|
|
15
14
|
icons: {
|
|
@@ -17,7 +16,7 @@ const vuetify = createVuetify({
|
|
|
17
16
|
// mapping v-date-picker and v-tabs default icons to `@mdi/js`
|
|
18
17
|
next: [mdiChevronRight],
|
|
19
18
|
prev: [mdiChevronLeft],
|
|
20
|
-
subgroup: [mdiMenuDown]
|
|
19
|
+
subgroup: [mdiMenuDown],
|
|
21
20
|
},
|
|
22
21
|
},
|
|
23
22
|
theme: {
|
|
@@ -25,12 +24,12 @@ const vuetify = createVuetify({
|
|
|
25
24
|
dashboardTheme: {},
|
|
26
25
|
light: {
|
|
27
26
|
colors: {
|
|
28
|
-
primary:
|
|
29
|
-
secondary:
|
|
27
|
+
primary: "#1867C0",
|
|
28
|
+
secondary: "#5CBBF6",
|
|
30
29
|
},
|
|
31
30
|
},
|
|
32
31
|
},
|
|
33
32
|
},
|
|
34
|
-
})
|
|
33
|
+
});
|
|
35
34
|
|
|
36
|
-
export default vuetify
|
|
35
|
+
export default vuetify;
|
package/core/client/render.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { registerPlugins } from
|
|
1
|
+
import { registerPlugins } from "@/plugins";
|
|
2
2
|
// Components
|
|
3
|
-
import App from
|
|
3
|
+
import App from "./App.vue";
|
|
4
4
|
|
|
5
5
|
// Composables
|
|
6
|
-
import { createApp } from
|
|
7
|
-
|
|
6
|
+
import { createApp } from "vue";
|
|
8
7
|
|
|
9
8
|
const app = createApp(App);
|
|
10
9
|
|
|
11
10
|
registerPlugins(app);
|
|
12
11
|
|
|
13
|
-
app.mount(
|
|
12
|
+
app.mount("#app");
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export const currentUrl = ref('');
|
|
7
|
-
/**
|
|
8
|
-
* currently selected datetime
|
|
9
|
-
*/
|
|
3
|
+
/** Currently selected STAC endpoint */
|
|
4
|
+
export const currentUrl = ref("");
|
|
5
|
+
/** Currently selected datetime */
|
|
10
6
|
export const datetime = ref(new Date().toISOString());
|
|
11
7
|
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
export const indicator = ref("")
|
|
8
|
+
/** Currently selected indicator */
|
|
9
|
+
export const indicator = ref("");
|
|
16
10
|
|
|
17
11
|
/**
|
|
18
12
|
* Current map position
|
|
19
|
-
*
|
|
13
|
+
*
|
|
14
|
+
* @type {import("vue").Ref<(number | undefined)[]>}
|
|
20
15
|
*/
|
|
21
|
-
export const mapPosition = ref([])
|
|
16
|
+
export const mapPosition = ref([]);
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
//export all actions, states, and pinia stores
|
|
2
2
|
|
|
3
|
-
const storesImport = import.meta.glob(
|
|
3
|
+
const storesImport = import.meta.glob("../store/**.js", { eager: true });
|
|
4
4
|
|
|
5
|
-
const store = /** @type {import("@/types").EodashStore} */(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const store = /** @type {import("@/types").EodashStore} */ (
|
|
6
|
+
(() => {
|
|
7
|
+
const stores = {};
|
|
8
|
+
for (const [filePath, importedstore] of Object.entries(storesImport)) {
|
|
9
|
+
const storeType =
|
|
10
|
+
filePath.split("/").at(-1)?.slice(0, -3).toLowerCase() ?? "";
|
|
11
|
+
if (!["keys"].includes(storeType)) {
|
|
12
|
+
//@ts-expect-error `importedstore` cant be typed individually
|
|
13
|
+
stores[storeType] = importedstore;
|
|
14
|
+
}
|
|
12
15
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
return stores;
|
|
17
|
+
})()
|
|
18
|
+
);
|
|
16
19
|
|
|
17
20
|
export default store;
|
|
@@ -1,66 +1,80 @@
|
|
|
1
|
-
import { defineStore } from
|
|
2
|
-
import { inject, ref } from
|
|
3
|
-
import axios from
|
|
4
|
-
import { useAbsoluteUrl } from
|
|
5
|
-
import { eodashKey } from
|
|
6
|
-
import { indicator } from
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { inject, ref } from "vue";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import { useAbsoluteUrl } from "@/composables/index";
|
|
5
|
+
import { eodashKey } from "@/utils/keys";
|
|
6
|
+
import { indicator } from "@/store/States";
|
|
7
7
|
|
|
8
|
-
export const useSTAcStore = defineStore(
|
|
8
|
+
export const useSTAcStore = defineStore("stac", () => {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Links of the root STAC catalog
|
|
11
|
+
*
|
|
12
|
+
* @type {import("vue").Ref<import("stac-ts").StacLink[] | null>}
|
|
12
13
|
*/
|
|
13
14
|
const stac = ref(null);
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Selected STAC object.
|
|
18
|
+
*
|
|
19
|
+
* @type {import("vue").Ref<
|
|
20
|
+
* | import("stac-ts").StacCatalog
|
|
21
|
+
* | import("stac-ts").StacCollection
|
|
22
|
+
* | import("stac-ts").StacItem
|
|
23
|
+
* | null
|
|
24
|
+
* >}
|
|
20
25
|
*/
|
|
21
26
|
const selectedStac = ref(null);
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
const eodash = /** @type {import("@/types").Eodash} */(inject(eodashKey));
|
|
28
|
+
const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
|
|
25
29
|
|
|
26
30
|
/**
|
|
27
|
-
*
|
|
31
|
+
* Fetches root stac catalog and assign it to `stac`
|
|
32
|
+
*
|
|
28
33
|
* @async
|
|
29
|
-
* @param {import("@/types").StacEndpoint} [url
|
|
34
|
+
* @param {import("@/types").StacEndpoint} [url=eodash.stacEndpoint] Default
|
|
35
|
+
* is `eodash.stacEndpoint`
|
|
30
36
|
* @returns {Promise<void>}
|
|
31
37
|
* @see {@link stac}
|
|
32
38
|
*/
|
|
33
39
|
async function loadSTAC(url = eodash.stacEndpoint) {
|
|
34
|
-
await axios
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
await axios
|
|
41
|
+
.get(url)
|
|
42
|
+
.then((resp) => {
|
|
43
|
+
const links = /** @type {import("stac-ts").StacCatalog} */ (
|
|
44
|
+
resp.data
|
|
45
|
+
).links.map((link) => {
|
|
46
|
+
if (!link.title) {
|
|
47
|
+
link.title = `${link.rel} ${link.href}`;
|
|
48
|
+
}
|
|
49
|
+
return link;
|
|
50
|
+
});
|
|
51
|
+
stac.value = links;
|
|
40
52
|
})
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
53
|
+
.catch((err) => {
|
|
54
|
+
throw new Error("error loading assigned STAC endpoint", err);
|
|
55
|
+
});
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
/**
|
|
48
|
-
*
|
|
59
|
+
* Fetches selected stac object and assign it to `selectedStac`
|
|
60
|
+
*
|
|
49
61
|
* @async
|
|
50
|
-
* @param {string} relativePath -
|
|
62
|
+
* @param {string} relativePath - Stac link href
|
|
51
63
|
* @returns {Promise<void>}
|
|
52
64
|
* @see {@link selectedStac}
|
|
53
65
|
*/
|
|
54
|
-
async function loadSelectedSTAC(relativePath =
|
|
55
|
-
|
|
66
|
+
async function loadSelectedSTAC(relativePath = "") {
|
|
56
67
|
const absoluteUrl = useAbsoluteUrl(relativePath);
|
|
57
68
|
|
|
58
|
-
await axios
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
await axios
|
|
70
|
+
.get(absoluteUrl.value)
|
|
71
|
+
.then((resp) => {
|
|
72
|
+
selectedStac.value = resp.data;
|
|
73
|
+
indicator.value = selectedStac.value?.id ?? "";
|
|
74
|
+
})
|
|
75
|
+
.catch((err) => {
|
|
76
|
+
throw new Error("error loading the selected STAC", err);
|
|
77
|
+
});
|
|
64
78
|
}
|
|
65
79
|
|
|
66
80
|
return { stac, loadSTAC, loadSelectedSTAC, selectedStac };
|