@zeniai/web-cockpit-ui 2.2.97-qa → 2.2.98-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-DovF3Qbs.js +4 -0
- package/dist/assets/{Preview-ahKWcezN.js → Preview-D5KcYjyY.js} +1 -1
- package/dist/assets/{ScreenRoutes-DSJyWkB1.js → ScreenRoutes-jVHuWpgn.js} +44 -44
- package/dist/assets/SignInScreen-CtIr5svw.js +1 -0
- package/dist/assets/{analytics-eSsxiRAm.js → analytics-9LJeC2ui.js} +1 -1
- package/dist/assets/{analyticsHelper-Bt6KI77n.js → analyticsHelper-Cf-X6AMx.js} +1 -1
- package/dist/assets/{core-BAl9MrT1.js → core-BeN_MChz.js} +1 -1
- package/dist/assets/{dash.all.min-DYeO26-3.js → dash.all.min-Rnd031u8.js} +1 -1
- package/dist/assets/{empty-C22fjemV.js → empty-B6Juc8c0.js} +1 -1
- package/dist/assets/{empty-B5Fvms7r.js → empty-B6fhfTji.js} +1 -1
- package/dist/assets/epic-C2_weDsD.js +2 -0
- package/dist/assets/{index-Clqr3cGz.js → index-B6pbH0gy.js} +1 -1
- package/dist/assets/{index-DcnoFGmR.js → index-BAoPLD4I.js} +1 -1
- package/dist/assets/{index-DkP_1tOb.js → index-BVKpk70U.js} +1 -1
- package/dist/assets/{index-CjEGwhHJ.js → index-BheXYrT5.js} +1 -1
- package/dist/assets/{index-CAHSwTuZ.js → index-C878fHPo.js} +7980 -7941
- package/dist/assets/{index-yoUIb4fD.js → index-D2Snqbrz.js} +2 -2
- package/dist/assets/{index-BDzoDGYL.js → index-oaCCkHQy.js} +1 -1
- package/dist/assets/{lexical-DhwcJJlY.js → lexical-BqK5-7NV.js} +1 -1
- package/dist/assets/{liveblocks-BLp9_JQP.js → liveblocks-DJRlGFea.js} +1 -1
- package/dist/assets/{lottie-BowSyWik.js → lottie-42X37YWv.js} +1 -1
- package/dist/assets/{mui-jRvJ0Yl7.js → mui-CGQrau-g.js} +1 -1
- package/dist/assets/{react-DytaAtzZ.js → react-2C81n5o6.js} +1 -1
- package/dist/assets/{react-CH3IhWB0.js → react-CIqV91Wz.js} +2 -2
- package/dist/assets/{react-BAhv12pS.js → react-DPG_U-wR.js} +1 -1
- package/dist/assets/{react-MymjtfSa.js → react-DiqwxBH3.js} +1 -1
- package/dist/assets/{react-Dof6TIwL.js → react-DlKpTtFX.js} +1 -1
- package/dist/assets/{react-DadKWd_9.js → react-KHSurLLg.js} +1 -1
- package/dist/assets/{react-eLPh_1UH.js → react-ojhVLh7w.js} +1 -1
- package/dist/assets/{react-a8-J2RAT.js → react-p-OZ61XO.js} +1 -1
- package/dist/assets/{recharts-DEZHObSN.js → recharts-DbjCNeeG.js} +1 -1
- package/dist/assets/{sentry-Cp9V-8Ox.js → sentry-Byc6pCkb.js} +1 -1
- package/dist/assets/{url-DUnqLmli.js → url-BK_ow_fu.js} +1 -1
- package/dist/assets/{url-D3TgdmFw.js → url-CrLeJSNF.js} +1 -1
- package/dist/assets/{utils-D9Ltphc7.js → utils-DUjxgMjZ.js} +1 -1
- package/dist/assets/{zeni-epic-state-4OvK9meG.js → zeni-epic-state-DVoFFDBc.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/CreditAgentRoutes-CQRf37e3.js +0 -4
- package/dist/assets/SignInScreen-DNePS8gg.js +0 -1
- package/dist/assets/epic-l7z6i5lt.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DJRlGFea.js";import{u as v,P}from"./ScreenRoutes-jVHuWpgn.js";import{a as f}from"./sentry-Byc6pCkb.js";import{i as T,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-BeN_MChz.js";import{SV as N,SW as k,lB as E,SX as M,mr as $,mu as L,mg as B,SY as _,SZ as O,mo as F,mk as V}from"./zeni-epic-state-DVoFFDBc.js";import{z as q,T as W,G as Z,n as G,W as J,B as X,$ as Y,b as H,g as K,h as Q}from"./index-C878fHPo.js";import{n as ee}from"./mui-CGQrau-g.js";import"./recharts-DbjCNeeG.js";import"./analyticsHelper-Cf-X6AMx.js";import"./utils-DUjxgMjZ.js";import"./empty-B6Juc8c0.js";import"./index-B6pbH0gy.js";import"./url-BK_ow_fu.js";import"./index-BheXYrT5.js";import"./analytics-9LJeC2ui.js";import"./lottie-42X37YWv.js";import"./lexical-BqK5-7NV.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]="f1c42e4e-543c-44c3-ae63-323d09f3e389",a._sentryDebugIdIdentifier="sentry-dbid-f1c42e4e-543c-44c3-ae63-323d09f3e389")}catch{}})();function te(a,t){return{headerData:{allTabOptions:X,selectedTabOption:Y("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=Q(n),c=K(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(V())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(J),oe=ee.div`
|
|
2
|
+
padding: ${G.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function re(){const a=T(),t=U(),n=m(N),g=m(k),[c,h]=f.useState(new Set),S=f.useRef(new Set),y=m(e=>e.tenantState.currentTenantId),b=m(e=>e.companyViewState.zeniUsers.fetchState);f.useEffect(()=>{b==="Not-Started"&&t(E())},[t,b]);const d=q.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=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=y??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${W}/tableDownload?query=${x}`;fetch(D,{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),p=document.createElement("a");p.href=u,p.download=`${e.file_name}.xlsx`,p.click(),URL.revokeObjectURL(u)}).catch(()=>{})}}),[t,A,d,y,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?S.current.add(o):r!=null&&!r.isAnalyzing&&S.current.has(o)&&(e.add(o),S.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:Z.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=v();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(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-Byc6pCkb.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};
|