@zeniai/web-cockpit-ui 2.0.91-qa → 2.0.92-next

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 (58) hide show
  1. package/dist/assets/{CreditAgentRoutes-BmJnXucC.js → CreditAgentRoutes-BFxuwXTn.js} +3 -3
  2. package/dist/assets/{Preview-BVWpqeSC.js → Preview-TTLI7yWM.js} +1 -1
  3. package/dist/assets/ScreenRoutes-u5Hy0Jbh.js +180 -0
  4. package/dist/assets/SignInScreen-CHpoyf7o.js +1 -0
  5. package/dist/assets/analytics-yxERyYZR.js +68 -0
  6. package/dist/assets/analyticsHelper-BW24NQkf.js +1 -0
  7. package/dist/assets/core-BezSC7FV.js +12 -0
  8. package/dist/assets/dash.all.min-D3rbCKgx.js +21 -0
  9. package/dist/assets/{empty-BIPYfFQf.js → empty-BM3drND4.js} +1 -1
  10. package/dist/assets/{empty-DXXhfnlY.js → empty-DJ61DJ7o.js} +1 -1
  11. package/dist/assets/epic-DpLQl3gP.js +2 -0
  12. package/dist/assets/{hls-CK0vqtka.js → hls-DifHSkbp.js} +7 -7
  13. package/dist/assets/{index-ICejqN8B.js → index-BS-2WonE.js} +6128 -6154
  14. package/dist/assets/index-Bi9k_q2M.js +1 -0
  15. package/dist/assets/{index-D6CLOv7r.js → index-DHg9At0t.js} +2 -2
  16. package/dist/assets/{index-C16yNsO0.js → index-DLx0oFSs.js} +1 -1
  17. package/dist/assets/index-DMPC-n6x.js +1 -0
  18. package/dist/assets/{index-C5bKezyj.js → index-DNixxmOL.js} +2 -2
  19. package/dist/assets/index-UA2r-eW3.css +1 -0
  20. package/dist/assets/{index-eO6VL-YY.js → index-Z_xDnQip.js} +1 -1
  21. package/dist/assets/{lexical-oFPKqtLx.js → lexical-DTMxK5nn.js} +1 -1
  22. package/dist/assets/liveblocks-Dm88Uib7.js +54 -0
  23. package/dist/assets/lottie-orpQCClQ.js +2 -0
  24. package/dist/assets/{mui-Y6Abe26h.js → mui-C0WYYURa.js} +1 -1
  25. package/dist/assets/{react-Dpc1Z3Iu.js → react-BFC9NZLw.js} +1 -1
  26. package/dist/assets/{react-C5KqZNVs.js → react-BgNTAcDG.js} +2 -2
  27. package/dist/assets/{react-fAI3uPu3.js → react-BmJwhfFt.js} +1 -1
  28. package/dist/assets/react-CGpYRu7E.js +19 -0
  29. package/dist/assets/{react-BI2LHYPB.js → react-CHB4RqL0.js} +2 -2
  30. package/dist/assets/{react-CEzULWg2.js → react-DBXFm3bO.js} +1 -1
  31. package/dist/assets/{react-_5MyySUV.js → react-YYfMkF6P.js} +1 -1
  32. package/dist/assets/react-v5GsgoXn.js +22 -0
  33. package/dist/assets/recharts-iZpuRWoC.js +65 -0
  34. package/dist/assets/{sentry-BBOZ5oyJ.js → sentry-V1x8fz15.js} +13 -13
  35. package/dist/assets/url-CvIYMLKY.js +6 -0
  36. package/dist/assets/{url-CA7vETG6.js → url-U29Hxc9g.js} +1 -1
  37. package/dist/assets/utils-BkWRQ8tn.js +36 -0
  38. package/dist/assets/zeni-epic-state-Cf4Didic.js +13 -0
  39. package/dist/index.html +1 -1
  40. package/package.json +4 -4
  41. package/dist/assets/ScreenRoutes-BefBlGLJ.js +0 -180
  42. package/dist/assets/SignInScreen-sX-RnecA.js +0 -1
  43. package/dist/assets/analytics-Bbex-2NY.js +0 -68
  44. package/dist/assets/analyticsHelper-CxMOWfdf.js +0 -1
  45. package/dist/assets/core-BW53WFXm.js +0 -12
  46. package/dist/assets/dash.all.min-CYhxTnzU.js +0 -21
  47. package/dist/assets/epic-CBRt8lUw.js +0 -2
  48. package/dist/assets/index-C8ouCD8q.css +0 -1
  49. package/dist/assets/index-CzKzprtP.js +0 -1
  50. package/dist/assets/index-DiayUGVR.js +0 -1
  51. package/dist/assets/liveblocks-Dm0hKemG.js +0 -54
  52. package/dist/assets/lottie-BBSyomrb.js +0 -2
  53. package/dist/assets/react-C4zGd3co.js +0 -19
  54. package/dist/assets/react-kDv7vYkT.js +0 -22
  55. package/dist/assets/recharts-BhfyGkXR.js +0 -65
  56. package/dist/assets/url-CMRH3WWI.js +0 -6
  57. package/dist/assets/utils-C7Fx7mHj.js +0 -36
  58. package/dist/assets/zeni-epic-state-CWi9oOGG.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-Dm0hKemG.js";import{u as P,P as U}from"./ScreenRoutes-BefBlGLJ.js";import{a as f}from"./sentry-BBOZ5oyJ.js";import{i as v,n as T,g as m,h as j,k as C,l as I,N as k}from"./core-BW53WFXm.js";import{Kd as R,Ke as N,kg as E,Kf as M,k_ as L,l1 as $,kP as _,Kg as K,Kh as O,kX as B,kT as F}from"./zeni-epic-state-CWi9oOGG.js";import{z as q,$ as J,f as V,i as X,a0 as Z,a as G,b as H,d as Q,g as W,h as Y}from"./index-ICejqN8B.js";import{n as ee}from"./mui-Y6Abe26h.js";import"./recharts-BhfyGkXR.js";import"./analyticsHelper-CxMOWfdf.js";import"./utils-C7Fx7mHj.js";import"./empty-DXXhfnlY.js";import"./index-CzKzprtP.js";import"./url-CMRH3WWI.js";import"./index-DiayUGVR.js";import"./analytics-Bbex-2NY.js";import"./lottie-BBSyomrb.js";import"./lexical-oFPKqtLx.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]="c9b68f2f-6731-4d97-9a8c-ce2f663d0cd4",a._sentryDebugIdIdentifier="sentry-dbid-c9b68f2f-6731-4d97-9a8c-ce2f663d0cd4")}catch{}})();function te(a,t){return{headerData:{allTabOptions:G,selectedTabOption:H("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=W(n);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(F())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=j(te,ne)(Z),oe=ee.div`
2
- padding: ${X.sp5};
1
+ import{j as s}from"./liveblocks-Dm88Uib7.js";import{u as D,P as j}from"./ScreenRoutes-u5Hy0Jbh.js";import{a as f}from"./sentry-V1x8fz15.js";import{i as k,n as v,g as m,h as P,k as C,l as I,N as R}from"./core-BezSC7FV.js";import{Ka as T,Kb as N,kd as M,Kc as E,kX as L,k_ as $,kM as _,Kd as K,Ke as O,kU as B,kQ as F}from"./zeni-epic-state-Cf4Didic.js";import{z as J,$ as q,i as V,j as Q,a0 as X,a as Z,J as G,c as H,g as W,h as Y}from"./index-BS-2WonE.js";import{n as ee}from"./mui-C0WYYURa.js";import"./recharts-iZpuRWoC.js";import"./analyticsHelper-BW24NQkf.js";import"./utils-BkWRQ8tn.js";import"./empty-DJ61DJ7o.js";import"./index-Bi9k_q2M.js";import"./url-CvIYMLKY.js";import"./index-DMPC-n6x.js";import"./analytics-yxERyYZR.js";import"./lottie-orpQCClQ.js";import"./lexical-DTMxK5nn.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]="28aecc83-35e9-4f08-b46f-1e8b33a442a1",a._sentryDebugIdIdentifier="sentry-dbid-28aecc83-35e9-4f08-b46f-1e8b33a442a1")}catch{}})();function te(a,t){return{headerData:{allTabOptions:Z,selectedTabOption:G("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=W(n);H.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(F())},onSaveMacro:n=>{a(B(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(K(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=P(te,ne)(X),oe=ee.div`
2
+ padding: ${Q.sp5};
3
3
  text-align: center;
4
- `;function re(){const a=v(),t=T(),n=m(R),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(),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=`${J}/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:V.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(U,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(k,{to:"/management",replace:!0})})})}export{ze as default};
4
+ `;function re(){const a=k(),t=v(),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(M())},[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=E(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=b??"";if(!o||!r||!i)return;const x=encodeURIComponent(JSON.stringify(e)),U=`${q}/tableDownload?query=${x}`;fetch(U,{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:V.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:z,cardProfilesData:w})}function ze(){const{isAllowed:a,isLoading:t}=D();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{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,b as a}from"./sentry-BBOZ5oyJ.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};
1
+ import{a as h,b as a}from"./sentry-V1x8fz15.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};