@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.
Files changed (73) hide show
  1. package/README.md +19 -5
  2. package/core/client/App.vue +6 -7
  3. package/core/client/SuspensedDashboard.ce.vue +58 -40
  4. package/core/client/asWebComponent.d.ts +10 -5
  5. package/core/client/asWebComponent.js +6 -6
  6. package/core/client/components/DashboardLayout.vue +35 -16
  7. package/core/client/components/DynamicWebComponent.vue +44 -44
  8. package/core/client/components/ErrorAlert.vue +19 -7
  9. package/core/client/components/Footer.vue +28 -14
  10. package/core/client/components/Header.vue +4 -4
  11. package/core/client/components/IframeWrapper.vue +3 -3
  12. package/core/client/components/Loading.vue +17 -18
  13. package/core/client/components/MobileLayout.vue +48 -26
  14. package/core/client/composables/DefineEodash.js +38 -29
  15. package/core/client/composables/DefineWidgets.js +101 -81
  16. package/core/client/composables/index.js +32 -29
  17. package/core/client/eodash.js +44 -39
  18. package/core/client/main.js +2 -2
  19. package/core/client/plugins/index.js +9 -10
  20. package/core/client/plugins/vuetify.js +9 -10
  21. package/core/client/render.js +4 -5
  22. package/core/client/store/States.js +8 -13
  23. package/core/client/store/index.js +14 -11
  24. package/core/client/store/stac.js +51 -37
  25. package/core/client/types.d.ts +169 -201
  26. package/core/client/utils/eodashSTAC.js +130 -49
  27. package/core/client/utils/helpers.js +18 -20
  28. package/core/client/utils/index.js +17 -10
  29. package/core/client/utils/keys.js +2 -2
  30. package/core/client/views/Dashboard.vue +53 -36
  31. package/core/client/vite-env.d.ts +19 -17
  32. package/dist/client/{DashboardLayout-BYROtP-7.js → DashboardLayout-BuDcv6LM.js} +9 -9
  33. package/dist/client/{DynamicWebComponent-BQhxFPM0.js → DynamicWebComponent-BEP4rVce.js} +2 -2
  34. package/dist/client/EodashDatePicker-oFb1zt5E.js +1211 -0
  35. package/dist/client/{EodashItemFilter-DIBDAHcc.js → EodashItemFilter-BElmgrST.js} +4 -6
  36. package/dist/client/{EodashMap-C6jJ2Lb_.js → EodashMap-DXyOgcEd.js} +13131 -14490
  37. package/dist/client/{Footer-BVIZms1S.js → Footer-CoPx6UXQ.js} +3 -3
  38. package/dist/client/{Header-TsTL1d2R.js → Header-C-zX31Ys.js} +169 -167
  39. package/dist/client/{IframeWrapper-XKChM78a.js → IframeWrapper-2w2ye0zM.js} +1 -1
  40. package/dist/client/{MobileLayout-BlGcMQra.js → MobileLayout-C9OVcP12.js} +45 -57
  41. package/dist/client/{VMain-C9XV5Lyg.js → VMain-Dm43jd43.js} +2 -2
  42. package/dist/client/{WidgetsContainer-BQXHnZpa.js → WidgetsContainer-BS87sLqk.js} +10 -3
  43. package/dist/client/{asWebComponent-CbdGxelK.js → asWebComponent-CpQUVi2N.js} +5508 -5561
  44. package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
  45. package/dist/client/{decoder-HRvnjnEI-CHAYOWhz.js → decoder-CP4lv0Kb-BHrv68IA.js} +1 -1
  46. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
  47. package/dist/client/eo-dash.js +3 -3
  48. package/dist/client/eodashSTAC-Q7kbX1Gy.js +2788 -0
  49. package/dist/client/{eox-itemfilter-DcQkRD2l.js → eox-itemfilter-TaBxgqq_.js} +1002 -974
  50. package/dist/client/{eox-map-C3DL31fp.js → eox-map-L7abwKTR.js} +5677 -5695
  51. package/dist/client/{forwardRefs-CyCJOFsz.js → forwardRefs-BVFQ82G4.js} +12 -21
  52. package/dist/client/{index-CabQjjQg.js → index-dOzyv_xR.js} +1 -1
  53. package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
  54. package/dist/client/{lerc-_E46UbWQ-TxBH4OeK.js → lerc-DzVumYtB-rm1Xco54.js} +5 -7
  55. package/dist/client/{lzw-BOMhmEDy-Dboc93VO.js → lzw-LAGDNbSC-DkP96qO9.js} +1 -1
  56. package/dist/client/{packbits-DaUD6MLm-Bu1PoTGa.js → packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
  57. package/dist/client/{pako.esm-C3kYPGGQ-BMki8cQY.js → pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
  58. package/dist/client/{raw-CcGKjn8q-DFOt-i8n.js → raw-CMGvRjfu-BRi6E4i1.js} +1 -1
  59. package/dist/client/{ssrBoot-DWJ-z4I-.js → ssrBoot-L9KejErM.js} +1 -1
  60. package/dist/client/style.css +2 -2
  61. package/dist/client/{transition-BlLt41wg.js → transition-DCePIwYR.js} +1 -1
  62. package/dist/client/{webfontloader-CyOFAuFB.js → webfontloader-qotgY98I.js} +56 -92
  63. package/dist/client/{webimage-D2c098k3-DLj1LQxB.js → webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
  64. package/dist/node/cli.js +1 -1
  65. package/dist/node/types.d.ts +32 -38
  66. package/package.json +11 -11
  67. package/widgets/EodashDatePicker.vue +94 -43
  68. package/widgets/EodashItemFilter.vue +13 -10
  69. package/widgets/EodashMap.vue +87 -20
  70. package/widgets/WidgetsContainer.vue +45 -27
  71. package/dist/client/EodashDatePicker-CFltnt5d.js +0 -1194
  72. package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
  73. package/dist/client/http-ZWiLaAeR.js +0 -1337
@@ -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
- * and used as an intermediate object to make user defined instances config reactive.
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://esa-eodash.github.io/RACE-catalog/RACE/catalog.json",
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
- id: "Information",
61
- title: "Information",
62
- layout: { x: 9, y: 0, w: 3, h: 12 },
63
- type: "web-component",
64
- widget: {
65
- link: async () => await import("@eox/stacinfo"),
66
- properties: {
67
- for: currentUrl,
68
- allowHtml: "true",
69
- styleOverride:
70
- "#properties li > .value {font-weight: normal !important;}",
71
- header: "[]",
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
- subheader: "[]",
74
- properties: '["description"]',
75
- featured: "[]",
76
- footer: "[]",
77
- },
78
- tagName: "eox-stacinfo",
79
- }
80
- } : null
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
- id: "Datepicker",
87
- type: "internal",
88
- layout: { x: 5, y: 10, w: 1, h: 1 },
89
- title: "Datepicker",
90
- widget: {
91
- name: "EodashDatePicker",
92
- },
93
- } : null
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
  });
