@hiver/connector-agent 2.0.7-emailSelectQa-beta.1 → 2.0.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":"email-selection.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/email-selection.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AA8GD,eAAO,MAAM,cAAc,wCAAyC,MAAM,4CAuCzE,CAAC"}
1
+ {"version":3,"file":"email-selection.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/email-selection.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AA8GD,eAAO,MAAM,cAAc,wCAAyC,MAAM,4CAsCzE,CAAC"}
package/index.es.js CHANGED
@@ -41085,7 +41085,6 @@ const Ac = (e) => {
41085
41085
  },
41086
41086
  styles: YX,
41087
41087
  isSearchable: !1,
41088
- menuIsOpen: !0,
41089
41088
  menuPortalTarget: document.body
41090
41089
  }
41091
41090
  );
package/index.umd.js CHANGED
@@ -2703,7 +2703,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2703
2703
  width: 40px;
2704
2704
  height: 40px;
2705
2705
  }
2706
- `,vX=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),yX=({aspectRatio:e="auto",...t})=>{const[n,o]=b.useState(!1);return n?null:y.jsxs(QX,{aspectRatio:e,children:[y.jsx("img",{className:"preview-img",onError:()=>o(!0),...t}),y.jsx(vX,{className:"play-icon"})]})},bX={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:wX}=bX,IQ=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:o,connectorFunctions:r}=b.useContext(to),i=ir(o,yN),a=c=>{c.stopPropagation(),n(XN),r==null||r.redirectToAdmin()},A=c=>{c.stopPropagation(),n(KN),window.open(ZW,"_blank")},l=()=>{n(hU,{source:"main_tab"})};return y.jsxs("div",{"data-testid":"noConnectors",children:[i?y.jsxs(y.Fragment,{children:[t?null:y.jsx(He,{variant:"h2",children:tz}),y.jsx(rz,{onClick:l,href:qW,target:"_blank",children:y.jsx(yX,{src:wX+$W,alt:ez,aspectRatio:"1000/783"})})]}):y.jsxs(nz,{children:[y.jsx(oz,{variant:"body1_medium",children:YW}),y.jsx("img",{src:lz,alt:GW})]}),y.jsx(iz,{variant:"body2",children:XW}),e?y.jsx(dm,{endIcon:y.jsx(eo.ArrowForward,{}),onClick:a,...i&&{size:"medium"},children:KW}):y.jsxs(y.Fragment,{children:[y.jsx(dm,{onClick:A,children:_W}),y.jsxs(sz,{direction:"row",children:[y.jsx(az,{}),y.jsx(Az,{variant:"caption",children:JW})]})]})]})},xX=()=>y.jsxs(nB,{children:[y.jsxs(Re,{direction:"row",marginBottom:"12px",height:"36px",alignItems:"center",children:[y.jsx(eB,{}),y.jsx(tB,{variant:"h2",children:"Connectors"})]}),y.jsxs(Re,{gap:"12px",children:[y.jsx(di,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),y.jsx(di,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),y.jsx(di,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}),TX=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:o}=b.useContext(to),[r,i]=b.useState(!1),a=b.useRef(null),[A,l]=b.useState(0),{templateUpdates:c}=e||{},{sections:u=[],actionButtons:p=[],title:g}=c||{},{version:B=""}=c||{},C=GN(B),f=b.useMemo(()=>YN(B),[B]),d=b.useMemo(()=>(p==null?void 0:p.filter(({isAdminPanelLink:m})=>!(!n&&m)))??[],[p,n]);if(b.useEffect(()=>{!f&&c&&cf(B,!0)},[f,B,c]),b.useLayoutEffect(()=>{var m;(m=a.current)!=null&&m.scrollHeight&&l(a.current.scrollHeight)},[a]),b.useEffect(()=>{c&&!C&&t($N,{update_version_id:B})},[]),!c||C)return null;const E=m=>{var I;m.stopPropagation(),i(v=>!v),(I=a.current)!=null&&I.scrollHeight&&l(a.current.scrollHeight),cf(B,!1,!0)},Q=(m,I="",v=!1,w=!1)=>{var x;if(m.stopPropagation(),v&&w?t(eU,{update_version_id:B}):w&&t(tU,{update_version_id:B}),!v&&I){(x=window.open(I,"_blank"))==null||x.focus();return}h(m,!1),o==null||o.redirectToAdmin()},h=(m,I=!0)=>{m.stopPropagation(),cf(B,!1),i(!1),I&&t(nU,{update_version_id:B})};return y.jsxs(Ej,{children:[y.jsxs(Ij,{children:[y.jsx(Cj,{variant:"h3",children:g}),y.jsxs(pt,{children:[r?y.jsx(Rt,{title:DN,placement:"bottom",children:y.jsx(nn,{onClick:h,children:y.jsx(eo.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,y.jsx(Rt,{title:r?MN:af,placement:"bottom",children:y.jsx(gi,{onClick:E,children:y.jsx(Cf,{className:r?"":"hiver-up"})})})]})]}),y.jsx(hj,{className:r?"slideDown":"slideUp",ref:a,height:A,children:y.jsxs(Bj,{children:[u.map(({title:m,items:I,type:v})=>y.jsxs(bj,{children:[y.jsx(He,{variant:"body2_medium",children:m}),I.map(w=>{const x=v===VN,{deeplink:F,textHtml:O,imageUrl:k}=w,P=()=>y.jsx(sj,{className:x?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:O}});return y.jsx(mj,{component:"ul",children:y.jsxs(Qj,{component:x?"li":"div",marginLeft:k?"0":"14px",children:[k?y.jsx("img",{src:k}):null,F?y.jsx(iB,{target:"_blank",underline:"none",onClick:D=>Q(D,F),fontSize:"13px",children:P()}):P()]})},O)})]},m)),y.jsx(Re,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:d.map(({text:m,link:I,isAdminPanelLink:v})=>y.jsx(vj,{variant:v?"contained":"text",children:y.jsx(yj,{variant:"caption",onClick:w=>Q(w,I,v,!0),children:m})},m))})]})})]})},FX="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",hQ=e=>{const t=b.useRef(null),[n,o]=b.useState(!1);return b.useEffect(()=>{t.current&&o(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},SX=e=>{const{textRef:t,isOverflow:n}=hQ(e.data.label);return y.jsx(Rt,{title:n?e.data.value:null,placement:"bottom",children:y.jsx(xj,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},OX=e=>y.jsxs(Fr.MenuList,{...e,children:[y.jsx(Tj,{children:y.jsx(He,{variant:"body2_medium",children:Dj})}),e.children]}),kX=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:o}=hQ(e.data.label);return y.jsx(Fr.Option,{...e,children:y.jsxs(Re,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[y.jsx(Rt,{title:o?e.data.value:null,placement:"bottom",children:y.jsx(Fj,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?y.jsx("img",{src:FX,width:"14px",height:"14px"}):null]})})},MX=e=>y.jsx(Fr.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?y.jsx(eo.ArrowDropUp,{sx:{height:"18px",width:"18px",color:ye.palette.gray.gray3}}):y.jsx(eo.ArrowDropDown,{sx:{height:"18px",width:"18px",color:ye.palette.gray.gray3}})}),DX={control:e=>({...e,border:"none",boxShadow:"none","&:hover":{border:"none",cursor:"pointer",backgroundColor:ye.palette.gray.gray7},"& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:ye.palette.gray.white,color:ye.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?ye.palette.gray.gray7:ye.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"})},PX=({selectedEmail:e,setSelectedEmail:t})=>{const n=wt(pW),o=n?Object.entries(n).map(([r,i])=>({value:r,label:`${i}: ${r}`})):e?[{value:e,label:e}]:[];return b.useEffect(()=>{if(!e&&n&&Object.keys(n).length>0){const r=Object.keys(n)[0];r&&t(r)}},[n,t,e]),y.jsx(gQ,{options:o,value:e?{value:e,label:e}:null,placeholder:e||"Select an email",name:"email-selection",type:"select",onChange:r=>t(String((r==null?void 0:r.value)||"")),components:{MenuList:OX,Option:kX,SingleValue:SX,DropdownIndicator:MX},styles:DX,isSearchable:!1,menuIsOpen:!0,menuPortalTarget:document.body})},RX=V(Yo)`
2706
+ `,vX=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),yX=({aspectRatio:e="auto",...t})=>{const[n,o]=b.useState(!1);return n?null:y.jsxs(QX,{aspectRatio:e,children:[y.jsx("img",{className:"preview-img",onError:()=>o(!0),...t}),y.jsx(vX,{className:"play-icon"})]})},bX={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:wX}=bX,IQ=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:o,connectorFunctions:r}=b.useContext(to),i=ir(o,yN),a=c=>{c.stopPropagation(),n(XN),r==null||r.redirectToAdmin()},A=c=>{c.stopPropagation(),n(KN),window.open(ZW,"_blank")},l=()=>{n(hU,{source:"main_tab"})};return y.jsxs("div",{"data-testid":"noConnectors",children:[i?y.jsxs(y.Fragment,{children:[t?null:y.jsx(He,{variant:"h2",children:tz}),y.jsx(rz,{onClick:l,href:qW,target:"_blank",children:y.jsx(yX,{src:wX+$W,alt:ez,aspectRatio:"1000/783"})})]}):y.jsxs(nz,{children:[y.jsx(oz,{variant:"body1_medium",children:YW}),y.jsx("img",{src:lz,alt:GW})]}),y.jsx(iz,{variant:"body2",children:XW}),e?y.jsx(dm,{endIcon:y.jsx(eo.ArrowForward,{}),onClick:a,...i&&{size:"medium"},children:KW}):y.jsxs(y.Fragment,{children:[y.jsx(dm,{onClick:A,children:_W}),y.jsxs(sz,{direction:"row",children:[y.jsx(az,{}),y.jsx(Az,{variant:"caption",children:JW})]})]})]})},xX=()=>y.jsxs(nB,{children:[y.jsxs(Re,{direction:"row",marginBottom:"12px",height:"36px",alignItems:"center",children:[y.jsx(eB,{}),y.jsx(tB,{variant:"h2",children:"Connectors"})]}),y.jsxs(Re,{gap:"12px",children:[y.jsx(di,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),y.jsx(di,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),y.jsx(di,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}),TX=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:o}=b.useContext(to),[r,i]=b.useState(!1),a=b.useRef(null),[A,l]=b.useState(0),{templateUpdates:c}=e||{},{sections:u=[],actionButtons:p=[],title:g}=c||{},{version:B=""}=c||{},C=GN(B),f=b.useMemo(()=>YN(B),[B]),d=b.useMemo(()=>(p==null?void 0:p.filter(({isAdminPanelLink:m})=>!(!n&&m)))??[],[p,n]);if(b.useEffect(()=>{!f&&c&&cf(B,!0)},[f,B,c]),b.useLayoutEffect(()=>{var m;(m=a.current)!=null&&m.scrollHeight&&l(a.current.scrollHeight)},[a]),b.useEffect(()=>{c&&!C&&t($N,{update_version_id:B})},[]),!c||C)return null;const E=m=>{var I;m.stopPropagation(),i(v=>!v),(I=a.current)!=null&&I.scrollHeight&&l(a.current.scrollHeight),cf(B,!1,!0)},Q=(m,I="",v=!1,w=!1)=>{var x;if(m.stopPropagation(),v&&w?t(eU,{update_version_id:B}):w&&t(tU,{update_version_id:B}),!v&&I){(x=window.open(I,"_blank"))==null||x.focus();return}h(m,!1),o==null||o.redirectToAdmin()},h=(m,I=!0)=>{m.stopPropagation(),cf(B,!1),i(!1),I&&t(nU,{update_version_id:B})};return y.jsxs(Ej,{children:[y.jsxs(Ij,{children:[y.jsx(Cj,{variant:"h3",children:g}),y.jsxs(pt,{children:[r?y.jsx(Rt,{title:DN,placement:"bottom",children:y.jsx(nn,{onClick:h,children:y.jsx(eo.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,y.jsx(Rt,{title:r?MN:af,placement:"bottom",children:y.jsx(gi,{onClick:E,children:y.jsx(Cf,{className:r?"":"hiver-up"})})})]})]}),y.jsx(hj,{className:r?"slideDown":"slideUp",ref:a,height:A,children:y.jsxs(Bj,{children:[u.map(({title:m,items:I,type:v})=>y.jsxs(bj,{children:[y.jsx(He,{variant:"body2_medium",children:m}),I.map(w=>{const x=v===VN,{deeplink:F,textHtml:O,imageUrl:k}=w,P=()=>y.jsx(sj,{className:x?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:O}});return y.jsx(mj,{component:"ul",children:y.jsxs(Qj,{component:x?"li":"div",marginLeft:k?"0":"14px",children:[k?y.jsx("img",{src:k}):null,F?y.jsx(iB,{target:"_blank",underline:"none",onClick:D=>Q(D,F),fontSize:"13px",children:P()}):P()]})},O)})]},m)),y.jsx(Re,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:d.map(({text:m,link:I,isAdminPanelLink:v})=>y.jsx(vj,{variant:v?"contained":"text",children:y.jsx(yj,{variant:"caption",onClick:w=>Q(w,I,v,!0),children:m})},m))})]})})]})},FX="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",hQ=e=>{const t=b.useRef(null),[n,o]=b.useState(!1);return b.useEffect(()=>{t.current&&o(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},SX=e=>{const{textRef:t,isOverflow:n}=hQ(e.data.label);return y.jsx(Rt,{title:n?e.data.value:null,placement:"bottom",children:y.jsx(xj,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},OX=e=>y.jsxs(Fr.MenuList,{...e,children:[y.jsx(Tj,{children:y.jsx(He,{variant:"body2_medium",children:Dj})}),e.children]}),kX=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:o}=hQ(e.data.label);return y.jsx(Fr.Option,{...e,children:y.jsxs(Re,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[y.jsx(Rt,{title:o?e.data.value:null,placement:"bottom",children:y.jsx(Fj,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?y.jsx("img",{src:FX,width:"14px",height:"14px"}):null]})})},MX=e=>y.jsx(Fr.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?y.jsx(eo.ArrowDropUp,{sx:{height:"18px",width:"18px",color:ye.palette.gray.gray3}}):y.jsx(eo.ArrowDropDown,{sx:{height:"18px",width:"18px",color:ye.palette.gray.gray3}})}),DX={control:e=>({...e,border:"none",boxShadow:"none","&:hover":{border:"none",cursor:"pointer",backgroundColor:ye.palette.gray.gray7},"& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:ye.palette.gray.white,color:ye.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?ye.palette.gray.gray7:ye.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"})},PX=({selectedEmail:e,setSelectedEmail:t})=>{const n=wt(pW),o=n?Object.entries(n).map(([r,i])=>({value:r,label:`${i}: ${r}`})):e?[{value:e,label:e}]:[];return b.useEffect(()=>{if(!e&&n&&Object.keys(n).length>0){const r=Object.keys(n)[0];r&&t(r)}},[n,t,e]),y.jsx(gQ,{options:o,value:e?{value:e,label:e}:null,placeholder:e||"Select an email",name:"email-selection",type:"select",onChange:r=>t(String((r==null?void 0:r.value)||"")),components:{MenuList:OX,Option:kX,SingleValue:SX,DropdownIndicator:MX},styles:DX,isSearchable:!1,menuPortalTarget:document.body})},RX=V(Yo)`
2707
2707
  width: stretch;
2708
2708
  height: 100%;
2709
2709
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "2.0.7-emailSelectQa-beta.1",
3
+ "version": "2.0.7",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",