@zeniai/web-cockpit-ui 2.0.50-qa → 2.0.51-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 (40) hide show
  1. package/dist/assets/{CreditAgentRoutes-_rAmf-Xw.js → CreditAgentRoutes-Bu5PJA_H.js} +2 -2
  2. package/dist/assets/{Preview-C_V32WZ7.js → Preview-DWfK-d70.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-RWFe3XVL.js → ScreenRoutes-BaitvEX9.js} +63 -63
  4. package/dist/assets/SignInScreen-B9EEChLn.js +1 -0
  5. package/dist/assets/{analytics-DGHkSXoW.js → analytics-CMDS33UE.js} +1 -1
  6. package/dist/assets/{analyticsHelper-DA8TQTap.js → analyticsHelper-De4Fp7xr.js} +1 -1
  7. package/dist/assets/{core-Dv3l5Rvh.js → core-BgM1xAYz.js} +1 -1
  8. package/dist/assets/{dash.all.min-B_2UbH4Q.js → dash.all.min-DcvLcDm-.js} +1 -1
  9. package/dist/assets/{empty-Cqis8NSl.js → empty-CE5jKaTd.js} +1 -1
  10. package/dist/assets/{empty-DgQPrOJi.js → empty-Ds18megA.js} +1 -1
  11. package/dist/assets/epic-DymkBnmJ.js +2 -0
  12. package/dist/assets/{index-DGVKmmhx.js → index-BMhzfe9o.js} +1 -1
  13. package/dist/assets/{index-Bvo6zxJi.js → index-BYSoX-QB.js} +1 -1
  14. package/dist/assets/{index-B8zuDlpv.js → index-BbditDuJ.js} +2 -2
  15. package/dist/assets/{index-DopSTER4.js → index-BdXrTFE3.js} +4434 -4449
  16. package/dist/assets/{index-BEhtiJ0X.js → index-CwFJ8sH1.js} +1 -1
  17. package/dist/assets/{index-CCwqVLEE.js → index-DHPSGkZC.js} +1 -1
  18. package/dist/assets/{index-DIZbCNfs.js → index-gKcxU2WM.js} +1 -1
  19. package/dist/assets/{lexical-BDnZad2Y.js → lexical-CJW3GXDD.js} +1 -1
  20. package/dist/assets/{liveblocks-DzV9U5Bm.js → liveblocks-C5DvzS91.js} +1 -1
  21. package/dist/assets/{lottie-C8qvaUYD.js → lottie-CKLEVxJ-.js} +1 -1
  22. package/dist/assets/{mui-ejYaqlsK.js → mui-VqisC7aR.js} +1 -1
  23. package/dist/assets/{react-CGkMJPfh.js → react-BBh45Fbi.js} +1 -1
  24. package/dist/assets/{react-CGfbMdMQ.js → react-C00hsNB4.js} +1 -1
  25. package/dist/assets/{react-CQu92gaq.js → react-CD0p0a1B.js} +2 -2
  26. package/dist/assets/{react-5Ux8r0ST.js → react-CQXNFA6A.js} +1 -1
  27. package/dist/assets/{react-CCnbCtxB.js → react-DJHXXOZY.js} +1 -1
  28. package/dist/assets/{react-DFXbinXC.js → react-Dd715_YV.js} +1 -1
  29. package/dist/assets/{react-yuUC-AoN.js → react-DraiCdeO.js} +1 -1
  30. package/dist/assets/{react-CEyeBgoS.js → react-vrseMqrQ.js} +1 -1
  31. package/dist/assets/{recharts-BtFuqlyC.js → recharts-CJ3BWTjZ.js} +1 -1
  32. package/dist/assets/{sentry-CPwsGQ3W.js → sentry-CHsaR5MW.js} +1 -1
  33. package/dist/assets/{url-KZjQoTm5.js → url-BcBctLVm.js} +1 -1
  34. package/dist/assets/{url-IXFzfx6D.js → url-CkxVpC-f.js} +1 -1
  35. package/dist/assets/{utils-M-Cb21Hp.js → utils-D0gTOUK6.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-C8dAmtua.js → zeni-epic-state-C_DLhgjy.js} +5 -5
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-CO7FSHLl.js +0 -1
  40. package/dist/assets/epic-D8HEzAov.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-DzV9U5Bm.js";import{z as w,$ as v,D as j,o as E,a0 as P,F as k,Q as R,c as T,g as N,d as M,v as L,x as $}from"./index-DopSTER4.js";import{a as f}from"./sentry-CPwsGQ3W.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-Dv3l5Rvh.js";import{I1 as V,I2 as q,jM as Q,I3 as J,kg as Z,kj as G,k3 as H,I4 as K,I5 as W,kd as X,k9 as Y}from"./zeni-epic-state-C8dAmtua.js";import{n as ee}from"./mui-ejYaqlsK.js";import{P as te}from"./ScreenRoutes-RWFe3XVL.js";import"./recharts-BtFuqlyC.js";import"./analytics-DGHkSXoW.js";import"./lottie-C8qvaUYD.js";import"./lexical-BDnZad2Y.js";import"./utils-M-Cb21Hp.js";import"./analyticsHelper-DA8TQTap.js";import"./empty-DgQPrOJi.js";import"./index-BEhtiJ0X.js";import"./url-KZjQoTm5.js";import"./index-DGVKmmhx.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]="a9c17308-4930-40b2-adf1-aa3526a46de6",a._sentryDebugIdIdentifier="sentry-dbid-a9c17308-4930-40b2-adf1-aa3526a46de6")}catch{}})();function ne(a,t){return{headerData:{allTabOptions:k,selectedTabOption:R("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ae(a,t){return{headerActions:{onTabChange:n=>{const u=M(n),r=N(n);T.trackCockpitTabClicked(r),t.navigate(`../../${u}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(Y())},onSaveMacro:n=>{a(X(n))},onResetSaveMacro:()=>{a(W())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const oe=O(ne,ae)(P),se=ee.div`
1
+ import{j as i}from"./liveblocks-C5DvzS91.js";import{z as w,_ as v,D as j,o as E,a0 as P,F as k,Q as R,c as T,g as N,d as M,v as L,x as $}from"./index-BdXrTFE3.js";import{a as f}from"./sentry-CHsaR5MW.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-BgM1xAYz.js";import{H$ as V,I0 as q,jM as Q,I1 as H,kg as J,kj as Z,k3 as G,I2 as K,I3 as W,kd as X,k9 as Y}from"./zeni-epic-state-C_DLhgjy.js";import{n as ee}from"./mui-VqisC7aR.js";import{P as te}from"./ScreenRoutes-BaitvEX9.js";import"./recharts-CJ3BWTjZ.js";import"./analytics-CMDS33UE.js";import"./lottie-CKLEVxJ-.js";import"./lexical-CJW3GXDD.js";import"./utils-D0gTOUK6.js";import"./analyticsHelper-De4Fp7xr.js";import"./empty-Ds18megA.js";import"./index-CwFJ8sH1.js";import"./url-BcBctLVm.js";import"./index-BMhzfe9o.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]="7196fba4-fa91-41b8-8c44-121b4844d8ae",a._sentryDebugIdIdentifier="sentry-dbid-7196fba4-fa91-41b8-8c44-121b4844d8ae")}catch{}})();function ne(a,t){return{headerData:{allTabOptions:k,selectedTabOption:R("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ae(a,t){return{headerActions:{onTabChange:n=>{const u=M(n),r=N(n);T.trackCockpitTabClicked(r),t.navigate(`../../${u}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(Y())},onSaveMacro:n=>{a(X(n))},onResetSaveMacro:()=>{a(W())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const oe=O(ne,ae)(P),se=ee.div`
2
2
  padding: ${E.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=_(),t=F(),n=S(V),u=S(q),[r,m]=f.useState(new Set),g=f.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),I=S(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{I==="Not-Started"&&t(Q())},[t,I]);const d=w.getSignedInUser(),b=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,x=f.useMemo(()=>({onFetch:()=>{t(H())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??b;t(G({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(Z(e))},onDownloadReport:()=>{const e=J(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=y??"";if(!o||!s||!c)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${v}/tableDownload?query=${z}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"zeni-tenant-id":c}}).then(async l=>{if(!l.ok){const p=await l.text();throw new Error(`Download failed: ${l.status} ${p}`)}return l.blob()}).then(l=>{const p=URL.createObjectURL(l),h=document.createElement("a");h.href=p,h.download=`${e.file_name}.xlsx`,h.click(),URL.revokeObjectURL(p)}).catch(()=>{})}}),[t,b,d,y,n.rows]);f.useEffect(()=>{if(r.size===0)return;const e=new Set;for(const o of r){const s=n.rows.find(c=>c.tenantId===o);s!=null&&s.isAnalyzing?g.current.add(o):s!=null&&!s.isAnalyzing&&g.current.has(o)&&(e.add(o),g.current.delete(o))}e.size>0&&m(o=>{const s=new Set(o);for(const c of e)s.delete(c);return s})},[n.rows,r]);const U=f.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&r.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,r]);return d==null?i.jsx(se,{children:j.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(oe,{macroCombined:u,navigate:a,cardProfilesActions:x,cardProfilesData:U})}function xe(){const{useDynamicConfig:a}=L(),{configValue:t,isDynamicConfigLoading:n}=a($.creditAgentEnablement);if(n)return null;const r=w.getSignedInUser()?.userEmail,m=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&m.includes(r)?i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(te,{element:i.jsx(re,{})})})}):i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(B,{to:"/management",replace:!0})})})}export{xe as default};
4
+ `;function re(){const a=_(),t=F(),n=S(V),u=S(q),[r,m]=f.useState(new Set),g=f.useRef(new Set),b=S(e=>e.tenantState.currentTenantId),y=S(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{y==="Not-Started"&&t(Q())},[t,y]);const d=w.getSignedInUser(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,x=f.useMemo(()=>({onFetch:()=>{t(G())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??I;t(Z({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(J(e))},onDownloadReport:()=>{const e=H(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=b??"";if(!o||!s||!c)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${v}/tableDownload?query=${z}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"zeni-tenant-id":c}}).then(async l=>{if(!l.ok){const p=await l.text();throw new Error(`Download failed: ${l.status} ${p}`)}return l.blob()}).then(l=>{const p=URL.createObjectURL(l),h=document.createElement("a");h.href=p,h.download=`${e.file_name}.xlsx`,h.click(),URL.revokeObjectURL(p)}).catch(()=>{})}}),[t,I,d,b,n.rows]);f.useEffect(()=>{if(r.size===0)return;const e=new Set;for(const o of r){const s=n.rows.find(c=>c.tenantId===o);s!=null&&s.isAnalyzing?g.current.add(o):s!=null&&!s.isAnalyzing&&g.current.has(o)&&(e.add(o),g.current.delete(o))}e.size>0&&m(o=>{const s=new Set(o);for(const c of e)s.delete(c);return s})},[n.rows,r]);const U=f.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&r.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,r]);return d==null?i.jsx(se,{children:j.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(oe,{macroCombined:u,navigate:a,cardProfilesActions:x,cardProfilesData:U})}function xe(){const{useDynamicConfig:a}=L(),{configValue:t,isDynamicConfigLoading:n}=a($.creditAgentEnablement);if(n)return null;const r=w.getSignedInUser()?.userEmail,m=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&m.includes(r)?i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(te,{element:i.jsx(re,{})})})}):i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(B,{to:"/management",replace:!0})})})}export{xe as default};
@@ -1 +1 @@
1
- import{a as h,b as a}from"./sentry-CPwsGQ3W.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-CHsaR5MW.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};