@zeniai/web-cockpit-ui 2.2.20-qa → 2.2.21-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-vjVYV8oF.js → CreditAgentRoutes-BEmZim60.js} +1 -1
  2. package/dist/assets/{Preview-CrUQtNgB.js → Preview-BqCWCXhj.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-Tn6Tbl1x.js → ScreenRoutes-DI4QT7Ao.js} +50 -50
  4. package/dist/assets/SignInScreen-C_vIqDRS.js +1 -0
  5. package/dist/assets/{analytics-2hR507YC.js → analytics-ByscWl_w.js} +1 -1
  6. package/dist/assets/{analyticsHelper-CBhItsXq.js → analyticsHelper-vWpOSwDr.js} +1 -1
  7. package/dist/assets/{core-BCQebSED.js → core-UM7OPS9w.js} +1 -1
  8. package/dist/assets/{dash.all.min-DgaQcPOP.js → dash.all.min-Blnxtb8m.js} +1 -1
  9. package/dist/assets/{empty-Dz2q_cdj.js → empty-BgjDKFyf.js} +1 -1
  10. package/dist/assets/{empty-Dbsp-Mc2.js → empty-CA2nDbsD.js} +1 -1
  11. package/dist/assets/epic-CJGRv7XT.js +2 -0
  12. package/dist/assets/{index-6QHzIIH4.js → index-767O4w-f.js} +1 -1
  13. package/dist/assets/{index-D7PEzt7j.js → index-AbEVd3vz.js} +6624 -6618
  14. package/dist/assets/{index-Dxj5ettF.js → index-CSqN83QC.js} +2 -2
  15. package/dist/assets/{index-Ua4V5seG.js → index-CfUHZqdu.js} +1 -1
  16. package/dist/assets/{index-D6EDd0vM.js → index-D3--ckwJ.js} +1 -1
  17. package/dist/assets/{index-CWdMdsSD.js → index-Dq3i1D82.js} +1 -1
  18. package/dist/assets/{index-BFHxI41u.js → index-q7Y8ZoWD.js} +1 -1
  19. package/dist/assets/{lexical-DT7TiHw-.js → lexical-D9ZDzXDp.js} +1 -1
  20. package/dist/assets/{liveblocks-DMgyUOJA.js → liveblocks-CKNTwJ5i.js} +1 -1
  21. package/dist/assets/{lottie-Cg5mQGOU.js → lottie-D9dkUppl.js} +1 -1
  22. package/dist/assets/{mui-oYu72Q55.js → mui-CFmT1lew.js} +1 -1
  23. package/dist/assets/{react-CjZ6jifa.js → react-BX1rj2ok.js} +1 -1
  24. package/dist/assets/{react-Dr8fX0Iv.js → react-CB1WzEyh.js} +2 -2
  25. package/dist/assets/{react-By4cPpDs.js → react-CUzEzrvh.js} +1 -1
  26. package/dist/assets/{react-DoTyc4lH.js → react-DVjJVQpi.js} +1 -1
  27. package/dist/assets/{react-BIibprXC.js → react-DYR4y3hq.js} +1 -1
  28. package/dist/assets/{react-CS5kQb7V.js → react-OInvBv2O.js} +1 -1
  29. package/dist/assets/{react-De_vU9vh.js → react-eCiO4987.js} +1 -1
  30. package/dist/assets/{react-Cbe7NVpm.js → react-eJ-pm5FC.js} +1 -1
  31. package/dist/assets/{recharts-B0iaMSLQ.js → recharts-syXEGtRK.js} +1 -1
  32. package/dist/assets/{sentry-DxAIlkc7.js → sentry-C5g8jxei.js} +1 -1
  33. package/dist/assets/{url-DkTfn43G.js → url-B39CzCLv.js} +1 -1
  34. package/dist/assets/{url-B7BQ2sqr.js → url-DD9fw1F6.js} +1 -1
  35. package/dist/assets/{utils-DTiDL949.js → utils-xPG-Q6KV.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-KT9SrZug.js → zeni-epic-state-CihNeqfl.js} +4 -4
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-EL9dy1sH.js +0 -1
  40. package/dist/assets/epic-357x4bC9.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DMgyUOJA.js";import{u as D,P as v}from"./ScreenRoutes-Tn6Tbl1x.js";import{a as u}from"./sentry-DxAIlkc7.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-BCQebSED.js";import{Re as N,Rf as k,lu as E,Rg as M,mk as L,mn as _,m9 as $,Rh as O,Ri as B,mh as F,md as q}from"./zeni-epic-state-KT9SrZug.js";import{z as V,_ as G,G as J,n as Z,a0 as H,c as K,w as Q,b as W,g as X,d as Y}from"./index-D7PEzt7j.js";import{n as ee}from"./mui-oYu72Q55.js";import"./recharts-B0iaMSLQ.js";import"./analyticsHelper-CBhItsXq.js";import"./utils-DTiDL949.js";import"./empty-Dz2q_cdj.js";import"./index-BFHxI41u.js";import"./url-DkTfn43G.js";import"./index-CWdMdsSD.js";import"./analytics-2hR507YC.js";import"./lottie-Cg5mQGOU.js";import"./lexical-DT7TiHw-.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]="88a03d79-32d0-498a-9919-0a0236c38657",a._sentryDebugIdIdentifier="sentry-dbid-88a03d79-32d0-498a-9919-0a0236c38657")}catch{}})();function te(a,t){return{headerData:{allTabOptions:K,selectedTabOption:Q("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(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
1
+ import{j as s}from"./liveblocks-CKNTwJ5i.js";import{u as D,P as v}from"./ScreenRoutes-DI4QT7Ao.js";import{a as u}from"./sentry-C5g8jxei.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-UM7OPS9w.js";import{Re as N,Rf as k,lu as E,Rg as M,mk as L,mn as _,m9 as $,Rh as O,Ri as B,mh as F,md as q}from"./zeni-epic-state-CihNeqfl.js";import{z as V,_ as G,G as J,n as Z,a0 as H,c as K,w as Q,b as W,g as X,d as Y}from"./index-AbEVd3vz.js";import{n as ee}from"./mui-CFmT1lew.js";import"./recharts-syXEGtRK.js";import"./analyticsHelper-vWpOSwDr.js";import"./utils-xPG-Q6KV.js";import"./empty-BgjDKFyf.js";import"./index-q7Y8ZoWD.js";import"./url-B39CzCLv.js";import"./index-Dq3i1D82.js";import"./analytics-ByscWl_w.js";import"./lottie-D9dkUppl.js";import"./lexical-D9ZDzXDp.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]="88a03d79-32d0-498a-9919-0a0236c38657",a._sentryDebugIdIdentifier="sentry-dbid-88a03d79-32d0-498a-9919-0a0236c38657")}catch{}})();function te(a,t){return{headerData:{allTabOptions:K,selectedTabOption:Q("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(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
2
2
  padding: ${Z.sp5};
3
3
  text-align: center;
4
4
  `;function re(){const a=P(),t=U(),n=m(N),g=m(k),[c,h]=u.useState(new Set),p=u.useRef(new Set),y=m(e=>e.tenantState.currentTenantId),b=m(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{b==="Not-Started"&&t(E())},[t,b]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=u.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=y??"";if(!o||!r||!i)return;const R=encodeURIComponent(JSON.stringify(e)),x=`${G}/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 f=await l.text();throw new Error(`Download failed: ${l.status} ${f}`)}return l.blob()}).then(l=>{const f=URL.createObjectURL(l),S=document.createElement("a");S.href=f,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,A,d,y,n.rows]);u.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=u.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: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-DxAIlkc7.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-C5g8jxei.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};