@eodash/eodash 5.0.0-alpha.2.4 → 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 (80) hide show
  1. package/README.md +31 -7
  2. package/core/client/App.vue +6 -7
  3. package/core/client/SuspensedDashboard.ce.vue +59 -45
  4. package/core/client/asWebComponent.d.ts +10 -5
  5. package/core/client/asWebComponent.js +6 -6
  6. package/core/client/components/DashboardLayout.vue +63 -21
  7. package/core/client/components/DynamicWebComponent.vue +44 -44
  8. package/core/client/components/ErrorAlert.vue +24 -7
  9. package/core/client/components/Footer.vue +34 -15
  10. package/core/client/components/Header.vue +10 -5
  11. package/core/client/components/IframeWrapper.vue +4 -4
  12. package/core/client/components/Loading.vue +17 -18
  13. package/core/client/components/MobileLayout.vue +82 -29
  14. package/core/client/composables/DefineEodash.js +38 -28
  15. package/core/client/composables/DefineWidgets.js +105 -79
  16. package/core/client/composables/index.js +43 -141
  17. package/core/client/eodash.js +46 -39
  18. package/core/client/main.js +2 -2
  19. package/core/client/plugins/index.js +11 -9
  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 +173 -248
  26. package/core/client/utils/eodashSTAC.js +151 -66
  27. package/core/client/utils/helpers.js +18 -20
  28. package/core/client/utils/index.js +25 -14
  29. package/core/client/utils/keys.js +2 -2
  30. package/core/client/views/Dashboard.vue +70 -42
  31. package/core/client/vite-env.d.ts +19 -17
  32. package/dist/client/DashboardLayout-BuDcv6LM.js +156 -0
  33. package/dist/client/{DynamicWebComponent-C4Hotc4H.js → DynamicWebComponent-BEP4rVce.js} +7 -7
  34. package/dist/client/EodashDatePicker-oFb1zt5E.js +1211 -0
  35. package/dist/client/EodashItemFilter-BElmgrST.js +63 -0
  36. package/dist/client/{EodashMap-CGrQjZ1P.js → EodashMap-DXyOgcEd.js} +11333 -14025
  37. package/dist/client/Footer-CoPx6UXQ.js +115 -0
  38. package/dist/client/Header-C-zX31Ys.js +635 -0
  39. package/dist/client/{IframeWrapper-Cg3GMmfW.js → IframeWrapper-2w2ye0zM.js} +4 -4
  40. package/dist/client/MobileLayout-C9OVcP12.js +945 -0
  41. package/dist/client/{VMain-BHYlmRic.js → VMain-Dm43jd43.js} +8 -8
  42. package/dist/client/{WidgetsContainer-dje9QSk0.js → WidgetsContainer-BS87sLqk.js} +12 -5
  43. package/dist/client/asWebComponent-CpQUVi2N.js +20135 -0
  44. package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
  45. package/dist/client/{decoder-HRvnjnEI-BQ2rajuJ.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-BVFQ82G4.js +183 -0
  52. package/dist/client/{index-CaDDfJYE.js → index-dOzyv_xR.js} +43 -74
  53. package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
  54. package/dist/client/{lerc-_E46UbWQ-Beu35ovS.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-Dd7m-btU.js → ssrBoot-L9KejErM.js} +3 -3
  60. package/dist/client/style.css +2 -2
  61. package/dist/client/transition-DCePIwYR.js +34 -0
  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 +3 -3
  65. package/dist/node/types.d.ts +32 -38
  66. package/package.json +13 -14
  67. package/widgets/EodashDatePicker.vue +145 -41
  68. package/widgets/EodashItemFilter.vue +41 -22
  69. package/widgets/EodashMap.vue +87 -20
  70. package/widgets/WidgetsContainer.vue +45 -27
  71. package/dist/client/DashboardLayout-ZaSRMD1M.js +0 -149
  72. package/dist/client/EodashDatePicker-C4kKjxKy.js +0 -1653
  73. package/dist/client/EodashItemFilter-cBHC0YEM.js +0 -51
  74. package/dist/client/Footer-pS636dEP.js +0 -118
  75. package/dist/client/Header-DQuaLdjl.js +0 -605
  76. package/dist/client/MobileLayout-BLXFBWI_.js +0 -987
  77. package/dist/client/asWebComponent-Bvb3xkxI.js +0 -13311
  78. package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
  79. package/dist/client/forwardRefs-Bxeu9Obx.js +0 -142
  80. package/dist/client/index-DlNICb3T.js +0 -34
package/README.md CHANGED
@@ -1,35 +1,59 @@
1
+ # @eodash/eodash [![Version](https://badgen.net/npm/v/@eodash/eodash)](https://www.npmjs.com/package/@eodash/eodash)
2
+
3
+ A package for creating earth observation dashboards. To learn more about eodash ecosystem visit [eodash.org](https://eodash.org)
4
+
5
+ ## Usage
6
+
7
+ Checkout the [documentation](https://eodash.github.io/eodash/get-started.html) for a detailed guide.
8
+
1
9
  ## Get Started
10
+
2
11
  Install all the required dependecies after cloning or downloading the repository using Node v18 or higher:
12
+
3
13
  ```bash
4
14
  npm run install
5
15
  ```
6
- Run the dev server and the app will open your default browser window to the landing page:
16
+
17
+ Run the dev server:
18
+
7
19
  ```bash
8
20
  npm run dev
9
21
  ```
10
- To compile and minify for production:
22
+
23
+ To compile and minify a demo instance:
24
+
11
25
  ```bash
12
26
  npm run build
13
27
  ```
28
+
14
29
  To preview the compiled production files :
30
+
15
31
  ```bash
16
32
  npm run preview
17
33
  ```
18
34
 
35
+ To compile and minify a demo instance as a web component library:
36
+
37
+ ```bash
38
+ npm run build -- --lib
39
+ ```
40
+
19
41
  ## Folder Structure
42
+
20
43
  .
21
- ├── core # CLI & Client source code
44
+ ├── core # CLI & Client source code
22
45
  ├── docs # Documentation files
23
46
  ├── tests # CLI & Client component tests folder
24
47
  ├── widgets # Vue componenets as internal widgets.
25
48
  ├── public # Statically served directory
26
49
  └── README.md
27
50
 
28
-
29
51
  ## Writing commits
52
+
30
53
  To ensure clear communication with the package consumers and enable machine-readable commits, we adhere to [The Conventional Commits](https://www.conventionalcommits.org/) specification that allows the generation of [semVer](https://semver.org) releases and associated change logs using [googleapis/release-please](https://github.com/googleapis/release-please).
31
54
 
32
55
  The most important prefixes you should have in mind are:
33
- * fix: which represents bug fixes, and correlates to a SemVer patch.
34
- * feat: which represents a new feature, and correlates to a SemVer minor.
35
- * feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
56
+
57
+ - fix: which represents bug fixes, and correlates to a SemVer patch.
58
+ - feat: which represents a new feature, and correlates to a SemVer minor.
59
+ - feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <v-app>
3
3
  <Suspense>
4
-
5
4
  <Dashboard />
6
5
 
7
6
  <template #fallback>
@@ -12,16 +11,16 @@
12
11
  </template>
13
12
 
14
13
  <script setup>
15
- import Dashboard from '@/views/Dashboard.vue';
16
- import ErrorAlert from './components/ErrorAlert.vue';
17
- import { onErrorCaptured, ref } from 'vue';
14
+ import Dashboard from "@/views/Dashboard.vue";
15
+ import ErrorAlert from "./components/ErrorAlert.vue";
16
+ import { onErrorCaptured, ref } from "vue";
18
17
 
19
- const error = ref('')
18
+ const error = ref("");
20
19
  onErrorCaptured((e, inst, info) => {
21
20
  error.value = `
22
21
  ${e}.
23
22
  component: ${inst?.$.type.name}.
24
23
  info: ${info}.
25
- `
26
- })
24
+ `;
25
+ });
27
26
  </script>
@@ -10,82 +10,96 @@
10
10
  </v-app>
11
11
  </template>
12
12
  <script setup>
13
- import Dashboard from '@/views/Dashboard.vue';
14
- import { createApp, getCurrentInstance, onErrorCaptured, ref } from "vue"
15
- import { registerPlugins } from '@/plugins';
16
- import { eodashKey } from '@/utils/keys';
17
- import ErrorAlert from '@/components/ErrorAlert.vue';
13
+ import Dashboard from "@/views/Dashboard.vue";
14
+ import { createApp, getCurrentInstance, onErrorCaptured, ref } from "vue";
15
+ import { registerPlugins } from "@/plugins";
16
+ import { eodashKey } from "@/utils/keys";
17
+ import ErrorAlert from "@/components/ErrorAlert.vue";
18
18
 
19
19
  defineProps({
20
20
  config: {
21
21
  type: String,
22
- }
22
+ },
23
23
  });
24
24
 
25
- /** @type { import("vue").Ref<import("vuetify/components").VApp| null > } */
26
- const vAppRef = ref(null)
27
- const app = createApp({})
28
- registerPlugins(app)
25
+ /** @type {import("vue").Ref<import("vuetify/components").VApp | null>} */
26
+ const vAppRef = ref(null);
27
+ const app = createApp({});
28
+ registerPlugins(app);
29
+
30
+ const inst = getCurrentInstance();
31
+
32
+ Object.assign(inst?.appContext ?? {}, app._context);
29
33
 
30
- const inst = getCurrentInstance()
31
- //@ts-expect-error
32
- Object.assign(inst.appContext, app._context)
33
- //@ts-expect-error
34
- Object.assign(inst.provides, app._context.provides)
34
+ //@ts-expect-error Property 'provides' does not exist on type 'ComponentInternalInstance'
35
+ Object.assign(inst?.provides ?? {}, app._context.provides);
35
36
 
36
- /** @param {import("vue").Ref<HTMLElement | import("vue").ComponentPublicInstance>[]} [hiddenElements] */
37
+ /**
38
+ * @param {import("vue").Ref<
39
+ * HTMLElement | import("vue").ComponentPublicInstance
40
+ * >[]} [hiddenElements]
41
+ */
37
42
  function setStylesFromHead(hiddenElements) {
38
- const eodashShadowRoot = vAppRef.value?.$el.getRootNode()
39
- const styleSheet = new CSSStyleSheet()
40
- const head = document.querySelector('head')
41
- let stylesStr = ''
43
+ const eodashShadowRoot = vAppRef.value?.$el.getRootNode();
44
+ const styleSheet = new CSSStyleSheet();
45
+ const head = document.querySelector("head");
46
+ let stylesStr = "";
42
47
 
43
48
  Array.from(head?.children ?? []).forEach((child) => {
44
- if (child.getAttribute('type') === 'text/css') {
45
- stylesStr += `\n ${child.innerHTML}`
46
- return
49
+ if (child.getAttribute("type") === "text/css") {
50
+ stylesStr += `\n ${child.innerHTML}`;
51
+ return;
47
52
  }
48
53
 
49
- if (child.tagName == 'LINK' && child.getAttribute('rel')?.includes('stylesheet')) {
50
- eodashShadowRoot?.appendChild(child.cloneNode(true))
54
+ if (
55
+ child.tagName == "LINK" &&
56
+ child.getAttribute("rel")?.includes("stylesheet")
57
+ ) {
58
+ eodashShadowRoot?.appendChild(child.cloneNode(true));
51
59
  }
52
60
  });
53
61
 
54
- stylesStr += `\n * {
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 ?
61
- `div.v-application__wrap {
62
+ stylesStr += `\n
63
+ ${
64
+ //@ts-expect-error Property 'provides' does not exist on type 'ComponentInternalInstance'
65
+ /** @type {import("@/types").Eodash} */ (inst?.provides[eodashKey])
66
+ ?.brand.noLayout
67
+ ? `div.v-application__wrap {
62
68
  min-height: fit-content;
63
- }`: ""}
64
- `
65
- styleSheet.replaceSync(stylesStr.replaceAll(":root", ":host"))
69
+ }`
70
+ : ""
71
+ }
72
+ `;
73
+ styleSheet.replaceSync(stylesStr.replaceAll(":root", ":host"));
66
74
  eodashShadowRoot?.adoptedStyleSheets.push(styleSheet);
67
75
 
68
- //@ts-expect-error
69
- if (hiddenElements && !(/** @type {import("@/types").Eodash} */ (inst.provides[eodashKey])?.brand.noLayout)) {
70
- hiddenElements.forEach(element => {
76
+ if (
77
+ hiddenElements &&
78
+ !(
79
+ //@ts-expect-error Property 'provides' does not exist on type 'ComponentInternalInstance'
80
+ /** @type {import("@/types").Eodash} */ (inst.provides[eodashKey])?.brand
81
+ .noLayout
82
+ )
83
+ ) {
84
+ hiddenElements.forEach((element) => {
71
85
  if (element.value) {
72
86
  if (element.value instanceof HTMLElement) {
73
- element.value.style.opacity = "1"
87
+ element.value.style.opacity = "1";
74
88
  } else {
75
89
  /** @type {HTMLElement} */
76
- (element.value.$el).style.opacity = "1"
90
+ (element.value.$el).style.opacity = "1";
77
91
  }
78
92
  }
79
- })
93
+ });
80
94
  }
81
95
  }
82
96
 
83
- const error = ref('')
97
+ const error = ref("");
84
98
  onErrorCaptured((e, comp, info) => {
85
99
  error.value = `
86
100
  ${e}.
87
101
  component: ${comp?.$.type.name}.
88
102
  info: ${info}.
89
- `
90
- })
103
+ `;
104
+ });
91
105
  </script>
@@ -1,18 +1,23 @@
1
1
  /** @group WebComponent */
2
- type EodashConstructor = import("vue").VueElementConstructor<import("vue").ExtractPropTypes<{ config: string }>>
2
+ type EodashConstructor = import("vue").VueElementConstructor<
3
+ import("vue").ExtractPropTypes<{ config: string }>
4
+ >;
3
5
  /**
4
- * Eodash Web Component constructor
6
+ * Eodash Web Component constructor
7
+ *
5
8
  * @group WebComponent
6
9
  */
7
- export declare const Eodash: EodashConstructor
10
+ export declare const Eodash: EodashConstructor;
8
11
  /**
9
12
  * Registers `eo-dash` as Custom Element in the window
13
+ *
10
14
  * @group WebComponent
11
15
  */
12
- export declare function register(): void
16
+ export declare function register(): void;
13
17
 
14
18
  /**
15
19
  * Eodash store @see EodashStore
20
+ *
16
21
  * @group WebComponent
17
22
  */
18
- export declare const store: import("./types").EodashStore
23
+ export declare const store: import("./types").EodashStore;
@@ -1,12 +1,12 @@
1
- import SuspensedDashboard from './SuspensedDashboard.ce.vue';
2
- import { defineCustomElement } from 'vue'
1
+ import SuspensedDashboard from "./SuspensedDashboard.ce.vue";
2
+ import { defineCustomElement } from "vue";
3
3
  /** @type {import("./asWebComponent").EodashConstructor} */
4
- export const Eodash = defineCustomElement(SuspensedDashboard)
4
+ export const Eodash = defineCustomElement(SuspensedDashboard);
5
5
 
6
6
  export function register() {
7
- customElements.define('eo-dash', Eodash)
7
+ customElements.define("eo-dash", Eodash);
8
8
  }
9
9
 
10
- export { default as store } from '@/store'
10
+ export { default as store } from "@/store";
11
11
 
12
- register()
12
+ register();
@@ -1,36 +1,78 @@
1
1
  <template>
2
2
  <v-main>
3
3
  <eox-layout :gap="eodash.template.gap ?? 2">
4
- <eox-layout-item v-if="bgWidget.component" style="z-index: 0;" x="0" y="0" h="12" w="12">
4
+ <eox-layout-item
5
+ v-if="bgWidget.component"
6
+ class="bg-panel"
7
+ x="0"
8
+ y="0"
9
+ h="12"
10
+ w="12"
11
+ >
5
12
  <Suspense suspensible>
6
- <component id="bg-widget" :is="bgWidget.component" v-bind="bgWidget.props" />
13
+ <component
14
+ id="bg-widget"
15
+ :is="bgWidget.component"
16
+ v-bind="bgWidget.props"
17
+ />
7
18
  </Suspense>
8
19
  </eox-layout-item>
9
- <template v-for="(config, idx) in widgetsConfig" :key="idx">
10
- <eox-layout-item v-if="importedWidgets[idx].value.component"
11
- style="position: relative; overflow: visible; z-index: 1; border-radius: 0px; background: rgb(var(--v-theme-surface))"
12
- :x="config.layout.x" :y="config.layout.y" :h="config.layout.h" :w="config.layout.w">
13
-
14
- <Suspense suspensible>
15
- <component :key="importedWidgets[idx].value.id" :is="importedWidgets[idx].value.component"
16
- v-bind="importedWidgets[idx].value.props" />
17
- </Suspense>
18
- </eox-layout-item>
20
+ <template v-for="(importedWidget, idx) in importedWidgets" :key="idx">
21
+ <Transition name="fade">
22
+ <eox-layout-item
23
+ v-if="importedWidget.value.component"
24
+ :key="importedWidget.value.id"
25
+ class="panel"
26
+ :h="importedWidget.value.layout.h"
27
+ :w="importedWidget.value.layout.w"
28
+ :x="importedWidget.value.layout.x"
29
+ :y="importedWidget.value.layout.y"
30
+ >
31
+ <Suspense suspensible>
32
+ <component
33
+ :key="importedWidget.value.id"
34
+ :is="importedWidget.value.component"
35
+ v-bind="importedWidget.value.props"
36
+ />
37
+ </Suspense>
38
+ </eox-layout-item>
39
+ </Transition>
19
40
  </template>
20
41
  </eox-layout>
21
42
  </v-main>
22
43
  </template>
23
44
  <script setup>
24
- import { eodashKey } from '@/utils/keys';
25
- import { inject } from 'vue';
26
- import { useDefineWidgets } from '@/composables/DefineWidgets'
27
- import '@eox/layout'
28
-
29
- const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey))
45
+ import { eodashKey } from "@/utils/keys";
46
+ import { inject } from "vue";
47
+ import { useDefineWidgets } from "@/composables/DefineWidgets";
48
+ import "@eox/layout";
30
49
 
