@zeniai/web-cockpit-ui 2.1.11-qa → 2.1.12-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.
Files changed (44) hide show
  1. package/dist/assets/CreditAgentRoutes-CBfUAHp1.js +4 -0
  2. package/dist/assets/{Preview-D2oOdTkJ.js → Preview-4oEL4rG3.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-CM-uq0Zl.js → ScreenRoutes-B48Dwk66.js} +47 -47
  4. package/dist/assets/SignInScreen-61RCujXY.js +1 -0
  5. package/dist/assets/{analytics-ehUQDfq7.js → analytics---jMNjkM.js} +1 -1
  6. package/dist/assets/{analyticsHelper-BG8zc-cp.js → analyticsHelper-DA4HpUbZ.js} +1 -1
  7. package/dist/assets/{core-rcRsV0tM.js → core-OEa32EdL.js} +1 -1
  8. package/dist/assets/{dash.all.min-BqHvnJ61.js → dash.all.min-BWhN45bF.js} +1 -1
  9. package/dist/assets/{empty-C6jec5LJ.js → empty-BZE_Ldl3.js} +1 -1
  10. package/dist/assets/{empty-DoNeXCgc.js → empty-gDdeKtTx.js} +1 -1
  11. package/dist/assets/epic-BXaVVWyf.js +2 -0
  12. package/dist/assets/index-B9p5bBUx.css +1 -0
  13. package/dist/assets/{index-xEmurRej.js → index-BZvoxSk5.js} +1 -1
  14. package/dist/assets/{index-CWxd4c1D.js → index-BdykfRrI.js} +2 -2
  15. package/dist/assets/{index-CcabI_Br.js → index-Be_atZkL.js} +1 -1
  16. package/dist/assets/{index-T86h83zH.js → index-D1Fq-kse.js} +11837 -11144
  17. package/dist/assets/{index-Ddf8TnfN.js → index-DarfaGkO.js} +1 -1
  18. package/dist/assets/{index-CUpiAKyH.js → index-DlTk87x-.js} +1 -1
  19. package/dist/assets/{index-DPjEGWKv.js → index-DsJnKodL.js} +1 -1
  20. package/dist/assets/{lexical-COvNSrZW.js → lexical-Bn4ZJl4F.js} +1 -1
  21. package/dist/assets/{liveblocks-CxM18L8A.js → liveblocks-B4lr6BLm.js} +12 -12
  22. package/dist/assets/{lottie-DJ0ebtY4.js → lottie-C39KnI2w.js} +1 -1
  23. package/dist/assets/{mui-BwkRmkng.js → mui-GKXa5zKb.js} +1 -1
  24. package/dist/assets/{react-BGrpLetp.js → react-BFO3J7kf.js} +1 -1
  25. package/dist/assets/{react-CAWJ7PtF.js → react-C720890s.js} +2 -2
  26. package/dist/assets/{react-DTWI93Ym.js → react-CL1W4G9P.js} +1 -1
  27. package/dist/assets/{react-CgrXcgUj.js → react-CqZUxCIe.js} +1 -1
  28. package/dist/assets/{react-CDdbJEyj.js → react-Dg4T6NEA.js} +1 -1
  29. package/dist/assets/{react-BmK87vSD.js → react-DjM18nb5.js} +1 -1
  30. package/dist/assets/{react-CMTdumnK.js → react-DnaPrxoP.js} +1 -1
  31. package/dist/assets/{react-DhoJQvSf.js → react-jeKsuOu9.js} +1 -1
  32. package/dist/assets/{recharts-CcDoIeF5.js → recharts-WyM60iyi.js} +1 -1
  33. package/dist/assets/{sentry-BC_xhTHH.js → sentry-DZ8rJHtQ.js} +1 -1
  34. package/dist/assets/{url-COxD88pj.js → url-BWPdokNI.js} +1 -1
  35. package/dist/assets/{url-CWuwrJi4.js → url-bYvqxS1O.js} +1 -1
  36. package/dist/assets/{utils-BYvAxjK2.js → utils-C74dE3gQ.js} +1 -1
  37. package/dist/assets/zeni-epic-state-DZe98m2-.js +13 -0
  38. package/dist/index.html +1 -1
  39. package/package.json +4 -4
  40. package/dist/assets/CreditAgentRoutes-DcCfiLZU.js +0 -4
  41. package/dist/assets/SignInScreen-CI2MFYZN.js +0 -1
  42. package/dist/assets/epic-D71LHB_4.js +0 -2
  43. package/dist/assets/index-C8ouCD8q.css +0 -1
  44. package/dist/assets/zeni-epic-state-CW0TTzxQ.js +0 -13
@@ -0,0 +1,4 @@
1
+ import{j as r}from"./liveblocks-B4lr6BLm.js";import{u as k,P as v}from"./ScreenRoutes-B48Dwk66.js";import{a as f}from"./sentry-DZ8rJHtQ.js";import{i as P,n as T,g as m,h as U,k as C,l as I,N as R}from"./core-OEa32EdL.js";import{KB as j,KC as N,kk as E,KD as M,l2 as L,l5 as $,kT as _,KE as K,KF as B,k$ as F,kX as O}from"./zeni-epic-state-DZe98m2-.js";import{z as X,_ as q,e as V,i as J,a0 as Z,s as G,X as H,b as Q,g as W,h as Y}from"./index-D1Fq-kse.js";import{n as ee}from"./mui-GKXa5zKb.js";import"./recharts-WyM60iyi.js";import"./analyticsHelper-DA4HpUbZ.js";import"./utils-C74dE3gQ.js";import"./empty-gDdeKtTx.js";import"./index-BZvoxSk5.js";import"./url-bYvqxS1O.js";import"./index-DlTk87x-.js";import"./analytics---jMNjkM.js";import"./lottie-C39KnI2w.js";import"./lexical-Bn4ZJl4F.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]="6e67dc7a-666f-4585-a01d-62358d0de066",a._sentryDebugIdIdentifier="sentry-dbid-6e67dc7a-666f-4585-a01d-62358d0de066")}catch{}})();function te(a,t){return{headerData:{allTabOptions:G,selectedTabOption:H("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);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(O())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(Z),oe=ee.div`
2
+ padding: ${J.sp5};
3
+ text-align: center;
4
+ `;function se(){const a=P(),t=T(),n=m(j),g=m(N),[c,h]=f.useState(new Set),p=f.useRef(new Set),y=m(e=>e.tenantState.currentTenantId),b=m(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{b==="Not-Started"&&t(E())},[t,b]);const d=X.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,s)=>{const i=s.updatedByName??A;t($({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",i=y??"";if(!o||!s||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${q}/tableDownload?query=${x}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"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,y,n.rows]);f.useEffect(()=>{if(c.size===0)return;const e=new Set;for(const o of c){const s=n.rows.find(i=>i.tenantId===o);s!=null&&s.isAnalyzing?p.current.add(o):s!=null&&!s.isAnalyzing&&p.current.has(o)&&(e.add(o),p.current.delete(o))}e.size>0&&h(o=>{const s=new Set(o);for(const i of e)s.delete(i);return s})},[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?r.jsx(oe,{children:V.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):r.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=k();return t?null:a?r.jsx(C,{children:r.jsx(I,{path:"/*",element:r.jsx(v,{element:r.jsx(se,{})})})}):r.jsx(C,{children:r.jsx(I,{path:"/*",element:r.jsx(R,{to:"/management",replace:!0})})})}export{ze as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-BC_xhTHH.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};
1
+ import{a as h,b as a}from"./sentry-DZ8rJHtQ.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};