@zeniai/web-cockpit-ui 2.0.77-prod → 2.0.78-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 (38) hide show
  1. package/dist/assets/{CreditAgentRoutes-BY2v2jgb.js → CreditAgentRoutes-DyvCB1LD.js} +1 -1
  2. package/dist/assets/{Preview-DmU7MmMB.js → Preview-BZtBkeeC.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-C1pGgDIh.js → ScreenRoutes-DsnchZw5.js} +47 -47
  4. package/dist/assets/{SignInScreen-BkemAHwd.js → SignInScreen-DrhZgG_C.js} +1 -1
  5. package/dist/assets/{analytics-C3FTSP2N.js → analytics-Cpch2YKC.js} +1 -1
  6. package/dist/assets/{analyticsHelper-BNQ7rQBS.js → analyticsHelper-CSamN5xV.js} +1 -1
  7. package/dist/assets/{core-CAx2uvui.js → core-tg6rHmr2.js} +1 -1
  8. package/dist/assets/{dash.all.min-D3wVI81n.js → dash.all.min-CFTEipTq.js} +1 -1
  9. package/dist/assets/{empty-RR1AtwrT.js → empty-BxfN_d36.js} +1 -1
  10. package/dist/assets/{empty-BdtPLwrV.js → empty-CMIFdepc.js} +1 -1
  11. package/dist/assets/{epic-B9CZllSI.js → epic-S6ocjKl5.js} +2 -2
  12. package/dist/assets/{index-lFPAJm0_.js → index-BYz3lLz4.js} +1 -1
  13. package/dist/assets/{index-CGE40FqZ.js → index-Bmk56FzG.js} +1 -1
  14. package/dist/assets/{index-C5iA0io_.js → index-C54_W-Jj.js} +1 -1
  15. package/dist/assets/{index-Cf--tk_1.js → index-CDK8srlD.js} +1 -1
  16. package/dist/assets/{index-CgxJ-Tsy.js → index-CEQyTlAC.js} +2 -2
  17. package/dist/assets/{index-CFzwMJ-X.js → index-CVesgYEY.js} +1902 -1928
  18. package/dist/assets/{index-D9vII1Os.js → index-DijHlkXq.js} +1 -1
  19. package/dist/assets/{lexical-D5xJm5ch.js → lexical-CI-o8slp.js} +1 -1
  20. package/dist/assets/{liveblocks-9JlH1HCy.js → liveblocks-E3bid8dv.js} +1 -1
  21. package/dist/assets/{lottie-fkBrieDi.js → lottie-DcoyPbCB.js} +1 -1
  22. package/dist/assets/{mui-ClHIVAX-.js → mui-0KSrDwSx.js} +1 -1
  23. package/dist/assets/{react-OE5qye3A.js → react-8Hy0oWOf.js} +1 -1
  24. package/dist/assets/{react-B903YFMc.js → react-B54OUgNV.js} +1 -1
  25. package/dist/assets/{react-BlSLOLoU.js → react-B7jhWuQh.js} +2 -2
  26. package/dist/assets/{react-BsonuGXq.js → react-Bh7KYxL8.js} +1 -1
  27. package/dist/assets/{react-B7p5WR9s.js → react-BpAHsTgu.js} +1 -1
  28. package/dist/assets/{react-DjRxmku8.js → react-CEAQDKco.js} +1 -1
  29. package/dist/assets/{react-Dj0wVs3M.js → react-CXAAATZb.js} +1 -1
  30. package/dist/assets/{react-xIH6uI4v.js → react-DkYS2uhQ.js} +1 -1
  31. package/dist/assets/{recharts-C9K9rZdr.js → recharts-RcBCmdMM.js} +1 -1
  32. package/dist/assets/{sentry-C8u_Gkq9.js → sentry-BDGVsMze.js} +1 -1
  33. package/dist/assets/{url-DGA7c4_v.js → url-BGJoONZ4.js} +1 -1
  34. package/dist/assets/{url-DRXPULcv.js → url-CHGxKTMS.js} +1 -1
  35. package/dist/assets/{utils-Cbe3grK-.js → utils-CQJ0rAN-.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-BeRec8r8.js → zeni-epic-state-BE3ZUV8x.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-9JlH1HCy.js";import{u as j,P as v}from"./ScreenRoutes-C1pGgDIh.js";import{a as u}from"./sentry-C8u_Gkq9.js";import{i as P,n as R,g as m,h as U,k as A,l as C,N as k}from"./core-CAx2uvui.js";import{Iw as T,Ix as N,jR as E,Iy as M,kA as L,kD as $,kp as _,Iz as F,IA as O,kx as B,kt as q}from"./zeni-epic-state-BeRec8r8.js";import{z as Q,$ as V,D as J,o as Z,a0 as G,F as H,Q as K,c as W,d as X,h as Y}from"./index-CFzwMJ-X.js";import{n as ee}from"./mui-ClHIVAX-.js";import"./recharts-C9K9rZdr.js";import"./analyticsHelper-BNQ7rQBS.js";import"./utils-Cbe3grK-.js";import"./empty-BdtPLwrV.js";import"./index-CGE40FqZ.js";import"./url-DRXPULcv.js";import"./index-Cf--tk_1.js";import"./analytics-C3FTSP2N.js";import"./lottie-fkBrieDi.js";import"./lexical-D5xJm5ch.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]="bcb1a7a8-99ce-480c-9e0a-487594a348b3",a._sentryDebugIdIdentifier="sentry-dbid-bcb1a7a8-99ce-480c-9e0a-487594a348b3")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,selectedTabOption:K("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=X(n);W.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(F(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(G),oe=ee.div`
1
+ import{j as s}from"./liveblocks-E3bid8dv.js";import{u as j,P as v}from"./ScreenRoutes-DsnchZw5.js";import{a as u}from"./sentry-BDGVsMze.js";import{i as P,n as R,g as m,h as U,k as A,l as C,N as k}from"./core-tg6rHmr2.js";import{Iw as T,Ix as N,jR as E,Iy as M,kA as L,kD as $,kp as _,Iz as F,IA as O,kx as B,kt as q}from"./zeni-epic-state-BE3ZUV8x.js";import{z as Q,$ as V,D as J,o as Z,a0 as G,F as H,Q as K,c as W,d as X,h as Y}from"./index-CVesgYEY.js";import{n as ee}from"./mui-0KSrDwSx.js";import"./recharts-RcBCmdMM.js";import"./analyticsHelper-CSamN5xV.js";import"./utils-CQJ0rAN-.js";import"./empty-CMIFdepc.js";import"./index-Bmk56FzG.js";import"./url-CHGxKTMS.js";import"./index-CDK8srlD.js";import"./analytics-Cpch2YKC.js";import"./lottie-DcoyPbCB.js";import"./lexical-CI-o8slp.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]="bcb1a7a8-99ce-480c-9e0a-487594a348b3",a._sentryDebugIdIdentifier="sentry-dbid-bcb1a7a8-99ce-480c-9e0a-487594a348b3")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,selectedTabOption:K("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=X(n);W.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(F(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(G),oe=ee.div`
2
2
  padding: ${Z.sp5};
3
3
  text-align: center;
4
4
  `;function re(){const a=P(),t=R(),n=m(T),g=m(N),[c,h]=u.useState(new Set),p=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(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=u.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??I;t($({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${V}/tableDownload?query=${z}`;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),S=document.createElement("a");S.href=f,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,I,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?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 x=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:J.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:x})}function we(){const{isAllowed:a,isLoading:t}=j();return t?null:a?s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(k,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-C8u_Gkq9.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-BDGVsMze.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};