@zeniai/web-cockpit-ui 2.3.13-dev → 2.3.14-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-DM0SwS5W.js +4 -0
- package/dist/assets/{Preview-CuXsFRyH.js → Preview--gkWr5eu.js} +1 -1
- package/dist/assets/{ScreenRoutes-dztfIg-h.js → ScreenRoutes-BUpHkc3I.js} +55 -55
- package/dist/assets/{SignInScreen-BtvPgfTs.js → SignInScreen-UcObvPbO.js} +1 -1
- package/dist/assets/{analytics-BnuXQ-1h.js → analytics-WNNKMSNh.js} +1 -1
- package/dist/assets/{analyticsHelper-DL0qorIj.js → analyticsHelper-B98PSur2.js} +1 -1
- package/dist/assets/{core-B9JNi4OC.js → core-DgA7111e.js} +1 -1
- package/dist/assets/{dash.all.min-eSh3F3Jf.js → dash.all.min-C7zts1TA.js} +1 -1
- package/dist/assets/{empty-MheAeCWJ.js → empty-B5l9Wm43.js} +1 -1
- package/dist/assets/{empty-CtaCUJbT.js → empty-BcrpjoBK.js} +1 -1
- package/dist/assets/epic-CWL5Hnmx.js +2 -0
- package/dist/assets/{index-C5m5eO7s.js → index-CS6B4AE4.js} +2 -2
- package/dist/assets/{index-Dm1tWS2g.js → index-Cr1Km7pq.js} +1 -1
- package/dist/assets/{index-BPNV3ifa.js → index-D1pedyNi.js} +6628 -6716
- package/dist/assets/{index-BrmYL58w.js → index-DIcKSiOo.js} +1 -1
- package/dist/assets/{index-a0Cswkil.js → index-DlMApUyt.js} +1 -1
- package/dist/assets/{index-qAQpNy1c.js → index-OA78vQNk.js} +1 -1
- package/dist/assets/{index-BNbC5kUe.js → index-kY1QPO9W.js} +1 -1
- package/dist/assets/{lexical-BeNMY2i4.js → lexical-BwLQB3vb.js} +1 -1
- package/dist/assets/{liveblocks-CzXsC3Pt.js → liveblocks-YzVKxIqK.js} +1 -1
- package/dist/assets/{lottie-1HjWS2aR.js → lottie-B5xiPcpk.js} +1 -1
- package/dist/assets/{mui-D366s3Jq.js → mui-Dxb-m49T.js} +1 -1
- package/dist/assets/{react-DE_sLQho.js → react-158UPsz4.js} +1 -1
- package/dist/assets/{react-CwEUo35F.js → react-69HqK0S3.js} +1 -1
- package/dist/assets/{react-cL7Pif1r.js → react-BUdHHPSS.js} +1 -1
- package/dist/assets/{react-_JjdVLJK.js → react-BYri54tb.js} +2 -2
- package/dist/assets/{react-m8-4uuCs.js → react-CV7BLUdT.js} +1 -1
- package/dist/assets/{react-DNgEcmpH.js → react-DGXBrFJz.js} +1 -1
- package/dist/assets/{react-Jqs82GWn.js → react-Q_wFKMfG.js} +1 -1
- package/dist/assets/{react-B0kYwW7O.js → react-sRyLjgRl.js} +1 -1
- package/dist/assets/{recharts-Chdf0-Da.js → recharts-CuDE2gZn.js} +1 -1
- package/dist/assets/{sentry-C6s4BeiF.js → sentry-BDnnWfmb.js} +1 -1
- package/dist/assets/{url-C9m098z0.js → url-BMmtOmbJ.js} +1 -1
- package/dist/assets/{url-hAZK0BbF.js → url-DtmorFmS.js} +1 -1
- package/dist/assets/{utils-q69MS7jw.js → utils-DlVzSYJJ.js} +1 -1
- package/dist/assets/zeni-epic-state-K3SggbIq.js +14 -0
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/CreditAgentRoutes-BDnGgscl.js +0 -4
- package/dist/assets/epic-DMStWF43.js +0 -2
- package/dist/assets/zeni-epic-state-CIYtvoeV.js +0 -14
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-YzVKxIqK.js";import{u as D,P as v}from"./ScreenRoutes-BUpHkc3I.js";import{a as f}from"./sentry-BDnnWfmb.js";import{i as P,n as R,g as m,h as U,k as C,l as I,N as j}from"./core-DgA7111e.js";import{T7 as N,T8 as E,lO as M,T9 as k,mE as $,mH as L,mt as B,Ta as O,Tb as _,mB as F,mx as q}from"./zeni-epic-state-K3SggbIq.js";import{z as V,R as G,G as H,n as J,S as Z,B as K,$ as Q,a as W,b as X,h as Y}from"./index-D1pedyNi.js";import{n as ee}from"./mui-Dxb-m49T.js";import"./recharts-CuDE2gZn.js";import"./analyticsHelper-B98PSur2.js";import"./utils-DlVzSYJJ.js";import"./empty-B5l9Wm43.js";import"./index-DlMApUyt.js";import"./url-BMmtOmbJ.js";import"./index-OA78vQNk.js";import"./analytics-WNNKMSNh.js";import"./lottie-B5xiPcpk.js";import"./lexical-BwLQB3vb.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]="0f89e891-2e88-4801-b288-e94246f0abae",a._sentryDebugIdIdentifier="sentry-dbid-0f89e891-2e88-4801-b288-e94246f0abae")}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(_())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(Z),oe=ee.div`
|
|
2
|
+
padding: ${J.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function re(){const a=P(),t=R(),n=m(N),g=m(E),[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(M())},[t,y]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(B())},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=k(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const z=encodeURIComponent(JSON.stringify(e)),T=`${G}/tableDownload?query=${z}`;fetch(T,{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 x=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:H.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:x})}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-
|
|
1
|
+
import{a as h,R as n}from"./sentry-BDnnWfmb.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};
|