@zeniai/web-cockpit-ui 2.2.52-prod → 2.2.53-dev

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-CB1lscUD.js → CreditAgentRoutes-C8ETGyv5.js} +3 -3
  2. package/dist/assets/{Preview-DVvYs7n-.js → Preview-BAjTYvkR.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-CLcWJbK8.js → ScreenRoutes-B1ETxUBq.js} +73 -73
  4. package/dist/assets/{SignInScreen-B8nwLf5y.js → SignInScreen-mkfDmRRN.js} +1 -1
  5. package/dist/assets/{analytics-DVLknj9T.js → analytics-DB8g9p74.js} +1 -1
  6. package/dist/assets/{analyticsHelper-DeyiBux5.js → analyticsHelper-BB3oe67s.js} +1 -1
  7. package/dist/assets/{core-B8cGF7cK.js → core-C1NkN2EU.js} +1 -1
  8. package/dist/assets/{dash.all.min-nkcoRbN4.js → dash.all.min-CtoK1wVS.js} +1 -1
  9. package/dist/assets/{empty-EpQDfPk5.js → empty-C9yeld_6.js} +1 -1
  10. package/dist/assets/{empty-B90lOxQD.js → empty-CP3P9-Xz.js} +1 -1
  11. package/dist/assets/epic-D1rrMviY.js +2 -0
  12. package/dist/assets/{index-DEbqBypp.js → index-DPTRDap4.js} +1 -1
  13. package/dist/assets/{index-DfQrWeHS.js → index-DT3QXpDi.js} +2 -2
  14. package/dist/assets/{index-viNqFFUj.js → index-DUslzegZ.js} +1 -1
  15. package/dist/assets/{index-DmLdG5qY.js → index-DX5V2O3s.js} +1 -1
  16. package/dist/assets/{index-OADE2ZDE.js → index-DqhZJDwh.js} +9386 -9309
  17. package/dist/assets/{index-CgZiz2mq.js → index-qGfLlse3.js} +1 -1
  18. package/dist/assets/{index-DIFem0Co.js → index-wUswma_F.js} +1 -1
  19. package/dist/assets/{lexical-StyC7nyX.js → lexical-BNptbXMd.js} +1 -1
  20. package/dist/assets/{liveblocks-yk1fktp5.js → liveblocks-CxUwD2xI.js} +1 -1
  21. package/dist/assets/{lottie-D3MRZRsJ.js → lottie-CYHKvlOn.js} +1 -1
  22. package/dist/assets/{mui-BhtSLRYP.js → mui-DZX6345D.js} +1 -1
  23. package/dist/assets/{react-DyT7Ne14.js → react-BNsyv-GY.js} +1 -1
  24. package/dist/assets/{react-QD-dxuDr.js → react-BUh6N9JW.js} +1 -1
  25. package/dist/assets/{react-Cko-QUjP.js → react-COZszW0f.js} +1 -1
  26. package/dist/assets/{react-DI-DcO-A.js → react-CVNShjfl.js} +1 -1
  27. package/dist/assets/{react-CPNz93qS.js → react-C_JGed_p.js} +1 -1
  28. package/dist/assets/{react-BsO9hfwH.js → react-CcOe644m.js} +2 -2
  29. package/dist/assets/{react-BiX1znWZ.js → react-CftSNXpt.js} +1 -1
  30. package/dist/assets/{react-rw-dWrpf.js → react-DPuLCc2G.js} +1 -1
  31. package/dist/assets/{recharts-DHDvPZbi.js → recharts-CVf9d32H.js} +1 -1
  32. package/dist/assets/{sentry-BfsMNUJP.js → sentry-Xn4HJgtE.js} +1 -1
  33. package/dist/assets/{url-BtCImHHN.js → url-DODuhvxK.js} +1 -1
  34. package/dist/assets/{url-DaLuZBzM.js → url-lUYO5BtJ.js} +1 -1
  35. package/dist/assets/{utils-Dt_kEafu.js → utils-D9f-Hwl3.js} +1 -1
  36. package/dist/assets/zeni-epic-state-D0mt79Gq.js +14 -0
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -41
  39. package/dist/assets/epic-DIJwg5y3.js +0 -2
  40. package/dist/assets/zeni-epic-state-Cxj93vbQ.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-yk1fktp5.js";import{u as v,P}from"./ScreenRoutes-CLcWJbK8.js";import{a as f}from"./sentry-BfsMNUJP.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-B8cGF7cK.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-Cxj93vbQ.js";import{z as V,Y as G,G as J,n as Y,a0 as Z,c as H,w as K,a as Q,g as W,b as X}from"./index-OADE2ZDE.js";import{n as ee}from"./mui-BhtSLRYP.js";import"./recharts-DHDvPZbi.js";import"./analyticsHelper-DeyiBux5.js";import"./utils-Dt_kEafu.js";import"./empty-EpQDfPk5.js";import"./index-viNqFFUj.js";import"./url-DaLuZBzM.js";import"./index-DEbqBypp.js";import"./analytics-DVLknj9T.js";import"./lottie-D3MRZRsJ.js";import"./lexical-StyC7nyX.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]="05497886-b8af-4db3-9315-f0e8f9713ccc",a._sentryDebugIdIdentifier="sentry-dbid-05497886-b8af-4db3-9315-f0e8f9713ccc")}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=X(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: ${Y.sp5};
1
+ import{j as s}from"./liveblocks-CxUwD2xI.js";import{u as v,P}from"./ScreenRoutes-B1ETxUBq.js";import{a as f}from"./sentry-Xn4HJgtE.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-C1NkN2EU.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-D0mt79Gq.js";import{z as V,_ as G,G as J,n as Z,a0 as H,c as K,w as Q,b as W,g as X,d as Y}from"./index-DqhZJDwh.js";import{n as ee}from"./mui-DZX6345D.js";import"./recharts-CVf9d32H.js";import"./analyticsHelper-BB3oe67s.js";import"./utils-D9f-Hwl3.js";import"./empty-C9yeld_6.js";import"./index-DUslzegZ.js";import"./url-lUYO5BtJ.js";import"./index-DPTRDap4.js";import"./analytics-DB8g9p74.js";import"./lottie-CYHKvlOn.js";import"./lexical-BNptbXMd.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]="a68ac158-12f9-40c3-96f4-0c8b5865f843",a._sentryDebugIdIdentifier="sentry-dbid-a68ac158-12f9-40c3-96f4-0c8b5865f843")}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,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(O())},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};
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-BfsMNUJP.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-Xn4HJgtE.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};