31
- const [bgWidget] = useDefineWidgets([eodash.template?.background])
50
+ const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
32
51
 
33
- const widgetsConfig = eodash.template?.widgets
52
+ const [bgWidget] = useDefineWidgets([eodash.template?.background]);
34
53
 
35
- const importedWidgets = useDefineWidgets(widgetsConfig)
54
+ const importedWidgets = useDefineWidgets(eodash.template?.widgets);
36
55
  </script>
56
+ <style scoped>
57
+ .panel {
58
+ position: relative;
59
+ overflow: visible;
60
+ z-index: 1;
61
+ border-radius: 0px;
62
+ background: rgb(var(--v-theme-surface));
63
+ }
64
+
65
+ .bg-panel {
66
+ z-index: 0;
67
+ }
68
+
69
+ .fade-enter-active,
70
+ .fade-leave-active {
71
+ transition: opacity 0.25s ease;
72
+ }
73
+
74
+ .fade-enter-from,
75
+ .fade-leave-to {
76
+ opacity: 0;
77
+ }
78
+ </style>
@@ -5,64 +5,64 @@
5
5
  </template>
6
6
 
7
7
  <script async setup>
8
- import { useSTAcStore } from '@/store/stac';
9
- import {
10
- onUnmounted as whenUnMounted,
11
- onMounted as whenMounted
12
- } from 'vue';
13
- import { ref } from 'vue';
8
+ import { useSTAcStore } from "@/store/stac";
9
+ import { onUnmounted as whenUnMounted, onMounted as whenMounted } from "vue";
10
+ import { ref } from "vue";
14
11
 
