@zeniai/web-cockpit-ui 2.2.48-qa → 2.2.49-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 (41) hide show
  1. package/dist/assets/{CreditAgentRoutes-CPQmBA8T.js → CreditAgentRoutes-BUBYgaRK.js} +2 -2
  2. package/dist/assets/{Preview-ueJiSiT1.js → Preview-DygWrLbW.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-D1je-wlW.js → ScreenRoutes-Cvx46hFR.js} +60 -60
  4. package/dist/assets/SignInScreen-CALjpiDQ.js +1 -0
  5. package/dist/assets/{analytics-DIHH-LQL.js → analytics-BhXTeYMR.js} +23 -23
  6. package/dist/assets/analyticsHelper-CMEaGV55.js +1 -0
  7. package/dist/assets/{core-DexNPuhh.js → core-BKA148oo.js} +1 -1
  8. package/dist/assets/{dash.all.min-BECOrRg1.js → dash.all.min-Czi0o0KS.js} +1 -1
  9. package/dist/assets/{empty-D8UvnIAJ.js → empty-i1wzPsXB.js} +1 -1
  10. package/dist/assets/{empty-1XjFlf4K.js → empty-sBiBcj52.js} +1 -1
  11. package/dist/assets/epic-5W8exn1l.js +2 -0
  12. package/dist/assets/{index-BHQdWXv2.js → index-B6f3mQZL.js} +1 -1
  13. package/dist/assets/{index-BxZfupJh.js → index-BLIIS_3h.js} +1 -1
  14. package/dist/assets/{index-CHxvp-tb.js → index-CtwjktXp.js} +1 -1
  15. package/dist/assets/{index-_ZLuUjYV.js → index-CxYSc83s.js} +2 -2
  16. package/dist/assets/{index-B55bRwgH.js → index-DhgqWER-.js} +1 -1
  17. package/dist/assets/{index-DzQaPtUf.js → index-ImFAElRp.js} +1 -1
  18. package/dist/assets/{index-Cgk3vzuT.js → index-bxVpfE3m.js} +10336 -10569
  19. package/dist/assets/{lexical-CypjT_oa.js → lexical-BZyElxbG.js} +1 -1
  20. package/dist/assets/{liveblocks-N2M5OViJ.js → liveblocks-C-AuTOkw.js} +1 -1
  21. package/dist/assets/{lottie-sNg0vj4-.js → lottie-CkJKMDbi.js} +1 -1
  22. package/dist/assets/{mui-CU4B29DP.js → mui-D4MbYyLD.js} +1 -1
  23. package/dist/assets/{react-D2lzuQFo.js → react-70S-NT2a.js} +1 -1
  24. package/dist/assets/{react-Ds4Vu_OC.js → react-B7Twl5sJ.js} +1 -1
  25. package/dist/assets/{react-RR9x3g0F.js → react-BGW4Tv6C.js} +1 -1
  26. package/dist/assets/{react-B62sI5QO.js → react-BYL1Q2Kr.js} +1 -1
  27. package/dist/assets/{react-Dveiose3.js → react-BpnDzZwO.js} +1 -1
  28. package/dist/assets/{react-0bujf3iJ.js → react-DGfTXQZY.js} +2 -2
  29. package/dist/assets/{react-gljrfsMB.js → react-DXUhyyFZ.js} +1 -1
  30. package/dist/assets/{react-BEouybS-.js → react-slZUKaSk.js} +1 -1
  31. package/dist/assets/{recharts-D-mvBQBw.js → recharts-DsmKUO7C.js} +1 -1
  32. package/dist/assets/{sentry-DBUSSf4s.js → sentry-BYM5lfa7.js} +1 -1
  33. package/dist/assets/{url-Bi1Antw3.js → url-BJ25zhwL.js} +1 -1
  34. package/dist/assets/{url-CvJnATQn.js → url-BpyaSWzJ.js} +1 -1
  35. package/dist/assets/{utils-HQognvn5.js → utils-C9nZAXmJ.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-MZ3MDDGL.js → zeni-epic-state-hIyhkcpy.js} +6 -6
  37. package/dist/index.html +1 -1
  38. package/package.json +4 -4
  39. package/dist/assets/SignInScreen-BHOjBDXB.js +0 -1
  40. package/dist/assets/analyticsHelper-UlftDxWO.js +0 -1
  41. package/dist/assets/epic-Dj9vR645.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-N2M5OViJ.js";import{u as v,P}from"./ScreenRoutes-D1je-wlW.js";import{a as f}from"./sentry-DBUSSf4s.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-DexNPuhh.js";import{S6 as N,S7 as k,lu as E,S8 as M,mk as L,mn as $,m9 as O,S9 as _,Sa as B,mh as F,md as q}from"./zeni-epic-state-MZ3MDDGL.js";import{a as V,Z,G,n as J,a0 as H,c as K,w as Q,d as W,g as X,e as Y}from"./index-Cgk3vzuT.js";import{n as ee}from"./mui-CU4B29DP.js";import"./recharts-D-mvBQBw.js";import"./analyticsHelper-UlftDxWO.js";import"./utils-HQognvn5.js";import"./empty-D8UvnIAJ.js";import"./index-CHxvp-tb.js";import"./url-Bi1Antw3.js";import"./index-BxZfupJh.js";import"./analytics-DIHH-LQL.js";import"./lottie-sNg0vj4-.js";import"./lexical-CypjT_oa.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]="e9557482-d2f3-4356-867d-851cec278203",a._sentryDebugIdIdentifier="sentry-dbid-e9557482-d2f3-4356-867d-851cec278203")}catch{}})();function te(a,t){return{headerData:{allTabOptions:K,selectedTabOption:Q("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=T(te,ne)(H),oe=ee.div`
1
+ import{j as s}from"./liveblocks-C-AuTOkw.js";import{u as v,P}from"./ScreenRoutes-Cvx46hFR.js";import{a as f}from"./sentry-BYM5lfa7.js";import{i as R,n as U,g as m,h as T,k as C,l as I,N as j}from"./core-BKA148oo.js";import{R$ as N,S0 as k,lu as E,S1 as M,mk as L,mn as $,m9 as O,S2 as _,S3 as B,mh as F,md as q}from"./zeni-epic-state-hIyhkcpy.js";import{z as V,Z,G,n as J,a0 as H,c as K,w as Q,a as W,g as X,b as Y}from"./index-bxVpfE3m.js";import{n as ee}from"./mui-D4MbYyLD.js";import"./recharts-DsmKUO7C.js";import"./analyticsHelper-CMEaGV55.js";import"./utils-C9nZAXmJ.js";import"./empty-i1wzPsXB.js";import"./index-CtwjktXp.js";import"./url-BJ25zhwL.js";import"./index-BLIIS_3h.js";import"./analytics-BhXTeYMR.js";import"./lottie-CkJKMDbi.js";import"./lexical-BZyElxbG.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]="9b002642-cd76-40f9-877c-bc53ccc033f3",a._sentryDebugIdIdentifier="sentry-dbid-9b002642-cd76-40f9-877c-bc53ccc033f3")}catch{}})();function te(a,t){return{headerData:{allTabOptions:K,selectedTabOption:Q("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=T(te,ne)(H),oe=ee.div`
2
2
  padding: ${J.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=U(),t=R(),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=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=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=y??"";if(!o||!r||!i)return;const z=encodeURIComponent(JSON.stringify(e)),D=`${Z}/tableDownload?query=${z}`;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 x=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:G.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:x})}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};
4
+ `;function re(){const a=R(),t=U(),n=m(N),g=m(k),[c,h]=f.useState(new Set),S=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=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=M(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),D=`${Z}/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,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?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:G.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-DBUSSf4s.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-BYM5lfa7.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};