@hiver/connector-agent 1.0.5-beta.2 → 1.0.5-beta.3

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.
package/index.es.js CHANGED
@@ -29459,7 +29459,7 @@ const yS = "success", IS = "error", bS = "Some error occured. Please contact sup
29459
29459
  ] }), C = (m, p, f) => {
29460
29460
  var E;
29461
29461
  const d = !!(A ? (E = u == null ? void 0 : u.listItems) != null && E.errorMessage : p);
29462
- return /* @__PURE__ */ k.jsx(k.Fragment, { children: o ? /* @__PURE__ */ k.jsx(Va, { variant: "rounded", width: 229, height: 20, animation: "wave", margin: "4px 0px" }) : /* @__PURE__ */ k.jsx("div", { children: d ? c() : f ? /* @__PURE__ */ k.jsx(tp, { target: "_blank", underline: "none", href: f, children: m }) : /* @__PURE__ */ k.jsx(LS, { variant: "body2", children: m }) }) });
29462
+ return /* @__PURE__ */ k.jsx(k.Fragment, { children: o ? /* @__PURE__ */ k.jsx(Va, { variant: "rounded", width: 229, height: 20, animation: "wave", margin: "4px 0px" }) : /* @__PURE__ */ k.jsx("div", { children: d ? c() : f ? /* @__PURE__ */ k.jsx(tp, { target: "_blank", underline: "none", href: f, fontSize: "13px", marginBottom: "8px", children: m }) : /* @__PURE__ */ k.jsx(LS, { variant: "body2", children: m }) }) });
29463
29463
  };