15
- const props = /** @type {import("@/types").WebComponentProps} */(defineProps({
16
- link: {
17
- type: [String, Function],
18
- required: true
19
- },
20
- constructorProp: String,
21
- tagName: {
22
- type: String,
23
- required: true
24
- },
25
- properties: {
26
- type: Object,
27
- default: () => {
28
- return {}
29
- }
30
- },
31
- onMounted: Function,
32
- onUnmounted: Function
33
- }))
12
+ const props = /** @type {import("@/types").WebComponentProps} */ (
13
+ defineProps({
14
+ link: {
15
+ type: [String, Function],
16
+ required: true,
17
+ },
18
+ constructorProp: String,
19
+ tagName: {
20
+ type: String,
21
+ required: true,
22
+ },
23
+ properties: {
24
+ type: Object,
25
+ default: () => {
26
+ return {};
27
+ },
28
+ },
29
+ onMounted: Function,
30
+ onUnmounted: Function,
31
+ })
32
+ );
34
33
 
34
+ const getWebComponent = async () =>
35
+ typeof props.link === "string"
36
+ ? await import(/* @vite-ignore */ props.link)
37
+ : await props.link();
35
38
 
36
- const getWebComponent = async () => typeof props.link === 'string' ?
37
- await import( /* @vite-ignore */props.link) : await props.link()
39
+ const imported = !customElements.get(props.tagName)
40
+ ? await getWebComponent().catch((e) => {
41
+ console.error(e);
42
+ })
43
+ : null;
38
44
 
