@zeniai/web-cockpit-ui 2.2.0-qa → 2.2.1-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-BCxEobxG.js +4 -0
- package/dist/assets/{Preview-UIow2QAg.js → Preview-Dx5MaDBO.js} +1 -1
- package/dist/assets/{ScreenRoutes-CfE39Dz5.js → ScreenRoutes-DNq-K218.js} +66 -66
- package/dist/assets/SignInScreen-wZozO8mO.js +1 -0
- package/dist/assets/{analytics-D_PiMDmc.js → analytics-DxMVmB6J.js} +1 -1
- package/dist/assets/analyticsHelper-B8iZjgnc.js +1 -0
- package/dist/assets/{core-D5bqRe96.js → core-DaFiDtwB.js} +1 -1
- package/dist/assets/{dash.all.min-VRwK2FQl.js → dash.all.min-CLlnMC2L.js} +1 -1
- package/dist/assets/{empty-D4hoaodF.js → empty-B322sREJ.js} +1 -1
- package/dist/assets/{empty-BcDF-lRb.js → empty-zn36IewP.js} +1 -1
- package/dist/assets/epic-BrY01Tkf.js +2 -0
- package/dist/assets/{index-BIb5L1c2.js → index-BM4G96Ek.js} +1 -1
- package/dist/assets/{index-BYFo-SqN.js → index-BZF_Ifmk.js} +1 -1
- package/dist/assets/{index-C7gPjAmb.js → index-B_il6CJv.js} +1 -1
- package/dist/assets/{index-DQRt8cxE.js → index-B_jsLt1m.js} +1 -1
- package/dist/assets/{index-DP6sUKup.js → index-CUnlq0aD.js} +1 -1
- package/dist/assets/{index-KugEVymX.js → index-DaoGRcfc.js} +26326 -26202
- package/dist/assets/{index-BiO1s7vL.js → index-Xkv6y3af.js} +2 -2
- package/dist/assets/{lexical-C1dMANWG.js → lexical-B_vJ9d7z.js} +1 -1
- package/dist/assets/{liveblocks-CyH3hR6i.js → liveblocks-DPcuLM26.js} +1 -1
- package/dist/assets/{lottie-DL1_Uezw.js → lottie-DreQMVea.js} +1 -1
- package/dist/assets/{mui--lkvqwFe.js → mui-CE1Vn5df.js} +1 -1
- package/dist/assets/{react-BwhQJjYl.js → react-BBJAgxY-.js} +1 -1
- package/dist/assets/{react-vtjt56We.js → react-BQAGBlH7.js} +2 -2
- package/dist/assets/{react-i5ZhTcIt.js → react-BgoC5F6M.js} +1 -1
- package/dist/assets/{react-Cq4n8gwk.js → react-BqFHCg_m.js} +1 -1
- package/dist/assets/{react-BQqhjAl8.js → react-CQU4vSSH.js} +1 -1
- package/dist/assets/{react-lIsGMJW6.js → react-Da0Trvs6.js} +1 -1
- package/dist/assets/{react-BNp85deG.js → react-DjKAois8.js} +1 -1
- package/dist/assets/{react-DNh48BeO.js → react-Dzq404Wo.js} +1 -1
- package/dist/assets/{recharts-Dj1xHeUs.js → recharts-9JdFNWUA.js} +1 -1
- package/dist/assets/{sentry-A29v-pMx.js → sentry-BYAUaNMe.js} +1 -1
- package/dist/assets/{url-BqUdIHKD.js → url-6UfguvJb.js} +1 -1
- package/dist/assets/{url-vWbD-Lv8.js → url-DxN484tH.js} +1 -1
- package/dist/assets/{utils-B_RXq0iR.js → utils-BavUELj6.js} +1 -1
- package/dist/assets/{zeni-epic-state-DjrNdRDl.js → zeni-epic-state-DoX68kAP.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/CreditAgentRoutes-k1Uj3IWD.js +0 -4
- package/dist/assets/SignInScreen-RKv_woy4.js +0 -1
- package/dist/assets/analyticsHelper--yMdHdp_.js +0 -1
- package/dist/assets/epic-Dk0GCDgb.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DPcuLM26.js";import{u as P,P as v}from"./ScreenRoutes-DNq-K218.js";import{a as f}from"./sentry-BYAUaNMe.js";import{i as U,n as R,g as m,h as T,k as C,l as I,N as j}from"./core-DaFiDtwB.js";import{QB as N,QC as E,l0 as M,QD as k,lS as L,lV as $,lH as O,QE as _,QF as Q,lP as B,lL as F}from"./zeni-epic-state-DoX68kAP.js";import{z as V,Z as q,G as Z,n as G,a0 as H,c as J,w as K,d as W,g as X,e as Y}from"./index-DaoGRcfc.js";import{n as ee}from"./mui-CE1Vn5df.js";import"./recharts-9JdFNWUA.js";import"./analyticsHelper-B8iZjgnc.js";import"./utils-BavUELj6.js";import"./empty-zn36IewP.js";import"./index-BM4G96Ek.js";import"./url-6UfguvJb.js";import"./index-B_il6CJv.js";import"./analytics-DxMVmB6J.js";import"./lottie-DreQMVea.js";import"./lexical-B_vJ9d7z.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]="c7bad9d8-13b5-4eeb-88e6-fe292c923d3a",a._sentryDebugIdIdentifier="sentry-dbid-c7bad9d8-13b5-4eeb-88e6-fe292c923d3a")}catch{}})();function te(a,t){return{headerData:{allTabOptions:J,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(F())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(Q())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=T(te,ne)(H),oe=ee.div`
|
|
2
|
+
padding: ${G.sp5};
|
|
3
|
+
text-align: center;
|
|
4
|
+
`;function re(){const a=U(),t=R(),n=m(N),g=m(E),[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(M())},[t,y]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=f.useMemo(()=>({onFetch:()=>{t(O())},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=k(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${q}/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 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}=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(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-BYAUaNMe.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};
|