@eodash/eodash 5.0.0-alpha.2.5 → 5.0.0-alpha.2.7

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 (83) 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 +43 -29
  17. package/core/client/eodash.js +59 -41
  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/Actions.js +8 -0
  23. package/core/client/store/States.js +8 -13
  24. package/core/client/store/index.js +14 -11
  25. package/core/client/store/stac.js +51 -37
  26. package/core/client/types.d.ts +173 -200
  27. package/core/client/utils/eodashSTAC.js +130 -49
  28. package/core/client/utils/helpers.js +18 -20
  29. package/core/client/utils/index.js +29 -10
  30. package/core/client/utils/keys.js +2 -2
  31. package/core/client/views/Dashboard.vue +53 -36
  32. package/core/client/vite-env.d.ts +19 -17
  33. package/dist/client/{DashboardLayout-BYROtP-7.js → DashboardLayout-Cbci3g7o.js} +9 -9
  34. package/dist/client/{DynamicWebComponent-BQhxFPM0.js → DynamicWebComponent-DzmQ3Fr3.js} +3 -3
  35. package/dist/client/EodashDatePicker-SP5bYISd.js +252 -0
  36. package/dist/client/{EodashItemFilter-DIBDAHcc.js → EodashItemFilter-B9Tf2TBw.js} +4 -6
  37. package/dist/client/{EodashMap-C6jJ2Lb_.js → EodashMap-D_znzmX7.js} +13131 -14490
  38. package/dist/client/EodashMapBtns-BOKugQ88.js +37 -0
  39. package/dist/client/ExportState-D7m9s4T8.js +558 -0
  40. package/dist/client/{Footer-BVIZms1S.js → Footer-C2uV1-zu.js} +12 -12
  41. package/dist/client/Header-C2ROtxo_.js +350 -0
  42. package/dist/client/{IframeWrapper-XKChM78a.js → IframeWrapper-Wwou4pwf.js} +1 -1
  43. package/dist/client/{MobileLayout-BlGcMQra.js → MobileLayout-DR27Ctiz.js} +45 -57
  44. package/dist/client/PopUp-bPGAY43o.js +300 -0
  45. package/dist/client/VImg-swqiqth2.js +291 -0
  46. package/dist/client/{VMain-C9XV5Lyg.js → VMain-Bu1bPjvK.js} +2 -2
  47. package/dist/client/VOverlay-D_MKJ4vQ.js +967 -0
  48. package/dist/client/{WidgetsContainer-BQXHnZpa.js → WidgetsContainer-CpxYT8YI.js} +10 -3
  49. package/dist/client/{asWebComponent-CbdGxelK.js → asWebComponent-DeaU3QoK.js} +6332 -6159
  50. package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
  51. package/dist/client/{decoder-HRvnjnEI-CHAYOWhz.js → decoder-CP4lv0Kb-nokx54iM.js} +1 -1
  52. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
  53. package/dist/client/eo-dash.js +2 -2
  54. package/dist/client/eodashSTAC-CFQuZ_cI.js +2788 -0
  55. package/dist/client/{eox-itemfilter-DcQkRD2l.js → eox-itemfilter-TaBxgqq_.js} +1002 -974
  56. package/dist/client/{eox-map-C3DL31fp.js → eox-map-L7abwKTR.js} +5677 -5695
  57. package/dist/client/{forwardRefs-CyCJOFsz.js → forwardRefs-D0a135Tc.js} +43 -50
  58. package/dist/client/{index-CabQjjQg.js → index-CoqcWt6E.js} +4 -4
  59. package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
  60. package/dist/client/{lerc-_E46UbWQ-TxBH4OeK.js → lerc-DzVumYtB-B3rx9xzz.js} +5 -7
  61. package/dist/client/{lzw-BOMhmEDy-Dboc93VO.js → lzw-LAGDNbSC-DkP96qO9.js} +1 -1
  62. package/dist/client/{packbits-DaUD6MLm-Bu1PoTGa.js → packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
  63. package/dist/client/{pako.esm-C3kYPGGQ-BMki8cQY.js → pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
  64. package/dist/client/{raw-CcGKjn8q-DFOt-i8n.js → raw-CMGvRjfu-BRi6E4i1.js} +1 -1
  65. package/dist/client/{ssrBoot-DWJ-z4I-.js → ssrBoot-C-inWOiD.js} +1 -1
  66. package/dist/client/style.css +2 -2
  67. package/dist/client/{transition-BlLt41wg.js → transition-C8le0YwQ.js} +3 -3
  68. package/dist/client/{webfontloader-CyOFAuFB.js → webfontloader-qotgY98I.js} +56 -92
  69. package/dist/client/{webimage-D2c098k3-DLj1LQxB.js → webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
  70. package/dist/node/cli.js +1 -1
  71. package/dist/node/types.d.ts +32 -38
  72. package/package.json +12 -12
  73. package/widgets/EodashDatePicker.vue +94 -43
  74. package/widgets/EodashItemFilter.vue +13 -10
  75. package/widgets/EodashMap.vue +87 -20
  76. package/widgets/EodashMapBtns.vue +34 -0
  77. package/widgets/ExportState.vue +112 -0
  78. package/widgets/PopUp.vue +40 -0
  79. package/widgets/WidgetsContainer.vue +45 -27
  80. package/dist/client/EodashDatePicker-CFltnt5d.js +0 -1194
  81. package/dist/client/Header-TsTL1d2R.js +0 -633
  82. package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
  83. package/dist/client/http-ZWiLaAeR.js +0 -1337
@@ -1,14 +1,14 @@
1
1
  import { reactive } from "vue";
2
2
  import { currentUrl } from "./store/States";
3
-
4
3
  /**
5
- * Reactive Edoash Instance Object. provided globally in the app,
6
- * and used as an intermediate object to make user defined instances config reactive.
4
+ * Reactive Edoash Instance Object. provided globally in the app, and used as an
5
+ * intermediate object to make user defined instances config reactive.
6
+ *
7
7
  * @type {import("./types").Eodash}
8
8
  */
9
9
  export const eodash = reactive({
10
10
  id: "demo",
11
- stacEndpoint: "https://esa-eodash.github.io/RACE-catalog/RACE/catalog.json",
11
+ stacEndpoint: "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
12
12
  brand: {
13
13
  noLayout: true,
14
14
  name: "Demo",
@@ -33,9 +33,9 @@ export const eodash = reactive({
33
33
  class: "align-self-center justify-self-center",
34
34
  size: "120",
35
35
  speed: "2.5",
36
- color: "#004170"
37
- }
38
- }
36
+ color: "#004170",
37
+ },
38
+ },
39
39
  },
40
40
  background: {
41
41
  id: Symbol(),
@@ -56,43 +56,61 @@ export const eodash = reactive({
56
56
  },
57
57
  {
58
58
  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: "[]",
72
-
73
- subheader: "[]",
74
- properties: '["description"]',
75
- featured: "[]",
76
- footer: "[]",
77
- },
78
- tagName: "eox-stacinfo",
79
- }
80
- } : null
81
- }
59
+ return selectedSTAC
60
+ ? {
61
+ id: "Information",
62
+ title: "Information",
63
+ layout: { x: 9, y: 0, w: 3, h: 12 },
64
+ type: "web-component",
65
+ widget: {
66
+ link: async () => await import("@eox/stacinfo"),
67
+ properties: {
68
+ for: currentUrl,
69
+ allowHtml: "true",
70
+ styleOverride:
71
+ "#properties li > .value {font-weight: normal !important;}",
72
+ header: "[]",
73
+ subheader: "[]",
74
+ properties: '["description"]',
75
+ featured: "[]",
76
+ footer: "[]",
77
+ },
78
+ tagName: "eox-stacinfo",
79
+ },
80
+ }
81
+ : null;
82
+ },
82
83
  },
83
84
  {
84
85
  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
- }
86
+ return selectedSTAC
87
+ ? {
88
+ id: "Datepicker",
89
+ type: "internal",
90
+ layout: { x: 5, y: 10, w: 1, h: 1 },
91
+ title: "Datepicker",
92
+ widget: {
93
+ name: "EodashDatePicker",
94
+ },
95
+ }
96
+ : null;
97
+ },
98
+ },
99
+ {
100
+ defineWidget: (selected) => {
101
+ return selected
102
+ ? {
103
+ id: Symbol(),
104
+ layout: { x: 8, y: 0, w: 1, h: 1 },
105
+ title: "Buttons",
106
+ type: "internal",
107
+ widget: {
108
+ name: "EodashMapBtns",
109
+ },
110
+ }
111
+ : null;
112
+ },
113
+ },
96
114
  ],
97
115
  },
98
116
  });
@@ -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");
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns the current layers of the `eox-map`
3
+ * @param {string} [el="eox-map"] - `eox-map` element selector
4
+ * @returns {object[]}
5
+ */
6
+ export const getLayers = (el = "eox-map") =>
7
+ //@ts-expect-error layers doesn't exist on type element
8
+ document.querySelector(el)?.layers.toReversed();
@@ -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 };