@zeniai/web-cockpit-ui 2.2.91-qa → 2.2.92-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 (44) hide show
  1. package/dist/assets/{CreditAgentRoutes-BcqIBIQ1.js → CreditAgentRoutes-DZrWKx9v.js} +3 -3
  2. package/dist/assets/{Preview-B0fAgGC9.js → Preview-CodZL20s.js} +1 -1
  3. package/dist/assets/ScreenRoutes-CriDgHmg.js +180 -0
  4. package/dist/assets/SignInScreen-BZ6Udwpv.js +1 -0
  5. package/dist/assets/{analytics-BtioYZHB.js → analytics-bUb4e2l9.js} +1 -1
  6. package/dist/assets/{analyticsHelper-B1_5m3bj.js → analyticsHelper-S103oISe.js} +1 -1
  7. package/dist/assets/{core-CFZ1zKLB.js → core-LGghNt_5.js} +1 -1
  8. package/dist/assets/{dash.all.min-Djt5LuDu.js → dash.all.min-BI2o5Ejz.js} +1 -1
  9. package/dist/assets/empty-ChGh0kAY.js +1 -0
  10. package/dist/assets/{empty-do-IWCor.js → empty-D9N3ppKO.js} +1 -1
  11. package/dist/assets/{epic-s9QUAxFW.js → epic-OSwo0pxH.js} +2 -2
  12. package/dist/assets/{empty-C5UkkRpZ.js → index-BPXwvtTb.js} +1 -1
  13. package/dist/assets/{index-CTXiyL01.js → index-CXw47j7k.js} +2 -2
  14. package/dist/assets/{index-BkPu5aSk.js → index-D6SRuDxQ.js} +1 -1
  15. package/dist/assets/index-DHCjg4Xt.js +1 -0
  16. package/dist/assets/{index-QX4mnKWY.js → index-DYUqLlyN.js} +8382 -8382
  17. package/dist/assets/index-UPxSu1KC.js +1 -0
  18. package/dist/assets/{index-DHk5qSRD.js → index-bpeSJd3b.js} +1 -1
  19. package/dist/assets/{lexical-_Lbgq3jj.js → lexical-BHp9_xpn.js} +1 -1
  20. package/dist/assets/{liveblocks-aOfptKpP.js → liveblocks-BiP7YDU_.js} +1 -1
  21. package/dist/assets/{lottie-BXV2jUKn.js → lottie-p_DgQqex.js} +1 -1
  22. package/dist/assets/{mui-DKtip3Fo.js → mui-Ds-zkhu2.js} +1 -1
  23. package/dist/assets/{react-CsjK4EYH.js → react-B4ARJ9x8.js} +1 -1
  24. package/dist/assets/{react-D7fvj7cl.js → react-C8n9F6iL.js} +1 -1
  25. package/dist/assets/{react-Ci1gZ7q4.js → react-CloFC9xb.js} +1 -1
  26. package/dist/assets/{react-B2dfpYXH.js → react-DOmXnw75.js} +1 -1
  27. package/dist/assets/{react-dhte24OQ.js → react-DPdvdx2O.js} +2 -2
  28. package/dist/assets/{react-C0fw40qx.js → react-DzASoBml.js} +1 -1
  29. package/dist/assets/{react-Bmuvf6UA.js → react-ZPt9BKTb.js} +1 -1
  30. package/dist/assets/{react-C6rfSKLo.js → react-h2rfMaEl.js} +1 -1
  31. package/dist/assets/{recharts-BZkRyMBd.js → recharts-CsV8JNfV.js} +1 -1
  32. package/dist/assets/{sentry-COHE35Rj.js → sentry-Cd9SGIBW.js} +1 -1
  33. package/dist/assets/{url-Di8D4q14.js → url-CpP0HFo6.js} +1 -1
  34. package/dist/assets/{url-BAKti-YE.js → url-DmC5mj4f.js} +1 -1
  35. package/dist/assets/utils-CvwlBSjp.js +36 -0
  36. package/dist/assets/{zeni-epic-state-BGUqGu00.js → zeni-epic-state-OzPiWqFW.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/ScreenRoutes-DIdga5eX.js +0 -181
  40. package/dist/assets/SignInScreen-CKTOul1p.js +0 -1
  41. package/dist/assets/index-BCaHiGMr.js +0 -1
  42. package/dist/assets/index-CIcyLYO3.js +0 -1
  43. package/dist/assets/index-DJeysOrB.js +0 -1
  44. package/dist/assets/utils-BVuib09Q.js +0 -36
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-aOfptKpP.js";import{u as P,P as v}from"./ScreenRoutes-DIdga5eX.js";import{a as f}from"./sentry-COHE35Rj.js";import{i as T,n as U,g as m,h as N,k as C,l as I,N as R}from"./core-CFZ1zKLB.js";import{SL as j,SM as M,lB as k,SN as E,mr as L,mu as $,mg as B,SO as O,SP as _,mo as F,mk as q}from"./zeni-epic-state-BGUqGu00.js";import{z as V,S as G,G as J,n as Z,T as H,B as K,$ as Q,c as W,g as X,h as Y}from"./index-QX4mnKWY.js";import{n as ee}from"./mui-DKtip3Fo.js";import"./recharts-BZkRyMBd.js";import"./analyticsHelper-B1_5m3bj.js";import"./utils-BVuib09Q.js";import"./url-Di8D4q14.js";import"./empty-do-IWCor.js";import"./index-DHk5qSRD.js";import"./index-BCaHiGMr.js";import"./analytics-BtioYZHB.js";import"./lottie-BXV2jUKn.js";import"./lexical-_Lbgq3jj.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]="c19a5fb7-2e77-44bc-98c7-8cb72f8f60fd",a._sentryDebugIdIdentifier="sentry-dbid-c19a5fb7-2e77-44bc-98c7-8cb72f8f60fd")}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(_())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=N(te,ne)(H),oe=ee.div`
2
- padding: ${Z.sp5};
1
+ import{j as s}from"./liveblocks-BiP7YDU_.js";import{u as P,P as v}from"./ScreenRoutes-CriDgHmg.js";import{a as f}from"./sentry-Cd9SGIBW.js";import{i as U,n as N,g as m,h as R,k as C,l as I,N as T}from"./core-LGghNt_5.js";import{SL as j,SM as M,lB as k,SN as E,mr as L,mu as $,mg as _,SO as B,SP as O,mo as F,mk as q}from"./zeni-epic-state-OzPiWqFW.js";import{z as V,W as G,G as J,n as W,_ as Z,B as H,$ as K,c as Q,g as X,h as Y}from"./index-DYUqLlyN.js";import{n as ee}from"./mui-Ds-zkhu2.js";import"./recharts-CsV8JNfV.js";import"./analyticsHelper-S103oISe.js";import"./utils-CvwlBSjp.js";import"./empty-D9N3ppKO.js";import"./index-bpeSJd3b.js";import"./url-CpP0HFo6.js";import"./index-UPxSu1KC.js";import"./analytics-bUb4e2l9.js";import"./lottie-p_DgQqex.js";import"./lexical-BHp9_xpn.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]="4729986e-509a-4921-bf8c-56b284fa29ac",a._sentryDebugIdIdentifier="sentry-dbid-4729986e-509a-4921-bf8c-56b284fa29ac")}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);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(B(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(Z),oe=ee.div`
2
+ padding: ${W.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=T(),t=U(),n=m(j),g=m(M),[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(k())},[t,y]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(B())},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)),D=`${G}/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:J.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=P();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(R,{to:"/management",replace:!0})})})}export{we as default};
4
+ `;function re(){const a=U(),t=N(),n=m(j),g=m(M),[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(k())},[t,y]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=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)),D=`${G}/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:J.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=P();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(T,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-COHE35Rj.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-Cd9SGIBW.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};