@zeniai/web-cockpit-ui 2.1.39-prod → 2.1.40-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 (41) hide show
  1. package/dist/assets/{CreditAgentRoutes-BIxCKu25.js → CreditAgentRoutes-hZbImhGb.js} +2 -2
  2. package/dist/assets/{Preview-B36y4zHW.js → Preview-uO-WHEHQ.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-DwYNxBqM.js → ScreenRoutes-DtuiP9Lb.js} +63 -63
  4. package/dist/assets/SignInScreen-CJGvQwQN.js +1 -0
  5. package/dist/assets/{analytics-RV7gr_Lo.js → analytics-ZGF0_U4x.js} +1 -1
  6. package/dist/assets/analyticsHelper-DJC6MY9U.js +1 -0
  7. package/dist/assets/{core-Bn6Ijp1x.js → core-DvfD3qyp.js} +1 -1
  8. package/dist/assets/{dash.all.min-Bmmw9-Tq.js → dash.all.min-BgSNx3aA.js} +1 -1
  9. package/dist/assets/{empty-BCdhJj1D.js → empty-C0R2vT5x.js} +1 -1
  10. package/dist/assets/{empty-BMxQVfYA.js → empty-D8ggQLdL.js} +1 -1
  11. package/dist/assets/epic-DVYYrNgn.js +2 -0
  12. package/dist/assets/{index-DcNVYKXJ.js → index-33UUSHpz.js} +1 -1
  13. package/dist/assets/{index-B53IANyJ.js → index-B1OMo8rV.js} +1 -1
  14. package/dist/assets/{index-BvYp5GeE.js → index-CfLITMwN.js} +1 -1
  15. package/dist/assets/{index-Bu80UYWY.js → index-CpzZQie7.js} +1 -1
  16. package/dist/assets/{index-Bw_cQzIa.js → index-Duqe4ycv.js} +8356 -8167
  17. package/dist/assets/{index-BFfBdul8.js → index-gU6PeO19.js} +2 -2
  18. package/dist/assets/{index-CzxqNkK3.js → index-je1CHENS.js} +1 -1
  19. package/dist/assets/{lexical-CypD4BDI.js → lexical-CCJnqqQp.js} +1 -1
  20. package/dist/assets/{liveblocks-C6XRBbsp.js → liveblocks-T3GrmTou.js} +1 -1
  21. package/dist/assets/{lottie-DYVkfq_R.js → lottie-D8ngEHli.js} +1 -1
  22. package/dist/assets/{mui-DSUcy2hF.js → mui-DvXA3VqC.js} +1 -1
  23. package/dist/assets/{react-DjBoOEpo.js → react-2rBbEoKO.js} +1 -1
  24. package/dist/assets/{react-DdL0dFXl.js → react-BaEDQOZV.js} +2 -2
  25. package/dist/assets/{react-BrHsx-qT.js → react-BoqdR7q0.js} +1 -1
  26. package/dist/assets/{react-CKcmGyxY.js → react-C3Paq__C.js} +1 -1
  27. package/dist/assets/{react-D3AgQUMe.js → react-CX9sWnbC.js} +1 -1
  28. package/dist/assets/{react-BfXJY3n-.js → react-CXasdOcl.js} +1 -1
  29. package/dist/assets/{react-BGb31lDb.js → react-CwnUmHgq.js} +1 -1
  30. package/dist/assets/{react-CDY8_AdA.js → react-DroumNlx.js} +1 -1
  31. package/dist/assets/{recharts-CrNnwGDe.js → recharts-Cem7obVn.js} +1 -1
  32. package/dist/assets/{sentry-UMCRQv6K.js → sentry-ga6GdubE.js} +1 -1
  33. package/dist/assets/{url-B8An-Cyg.js → url-ClVSLAvS.js} +1 -1
  34. package/dist/assets/{url-BqetwZdV.js → url-D3Qc8riA.js} +1 -1
  35. package/dist/assets/{utils-CMcTTJqs.js → utils-diZfUoq1.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-D4sA-kbd.js → zeni-epic-state-DRlfg6NO.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-DkiU5qbS.js +0 -1
  40. package/dist/assets/analyticsHelper-DN3SH0RJ.js +0 -1
  41. package/dist/assets/epic-Bz0bx_5P.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-C6XRBbsp.js";import{u as j,P as v}from"./ScreenRoutes-DwYNxBqM.js";import{a as f}from"./sentry-UMCRQv6K.js";import{i as P,n as U,g as m,h as R,k as C,l as I,N as T}from"./core-Bn6Ijp1x.js";import{Oz as N,OA as k,ks as E,OB as M,la as O,ld as L,k$ as $,OC as _,OD as B,l7 as F,l3 as q}from"./zeni-epic-state-D4sA-kbd.js";import{z as Q,_ as V,c as J,n as Z,a0 as G,f as H,Q as K,a as W,g as X,h as Y}from"./index-Bw_cQzIa.js";import{n as ee}from"./mui-DSUcy2hF.js";import"./recharts-CrNnwGDe.js";import"./analyticsHelper-DN3SH0RJ.js";import"./utils-CMcTTJqs.js";import"./empty-BMxQVfYA.js";import"./index-DcNVYKXJ.js";import"./url-BqetwZdV.js";import"./index-BvYp5GeE.js";import"./analytics-RV7gr_Lo.js";import"./lottie-DYVkfq_R.js";import"./lexical-CypD4BDI.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]="e76896cc-fe0b-4580-8cbf-f7aced73cb10",a._sentryDebugIdIdentifier="sentry-dbid-e76896cc-fe0b-4580-8cbf-f7aced73cb10")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,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(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(G),oe=ee.div`
1
+ import{j as s}from"./liveblocks-T3GrmTou.js";import{u as j,P as v}from"./ScreenRoutes-DtuiP9Lb.js";import{a as f}from"./sentry-ga6GdubE.js";import{i as P,n as U,g as m,h as R,k as C,l as I,N as T}from"./core-DvfD3qyp.js";import{OA as N,OB as k,ks as E,OC as M,la as O,ld as L,k$ as $,OD as _,OE as B,l7 as F,l3 as q}from"./zeni-epic-state-DRlfg6NO.js";import{z as V,_ as J,O as Q,n as Z,a0 as G,f as H,c as K,d as W,g as X,h as Y}from"./index-Duqe4ycv.js";import{n as ee}from"./mui-DvXA3VqC.js";import"./recharts-Cem7obVn.js";import"./analyticsHelper-DJC6MY9U.js";import"./utils-diZfUoq1.js";import"./empty-D8ggQLdL.js";import"./index-33UUSHpz.js";import"./url-D3Qc8riA.js";import"./index-CfLITMwN.js";import"./analytics-ZGF0_U4x.js";import"./lottie-D8ngEHli.js";import"./lexical-CCJnqqQp.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]="4ea16b11-756a-48d3-a444-71ef7ff2018a",a._sentryDebugIdIdentifier="sentry-dbid-4ea16b11-756a-48d3-a444-71ef7ff2018a")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,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(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(G),oe=ee.div`
2
2
  padding: ${Z.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=P(),t=U(),n=m(N),g=m(k),[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(E())},[t,y]);const d=Q.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(L({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(O(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=`${V}/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 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:J.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=j();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(T,{to:"/management",replace:!0})})})}export{ze as default};
4
+ `;function re(){const a=P(),t=U(),n=m(N),g=m(k),[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=V.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(L({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(O(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=y??"";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 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 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:Q.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=j();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(T,{to:"/management",replace:!0})})})}export{ze as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-UMCRQv6K.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-ga6GdubE.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};