@eodash/eodash 5.0.0-alpha.2.19 → 5.0.0-alpha.2.20
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/core/client/App.vue +11 -1
- package/core/client/asWebComponent.js +9 -2
- package/core/client/views/Dashboard.vue +17 -46
- package/dist/client/DashboardLayout-CPIA_V5h.js +86 -0
- package/dist/client/DynamicWebComponent-Bm2S0izi.js +88 -0
- package/dist/client/EodashDatePicker-Tdk5Xx9F.js +393 -0
- package/dist/client/EodashItemFilter-BUyqlf5G.js +194 -0
- package/dist/client/EodashLayerControl-DRYy-Air.js +111 -0
- package/dist/client/EodashMap-B_F51bLD.js +472 -0
- package/dist/client/EodashMapBtns-COBF3RhH.js +66 -0
- package/dist/client/ExportState-DkDHsbWL.js +644 -0
- package/dist/client/Footer-D8rQVlJH.js +141 -0
- package/dist/client/Header-CasZzQOl.js +437 -0
- package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
- package/dist/client/MobileLayout-CukFMuL9.js +1210 -0
- package/dist/client/PopUp-BXrxWSQ4.js +382 -0
- package/dist/client/VImg-DB_1xaqP.js +384 -0
- package/dist/client/VMain-nLmJhfgS.js +43 -0
- package/dist/client/VOverlay-naLhQSyZ.js +1453 -0
- package/dist/client/WidgetsContainer-CQY2xBg1.js +83 -0
- package/dist/client/asWebComponent-CIm1IGNl.js +11556 -0
- package/dist/client/eo-dash.js +2 -6
- package/dist/client/forwardRefs-q4ZkKtOv.js +245 -0
- package/dist/client/index-D-kMSCQA.js +199 -0
- package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
- package/dist/client/style.css +2 -2
- package/dist/client/transition-DKGepKqs.js +37 -0
- package/dist/node/cli.js +5 -5
- package/dist/node/types.d.ts +2 -0
- package/package.json +21 -19
- package/widgets/EodashDatePicker.vue +20 -9
- package/core/client/SuspensedDashboard.ce.vue +0 -105
- package/dist/client/DashboardLayout-CU4js3lr.js +0 -156
- package/dist/client/DynamicWebComponent-BsYZdIEB.js +0 -57
- package/dist/client/EodashDatePicker-DZoH_gRX.js +0 -276
- package/dist/client/EodashItemFilter-CHBfsFSm.js +0 -7666
- package/dist/client/EodashLayerControl-CuY-cAx8.js +0 -24665
- package/dist/client/EodashMap-Ch43fWNv.js +0 -88369
- package/dist/client/EodashMapBtns-CFA2uti4.js +0 -50
- package/dist/client/ExportState-C6raDjTt.js +0 -570
- package/dist/client/Footer-D8T5ROhF.js +0 -117
- package/dist/client/Header-B8B4Z5R9.js +0 -350
- package/dist/client/IframeWrapper-BK2JxzSJ.js +0 -19
- package/dist/client/MobileLayout-aZaYvF8V.js +0 -947
- package/dist/client/PopUp-DdHXoNOP.js +0 -300
- package/dist/client/VImg-yb8O1cb8.js +0 -293
- package/dist/client/VMain-Dknnyxts.js +0 -38
- package/dist/client/VOverlay-BCOn3hd6.js +0 -973
- package/dist/client/WidgetsContainer-BixUyr1e.js +0 -129
- package/dist/client/asWebComponent-CHqY8A1z.js +0 -24636
- package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
- package/dist/client/decoder-DJlmx386-DJlmx386.js +0 -8
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
- package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
- package/dist/client/forwardRefs-dcYA2XVU.js +0 -185
- package/dist/client/index-BVuSHaVu.js +0 -153
- package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
- package/dist/client/lerc-BPVtQnt3-08GHszVp.js +0 -1027
- package/dist/client/lzw-LAGDNbSC-DkP96qO9.js +0 -84
- package/dist/client/packbits-BlDR4Kj5-C66n1-zr.js +0 -24
- package/dist/client/pako.esm-CB1uQYY0-DB0PYm1P.js +0 -1081
- package/dist/client/raw-CMGvRjfu-BRi6E4i1.js +0 -9
- package/dist/client/ssrBoot-DU2S_nLc.js +0 -17
- package/dist/client/transition-C_fi1aa6.js +0 -34
- package/dist/client/webfontloader-Ofarvipf.js +0 -435
- package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
package/core/client/App.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-app>
|
|
3
3
|
<Suspense>
|
|
4
|
-
<Dashboard />
|
|
4
|
+
<Dashboard :is-web-component="isWebComponent" :config="config" />
|
|
5
5
|
|
|
6
6
|
<template #fallback>
|
|
7
7
|
<ErrorAlert v-model="error" />
|
|
@@ -15,9 +15,19 @@ import Dashboard from "@/views/Dashboard.vue";
|
|
|
15
15
|
import ErrorAlert from "./components/ErrorAlert.vue";
|
|
16
16
|
import { onErrorCaptured, ref } from "vue";
|
|
17
17
|
|
|
18
|
+
defineProps({
|
|
19
|
+
config: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: false,
|
|
22
|
+
default: undefined,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
18
26
|
// window.setEodashLoglevel("DEBUG")
|
|
19
27
|
|
|
20
28
|
const error = ref("");
|
|
29
|
+
const isWebComponent = !!document.querySelector("eo-dash");
|
|
30
|
+
|
|
21
31
|
onErrorCaptured((e, inst, info) => {
|
|
22
32
|
error.value = `
|
|
23
33
|
${e}.
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import App from "./App.vue";
|
|
2
2
|
import { defineCustomElement } from "vue";
|
|
3
|
+
import { registerPlugins } from "./plugins";
|
|
4
|
+
|
|
3
5
|
/** @type {import("./asWebComponent").EodashConstructor} */
|
|
4
|
-
export const Eodash = defineCustomElement(
|
|
6
|
+
export const Eodash = defineCustomElement(App, {
|
|
7
|
+
shadowRoot: false,
|
|
8
|
+
configureApp(app) {
|
|
9
|
+
registerPlugins(app);
|
|
10
|
+
},
|
|
11
|
+
});
|
|
5
12
|
|
|
6
13
|
export function register() {
|
|
7
14
|
customElements.define("eo-dash", Eodash);
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<HeaderComponent
|
|
2
|
+
<HeaderComponent v-if="!eodash.brand.noLayout" />
|
|
3
3
|
<ErrorAlert v-model="error" />
|
|
4
4
|
<Suspense>
|
|
5
|
-
<TemplateComponent
|
|
6
|
-
@vue:mounted="onTemplateMount?.(hiddenElements)"
|
|
7
|
-
class="template"
|
|
8
|
-
/>
|
|
5
|
+
<TemplateComponent :style="{ height: templateHeight }" />
|
|
9
6
|
<template #fallback>
|
|
10
7
|
<div class="loading-container">
|
|
11
8
|
<Loading />
|
|
12
9
|
</div>
|
|
13
10
|
</template>
|
|
14
11
|
</Suspense>
|
|
15
|
-
<FooterComponent
|
|
12
|
+
<FooterComponent v-if="!eodash.brand.noLayout" />
|
|
16
13
|
</template>
|
|
17
14
|
|
|
18
15
|
<script setup>
|
|
19
16
|
import { useEodashRuntime } from "@/composables/DefineEodash";
|
|
20
17
|
import { useURLSearchParametersSync, useUpdateTheme } from "@/composables";
|
|
21
18
|
import { useSTAcStore } from "@/store/stac";
|
|
22
|
-
import { defineAsyncComponent, onErrorCaptured,
|
|
23
|
-
import { useDisplay
|
|
19
|
+
import { defineAsyncComponent, onErrorCaptured, ref } from "vue";
|
|
20
|
+
import { useDisplay } from "vuetify/lib/framework.mjs";
|
|
24
21
|
import { loadFont } from "@/utils";
|
|
25
22
|
import Loading from "@/components/Loading.vue";
|
|
26
23
|
import ErrorAlert from "@/components/ErrorAlert.vue";
|
|
@@ -29,8 +26,9 @@ const props = defineProps({
|
|
|
29
26
|
config: {
|
|
30
27
|
type: String,
|
|
31
28
|
},
|
|
32
|
-
|
|
33
|
-
type:
|
|
29
|
+
isWebComponent: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
34
32
|
},
|
|
35
33
|
});
|
|
36
34
|
const eodash = await useEodashRuntime(props.config);
|
|
@@ -43,7 +41,7 @@ theme.global.name.value = "dashboardTheme";
|
|
|
43
41
|
await loadFont(
|
|
44
42
|
eodash.brand?.font?.family,
|
|
45
43
|
eodash.brand?.font?.link,
|
|
46
|
-
|
|
44
|
+
props.isWebComponent,
|
|
47
45
|
);
|
|
48
46
|
|
|
49
47
|
const { loadSTAC } = useSTAcStore();
|
|
@@ -60,34 +58,8 @@ const HeaderComponent = defineAsyncComponent(
|
|
|
60
58
|
const FooterComponent = defineAsyncComponent(
|
|
61
59
|
() => import(`@/components/Footer.vue`),
|
|
62
60
|
);
|
|
63
|
-
const { mainRect } = useLayout();
|
|
64
|
-
const templateHeight = eodash.brand.noLayout
|
|
65
|
-
? props.onTemplateMount
|
|
66
|
-
? "100%"
|
|
67
|
-
: "90dvh"
|
|
68
|
-
: `calc(100dvh - ${mainRect.value["top"] + mainRect.value["bottom"]}px)`;
|
|
69
61
|
|
|
70
|
-
const
|
|
71
|
-
/**
|
|
72
|
-
* @type {import("vue").Ref<InstanceType<
|
|
73
|
-
* typeof import("@/components/Footer.vue").default
|
|
74
|
-
* > | null>}
|
|
75
|
-
*/
|
|
76
|
-
const footerRef = ref(null);
|
|
77
|
-
|
|
78
|
-
const hiddenElements = [headerRef, footerRef];
|
|
79
|
-
|
|
80
|
-
onMounted(() => {
|
|
81
|
-
if (props.onTemplateMount && !eodash.brand.noLayout) {
|
|
82
|
-
hiddenElements.forEach((element) => {
|
|
83
|
-
/** @type {HTMLElement} */
|
|
84
|
-
(
|
|
85
|
-
/** @type {import("vue").ComponentPublicInstance} */
|
|
86
|
-
(element.value).$el
|
|
87
|
-
).style.opacity = "0";
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
});
|
|
62
|
+
const templateHeight = props.isWebComponent ? "100%" : "100dvh";
|
|
91
63
|
|
|
92
64
|
const error = ref("");
|
|
93
65
|
onErrorCaptured((e, comp, info) => {
|
|
@@ -99,18 +71,17 @@ onErrorCaptured((e, comp, info) => {
|
|
|
99
71
|
});
|
|
100
72
|
</script>
|
|
101
73
|
<style>
|
|
102
|
-
html {
|
|
103
|
-
overflow: hidden !important;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.template {
|
|
107
|
-
height: v-bind("templateHeight");
|
|
108
|
-
}
|
|
109
|
-
|
|
110
74
|
.loading-container {
|
|
111
75
|
height: 100dvh;
|
|
112
76
|
display: flex;
|
|
113
77
|
align-items: center;
|
|
114
78
|
justify-content: center;
|
|
115
79
|
}
|
|
80
|
+
|
|
81
|
+
div.v-application__wrap {
|
|
82
|
+
min-height: fit-content;
|
|
83
|
+
}
|
|
84
|
+
eo-dash {
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
}
|
|
116
87
|
</style>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { inject, openBlock, createBlock, withCtx, createElementVNode, unref, createElementBlock, Suspense, resolveDynamicComponent, mergeProps, createCommentVNode, Fragment, renderList, Transition } from 'vue';
|
|
2
|
+
import { _ as _export_sfc, F as eodashKey, G as useDefineWidgets } from './asWebComponent-CIm1IGNl.js';
|
|
3
|
+
import '@eox/layout';
|
|
4
|
+
import { V as VMain } from './VMain-nLmJhfgS.js';
|
|
5
|
+
|
|
6
|
+
const _hoisted_1 = ["gap"];
|
|
7
|
+
const _hoisted_2 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "bg-panel",
|
|
10
|
+
x: "0",
|
|
11
|
+
y: "0",
|
|
12
|
+
h: "12",
|
|
13
|
+
w: "12"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_3 = ["h", "w", "x", "y"];
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const _sfc_main = {
|
|
19
|
+
__name: 'DashboardLayout',
|
|
20
|
+
setup(__props) {
|
|
21
|
+
|
|
22
|
+
const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
|
|
23
|
+
|
|
24
|
+
const [bgWidget] = useDefineWidgets([eodash.template?.background]);
|
|
25
|
+
|
|
26
|
+
const importedWidgets = useDefineWidgets(eodash.template?.widgets);
|
|
27
|
+
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
return (openBlock(), createBlock(VMain, null, {
|
|
32
|
+
default: withCtx(() => [
|
|
33
|
+
createElementVNode("eox-layout", {
|
|
34
|
+
gap: unref(eodash).template.gap ?? 2
|
|
35
|
+
}, [
|
|
36
|
+
(unref(bgWidget).component)
|
|
37
|
+
? (openBlock(), createElementBlock("eox-layout-item", _hoisted_2, [
|
|
38
|
+
(openBlock(), createBlock(Suspense, { suspensible: "" }, {
|
|
39
|
+
default: withCtx(() => [
|
|
40
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(bgWidget).component), mergeProps({ id: "bg-widget" }, unref(bgWidget).props), null, 16 /* FULL_PROPS */))
|
|
41
|
+
]),
|
|
42
|
+
_: 1 /* STABLE */
|
|
43
|
+
}))
|
|
44
|
+
]))
|
|
45
|
+
: createCommentVNode("v-if", true),
|
|
46
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(importedWidgets), (importedWidget, idx) => {
|
|
47
|
+
return (openBlock(), createBlock(Transition, {
|
|
48
|
+
key: idx,
|
|
49
|
+
name: "fade"
|
|
50
|
+
}, {
|
|
51
|
+
default: withCtx(() => [
|
|
52
|
+
(importedWidget.value.component)
|
|
53
|
+
? (openBlock(), createElementBlock("eox-layout-item", {
|
|
54
|
+
key: importedWidget.value.id,
|
|
55
|
+
class: "panel bg-surface",
|
|
56
|
+
h: importedWidget.value.layout.h,
|
|
57
|
+
w: importedWidget.value.layout.w,
|
|
58
|
+
x: importedWidget.value.layout.x,
|
|
59
|
+
y: importedWidget.value.layout.y
|
|
60
|
+
}, [
|
|
61
|
+
(openBlock(), createBlock(Suspense, { suspensible: "" }, {
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
(openBlock(), createBlock(resolveDynamicComponent(importedWidget.value.component), mergeProps({
|
|
64
|
+
key: importedWidget.value.id,
|
|
65
|
+
ref_for: true
|
|
66
|
+
}, importedWidget.value.props), null, 16 /* FULL_PROPS */))
|
|
67
|
+
]),
|
|
68
|
+
_: 2 /* DYNAMIC */
|
|
69
|
+
}, 1024 /* DYNAMIC_SLOTS */))
|
|
70
|
+
], 8 /* PROPS */, _hoisted_3))
|
|
71
|
+
: createCommentVNode("v-if", true)
|
|
72
|
+
]),
|
|
73
|
+
_: 2 /* DYNAMIC */
|
|
74
|
+
}, 1024 /* DYNAMIC_SLOTS */))
|
|
75
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
76
|
+
], 8 /* PROPS */, _hoisted_1)
|
|
77
|
+
]),
|
|
78
|
+
_: 1 /* STABLE */
|
|
79
|
+
}))
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
};
|
|
84
|
+
const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-a859692c"]]);
|
|
85
|
+
|
|
86
|
+
export { DashboardLayout as default };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { withAsyncContext, ref, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
+
import { $ as useSTAcStore } from './asWebComponent-CIm1IGNl.js';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const _sfc_main = {
|
|
8
|
+
__name: 'DynamicWebComponent',
|
|
9
|
+
props: {
|
|
10
|
+
link: {
|
|
11
|
+
type: [String, Function],
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
constructorProp: String,
|
|
15
|
+
tagName: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
properties: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => {
|
|
22
|
+
return {};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
onMounted: Function,
|
|
26
|
+
onUnmounted: Function,
|
|
27
|
+
},
|
|
28
|
+
async setup(__props) {
|
|
29
|
+
|
|
30
|
+
let __temp, __restore;
|
|
31
|
+
|
|
32
|
+
const props = /** @type {import("@/types").WebComponentProps} */ (
|
|
33
|
+
__props
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const getWebComponent = async () =>
|
|
37
|
+
typeof props.link === "string"
|
|
38
|
+
? await import(/* @vite-ignore */ props.link)
|
|
39
|
+
: await props.link();
|
|
40
|
+
|
|
41
|
+
const imported = !customElements.get(props.tagName)
|
|
42
|
+
? (
|
|
43
|
+
([__temp,__restore] = withAsyncContext(() => getWebComponent().catch((e) => {
|
|
44
|
+
console.error(e);
|
|
45
|
+
}))),
|
|
46
|
+
__temp = await __temp,
|
|
47
|
+
__restore(),
|
|
48
|
+
__temp
|
|
49
|
+
)
|
|
50
|
+
: null;
|
|
51
|
+
|
|
52
|
+
const defined = customElements.get(props.tagName);
|
|
53
|
+
|
|
54
|
+
// if the imported link doesn't define the custom tag provided
|
|
55
|
+
if (!defined && props.constructorProp) {
|
|
56
|
+
const Constructor = imported[props.constructorProp];
|
|
57
|
+
customElements.define(props.tagName, Constructor);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const store = useSTAcStore();
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @typedef {HTMLElement & Record<string | number | symbol, unknown>} CustomElement
|
|
64
|
+
* @type {import("vue").Ref<CustomElement | null>}
|
|
65
|
+
*/
|
|
66
|
+
const elementRef = ref(null);
|
|
67
|
+
|
|
68
|
+
onMounted(() => {
|
|
69
|
+
props.onMounted?.(elementRef.value, store);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
onUnmounted(() => {
|
|
73
|
+
props.onUnmounted?.(elementRef.value, store);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return (_ctx, _cache) => {
|
|
77
|
+
return (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
78
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.tagName), mergeProps(__props.properties, {
|
|
79
|
+
ref_key: "elementRef",
|
|
80
|
+
ref: elementRef
|
|
81
|
+
}), null, 16 /* FULL_PROPS */))
|
|
82
|
+
]))
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export { _sfc_main as default };
|