@zeniai/web-cockpit-ui 2.1.40-qa → 2.1.41-next

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-BDzfw8x_.js → CreditAgentRoutes-BuFfIICb.js} +2 -2
  2. package/dist/assets/{Preview-uO-WHEHQ.js → Preview-Dss4QSfv.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-Bhi5USqQ.js → ScreenRoutes-DEkvFTon.js} +63 -63
  4. package/dist/assets/SignInScreen-co7zUdla.js +1 -0
  5. package/dist/assets/{analytics-ZGF0_U4x.js → analytics-BfN_9skw.js} +1 -1
  6. package/dist/assets/analyticsHelper-DGyBWfc5.js +1 -0
  7. package/dist/assets/{core-DvfD3qyp.js → core-V8YhGfDA.js} +1 -1
  8. package/dist/assets/{dash.all.min-BgSNx3aA.js → dash.all.min-DSpQfdRe.js} +1 -1
  9. package/dist/assets/{empty-C0R2vT5x.js → empty-CQexUfBG.js} +1 -1
  10. package/dist/assets/{empty-D8ggQLdL.js → empty-gsTj-_Fv.js} +1 -1
  11. package/dist/assets/epic-DjADpZnE.js +2 -0
  12. package/dist/assets/{index-B1OMo8rV.js → index-B36Tigtx.js} +1 -1
  13. package/dist/assets/{index-CpzZQie7.js → index-BTOnmSh1.js} +1 -1
  14. package/dist/assets/{index-CNWYp4g0.js → index-CA8gMvE8.js} +8166 -8355
  15. package/dist/assets/{index-33UUSHpz.js → index-DFIKluwj.js} +1 -1
  16. package/dist/assets/{index-je1CHENS.js → index-DacqdV5y.js} +1 -1
  17. package/dist/assets/{index-CfLITMwN.js → index-Du1bi3k9.js} +1 -1
  18. package/dist/assets/{index-gU6PeO19.js → index-i4dIm1fW.js} +2 -2
  19. package/dist/assets/{lexical-CCJnqqQp.js → lexical-CCQed6O_.js} +1 -1
  20. package/dist/assets/{liveblocks-T3GrmTou.js → liveblocks-DJXlGItY.js} +1 -1
  21. package/dist/assets/{lottie-D8ngEHli.js → lottie-BVHBIxch.js} +1 -1
  22. package/dist/assets/{mui-DvXA3VqC.js → mui-CNyfo_jy.js} +1 -1
  23. package/dist/assets/{react-BoqdR7q0.js → react-B2bKpQhd.js} +1 -1
  24. package/dist/assets/{react-CwnUmHgq.js → react-BXmd4-vQ.js} +1 -1
  25. package/dist/assets/{react-CX9sWnbC.js → react-BgWCrBJQ.js} +1 -1
  26. package/dist/assets/{react-DroumNlx.js → react-BhUPbtZt.js} +1 -1
  27. package/dist/assets/{react-CXasdOcl.js → react-CFYyJ16U.js} +1 -1
  28. package/dist/assets/{react-C3Paq__C.js → react-DCj3KV0F.js} +1 -1
  29. package/dist/assets/{react-2rBbEoKO.js → react-DnARmHH2.js} +1 -1
  30. package/dist/assets/{react-BaEDQOZV.js → react-Dx_v2Rjm.js} +2 -2
  31. package/dist/assets/{recharts-Cem7obVn.js → recharts-lI_4Cd-h.js} +1 -1
  32. package/dist/assets/{sentry-ga6GdubE.js → sentry-CFr7aGwX.js} +1 -1
  33. package/dist/assets/{url-ClVSLAvS.js → url-CbJwYJGu.js} +1 -1
  34. package/dist/assets/{url-D3Qc8riA.js → url-Dt7jyofO.js} +1 -1
  35. package/dist/assets/{utils-diZfUoq1.js → utils-BkjBeTEx.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-DRlfg6NO.js → zeni-epic-state-DS9Wj9d-.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-BfI5Qvlq.js +0 -1
  40. package/dist/assets/analyticsHelper-BemrnlHD.js +0 -1
  41. package/dist/assets/epic-DVYYrNgn.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-T3GrmTou.js";import{u as j,P as v}from"./ScreenRoutes-Bhi5USqQ.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-CNWYp4g0.js";import{n as ee}from"./mui-DvXA3VqC.js";import"./recharts-Cem7obVn.js";import"./analyticsHelper-BemrnlHD.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`
1
+ import{j as s}from"./liveblocks-DJXlGItY.js";import{u as j,P as v}from"./ScreenRoutes-DEkvFTon.js";import{a as f}from"./sentry-CFr7aGwX.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-V8YhGfDA.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-DS9Wj9d-.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-CA8gMvE8.js";import{n as ee}from"./mui-CNyfo_jy.js";import"./recharts-lI_4Cd-h.js";import"./analyticsHelper-DGyBWfc5.js";import"./utils-BkjBeTEx.js";import"./empty-gsTj-_Fv.js";import"./index-DFIKluwj.js";import"./url-Dt7jyofO.js";import"./index-Du1bi3k9.js";import"./analytics-BfN_9skw.js";import"./lottie-BVHBIxch.js";import"./lexical-CCQed6O_.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`
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),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};
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};
@@ -1 +1 @@
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};
1
+ import{a as h,b as a}from"./sentry-CFr7aGwX.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};