39
- const imported = !customElements.get(props.tagName) ? await getWebComponent().catch(e => {
40
- console.error(e)
41
- }) : null
42
-
43
- const defined = customElements.get(props.tagName)
45
+ const defined = customElements.get(props.tagName);
44
46
 
45
47
  // if the imported link doesn't define the custom tag provided
46
48
  if (!defined && props.constructorProp) {
47
- const Constructor = imported[props.constructorProp]
48
- customElements.define(props.tagName, Constructor)
49
+ const Constructor = imported[props.constructorProp];
50
+ customElements.define(props.tagName, Constructor);
49
51
  }
50
52
 
51
- const store = useSTAcStore()
53
+ const store = useSTAcStore();
52
54
 
53
55
  /**
54
- * @typedef {HTMLElement &
55
- * Record<string|number|symbol,unknown>} CustomElement
56
- * @type {import('vue').Ref<CustomElement|null>}
56
+ * @typedef {HTMLElement & Record<string | number | symbol, unknown>} CustomElement
57
+ * @type {import("vue").Ref<CustomElement | null>}
57
58
  */
58
- const elementRef = ref(null)
59
-
59
+ const elementRef = ref(null);
60
60
 
61
61
  whenMounted(() => {
62
- props.onMounted?.(elementRef.value, store)
63
- })
62
+ props.onMounted?.(elementRef.value, store);
63
+ });
64
64
 
