@zeniai/web-cockpit-ui 2.0.92-prod → 2.0.93-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 (39) hide show
  1. package/dist/assets/{CreditAgentRoutes-EGBjL_QA.js → CreditAgentRoutes-CZZSVWOP.js} +2 -2
  2. package/dist/assets/{Preview-Bp7LjjJL.js → Preview-BSTKEBbJ.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-_xycI5Tm.js → ScreenRoutes-CNd21hfH.js} +46 -46
  4. package/dist/assets/{SignInScreen-DjMGwv_P.js → SignInScreen-CRHQ8OnU.js} +1 -1
  5. package/dist/assets/{analytics-Cf8VMhI6.js → analytics-R16_Exat.js} +1 -1
  6. package/dist/assets/{analyticsHelper-B9uatJmU.js → analyticsHelper-CQILqzn0.js} +1 -1
  7. package/dist/assets/{core-CdULW-3t.js → core-C-BvKSHF.js} +1 -1
  8. package/dist/assets/{dash.all.min-Op5LqHcz.js → dash.all.min-CaieTgkS.js} +1 -1
  9. package/dist/assets/{empty-6CytnshX.js → empty-B9bTdnzW.js} +1 -1
  10. package/dist/assets/{empty-C-kP4Oxg.js → empty-DCrqM1RS.js} +1 -1
  11. package/dist/assets/epic-BN1eY58B.js +2 -0
  12. package/dist/assets/{index-BY7-aN-8.js → index-B7A7Bq2L.js} +1 -1
  13. package/dist/assets/{index-C1YAZpnO.js → index-C7WL4CHp.js} +173 -159
  14. package/dist/assets/{index-xvmxjOcY.js → index-CX9wa_uF.js} +2 -2
  15. package/dist/assets/{index-BsoXaS6q.js → index-Csk7zXgi.js} +1 -1
  16. package/dist/assets/{index-_IbfNyua.js → index-DHJ37yIA.js} +1 -1
  17. package/dist/assets/{index-BhsS3MSz.js → index-DkxpWxmH.js} +1 -1
  18. package/dist/assets/{index-B6B4oczw.js → index-FfXn1jJZ.js} +1 -1
  19. package/dist/assets/{lexical-C7AYovNT.js → lexical-46kddbXs.js} +1 -1
  20. package/dist/assets/{liveblocks-8LNI_-un.js → liveblocks-3VYKPeI8.js} +1 -1
  21. package/dist/assets/{lottie-D6FG80ls.js → lottie-abtTF1Wk.js} +1 -1
  22. package/dist/assets/{mui-DS3kX5RH.js → mui-rEjY64BN.js} +1 -1
  23. package/dist/assets/{react-IgQ6f3xs.js → react-8YaHGfrj.js} +1 -1
  24. package/dist/assets/{react-ssGgJPMM.js → react-BItXTjSE.js} +1 -1
  25. package/dist/assets/{react-Gkc9pQ1D.js → react-CVbn6iDw.js} +1 -1
  26. package/dist/assets/{react-BrkJkxic.js → react-D0CeM3Sq.js} +1 -1
  27. package/dist/assets/{react-BO_kuGUJ.js → react-DuG7xkeH.js} +1 -1
  28. package/dist/assets/{react-g57ID3CP.js → react-NMCykv0c.js} +1 -1
  29. package/dist/assets/{react-CcXGz_EV.js → react-riIYQDaq.js} +1 -1
  30. package/dist/assets/{react-B_E2Fr1w.js → react-sDuEJMaJ.js} +2 -2
  31. package/dist/assets/{recharts-C6TNix1L.js → recharts-6O0k3Sgn.js} +1 -1
  32. package/dist/assets/{sentry-E4N6qVV9.js → sentry-CR3PzqvD.js} +1 -1
  33. package/dist/assets/{url-Du2K5z9O.js → url-kOslY_9p.js} +1 -1
  34. package/dist/assets/{url-D7eab2JP.js → url-mBOiBJLr.js} +1 -1
  35. package/dist/assets/{utils-DLASqRfP.js → utils-CMlimj8x.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-Djpoh0Ks.js → zeni-epic-state-Dx-mgwwn.js} +4 -4
  37. package/dist/index.html +1 -1
  38. package/package.json +3 -3
  39. package/dist/assets/epic-CZ3D01bf.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-8LNI_-un.js";import{u as D,P as j}from"./ScreenRoutes-_xycI5Tm.js";import{a as f}from"./sentry-E4N6qVV9.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-CdULW-3t.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-Djpoh0Ks.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-C1YAZpnO.js";import{n as ee}from"./mui-DS3kX5RH.js";import"./recharts-C6TNix1L.js";import"./analyticsHelper-B9uatJmU.js";import"./utils-DLASqRfP.js";import"./empty-C-kP4Oxg.js";import"./index-BhsS3MSz.js";import"./url-Du2K5z9O.js";import"./index-B6B4oczw.js";import"./analytics-Cf8VMhI6.js";import"./lottie-D6FG80ls.js";import"./lexical-C7AYovNT.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]="28aecc83-35e9-4f08-b46f-1e8b33a442a1",a._sentryDebugIdIdentifier="sentry-dbid-28aecc83-35e9-4f08-b46f-1e8b33a442a1")}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`
1
+ import{j as s}from"./liveblocks-3VYKPeI8.js";import{u as D,P as k}from"./ScreenRoutes-CNd21hfH.js";import{a as f}from"./sentry-CR3PzqvD.js";import{i as v,n as P,g as m,h as j,k as C,l as I,N as R}from"./core-C-BvKSHF.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-Dx-mgwwn.js";import{z as J,$ as q,d as V,e as Q,a0 as X,U as Z,J as G,b as H,g as W,h as Y}from"./index-C7WL4CHp.js";import{n as ee}from"./mui-rEjY64BN.js";import"./recharts-6O0k3Sgn.js";import"./analyticsHelper-CQILqzn0.js";import"./utils-CMlimj8x.js";import"./empty-DCrqM1RS.js";import"./index-DkxpWxmH.js";import"./url-kOslY_9p.js";import"./index-FfXn1jJZ.js";import"./analytics-R16_Exat.js";import"./lottie-abtTF1Wk.js";import"./lexical-46kddbXs.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]="6ba5ce7e-a5f7-48e1-b989-ff7106153451",a._sentryDebugIdIdentifier="sentry-dbid-6ba5ce7e-a5f7-48e1-b989-ff7106153451")}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=j(te,ne)(X),oe=ee.div`
2
2
  padding: ${Q.sp5};
3
3
  text-align: center;
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};
4
+ `;function re(){const a=v(),t=P(),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(k,{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-E4N6qVV9.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-CR3PzqvD.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};