@eodash/eodash 5.0.0-alpha.2.3 → 5.0.0-alpha.2.4

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 (78) hide show
  1. package/README.md +2 -3
  2. package/core/{SuspensedDashboard.ce.vue → client/SuspensedDashboard.ce.vue} +33 -15
  3. package/core/{plugins → client/plugins}/vuetify.js +1 -1
  4. package/core/{types.d.ts → client/types.d.ts} +2 -2
  5. package/core/{views → client/views}/Dashboard.vue +22 -4
  6. package/dist/{DashboardLayout-lzEvtalW.js → client/DashboardLayout-ZaSRMD1M.js} +19 -18
  7. package/dist/{DynamicWebComponent-CgDh2csQ.js → client/DynamicWebComponent-C4Hotc4H.js} +1 -1
  8. package/dist/{EodashDatePicker-bIyNUYaG.js → client/EodashDatePicker-C4kKjxKy.js} +3 -3
  9. package/dist/{EodashItemFilter-CpgyrJRX.js → client/EodashItemFilter-cBHC0YEM.js} +2 -2
  10. package/dist/{EodashMap-CyR-Ldpk.js → client/EodashMap-CGrQjZ1P.js} +2490 -2496
  11. package/dist/{Footer-C2sIHSym.js → client/Footer-pS636dEP.js} +1 -1
  12. package/dist/{Header-DFz2BUnp.js → client/Header-DQuaLdjl.js} +16 -16
  13. package/dist/{IframeWrapper-Csep3rMg.js → client/IframeWrapper-Cg3GMmfW.js} +1 -1
  14. package/dist/{MobileLayout-CXNJL_q6.js → client/MobileLayout-BLXFBWI_.js} +97 -94
  15. package/dist/{VMain-COrg6UtF.js → client/VMain-BHYlmRic.js} +2 -2
  16. package/dist/{WidgetsContainer-XA6_dKOm.js → client/WidgetsContainer-dje9QSk0.js} +8 -8
  17. package/dist/{asWebComponent-fqvymeM-.js → client/asWebComponent-Bvb3xkxI.js} +5358 -5139
  18. package/dist/{decoder-kAoyGIq9-DjQanfeo.js → client/decoder-HRvnjnEI-BQ2rajuJ.js} +1 -1
  19. package/dist/client/eo-dash.js +6 -0
  20. package/dist/{eox-map-BJ9SIixs.js → client/eox-map-C3DL31fp.js} +1882 -1809
  21. package/dist/client/eox-stacinfo-l7ALSV90.js +13969 -0
  22. package/dist/{index-Cskxla5D.js → client/index-CaDDfJYE.js} +1 -1
  23. package/dist/{index-Zv5eTiB6.js → client/index-DlNICb3T.js} +10 -10
  24. package/dist/{lerc-C9VL9kri-O4muG-MO.js → client/lerc-_E46UbWQ-Beu35ovS.js} +1 -1
  25. package/dist/{ssrBoot-DCCAW5xY.js → client/ssrBoot-Dd7m-btU.js} +1 -1
  26. package/dist/{style.css → client/style.css} +1 -1
  27. package/dist/node/cli.js +20 -0
  28. package/dist/node/main.js +2 -0
  29. package/{bin → dist/node}/types.d.ts +2 -2
  30. package/package.json +20 -18
  31. package/widgets/EodashItemFilter.vue +1 -1
  32. package/bin/app.js +0 -22
  33. package/bin/cli.js +0 -62
  34. package/bin/main.js +0 -9
  35. package/bin/serverConfig.js +0 -165
  36. package/bin/utils.js +0 -103
  37. package/dist/eo-dash.js +0 -6
  38. package/dist/eox-stacinfo-B-YrT7Ug.js +0 -13698
  39. /package/core/{App.vue → client/App.vue} +0 -0
  40. /package/core/{asWebComponent.d.ts → client/asWebComponent.d.ts} +0 -0
  41. /package/core/{asWebComponent.js → client/asWebComponent.js} +0 -0
  42. /package/core/{components → client/components}/DashboardLayout.vue +0 -0
  43. /package/core/{components → client/components}/DynamicWebComponent.vue +0 -0
  44. /package/core/{components → client/components}/ErrorAlert.vue +0 -0
  45. /package/core/{components → client/components}/Footer.vue +0 -0
  46. /package/core/{components → client/components}/Header.vue +0 -0
  47. /package/core/{components → client/components}/IframeWrapper.vue +0 -0
  48. /package/core/{components → client/components}/Loading.vue +0 -0
  49. /package/core/{components → client/components}/MobileLayout.vue +0 -0
  50. /package/core/{composables → client/composables}/DefineEodash.js +0 -0
  51. /package/core/{composables → client/composables}/DefineWidgets.js +0 -0
  52. /package/core/{composables → client/composables}/index.js +0 -0
  53. /package/core/{eodash.js → client/eodash.js} +0 -0
  54. /package/core/{main.js → client/main.js} +0 -0
  55. /package/core/{plugins → client/plugins}/index.js +0 -0
  56. /package/core/{render.js → client/render.js} +0 -0
  57. /package/core/{store → client/store}/Actions.js +0 -0
  58. /package/core/{store → client/store}/States.js +0 -0
  59. /package/core/{store → client/store}/index.js +0 -0
  60. /package/core/{store → client/store}/stac.js +0 -0
  61. /package/core/{utils → client/utils}/eodashSTAC.js +0 -0
  62. /package/core/{utils → client/utils}/helpers.js +0 -0
  63. /package/core/{utils → client/utils}/index.js +0 -0
  64. /package/core/{utils → client/utils}/keys.js +0 -0
  65. /package/core/{vite-env.d.ts → client/vite-env.d.ts} +0 -0
  66. /package/dist/{.gitkeep → client/.gitkeep} +0 -0
  67. /package/dist/{_commonjsHelpers-DaMA6jEr.js → client/_commonjsHelpers-DaMA6jEr.js} +0 -0
  68. /package/dist/{basedecoder-Qm25PwVp-CHo5Pomv.js → client/basedecoder-Qm25PwVp-CHo5Pomv.js} +0 -0
  69. /package/dist/{deflate-Be2Arps5-hDqMz3RA.js → client/deflate-Be2Arps5-hDqMz3RA.js} +0 -0
  70. /package/dist/{eox-itemfilter-DcQkRD2l.js → client/eox-itemfilter-DcQkRD2l.js} +0 -0
  71. /package/dist/{forwardRefs-Bxeu9Obx.js → client/forwardRefs-Bxeu9Obx.js} +0 -0
  72. /package/dist/{jpeg-DNfUpLwy-Fjan-04T.js → client/jpeg-DNfUpLwy-Fjan-04T.js} +0 -0
  73. /package/dist/{lzw-BOMhmEDy-Dboc93VO.js → client/lzw-BOMhmEDy-Dboc93VO.js} +0 -0
  74. /package/dist/{packbits-DaUD6MLm-Bu1PoTGa.js → client/packbits-DaUD6MLm-Bu1PoTGa.js} +0 -0
  75. /package/dist/{pako.esm-C3kYPGGQ-BMki8cQY.js → client/pako.esm-C3kYPGGQ-BMki8cQY.js} +0 -0
  76. /package/dist/{raw-CcGKjn8q-DFOt-i8n.js → client/raw-CcGKjn8q-DFOt-i8n.js} +0 -0
  77. /package/dist/{webfontloader-CyOFAuFB.js → client/webfontloader-CyOFAuFB.js} +0 -0
  78. /package/dist/{webimage-D2c098k3-DLj1LQxB.js → client/webimage-D2c098k3-DLj1LQxB.js} +0 -0