@@ -1,2 +1,2 @@
1
- export { createEodash } from '@/composables/DefineEodash';
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 './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';
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.use(vuetify)
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
- * plugins/vuetify.ts
2
+ * Plugins/vuetify.ts
3
3
  *
4
4
  * Framework documentation: https://vuetifyjs.com`
5
5
  */
6
6
 
7
7
  // Styles
8
- import 'vuetify/styles';
8
+ import "vuetify/styles";
9
9
 
10
-
11
- import { createVuetify } from 'vuetify';
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: '#1867C0',
29
- secondary: '#5CBBF6',
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;
@@ -1,13 +1,12 @@
1
- import { registerPlugins } from '@/plugins';
1
+ import { registerPlugins } from "@/plugins";
2
2
  // Components
3
- import App from './App.vue';
3
+ import App from "./App.vue";
4
4
 
5
5
  // Composables
6
- import { createApp } from 'vue';
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('#app');
12
+ app.mount("#app");
@@ -1,21 +1,16 @@
1
1
  import { ref } from "vue";
2
2
 
3
- /**
4
- * currently selected STAC endpoint
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
- * Currently selected indicator
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
- * @type {import("vue").Ref<(number|undefined)[]>}
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('../store/**.js', { eager: true })
3
+ const storesImport = import.meta.glob("../store/**.js", { eager: true });
4
4
 
5
- const store = /** @type {import("@/types").EodashStore} */((() => {
6
- const stores = {}
7
- for (const [filePath, importedstore] of Object.entries(storesImport)) {
8
- const storeType = filePath.split('/').at(-1)?.slice(0, -3).toLowerCase() ?? ''
9
- if (!['keys'].includes(storeType)) {
10
- //@ts-expect-error
11
- stores[storeType] = importedstore;
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
- return stores;
15
- })());
16
+ return stores;
17
+ })()
18
+ );
16
19
 
17
20
  export default store;
@@ -1,66 +1,80 @@
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';
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('stac', () => {
8
+ export const useSTAcStore = defineStore("stac", () => {
9
9
  /**
10
- * links of the root STAC catalog
11
- * @type {import("vue").Ref<import('stac-ts').StacLink[]|null>}
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
- * selected STAC object.
17
- * @type {import('vue').Ref<import('stac-ts').StacCatalog |
18
- * import('stac-ts').StacCollection |import('stac-ts').StacItem
19
- * | null>}
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
- * fetches root stac catalog and assign it to `stac`
31
+ * Fetches root stac catalog and assign it to `stac`
32
+ *
28
33
  * @async
29
- * @param {import("@/types").StacEndpoint} [url = eodash.stacEndpoint]
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.get(url).then(resp => {
35
- const links = /** @type {import('stac-ts').StacCatalog} */(resp.data).links.map(link => {
36
- if (!link.title) {
37
- link.title = `${link.rel} ${link.href}`
38
- }
39
- return link
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
- stac.value = links;
42
- }).catch(err => {
43
- throw new Error("error loading assigned STAC endpoint", err)
44
- });
53
+ .catch((err) => {
54
+ throw new Error("error loading assigned STAC endpoint", err);
55
+ });
45
56
  }
46
57
 
47
58
  /**
48
- * fetches selected stac object and assign it to `selectedStac`
59
+ * Fetches selected stac object and assign it to `selectedStac`
60
+ *
49
61
  * @async
50
- * @param {string} relativePath - stac link href
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.get(absoluteUrl.value).then(resp => {
59
- selectedStac.value = resp.data;
60
- indicator.value = selectedStac.value?.id ?? "";
61
- }).catch(err => {
62
- throw new Error("error loading the selected STAC", err)
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 };