@zeniai/web-cockpit-ui 2.0.46-qa → 2.0.47-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 (39) hide show
  1. package/dist/assets/{CreditAgentRoutes-83nDVTnv.js → CreditAgentRoutes-DDMN-H0h.js} +1 -1
  2. package/dist/assets/{Preview-DfcSWVUL.js → Preview-DkNfw2Tt.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-5QLKBx1b.js → ScreenRoutes-3VOs87yl.js} +63 -63
  4. package/dist/assets/SignInScreen-BmJJsIDQ.js +1 -0
  5. package/dist/assets/{analytics-BDGa8D70.js → analytics-J7jneoas.js} +1 -1
  6. package/dist/assets/{analyticsHelper-B1-Ac4k6.js → analyticsHelper-BBGnLZPC.js} +1 -1
  7. package/dist/assets/{core-6-QwU9ti.js → core-CFgPy0lB.js} +1 -1
  8. package/dist/assets/{dash.all.min-5yi4I5VR.js → dash.all.min-D6KODeYm.js} +1 -1
  9. package/dist/assets/{empty-CPfU2SIs.js → empty-5-jg_MW9.js} +1 -1
  10. package/dist/assets/{empty-CWVPrwmN.js → empty-Chy3AVOM.js} +1 -1
  11. package/dist/assets/{epic-Gr7L9hY2.js → epic-BAMm1U6I.js} +2 -2
  12. package/dist/assets/{index-BpDZzCXf.js → index-BDUrINs_.js} +2 -2
  13. package/dist/assets/{index-CZz-6x-m.js → index-BYAgnMUA.js} +1 -1
  14. package/dist/assets/{index-DLWWS3DR.js → index-C3Igln-u.js} +1 -1
  15. package/dist/assets/{index-CXTiaJRu.js → index-CgbHHw4X.js} +1 -1
  16. package/dist/assets/{index-DVrIYvD8.js → index-CjSh8jjS.js} +1 -1
  17. package/dist/assets/{index-CVRgL18W.js → index-Cr1M1yC1.js} +374 -367
  18. package/dist/assets/{index-CJhp5Dc_.js → index-rgSSVW8a.js} +1 -1
  19. package/dist/assets/{lexical-um8tI_jl.js → lexical-Ck7TqWj1.js} +1 -1
  20. package/dist/assets/{liveblocks-DCPhfHPM.js → liveblocks-BCmu7kHc.js} +1 -1
  21. package/dist/assets/{lottie-BZbiiBeg.js → lottie-CHwPpfIp.js} +1 -1
  22. package/dist/assets/{mui-7qNfYniz.js → mui-HsHaB91c.js} +1 -1
  23. package/dist/assets/{react-Q6ho4gTe.js → react-BLOB2gsa.js} +1 -1
  24. package/dist/assets/{react-kwuORo42.js → react-B_oCyTMU.js} +1 -1
  25. package/dist/assets/{react-D96loYAI.js → react-BwfCFFUs.js} +2 -2
  26. package/dist/assets/{react-tCqzC9rh.js → react-CAAGZaJO.js} +1 -1
  27. package/dist/assets/{react-BxdMLfLx.js → react-CVd9c6SJ.js} +1 -1
  28. package/dist/assets/{react-DnjscUjs.js → react-DG_MgRja.js} +1 -1
  29. package/dist/assets/{react-VY2zD3DB.js → react-DSosi6-V.js} +1 -1
  30. package/dist/assets/{react-ClM8B_qK.js → react-vTi5jg77.js} +1 -1
  31. package/dist/assets/{recharts-D9O7cX1h.js → recharts-Bl6OGTuB.js} +1 -1
  32. package/dist/assets/{sentry-C7howdz0.js → sentry-TVfQ8xtf.js} +1 -1
  33. package/dist/assets/{url-DHPl6ckp.js → url-CPAV9err.js} +1 -1
  34. package/dist/assets/{url-DmTm6FzR.js → url-vj_Ju90C.js} +1 -1
  35. package/dist/assets/{utils-ZF2FqXFn.js → utils-BeE4VD5F.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-BTGBxnGe.js → zeni-epic-state-L3A780f6.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-BAcIYcHK.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-DCPhfHPM.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-CVRgL18W.js";import{a as f}from"./sentry-C7howdz0.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-6-QwU9ti.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-BTGBxnGe.js";import{n as ee}from"./mui-7qNfYniz.js";import{P as te}from"./ScreenRoutes-5QLKBx1b.js";import"./recharts-D9O7cX1h.js";import"./analytics-BDGa8D70.js";import"./lottie-BZbiiBeg.js";import"./lexical-um8tI_jl.js";import"./utils-ZF2FqXFn.js";import"./analyticsHelper-B1-Ac4k6.js";import"./empty-CPfU2SIs.js";import"./index-CJhp5Dc_.js";import"./url-DHPl6ckp.js";import"./index-CZz-6x-m.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-BCmu7kHc.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-Cr1M1yC1.js";import{a as f}from"./sentry-TVfQ8xtf.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-CFgPy0lB.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-L3A780f6.js";import{n as ee}from"./mui-HsHaB91c.js";import{P as te}from"./ScreenRoutes-3VOs87yl.js";import"./recharts-Bl6OGTuB.js";import"./analytics-J7jneoas.js";import"./lottie-CHwPpfIp.js";import"./lexical-Ck7TqWj1.js";import"./utils-BeE4VD5F.js";import"./analyticsHelper-BBGnLZPC.js";import"./empty-5-jg_MW9.js";import"./index-rgSSVW8a.js";import"./url-CPAV9err.js";import"./index-BYAgnMUA.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`
2
2
  padding: ${E.sp5};
3
3
  text-align: center;
4
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};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-C7howdz0.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-TVfQ8xtf.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};