@eox/chart 2.0.0-alpha11 → 2.0.0-alpha12
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/dist/assets/main-6438d57a.js +25 -0
- package/dist/index.html +83 -0
- package/dist/interface.mjs +1 -1
- package/dist/interface.umd.js +1 -1
- package/package.json +1 -1
- package/dist/eox-chart.mjs +0 -18842
- package/dist/eox-chart.umd.js +0 -32
package/dist/index.html
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>EOxElements Chart</title>
|
|
6
|
+
<style>
|
|
7
|
+
* {
|
|
8
|
+
font-family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";
|
|
9
|
+
font-size: 0.95em;
|
|
10
|
+
}
|
|
11
|
+
label {
|
|
12
|
+
margin-top: 2.5px;
|
|
13
|
+
}
|
|
14
|
+
html,
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
html,
|
|
20
|
+
body,
|
|
21
|
+
.chart {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
.hidden {
|
|
26
|
+
visibility: hidden;
|
|
27
|
+
}
|
|
28
|
+
.loader {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 5px;
|
|
31
|
+
right: 30px;
|
|
32
|
+
width: 24px;
|
|
33
|
+
height: 24px;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
display: inline-block;
|
|
36
|
+
border-top: 4px solid #000;
|
|
37
|
+
border-right: 4px solid transparent;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
animation: rotation 1s linear infinite;
|
|
40
|
+
}
|
|
41
|
+
.loader::after {
|
|
42
|
+
content: "";
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 0;
|
|
46
|
+
top: 0;
|
|
47
|
+
width: 24px;
|
|
48
|
+
height: 24px;
|
|
49
|
+
border-radius: 50%;
|
|
50
|
+
border-left: 4px solid #004170;
|
|
51
|
+
border-bottom: 4px solid transparent;
|
|
52
|
+
animation: rotation 0.5s linear infinite reverse;
|
|
53
|
+
}
|
|
54
|
+
@keyframes rotation {
|
|
55
|
+
0% {
|
|
56
|
+
transform: rotate(0deg);
|
|
57
|
+
}
|
|
58
|
+
100% {
|
|
59
|
+
transform: rotate(360deg);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
#controls {
|
|
63
|
+
position: absolute;
|
|
64
|
+
width: 100%;
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: 5px;
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
}
|
|
69
|
+
.parsingError {
|
|
70
|
+
background-color: #ff6d6d;
|
|
71
|
+
}
|
|
72
|
+
#chart {
|
|
73
|
+
padding-top: 30px;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
76
|
+
<script type="module" crossorigin src="./assets/main-6438d57a.js"></script>
|
|
77
|
+
</head>
|
|
78
|
+
<body>
|
|
79
|
+
<div id="controls" class="controls" data-cy="controls"></div>
|
|
80
|
+
<canvas id="chart" class="chart" data-cy="chart"></canvas>
|
|
81
|
+
|
|
82
|
+
</body>
|
|
83
|
+
</html>
|
package/dist/interface.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
2
|
var x = (s, t, e) => t in s ? f(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
3
|
var h = (s, t, e) => (x(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
-
const b = "@eox/chart", w = "2.0.0-
|
|
4
|
+
const b = "@eox/chart", w = "2.0.0-alpha12", v = {
|
|
5
5
|
"chart.js": "^4.2.1",
|
|
6
6
|
"chartjs-adapter-luxon": "^1.3.1",
|
|
7
7
|
"chartjs-chart-error-bars": "^4.1.2"
|
package/dist/interface.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(n=typeof globalThis<"u"?globalThis:n||self,s(n.Interface={}))})(this,function(n){"use strict";var v=Object.defineProperty;var S=(n,s,o)=>s in n?v(n,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[s]=o;var y=(n,s,o)=>(S(n,typeof s!="symbol"?s+"":s,o),o);const g={name:"@eox/chart",version:"2.0.0-
|
|
1
|
+
(function(n,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(n=typeof globalThis<"u"?globalThis:n||self,s(n.Interface={}))})(this,function(n){"use strict";var v=Object.defineProperty;var S=(n,s,o)=>s in n?v(n,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[s]=o;var y=(n,s,o)=>(S(n,typeof s!="symbol"?s+"":s,o),o);const g={name:"@eox/chart",version:"2.0.0-alpha12",dependencies:{"chart.js":"^4.2.1","chartjs-adapter-luxon":"^1.3.1","chartjs-chart-error-bars":"^4.1.2"},devDependencies:{"@eox/eslint-config":"^1.0.0","@types/luxon":"^3.2.0","@typescript-eslint/eslint-plugin":"^5.50.0","@typescript-eslint/parser":"^5.50.0",cypress:"^12.6.0","cypress-vite":"^1.3.0","eslint-plugin-cypress":"^2.12.1","eslint-plugin-typescript":"^0.14.0",install:"^0.13.0",luxon:"^3.3.0",npm:"^9.6.3","p-retry":"^5.1.2","pre-commit":"^1.2.2","start-server-and-test":"^1.15.2",typescript:"^4.9.3",vite:"^4.0.0"},engines:{npm:">=8.0.0",node:">=18.0.0"},files:["dist","scripts","src","typings"],main:"./dist/interface.mjs",scripts:{start:"vite",build:"tsc && vite build --config vite.config.interface.ts && vite build --config vite.config.map.ts",watch:"node scripts/watch.mjs",preview:"vite preview",format:"prettier --write .",lint:"eslint --ext .js,.ts .","lint:fix":"eslint --ext .js,.ts . --fix",cypress:"start-server-and-test start 5173 'cypress open'",test:"start-server-and-test start 5173 'cypress run'"},"pre-commit":["format","lint:fix"]},d=new MessageChannel,i=d.port1;class b{constructor(e){y(this,"iframe");this.iframe=e}setData(e){i.postMessage({type:"setData",body:{data:e}})}setSignalsData(e){i.postMessage({type:"setSignalsData",body:{data:e}})}setSignalsEndpoint(e){i.postMessage({type:"setSignalsEndpoint",body:{options:e}})}setSignalsGeometry(e){i.postMessage({type:"setSignalsGeometry",body:{geometry:e}})}setOptions(e){i.postMessage({type:"setOptions",body:{options:e}})}getFoo(){return new Promise(e=>{const t=Date.now();i.onmessage=c=>{c.data.ts===t&&e(c.data.body)},i.postMessage({ts:t,type:"getFoo",body:"hello world"})})}}const w=r=>r?new Promise(e=>{var l,u;const t=document.createElement("iframe");if(t.style.cssText="width: 100%; height: 100%; display: block; margin: 0; border: none;",t.setAttribute("src",(l=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new URL("interface.umd.js",document.baseURI).href)!=null&&l.includes("localhost")?"http://localhost:5173/index.html":"about:blank"),t.setAttribute("id","EOxChart"),r==null||r.appendChild(t),!((u=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new URL("interface.umd.js",document.baseURI).href)!=null&&u.includes("localhost"))){const a=`https://www.unpkg.com/@eox/chart@${g.version}/dist`;fetch(`${a}/index.html`).then(p=>p.text()).then(p=>{var f,m,h;const x=p.replace("./assets/",`${a}/assets/`);(f=t.contentDocument)==null||f.open(),(m=t.contentDocument)==null||m.write(x),(h=t.contentDocument)==null||h.close()})}let c=!1;t.onload=()=>{var a;c||((a=t.contentWindow)==null||a.postMessage("init","*",[d.port2]),c=!0,e(new b(t)))}}):(console.error("no div selected"),null);n.createChart=w,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|