@zeniai/web-cockpit-ui 2.0.84-qa → 2.0.85-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-CwS5dzsS.js → CreditAgentRoutes-S4VaXFlU.js} +2 -2
- package/dist/assets/{Preview-B6i5jncF.js → Preview-CgBwFtBQ.js} +1 -1
- package/dist/assets/{ScreenRoutes-CRSqnbUY.js → ScreenRoutes-BcAO2sXU.js} +46 -46
- package/dist/assets/SignInScreen-JRqANln2.js +1 -0
- package/dist/assets/{analytics-Cm_ucRGi.js → analytics-GhKaERnA.js} +1 -1
- package/dist/assets/{analyticsHelper-D3q2XE56.js → analyticsHelper-YnSprNDK.js} +1 -1
- package/dist/assets/{core-B5MqU4D0.js → core-D5Fsnw0z.js} +1 -1
- package/dist/assets/{dash.all.min-BIcdSROr.js → dash.all.min-B0yj2D7O.js} +1 -1
- package/dist/assets/{empty-uKDsNOeu.js → empty-CmvTAiVP.js} +1 -1
- package/dist/assets/{empty-lPWwk57j.js → empty-DrAz-vvT.js} +1 -1
- package/dist/assets/epic-zSFJNGQ0.js +2 -0
- package/dist/assets/{index-Dibr6H_w.js → index-Bczc1KOS.js} +11953 -11842
- package/dist/assets/{index-lio5D8Th.js → index-CoLYnuMk.js} +1 -1
- package/dist/assets/{index-DaZwQaIw.js → index-DF4S4Rtq.js} +2 -2
- package/dist/assets/{index-Dk_d2vdm.js → index-DbwsvqQG.js} +1 -1
- package/dist/assets/{index-BR9dnswP.js → index-JV4Q69ZO.js} +1 -1
- package/dist/assets/{index-BYXzH_a7.js → index-K9SX3_2e.js} +1 -1
- package/dist/assets/{index-CimLuf0X.js → index-kzBNl2h6.js} +1 -1
- package/dist/assets/{lexical-BbeyW-4K.js → lexical-DfO0Q69H.js} +1 -1
- package/dist/assets/{liveblocks-BcvMRfuy.js → liveblocks-CSba8GsX.js} +1 -1
- package/dist/assets/{lottie-DYebwU4p.js → lottie-CC61aeWb.js} +1 -1
- package/dist/assets/{mui-DeXnCN_o.js → mui-Zto83dWr.js} +1 -1
- package/dist/assets/{react-BteYMNHV.js → react-0NCrAmlt.js} +2 -2
- package/dist/assets/{react-C5pHgzv-.js → react-BHYXRGFI.js} +1 -1
- package/dist/assets/{react-CQkfwsGk.js → react-BwIJs6Z2.js} +1 -1
- package/dist/assets/{react-EfjzcRjL.js → react-CweZThY6.js} +1 -1
- package/dist/assets/{react-CH3y4wGB.js → react-CyzDEzvL.js} +1 -1
- package/dist/assets/{react-ib8tOF7j.js → react-P-OH8yAg.js} +1 -1
- package/dist/assets/{react-Bd4Dpygm.js → react-Q_gr291O.js} +1 -1
- package/dist/assets/{react-DRPSDeOq.js → react-hm05xAoc.js} +1 -1
- package/dist/assets/{recharts-UPlnIZLg.js → recharts-CHUOt7mX.js} +1 -1
- package/dist/assets/{sentry--Xl4Um6v.js → sentry-Cdl8_Foz.js} +1 -1
- package/dist/assets/{url-CxacrhBV.js → url-Crhm_VuL.js} +1 -1
- package/dist/assets/{url-DifaMQjK.js → url-DBgh3jCD.js} +1 -1
- package/dist/assets/{utils-nwpCRVKA.js → utils-recTAQXG.js} +1 -1
- package/dist/assets/{zeni-epic-state-CdTH4V-6.js → zeni-epic-state-DQffgXnI.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/SignInScreen-B8G2oOWP.js +0 -1
- package/dist/assets/epic-vXlzUZSr.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CSba8GsX.js";import{u as D,P as j}from"./ScreenRoutes-BcAO2sXU.js";import{a as f}from"./sentry-Cdl8_Foz.js";import{i as k,n as v,g as m,h as P,k as C,l as I,N as R}from"./core-D5Fsnw0z.js";import{Ka as T,Kb as N,kd as M,Kc as E,kX as L,k_ as _,kM as $,Kd as K,Ke as O,kU as B,kQ as F}from"./zeni-epic-state-DQffgXnI.js";import{z as J,_ as q,i as V,j as Q,a0 as X,a as Z,J as G,c as H,g as W,h as Y}from"./index-Bczc1KOS.js";import{n as ee}from"./mui-Zto83dWr.js";import"./recharts-CHUOt7mX.js";import"./analyticsHelper-YnSprNDK.js";import"./utils-recTAQXG.js";import"./empty-CmvTAiVP.js";import"./index-DbwsvqQG.js";import"./url-Crhm_VuL.js";import"./index-K9SX3_2e.js";import"./analytics-GhKaERnA.js";import"./lottie-CC61aeWb.js";import"./lexical-DfO0Q69H.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]="2c424aec-de29-41bf-9839-0b2cbf026cf4",a._sentryDebugIdIdentifier="sentry-dbid-2c424aec-de29-41bf-9839-0b2cbf026cf4")}catch{}})();function te(a,t){return{headerData:{allTabOptions:Z,selectedTabOption:G("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=W(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(F())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=P(te,ne)(X),oe=ee.div`
|
|
2
2
|
padding: ${Q.sp5};
|
|
3
3
|
text-align: center;
|
|
4
|
-
`;function re(){const a=
|
|
4
|
+
`;function re(){const a=k(),t=v(),n=m(T),g=m(N),[c,h]=f.useState(new Set),p=f.useRef(new Set),b=m(e=>e.tenantState.currentTenantId),y=m(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{y==="Not-Started"&&t(M())},[t,y]);const d=J.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.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=E(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),U=`${q}/tableDownload?query=${x}`;fetch(U,{headers:{"zeni-user-id":o,"zeni-session-id":r,"zeni-tenant-id":i}}).then(async l=>{if(!l.ok){const u=await l.text();throw new Error(`Download failed: ${l.status} ${u}`)}return l.blob()}).then(l=>{const u=URL.createObjectURL(l),S=document.createElement("a");S.href=u,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(u)}).catch(()=>{})}}),[t,A,d,b,n.rows]);f.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=f.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}=D();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(R,{to:"/management",replace:!0})})})}export{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as a}from"./sentry
|
|
1
|
+
import{a as h,b as a}from"./sentry-Cdl8_Foz.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6d600b3f-6c40-4b9e-8892-371ff81f1c30",t._sentryDebugIdIdentifier="sentry-dbid-6d600b3f-6c40-4b9e-8892-371ff81f1c30")}catch{}})();const c="64px",f={},k=({src:t,light:n,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:u})=>{const[p,o]=h.useState(null);h.useEffect(()=>{!t||!n||!r||_({src:t,light:n,oEmbedUrl:r})},[t,n,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(a.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(f[e]){o(f[e]);return}o(null);const b=await(await fetch(E.replace("{url}",e))).json();if(b.thumbnail_url){const g=b.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),f[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=a.isValidElement(n),y={display:"flex",alignItems:"center",justifyContent:"center"},d={preview:{width:"100%",height:"100%",backgroundImage:p&&!l?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:l?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=a.createElement("div",{style:d.shadow,className:"react-player__shadow"},a.createElement("div",{style:d.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:d.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...u?{"aria-label":u}:{}},l?n:null,m||x)};var S=k;export{S as default};
|