@zeniai/web-cockpit-ui 2.1.90-qa → 2.1.91-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 (42) hide show
  1. package/dist/assets/CreditAgentRoutes-My2GxwVS.js +4 -0
  2. package/dist/assets/{Preview-DU0MbnHs.js → Preview-DaasMMe_.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-BBMlT_KU.js → ScreenRoutes-BtG1xLKe.js} +65 -65
  4. package/dist/assets/SignInScreen-BNA4Om2k.js +1 -0
  5. package/dist/assets/{analytics-DSLJkiIR.js → analytics-Bty8Hg0Q.js} +1 -1
  6. package/dist/assets/analyticsHelper-CT8EUKzZ.js +1 -0
  7. package/dist/assets/{core-DFJzdXDi.js → core-DgfROaAS.js} +1 -1
  8. package/dist/assets/{dash.all.min-DLGmBIhu.js → dash.all.min-CDwKAlcH.js} +1 -1
  9. package/dist/assets/{empty-66yiS7O7.js → empty-Bws4MSrW.js} +1 -1
  10. package/dist/assets/{empty-CXbG0-Af.js → empty-glYvi4q4.js} +1 -1
  11. package/dist/assets/epic-B73zNx1F.js +2 -0
  12. package/dist/assets/{index-DoF0b-ec.js → index-B5_pr21M.js} +349 -353
  13. package/dist/assets/{index-C4JaLyzo.js → index-CNj6leJs.js} +2 -2
  14. package/dist/assets/{index-kFA2VZvc.js → index-CQwPFbkV.js} +1 -1
  15. package/dist/assets/{index-Cxj7xekL.js → index-Cu0osUaw.js} +1 -1
  16. package/dist/assets/{index-Dk4oYpXb.js → index-OFLS09XU.js} +1 -1
  17. package/dist/assets/{index-BwxXMvAt.js → index-gmESdZqt.js} +1 -1
  18. package/dist/assets/{index-BiFNsHuS.js → index-iTdGasKk.js} +1 -1
  19. package/dist/assets/{lexical-C3nQnkSf.js → lexical-BR_VpIe3.js} +1 -1
  20. package/dist/assets/{liveblocks-D3VPksqU.js → liveblocks-B8GPBdVd.js} +1 -1
  21. package/dist/assets/{lottie-Bp193C_M.js → lottie-BMwaEd0-.js} +1 -1
  22. package/dist/assets/{mui-COgieyqy.js → mui-DhSgbxxf.js} +1 -1
  23. package/dist/assets/{react-CdPjkYTG.js → react-B4GicJ8k.js} +1 -1
  24. package/dist/assets/{react-DzPIcAiV.js → react-CATI9ge3.js} +2 -2
  25. package/dist/assets/{react-gP09XJCP.js → react-ClZq_sxx.js} +1 -1
  26. package/dist/assets/{react-BF14fMqy.js → react-D5XZh3hy.js} +1 -1
  27. package/dist/assets/{react-BOWRp_f_.js → react-DV0soYw9.js} +1 -1
  28. package/dist/assets/{react-C96qm3Mt.js → react-DYo4DeN-.js} +1 -1
  29. package/dist/assets/{react-C7OXQf5t.js → react-aTRNLobE.js} +1 -1
  30. package/dist/assets/{react-BuP7pXjm.js → react-fe_ZKeQp.js} +1 -1
  31. package/dist/assets/{recharts-YGxO84Z3.js → recharts-BbTkHEQ9.js} +1 -1
  32. package/dist/assets/{sentry-D-5VhNso.js → sentry-1ioB2Xg9.js} +1 -1
  33. package/dist/assets/{url-zkEOgjBP.js → url-B3qHgqzn.js} +1 -1
  34. package/dist/assets/{url-DgJz0IfA.js → url-DWVVfns1.js} +1 -1
  35. package/dist/assets/{utils-D0ScijBl.js → utils-CEeexPqZ.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-DZo6kEvM.js → zeni-epic-state-oxZ8tGTt.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/CreditAgentRoutes-KRfSdQq0.js +0 -4
  40. package/dist/assets/SignInScreen-C_YAKDuo.js +0 -1
  41. package/dist/assets/analyticsHelper-B_dqzheL.js +0 -1
  42. package/dist/assets/epic-B50jLhHL.js +0 -2
@@ -0,0 +1,4 @@
1
+ import{j as s}from"./liveblocks-B8GPBdVd.js";import{u as D,P as U}from"./ScreenRoutes-BtG1xLKe.js";import{a as f}from"./sentry-1ioB2Xg9.js";import{i as v,n as R,g as m,h as T,k as C,l as I,N as j}from"./core-DgfROaAS.js";import{PU as N,PV as k,kY as E,PW as M,lO as L,lR as _,lD as $,PX as O,PY as F,lL as B,lH as J}from"./zeni-epic-state-oxZ8tGTt.js";import{a as V,_ as q,j as Y,m as H,a0 as W,J as X,d as Z,e as G,g as K,h as Q}from"./index-B5_pr21M.js";import{n as ee}from"./mui-DhSgbxxf.js";import"./recharts-BbTkHEQ9.js";import"./analyticsHelper-CT8EUKzZ.js";import"./utils-CEeexPqZ.js";import"./empty-Bws4MSrW.js";import"./index-gmESdZqt.js";import"./url-DWVVfns1.js";import"./index-Cu0osUaw.js";import"./analytics-Bty8Hg0Q.js";import"./lottie-BMwaEd0-.js";import"./lexical-BR_VpIe3.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]="28c884f8-d422-48bc-90e9-8afbd02a882a",a._sentryDebugIdIdentifier="sentry-dbid-28c884f8-d422-48bc-90e9-8afbd02a882a")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Z("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);G.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(J())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(F())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(W),oe=ee.div`
2
+ padding: ${H.sp5};
3
+ text-align: center;
4
+ `;function re(){const a=v(),t=R(),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=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,P=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 x=encodeURIComponent(JSON.stringify(e)),z=`${q}/tableDownload?query=${x}`;fetch(z,{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:Y.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:P,cardProfilesData:w})}function Pe(){const{isAllowed:a,isLoading:t}=D();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(U,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{to:"/management",replace:!0})})})}export{Pe as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-D-5VhNso.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-1ioB2Xg9.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};