@zeniai/web-cockpit-ui 2.0.88-dev → 2.0.89-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 (56) hide show
  1. package/dist/assets/{CreditAgentRoutes-NVgLh_Ee.js → CreditAgentRoutes-GFzgwrY2.js} +1 -1
  2. package/dist/assets/{Preview-BdczYKd_.js → Preview-Cb3TFAWy.js} +1 -1
  3. package/dist/assets/ScreenRoutes-BzRMR0hZ.js +180 -0
  4. package/dist/assets/{SignInScreen-CMCHzBrn.js → SignInScreen-DZInEDF7.js} +1 -1
  5. package/dist/assets/analytics-CVJyuP1S.js +68 -0
  6. package/dist/assets/{analyticsHelper-C5Zk-OfB.js → analyticsHelper-Cs7EgcN6.js} +1 -1
  7. package/dist/assets/core-CoR1IJfY.js +12 -0
  8. package/dist/assets/dash.all.min-i3yf9SAH.js +21 -0
  9. package/dist/assets/{empty-UedE-Vih.js → empty-BqI0wto5.js} +1 -1
  10. package/dist/assets/{empty-DmNe0fpl.js → empty-C98UnH25.js} +1 -1
  11. package/dist/assets/epic-B_yHJMeG.js +2 -0
  12. package/dist/assets/{hls-CK0vqtka.js → hls-DifHSkbp.js} +7 -7
  13. package/dist/assets/{index-DQcWGxLJ.js → index-C-r-rSaE.js} +2 -2
  14. package/dist/assets/{index-1MQajnGr.js → index-DMQ42224.js} +1 -1
  15. package/dist/assets/{index-UzwwuyK1.js → index-DoDTcm4E.js} +1 -1
  16. package/dist/assets/{index-D253xY7c.js → index-HBUoZNqr.js} +37 -37
  17. package/dist/assets/index-J-Uk3ZHN.js +1 -0
  18. package/dist/assets/index-K-H-qUEz.js +1 -0
  19. package/dist/assets/index-UA2r-eW3.css +1 -0
  20. package/dist/assets/{index-BIzkczmY.js → index-bgFBNwYL.js} +2 -2
  21. package/dist/assets/{lexical-C8w_IBb-.js → lexical-DTObV8os.js} +1 -1
  22. package/dist/assets/liveblocks-DT0pzkur.js +54 -0
  23. package/dist/assets/lottie-VpYPMTkA.js +2 -0
  24. package/dist/assets/{mui-czakqKyg.js → mui-nrj4-_zP.js} +1 -1
  25. package/dist/assets/{react-DwPWdJRT.js → react-B1pKua9I.js} +1 -1
  26. package/dist/assets/{react-CErKU-HR.js → react-BPsxW-yR.js} +1 -1
  27. package/dist/assets/{react-vHc57gG6.js → react-B_g2EAns.js} +2 -2
  28. package/dist/assets/{react-yZdbp-re.js → react-BhicUA7G.js} +1 -1
  29. package/dist/assets/{react-fQd0-Rp8.js → react-BkVVKUoB.js} +2 -2
  30. package/dist/assets/react-Bx8wXVz1.js +19 -0
  31. package/dist/assets/react-D7g9w8MN.js +22 -0
  32. package/dist/assets/{react-DRUlUMg2.js → react-DUvvi6Ew.js} +1 -1
  33. package/dist/assets/recharts-70uvUBBm.js +65 -0
  34. package/dist/assets/{sentry-CAkM8qAn.js → sentry-BG8-Thtk.js} +13 -13
  35. package/dist/assets/{url-OfFRBfe0.js → url-Cvej0yq3.js} +1 -1
  36. package/dist/assets/url-Kbc0aPL_.js +6 -0
  37. package/dist/assets/utils-DO1hZFvu.js +36 -0
  38. package/dist/assets/zeni-epic-state-DOWPsE64.js +13 -0
  39. package/dist/index.html +1 -1
  40. package/package.json +4 -4
  41. package/dist/assets/ScreenRoutes-DxW1yOJ1.js +0 -180
  42. package/dist/assets/analytics-Cz_HrUlY.js +0 -68
  43. package/dist/assets/core-tU9Q6hGI.js +0 -12
  44. package/dist/assets/dash.all.min-Du9X008M.js +0 -21
  45. package/dist/assets/epic-CLRzLJGm.js +0 -2
  46. package/dist/assets/index-C8ouCD8q.css +0 -1
  47. package/dist/assets/index-CXpRkgOi.js +0 -1
  48. package/dist/assets/index-eJlwKJga.js +0 -1
  49. package/dist/assets/liveblocks-CrT04IWD.js +0 -54
  50. package/dist/assets/lottie-DehknAo8.js +0 -2
  51. package/dist/assets/react-B2GHwGG2.js +0 -19
  52. package/dist/assets/react-CfUoywXB.js +0 -22
  53. package/dist/assets/recharts-IgmOSI02.js +0 -65
  54. package/dist/assets/url-C1_uv5lT.js +0 -6
  55. package/dist/assets/utils-B4YgZgLH.js +0 -36
  56. package/dist/assets/zeni-epic-state-Bgv4twPr.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CrT04IWD.js";import{u as D,P as j}from"./ScreenRoutes-DxW1yOJ1.js";import{a as f}from"./sentry-CAkM8qAn.js";import{i as k,n as v,g as m,h as P,k as C,l as I,N as R}from"./core-tU9Q6hGI.js";import{Ka as T,Kb as N,kd as M,Kc as E,kX as L,k_ as _,kM as $,Kd as K,Ke as O,kU as B,kQ as F}from"./zeni-epic-state-Bgv4twPr.js";import{z as J,_ as q,i as V,j as Q,a0 as X,a as Z,J as G,c as H,g as W,h as Y}from"./index-D253xY7c.js";import{n as ee}from"./mui-czakqKyg.js";import"./recharts-IgmOSI02.js";import"./analyticsHelper-C5Zk-OfB.js";import"./utils-B4YgZgLH.js";import"./empty-UedE-Vih.js";import"./index-eJlwKJga.js";import"./url-C1_uv5lT.js";import"./index-CXpRkgOi.js";import"./analytics-Cz_HrUlY.js";import"./lottie-DehknAo8.js";import"./lexical-C8w_IBb-.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]="2c424aec-de29-41bf-9839-0b2cbf026cf4",a._sentryDebugIdIdentifier="sentry-dbid-2c424aec-de29-41bf-9839-0b2cbf026cf4")}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=P(te,ne)(X),oe=ee.div`
1
+ import{j as s}from"./liveblocks-DT0pzkur.js";import{u as D,P as j}from"./ScreenRoutes-BzRMR0hZ.js";import{a as f}from"./sentry-BG8-Thtk.js";import{i as k,n as v,g as m,h as P,k as C,l as I,N as R}from"./core-CoR1IJfY.js";import{Ka as T,Kb as N,kd as M,Kc as E,kX as L,k_ as _,kM as $,Kd as K,Ke as O,kU as B,kQ as F}from"./zeni-epic-state-DOWPsE64.js";import{z as J,_ as q,i as V,j as Q,a0 as X,a as Z,J as G,c as H,g as W,h as Y}from"./index-HBUoZNqr.js";import{n as ee}from"./mui-nrj4-_zP.js";import"./recharts-70uvUBBm.js";import"./analyticsHelper-Cs7EgcN6.js";import"./utils-DO1hZFvu.js";import"./empty-BqI0wto5.js";import"./index-K-H-qUEz.js";import"./url-Kbc0aPL_.js";import"./index-J-Uk3ZHN.js";import"./analytics-CVJyuP1S.js";import"./lottie-VpYPMTkA.js";import"./lexical-DTObV8os.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]="2c424aec-de29-41bf-9839-0b2cbf026cf4",a._sentryDebugIdIdentifier="sentry-dbid-2c424aec-de29-41bf-9839-0b2cbf026cf4")}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=P(te,ne)(X),oe=ee.div`
2
2
  padding: ${Q.sp5};
3
3
  text-align: center;
4
4
  `;function re(){const a=k(),t=v(),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(j,{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-CAkM8qAn.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-BG8-Thtk.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};