@zeniai/web-cockpit-ui 2.2.26-dev → 2.2.27-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.
Files changed (39) hide show
  1. package/dist/assets/{CreditAgentRoutes-7ssIy5FY.js → CreditAgentRoutes-CkdJKqy2.js} +1 -1
  2. package/dist/assets/{Preview-DjSDkAeb.js → Preview-5Z6UM_K3.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-Dhfbatjf.js → ScreenRoutes-fI2uw1cJ.js} +50 -50
  4. package/dist/assets/{SignInScreen-DFG7hOwT.js → SignInScreen-DPxE9x22.js} +1 -1
  5. package/dist/assets/{analytics-D9DVDLMs.js → analytics-mFzbRL1s.js} +1 -1
  6. package/dist/assets/{analyticsHelper-C-sO75Qy.js → analyticsHelper-DGLKgvNi.js} +1 -1
  7. package/dist/assets/{core-BNVPHzdy.js → core-D8easBUd.js} +1 -1
  8. package/dist/assets/{dash.all.min-MN5BR-un.js → dash.all.min-Bb_MflRT.js} +1 -1
  9. package/dist/assets/{empty-B9nRoqpl.js → empty-BUqK1DYM.js} +1 -1
  10. package/dist/assets/{empty-CjndknKB.js → empty-BxamAP_Q.js} +1 -1
  11. package/dist/assets/epic-C8hFOpWx.js +2 -0
  12. package/dist/assets/{index-CwD5V0pD.js → index-B9HcPwQl.js} +1 -1
  13. package/dist/assets/{index-BBLewLbL.js → index-BSpJY4FS.js} +1 -1
  14. package/dist/assets/{index-zy4sIgVE.js → index-BYu0YEtp.js} +1 -1
  15. package/dist/assets/{index-BiOxAgi2.js → index-C8umg3QA.js} +1 -1
  16. package/dist/assets/{index-8kOIx7Ac.js → index-CUHK3L6Y.js} +1 -1
  17. package/dist/assets/{index-D_zXiW8W.js → index-Cgwj-JGx.js} +2 -2
  18. package/dist/assets/{index-BTcfczF0.js → index-CppL5czE.js} +6298 -6298
  19. package/dist/assets/{lexical-CxqgDFFX.js → lexical-Dsf0NKEO.js} +1 -1
  20. package/dist/assets/{liveblocks-BzrlfYl-.js → liveblocks-D87a4t6Y.js} +1 -1
  21. package/dist/assets/{lottie-DX9J2xx0.js → lottie-CegsaVgu.js} +1 -1
  22. package/dist/assets/{mui-eIqAw9e_.js → mui-C5bRCWuD.js} +1 -1
  23. package/dist/assets/{react-swmIPjEV.js → react-B3Ecers7.js} +1 -1
  24. package/dist/assets/{react-DHc8cyyw.js → react-BAkg45sb.js} +1 -1
  25. package/dist/assets/{react-_vbbvJKI.js → react-Bb97Eud1.js} +1 -1
  26. package/dist/assets/{react-Cp8IXCWi.js → react-CppsYtJX.js} +1 -1
  27. package/dist/assets/{react-DxxRaq3d.js → react-CqJRYcoX.js} +1 -1
  28. package/dist/assets/{react-DYT6U-XB.js → react-DC4MNA2R.js} +2 -2
  29. package/dist/assets/{react-DDQlprYN.js → react-DztCD5y7.js} +1 -1
  30. package/dist/assets/{react-DTtFgKvG.js → react-nNRyXAMs.js} +1 -1
  31. package/dist/assets/{recharts-DkMj5_iz.js → recharts-CLXQXJeN.js} +1 -1
  32. package/dist/assets/{sentry-ruN9KYbt.js → sentry-CahBuvXz.js} +1 -1
  33. package/dist/assets/{url-bRUcC1gg.js → url-B0cn9VO3.js} +1 -1
  34. package/dist/assets/{url-DhNaBTk3.js → url-BP8jxu7b.js} +1 -1
  35. package/dist/assets/{utils-d5Ji-fQA.js → utils-Vc5Z1FLI.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-CCDLjvFJ.js → zeni-epic-state-QU6URKs1.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +3 -3
  39. package/dist/assets/epic-C-Q5KO0j.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BzrlfYl-.js";import{u as D,P}from"./ScreenRoutes-Dhfbatjf.js";import{a as u}from"./sentry-ruN9KYbt.js";import{i as v,n as U,g as m,h as N,k as C,l as I,N as T}from"./core-BNVPHzdy.js";import{RN as j,RO as k,lu as E,RP as M,mk as L,mn as O,m9 as _,RQ as $,RR as B,mh as F,md as q}from"./zeni-epic-state-CCDLjvFJ.js";import{z as V,_ as G,G as J,n as Q,a0 as Z,c as H,w as K,a as W,g as X,b as Y}from"./index-BTcfczF0.js";import{n as ee}from"./mui-eIqAw9e_.js";import"./recharts-DkMj5_iz.js";import"./analyticsHelper-C-sO75Qy.js";import"./utils-d5Ji-fQA.js";import"./empty-B9nRoqpl.js";import"./index-8kOIx7Ac.js";import"./url-DhNaBTk3.js";import"./index-BiOxAgi2.js";import"./analytics-D9DVDLMs.js";import"./lottie-DX9J2xx0.js";import"./lexical-CxqgDFFX.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]="7e0a5731-57e8-4665-8730-b8381b53ad6a",a._sentryDebugIdIdentifier="sentry-dbid-7e0a5731-57e8-4665-8730-b8381b53ad6a")}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(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a($(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=N(te,ne)(Z),oe=ee.div`
1
+ import{j as s}from"./liveblocks-D87a4t6Y.js";import{u as D,P}from"./ScreenRoutes-fI2uw1cJ.js";import{a as u}from"./sentry-CahBuvXz.js";import{i as v,n as U,g as m,h as N,k as C,l as I,N as T}from"./core-D8easBUd.js";import{RN as j,RO as k,lu as E,RP as M,mk as L,mn as O,m9 as _,RQ as $,RR as B,mh as F,md as q}from"./zeni-epic-state-QU6URKs1.js";import{z as V,_ as G,G as J,n as Q,a0 as Z,c as H,w as K,a as W,g as X,b as Y}from"./index-CppL5czE.js";import{n as ee}from"./mui-C5bRCWuD.js";import"./recharts-CLXQXJeN.js";import"./analyticsHelper-DGLKgvNi.js";import"./utils-Vc5Z1FLI.js";import"./empty-BUqK1DYM.js";import"./index-CUHK3L6Y.js";import"./url-BP8jxu7b.js";import"./index-C8umg3QA.js";import"./analytics-mFzbRL1s.js";import"./lottie-CegsaVgu.js";import"./lexical-Dsf0NKEO.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]="7e0a5731-57e8-4665-8730-b8381b53ad6a",a._sentryDebugIdIdentifier="sentry-dbid-7e0a5731-57e8-4665-8730-b8381b53ad6a")}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(F(n))},onResetSaveMacro:()=>{a(B())},onUIStateChange:n=>{a($(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=N(te,ne)(Z),oe=ee.div`
2
2
  padding: ${Q.sp5};
3
3
  text-align: center;
4
4
  `;function re(){const a=v(),t=U(),n=m(j),g=m(k),[c,h]=u.useState(new Set),p=u.useRef(new Set),b=m(e=>e.tenantState.currentTenantId),y=m(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{y==="Not-Started"&&t(E())},[t,y]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=u.useMemo(()=>({onFetch:()=>{t(_())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??A;t(O({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 z=encodeURIComponent(JSON.stringify(e)),x=`${G}/tableDownload?query=${z}`;fetch(x,{headers:{"zeni-user-id":o,"zeni-session-id":r,"zeni-tenant-id":i}}).then(async l=>{if(!l.ok){const f=await l.text();throw new Error(`Download failed: ${l.status} ${f}`)}return l.blob()}).then(l=>{const f=URL.createObjectURL(l),S=document.createElement("a");S.href=f,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,A,d,b,n.rows]);u.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 R=u.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:R})}function we(){const{isAllowed:a,isLoading:t}=D();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(T,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-ruN9KYbt.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};
1
+ import{a as h,R as n}from"./sentry-CahBuvXz.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};