29464
29464
  return o && !u ? /* @__PURE__ */ k.jsxs(Wg, { children: [
29465
29465
  /* @__PURE__ */ k.jsx(Va, { variant: "rounded", width: 229, height: 20, animation: "wave", sx: { marginBottom: "5px" } }),
package/index.umd.js CHANGED
@@ -2227,7 +2227,7 @@ Take a look at the reducer(s) handling this action type: ${F.type}.
2227
2227
  transform: rotate(360deg);
2228
2228
  }
2229
2229
  }
2230
- `,JI="Please refresh and try again",f2="-",UI="Refresh",WI="Minimize",ZI="Expand",_I="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_602_78902)'%3e%3cpath%20d='M0.666992%2013.9999H15.3337L8.00033%201.33325L0.666992%2013.9999ZM8.66699%2011.9999H7.33366V10.6666H8.66699V11.9999ZM8.66699%209.33325H7.33366V6.66659H8.66699V9.33325Z'%20fill='%23F07530'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_602_78902'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",qI=u=>{var m;const{id:a,specificCardData:e,specificConnectorApiStatus:n,isOpen:i}=u,r=(n==null?void 0:n[a])===ne.LOADING,{cardType:E,data:t}=(e==null?void 0:e[a])||{},s=E==="flat",l=s?t==null?void 0:t.flatDisplay:(m=t==null?void 0:t.listItems)==null?void 0:m.fields,D=()=>M.jsxs(x2,{sx:{paddingBottom:"6px"},children:[M.jsx("img",{src:_I}),M.jsx(GI,{variant:"body2",children:JI})]}),B=(F,d,c)=>{var h;const A=!!(s?(h=t==null?void 0:t.listItems)!=null&&h.errorMessage:d);return M.jsx(M.Fragment,{children:r?M.jsx(cn,{variant:"rounded",width:229,height:20,animation:"wave",margin:"4px 0px"}):M.jsx("div",{children:A?D():c?M.jsx(Ss,{target:"_blank",underline:"none",href:c,children:F}):M.jsx(VI,{variant:"body2",children:F})})})};return r&&!t?M.jsxs(v2,{children:[M.jsx(cn,{variant:"rounded",width:229,height:20,animation:"wave",sx:{marginBottom:"5px"}}),M.jsx(cn,{variant:"rounded",width:229,height:20,animation:"wave",margin:"4px 0"})]}):M.jsx(v2,{className:i?"":"slideUp",children:l==null?void 0:l.map((F,d)=>{const c=d===l.length-1;if(Array.isArray(F))return M.jsxs("div",{children:[F.map(k=>{const{label:C,value:v}=k;return M.jsxs("div",{children:[M.jsx(k2,{variant:"overline",children:C}),B(v||f2)]},C)}),c?null:M.jsx(x3,{orientation:"horizontal",flexItem:!0,sx:{margin:"8px 0 8px -12px",width:"254px"}})]},`${a}_${d}`);const{value:A,label:h,errorMessage:x,deepLink:g}=F;return M.jsxs("div",{children:[M.jsx(k2,{variant:"overline",children:h}),B(A||f2,x,g)]},h)})})},YI="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",$I="enable_connectors_clicked",XI="learn_more_clicked",uT="connector_card_expand_clicked",aT="connector_card_collapsed_clicked",eT="connector_card_refresh_clicked",nT=u=>{const{card:a,specificCardData:e,email:n,specificConnectorApiStatus:i,defaultOpenState:r=!1}=u,{sendTrackingEvent:E}=f.useContext(x1),[t,s]=f.useState(!1),[l,D]=f.useState(!1),{id:B,title:m}=a,F=(i==null?void 0:i[B])===ne.LOADING,d=B2();f.useEffect(()=>{s(!!r)},[r]),f.useEffect(()=>{n&&B&&r&&d(An({id:B,email:n}))},[r,d,B,n]);const c=(x,g)=>{var C;x==null||x.stopPropagation(),d(An({id:g,email:n,isRefresh:!0})).unwrap().then(()=>{E(eT,{id:g})});const k=x.target.tagName==="BUTTON"?(C=x.target)==null?void 0:C.firstChild:x.target;k.className&&(k.className=""),setTimeout(()=>k.className="selected",1)},A=(x,g)=>{x.stopPropagation(),e!=null&&e[g]||d(An({id:g,email:n})),E(t?aT:uT,{id:g}),s(k=>!k)},h=x=>{x.stopPropagation();const g=x.currentTarget.offsetWidth<x.currentTarget.scrollWidth;D(!!g)};return M.jsxs(QI,{"data-testid":`test_${B}`,children:[M.jsxs(RI,{className:t?"hiver-card-expanded":"",children:[M.jsx(Xr,{title:l?m:"",placement:"bottom",children:M.jsx(HI,{variant:"h4",onMouseOver:x=>h(x),onMouseLeave:x=>h(x),children:m})}),M.jsxs(x2,{children:[t?M.jsx(Xr,{title:UI,placement:"bottom",children:M.jsx(p2,{"data-testid":F?"loading":"reloadIcon",onClick:x=>c(x,B),className:F?"disabled":"",children:M.jsx("img",{src:YI})})}):null,M.jsx(Xr,{title:t?WI:ZI,placement:"bottom",children:M.jsx(p2,{onClick:x=>A(x,B),children:M.jsx(OI,{className:t?"":"hiver-up"})})})]})]}),M.jsx(qI,{id:B,specificCardData:e,specificConnectorApiStatus:i,isOpen:t})]})},iT="Bring your favourite tools into Hiver",rT="Plugin image",oT="Authenticate and enable powerful integrations directly from the Admin panel to enhance your team's productivity.",ET="Enable connectors",tT="app/custom-connectors",lT="Enhance your team’s productivity by leveraging connectors to authenticate and enable powerful integrations",sT="Learn more",DT="https://help.hiverhq.com/",AT="Ask admin to enable Connectors",cT=J(sa)`
2230
+ `,JI="Please refresh and try again",f2="-",UI="Refresh",WI="Minimize",ZI="Expand",_I="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_602_78902)'%3e%3cpath%20d='M0.666992%2013.9999H15.3337L8.00033%201.33325L0.666992%2013.9999ZM8.66699%2011.9999H7.33366V10.6666H8.66699V11.9999ZM8.66699%209.33325H7.33366V6.66659H8.66699V9.33325Z'%20fill='%23F07530'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_602_78902'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",qI=u=>{var m;const{id:a,specificCardData:e,specificConnectorApiStatus:n,isOpen:i}=u,r=(n==null?void 0:n[a])===ne.LOADING,{cardType:E,data:t}=(e==null?void 0:e[a])||{},s=E==="flat",l=s?t==null?void 0:t.flatDisplay:(m=t==null?void 0:t.listItems)==null?void 0:m.fields,D=()=>M.jsxs(x2,{sx:{paddingBottom:"6px"},children:[M.jsx("img",{src:_I}),M.jsx(GI,{variant:"body2",children:JI})]}),B=(F,d,c)=>{var h;const A=!!(s?(h=t==null?void 0:t.listItems)!=null&&h.errorMessage:d);return M.jsx(M.Fragment,{children:r?M.jsx(cn,{variant:"rounded",width:229,height:20,animation:"wave",margin:"4px 0px"}):M.jsx("div",{children:A?D():c?M.jsx(Ss,{target:"_blank",underline:"none",href:c,fontSize:"13px",marginBottom:"8px",children:F}):M.jsx(VI,{variant:"body2",children:F})})})};return r&&!t?M.jsxs(v2,{children:[M.jsx(cn,{variant:"rounded",width:229,height:20,animation:"wave",sx:{marginBottom:"5px"}}),M.jsx(cn,{variant:"rounded",width:229,height:20,animation:"wave",margin:"4px 0"})]}):M.jsx(v2,{className:i?"":"slideUp",children:l==null?void 0:l.map((F,d)=>{const c=d===l.length-1;if(Array.isArray(F))return M.jsxs("div",{children:[F.map(k=>{const{label:C,value:v}=k;return M.jsxs("div",{children:[M.jsx(k2,{variant:"overline",children:C}),B(v||f2)]},C)}),c?null:M.jsx(x3,{orientation:"horizontal",flexItem:!0,sx:{margin:"8px 0 8px -12px",width:"254px"}})]},`${a}_${d}`);const{value:A,label:h,errorMessage:x,deepLink:g}=F;return M.jsxs("div",{children:[M.jsx(k2,{variant:"overline",children:h}),B(A||f2,x,g)]},h)})})},YI="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",$I="enable_connectors_clicked",XI="learn_more_clicked",uT="connector_card_expand_clicked",aT="connector_card_collapsed_clicked",eT="connector_card_refresh_clicked",nT=u=>{const{card:a,specificCardData:e,email:n,specificConnectorApiStatus:i,defaultOpenState:r=!1}=u,{sendTrackingEvent:E}=f.useContext(x1),[t,s]=f.useState(!1),[l,D]=f.useState(!1),{id:B,title:m}=a,F=(i==null?void 0:i[B])===ne.LOADING,d=B2();f.useEffect(()=>{s(!!r)},[r]),f.useEffect(()=>{n&&B&&r&&d(An({id:B,email:n}))},[r,d,B,n]);const c=(x,g)=>{var C;x==null||x.stopPropagation(),d(An({id:g,email:n,isRefresh:!0})).unwrap().then(()=>{E(eT,{id:g})});const k=x.target.tagName==="BUTTON"?(C=x.target)==null?void 0:C.firstChild:x.target;k.className&&(k.className=""),setTimeout(()=>k.className="selected",1)},A=(x,g)=>{x.stopPropagation(),e!=null&&e[g]||d(An({id:g,email:n})),E(t?aT:uT,{id:g}),s(k=>!k)},h=x=>{x.stopPropagation();const g=x.currentTarget.offsetWidth<x.currentTarget.scrollWidth;D(!!g)};return M.jsxs(QI,{"data-testid":`test_${B}`,children:[M.jsxs(RI,{className:t?"hiver-card-expanded":"",children:[M.jsx(Xr,{title:l?m:"",placement:"bottom",children:M.jsx(HI,{variant:"h4",onMouseOver:x=>h(x),onMouseLeave:x=>h(x),children:m})}),M.jsxs(x2,{children:[t?M.jsx(Xr,{title:UI,placement:"bottom",children:M.jsx(p2,{"data-testid":F?"loading":"reloadIcon",onClick:x=>c(x,B),className:F?"disabled":"",children:M.jsx("img",{src:YI})})}):null,M.jsx(Xr,{title:t?WI:ZI,placement:"bottom",children:M.jsx(p2,{onClick:x=>A(x,B),children:M.jsx(OI,{className:t?"":"hiver-up"})})})]})]}),M.jsx(qI,{id:B,specificCardData:e,specificConnectorApiStatus:i,isOpen:t})]})},iT="Bring your favourite tools into Hiver",rT="Plugin image",oT="Authenticate and enable powerful integrations directly from the Admin panel to enhance your team's productivity.",ET="Enable connectors",tT="app/custom-connectors",lT="Enhance your team’s productivity by leveraging connectors to authenticate and enable powerful integrations",sT="Learn more",DT="https://help.hiverhq.com/",AT="Ask admin to enable Connectors",cT=J(sa)`
2231
2231
  width: 250px;
2232
2232
  height: 97px;
2233
2233
  background-color: ${O0.palette.purple.light};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "1.0.5-beta.2",
3
+ "version": "1.0.5-beta.3",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",