-
Notifications
You must be signed in to change notification settings - Fork 0
/
6405dc29b3f3e6afa947f5c18311e0cf305f21a8-bf13a281407520fe534b.js
2 lines (2 loc) · 8.55 KB
/
6405dc29b3f3e6afa947f5c18311e0cf305f21a8-bf13a281407520fe534b.js
1
2
"use strict";(self.webpackChunkkaagzi=self.webpackChunkkaagzi||[]).push([[233],{4949:function(e,t,n){n.d(t,{Z:function(){return m}});var a=n(7294),r=n(1883),i=n(757),l=n(6427),o="brokerLogin-module--brokerLoginCta--39fcf",c="brokerLogin-module--brokerSwitchBtn--d6123",s="brokerLogin-module--noUserWrap--c07af",u="brokerLogin-module--orSep--5a79b";function m(e){let{broker:t,doOnLoginClick:n,goToUrlOnLoginClick:m,referralUrlForNewSignupWithBroker:d}=e;return["Zerodha","Angel One","Upstox","Alice Blue"].includes(t)?a.createElement(a.Fragment,null,a.createElement(l.Z,null),a.createElement("div",{id:s},a.createElement("div",null,n&&"function"==typeof n?a.createElement("button",{className:o,onClick:n},"Zerodha"===t&&a.createElement("img",{src:"/img/logo-kite.png",alt:"Zerodha Kite"}),"Angel One"===t&&a.createElement("img",{src:"/img/logo-angelOne.webp",alt:"Angel One"}),"Upstox"===t&&a.createElement("img",{src:"/img/logo-upstox.webp",alt:"Upstox"}),a.createElement("span",null,"Sign into ",t)):a.createElement("a",{className:o,href:m,target:"_blank",rel:"noopener noreferrer"},"Zerodha"===t&&a.createElement("img",{src:"/img/logo-kite.png",alt:"Zerodha Kite"}),"Angel One"===t&&a.createElement("img",{src:"/img/logo-angelOne.webp",alt:"Angel One"}),"Upstox"===t&&a.createElement("img",{src:"/img/logo-upstox.webp",alt:"Upstox"}),a.createElement("span",null,"Sign into ",t)),d&&"string"==typeof d&&""!==d.trim()&&a.createElement("p",null,"Don't have an account with ",t,"?"," ",a.createElement(i.M,{href:d,target:"_blank",rel:"noopener noreferrer"},"Open Account")),a.createElement("div",{className:u},"OR"),a.createElement(r.Link,{className:c,to:"/app"},"Choose different broker")))):null}},2628:function(e,t,n){n.d(t,{Z:function(){return p}});var a=n(7294),r=n(9558),i=n(4860),l=n(7226),o=n(1797),c="watchlistItem-module--dataRow--452e1",s="watchlistItem-module--instrumentCtaC--06fbf",u="watchlistItem-module--mainBtn--e4424",m="watchlistItem-module--metaDataRow--a70e4",d="watchlistItem-module--wlItmC--83bb6";function p(e){let{wrapperElement:t="div",tradingsymbol:n,entityName:p,exchange:g,segment:E,ltp:f,closePrice:b,className:y,isExpandedView:h,onSellClick:v,onBuyClick:w,onRemoveClick:N,closeExpandedView:x,...k}=e;const{notify:C}=(0,a.useContext)(o.L);return a.createElement(t,Object.assign({className:`${d}${y&&"string"==typeof y&&""!==y.trim()?" "+y:""}`},k),a.createElement("div",{className:c},a.createElement("span",null,n),a.createElement(r.Z,{currentVal:f,baseVal:b})),a.createElement("div",{className:m},a.createElement("span",null,`${g}${p?" | "+p:""}`),a.createElement("span",null,(0,i.Bz)(f-b))),h&&a.createElement("div",{className:s},a.createElement(l.ZP,{variant:"tertiary",isDark:!0,icon:"chevron-up",onClick:e=>{null==x||x(),e.stopPropagation()}}),a.createElement(l.ZP,{variant:"sell",className:u,onClick:()=>{C("Sell functionality coming soon!")}},"SELL"),a.createElement(l.ZP,{variant:"buy",className:u,onClick:e=>{null==w||w(),null==x||x(),e.stopPropagation()}},"BUY"),a.createElement(l.ZP,{variant:"tertiary",isDark:!0,icon:"trash-2",onClick:e=>{null==N||N(),e.stopPropagation()}})))}},501:function(e,t,n){n.d(t,{Z:function(){return g}});var a=n(7294),r=n(7226),i=n(1905),l=n(9185),o=n(1797),c=n(1370),s=n(3824),u="exitTradePositionDialog-module--posFtr--694cf",m="exitTradePositionDialog-module--posInfo--c8c61",d="exitTradePositionDialog-module--totalQty--f2919",p="exitTradePositionDialog-module--tradePositionMgmtC--f141c";function g(e){let{tradingsymbol:t,exchange:n,purchasdQty:g,lotSize:E=1,avgEntryPrice:f,ltp:b,direction:y="B",doOnSuccessfulExit:h,closeDialog:v}=e;const{0:w,1:N}=(0,a.useState)(g),{0:x,1:k}=(0,a.useState)(""),{0:C,1:P}=(0,a.useState)(!1),{notify:Z}=(0,a.useContext)(o.L),{checkIfPlanActive:S}=(0,a.useContext)(c.S),{exitPosition:I}=(0,a.useContext)(s.O),L=e=>isNaN(Number(e))?"Quantity should be a number":Number.isInteger(e)?e>g?"Quantity cannot be more "+g:e<E?"Quantity cannot be less than lot-size of "+E:e%E!=0?"Quantity should be a multiple of "+E:"":"Quantity should be an integer";return a.createElement("div",{className:p},a.createElement(l.Z,{className:m,tradingsymbol:t,exchange:n,qty:g,avg:f,ltp:b,direction:y}),a.createElement("div",null,a.createElement(i.Z,{type:"number",title:"Exit Quantity",placeholder:"Exit Quantity",value:w.toString(),onChange:e=>{k(L(Number(e.target.value))),N(Number(e.target.value))},error:x,actionPane:()=>a.createElement("span",{className:d},g)})),a.createElement("div",{className:u},a.createElement(r.ZP,{variant:"primary",size:"big",onClick:async()=>{if(!b)return Z("Error inferring exit price","err"),!1;const e=L(w);if(C)return!1;if(""!==e)return Z(e,"err"),!1;try{if(!await S())throw new Error("Plan Expired!");P(!0);const e=await I(t,n,"S"===y,b,w);if(!e)throw new Error("Failed to exit position");return h&&"function"==typeof h&&h(e),Z("Trade position exited successfully","success"),v&&"function"==typeof v&&v(),!0}catch(a){return Z(a.message||"Error exiting trade position","err"),!1}finally{P(!1)}},isWip:C,wipText:"Exiting"},"Exit")))}},5420:function(e,t,n){n.d(t,{Z:function(){return p}});var a=n(7294),r=n(9558),i=n(7226),l=n(1905),o=n(1797),c=n(1370),s="newTradePositionDialog-module--posFtr--4db7d",u="newTradePositionDialog-module--posInfo--027c6",m="newTradePositionDialog-module--posMetricsC--babad",d="newTradePositionDialog-module--tradePositionMgmtC--ee1fe";function p(e){let{tradingsymbol:t,exchange:n,lotSize:p,ltp:g,closePrice:E,openNewOrAddToPosition:f,cancelOp:b,closeDialog:y}=e;const{0:h,1:v}=(0,a.useState)(p),{0:w,1:N}=(0,a.useState)(""),{0:x,1:k}=(0,a.useState)(!1),{notify:C}=(0,a.useContext)(o.L),{checkIfPlanActive:P}=(0,a.useContext)(c.S),Z=e=>isNaN(Number(e))?"Quantity should be a number":Number.isInteger(Number(e))?e<p?"Quantity cannot be less than lot-size":e%p!=0?"Quantity should be a multiple of lot-size":"":"Quantity should be an integer";return a.createElement("div",{className:d},a.createElement("div",{className:u},a.createElement("span",null,t),a.createElement(r.Z,{currentVal:g,baseVal:E})),a.createElement("ul",{className:m},a.createElement("li",null,a.createElement(l.Z,{type:"number",title:"Quantity",placeholder:"Quantity",value:h.toString(),onChange:e=>{N(Z(Number(e.target.value))),v(Number(e.target.value))},error:w}))),a.createElement("div",{className:s},a.createElement(i.ZP,{variant:"tertiary",isDark:!0,onClick:b},"Cancel"),a.createElement(i.ZP,{variant:"buy",onClick:async()=>{const e=Z(h);if(x)return!1;if(""!==e)return C(e,"err"),!1;try{if(!await P())throw new Error("Plan Expired!");k(!0);if(!await f(t,n,g,Number(h),Number(p)))throw new Error("Failed to open or update position");return C("Trade position opened successfully","success"),y(),!0}catch(a){return C(a.message||"Error opening or updating position","err"),!1}finally{k(!1)}},isWip:x,wipText:"Opening"},"BUY")))}},9185:function(e,t,n){n.d(t,{Z:function(){return p}});var a=n(7294),r=n(9558),i="positionListItem-module--avg--e4ab8",l="positionListItem-module--dataRow--23439",o="positionListItem-module--isBuy--d1003",c="positionListItem-module--isSell--d524e",s="positionListItem-module--ltp--c9cf8",u="positionListItem-module--metaDataRow--83b91",m="positionListItem-module--positionC--e0919",d="positionListItem-module--qty--9d730";function p(e){let{wrapperElement:t="div",tradingsymbol:n,exchange:p,qty:g,avg:E,ltp:f,direction:b,expiry:y,className:h,...v}=e,w=null;return f&&(w=("S"===b?E-f:f-E)*g),a.createElement(t,Object.assign({className:`${m} ${"S"===b?c:o}${h&&"string"==typeof h&&""!==h.trim()?" "+h:""}`},v),a.createElement("div",{className:l},p?a.createElement("span",{"data-exchange":p},n):a.createElement("span",null,n),a.createElement(r.Z,{currentVal:w,baseVal:0})),a.createElement("div",{className:u},a.createElement("span",{className:d},g),a.createElement("span",{className:i},E),a.createElement("span",{className:s},f)))}},8933:function(e,t,n){n.d(t,{Z:function(){return d}});var a=n(7294),r=n(6427),i=n(918),l=n(1370),o=n(6999),c="planExpiryGateway-module--paidAreaContentC--4829a";function s(e){let{children:t}=e;const{exp:n,isPlanActive:r,checkIfPlanActive:i}=(0,a.useContext)(l.S);return(0,a.useEffect)((()=>{i&&"function"==typeof i&&(async()=>{await i()})()}),[n,r]),a.createElement("div",{className:c},r?t:a.createElement(o.Z,null))}var u="fullWidthAppRestrictedPage-module--verticalHorizontalCenterC--f109a",m="fullWidthAppRestrictedPage-module--wrap--cf937";function d(e){let{children:t}=e;const{id:n}=(0,a.useContext)(l.S);return n?a.createElement("div",{id:m},a.createElement(s,null,t)):a.createElement("div",{id:m},a.createElement(r.Z,null),a.createElement("div",{id:u},a.createElement(i.Z,null)))}}}]);
//# sourceMappingURL=6405dc29b3f3e6afa947f5c18311e0cf305f21a8-bf13a281407520fe534b.js.map