@hiver/connector-agent 4.19.0 → 4.19.1-slackStyles-beta.0

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":"style.d.ts","sourceRoot":"","sources":["../../../src/app/hig-slack/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,QAAQ,CAKnD,CAAC;AAEF;iDACiD;AACjD,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,QAAQ,CAarD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAKhD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CAMxD,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAehD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,UAAU,CAGrD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CASxD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,WAAW,CAoBvD,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAMhD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,eAAe,CAMzD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,eAAe,CASzD,CAAC;AAEF;4EAC4E;AAC5E,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,QAAQ,CASjD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,QAAQ,CAoBnD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,UAAU,CAGnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,QAAQ,CAKtD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,eAAe,CAS1D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CAMxD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CASxD,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CAWxD,CAAC"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/app/hig-slack/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,QAAQ,CAKnD,CAAC;AAEF;iDACiD;AACjD,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,QAAQ,CAarD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAKhD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CAUxD,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAehD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,UAAU,CAGrD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CASxD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,WAAW,CAoBvD,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAMhD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,eAAe,CAMzD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,eAAe,CASzD,CAAC;AAEF;4EAC4E;AAC5E,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,QAAQ,CASjD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,QAAQ,CAoBnD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,UAAU,CAGnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,QAAQ,CAKtD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,eAAe,CAS1D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CAMxD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CASxD,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,eAAe,CAWxD,CAAC"}
package/index.es.js CHANGED
@@ -33839,7 +33839,7 @@ const JM = ({ channelId: e, message: t, onChannelChange: u, onMessageChange: n }
33839
33839
  justify-content: space-between;
33840
33840
  gap: ${y.space.lg}px;
33841
33841
  width: 100%;
33842
- padding: ${y.space.xxl}px ${y.space.xl}px;
33842
+ padding: ${y.space.xxl}px 14px;
33843
33843
  cursor: pointer;
33844
33844
  user-select: none;
33845
33845
  background: none;
@@ -33852,11 +33852,15 @@ const JM = ({ channelId: e, message: t, onChannelChange: u, onMessageChange: n }
33852
33852
  gap: ${y.space.lg}px;
33853
33853
  min-width: 0;
33854
33854
  `, nP = w(K)`
33855
- font-family: ${y.font.family};
33856
- font-size: 14px;
33857
- line-height: 20px;
33858
- font-weight: ${y.font.weightMedium};
33859
- color: ${y.color.slateTextTitle};
33855
+ && {
33856
+ font-family: 'Inter', sans-serif;
33857
+ font-size: 13px;
33858
+ line-height: 19px;
33859
+ font-weight: 500;
33860
+ letter-spacing: -0.005em;
33861
+ color: rgb(52, 60, 69);
33862
+ -webkit-font-smoothing: auto;
33863
+ }
33860
33864
  `, rP = w(N)`
33861
33865
  display: inline-flex;
33862
33866
  align-items: center;
@@ -33874,7 +33878,7 @@ const JM = ({ channelId: e, message: t, onChannelChange: u, onMessageChange: n }
33874
33878
  font-weight: ${y.font.weightMedium};
33875
33879
  `, ma = w(j)`
33876
33880
  gap: ${y.space.xl}px;
33877
- padding: 0 ${y.space.xl}px ${y.space.lg}px;
33881
+ padding: 0 14px ${y.space.lg}px;
33878
33882
  `, o2 = w(K)`
33879
33883
  && {
33880
33884
  width: 100%;
@@ -34093,7 +34097,7 @@ const JM = ({ channelId: e, message: t, onChannelChange: u, onMessageChange: n }
34093
34097
  return /* @__PURE__ */ f.jsxs(eP, { children: [
34094
34098
  /* @__PURE__ */ f.jsxs(tP, { role: "button", tabIndex: 0, onClick: () => F((M) => !M), children: [
34095
34099
  /* @__PURE__ */ f.jsxs(uP, { children: [
34096
- /* @__PURE__ */ f.jsx(r2, { size: 20 }),
34100
+ /* @__PURE__ */ f.jsx(r2, { size: 16 }),
34097
34101
  /* @__PURE__ */ f.jsx(nP, { children: "Slack" }),
34098
34102
  L > 0 && /* @__PURE__ */ f.jsx(rP, { children: L })
34099
34103
  ] }),
package/index.umd.js CHANGED
@@ -4753,7 +4753,7 @@ Do you want to continue?`,kv="Select an object to create",Tv="Select an object t
4753
4753
  justify-content: space-between;
4754
4754
  gap: ${w.space.lg}px;
4755
4755
  width: 100%;
4756
- padding: ${w.space.xxl}px ${w.space.xl}px;
4756
+ padding: ${w.space.xxl}px 14px;
4757
4757
  cursor: pointer;
4758
4758
  user-select: none;
4759
4759
  background: none;
@@ -4766,11 +4766,15 @@ Do you want to continue?`,kv="Select an object to create",Tv="Select an object t
4766
4766
  gap: ${w.space.lg}px;
4767
4767
  min-width: 0;
4768
4768
  `,rP=s.styled(s.Typography)`
4769
- font-family: ${w.font.family};
4770
- font-size: 14px;
4771
- line-height: 20px;
4772
- font-weight: ${w.font.weightMedium};
4773
- color: ${w.color.slateTextTitle};
4769
+ && {
4770
+ font-family: 'Inter', sans-serif;
4771
+ font-size: 13px;
4772
+ line-height: 19px;
4773
+ font-weight: 500;
4774
+ letter-spacing: -0.005em;
4775
+ color: rgb(52, 60, 69);
4776
+ -webkit-font-smoothing: auto;
4777
+ }
4774
4778
  `,oP=s.styled(s.Box)`
4775
4779
  display: inline-flex;
4776
4780
  align-items: center;
@@ -4788,7 +4792,7 @@ Do you want to continue?`,kv="Select an object to create",Tv="Select an object t
4788
4792
  font-weight: ${w.font.weightMedium};
4789
4793
  `,ri=s.styled(s.Stack)`
4790
4794
  gap: ${w.space.xl}px;
4791
- padding: 0 ${w.space.xl}px ${w.space.lg}px;
4795
+ padding: 0 14px ${w.space.lg}px;
4792
4796
  `,r4=s.styled(s.Typography)`
4793
4797
  && {
4794
4798
  width: 100%;
@@ -4911,7 +4915,7 @@ Do you want to continue?`,kv="Select an object to create",Tv="Select an object t
4911
4915
  &:hover {
4912
4916
  text-decoration: underline;
4913
4917
  }
4914
- `,FP=({expanded:e})=>f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,style:{transition:"transform 150ms ease",transform:e?"rotate(180deg)":"none"},children:f.jsx("path",{d:"M4 6l4 4 4-4"})}),hP=e=>{if(e.targetKind==="channel"){const t=[];for(const u of e.threads??[])t.push(u.root,...u.replies);return t}return e.messages},EP=e=>e.targetKind==="channel"?(e.threads??[]).reduce((t,u)=>t+1+u.replies.length,0):e.messages.length,mP=e=>{const t=hP(e).filter(u=>!u.deletedAt&&u.subtype!=="tombstone");return t.length===0?null:t.reduce((u,n)=>Number(n.postedAt)>Number(u.postedAt)?n:u)},bP=({onViewAll:e})=>{var j;const{hiverConvId:t,connectorId:u,smId:n,smIds:r,sendTrackingEvent:o,boxedMessages:a,isActive:i=!0}=qu(),D=c8(n,r);Pf(u,!0);const{state:c,connect:l}=Wo(u,{onConnected:()=>o==null?void 0:o(Ja)}),d=c==="connected",F=Zf(t,d,i?VN:0),{data:E,isLoading:C}=F8(t,d&&!!F.data),p=(j=F.data)==null?void 0:j.mentions,A=h.useMemo(()=>{const M=new Map;return(E??[]).forEach(H=>{H.name&&M.set(H.externalUserId,H.name)}),Object.entries(p??{}).forEach(([H,V])=>{V&&!M.has(H)&&M.set(H,V)}),M},[E,p]),[g,m]=h.useState(!0),[b,x]=h.useState(!1),y=c==="in_progress",B=h.useCallback(()=>{const M=c==="reauth_required"||c==="workspace_mismatch";o==null||o(za,{is_reauth:M}),l()},[l,o,c]),v=h.useCallback(()=>{o==null||o(A3),x(!0)},[o]);if(D.isLoading||D.data&&!D.data.enabled)return null;const S=d&&!F.isLoading?F.data:null,I=S?mP(S):null,_=I?a&&I.author.isSelf?"You":`${I.author.name||I.author.externalUserId}${!a&&I.author.isSelf?" (You)":""}`:"",L=()=>d?F.isLoading?null:S?f.jsxs(ri,{children:[f.jsxs(aP,{children:[f.jsx(sP,{children:"Channel:"}),f.jsxs(iP,{children:["#",S.channelName]})]}),I&&f.jsxs(DP,{children:[f.jsx(cP,{"aria-hidden":!0,children:f.jsx(Jf,{url:I.author.avatarUrl,name:I.author.name,fallbackId:I.author.externalUserId})}),f.jsxs(lP,{children:[f.jsxs(dP,{children:[f.jsx(AP,{title:_,children:_}),f.jsx(pP,{children:I8(I.postedAt,!!a)})]}),f.jsx(CP,{children:v8(X1(I.text),A,C)})]})]}),f.jsx(gP,{role:"button",tabIndex:0,onClick:()=>e==null?void 0:e(),children:"View all"})]}):f.jsxs(ri,{children:[f.jsx(r4,{children:"Start an internal discussion about this conversation."}),f.jsx(fP,{variant:"contained",disableElevation:!0,onClick:v,children:"+ Start new"})]}):f.jsxs(ri,{children:[f.jsx(r4,{children:"Discuss this customer issue with your team on Slack from Hiver. Connect Slack to get started."}),f.jsxs(A8,{disableElevation:!0,onClick:B,disabled:y,children:[f.jsx(n4,{size:16}),y?"Connecting…":"Connect Slack"]})]}),O=S?EP(S):0;return f.jsxs(tP,{children:[f.jsxs(uP,{role:"button",tabIndex:0,onClick:()=>m(M=>!M),children:[f.jsxs(nP,{children:[f.jsx(n4,{size:20}),f.jsx(rP,{children:"Slack"}),O>0&&f.jsx(oP,{children:O})]}),f.jsx(FP,{expanded:g})]}),g&&L(),f.jsx($8,{open:b,onClose:()=>x(!1)})]})},xP=({onViewAll:e,...t})=>f.jsx(u4,{...t,children:f.jsx(bP,{onViewAll:e})});function yP(e){var u;const t=Zf(e,!0,0);return(u=t.data)!=null&&u.channelName?{label:t.data.channelName,isLinked:!0}:{label:"Slack",isLinked:!1}}const BP=e=>Fe({url:Kw,method:ye.POST,data:e}),wP=e=>Fe({url:$w,method:ye.POST,data:e}),vP=5e3,SP=(...e)=>{},IP=e=>{const t=new AbortController,u=async(n=0)=>{try{SP("getConnectorsList",n);const r=await Xc(e);if(t.signal.aborted)throw new Error("Fetch aborted");return r}catch(r){if(t.signal.aborted)throw new Error("Fetch aborted");return n>2?(console.error("Failed to get connectors list after 3 tries",r),[]):u(n+1)}};return{fetchConnectors:u,abort:t.abort.bind(t)}},kP=()=>{const e={connectorApiPending:!1,connectorApiAbort:null,lastInboxKey:null,lastFetchTs:0};if(!Mt())throw new Error("Please initiate bifrost by calling initConnectorsBifrost function before creating app store");const u=OE({name:"app-store",initialState:{}}),n=()=>{const i=u.getData("inboxIds");if(!Array.isArray(i)||!i.length)return;const D=[...i].sort().join(","),c=Date.now();if(D===e.lastInboxKey&&c-e.lastFetchTs<vP)return;e.lastInboxKey=D,e.lastFetchTs=c,e.connectorApiAbort&&e.connectorApiAbort(),e.connectorApiPending=!0;const l={all:"true",inbox_id:i},{fetchConnectors:d,abort:F}=IP(l);e.connectorApiAbort=F,d().then(E=>{Array.isArray(E)&&u.setData(E,"connectors")}).catch(E=>{console.warn("Failed to fetch connectors",E)}).finally(()=>{e.connectorApiPending=!1})},r=i=>{(!Array.isArray(i)||!i.length)&&(i=u.getData("connectors")||[]);const D=u.getData("sideBarTabs")||0,c=[...i].sort((l,d)=>{const F=l.lastAccessed??0,E=d.lastAccessed??0;return F===E?0:F>E?-1:1}).map((l,d)=>({...l,sidebarView:d<D}));u.setData(c,"connectorTabs")},o=()=>{const i=u.getData("connectors");if(!Array.isArray(i))return n();typeof u.getData("sideBarTabs")=="number"&&r()},a=i=>{if(!i)return;const D=u.getData("connectorTabs"),c=D==null?void 0:D.find(d=>d.id===i);if(!c||c.sidebarView)return;const l=new Date().getTime();c.lastAccessed=l,r(D)};return u.subscribe(o,"connectors"),u.subscribe(()=>r(),"sideBarTabs",!1),u.subscribe(a,"connectorId",!1),u.subscribe(n,"inboxIds",!1),u},TP=({children:e})=>f.jsx(s.HiverProvider,{inter:!0,children:e}),LP=s.styled(({className:e,...t})=>f.jsx(s.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${s.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,width:"min-content",borderRadius:"12px",maxWidth:"90vw",boxShadow:"0px 3px 15px 0px #00000040",color:"#000"},[`& .${s.tooltipClasses.arrow}`]:{color:"#fff !important"}})),_P=s.styled(s.Stack)`
4918
+ `,FP=({expanded:e})=>f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,style:{transition:"transform 150ms ease",transform:e?"rotate(180deg)":"none"},children:f.jsx("path",{d:"M4 6l4 4 4-4"})}),hP=e=>{if(e.targetKind==="channel"){const t=[];for(const u of e.threads??[])t.push(u.root,...u.replies);return t}return e.messages},EP=e=>e.targetKind==="channel"?(e.threads??[]).reduce((t,u)=>t+1+u.replies.length,0):e.messages.length,mP=e=>{const t=hP(e).filter(u=>!u.deletedAt&&u.subtype!=="tombstone");return t.length===0?null:t.reduce((u,n)=>Number(n.postedAt)>Number(u.postedAt)?n:u)},bP=({onViewAll:e})=>{var j;const{hiverConvId:t,connectorId:u,smId:n,smIds:r,sendTrackingEvent:o,boxedMessages:a,isActive:i=!0}=qu(),D=c8(n,r);Pf(u,!0);const{state:c,connect:l}=Wo(u,{onConnected:()=>o==null?void 0:o(Ja)}),d=c==="connected",F=Zf(t,d,i?VN:0),{data:E,isLoading:C}=F8(t,d&&!!F.data),p=(j=F.data)==null?void 0:j.mentions,A=h.useMemo(()=>{const M=new Map;return(E??[]).forEach(H=>{H.name&&M.set(H.externalUserId,H.name)}),Object.entries(p??{}).forEach(([H,V])=>{V&&!M.has(H)&&M.set(H,V)}),M},[E,p]),[g,m]=h.useState(!0),[b,x]=h.useState(!1),y=c==="in_progress",B=h.useCallback(()=>{const M=c==="reauth_required"||c==="workspace_mismatch";o==null||o(za,{is_reauth:M}),l()},[l,o,c]),v=h.useCallback(()=>{o==null||o(A3),x(!0)},[o]);if(D.isLoading||D.data&&!D.data.enabled)return null;const S=d&&!F.isLoading?F.data:null,I=S?mP(S):null,_=I?a&&I.author.isSelf?"You":`${I.author.name||I.author.externalUserId}${!a&&I.author.isSelf?" (You)":""}`:"",L=()=>d?F.isLoading?null:S?f.jsxs(ri,{children:[f.jsxs(aP,{children:[f.jsx(sP,{children:"Channel:"}),f.jsxs(iP,{children:["#",S.channelName]})]}),I&&f.jsxs(DP,{children:[f.jsx(cP,{"aria-hidden":!0,children:f.jsx(Jf,{url:I.author.avatarUrl,name:I.author.name,fallbackId:I.author.externalUserId})}),f.jsxs(lP,{children:[f.jsxs(dP,{children:[f.jsx(AP,{title:_,children:_}),f.jsx(pP,{children:I8(I.postedAt,!!a)})]}),f.jsx(CP,{children:v8(X1(I.text),A,C)})]})]}),f.jsx(gP,{role:"button",tabIndex:0,onClick:()=>e==null?void 0:e(),children:"View all"})]}):f.jsxs(ri,{children:[f.jsx(r4,{children:"Start an internal discussion about this conversation."}),f.jsx(fP,{variant:"contained",disableElevation:!0,onClick:v,children:"+ Start new"})]}):f.jsxs(ri,{children:[f.jsx(r4,{children:"Discuss this customer issue with your team on Slack from Hiver. Connect Slack to get started."}),f.jsxs(A8,{disableElevation:!0,onClick:B,disabled:y,children:[f.jsx(n4,{size:16}),y?"Connecting…":"Connect Slack"]})]}),O=S?EP(S):0;return f.jsxs(tP,{children:[f.jsxs(uP,{role:"button",tabIndex:0,onClick:()=>m(M=>!M),children:[f.jsxs(nP,{children:[f.jsx(n4,{size:16}),f.jsx(rP,{children:"Slack"}),O>0&&f.jsx(oP,{children:O})]}),f.jsx(FP,{expanded:g})]}),g&&L(),f.jsx($8,{open:b,onClose:()=>x(!1)})]})},xP=({onViewAll:e,...t})=>f.jsx(u4,{...t,children:f.jsx(bP,{onViewAll:e})});function yP(e){var u;const t=Zf(e,!0,0);return(u=t.data)!=null&&u.channelName?{label:t.data.channelName,isLinked:!0}:{label:"Slack",isLinked:!1}}const BP=e=>Fe({url:Kw,method:ye.POST,data:e}),wP=e=>Fe({url:$w,method:ye.POST,data:e}),vP=5e3,SP=(...e)=>{},IP=e=>{const t=new AbortController,u=async(n=0)=>{try{SP("getConnectorsList",n);const r=await Xc(e);if(t.signal.aborted)throw new Error("Fetch aborted");return r}catch(r){if(t.signal.aborted)throw new Error("Fetch aborted");return n>2?(console.error("Failed to get connectors list after 3 tries",r),[]):u(n+1)}};return{fetchConnectors:u,abort:t.abort.bind(t)}},kP=()=>{const e={connectorApiPending:!1,connectorApiAbort:null,lastInboxKey:null,lastFetchTs:0};if(!Mt())throw new Error("Please initiate bifrost by calling initConnectorsBifrost function before creating app store");const u=OE({name:"app-store",initialState:{}}),n=()=>{const i=u.getData("inboxIds");if(!Array.isArray(i)||!i.length)return;const D=[...i].sort().join(","),c=Date.now();if(D===e.lastInboxKey&&c-e.lastFetchTs<vP)return;e.lastInboxKey=D,e.lastFetchTs=c,e.connectorApiAbort&&e.connectorApiAbort(),e.connectorApiPending=!0;const l={all:"true",inbox_id:i},{fetchConnectors:d,abort:F}=IP(l);e.connectorApiAbort=F,d().then(E=>{Array.isArray(E)&&u.setData(E,"connectors")}).catch(E=>{console.warn("Failed to fetch connectors",E)}).finally(()=>{e.connectorApiPending=!1})},r=i=>{(!Array.isArray(i)||!i.length)&&(i=u.getData("connectors")||[]);const D=u.getData("sideBarTabs")||0,c=[...i].sort((l,d)=>{const F=l.lastAccessed??0,E=d.lastAccessed??0;return F===E?0:F>E?-1:1}).map((l,d)=>({...l,sidebarView:d<D}));u.setData(c,"connectorTabs")},o=()=>{const i=u.getData("connectors");if(!Array.isArray(i))return n();typeof u.getData("sideBarTabs")=="number"&&r()},a=i=>{if(!i)return;const D=u.getData("connectorTabs"),c=D==null?void 0:D.find(d=>d.id===i);if(!c||c.sidebarView)return;const l=new Date().getTime();c.lastAccessed=l,r(D)};return u.subscribe(o,"connectors"),u.subscribe(()=>r(),"sideBarTabs",!1),u.subscribe(a,"connectorId",!1),u.subscribe(n,"inboxIds",!1),u},TP=({children:e})=>f.jsx(s.HiverProvider,{inter:!0,children:e}),LP=s.styled(({className:e,...t})=>f.jsx(s.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${s.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,width:"min-content",borderRadius:"12px",maxWidth:"90vw",boxShadow:"0px 3px 15px 0px #00000040",color:"#000"},[`& .${s.tooltipClasses.arrow}`]:{color:"#fff !important"}})),_P=s.styled(s.Stack)`
4915
4919
  box-sizing: content-box !important;
4916
4920
  display: flex;
4917
4921
  flex-direction: column;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.19.0",
3
+ "version": "4.19.1-slackStyles-beta.0",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",