@backtest-kit/ui 5.4.0 → 5.5.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.
@@ -1 +1 @@
1
- import{i as a,ar as t,as as e,at as o,n as s,f as i,q as n,Z as r,m as l,M as c,I as d,T as p,au as u,b as m,B as b,F as y,C as h,e as g,S,a as v,d as f,l as L,g as w,h as k,av as x,aw as A,X as C,j as N,D as $,ax as j,ay as R}from"./index-0XRhqJf5.js";import{I as F}from"./IconPhoto-DT7ZlDdO.js";import{C as B,R as E}from"./Refresh-BegYqvog.js";import{K as H}from"./KeyboardArrowLeft-orC8cXPm.js";import{B as M}from"./Background-DUSFAjAp.js";const _=(o,s=a.routerService.location.pathname)=>!!t(e.filter(({path:a})=>o.includes(a)),s),G="trade-gpt__groupHeader",I="trade-gpt__groupRoot",V="trade-gpt__symbolImage",O=l()({root:{[`& .${I}:hover .${G}`]:{opacity:"1 !important"}}});function z(a){return k(a,"#000000")>k(a,"#FFFFFF")}const D=[{type:r.Link,action:"back-action",label:i(H,{sx:{display:"block"}})},{type:r.Link,action:"back-action",label:"Main"},{type:r.Link,action:"back-action",label:"Status"}],U=[{action:"update-now",label:"Refresh",icon:()=>i(d,{icon:E,color:"#4caf50"})}],K=(t,e)=>({type:c.Group,className:I,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:c.Component,className:G,style:{transition:"opacity 500ms",opacity:.5},element:()=>i(S,{direction:"row",children:[i(h,{variant:"outlined",size:"small",color:"info",label:`${g.bullet} ${t}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),i(b,{flex:1})]})},{type:c.Group,fields:e.map(({symbol:t,label:e,to:o,color:s})=>((t,e,o,s)=>({type:c.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>i(w,{component:v,onClick:()=>{a.routerService.push(`/status/${e}`)},sx:{width:"100%",background:s,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${V}`]:{transition:"filter 500ms"},"&:hover":{background:()=>z(s)?f(s,.33):L(s,.33),[`& .${V}`]:{transition:"filter 500ms",filter:z(s)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:i(F,{className:V,symbol:t}),children:o})}))(t,o,e,s))}]}),P=[{type:r.Link,action:"back-action",label:i(H,{sx:{display:"block"}})},{type:r.Link,action:"back-action",label:"Main"},{type:r.Link,action:"back-action",label:"Status"},{type:r.Link,action:"back-action",compute:a=>a?`${String(a.symbol).toUpperCase()} (${a.strategyName})`:"Live"}],T=[{action:"download-action",label:"Download",icon:()=>i(d,{icon:$,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>i(d,{icon:E,color:"#4caf50"})}],W=new N,q=[{id:"status",element:({params:t})=>{const[e]=s(async()=>{const e=await a.statusViewService.getStatusMap();return x.get(e,t.id,null)},{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[t.id]}),[o,{loading:r,execute:l}]=s(async()=>await a.statusViewService.getStatusOne(t.id),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[t.id]}),c=A(async()=>{if(!o)return;const t=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),e=URL.createObjectURL(t);a.layoutService.downloadFile(e,`status_${Date.now()}.json`)});C(()=>W.subscribe(l));return i(B,{children:[i(n,{items:P,actions:T,payload:e,onAction:async t=>{"back-action"===t&&((async()=>{1!==(await a.statusViewService.getStatusList()).length?a.routerService.push("/status"):a.routerService.push("/")})(),a.routerService.push("/")),"update-now"===t&&await W.next(),"download-action"===t&&await c()}}),r?i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):o?i(y,{children:[i(m,{handler:o,fields:j}),i(b,{paddingBottom:"24px"})]}):i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"No pending signal"})}),i(M,{})]})},isActive:a=>_(["/status/:id"],a),isAvailable:()=>!1},{id:"main",element:()=>{const{classes:t}=O(),{reloadTrigger:e,doReload:r}=o();s(async()=>{const t=await a.statusViewService.getStatusList();if(1===t.length){const[{id:e}]=t;a.routerService.push(`/status/${e}`)}},{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[e]});const[l,{loading:d}]=s(async()=>await(async()=>{const[t,e]=await Promise.all([a.symbolGlobalService.getSymbolMap(),a.statusViewService.getStatusList()]),o={};e.forEach(a=>{const e=t[a.symbol],s=a.strategyName;o[s]||(o[s]=[]),o[s].push({symbol:a.symbol,label:(null==e?void 0:e.displayName)||a.symbol,color:(null==e?void 0:e.color)||"#ccc",to:a.id})});const s=Object.entries(o).sort(([,a],[,t])=>t.length-a.length),i=[],n=[],r=[];return s.forEach(([a,t],e)=>{const o=K(a,t);e%2==0?i.push(o):n.push(o),r.push(o)}),[{type:c.Group,columns:"6",className:"tabletLeftColumn",phoneHidden:!0,desktopHidden:!0,fields:i},{type:c.Group,columns:"6",className:"tabletRightColumn",phoneHidden:!0,desktopHidden:!0,fields:n},{type:c.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:r}]})(),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[e]});return i(B,{children:[i(n,{items:D,actions:U,onAction:t=>{"back-action"===t&&a.routerService.push("/"),"update-now"===t&&r()}}),d||!l?i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):l.length?i(y,{children:[i(m,{className:t.root,fields:l},e),i(b,{paddingBottom:"24px"})]}):i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"No pending signals"})})]})},isActive:a=>_(["/status"],a),isAvailable:()=>!1}],J=({id:t})=>i(R,{history:a.routerService,onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),routes:q,params:{id:t}});export{J as StatusPage,J as default};
1
+ import{i as a,ar as t,as as e,at as o,n as s,f as i,q as n,Z as r,m as l,M as c,I as d,T as p,au as u,b as m,B as b,F as y,C as h,e as g,S,a as v,d as f,l as L,g as w,h as k,av as x,aw as A,X as C,j as N,D as $,ax as j,ay as R}from"./index-CZCYDmpG.js";import{I as F}from"./IconPhoto-C9wHHM_Y.js";import{C as B,R as E}from"./Refresh-BPgxPLp0.js";import{K as H}from"./KeyboardArrowLeft-CxKFPg-8.js";import{B as M}from"./Background-CXtJK64T.js";const _=(o,s=a.routerService.location.pathname)=>!!t(e.filter(({path:a})=>o.includes(a)),s),G="trade-gpt__groupHeader",I="trade-gpt__groupRoot",V="trade-gpt__symbolImage",O=l()({root:{[`& .${I}:hover .${G}`]:{opacity:"1 !important"}}});function z(a){return k(a,"#000000")>k(a,"#FFFFFF")}const D=[{type:r.Link,action:"back-action",label:i(H,{sx:{display:"block"}})},{type:r.Link,action:"back-action",label:"Main"},{type:r.Link,action:"back-action",label:"Status"}],U=[{action:"update-now",label:"Refresh",icon:()=>i(d,{icon:E,color:"#4caf50"})}],K=(t,e)=>({type:c.Group,className:I,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:c.Component,className:G,style:{transition:"opacity 500ms",opacity:.5},element:()=>i(S,{direction:"row",children:[i(h,{variant:"outlined",size:"small",color:"info",label:`${g.bullet} ${t}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),i(b,{flex:1})]})},{type:c.Group,fields:e.map(({symbol:t,label:e,to:o,color:s})=>((t,e,o,s)=>({type:c.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>i(w,{component:v,onClick:()=>{a.routerService.push(`/status/${e}`)},sx:{width:"100%",background:s,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${V}`]:{transition:"filter 500ms"},"&:hover":{background:()=>z(s)?f(s,.33):L(s,.33),[`& .${V}`]:{transition:"filter 500ms",filter:z(s)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:i(F,{className:V,symbol:t}),children:o})}))(t,o,e,s))}]}),P=[{type:r.Link,action:"back-action",label:i(H,{sx:{display:"block"}})},{type:r.Link,action:"back-action",label:"Main"},{type:r.Link,action:"back-action",label:"Status"},{type:r.Link,action:"back-action",compute:a=>a?`${String(a.symbol).toUpperCase()} (${a.strategyName})`:"Live"}],T=[{action:"download-action",label:"Download",icon:()=>i(d,{icon:$,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>i(d,{icon:E,color:"#4caf50"})}],W=new N,q=[{id:"status",element:({params:t})=>{const[e]=s(async()=>{const e=await a.statusViewService.getStatusMap();return x.get(e,t.id,null)},{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[t.id]}),[o,{loading:r,execute:l}]=s(async()=>await a.statusViewService.getStatusOne(t.id),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[t.id]}),c=A(async()=>{if(!o)return;const t=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),e=URL.createObjectURL(t);a.layoutService.downloadFile(e,`status_${Date.now()}.json`)});C(()=>W.subscribe(l));return i(B,{children:[i(n,{items:P,actions:T,payload:e,onAction:async t=>{"back-action"===t&&((async()=>{1!==(await a.statusViewService.getStatusList()).length?a.routerService.push("/status"):a.routerService.push("/")})(),a.routerService.push("/")),"update-now"===t&&await W.next(),"download-action"===t&&await c()}}),r?i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):o?i(y,{children:[i(m,{handler:o,fields:j}),i(b,{paddingBottom:"24px"})]}):i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"No pending signal"})}),i(M,{})]})},isActive:a=>_(["/status/:id"],a),isAvailable:()=>!1},{id:"main",element:()=>{const{classes:t}=O(),{reloadTrigger:e,doReload:r}=o();s(async()=>{const t=await a.statusViewService.getStatusList();if(1===t.length){const[{id:e}]=t;a.routerService.push(`/status/${e}`)}},{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[e]});const[l,{loading:d}]=s(async()=>await(async()=>{const[t,e]=await Promise.all([a.symbolGlobalService.getSymbolMap(),a.statusViewService.getStatusList()]),o={};e.forEach(a=>{const e=t[a.symbol],s=a.strategyName;o[s]||(o[s]=[]),o[s].push({symbol:a.symbol,label:(null==e?void 0:e.displayName)||a.symbol,color:(null==e?void 0:e.color)||"#ccc",to:a.id})});const s=Object.entries(o).sort(([,a],[,t])=>t.length-a.length),i=[],n=[],r=[];return s.forEach(([a,t],e)=>{const o=K(a,t);e%2==0?i.push(o):n.push(o),r.push(o)}),[{type:c.Group,columns:"6",className:"tabletLeftColumn",phoneHidden:!0,desktopHidden:!0,fields:i},{type:c.Group,columns:"6",className:"tabletRightColumn",phoneHidden:!0,desktopHidden:!0,fields:n},{type:c.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:r}]})(),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[e]});return i(B,{children:[i(n,{items:D,actions:U,onAction:t=>{"back-action"===t&&a.routerService.push("/"),"update-now"===t&&r()}}),d||!l?i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):l.length?i(y,{children:[i(m,{className:t.root,fields:l},e),i(b,{paddingBottom:"24px"})]}):i(u,{children:i(p,{variant:"h6",sx:{opacity:.5},children:"No pending signals"})})]})},isActive:a=>_(["/status"],a),isAvailable:()=>!1}],J=({id:t})=>i(R,{history:a.routerService,onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),routes:q,params:{id:t}});export{J as StatusPage,J as default};
@@ -1 +1 @@
1
- import{c as a,f as e,an as t,B as o,S as r,a8 as n,T as i,G as c,C as s,F as l,a9 as d,P as h,ac as p,ap as u,aq as w,a1 as v,j as b,i as f,a2 as x,z as g,a7 as y,q as m,Z as S,ao as L,D as k,I as z}from"./index-0XRhqJf5.js";import{C as H,R as j}from"./Refresh-BegYqvog.js";import{K as C}from"./KeyboardArrowLeft-orC8cXPm.js";const A=a(e("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"),R=a(e("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"}),"BugReport"),M=a(e("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),B=a=>{const t={color:"white",fontSize:28};switch(a.type){case"debug":return e(R,{sx:t});case"info":return e(u,{sx:t});case"warn":return e(p,{sx:t});default:return e(A,{sx:t})}},D=t.virtualize(({data:a,sx:t})=>{const p=(a=>{switch(a.type){case"debug":default:return"#9E9E9E";case"info":return"#2196F3";case"warn":return"#FF9800";case"log":return"#4CAF50"}})(a);return e(h,{variant:"outlined",sx:{display:"flex",alignItems:"stretch",justifyContent:"stretch",...t},children:e(o,{sx:{flex:1,position:"relative",overflow:"hidden",height:"100%",width:"100%",borderRadius:"12px"},children:[e(r,{direction:"row",spacing:2,sx:{p:2},children:[e(n,{sx:{width:56,height:56,background:p},children:B(a)}),e(r,{flex:1,spacing:1,children:[e(r,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e(i,{variant:"h6",sx:{fontWeight:600,wordBreak:"break-all"},children:a.topic}),e(i,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",ml:2},children:c(a.createdAt).format("HH:mm DD/MM/YYYY")})]}),e(r,{direction:"row",spacing:1,flexWrap:"wrap",children:e(s,{size:"small",label:a.type.toUpperCase(),sx:{background:p,color:"white",fontWeight:500}})}),a.args.length>0&&e(l,{children:[e(d,{sx:{my:1}}),e(o,{component:"pre",sx:{m:0,fontSize:"0.75rem",whiteSpace:"pre-wrap",wordBreak:"break-all",color:"text.secondary"},children:JSON.stringify(1===a.args.length?a.args[0]:a.args,null,2)})]})]})]}),e(o,{sx:{position:"absolute",top:0,left:0,bottom:0,width:6,zIndex:1,background:p}})]})})}),E=[{action:"download-action",label:"Download",icon:()=>e(z,{icon:k,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh manually",icon:()=>e(z,{icon:j,color:"#4caf50"})}],F=[{type:S.Link,action:"back-action",label:e(C,{sx:{display:"block"}})},{type:S.Link,action:"back-action",label:"Main"},{type:S.Link,action:"back-action",label:"Logs"},{type:S.Button,icon:M,action:"search-action",label:"Search"}],I=new b,V=()=>{const[a,o]=w(""),{data:r,hasMore:n,loading:i,onSkip:c}=v({handler:async(e,t)=>{const o=await f.logViewService.getList(),r=x(e,t);for(const n of o)if(new RegExp(a.current,"i").test(n.topic)&&r([n]).done)break;return r().rows},onLoadStart:()=>f.layoutService.setAppbarLoader(!0),onLoadEnd:()=>f.layoutService.setAppbarLoader(!1),reloadSubject:I}),s=g(r),{execute:l}=y(async()=>{const a=new Blob([JSON.stringify(s.current,null,2)],{type:"application/json"}),e=URL.createObjectURL(a);f.layoutService.downloadFile(e,`logs_${Date.now()}.json`)},{onLoadStart:()=>f.layoutService.setAppbarLoader(!0),onLoadEnd:()=>f.layoutService.setAppbarLoader(!1)});return e(H,{children:[e(m,{items:F,actions:E,onAction:async a=>{"back-action"===a&&f.routerService.push("/"),"download-action"===a&&l(),"update-now"===a&&(o(""),await I.next()),"search-action"===a&&(async()=>{const a=await f.layoutService.prompt("Search keyword");if(a)return o(a),void I.next();o(""),I.next()})()}}),e(t,{sx:{height:"calc(100vh - 155px)"},withScrollbar:!0,minHeight:72,loading:i,onDataRequest:c,bufferSize:L,hasMore:n,children:r.map(a=>e(D,{data:a,sx:{mb:1}},a.id))})]})};export{V as LogPage,V as default};
1
+ import{c as a,f as e,an as t,B as o,S as r,a8 as n,T as i,G as c,C as s,F as l,a9 as d,P as h,ac as p,ap as u,aq as w,a1 as v,j as b,i as f,a2 as x,z as g,a7 as y,q as m,Z as S,ao as L,D as k,I as z}from"./index-CZCYDmpG.js";import{C as H,R as j}from"./Refresh-BPgxPLp0.js";import{K as C}from"./KeyboardArrowLeft-CxKFPg-8.js";const A=a(e("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"),R=a(e("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"}),"BugReport"),M=a(e("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),B=a=>{const t={color:"white",fontSize:28};switch(a.type){case"debug":return e(R,{sx:t});case"info":return e(u,{sx:t});case"warn":return e(p,{sx:t});default:return e(A,{sx:t})}},D=t.virtualize(({data:a,sx:t})=>{const p=(a=>{switch(a.type){case"debug":default:return"#9E9E9E";case"info":return"#2196F3";case"warn":return"#FF9800";case"log":return"#4CAF50"}})(a);return e(h,{variant:"outlined",sx:{display:"flex",alignItems:"stretch",justifyContent:"stretch",...t},children:e(o,{sx:{flex:1,position:"relative",overflow:"hidden",height:"100%",width:"100%",borderRadius:"12px"},children:[e(r,{direction:"row",spacing:2,sx:{p:2},children:[e(n,{sx:{width:56,height:56,background:p},children:B(a)}),e(r,{flex:1,spacing:1,children:[e(r,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e(i,{variant:"h6",sx:{fontWeight:600,wordBreak:"break-all"},children:a.topic}),e(i,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",ml:2},children:c(a.createdAt).format("HH:mm DD/MM/YYYY")})]}),e(r,{direction:"row",spacing:1,flexWrap:"wrap",children:e(s,{size:"small",label:a.type.toUpperCase(),sx:{background:p,color:"white",fontWeight:500}})}),a.args.length>0&&e(l,{children:[e(d,{sx:{my:1}}),e(o,{component:"pre",sx:{m:0,fontSize:"0.75rem",whiteSpace:"pre-wrap",wordBreak:"break-all",color:"text.secondary"},children:JSON.stringify(1===a.args.length?a.args[0]:a.args,null,2)})]})]})]}),e(o,{sx:{position:"absolute",top:0,left:0,bottom:0,width:6,zIndex:1,background:p}})]})})}),E=[{action:"download-action",label:"Download",icon:()=>e(z,{icon:k,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh manually",icon:()=>e(z,{icon:j,color:"#4caf50"})}],F=[{type:S.Link,action:"back-action",label:e(C,{sx:{display:"block"}})},{type:S.Link,action:"back-action",label:"Main"},{type:S.Link,action:"back-action",label:"Logs"},{type:S.Button,icon:M,action:"search-action",label:"Search"}],I=new b,V=()=>{const[a,o]=w(""),{data:r,hasMore:n,loading:i,onSkip:c}=v({handler:async(e,t)=>{const o=await f.logViewService.getList(),r=x(e,t);for(const n of o)if(new RegExp(a.current,"i").test(n.topic)&&r([n]).done)break;return r().rows},onLoadStart:()=>f.layoutService.setAppbarLoader(!0),onLoadEnd:()=>f.layoutService.setAppbarLoader(!1),reloadSubject:I}),s=g(r),{execute:l}=y(async()=>{const a=new Blob([JSON.stringify(s.current,null,2)],{type:"application/json"}),e=URL.createObjectURL(a);f.layoutService.downloadFile(e,`logs_${Date.now()}.json`)},{onLoadStart:()=>f.layoutService.setAppbarLoader(!0),onLoadEnd:()=>f.layoutService.setAppbarLoader(!1)});return e(H,{children:[e(m,{items:F,actions:E,onAction:async a=>{"back-action"===a&&f.routerService.push("/"),"download-action"===a&&l(),"update-now"===a&&(o(""),await I.next()),"search-action"===a&&(async()=>{const a=await f.layoutService.prompt("Search keyword");if(a)return o(a),void I.next();o(""),I.next()})()}}),e(t,{sx:{height:"calc(100vh - 155px)"},withScrollbar:!0,minHeight:72,loading:i,onDataRequest:c,bufferSize:L,hasMore:n,children:r.map(a=>e(D,{data:a,sx:{mb:1}},a.id))})]})};export{V as LogPage,V as default};
@@ -1 +1 @@
1
- import{aL as e,aM as t}from"./index-0XRhqJf5.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 m};
1
+ import{aL as e,aM as t}from"./index-CZCYDmpG.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 m};
@@ -140,7 +140,7 @@
140
140
  href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
141
141
  rel="stylesheet"
142
142
  />
143
- <script type="module" crossorigin src="/assets/index-0XRhqJf5.js"></script>
143
+ <script type="module" crossorigin src="/assets/index-CZCYDmpG.js"></script>
144
144
  <link rel="stylesheet" crossorigin href="/assets/index-DrRm3Jka.css">
145
145
  </head>
146
146
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backtest-kit/ui",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Full-stack UI framework for visualizing cryptocurrency trading signals, backtests, and real-time market data. React dashboard with candlestick charts, signal tracking, and risk analysis.",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
@@ -92,11 +92,11 @@
92
92
  "ccxt": "4.5.24",
93
93
  "touch": "3.1.1",
94
94
  "worker-testbed": "1.0.12",
95
- "backtest-kit": "5.4.0",
95
+ "backtest-kit": "5.5.0",
96
96
  "markdown-it": "14.1.0"
97
97
  },
98
98
  "peerDependencies": {
99
- "backtest-kit": "^5.4.0",
99
+ "backtest-kit": "^5.5.0",
100
100
  "markdown-it": "^14.1.0",
101
101
  "ccxt": "^4.5.24",
102
102
  "typescript": "^5.0.0"