@zeniai/web-cockpit-ui 2.0.48-qa → 2.0.49-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-D_7Dpj9O.js → CreditAgentRoutes-D9SFPfm2.js} +2 -2
  2. package/dist/assets/{Preview-DqR4j-Xf.js → Preview-DrOGECVp.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-CS2_aeRR.js → ScreenRoutes-qAexh_yy.js} +63 -63
  4. package/dist/assets/SignInScreen-DdR3fDCP.js +1 -0
  5. package/dist/assets/{analytics-ecyyi-wb.js → analytics-BP0-eL9U.js} +1 -1
  6. package/dist/assets/{analyticsHelper-DDcwBkup.js → analyticsHelper-Czpqa46n.js} +1 -1
  7. package/dist/assets/{core-46pGfjXz.js → core-C9lRQDVT.js} +1 -1
  8. package/dist/assets/{dash.all.min-B3GZ2heA.js → dash.all.min-BMvzmTHf.js} +1 -1
  9. package/dist/assets/{empty-C0nRyX6l.js → empty-BM8bu85r.js} +1 -1
  10. package/dist/assets/{empty-Ck3HSWjb.js → empty-CHv_zVX7.js} +1 -1
  11. package/dist/assets/{epic-BZ5tvX-u.js → epic-BUDA-oTO.js} +1 -1
  12. package/dist/assets/{index-DT7I1K6v.js → index-A8b8Up6l.js} +301 -263
  13. package/dist/assets/{index-BQTogObU.js → index-B4cXkYNH.js} +1 -1
  14. package/dist/assets/{index-D-rd4vRb.js → index-B9IvN5UU.js} +1 -1
  15. package/dist/assets/{index-ChHsqDO0.js → index-BPrDI7cw.js} +1 -1
  16. package/dist/assets/{index-Cl7DDygh.js → index-BQK7-Vtx.js} +1 -1
  17. package/dist/assets/{index-BW0QBFsX.js → index-D3p7h-1X.js} +1 -1
  18. package/dist/assets/{index-HKbwY37S.js → index-DGoub7bF.js} +2 -2
  19. package/dist/assets/{lexical-MUGR2epJ.js → lexical-BEGdJTSz.js} +1 -1
  20. package/dist/assets/{liveblocks-BbHws-Bg.js → liveblocks-BcOKrrv4.js} +1 -1
  21. package/dist/assets/{lottie-CZVnD28T.js → lottie-CA3bbxyN.js} +1 -1
  22. package/dist/assets/{mui-BtnARzbc.js → mui-DXElAUlw.js} +1 -1
  23. package/dist/assets/{react-DajJTWj0.js → react-15wf8bJi.js} +1 -1
  24. package/dist/assets/{react-D_SyhRhf.js → react-BSFjo2FR.js} +1 -1
  25. package/dist/assets/{react-45Xwe9kA.js → react-Bn1oI4oA.js} +1 -1
  26. package/dist/assets/{react-DTVGlDV-.js → react-CKkBZwr_.js} +2 -2
  27. package/dist/assets/{react-CLiZmhpe.js → react-D4RL7nuC.js} +1 -1
  28. package/dist/assets/{react-CXCEeogS.js → react-DE7iA-dX.js} +1 -1
  29. package/dist/assets/{react-CrG11xtb.js → react-DZjJ1o97.js} +1 -1
  30. package/dist/assets/{react-C5F8ExHE.js → react-Dj-xKkMv.js} +1 -1
  31. package/dist/assets/{recharts-BHVrOcVe.js → recharts-CUqUOBzY.js} +1 -1
  32. package/dist/assets/{sentry-BvJc6z_I.js → sentry-G-2zuVlh.js} +1 -1
  33. package/dist/assets/{url-8re7SoxQ.js → url-DY-LkLhQ.js} +1 -1
  34. package/dist/assets/{url-BbYx_83m.js → url-gGAFhVAr.js} +1 -1
  35. package/dist/assets/{utils-BgXAHH0E.js → utils-D-TVQK2B.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-D9TRC4fe.js → zeni-epic-state-DSAzSmo9.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-DuE3XNQU.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-BbHws-Bg.js";import{z as w,$ as v,D as j,o as E,a0 as P,F as k,Q as R,c as T,g as N,d as M,v as $,x as L}from"./index-DT7I1K6v.js";import{a as f}from"./sentry-BvJc6z_I.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-46pGfjXz.js";import{H$ as V,I0 as q,jM as Q,I1 as H,kg as J,kj as Z,k3 as G,I2 as K,I3 as W,kd as X,k9 as Y}from"./zeni-epic-state-D9TRC4fe.js";import{n as ee}from"./mui-BtnARzbc.js";import{P as te}from"./ScreenRoutes-CS2_aeRR.js";import"./recharts-BHVrOcVe.js";import"./analytics-ecyyi-wb.js";import"./lottie-CZVnD28T.js";import"./lexical-MUGR2epJ.js";import"./utils-BgXAHH0E.js";import"./analyticsHelper-DDcwBkup.js";import"./empty-C0nRyX6l.js";import"./index-D-rd4vRb.js";import"./url-8re7SoxQ.js";import"./index-Cl7DDygh.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]="3e227ca6-7b7f-4a82-8a9d-2633141e145d",a._sentryDebugIdIdentifier="sentry-dbid-3e227ca6-7b7f-4a82-8a9d-2633141e145d")}catch{}})();function ne(a,t){return{headerData:{allTabOptions:k,selectedTabOption:R("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ae(a,t){return{headerActions:{onTabChange:n=>{const u=M(n),r=N(n);T.trackCockpitTabClicked(r),t.navigate(`../../${u}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(Y())},onSaveMacro:n=>{a(X(n))},onResetSaveMacro:()=>{a(W())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const oe=O(ne,ae)(P),se=ee.div`
1
+ import{j as i}from"./liveblocks-BcOKrrv4.js";import{z as w,$ as v,D as j,o as E,a0 as P,F as k,Q as R,c as T,g as N,d as M,v as $,i as L}from"./index-A8b8Up6l.js";import{a as u}from"./sentry-G-2zuVlh.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-C9lRQDVT.js";import{H$ as V,I0 as q,jM as Q,I1 as H,kg as J,kj as Z,k3 as G,I2 as K,I3 as W,kd as X,k9 as Y}from"./zeni-epic-state-DSAzSmo9.js";import{n as ee}from"./mui-DXElAUlw.js";import{P as te}from"./ScreenRoutes-qAexh_yy.js";import"./recharts-CUqUOBzY.js";import"./analytics-BP0-eL9U.js";import"./lottie-CA3bbxyN.js";import"./lexical-BEGdJTSz.js";import"./utils-D-TVQK2B.js";import"./analyticsHelper-Czpqa46n.js";import"./empty-BM8bu85r.js";import"./index-B9IvN5UU.js";import"./url-DY-LkLhQ.js";import"./index-BQK7-Vtx.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]="462210c6-0da4-401b-90c4-de95359e735c",a._sentryDebugIdIdentifier="sentry-dbid-462210c6-0da4-401b-90c4-de95359e735c")}catch{}})();function ne(a,t){return{headerData:{allTabOptions:k,selectedTabOption:R("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ae(a,t){return{headerActions:{onTabChange:n=>{const f=M(n),r=N(n);T.trackCockpitTabClicked(r),t.navigate(`../../${f}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(Y())},onSaveMacro:n=>{a(X(n))},onResetSaveMacro:()=>{a(W())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const oe=O(ne,ae)(P),se=ee.div`
2
2
  padding: ${E.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=_(),t=F(),n=S(V),u=S(q),[r,m]=f.useState(new Set),g=f.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),b=S(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{b==="Not-Started"&&t(Q())},[t,b]);const d=w.getSignedInUser(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,x=f.useMemo(()=>({onFetch:()=>{t(G())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??I;t(Z({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(J(e))},onDownloadReport:()=>{const e=H(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=y??"";if(!o||!s||!c)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${v}/tableDownload?query=${z}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"zeni-tenant-id":c}}).then(async l=>{if(!l.ok){const p=await l.text();throw new Error(`Download failed: ${l.status} ${p}`)}return l.blob()}).then(l=>{const p=URL.createObjectURL(l),h=document.createElement("a");h.href=p,h.download=`${e.file_name}.xlsx`,h.click(),URL.revokeObjectURL(p)}).catch(()=>{})}}),[t,I,d,y,n.rows]);f.useEffect(()=>{if(r.size===0)return;const e=new Set;for(const o of r){const s=n.rows.find(c=>c.tenantId===o);s!=null&&s.isAnalyzing?g.current.add(o):s!=null&&!s.isAnalyzing&&g.current.has(o)&&(e.add(o),g.current.delete(o))}e.size>0&&m(o=>{const s=new Set(o);for(const c of e)s.delete(c);return s})},[n.rows,r]);const U=f.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&r.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,r]);return d==null?i.jsx(se,{children:j.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(oe,{macroCombined:u,navigate:a,cardProfilesActions:x,cardProfilesData:U})}function xe(){const{useDynamicConfig:a}=$(),{configValue:t,isDynamicConfigLoading:n}=a(L.creditAgentEnablement);if(n)return null;const r=w.getSignedInUser()?.userEmail,m=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&m.includes(r)?i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(te,{element:i.jsx(re,{})})})}):i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(B,{to:"/management",replace:!0})})})}export{xe as default};
4
+ `;function re(){const a=_(),t=F(),n=S(V),f=S(q),[r,m]=u.useState(new Set),g=u.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),b=S(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{b==="Not-Started"&&t(Q())},[t,b]);const d=w.getSignedInUser(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,U=u.useMemo(()=>({onFetch:()=>{t(G())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??I;t(Z({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(J(e))},onDownloadReport:()=>{const e=H(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=y??"";if(!o||!s||!c)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${v}/tableDownload?query=${z}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"zeni-tenant-id":c}}).then(async l=>{if(!l.ok){const p=await l.text();throw new Error(`Download failed: ${l.status} ${p}`)}return l.blob()}).then(l=>{const p=URL.createObjectURL(l),h=document.createElement("a");h.href=p,h.download=`${e.file_name}.xlsx`,h.click(),URL.revokeObjectURL(p)}).catch(()=>{})}}),[t,I,d,y,n.rows]);u.useEffect(()=>{if(r.size===0)return;const e=new Set;for(const o of r){const s=n.rows.find(c=>c.tenantId===o);s!=null&&s.isAnalyzing?g.current.add(o):s!=null&&!s.isAnalyzing&&g.current.has(o)&&(e.add(o),g.current.delete(o))}e.size>0&&m(o=>{const s=new Set(o);for(const c of e)s.delete(c);return s})},[n.rows,r]);const x=u.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&r.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,r]);return d==null?i.jsx(se,{children:j.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(oe,{macroCombined:f,navigate:a,cardProfilesActions:U,cardProfilesData:x})}function Ue(){const{useDynamicConfig:a}=$(),{configValue:t,isDynamicConfigLoading:n}=a(L.creditAgentEnablement);if(n)return null;const r=w.getSignedInUser()?.userEmail,m=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&m.includes(r)?i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(te,{element:i.jsx(re,{})})})}):i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(B,{to:"/management",replace:!0})})})}export{Ue as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-BvJc6z_I.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-G-2zuVlh.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};