@eodash/eodash 5.0.0-alpha.1.9 → 5.0.0-alpha.2
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 +1 -1
- package/bin/cli.js +15 -8
- package/bin/main.js +9 -0
- package/bin/serverConfig.js +58 -29
- package/bin/types.d.ts +52 -0
- package/bin/utils.js +70 -20
- package/core/App.vue +10 -12
- package/core/SuspensedDashboard.ce.vue +59 -0
- package/core/asWebComponent.d.ts +18 -0
- package/core/asWebComponent.js +12 -0
- package/core/components/DashboardLayout.vue +23 -27
- package/core/components/DynamicWebComponent.vue +6 -6
- package/core/components/Footer.vue +11 -12
- package/core/components/Header.vue +5 -29
- package/core/components/Loading.vue +27 -0
- package/core/components/MobileLayout.vue +34 -63
- package/core/composables/DefineEodash.js +57 -0
- package/core/composables/DefineWidgets.js +26 -15
- package/core/composables/index.js +139 -67
- package/core/eodash.js +100 -0
- package/core/main.js +2 -4
- package/core/plugins/index.js +3 -12
- package/core/plugins/vuetify.js +5 -2
- package/core/store/Actions.js +0 -28
- package/core/store/States.js +12 -3
- package/core/store/stac.js +7 -5
- package/core/types.d.ts +148 -124
- package/core/utils/eodashSTAC.js +164 -0
- package/core/utils/helpers.js +40 -0
- package/core/utils/index.js +28 -0
- package/core/utils/keys.js +6 -0
- package/core/views/Dashboard.vue +33 -23
- package/core/vite-env.d.ts +16 -2
- package/dist/.gitkeep +0 -0
- package/dist/DashboardLayout-YLfAa8wH.js +168 -0
- package/dist/DynamicWebComponent-BDOQsEcj.js +57 -0
- package/dist/EodashDatePicker-DlehqSgz.js +1645 -0
- package/dist/EodashItemFilter-TSp7XRGy.js +51 -0
- package/dist/EodashMap-DInb9cfS.js +53405 -0
- package/dist/Footer-CIzHgJbK.js +118 -0
- package/dist/Header-C5PSB8Uc.js +609 -0
- package/dist/IframeWrapper-DYHQQRUh.js +19 -0
- package/dist/MobileLayout-DZmqrpub.js +523 -0
- package/dist/VBtn-CFPhsIX8.js +1106 -0
- package/dist/VMain-deI9jyIf.js +35 -0
- package/dist/WidgetsContainer-D_PLP1qf.js +122 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/asWebComponent-BKe6Spni.js +11323 -0
- package/dist/basedecoder-Qm25PwVp-CHo5Pomv.js +89 -0
- package/dist/color-D72nEBIR.js +115 -0
- package/dist/decoder-kAoyGIq9-HAkjSTCt.js +10 -0
- package/dist/deflate-Be2Arps5-hDqMz3RA.js +10 -0
- package/dist/dimensions-BZkmIizV.js +53 -0
- package/dist/eo-dash.js +6 -0
- package/dist/eox-itemfilter-DcQkRD2l.js +7537 -0
- package/dist/eox-map-BJ9SIixs.js +36205 -0
- package/dist/eox-stacinfo-B-YrT7Ug.js +13698 -0
- package/dist/forwardRefs-Bxeu9Obx.js +142 -0
- package/dist/index-8ch8xKfa.js +152 -0
- package/dist/index-DIt8GjSR.js +65 -0
- package/dist/jpeg-DNfUpLwy-Fjan-04T.js +515 -0
- package/dist/lerc-C9VL9kri-DyVxBvsf.js +1029 -0
- package/dist/lzw-BOMhmEDy-Dboc93VO.js +84 -0
- package/dist/packbits-DaUD6MLm-Bu1PoTGa.js +24 -0
- package/dist/pako.esm-C3kYPGGQ-BMki8cQY.js +1087 -0
- package/dist/raw-CcGKjn8q-DFOt-i8n.js +9 -0
- package/dist/ssrBoot-Cm5pWM14.js +17 -0
- package/dist/style.css +5 -0
- package/dist/webfontloader-CyOFAuFB.js +471 -0
- package/dist/webimage-D2c098k3-DLj1LQxB.js +19 -0
- package/package.json +40 -12
- package/widgets/EodashDatePicker.vue +56 -0
- package/widgets/EodashItemFilter.vue +60 -0
- package/widgets/EodashMap.vue +82 -0
- package/widgets/WidgetsContainer.vue +1 -1
- package/core/composables/DefineConfig.js +0 -45
- package/core/eodashConfig.js +0 -136
- package/core/plugins/router.js +0 -20
- package/core/store/Keys.js +0 -6
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* loads font in the app using `webfontloader`
|
|
3
|
+
* @param {string} [family="Roboto"]
|
|
4
|
+
* @param {string} [link]
|
|
5
|
+
* @returns {Promise<string>} - font family name
|
|
6
|
+
* @see {@link "https://github.com/typekit/webfontloader "}
|
|
7
|
+
*/
|
|
8
|
+
export const loadFont = async (family = "Roboto", link) => {
|
|
9
|
+
const WebFontLoader = (await import('webfontloader')).default;
|
|
10
|
+
if (link) {
|
|
11
|
+
WebFontLoader.load({
|
|
12
|
+
custom: {
|
|
13
|
+
// Use FVD notation to include families https://github.com/typekit/fvd
|
|
14
|
+
families: [family],
|
|
15
|
+
// Path to stylesheet that defines font-face
|
|
16
|
+
urls: [link],
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
WebFontLoader.load({
|
|
22
|
+
google: {
|
|
23
|
+
families: [family]
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return family;
|
|
28
|
+
};
|
package/core/views/Dashboard.vue
CHANGED
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<HeaderComponent />
|
|
3
|
-
<
|
|
4
|
-
|
|
2
|
+
<HeaderComponent v-if="!eodash.brand.noLayout" />
|
|
3
|
+
<Suspense>
|
|
4
|
+
<TemplateComponent @vue:mounted="onTemplateMount?.()"
|
|
5
|
+
:style="`height: ${eodash.brand.noLayout ? '90dvh' : 'calc(100dvh - ' + mainRect['top'] + mainRect['bottom'] + 'px)'}`" />
|
|
6
|
+
<template #fallback>
|
|
7
|
+
<div v-if="onTemplateMount" style="height: 100dvh; display: flex; align-items: center; justify-content: center;">
|
|
8
|
+
<Loading />
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
</Suspense>
|
|
12
|
+
<FooterComponent v-if="!eodash.brand.noLayout" />
|
|
5
13
|
</template>
|
|
6
14
|
|
|
7
15
|
<script setup>
|
|
8
|
-
import {
|
|
9
|
-
import { useUpdateTheme } from "@/composables";
|
|
16
|
+
import { useEodashRuntime } from "@/composables/DefineEodash";
|
|
17
|
+
import { useURLSearchParametersSync, useUpdateTheme } from "@/composables";
|
|
10
18
|
import { useSTAcStore } from '@/store/stac';
|
|
11
|
-
import { defineAsyncComponent } from "vue";
|
|
19
|
+
import { defineAsyncComponent, onMounted } from "vue";
|
|
12
20
|
import { useDisplay, useLayout } from "vuetify/lib/framework.mjs";
|
|
13
|
-
import { loadFont } from '@/
|
|
14
|
-
import
|
|
21
|
+
import { loadFont } from '@/utils'
|
|
22
|
+
import Loading from "@/components/Loading.vue";
|
|
23
|
+
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
config: {
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
28
|
+
onTemplateMount: {
|
|
29
|
+
type: Function
|
|
30
|
+
}
|
|
31
|
+
})
|
|
15
32
|
|
|
33
|
+
const eodash = await useEodashRuntime(props.config)
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
useURLSearchParametersSync();
|
|
18
36
|
|
|
19
|
-
const theme = useUpdateTheme('dashboardTheme',
|
|
37
|
+
const theme = useUpdateTheme('dashboardTheme', eodash.brand?.theme)
|
|
20
38
|
theme.global.name.value = 'dashboardTheme'
|
|
21
39
|
|
|
22
|
-
|
|
40
|
+
await loadFont(eodash.brand?.font?.family, eodash.brand?.font?.link)
|
|
23
41
|
|
|
24
42
|
const { loadSTAC } = useSTAcStore()
|
|
25
43
|
await loadSTAC()
|
|
44
|
+
|
|
26
45
|
const { smAndDown } = useDisplay()
|
|
27
46
|
const TemplateComponent = smAndDown.value ?
|
|
28
47
|
defineAsyncComponent(() => import(`@/components/MobileLayout.vue`)) :
|
|
@@ -32,18 +51,9 @@ const HeaderComponent = defineAsyncComponent(() => import(`@/components/Header.v
|
|
|
32
51
|
const FooterComponent = defineAsyncComponent(() => import(`@/components/Footer.vue`))
|
|
33
52
|
const { mainRect } = useLayout()
|
|
34
53
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
import.meta.hot?.on('reload', () => {
|
|
40
|
-
window.location.reload()
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
const htmlTag = /** @type {HTMLElement} */(document.querySelector('html'))
|
|
56
|
+
htmlTag.style.overflow = 'hidden';
|
|
41
57
|
})
|
|
42
58
|
|
|
43
59
|
</script>
|
|
44
|
-
|
|
45
|
-
<style scoped lang="scss">
|
|
46
|
-
* {
|
|
47
|
-
font-family: v-bind('fontFamily');
|
|
48
|
-
}
|
|
49
|
-
</style>
|
package/core/vite-env.d.ts
CHANGED
|
@@ -11,7 +11,21 @@ declare interface Window {
|
|
|
11
11
|
declare module '@eox/stacinfo' {
|
|
12
12
|
export const EOxStacInfo: CustomElementConstructor
|
|
13
13
|
}
|
|
14
|
+
declare module '@eox/map' {
|
|
15
|
+
export const EOxMap: CustomElementConstructor
|
|
16
|
+
}
|
|
17
|
+
declare module '@eox/itemfilter' {
|
|
18
|
+
export const EOxItemFilter: CustomElementConstructor
|
|
19
|
+
}
|
|
14
20
|
declare module 'user:config' {
|
|
15
|
-
const
|
|
16
|
-
export default
|
|
21
|
+
const eodash: import("@/types").Eodash | Promise<import("@/types").Eodash>;
|
|
22
|
+
export default eodash
|
|
23
|
+
}
|
|
24
|
+
declare module "stac-js" {
|
|
25
|
+
const STAC: any, Collection: any, Item: any
|
|
26
|
+
export { STAC, Collection, Item }
|
|
27
|
+
}
|
|
28
|
+
declare module "stac-js/src/http.js" {
|
|
29
|
+
const toAbsolute: any
|
|
30
|
+
export { toAbsolute }
|
|
17
31
|
}
|
package/dist/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { y as k, z as v, A as m, r as C, R as A, S as L, D as o, E as n, G as l, T as y, J as e, U as b, a as c, H as f, m as _, K as w, F as V, L as E, N as $, V as B } from "./asWebComponent-BKe6Spni.js";
|
|
2
|
+
import { V as S, b as z } from "./VBtn-CFPhsIX8.js";
|
|
3
|
+
import { V as H } from "./VMain-deI9jyIf.js";
|
|
4
|
+
class M extends HTMLElement {
|
|
5
|
+
static get observedAttributes() {
|
|
6
|
+
return ["gap"];
|
|
7
|
+
}
|
|
8
|
+
constructor() {
|
|
9
|
+
super(), this.attachShadow({ mode: "open" }), this.render();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
this.shadowRoot.innerHTML = `
|
|
13
|
+
<style>
|
|
14
|
+
:host {
|
|
15
|
+
display: grid;
|
|
16
|
+
padding: ${this.getAttribute("gap") || 0}px;
|
|
17
|
+
height: 100%;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
gap: ${this.getAttribute("gap") || "0"}px;
|
|
20
|
+
grid-template-columns: repeat(12, 1fr);
|
|
21
|
+
grid-template-rows: repeat(12, 1fr);
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
24
|
+
<slot></slot>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
attributeChangedCallback(a, r, s) {
|
|
28
|
+
r !== s && (this[a] = s), this.render();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class T extends HTMLElement {
|
|
32
|
+
static get observedAttributes() {
|
|
33
|
+
return ["x", "y", "w", "h"];
|
|
34
|
+
}
|
|
35
|
+
constructor() {
|
|
36
|
+
super(), this.attachShadow({ mode: "open" }), this.render();
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
this.shadowRoot.innerHTML = `
|
|
40
|
+
<style>
|
|
41
|
+
:host {
|
|
42
|
+
background: lightgrey;
|
|
43
|
+
border: 1px solid darkgrey;
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
padding: 4px 8px;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
grid-column: ${parseInt(this.getAttribute("x")) + 1} / span ${this.getAttribute("w")};
|
|
50
|
+
grid-row: ${parseInt(this.getAttribute("y")) + 1} / span ${this.getAttribute("h")};
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
53
|
+
<slot></slot>
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
attributeChangedCallback(a, r, s) {
|
|
57
|
+
r !== s && (this[a] = s), this.render();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
customElements.define("eox-layout", M);
|
|
61
|
+
customElements.define("eox-layout-item", T);
|
|
62
|
+
const D = ["gap"], I = {
|
|
63
|
+
style: { "z-index": "0" },
|
|
64
|
+
x: "0",
|
|
65
|
+
y: "0",
|
|
66
|
+
h: "12",
|
|
67
|
+
w: "12"
|
|
68
|
+
}, N = ["x", "y", "h", "w"], G = {
|
|
69
|
+
__name: "DashboardLayout",
|
|
70
|
+
setup(p) {
|
|
71
|
+
const a = (
|
|
72
|
+
/** @type {import("@/types").Eodash} */
|
|
73
|
+
k(v)
|
|
74
|
+
), [r] = m([a.template?.background]), s = a.template?.widgets, u = m(s), h = C([]), { slideBtns: i, slideInOut: x } = A(h, s);
|
|
75
|
+
return (R, W) => {
|
|
76
|
+
const g = L("Loading");
|
|
77
|
+
return o(), n(H, null, {
|
|
78
|
+
default: l(() => [
|
|
79
|
+
y("eox-layout", {
|
|
80
|
+
gap: e(a).template.gap ?? 2
|
|
81
|
+
}, [
|
|
82
|
+
y("eox-layout-item", I, [
|
|
83
|
+
(o(), n(b, null, {
|
|
84
|
+
fallback: l(() => [
|
|
85
|
+
c(g)
|
|
86
|
+
]),
|
|
87
|
+
default: l(() => [
|
|
88
|
+
(o(), n(
|
|
89
|
+
f(e(r).component),
|
|
90
|
+
_({ id: "bg-widget" }, e(r).props),
|
|
91
|
+
null,
|
|
92
|
+
16
|
|
93
|
+
/* FULL_PROPS */
|
|
94
|
+
))
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
/* STABLE */
|
|
98
|
+
}))
|
|
99
|
+
]),
|
|
100
|
+
(o(!0), w(
|
|
101
|
+
V,
|
|
102
|
+
null,
|
|
103
|
+
E(e(s), (d, t) => (o(), w("eox-layout-item", {
|
|
104
|
+
ref_for: !0,
|
|
105
|
+
ref_key: "itemEls",
|
|
106
|
+
ref: h,
|
|
107
|
+
key: t,
|
|
108
|
+
style: { position: "relative", overflow: "visible", "z-index": "1", "border-radius": "0px", background: "rgb(var(--v-theme-surface))" },
|
|
109
|
+
x: d.layout.x,
|
|
110
|
+
y: d.layout.y,
|
|
111
|
+
h: d.layout.h,
|
|
112
|
+
w: d.layout.w
|
|
113
|
+
}, [
|
|
114
|
+
e(i)[t].enabled ? (o(), n(S, {
|
|
115
|
+
key: 0,
|
|
116
|
+
position: "absolute",
|
|
117
|
+
variant: "tonal",
|
|
118
|
+
style: $(e(i)[t].style),
|
|
119
|
+
class: "slide-btn",
|
|
120
|
+
onClick: (F) => e(x)(t)
|
|
121
|
+
}, {
|
|
122
|
+
default: l(() => [
|
|
123
|
+
c(z, {
|
|
124
|
+
icon: e(i)[t].active ? e(i)[t].icon.in : e(i)[t].icon.out
|
|
125
|
+
}, null, 8, ["icon"])
|
|
126
|
+
]),
|
|
127
|
+
_: 2
|
|
128
|
+
/* DYNAMIC */
|
|
129
|
+
}, 1032, ["style", "onClick"])) : B("v-if", !0),
|
|
130
|
+
(o(), n(
|
|
131
|
+
b,
|
|
132
|
+
null,
|
|
133
|
+
{
|
|
134
|
+
fallback: l(() => [
|
|
135
|
+
c(g)
|
|
136
|
+
]),
|
|
137
|
+
default: l(() => [
|
|
138
|
+
(o(), n(
|
|
139
|
+
f(e(u)[t].value.component),
|
|
140
|
+
_({
|
|
141
|
+
key: e(u)[t].value.id
|
|
142
|
+
}, e(u)[t].value.props),
|
|
143
|
+
null,
|
|
144
|
+
16
|
|
145
|
+
/* FULL_PROPS */
|
|
146
|
+
))
|
|
147
|
+
]),
|
|
148
|
+
_: 2
|
|
149
|
+
/* DYNAMIC */
|
|
150
|
+
},
|
|
151
|
+
1024
|
|
152
|
+
/* DYNAMIC_SLOTS */
|
|
153
|
+
))
|
|
154
|
+
], 8, N))),
|
|
155
|
+
128
|
|
156
|
+
/* KEYED_FRAGMENT */
|
|
157
|
+
))
|
|
158
|
+
], 8, D)
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
/* STABLE */
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
export {
|
|
167
|
+
G as default
|
|
168
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { aN as i, aO as m, r as p, C as d, aP as f, D as c, K as g, E as y, m as _, H as k } from "./asWebComponent-BKe6Spni.js";
|
|
2
|
+
const h = { class: "d-flex flex-column fill-height overflow-auto" }, x = {
|
|
3
|
+
__name: "DynamicWebComponent",
|
|
4
|
+
props: {
|
|
5
|
+
link: {
|
|
6
|
+
type: [String, Function],
|
|
7
|
+
required: !0
|
|
8
|
+
},
|
|
9
|
+
constructorProp: String,
|
|
10
|
+
tagName: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
properties: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => ({})
|
|
17
|
+
},
|
|
18
|
+
onMounted: Function,
|
|
19
|
+
onUnmounted: Function
|
|
20
|
+
},
|
|
21
|
+
async setup(o) {
|
|
22
|
+
let t, s;
|
|
23
|
+
const e = (
|
|
24
|
+
/** @type {import("@/types").WebComponentProps} */
|
|
25
|
+
o
|
|
26
|
+
), u = async () => typeof e.link == "string" ? await import(
|
|
27
|
+
/* @vite-ignore */
|
|
28
|
+
e.link
|
|
29
|
+
) : await e.link(), l = customElements.get(e.tagName) ? null : ([t, s] = i(() => u().catch((n) => {
|
|
30
|
+
console.error(n);
|
|
31
|
+
})), t = await t, s(), t);
|
|
32
|
+
if (!customElements.get(e.tagName) && e.constructorProp) {
|
|
33
|
+
const n = l[e.constructorProp];
|
|
34
|
+
customElements.define(e.tagName, n);
|
|
35
|
+
}
|
|
36
|
+
const a = m(), r = p(null);
|
|
37
|
+
return d(() => {
|
|
38
|
+
e.onMounted?.(r.value, a);
|
|
39
|
+
}), f(() => {
|
|
40
|
+
e.onUnmounted?.(r.value, a);
|
|
41
|
+
}), (n, N) => (c(), g("span", h, [
|
|
42
|
+
(c(), y(
|
|
43
|
+
k(o.tagName),
|
|
44
|
+
_(o.properties, {
|
|
45
|
+
ref_key: "elementRef",
|
|
46
|
+
ref: r
|
|
47
|
+
}),
|
|
48
|
+
null,
|
|
49
|
+
16
|
|
50
|
+
/* FULL_PROPS */
|
|
51
|
+
))
|
|
52
|
+
]));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
x as default
|
|
57
|
+
};
|