65
65
  whenUnMounted(() => {
66
- props.onUnmounted?.(elementRef.value, store)
67
- })
66
+ props.onUnmounted?.(elementRef.value, store);
67
+ });
68
68
  </script>
@@ -1,19 +1,36 @@
1
1
  <template>
2
- <v-alert v-if="error" translate="yes" location="start bottom" type="error" position="fixed" @click:close="error = ''"
3
- variant="elevated" :icon="[mdiAlertCircle]" style="z-index: 10000;" closable :close-icon="[mdiClose]">
2
+ <v-alert
3
+ v-if="error"
4
+ translate="yes"
5
+ location="start bottom"
6
+ type="error"
7
+ position="fixed"
8
+ @click:close="error = ''"
9
+ variant="elevated"
10
+ :icon="[mdiAlertCircle]"
11
+ class="alert"
12
+ closable
13
+ :close-icon="[mdiClose]"
14
+ >
4
15
  {{ errorMessage }}
5
16
  <details is="animated-details">
6
- <summary> Error </summary>
17
+ <summary>Error</summary>
7
18
  {{ error }}
8
19
  </details>
9
20
  </v-alert>
10
21
  </template>
11
22
  <script setup>
12
23
  import { eodashKey } from "@/utils/keys";
13
- import { mdiClose, mdiAlertCircle } from "@mdi/js"
24
+ import { mdiClose, mdiAlertCircle } from "@mdi/js";
14
25
  import { inject } from "vue";
15
26
 
16
- const error = defineModel({ type: String, required: true })
17
- const eodash = /** @type {import("@/types").Eodash} */(inject(eodashKey))
18
- const errorMessage = eodash.brand.errorMessage ?? 'something went wrong, please try again later'
27
+ const error = defineModel({ type: String, required: true });
28
+ const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
29
+ const errorMessage =
30
+ eodash.brand.errorMessage ?? "something went wrong, please try again later";
19
31
  </script>
32
+ <style scoped>
33
+ .alert {
34
+ z-index: 10000;
35
+ }
36
+ </style>
@@ -1,31 +1,50 @@
1
1
  <template>
2
- <v-footer ref="footer" :height="mdAndDown ? '48px' : 'auto'" color="secondary" app
3
- class="d-flex justify-space-between">
4
- <p class="pt-0" style="font-size: 0.8rem;">
2
+ <v-footer
3
+ ref="footer"
4
+ :height="mdAndDown ? '48px' : 'auto'"
5
+ color="secondary"
6
+ app
7
+ class="d-flex justify-space-between"
8
+ >
9
+ <p class="pt-0 footer-text">
5
10
  {{ eodash.brand.footerText ?? "" }}
