@zeniai/web-cockpit-ui 2.2.13-dev → 2.2.13-prod
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-XhgxQ52-.js +4 -0
- package/dist/assets/{Preview-DLTbrly5.js → Preview-3YODvoK_.js} +1 -1
- package/dist/assets/{ScreenRoutes-DpQ2POR9.js → ScreenRoutes-RWZ_txR6.js} +47 -47
- package/dist/assets/SignInScreen-BqgA9kbX.js +1 -0
- package/dist/assets/{analytics-2sQa5iU3.js → analytics-DHJ8QmFp.js} +1 -1
- package/dist/assets/{analyticsHelper-DZAeHOdU.js → analyticsHelper-Df094F-z.js} +1 -1
- package/dist/assets/{core-BoVeJnUy.js → core-BANwo7Dq.js} +1 -1
- package/dist/assets/{dash.all.min-BMv2PABC.js → dash.all.min-D1RY7raT.js} +1 -1
- package/dist/assets/{empty-DvWIFX8U.js → empty-D7yh0B4F.js} +1 -1
- package/dist/assets/{empty-rZs-o7mk.js → empty-DEzuSJ_N.js} +1 -1
- package/dist/assets/epic-BCAVJEFG.js +2 -0
- package/dist/assets/{index-DSrxq-87.js → index-5bWf2Ddv.js} +2 -2
- package/dist/assets/{index-CIb1o2do.js → index-BkhSGlGG.js} +1 -1
- package/dist/assets/{index-TqjFAeZ_.js → index-CHQeGRu6.js} +1 -1
- package/dist/assets/{index-DOp6yYH6.js → index-CKCY-MZl.js} +1 -1
- package/dist/assets/{index-KXbbEWI0.js → index-CMP9b0cU.js} +1 -1
- package/dist/assets/{index-BWJIu3ky.js → index-Cvtgr9l3.js} +9553 -10467
- package/dist/assets/{index-CU8KGFQn.js → index-DUvQsFI6.js} +1 -1
- package/dist/assets/{lexical-B7YNxTzd.js → lexical-5YGTLJF0.js} +1 -1
- package/dist/assets/{liveblocks-C3CudlZO.js → liveblocks-503lvhj_.js} +1 -1
- package/dist/assets/{lottie-Fq0Wi3SV.js → lottie-BMnRDCKa.js} +1 -1
- package/dist/assets/{mui-CDMvi5LB.js → mui-C9K9MShr.js} +1 -1
- package/dist/assets/{react-v2-BVT-V.js → react-CKdu8bTh.js} +1 -1
- package/dist/assets/{react-BJ-myZAD.js → react-DIqiqM7Q.js} +1 -1
- package/dist/assets/{react-CgQqWKjB.js → react-DP97CZi0.js} +1 -1
- package/dist/assets/{react-JwpPCEiq.js → react-DhmuD_CP.js} +1 -1
- package/dist/assets/{react-BPdAVITe.js → react-DjbsFF0l.js} +1 -1
- package/dist/assets/{react-D7yA5-jP.js → react-DlLDvH4p.js} +2 -2
- package/dist/assets/{react-kIGp6sRK.js → react-DwK2254G.js} +1 -1
- package/dist/assets/{react-mQ_lG7NS.js → react-VdNXGQ_X.js} +1 -1
- package/dist/assets/{recharts-Cv-ZSa5t.js → recharts-C8jTRc7Y.js} +1 -1
- package/dist/assets/{sentry-DXTFyLBk.js → sentry-CeTfXSES.js} +1 -1
- package/dist/assets/{url-CUS-7-6U.js → url-BSM8J5fW.js} +1 -1
- package/dist/assets/{url-zlR0mTpA.js → url-Cxk6OPrM.js} +1 -1
- package/dist/assets/{utils-DanefoWR.js → utils-Cm3VZuYX.js} +1 -1
- package/dist/assets/{zeni-epic-state-BSCJF8l6.js → zeni-epic-state-BYd8_VKk.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/CreditAgentRoutes-piStc8UM.js +0 -4
- package/dist/assets/SignInScreen-sxgcu4kv.js +0 -1
- package/dist/assets/epic-BYSP1ulG.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-503lvhj_.js";import{u as D,P as v}from"./ScreenRoutes-RWZ_txR6.js";import{a as f}from"./sentry-CeTfXSES.js";import{i as P,n as T,g as m,h as U,k as C,l as I,N as j}from"./core-BANwo7Dq.js";import{Q_ as N,Q$ as k,lc as E,R0 as M,m2 as $,m5 as L,lT as _,R1 as O,R2 as B,l$ as F,lX as q}from"./zeni-epic-state-BYd8_VKk.js";import{z as Q,_ as V,G,k as J,a0 as X,c as Z,w as H,a as K,g as W,b as Y}from"./index-Cvtgr9l3.js";import{n as ee}from"./mui-C9K9MShr.js";import"./recharts-C8jTRc7Y.js";import"./analyticsHelper-Df094F-z.js";import"./utils-Cm3VZuYX.js";import"./empty-DEzuSJ_N.js";import"./index-CMP9b0cU.js";import"./url-BSM8J5fW.js";import"./index-BkhSGlGG.js";import"./analytics-DHJ8QmFp.js";import"./lottie-BMnRDCKa.js";import"./lexical-5YGTLJF0.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]="000ddc3b-199d-435f-b46c-809f03105b3b",a._sentryDebugIdIdentifier="sentry-dbid-000ddc3b-199d-435f-b46c-809f03105b3b")}catch{}})();function te(a,t){return{headerData:{allTabOptions:Z,selectedTabOption:H("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=W(n);K.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(O(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=U(te,ne)(X),oe=ee.div`
|
|
2
|
+
padding: ${J.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function re(){const a=P(),t=T(),n=m(N),g=m(k),[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(E())},[t,y]);const d=Q.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(_())},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=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),R=`${V}/tableDownload?query=${x}`;fetch(R,{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 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:G.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}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-CeTfXSES.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};
|