@eodash/eodash 5.0.0-alpha.2.4 → 5.0.0-alpha.2.5
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 +12 -2
- package/core/client/SuspensedDashboard.ce.vue +1 -5
- package/core/client/components/DashboardLayout.vue +37 -14
- package/core/client/components/ErrorAlert.vue +6 -1
- package/core/client/components/Footer.vue +6 -1
- package/core/client/components/Header.vue +6 -1
- package/core/client/components/IframeWrapper.vue +1 -1
- package/core/client/components/MobileLayout.vue +41 -10
- package/core/client/composables/DefineEodash.js +2 -1
- package/core/client/composables/DefineWidgets.js +14 -8
- package/core/client/composables/index.js +18 -119
- package/core/client/eodash.js +38 -36
- package/core/client/plugins/index.js +3 -0
- package/core/client/types.d.ts +40 -83
- package/core/client/utils/eodashSTAC.js +29 -25
- package/core/client/utils/index.js +15 -11
- package/core/client/views/Dashboard.vue +22 -11
- package/dist/client/DashboardLayout-BYROtP-7.js +156 -0
- package/dist/client/{DynamicWebComponent-C4Hotc4H.js → DynamicWebComponent-BQhxFPM0.js} +6 -6
- package/dist/client/EodashDatePicker-CFltnt5d.js +1194 -0
- package/dist/client/EodashItemFilter-DIBDAHcc.js +65 -0
- package/dist/client/{EodashMap-CGrQjZ1P.js → EodashMap-C6jJ2Lb_.js} +14323 -15656
- package/dist/client/Footer-BVIZms1S.js +115 -0
- package/dist/client/Header-TsTL1d2R.js +633 -0
- package/dist/client/{IframeWrapper-Cg3GMmfW.js → IframeWrapper-XKChM78a.js} +4 -4
- package/dist/client/MobileLayout-BlGcMQra.js +957 -0
- package/dist/client/{VMain-BHYlmRic.js → VMain-C9XV5Lyg.js} +8 -8
- package/dist/client/{WidgetsContainer-dje9QSk0.js → WidgetsContainer-BQXHnZpa.js} +3 -3
- package/dist/client/asWebComponent-CbdGxelK.js +20188 -0
- package/dist/client/{decoder-HRvnjnEI-BQ2rajuJ.js → decoder-HRvnjnEI-CHAYOWhz.js} +1 -1
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/forwardRefs-CyCJOFsz.js +192 -0
- package/dist/client/http-ZWiLaAeR.js +1337 -0
- package/dist/client/{index-CaDDfJYE.js → index-CabQjjQg.js} +43 -74
- package/dist/client/{lerc-_E46UbWQ-Beu35ovS.js → lerc-_E46UbWQ-TxBH4OeK.js} +1 -1
- package/dist/client/{ssrBoot-Dd7m-btU.js → ssrBoot-DWJ-z4I-.js} +3 -3
- package/dist/client/style.css +2 -2
- package/dist/client/transition-BlLt41wg.js +34 -0
- package/dist/node/cli.js +3 -3
- package/package.json +3 -4
- package/widgets/EodashDatePicker.vue +89 -36
- package/widgets/EodashItemFilter.vue +29 -13
- package/dist/client/DashboardLayout-ZaSRMD1M.js +0 -149
- package/dist/client/EodashDatePicker-C4kKjxKy.js +0 -1653
- package/dist/client/EodashItemFilter-cBHC0YEM.js +0 -51
- package/dist/client/Footer-pS636dEP.js +0 -118
- package/dist/client/Header-DQuaLdjl.js +0 -605
- package/dist/client/MobileLayout-BLXFBWI_.js +0 -987
- package/dist/client/asWebComponent-Bvb3xkxI.js +0 -13311
- package/dist/client/forwardRefs-Bxeu9Obx.js +0 -142
- package/dist/client/index-DlNICb3T.js +0 -34
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { p as m, aw as d, d as l, av as u, ab as b } from "./asWebComponent-CbdGxelK.js";
|
|
2
|
+
const j = m({
|
|
3
|
+
transition: {
|
|
4
|
+
type: [Boolean, String, Object],
|
|
5
|
+
default: "fade-transition",
|
|
6
|
+
validator: (o) => o !== !0
|
|
7
|
+
}
|
|
8
|
+
}, "transition"), T = (o, s) => {
|
|
9
|
+
let {
|
|
10
|
+
slots: e
|
|
11
|
+
} = s;
|
|
12
|
+
const {
|
|
13
|
+
transition: t,
|
|
14
|
+
disabled: n,
|
|
15
|
+
group: r,
|
|
16
|
+
...a
|
|
17
|
+
} = o, {
|
|
18
|
+
component: i = r ? u : b,
|
|
19
|
+
...p
|
|
20
|
+
} = typeof t == "object" ? t : {};
|
|
21
|
+
return d(i, l(typeof t == "string" ? {
|
|
22
|
+
name: n ? "" : t
|
|
23
|
+
} : p, typeof t == "string" ? {} : Object.fromEntries(Object.entries({
|
|
24
|
+
disabled: n,
|
|
25
|
+
group: r
|
|
26
|
+
}).filter((c) => {
|
|
27
|
+
let [y, f] = c;
|
|
28
|
+
return f !== void 0;
|
|
29
|
+
})), a), e);
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
T as M,
|
|
33
|
+
j as m
|
|
34
|
+
};
|
package/dist/node/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createLogger as P,defineConfig as C,searchForWorkspaceRoot as x,createServer as k,preview as S,build as F}from"vite";import{readFileSync as
|
|
2
|
+
import{createLogger as P,defineConfig as C,searchForWorkspaceRoot as x,createServer as k,preview as S,build as F}from"vite";import{readFileSync as U,existsSync as u}from"fs";import t from"path";import{Command as E}from"commander";import{readFile as W,writeFile as I,rm as $,cp as N}from"fs/promises";import O from"@vitejs/plugin-vue";import T,{transformAssetUrls as A}from"vite-plugin-vuetify";const s=v(process.cwd()),b=new E("eodash"),H=JSON.parse(U(t.join(s,"package.json"),"utf-8"));b.version(H.version,"-v, --version","output the current version").option("--publicDir <path>","path to statically served assets folder").option("--no-publicDir","stop serving static assets").option("--outDir <path>","minified output folder").option("-e, --entryPoint <path>","file exporting `createEodash`").option("-w, --widgets <path>","folder that contains vue components as internal widgets").option("--cacheDir <path>","cache folder").option("-r, --runtime <path>","file exporting eodash client runtime config").option("-b, --base <path>","base public path").option("-p, --port <port>","serving port").option("-o, --open","open default browser when the server starts").option("-c, --config <path>","path to eodash server and build configuration file").option("--host [IP address]","specify which IP addresses the server should listen on").option("-l, --lib","builds eodash as a web component library").option("--no-lib","builds eodash as an SPA").option("--no-host","do not expose server to the network").parse(process.argv);const i=await z(b.opts(),process.argv?.[2]),c=v(),L=i.publicDir?t.resolve(s,i.publicDir):t.join(s,"./public"),h=t.join(s,"/src"),l=i.runtime?t.resolve(s,i.runtime):t.join(h,"./runtime.js"),g=i.entryPoint?t.resolve(s,i.entryPoint):t.join(h,"/main.js"),w=i.widgets?t.resolve(s,i.widgets):t.join(h,"widgets"),j=t.join(s,"/.eodash"),f=i.outDir?t.resolve(s,i.outDir):t.join(j,"/dist"),R=i.cacheDir?t.resolve(s,i.cacheDir):t.join(j,"cache"),m=P(void 0,{prefix:"[eodash]"});async function z(e,n){let a=e.config?t.resolve(s,e.config):t.join(s,"eodash.config.js"),o={};return u(a)?o=await import(a).then(r=>r.default instanceof Function?r.default():r.default).catch(r=>{console.error(r)}):a=null,{base:e.base??o?.base,port:Number(e.port??o?.[n]?.port),host:e.host??o?.[n]?.host,open:e.open??o?.[n]?.open,cacheDir:e.cacheDir??o?.cacheDir,entryPoint:e.entryPoint??o?.entryPoint,outDir:e.outDir??o?.outDir,publicDir:e.publicDir??o?.publicDir,runtime:e.runtime??o?.runtime,widgets:e.widgets??o?.widgets,lib:e.lib??o?.lib}}function v(e=import.meta.dirname){if(e.split("/").length)return u(t.resolve(e,"package.json"))?e:v(t.resolve(e,".."));throw new Error("no package root found")}const y=`
|
|
3
3
|
<!DOCTYPE html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
|
|
@@ -11,10 +11,10 @@ import{createLogger as P,defineConfig as C,searchForWorkspaceRoot as x,createSer
|
|
|
11
11
|
</head>
|
|
12
12
|
|
|
13
13
|
<body>
|
|
14
|
-
${
|
|
14
|
+
${i.lib?`<eo-dash style="height:100dvh;"/>
|
|
15
15
|
<script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/asWebComponent.js")}"><\/script>
|
|
16
16
|
`:` <div id="app"/>
|
|
17
17
|
<script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/render.js")}"><\/script>
|
|
18
18
|
`}
|
|
19
19
|
</body>
|
|
20
|
-
</html>`,D=C(async({mode:e,command:n})=>({base:
|
|
20
|
+
</html>`,D=C(async({mode:e,command:n})=>({base:i.base??"",cacheDir:R,plugins:[O({customElement:!1,template:{transformAssetUrls:A,compilerOptions:{isCustomElement:a=>!a.includes("v-")&&a.includes("-")}}}),T({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:J}],customLogger:m,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":g,"user:widgets":w},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**")]},port:i.port??3e3,open:i.open,fs:{allow:[x(process.cwd())]},host:i.host},root:c,optimizeDeps:e==="development"?{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs"],noDiscovery:!0}:{},publicDir:i.publicDir===!1?!1:L,build:{lib:i.lib&&n==="build"&&{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},outDir:f,emptyOutDir:!0,rollupOptions:i.lib&&n==="build"?{input:t.join(c,"core/client/asWebComponent.js")}:void 0,target:"esnext"}}));async function J(e){e.watcher.add([g,l,t.join(w,"**/*.vue")]);let n="";const a=m.info;return m.info=(o,r)=>{if(o.includes("core")){const d=o.split("/")[0].split(" ");d.pop();const p=d.join(" ")+" "+n.replace(s,"");return a(p,r)}return a(o,r)},e.watcher.on("change",async o=>{n=o,o===l&&e.hot.send({type:"full-reload",path:o})}),()=>{e.middlewares.use(async(o,r,d)=>{if(o.originalUrl==="/@fs/config.js"||o.originalUrl==="/config.js"){r.statusCode=200,r.setHeader("Content-Type","text/javascript"),u(l)&&await W(l).then(p=>{r.write(p)}),r.end();return}if(o.url?.endsWith(".html")){r.statusCode=200,r.setHeader("Content-Type","text/html");const p=await e.transformIndexHtml(o.url,y,o.originalUrl);r.end(p);return}d()})}}const M=async()=>{const e=await k(await D({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Y=async()=>{const e=async()=>{const n=await D({mode:"production",command:"build"});await F(n),u(l)&&await N(l,t.join(f,"config.js"),{recursive:!0}).catch(a=>{console.error(a)})};if(i.lib)await e();else{const n=t.join(c,"/index.html");await I(n,y).then(async()=>{await e(),await $(n).catch(()=>{console.error("failed to remove index.html")})})}};async function B(){(await S({root:s,base:i.base??"",preview:{port:isNaN(i.port)?8080:i.port,open:i.open,host:i.host},build:{outDir:f}})).printUrls()}const G=process.argv?.[2];(async()=>{switch(G){case"dev":await M();break;case"build":await Y();break;case"preview":await B();break;default:console.error("command not found");break}})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.0.0-alpha.2.
|
|
3
|
+
"version": "5.0.0-alpha.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,8 +32,6 @@
|
|
|
32
32
|
"build:lib": "npx eodash build --entryPoint core/client/eodash.js --lib --outDir dist/client",
|
|
33
33
|
"build:cli": "rollup -c",
|
|
34
34
|
"check": "vue-tsc --noEmit --skipLibCheck && eslint .",
|
|
35
|
-
"check:lint": "eslint .",
|
|
36
|
-
"check:types": "vue-tsc --noEmit --skipLibCheck",
|
|
37
35
|
"preview": "npx eodash preview",
|
|
38
36
|
"lint": "eslint . --fix",
|
|
39
37
|
"cypress": "cypress open --component ",
|
|
@@ -61,6 +59,7 @@
|
|
|
61
59
|
"sass": "^1.60.0",
|
|
62
60
|
"stac-js": "^0.0.9",
|
|
63
61
|
"stac-ts": "^1.0.3",
|
|
62
|
+
"v-calendar": "^3.1.2",
|
|
64
63
|
"vite": "^5.1.5",
|
|
65
64
|
"vite-plugin-vuetify": "^2.0.0",
|
|
66
65
|
"vue": "^3.2.0",
|
|
@@ -93,4 +92,4 @@
|
|
|
93
92
|
"bin": {
|
|
94
93
|
"eodash": "./dist/node/cli.js"
|
|
95
94
|
}
|
|
96
|
-
}
|
|
95
|
+
}
|
|
@@ -1,36 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<VCDatePicker v-model="currentDate" :masks="masks" :attributes="attributes">
|
|
3
|
+
<template #default="{ inputValue, inputEvents }">
|
|
4
|
+
<div class="flex rounded-lg border border-gray-300 dark:border-gray-600" style="margin: 2px;">
|
|
5
|
+
<input :value="inputValue" v-on="inputEvents" style="margin: 1px;"
|
|
6
|
+
class="flex-grow px-1 py-1 bg-white dark:bg-gray-700" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
</VCDatePicker>
|
|
10
|
+
<v-row align="center" justify="center" style="margin-top: 6px;">
|
|
11
|
+
<v-btn density="compact" v-tooltip:bottom="'Set date to latest available dataset'" @click="jumpDate">
|
|
12
|
+
<v-icon :icon="[mdiRayStartArrow]" />
|
|
13
|
+
</v-btn>
|
|
14
|
+
</v-row>
|
|
14
15
|
</template>
|
|
16
|
+
|
|
15
17
|
<script setup>
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
+
import { DatePicker as VCDatePicker } from 'v-calendar';
|
|
19
|
+
import 'v-calendar/style.css';
|
|
20
|
+
import { computed, ref, onMounted, watch, inject } from "vue";
|
|
21
|
+
import { eodashKey } from "@/utils/keys";
|
|
22
|
+
import { toAbsolute } from "stac-js/src/http.js";
|
|
23
|
+
import { storeToRefs } from "pinia";
|
|
24
|
+
import { useSTAcStore } from '@/store/stac';
|
|
25
|
+
import { datetime } from "@/store/States";
|
|
26
|
+
import { mdiRayStartArrow } from '@mdi/js';
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
function jumpDate() {
|
|
29
|
+
if (attributes.value && attributes.value.length > 0) {
|
|
30
|
+
// We have potentially multiple collections we need to iterate (currently only one)
|
|
31
|
+
let latestDateMS = 0;
|
|
32
|
+
attributes.value.forEach((coll) => {
|
|
33
|
+
if (coll?.dates) {
|
|
34
|
+
coll.dates.forEach((d) => {
|
|
35
|
+
// TODO: we need to handle time ranges and other options here
|
|
36
|
+
if (d instanceof Date && d.getTime() > latestDateMS) {
|
|
37
|
+
latestDateMS = d.getTime();
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
if (latestDateMS !== 0) {
|
|
43
|
+
currentDate.value = new Date(latestDateMS);
|
|
44
|
+
}
|
|
22
45
|
}
|
|
23
|
-
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const eodashConfig = /** @type {import("@/types").Eodash} */ inject(eodashKey);
|
|
49
|
+
|
|
50
|
+
const masks = ref({
|
|
51
|
+
input: 'YYYY-MM-DD',
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Attributes displayed on datepicker
|
|
56
|
+
* @type {import("vue").Ref<(import('v-calendar/dist/types/src/utils/attribute').AttributeConfig|undefined)[]>}
|
|
57
|
+
*/
|
|
58
|
+
const attributes = ref([]);
|
|
24
59
|
|
|
25
60
|
const currentDate = computed({
|
|
26
61
|
get() {
|
|
27
|
-
return
|
|
62
|
+
return new Date(datetime.value) ?? new Date()
|
|
28
63
|
},
|
|
29
64
|
/** @param {Date | string} updatedDate */
|
|
30
65
|
set(updatedDate) {
|
|
31
|
-
if (props.inline) {
|
|
32
|
-
updatedDate = new Date(updatedDate);
|
|
33
|
-
}
|
|
34
66
|
//@ts-expect-error
|
|
35
67
|
if (updatedDate instanceof Date && !isNaN(updatedDate)) {
|
|
36
68
|
datetime.value = new Date(updatedDate.getTime() - updatedDate.getTimezoneOffset() * 60000).toISOString()
|
|
@@ -39,19 +71,40 @@ const currentDate = computed({
|
|
|
39
71
|
}
|
|
40
72
|
}
|
|
41
73
|
});
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @type {import("vue").Ref<import("vuetify/components").VDatePicker | null>}
|
|
45
|
-
**/
|
|
46
|
-
const datePicker = ref(null)
|
|
47
|
-
/** @type {import("vue").Ref<string|undefined>} */
|
|
48
|
-
const width = ref()
|
|
49
|
-
/** @type {import("vue").Ref<string|undefined>} */
|
|
50
|
-
const height = ref()
|
|
74
|
+
/** @type {import("@/types").WebComponentProps["onMounted"]} */
|
|
51
75
|
onMounted(() => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
76
|
+
const { selectedStac } = storeToRefs(useSTAcStore());
|
|
77
|
+
watch(
|
|
78
|
+
[selectedStac],
|
|
79
|
+
async ([updatedStac]) => {
|
|
80
|
+
if (updatedStac) {
|
|
81
|
+
const parentCollUrl = toAbsolute(
|
|
82
|
+
`./${updatedStac.id}/collection.json`,
|
|
83
|
+
eodashConfig.stacEndpoint
|
|
84
|
+
);
|
|
85
|
+
const childCollUrl = toAbsolute(
|
|
86
|
+
updatedStac.links[1].href,
|
|
87
|
+
parentCollUrl
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const stacCollection = await (await fetch(childCollUrl)).json();
|
|
91
|
+
const dates = stacCollection.links
|
|
92
|
+
.filter(
|
|
93
|
+
(/** @type {{ rel: string; datetime: string; }} */ item) => (
|
|
94
|
+
item.rel === 'item' && 'datetime' in item
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
.map((/** @type {{ datetime: string; }} */ it) => new Date(it.datetime));
|
|
98
|
+
attributes.value = [
|
|
99
|
+
{
|
|
100
|
+
bar: true,
|
|
101
|
+
dates,
|
|
102
|
+
}
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{ immediate: true }
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
|
|
57
110
|
</script>
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
<script setup>
|
|
5
5
|
import DynamicWebComponent from "@/components/DynamicWebComponent.vue";
|
|
6
|
-
import { indicator } from "@/store/States";
|
|
7
6
|
|
|
8
7
|
const link = () => import("@eox/itemfilter");
|
|
9
8
|
|
|
@@ -15,22 +14,48 @@ const properties = {
|
|
|
15
14
|
keys: ["title", "themes"],
|
|
16
15
|
title: "Search",
|
|
17
16
|
type: "text",
|
|
18
|
-
expanded: true,
|
|
17
|
+
// expanded: true,
|
|
19
18
|
},
|
|
20
19
|
{
|
|
21
20
|
key: "themes",
|
|
22
|
-
title: "Theme",
|
|
21
|
+
title: "Theme Filter",
|
|
23
22
|
type: "multiselect",
|
|
24
|
-
featured: true,
|
|
23
|
+
// featured: true,
|
|
24
|
+
// expanded: true
|
|
25
25
|
},
|
|
26
26
|
],
|
|
27
27
|
aggregateResults: "themes",
|
|
28
28
|
enableHighlighting: true,
|
|
29
|
+
expandMultipleFilters: false,
|
|
30
|
+
expandMultipleResults: false,
|
|
29
31
|
},
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
/** @type {import("@/types").WebComponentProps["onMounted"]}*/
|
|
33
35
|
const onMounted = (el, store) => {
|
|
36
|
+
/** @type {any} */ (el).style.height = "100%";
|
|
37
|
+
|
|
38
|
+
const style = document.createElement("style");
|
|
39
|
+
style.innerHTML = `
|
|
40
|
+
section {
|
|
41
|
+
margin: 0 !important;
|
|
42
|
+
}
|
|
43
|
+
section button#filter-reset {
|
|
44
|
+
padding: 0 8px;
|
|
45
|
+
top: 8px;
|
|
46
|
+
right: 8px;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
el?.shadowRoot?.appendChild(style);
|
|
50
|
+
|
|
51
|
+
const filterstitle = document.createElement("div");
|
|
52
|
+
filterstitle.setAttribute("slot", "filterstitle");
|
|
53
|
+
filterstitle.innerHTML = `<h4 style="margin: 14px 8px">Indicators</h4>`;
|
|
54
|
+
/** @type {any} */ (el).appendChild(filterstitle);
|
|
55
|
+
const resultstitle = document.createElement("div");
|
|
56
|
+
resultstitle.setAttribute("slot", "resultstitle");
|
|
57
|
+
/** @type {any} */ (el).appendChild(resultstitle);
|
|
58
|
+
|
|
34
59
|
/**
|
|
35
60
|
* @typedef {object} Item
|
|
36
61
|
* @property {string} href
|
|
@@ -39,15 +64,6 @@ const onMounted = (el, store) => {
|
|
|
39
64
|
// Only list child elements in list
|
|
40
65
|
store.stac?.filter((item) => item.rel === "child")
|
|
41
66
|
);
|
|
42
|
-
// Check if selected indicator was already set in store
|
|
43
|
-
if (indicator && indicator.value !== "") {
|
|
44
|
-
const match = store.stac?.find((item) => item.id === indicator.value);
|
|
45
|
-
if (match) {
|
|
46
|
-
//@ts-expect-error
|
|
47
|
-
(el).selectedResult = match;
|
|
48
|
-
store.loadSelectedSTAC(match.href);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
67
|
/** @type {any} */ (el).config.onSelect =
|
|
52
68
|
/**
|
|
53
69
|
* @param {Item} item
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { x, W as _, X as h, _ as e, $ as n, a0 as u, a9 as f, a2 as t, a5 as d, a1 as c, a3 as g, d as m, a4 as y, F as b, a6 as w } from "./asWebComponent-Bvb3xkxI.js";
|
|
2
|
-
import { V as v } from "./VMain-BHYlmRic.js";
|
|
3
|
-
class k 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, r, s) {
|
|
27
|
-
r !== s && (this[a] = s), this.render();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
class A 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, r, s) {
|
|
56
|
-
r !== s && (this[a] = s), this.render();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
customElements.define("eox-layout", k);
|
|
60
|
-
customElements.define("eox-layout-item", A);
|
|
61
|
-
const C = ["gap"], $ = {
|
|
62
|
-
key: 0,
|
|
63
|
-
style: { "z-index": "0" },
|
|
64
|
-
x: "0",
|
|
65
|
-
y: "0",
|
|
66
|
-
h: "12",
|
|
67
|
-
w: "12"
|
|
68
|
-
}, L = ["x", "y", "h", "w"], T = {
|
|
69
|
-
__name: "DashboardLayout",
|
|
70
|
-
setup(p) {
|
|
71
|
-
const a = (
|
|
72
|
-
/** @type {import("@/types").Eodash} */
|
|
73
|
-
x(_)
|
|
74
|
-
), [r] = h([a.template?.background]), s = a.template?.widgets, i = h(s);
|
|
75
|
-
return (E, M) => (e(), n(v, null, {
|
|
76
|
-
default: u(() => [
|
|
77
|
-
f("eox-layout", {
|
|
78
|
-
gap: t(a).template.gap ?? 2
|
|
79
|
-
}, [
|
|
80
|
-
t(r).component ? (e(), d("eox-layout-item", $, [
|
|
81
|
-
(e(), n(c, { suspensible: "" }, {
|
|
82
|
-
default: u(() => [
|
|
83
|
-
(e(), n(
|
|
84
|
-
g(t(r).component),
|
|
85
|
-
m({ id: "bg-widget" }, t(r).props),
|
|
86
|
-
null,
|
|
87
|
-
16
|
|
88
|
-
/* FULL_PROPS */
|
|
89
|
-
))
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
/* STABLE */
|
|
93
|
-
}))
|
|
94
|
-
])) : y("v-if", !0),
|
|
95
|
-
(e(!0), d(
|
|
96
|
-
b,
|
|
97
|
-
null,
|
|
98
|
-
w(t(s), (l, o) => (e(), d(
|
|
99
|
-
b,
|
|
100
|
-
{ key: o },
|
|
101
|
-
[
|
|
102
|
-
t(i)[o].value.component ? (e(), d("eox-layout-item", {
|
|
103
|
-
key: 0,
|
|
104
|
-
style: { position: "relative", overflow: "visible", "z-index": "1", "border-radius": "0px", background: "rgb(var(--v-theme-surface))" },
|
|
105
|
-
x: l.layout.x,
|
|
106
|
-
y: l.layout.y,
|
|
107
|
-
h: l.layout.h,
|
|
108
|
-
w: l.layout.w
|
|
109
|
-
}, [
|
|
110
|
-
(e(), n(
|
|
111
|
-
c,
|
|
112
|
-
{ suspensible: "" },
|
|
113
|
-
{
|
|
114
|
-
default: u(() => [
|
|
115
|
-
(e(), n(
|
|
116
|
-
g(t(i)[o].value.component),
|
|
117
|
-
m({
|
|
118
|
-
key: t(i)[o].value.id,
|
|
119
|
-
ref_for: !0
|
|
120
|
-
}, t(i)[o].value.props),
|
|
121
|
-
null,
|
|
122
|
-
16
|
|
123
|
-
/* FULL_PROPS */
|
|
124
|
-
))
|
|
125
|
-
]),
|
|
126
|
-
_: 2
|
|
127
|
-
/* DYNAMIC */
|
|
128
|
-
},
|
|
129
|
-
1024
|
|
130
|
-
/* DYNAMIC_SLOTS */
|
|
131
|
-
))
|
|
132
|
-
], 8, L)) : y("v-if", !0)
|
|
133
|
-
],
|
|
134
|
-
64
|
|
135
|
-
/* STABLE_FRAGMENT */
|
|
136
|
-
))),
|
|
137
|
-
128
|
|
138
|
-
/* KEYED_FRAGMENT */
|
|
139
|
-
))
|
|
140
|
-
], 8, C)
|
|
141
|
-
]),
|
|
142
|
-
_: 1
|
|
143
|
-
/* STABLE */
|
|
144
|
-
}));
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
export {
|
|
148
|
-
T as default
|
|
149
|
-
};
|