6
11
  </p>
7
12
  <div>
8
- <a href="https://github.com/eodash/eodash" class="text-white" target="_blank">eodash</a> by
13
+ <a
14
+ href="https://github.com/eodash/eodash"
15
+ class="text-white"
16
+ target="_blank"
17
+ >eodash</a
18
+ >
19
+ by
9
20
  <a href="https://eox.at" target="_blank" class="text-white">
10
- <img :src='`data:image/svg+xml;base64,${base64Logo}`' height="11px">
21
+ <img :src="`data:image/svg+xml;base64,${base64Logo}`" height="11px" />
11
22
  </a>
12
23
  </div>
13
24
  </v-footer>
14
25
  </template>
15
26
  <script setup>
16
- import { eodashKey } from '@/utils/keys';
17
- import { ref } from 'vue';
18
- import { inject } from 'vue';
19
- import { useDisplay } from 'vuetify/lib/framework.mjs';
27
+ import { eodashKey } from "@/utils/keys";
28
+ import { ref } from "vue";
29
+ import { inject } from "vue";
30
+ import { useDisplay } from "vuetify/lib/framework.mjs";
20
31
 
21
32
  /**
22
33
  * Footer template ref
23
- * @type {import('vue').Ref<import('vuetify/lib/components/index.mjs').VFooter | null>}
34
+ *
35
+ * @type {import("vue").Ref<
36
+ * import("vuetify/lib/components/index.mjs").VFooter | null
37
+ * >}
24
38
  */
25
- const footer = ref(null)
26
- const eodash = /** @type {import("@/types").Eodash} */(inject(eodashKey))
39
+ const footer = ref(null);
40
+ const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
27
41
 