package/README.md CHANGED
@@ -18,10 +18,9 @@ npm run preview
18
18
 
19
19
  ## Folder Structure
20
20
  .
21
- ├── bin # CLI source code
22
- ├── core # Client source code that hosts the microfrontends and renders the dashboard
21
+ ├── core # CLI & Client source code
23
22
  ├── docs # Documentation files
24
- ├── tests # CLI and component tests folder
23
+ ├── tests # CLI & Client component tests folder
25
24
  ├── widgets # Vue componenets as internal widgets.
26
25
  ├── public # Statically served directory
27
26
  └── README.md
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-app>
2
+ <v-app ref="vAppRef">
3
3
  <Suspense>
4
4
  <Dashboard :on-template-mount="setStylesFromHead" :config="config" />
5
5
 
@@ -20,7 +20,10 @@ defineProps({
20
20
  config: {
21
21
  type: String,
22
22
  }
23
- })
23
+ });
24
+
25
+ /** @type { import("vue").Ref<import("vuetify/components").VApp| null > } */
26
+ const vAppRef = ref(null)
24
27
  const app = createApp({})
25
28
  registerPlugins(app)
26
29
 
@@ -30,8 +33,9 @@ Object.assign(inst.appContext, app._context)
30
33
  //@ts-expect-error
