@zeniai/web-cockpit-ui 2.0.42-qa → 2.0.43-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 (42) hide show
  1. package/dist/assets/CreditAgentRoutes-DDER6d5S.js +4 -0
  2. package/dist/assets/{Preview-C8h-I9xC.js → Preview-Dma6iUQv.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-BFcNqAS2.js → ScreenRoutes-DNUqIx1c.js} +58 -58
  4. package/dist/assets/SignInScreen-DtVPGarA.js +1 -0
  5. package/dist/assets/{analytics-DokAJ3Ye.js → analytics-PAFomk5X.js} +1 -1
  6. package/dist/assets/analyticsHelper-Bp1Yzrax.js +1 -0
  7. package/dist/assets/{core-Bnm3RUSq.js → core-BK-AVgQn.js} +1 -1
  8. package/dist/assets/{dash.all.min-obheuErO.js → dash.all.min-DPPmlVqb.js} +1 -1
  9. package/dist/assets/{empty-D9zogDVI.js → empty-BNY4abw3.js} +1 -1
  10. package/dist/assets/{empty-DqAQJalm.js → empty-DoK7uDqf.js} +1 -1
  11. package/dist/assets/epic-DQ3c6LCh.js +2 -0
  12. package/dist/assets/{index-CkEMRgsZ.js → index-BR5HupEq.js} +2 -2
  13. package/dist/assets/{index-D5PI1mbP.js → index-CVxlChPx.js} +1 -1
  14. package/dist/assets/{index-SC4P_Bba.js → index-Cm5nGQyA.js} +1 -1
  15. package/dist/assets/{index-CGwlhiDX.js → index-CrrVNGPO.js} +1 -1
  16. package/dist/assets/{index-CdXSc6GE.js → index-D7GOuLi8.js} +9540 -9356
  17. package/dist/assets/{index-DHwQK_nc.js → index-DlCCukf1.js} +1 -1
  18. package/dist/assets/{index-BOYdQFuP.js → index-ddpyM2vA.js} +1 -1
  19. package/dist/assets/{lexical-uPku2AVH.js → lexical-tQpWORqy.js} +1 -1
  20. package/dist/assets/{liveblocks-C8J5Wszx.js → liveblocks-CzMoYG_p.js} +1 -1
  21. package/dist/assets/{lottie-6PLBZFMP.js → lottie-DTWlzvs7.js} +1 -1
  22. package/dist/assets/{mui-CTnPZiIh.js → mui-BqexhJJj.js} +1 -1
  23. package/dist/assets/{react-B-4Od6QQ.js → react-B3OULRlD.js} +1 -1
  24. package/dist/assets/{react-Dzc4jYMm.js → react-Ba9QE8EN.js} +1 -1
  25. package/dist/assets/{react-DAUQ_FgX.js → react-BbQxrK_d.js} +1 -1
  26. package/dist/assets/{react-D6BGBLir.js → react-C17tRmNK.js} +1 -1
  27. package/dist/assets/{react-A4Wj4uD6.js → react-CmWj8ZV9.js} +1 -1
  28. package/dist/assets/{react-CSN-fp0n.js → react-DzEs92ey.js} +1 -1
  29. package/dist/assets/{react-BNl5MXPA.js → react-mJ0awhvr.js} +1 -1
  30. package/dist/assets/{react-DdjS0-WH.js → react-zs9oVX2b.js} +2 -2
  31. package/dist/assets/{recharts-DjnYlkBF.js → recharts-DAa4eu61.js} +1 -1
  32. package/dist/assets/{sentry-sKT3qIYM.js → sentry-rP2pOrBz.js} +1 -1
  33. package/dist/assets/{url-DvlLAJer.js → url-Cbij-gzn.js} +1 -1
  34. package/dist/assets/{url-D4l4mfcW.js → url-DSD53f9F.js} +1 -1
  35. package/dist/assets/{utils-Brol9MnI.js → utils-CvYApMAr.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-C-8O6OI2.js → zeni-epic-state-D3jSoBJ0.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +5 -4
  39. package/dist/assets/CreditAgentRoutes-Moa7DxNe.js +0 -4
  40. package/dist/assets/SignInScreen-CnmxC19c.js +0 -1
  41. package/dist/assets/analyticsHelper-BSF5MbkQ.js +0 -1
  42. package/dist/assets/epic-B3paEx9c.js +0 -2
@@ -0,0 +1,4 @@
1
+ import{j as i}from"./liveblocks-CzMoYG_p.js";import{z as w,P,O as v,o as E,R,Q as j,d as k,g as N,e as T,$ as M,x as $}from"./index-D7GOuLi8.js";import{a as f}from"./sentry-rP2pOrBz.js";import{i as L,n as _,g as S,h as H,k as I,l as C,N as O}from"./core-BK-AVgQn.js";import{HX as B,HY as F,jJ as V,HZ as q,kd as J,kg as Q,k0 as Z,H_ as X,H$ as Y,ka as G,k6 as K}from"./zeni-epic-state-D3jSoBJ0.js";import{n as W}from"./mui-BqexhJJj.js";import{P as ee}from"./ScreenRoutes-DNUqIx1c.js";import"./recharts-DAa4eu61.js";import"./analytics-PAFomk5X.js";import"./lottie-DTWlzvs7.js";import"./lexical-tQpWORqy.js";import"./utils-CvYApMAr.js";import"./analyticsHelper-Bp1Yzrax.js";import"./empty-DoK7uDqf.js";import"./index-DlCCukf1.js";import"./url-Cbij-gzn.js";import"./index-CrrVNGPO.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]="384b83f4-9bf4-4b2c-9649-85bb17f656a8",a._sentryDebugIdIdentifier="sentry-dbid-384b83f4-9bf4-4b2c-9649-85bb17f656a8")}catch{}})();function te(a,t){return{headerData:{selectedTabOption:j("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 u=T(n),r=N(n);k.trackCockpitTabClicked(r),t.navigate(`../../${u}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(K())},onSaveMacro:n=>{a(G(n))},onResetSaveMacro:()=>{a(Y())},onUIStateChange:n=>{a(X(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=H(te,ne)(R),oe=W.div`
2
+ padding: ${E.sp5};
3
+ text-align: center;
4
+ `;function se(){const a=L(),t=_(),n=S(B),u=S(F),[r,m]=f.useState(new Set),g=f.useRef(new Set),b=S(e=>e.tenantState.currentTenantId),y=S(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{y==="Not-Started"&&t(V())},[t,y]);const d=w.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,x=f.useMemo(()=>({onFetch:()=>{t(Z())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??A;t(Q({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(J(e))},onDownloadReport:()=>{const e=q(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=b??"";if(!o||!s||!c)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${P}/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,A,d,b,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(oe,{children:v.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(ae,{macroCombined:u,navigate:a,cardProfilesActions:x,cardProfilesData:U})}function we(){const{useDynamicConfig:a}=M(),{configValue:t,isDynamicConfigLoading:n}=a($.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(I,{children:i.jsx(C,{path:"/*",element:i.jsx(ee,{element:i.jsx(se,{})})})}):i.jsx(I,{children:i.jsx(C,{path:"/*",element:i.jsx(O,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-sKT3qIYM.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-rP2pOrBz.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};