@zeniai/web-cockpit-ui 2.2.22-qa → 2.2.23-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 (41) hide show
  1. package/dist/assets/CreditAgentRoutes-B516oDw4.js +4 -0
  2. package/dist/assets/{Preview-t4HR9OHG.js → Preview-Bmu2SlXv.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-Bs0mu7My.js → ScreenRoutes-BucPN1N7.js} +55 -55
  4. package/dist/assets/SignInScreen-Cm9vct3Z.js +1 -0
  5. package/dist/assets/{analytics-BEVwWtnR.js → analytics-C8ph24z9.js} +1 -1
  6. package/dist/assets/{analyticsHelper-_VX0a6U8.js → analyticsHelper-BWgj8t--.js} +1 -1
  7. package/dist/assets/{core-CiegI8Nh.js → core-CRyeFMzn.js} +1 -1
  8. package/dist/assets/{dash.all.min-DvU6f6M-.js → dash.all.min-CiCHNqgG.js} +1 -1
  9. package/dist/assets/{empty-DPucyQlL.js → empty-CAQPHTd7.js} +1 -1
  10. package/dist/assets/{empty-Bsi0rRev.js → empty-Do0UYYIR.js} +1 -1
  11. package/dist/assets/epic-Ba21GH9k.js +2 -0
  12. package/dist/assets/{index-CjolauKu.js → index-B34s9sxq.js} +9212 -8380
  13. package/dist/assets/{index-C-BMQn2F.js → index-B9GrfLL3.js} +2 -2
  14. package/dist/assets/{index-DmL86Bgt.js → index-ClHsEqRJ.js} +1 -1
  15. package/dist/assets/{index-D-7dG-d0.js → index-CoQBNERc.js} +1 -1
  16. package/dist/assets/{index-CYwfMe7Z.js → index-Db4B2fwq.js} +1 -1
  17. package/dist/assets/{index-Ml6xPKCw.js → index-DhX1rC7u.js} +1 -1
  18. package/dist/assets/{index-CpKlXVOT.js → index-kQtaQ6xt.js} +1 -1
  19. package/dist/assets/{lexical-BVEq_hzp.js → lexical-Ddp_XZFR.js} +1 -1
  20. package/dist/assets/{liveblocks-CPPe87s9.js → liveblocks-CxKKsgnw.js} +1 -1
  21. package/dist/assets/{lottie-nW2peGBq.js → lottie-CAscvzsy.js} +1 -1
  22. package/dist/assets/{mui-DMaRK61f.js → mui-D-NquI8s.js} +1 -1
  23. package/dist/assets/{react-BM5jLJKt.js → react-BFxdoyEY.js} +2 -2
  24. package/dist/assets/{react-CBLZ44u_.js → react-CKYuLFca.js} +1 -1
  25. package/dist/assets/{react-DKPkn6jm.js → react-D-SKC0Dn.js} +1 -1
  26. package/dist/assets/{react-B_lR2KR5.js → react-DG-KjbVO.js} +1 -1
  27. package/dist/assets/{react-DJqa9NyJ.js → react-DMG8CjiF.js} +1 -1
  28. package/dist/assets/{react-CSw2aNjB.js → react-DrsaFX51.js} +1 -1
  29. package/dist/assets/{react-BPppN5GW.js → react-KM01oApS.js} +1 -1
  30. package/dist/assets/{react-DSksIFEk.js → react-l8marFeh.js} +1 -1
  31. package/dist/assets/{recharts-D7qZ0ozS.js → recharts-DtGgMxUf.js} +1 -1
  32. package/dist/assets/{sentry-DSJyowwz.js → sentry-B0bcDCu0.js} +1 -1
  33. package/dist/assets/{url-C_f7Hz7w.js → url-BXpv_OSY.js} +1 -1
  34. package/dist/assets/{url-D1N5SqYE.js → url-BeMIvJ_p.js} +1 -1
  35. package/dist/assets/{utils-C5w2nA-A.js → utils-B-FXiSeb.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-CeS5s0do.js → zeni-epic-state-Bo69UIX-.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/CreditAgentRoutes-DGcKuyyv.js +0 -4
  40. package/dist/assets/SignInScreen-DFZKCgU9.js +0 -1
  41. package/dist/assets/epic-CNCO6-m4.js +0 -2
@@ -0,0 +1,4 @@
1
+ import{j as s}from"./liveblocks-CxKKsgnw.js";import{u as D,P}from"./ScreenRoutes-BucPN1N7.js";import{a as f}from"./sentry-B0bcDCu0.js";import{i as v,n as U,g as m,h as N,k as C,l as I,N as T}from"./core-CRyeFMzn.js";import{RL as j,RM as M,lu as k,RN as E,mk as L,mn as O,m9 as $,RO as _,RP as B,mh as F,md as q}from"./zeni-epic-state-Bo69UIX-.js";import{z as V,Z,G,n as J,a0 as H,c as K,w as Q,a as W,g as X,b as Y}from"./index-B34s9sxq.js";import{n as ee}from"./mui-D-NquI8s.js";import"./recharts-DtGgMxUf.js";import"./analyticsHelper-BWgj8t--.js";import"./utils-B-FXiSeb.js";import"./empty-CAQPHTd7.js";import"./index-ClHsEqRJ.js";import"./url-BXpv_OSY.js";import"./index-kQtaQ6xt.js";import"./analytics-C8ph24z9.js";import"./lottie-CAscvzsy.js";import"./lexical-Ddp_XZFR.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]="0b8c3cc3-1214-40d5-926e-d333b2106fe4",a._sentryDebugIdIdentifier="sentry-dbid-0b8c3cc3-1214-40d5-926e-d333b2106fe4")}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(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=N(te,ne)(H),oe=ee.div`
2
+ padding: ${J.sp5};
3
+ text-align: center;
4
+ `;function re(){const a=v(),t=U(),n=m(j),g=m(M),[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(k())},[t,y]);const d=V.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(O({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(e))},onDownloadReport:()=>{const e=E(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const R=encodeURIComponent(JSON.stringify(e)),x=`${Z}/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 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(P,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(T,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-DSJyowwz.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-B0bcDCu0.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};