31
34
  Object.assign(inst.provides, app._context.provides)
32
35
 
33
- function setStylesFromHead() {
34
- const eodashComponent = document.querySelector('eo-dash')
36
+ /** @param {import("vue").Ref<HTMLElement | import("vue").ComponentPublicInstance>[]} [hiddenElements] */
37
+ function setStylesFromHead(hiddenElements) {
38
+ const eodashShadowRoot = vAppRef.value?.$el.getRootNode()
35
39
  const styleSheet = new CSSStyleSheet()
36
40
  const head = document.querySelector('head')
37
41
  let stylesStr = ''
@@ -43,23 +47,37 @@ function setStylesFromHead() {
43
47
  }
44
48
 
45
49
  if (child.tagName == 'LINK' && child.getAttribute('rel')?.includes('stylesheet')) {
46
- eodashComponent?.shadowRoot?.appendChild(child.cloneNode(true))
50
+ eodashShadowRoot?.appendChild(child.cloneNode(true))
47
51
  }
48
52
  });
49
53
 
50
54
  stylesStr += `\n * {
51
- font-family:${
52
- //@ts-expect-error
53
- /** @type {import("@/types").Eodash} */ (inst.provides[eodashKey])?.brand.font?.family ?? 'Roboto'}
54
- }
55
- ${//@ts-expect-error
56
- /** @type {import("@/types").Eodash} */ (inst.provides[eodashKey]).brand.noLayout ?
55
+ font-family:${
56
+ //@ts-expect-error
57
+ /** @type {import("@/types").Eodash} */ (inst.provides[eodashKey])?.brand.font?.family ?? 'Roboto'}
58
+ }
59
+ ${//@ts-expect-error
60
+ /** @type {import("@/types").Eodash} */ (inst.provides[eodashKey]).brand.noLayout ?
57
61
  `div.v-application__wrap {
58
- min-height: fit-content;
59
- }`: ""}
60
- `
62
+ min-height: fit-content;
63
+ }`: ""}
64
+ `
61
65
  styleSheet.replaceSync(stylesStr.replaceAll(":root", ":host"))
62
- eodashComponent?.shadowRoot?.adoptedStyleSheets.push(styleSheet)
66
+ eodashShadowRoot?.adoptedStyleSheets.push(styleSheet);
67
+
68
+ //@ts-expect-error
69
+ if (hiddenElements && !(/** @type {import("@/types").Eodash} */ (inst.provides[eodashKey])?.brand.noLayout)) {
70
+ hiddenElements.forEach(element => {
71
+ if (element.value) {
72
+ if (element.value instanceof HTMLElement) {
73
+ element.value.style.opacity = "1"
74
+ } else {
75
+ /** @type {HTMLElement} */
76
+ (element.value.$el).style.opacity = "1"
77
+ }
78
+ }
79
+ })
80
+ }
63
81
  }
64
82
 
65
83
  const error = ref('')
