@zeniai/web-cockpit-ui 2.1.49-qa → 2.1.50-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-CM0iKdfj.js → CreditAgentRoutes-BaRfFGNR.js} +2 -2
  2. package/dist/assets/{Preview-CUhZWiqA.js → Preview-CKFXZauS.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-DWP1LIef.js → ScreenRoutes-D7ZWrSZn.js} +46 -46
  4. package/dist/assets/SignInScreen-BcJGSN-I.js +1 -0
  5. package/dist/assets/{analytics-DT7vDaT7.js → analytics-BC3Nq0KV.js} +1 -1
  6. package/dist/assets/{analyticsHelper-CLfIx_P6.js → analyticsHelper-DD_fcRni.js} +1 -1
  7. package/dist/assets/{core-D5C7U0El.js → core-Cs1pA3Qv.js} +1 -1
  8. package/dist/assets/{dash.all.min-D30yP2rW.js → dash.all.min-BO1RK26t.js} +1 -1
  9. package/dist/assets/{empty-Base7jrp.js → empty-BE6jAut5.js} +1 -1
  10. package/dist/assets/{empty-BE8rlmp-.js → empty-lwEwOl-W.js} +1 -1
  11. package/dist/assets/{epic-CetgLTet.js → epic-DVxrNs8b.js} +1 -1
  12. package/dist/assets/{index-Ck335OGY.js → index-BQne1tng.js} +10428 -10387
  13. package/dist/assets/{index-CJecNnnF.js → index-Bf50b5Bs.js} +1 -1
  14. package/dist/assets/{index-CXc73cje.js → index-CKzxmEUw.js} +1 -1
  15. package/dist/assets/{index-CAJr7Awf.js → index-D9ku0iqA.js} +2 -2
  16. package/dist/assets/{index-DYykdK8U.js → index-DNkTBim1.js} +1 -1
  17. package/dist/assets/{index-OMVKrAS4.js → index-DQIf5141.js} +1 -1
  18. package/dist/assets/{index-tDErh5q7.js → index-Dr97g65A.js} +1 -1
  19. package/dist/assets/{lexical-KnlZFLp1.js → lexical-SUS0Vbkf.js} +1 -1
  20. package/dist/assets/{liveblocks-Ck33ukH5.js → liveblocks-B0fMRKfd.js} +1 -1
  21. package/dist/assets/{lottie-DKW9zd22.js → lottie-Cj87y0W4.js} +1 -1
  22. package/dist/assets/{mui-DY7ue8AD.js → mui-u844Lgmj.js} +1 -1
  23. package/dist/assets/{react-DRIbw9lj.js → react-CLHbt7SF.js} +1 -1
  24. package/dist/assets/{react-BaP1oj5F.js → react-ClbwAqV_.js} +2 -2
  25. package/dist/assets/{react-cdGTD3JA.js → react-CxnaojvC.js} +1 -1
  26. package/dist/assets/{react-Ceg3HSKt.js → react-DQDOr_H5.js} +1 -1
  27. package/dist/assets/{react-Dz8WaWMb.js → react-D_Z43lAS.js} +1 -1
  28. package/dist/assets/{react-CCSsTtWy.js → react-Dnan_3SM.js} +1 -1
  29. package/dist/assets/{react-CC3cmBOl.js → react-SmZjoOvy.js} +1 -1
  30. package/dist/assets/{react-Bu39NGa9.js → react-T7HllkZR.js} +1 -1
  31. package/dist/assets/{recharts-Hr_iypqc.js → recharts-E7k1NCjC.js} +1 -1
  32. package/dist/assets/{sentry-DrZo5Ue1.js → sentry-YZ3-hurK.js} +1 -1
  33. package/dist/assets/{url-n3w7LZ9N.js → url-dmKbA4MG.js} +1 -1
  34. package/dist/assets/{url-CTcwheQC.js → url-kyTFKtUp.js} +1 -1
  35. package/dist/assets/{utils-DW8e7F7R.js → utils-BR9HzBd6.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-5XRsAdDb.js → zeni-epic-state-COwKsyHJ.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +2 -2
  39. package/dist/assets/SignInScreen-DHKE2Wlq.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-Ck33ukH5.js";import{u as j,P as v}from"./ScreenRoutes-DWP1LIef.js";import{a as f}from"./sentry-DrZo5Ue1.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-D5C7U0El.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-5XRsAdDb.js";import{z as Q,_ as V,d as J,e as Z,a0 as G,f as H,Q as K,a as W,g as X,h as Y}from"./index-Ck335OGY.js";import{n as ee}from"./mui-DY7ue8AD.js";import"./recharts-Hr_iypqc.js";import"./analyticsHelper-CLfIx_P6.js";import"./utils-DW8e7F7R.js";import"./empty-Base7jrp.js";import"./index-CXc73cje.js";import"./url-n3w7LZ9N.js";import"./index-OMVKrAS4.js";import"./analytics-DT7vDaT7.js";import"./lottie-DKW9zd22.js";import"./lexical-KnlZFLp1.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]="f9d4a39f-5a85-4092-bcce-84ad924581aa",a._sentryDebugIdIdentifier="sentry-dbid-f9d4a39f-5a85-4092-bcce-84ad924581aa")}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`
1
+ import{j as s}from"./liveblocks-B0fMRKfd.js";import{u as j,P as v}from"./ScreenRoutes-D7ZWrSZn.js";import{a as f}from"./sentry-YZ3-hurK.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-Cs1pA3Qv.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-COwKsyHJ.js";import{z as Q,_ as V,O 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-BQne1tng.js";import{n as ee}from"./mui-u844Lgmj.js";import"./recharts-E7k1NCjC.js";import"./analyticsHelper-DD_fcRni.js";import"./utils-BR9HzBd6.js";import"./empty-BE6jAut5.js";import"./index-CKzxmEUw.js";import"./url-dmKbA4MG.js";import"./index-DQIf5141.js";import"./analytics-BC3Nq0KV.js";import"./lottie-Cj87y0W4.js";import"./lexical-SUS0Vbkf.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]="90e2c924-cf70-4812-bdc4-4779a24efa6c",a._sentryDebugIdIdentifier="sentry-dbid-90e2c924-cf70-4812-bdc4-4779a24efa6c")}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
2
  padding: ${Z.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),y=m(e=>e.tenantState.currentTenantId),b=m(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{b==="Not-Started"&&t(E())},[t,b]);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=y??"";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,y,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: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};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-DrZo5Ue1.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-YZ3-hurK.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};