@zeniai/web-cockpit-ui 2.3.2-qa → 2.3.3-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 (39) hide show
  1. package/dist/assets/{CreditAgentRoutes-D2JvgVxQ.js → CreditAgentRoutes-B-y4Ow4C.js} +2 -2
  2. package/dist/assets/{Preview-C_OKIQHv.js → Preview-DjO-YdD2.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-se46d5BX.js → ScreenRoutes-QOq89HBg.js} +59 -59
  4. package/dist/assets/SignInScreen-BZ3ePGP8.js +1 -0
  5. package/dist/assets/{analytics-BRwdn5Ye.js → analytics-B77CYaJ6.js} +1 -1
  6. package/dist/assets/{analyticsHelper-D5YiZexG.js → analyticsHelper-CzTy4q3Y.js} +1 -1
  7. package/dist/assets/{core-BtyQa0Q6.js → core-CB5RJv1L.js} +1 -1
  8. package/dist/assets/{dash.all.min-CDFmblL7.js → dash.all.min-DR-9qoKJ.js} +1 -1
  9. package/dist/assets/{empty-D_dK7Fqa.js → empty-Coe3ZCgj.js} +1 -1
  10. package/dist/assets/{empty-CKxhuwwG.js → empty-nyuRKrsk.js} +1 -1
  11. package/dist/assets/{epic-5dzhbIwd.js → epic-Btydi5vS.js} +2 -2
  12. package/dist/assets/{index-Cqc1T-u_.js → index-B5NxFaB1.js} +1 -1
  13. package/dist/assets/{index-B-ckE61F.js → index-CPg1dXeS.js} +1 -1
  14. package/dist/assets/{index-CFC_p7sJ.js → index-Cl1g_tMJ.js} +1 -1
  15. package/dist/assets/{index-AYsla65M.js → index-CvPyb4-a.js} +2 -2
  16. package/dist/assets/{index-CI8NYJlC.js → index-DTOH_mYH.js} +7771 -7605
  17. package/dist/assets/{index-DkCk8rTA.js → index-Dakm1To_.js} +1 -1
  18. package/dist/assets/{index-BDFBLS9J.js → index-Kb5YYX2u.js} +1 -1
  19. package/dist/assets/{lexical-D02-2S2A.js → lexical-Dj7AQBUx.js} +1 -1
  20. package/dist/assets/{liveblocks--Dqn9brN.js → liveblocks-CCHlehLS.js} +1 -1
  21. package/dist/assets/{lottie-O8kl90eL.js → lottie-CFaBi1o5.js} +1 -1
  22. package/dist/assets/{mui-DaoZ7ROl.js → mui-Dwg1lSct.js} +1 -1
  23. package/dist/assets/{react-SSwZpadw.js → react-BJYiNpNp.js} +2 -2
  24. package/dist/assets/{react-D1m3hMD9.js → react-C066NLm6.js} +1 -1
  25. package/dist/assets/{react-BBqenpuT.js → react-CG5xloKg.js} +1 -1
  26. package/dist/assets/{react-iym7D7nT.js → react-CdPZRvLv.js} +1 -1
  27. package/dist/assets/{react-DsVom99t.js → react-CvG3i-jl.js} +1 -1
  28. package/dist/assets/{react-hJBumPyz.js → react-DW1-CTDc.js} +1 -1
  29. package/dist/assets/{react-C5O6MXkR.js → react-Dk-iiJfi.js} +1 -1
  30. package/dist/assets/{react-CLmySivM.js → react-OFlB_s3Z.js} +1 -1
  31. package/dist/assets/{recharts-D50HJf2F.js → recharts-BZOUTCuH.js} +1 -1
  32. package/dist/assets/{sentry-CdaRWxBR.js → sentry-DFqLkoOb.js} +1 -1
  33. package/dist/assets/{url-lPRow7Tt.js → url-BR51p4UE.js} +1 -1
  34. package/dist/assets/{url-CKFmIAdm.js → url-DQZO7WpT.js} +1 -1
  35. package/dist/assets/{utils-CJqX-Eal.js → utils-MF_iNIXX.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-rXtygOtG.js → zeni-epic-state-DewVdU5J.js} +5 -5
  37. package/dist/index.html +1 -1
  38. package/package.json +3 -3
  39. package/dist/assets/SignInScreen-O_BR3dGq.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks--Dqn9brN.js";import{u as v,P}from"./ScreenRoutes-se46d5BX.js";import{a as f}from"./sentry-CdaRWxBR.js";import{i as T,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-BtyQa0Q6.js";import{SV as N,SW as k,lB as E,SX as M,mr as $,mu as L,mg as B,SY as _,SZ as O,mo as F,mk as V}from"./zeni-epic-state-rXtygOtG.js";import{z as q,T as W,G as Z,n as G,W as J,B as X,$ as Y,b as H,g as K,h as Q}from"./index-CI8NYJlC.js";import{n as ee}from"./mui-DaoZ7ROl.js";import"./recharts-D50HJf2F.js";import"./analyticsHelper-D5YiZexG.js";import"./utils-CJqX-Eal.js";import"./empty-D_dK7Fqa.js";import"./index-Cqc1T-u_.js";import"./url-CKFmIAdm.js";import"./index-B-ckE61F.js";import"./analytics-BRwdn5Ye.js";import"./lottie-O8kl90eL.js";import"./lexical-D02-2S2A.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]="f1c42e4e-543c-44c3-ae63-323d09f3e389",a._sentryDebugIdIdentifier="sentry-dbid-f1c42e4e-543c-44c3-ae63-323d09f3e389")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(J),oe=ee.div`
