@zeniai/web-cockpit-ui 2.1.22-dev → 2.1.23-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-BL8EyxM1.js → CreditAgentRoutes-CbDba12F.js} +2 -2
  2. package/dist/assets/{Preview-CgkNDipn.js → Preview-BsZF-F4w.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-BJHxjxsX.js → ScreenRoutes-DUdCZ3Hy.js} +45 -45
  4. package/dist/assets/SignInScreen-BPM3QfAx.js +1 -0
  5. package/dist/assets/{analytics-D6piKHLS.js → analytics-f4_tykwx.js} +1 -1
  6. package/dist/assets/{analyticsHelper-CiCwaTM6.js → analyticsHelper-DsQyFXLY.js} +1 -1
  7. package/dist/assets/{core-CRhCqIlh.js → core-BKj2fZmm.js} +1 -1
  8. package/dist/assets/{dash.all.min-CtdjBEej.js → dash.all.min-B_wA5AAm.js} +1 -1
  9. package/dist/assets/{empty-B0hDzJSP.js → empty-Bh_JQC-w.js} +1 -1
  10. package/dist/assets/{empty-Oc-i156b.js → empty-CeVRSRoC.js} +1 -1
  11. package/dist/assets/{epic-D6Fx4wgN.js → epic-CqGu1WZR.js} +1 -1
  12. package/dist/assets/{index-DsegTYTv.js → index--RdxM8_Z.js} +1 -1
  13. package/dist/assets/{index-Ci1Zzrp1.js → index--v-p65m6.js} +1 -1
  14. package/dist/assets/{index-8gdhcKd2.js → index-D7-x1ymk.js} +1 -1
  15. package/dist/assets/{index-CZEJ8oSC.js → index-DCafa8QK.js} +1 -1
  16. package/dist/assets/{index-DR9sIB7Z.js → index-DgtiLYWn.js} +2 -2
  17. package/dist/assets/{index-d3EQEYhC.js → index-DlKnLY_3.js} +5735 -5735
  18. package/dist/assets/{index-BE6PHtUD.js → index-E-AuEDgn.js} +1 -1
  19. package/dist/assets/{lexical-B3cBH3RT.js → lexical-BQPfW1XP.js} +1 -1
  20. package/dist/assets/{liveblocks-BIAtikaQ.js → liveblocks-fmW2BCAL.js} +1 -1
  21. package/dist/assets/{lottie-BQL9e5FO.js → lottie-CiwuJ4hc.js} +1 -1
  22. package/dist/assets/{mui-CGZwNDvS.js → mui-DwXrZiGV.js} +1 -1
  23. package/dist/assets/{react-1AJ1WX9G.js → react-Bcib3p9U.js} +1 -1
  24. package/dist/assets/{react-BrG56Vk9.js → react-Cl3LLHkY.js} +1 -1
  25. package/dist/assets/{react-BTdP10tz.js → react-CvZjpngB.js} +1 -1
  26. package/dist/assets/{react-CEGGv4Tf.js → react-DLCU8Wzb.js} +2 -2
  27. package/dist/assets/{react-B3qBdEEf.js → react-DZ3aOPZq.js} +1 -1
  28. package/dist/assets/{react-zZnoqN-o.js → react-Dp_htPhN.js} +1 -1
  29. package/dist/assets/{react-CFeUK9Ix.js → react-_EGDD9_d.js} +1 -1
  30. package/dist/assets/{react-Bb1QpQwT.js → react-p-I-laZ6.js} +1 -1
  31. package/dist/assets/{recharts-BEyYdT4a.js → recharts-DAnSglUp.js} +1 -1
  32. package/dist/assets/{sentry-Dc2bCXeU.js → sentry-DnPx9ZiR.js} +1 -1
  33. package/dist/assets/{url-BEBYKTG5.js → url-DkOrIhtQ.js} +1 -1
  34. package/dist/assets/{url-CZPuhruJ.js → url-lGoKM2Jo.js} +1 -1
  35. package/dist/assets/{utils-CNE54eLV.js → utils-Ce920Rop.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-Cn35_qXc.js → zeni-epic-state-DzirqYa9.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-3hGTGqtq.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-BIAtikaQ.js";import{u as k,P as v}from"./ScreenRoutes-BJHxjxsX.js";import{a as f}from"./sentry-Dc2bCXeU.js";import{i as P,n as T,g as m,h as U,k as C,l as I,N as R}from"./core-CRhCqIlh.js";import{KB as j,KC as N,kk as E,KD as M,l2 as L,l5 as $,kT as _,KE as K,KF as B,k$ as F,kX as O}from"./zeni-epic-state-Cn35_qXc.js";import{z as X,_ as q,e as V,i as J,a0 as Z,s as G,X as H,a as Q,g as W,h as Y}from"./index-d3EQEYhC.js";import{n as ee}from"./mui-CGZwNDvS.js";import"./recharts-BEyYdT4a.js";import"./analyticsHelper-CiCwaTM6.js";import"./utils-CNE54eLV.js";import"./empty-B0hDzJSP.js";import"./index-Ci1Zzrp1.js";import"./url-BEBYKTG5.js";import"./index-8gdhcKd2.js";import"./analytics-D6piKHLS.js";import"./lottie-BQL9e5FO.js";import"./lexical-B3cBH3RT.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]="d92eb05c-67ec-47f4-b44b-af67cebabafe",a._sentryDebugIdIdentifier="sentry-dbid-d92eb05c-67ec-47f4-b44b-af67cebabafe")}catch{}})();function te(a,t){return{headerData:{allTabOptions:G,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);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(O())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(Z),oe=ee.div`
1
+ import{j as r}from"./liveblocks-fmW2BCAL.js";import{u as k,P as v}from"./ScreenRoutes-DUdCZ3Hy.js";import{a as f}from"./sentry-DnPx9ZiR.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-BKj2fZmm.js";import{KB as R,KC as N,kk as E,KD as M,l2 as L,l5 as $,kT as _,KE as K,KF as B,k$ as F,kX as O}from"./zeni-epic-state-DzirqYa9.js";import{z as X,_ as q,i as V,j as J,a0 as Z,s as G,X as H,a as Q,g as W,h as Y}from"./index-DlKnLY_3.js";import{n as ee}from"./mui-DwXrZiGV.js";import"./recharts-DAnSglUp.js";import"./analyticsHelper-DsQyFXLY.js";import"./utils-Ce920Rop.js";import"./empty-Bh_JQC-w.js";import"./index--v-p65m6.js";import"./url-DkOrIhtQ.js";import"./index-D7-x1ymk.js";import"./analytics-f4_tykwx.js";import"./lottie-CiwuJ4hc.js";import"./lexical-BQPfW1XP.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]="b5ebf758-35dd-4b0e-8aac-71cfea4e859a",a._sentryDebugIdIdentifier="sentry-dbid-b5ebf758-35dd-4b0e-8aac-71cfea4e859a")}catch{}})();function te(a,t){return{headerData:{allTabOptions:G,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);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(O())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(Z),oe=ee.div`
2
2
  padding: ${J.sp5};
3
3
  text-align: center;
4
- `;function se(){const a=P(),t=T(),n=m(j),g=m(N),[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=X.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,s)=>{const i=s.updatedByName??A;t($({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",i=b??"";if(!o||!s||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${q}/tableDownload?query=${x}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"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 s=n.rows.find(i=>i.tenantId===o);s!=null&&s.isAnalyzing?p.current.add(o):s!=null&&!s.isAnalyzing&&p.current.has(o)&&(e.add(o),p.current.delete(o))}e.size>0&&h(o=>{const s=new Set(o);for(const i of e)s.delete(i);return s})},[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?r.jsx(oe,{children:V.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):r.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=k();return t?null:a?r.jsx(C,{children:r.jsx(I,{path:"/*",element:r.jsx(v,{element:r.jsx(se,{})})})}):r.jsx(C,{children:r.jsx(I,{path:"/*",element:r.jsx(R,{to:"/management",replace:!0})})})}export{ze as default};
4
+ `;function se(){const a=P(),t=T(),n=m(R),g=m(N),[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=X.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,s)=>{const i=s.updatedByName??A;t($({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=M(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",i=b??"";if(!o||!s||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${q}/tableDownload?query=${x}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"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 s=n.rows.find(i=>i.tenantId===o);s!=null&&s.isAnalyzing?p.current.add(o):s!=null&&!s.isAnalyzing&&p.current.has(o)&&(e.add(o),p.current.delete(o))}e.size>0&&h(o=>{const s=new Set(o);for(const i of e)s.delete(i);return s})},[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?r.jsx(oe,{children:V.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):r.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=k();return t?null:a?r.jsx(C,{children:r.jsx(I,{path:"/*",element:r.jsx(v,{element:r.jsx(se,{})})})}):r.jsx(C,{children:r.jsx(I,{path:"/*",element:r.jsx(j,{to:"/management",replace:!0})})})}export{ze as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-Dc2bCXeU.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6d600b3f-6c40-4b9e-8892-371ff81f1c30",t._sentryDebugIdIdentifier="sentry-dbid-6d600b3f-6c40-4b9e-8892-371ff81f1c30")}catch{}})();const c="64px",f={},k=({src:t,light:n,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:u})=>{const[p,o]=h.useState(null);h.useEffect(()=>{!t||!n||!r||_({src:t,light:n,oEmbedUrl:r})},[t,n,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(a.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(f[e]){o(f[e]);return}o(null);const b=await(await fetch(E.replace("{url}",e))).json();if(b.thumbnail_url){const g=b.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),f[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=a.isValidElement(n),y={display:"flex",alignItems:"center",justifyContent:"center"},d={preview:{width:"100%",height:"100%",backgroundImage:p&&!l?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:l?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=a.createElement("div",{style:d.shadow,className:"react-player__shadow"},a.createElement("div",{style:d.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:d.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...u?{"aria-label":u}:{}},l?n:null,m||x)};var S=k;export{S as default};
1
+ import{a as h,b as a}from"./sentry-DnPx9ZiR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6d600b3f-6c40-4b9e-8892-371ff81f1c30",t._sentryDebugIdIdentifier="sentry-dbid-6d600b3f-6c40-4b9e-8892-371ff81f1c30")}catch{}})();const c="64px",f={},k=({src:t,light:n,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:u})=>{const[p,o]=h.useState(null);h.useEffect(()=>{!t||!n||!r||_({src:t,light:n,oEmbedUrl:r})},[t,n,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(a.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(f[e]){o(f[e]);return}o(null);const b=await(await fetch(E.replace("{url}",e))).json();if(b.thumbnail_url){const g=b.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),f[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=a.isValidElement(n),y={display:"flex",alignItems:"center",justifyContent:"center"},d={preview:{width:"100%",height:"100%",backgroundImage:p&&!l?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:l?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=a.createElement("div",{style:d.shadow,className:"react-player__shadow"},a.createElement("div",{style:d.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:d.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...u?{"aria-label":u}:{}},l?n:null,m||x)};var S=k;export{S as default};