@zeniai/web-cockpit-ui 2.1.13-qa → 2.1.14-qa

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 (43) hide show
  1. package/dist/assets/CreditAgentRoutes-C-o0I-xD.js +4 -0
  2. package/dist/assets/{Preview-B4KsZ4sI.js → Preview-CLaB1vsc.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-ZvkgMMwh.js → ScreenRoutes-DtkQ5L8m.js} +65 -65
  4. package/dist/assets/SignInScreen-Wt4Det1y.js +1 -0
  5. package/dist/assets/{analytics-IO4xoLZg.js → analytics-C_YcoEjN.js} +1 -1
  6. package/dist/assets/{analyticsHelper-ZQuVPbVI.js → analyticsHelper-DjTmkBsr.js} +1 -1
  7. package/dist/assets/{core-C8FKVWs7.js → core-CL70Yitp.js} +1 -1
  8. package/dist/assets/{dash.all.min-yJTS94FO.js → dash.all.min-Aydw-Eif.js} +1 -1
  9. package/dist/assets/{empty-BRFkw-uw.js → empty-Bmal6Pqj.js} +1 -1
  10. package/dist/assets/{empty-TcziwF6x.js → empty-C_9qPx71.js} +1 -1
  11. package/dist/assets/epic-83lF3cRg.js +2 -0
  12. package/dist/assets/index-B9p5bBUx.css +1 -0
  13. package/dist/assets/{index-zvD8fUX_.js → index-Bu4w2pMV.js} +1 -1
  14. package/dist/assets/{index-HCUKgM-g.js → index-Ck059Qzf.js} +1 -1
  15. package/dist/assets/{index-Coypz-G6.js → index-Cr2K2yOH.js} +1 -1
  16. package/dist/assets/{index-rZMymBxZ.js → index-CuT2lIhM.js} +2 -2
  17. package/dist/assets/{index-c6kq6tbi.js → index-D9fFtcEx.js} +12538 -11607
  18. package/dist/assets/{index-DfqjMnb7.js → index-Dt1znPYR.js} +1 -1
  19. package/dist/assets/{index-D32SLqnS.js → index-DutUIYxc.js} +1 -1
  20. package/dist/assets/{lexical-CQCjSGB8.js → lexical-Bh0cWxqj.js} +1 -1
  21. package/dist/assets/{liveblocks-CMe6cAkG.js → liveblocks-D86m8Y3r.js} +12 -12
  22. package/dist/assets/{lottie-s1rchyQM.js → lottie-CkAGO2Gd.js} +1 -1
  23. package/dist/assets/{mui-SdKM9iyy.js → mui-CPQxXrae.js} +1 -1
  24. package/dist/assets/{react-C0jJov0q.js → react-BdviKXim.js} +1 -1
  25. package/dist/assets/{react-c62vd4uf.js → react-Bla6_zgs.js} +1 -1
  26. package/dist/assets/{react-D4qOXxLJ.js → react-C3pTPlvU.js} +1 -1
  27. package/dist/assets/{react-BMJ0NpxU.js → react-CTZ3mEDj.js} +1 -1
  28. package/dist/assets/{react-C-jG8nrX.js → react-D2x6zTeX.js} +1 -1
  29. package/dist/assets/{react-DEolV79n.js → react-DzFFE1-B.js} +1 -1
  30. package/dist/assets/{react-Dz4dpyka.js → react-VV8xSyNn.js} +1 -1
  31. package/dist/assets/{react-B2QB72iK.js → react-lKhzZOu-.js} +2 -2
  32. package/dist/assets/{recharts-Bvg8fFzd.js → recharts-rw_b2XoV.js} +1 -1
  33. package/dist/assets/{sentry-BaaLYCf-.js → sentry-CnK0xFyd.js} +1 -1
  34. package/dist/assets/{url-CQ6AGpQD.js → url-B0xBOmm5.js} +1 -1
  35. package/dist/assets/{url-CgYGb_63.js → url-DF3Kd_TF.js} +1 -1
  36. package/dist/assets/{utils-EWsbz397.js → utils-B7RwIJRr.js} +1 -1
  37. package/dist/assets/{zeni-epic-state-q4suYxTf.js → zeni-epic-state-BkpUuAYc.js} +6 -6
  38. package/dist/index.html +1 -1
  39. package/package.json +4 -4
  40. package/dist/assets/CreditAgentRoutes-C_-QGvrQ.js +0 -4
  41. package/dist/assets/SignInScreen-CEtseJ2j.js +0 -1
  42. package/dist/assets/epic-N5wWVK2t.js +0 -2
  43. package/dist/assets/index-C8ouCD8q.css +0 -1
@@ -0,0 +1,4 @@
1
+ import{j as r}from"./liveblocks-D86m8Y3r.js";import{u as k,P as v}from"./ScreenRoutes-DtkQ5L8m.js";import{a as f}from"./sentry-CnK0xFyd.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-CL70Yitp.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-BkpUuAYc.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-D9fFtcEx.js";import{n as ee}from"./mui-CPQxXrae.js";import"./recharts-rw_b2XoV.js";import"./analyticsHelper-DjTmkBsr.js";import"./utils-B7RwIJRr.js";import"./empty-Bmal6Pqj.js";import"./index-Ck059Qzf.js";import"./url-DF3Kd_TF.js";import"./index-Cr2K2yOH.js";import"./analytics-C_YcoEjN.js";import"./lottie-CkAGO2Gd.js";import"./lexical-Bh0cWxqj.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-BaaLYCf-.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-CnK0xFyd.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};