@zeniai/web-cockpit-ui 2.2.14-dev → 2.2.14-prod

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 (41) hide show
  1. package/dist/assets/CreditAgentRoutes-C88yH-W-.js +4 -0
  2. package/dist/assets/{Preview-BSl-9UPq.js → Preview-CB5ubR88.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-B3v679Sr.js → ScreenRoutes-DpS-2R0K.js} +47 -47
  4. package/dist/assets/SignInScreen-D5MsfsIe.js +1 -0
  5. package/dist/assets/{analytics-bv3cs5Pa.js → analytics-DEBThtqb.js} +1 -1
  6. package/dist/assets/{analyticsHelper-BwX6tMJg.js → analyticsHelper-9FjHhURz.js} +1 -1
  7. package/dist/assets/{core-Cb_SewUF.js → core-DYJgGgG7.js} +1 -1
  8. package/dist/assets/{dash.all.min-C0g0RpLa.js → dash.all.min-DEKBEcfc.js} +1 -1
  9. package/dist/assets/{empty-BmAo7D4b.js → empty-BC1V_TrP.js} +1 -1
  10. package/dist/assets/{empty-BM8JYXSq.js → empty-CV0yqVaY.js} +1 -1
  11. package/dist/assets/epic-BT0pQh0s.js +2 -0
  12. package/dist/assets/{index-CYERyNvu.js → index-B9FCxQaw.js} +1 -1
  13. package/dist/assets/{index-qFHHbW8M.js → index-BY2soZQd.js} +1 -1
  14. package/dist/assets/{index-BF5qXqpu.js → index-CIvOqdzH.js} +1 -1
  15. package/dist/assets/{index-DTVeQJIX.js → index-CghudwPs.js} +9553 -10467
  16. package/dist/assets/{index-C20rf0Pw.js → index-D9mZnqrm.js} +1 -1
  17. package/dist/assets/{index-BNppRRZC.js → index-DPSgikCE.js} +2 -2
  18. package/dist/assets/{index-BayHR7sD.js → index-u14xSCS4.js} +1 -1
  19. package/dist/assets/{lexical-BmH7Ap9n.js → lexical-C1n87X9S.js} +1 -1
  20. package/dist/assets/{liveblocks-CR6f0cJg.js → liveblocks-BSamzoTI.js} +1 -1
  21. package/dist/assets/{lottie-DwNyjciC.js → lottie-C3Yiojjc.js} +1 -1
  22. package/dist/assets/{mui-D8t9TE4n.js → mui-Do7W6V2o.js} +1 -1
  23. package/dist/assets/{react-_QHMsvLi.js → react-B0WeXafQ.js} +1 -1
  24. package/dist/assets/{react-BljqHaX2.js → react-BCv774wM.js} +1 -1
  25. package/dist/assets/{react-Ch8t0s5_.js → react-BvFcz96m.js} +1 -1
  26. package/dist/assets/{react-DV59MkPF.js → react-CSK3KalC.js} +1 -1
  27. package/dist/assets/{react-Po0KsXuM.js → react-CYyl17b1.js} +1 -1
  28. package/dist/assets/{react-BnHYBMHo.js → react-Chj9TdDZ.js} +1 -1
  29. package/dist/assets/{react-DeZrUOBd.js → react-CqbHtEnI.js} +1 -1
  30. package/dist/assets/{react-DZtD2SDg.js → react-DVuXnZNV.js} +2 -2
  31. package/dist/assets/{recharts-khcy2kqv.js → recharts-Qw_RdYQ0.js} +1 -1
  32. package/dist/assets/{sentry-CRfJMoYn.js → sentry-C6Bea-hB.js} +1 -1
  33. package/dist/assets/{url-DPEctYPB.js → url-BqFY8Wx4.js} +1 -1
  34. package/dist/assets/{url-DJ63Qw_a.js → url-D6SVbqZ0.js} +1 -1
  35. package/dist/assets/{utils-D003Kz9l.js → utils-B5D6sdZB.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-CMdJQjcf.js → zeni-epic-state-5Eg6SmWO.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +1 -1
  39. package/dist/assets/CreditAgentRoutes-CnVoAxCP.js +0 -4
  40. package/dist/assets/SignInScreen-BNx875ht.js +0 -1
  41. package/dist/assets/epic-CYCtKZrR.js +0 -2
@@ -0,0 +1,4 @@
1
+ import{j as s}from"./liveblocks-BSamzoTI.js";import{u as D,P as v}from"./ScreenRoutes-DpS-2R0K.js";import{a as u}from"./sentry-C6Bea-hB.js";import{i as P,n as T,g as m,h as U,k as C,l as I,N as j}from"./core-DYJgGgG7.js";import{Q_ as N,Q$ as E,lc as M,R0 as k,m2 as $,m5 as L,lT as _,R1 as O,R2 as B,l$ as F,lX as q}from"./zeni-epic-state-5Eg6SmWO.js";import{z as Q,_ as V,G,j as J,a0 as X,c as Z,w as H,a as K,g as W,b as Y}from"./index-CghudwPs.js";import{n as ee}from"./mui-Do7W6V2o.js";import"./recharts-Qw_RdYQ0.js";import"./analyticsHelper-9FjHhURz.js";import"./utils-B5D6sdZB.js";import"./empty-CV0yqVaY.js";import"./index-B9FCxQaw.js";import"./url-BqFY8Wx4.js";import"./index-BY2soZQd.js";import"./analytics-DEBThtqb.js";import"./lottie-C3Yiojjc.js";import"./lexical-C1n87X9S.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]="1485850e-081d-4b17-841e-6cc3a425b14e",a._sentryDebugIdIdentifier="sentry-dbid-1485850e-081d-4b17-841e-6cc3a425b14e")}catch{}})();function te(a,t){return{headerData:{allTabOptions:Z,selectedTabOption:H("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);K.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(X),oe=ee.div`
2
+ padding: ${J.sp5};
3
+ text-align: center;
4
+ `;function re(){const a=P(),t=T(),n=m(N),g=m(E),[c,h]=u.useState(new Set),p=u.useRef(new Set),b=m(e=>e.tenantState.currentTenantId),y=m(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{y==="Not-Started"&&t(M())},[t,y]);const d=Q.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=u.useMemo(()=>({onFetch:()=>{t(_())},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=k(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),R=`${V}/tableDownload?query=${x}`;fetch(R,{headers:{"zeni-user-id":o,"zeni-session-id":r,"zeni-tenant-id":i}}).then(async l=>{if(!l.ok){const f=await l.text();throw new Error(`Download failed: ${l.status} ${f}`)}return l.blob()}).then(l=>{const f=URL.createObjectURL(l),S=document.createElement("a");S.href=f,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,A,d,b,n.rows]);u.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 z=u.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}=D();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(j,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-CRfJMoYn.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-C6Bea-hB.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};