@@ -14,7 +14,7 @@ import { mdiChevronLeft, mdiChevronRight, mdiMenuDown } from "@mdi/js"
14
14
  const vuetify = createVuetify({
15
15
  icons: {
16
16
  aliases: {
17
- // remapping v-date-picker and v-tabs default icons to `@mdi/js`
17
+ // mapping v-date-picker and v-tabs default icons to `@mdi/js`
18
18
  next: [mdiChevronRight],
19
19
  prev: [mdiChevronLeft],
20
20
  subgroup: [mdiMenuDown]
@@ -27,13 +27,13 @@ export interface WebComponentProps<T extends ExecutionTime = "compiletime"> {
27
27
  /**
28
28
  * Triggered when the web component is mounted in the DOM.
29
29
  * @param el - web component
30
- * @param store - return value of the core STAC pinia store in `/core/store/stac.ts`
30
+ * @param store - return value of the core STAC pinia store in `/core/client/store/stac.ts`
31
31
  */
32
32
  onMounted?: (el: Element | null, store: ReturnType<typeof import("./store/stac").useSTAcStore>) => (Promise<void> | void)
33
33
  /**
34
34
  * Triggered when the web component is unmounted from the DOM.
35
35
  * @param el - web component
36
- * @param store - return value of the core STAC pinia store in `/core/store/stac.ts`
36
+ * @param store - return value of the core STAC pinia store in `/core/client/store/stac.ts`
37
37
  */
38
38
  onUnmounted?: (el: Element | null, store: ReturnType<typeof import("./store/stac").useSTAcStore>) => (Promise<void> | void)
39
39
  }
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <HeaderComponent v-if="!eodash.brand.noLayout" />
2
+ <HeaderComponent ref="headerRef" v-if="!eodash.brand.noLayout" />
3
3
  <ErrorAlert v-model="error" />
4
4
  <Suspense>
5
- <TemplateComponent @vue:mounted="onTemplateMount?.()"
5
+ <TemplateComponent @vue:mounted="onTemplateMount?.(hiddenElements)"
6
6
  :style="`height: ${eodash.brand.noLayout ? (onTemplateMount ? '100%' : '90dvh') : 'calc(100dvh - ' + mainRect['top'] + mainRect['bottom'] + 'px)'}`" />
7
7
  <template #fallback>
8
8
  <div style="height: 100dvh; display: flex; align-items: center; justify-content: center;">
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  </template>
12
12
  </Suspense>
13
- <FooterComponent v-if="!eodash.brand.noLayout" />
13
+ <FooterComponent ref="footerRef" v-if="!eodash.brand.noLayout" />
14
14
  </template>
15
15
 
16
16
  <script setup>
@@ -31,7 +31,6 @@ const props = defineProps({
31
31
  type: Function
32
32
  }
33
33
  })
34
-
35
34
  const eodash = await useEodashRuntime(props.config)
36
35
 
37
36
  useURLSearchParametersSync();
@@ -53,9 +52,28 @@ const HeaderComponent = defineAsyncComponent(() => import(`@/components/Header.v
53
52
  const FooterComponent = defineAsyncComponent(() => import(`@/components/Footer.vue`))
54
53
  const { mainRect } = useLayout()
55
54
 
55
+ /** @type {import("vue").Ref<InstanceType<typeof
56
+ * import("@/components/Header.vue").default >|null>}
57
+ **/
58
+ const headerRef = ref(null);
59
+ /** @type {import("vue").Ref<InstanceType<typeof
60
+ * import("@/components/Footer.vue").default >|null>}
61
+ **/
62
+ const footerRef = ref(null);
63
+
64
+ const hiddenElements = [headerRef, footerRef]
65
+
56
66
  onMounted(() => {
57
67
  const htmlTag = /** @type {HTMLElement} */(document.querySelector('html'))
58
68
  htmlTag.style.overflow = 'hidden';
69
+
70
+ if (props.onTemplateMount && !eodash.brand.noLayout) {
71
+ hiddenElements.forEach(element => {
72
+ /** @type {HTMLElement} */
73
+ // @ts-expect-error
74
+ (element.value.$el).style.opacity = "0"
75
+ })
76
+ }
59
77
  })
60
78
 
61
79
  const error = ref('')
@@ -1,5 +1,5 @@
1
- import { x, W as w, X as h, _ as e, $ as n, a0 as u, a9 as _, a2 as t, a5 as d, a1 as c, a3 as g, d as m, a4 as y, F as b, a6 as f } from "./asWebComponent-fqvymeM-.js";
2
- import { V as v } from "./VMain-COrg6UtF.js";
1
+ import { x, W as _, X as h, _ as e, $ as n, a0 as u, a9 as f, a2 as t, a5 as d, a1 as c, a3 as g, d as m, a4 as y, F as b, a6 as w } from "./asWebComponent-Bvb3xkxI.js";
2
+ import { V as v } from "./VMain-BHYlmRic.js";
3
3
  class k extends HTMLElement {
4
4
  static get observedAttributes() {
5
5
  return ["gap"];
@@ -23,8 +23,8 @@ class k extends HTMLElement {
23
23
  <slot></slot>
24
24
  `;
25
25
  }
26
- attributeChangedCallback(a, o, s) {
27
- o !== s && (this[a] = s), this.render();
26
+ attributeChangedCallback(a, r, s) {
27
+ r !== s && (this[a] = s), this.render();
28
28
  }
29
29
  }
30
30
  class A extends HTMLElement {
@@ -52,8 +52,8 @@ class A extends HTMLElement {
52
52
  <slot></slot>
53
53
  `;
54
54
  }
55
- attributeChangedCallback(a, o, s) {
56
- o !== s && (this[a] = s), this.render();
55
+ attributeChangedCallback(a, r, s) {
56
+ r !== s && (this[a] = s), this.render();
57
57
  }
58
58
  }
59
59
  customElements.define("eox-layout", k);
@@ -70,19 +70,19 @@ const C = ["gap"], $ = {
70
70
  setup(p) {
71
71
  const a = (
72
72
  /** @type {import("@/types").Eodash} */
73
- x(w)
74
- ), [o] = h([a.template?.background]), s = a.template?.widgets, i = h(s);
73
+ x(_)
74
+ ), [r] = h([a.template?.background]), s = a.template?.widgets, i = h(s);
75
75
  return (E, M) => (e(), n(v, null, {
76
76
  default: u(() => [
77
- _("eox-layout", {
77
+ f("eox-layout", {
78
78
  gap: t(a).template.gap ?? 2
79
79
  }, [
80
- t(o).component ? (e(), d("eox-layout-item", $, [
80
+ t(r).component ? (e(), d("eox-layout-item", $, [
81
81
  (e(), n(c, { suspensible: "" }, {
82
82
  default: u(() => [
83
83
  (e(), n(
84
- g(t(o).component),
85
- m({ id: "bg-widget" }, t(o).props),
84
+ g(t(r).component),
85
+ m({ id: "bg-widget" }, t(r).props),
86
86
  null,
87
87
  16
88
88
  /* FULL_PROPS */
@@ -95,11 +95,11 @@ const C = ["gap"], $ = {
95
95
  (e(!0), d(
96
96
  b,
97
97
  null,
98
- f(t(s), (l, r) => (e(), d(
98
+ w(t(s), (l, o) => (e(), d(
99
99
  b,
100
- { key: r },
100
+ { key: o },
101
101
  [
102
- t(i)[r].value.component ? (e(), d("eox-layout-item", {
102
+ t(i)[o].value.component ? (e(), d("eox-layout-item", {
103
103
  key: 0,
104
104
  style: { position: "relative", overflow: "visible", "z-index": "1", "border-radius": "0px", background: "rgb(var(--v-theme-surface))" },
105
105
  x: l.layout.x,
@@ -113,10 +113,11 @@ const C = ["gap"], $ = {
113
113
  {
114
114
  default: u(() => [
115
115
  (e(), n(
116
- g(t(i)[r].value.component),
116
+ g(t(i)[o].value.component),
117
117
  m({
118
- key: t(i)[r].value.id
119
- }, t(i)[r].value.props),
118
+ key: t(i)[o].value.id,
119
+ ref_for: !0
120
+ }, t(i)[o].value.props),
120
121
  null,
121
122
  16
122
123
  /* FULL_PROPS */
@@ -1,4 +1,4 @@
1
- import { a_ as i, a$ as m, r as p, Z as d, b0 as f, _ as c, a5 as g, $ as _, d as y, a3 as k } from "./asWebComponent-fqvymeM-.js";
1
+ import { aY as i, aZ as m, r as p, Z as d, a_ as f, _ as c, a5 as g, $ as _, d as y, a3 as k } from "./asWebComponent-Bvb3xkxI.js";
2
2
  const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
3
3
  __name: "DynamicWebComponent",
4
4
  props: {
@@ -1,7 +1,7 @@
1
- import { au as Ie, p, g as Y, c as f, a as O, b as a, V as j, R as oe, am as X, av as U, aw as Z, y as W, ax as H, ay as lt, r as T, s as J, w as z, a8 as it, az as Me, ar as pe, d as N, C as ce, aA as st, Z as ve, D as ie, ai as ot, e as K, ab as Ae, aj as rt, aB as ut, aC as dt, ad as Be, f as ct, h as re, i as fe, S as me, ak as vt, ac as Fe, al as ft, aD as mt, aE as yt, ae as $e, o as se, l as Ye, F as Q, t as ye, B as Oe, M as ht, aF as Ne, I as G, aG as kt, aH as gt, j as Te, aI as he, u as Re, aJ as bt, aK as Vt, aL as xt, x as Ct, O as Pt, a2 as St, af as _t, ah as Dt, aq as ge, P as wt, aM as It, Q as Mt, aN as pt, v as At, aO as Bt, aP as Ft, _ as de, a5 as be, $ as $t, aQ as ne } from "./asWebComponent-fqvymeM-.js";
2
- import { M as ue, V as Yt, m as Ee, b as We, c as Ot } from "./index-Cskxla5D.js";
1
+ import { au as Ie, p, g as Y, c as f, a as O, b as a, V as j, R as oe, am as X, av as U, aw as Z, y as W, ax as H, ay as lt, r as T, s as J, w as z, a8 as it, az as Me, ar as pe, d as N, C as ce, aA as st, Z as ve, D as ie, ai as ot, e as K, ab as Ae, aj as rt, aB as ut, aC as dt, ad as Be, f as ct, h as re, i as fe, S as me, ak as vt, ac as Fe, al as ft, aD as mt, aE as yt, ae as $e, o as se, l as Ye, F as Q, t as ye, B as Oe, M as ht, aF as Ne, I as G, aG as kt, aH as gt, j as Te, aI as he, u as Re, aJ as bt, aK as Vt, aL as xt, x as Ct, O as Pt, a2 as St, af as _t, ah as Dt, aq as ge, P as wt, aM as It, Q as Mt, aN as pt, v as At, aO as Bt, aP as Ft, _ as de, a5 as be, $ as $t, aQ as ne } from "./asWebComponent-Bvb3xkxI.js";
2
+ import { M as ue, V as Yt, m as Ee, b as We, c as Ot } from "./index-CaDDfJYE.js";
3
3
  import { n as Nt, a as Tt, s as Rt, f as Et } from "./forwardRefs-Bxeu9Obx.js";
4
- import { i as Wt } from "./index-Zv5eTiB6.js";
4
+ import { I as Wt } from "./index-DlNICb3T.js";
5
5
  const Lt = Ie("v-spacer", "div", "VSpacer"), Le = p({
6
6
  active: {
7
7
  type: [String, Array],
@@ -1,5 +1,5 @@
1
- import { _ as n, $ as s, aV as a } from "./asWebComponent-fqvymeM-.js";
2
- import p from "./DynamicWebComponent-CgDh2csQ.js";
1
+ import { _ as n, $ as s, aV as a } from "./asWebComponent-Bvb3xkxI.js";
2
+ import p from "./DynamicWebComponent-C4Hotc4H.js";
3
3
  const u = {
4
4
  __name: "EodashItemFilter",
5
5
  setup(m) {