@hiver/connector-agent 4.20.0-rightPanel-beta.6 → 4.20.0-rightPanel-beta.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/no-connectors/index.tsx"],"names":[],"mappings":"AAwCA,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAID,QAAA,MAAM,YAAY,6BAA6C,aAAa,4CAoE3E,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/no-connectors/index.tsx"],"names":[],"mappings":"AAwCA,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAID,QAAA,MAAM,YAAY,6BAA6C,aAAa,4CA0E3E,CAAC;AAEF,eAAe,YAAY,CAAC"}
package/index.es.js CHANGED
@@ -21475,15 +21475,15 @@ const Fk = "Bring your favourite tools into Hiver", Ek = "Plugin image", mk = "I
21475
21475
  `, Qk = w(K)`
21476
21476
  color: ${H.palette.gray.gray3};
21477
21477
  `, Hk = "https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg", Uk = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_HIVER_CDN_URL: "https://cdn.hiverhq.com/", VITE_MY_ENV_VAR: "myVariable From Agent" }, { VITE_HIVER_CDN_URL: Vk } = Uk, Fc = ({ isAdmin: e = !0, hideHeading: t = !1 }) => {
21478
- const { sendTrackingEvent: u, availableFeatures: n, connectorFunctions: r, connectorId: o } = Ve(ct), a = Bt(n, Ig), i = Bt(n, ua), s = (h) => {
21479
- h.stopPropagation(), u(Lh), o ? r == null || r.redirectToAdmin(o, { isEdit: !0, tabIndex: 2 }) : r == null || r.redirectToAdmin();
21480
- }, D = (h) => {
21481
- h.stopPropagation(), u(_h), window.open(Bk, "_blank");
21478
+ const { sendTrackingEvent: u, availableFeatures: n, connectorFunctions: r, connectorId: o } = Ve(ct), a = Bt(n, Ig), i = Bt(n, ua), s = (g) => {
21479
+ g.stopPropagation(), u(Lh), o ? r == null || r.redirectToAdmin(o, { isEdit: !0, tabIndex: 2 }) : r == null || r.redirectToAdmin();
21480
+ }, D = (g) => {
21481
+ g.stopPropagation(), u(_h), window.open(Bk, "_blank");
21482
21482
  }, c = () => {
21483
21483
  u(ug, {
21484
21484
  source: "main_tab"
21485
21485
  });
21486
- }, l = i ? kk : Sk;
21486
+ }, l = i ? kk : Sk, h = e && !o;
21487
21487
  return /* @__PURE__ */ f.jsxs(_k, { "data-testid": "noConnectors", children: [
21488
21488
  a ? /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
21489
21489
  t ? null : /* @__PURE__ */ f.jsx(K, { variant: "h2", children: i ? gs : Lk }),
@@ -21505,6 +21505,7 @@ const Fk = "Bring your favourite tools into Hiver", Ek = "Plugin image", mk = "I
21505
21505
  {
21506
21506
  endIcon: /* @__PURE__ */ f.jsx(it.ArrowForward, {}),
21507
21507
  onClick: s,
21508
+ ...h && { "data-guider": "enable-apps" },
21508
21509
  ...a && { size: "medium" },
21509
21510
  children: o ? yk : i ? xk : bk
21510
21511
  }
package/index.umd.js CHANGED
@@ -2620,7 +2620,7 @@ Do you want to continue?`,_v="Select an object to create",Ov="Select an object t
2620
2620
  color: ${s.theme.palette.gray.gray3};
2621
2621
  `,MI=s.styled(s.Typography)`
2622
2622
  color: ${s.theme.palette.gray.gray3};
