@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { h, mergeProps, TransitionGroup, Transition } from 'vue';
|
|
2
|
+
import { p as propsFactory } from './asWebComponent-CIm1IGNl.js';
|
|
3
|
+
|
|
4
|
+
// Utilities
|
|
5
|
+
const makeTransitionProps = propsFactory({
|
|
6
|
+
transition: {
|
|
7
|
+
type: [Boolean, String, Object],
|
|
8
|
+
default: 'fade-transition',
|
|
9
|
+
validator: val => val !== true
|
|
10
|
+
}
|
|
11
|
+
}, 'transition');
|
|
12
|
+
const MaybeTransition = (props, _ref) => {
|
|
13
|
+
let {
|
|
14
|
+
slots
|
|
15
|
+
} = _ref;
|
|
16
|
+
const {
|
|
17
|
+
transition,
|
|
18
|
+
disabled,
|
|
19
|
+
group,
|
|
20
|
+
...rest
|
|
21
|
+
} = props;
|
|
22
|
+
const {
|
|
23
|
+
component = group ? TransitionGroup : Transition,
|
|
24
|
+
...customProps
|
|
25
|
+
} = typeof transition === 'object' ? transition : {};
|
|
26
|
+
return h(component, mergeProps(typeof transition === 'string' ? {
|
|
27
|
+
name: disabled ? '' : transition
|
|
28
|
+
} : customProps, typeof transition === 'string' ? {} : Object.fromEntries(Object.entries({
|
|
29
|
+
disabled,
|
|
30
|
+
group
|
|
31
|
+
}).filter(_ref2 => {
|
|
32
|
+
let [_, v] = _ref2;
|
|
33
|
+
return v !== undefined;
|
|
34
|
+
})), rest), slots);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { MaybeTransition as M, makeTransitionProps as m };
|
package/dist/node/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createLogger as
|
|
2
|
+
import{createLogger as S,defineConfig as w,searchForWorkspaceRoot as W,mergeConfig as F,createServer as O,preview as U,build as N}from"vite";import{readFileSync as y,existsSync as u}from"fs";import t from"path";import{Command as E}from"commander";import{fileURLToPath as I}from"url";import{readFile as T,writeFile as $,rm as L,cp as A}from"fs/promises";import H from"@vitejs/plugin-vue";import M,{transformAssetUrls as J}from"vite-plugin-vuetify";const h=new E("eodash"),c=b(),s=b(process.cwd());JSON.parse(y(t.join(s,"package.json"),"utf-8"));const j=JSON.parse(y(t.join(c,"package.json"),"utf-8"))??{},R=["commander","vite","@vitejs/plugin-vue","vite-plugin-vuetify","axios"],V=Object.keys(j?.dependencies).filter(e=>!R.includes(e));h.version(j.version,"-v, --version","output the current version"),h.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 o=await B(h.opts(),process.argv?.[2]),z=o.publicDir?t.resolve(s,o.publicDir):t.join(s,"./public"),f=t.join(s,"/src"),p=o.runtime?t.resolve(s,o.runtime):t.join(f,"./runtime.js"),m=o.entryPoint?t.resolve(s,o.entryPoint):t.join(f,"/main.js"),D=o.widgets?t.resolve(s,o.widgets):t.join(f,"widgets"),P=t.join(s,"/.eodash"),v=o.outDir?t.resolve(s,o.outDir):t.join(P,"/dist"),Y=o.cacheDir?t.resolve(s,o.cacheDir):t.join(P,"cache"),g=S(void 0,{prefix:"[eodash]"});async function B(e,a){let r=e.config?t.resolve(s,e.config):t.join(s,"eodash.config.js"),i={};return u(r)?i=await import(r).then(n=>n.default instanceof Function?n.default():n.default).catch(n=>{console.error(n)}):r=null,{base:e.base??i?.base,port:Number(e.port??i?.[a]?.port),host:e.host??i?.[a]?.host,open:e.open??i?.[a]?.open,cacheDir:e.cacheDir??i?.cacheDir,entryPoint:e.entryPoint??i?.entryPoint,outDir:e.outDir??i?.outDir,publicDir:e.publicDir??i?.publicDir,runtime:e.runtime??i?.runtime,widgets:e.widgets??i?.widgets,lib:e.lib??i?.lib,vite:i.vite}}function b(e=import.meta.dirname??t.dirname(I(import.meta.url))){if(e?.split("/").length)return u(t.resolve(e,"package.json"))?e:b(t.resolve(e,".."));throw new Error("no package root found from "+e)}const C=`
|
|
3
3
|
<!DOCTYPE html>
|
|
4
|
-
<html lang="en">
|
|
4
|
+
<html lang="en" style="overflow: hidden">
|
|
5
5
|
|
|
6
6
|
<head>
|
|
7
7
|
<meta charset="UTF-8" />
|
|
@@ -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
|
+
${o.lib?`<eo-dash style="height:100dvh;"/>
|
|
15
15
|
<script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/asWebComponent.js")}"><\/script>
|
|
16
|
-
`:` <div id="app"/>
|
|
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>`,
|
|
20
|
+
</html>`,x=w(async({mode:e,command:a})=>({base:o.base??"",cacheDir:Y,plugins:[H({template:{transformAssetUrls:J,compilerOptions:{isCustomElement:r=>!r.includes("v-")&&r.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:G}],customLogger:g,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":m,"user:widgets":D},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**"),m]},port:o.port??3e3,open:o.open,fs:{allow:[W(process.cwd())]},host:o.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel"],noDiscovery:!0}},publicDir:o.publicDir===!1?!1:z,build:{outDir:v,emptyOutDir:!0,target:"esnext",cssMinify:!0,...o.lib&&a==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:t.join(c,"core/client/asWebComponent.js"),external:r=>{const i=r.includes("vuetify")||r.endsWith(".css")||r.endsWith("styles"),n=V.some(l=>r.startsWith(l));return!i&&n}}}}})),k=w(async e=>o.vite?F(await x(e),o.vite):x(e));async function G(e){e.watcher.add([m,p,t.join(D,"**/*.vue")]);let a="";const r=g.info;return g.info=(i,n)=>{if(i.includes("core")){const l=i.split("/")[0].split(" ");l.pop();const d=l.join(" ")+" "+a.replace(s,"");return r(d,n)}return r(i,n)},e.watcher.on("change",async i=>{a=i,i===p&&e.ws.send({type:"full-reload",path:i})}),()=>{e.middlewares.use(async(i,n,l)=>{if(i.originalUrl==="/@fs/config.js"||i.originalUrl==="/config.js"){n.statusCode=200,n.setHeader("Content-Type","text/javascript"),u(p)&&await T(p).then(d=>{n.write(d)}),n.end();return}if(i.url?.endsWith(".html")){n.statusCode=200,n.setHeader("Content-Type","text/html");const d=await e.transformIndexHtml(i.url,C,i.originalUrl);n.end(d);return}l()})}}const K=async()=>{const e=await O(await k({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Q=async()=>{const e=async()=>{const a=await k({mode:"production",command:"build"});await N(a),u(p)&&await A(p,t.join(v,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(o.lib)await e();else{const a=t.join(c,"/index.html");await $(a,C).then(async()=>{await e(),await L(a).catch(()=>{console.error("failed to remove index.html")})})}};async function X(){(await U({root:s,base:o.base??"",preview:{port:isNaN(o.port)?8080:o.port,open:o.open,host:o.host},build:{outDir:v}})).printUrls()}const Z=process.argv?.[2];(async()=>{switch(Z){case"dev":await K();break;case"build":await Q();break;case"preview":await X();break;default:console.error("command not found");break}})();
|
package/dist/node/types.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export interface EodashConfig {
|
|
|
37
37
|
widgets?: string;
|
|
38
38
|
/** Builds eodash as a web component library */
|
|
39
39
|
lib?: boolean;
|
|
40
|
+
/** User Config that is merged to eodash Vite Config*/
|
|
41
|
+
vite?: Omit<import("vite").UserConfig, "root">;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* Helper function that provides intellisense without the need for JSDOC for
|
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.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"prepare": "rollup -c",
|
|
30
30
|
"prepack": "npm run build:lib",
|
|
31
31
|
"dev": "npx eodash dev --entryPoint core/client/eodash.js",
|
|
32
|
+
"dev:lib": "npx eodash dev --entryPoint core/client/eodash.js --lib",
|
|
32
33
|
"build": "npx eodash build --entryPoint core/client/eodash.js",
|
|
33
34
|
"build:lib": "npx eodash build --entryPoint core/client/eodash.js --lib --outDir dist/client",
|
|
34
35
|
"build:cli": "rollup -c",
|
|
@@ -55,43 +56,44 @@
|
|
|
55
56
|
"@eox/stacinfo": "^0.3.3",
|
|
56
57
|
"@eox/timecontrol": "^0.8.0",
|
|
57
58
|
"@mdi/js": "^7.4.47",
|
|
58
|
-
"@vitejs/plugin-vue": "^5.1.
|
|
59
|
+
"@vitejs/plugin-vue": "^5.1.3",
|
|
59
60
|
"animated-details": "gist:2912bb049fa906671807415eb0e87188",
|
|
60
|
-
"axios": "^1.7.
|
|
61
|
-
"axios-cache-interceptor": "^1.
|
|
61
|
+
"axios": "^1.7.7",
|
|
62
|
+
"axios-cache-interceptor": "^1.6.0",
|
|
62
63
|
"commander": "^12.1.0",
|
|
63
64
|
"core-js": "^3.38.1",
|
|
64
|
-
"loglevel": "^1.9.
|
|
65
|
+
"loglevel": "^1.9.2",
|
|
65
66
|
"pinia": "^2.2.2",
|
|
66
|
-
"sass": "^1.
|
|
67
|
+
"sass": "^1.78.0",
|
|
67
68
|
"stac-js": "^0.0.9",
|
|
68
69
|
"stac-ts": "^1.0.3",
|
|
69
|
-
"v-calendar": "
|
|
70
|
-
"vite": "^5.4.
|
|
70
|
+
"v-calendar": "3.0.0",
|
|
71
|
+
"vite": "^5.4.6",
|
|
71
72
|
"vite-plugin-vuetify": "^2.0.4",
|
|
72
|
-
"vue": "3.
|
|
73
|
-
"vuetify": "^3.7.
|
|
73
|
+
"vue": "^3.5.0",
|
|
74
|
+
"vuetify": "^3.7.2",
|
|
74
75
|
"webfontloader": "^1.6.28"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
|
-
"@babel/types": "^7.25.
|
|
78
|
+
"@babel/types": "^7.25.6",
|
|
78
79
|
"@eox/eslint-config": "^2.0.0",
|
|
79
80
|
"@pinia/testing": "^0.1.5",
|
|
80
|
-
"@types/node": "^22.5.
|
|
81
|
+
"@types/node": "^22.5.5",
|
|
81
82
|
"@types/openlayers": "^4.6.23",
|
|
82
83
|
"@types/webfontloader": "^1.6.38",
|
|
83
|
-
"cypress": "^13.
|
|
84
|
-
"eslint": "^9.
|
|
85
|
-
"eslint-plugin-vue": "^9.
|
|
84
|
+
"cypress": "^13.14.2",
|
|
85
|
+
"eslint": "^9.10.0",
|
|
86
|
+
"eslint-plugin-vue": "^9.28.0",
|
|
86
87
|
"prettier": "^3.3.3",
|
|
88
|
+
"rollup": "^4.21.3",
|
|
87
89
|
"terminate": "^2.8.0",
|
|
88
|
-
"typedoc": "^0.26.
|
|
89
|
-
"typedoc-plugin-markdown": "^4.2.
|
|
90
|
+
"typedoc": "^0.26.7",
|
|
91
|
+
"typedoc-plugin-markdown": "^4.2.7",
|
|
90
92
|
"typedoc-plugin-vue": "^1.2.0",
|
|
91
93
|
"typedoc-vitepress-theme": "^1.0.1",
|
|
92
|
-
"typescript": "^5.
|
|
94
|
+
"typescript": "^5.6.2",
|
|
93
95
|
"unplugin-fonts": "^1.1.1",
|
|
94
|
-
"vitepress": "^1.3.
|
|
96
|
+
"vitepress": "^1.3.4",
|
|
95
97
|
"vitest": "^1.6.0",
|
|
96
98
|
"vue-tsc": "2.0.22"
|
|
97
99
|
},
|
|
@@ -42,17 +42,10 @@
|
|
|
42
42
|
</v-btn>
|
|
43
43
|
</v-row>
|
|
44
44
|
</template>
|
|
45
|
-
<style>
|
|
46
|
-
.vc-day-content {
|
|
47
|
-
color: #5e5e5e;
|
|
48
|
-
font-weight: normal;
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
51
|
-
|
|
52
45
|
<script setup>
|
|
53
46
|
import { DatePicker as VCDatePicker } from "v-calendar";
|
|
54
47
|
import "v-calendar/style.css";
|
|
55
|
-
import { watch, reactive, ref, customRef } from "vue";
|
|
48
|
+
import { watch, reactive, ref, customRef, onMounted } from "vue";
|
|
56
49
|
import { storeToRefs } from "pinia";
|
|
57
50
|
import { useSTAcStore } from "@/store/stac";
|
|
58
51
|
import { datetime } from "@/store/States";
|
|
@@ -90,7 +83,7 @@ defineProps({
|
|
|
90
83
|
*
|
|
91
84
|
* @type {import("vue").Reactive<
|
|
92
85
|
* (
|
|
93
|
-
* | import("v-calendar/dist/types/src/utils/attribute").AttributeConfig
|
|
86
|
+
* | Partial<import("v-calendar/dist/types/src/utils/attribute").AttributeConfig>
|
|
94
87
|
* | undefined
|
|
95
88
|
* )[]
|
|
96
89
|
* >}
|
|
@@ -175,4 +168,22 @@ function jumpDate(reverse) {
|
|
|
175
168
|
: latestDateMS;
|
|
176
169
|
}
|
|
177
170
|
}
|
|
171
|
+
|
|
172
|
+
// fixes calendar dispalcement on lib mode
|
|
173
|
+
const transform = ref("");
|
|
174
|
+
onMounted(() => {
|
|
175
|
+
transform.value = document.querySelector("eo-dash")
|
|
176
|
+
? "translate3d(50px,-80px,0)"
|
|
177
|
+
: "translate3d(0px,-80px,0)";
|
|
178
|
+
});
|
|
178
179
|
</script>
|
|
180
|
+
<style>
|
|
181
|
+
.vc-day-content {
|
|
182
|
+
color: #5e5e5e;
|
|
183
|
+
font-weight: normal;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.vc-popover-content-wrapper {
|
|
187
|
+
transform: v-bind("transform") !important;
|
|
188
|
+
}
|
|
189
|
+
</style>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-app ref="vAppRef">
|
|
3
|
-
<Suspense>
|
|
4
|
-
<Dashboard :on-template-mount="setStylesFromHead" :config="config" />
|
|
5
|
-
|
|
6
|
-
<template #fallback>
|
|
7
|
-
<ErrorAlert @vue:mounted="setStylesFromHead()" v-model="error" />
|
|
8
|
-
</template>
|
|
9
|
-
</Suspense>
|
|
10
|
-
</v-app>
|
|
11
|
-
</template>
|
|
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";
|
|
18
|
-
|
|
19
|
-
defineProps({
|
|
20
|
-
config: {
|
|
21
|
-
type: String,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
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);
|
|
33
|
-
|
|
34
|
-
//@ts-expect-error Property 'provides' does not exist on type 'ComponentInternalInstance'
|
|
35
|
-
Object.assign(inst?.provides ?? {}, app._context.provides);
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @param {import("vue").Ref<
|
|
39
|
-
* HTMLElement | import("vue").ComponentPublicInstance
|
|
40
|
-
* >[]} [hiddenElements]
|
|
41
|
-
*/
|
|
42
|
-
function setStylesFromHead(hiddenElements) {
|
|
43
|
-
const eodashShadowRoot = vAppRef.value?.$el.getRootNode();
|
|
44
|
-
const styleSheet = new CSSStyleSheet();
|
|
45
|
-
const head = document.querySelector("head");
|
|
46
|
-
let stylesStr = "";
|
|
47
|
-
|
|
48
|
-
Array.from(head?.children ?? []).forEach((child) => {
|
|
49
|
-
if (child.getAttribute("type") === "text/css") {
|
|
50
|
-
stylesStr += `\n ${child.innerHTML}`;
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
child.tagName == "LINK" &&
|
|
56
|
-
child.getAttribute("rel")?.includes("stylesheet")
|
|
57
|
-
) {
|
|
58
|
-
eodashShadowRoot?.appendChild(child.cloneNode(true));
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
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 {
|
|
68
|
-
min-height: fit-content;
|
|
69
|
-
}`
|
|
70
|
-
: ""
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
styleSheet.replaceSync(stylesStr.replaceAll(":root", ":host"));
|
|
74
|
-
eodashShadowRoot?.adoptedStyleSheets.push(styleSheet);
|
|
75
|
-
|
|
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) => {
|
|
85
|
-
if (element.value) {
|
|
86
|
-
if (element.value instanceof HTMLElement) {
|
|
87
|
-
element.value.style.opacity = "1";
|
|
88
|
-
} else {
|
|
89
|
-
/** @type {HTMLElement} */
|
|
90
|
-
(element.value.$el).style.opacity = "1";
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const error = ref("");
|
|
98
|
-
onErrorCaptured((e, comp, info) => {
|
|
99
|
-
error.value = `
|
|
100
|
-
${e}.
|
|
101
|
-
component: ${comp?.$.type.name}.
|
|
102
|
-
info: ${info}.
|
|
103
|
-
`;
|
|
104
|
-
});
|
|
105
|
-
</script>
|
|
@@ -1,156 +0,0 @@
|
|
|
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-CHqY8A1z.js";
|
|
2
|
-
import { V as k } from "./VMain-Dknnyxts.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,57 +0,0 @@
|
|
|
1
|
-
import { bM as i, aC as m, r as p, Z as d, aR as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-CHqY8A1z.js";
|
|
2
|
-
const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
|
|
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, a;
|
|
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, a] = i(() => u().catch((n) => {
|
|
30
|
-
console.error(n);
|
|
31
|
-
})), t = await t, a(), t);
|
|
32
|
-
if (!customElements.get(e.tagName) && e.constructorProp) {
|
|
33
|
-
const n = l[e.constructorProp];
|
|
34
|
-
customElements.define(e.tagName, n);
|
|
35
|
-
}
|
|
36
|
-
const s = m(), r = p(null);
|
|
37
|
-
return d(() => {
|
|
38
|
-
e.onMounted?.(r.value, s);
|
|
39
|
-
}), f(() => {
|
|
40
|
-
e.onUnmounted?.(r.value, s);
|
|
41
|
-
}), (n, w) => (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
|
-
N as default
|
|
57
|
-
};
|