@zeniai/web-cockpit-ui 2.0.59-qa → 2.0.60-qa
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-C-R4PrV2.js +4 -0
- package/dist/assets/{Preview-CrZDXmOC.js → Preview-BgVRE_qL.js} +1 -1
- package/dist/assets/ScreenRoutes-DJbaAuJs.js +180 -0
- package/dist/assets/{SignInScreen-D0biFV9m.js → SignInScreen-zP9a_Vt5.js} +1 -1
- package/dist/assets/{analytics-DPVkpPvG.js → analytics-bLGoMt_1.js} +1 -1
- package/dist/assets/{analyticsHelper-HeS5EKjZ.js → analyticsHelper-CnH4hQBr.js} +1 -1
- package/dist/assets/{core-5D6NjwIg.js → core-jCXGTQvA.js} +1 -1
- package/dist/assets/{dash.all.min-tUeU29Fr.js → dash.all.min-o4-Vj8ps.js} +1 -1
- package/dist/assets/{empty-BCG9M6zZ.js → empty-D46MeKDT.js} +1 -1
- package/dist/assets/{empty-CSdvN8Nq.js → empty-tmoYB8lV.js} +1 -1
- package/dist/assets/epic-vfFVaZI2.js +2 -0
- package/dist/assets/{index-B2fU8RvY.js → index-2QktT_hq.js} +10938 -10740
- package/dist/assets/{index-BzZh8eor.js → index-BXyZw3lo.js} +2 -2
- package/dist/assets/{index-Bg7fZPoW.js → index-C3pBETIi.js} +1 -1
- package/dist/assets/{index-CWoxz28M.js → index-CRFInH1K.js} +1 -1
- package/dist/assets/{index-BrTPfWrB.js → index-D6plUv8O.js} +1 -1
- package/dist/assets/{index-BfN4Hy2d.js → index-D_tiuzA0.js} +1 -1
- package/dist/assets/{index-Dq-AqVKQ.js → index-DgTg_FC9.js} +1 -1
- package/dist/assets/index-xQ8260uf.css +1 -0
- package/dist/assets/{lexical-BYlXfjt7.js → lexical-LPziZn5A.js} +1 -1
- package/dist/assets/{liveblocks-VfMjE8v_.js → liveblocks-DZkCH2xN.js} +1 -1
- package/dist/assets/{lottie-DJUBHLfx.js → lottie-DUyJu0pd.js} +1 -1
- package/dist/assets/{mui-C7Wy9gDy.js → mui-Dplz67jq.js} +1 -1
- package/dist/assets/{react-BCY3z4bb.js → react-2RNUDFZd.js} +1 -1
- package/dist/assets/{react-M_fJO4fi.js → react-BCeconuO.js} +2 -2
- package/dist/assets/{react-CPUhvQHH.js → react-BODaTSjw.js} +1 -1
- package/dist/assets/{react-8P_51UZR.js → react-CtfwhM0x.js} +1 -1
- package/dist/assets/{react-CSHBK4HZ.js → react-DVFB2SOm.js} +1 -1
- package/dist/assets/{react-Bd3vZODO.js → react-DcXKvtmb.js} +1 -1
- package/dist/assets/{react-CgXxqVJx.js → react-DsYNUiXJ.js} +1 -1
- package/dist/assets/{react-DUyWPnX4.js → react-I67C1zjR.js} +1 -1
- package/dist/assets/{recharts-CyDTKly-.js → recharts-DADINQF-.js} +1 -1
- package/dist/assets/{sentry-BMuUMpFY.js → sentry-DPjqAmgS.js} +1 -1
- package/dist/assets/{url-Dlrmn0QI.js → url-C3rUOUId.js} +1 -1
- package/dist/assets/{url-Bu1bvbUM.js → url-DcdgW2qn.js} +1 -1
- package/dist/assets/{utils-DMipLBp5.js → utils-BSshncBl.js} +1 -1
- package/dist/assets/{zeni-epic-state-BJCJ44qZ.js → zeni-epic-state-C-CH5wAG.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +10 -6
- package/dist/assets/CreditAgentRoutes-CIB7odMp.js +0 -4
- package/dist/assets/ScreenRoutes-DrWPzAmX.js +0 -180
- package/dist/assets/epic-BFBumqaU.js +0 -2
- package/dist/assets/index-y98xvd7i.css +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DZkCH2xN.js";import{u as j,P as v}from"./ScreenRoutes-DJbaAuJs.js";import{a as f}from"./sentry-DPjqAmgS.js";import{i as P,n as U,g as m,h as k,k as A,l as C,N as R}from"./core-jCXGTQvA.js";import{Ib as T,Ic as N,jL as E,Id as M,kg as L,kj as _,k2 as $,Ie as F,If as O,kd as B,k9 as q}from"./zeni-epic-state-C-CH5wAG.js";import{z as Q,_ as V,D as J,e as Z,a0 as G,F as H,Q as K,b as W,g as X,h as Y}from"./index-2QktT_hq.js";import{n as ee}from"./mui-Dplz67jq.js";import"./recharts-DADINQF-.js";import"./analyticsHelper-CnH4hQBr.js";import"./utils-BSshncBl.js";import"./empty-tmoYB8lV.js";import"./index-DgTg_FC9.js";import"./url-C3rUOUId.js";import"./index-D6plUv8O.js";import"./analytics-bLGoMt_1.js";import"./lottie-DUyJu0pd.js";import"./lexical-LPziZn5A.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]="8eb96a01-5a80-4714-bd8d-727f6ee74ac1",a._sentryDebugIdIdentifier="sentry-dbid-8eb96a01-5a80-4714-bd8d-727f6ee74ac1")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,selectedTabOption:K("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=X(n);W.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(F(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=k(te,ne)(G),oe=ee.div`
|
|
2
|
+
padding: ${Z.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function re(){const a=P(),t=U(),n=m(T),g=m(N),[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(),I=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t($())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??I;t(_({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(L(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)),D=`${V}/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),S=document.createElement("a");S.href=u,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(u)}).catch(()=>{})}}),[t,I,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:J.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=j();return t?null:a?s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(v,{element:s.jsx(re,{})})})}):s.jsx(A,{children:s.jsx(C,{path:"/*",element:s.jsx(R,{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-DPjqAmgS.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};
|