@zeniai/web-cockpit-ui 2.0.61-prod → 2.0.62-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-DFX1NXS-.js → CreditAgentRoutes-Dfd0Kd6I.js} +2 -2
- package/dist/assets/{Preview-DvM86Ba0.js → Preview-IR8wZl18.js} +1 -1
- package/dist/assets/{ScreenRoutes-DrR3Yaf2.js → ScreenRoutes-CWwjG5zs.js} +44 -44
- package/dist/assets/SignInScreen-D3CJKpcD.js +1 -0
- package/dist/assets/{analytics-DBIAeubo.js → analytics-D2hq1pB4.js} +1 -1
- package/dist/assets/{analyticsHelper-UHbB_mzr.js → analyticsHelper-Duy8p9G0.js} +1 -1
- package/dist/assets/{core-CLkP-ctU.js → core-Bd7Ijkb8.js} +1 -1
- package/dist/assets/{dash.all.min-Ch5uhPoQ.js → dash.all.min-DEn1t6rn.js} +1 -1
- package/dist/assets/{empty-DTWHBmAv.js → empty-BWs4yw6m.js} +1 -1
- package/dist/assets/{empty-u4HDYeJW.js → empty-Cuv-JavI.js} +1 -1
- package/dist/assets/{epic-QCnzlk4c.js → epic-BEruqsXy.js} +1 -1
- package/dist/assets/{index-dO2t0dnu.js → index-B4tJfZBM.js} +1 -1
- package/dist/assets/{index-BYoOPxi3.js → index-BHnFF6Mj.js} +1 -1
- package/dist/assets/{index-ZNukXhqo.js → index-Ddpazk8i.js} +1 -1
- package/dist/assets/{index-BEPOjJHf.js → index-ICxwMH4m.js} +1 -1
- package/dist/assets/{index-lc8jlmDz.js → index-IYkmdsJO.js} +6550 -6550
- package/dist/assets/{index-B5OLwDJq.js → index-aPW1WLF7.js} +2 -2
- package/dist/assets/{index-Cb2eiyZW.js → index-aa1-CqLI.js} +1 -1
- package/dist/assets/{lexical-c4zF5_nn.js → lexical-DUprPrXL.js} +1 -1
- package/dist/assets/{liveblocks-JLNEjlZ_.js → liveblocks-DtPrLDJS.js} +1 -1
- package/dist/assets/{lottie-BU2PrzDV.js → lottie-CxiyciuX.js} +1 -1
- package/dist/assets/{mui-CJSC-4mp.js → mui-7i_-G9Wo.js} +1 -1
- package/dist/assets/{react-BChdPHhF.js → react-BP_tYIvG.js} +1 -1
- package/dist/assets/{react-BJQG1pDj.js → react-BUCt2wJF.js} +1 -1
- package/dist/assets/{react-7IxPZLBp.js → react-BmixicuU.js} +1 -1
- package/dist/assets/{react-7zmZF1wa.js → react-D0Ona832.js} +1 -1
- package/dist/assets/{react-D6b2Av5T.js → react-D1eycK3j.js} +2 -2
- package/dist/assets/{react-D9PirpxL.js → react-DZOlfJ3z.js} +1 -1
- package/dist/assets/{react-ABO8RoF0.js → react-Da7CbJkT.js} +1 -1
- package/dist/assets/{react-X58YdqAW.js → react-Dy5N-1E1.js} +1 -1
- package/dist/assets/{recharts-WmB3wWsA.js → recharts-ukUg8EgD.js} +1 -1
- package/dist/assets/{sentry-BZpk7dZ8.js → sentry-DGdrGMts.js} +1 -1
- package/dist/assets/{url-NsWH0lDE.js → url-B6X-Y6dN.js} +1 -1
- package/dist/assets/{url-B4WD99DW.js → url-BHD2x5lb.js} +1 -1
- package/dist/assets/{utils-D61aRtXt.js → utils-DOKAIlnQ.js} +1 -1
- package/dist/assets/{zeni-epic-state-i99_evzG.js → zeni-epic-state-BrXQ4qCB.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/SignInScreen-BIkEd9Lh.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-DtPrLDJS.js";import{z as w,$ as j,D as v,o as E,a0 as P,F as k,Q as R,a as T,g as N,c as M,A as L,y as $}from"./index-IYkmdsJO.js";import{a as f}from"./sentry-DGdrGMts.js";import{i as _,n as F,g as S,h as O,k as b,l as C,N as B}from"./core-Bd7Ijkb8.js";import{I1 as V,I2 as q,jM as Q,I3 as J,kg as Z,kj as G,k3 as H,I4 as K,I5 as W,kd as X,k9 as Y}from"./zeni-epic-state-BrXQ4qCB.js";import{n as ee}from"./mui-7i_-G9Wo.js";import{P as te}from"./ScreenRoutes-CWwjG5zs.js";import"./recharts-ukUg8EgD.js";import"./analytics-D2hq1pB4.js";import"./lottie-CxiyciuX.js";import"./lexical-DUprPrXL.js";import"./utils-DOKAIlnQ.js";import"./analyticsHelper-Duy8p9G0.js";import"./empty-BWs4yw6m.js";import"./index-B4tJfZBM.js";import"./url-B6X-Y6dN.js";import"./index-aa1-CqLI.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]="f2cc2f33-d6f6-4eac-ade9-59f0250cc132",a._sentryDebugIdIdentifier="sentry-dbid-f2cc2f33-d6f6-4eac-ade9-59f0250cc132")}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 u=M(n),r=N(n);T.trackCockpitTabClicked(r),t.navigate(`../../${u}`,{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),u=S(q),[r,m]=f.useState(new Set),g=f.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),
|
|
4
|
+
`;function re(){const a=_(),t=F(),n=S(V),u=S(q),[r,m]=f.useState(new Set),g=f.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),I=S(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{I==="Not-Started"&&t(Q())},[t,I]);const d=w.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,U=f.useMemo(()=>({onFetch:()=>{t(H())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??A;t(G({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(Z(e))},onDownloadReport:()=>{const e=J(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=y??"";if(!o||!s||!c)return;const D=encodeURIComponent(JSON.stringify(e)),x=`${j}/tableDownload?query=${D}`;fetch(x,{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,A,d,y,n.rows]);f.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 z=f.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:v.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(oe,{macroCombined:u,navigate:a,cardProfilesActions:U,cardProfilesData:z})}function Ue(){const{useDynamicConfig:a}=L(),{configValue:t,isDynamicConfigLoading:n}=a($.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(b,{children:i.jsx(C,{path:"/*",element:i.jsx(te,{element:i.jsx(re,{})})})}):i.jsx(b,{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-DGdrGMts.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};
|