@backtest-kit/ui 5.5.2 → 5.6.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/index.cjs +1055 -48
- package/build/index.mjs +1056 -49
- package/build/modules/frontend/build/assets/{Background-sfxyUbnl.js → Background-BGXaqCCj.js} +1 -1
- package/build/modules/frontend/build/assets/{IconPhoto-B37p3oma.js → IconPhoto-NqvLnXp7.js} +1 -1
- package/build/modules/frontend/build/assets/{KeyboardArrowLeft-BPw3Kmsa.js → KeyboardArrowLeft-Brhl60Pa.js} +1 -1
- package/build/modules/frontend/build/assets/{Refresh-Bc99NRlg.js → Refresh-BGkaUatF.js} +1 -1
- package/build/modules/frontend/build/assets/hasRouteMatch-7UKYuS0a.js +1 -0
- package/build/modules/frontend/build/assets/html2canvas-D-Nv0RTX.js +1 -0
- package/build/modules/frontend/build/assets/{index-DF_GlUhQ.js → index-4xZ56Pw3.js} +9 -9
- package/build/modules/frontend/build/assets/index-9iaIzgTc.js +1331 -0
- package/build/modules/frontend/build/assets/{index-DDdv_hbu.js → index-BDV9EkEY.js} +1 -1
- package/build/modules/frontend/build/assets/{index-B5N6nFu7.js → index-BYCwoppH.js} +1 -1
- package/build/modules/frontend/build/assets/{index-CsOKHAMs.js → index-CbQBf22x.js} +1 -1
- package/build/modules/frontend/build/assets/index-CywcKDZi.js +1 -0
- package/build/modules/frontend/build/assets/index-D3HRM1Jy.js +1 -0
- package/build/modules/frontend/build/assets/{index-BAiSnt2X.js → index-DG7b0pa9.js} +1 -1
- package/build/modules/frontend/build/assets/index.es-BFfvVHkP.js +16 -0
- package/build/modules/frontend/build/assets/{markdownit-D_RkE_Cw.js → markdownit-GU6B-6e7.js} +1 -1
- package/build/modules/frontend/build/assets/purify.es-DpMHVkxQ.js +2 -0
- package/build/modules/frontend/build/index.html +1 -1
- package/package.json +3 -3
- package/types.d.ts +80 -0
- package/build/modules/frontend/build/assets/index-B94OJ088.js +0 -1
- package/build/modules/frontend/build/assets/index-BB9WGslo.js +0 -1
package/types.d.ts
CHANGED
|
@@ -115,6 +115,32 @@ declare class StatusMockService {
|
|
|
115
115
|
}>;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
declare class MarkdownMockService {
|
|
119
|
+
private readonly loggerService;
|
|
120
|
+
getBacktestData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
121
|
+
getBacktestReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
122
|
+
getLiveData: (symbol: string, strategyName: string, exchangeName: string) => Promise<unknown>;
|
|
123
|
+
getLiveReport: (symbol: string, strategyName: string, exchangeName: string) => Promise<string>;
|
|
124
|
+
getBreakevenData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
125
|
+
getBreakevenReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
126
|
+
getRiskData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
127
|
+
getRiskReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
128
|
+
getPartialData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
129
|
+
getPartialReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
130
|
+
getHighestProfitData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
131
|
+
getHighestProfitReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
132
|
+
getScheduleData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
133
|
+
getScheduleReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
134
|
+
getPerformanceData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
135
|
+
getPerformanceReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
136
|
+
getSyncData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
137
|
+
getSyncReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
138
|
+
getHeatData: (strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
139
|
+
getHeatReport: (strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
140
|
+
getWalkerData: (symbol: string, walkerName: string) => Promise<unknown>;
|
|
141
|
+
getWalkerReport: (symbol: string, walkerName: string) => Promise<string>;
|
|
142
|
+
}
|
|
143
|
+
|
|
118
144
|
declare class NotificationViewService {
|
|
119
145
|
private readonly loggerService;
|
|
120
146
|
private readonly notificationMockService;
|
|
@@ -182,6 +208,33 @@ declare class LogViewService {
|
|
|
182
208
|
protected init: (() => Promise<void>) & functools_kit.ISingleshotClearable;
|
|
183
209
|
}
|
|
184
210
|
|
|
211
|
+
declare class MarkdownViewService {
|
|
212
|
+
private readonly loggerService;
|
|
213
|
+
private readonly markdownMockService;
|
|
214
|
+
getBacktestData: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<unknown>;
|
|
215
|
+
getBacktestReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string) => Promise<string>;
|
|
216
|
+
getLiveData: (symbol: string, strategyName: string, exchangeName: string) => Promise<unknown>;
|
|
217
|
+
getLiveReport: (symbol: string, strategyName: string, exchangeName: string) => Promise<string>;
|
|
218
|
+
getBreakevenData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
219
|
+
getBreakevenReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
220
|
+
getRiskData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
221
|
+
getRiskReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
222
|
+
getPartialData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
223
|
+
getPartialReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
224
|
+
getHighestProfitData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
225
|
+
getHighestProfitReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
226
|
+
getScheduleData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
227
|
+
getScheduleReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
228
|
+
getPerformanceData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
229
|
+
getPerformanceReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
230
|
+
getSyncData: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
231
|
+
getSyncReport: (symbol: string, strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
232
|
+
getHeatData: (strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<unknown>;
|
|
233
|
+
getHeatReport: (strategyName: string, exchangeName: string, frameName: string, backtest?: boolean) => Promise<string>;
|
|
234
|
+
getWalkerData: (symbol: string, walkerName: string) => Promise<unknown>;
|
|
235
|
+
getWalkerReport: (symbol: string, walkerName: string) => Promise<string>;
|
|
236
|
+
}
|
|
237
|
+
|
|
185
238
|
declare class SymbolConnectionService {
|
|
186
239
|
private readonly loggerService;
|
|
187
240
|
getSymbolList: (() => Promise<{
|
|
@@ -231,18 +284,45 @@ declare class PriceConnectionService {
|
|
|
231
284
|
getSignalPendingPrice: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<number>;
|
|
232
285
|
}
|
|
233
286
|
|
|
287
|
+
declare class LiveMetaService {
|
|
288
|
+
private readonly loggerService;
|
|
289
|
+
list: () => Promise<{
|
|
290
|
+
id: string;
|
|
291
|
+
symbol: string;
|
|
292
|
+
strategyName: string;
|
|
293
|
+
exchangeName: string;
|
|
294
|
+
status: string;
|
|
295
|
+
}[]>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
declare class BacktestMetaService {
|
|
299
|
+
private readonly loggerService;
|
|
300
|
+
list: () => Promise<{
|
|
301
|
+
id: string;
|
|
302
|
+
symbol: string;
|
|
303
|
+
strategyName: string;
|
|
304
|
+
exchangeName: string;
|
|
305
|
+
frameName: string;
|
|
306
|
+
status: string;
|
|
307
|
+
}[]>;
|
|
308
|
+
}
|
|
309
|
+
|
|
234
310
|
declare const ioc: {
|
|
235
311
|
notificationViewService: NotificationViewService;
|
|
236
312
|
storageViewService: StorageViewService;
|
|
237
313
|
exchangeViewService: ExchangeViewService;
|
|
238
314
|
logViewService: LogViewService;
|
|
239
315
|
statusViewService: StatusViewService;
|
|
316
|
+
markdownViewService: MarkdownViewService;
|
|
240
317
|
notificationMockService: NotificationMockService;
|
|
241
318
|
storageMockService: StorageMockService;
|
|
242
319
|
exchangeMockService: ExchangeMockService;
|
|
243
320
|
logMockService: LogMockService;
|
|
244
321
|
statusMockService: StatusMockService;
|
|
322
|
+
markdownMockService: MarkdownMockService;
|
|
323
|
+
liveMetaService: LiveMetaService;
|
|
245
324
|
symbolMetaService: SymbolMetaService;
|
|
325
|
+
backtestMetaService: BacktestMetaService;
|
|
246
326
|
symbolConnectionService: SymbolConnectionService;
|
|
247
327
|
priceConnectionService: PriceConnectionService;
|
|
248
328
|
loggerService: LoggerService;
|
|
@@ -1 +0,0 @@
|
|
|
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-DF_GlUhQ.js";import{I as F}from"./IconPhoto-B37p3oma.js";import{C as B,R as E}from"./Refresh-Bc99NRlg.js";import{K as H}from"./KeyboardArrowLeft-BPw3Kmsa.js";import{B as M}from"./Background-sfxyUbnl.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 +0,0 @@
|
|
|
1
|
-
import{c as o,f as t,r as a,q as c,Z as i,b as e,B as n,m as s,i as l,I as r,M as h,C as p,e as m,S as v,a as d,d as z,l as u,g as f,h as b}from"./index-DF_GlUhQ.js";import{C as g,R as M}from"./Refresh-Bc99NRlg.js";const y=o([t("path",{d:"M13 17c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6V5H5v14h14v-2h-6z",opacity:".3"}),t("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.38-1-1.72zM20 9v6h-7V9h7zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2H5z"}),t("circle",{cx:"16",cy:"12",r:"1.5"})],"AccountBalanceWalletTwoTone"),C=o([t("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm0 14.5c-.83 0-1.5-.67-1.5-1.5h3c0 .83-.67 1.5-1.5 1.5zm5-2.5H7v-2h1v-2.61C8 9.27 9.03 7.47 11 7v-.5c0-.57.43-1 1-1s1 .43 1 1V7c1.97.47 3 2.28 3 4.39V14h1v2z",opacity:".3"}),t("path",{d:"M12 18.5c.83 0 1.5-.67 1.5-1.5h-3c0 .83.67 1.5 1.5 1.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4-8.61c0-2.11-1.03-3.92-3-4.39v-.5c0-.57-.43-1-1-1s-1 .43-1 1V7c-1.97.47-3 2.27-3 4.39V14H7v2h10v-2h-1v-2.61zM14 14h-4v-3c0-1.1.9-2 2-2s2 .9 2 2v3z"})],"CircleNotificationsTwoTone"),H=o([t("path",{d:"M19 5H5v14h14V5zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z",opacity:".3"}),t("path",{d:"M3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2zm2 0h14v14H5V5zm2 5h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"})],"InsertChartTwoTone"),V=o(t("path",{d:"M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}),"NotificationsActive"),w=o(t(a.Fragment,{children:[t("path",{d:"M12 20c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zM10 7.5l6 4.5-6 4.5v-9z",opacity:".3"}),t("path",{d:"M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10zm0-18c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8zm-2 3.5v9l6-4.5z"})]}),"PlayCircleFilledWhiteTwoTone"),x=o(t("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-8.9-5h7.45c.75 0 1.41-.41 1.75-1.03L21 4.96 19.25 4l-3.7 7H8.53L4.27 2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2zM12 2l4 4-4 4-1.41-1.41L12.17 7H8V5h4.17l-1.59-1.59L12 2z"}),"ShoppingCartCheckout"),S=o([t("path",{d:"M4 18h16V8H4v10zm8-3h6v2h-6v-2zm-5.91-4.59L7.5 9l4 4-4 4-1.41-1.41L8.67 13l-2.58-2.59z",opacity:".3"}),t("path",{d:"M12 15h6v2h-6z"}),t("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H4V8h16v10z"}),t("path",{d:"m7.5 17 4-4-4-4-1.41 1.41L8.67 13l-2.58 2.59z"})],"TerminalTwoTone"),k="trade-gpt__groupHeader",L="trade-gpt__groupRoot",F="trade-gpt__symbolImage",T=s()({root:{[`& .${L}:hover .${k}`]:{opacity:"1 !important"}}});function N(o){return b(o,"#000000")>b(o,"#FFFFFF")}const A=[{type:i.Link,action:"back-action",label:"Main"},{type:i.Link,action:"back-action",label:"Navigation"}],$=[{action:"status-action",label:"Status",icon:()=>t(r,{icon:x,color:"#4caf50"})},{divider:!0},{action:"notification-action",label:"Notifications",icon:()=>t(r,{icon:V,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>t(r,{icon:M,color:"#4caf50"})}],_=(o,a)=>({type:h.Group,className:L,sx:{p:2},desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fields:[{type:h.Component,className:k,style:{transition:"opacity 500ms",opacity:.5},element:()=>t(v,{direction:"row",children:[t(p,{variant:"outlined",size:"medium",color:"info",label:`${m.bullet} ${o}`,sx:{mb:1,pr:.5,fontSize:"16px",background:"white",cursor:"not-allowed"}}),t(n,{flex:1})]})},{type:h.Group,fields:a.map(({label:o,to:a,color:c,icon:i})=>((o,a,c,i)=>({type:h.Component,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>t(f,{component:d,onClick:()=>{l.routerService.push(o)},sx:{width:"100%",background:c,color:"white",fontWeight:"bold",fontSize:"18px",height:"75px",minHeight:"125px",textWrap:"wrap",padding:"16px",[`& .${F}`]:{transition:"filter 500ms"},"&:hover":{background:()=>N(c)?z(c,.33):u(c,.33),[`& .${F}`]:{transition:"filter 500ms",filter:N(c)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:t(i,{className:F}),children:a})}))(a,o,c,i))}]}),B=[{label:"Notifications",to:"/notifications",color:"#F7931A",icon:C},{label:"Pending Status",to:"/status",color:"#6F42C1",icon:w}],P=[_("Application",[{label:"Portfolio Overview",to:"/overview",color:"#0033AD",icon:y},{label:"PNL Performance",to:"/dashboard",color:"#E6007A",icon:H},{label:"System Logs",to:"/logs",color:"#58BF00",icon:S}]),_("Live",B)],R=()=>{const{classes:o}=T();return t(g,{children:[t(c,{items:A,actions:$,onAction:async o=>{"notification-action"===o&&l.routerService.push("/notifications"),"status-action"===o&&l.routerService.push("/status")}}),t(e,{className:o.root,fields:P,payload:()=>({history:history})}),t(n,{paddingBottom:"24px"})]})};export{R as MainPage,R as default};
|