@zeniai/web-cockpit-ui 2.2.56-qa → 2.2.57-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 (45) hide show
  1. package/dist/assets/CreditAgentRoutes-CRJRrR1m.js +4 -0
  2. package/dist/assets/{Preview-DxnZ0G_9.js → Preview-ACZgJoij.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-gcBsvljo.js → ScreenRoutes-C69wGDKd.js} +64 -64
  4. package/dist/assets/SignInScreen-DdcDOrK7.js +1 -0
  5. package/dist/assets/{analytics-D6nPZhvU.js → analytics-qqOishY6.js} +1 -1
  6. package/dist/assets/{analyticsHelper-CSjZdvwl.js → analyticsHelper-W9ZZSWHD.js} +1 -1
  7. package/dist/assets/{core-Dwew_eJI.js → core-C-Wzyz4Q.js} +1 -1
  8. package/dist/assets/{dash.all.min-DEQx_M4d.js → dash.all.min-BOAlq3qp.js} +1 -1
  9. package/dist/assets/{empty-C9URe1wE.js → empty-eYeAMjcN.js} +1 -1
  10. package/dist/assets/{empty-CWKS44_T.js → empty-kIcRL-yV.js} +1 -1
  11. package/dist/assets/epic-DcCp049o.js +2 -0
  12. package/dist/assets/{index-BflI8SLg.js → index-1nHpboi2.js} +20550 -20529
  13. package/dist/assets/{index-Bd7ri422.css → index-DcGIrthm.css} +1 -1
  14. package/dist/assets/{index-urN9o0mh.js → index-DjD4wvLB.js} +1 -1
  15. package/dist/assets/{index-Bitr7r5a.js → index-Dk_GJRhf.js} +1 -1
  16. package/dist/assets/{index-DG96zgnQ.js → index-DokhfY24.js} +1 -1
  17. package/dist/assets/{index-BgQY9QEb.js → index-Ds_lG88B.js} +1 -1
  18. package/dist/assets/{index-BQ1xq9Ax.js → index-rvwGWif4.js} +2 -2
  19. package/dist/assets/{index-DPOaVmXP.js → index-yQmhDiAA.js} +1 -1
  20. package/dist/assets/{lexical-CKIF0fv8.js → lexical-DAAg_FBR.js} +1 -1
  21. package/dist/assets/{liveblocks-bdH_HyD4.js → liveblocks-CMfXK7R0.js} +1 -1
  22. package/dist/assets/{lottie-ODFW7XpP.js → lottie-GndnZ8Jp.js} +1 -1
  23. package/dist/assets/mui-CoiNz-0e.js +9 -0
  24. package/dist/assets/{react-BVou-Xve.js → react-B1Bt7DJ9.js} +1 -1
  25. package/dist/assets/{react-dvrCYrIU.js → react-BGCFrwbL.js} +1 -1
  26. package/dist/assets/{react-K8PNfPlF.js → react-BUDKItN3.js} +1 -1
  27. package/dist/assets/{react-NOoqN2L8.js → react-ClHgTl_b.js} +1 -1
  28. package/dist/assets/{react-B58oz63_.js → react-CyenoY9p.js} +2 -2
  29. package/dist/assets/{react-BrwPLcTD.js → react-DQvJ5WvP.js} +1 -1
  30. package/dist/assets/{react-5k8YSArH.js → react-DzQrGi3P.js} +1 -1
  31. package/dist/assets/{react-DxYnPaL4.js → react-GD-Izqsx.js} +1 -1
  32. package/dist/assets/recharts-BUycorhK.js +65 -0
  33. package/dist/assets/{sentry-Dwm-tWfG.js → sentry-D1Yxbg-4.js} +1 -1
  34. package/dist/assets/{url-DV3lGv0k.js → url-CHoxSYJN.js} +1 -1
  35. package/dist/assets/{url-DwJCVbv4.js → url-CuIPR3N2.js} +1 -1
  36. package/dist/assets/{utils-ByTJL3Oq.js → utils-CLEIuGKG.js} +1 -1
  37. package/dist/assets/zeni-epic-state-B20MGO2_.js +13 -0
  38. package/dist/index.html +1 -1
  39. package/package.json +41 -4
  40. package/dist/assets/CreditAgentRoutes-1qwE4Jid.js +0 -4
  41. package/dist/assets/SignInScreen-IwRxJ8Ya.js +0 -1
  42. package/dist/assets/epic-DbBUeNum.js +0 -2
  43. package/dist/assets/mui-Dpk20_cL.js +0 -138
  44. package/dist/assets/recharts-Cy2son-o.js +0 -65
  45. package/dist/assets/zeni-epic-state-BAX-zerj.js +0 -14
@@ -0,0 +1,4 @@
1
+ import{j as s}from"./liveblocks-CMfXK7R0.js";import{u as v,P}from"./ScreenRoutes-C69wGDKd.js";import{a as f}from"./sentry-D1Yxbg-4.js";import{i as U,n as R,g as m,h as T,k as C,l as I,N as j}from"./core-C-Wzyz4Q.js";import{S2 as N,S3 as k,lu as E,S4 as M,mk as L,mn as $,m9 as O,S5 as _,S6 as B,mh as F,md as q}from"./zeni-epic-state-B20MGO2_.js";import{z as V,Z,G,n as J,a0 as H,c as K,w as Q,a as W,g as X,b as Y}from"./index-1nHpboi2.js";import{n as ee}from"./mui-CoiNz-0e.js";import"./recharts-BUycorhK.js";import"./analyticsHelper-W9ZZSWHD.js";import"./utils-CLEIuGKG.js";import"./empty-eYeAMjcN.js";import"./index-DjD4wvLB.js";import"./url-CHoxSYJN.js";import"./index-Dk_GJRhf.js";import"./analytics-qqOishY6.js";import"./lottie-GndnZ8Jp.js";import"./lexical-DAAg_FBR.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]="5eb88240-a3d7-487a-9b7b-6c8f440ba3c8",a._sentryDebugIdIdentifier="sentry-dbid-5eb88240-a3d7-487a-9b7b-6c8f440ba3c8")}catch{}})();function te(a,t){return{headerData:{allTabOptions:K,selectedTabOption:Q("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(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
2
+ padding: ${J.sp5};
3
+ text-align: center;
4
+ `;function re(){const a=U(),t=R(),n=m(N),g=m(k),[c,h]=f.useState(new Set),S=f.useRef(new Set),b=m(e=>e.tenantState.currentTenantId),y=m(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{y==="Not-Started"&&t(E())},[t,y]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(O())},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=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${Z}/tableDownload?query=${x}`;fetch(D,{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),p=document.createElement("a");p.href=u,p.download=`${e.file_name}.xlsx`,p.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?S.current.add(o):r!=null&&!r.isAnalyzing&&S.current.has(o)&&(e.add(o),S.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 z=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:G.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=v();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(P,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-Dwm-tWfG.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};
1
+ import{a as h,R as n}from"./sentry-D1Yxbg-4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};