28
- const { mdAndDown } = useDisplay()
29
- const eoxLogo = `<svg width="100%" height="100%" viewBox="0 0 355 85" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="ink_ext_XXXXXX"><path id="path5076" d="M152.986,40.52l-0.75,-0.019l-0.737,-0.056l-0.725,-0.093l-0.713,-0.127l-0.7,-0.162l-0.7,-0.196l-0.675,-0.228l-0.65,-0.261l-0.65,-0.292l-0.625,-0.319l-0.612,-0.352l-0.588,-0.377l-0.562,-0.407l-0.55,-0.431l-0.538,-0.457l-0.5,-0.481l-0.487,-0.505l-0.45,-0.528l-0.438,-0.55l-0.4,-0.57l-0.375,-0.59l-0.35,-0.609l-0.325,-0.627l-0.287,-0.645l-0.263,-0.66l-0.225,-0.676l-0.2,-0.69l-0.162,-0.704l-0.125,-0.717l-0.1,-0.728l-0.05,-0.739l-0.025,-0.748c0,-8.023 6.512,-14.532 14.537,-14.532c8.038,0 14.538,6.509 14.538,14.532c0,8.036 -6.5,14.544 -14.538,14.544Z" style="fill:none;"/><path id="path5078" d="M165.748,-0.002c-42.009,0 -76.06,18.985 -76.06,42.402c0,13.268 10.921,25.102 28.021,32.875c-8.081,-5.487 -13.403,-12.973 -14.584,-21.859c-2.685,-20.186 16.83,-40.82 45.148,-49.615c-14.687,6.665 -24.923,21.427 -24.923,38.599c0,23.218 18.648,42.046 41.773,42.383c-0.037,0.005 -0.087,0.015 -0.137,0.02c0.263,0 0.512,0.009 0.762,0.009c42.013,0 76.076,-18.984 76.076,-42.412c0,-13.261 -10.937,-25.097 -28.037,-32.871l0.75,0.522l0.736,0.531l0.713,0.543l0.7,0.555l0.687,0.566l0.664,0.578l0.649,0.588l0.625,0.6l0.613,0.609l0.588,0.621l0.574,0.631l0.562,0.643l0.538,0.652l0.513,0.662l0.5,0.672l0.475,0.684l0.449,0.693l0.438,0.703l0.425,0.713l0.387,0.723l0.375,0.73l0.352,0.74l0.336,0.75l0.3,0.76l0.287,0.77l0.264,0.777l0.25,0.787l0.211,0.795l0.188,0.805l0.175,0.812l0.151,0.82l0.125,0.831c2.675,20.19 -16.838,40.825 -45.151,49.619c14.688,-6.665 24.926,-21.426 24.926,-38.614c0,-23.202 -18.65,-42.026 -41.775,-42.367c0.05,-0.005 0.1,-0.015 0.15,-0.025c-0.262,0 -0.526,-0.01 -0.789,-0.01Zm-13.248,11.314c7.817,0 14.25,6.433 14.25,14.25c0,0.001 0,0.001 0,0.001c0,7.817 -6.433,14.249 -14.25,14.249c-7.817,0 -14.25,-6.432 -14.25,-14.249c0,-0.001 0,-0.001 0,-0.001c0,-7.817 6.433,-14.25 14.25,-14.25Z" style="fill:#fff;fill-rule:nonzero;"/><path id="path5080" d="M213.786,9.529l0.75,0.521l0.738,0.532l0.712,0.544l0.7,0.555l0.688,0.566l0.662,0.577l0.65,0.588l0.625,0.6l0.613,0.61l0.587,0.62l0.575,0.631l0.563,0.643l0.537,0.652l0.513,0.663l0.5,0.672l0.475,0.684l0.45,0.692l0.437,0.703l0.425,0.712l0.388,0.723l0.375,0.731l0.35,0.741l0.337,0.75l0.3,0.76l0.288,0.769l0.262,0.777l0.25,0.786l0.213,0.797l0.187,0.804l0.175,0.812l0.15,0.821l0.125,0.83c2.675,20.19 -16.837,40.825 -45.15,49.619c14.688,-6.665 24.925,-21.426 24.925,-38.614c0,-23.202 -18.65,-42.025 -41.775,-42.367c0.05,-0.005 0.1,-0.015 0.15,-0.025c-0.262,0 -0.525,-0.01 -0.787,-0.01c-42.01,0 -76.062,18.985 -76.062,42.402c0,13.268 10.922,25.103 28.022,32.876c-8.081,-5.487 -13.403,-12.973 -14.584,-21.859c-2.685,-20.187 16.831,-40.82 45.149,-49.615c-14.688,6.665 -24.925,21.426 -24.925,38.598c0,23.218 18.65,42.046 41.775,42.383c-0.038,0.005 -0.088,0.015 -0.138,0.02c0.263,0 0.513,0.01 0.763,0.01c42.012,-0.001 76.075,-18.985 76.075,-42.413c0,-13.261 -10.938,-25.097 -28.038,-32.871Z" style="fill:none;"/><path id="path5082" d="M354.323,82.586l-41.999,-42.002l38.524,-38.515l-29.913,0l-23.562,23.559l-23.563,-23.559l-29.924,0l38.525,38.515l-42,42.002l29.913,0l27.049,-27.046l27.05,27.046l29.9,0" style="fill:#fff;fill-rule:nonzero;"/><path id="path5084" d="M354.323,82.586l-41.999,-42.002l38.524,-38.515l-29.913,0l-23.562,23.559l-23.563,-23.559l-29.924,0l38.525,38.515l-42,42.002l29.913,0l27.049,-27.046l27.05,27.046l29.9,0Z" style="fill:none;"/><path id="path5086" d="M0,2.069l75.033,0l0,16.489l-51.629,0l0,14.931l40.258,0l0,16.495l-40.258,0l0,16.05l53.124,0l0,16.488l-76.528,0l0,-80.453" style="fill:#fff;fill-rule:nonzero;"/><path id="path5088" d="M0,2.069l75.033,0l0,16.489l-51.629,0l0,14.931l40.258,0l0,16.495l-40.258,0l0,16.05l53.124,0l0,16.488l-76.528,0l0,-80.453Z" style="fill:none;"/></g></svg>`
30
- const base64Logo = window.btoa(eoxLogo)
42
+ const { mdAndDown } = useDisplay();
43
+ const eoxLogo = `<svg width="100%" height="100%" viewBox="0 0 355 85" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="ink_ext_XXXXXX"><path id="path5076" d="M152.986,40.52l-0.75,-0.019l-0.737,-0.056l-0.725,-0.093l-0.713,-0.127l-0.7,-0.162l-0.7,-0.196l-0.675,-0.228l-0.65,-0.261l-0.65,-0.292l-0.625,-0.319l-0.612,-0.352l-0.588,-0.377l-0.562,-0.407l-0.55,-0.431l-0.538,-0.457l-0.5,-0.481l-0.487,-0.505l-0.45,-0.528l-0.438,-0.55l-0.4,-0.57l-0.375,-0.59l-0.35,-0.609l-0.325,-0.627l-0.287,-0.645l-0.263,-0.66l-0.225,-0.676l-0.2,-0.69l-0.162,-0.704l-0.125,-0.717l-0.1,-0.728l-0.05,-0.739l-0.025,-0.748c0,-8.023 6.512,-14.532 14.537,-14.532c8.038,0 14.538,6.509 14.538,14.532c0,8.036 -6.5,14.544 -14.538,14.544Z" style="fill:none;"/><path id="path5078" d="M165.748,-0.002c-42.009,0 -76.06,18.985 -76.06,42.402c0,13.268 10.921,25.102 28.021,32.875c-8.081,-5.487 -13.403,-12.973 -14.584,-21.859c-2.685,-20.186 16.83,-40.82 45.148,-49.615c-14.687,6.665 -24.923,21.427 -24.923,38.599c0,23.218 18.648,42.046 41.773,42.383c-0.037,0.005 -0.087,0.015 -0.137,0.02c0.263,0 0.512,0.009 0.762,0.009c42.013,0 76.076,-18.984 76.076,-42.412c0,-13.261 -10.937,-25.097 -28.037,-32.871l0.75,0.522l0.736,0.531l0.713,0.543l0.7,0.555l0.687,0.566l0.664,0.578l0.649,0.588l0.625,0.6l0.613,0.609l0.588,0.621l0.574,0.631l0.562,0.643l0.538,0.652l0.513,0.662l0.5,0.672l0.475,0.684l0.449,0.693l0.438,0.703l0.425,0.713l0.387,0.723l0.375,0.73l0.352,0.74l0.336,0.75l0.3,0.76l0.287,0.77l0.264,0.777l0.25,0.787l0.211,0.795l0.188,0.805l0.175,0.812l0.151,0.82l0.125,0.831c2.675,20.19 -16.838,40.825 -45.151,49.619c14.688,-6.665 24.926,-21.426 24.926,-38.614c0,-23.202 -18.65,-42.026 -41.775,-42.367c0.05,-0.005 0.1,-0.015 0.15,-0.025c-0.262,0 -0.526,-0.01 -0.789,-0.01Zm-13.248,11.314c7.817,0 14.25,6.433 14.25,14.25c0,0.001 0,0.001 0,0.001c0,7.817 -6.433,14.249 -14.25,14.249c-7.817,0 -14.25,-6.432 -14.25,-14.249c0,-0.001 0,-0.001 0,-0.001c0,-7.817 6.433,-14.25 14.25,-14.25Z" style="fill:#fff;fill-rule:nonzero;"/><path id="path5080" d="M213.786,9.529l0.75,0.521l0.738,0.532l0.712,0.544l0.7,0.555l0.688,0.566l0.662,0.577l0.65,0.588l0.625,0.6l0.613,0.61l0.587,0.62l0.575,0.631l0.563,0.643l0.537,0.652l0.513,0.663l0.5,0.672l0.475,0.684l0.45,0.692l0.437,0.703l0.425,0.712l0.388,0.723l0.375,0.731l0.35,0.741l0.337,0.75l0.3,0.76l0.288,0.769l0.262,0.777l0.25,0.786l0.213,0.797l0.187,0.804l0.175,0.812l0.15,0.821l0.125,0.83c2.675,20.19 -16.837,40.825 -45.15,49.619c14.688,-6.665 24.925,-21.426 24.925,-38.614c0,-23.202 -18.65,-42.025 -41.775,-42.367c0.05,-0.005 0.1,-0.015 0.15,-0.025c-0.262,0 -0.525,-0.01 -0.787,-0.01c-42.01,0 -76.062,18.985 -76.062,42.402c0,13.268 10.922,25.103 28.022,32.876c-8.081,-5.487 -13.403,-12.973 -14.584,-21.859c-2.685,-20.187 16.831,-40.82 45.149,-49.615c-14.688,6.665 -24.925,21.426 -24.925,38.598c0,23.218 18.65,42.046 41.775,42.383c-0.038,0.005 -0.088,0.015 -0.138,0.02c0.263,0 0.513,0.01 0.763,0.01c42.012,-0.001 76.075,-18.985 76.075,-42.413c0,-13.261 -10.938,-25.097 -28.038,-32.871Z" style="fill:none;"/><path id="path5082" d="M354.323,82.586l-41.999,-42.002l38.524,-38.515l-29.913,0l-23.562,23.559l-23.563,-23.559l-29.924,0l38.525,38.515l-42,42.002l29.913,0l27.049,-27.046l27.05,27.046l29.9,0" style="fill:#fff;fill-rule:nonzero;"/><path id="path5084" d="M354.323,82.586l-41.999,-42.002l38.524,-38.515l-29.913,0l-23.562,23.559l-23.563,-23.559l-29.924,0l38.525,38.515l-42,42.002l29.913,0l27.049,-27.046l27.05,27.046l29.9,0Z" style="fill:none;"/><path id="path5086" d="M0,2.069l75.033,0l0,16.489l-51.629,0l0,14.931l40.258,0l0,16.495l-40.258,0l0,16.05l53.124,0l0,16.488l-76.528,0l0,-80.453" style="fill:#fff;fill-rule:nonzero;"/><path id="path5088" d="M0,2.069l75.033,0l0,16.489l-51.629,0l0,14.931l40.258,0l0,16.495l-40.258,0l0,16.05l53.124,0l0,16.488l-76.528,0l0,-80.453Z" style="fill:none;"/></g></svg>`;
44
+ const base64Logo = window.btoa(eoxLogo);
31
45
  </script>
46
+ <style scoped>
47
+ .footer-text {
48
+ font-size: 0.8rem;
49
+ }
50
+ </style>
@@ -1,14 +1,19 @@
1
1
  <template>
2
2
  <v-app-bar color="primary">
3
3
  <v-app-bar-title>{{ title }}</v-app-bar-title>
4
- <v-img class="mx-12" style="max-width: 140px;" :src="eodash.brand?.logo" />
4
+ <v-img class="mx-12 logo" :src="eodash.brand?.logo" />
5
5
  </v-app-bar>
6
6
  </template>
7
7
  <script setup>
8
- import { eodashKey } from '@/utils/keys';
9
- import { inject } from 'vue';
8
+ import { eodashKey } from "@/utils/keys";
9
+ import { inject } from "vue";
10
10
 
11
- const eodash = /** @type {import("@/types").Eodash} */(inject(eodashKey))
11
+ const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
12
12
 
13
- const title = eodash.brand?.name
13
+ const title = eodash.brand?.name;
14
14
  </script>
15
+ <style scoped>
16
+ .logo {
17
+ max-width: 140px;
18
+ }
19
+ </style>