@eodash/eodash 5.0.0-alpha.2.1 → 5.0.0-alpha.2.10
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 +36 -3
- package/core/client/App.vue +26 -0
- package/core/client/SuspensedDashboard.ce.vue +105 -0
- package/core/client/asWebComponent.d.ts +23 -0
- package/core/client/asWebComponent.js +12 -0
- package/core/client/components/DashboardLayout.vue +77 -0
- package/core/client/components/DynamicWebComponent.vue +68 -0
- package/core/client/components/ErrorAlert.vue +36 -0
- package/core/{components → client/components}/Footer.vue +34 -15
- package/core/client/components/Header.vue +19 -0
- package/core/client/components/IframeWrapper.vue +11 -0
- package/core/client/components/Loading.vue +37 -0
- package/core/client/components/MobileLayout.vue +109 -0
- package/core/client/composables/DefineEodash.js +67 -0
- package/core/client/composables/DefineWidgets.js +161 -0
- package/core/client/composables/index.js +136 -0
- package/core/client/eodash.js +136 -0
- package/core/client/main.js +2 -0
- package/core/client/plugins/index.js +20 -0
- package/core/client/plugins/vuetify.js +35 -0
- package/core/client/render.js +12 -0
- package/core/client/store/Actions.js +62 -0
- package/core/client/store/States.js +21 -0
- package/core/client/store/index.js +20 -0
- package/core/client/store/stac.js +81 -0
- package/core/client/types.d.ts +287 -0
- package/core/client/utils/eodashSTAC.js +337 -0
- package/core/client/utils/helpers.js +172 -0
- package/core/client/utils/index.js +51 -0
- package/core/{utils → client/utils}/keys.js +2 -2
- package/core/client/views/Dashboard.vue +116 -0
- package/core/client/vite-env.d.ts +39 -0
- package/dist/client/DashboardLayout-C_3q8Y10.js +156 -0
- package/dist/{DynamicWebComponent-BrHVTesn.js → client/DynamicWebComponent-IiTTLBt-.js} +11 -11
- package/dist/client/EodashDatePicker-DgC1lccp.js +252 -0
- package/dist/{eox-itemfilter-DcQkRD2l.js → client/EodashItemFilter-DoWZGe6r.js} +1515 -1381
- package/dist/client/EodashMap-C96D3LLv.js +114352 -0
- package/dist/client/EodashMapBtns-DDtzV94u.js +50 -0
- package/dist/client/ExportState-CduS2mFs.js +558 -0
- package/dist/client/Footer-DHQcutCv.js +115 -0
- package/dist/client/Header-DC0y7rLK.js +350 -0
- package/dist/{IframeWrapper-Dd9zrX9s.js → client/IframeWrapper-BK-10FbS.js} +4 -4
- package/dist/client/MobileLayout-BpLoMY4i.js +945 -0
- package/dist/client/PopUp-CNMCWL0z.js +300 -0
- package/dist/client/VImg-DT7eb8V-.js +291 -0
- package/dist/client/VMain-OenWyy46.js +39 -0
- package/dist/client/VOverlay-x3UXpKhr.js +972 -0
- package/dist/{WidgetsContainer-DxfCu0I3.js → client/WidgetsContainer-qMUwtN0W.js} +24 -17
- package/dist/client/asWebComponent-DQrnLsI2.js +20404 -0
- package/dist/{basedecoder-Qm25PwVp-CHo5Pomv.js → client/basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
- package/dist/{decoder-kAoyGIq9-BBR5CgzS.js → client/decoder-Cth6J7EK-CtUoHA6r.js} +1 -1
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
- package/dist/client/eo-dash.js +6 -0
- package/dist/client/eox-jsonform-DCErgjhw.js +17515 -0
- package/dist/client/eox-layercontrol-D0Ht7Mag.js +21298 -0
- package/dist/client/eox-stacinfo-l7ALSV90.js +13969 -0
- package/dist/client/forwardRefs-CpNjL95t.js +185 -0
- package/dist/client/helpers-KCSgmfim.js +1417 -0
- package/dist/{index-DTkOfh2g.js → client/index-DopVrUzM.js} +22 -21
- package/dist/{jpeg-DNfUpLwy-Fjan-04T.js → client/jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
- package/dist/{lerc-C9VL9kri-cIdbW0sg.js → client/lerc-BgbQqdFI-D986ErVw.js} +37 -39
- package/dist/{lzw-BOMhmEDy-Dboc93VO.js → client/lzw-LAGDNbSC-DkP96qO9.js} +1 -1
- package/dist/{packbits-DaUD6MLm-Bu1PoTGa.js → client/packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
- package/dist/{pako.esm-C3kYPGGQ-BMki8cQY.js → client/pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
- package/dist/{raw-CcGKjn8q-DFOt-i8n.js → client/raw-CMGvRjfu-BRi6E4i1.js} +1 -1
- package/dist/{ssrBoot-D-b4-M19.js → client/ssrBoot-DkjdOWvj.js} +1 -1
- package/dist/client/style.css +5 -0
- package/dist/client/transition-BtJHh7JK.js +34 -0
- package/dist/{webfontloader-CyOFAuFB.js → client/webfontloader-qotgY98I.js} +56 -92
- package/dist/{webimage-D2c098k3-DLj1LQxB.js → client/webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
- package/dist/node/cli.js +20 -0
- package/dist/node/main.js +2 -0
- package/dist/node/types.d.ts +47 -0
- package/package.json +54 -51
- package/widgets/EodashDatePicker.vue +145 -40
- package/widgets/EodashItemFilter.vue +73 -38
- package/widgets/EodashMap.vue +210 -37
- package/widgets/EodashMapBtns.vue +50 -0
- package/widgets/ExportState.vue +112 -0
- package/widgets/PopUp.vue +40 -0
- package/widgets/WidgetsContainer.vue +47 -27
- package/bin/app.js +0 -22
- package/bin/cli.js +0 -62
- package/bin/main.js +0 -9
- package/bin/serverConfig.js +0 -165
- package/bin/types.d.ts +0 -52
- package/bin/utils.js +0 -103
- package/core/App.vue +0 -19
- package/core/SuspensedDashboard.ce.vue +0 -65
- package/core/asWebComponent.d.ts +0 -18
- package/core/asWebComponent.js +0 -12
- package/core/components/DashboardLayout.vue +0 -44
- package/core/components/DynamicWebComponent.vue +0 -68
- package/core/components/Header.vue +0 -14
- package/core/components/IframeWrapper.vue +0 -11
- package/core/components/Loading.vue +0 -27
- package/core/components/MobileLayout.vue +0 -49
- package/core/composables/DefineEodash.js +0 -57
- package/core/composables/DefineWidgets.js +0 -129
- package/core/composables/index.js +0 -219
- package/core/eodash.js +0 -100
- package/core/main.js +0 -2
- package/core/plugins/index.js +0 -18
- package/core/plugins/vuetify.js +0 -30
- package/core/render.js +0 -13
- package/core/store/Actions.js +0 -0
- package/core/store/States.js +0 -21
- package/core/store/index.js +0 -17
- package/core/store/stac.js +0 -63
- package/core/types.d.ts +0 -356
- package/core/utils/eodashSTAC.js +0 -164
- package/core/utils/helpers.js +0 -40
- package/core/utils/index.js +0 -28
- package/core/views/Dashboard.vue +0 -59
- package/core/vite-env.d.ts +0 -31
- package/dist/DashboardLayout-Dp8AnYD9.js +0 -141
- package/dist/EodashDatePicker-D_udZ26j.js +0 -1645
- package/dist/EodashItemFilter-BLAGx2UD.js +0 -51
- package/dist/EodashMap-Bxl_aqY2.js +0 -53405
- package/dist/Footer-AohCH8U7.js +0 -118
- package/dist/Header-DC50S6GR.js +0 -609
- package/dist/MobileLayout-CgToA7Gp.js +0 -523
- package/dist/VBtn-Bz7ruRUg.js +0 -1106
- package/dist/VMain-BHfWJU2j.js +0 -35
- package/dist/asWebComponent-C8rb3b1D.js +0 -11323
- package/dist/color-DpYEub1f.js +0 -115
- package/dist/deflate-Be2Arps5-hDqMz3RA.js +0 -10
- package/dist/dimensions-CJaGeSrj.js +0 -53
- package/dist/eo-dash.js +0 -6
- package/dist/eox-map-BJ9SIixs.js +0 -36205
- package/dist/eox-stacinfo-B-YrT7Ug.js +0 -13698
- package/dist/forwardRefs-Bxeu9Obx.js +0 -142
- package/dist/index-Sa2Vg_gx.js +0 -65
- package/dist/style.css +0 -5
- /package/dist/{.gitkeep → client/.gitkeep} +0 -0
- /package/dist/{_commonjsHelpers-DaMA6jEr.js → client/_commonjsHelpers-DaMA6jEr.js} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { changeMapProjection, registerProjection } from "@/store/Actions";
|
|
2
|
+
import { availableMapProjection } from "@/store/States";
|
|
3
|
+
import { toAbsolute } from "stac-js/src/http.js";
|
|
4
|
+
|
|
5
|
+
/** @param {import("stac-ts").StacLink[]} links */
|
|
6
|
+
export function generateFeatures(links) {
|
|
7
|
+
/**
|
|
8
|
+
* @type {{
|
|
9
|
+
* type: string;
|
|
10
|
+
* geometry: {
|
|
11
|
+
* type: string;
|
|
12
|
+
* coordinates: [number, number];
|
|
13
|
+
* };
|
|
14
|
+
* }[]}
|
|
15
|
+
*/
|
|
16
|
+
const features = [];
|
|
17
|
+
links.forEach((element) => {
|
|
18
|
+
if (element.rel === "item" && "latlng" in element) {
|
|
19
|
+
const [lat, lon] = /** @type {string} */ (element.latlng)
|
|
20
|
+
.split(",")
|
|
21
|
+
.map((it) => Number(it));
|
|
22
|
+
features.push({
|
|
23
|
+
type: "Feature",
|
|
24
|
+
geometry: {
|
|
25
|
+
type: "Point",
|
|
26
|
+
coordinates: [lon, lat],
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const geojsonObject = {
|
|
32
|
+
type: "FeatureCollection",
|
|
33
|
+
crs: {
|
|
34
|
+
type: "name",
|
|
35
|
+
properties: {
|
|
36
|
+
name: "EPSG:4326",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
features,
|
|
40
|
+
};
|
|
41
|
+
return geojsonObject;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: object } } [style] */
|
|
45
|
+
export function extractLayerConfig(style) {
|
|
46
|
+
/** @type {Record<string,unknown>} */
|
|
47
|
+
let layerConfig = {};
|
|
48
|
+
if (style?.jsonform) {
|
|
49
|
+
layerConfig = { schema: style.jsonform, type: "style" };
|
|
50
|
+
delete style?.jsonform;
|
|
51
|
+
}
|
|
52
|
+
return { layerConfig, style };
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} id
|
|
56
|
+
* @param {string} title
|
|
57
|
+
* @param {Record<string,import("stac-ts").StacAsset>} assets
|
|
58
|
+
* @param {import("ol/layer/WebGLTile").Style} [style]
|
|
59
|
+
* @param {Record<string, unknown>} [layerConfig]
|
|
60
|
+
**/
|
|
61
|
+
export async function createLayersFromDataAssets(
|
|
62
|
+
id,
|
|
63
|
+
title,
|
|
64
|
+
assets,
|
|
65
|
+
style,
|
|
66
|
+
layerConfig,
|
|
67
|
+
) {
|
|
68
|
+
let jsonArray = [];
|
|
69
|
+
let geoTIFFSources = [];
|
|
70
|
+
for (const ast in assets) {
|
|
71
|
+
// register projection if exists
|
|
72
|
+
await registerProjection(
|
|
73
|
+
/** @type {number | undefined} */ (assets[ast]?.["proj:epsg"]),
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
if (assets[ast]?.type === "application/geo+json") {
|
|
77
|
+
jsonArray.push({
|
|
78
|
+
type: "Vector",
|
|
79
|
+
source: {
|
|
80
|
+
type: "Vector",
|
|
81
|
+
url: assets[ast].href,
|
|
82
|
+
format: "GeoJSON",
|
|
83
|
+
},
|
|
84
|
+
properties: {
|
|
85
|
+
id,
|
|
86
|
+
title,
|
|
87
|
+
layerConfig: {
|
|
88
|
+
...layerConfig,
|
|
89
|
+
style,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
} else if (assets[ast]?.type === "image/tiff") {
|
|
94
|
+
geoTIFFSources.push({ url: assets[ast].href });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (geoTIFFSources.length) {
|
|
98
|
+
jsonArray.push({
|
|
99
|
+
type: "WebGLTile",
|
|
100
|
+
source: {
|
|
101
|
+
type: "GeoTIFF",
|
|
102
|
+
normalize: style?.variables ? false : true,
|
|
103
|
+
sources: geoTIFFSources,
|
|
104
|
+
},
|
|
105
|
+
properties: {
|
|
106
|
+
id,
|
|
107
|
+
title,
|
|
108
|
+
layerConfig,
|
|
109
|
+
},
|
|
110
|
+
style,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return jsonArray;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* checks if there's a projection on the Collection and
|
|
118
|
+
* updates {@link availableMapProjection}
|
|
119
|
+
* @param {import('stac-ts').StacCollection} STAcCollection
|
|
120
|
+
*/
|
|
121
|
+
export const setMapProjFromCol = (STAcCollection) => {
|
|
122
|
+
// if a projection exists on the collection level
|
|
123
|
+
if (STAcCollection?.["proj:epsg"]) {
|
|
124
|
+
if (
|
|
125
|
+
availableMapProjection.value &&
|
|
126
|
+
availableMapProjection.value !== STAcCollection?.["proj:epsg"]
|
|
127
|
+
) {
|
|
128
|
+
changeMapProjection(
|
|
129
|
+
/** @type {number} */
|
|
130
|
+
(STAcCollection["proj:epsg"]),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
// set it for `EodashMapBtns`
|
|
134
|
+
availableMapProjection.value = /** @type {string} */ (
|
|
135
|
+
STAcCollection["proj:epsg"]
|
|
136
|
+
);
|
|
137
|
+
} else {
|
|
138
|
+
// reset to default projection
|
|
139
|
+
changeMapProjection((availableMapProjection.value = ""));
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Function to extract collection urls from an indicator
|
|
145
|
+
* @param {import("stac-ts").StacCatalog
|
|
146
|
+
* | import("stac-ts").StacCollection
|
|
147
|
+
* | import("stac-ts").StacItem
|
|
148
|
+
* | null
|
|
149
|
+
* } stacObject
|
|
150
|
+
* @param {string} basepath
|
|
151
|
+
* @returns {string[]}
|
|
152
|
+
*/
|
|
153
|
+
export function extractCollectionUrls(stacObject, basepath) {
|
|
154
|
+
const collectionUrls = [];
|
|
155
|
+
// Support for two structure types, flat and indicator, simplified here:
|
|
156
|
+
// Flat assumes Catalog-Collection-Item
|
|
157
|
+
// Indicator assumes Catalog-Collection-Collection-Item
|
|
158
|
+
// TODO: this is not the most stable test approach,
|
|
159
|
+
// we should discuss potential other approaches
|
|
160
|
+
|
|
161
|
+
if (stacObject?.links && stacObject?.links[1].rel === "item") {
|
|
162
|
+
collectionUrls.push(basepath);
|
|
163
|
+
} else if (stacObject?.links[1].rel === "child") {
|
|
164
|
+
// TODO: Iterate through all children to create collections
|
|
165
|
+
stacObject.links.forEach((link) => {
|
|
166
|
+
if (link.rel === "child") {
|
|
167
|
+
collectionUrls.push(toAbsolute(link.href, basepath));
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return collectionUrls;
|
|
172
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads font in the app using `webfontloader`
|
|
3
|
+
*
|
|
4
|
+
* @param {string} [family]
|
|
5
|
+
* @param {string} [link]
|
|
6
|
+
* @param {boolean} [isWebComponent]
|
|
7
|
+
* @returns {Promise<string>} - Font family name
|
|
8
|
+
* @see {@link "https://github.com/typekit/webfontloader"}
|
|
9
|
+
*/
|
|
10
|
+
export const loadFont = async (
|
|
11
|
+
family = "",
|
|
12
|
+
link = "",
|
|
13
|
+
isWebComponent = false,
|
|
14
|
+
) => {
|
|
15
|
+
if (family && link) {
|
|
16
|
+
const WebFontLoader = (await import("webfontloader")).default;
|
|
17
|
+
WebFontLoader.load({
|
|
18
|
+
classes: false,
|
|
19
|
+
custom: {
|
|
20
|
+
// Use FVD notation to include families https://github.com/typekit/fvd
|
|
21
|
+
families: [family],
|
|
22
|
+
// Path to stylesheet that defines font-face
|
|
23
|
+
urls: [link],
|
|
24
|
+
},
|
|
25
|
+
fontactive(familyName, _fvd) {
|
|
26
|
+
const stylesheet = new CSSStyleSheet();
|
|
27
|
+
const styles = isWebComponent
|
|
28
|
+
? `eo-dash {font-family: ${familyName};}`
|
|
29
|
+
: `* {font-family: ${familyName};}`;
|
|
30
|
+
stylesheet.replaceSync(styles);
|
|
31
|
+
document.adoptedStyleSheets.push(stylesheet);
|
|
32
|
+
},
|
|
33
|
+
fontinactive(familyName, _fvd) {
|
|
34
|
+
throw new Error(`error loading font: ${familyName}`);
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return family;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @param {string} text
|
|
43
|
+
* @param {import("vue").Ref<boolean>} showIcon
|
|
44
|
+
**/
|
|
45
|
+
export const copyToClipBoard = async (text, showIcon) => {
|
|
46
|
+
await navigator.clipboard.writeText(text);
|
|
47
|
+
showIcon.value = true;
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
showIcon.value = false;
|
|
50
|
+
}, 2000);
|
|
51
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<HeaderComponent ref="headerRef" v-if="!eodash.brand.noLayout" />
|
|
3
|
+
<ErrorAlert v-model="error" />
|
|
4
|
+
<Suspense>
|
|
5
|
+
<TemplateComponent
|
|
6
|
+
@vue:mounted="onTemplateMount?.(hiddenElements)"
|
|
7
|
+
class="template"
|
|
8
|
+
/>
|
|
9
|
+
<template #fallback>
|
|
10
|
+
<div class="loading-container">
|
|
11
|
+
<Loading />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
</Suspense>
|
|
15
|
+
<FooterComponent ref="footerRef" v-if="!eodash.brand.noLayout" />
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { useEodashRuntime } from "@/composables/DefineEodash";
|
|
20
|
+
import { useURLSearchParametersSync, useUpdateTheme } from "@/composables";
|
|
21
|
+
import { useSTAcStore } from "@/store/stac";
|
|
22
|
+
import { defineAsyncComponent, onErrorCaptured, onMounted, ref } from "vue";
|
|
23
|
+
import { useDisplay, useLayout } from "vuetify/lib/framework.mjs";
|
|
24
|
+
import { loadFont } from "@/utils";
|
|
25
|
+
import Loading from "@/components/Loading.vue";
|
|
26
|
+
import ErrorAlert from "@/components/ErrorAlert.vue";
|
|
27
|
+
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
config: {
|
|
30
|
+
type: String,
|
|
31
|
+
},
|
|
32
|
+
onTemplateMount: {
|
|
33
|
+
type: Function,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const eodash = await useEodashRuntime(props.config);
|
|
37
|
+
|
|
38
|
+
useURLSearchParametersSync();
|
|
39
|
+
|
|
40
|
+
const theme = useUpdateTheme("dashboardTheme", eodash.brand?.theme);
|
|
41
|
+
theme.global.name.value = "dashboardTheme";
|
|
42
|
+
|
|
43
|
+
await loadFont(
|
|
44
|
+
eodash.brand?.font?.family,
|
|
45
|
+
eodash.brand?.font?.link,
|
|
46
|
+
!!props.onTemplateMount,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const { loadSTAC } = useSTAcStore();
|
|
50
|
+
await loadSTAC();
|
|
51
|
+
|
|
52
|
+
const { smAndDown } = useDisplay();
|
|
53
|
+
const TemplateComponent = smAndDown.value
|
|
54
|
+
? defineAsyncComponent(() => import(`@/components/MobileLayout.vue`))
|
|
55
|
+
: defineAsyncComponent(() => import(`@/components/DashboardLayout.vue`));
|
|
56
|
+
|
|
57
|
+
const HeaderComponent = defineAsyncComponent(
|
|
58
|
+
() => import(`@/components/Header.vue`),
|
|
59
|
+
);
|
|
60
|
+
const FooterComponent = defineAsyncComponent(
|
|
61
|
+
() => import(`@/components/Footer.vue`),
|
|
62
|
+
);
|
|
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
|
+
|
|
70
|
+
const headerRef = ref(null);
|
|
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
|
+
});
|
|
91
|
+
|
|
92
|
+
const error = ref("");
|
|
93
|
+
onErrorCaptured((e, comp, info) => {
|
|
94
|
+
error.value = `
|
|
95
|
+
${e}.
|
|
96
|
+
component: ${comp?.$.type.name}.
|
|
97
|
+
info: ${info}.
|
|
98
|
+
`;
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
101
|
+
<style>
|
|
102
|
+
html {
|
|
103
|
+
overflow: hidden !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.template {
|
|
107
|
+
height: v-bind("templateHeight");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.loading-container {
|
|
111
|
+
height: 100dvh;
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module "*.vue" {
|
|
4
|
+
import type { DefineComponent } from "vue";
|
|
5
|
+
const component: DefineComponent<object, object, unknown>;
|
|
6
|
+
export default component;
|
|
7
|
+
}
|
|
8
|
+
declare interface Window {
|
|
9
|
+
eodashStore: import("@/types").EodashStore;
|
|
10
|
+
}
|
|
11
|
+
declare module "@eox/stacinfo" {
|
|
12
|
+
export const EOxStacInfo: CustomElementConstructor;
|
|
13
|
+
}
|
|
14
|
+
declare module "@eox/layercontrol" {
|
|
15
|
+
export const EOxLayerControl: CustomElementConstructor;
|
|
16
|
+
}
|
|
17
|
+
declare module "@eox/jsonform" {
|
|
18
|
+
export const EOxJSONForm: CustomElementConstructor;
|
|
19
|
+
}
|
|
20
|
+
declare module "@eox/map" {
|
|
21
|
+
export const EOxMap: CustomElementConstructor;
|
|
22
|
+
}
|
|
23
|
+
declare module "@eox/itemfilter" {
|
|
24
|
+
export const EOxItemFilter: CustomElementConstructor;
|
|
25
|
+
}
|
|
26
|
+
declare module "user:config" {
|
|
27
|
+
const eodash: import("@/types").Eodash | Promise<import("@/types").Eodash>;
|
|
28
|
+
export default eodash;
|
|
29
|
+
}
|
|
30
|
+
declare module "stac-js" {
|
|
31
|
+
export const Collection: {
|
|
32
|
+
new (data?: object): import("stac-ts").StacCollection;
|
|
33
|
+
};
|
|
34
|
+
export const Item: { new (data?: object): import("stac-ts").StacItem };
|
|
35
|
+
}
|
|
36
|
+
declare module "stac-js/src/http.js" {
|
|
37
|
+
const toAbsolute: (...args: string[]) => string;
|
|
38
|
+
export { toAbsolute };
|
|
39
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { _ as y, x as m, W as x, X as d, $ as t, a0 as r, a1 as l, a9 as _, a3 as n, a6 as u, a2 as c, a4 as p, d as h, a5 as g, F as f, a7 as v, ab as w } from "./asWebComponent-DQrnLsI2.js";
|
|
2
|
+
import { V as k } from "./VMain-OenWyy46.js";
|
|
3
|
+
class A extends HTMLElement {
|
|
4
|
+
static get observedAttributes() {
|
|
5
|
+
return ["gap"];
|
|
6
|
+
}
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.attachShadow({ mode: "open" }), this.render();
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
this.shadowRoot.innerHTML = `
|
|
12
|
+
<style>
|
|
13
|
+
:host {
|
|
14
|
+
display: grid;
|
|
15
|
+
padding: ${this.getAttribute("gap") || 0}px;
|
|
16
|
+
height: 100%;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
gap: ${this.getAttribute("gap") || "0"}px;
|
|
19
|
+
grid-template-columns: repeat(12, 1fr);
|
|
20
|
+
grid-template-rows: repeat(12, 1fr);
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
<slot></slot>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
attributeChangedCallback(a, s, o) {
|
|
27
|
+
s !== o && (this[a] = o), this.render();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
class C extends HTMLElement {
|
|
31
|
+
static get observedAttributes() {
|
|
32
|
+
return ["x", "y", "w", "h"];
|
|
33
|
+
}
|
|
34
|
+
constructor() {
|
|
35
|
+
super(), this.attachShadow({ mode: "open" }), this.render();
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
this.shadowRoot.innerHTML = `
|
|
39
|
+
<style>
|
|
40
|
+
:host {
|
|
41
|
+
background: lightgrey;
|
|
42
|
+
border: 1px solid darkgrey;
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
padding: 4px 8px;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
grid-column: ${parseInt(this.getAttribute("x")) + 1} / span ${this.getAttribute("w")};
|
|
49
|
+
grid-row: ${parseInt(this.getAttribute("y")) + 1} / span ${this.getAttribute("h")};
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
52
|
+
<slot></slot>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
attributeChangedCallback(a, s, o) {
|
|
56
|
+
s !== o && (this[a] = o), this.render();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
customElements.define("eox-layout", A);
|
|
60
|
+
customElements.define("eox-layout-item", C);
|
|
61
|
+
const L = ["gap"], $ = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "bg-panel",
|
|
64
|
+
x: "0",
|
|
65
|
+
y: "0",
|
|
66
|
+
h: "12",
|
|
67
|
+
w: "12"
|
|
68
|
+
}, E = ["h", "w", "x", "y"], M = {
|
|
69
|
+
__name: "DashboardLayout",
|
|
70
|
+
setup(i) {
|
|
71
|
+
const a = (
|
|
72
|
+
/** @type {import("@/types").Eodash} */
|
|
73
|
+
m(x)
|
|
74
|
+
), [s] = d([a.template?.background]), o = d(a.template?.widgets);
|
|
75
|
+
return (T, B) => (t(), r(k, null, {
|
|
76
|
+
default: l(() => [
|
|
77
|
+
_("eox-layout", {
|
|
78
|
+
gap: n(a).template.gap ?? 2
|
|
79
|
+
}, [
|
|
80
|
+
n(s).component ? (t(), u("eox-layout-item", $, [
|
|
81
|
+
(t(), r(c, { suspensible: "" }, {
|
|
82
|
+
default: l(() => [
|
|
83
|
+
(t(), r(
|
|
84
|
+
p(n(s).component),
|
|
85
|
+
h({ id: "bg-widget" }, n(s).props),
|
|
86
|
+
null,
|
|
87
|
+
16
|
|
88
|
+
/* FULL_PROPS */
|
|
89
|
+
))
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
/* STABLE */
|
|
93
|
+
}))
|
|
94
|
+
])) : g("v-if", !0),
|
|
95
|
+
(t(!0), u(
|
|
96
|
+
f,
|
|
97
|
+
null,
|
|
98
|
+
v(n(o), (e, b) => (t(), r(
|
|
99
|
+
w,
|
|
100
|
+
{
|
|
101
|
+
key: b,
|
|
102
|
+
name: "fade"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
default: l(() => [
|
|
106
|
+
e.value.component ? (t(), u("eox-layout-item", {
|
|
107
|
+
key: e.value.id,
|
|
108
|
+
class: "panel bg-surface",
|
|
109
|
+
h: e.value.layout.h,
|
|
110
|
+
w: e.value.layout.w,
|
|
111
|
+
x: e.value.layout.x,
|
|
112
|
+
y: e.value.layout.y
|
|
113
|
+
}, [
|
|
114
|
+
(t(), r(
|
|
115
|
+
c,
|
|
116
|
+
{ suspensible: "" },
|
|
117
|
+
{
|
|
118
|
+
default: l(() => [
|
|
119
|
+
(t(), r(
|
|
120
|
+
p(e.value.component),
|
|
121
|
+
h({
|
|
122
|
+
key: e.value.id,
|
|
123
|
+
ref_for: !0
|
|
124
|
+
}, e.value.props),
|
|
125
|
+
null,
|
|
126
|
+
16
|
|
127
|
+
/* FULL_PROPS */
|
|
128
|
+
))
|
|
129
|
+
]),
|
|
130
|
+
_: 2
|
|
131
|
+
/* DYNAMIC */
|
|
132
|
+
},
|
|
133
|
+
1024
|
|
134
|
+
/* DYNAMIC_SLOTS */
|
|
135
|
+
))
|
|
136
|
+
], 8, E)) : g("v-if", !0)
|
|
137
|
+
]),
|
|
138
|
+
_: 2
|
|
139
|
+
/* DYNAMIC */
|
|
140
|
+
},
|
|
141
|
+
1024
|
|
142
|
+
/* DYNAMIC_SLOTS */
|
|
143
|
+
))),
|
|
144
|
+
128
|
|
145
|
+
/* KEYED_FRAGMENT */
|
|
146
|
+
))
|
|
147
|
+
], 8, L)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
/* STABLE */
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}, V = /* @__PURE__ */ y(M, [["__scopeId", "data-v-a859692c"]]);
|
|
154
|
+
export {
|
|
155
|
+
V as default
|
|
156
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const h = { class: "d-flex flex-column fill-height overflow-auto" },
|
|
1
|
+
import { bC as i, aA as m, r as p, Z as d, aL as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-DQrnLsI2.js";
|
|
2
|
+
const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
|
|
3
3
|
__name: "DynamicWebComponent",
|
|
4
4
|
props: {
|
|
5
5
|
link: {
|
|
@@ -19,26 +19,26 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, x = {
|
|
|
19
19
|
onUnmounted: Function
|
|
20
20
|
},
|
|
21
21
|
async setup(o) {
|
|
22
|
-
let t,
|
|
22
|
+
let t, a;
|
|
23
23
|
const e = (
|
|
24
|
-
/** @type {import("@/types").WebComponentProps}
|
|
24
|
+
/** @type {import("@/types").WebComponentProps} */
|
|
25
25
|
o
|
|
26
26
|
), u = async () => typeof e.link == "string" ? await import(
|
|
27
27
|
/* @vite-ignore */
|
|
28
28
|
e.link
|
|
29
|
-
) : await e.link(), l = customElements.get(e.tagName) ? null : ([t,
|
|
29
|
+
) : await e.link(), l = customElements.get(e.tagName) ? null : ([t, a] = i(() => u().catch((n) => {
|
|
30
30
|
console.error(n);
|
|
31
|
-
})), t = await t,
|
|
31
|
+
})), t = await t, a(), t);
|
|
32
32
|
if (!customElements.get(e.tagName) && e.constructorProp) {
|
|
33
33
|
const n = l[e.constructorProp];
|
|
34
34
|
customElements.define(e.tagName, n);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const s = m(), r = p(null);
|
|
37
37
|
return d(() => {
|
|
38
|
-
e.onMounted?.(r.value,
|
|
38
|
+
e.onMounted?.(r.value, s);
|
|
39
39
|
}), f(() => {
|
|
40
|
-
e.onUnmounted?.(r.value,
|
|
41
|
-
}), (n,
|
|
40
|
+
e.onUnmounted?.(r.value, s);
|
|
41
|
+
}), (n, w) => (c(), g("span", h, [
|
|
42
42
|
(c(), y(
|
|
43
43
|
k(o.tagName),
|
|
44
44
|
_(o.properties, {
|
|
@@ -53,5 +53,5 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, x = {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
N as default
|
|
57
57
|
};
|