@hiver/connector-agent 4.23.0-customerIdMap-beta.1 → 4.23.0-customerIdMap-beta.2

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":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAkB9E,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,UAAU,MAAM;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IAEnB,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;IAElC,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAEpD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGxC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AA8LD,eAAO,MAAM,cAAc,iKAWxB,MAAM,4CA+ER,CAAC"}
1
+ {"version":3,"file":"email-selection.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/email-selection.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAkB9E,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IAGpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,UAAU,MAAM;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IAEnB,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;IAElC,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAEpD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGxC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAgMD,eAAO,MAAM,cAAc,iKAWxB,MAAM,4CA+ER,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-cards/components/card-list/style.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,eAAe,EACf,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,YAAY,CAIxD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,QAAQ,CAAC,aAAa,CAAC,CAMnE,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,eAAe,C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EAAE,aAAa,KAAK,IAAI,CAAC;CACxF;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,0CAA2C,MAAM;iCAsB7B,oBAAoB;;;;;;;;;mCAGnD,oBAAoB,mBAAmB,KAAK,EAAE;sCAqF/C,MAAM;CAQvB,CAAC"}
1
+ {"version":3,"file":"useRelatedRecords.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/hooks/useRelatedRecords.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAE3B,YAAY,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC/B;AAED,UAAU,MAAM;IACd,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC/E,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACxF;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,0CAA2C,MAAM;iCAsB7B,oBAAoB;;;;;;;;;mCAGnD,oBAAoB,mBAAmB,KAAK,EAAE;sCAsF/C,MAAM;CAQvB,CAAC"}
package/index.es.js CHANGED
@@ -7892,6 +7892,7 @@ const qm = w(j)`
7892
7892
  overflow: hidden;
7893
7893
  text-overflow: ellipsis;
7894
7894
  max-width: 100%;
7895
+ min-width: 0;
7895
7896
  height: 100%;
7896
7897
  color: var(--connector-text-secondary);
7897
7898
  `, Ib = w(P)`
@@ -23397,7 +23398,7 @@ const HO = "Bring your favourite tools into Hiver", UO = "Plugin image", WO = "I
23397
23398
  }, [e]), { textRef: t, isOverflow: n };
23398
23399
  }, BN = (e) => {
23399
23400
  const { textRef: t, isOverflow: n } = El(e.data.label);
23400
- return /* @__PURE__ */ a.jsx(Te, { title: n ? e.data.value : null, placement: "bottom", children: /* @__PURE__ */ a.jsx(wb, { ref: t, variant: "body_sm_regular", paddingTop: n ? "5px" : "0px", children: e.data.label }) });
23401
+ return /* @__PURE__ */ a.jsx(Te, { title: n ? e.data.label : null, placement: "bottom", children: /* @__PURE__ */ a.jsx(wb, { ref: t, variant: "body_sm_regular", paddingTop: n ? "5px" : "0px", children: e.data.label }) });
23401
23402
  }, wN = (e) => /* @__PURE__ */ a.jsxs(Hn.MenuList, { ...e, children: [
23402
23403
  /* @__PURE__ */ a.jsx(Ib, { children: /* @__PURE__ */ a.jsx(Sb, { variant: "body_sm_medium", children: t7 }) }),
23403
23404
  e.children
@@ -23410,7 +23411,7 @@ const HO = "Bring your favourite tools into Hiver", UO = "Plugin image", WO = "I
23410
23411
  }, SN = (e) => {
23411
23412
  const { textRef: t, isOverflow: n } = El(e.data.label);
23412
23413
  return /* @__PURE__ */ a.jsx(Hn.Option, { ...e, children: /* @__PURE__ */ a.jsx(Te, { title: n ? e.data.label : null, placement: "bottom", children: /* @__PURE__ */ a.jsx(Tb, { ref: t, variant: "body_sm_regular", children: e.data.label }) }) });
23413
- }, kN = (e) => /* @__PURE__ */ a.jsx(Hn.ValueContainer, { ...e, children: /* @__PURE__ */ a.jsxs(P, { direction: "row", alignItems: "center", gap: "4px", children: [
23414
+ }, kN = (e) => /* @__PURE__ */ a.jsx(Hn.ValueContainer, { ...e, children: /* @__PURE__ */ a.jsxs(P, { direction: "row", alignItems: "center", gap: "4px", sx: { minWidth: 0 }, children: [
23414
23415
  /* @__PURE__ */ a.jsx(
23415
23416
  mt.AccountCircle,
23416
23417
  {
@@ -23749,7 +23750,6 @@ const HO = "Bring your favourite tools into Hiver", UO = "Plugin image", WO = "I
23749
23750
  hiverParam: L,
23750
23751
  value: O,
23751
23752
  label: y.label ?? void 0,
23752
- displayValue: y.displayValue ?? void 0,
23753
23753
  related: { cardIds: I.cards.map((T) => T.id), linked: { cardId: d, externalResourceId: A } }
23754
23754
  }), v(I, ku({ email: i, lookup: { hiverParam: L, value: O } })), f(C, "result");
23755
23755
  }), t(Kf, g, {
package/index.umd.js CHANGED
@@ -590,6 +590,7 @@ React keys must be passed directly to JSX without using spread:
590
590
  overflow: hidden;
591
591
  text-overflow: ellipsis;
592
592
  max-width: 100%;
593
+ min-width: 0;
593
594
  height: 100%;
594
595
  color: var(--connector-text-secondary);
595
596
  `,fE=f.styled(f.Stack)`
@@ -2880,7 +2881,7 @@ Do you want to continue?`,IT="Select an object to create",kT="Select an object t
2880
2881
  color: var(--connector-icon-secondary);
2881
2882
  `,nM=f.styled(f.Typography)`
2882
2883
  color: var(--connector-caption-text);