2623
- `,PI="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",RI={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:QI}=RI,eA=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:u,availableFeatures:n,connectorFunctions:r,connectorId:o}=h.useContext(Ue),f=ct(n,dg),i=ct(n,k0),D=F=>{F.stopPropagation(),u(gC),o?r==null||r.redirectToAdmin(o,{isEdit:!0,tabIndex:2}):r==null||r.redirectToAdmin()},c=F=>{F.stopPropagation(),u(FC),window.open(xI,"_blank")},l=()=>{u(HC,{source:"main_tab"})},d=i?vI:wI;return a.jsxs(kI,{"data-testid":"noConnectors",children:[f?a.jsxs(a.Fragment,{children:[t?null:a.jsx(s.Typography,{variant:"h2",children:i?Ua:II}),a.jsx(_I,{onClick:l,href:BI,target:"_blank",children:a.jsx(BB,{src:QI+d,alt:SI,aspectRatio:"1000/783"})})]}):a.jsxs(TI,{children:[a.jsx(LI,{variant:"body1_medium",children:CI}),a.jsx("img",{src:PI,alt:gI})]}),a.jsx(OI,{variant:"body2",children:FI}),e?a.jsx($d,{endIcon:a.jsx(s.icons.ArrowForward,{}),onClick:D,...f&&{size:"medium"},children:o?mI:i?EI:hI}):a.jsxs(a.Fragment,{children:[a.jsx($d,{onClick:c,children:bI}),a.jsxs(NI,{direction:"row",children:[a.jsx(jI,{}),a.jsx(MI,{variant:"caption",children:yI})]})]})]})},HI=()=>{const{availableFeatures:e}=h.useContext(Ue),t=ct(e,k0),{connectorName:u,connectorId:n,isReady:r}=O3();return r?a.jsxs(M3,{children:[a.jsx(s.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:u&&n?a.jsx(T0,{variant:"body_sm_medium",children:u}):a.jsxs(a.Fragment,{children:[t?a.jsx(_3,{width:"20px",height:"20px"}):a.jsx(j3,{}),a.jsx(T0,{variant:"body_sm_medium",children:t?Ua:E3})]})}),a.jsxs(s.Stack,{gap:"12px",children:[a.jsx(ou,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(ou,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(ou,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}):null},VI=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:u,connectorFunctions:n}=h.useContext(Ue),[r,o]=h.useState(!1),f=h.useRef(null),[i,D]=h.useState(0),{templateUpdates:c}=e||{},{sections:l=[],actionButtons:d=[],title:F}=c||{},{version:E=""}=c||{},C=Qg(E),p=h.useMemo(()=>Rg(E),[E]),A=h.useMemo(()=>(d==null?void 0:d.filter(({isAdminPanelLink:x})=>!(!u&&x)))??[],[d,u]);if(h.useEffect(()=>{!p&&c&&ts(E,!0)},[p,E,c]),h.useLayoutEffect(()=>{var x;(x=f.current)!=null&&x.scrollHeight&&D(f.current.scrollHeight)},[f]),h.useEffect(()=>{c&&!C&&t(xC,{update_version_id:E})},[]),!c||C)return null;const g=x=>{var y;x.stopPropagation(),o(B=>!B),(y=f.current)!=null&&y.scrollHeight&&D(f.current.scrollHeight),ts(E,!1,!0)},m=(x,y="",B=!1,v=!1)=>{var S;if(x.stopPropagation(),B&&v?t(yC,{update_version_id:E}):v&&t(BC,{update_version_id:E}),!B&&y){(S=window.open(y,"_blank"))==null||S.focus();return}b(x,!1),n==null||n.redirectToAdmin()},b=(x,y=!0)=>{x.stopPropagation(),ts(E,!1),o(!1),y&&t(wC,{update_version_id:E})};return a.jsxs(HF,{children:[a.jsxs(VF,{children:[a.jsx(QF,{variant:"h3",children:F}),a.jsxs(s.Box,{children:[r?a.jsx(s.Tooltip,{title:wg,placement:"bottom",children:a.jsx(s.IconButton,{onClick:b,children:a.jsx(s.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,a.jsx(s.Tooltip,{title:r?Bg:qa,placement:"bottom",children:a.jsx(gr,{onClick:g,children:a.jsx(fs,{className:r?"":"hiver-up"})})})]})]}),a.jsx(GF,{className:r?"slideDown":"slideUp",ref:f,height:i,children:a.jsxs(WF,{children:[l.map(({title:x,items:y,type:B})=>a.jsxs(YF,{children:[a.jsx(s.Typography,{variant:"body2_medium",children:x}),y.map(v=>{const S=B===Lg,{deeplink:k,textHtml:O,imageUrl:L}=v,_=()=>a.jsx(SF,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:O}});return a.jsx(ZF,{component:"ul",children:a.jsxs(XF,{component:S?"li":"div",marginLeft:L?"0":"14px",children:[L?a.jsx("img",{src:L}):null,k?a.jsx(Q3,{target:"_blank",underline:"none",onClick:j=>m(j,k),fontSize:"13px",children:_()}):_()]})},O)})]},x)),a.jsx(s.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:A.map(({text:x,link:y,isAdminPanelLink:B})=>a.jsx(zF,{variant:B?"contained":"text",children:a.jsx(JF,{variant:"caption",onClick:v=>m(v,y,B,!0),children:x})},x))})]})})]})},GI=({selectedEmail:e,conversationId:t})=>Fe({url:ev.replace(":conversationId",""+t),method:ye.PATCH,data:{selectedEmail:e}}),WI="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",tA=e=>{const t=h.useRef(null),[u,n]=h.useState(!1);return h.useEffect(()=>{t.current&&n(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:u}},ZI=e=>{const{textRef:t,isOverflow:u}=tA(e.data.label);return a.jsx(s.Tooltip,{title:u?e.data.value:null,placement:"bottom",children:a.jsx(qF,{ref:t,variant:"body_sm_regular",paddingTop:u?"5px":"0px",children:e.data.label})})},XI=e=>a.jsxs(mu.MenuList,{...e,children:[a.jsx(UF,{children:a.jsx(s.Typography,{variant:"body_sm_medium",children:x9})}),e.children]}),zI=e=>{const{isSelected:t}=e,{textRef:u,isOverflow:n}=tA(e.data.label);return a.jsx(mu.Option,{...e,children:a.jsxs(s.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[a.jsx(s.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:a.jsx(KF,{ref:u,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?a.jsx("img",{src:WI,width:"14px",height:"14px"}):null]})})},JI=e=>a.jsx(mu.ValueContainer,{...e,children:a.jsxs(s.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[a.jsx(s.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:s.theme.palette.gray.gray3,flexShrink:0}}),a.jsx(s.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),YI=e=>a.jsx(mu.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?a.jsx(s.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:s.theme.palette.gray.gray3}}):a.jsx(s.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:s.theme.palette.gray.gray3}})}),qI={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?s.theme.palette.gray.gray3:s.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${s.theme.palette.gray.gray3}`:"none",backgroundColor:s.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:s.theme.palette.gray.white,color:s.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?s.theme.palette.gray.gray7:s.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},UI=({selectedEmail:e,emailHeaders:t,root:u,isLoading:n,setSelectedEmail:r})=>{const{conversationId:o}=h.useContext(Ue),f=t?Object.entries(t).map(([D])=>({value:D,label:D})):e?[{value:e,label:e}]:[];h.useEffect(()=>{if(!e&&!n&&t&&Object.keys(t).length>0){const D=Object.keys(t)[0];D&&r(D)}},[t,r,e,n]);const i=D=>{const c=String((D==null?void 0:D.value)||"");c&&o&&GI({selectedEmail:c,conversationId:o}),r(c)};return a.jsx(s.Tooltip,{title:"Selected email",placement:"top",children:a.jsx("div",{style:{marginTop:"12px"},children:a.jsx(No,{options:f,value:e&&!n?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...No.getDefaultComponents(),MenuList:XI,Option:zI,SingleValue:ZI,DropdownIndicator:YI,ValueContainer:JI},root:u,styles:qI,isSearchable:!1,menuPortalTarget:document.body,isLoading:n})})})};s.styled(s.Paper)`
2623
+ `,PI="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",RI={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:QI}=RI,eA=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:u,availableFeatures:n,connectorFunctions:r,connectorId:o}=h.useContext(Ue),f=ct(n,dg),i=ct(n,k0),D=E=>{E.stopPropagation(),u(gC),o?r==null||r.redirectToAdmin(o,{isEdit:!0,tabIndex:2}):r==null||r.redirectToAdmin()},c=E=>{E.stopPropagation(),u(FC),window.open(xI,"_blank")},l=()=>{u(HC,{source:"main_tab"})},d=i?vI:wI,F=e&&!o;return a.jsxs(kI,{"data-testid":"noConnectors",children:[f?a.jsxs(a.Fragment,{children:[t?null:a.jsx(s.Typography,{variant:"h2",children:i?Ua:II}),a.jsx(_I,{onClick:l,href:BI,target:"_blank",children:a.jsx(BB,{src:QI+d,alt:SI,aspectRatio:"1000/783"})})]}):a.jsxs(TI,{children:[a.jsx(LI,{variant:"body1_medium",children:CI}),a.jsx("img",{src:PI,alt:gI})]}),a.jsx(OI,{variant:"body2",children:FI}),e?a.jsx($d,{endIcon:a.jsx(s.icons.ArrowForward,{}),onClick:D,...F&&{"data-guider":"enable-apps"},...f&&{size:"medium"},children:o?mI:i?EI:hI}):a.jsxs(a.Fragment,{children:[a.jsx($d,{onClick:c,children:bI}),a.jsxs(NI,{direction:"row",children:[a.jsx(jI,{}),a.jsx(MI,{variant:"caption",children:yI})]})]})]})},HI=()=>{const{availableFeatures:e}=h.useContext(Ue),t=ct(e,k0),{connectorName:u,connectorId:n,isReady:r}=O3();return r?a.jsxs(M3,{children:[a.jsx(s.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:u&&n?a.jsx(T0,{variant:"body_sm_medium",children:u}):a.jsxs(a.Fragment,{children:[t?a.jsx(_3,{width:"20px",height:"20px"}):a.jsx(j3,{}),a.jsx(T0,{variant:"body_sm_medium",children:t?Ua:E3})]})}),a.jsxs(s.Stack,{gap:"12px",children:[a.jsx(ou,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(ou,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(ou,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}):null},VI=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:u,connectorFunctions:n}=h.useContext(Ue),[r,o]=h.useState(!1),f=h.useRef(null),[i,D]=h.useState(0),{templateUpdates:c}=e||{},{sections:l=[],actionButtons:d=[],title:F}=c||{},{version:E=""}=c||{},C=Qg(E),p=h.useMemo(()=>Rg(E),[E]),A=h.useMemo(()=>(d==null?void 0:d.filter(({isAdminPanelLink:x})=>!(!u&&x)))??[],[d,u]);if(h.useEffect(()=>{!p&&c&&ts(E,!0)},[p,E,c]),h.useLayoutEffect(()=>{var x;(x=f.current)!=null&&x.scrollHeight&&D(f.current.scrollHeight)},[f]),h.useEffect(()=>{c&&!C&&t(xC,{update_version_id:E})},[]),!c||C)return null;const g=x=>{var y;x.stopPropagation(),o(B=>!B),(y=f.current)!=null&&y.scrollHeight&&D(f.current.scrollHeight),ts(E,!1,!0)},m=(x,y="",B=!1,v=!1)=>{var S;if(x.stopPropagation(),B&&v?t(yC,{update_version_id:E}):v&&t(BC,{update_version_id:E}),!B&&y){(S=window.open(y,"_blank"))==null||S.focus();return}b(x,!1),n==null||n.redirectToAdmin()},b=(x,y=!0)=>{x.stopPropagation(),ts(E,!1),o(!1),y&&t(wC,{update_version_id:E})};return a.jsxs(HF,{children:[a.jsxs(VF,{children:[a.jsx(QF,{variant:"h3",children:F}),a.jsxs(s.Box,{children:[r?a.jsx(s.Tooltip,{title:wg,placement:"bottom",children:a.jsx(s.IconButton,{onClick:b,children:a.jsx(s.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,a.jsx(s.Tooltip,{title:r?Bg:qa,placement:"bottom",children:a.jsx(gr,{onClick:g,children:a.jsx(fs,{className:r?"":"hiver-up"})})})]})]}),a.jsx(GF,{className:r?"slideDown":"slideUp",ref:f,height:i,children:a.jsxs(WF,{children:[l.map(({title:x,items:y,type:B})=>a.jsxs(YF,{children:[a.jsx(s.Typography,{variant:"body2_medium",children:x}),y.map(v=>{const S=B===Lg,{deeplink:k,textHtml:O,imageUrl:L}=v,_=()=>a.jsx(SF,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:O}});return a.jsx(ZF,{component:"ul",children:a.jsxs(XF,{component:S?"li":"div",marginLeft:L?"0":"14px",children:[L?a.jsx("img",{src:L}):null,k?a.jsx(Q3,{target:"_blank",underline:"none",onClick:j=>m(j,k),fontSize:"13px",children:_()}):_()]})},O)})]},x)),a.jsx(s.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:A.map(({text:x,link:y,isAdminPanelLink:B})=>a.jsx(zF,{variant:B?"contained":"text",children:a.jsx(JF,{variant:"caption",onClick:v=>m(v,y,B,!0),children:x})},x))})]})})]})},GI=({selectedEmail:e,conversationId:t})=>Fe({url:ev.replace(":conversationId",""+t),method:ye.PATCH,data:{selectedEmail:e}}),WI="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",tA=e=>{const t=h.useRef(null),[u,n]=h.useState(!1);return h.useEffect(()=>{t.current&&n(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:u}},ZI=e=>{const{textRef:t,isOverflow:u}=tA(e.data.label);return a.jsx(s.Tooltip,{title:u?e.data.value:null,placement:"bottom",children:a.jsx(qF,{ref:t,variant:"body_sm_regular",paddingTop:u?"5px":"0px",children:e.data.label})})},XI=e=>a.jsxs(mu.MenuList,{...e,children:[a.jsx(UF,{children:a.jsx(s.Typography,{variant:"body_sm_medium",children:x9})}),e.children]}),zI=e=>{const{isSelected:t}=e,{textRef:u,isOverflow:n}=tA(e.data.label);return a.jsx(mu.Option,{...e,children:a.jsxs(s.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[a.jsx(s.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:a.jsx(KF,{ref:u,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?a.jsx("img",{src:WI,width:"14px",height:"14px"}):null]})})},JI=e=>a.jsx(mu.ValueContainer,{...e,children:a.jsxs(s.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[a.jsx(s.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:s.theme.palette.gray.gray3,flexShrink:0}}),a.jsx(s.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),YI=e=>a.jsx(mu.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?a.jsx(s.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:s.theme.palette.gray.gray3}}):a.jsx(s.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:s.theme.palette.gray.gray3}})}),qI={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?s.theme.palette.gray.gray3:s.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${s.theme.palette.gray.gray3}`:"none",backgroundColor:s.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:s.theme.palette.gray.white,color:s.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?s.theme.palette.gray.gray7:s.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},UI=({selectedEmail:e,emailHeaders:t,root:u,isLoading:n,setSelectedEmail:r})=>{const{conversationId:o}=h.useContext(Ue),f=t?Object.entries(t).map(([D])=>({value:D,label:D})):e?[{value:e,label:e}]:[];h.useEffect(()=>{if(!e&&!n&&t&&Object.keys(t).length>0){const D=Object.keys(t)[0];D&&r(D)}},[t,r,e,n]);const i=D=>{const c=String((D==null?void 0:D.value)||"");c&&o&&GI({selectedEmail:c,conversationId:o}),r(c)};return a.jsx(s.Tooltip,{title:"Selected email",placement:"top",children:a.jsx("div",{style:{marginTop:"12px"},children:a.jsx(No,{options:f,value:e&&!n?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...No.getDefaultComponents(),MenuList:XI,Option:zI,SingleValue:ZI,DropdownIndicator:YI,ValueContainer:JI},root:u,styles:qI,isSearchable:!1,menuPortalTarget:document.body,isLoading:n})})})};s.styled(s.Paper)`
2624
2624
  width: stretch;
2625
2625
  height: 100%;
2626
2626
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.20.0-rightPanel-beta.6",
3
+ "version": "4.20.0-rightPanel-beta.7",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",