@zeniai/web-cockpit-ui 2.1.98-qa → 2.2.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-DO_TLwy9.js +4 -0
- package/dist/assets/{Preview-B_02nA4G.js → Preview-CLJtV1Gr.js} +1 -1
- package/dist/assets/{ScreenRoutes-DbzPN314.js → ScreenRoutes-CMtjj_f8.js} +55 -55
- package/dist/assets/SignInScreen-Bolgwq-x.js +1 -0
- package/dist/assets/{analytics-CVmvV2sf.js → analytics-D6WeaTu_.js} +1 -1
- package/dist/assets/analyticsHelper-BeLdzM9f.js +1 -0
- package/dist/assets/{core-sZ5ZbV00.js → core-D57FNYYC.js} +1 -1
- package/dist/assets/{dash.all.min-Dgth3cRR.js → dash.all.min-6976wS83.js} +1 -1
- package/dist/assets/{empty-r1ThdO6U.js → empty-CpdN7Kn9.js} +1 -1
- package/dist/assets/{empty-rkZBYB6f.js → empty-D_wFztYQ.js} +1 -1
- package/dist/assets/epic-RiYsFgM3.js +2 -0
- package/dist/assets/{index-DafhsUaQ.js → index-BD6sRo9X.js} +26200 -26300
- package/dist/assets/{index--UPBSc5V.js → index-BElPrBdx.js} +1 -1
- package/dist/assets/{index-C-F_Xisd.js → index-BUqCnyXp.js} +1 -1
- package/dist/assets/{index-tb5IBUHR.js → index-CA-YchcE.js} +2 -2
- package/dist/assets/{index-CLg7isO0.js → index-CmV7HwVx.js} +1 -1
- package/dist/assets/{index-u70pmtX1.js → index-DQSRghdP.js} +1 -1
- package/dist/assets/{index-PZW4jemX.js → index-l-bq98EH.js} +1 -1
- package/dist/assets/{lexical-BeSiN-sF.js → lexical-uKEkJ_s1.js} +1 -1
- package/dist/assets/{liveblocks-BOcWyhL6.js → liveblocks-CUWfk62k.js} +1 -1
- package/dist/assets/{lottie-Cl80JdTo.js → lottie-DaFDTnL9.js} +1 -1
- package/dist/assets/{mui-WaSCuycn.js → mui-CsPVKmju.js} +1 -1
- package/dist/assets/{react-DrJCOAVF.js → react-82o7A1JL.js} +1 -1
- package/dist/assets/{react-BBji2wCa.js → react-BL7JONQW.js} +1 -1
- package/dist/assets/{react-Cz9JSMAN.js → react-Bf9CQASQ.js} +1 -1
- package/dist/assets/{react-BbnieggJ.js → react-BmfkpJP4.js} +1 -1
- package/dist/assets/{react-DaWQI45U.js → react-C4XaX1CV.js} +2 -2
- package/dist/assets/{react-BWmohIOU.js → react-CSUmhfKh.js} +1 -1
- package/dist/assets/{react-BmgEILAR.js → react-DCzLSkc6.js} +1 -1
- package/dist/assets/{react-_gjP8_74.js → react-dQZrLu2T.js} +1 -1
- package/dist/assets/{recharts-A4T1ckRd.js → recharts-DfW5krfr.js} +1 -1
- package/dist/assets/{sentry-CnnSHzq5.js → sentry-BIqs-g4H.js} +1 -1
- package/dist/assets/{url-cTscR1aR.js → url-BrguOMmu.js} +1 -1
- package/dist/assets/{url-Dho3Fn_t.js → url-DUtdDG8w.js} +1 -1
- package/dist/assets/{utils-C7a7V7Qh.js → utils-CmTwry3P.js} +1 -1
- package/dist/assets/{zeni-epic-state-gl_uz5YK.js → zeni-epic-state-Bd9IVnLS.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/CreditAgentRoutes--DLpBadT.js +0 -4
- package/dist/assets/SignInScreen-Cvj9LMpO.js +0 -1
- package/dist/assets/analyticsHelper-Dzvsds_n.js +0 -1
- package/dist/assets/epic-DaIqpTVA.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-CUWfk62k.js";import{u as P,P as v}from"./ScreenRoutes-CMtjj_f8.js";import{a as f}from"./sentry-BIqs-g4H.js";import{i as T,n as U,g as m,h as j,k as C,l as I,N as R}from"./core-D57FNYYC.js";import{Qy as N,Qz as k,l0 as E,QA as M,lS as L,lV as _,lH as $,QB as Q,QC as B,lP as F,lL as O}from"./zeni-epic-state-Bd9IVnLS.js";import{z as J,_ as V,j as q,m as H,a0 as Z,J as G,d as K,e as W,g as X,h as Y}from"./index-BD6sRo9X.js";import{n as ee}from"./mui-CsPVKmju.js";import"./recharts-DfW5krfr.js";import"./analyticsHelper-BeLdzM9f.js";import"./utils-CmTwry3P.js";import"./empty-CpdN7Kn9.js";import"./index-BUqCnyXp.js";import"./url-DUtdDG8w.js";import"./index-BElPrBdx.js";import"./analytics-D6WeaTu_.js";import"./lottie-DaFDTnL9.js";import"./lexical-uKEkJ_s1.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]="d2e2e26b-9c0d-4f46-b6be-130ee3ed626d",a._sentryDebugIdIdentifier="sentry-dbid-d2e2e26b-9c0d-4f46-b6be-130ee3ed626d")}catch{}})();function te(a,t){return{headerData:{allTabOptions:G,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(O())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a(Q(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=j(te,ne)(Z),oe=ee.div`
|
|
2
|
+
padding: ${H.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),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=J.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,z=f.useMemo(()=>({onFetch:()=>{t($())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??A;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,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 w=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:q.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=P();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(R,{to:"/management",replace:!0})})})}export{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as n}from"./sentry-
|
|
1
|
+
import{a as h,R as n}from"./sentry-BIqs-g4H.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};
|