@backtest-kit/ui 14.0.0 → 14.1.0
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/build/modules/frontend/build/assets/{Article-CJq_3XCa.js → Article-CpU7DBcT.js} +1 -1
- package/build/modules/frontend/build/assets/{Background-xfzkOWU4.js → Background-DISIt7NA.js} +1 -1
- package/build/modules/frontend/build/assets/{IconPhoto-C03KsEBk.js → IconPhoto-Czod_jkW.js} +1 -1
- package/build/modules/frontend/build/assets/{KeyboardArrowLeft-bxIYZMcN.js → KeyboardArrowLeft-BUZ_pXI5.js} +1 -1
- package/build/modules/frontend/build/assets/{PictureAsPdfOutlined-BF2HVAsQ.js → PictureAsPdfOutlined-BgifaQ0L.js} +1 -1
- package/build/modules/frontend/build/assets/{Refresh-DdJstAqE.js → Refresh-3cixHjvW.js} +1 -1
- package/build/modules/frontend/build/assets/emitters-DmNf0ttF.js +1 -0
- package/build/modules/frontend/build/assets/{hasRouteMatch-Cp7g01zK.js → hasRouteMatch-CqJJG3sx.js} +1 -1
- package/build/modules/frontend/build/assets/{html2canvas-Dt1QJQhu.js → html2canvas-Ds2vwzb-.js} +1 -1
- package/build/modules/frontend/build/assets/{index-D4Et3yR7.js → index-B1plXuf6.js} +1 -1
- package/build/modules/frontend/build/assets/{index-Djrg7_-q.js → index-BI3k7b1T.js} +8 -8
- package/build/modules/frontend/build/assets/{index-DVm8eb9u.js → index-BMq2INDq.js} +1 -1
- package/build/modules/frontend/build/assets/{index-FvAL5guC.js → index-BYiuApxW.js} +1 -1
- package/build/modules/frontend/build/assets/{index-C2Y1SjOE.js → index-BYnSX2YX.js} +1 -1
- package/build/modules/frontend/build/assets/{index-CPb9eGRj.js → index-C8oIDQdm.js} +1 -1
- package/build/modules/frontend/build/assets/{index-C1E7RvS-.js → index-CA19hrNH.js} +1 -1
- package/build/modules/frontend/build/assets/{index-D9Uifv6Q.js → index-Cqt7co-7.js} +1 -1
- package/build/modules/frontend/build/assets/{index-Dv74783d.js → index-DJ7B8Och.js} +1 -1
- package/build/modules/frontend/build/assets/{index-D6o_GY5U.js → index-DwO4-4_F.js} +1 -1
- package/build/modules/frontend/build/assets/{index-qAqr3b-l.js → index-VxkdhxAi.js} +1 -1
- package/build/modules/frontend/build/assets/{index-YIWBv-S7.js → index-pxXO4P81.js} +1 -1
- package/build/modules/frontend/build/assets/{index-BNUzSs1I.js → index-ruSh1u75.js} +1 -1
- package/build/modules/frontend/build/assets/{index.es-DKkSWzSw.js → index.es-DPOJOdbj.js} +1 -1
- package/build/modules/frontend/build/assets/{markdownit-DMpqEulr.js → markdownit-C4X6Sysk.js} +1 -1
- package/build/modules/frontend/build/index.html +1 -1
- package/package.json +3 -3
- package/build/modules/frontend/build/assets/emitters-Bc8GPUEm.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c,f as v}from"./index-
|
|
1
|
+
import{b as c,f as v}from"./index-BI3k7b1T.js";const h=c(v("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}),"Article");export{h as A};
|
package/build/modules/frontend/build/assets/{Background-xfzkOWU4.js → Background-DISIt7NA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as n,S as o}from"./index-
|
|
1
|
+
import{f as n,S as o}from"./index-BI3k7b1T.js";const d=()=>n(o,{children:"\n body {\n background-color: #ddd !important;\n }\n "});export{d as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,i as t,B as r,V as s}from"./index-
|
|
1
|
+
import{f as e,i as t,B as r,V as s}from"./index-BI3k7b1T.js";const o=({className:o,symbol:i,style:a,sx:n})=>e(s,{children:async()=>{try{const s=(await t.symbolGlobalService.getSymbolMap())[i],l=(null==s?void 0:s.logo)||(null==s?void 0:s.icon),c=(null==s?void 0:s.color)||"#ccc";return e(r,{className:o,sx:{position:"relative",width:24,height:24,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:l?"transparent":c,...n},style:a,children:l?e("img",{loading:"lazy",crossOrigin:"anonymous",src:l,alt:i,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"},onError:e=>{const t=e.target,r=t.parentElement;r&&(r.style.background=c,t.style.display="none")}}):e(r,{sx:{width:"60%",height:"60%",borderRadius:"50%",backgroundColor:"rgba(255, 255, 255, 0.2)"}})})}catch(s){return e(r,{className:o,sx:{position:"relative",width:24,height:24,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"#ccc",...n},style:a,children:e(r,{sx:{width:"60%",height:"60%",borderRadius:"50%",backgroundColor:"rgba(255, 255, 255, 0.2)"}})})}}});export{o as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,f as r}from"./index-
|
|
1
|
+
import{b as o,f as r}from"./index-BI3k7b1T.js";const a=o(r("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");export{a as K};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as h,f as c}from"./index-
|
|
1
|
+
import{b as h,f as c}from"./index-BI3k7b1T.js";const v=h(c("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1zm-2-3h1v3h-1V9zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1v-2zm0-2h1v1h-1V9z"}),"PictureAsPdfOutlined");export{v as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bI as e,d as t,r as a,_ as s,f as i,bJ as n,j as o,bK as r,k as d,bL as m,g as u,u as p,s as x,b as c}from"./index-
|
|
1
|
+
import{bI as e,d as t,r as a,_ as s,f as i,bJ as n,j as o,bK as r,k as d,bL as m,g as u,u as p,s as x,b as c}from"./index-BI3k7b1T.js";const h=e(),b=["className","component","disableGutters","fixed","maxWidth","classes"],l=m(),f=h("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,t[`maxWidth${o(String(a.maxWidth))}`],a.fixed&&t.fixed,a.disableGutters&&t.disableGutters]}}),g=e=>r({props:e,name:"MuiContainer",defaultTheme:l});const W=function(e={}){const{createStyledComponent:r=f,useThemeProps:m=g,componentName:p="MuiContainer"}=e,x=r(({theme:e,ownerState:a})=>t({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,a)=>{const s=a,i=e.breakpoints.values[s];return 0!==i&&(t[e.breakpoints.up(s)]={maxWidth:`${i}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:a})=>t({},"xs"===a.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},a.maxWidth&&"xs"!==a.maxWidth&&{[e.breakpoints.up(a.maxWidth)]:{maxWidth:`${e.breakpoints.values[a.maxWidth]}${e.breakpoints.unit}`}}));return a.forwardRef(function(e,a){const r=m(e),{className:c,component:h="div",disableGutters:l=!1,fixed:f=!1,maxWidth:g="lg"}=r,W=s(r,b),k=t({},r,{component:h,disableGutters:l,fixed:f,maxWidth:g}),S=((e,t)=>{const{classes:a,fixed:s,disableGutters:i,maxWidth:n}=e,r={root:["root",n&&`maxWidth${o(String(n))}`,s&&"fixed",i&&"disableGutters"]};return d(r,e=>u(t,e),a)})(k,p);return i(x,t({as:h,ownerState:k,className:n(S.root,c),ref:a},W))})}({createStyledComponent:x("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,t[`maxWidth${o(String(a.maxWidth))}`],a.fixed&&t.fixed,a.disableGutters&&t.disableGutters]}}),useThemeProps:e=>p({props:e,name:"MuiContainer"})}),k=c(i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"Refresh");export{W as C,k as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a8 as o}from"./index-BI3k7b1T.js";const r=new o;export{r};
|
package/build/modules/frontend/build/assets/{hasRouteMatch-Cp7g01zK.js → hasRouteMatch-CqJJG3sx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as a,bG as e,bH as t}from"./index-
|
|
1
|
+
import{i as a,bG as e,bH as t}from"./index-BI3k7b1T.js";const i=(i,o=a.routerService.location.pathname)=>!!e(t.filter(({path:a})=>i.includes(a)),o);export{i as h};
|
package/build/modules/frontend/build/assets/{html2canvas-Dt1QJQhu.js → html2canvas-Ds2vwzb-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bM as e,bO as t}from"./index-
|
|
1
|
+
import{bM as e,bO as t}from"./index-BI3k7b1T.js";function r(e,t){for(var r=0;r<t.length;r++){const o=t[r];if("string"!=typeof o&&!Array.isArray(o))for(const t in o)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(o,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var o=t();const n=r({__proto__:null,default:e(o)},[o]);export{n as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as t,T as e,E as a,by as o,a2 as n,P as i,p as l,x as r,i as c,X as s,O as d,R as p,Y as m,Z as y,$ as u,a0 as h,a1 as x,W as w,b7 as f,w as b,aj as g}from"./index-
|
|
1
|
+
import{f as t,T as e,E as a,by as o,a2 as n,P as i,p as l,x as r,i as c,X as s,O as d,R as p,Y as m,Z as y,$ as u,a0 as h,a1 as x,W as w,b7 as f,w as b,aj as g}from"./index-BI3k7b1T.js";import{h as v}from"./hasRouteMatch-CqJJG3sx.js";import{r as R}from"./emitters-DmNf0ttF.js";import{I as S}from"./IconPhoto-Czod_jkW.js";import{P as F}from"./PictureAsPdfOutlined-BgifaQ0L.js";import{C as A,R as L}from"./Refresh-3cixHjvW.js";import{K as N}from"./KeyboardArrowLeft-BUZ_pXI5.js";const j=l()(t=>({root:{position:"relative",background:"#0001",overflow:"clip"},header:{position:"absolute",top:0,left:0,height:"48px",width:"calc(100% - 16px)",display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:"8px",marginRight:"8px"},container:{marginTop:"48px",width:"100%",background:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},content:{display:"flex",width:"100%",padding:t.spacing(1),paddingBottom:t.spacing(2),gap:10,flexDirection:"column"},avatar:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"128px",minWidth:"128px"}})),k=[{type:n.Text,columns:"6",name:"totalPnl",title:"Total PNL",compute:t=>null!==t.totalPnl?`${t.totalPnl.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"sharpeRatio",title:"Sharpe Ratio",compute:t=>null!==t.sharpeRatio?`${t.sharpeRatio.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"winRate",title:"Win Rate",compute:t=>null!==t.winRate?`${t.winRate.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"profitFactor",title:"Profit Factor",compute:t=>null!==t.profitFactor?t.profitFactor.toFixed(2):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"maxDrawdown",title:"Max Drawdown",compute:t=>null!==t.maxDrawdown?`${t.maxDrawdown.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"expectancy",title:"Expectancy",compute:t=>null!==t.expectancy?`${t.expectancy.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"sortinoRatio",title:"Sortino Ratio",compute:t=>null!==t.sortinoRatio?t.sortinoRatio.toFixed(3):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"calmarRatio",title:"Calmar Ratio",compute:t=>null!==t.calmarRatio?t.calmarRatio.toFixed(3):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"recoveryFactor",title:"Recovery Factor",compute:t=>null!==t.recoveryFactor?t.recoveryFactor.toFixed(3):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"totalTrades",title:"Trades",readonly:!0}],D=({row:n})=>{const{classes:l}=j();return t(i,{className:l.root,children:[t("div",{className:l.header,children:t(e,{variant:"h6",sx:{opacity:.8},children:`${a.bullet} ${n.symbol}`})}),t("div",{className:l.container,children:t("div",{className:l.content,children:[t("div",{className:l.avatar,children:t(S,{symbol:n.symbol,sx:{width:128,height:128}})}),t(o,{handler:()=>n,fields:k,sx:{mb:2}})]})})]})},T=[{type:p.Link,action:"back-action",label:t(N,{sx:{display:"block"}})},{type:p.Link,action:"back-action",label:"Dashboard"},{type:p.Link,action:"back-action",label:"Heatmap"},{type:p.Button,action:"download-pdf",label:"Download PDF",icon:F}],P=[{action:"download-json",label:"Download JSON",icon:()=>t(y,{icon:m,color:"#4caf50"})},{action:"download-markdown",label:"Download Markdown",icon:()=>t(y,{icon:u,color:"#4caf50"})},{action:"download-pdf",label:"Download PDF",icon:()=>t(y,{icon:h,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>t(y,{icon:L,color:"#4caf50"})}],C=[{id:"main",element:()=>{const[e,{loading:a,execute:o}]=r(async()=>(e=>{if(!e.length)return[{type:n.Typography,typoVariant:"h6",placeholder:"No data",sx:{textAlign:"center",opacity:.5,mt:4}}];const a=e.map(e=>({type:n.Group,desktopColumns:"4",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",child:{type:n.Component,element:()=>t(D,{row:e})}}));return a.length>2?a:[{type:n.Center,sx:t=>({[t.breakpoints.up("lg")]:{"@media (min-height: 900px)":{height:"calc(100dvh - 165px)","& > *":{transform:"translateY(-56px)"}}}}),fields:a}]})((await c.heatViewService.getStrategyHeatData()).symbols),{onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1)});s(()=>R.subscribe(o));return t(A,{children:[t(d,{items:T,actions:P,onAction:async t=>{"back-action"===t&&c.routerService.push("/"),"update-now"===t&&await R.next(),"download-markdown"===t&&await(async()=>{const t=await c.heatViewService.getStrategyHeatReport(),e=new Blob([t],{type:"text/plain"}),a=URL.createObjectURL(e);c.layoutService.downloadFile(a,`heat_${Date.now()}.md`)})(),"download-pdf"===t&&await(async()=>{const t=await c.heatViewService.getStrategyHeatReport();await b(t)})(),"download-json"===t&&await(async()=>{const t=await c.heatViewService.getStrategyHeatData(),e=JSON.stringify(t,null,2),a=new Blob([e],{type:"text/plain"}),o=URL.createObjectURL(a);c.layoutService.downloadFile(o,`heat_${Date.now()}.json`)})()}}),!e||a?t(x,{sx:{height:"calc(100dvh - 165px)"}}):t(f,{withScrollbar:!0,sx:{height:"calc(100dvh - 165px)"},hideOverflowX:!0,children:t(w,{fields:e})})]})},isActive:t=>v(["/heat"],t)}],$=({id:e})=>t(g,{history:c.routerService,onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1),routes:C,params:{id:e}});export{$ as HeatPage,$ as default};
|