@zeniai/web-cockpit-ui 2.1.80-dev → 2.1.81-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 (39) hide show
  1. package/dist/assets/{CreditAgentRoutes-BDHvXaAc.js → CreditAgentRoutes-DkZ0frLt.js} +3 -3
  2. package/dist/assets/{Preview-B8JBCazy.js → Preview-CedqqZ9g.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-CmygbjzE.js → ScreenRoutes-Byo0Wz5V.js} +81 -81
  4. package/dist/assets/{SignInScreen-BWMlsXgF.js → SignInScreen-Dpsax9Rb.js} +1 -1
  5. package/dist/assets/{analytics-WHEBMOqX.js → analytics-CNAUKQea.js} +1 -1
  6. package/dist/assets/{analyticsHelper-DN5zZf0u.js → analyticsHelper-B-jR6kmA.js} +1 -1
  7. package/dist/assets/{core-CGLO3WCC.js → core-DIZ17nxS.js} +1 -1
  8. package/dist/assets/{dash.all.min-DfQaa0Bm.js → dash.all.min-CqVtT8_8.js} +1 -1
  9. package/dist/assets/{empty-CZlD8NrZ.js → empty-BCqcIUAA.js} +1 -1
  10. package/dist/assets/{empty-CFWH82Pn.js → empty-DT8IpxYW.js} +1 -1
  11. package/dist/assets/epic-BQAJtMgD.js +2 -0
  12. package/dist/assets/{index-BP-9-NnM.js → index-B8tNX48M.js} +1 -1
  13. package/dist/assets/{index-D-BjzB9f.js → index-BEKm66dd.js} +1 -1
  14. package/dist/assets/{index-DHtsU7Qf.js → index-BKZLelIs.js} +1 -1
  15. package/dist/assets/{index-Cn3vcJPF.js → index-CO5KSDON.js} +27291 -27291
  16. package/dist/assets/{index-BPEEhZB1.js → index-CvnEA6cn.js} +2 -2
  17. package/dist/assets/{index-DVY1MQNi.js → index-DZ0kjgvg.js} +1 -1
  18. package/dist/assets/{index-DrdKxvq6.js → index-DdpAaJ8X.js} +1 -1
  19. package/dist/assets/{lexical-CHptH6VV.js → lexical-CIN4Sr1X.js} +1 -1
  20. package/dist/assets/{liveblocks-D1fglIsw.js → liveblocks-BpHCtJRE.js} +1 -1
  21. package/dist/assets/{lottie-VF3m7FbZ.js → lottie-Y66BvyUX.js} +1 -1
  22. package/dist/assets/{mui-8h2QhOXq.js → mui-C065oo4G.js} +1 -1
  23. package/dist/assets/{react-CscU1RUX.js → react-BX6D9C5O.js} +1 -1
  24. package/dist/assets/{react-D6EB7UvQ.js → react-Bi_cCdT3.js} +1 -1
  25. package/dist/assets/{react-DRLTLf0e.js → react-C_RrNPCN.js} +1 -1
  26. package/dist/assets/{react-oTO2fzQU.js → react-CqYDozvf.js} +2 -2
  27. package/dist/assets/{react-Jdb0zd7B.js → react-DcHo4oQ5.js} +1 -1
  28. package/dist/assets/{react-BNPsKK9M.js → react-Dp6oEDSX.js} +1 -1
  29. package/dist/assets/{react-BQnzWlvb.js → react-DyP5SAQv.js} +1 -1
  30. package/dist/assets/{react-C1hyWHwu.js → react-O_Oo_B6n.js} +1 -1
  31. package/dist/assets/{recharts-BS-ei1J0.js → recharts-Bkvo4bs5.js} +1 -1
  32. package/dist/assets/{sentry-WLrjeLjD.js → sentry-DXEbqRhS.js} +1 -1
  33. package/dist/assets/{url-C3bvpejg.js → url-DBHUXZnc.js} +1 -1
  34. package/dist/assets/{url-CmIDKuBv.js → url-DE7IA0mO.js} +1 -1
  35. package/dist/assets/{utils-DrMWWZN-.js → utils-0uatV9On.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-gTqhOwWK.js → zeni-epic-state-CxvRvVuX.js} +8 -8
  37. package/dist/index.html +1 -1
  38. package/package.json +6 -5
  39. package/dist/assets/epic-CLnxGGIZ.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-D1fglIsw.js";import{u as D,P as v}from"./ScreenRoutes-CmygbjzE.js";import{a as f}from"./sentry-WLrjeLjD.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-CGLO3WCC.js";import{Pp as N,Pq as k,kG as E,Pr as M,lw as L,lz as $,ll as _,Ps as q,Pt as F,lt as O,lp as B}from"./zeni-epic-state-gTqhOwWK.js";import{z as V,$ as G,F as J,f as Z,a0 as H,D as K,a as Q,b as W,g as X,h as Y}from"./index-Cn3vcJPF.js";import{n as ee}from"./mui-8h2QhOXq.js";import"./recharts-BS-ei1J0.js";import"./analyticsHelper-DN5zZf0u.js";import"./utils-DrMWWZN-.js";import"./empty-CFWH82Pn.js";import"./index-DrdKxvq6.js";import"./url-CmIDKuBv.js";import"./index-DHtsU7Qf.js";import"./analytics-WHEBMOqX.js";import"./lottie-VF3m7FbZ.js";import"./lexical-CHptH6VV.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]="c434697f-3999-4d3b-b375-1b2d454d0fcd",a._sentryDebugIdIdentifier="sentry-dbid-c434697f-3999-4d3b-b375-1b2d454d0fcd")}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(B())},onSaveMacro:n=>{a(O(n))},onResetSaveMacro:()=>{a(F())},onUIStateChange:n=>{a(q(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
2
- padding: ${Z.sp5};
1
+ import{j as s}from"./liveblocks-BpHCtJRE.js";import{u as x,P as v}from"./ScreenRoutes-Byo0Wz5V.js";import{a as f}from"./sentry-DXEbqRhS.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-DIZ17nxS.js";import{Pz as N,PA as k,kF as E,PB as M,lv as L,ly as $,lk as _,PC as F,PD as B,ls as O,lo as q}from"./zeni-epic-state-CxvRvVuX.js";import{z as V,$ as J,F as Z,i as G,a0 as H,D as K,a as Q,b as W,c as X,h as Y}from"./index-CO5KSDON.js";import{n as ee}from"./mui-C065oo4G.js";import"./recharts-Bkvo4bs5.js";import"./analyticsHelper-B-jR6kmA.js";import"./utils-0uatV9On.js";import"./empty-DT8IpxYW.js";import"./index-DdpAaJ8X.js";import"./url-DE7IA0mO.js";import"./index-BKZLelIs.js";import"./analytics-CNAUKQea.js";import"./lottie-Y66BvyUX.js";import"./lexical-CIN4Sr1X.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]="ad4f164b-7da0-477e-9c5b-5624a6c334d7",a._sentryDebugIdIdentifier="sentry-dbid-ad4f164b-7da0-477e-9c5b-5624a6c334d7")}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(O(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(F(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
2
+ padding: ${G.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),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=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 P=encodeURIComponent(JSON.stringify(e)),x=`${G}/tableDownload?query=${P}`;fetch(x,{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 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}=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};
4
+ `;function re(){const a=U(),t=R(),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=V.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($({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 w=encodeURIComponent(JSON.stringify(e)),D=`${J}/tableDownload?query=${w}`;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 P=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:P})}function ze(){const{isAllowed:a,isLoading:t}=x();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{ze as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-WLrjeLjD.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-DXEbqRhS.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};