2883
- `,uM="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",rM={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:oM}=rM,Ap=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:u,connectorFunctions:r,connectorId:o}=g.useContext(ot),s=xt(u,b9),i=xt(u,bs),c=b=>{b.stopPropagation(),n(mF),o?r==null||r.redirectToAdmin(o,{isEdit:!0,tabIndex:2}):r==null||r.redirectToAdmin()},l=b=>{b.stopPropagation(),n(EF),window.open(HO,"_blank")},D=()=>{n(VF,{source:"main_tab"})},d=i?zO:VO,F=e&&!o;return a.jsxs(JO,{"data-testid":"noConnectors",children:[s?a.jsxs(a.Fragment,{children:[t?null:a.jsx(KO,{variant:"h2",children:i?f1:ZO}),a.jsx(UO,{onClick:D,href:GO,target:"_blank",children:a.jsx(WS,{src:oM+d,alt:XO,aspectRatio:"1000/783"})})]}):a.jsxs(YO,{children:[a.jsx(qO,{variant:"body1_medium",children:MO}),a.jsx("img",{src:uM,alt:NO})]}),a.jsx($O,{variant:"body2",children:jO}),e?a.jsx(dp,{endIcon:a.jsx(f.icons.ArrowForward,{}),onClick:c,...F&&{"data-guider":"enable-apps"},...s&&{size:"medium"},children:o?PO:i?QO:_O}):a.jsxs(a.Fragment,{children:[a.jsx(dp,{onClick:l,children:RO}),a.jsxs(eM,{direction:"row",children:[a.jsx(tM,{}),a.jsx(nM,{variant:"caption",children:WO})]})]})]})},aM=()=>{const{availableFeatures:e}=g.useContext(ot),t=xt(e,bs),{connectorName:n,connectorId:u,isReady:r}=B3();return r?a.jsxs(I3,{children:[a.jsx(f.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:n&&u?a.jsx(xs,{variant:"body_sm_medium",children:n}):a.jsxs(a.Fragment,{children:[t?a.jsx(S3,{width:"20px",height:"20px"}):a.jsx(w3,{}),a.jsx(xs,{variant:"body_sm_medium",children:t?f1:D3})]})}),a.jsxs(f.Stack,{gap:"12px",children:[a.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}):null},sM=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:u}=g.useContext(ot),[r,o]=g.useState(!1),s=g.useRef(null),[i,c]=g.useState(0),{templateUpdates:l}=e||{},{sections:D=[],actionButtons:d=[],title:F}=l||{},{version:b=""}=l||{},C=U9(b),p=g.useMemo(()=>q9(b),[b]),A=g.useMemo(()=>(d==null?void 0:d.filter(({isAdminPanelLink:x})=>!(!n&&x)))??[],[d,n]);if(g.useEffect(()=>{!p&&l&&d1(b,!0)},[p,b,l]),g.useLayoutEffect(()=>{var x;(x=s.current)!=null&&x.scrollHeight&&c(s.current.scrollHeight)},[s]),g.useEffect(()=>{l&&!C&&t(vF,{update_version_id:b})},[]),!l||C)return null;const h=x=>{var B;x.stopPropagation(),o(S=>!S),(B=s.current)!=null&&B.scrollHeight&&c(s.current.scrollHeight),d1(b,!1,!0)},E=(x,B="",S=!1,v=!1)=>{var w;if(x.stopPropagation(),S&&v?t(wF,{update_version_id:b}):v&&t(SF,{update_version_id:b}),!S&&B){(w=window.open(B,"_blank"))==null||w.focus();return}m(x,!1),u==null||u.redirectToAdmin()},m=(x,B=!0)=>{x.stopPropagation(),d1(b,!1),o(!1),B&&t(IF,{update_version_id:b})};return a.jsxs(Km,{children:[a.jsxs($m,{children:[a.jsx(Um,{variant:"h3",children:F}),a.jsxs(f.Box,{children:[r?a.jsx(f.Tooltip,{title:_9,placement:"bottom",children:a.jsx(f.IconButton,{onClick:m,children:a.jsx(f.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,a.jsx(f.Tooltip,{title:r?j9:s1,placement:"bottom",children:a.jsx(eo,{onClick:h,children:a.jsx(F1,{className:r?"":"hiver-up"})})})]})]}),a.jsx(eE,{className:r?"slideDown":"slideUp",ref:s,height:i,children:a.jsxs(tE,{children:[D.map(({title:x,items:B,type:S})=>a.jsxs(aE,{children:[a.jsx(f.Typography,{variant:"body2_medium",children:x}),B.map(v=>{const w=S===G9,{deeplink:I,textHtml:L,imageUrl:M}=v,T=()=>a.jsx(Pm,{className:w?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:L}});return a.jsx(nE,{component:"ul",children:a.jsxs(uE,{component:w?"li":"div",marginLeft:M?"0":"14px",children:[M?a.jsx("img",{src:M}):null,I?a.jsx(T3,{target:"_blank",underline:"none",onClick:O=>E(O,I),fontSize:`${f.theme.typography.body2.fontSize}px`,children:T()}):T()]})},L)})]},x)),a.jsx(f.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:A.map(({text:x,link:B,isAdminPanelLink:S})=>a.jsx(rE,{variant:S?"contained":"text",children:a.jsx(oE,{variant:"caption",onClick:v=>E(v,B,S,!0),children:x})},x))})]})})]})},fM=({selectedEmail:e,conversationId:t})=>me({url:Jk.replace(":conversationId",""+t),method:Be.PATCH,data:{selectedEmail:e}}),iM=5,cM=({value:e,label:t,displayValue:n})=>t?`${n||e} (${t})`:n||e,lM=e=>{const t={};return[...e].sort((n,u)=>n.firstSeenIndex-u.firstSeenIndex).forEach(n=>{var r;const u=t[r=n.connectorId]??(t[r]=[]);u.length<iM&&u.push(n)}),t},DM=(e,t)=>({hiverParam:e.idFieldKey,value:e.value,label:e.label,source:t,recordCard:e.recordCard??(e.cardId?{id:e.cardId,title:e.cardKeyName,type:"flat",priority:0}:void 0)}),dM=(e,t)=>{var n;return{connectorId:e,value:t.value,idFieldKey:t.hiverParam,label:t.label??"",displayValue:t.displayValue,cardId:((n=t.related)==null?void 0:n.linked.cardId)??"",cardKeyName:"",firstSeenIndex:Number.MAX_SAFE_INTEGER,isRelated:!0}},AM=(e=[],t)=>t?e.find(n=>n.value===t.value):void 0,pM=(e,t)=>e.filter(n=>{var r;const u=n.connectorId?(r=t[n.connectorId])==null?void 0:r.related:void 0;return u?n.externalResourceId?n.id===u.linked.cardId&&n.externalResourceId===u.linked.externalResourceId:u.cardIds.includes(n.id):!0}),gM=(e,t)=>{let n=e;return Object.entries(t).forEach(([u,r])=>{const{recordCard:o}=r;if(!o||r.source==="related")return;const s=n.filter(F=>F.connectorId===u),i=s[0],c=s.find(F=>F.id===o.id&&F.externalResourceId===r.value),l=c??{id:o.id,title:o.title,priority:o.priority,type:o.type,externalResourceId:r.value,connectorId:u,connectorName:i==null?void 0:i.connectorName,logoUrl:i==null?void 0:i.logoUrl,userAuthEnabled:i==null?void 0:i.userAuthEnabled,forms:[],isIdRecordCard:!0},D=n.filter(F=>F!==c),d=Math.max(D.findIndex(F=>F.connectorId===u),0);n=[...D.slice(0,d),l,...D.slice(d)]}),n},CM=({response:e,connectorId:t,appCards:n})=>{const u=n[0],r=[],o={};return e.cards.forEach((s,i)=>{var F,b;const c=n.find(C=>C.id===s.cardId&&!C.externalResourceId),l="cardType"in s?s.cardType:(c==null?void 0:c.type)??"flat";r.push({id:s.cardId,title:(c==null?void 0:c.title)??s.cardKey,priority:(c==null?void 0:c.priority)??i,type:l,connectorId:t,connectorName:(c==null?void 0:c.connectorName)??(u==null?void 0:u.connectorName),logoUrl:(c==null?void 0:c.logoUrl)??(u==null?void 0:u.logoUrl),userAuthEnabled:(c==null?void 0:c.userAuthEnabled)??(u==null?void 0:u.userAuthEnabled),forms:(c==null?void 0:c.forms)??[]});const D={activeLookupParam:e.hiverParam??void 0,activeLookupValue:e.value??void 0};if("error"in s){o[s.cardId]={id:s.cardId,cardType:l,data:{flatDisplay:{data:[]},listItems:{fields:[],errorMessage:null,statusCode:200}},connectorNames:u!=null&&u.connectorName?[u.connectorName]:[],cardErrorMessage:`${s.error.message} (Error code: ${s.error.code})`,...D};return}const d={id:s.cardId,cardType:l,data:{flatDisplay:((F=s.data)==null?void 0:F.flatDisplay)??[],listItems:((b=s.data)==null?void 0:b.listItems)??{fields:[],errorMessage:null,statusCode:200}},connectorNames:s.connectorNames??[],cardErrorMessage:s.cardErrorMessage,...D};o[s.cardId]=A1(d)}),{cards:r,cardData:o}},hM="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",pp=e=>({value:`id:${e.connectorId}:${e.idFieldKey}:${e.value}`,label:cM(e),idOption:e}),Yi=e=>{const t=g.useRef(null),[n,u]=g.useState(!1);return g.useEffect(()=>{t.current&&u(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},FM=e=>{const{textRef:t,isOverflow:n}=Yi(e.data.label);return a.jsx(f.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:a.jsx(sE,{ref:t,variant:"body_sm_regular",paddingTop:n?"5px":"0px",children:e.data.label})})},mM=e=>a.jsxs(xn.MenuList,{...e,children:[a.jsx(fE,{children:a.jsx(iE,{variant:"body_sm_medium",children:NE})}),e.children]}),EM=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:u}=Yi(e.data.label);return a.jsx(xn.Option,{...e,children:a.jsxs(f.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[a.jsx(f.Tooltip,{title:u?e.data.value:null,placement:"bottom",children:a.jsx(DE,{ref:n,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?a.jsx("img",{src:hM,width:"14px",height:"14px"}):null]})})},bM=e=>{const{textRef:t,isOverflow:n}=Yi(e.data.label);return a.jsx(xn.Option,{...e,children:a.jsx(f.Tooltip,{title:n?e.data.label:null,placement:"bottom",children:a.jsx(lE,{ref:t,variant:"body_sm_regular",children:e.data.label})})})},xM=e=>a.jsx(xn.ValueContainer,{...e,children:a.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[a.jsx(f.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:"var(--connector-icon-secondary)",flexShrink:0}}),a.jsx(f.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),yM=e=>a.jsx(xn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?a.jsx(f.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:"var(--connector-icon-secondary)"}}):a.jsx(f.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:"var(--connector-icon-secondary)"}})}),BM={group:e=>({...e,padding:0,"& + &":{marginTop:"10px"}}),groupHeading:e=>({...e,margin:0,padding:"2px 6px",textTransform:"none"}),option:(e,t)=>({...e,height:"28px",padding:"6px",marginTop:"2px",borderRadius:"6px",display:"flex",alignItems:"center",cursor:"pointer",color:t.isSelected?"var(--connector-accent)":"var(--connector-text-primary)",backgroundColor:t.isSelected?"var(--connector-accent-subtle)":t.isFocused?"var(--connector-surface-hover)":"transparent","&:active":{backgroundColor:"var(--connector-accent-subtle)"}}),menuList:e=>({...e,maxHeight:"240px",padding:"10px 6px 6px",overflowX:"hidden"}),menu:e=>({...e,backgroundColor:"var(--connector-surface-elevated)",border:"1px solid var(--connector-border)",borderRadius:"8px",boxShadow:"0px 2px 2px rgba(16, 24, 40, 0.06), 0px 4px 4px rgba(16, 24, 40, 0.1)",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2})},vM={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?"var(--connector-input-border-focus, #506DFF)":"var(--connector-border-strong)"}`,borderRadius:"8px",boxShadow:"none",backgroundColor:"var(--connector-surface)",color:"var(--connector-text-primary)",cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:"var(--connector-surface-elevated)",color:"var(--connector-text-primary)",height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?"var(--connector-surface-hover)":"var(--connector-surface)"}}),singleValue:e=>({...e,color:"var(--connector-text-primary)"}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,backgroundColor:"var(--connector-surface-elevated)",boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},wM=({selectedEmail:e,emailHeaders:t,root:n,isLoading:u,setSelectedEmail:r,idOptionGroups:o=[],selectedIdOption:s,onSelectIdOption:i,onSelectEmail:c,persistEmailSelection:l=!0})=>{const{conversationId:D}=g.useContext(ot),d=t?Object.entries(t).map(([h])=>({value:h,label:h})):e?[{value:e,label:e}]:[];g.useEffect(()=>{if(!e&&!u&&t&&Object.keys(t).length>0){const h=Object.keys(t)[0];h&&r(h)}},[t,r,e,u]);const F=o.filter(h=>h.options.length).map(h=>({label:h.appName?`${W3} · ${h.appName}`:W3,options:h.options.map(pp)})),b=F.length>0,C=b?[{label:jE,options:d},...F]:d,p=s?pp(s):e&&!u?{value:e,label:e}:null,A=h=>{if(h!=null&&h.idOption){i==null||i(h.idOption);return}const E=String((h==null?void 0:h.value)||"");E&&D&&l&&fM({selectedEmail:E,conversationId:D}),r(E),c==null||c(E)};return a.jsx(f.Tooltip,{title:s?"Selected ID":"Selected email",placement:"top",children:a.jsx("div",{style:{marginTop:"12px"},children:a.jsx(ga,{options:C,value:p,placeholder:"Select an email",name:"email-selection",type:"select",onChange:A,components:{...ga.getDefaultComponents(),MenuList:b?xn.MenuList:mM,Option:b?bM:EM,SingleValue:FM,DropdownIndicator:yM,ValueContainer:xM},root:n,styles:b?BM:vM,formatGroupLabel:h=>a.jsx(cE,{variant:"body_sm_regular",children:h.label}),isSearchable:!1,menuPortalTarget:document.body,isLoading:u})})})},SM=async e=>{try{const t=await me({url:fL.replace(":conversationId",String(e)),params:{channel_type:"EMAIL"},method:Be.GET}),n=(t==null?void 0:t.data)??{};return{status:n.status,options:Array.isArray(n.options)?n.options:[],defaults:n.defaults??{}}}catch(t){throw Ne.error(t),t}},IM=({conversationId:e,enabled:t})=>{const n=g.useRef();return Dt({queryKey:["IdLookup","Options",e],queryFn:()=>SM(e),enabled:t&&!!e,refetchOnWindowFocus:!1,refetchInterval:u=>{var o;if(((o=u.state.data)==null?void 0:o.status)!=="pending")return n.current=void 0,!1;n.current??(n.current=Date.now());const r=Date.now()-n.current;return r>lL?!1:cL.find(([s])=>r<s)[1]}})},kM=async({cardId:e,conversationId:t,externalResourceId:n,inboxIds:u})=>{const r=await me({url:iL.replace(":cardId",e),method:Be.POST,data:{conversation_id:t,external_resource_id:n,inbox_ids:u,channel_type:"email"}}),o=(r==null?void 0:r.data)??{};return{hiverParam:o.hiverParam??null,value:o.value??null,label:o.label??null,displayValue:o.displayValue??null,cards:Array.isArray(o.cards)?o.cards:[]}},TM="agent_connector_panel",LM=new Set,gp=(e,t)=>e.filter(n=>n.idFieldKey===t).sort((n,u)=>n.firstSeenIndex-u.firstSeenIndex)[0],OM=({enabled:e,appNames:t})=>{const{conversationId:n,connectorId:u,currentSmIds:r,sendTrackingEvent:o}=g.useContext(ot),s=String(n??""),i=e&&!!n,{data:c,isError:l,isFetchedAfterMount:D}=IM({conversationId:n,enabled:i}),d=Y8(i?n:void 0),F=RL(i?n:void 0);i&&_L(s);const[b,C]=g.useState(!1),[p,A]=g.useReducer(I=>I+1,0);g.useEffect(()=>{if(!i)return;const I=setTimeout(()=>C(!0),DL);return()=>clearTimeout(I)},[i,s]);const h=g.useMemo(()=>{const I=lM((c==null?void 0:c.options)??[]);return Object.entries(F).forEach(([L,M])=>{const T=I[L]??[];T.some(O=>O.value===M.value)||(I[L]=[...T,dM(L,M)])}),u?I[u]?{[u]:I[u]}:{}:I},[c==null?void 0:c.options,F,u]),E=g.useCallback((I,L,M)=>{o(I,{sm_ids:r,page:TM,connector_id:L,app_name:t[L],conversation_id:n,...M})},[o,r,t,n]),m=g.useCallback((I,L)=>{zi(s,I.connectorId);const M=I.isRelated?F[I.connectorId]:void 0;X8(s,I.connectorId,M??DM(I,L));const T=h[I.connectorId]??[];E(s9,I.connectorId,{id_field_key:I.idFieldKey,source:L,position:T.indexOf(I)+1})},[s,F,h,E]),x=g.useCallback((I,L)=>X8(s,I,{...L,source:"related"}),[s]),B=g.useMemo(()=>(c==null?void 0:c.defaults)??{},[c==null?void 0:c.defaults]),S=g.useCallback(()=>{Object.keys(B).forEach(I=>zi(s,I)),jL(s),A()},[s,B]),v=(c==null?void 0:c.status)==="pending";g.useEffect(()=>{!i||!c||!D||Object.entries(B).forEach(([I,L])=>{if(Z8(s,I))return;const M=gp(c.options,L);M?(zi(s,I),d[I]||m(M,"default_preselect")):(!v||b)&&(QL(s,I),A())})},[i,c,D,B,v,b,s,d,m]);const w=g.useMemo(()=>{if(!i||l||b)return LM;if(!c)return"all";const I=new Set;return Object.entries(B).forEach(([L,M])=>{d[L]||Z8(s,L)||(!D||v||gp(c.options,M))&&I.add(L)}),I},[i,l,b,c,D,B,v,s,d,p]);return{optionsByConnector:h,keys:d,heldConnectorIds:w,selectIdOption:m,setRelatedKey:x,clearIdKeys:S,trackIdLookupEvent:E}},MM=({setRelatedKey:e,trackIdLookupEvent:t})=>{const n=Qt(),u=R3(),{conversationId:r,currentSmIds:o,email:s}=g.useContext(ot),i=g.useRef({}),c=g.useCallback((F,b)=>n(Co.setRelatedLookupStatus({connectorId:F.connectorId,status:b,cardId:F.cardId,externalResourceId:F.externalResourceId})),[n]),l=g.useCallback(F=>c(F,"loading"),[c]),D=g.useCallback(async(F,b)=>{const{connectorId:C,cardId:p,externalResourceId:A,fallbackCard:h}=F;if(!r)return;const E=(u.getState().cardList.connectorCards??[]).filter(w=>w.connectorId===C),m=b??E;i.current[C]={target:F,templates:m};const B=E.some(w=>w.id===p&&w.externalResourceId===A)?[]:[{title:"",priority:0,type:"flat",forms:[],...h,id:p,externalResourceId:A,connectorId:C}],S={id:p,externalResourceId:A},v=(w,I)=>n(Co.replaceAppCards({connectorId:C,pinned:S,cards:[...B,...w.cards],cardData:w.cardData,lookupKey:I}));c(F,"loading");try{const w=await kM({cardId:p,conversationId:r,externalResourceId:A,inboxIds:o});if(!w.hiverParam||!w.value||!w.cards.length){Tt.unstable_batchedUpdates(()=>{v({cards:[],cardData:{}},""),c(F,"empty")}),t(n1,C,{outcome:"empty",card_count:0});return}const I=CM({response:w,connectorId:C,appCards:m}),{hiverParam:L,value:M}=w;Tt.unstable_batchedUpdates(()=>{e(C,{hiverParam:L,value:M,label:w.label??void 0,displayValue:w.displayValue??void 0,related:{cardIds:I.cards.map(T=>T.id),linked:{cardId:p,externalResourceId:A}}}),v(I,br({email:s,lookup:{hiverParam:L,value:M}})),c(F,"result")}),t(n1,C,{outcome:"result",card_count:I.cards.length})}catch{Tt.unstable_batchedUpdates(()=>{v({cards:[],cardData:{}},""),c(F,"error")}),t(n1,C,{outcome:"error",card_count:0})}},[r,o,s,n,u,c,e,t]),d=g.useCallback(F=>{const b=i.current[F];b&&D(b.target,b.templates)},[D]);return{beginRelatedLookup:l,lookupRelatedRecords:D,retryRelatedLookup:d}},Cp=e=>k.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_8444_63907)"},k.createElement("path",{d:"M7.99967 13.333L8.93967 12.393L5.21968 8.66634H13.333V7.33301L5.21968 7.33301L8.93967 3.60634L7.99967 2.66634L2.66634 7.99967L7.99967 13.333Z",fill:"currentColor"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_8444_63907"},k.createElement("rect",{width:16,height:16,fill:"white",transform:"matrix(-1 0 0 -1 16 16)"}))));f.styled(f.Paper)`
2884
+ `,uM="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",rM={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:oM}=rM,Ap=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:u,connectorFunctions:r,connectorId:o}=g.useContext(ot),s=xt(u,b9),i=xt(u,bs),c=b=>{b.stopPropagation(),n(mF),o?r==null||r.redirectToAdmin(o,{isEdit:!0,tabIndex:2}):r==null||r.redirectToAdmin()},l=b=>{b.stopPropagation(),n(EF),window.open(HO,"_blank")},D=()=>{n(VF,{source:"main_tab"})},d=i?zO:VO,F=e&&!o;return a.jsxs(JO,{"data-testid":"noConnectors",children:[s?a.jsxs(a.Fragment,{children:[t?null:a.jsx(KO,{variant:"h2",children:i?f1:ZO}),a.jsx(UO,{onClick:D,href:GO,target:"_blank",children:a.jsx(WS,{src:oM+d,alt:XO,aspectRatio:"1000/783"})})]}):a.jsxs(YO,{children:[a.jsx(qO,{variant:"body1_medium",children:MO}),a.jsx("img",{src:uM,alt:NO})]}),a.jsx($O,{variant:"body2",children:jO}),e?a.jsx(dp,{endIcon:a.jsx(f.icons.ArrowForward,{}),onClick:c,...F&&{"data-guider":"enable-apps"},...s&&{size:"medium"},children:o?PO:i?QO:_O}):a.jsxs(a.Fragment,{children:[a.jsx(dp,{onClick:l,children:RO}),a.jsxs(eM,{direction:"row",children:[a.jsx(tM,{}),a.jsx(nM,{variant:"caption",children:WO})]})]})]})},aM=()=>{const{availableFeatures:e}=g.useContext(ot),t=xt(e,bs),{connectorName:n,connectorId:u,isReady:r}=B3();return r?a.jsxs(I3,{children:[a.jsx(f.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:n&&u?a.jsx(xs,{variant:"body_sm_medium",children:n}):a.jsxs(a.Fragment,{children:[t?a.jsx(S3,{width:"20px",height:"20px"}):a.jsx(w3,{}),a.jsx(xs,{variant:"body_sm_medium",children:t?f1:D3})]})}),a.jsxs(f.Stack,{gap:"12px",children:[a.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),a.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}):null},sM=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:u}=g.useContext(ot),[r,o]=g.useState(!1),s=g.useRef(null),[i,c]=g.useState(0),{templateUpdates:l}=e||{},{sections:D=[],actionButtons:d=[],title:F}=l||{},{version:b=""}=l||{},C=U9(b),p=g.useMemo(()=>q9(b),[b]),A=g.useMemo(()=>(d==null?void 0:d.filter(({isAdminPanelLink:x})=>!(!n&&x)))??[],[d,n]);if(g.useEffect(()=>{!p&&l&&d1(b,!0)},[p,b,l]),g.useLayoutEffect(()=>{var x;(x=s.current)!=null&&x.scrollHeight&&c(s.current.scrollHeight)},[s]),g.useEffect(()=>{l&&!C&&t(vF,{update_version_id:b})},[]),!l||C)return null;const h=x=>{var B;x.stopPropagation(),o(S=>!S),(B=s.current)!=null&&B.scrollHeight&&c(s.current.scrollHeight),d1(b,!1,!0)},E=(x,B="",S=!1,v=!1)=>{var w;if(x.stopPropagation(),S&&v?t(wF,{update_version_id:b}):v&&t(SF,{update_version_id:b}),!S&&B){(w=window.open(B,"_blank"))==null||w.focus();return}m(x,!1),u==null||u.redirectToAdmin()},m=(x,B=!0)=>{x.stopPropagation(),d1(b,!1),o(!1),B&&t(IF,{update_version_id:b})};return a.jsxs(Km,{children:[a.jsxs($m,{children:[a.jsx(Um,{variant:"h3",children:F}),a.jsxs(f.Box,{children:[r?a.jsx(f.Tooltip,{title:_9,placement:"bottom",children:a.jsx(f.IconButton,{onClick:m,children:a.jsx(f.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,a.jsx(f.Tooltip,{title:r?j9:s1,placement:"bottom",children:a.jsx(eo,{onClick:h,children:a.jsx(F1,{className:r?"":"hiver-up"})})})]})]}),a.jsx(eE,{className:r?"slideDown":"slideUp",ref:s,height:i,children:a.jsxs(tE,{children:[D.map(({title:x,items:B,type:S})=>a.jsxs(aE,{children:[a.jsx(f.Typography,{variant:"body2_medium",children:x}),B.map(v=>{const w=S===G9,{deeplink:I,textHtml:L,imageUrl:M}=v,T=()=>a.jsx(Pm,{className:w?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:L}});return a.jsx(nE,{component:"ul",children:a.jsxs(uE,{component:w?"li":"div",marginLeft:M?"0":"14px",children:[M?a.jsx("img",{src:M}):null,I?a.jsx(T3,{target:"_blank",underline:"none",onClick:O=>E(O,I),fontSize:`${f.theme.typography.body2.fontSize}px`,children:T()}):T()]})},L)})]},x)),a.jsx(f.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:A.map(({text:x,link:B,isAdminPanelLink:S})=>a.jsx(rE,{variant:S?"contained":"text",children:a.jsx(oE,{variant:"caption",onClick:v=>E(v,B,S,!0),children:x})},x))})]})})]})},fM=({selectedEmail:e,conversationId:t})=>me({url:Jk.replace(":conversationId",""+t),method:Be.PATCH,data:{selectedEmail:e}}),iM=5,cM=({value:e,label:t,displayValue:n})=>t?`${n||e} (${t})`:n||e,lM=e=>{const t={};return[...e].sort((n,u)=>n.firstSeenIndex-u.firstSeenIndex).forEach(n=>{var r;const u=t[r=n.connectorId]??(t[r]=[]);u.length<iM&&u.push(n)}),t},DM=(e,t)=>({hiverParam:e.idFieldKey,value:e.value,label:e.label,source:t,recordCard:e.recordCard??(e.cardId?{id:e.cardId,title:e.cardKeyName,type:"flat",priority:0}:void 0)}),dM=(e,t)=>{var n;return{connectorId:e,value:t.value,idFieldKey:t.hiverParam,label:t.label??"",displayValue:t.displayValue,cardId:((n=t.related)==null?void 0:n.linked.cardId)??"",cardKeyName:"",firstSeenIndex:Number.MAX_SAFE_INTEGER,isRelated:!0}},AM=(e=[],t)=>t?e.find(n=>n.value===t.value):void 0,pM=(e,t)=>e.filter(n=>{var r;const u=n.connectorId?(r=t[n.connectorId])==null?void 0:r.related:void 0;return u?n.externalResourceId?n.id===u.linked.cardId&&n.externalResourceId===u.linked.externalResourceId:u.cardIds.includes(n.id):!0}),gM=(e,t)=>{let n=e;return Object.entries(t).forEach(([u,r])=>{const{recordCard:o}=r;if(!o||r.source==="related")return;const s=n.filter(F=>F.connectorId===u),i=s[0],c=s.find(F=>F.id===o.id&&F.externalResourceId===r.value),l=c??{id:o.id,title:o.title,priority:o.priority,type:o.type,externalResourceId:r.value,connectorId:u,connectorName:i==null?void 0:i.connectorName,logoUrl:i==null?void 0:i.logoUrl,userAuthEnabled:i==null?void 0:i.userAuthEnabled,forms:[],isIdRecordCard:!0},D=n.filter(F=>F!==c),d=Math.max(D.findIndex(F=>F.connectorId===u),0);n=[...D.slice(0,d),l,...D.slice(d)]}),n},CM=({response:e,connectorId:t,appCards:n})=>{const u=n[0],r=[],o={};return e.cards.forEach((s,i)=>{var F,b;const c=n.find(C=>C.id===s.cardId&&!C.externalResourceId),l="cardType"in s?s.cardType:(c==null?void 0:c.type)??"flat";r.push({id:s.cardId,title:(c==null?void 0:c.title)??s.cardKey,priority:(c==null?void 0:c.priority)??i,type:l,connectorId:t,connectorName:(c==null?void 0:c.connectorName)??(u==null?void 0:u.connectorName),logoUrl:(c==null?void 0:c.logoUrl)??(u==null?void 0:u.logoUrl),userAuthEnabled:(c==null?void 0:c.userAuthEnabled)??(u==null?void 0:u.userAuthEnabled),forms:(c==null?void 0:c.forms)??[]});const D={activeLookupParam:e.hiverParam??void 0,activeLookupValue:e.value??void 0};if("error"in s){o[s.cardId]={id:s.cardId,cardType:l,data:{flatDisplay:{data:[]},listItems:{fields:[],errorMessage:null,statusCode:200}},connectorNames:u!=null&&u.connectorName?[u.connectorName]:[],cardErrorMessage:`${s.error.message} (Error code: ${s.error.code})`,...D};return}const d={id:s.cardId,cardType:l,data:{flatDisplay:((F=s.data)==null?void 0:F.flatDisplay)??[],listItems:((b=s.data)==null?void 0:b.listItems)??{fields:[],errorMessage:null,statusCode:200}},connectorNames:s.connectorNames??[],cardErrorMessage:s.cardErrorMessage,...D};o[s.cardId]=A1(d)}),{cards:r,cardData:o}},hM="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",pp=e=>({value:`id:${e.connectorId}:${e.idFieldKey}:${e.value}`,label:cM(e),idOption:e}),Yi=e=>{const t=g.useRef(null),[n,u]=g.useState(!1);return g.useEffect(()=>{t.current&&u(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},FM=e=>{const{textRef:t,isOverflow:n}=Yi(e.data.label);return a.jsx(f.Tooltip,{title:n?e.data.label:null,placement:"bottom",children:a.jsx(sE,{ref:t,variant:"body_sm_regular",paddingTop:n?"5px":"0px",children:e.data.label})})},mM=e=>a.jsxs(xn.MenuList,{...e,children:[a.jsx(fE,{children:a.jsx(iE,{variant:"body_sm_medium",children:NE})}),e.children]}),EM=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:u}=Yi(e.data.label);return a.jsx(xn.Option,{...e,children:a.jsxs(f.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[a.jsx(f.Tooltip,{title:u?e.data.value:null,placement:"bottom",children:a.jsx(DE,{ref:n,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?a.jsx("img",{src:hM,width:"14px",height:"14px"}):null]})})},bM=e=>{const{textRef:t,isOverflow:n}=Yi(e.data.label);return a.jsx(xn.Option,{...e,children:a.jsx(f.Tooltip,{title:n?e.data.label:null,placement:"bottom",children:a.jsx(lE,{ref:t,variant:"body_sm_regular",children:e.data.label})})})},xM=e=>a.jsx(xn.ValueContainer,{...e,children:a.jsxs(f.Stack,{direction:"row",alignItems:"center",gap:"4px",sx:{minWidth:0},children:[a.jsx(f.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:"var(--connector-icon-secondary)",flexShrink:0}}),a.jsx(f.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),yM=e=>a.jsx(xn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?a.jsx(f.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:"var(--connector-icon-secondary)"}}):a.jsx(f.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:"var(--connector-icon-secondary)"}})}),BM={group:e=>({...e,padding:0,"& + &":{marginTop:"10px"}}),groupHeading:e=>({...e,margin:0,padding:"2px 6px",textTransform:"none"}),option:(e,t)=>({...e,height:"28px",padding:"6px",marginTop:"2px",borderRadius:"6px",display:"flex",alignItems:"center",cursor:"pointer",color:t.isSelected?"var(--connector-accent)":"var(--connector-text-primary)",backgroundColor:t.isSelected?"var(--connector-accent-subtle)":t.isFocused?"var(--connector-surface-hover)":"transparent","&:active":{backgroundColor:"var(--connector-accent-subtle)"}}),menuList:e=>({...e,maxHeight:"240px",padding:"10px 6px 6px",overflowX:"hidden"}),menu:e=>({...e,backgroundColor:"var(--connector-surface-elevated)",border:"1px solid var(--connector-border)",borderRadius:"8px",boxShadow:"0px 2px 2px rgba(16, 24, 40, 0.06), 0px 4px 4px rgba(16, 24, 40, 0.1)",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2})},vM={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?"var(--connector-input-border-focus, #506DFF)":"var(--connector-border-strong)"}`,borderRadius:"8px",boxShadow:"none",backgroundColor:"var(--connector-surface)",color:"var(--connector-text-primary)",cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:"var(--connector-surface-elevated)",color:"var(--connector-text-primary)",height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?"var(--connector-surface-hover)":"var(--connector-surface)"}}),singleValue:e=>({...e,color:"var(--connector-text-primary)"}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,backgroundColor:"var(--connector-surface-elevated)",boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},wM=({selectedEmail:e,emailHeaders:t,root:n,isLoading:u,setSelectedEmail:r,idOptionGroups:o=[],selectedIdOption:s,onSelectIdOption:i,onSelectEmail:c,persistEmailSelection:l=!0})=>{const{conversationId:D}=g.useContext(ot),d=t?Object.entries(t).map(([h])=>({value:h,label:h})):e?[{value:e,label:e}]:[];g.useEffect(()=>{if(!e&&!u&&t&&Object.keys(t).length>0){const h=Object.keys(t)[0];h&&r(h)}},[t,r,e,u]);const F=o.filter(h=>h.options.length).map(h=>({label:h.appName?`${W3} · ${h.appName}`:W3,options:h.options.map(pp)})),b=F.length>0,C=b?[{label:jE,options:d},...F]:d,p=s?pp(s):e&&!u?{value:e,label:e}:null,A=h=>{if(h!=null&&h.idOption){i==null||i(h.idOption);return}const E=String((h==null?void 0:h.value)||"");E&&D&&l&&fM({selectedEmail:E,conversationId:D}),r(E),c==null||c(E)};return a.jsx(f.Tooltip,{title:s?"Selected ID":"Selected email",placement:"top",children:a.jsx("div",{style:{marginTop:"12px"},children:a.jsx(ga,{options:C,value:p,placeholder:"Select an email",name:"email-selection",type:"select",onChange:A,components:{...ga.getDefaultComponents(),MenuList:b?xn.MenuList:mM,Option:b?bM:EM,SingleValue:FM,DropdownIndicator:yM,ValueContainer:xM},root:n,styles:b?BM:vM,formatGroupLabel:h=>a.jsx(cE,{variant:"body_sm_regular",children:h.label}),isSearchable:!1,menuPortalTarget:document.body,isLoading:u})})})},SM=async e=>{try{const t=await me({url:fL.replace(":conversationId",String(e)),params:{channel_type:"EMAIL"},method:Be.GET}),n=(t==null?void 0:t.data)??{};return{status:n.status,options:Array.isArray(n.options)?n.options:[],defaults:n.defaults??{}}}catch(t){throw Ne.error(t),t}},IM=({conversationId:e,enabled:t})=>{const n=g.useRef();return Dt({queryKey:["IdLookup","Options",e],queryFn:()=>SM(e),enabled:t&&!!e,refetchOnWindowFocus:!1,refetchInterval:u=>{var o;if(((o=u.state.data)==null?void 0:o.status)!=="pending")return n.current=void 0,!1;n.current??(n.current=Date.now());const r=Date.now()-n.current;return r>lL?!1:cL.find(([s])=>r<s)[1]}})},kM=async({cardId:e,conversationId:t,externalResourceId:n,inboxIds:u})=>{const r=await me({url:iL.replace(":cardId",e),method:Be.POST,data:{conversation_id:t,external_resource_id:n,inbox_ids:u,channel_type:"email"}}),o=(r==null?void 0:r.data)??{};return{hiverParam:o.hiverParam??null,value:o.value??null,label:o.label??null,displayValue:o.displayValue??null,cards:Array.isArray(o.cards)?o.cards:[]}},TM="agent_connector_panel",LM=new Set,gp=(e,t)=>e.filter(n=>n.idFieldKey===t).sort((n,u)=>n.firstSeenIndex-u.firstSeenIndex)[0],OM=({enabled:e,appNames:t})=>{const{conversationId:n,connectorId:u,currentSmIds:r,sendTrackingEvent:o}=g.useContext(ot),s=String(n??""),i=e&&!!n,{data:c,isError:l,isFetchedAfterMount:D}=IM({conversationId:n,enabled:i}),d=Y8(i?n:void 0),F=RL(i?n:void 0);i&&_L(s);const[b,C]=g.useState(!1),[p,A]=g.useReducer(I=>I+1,0);g.useEffect(()=>{if(!i)return;const I=setTimeout(()=>C(!0),DL);return()=>clearTimeout(I)},[i,s]);const h=g.useMemo(()=>{const I=lM((c==null?void 0:c.options)??[]);return Object.entries(F).forEach(([L,M])=>{const T=I[L]??[];T.some(O=>O.value===M.value)||(I[L]=[...T,dM(L,M)])}),u?I[u]?{[u]:I[u]}:{}:I},[c==null?void 0:c.options,F,u]),E=g.useCallback((I,L,M)=>{o(I,{sm_ids:r,page:TM,connector_id:L,app_name:t[L],conversation_id:n,...M})},[o,r,t,n]),m=g.useCallback((I,L)=>{zi(s,I.connectorId);const M=I.isRelated?F[I.connectorId]:void 0;X8(s,I.connectorId,M??DM(I,L));const T=h[I.connectorId]??[];E(s9,I.connectorId,{id_field_key:I.idFieldKey,source:L,position:T.indexOf(I)+1})},[s,F,h,E]),x=g.useCallback((I,L)=>X8(s,I,{...L,source:"related"}),[s]),B=g.useMemo(()=>(c==null?void 0:c.defaults)??{},[c==null?void 0:c.defaults]),S=g.useCallback(()=>{Object.keys(B).forEach(I=>zi(s,I)),jL(s),A()},[s,B]),v=(c==null?void 0:c.status)==="pending";g.useEffect(()=>{!i||!c||!D||Object.entries(B).forEach(([I,L])=>{if(Z8(s,I))return;const M=gp(c.options,L);M?(zi(s,I),d[I]||m(M,"default_preselect")):(!v||b)&&(QL(s,I),A())})},[i,c,D,B,v,b,s,d,m]);const w=g.useMemo(()=>{if(!i||l||b)return LM;if(!c)return"all";const I=new Set;return Object.entries(B).forEach(([L,M])=>{d[L]||Z8(s,L)||(!D||v||gp(c.options,M))&&I.add(L)}),I},[i,l,b,c,D,B,v,s,d,p]);return{optionsByConnector:h,keys:d,heldConnectorIds:w,selectIdOption:m,setRelatedKey:x,clearIdKeys:S,trackIdLookupEvent:E}},MM=({setRelatedKey:e,trackIdLookupEvent:t})=>{const n=Qt(),u=R3(),{conversationId:r,currentSmIds:o,email:s}=g.useContext(ot),i=g.useRef({}),c=g.useCallback((F,b)=>n(Co.setRelatedLookupStatus({connectorId:F.connectorId,status:b,cardId:F.cardId,externalResourceId:F.externalResourceId})),[n]),l=g.useCallback(F=>c(F,"loading"),[c]),D=g.useCallback(async(F,b)=>{const{connectorId:C,cardId:p,externalResourceId:A,fallbackCard:h}=F;if(!r)return;const E=(u.getState().cardList.connectorCards??[]).filter(w=>w.connectorId===C),m=b??E;i.current[C]={target:F,templates:m};const B=E.some(w=>w.id===p&&w.externalResourceId===A)?[]:[{title:"",priority:0,type:"flat",forms:[],...h,id:p,externalResourceId:A,connectorId:C}],S={id:p,externalResourceId:A},v=(w,I)=>n(Co.replaceAppCards({connectorId:C,pinned:S,cards:[...B,...w.cards],cardData:w.cardData,lookupKey:I}));c(F,"loading");try{const w=await kM({cardId:p,conversationId:r,externalResourceId:A,inboxIds:o});if(!w.hiverParam||!w.value||!w.cards.length){Tt.unstable_batchedUpdates(()=>{v({cards:[],cardData:{}},""),c(F,"empty")}),t(n1,C,{outcome:"empty",card_count:0});return}const I=CM({response:w,connectorId:C,appCards:m}),{hiverParam:L,value:M}=w;Tt.unstable_batchedUpdates(()=>{e(C,{hiverParam:L,value:M,label:w.label??void 0,related:{cardIds:I.cards.map(T=>T.id),linked:{cardId:p,externalResourceId:A}}}),v(I,br({email:s,lookup:{hiverParam:L,value:M}})),c(F,"result")}),t(n1,C,{outcome:"result",card_count:I.cards.length})}catch{Tt.unstable_batchedUpdates(()=>{v({cards:[],cardData:{}},""),c(F,"error")}),t(n1,C,{outcome:"error",card_count:0})}},[r,o,s,n,u,c,e,t]),d=g.useCallback(F=>{const b=i.current[F];b&&D(b.target,b.templates)},[D]);return{beginRelatedLookup:l,lookupRelatedRecords:D,retryRelatedLookup:d}},Cp=e=>k.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_8444_63907)"},k.createElement("path",{d:"M7.99967 13.333L8.93967 12.393L5.21968 8.66634H13.333V7.33301L5.21968 7.33301L8.93967 3.60634L7.99967 2.66634L2.66634 7.99967L7.99967 13.333Z",fill:"currentColor"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_8444_63907"},k.createElement("rect",{width:16,height:16,fill:"white",transform:"matrix(-1 0 0 -1 16 16)"}))));f.styled(f.Paper)`
2884
2885
  width: stretch;
2885
2886
  height: 100%;
2886
2887
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.23.0-customerIdMap-beta.1",
3
+ "version": "4.23.0-customerIdMap-beta.2",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",