@zeniai/web-cockpit-ui 2.2.50-qa → 2.2.51-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 (41) hide show
  1. package/dist/assets/{CreditAgentRoutes-Dmo-8t-Q.js → CreditAgentRoutes-C-xYt5E2.js} +3 -3
  2. package/dist/assets/{Preview-Dvnxjnbe.js → Preview-CJdpXjqX.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-C3J_T4o3.js → ScreenRoutes-BazUMhrE.js} +70 -70
  4. package/dist/assets/{SignInScreen-_ALjGOzK.js → SignInScreen-BjoZYmbO.js} +1 -1
  5. package/dist/assets/{analytics-CFD34pOY.js → analytics-ctJXmkvw.js} +1 -1
  6. package/dist/assets/analyticsHelper-D9M5Zcjp.js +1 -0
  7. package/dist/assets/{core-Bg9enAN0.js → core-BCgnsMH7.js} +1 -1
  8. package/dist/assets/{dash.all.min-DYpdzZ_B.js → dash.all.min-exygind6.js} +1 -1
  9. package/dist/assets/{empty-Cs8XL3Pn.js → empty-CaRBJEwL.js} +1 -1
  10. package/dist/assets/{empty-DTRz_cuI.js → empty-ds0Fe9RR.js} +1 -1
  11. package/dist/assets/epic-CSHIo21y.js +2 -0
  12. package/dist/assets/{index-DzfPgteM.js → index-B-Am3qm6.js} +1 -1
  13. package/dist/assets/{index-DW01-lPj.js → index-B88Q2pRm.js} +9569 -9475
  14. package/dist/assets/{index-6vth-pb4.js → index-B_tyfSO4.js} +1 -1
  15. package/dist/assets/{index-D4J8kz89.js → index-CFMT8GQx.js} +2 -2
  16. package/dist/assets/{index-zJQMX0zK.js → index-CfcSN8OH.js} +1 -1
  17. package/dist/assets/{index-CpwoKjIL.js → index-Dl9XdT_V.js} +1 -1
  18. package/dist/assets/{index-DeRx9Rib.js → index-SIyxfXvy.js} +1 -1
  19. package/dist/assets/{lexical-BIoAcRwT.js → lexical-DUmphpSF.js} +1 -1
  20. package/dist/assets/{liveblocks-CC9hKEBI.js → liveblocks-CBXVKwHX.js} +1 -1
  21. package/dist/assets/{lottie-X_mNr-3R.js → lottie-DOshSqxu.js} +1 -1
  22. package/dist/assets/{mui-C8uQr-6e.js → mui-BaUx3JyA.js} +1 -1
  23. package/dist/assets/{react-DWQvq_CD.js → react-BwNfy_DK.js} +1 -1
  24. package/dist/assets/{react-BETEoHzr.js → react-C09RWrWl.js} +1 -1
  25. package/dist/assets/{react-MHHFKDuJ.js → react-CJdI51iL.js} +1 -1
  26. package/dist/assets/{react-j-Q7Qv3o.js → react-CWbB20R_.js} +1 -1
  27. package/dist/assets/{react-Cr-euK44.js → react-Cg-RQQVf.js} +2 -2
  28. package/dist/assets/{react-DIvyXIQ2.js → react-DI8WS9zM.js} +1 -1
  29. package/dist/assets/{react-jjjtLacN.js → react-DrkyKLly.js} +1 -1
  30. package/dist/assets/{react-CSYFySEZ.js → react-o0JazEja.js} +1 -1
  31. package/dist/assets/{recharts-XNvSSJZf.js → recharts-D-OWlkt2.js} +1 -1
  32. package/dist/assets/{sentry-4GJSx6j5.js → sentry-CXZepgpF.js} +1 -1
  33. package/dist/assets/{url-B6FbeuTb.js → url-BnW_WmFY.js} +1 -1
  34. package/dist/assets/{url-B3wXWXq9.js → url-DeByVjOE.js} +1 -1
  35. package/dist/assets/{utils-V6doeDyj.js → utils-CYjfnf3r.js} +1 -1
  36. package/dist/assets/zeni-epic-state-ZIgcQT2P.js +14 -0
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/analyticsHelper-Dceyst0w.js +0 -1
  40. package/dist/assets/epic-CsmmF2o6.js +0 -2
  41. package/dist/assets/zeni-epic-state-DabQwpNL.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CC9hKEBI.js";import{u as v,P}from"./ScreenRoutes-C3J_T4o3.js";import{a as f}from"./sentry-4GJSx6j5.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-Bg9enAN0.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-DabQwpNL.js";import{z as V,X as G,G as J,n as X,a0 as Z,c as H,w as K,a as Q,g as W,b as Y}from"./index-DW01-lPj.js";import{n as ee}from"./mui-C8uQr-6e.js";import"./recharts-XNvSSJZf.js";import"./analyticsHelper-Dceyst0w.js";import"./utils-V6doeDyj.js";import"./empty-DTRz_cuI.js";import"./index-6vth-pb4.js";import"./url-B6FbeuTb.js";import"./index-DzfPgteM.js";import"./analytics-CFD34pOY.js";import"./lottie-X_mNr-3R.js";import"./lexical-BIoAcRwT.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]="75541e5c-84b7-4b08-820b-2b37a1ba9f1b",a._sentryDebugIdIdentifier="sentry-dbid-75541e5c-84b7-4b08-820b-2b37a1ba9f1b")}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=W(n);Q.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)(Z),oe=ee.div`
2
- padding: ${X.sp5};
1
+ import{j as s}from"./liveblocks-CBXVKwHX.js";import{u as v,P}from"./ScreenRoutes-BazUMhrE.js";import{a as f}from"./sentry-CXZepgpF.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-BCgnsMH7.js";import{S6 as N,S7 as k,lu as E,S8 as M,mk as L,mn as _,m9 as $,S9 as O,Sa as B,mh as F,md as q}from"./zeni-epic-state-ZIgcQT2P.js";import{z as V,_ as G,G as J,n as Z,a0 as H,c as K,w as Q,d as W,g as X,e as Y}from"./index-B88Q2pRm.js";import{n as ee}from"./mui-BaUx3JyA.js";import"./recharts-D-OWlkt2.js";import"./analyticsHelper-D9M5Zcjp.js";import"./utils-CYjfnf3r.js";import"./empty-ds0Fe9RR.js";import"./index-B_tyfSO4.js";import"./url-BnW_WmFY.js";import"./index-B-Am3qm6.js";import"./analytics-ctJXmkvw.js";import"./lottie-DOshSqxu.js";import"./lexical-DUmphpSF.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]="3451cd4b-3bfb-4697-822f-35e7f91b1876",a._sentryDebugIdIdentifier="sentry-dbid-3451cd4b-3bfb-4697-822f-35e7f91b1876")}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(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
2
+ padding: ${Z.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=U(),t=R(),n=m(N),g=m(k),[c,b]=f.useState(new Set),S=f.useRef(new Set),h=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=>{b(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=h??"";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,h,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&&b(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}=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};
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($())},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=`${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}=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-4GJSx6j5.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-CXZepgpF.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};