@zeniai/web-cockpit-ui 2.2.12-qa → 2.2.13-next

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 (41) hide show
  1. package/dist/assets/CreditAgentRoutes-BXjAvqJG.js +4 -0
  2. package/dist/assets/{Preview-2xF0EBmI.js → Preview-B4_Gyxyw.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-D9rIq3XI.js → ScreenRoutes-DF1y7J5S.js} +47 -47
  4. package/dist/assets/SignInScreen-CFtRQTVD.js +1 -0
  5. package/dist/assets/{analytics-khsT3kbk.js → analytics-mj0rw1VE.js} +1 -1
  6. package/dist/assets/{analyticsHelper-DbhgouER.js → analyticsHelper-D23jeyIJ.js} +1 -1
  7. package/dist/assets/{core-BNX-31jO.js → core-BYmIfkAr.js} +1 -1
  8. package/dist/assets/{dash.all.min-Dvg22Naz.js → dash.all.min-C7vN744U.js} +1 -1
  9. package/dist/assets/{empty-DiqxiKdJ.js → empty-1WYDUqCs.js} +1 -1
  10. package/dist/assets/{empty-BWW5SQfM.js → empty-CyMIaqBW.js} +1 -1
  11. package/dist/assets/epic-BhqcdFTL.js +2 -0
  12. package/dist/assets/{index-DKllbmsA.js → index-B0G3iGk6.js} +1 -1
  13. package/dist/assets/{index-CV_Nr9t1.js → index-C1Ypgvdz.js} +1 -1
  14. package/dist/assets/{index-B8Vh3Xcf.js → index-C3I3j2Ku.js} +9553 -10467
  15. package/dist/assets/{index-C64B-o9X.js → index-DNkp3OmZ.js} +1 -1
  16. package/dist/assets/{index-AgCrIjsQ.js → index-DtTdlXpL.js} +1 -1
  17. package/dist/assets/{index-BDDQAMHQ.js → index-OIy0-f6U.js} +2 -2
  18. package/dist/assets/{index-BUrsQVqE.js → index-lr7J_XNm.js} +1 -1
  19. package/dist/assets/{lexical-CwzLHspT.js → lexical-DQ-Nqjl7.js} +1 -1
  20. package/dist/assets/{liveblocks-ffi4i0aE.js → liveblocks-BhxuLCQy.js} +1 -1
  21. package/dist/assets/{lottie-CZWUDGkA.js → lottie-UAbKS5Ou.js} +1 -1
  22. package/dist/assets/{mui-Uon7sggT.js → mui-D_JtuJWW.js} +1 -1
  23. package/dist/assets/{react-CoGSpm_W.js → react-Bi-nD7EV.js} +1 -1
  24. package/dist/assets/{react-D3NQfAaI.js → react-Br5e3kXu.js} +1 -1
  25. package/dist/assets/{react-B0IsqLOt.js → react-C6mTaHma.js} +1 -1
  26. package/dist/assets/{react-CLsap1dM.js → react-CH-zeEka.js} +1 -1
  27. package/dist/assets/{react-BzZTlAqQ.js → react-CMZ2vXlt.js} +1 -1
  28. package/dist/assets/{react-Ct9y7ON_.js → react-CT5n6PQj.js} +2 -2
  29. package/dist/assets/{react-CTHFIRWj.js → react-DA8f28lA.js} +1 -1
  30. package/dist/assets/{react-DGwzT705.js → react-DS_kCSTY.js} +1 -1
  31. package/dist/assets/{recharts-DcOm8P4e.js → recharts-ByduT-CA.js} +1 -1
  32. package/dist/assets/{sentry-DJDeypVF.js → sentry-BSkUpqOE.js} +1 -1
  33. package/dist/assets/{url-D51EEM8T.js → url-BDYsWyWj.js} +1 -1
  34. package/dist/assets/{url-CrNNHswT.js → url-CleyF36q.js} +1 -1
  35. package/dist/assets/{utils-CX-JbJoZ.js → utils-B9CZeSYg.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-DWSF8x1l.js → zeni-epic-state-wh-wCh-r.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +2 -2
  39. package/dist/assets/CreditAgentRoutes-CoFBYYpR.js +0 -4
  40. package/dist/assets/SignInScreen-Dvoh2Rcp.js +0 -1
  41. package/dist/assets/epic-Fpi9SWMN.js +0 -2
@@ -0,0 +1,4 @@
1
+ import{j as s}from"./liveblocks-BhxuLCQy.js";import{u as D,P as v}from"./ScreenRoutes-DF1y7J5S.js";import{a as f}from"./sentry-BSkUpqOE.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-BYmIfkAr.js";import{Q_ as N,Q$ as k,lc as E,R0 as M,m2 as $,m5 as L,lT as _,R1 as O,R2 as B,l$ as F,lX as q}from"./zeni-epic-state-wh-wCh-r.js";import{z as Q,_ as V,G,k as J,a0 as X,c as Z,w as H,a as K,g as W,b as Y}from"./index-C3I3j2Ku.js";import{n as ee}from"./mui-D_JtuJWW.js";import"./recharts-ByduT-CA.js";import"./analyticsHelper-D23jeyIJ.js";import"./utils-B9CZeSYg.js";import"./empty-1WYDUqCs.js";import"./index-DNkp3OmZ.js";import"./url-BDYsWyWj.js";import"./index-lr7J_XNm.js";import"./analytics-mj0rw1VE.js";import"./lottie-UAbKS5Ou.js";import"./lexical-DQ-Nqjl7.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]="000ddc3b-199d-435f-b46c-809f03105b3b",a._sentryDebugIdIdentifier="sentry-dbid-000ddc3b-199d-435f-b46c-809f03105b3b")}catch{}})();function te(a,t){return{headerData:{allTabOptions:Z,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);K.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(X),oe=ee.div`
2
+ padding: ${J.sp5};
3
+ text-align: center;
4
+ `;function re(){const a=P(),t=T(),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(L({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t($(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)),R=`${V}/tableDownload?query=${x}`;fetch(R,{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-DJDeypVF.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-BSkUpqOE.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};