@zeniai/web-cockpit-ui 2.3.0-qa → 2.3.1-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 (40) hide show
  1. package/dist/assets/{CreditAgentRoutes-DUmIDr5m.js → CreditAgentRoutes-Bf4ML4-J.js} +1 -1
  2. package/dist/assets/{Preview-CNS-1-5t.js → Preview-0wcWl3yT.js} +1 -1
  3. package/dist/assets/ScreenRoutes-jr4HngVu.js +180 -0
  4. package/dist/assets/SignInScreen-BeTSSeC6.js +1 -0
  5. package/dist/assets/{analytics-DBe25Eqs.js → analytics-DZ78nstU.js} +1 -1
  6. package/dist/assets/{analyticsHelper-Db5Up0qh.js → analyticsHelper-PMTpkqpJ.js} +1 -1
  7. package/dist/assets/{core-CXcyQVBu.js → core-9lSau7JX.js} +2 -2
  8. package/dist/assets/{dash.all.min-xQfK65gu.js → dash.all.min-B9vxuv8K.js} +1 -1
  9. package/dist/assets/{empty-CFIWHO0z.js → empty-CBigbD-X.js} +1 -1
  10. package/dist/assets/{empty-Dj3G3i7a.js → empty-DNUsuwtr.js} +1 -1
  11. package/dist/assets/{epic-CYTu1QtA.js → epic-CccbsLqj.js} +2 -2
  12. package/dist/assets/{index-Dad8HxvG.js → index-3x_gUOvO.js} +1 -1
  13. package/dist/assets/{index-B60J5ybv.js → index-B-PPAcLf.js} +1 -1
  14. package/dist/assets/{index-BvmGTjAH.js → index-B8AQ65nY.js} +8234 -8234
  15. package/dist/assets/{index-AK9n73b_.js → index-CohFgCzE.js} +1 -1
  16. package/dist/assets/{index-Dt_O3nQE.js → index-DDZpi5Xk.js} +1 -1
  17. package/dist/assets/{index-DUf_hC5x.js → index-DY6AaM91.js} +2 -2
  18. package/dist/assets/{index-DQTLs9GA.js → index-DuZLh8qT.js} +1 -1
  19. package/dist/assets/{lexical-B7S1NF5U.js → lexical-CmjhFzKL.js} +1 -1
  20. package/dist/assets/{liveblocks-RRkKuOUp.js → liveblocks-daCV-NeN.js} +1 -1
  21. package/dist/assets/{lottie-CLAAc507.js → lottie-CxUtS1yw.js} +1 -1
  22. package/dist/assets/{mui-DyXVwUkA.js → mui-BN7b87Jp.js} +1 -1
  23. package/dist/assets/{react-CgWl2c8B.js → react-BY6klugU.js} +1 -1
  24. package/dist/assets/{react-PbdNCOsh.js → react-CRsk0ixJ.js} +1 -1
  25. package/dist/assets/{react-cGsD-Kfc.js → react-CYrqpJYu.js} +2 -2
  26. package/dist/assets/{react-C8Agt6uC.js → react-CeF7x-c4.js} +1 -1
  27. package/dist/assets/{react-_6VCcq4G.js → react-D3ANJI0c.js} +1 -1
  28. package/dist/assets/{react-51muJ3Cj.js → react-DvJtAK46.js} +1 -1
  29. package/dist/assets/{react-BS8ZyxhJ.js → react-F4eiabRs.js} +1 -1
  30. package/dist/assets/{react-EGvMRsJS.js → react-iwZJ9U16.js} +1 -1
  31. package/dist/assets/{recharts-C2pe_7ld.js → recharts-0KvwlQud.js} +1 -1
  32. package/dist/assets/{sentry-DUTEWFKx.js → sentry-D1WWozHj.js} +1 -1
  33. package/dist/assets/{url-B7RySzMn.js → url-C9THCWl9.js} +1 -1
  34. package/dist/assets/{url-2rzf__2n.js → url-D8J8Bt-p.js} +1 -1
  35. package/dist/assets/{utils-COdYiHYV.js → utils-D8yPrVSN.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-Bx0Q86PV.js → zeni-epic-state-CSF-BFbu.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/ScreenRoutes-CVyeakjn.js +0 -180
  40. package/dist/assets/SignInScreen-DGTU7Iwv.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-RRkKuOUp.js";import{u as v,P}from"./ScreenRoutes-CVyeakjn.js";import{a as f}from"./sentry-DUTEWFKx.js";import{i as T,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-CXcyQVBu.js";import{SV as N,SW as k,lB as E,SX as M,mr as $,mu as L,mg as B,SY as _,SZ as O,mo as F,mk as V}from"./zeni-epic-state-Bx0Q86PV.js";import{z as q,T as W,G as Z,n as G,W as J,B as X,$ as Y,b as H,g as K,h as Q}from"./index-BvmGTjAH.js";import{n as ee}from"./mui-DyXVwUkA.js";import"./recharts-C2pe_7ld.js";import"./analyticsHelper-Db5Up0qh.js";import"./utils-COdYiHYV.js";import"./empty-CFIWHO0z.js";import"./index-B60J5ybv.js";import"./url-B7RySzMn.js";import"./index-DQTLs9GA.js";import"./analytics-DBe25Eqs.js";import"./lottie-CLAAc507.js";import"./lexical-B7S1NF5U.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]="f1c42e4e-543c-44c3-ae63-323d09f3e389",a._sentryDebugIdIdentifier="sentry-dbid-f1c42e4e-543c-44c3-ae63-323d09f3e389")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(J),oe=ee.div`
1
+ import{j as s}from"./liveblocks-daCV-NeN.js";import{u as v,P}from"./ScreenRoutes-jr4HngVu.js";import{a as f}from"./sentry-D1WWozHj.js";import{i as T,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-9lSau7JX.js";import{SV as N,SW as k,lB as E,SX as M,mr as $,mu as L,mg as B,SY as _,SZ as O,mo as F,mk as V}from"./zeni-epic-state-CSF-BFbu.js";import{z as q,T as W,G as Z,n as G,W as J,B as X,$ as Y,b as H,g as K,h as Q}from"./index-B8AQ65nY.js";import{n as ee}from"./mui-BN7b87Jp.js";import"./recharts-0KvwlQud.js";import"./analyticsHelper-PMTpkqpJ.js";import"./utils-D8yPrVSN.js";import"./empty-CBigbD-X.js";import"./index-B-PPAcLf.js";import"./url-C9THCWl9.js";import"./index-DuZLh8qT.js";import"./analytics-DZ78nstU.js";import"./lottie-CxUtS1yw.js";import"./lexical-CmjhFzKL.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]="f1c42e4e-543c-44c3-ae63-323d09f3e389",a._sentryDebugIdIdentifier="sentry-dbid-f1c42e4e-543c-44c3-ae63-323d09f3e389")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(J),oe=ee.div`
2
2
  padding: ${G.sp5};
3
3
  text-align: center;
4
4
  `;function re(){const a=T(),t=U(),n=m(N),g=m(k),[c,h]=f.useState(new Set),S=f.useRef(new Set),y=m(e=>e.tenantState.currentTenantId),b=m(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{b==="Not-Started"&&t(E())},[t,b]);const d=q.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(L({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t($(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=y??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${W}/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,y,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:Z.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-DUTEWFKx.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-D1WWozHj.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};