@hiver/connector-agent 2.0.5-emailSelect-beta.14 → 2.0.5-emailSelect-beta.16
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;
|
|
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
|
@@ -41023,7 +41023,16 @@ const Ac = (e) => {
|
|
|
41023
41023
|
menu: (e) => ({
|
|
41024
41024
|
...e,
|
|
41025
41025
|
boxShadow: "0px 3px 15px 0px #00000040",
|
|
41026
|
-
marginTop: "3px"
|
|
41026
|
+
marginTop: "3px",
|
|
41027
|
+
position: "fixed",
|
|
41028
|
+
zIndex: 1e4
|
|
41029
|
+
}),
|
|
41030
|
+
menuPortal: (e) => ({
|
|
41031
|
+
...e,
|
|
41032
|
+
zIndex: 1e4,
|
|
41033
|
+
position: "absolute",
|
|
41034
|
+
top: "auto",
|
|
41035
|
+
left: "auto"
|
|
41027
41036
|
})
|
|
41028
41037
|
}, HX = ({ selectedEmail: e, setSelectedEmail: t }) => {
|
|
41029
41038
|
const n = bt(mW), o = n ? Object.entries(n).map(([r, i]) => ({
|
package/index.umd.js
CHANGED
|
@@ -2685,7 +2685,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2685
2685
|
width: 40px;
|
|
2686
2686
|
height: 40px;
|
|
2687
2687
|
}
|
|
2688
|
-
`,hX=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"})))),BX=({aspectRatio:e="auto",...t})=>{const[n,o]=b.useState(!1);return n?null:y.jsxs(IX,{aspectRatio:e,children:[y.jsx("img",{className:"preview-img",onError:()=>o(!0),...t}),y.jsx(hX,{className:"play-icon"})]})},mX={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:QX}=mX,IQ=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:o,connectorFunctions:r}=b.useContext(to),i=br(o,QN),a=c=>{c.stopPropagation(),n(zN),r==null||r.redirectToAdmin()},A=c=>{c.stopPropagation(),n(YN),window.open(GW,"_blank")},l=()=>{n(CU,{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:JW}),y.jsx(ez,{onClick:l,href:KW,target:"_blank",children:y.jsx(BX,{src:QX+_W,alt:ZW,aspectRatio:"1000/783"})})]}):y.jsxs(qW,{children:[y.jsx($W,{variant:"body1_medium",children:VW}),y.jsx("img",{src:iz,alt:HW})]}),y.jsx(tz,{variant:"body2",children:WW}),e?y.jsx(dm,{endIcon:y.jsx(eo.ArrowForward,{}),onClick:a,...i&&{size:"medium"},children:zW}):y.jsxs(y.Fragment,{children:[y.jsx(dm,{onClick:A,children:YW}),y.jsxs(nz,{direction:"row",children:[y.jsx(oz,{}),y.jsx(rz,{variant:"caption",children:XW})]})]})]})},vX=()=>y.jsxs(nB,{children:[y.jsxs(Ne,{direction:"row",marginBottom:"12px",height:"36px",alignItems:"center",children:[y.jsx(eB,{}),y.jsx(tB,{variant:"h2",children:"Connectors"})]}),y.jsxs(Ne,{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"})]})]}),yX=()=>{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=WN(B),f=b.useMemo(()=>HN(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(ZN,{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(JN,{update_version_id:B}):w&&t(qN,{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($N,{update_version_id:B})};return y.jsxs(fj,{children:[y.jsxs(pj,{children:[y.jsx(gj,{variant:"h3",children:g}),y.jsxs(Et,{children:[r?y.jsx(Rt,{title:ON,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?SN:af,placement:"bottom",children:y.jsx(gi,{onClick:E,children:y.jsx(Cf,{className:r?"":"hiver-up"})})})]})]}),y.jsx(Cj,{className:r?"slideDown":"slideUp",ref:a,height:A,children:y.jsxs(Ej,{children:[u.map(({title:m,items:I,type:v})=>y.jsxs(Qj,{children:[y.jsx(He,{variant:"body2_medium",children:m}),I.map(w=>{const x=v===NN,{deeplink:F,textHtml:O,imageUrl:k}=w,P=()=>y.jsx(oj,{className:x?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:O}});return y.jsx(Ij,{component:"ul",children:y.jsxs(hj,{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(Ne,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:d.map(({text:m,link:I,isAdminPanelLink:v})=>y.jsx(Bj,{variant:v?"contained":"text",children:y.jsx(mj,{variant:"caption",onClick:w=>Q(w,I,v,!0),children:m})},m))})]})})]})},bX="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}},wX=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(vj,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},xX=e=>y.jsxs(Fr.MenuList,{...e,children:[y.jsx(yj,{children:y.jsx(He,{variant:"body2_medium",children:Sj})}),e.children]}),TX=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:o}=hQ(e.data.label);return y.jsx(Fr.Option,{...e,children:y.jsxs(Ne,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[y.jsx(Rt,{title:o?e.data.value:null,placement:"bottom",children:y.jsx(bj,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?y.jsx("img",{src:bX,width:"14px",height:"14px"}):null]})})},FX=e=>y.jsx(Fr.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?y.jsx(eo.ArrowDropUp,{sx:{height:"18px",width:"18px",color:be.palette.gray.gray3}}):y.jsx(eo.ArrowDropDown,{sx:{height:"18px",width:"18px",color:be.palette.gray.gray3}})}),SX={control:e=>({...e,border:"none",boxShadow:"none",height:"20px","&:hover":{border:"none"},"& > :first-child":{display:"flex !important",alignItems:"center",flexGrow:1}}),option:(e,t)=>({...e,backgroundColor:be.palette.gray.white,color:be.palette.gray.black,"&:hover":{backgroundColor:t.isFocused?be.palette.gray.gray7:be.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",overflowX:"hidden",borderRadius:"4px"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"})},OX=({selectedEmail:e,setSelectedEmail:t})=>{const n=wt(uW),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:xX,Option:TX,SingleValue:wX,DropdownIndicator:FX},styles:SX,isSearchable:!1,menuPortalTarget:document.body})},kX=j(Yo)`
|
|
2688
|
+
`,hX=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"})))),BX=({aspectRatio:e="auto",...t})=>{const[n,o]=b.useState(!1);return n?null:y.jsxs(IX,{aspectRatio:e,children:[y.jsx("img",{className:"preview-img",onError:()=>o(!0),...t}),y.jsx(hX,{className:"play-icon"})]})},mX={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:QX}=mX,IQ=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:o,connectorFunctions:r}=b.useContext(to),i=br(o,QN),a=c=>{c.stopPropagation(),n(zN),r==null||r.redirectToAdmin()},A=c=>{c.stopPropagation(),n(YN),window.open(GW,"_blank")},l=()=>{n(CU,{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:JW}),y.jsx(ez,{onClick:l,href:KW,target:"_blank",children:y.jsx(BX,{src:QX+_W,alt:ZW,aspectRatio:"1000/783"})})]}):y.jsxs(qW,{children:[y.jsx($W,{variant:"body1_medium",children:VW}),y.jsx("img",{src:iz,alt:HW})]}),y.jsx(tz,{variant:"body2",children:WW}),e?y.jsx(dm,{endIcon:y.jsx(eo.ArrowForward,{}),onClick:a,...i&&{size:"medium"},children:zW}):y.jsxs(y.Fragment,{children:[y.jsx(dm,{onClick:A,children:YW}),y.jsxs(nz,{direction:"row",children:[y.jsx(oz,{}),y.jsx(rz,{variant:"caption",children:XW})]})]})]})},vX=()=>y.jsxs(nB,{children:[y.jsxs(Ne,{direction:"row",marginBottom:"12px",height:"36px",alignItems:"center",children:[y.jsx(eB,{}),y.jsx(tB,{variant:"h2",children:"Connectors"})]}),y.jsxs(Ne,{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"})]})]}),yX=()=>{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=WN(B),f=b.useMemo(()=>HN(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(ZN,{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(JN,{update_version_id:B}):w&&t(qN,{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($N,{update_version_id:B})};return y.jsxs(fj,{children:[y.jsxs(pj,{children:[y.jsx(gj,{variant:"h3",children:g}),y.jsxs(Et,{children:[r?y.jsx(Rt,{title:ON,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?SN:af,placement:"bottom",children:y.jsx(gi,{onClick:E,children:y.jsx(Cf,{className:r?"":"hiver-up"})})})]})]}),y.jsx(Cj,{className:r?"slideDown":"slideUp",ref:a,height:A,children:y.jsxs(Ej,{children:[u.map(({title:m,items:I,type:v})=>y.jsxs(Qj,{children:[y.jsx(He,{variant:"body2_medium",children:m}),I.map(w=>{const x=v===NN,{deeplink:F,textHtml:O,imageUrl:k}=w,P=()=>y.jsx(oj,{className:x?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:O}});return y.jsx(Ij,{component:"ul",children:y.jsxs(hj,{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(Ne,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:d.map(({text:m,link:I,isAdminPanelLink:v})=>y.jsx(Bj,{variant:v?"contained":"text",children:y.jsx(mj,{variant:"caption",onClick:w=>Q(w,I,v,!0),children:m})},m))})]})})]})},bX="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}},wX=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(vj,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},xX=e=>y.jsxs(Fr.MenuList,{...e,children:[y.jsx(yj,{children:y.jsx(He,{variant:"body2_medium",children:Sj})}),e.children]}),TX=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:o}=hQ(e.data.label);return y.jsx(Fr.Option,{...e,children:y.jsxs(Ne,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[y.jsx(Rt,{title:o?e.data.value:null,placement:"bottom",children:y.jsx(bj,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?y.jsx("img",{src:bX,width:"14px",height:"14px"}):null]})})},FX=e=>y.jsx(Fr.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?y.jsx(eo.ArrowDropUp,{sx:{height:"18px",width:"18px",color:be.palette.gray.gray3}}):y.jsx(eo.ArrowDropDown,{sx:{height:"18px",width:"18px",color:be.palette.gray.gray3}})}),SX={control:e=>({...e,border:"none",boxShadow:"none",height:"20px","&:hover":{border:"none"},"& > :first-child":{display:"flex !important",alignItems:"center",flexGrow:1}}),option:(e,t)=>({...e,backgroundColor:be.palette.gray.white,color:be.palette.gray.black,"&:hover":{backgroundColor:t.isFocused?be.palette.gray.gray7:be.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",overflowX:"hidden",borderRadius:"4px"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px",position:"fixed",zIndex:1e4}),menuPortal:e=>({...e,zIndex:1e4,position:"absolute",top:"auto",left:"auto"})},OX=({selectedEmail:e,setSelectedEmail:t})=>{const n=wt(uW),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:xX,Option:TX,SingleValue:wX,DropdownIndicator:FX},styles:SX,isSearchable:!1,menuPortalTarget:document.body})},kX=j(Yo)`
|
|
2689
2689
|
width: stretch;
|
|
2690
2690
|
height: 100%;
|
|
2691
2691
|
position: absolute;
|