@zeniai/web-cockpit-ui 2.1.47-qa → 2.1.48-qa

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-k_JE8PTM.js → CreditAgentRoutes-Dj-uYtNK.js} +3 -3
  2. package/dist/assets/{Preview-BT6WwR99.js → Preview-w7Olyv3C.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-DjOQucmR.js → ScreenRoutes-DauecxGx.js} +46 -46
  4. package/dist/assets/SignInScreen-BxCE-yBT.js +1 -0
  5. package/dist/assets/{analytics-BpKWYqMU.js → analytics-BvHX-Irw.js} +1 -1
  6. package/dist/assets/{analyticsHelper-BzdhKYy2.js → analyticsHelper-DKKT1VUX.js} +1 -1
  7. package/dist/assets/{core-ij4gmuob.js → core-CwIEhiNi.js} +1 -1
  8. package/dist/assets/{dash.all.min-D0C-5aoR.js → dash.all.min-CKRtcWSu.js} +1 -1
  9. package/dist/assets/{empty-DPSRiAwv.js → empty-BW52Nn84.js} +1 -1
  10. package/dist/assets/{empty-Cz8KHIlL.js → empty-DSPHa30F.js} +1 -1
  11. package/dist/assets/{epic-DL6hjOXQ.js → epic-BGBY31OC.js} +1 -1
  12. package/dist/assets/{index-CCzmBznJ.js → index-BM3PEaPe.js} +1 -1
  13. package/dist/assets/{index-3f-dlVUK.js → index-BNlCnW5b.js} +2 -2
  14. package/dist/assets/{index-B51a-lVn.js → index-ClzrI9Cj.js} +1 -1
  15. package/dist/assets/{index-zlP8tNPr.js → index-DgXWHGdN.js} +9357 -9296
  16. package/dist/assets/{index-BirMIb8x.js → index-f8QcYpzW.js} +1 -1
  17. package/dist/assets/{index-Fox3Fqc2.js → index-rlNTy4k4.js} +1 -1
  18. package/dist/assets/{index-CI0CAGkM.js → index-t8ulMlEm.js} +1 -1
  19. package/dist/assets/{lexical-C9rBx4uB.js → lexical-DJNk6Gp7.js} +1 -1
  20. package/dist/assets/{liveblocks-BY6AUcuE.js → liveblocks-D3oJJgFP.js} +1 -1
  21. package/dist/assets/{lottie-D_uElL_9.js → lottie-D-kCQ-_s.js} +1 -1
  22. package/dist/assets/{mui-fUJsF17X.js → mui-BwwtTHRL.js} +1 -1
  23. package/dist/assets/{react-DjJ_thu0.js → react-B9xZhSGj.js} +1 -1
  24. package/dist/assets/{react-DJ-Vw-G8.js → react-BvqAWFgZ.js} +1 -1
  25. package/dist/assets/{react-BzW5L-uV.js → react-CKQOg24B.js} +1 -1
  26. package/dist/assets/{react-BJYt8Rv3.js → react-Dh5GBEod.js} +1 -1
  27. package/dist/assets/{react-PkTEPg85.js → react-DyIJvuop.js} +1 -1
  28. package/dist/assets/{react-BNEjwHI4.js → react-dvdmZy8y.js} +1 -1
  29. package/dist/assets/{react-nCmrX0Ub.js → react-laBtxVWh.js} +2 -2
  30. package/dist/assets/{react-DxbkhnV8.js → react-ouPYCl0w.js} +1 -1
  31. package/dist/assets/{recharts-DCgu_xbD.js → recharts-DfRYYkFs.js} +1 -1
  32. package/dist/assets/{sentry-Ch5wkvLO.js → sentry-DB0kcXBD.js} +1 -1
  33. package/dist/assets/{url-DkbaAUxQ.js → url-BcgBwJZ-.js} +1 -1
  34. package/dist/assets/{url-BXui5yj3.js → url-CisC5I84.js} +1 -1
  35. package/dist/assets/{utils-CJbTTAlf.js → utils-C8UaYyTi.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-U2AgZ5_P.js → zeni-epic-state-XxD-m8PB.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-B43z-LiX.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BY6AUcuE.js";import{u as j,P as v}from"./ScreenRoutes-DjOQucmR.js";import{a as f}from"./sentry-Ch5wkvLO.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-ij4gmuob.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-U2AgZ5_P.js";import{z as Q,Z as V,d as Z,n as J,a0 as G,f as H,Q as K,b as W,g as X,h as Y}from"./index-zlP8tNPr.js";import{n as ee}from"./mui-fUJsF17X.js";import"./recharts-DCgu_xbD.js";import"./analyticsHelper-BzdhKYy2.js";import"./utils-CJbTTAlf.js";import"./empty-Cz8KHIlL.js";import"./index-CI0CAGkM.js";import"./url-BXui5yj3.js";import"./index-B51a-lVn.js";import"./analytics-BpKWYqMU.js";import"./lottie-D_uElL_9.js";import"./lexical-C9rBx4uB.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]="272c95dc-5761-4057-a9ce-71dd92abe83d",a._sentryDebugIdIdentifier="sentry-dbid-272c95dc-5761-4057-a9ce-71dd92abe83d")}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
- padding: ${J.sp5};
1
+ import{j as s}from"./liveblocks-D3oJJgFP.js";import{u as j,P as v}from"./ScreenRoutes-DauecxGx.js";import{a as f}from"./sentry-DB0kcXBD.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-CwIEhiNi.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-XxD-m8PB.js";import{z as Q,_ as V,e 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-DgXWHGdN.js";import{n as ee}from"./mui-BwwtTHRL.js";import"./recharts-DfRYYkFs.js";import"./analyticsHelper-DKKT1VUX.js";import"./utils-C8UaYyTi.js";import"./empty-DSPHa30F.js";import"./index-t8ulMlEm.js";import"./url-CisC5I84.js";import"./index-ClzrI9Cj.js";import"./analytics-BvHX-Irw.js";import"./lottie-D-kCQ-_s.js";import"./lexical-DJNk6Gp7.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]="3aeb391a-40ca-4d06-a8fe-b73be41a9975",a._sentryDebugIdIdentifier="sentry-dbid-3aeb391a-40ca-4d06-a8fe-b73be41a9975")}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
+ 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),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:Z.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-Ch5wkvLO.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-DB0kcXBD.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};