@zeniai/web-cockpit-ui 2.2.99-prod → 2.3.0-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-DH5N24nR.js +4 -0
- package/dist/assets/{Preview-CTxohH5M.js → Preview-CnLb4klw.js} +1 -1
- package/dist/assets/{ScreenRoutes-BjRpK7P1.js → ScreenRoutes-BulBihBS.js} +41 -41
- package/dist/assets/SignInScreen-DTR_Ox4N.js +1 -0
- package/dist/assets/{analytics-XK1CzRLB.js → analytics-CHQKwapl.js} +1 -1
- package/dist/assets/{analyticsHelper-DcsO-dRW.js → analyticsHelper-_xhGJ6-z.js} +1 -1
- package/dist/assets/{core-CdwQRn5C.js → core-DS9779YA.js} +1 -1
- package/dist/assets/{dash.all.min-C_fSfshq.js → dash.all.min-DdeDdV41.js} +1 -1
- package/dist/assets/{empty-TEXzX3uV.js → empty-BBCAo0gu.js} +1 -1
- package/dist/assets/{empty-HjlxPtND.js → empty-CwDPCadi.js} +1 -1
- package/dist/assets/epic-D5EN_wvw.js +2 -0
- package/dist/assets/{index-d0tHlrgG.js → index-B9KcWv97.js} +1 -1
- package/dist/assets/{index-BVMuxJ7l.js → index-BOXW9Wke.js} +8194 -8155
- package/dist/assets/{index-BT8bJ6rc.js → index-CjKN3lTR.js} +1 -1
- package/dist/assets/{index-CvofNf9-.js → index-D40XoFVW.js} +2 -2
- package/dist/assets/{index-CIkN9I0Q.js → index-DI1jyAWC.js} +1 -1
- package/dist/assets/{index-Qk86XeTb.js → index-DTp3DgSq.js} +1 -1
- package/dist/assets/{index-hdaTGbIp.js → index-ctlefXfa.js} +1 -1
- package/dist/assets/{lexical-CBOYy8oF.js → lexical-WBzpPAEv.js} +1 -1
- package/dist/assets/{liveblocks-B6wDlryr.js → liveblocks-B4ELqxLT.js} +1 -1
- package/dist/assets/{lottie-CN_ftlk0.js → lottie-YYWa5EZ-.js} +1 -1
- package/dist/assets/{mui-Bcigay64.js → mui-Bn9tIGZ3.js} +1 -1
- package/dist/assets/{react-_PtxS-sn.js → react-9HC9TSQ1.js} +1 -1
- package/dist/assets/{react-CyFfsQCb.js → react-BjUmygww.js} +1 -1
- package/dist/assets/{react-ByIqW7Sr.js → react-CkQfjSQv.js} +1 -1
- package/dist/assets/{react-C98pqUuS.js → react-Cm1qctGg.js} +1 -1
- package/dist/assets/{react-BnrWOSfN.js → react-DlRnCIlN.js} +2 -2
- package/dist/assets/{react-BCFkgw-t.js → react-DvV3b5L6.js} +1 -1
- package/dist/assets/{react-DbDB0Auh.js → react-E-Bd96bT.js} +1 -1
- package/dist/assets/{react-aDp58mDL.js → react-X6nCYIYQ.js} +1 -1
- package/dist/assets/{recharts-NBjJbURu.js → recharts-JglOk2Z9.js} +1 -1
- package/dist/assets/{sentry-CNl48Hof.js → sentry-D-G1RTW9.js} +1 -1
- package/dist/assets/{url-DGqwi5Ym.js → url-Ce3JH06h.js} +1 -1
- package/dist/assets/{url-CVLuXoRO.js → url-yk_vEd8p.js} +1 -1
- package/dist/assets/{utils-CfWwDQx5.js → utils-DPpmEXxu.js} +1 -1
- package/dist/assets/{zeni-epic-state-CsMRUbwF.js → zeni-epic-state-Dai9TqiP.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/CreditAgentRoutes-D2HHf1e7.js +0 -4
- package/dist/assets/SignInScreen-DSBBrMIZ.js +0 -1
- package/dist/assets/epic-2N18SvrM.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-B4ELqxLT.js";import{u as v,P}from"./ScreenRoutes-BulBihBS.js";import{a as f}from"./sentry-D-G1RTW9.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-DS9779YA.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-Dai9TqiP.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-BOXW9Wke.js";import{n as ee}from"./mui-Bn9tIGZ3.js";import"./recharts-JglOk2Z9.js";import"./analyticsHelper-_xhGJ6-z.js";import"./utils-DPpmEXxu.js";import"./empty-BBCAo0gu.js";import"./index-B9KcWv97.js";import"./url-Ce3JH06h.js";import"./index-DTp3DgSq.js";import"./analytics-CHQKwapl.js";import"./lottie-YYWa5EZ-.js";import"./lexical-WBzpPAEv.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-D-G1RTW9.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};
|