@zeniai/web-cockpit-ui 2.1.94-prod → 2.1.95-dev
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/CreditAgentRoutes-CIscXuUe.js +4 -0
- package/dist/assets/{Preview-DLRFQG0_.js → Preview-DtkiSAbX.js} +1 -1
- package/dist/assets/{ScreenRoutes-Dz_OIBtQ.js → ScreenRoutes-C6taxxP0.js} +55 -55
- package/dist/assets/SignInScreen-DK92Zlut.js +1 -0
- package/dist/assets/{analytics-BM3WkHA2.js → analytics-CcLB9_Vj.js} +1 -1
- package/dist/assets/{analyticsHelper-BszymgsO.js → analyticsHelper-0rkwe5fC.js} +1 -1
- package/dist/assets/{core-au0scJio.js → core-Bl9BnB30.js} +1 -1
- package/dist/assets/{dash.all.min-CpfRGLT6.js → dash.all.min-BtgfMeTQ.js} +1 -1
- package/dist/assets/{empty--vPDS5Rp.js → empty-B7fTrwqG.js} +1 -1
- package/dist/assets/{empty-P8MZUobR.js → empty-TF8E-plp.js} +1 -1
- package/dist/assets/epic-DWIR0W0U.js +2 -0
- package/dist/assets/{index-CjHGABx6.js → index-BNtt6nz7.js} +1 -1
- package/dist/assets/{index-C1sWh1kM.js → index-D1AcXnh0.js} +2 -2
- package/dist/assets/{index-wUabeAhu.js → index-DrbDpgw9.js} +7452 -7344
- package/dist/assets/{index-UtBw17le.js → index-DsAckLPW.js} +1 -1
- package/dist/assets/{index-CbYKmS6Y.js → index-DvZr26Ys.js} +1 -1
- package/dist/assets/{index-opBM9bCe.js → index-Ut1WovAG.js} +1 -1
- package/dist/assets/{index-CEPBGNfE.js → index-oPkSm1_I.js} +1 -1
- package/dist/assets/{lexical-BBGnm_pg.js → lexical-Btm7au_7.js} +1 -1
- package/dist/assets/{liveblocks-8mUy0M2F.js → liveblocks-ruhPlRgH.js} +1 -1
- package/dist/assets/{lottie-MzOHVeyQ.js → lottie-BDuJRr8q.js} +1 -1
- package/dist/assets/{mui-BN4Vagud.js → mui-B0uSMsuV.js} +1 -1
- package/dist/assets/{react-D7yq_4r1.js → react-9mF8Hlr1.js} +1 -1
- package/dist/assets/{react-PoKMznEp.js → react-B5e2_6kE.js} +1 -1
- package/dist/assets/{react-Bt791uNR.js → react-CDj8vTUp.js} +1 -1
- package/dist/assets/{react-roKu4oxh.js → react-CveG8dcT.js} +1 -1
- package/dist/assets/{react-BZCj4838.js → react-Cz4v-CaS.js} +1 -1
- package/dist/assets/{react-DGrR8Xkg.js → react-DcQRvVYt.js} +1 -1
- package/dist/assets/{react-U4wcB9_W.js → react-Dzq8d2xb.js} +1 -1
- package/dist/assets/{react-fogrW4Ki.js → react-dEcrXB5H.js} +2 -2
- package/dist/assets/{recharts-CWgob5FZ.js → recharts-BVXGz_Pg.js} +1 -1
- package/dist/assets/{sentry-Dag6yZTL.js → sentry-CZNY_XXd.js} +1 -1
- package/dist/assets/{url-D2HBJt7D.js → url-3tTCewRE.js} +1 -1
- package/dist/assets/{url-Fh8n1jVQ.js → url-Djf5X53U.js} +1 -1
- package/dist/assets/{utils-ChmSvlHv.js → utils-BmzxTZV6.js} +1 -1
- package/dist/assets/{zeni-epic-state-DCI6-wuS.js → zeni-epic-state-CSx5suD3.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/CreditAgentRoutes-j--FeV6j.js +0 -4
- package/dist/assets/SignInScreen-MRHR0vtv.js +0 -1
- package/dist/assets/epic-DE0gXNOk.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-ruhPlRgH.js";import{u as P,P as v}from"./ScreenRoutes-C6taxxP0.js";import{a as u}from"./sentry-CZNY_XXd.js";import{i as T,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-Bl9BnB30.js";import{Qz as N,QA as k,l0 as E,QB as M,lS as L,lV as _,lH as $,QC as Q,QD as B,lP as F,lL as O}from"./zeni-epic-state-CSx5suD3.js";import{z as q,_ as J,m as V,q as H,a0 as Z,J as G,d as K,e as W,g as X,h as Y}from"./index-DrbDpgw9.js";import{n as ee}from"./mui-B0uSMsuV.js";import"./recharts-BVXGz_Pg.js";import"./analyticsHelper-0rkwe5fC.js";import"./utils-BmzxTZV6.js";import"./empty-B7fTrwqG.js";import"./index-oPkSm1_I.js";import"./url-Djf5X53U.js";import"./index-DsAckLPW.js";import"./analytics-CcLB9_Vj.js";import"./lottie-BDuJRr8q.js";import"./lexical-Btm7au_7.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="73cc5b99-de60-493c-940e-973db4eb6947",a._sentryDebugIdIdentifier="sentry-dbid-73cc5b99-de60-493c-940e-973db4eb6947")}catch{}})();function te(a,t){return{headerData:{allTabOptions:G,selectedTabOption:K("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ne(a,t){return{headerActions:{onTabChange:n=>{const g=Y(n),c=X(n);W.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(O())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(Q(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(Z),oe=ee.div`
|
|
2
|
+
padding: ${H.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function re(){const a=T(),t=U(),n=m(N),g=m(k),[c,h]=u.useState(new Set),p=u.useRef(new Set),b=m(e=>e.tenantState.currentTenantId),y=m(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{y==="Not-Started"&&t(E())},[t,y]);const d=q.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=u.useMemo(()=>({onFetch:()=>{t($())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??A;t(_({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${J}/tableDownload?query=${x}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":r,"zeni-tenant-id":i}}).then(async l=>{if(!l.ok){const f=await l.text();throw new Error(`Download failed: ${l.status} ${f}`)}return l.blob()}).then(l=>{const f=URL.createObjectURL(l),S=document.createElement("a");S.href=f,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,A,d,b,n.rows]);u.useEffect(()=>{if(c.size===0)return;const e=new Set;for(const o of c){const r=n.rows.find(i=>i.tenantId===o);r!=null&&r.isAnalyzing?p.current.add(o):r!=null&&!r.isAnalyzing&&p.current.has(o)&&(e.add(o),p.current.delete(o))}e.size>0&&h(o=>{const r=new Set(o);for(const i of e)r.delete(i);return r})},[n.rows,c]);const w=u.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&c.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,c]);return d==null?s.jsx(oe,{children:V.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=P();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{to:"/management",replace:!0})})})}export{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as n}from"./sentry-
|
|
1
|
+
import{a as h,R as n}from"./sentry-CZNY_XXd.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};
|