@zeniai/web-cockpit-ui 2.0.48-prod → 2.0.49-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.
- package/dist/assets/{CreditAgentRoutes-DZRJ_bz7.js → CreditAgentRoutes-D9SFPfm2.js} +2 -2
- package/dist/assets/{Preview-DfTuA7KL.js → Preview-DrOGECVp.js} +1 -1
- package/dist/assets/{ScreenRoutes-CqxgwpGA.js → ScreenRoutes-qAexh_yy.js} +63 -63
- package/dist/assets/SignInScreen-DdR3fDCP.js +1 -0
- package/dist/assets/{analytics-36qJ5YzB.js → analytics-BP0-eL9U.js} +1 -1
- package/dist/assets/{analyticsHelper-Ch0RzTmO.js → analyticsHelper-Czpqa46n.js} +1 -1
- package/dist/assets/{core-CZeNFmoj.js → core-C9lRQDVT.js} +1 -1
- package/dist/assets/{dash.all.min-5yd4E_CN.js → dash.all.min-BMvzmTHf.js} +1 -1
- package/dist/assets/{empty-BHVRQpcF.js → empty-BM8bu85r.js} +1 -1
- package/dist/assets/{empty-CATDRY1j.js → empty-CHv_zVX7.js} +1 -1
- package/dist/assets/{epic-CPZnhCvc.js → epic-BUDA-oTO.js} +1 -1
- package/dist/assets/{index-D9d7LD45.js → index-A8b8Up6l.js} +301 -263
- package/dist/assets/{index-CbvAohW0.js → index-B4cXkYNH.js} +1 -1
- package/dist/assets/{index-CWoNiS3s.js → index-B9IvN5UU.js} +1 -1
- package/dist/assets/{index-Bkm2kKxR.js → index-BPrDI7cw.js} +1 -1
- package/dist/assets/{index-RAVDKBnu.js → index-BQK7-Vtx.js} +1 -1
- package/dist/assets/{index-BFYP-bRv.js → index-D3p7h-1X.js} +1 -1
- package/dist/assets/{index-BMei10ka.js → index-DGoub7bF.js} +2 -2
- package/dist/assets/{lexical-h5KlVArl.js → lexical-BEGdJTSz.js} +1 -1
- package/dist/assets/{liveblocks-BYhXg_Aw.js → liveblocks-BcOKrrv4.js} +1 -1
- package/dist/assets/{lottie-CguepTUb.js → lottie-CA3bbxyN.js} +1 -1
- package/dist/assets/{mui-Bfvm8DOH.js → mui-DXElAUlw.js} +1 -1
- package/dist/assets/{react-DgpPcL1P.js → react-15wf8bJi.js} +1 -1
- package/dist/assets/{react-CgiwPPBq.js → react-BSFjo2FR.js} +1 -1
- package/dist/assets/{react-DRaa_yxX.js → react-Bn1oI4oA.js} +1 -1
- package/dist/assets/{react-D9WHzxhZ.js → react-CKkBZwr_.js} +2 -2
- package/dist/assets/{react-1Yzj2Iyu.js → react-D4RL7nuC.js} +1 -1
- package/dist/assets/{react-BHsnL94q.js → react-DE7iA-dX.js} +1 -1
- package/dist/assets/{react-MU99aJQ6.js → react-DZjJ1o97.js} +1 -1
- package/dist/assets/{react-DdQoqrON.js → react-Dj-xKkMv.js} +1 -1
- package/dist/assets/{recharts-B0JFWxIp.js → recharts-CUqUOBzY.js} +1 -1
- package/dist/assets/{sentry-CeclEcsp.js → sentry-G-2zuVlh.js} +1 -1
- package/dist/assets/{url-X1CqwTVj.js → url-DY-LkLhQ.js} +1 -1
- package/dist/assets/{url-B84KquEV.js → url-gGAFhVAr.js} +1 -1
- package/dist/assets/{utils-CngR1ljc.js → utils-D-TVQK2B.js} +1 -1
- package/dist/assets/{zeni-epic-state-CB0ADTGf.js → zeni-epic-state-DSAzSmo9.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/SignInScreen-BzV2hsYd.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-BcOKrrv4.js";import{z as w,$ as v,D as j,o as E,a0 as P,F as k,Q as R,c as T,g as N,d as M,v as $,i as L}from"./index-A8b8Up6l.js";import{a as u}from"./sentry-G-2zuVlh.js";import{i as _,n as F,g as S,h as O,k as A,l as C,N as B}from"./core-C9lRQDVT.js";import{H$ as V,I0 as q,jM as Q,I1 as H,kg as J,kj as Z,k3 as G,I2 as K,I3 as W,kd as X,k9 as Y}from"./zeni-epic-state-DSAzSmo9.js";import{n as ee}from"./mui-DXElAUlw.js";import{P as te}from"./ScreenRoutes-qAexh_yy.js";import"./recharts-CUqUOBzY.js";import"./analytics-BP0-eL9U.js";import"./lottie-CA3bbxyN.js";import"./lexical-BEGdJTSz.js";import"./utils-D-TVQK2B.js";import"./analyticsHelper-Czpqa46n.js";import"./empty-BM8bu85r.js";import"./index-B9IvN5UU.js";import"./url-DY-LkLhQ.js";import"./index-BQK7-Vtx.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]="462210c6-0da4-401b-90c4-de95359e735c",a._sentryDebugIdIdentifier="sentry-dbid-462210c6-0da4-401b-90c4-de95359e735c")}catch{}})();function ne(a,t){return{headerData:{allTabOptions:k,selectedTabOption:R("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ae(a,t){return{headerActions:{onTabChange:n=>{const f=M(n),r=N(n);T.trackCockpitTabClicked(r),t.navigate(`../../${f}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(Y())},onSaveMacro:n=>{a(X(n))},onResetSaveMacro:()=>{a(W())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const oe=O(ne,ae)(P),se=ee.div`
|
|
2
2
|
padding: ${E.sp5};
|
|
3
3
|
text-align: center;
|
|
4
|
-
`;function re(){const a=_(),t=F(),n=S(V),
|
|
4
|
+
`;function re(){const a=_(),t=F(),n=S(V),f=S(q),[r,m]=u.useState(new Set),g=u.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),b=S(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{b==="Not-Started"&&t(Q())},[t,b]);const d=w.getSignedInUser(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,U=u.useMemo(()=>({onFetch:()=>{t(G())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??I;t(Z({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(J(e))},onDownloadReport:()=>{const e=H(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=y??"";if(!o||!s||!c)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${v}/tableDownload?query=${z}`;fetch(D,{headers:{"zeni-user-id":o,"zeni-session-id":s,"zeni-tenant-id":c}}).then(async l=>{if(!l.ok){const p=await l.text();throw new Error(`Download failed: ${l.status} ${p}`)}return l.blob()}).then(l=>{const p=URL.createObjectURL(l),h=document.createElement("a");h.href=p,h.download=`${e.file_name}.xlsx`,h.click(),URL.revokeObjectURL(p)}).catch(()=>{})}}),[t,I,d,y,n.rows]);u.useEffect(()=>{if(r.size===0)return;const e=new Set;for(const o of r){const s=n.rows.find(c=>c.tenantId===o);s!=null&&s.isAnalyzing?g.current.add(o):s!=null&&!s.isAnalyzing&&g.current.has(o)&&(e.add(o),g.current.delete(o))}e.size>0&&m(o=>{const s=new Set(o);for(const c of e)s.delete(c);return s})},[n.rows,r]);const x=u.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&r.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,r]);return d==null?i.jsx(se,{children:j.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(oe,{macroCombined:f,navigate:a,cardProfilesActions:U,cardProfilesData:x})}function Ue(){const{useDynamicConfig:a}=$(),{configValue:t,isDynamicConfigLoading:n}=a(L.creditAgentEnablement);if(n)return null;const r=w.getSignedInUser()?.userEmail,m=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&m.includes(r)?i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(te,{element:i.jsx(re,{})})})}):i.jsx(A,{children:i.jsx(C,{path:"/*",element:i.jsx(B,{to:"/management",replace:!0})})})}export{Ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as a}from"./sentry-
|
|
1
|
+
import{a as h,b as a}from"./sentry-G-2zuVlh.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6d600b3f-6c40-4b9e-8892-371ff81f1c30",t._sentryDebugIdIdentifier="sentry-dbid-6d600b3f-6c40-4b9e-8892-371ff81f1c30")}catch{}})();const c="64px",f={},k=({src:t,light:n,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:u})=>{const[p,o]=h.useState(null);h.useEffect(()=>{!t||!n||!r||_({src:t,light:n,oEmbedUrl:r})},[t,n,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(a.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(f[e]){o(f[e]);return}o(null);const b=await(await fetch(E.replace("{url}",e))).json();if(b.thumbnail_url){const g=b.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),f[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=a.isValidElement(n),y={display:"flex",alignItems:"center",justifyContent:"center"},d={preview:{width:"100%",height:"100%",backgroundImage:p&&!l?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:l?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=a.createElement("div",{style:d.shadow,className:"react-player__shadow"},a.createElement("div",{style:d.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:d.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...u?{"aria-label":u}:{}},l?n:null,m||x)};var S=k;export{S as default};
|