@zeniai/web-cockpit-ui 2.0.63-qa → 2.0.64-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 (38) hide show
  1. package/dist/assets/{CreditAgentRoutes-i3Ixxn2s.js → CreditAgentRoutes-CZcgxkMB.js} +2 -2
  2. package/dist/assets/{Preview-BTUI1Uiw.js → Preview-DD9zvG00.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-BhR7Tm-U.js → ScreenRoutes-Djx4dRzh.js} +54 -54
  4. package/dist/assets/{SignInScreen-Z61jpSb2.js → SignInScreen-BHUegIRI.js} +1 -1
  5. package/dist/assets/{analytics-BxvmrX26.js → analytics-B2hsaEy7.js} +1 -1
  6. package/dist/assets/{analyticsHelper-BJtK3Dx6.js → analyticsHelper-BZS0I6v-.js} +1 -1
  7. package/dist/assets/{core-DLV42a6M.js → core-CM4p0Co0.js} +1 -1
  8. package/dist/assets/{dash.all.min-BfYQ2v4i.js → dash.all.min-BKQDUqv0.js} +1 -1
  9. package/dist/assets/{empty-bIsGjN9W.js → empty-C8tlhTRL.js} +1 -1
  10. package/dist/assets/{empty-Bg4j2Nw1.js → empty-DhwpYSCm.js} +1 -1
  11. package/dist/assets/{epic-D0YRoiIf.js → epic-D6ATumHm.js} +1 -1
  12. package/dist/assets/{index-xvxAUB5j.js → index-B-PlM4lq.js} +1 -1
  13. package/dist/assets/{index-DE-QgwP_.js → index-B3xaWkGf.js} +2 -2
  14. package/dist/assets/{index-CmCLOFKm.js → index-BNZju5Cr.js} +1 -1
  15. package/dist/assets/{index-DQdF8mlI.js → index-Ba4X4Xk1.js} +5616 -5549
  16. package/dist/assets/{index-Cn74QgJJ.js → index-CD5_EQTD.js} +1 -1
  17. package/dist/assets/{index-Blxt6Vgq.js → index-D7OiyiPz.js} +1 -1
  18. package/dist/assets/{index-CmSRkexQ.js → index-Dj_s_aH5.js} +1 -1
  19. package/dist/assets/{lexical-B6nK-JPu.js → lexical-D06_aJdj.js} +1 -1
  20. package/dist/assets/{liveblocks-DyxuTsIt.js → liveblocks-Bj8ZC2nf.js} +1 -1
  21. package/dist/assets/{lottie-BJWt08_D.js → lottie-CfZwxhnX.js} +1 -1
  22. package/dist/assets/{mui-C2fNxv7X.js → mui-DH0dBLi8.js} +1 -1
  23. package/dist/assets/{react-BoJJVyjh.js → react-B-ojiQrf.js} +1 -1
  24. package/dist/assets/{react-aHbgyIUK.js → react-CUeaQcgf.js} +1 -1
  25. package/dist/assets/{react-DdtOY6eh.js → react-D4u7YMje.js} +1 -1
  26. package/dist/assets/{react-CEMh4u3u.js → react-DCegsg9K.js} +2 -2
  27. package/dist/assets/{react-De3FX93v.js → react-DXo1VCmj.js} +1 -1
  28. package/dist/assets/{react-DYek0zTF.js → react-Dieo_Dex.js} +1 -1
  29. package/dist/assets/{react-CYx1no-y.js → react-Dl7VKlDA.js} +1 -1
  30. package/dist/assets/{react-g1mQjh1g.js → react-To9oll4a.js} +1 -1
  31. package/dist/assets/{recharts-Bt0D1hwQ.js → recharts-CiWIxkOg.js} +1 -1
  32. package/dist/assets/{sentry-CsvM6N1o.js → sentry-B4-0XuJ-.js} +1 -1
  33. package/dist/assets/{url-DWFoSVZO.js → url-CE168tOm.js} +1 -1
  34. package/dist/assets/{url-CXXt-sAc.js → url-D362l8T4.js} +1 -1
  35. package/dist/assets/{utils-7PjI94Nv.js → utils-CyuVQhq2.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-BiolUNwL.js → zeni-epic-state-k9czSruT.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DyxuTsIt.js";import{u as j,P as v}from"./ScreenRoutes-BhR7Tm-U.js";import{a as f}from"./sentry-CsvM6N1o.js";import{i as P,n as R,g as m,h as U,k as A,l as C,N as k}from"./core-DLV42a6M.js";import{Iw as T,Ix as N,jR as E,Iy as M,kA as L,kD as $,kp as _,Iz as F,IA as O,kx as B,kt as q}from"./zeni-epic-state-BiolUNwL.js";import{z as Q,$ as V,D as J,o as Z,a0 as G,F as H,Q as K,b as W,g as X,h as Y}from"./index-DQdF8mlI.js";import{n as ee}from"./mui-C2fNxv7X.js";import"./recharts-Bt0D1hwQ.js";import"./analyticsHelper-BJtK3Dx6.js";import"./utils-7PjI94Nv.js";import"./empty-bIsGjN9W.js";import"./index-xvxAUB5j.js";import"./url-CXXt-sAc.js";import"./index-CmSRkexQ.js";import"./analytics-BxvmrX26.js";import"./lottie-BJWt08_D.js";import"./lexical-B6nK-JPu.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]="a4739f01-99b2-4ce2-9ce9-81be95c4d3c5",a._sentryDebugIdIdentifier="sentry-dbid-a4739f01-99b2-4ce2-9ce9-81be95c4d3c5")}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(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(F(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(G),oe=ee.div`
1
+ import{j as s}from"./liveblocks-Bj8ZC2nf.js";import{u as j,P as v}from"./ScreenRoutes-Djx4dRzh.js";import{a as f}from"./sentry-B4-0XuJ-.js";import{i as P,n as R,g as m,h as U,k as A,l as C,N as k}from"./core-CM4p0Co0.js";import{Iw as T,Ix as N,jR as E,Iy as M,kA as L,kD as _,kp as $,Iz as F,IA as O,kx as B,kt as q}from"./zeni-epic-state-k9czSruT.js";import{z as Q,_ as V,D as J,o as Z,a0 as G,F as H,Q as K,b as W,g as X,h as Y}from"./index-Ba4X4Xk1.js";import{n as ee}from"./mui-DH0dBLi8.js";import"./recharts-CiWIxkOg.js";import"./analyticsHelper-BZS0I6v-.js";import"./utils-CyuVQhq2.js";import"./empty-C8tlhTRL.js";import"./index-B-PlM4lq.js";import"./url-D362l8T4.js";import"./index-Dj_s_aH5.js";import"./analytics-B2hsaEy7.js";import"./lottie-CfZwxhnX.js";import"./lexical-D06_aJdj.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]="78f004d0-9d19-4069-8572-ec7982060aec",a._sentryDebugIdIdentifier="sentry-dbid-78f004d0-9d19-4069-8572-ec7982060aec")}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(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(F(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(G),oe=ee.div`
2
2
  padding: ${Z.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=P(),t=R(),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(E())},[t,y]);const d=Q.getSignedInUser(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??I;t($({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${V}/tableDownload?query=${z}`;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,I,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 x=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:w,cardProfilesData:x})}function we(){const{isAllowed:a,isLoading:t}=j();return t?null:a?s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(k,{to:"/management",replace:!0})})})}export{we as default};
4
+ `;function re(){const a=P(),t=R(),n=m(T),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=Q.getSignedInUser(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t($())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??I;t(_({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=y??"";if(!o||!r||!i)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${V}/tableDownload?query=${z}`;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,I,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 x=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:w,cardProfilesData:x})}function we(){const{isAllowed:a,isLoading:t}=j();return t?null:a?s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(k,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-CsvM6N1o.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-B4-0XuJ-.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};