@zeniai/web-cockpit-ui 2.0.71-qa → 2.0.72-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 (43) hide show
  1. package/dist/assets/CreditAgentRoutes-Cb-wiD-6.js +4 -0
  2. package/dist/assets/{Preview-hKoSq_BE.js → Preview-CdCC-rni.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-Dgjv88TS.js → ScreenRoutes-ZB28w3FJ.js} +70 -70
  4. package/dist/assets/SignInScreen-DfcBPiQ9.js +1 -0
  5. package/dist/assets/{analytics-DbD8mXH3.js → analytics-ZkA9Ipck.js} +1 -1
  6. package/dist/assets/{analyticsHelper-6wB1_OrE.js → analyticsHelper-Bak3EeoW.js} +1 -1
  7. package/dist/assets/{core-bIk6XnX2.js → core-Bik8c0_9.js} +1 -1
  8. package/dist/assets/{dash.all.min-DORu4qs_.js → dash.all.min-Dyi-uQFk.js} +1 -1
  9. package/dist/assets/{empty-BWtrxcgQ.js → empty-BbLiiNm3.js} +1 -1
  10. package/dist/assets/{empty-DAeN9BSQ.js → empty-CZM0Jlmt.js} +1 -1
  11. package/dist/assets/epic-DR-KU4ze.js +2 -0
  12. package/dist/assets/{index-D9bCWqS4.js → index-4tSv3nRD.js} +1 -1
  13. package/dist/assets/{index-D7YdEsex.js → index-Bo5zKcZG.js} +1 -1
  14. package/dist/assets/{index-CoEuhj0X.js → index-C_EKG0zi.js} +1 -1
  15. package/dist/assets/{index-Cu8cpors.js → index-D-Na4GzX.js} +1 -1
  16. package/dist/assets/{index-C0TLRGDK.js → index-DpEdSZCY.js} +50013 -44414
  17. package/dist/assets/{index-xQ8260uf.css → index-UA2r-eW3.css} +1 -1
  18. package/dist/assets/{index-DinkTfWE.js → index-ZnhhwmGr.js} +2 -2
  19. package/dist/assets/{index-CW0wjQNO.js → index-rGBKfVB-.js} +1 -1
  20. package/dist/assets/{lexical-70Y4dhMS.js → lexical-lEIccZkX.js} +1 -1
  21. package/dist/assets/{liveblocks-ctZNXX3w.js → liveblocks-CjMN_Axp.js} +1 -1
  22. package/dist/assets/{lottie-WcPnoqik.js → lottie-BDXqutcG.js} +1 -1
  23. package/dist/assets/{mui-B0zikHW3.js → mui-BmS4_gk6.js} +1 -1
  24. package/dist/assets/{react-S689txW6.js → react-7TygqEni.js} +1 -1
  25. package/dist/assets/{react-cZfJ_ila.js → react-B10dBuE3.js} +1 -1
  26. package/dist/assets/{react-CqW4sBFF.js → react-B1D9BCPG.js} +2 -2
  27. package/dist/assets/{react-Cg2-6lc4.js → react-Bjp8died.js} +1 -1
  28. package/dist/assets/{react-BrMgtE9l.js → react-CEeUql9B.js} +1 -1
  29. package/dist/assets/{react-ktXrf8wP.js → react-DB98_0D5.js} +1 -1
  30. package/dist/assets/{react-CJoYA1Cl.js → react-DBkumn4E.js} +1 -1
  31. package/dist/assets/{react-Bw4co5za.js → react-a2PdxR7N.js} +1 -1
  32. package/dist/assets/{recharts--HpNFPeE.js → recharts-BYW5YVGV.js} +1 -1
  33. package/dist/assets/{sentry-Bsd-62H1.js → sentry-Cm2258ba.js} +1 -1
  34. package/dist/assets/{url-Bd55sKId.js → url-BX8J2zE7.js} +1 -1
  35. package/dist/assets/{url-Dcf-9_5W.js → url-C_C8XfTW.js} +1 -1
  36. package/dist/assets/{utils-FPH6sQh8.js → utils-OZZZ87aa.js} +1 -1
  37. package/dist/assets/zeni-epic-state-3J9Yi7lW.js +13 -0
  38. package/dist/index.html +1 -1
  39. package/package.json +4 -4
  40. package/dist/assets/CreditAgentRoutes-CvQ5CzeB.js +0 -4
  41. package/dist/assets/SignInScreen-BdbB2gDt.js +0 -1
  42. package/dist/assets/epic-CNcCGbqM.js +0 -2
  43. package/dist/assets/zeni-epic-state-B_LlNU4P.js +0 -13
@@ -0,0 +1,4 @@
1
+ import{j as s}from"./liveblocks-CjMN_Axp.js";import{u as D,P as k}from"./ScreenRoutes-ZB28w3FJ.js";import{a as f}from"./sentry-Cm2258ba.js";import{i as v,n as P,g as m,h as j,k as C,l as I,N as R}from"./core-Bik8c0_9.js";import{K6 as T,K7 as N,kd as M,K8 as E,kX as L,k_ as $,kM as _,K9 as K,Ka as O,kU as B,kQ as F}from"./zeni-epic-state-3J9Yi7lW.js";import{z as J,$ as q,e as V,f as Q,a0 as X,U as Z,J as G,b as H,g as W,h as Y}from"./index-DpEdSZCY.js";import{n as ee}from"./mui-BmS4_gk6.js";import"./recharts-BYW5YVGV.js";import"./analyticsHelper-Bak3EeoW.js";import"./utils-OZZZ87aa.js";import"./empty-BbLiiNm3.js";import"./index-Bo5zKcZG.js";import"./url-BX8J2zE7.js";import"./index-4tSv3nRD.js";import"./analytics-ZkA9Ipck.js";import"./lottie-BDXqutcG.js";import"./lexical-lEIccZkX.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]="68706ba3-84af-49fe-9602-a075fe0cacd4",a._sentryDebugIdIdentifier="sentry-dbid-68706ba3-84af-49fe-9602-a075fe0cacd4")}catch{}})();function te(a,t){return{headerData:{allTabOptions:Z,selectedTabOption:G("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=W(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(F())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=j(te,ne)(X),oe=ee.div`
2
+ padding: ${Q.sp5};
3
+ text-align: center;
4
+ `;function re(){const a=v(),t=P(),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(M())},[t,y]);const d=J.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??A;t($({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=E(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),U=`${q}/tableDownload?query=${x}`;fetch(U,{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,A,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 w=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:V.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=D();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(k,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(R,{to:"/management",replace:!0})})})}export{ze as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-Bsd-62H1.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-Cm2258ba.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};