1
+ import{j as s}from"./liveblocks-CCHlehLS.js";import{u as v,P}from"./ScreenRoutes-QOq89HBg.js";import{a as u}from"./sentry-DFqLkoOb.js";import{i as U,n as R,g as m,h as T,k as C,l as I,N as j}from"./core-CB5RJv1L.js";import{SV as N,SW as k,lB as E,SX as M,mr as $,mu as L,mg as B,SY as _,SZ as O,mo as F,mk as V}from"./zeni-epic-state-DewVdU5J.js";import{z as q,S as W,G as Z,n as G,W as J,B as X,$ as Y,b as H,g as K,h as Q}from"./index-DTOH_mYH.js";import{n as ee}from"./mui-Dwg1lSct.js";import"./recharts-BZOUTCuH.js";import"./analyticsHelper-CzTy4q3Y.js";import"./utils-MF_iNIXX.js";import"./empty-Coe3ZCgj.js";import"./index-B5NxFaB1.js";import"./url-DQZO7WpT.js";import"./index-CPg1dXeS.js";import"./analytics-B77CYaJ6.js";import"./lottie-CFaBi1o5.js";import"./lexical-Dj7AQBUx.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]="7a1b0426-54dc-4a2c-8b37-c967dca5ba09",a._sentryDebugIdIdentifier="sentry-dbid-7a1b0426-54dc-4a2c-8b37-c967dca5ba09")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(J),oe=ee.div`
2
2
  padding: ${G.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=T(),t=U(),n=m(N),g=m(k),[c,h]=f.useState(new Set),S=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(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(B())},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($(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=`${W}/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),p=document.createElement("a");p.href=u,p.download=`${e.file_name}.xlsx`,p.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?S.current.add(o):r!=null&&!r.isAnalyzing&&S.current.has(o)&&(e.add(o),S.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 z=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:Z.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=v();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(P,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{to:"/management",replace:!0})})})}export{we as default};
4
+ `;function re(){const a=U(),t=R(),n=m(N),g=m(k),[c,h]=u.useState(new Set),S=u.useRef(new Set),b=m(e=>e.tenantState.currentTenantId),y=m(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{y==="Not-Started"&&t(E())},[t,y]);const d=q.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=u.useMemo(()=>({onFetch:()=>{t(B())},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($(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=`${W}/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 f=await l.text();throw new Error(`Download failed: ${l.status} ${f}`)}return l.blob()}).then(l=>{const f=URL.createObjectURL(l),p=document.createElement("a");p.href=f,p.download=`${e.file_name}.xlsx`,p.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,A,d,b,n.rows]);u.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?S.current.add(o):r!=null&&!r.isAnalyzing&&S.current.has(o)&&(e.add(o),S.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 z=u.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:Z.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=v();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(P,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-CdaRWxBR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};
1
+ import{a as h,R as n}from"./sentry-DFqLkoOb.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};