@zeniai/web-cockpit-ui 2.2.89-qa → 2.2.90-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-DG7EDPk4.js → CreditAgentRoutes-CrPzrayT.js} +1 -1
  2. package/dist/assets/{Preview-Yfv5DOCT.js → Preview-CenqZdeB.js} +1 -1
  3. package/dist/assets/ScreenRoutes-COLvfzRi.js +181 -0
  4. package/dist/assets/{SignInScreen-Df6mqZGJ.js → SignInScreen-DJg3hx3k.js} +1 -1
  5. package/dist/assets/{analytics-bXqdNTn2.js → analytics-BM-RmzOi.js} +1 -1
  6. package/dist/assets/{analyticsHelper-52dic5ML.js → analyticsHelper-CUmgpv5A.js} +1 -1
  7. package/dist/assets/{core-Dw4XGBPB.js → core-CexvL2PC.js} +1 -1
  8. package/dist/assets/{dash.all.min-D-zdUW2E.js → dash.all.min-BzZM8EaW.js} +1 -1
  9. package/dist/assets/{empty-yNVrZTRK.js → empty-6W1STqf_.js} +1 -1
  10. package/dist/assets/{index-BPhX3I3T.js → empty-CQDhkz87.js} +1 -1
  11. package/dist/assets/{epic-oIfPpGXw.js → epic-CD8fgod_.js} +1 -1
  12. package/dist/assets/index-4WpCaaqM.js +1 -0
  13. package/dist/assets/index-BwfpKjLz.js +1 -0
  14. package/dist/assets/{index-BUIjXp6X.js → index-C73-hcpq.js} +5 -5
  15. package/dist/assets/{index-D4IHH0eQ.js → index-CM3mgf6L.js} +1 -1
  16. package/dist/assets/{index-BTtU_NJK.js → index-D9PDd7Df.js} +2 -2
  17. package/dist/assets/{index-BpidRIB2.js → index-Duz8EgAD.js} +1 -1
  18. package/dist/assets/index-Dy5oIRH2.js +1 -0
  19. package/dist/assets/{lexical-W9nYyM7D.js → lexical-BQwfj5n8.js} +1 -1
  20. package/dist/assets/{liveblocks-B0pKfNHu.js → liveblocks-CFWr3-Es.js} +1 -1
  21. package/dist/assets/{lottie-DZC48ARZ.js → lottie-Dp25CyQz.js} +1 -1
  22. package/dist/assets/{mui-NT1Z-YH_.js → mui-CG69zo7E.js} +1 -1
  23. package/dist/assets/{react-DXJIaZBJ.js → react-B4slDvxm.js} +1 -1
  24. package/dist/assets/{react-Cuyj1sIi.js → react-Bgs8sH-p.js} +1 -1
  25. package/dist/assets/{react-nmuREkNm.js → react-BpK3d5oW.js} +1 -1
  26. package/dist/assets/{react-DfM7SXWs.js → react-Bw8saxM2.js} +1 -1
  27. package/dist/assets/{react-IH3zcr1V.js → react-CG3-CpwO.js} +2 -2
  28. package/dist/assets/{react-Dd9hM3Pf.js → react-DPejdeT6.js} +1 -1
  29. package/dist/assets/{react-pwRww8jq.js → react-Dl3o_s-D.js} +1 -1
  30. package/dist/assets/{react-CRZz3PYt.js → react-SRFutXZN.js} +1 -1
  31. package/dist/assets/{recharts-BUo8apMx.js → recharts-DA1HvZve.js} +1 -1
  32. package/dist/assets/{sentry-CmG9zRbP.js → sentry-BJlx_ZxE.js} +1 -1
  33. package/dist/assets/{url-CQcSUTdD.js → url-CAXsvflG.js} +1 -1
  34. package/dist/assets/{url-D2m0Lejh.js → url-D6DSaIKB.js} +1 -1
  35. package/dist/assets/utils-CRsfb5WZ.js +36 -0
  36. package/dist/assets/{zeni-epic-state-BZg29cPy.js → zeni-epic-state-PthqloQx.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +1 -1
  39. package/dist/assets/ScreenRoutes-V6B5cDxu.js +0 -180
  40. package/dist/assets/empty-GbrAbMgu.js +0 -1
  41. package/dist/assets/index-BEgQ1tzz.js +0 -1
  42. package/dist/assets/index-Dr00l2VG.js +0 -1
  43. package/dist/assets/utils-Dcg_cDsa.js +0 -36
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-B0pKfNHu.js";import{u as P,P as v}from"./ScreenRoutes-V6B5cDxu.js";import{a as f}from"./sentry-CmG9zRbP.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-Dw4XGBPB.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-BZg29cPy.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-BUIjXp6X.js";import{n as ee}from"./mui-NT1Z-YH_.js";import"./recharts-BUo8apMx.js";import"./analyticsHelper-52dic5ML.js";import"./utils-Dcg_cDsa.js";import"./empty-yNVrZTRK.js";import"./index-D4IHH0eQ.js";import"./url-D2m0Lejh.js";import"./index-BEgQ1tzz.js";import"./analytics-bXqdNTn2.js";import"./lottie-DZC48ARZ.js";import"./lexical-W9nYyM7D.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]="6c9c1974-9ead-4965-bd00-d57a4ba2dfb7",a._sentryDebugIdIdentifier="sentry-dbid-6c9c1974-9ead-4965-bd00-d57a4ba2dfb7")}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`
1
+ import{j as s}from"./liveblocks-CFWr3-Es.js";import{u as P,P as v}from"./ScreenRoutes-COLvfzRi.js";import{a as f}from"./sentry-BJlx_ZxE.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-CexvL2PC.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-PthqloQx.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-C73-hcpq.js";import{n as ee}from"./mui-CG69zo7E.js";import"./recharts-DA1HvZve.js";import"./analyticsHelper-CUmgpv5A.js";import"./utils-CRsfb5WZ.js";import"./url-D6DSaIKB.js";import"./empty-6W1STqf_.js";import"./index-CM3mgf6L.js";import"./index-Dy5oIRH2.js";import"./analytics-BM-RmzOi.js";import"./lottie-Dp25CyQz.js";import"./lexical-BQwfj5n8.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
2
  padding: ${Z.sp5};
3
3
  text-align: center;
4
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};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-CmG9zRbP.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-BJlx_ZxE.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};