@zeniai/web-cockpit-ui 2.1.46-qa → 2.1.47-next

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 (38) hide show
  1. package/dist/assets/{CreditAgentRoutes-Cj-pR6Pq.js → CreditAgentRoutes-DnlhIraX.js} +3 -3
  2. package/dist/assets/{Preview-DqAQQA9W.js → Preview-rf-FpMWS.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-BEtGfM8p.js → ScreenRoutes-LTaond3_.js} +46 -46
  4. package/dist/assets/{SignInScreen-D7V47SN0.js → SignInScreen-yr8XxCr6.js} +1 -1
  5. package/dist/assets/{analytics-Wfmb454Y.js → analytics-bOtDlzwD.js} +1 -1
  6. package/dist/assets/{analyticsHelper-D3IofBLH.js → analyticsHelper-BW5qZxKr.js} +1 -1
  7. package/dist/assets/{core-HsDfVxsc.js → core-DJ9Dgvsv.js} +1 -1
  8. package/dist/assets/{dash.all.min-CmOao3oc.js → dash.all.min-zBSBxIG_.js} +1 -1
  9. package/dist/assets/{empty-Dlz-ZKZH.js → empty-BC9D2dyC.js} +1 -1
  10. package/dist/assets/{empty-LMp-MPyG.js → empty-CBO3ETma.js} +1 -1
  11. package/dist/assets/{epic-CbDgvWb2.js → epic-CR9GMZ1p.js} +1 -1
  12. package/dist/assets/{index-CXE-L9sa.js → index-B1bmQm_W.js} +1 -1
  13. package/dist/assets/{index-D1AEdvjE.js → index-BMyWqBgw.js} +1 -1
  14. package/dist/assets/{index-B2fdFFkW.js → index-BvVwFrJf.js} +5003 -5003
  15. package/dist/assets/{index--ML55Gsu.js → index-CLwRAdSZ.js} +1 -1
  16. package/dist/assets/{index-DOgX_5QQ.js → index-C_1t514i.js} +2 -2
  17. package/dist/assets/{index-LAceLRGu.js → index-DK1GqVRZ.js} +1 -1
  18. package/dist/assets/{index-CCbVs-zm.js → index-DlXNtVwO.js} +1 -1
  19. package/dist/assets/{lexical-Ng7MkCpo.js → lexical-DiUa8hYJ.js} +1 -1
  20. package/dist/assets/{liveblocks-_UnCsWjZ.js → liveblocks-B4o5fAqf.js} +1 -1
  21. package/dist/assets/{lottie-CL7rQkD4.js → lottie-a1-R6IvM.js} +1 -1
  22. package/dist/assets/{mui-BBo4wqT-.js → mui-B0Atz2t0.js} +1 -1
  23. package/dist/assets/{react-Dm2nxSE7.js → react-BQQMXzzW.js} +1 -1
  24. package/dist/assets/{react-B8rxdsyN.js → react-BaPrcOJ-.js} +1 -1
  25. package/dist/assets/{react-DNKCXwL8.js → react-CWC3GfM-.js} +1 -1
  26. package/dist/assets/{react-UKI71K1_.js → react-CgfLotPS.js} +1 -1
  27. package/dist/assets/{react-BLD9Ivuc.js → react-CudKp0Mf.js} +2 -2
  28. package/dist/assets/{react-B37PgHPX.js → react-D23HkMiO.js} +1 -1
  29. package/dist/assets/{react-_iz21tA1.js → react-D6PYZm-S.js} +1 -1
  30. package/dist/assets/{react-Ale9hbfD.js → react-DwT2zup0.js} +1 -1
  31. package/dist/assets/{recharts-BKaj2tct.js → recharts-CCIeIOIo.js} +1 -1
  32. package/dist/assets/{sentry-CfL_DBEb.js → sentry-ZFVJf0t3.js} +1 -1
  33. package/dist/assets/{url-D6inugBt.js → url-BM8YWXoY.js} +1 -1
  34. package/dist/assets/{url-CQR4ArPx.js → url-CptqbBH9.js} +1 -1
  35. package/dist/assets/{utils-68ZIDpqd.js → utils-CBbs0Bgs.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-HcvgL5Im.js → zeni-epic-state-CRNUpT6n.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-_UnCsWjZ.js";import{u as j,P as v}from"./ScreenRoutes-BEtGfM8p.js";import{a as f}from"./sentry-CfL_DBEb.js";import{i as P,n as U,g as m,h as R,k as C,l as I,N as T}from"./core-HsDfVxsc.js";import{OA as N,OB as k,ks as E,OC as M,la as O,ld as L,k$ as $,OD as _,OE as B,l7 as F,l3 as q}from"./zeni-epic-state-HcvgL5Im.js";import{z as Q,_ as V,i as J,n as Z,a0 as G,f as H,Q as K,b as W,g as X,h as Y}from"./index-B2fdFFkW.js";import{n as ee}from"./mui-BBo4wqT-.js";import"./recharts-BKaj2tct.js";import"./analyticsHelper-D3IofBLH.js";import"./utils-68ZIDpqd.js";import"./empty-LMp-MPyG.js";import"./index-D1AEdvjE.js";import"./url-CQR4ArPx.js";import"./index-LAceLRGu.js";import"./analytics-Wfmb454Y.js";import"./lottie-CL7rQkD4.js";import"./lexical-Ng7MkCpo.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]="63ff6ee0-252b-4767-b008-b1f88362dd27",a._sentryDebugIdIdentifier="sentry-dbid-63ff6ee0-252b-4767-b008-b1f88362dd27")}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=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(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(G),oe=ee.div`
2
- padding: ${Z.sp5};
1
+ import{j as s}from"./liveblocks-B4o5fAqf.js";import{u as j,P as v}from"./ScreenRoutes-LTaond3_.js";import{a as f}from"./sentry-ZFVJf0t3.js";import{i as P,n as U,g as m,h as R,k as C,l as I,N as T}from"./core-DJ9Dgvsv.js";import{OA as N,OB as k,ks as E,OC as M,la as O,ld as L,k$ as $,OD as _,OE as B,l7 as F,l3 as q}from"./zeni-epic-state-CRNUpT6n.js";import{z as Q,Z as V,d as Z,n as J,a0 as G,f as H,Q as K,b as W,g as X,h as Y}from"./index-BvVwFrJf.js";import{n as ee}from"./mui-B0Atz2t0.js";import"./recharts-CCIeIOIo.js";import"./analyticsHelper-BW5qZxKr.js";import"./utils-CBbs0Bgs.js";import"./empty-CBO3ETma.js";import"./index-BMyWqBgw.js";import"./url-CptqbBH9.js";import"./index-DK1GqVRZ.js";import"./analytics-bOtDlzwD.js";import"./lottie-a1-R6IvM.js";import"./lexical-DiUa8hYJ.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]="272c95dc-5761-4057-a9ce-71dd92abe83d",a._sentryDebugIdIdentifier="sentry-dbid-272c95dc-5761-4057-a9ce-71dd92abe83d")}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=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(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(G),oe=ee.div`
2
+ padding: ${J.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=P(),t=U(),n=m(N),g=m(k),[c,h]=f.useState(new Set),p=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=Q.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.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(O(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=`${V}/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),S=document.createElement("a");S.href=u,S.download=`${e.file_name}.xlsx`,S.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?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 w=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:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=j();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(T,{to:"/management",replace:!0})})})}export{ze as default};
4
+ `;function re(){const a=P(),t=U(),n=m(N),g=m(k),[c,h]=f.useState(new Set),p=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=Q.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.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(O(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=`${V}/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),S=document.createElement("a");S.href=u,S.download=`${e.file_name}.xlsx`,S.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?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 w=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:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=j();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(T,{to:"/management",replace:!0})})})}export{ze as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-CfL_DBEb.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-ZFVJf0t3.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};