@zeniai/web-cockpit-ui 2.2.32-qa → 2.2.33-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 (38) hide show
  1. package/dist/assets/{CreditAgentRoutes-BVX_6a9W.js → CreditAgentRoutes-7gj6MzoB.js} +2 -2
  2. package/dist/assets/{Preview-C2mCjPyZ.js → Preview-D4S4Ogmg.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-C_Aj4730.js → ScreenRoutes-DfYNGptR.js} +48 -48
  4. package/dist/assets/{SignInScreen-vg3bJEwG.js → SignInScreen-TfeSgS-r.js} +1 -1
  5. package/dist/assets/{analytics-D8F5kdO7.js → analytics-Bh_DfEp7.js} +1 -1
  6. package/dist/assets/{analyticsHelper-DMuP6JU-.js → analyticsHelper-DZbW28Ug.js} +1 -1
  7. package/dist/assets/{core-BLGMTMN-.js → core-JEiKuLcw.js} +1 -1
  8. package/dist/assets/{dash.all.min-DS85SvT0.js → dash.all.min-DtdU8T3C.js} +1 -1
  9. package/dist/assets/{empty-BnLKe05w.js → empty-8wS58_jr.js} +1 -1
  10. package/dist/assets/{empty-CpX1GqQO.js → empty-BlOUB_ME.js} +1 -1
  11. package/dist/assets/{epic-BLOTV3J3.js → epic-UujABlGP.js} +1 -1
  12. package/dist/assets/{index-D9mmir-C.js → index-8aEwZbU9.js} +9015 -8893
  13. package/dist/assets/{index-DfqawnAH.js → index-B78khvxj.js} +1 -1
  14. package/dist/assets/{index-ZZsKgoZo.js → index-BMvMcy61.js} +1 -1
  15. package/dist/assets/{index-DB_FutAX.js → index-DD_pBUxO.js} +1 -1
  16. package/dist/assets/{index-DLwZg-dS.js → index-DbPoeVqh.js} +1 -1
  17. package/dist/assets/{index-XNsycS_-.js → index-Dz1d4JPh.js} +2 -2
  18. package/dist/assets/{index-D2Xh_PNd.js → index-tarAmDVc.js} +1 -1
  19. package/dist/assets/{lexical-CCZqeORS.js → lexical-WcliCV7V.js} +1 -1
  20. package/dist/assets/{liveblocks-BbmZN1So.js → liveblocks-D2mSAMhT.js} +1 -1
  21. package/dist/assets/{lottie-faWnYRIg.js → lottie-DPFh5Gmn.js} +1 -1
  22. package/dist/assets/{mui-CpE0oevY.js → mui-CXj1307s.js} +1 -1
  23. package/dist/assets/{react-Bg-SsvPF.js → react-B70syx80.js} +2 -2
  24. package/dist/assets/{react-Bvk2YCaw.js → react-C-Or2iLZ.js} +1 -1
  25. package/dist/assets/{react-DxhyFMc7.js → react-C3lssWLi.js} +1 -1
  26. package/dist/assets/{react-PTFzhp8X.js → react-CH7wZf_K.js} +1 -1
  27. package/dist/assets/{react-2Zu4lvMW.js → react-CtHDPw57.js} +1 -1
  28. package/dist/assets/{react-TsrJzPGt.js → react-CvH6XiEs.js} +1 -1
  29. package/dist/assets/{react-CalQV6dX.js → react-D-qsV5vG.js} +1 -1
  30. package/dist/assets/{react-C1Skab72.js → react-ypmdS0HM.js} +1 -1
  31. package/dist/assets/{recharts-D98Lz0Qq.js → recharts-BdKEdQly.js} +1 -1
  32. package/dist/assets/{sentry-B6uZBe9x.js → sentry-Cctg3B_K.js} +1 -1
  33. package/dist/assets/{url-Cy086uqt.js → url-C1INNYiy.js} +1 -1
  34. package/dist/assets/{url-DyazTy-t.js → url-D15gR_in.js} +1 -1
  35. package/dist/assets/{utils-IWr6Qm-a.js → utils-BfGGINif.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-CUtuIL-4.js → zeni-epic-state-DhJ4pHbf.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BbmZN1So.js";import{u as D,P as v}from"./ScreenRoutes-C_Aj4730.js";import{a as f}from"./sentry-B6uZBe9x.js";import{i as P,n as U,g as m,h as T,k as C,l as I,N as j}from"./core-BLGMTMN-.js";import{RV as N,RW as k,lu as E,RX as M,mk as L,mn as _,m9 as $,RY as O,RZ as B,mh as F,md as V}from"./zeni-epic-state-CUtuIL-4.js";import{z as q,_ as Z,G,k as J,a0 as W,c as X,w as Y,a as H,g as K,b as Q}from"./index-D9mmir-C.js";import{n as ee}from"./mui-CpE0oevY.js";import"./recharts-D98Lz0Qq.js";import"./analyticsHelper-DMuP6JU-.js";import"./utils-IWr6Qm-a.js";import"./empty-BnLKe05w.js";import"./index-DfqawnAH.js";import"./url-DyazTy-t.js";import"./index-DLwZg-dS.js";import"./analytics-D8F5kdO7.js";import"./lottie-faWnYRIg.js";import"./lexical-CCZqeORS.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]="4562c64e-052d-4462-a3b7-f1500cd6b745",a._sentryDebugIdIdentifier="sentry-dbid-4562c64e-052d-4462-a3b7-f1500cd6b745")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(W),oe=ee.div`
1
+ import{j as s}from"./liveblocks-D2mSAMhT.js";import{u as D,P as v}from"./ScreenRoutes-DfYNGptR.js";import{a as f}from"./sentry-Cctg3B_K.js";import{i as P,n as U,g as m,h as T,k as C,l as I,N as j}from"./core-JEiKuLcw.js";import{RV as N,RW as k,lu as E,RX as M,mk as L,mn as $,m9 as O,RY as _,RZ as B,mh as F,md as V}from"./zeni-epic-state-DhJ4pHbf.js";import{z as Z,Z as q,G,n as J,a0 as W,c as X,w as Y,b as H,g as K,d as Q}from"./index-8aEwZbU9.js";import{n as ee}from"./mui-CXj1307s.js";import"./recharts-BdKEdQly.js";import"./analyticsHelper-DZbW28Ug.js";import"./utils-BfGGINif.js";import"./empty-8wS58_jr.js";import"./index-B78khvxj.js";import"./url-D15gR_in.js";import"./index-DbPoeVqh.js";import"./analytics-Bh_DfEp7.js";import"./lottie-DPFh5Gmn.js";import"./lexical-WcliCV7V.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]="2f5f6b5c-a9f0-43dc-94f7-e5f32ce690ca",a._sentryDebugIdIdentifier="sentry-dbid-2f5f6b5c-a9f0-43dc-94f7-e5f32ce690ca")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(W),oe=ee.div`
2
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,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 R=encodeURIComponent(JSON.stringify(e)),x=`${Z}/tableDownload?query=${R}`;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:G.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=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=Z.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 R=encodeURIComponent(JSON.stringify(e)),x=`${q}/tableDownload?query=${R}`;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:G.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};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-B6uZBe9x.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-Cctg3B_K.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};