@zeniai/web-cockpit-ui 2.0.33-qa → 2.0.35-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-CZ-C1wzQ.js +4 -0
- package/dist/assets/{Preview-ChO5fMgb.js → Preview-CAmOkbjw.js} +1 -1
- package/dist/assets/{ScreenRoutes-8s3c20CX.js → ScreenRoutes-yvbp_Lbz.js} +74 -73
- package/dist/assets/SignInScreen-DIqNMUI1.js +1 -0
- package/dist/assets/{analytics-B1Cy_xZA.js → analytics-BfH6x-bh.js} +1 -1
- package/dist/assets/{analyticsHelper-B8iYOlEe.js → analyticsHelper-DpKWIfA_.js} +1 -1
- package/dist/assets/{core-Cf4O5OrX.js → core-BMXdW52V.js} +1 -1
- package/dist/assets/{dash.all.min-oXaWZmY5.js → dash.all.min-BNMSYYE9.js} +1 -1
- package/dist/assets/{empty-BD7y-R5g.js → empty-CMgD5T-3.js} +1 -1
- package/dist/assets/empty-CURC4K9t.js +1 -0
- package/dist/assets/epic-0u3weRPq.js +2 -0
- package/dist/assets/{index-BiUKUUHW.js → index-BIPrynO9.js} +9391 -8837
- package/dist/assets/{empty-DUnSINEz.js → index-BcCMwDMT.js} +1 -1
- package/dist/assets/{index-By7XzdcD.js → index-CY8CEYeK.js} +1 -1
- package/dist/assets/{index-DTWP8ETV.js → index-D9Zhqjkb.js} +2 -2
- package/dist/assets/index-DSJ2w1jZ.js +1 -0
- package/dist/assets/{index-DHH6gp6t.js → index-OG0h_gMR.js} +1 -1
- package/dist/assets/index-sjMkGJDk.js +1 -0
- package/dist/assets/{lexical-bjgwiB7u.js → lexical-Cj6VOpGX.js} +1 -1
- package/dist/assets/{liveblocks-Dk8esAkW.js → liveblocks-BQqAIDc5.js} +1 -1
- package/dist/assets/{lottie-B_XQ3Mi7.js → lottie-qwRZdbTy.js} +1 -1
- package/dist/assets/{mui-BrjTjvYA.js → mui-BQBCqqWF.js} +1 -1
- package/dist/assets/{react-DCfFVgZZ.js → react-BFtEL_0u.js} +1 -1
- package/dist/assets/{react-CLJlvz8A.js → react-BfNEEjJ_.js} +1 -1
- package/dist/assets/{react-BGCfxk2h.js → react-C83wXUqV.js} +2 -2
- package/dist/assets/{react-CC8kit5w.js → react-C8sJgD0w.js} +1 -1
- package/dist/assets/{react-QXFrvPCj.js → react-Cu6ubvAK.js} +3 -3
- package/dist/assets/{react-Dx5YwMmP.js → react-DZq71Z0g.js} +1 -1
- package/dist/assets/{react-BvhAivwk.js → react-hF-9mrjI.js} +1 -1
- package/dist/assets/{react-DXlDNDrx.js → react-jnSxQgdS.js} +1 -1
- package/dist/assets/{recharts-CBey8dU2.js → recharts-BZRqFQc_.js} +1 -1
- package/dist/assets/{sentry-X5fa-B9t.js → sentry-B9T9CHF5.js} +1 -1
- package/dist/assets/url-BEGh4GqD.js +1 -0
- package/dist/assets/{url-B8FKrq__.js → url-BMK-Vtzl.js} +1 -1
- package/dist/assets/{utils-Bm0fIaTq.js → utils-Fih0Jz-h.js} +1 -1
- package/dist/assets/{zeni-epic-state-DUFwtXMu.js → zeni-epic-state-DSTkpZye.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/SignInScreen-DBtpf6fC.js +0 -1
- package/dist/assets/epic-DOgIa3lU.js +0 -2
- package/dist/assets/index-BX5bsEWx.js +0 -1
- package/dist/assets/index-C7X175S7.js +0 -1
- package/dist/assets/index-DeL-iMry.js +0 -1
- package/dist/assets/url-DZVJKgs0.js +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-BQqAIDc5.js";import{z as w,T as P,D as j,o as v,W as E,Q as N,c as R,g as T,h as k,y as M,f as L}from"./index-BIPrynO9.js";import{a as f}from"./sentry-B9T9CHF5.js";import{i as _,n as $,g as S,h as H,k as I,l as C,N as O}from"./core-BMXdW52V.js";import{HM as B,HN as F,jH as Q,HO as V,kb as q,ke as J,j_ as W,HP as Z,HQ as G,k8 as K,k4 as X}from"./zeni-epic-state-DSTkpZye.js";import{n as Y}from"./mui-BQBCqqWF.js";import{P as ee}from"./ScreenRoutes-yvbp_Lbz.js";import"./recharts-BZRqFQc_.js";import"./analytics-BfH6x-bh.js";import"./lottie-qwRZdbTy.js";import"./lexical-Cj6VOpGX.js";import"./utils-Fih0Jz-h.js";import"./analyticsHelper-DpKWIfA_.js";import"./empty-CMgD5T-3.js";import"./index-OG0h_gMR.js";import"./url-BMK-Vtzl.js";import"./index-DSJ2w1jZ.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]="c17258e8-5262-497e-991a-661c28dd3fa7",a._sentryDebugIdIdentifier="sentry-dbid-c17258e8-5262-497e-991a-661c28dd3fa7")}catch{}})();function te(a,t){return{headerData:{selectedTabOption:N("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 u=k(n),r=T(n);R.trackCockpitTabClicked(r),t.navigate(`../../${u}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(X())},onSaveMacro:n=>{a(K(n))},onResetSaveMacro:()=>{a(G())},onUIStateChange:n=>{a(Z(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=H(te,ne)(E),oe=Y.div`
|
|
2
|
+
padding: ${v.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function se(){const a=_(),t=$(),n=S(B),u=S(F),[r,m]=f.useState(new Set),g=f.useRef(new Set),y=S(e=>e.tenantState.currentTenantId),b=S(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{b==="Not-Started"&&t(Q())},[t,b]);const d=w.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,U=f.useMemo(()=>({onFetch:()=>{t(W())},onUpdateProfile:(e,o,s)=>{const c=s.updatedByName??A;t(J({tenantId:o,tenantEmailDomain:e,update:{...s,updatedByName:c}}))},onAnalyse:e=>{m(o=>new Set(o).add(e)),t(q(e))},onDownloadReport:()=>{const e=V(n.rows),o=d?.userId??"",s=d?.zeniSessionId??"",c=y??"";if(!o||!s||!c)return;const D=encodeURIComponent(JSON.stringify(e)),x=`${P}/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(oe,{children:j.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):i.jsx(ae,{macroCombined:u,navigate:a,cardProfilesActions:U,cardProfilesData:z})}function we(){const{useDynamicConfig:a}=M(),{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(I,{children:i.jsx(C,{path:"/*",element:i.jsx(ee,{element:i.jsx(se,{})})})}):i.jsx(I,{children:i.jsx(C,{path:"/*",element:i.jsx(O,{to:"/management",replace:!0})})})}export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as a}from"./sentry-
|
|
1
|
+
import{a as h,b as a}from"./sentry-B9T9CHF5.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};
|