@hiver/connector-admin 0.0.10-beta.63 → 0.0.10-beta.64

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,4 +1,4 @@
1
- import { b4 as s, b5 as e } from "./index-CnGdukeT.js";
1
+ import { b4 as s, b5 as e } from "./index-D3IxjdLm.js";
2
2
  const t = s.withTypes(), a = e.withTypes();
3
3
  export {
4
4
  a,
@@ -1,9 +1,9 @@
1
- import { s as X, b as j, o as je, T as pe, u as Ot, j as C, an as Vn, ao as G, ap as Mt, aq as ct, ar as Tn, B as z, as as Wn, w as Rn, at as Nn, au as Xn, av as Se, aw as Zn, i as kt, ax as $, ay as wn, az as Hn, aA as dt, aB as gt, aC as Pn, A as ze, aD as Ln, x as Dn, y as On, aE as Mn, aF as kn, z as Jn, D as Yn, aG as Le, R as he, aH as jn, aI as bt, aJ as zn, aK as Un } from "./index-CnGdukeT.js";
1
+ import { s as X, b as j, o as je, T as pe, u as Ot, j as C, an as Vn, ao as G, ap as Mt, aq as ct, ar as Tn, B as z, as as Wn, w as Rn, at as Nn, au as Xn, av as Se, aw as Zn, i as kt, ax as $, ay as wn, az as Hn, aA as dt, aB as gt, aC as Pn, A as ze, aD as Ln, x as Dn, y as On, aE as Mn, aF as kn, z as Jn, D as Yn, aG as Le, R as he, aH as jn, aI as bt, aJ as zn, aK as Un } from "./index-D3IxjdLm.js";
2
2
  import * as W from "react";
3
3
  import Qn, { useState as J, useCallback as L, useLayoutEffect as _n, useRef as te, useMemo as me, createContext as Kn, useContext as $n, Component as qn, Fragment as Ue, useEffect as ne, forwardRef as ei, useReducer as ti } from "react";
4
4
  import { createPortal as ni } from "react-dom";
5
- import { T as pt, C as It, A as ii, d as ui, e as ri, f as ai, g as oi, k as mt, S as li, m as si } from "./showMessage-CxEW5K4O.js";
6
- import { u as et, a as ce } from "./hooks-xJVBs9-M.js";
5
+ import { T as pt, C as It, A as ii, d as ui, e as ri, f as ai, g as oi, k as mt, S as li, m as si } from "./showMessage-CsHWmnYm.js";
6
+ import { u as et, a as ce } from "./hooks-Ci5COiG3.js";
7
7
  import { s as ci, a as di, b as gi, c as bi } from "./selectors-BZXXKPzK.js";
8
8
  const pi = X(j)`
9
9
  margin-bottom: 36px;
@@ -1,8 +1,8 @@
1
- import { s as c, b as o, o as f, j as t, i as j, T as d, w as y, u as S, x as b, y as v, z as T, D as I, R as E, A as C } from "./index-CnGdukeT.js";
1
+ import { s as c, b as o, o as f, j as t, i as j, T as d, w as y, u as S, x as b, y as v, z as T, D as I, R as E, A as C } from "./index-D3IxjdLm.js";
2
2
  import { useState as D, useEffect as P } from "react";
3
- import { a as h, u as k } from "./hooks-xJVBs9-M.js";
4
- import { C as L, d as B, e as M, f as R, g as N, T as _ } from "./showMessage-CxEW5K4O.js";
5
- import { c as Z, b as W } from "./index-BNnSpcT5.js";
3
+ import { a as h, u as k } from "./hooks-Ci5COiG3.js";
4
+ import { C as L, d as B, e as M, f as R, g as N, T as _ } from "./showMessage-CsHWmnYm.js";
5
+ import { c as Z, b as W } from "./index-D737EOuc.js";
6
6
  const q = "{{connector}} features", F = "Following are the list of features that you will find in this connector", O = "Request new Feature", $ = c(o)`
7
7
  width: 100%;
8
8
  height: ${(s) => s.height ? s.height : "72px"};
@@ -1,4 +1,4 @@
1
- import { s as g, b as C, B as I, M as r, j as A, m as v, T as B, n as t, p as u, H as d, q as e, r as s, t as w, v as b } from "./index-CnGdukeT.js";
1
+ import { s as g, b as C, B as I, M as r, j as A, m as v, T as B, n as t, p as u, H as d, q as e, r as s, t as w, v as b } from "./index-D3IxjdLm.js";
2
2
  import { useContext as X } from "react";
3
3
  const W = g(C)`
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import { s as o, B as s, T as u, M as m, u as S, a as b, R as C, S as d, j as i, C as B, b as v, c as j, O as k } from "./index-CnGdukeT.js";
1
+ import { s as o, B as s, T as u, M as m, u as S, a as b, R as C, S as d, j as i, C as B, b as v, c as j, O as k } from "./index-D3IxjdLm.js";
2
2
  import { useContext as E, useEffect as O } from "react";
3
3
  const T = o(s)`
4
4
  box-sizing: border-box;
@@ -30651,35 +30651,35 @@ const kk = (e) => ck(
30651
30651
  {
30652
30652
  path: qt.BASEPATH,
30653
30653
  lazy: async () => {
30654
- const { ConnectorView: t } = await import("./index-BTQFrCo5.js");
30654
+ const { ConnectorView: t } = await import("./index-ClpX18nl.js");
30655
30655
  return { Component: t };
30656
30656
  },
30657
30657
  children: [
30658
30658
  {
30659
30659
  index: !0,
30660
30660
  lazy: async () => {
30661
- const { Dashboard: t } = await import("./index-DiP9d_Kk.js");
30661
+ const { Dashboard: t } = await import("./index-DgXKnI2y.js");
30662
30662
  return { Component: t };
30663
30663
  }
30664
30664
  },
30665
30665
  {
30666
30666
  path: qt.DASHBOARD,
30667
30667
  lazy: async () => {
30668
- const { Dashboard: t } = await import("./index-DiP9d_Kk.js");
30668
+ const { Dashboard: t } = await import("./index-DgXKnI2y.js");
30669
30669
  return { Component: t };
30670
30670
  }
30671
30671
  },
30672
30672
  {
30673
30673
  path: qt.AGENT,
30674
30674
  lazy: async () => {
30675
- const { Agent: t } = await import("./index-KK8byXfd.js");
30675
+ const { Agent: t } = await import("./index-C9hf0Dbw.js");
30676
30676
  return { Component: t };
30677
30677
  }
30678
30678
  },
30679
30679
  {
30680
30680
  path: `${qt.API_VIEW}/:id`,
30681
30681
  lazy: async () => {
30682
- const { ConnectorConfig: t } = await import("./index-Bl8mDl0T.js");
30682
+ const { ConnectorConfig: t } = await import("./index-BnYL9Q-h.js");
30683
30683
  return { Component: t };
30684
30684
  }
30685
30685
  }
@@ -30688,14 +30688,14 @@ const kk = (e) => ck(
30688
30688
  {
30689
30689
  path: `${qt.CONNECTOR_SETTINGS}/:id`,
30690
30690
  lazy: async () => {
30691
- const { Settings: t } = await import("./index-BhYWFgoZ.js");
30691
+ const { Settings: t } = await import("./index-BdVt9Juw.js");
30692
30692
  return { Component: t };
30693
30693
  }
30694
30694
  },
30695
30695
  {
30696
30696
  path: qt.AUTH_SUCCESS,
30697
30697
  lazy: async () => {
30698
- const { AuthSuccess: t } = await import("./index-BvIFR5LY.js");
30698
+ const { AuthSuccess: t } = await import("./index-DaDXIxxi.js");
30699
30699
  return { Component: t };
30700
30700
  }
30701
30701
  }
@@ -1,8 +1,8 @@
1
- import { E as S2, F as l2, G as c2, J as a0, _ as c, K as bA, N as YA, s as D, P as d, Q as ZA, U as wA, j as I, V as j, W as C, X as NA, Y as f2, Z as _, $ as W2, a0 as m2, a1 as s0, a2 as F2, a3 as mA, a4 as V2, a5 as jA, w as D2, a6 as u2, a7 as c0, a8 as K2, a9 as i0, aa as $2, ab as l0, ac as Y2, ad as d0, ae as f0, af as D0, ag as u0, ah as w0, ai as p0, B as UA, o as MA, T as LA, b as T, i as g2, u as v0, A as d2, aj as M0, R as qA, ak as L0, al as P0, am as U0 } from "./index-CnGdukeT.js";
1
+ import { E as S2, F as l2, G as c2, J as a0, _ as c, K as bA, N as YA, s as D, P as d, Q as ZA, U as wA, j as I, V as j, W as C, X as NA, Y as f2, Z as _, $ as W2, a0 as m2, a1 as s0, a2 as F2, a3 as mA, a4 as V2, a5 as jA, w as D2, a6 as u2, a7 as c0, a8 as K2, a9 as i0, aa as $2, ab as l0, ac as Y2, ad as d0, ae as f0, af as D0, ag as u0, ah as w0, ai as p0, B as UA, o as MA, T as LA, b as T, i as g2, u as v0, A as d2, aj as M0, R as qA, ak as L0, al as P0, am as U0 } from "./index-D3IxjdLm.js";
2
2
  import * as L from "react";
3
3
  import { useState as RA, useEffect as h2 } from "react";
4
- import { a as HA, u as _2 } from "./hooks-xJVBs9-M.js";
5
- import { P as A0, h as F0, T as H2, A as h0, i as x0, j as O0, f as m0, k as b2, l as H0, I as b0, E as Y0, m as C0 } from "./showMessage-CxEW5K4O.js";
4
+ import { a as HA, u as _2 } from "./hooks-Ci5COiG3.js";
5
+ import { P as A0, h as F0, T as H2, A as h0, i as x0, j as O0, f as m0, k as b2, l as H0, I as b0, E as Y0, m as C0 } from "./showMessage-CsHWmnYm.js";
6
6
  const N0 = (A) => {
7
7
  const g = L.useRef({});
8
8
  return L.useEffect(() => {
@@ -3657,14 +3657,14 @@ const Dg = D(h0)`
3657
3657
  const r = _2(), i = HA(wg), n = HA(pg), a = HA(r0), [v, u] = RA(""), [w, p] = RA([]), [x, O] = RA([]), [y, q] = RA(!1), [K, k] = RA(!1), b = () => {
3658
3658
  const R = e ? Z2.API : Z2.CONNECTOR, s = x.map((F) => F.id);
3659
3659
  r(U0({ type: R, values: s, description: v })).unwrap().then(() => {
3660
- k(!0), O([]), u("");
3660
+ k(!0);
3661
3661
  }).catch(() => {
3662
3662
  b2({ message: "Failed to submit the request. Please try again.", type: C0 });
3663
3663
  });
3664
3664
  };
3665
- h2(() => {
3666
- A && K && k(!1);
3667
- }, [A]), h2(() => {
3665
+ h2(() => (A && K && k(!1), () => {
3666
+ O([]), u("");
3667
+ }), [A]), h2(() => {
3668
3668
  var R;
3669
3669
  if (e) {
3670
3670
  const s = ((R = n == null ? void 0 : n.find((F) => F.connector_type === E)) == null ? void 0 : R.apis) || [];
@@ -1,6 +1,6 @@
1
- import { s as p, B as d, b1 as f, b2 as A, b3 as h, A as u, aH as w, aI as l, j as e } from "./index-CnGdukeT.js";
1
+ import { s as p, B as d, b1 as f, b2 as A, b3 as h, A as u, aH as w, aI as l, j as e } from "./index-D3IxjdLm.js";
2
2
  import { useEffect as r } from "react";
3
- import { u as m, a as c } from "./hooks-xJVBs9-M.js";
3
+ import { u as m, a as c } from "./hooks-Ci5COiG3.js";
4
4
  import { d as S, e as x } from "./selectors-BZXXKPzK.js";
5
5
  const T = p(d)`
6
6
  position: fixed;
@@ -1,8 +1,8 @@
1
- import { s as e, o as n, j as t, u as H, f as _, L as v, A as E, d as A, e as T, g as S, h as N, R as g, I as D, b, B as h, T as d, i as w, k as R, l as I } from "./index-CnGdukeT.js";
1
+ import { s as e, o as n, j as t, u as H, f as _, L as v, A as E, d as A, e as T, g as S, h as N, R as g, I as D, b, B as h, T as d, i as w, k as R, l as I } from "./index-D3IxjdLm.js";
2
2
  import { useEffect as m, useState as M } from "react";
3
- import { E as O, a as B, R as f, C as V, b as $, c as U } from "./index-BNnSpcT5.js";
4
- import { u as j, a as l } from "./hooks-xJVBs9-M.js";
5
- import { C as x, s as y, a as W, b as P, c as Z, d as q } from "./showMessage-CxEW5K4O.js";
3
+ import { E as O, a as B, R as f, C as V, b as $, c as U } from "./index-D737EOuc.js";
4
+ import { u as j, a as l } from "./hooks-Ci5COiG3.js";
5
+ import { C as x, s as y, a as W, b as P, c as Z, d as q } from "./showMessage-CsHWmnYm.js";
6
6
  const z = e("li")`
7
7
  width: 252px;
8
8
  height: 187px;
package/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b6 as e, b7 as o, b8 as t, b9 as a } from "./index-CnGdukeT.js";
1
+ import { b6 as e, b7 as o, b8 as t, b9 as a } from "./index-D3IxjdLm.js";
2
2
  export {
3
3
  e as ConnectorsApp,
4
4
  o as setAppConfig,
package/index.umd.js CHANGED
@@ -3475,7 +3475,7 @@ Take a look at the reducer(s) handling this action type: ${f.type}.
3475
3475
  top: calc(50% - 2px);
3476
3476
  }
3477
3477
  }
3478
- `,Ij=({connectors:A,canSubmit:e,setSelectedConnectors:t,selectedConnectors:n,setOptionalDetails:r,handleSubmit:o,isApiText:g})=>{const a=ke(Ff)===RA.LOADING,s=n.length===0?g?CH:iH:"";return w.jsx(PA,{"data-testid":"request-panel",children:w.jsxs(PA,{padding:"30px",height:"100%",children:[w.jsx(PA,{width:"440px",height:"100%",children:w.jsxs(PA,{gap:"14px",children:[w.jsxs(PA,{gap:"4px",marginBottom:"36px",children:[w.jsx(ee,{variant:"h2",children:g?rH:oH}),w.jsx(ee,{variant:"body2",children:g?vf:gH})]}),w.jsx(ll,{"data-testid":"request-dropdown",disablePortal:!0,multiple:!0,disableCloseOnSelect:!0,limitTags:2,options:A,disabled:a,isOptionEqualToValue:(E,I)=>E.id===I.id,renderOption:(E,I,{selected:Q})=>{const{key:f,...c}=E;return w.jsxs(JA,{component:"li",...c,height:"36px",children:[w.jsx(pl,{style:{marginRight:8},checked:Q}),I.label]},f)},renderInput:E=>w.jsx(Ej,{...E,variant:"outlined",placeholder:s}),onChange:(E,I)=>{t(I)}}),w.jsx(Lf,{multiline:!0,fullWidth:!0,minRows:8,variant:"outlined",disabled:a,placeholder:aH,onChange:E=>{r(E.target.value)}})]})}),w.jsx(PA,{alignItems:"flex-end",children:w.jsx(vt,{"data-testid":"submit-request-button",onClick:o,color:"tertiary",size:"medium",sx:{height:"32px",width:"140.25px"},disabled:!e||a,children:a?w.jsx(GF,{sx:{color:"#97A3B7"},size:20}):w.jsx("div",{children:sH})})})]})})},Bj=({handleClose:A})=>w.jsx(PA,{children:w.jsxs(PA,{padding:"30px",height:"100%",children:[w.jsx(PA,{width:"378px",height:"100%",justifyContent:"center",children:w.jsxs(PA,{gap:"14px",children:[w.jsx("img",{src:Df,alt:"checkmark",width:92,height:92}),w.jsxs(PA,{gap:"4px",children:[w.jsx(ee,{variant:"h2",children:EH}),w.jsx(ee,{variant:"body2",children:IH})]})]})}),w.jsx(PA,{alignItems:"flex-end",children:w.jsx(sj,{onClick:A,variant:"outlined",color:"tertiary",size:"medium",children:BH})})]})}),Of=({shown:A,setShown:e,connectorType:t,isApi:n=!1})=>{const r=br(),o=ke(Cj),g=ke(ij),i=ke(Ff),[a,s]=x.useState(""),[E,I]=x.useState([]),[Q,f]=x.useState([]),[c,l]=x.useState(!1),[B,u]=x.useState(!1),h=()=>{const v=n?bf.API:bf.CONNECTOR,d=Q.map(m=>m.id);r(pi({type:v,values:d,description:a})).unwrap().then(()=>{u(!0),f([]),s("")}).catch(()=>{J0({message:"Failed to submit the request. Please try again.",type:ki})})};x.useEffect(()=>{A&&B&&u(!1)},[A]),x.useEffect(()=>{var v;if(n){const d=((v=g==null?void 0:g.find(m=>m.connector_type===t))==null?void 0:v.apis)||[];I(d.map(m=>({label:m.name,id:m.key})))}else I((o||[]).map(d=>({label:d.name,id:d.key})))},[g,o,n,t]),x.useEffect(()=>{l(Q.length>0)},[Q,a]);const p=B&&i!==RA.LOADING;return w.jsxs(Pf,{shown:A,setShown:e,showCloseButton:!0,children:[p?w.jsx(Bj,{handleClose:()=>e(!1)}):w.jsx(Ij,{connectors:E,canSubmit:c,setSelectedConnectors:f,selectedConnectors:Q,setOptionalDetails:s,handleSubmit:h,isApiText:n}),w.jsx(aj,{children:w.jsx("img",{loading:"lazy",className:"request-new-connector-img",src:gj,alt:"Request new connector"})})]})},lj="Custom Connectors",Qj="Connectors help you get a better customer context and key actions right into your inbox",cj="Library",uj="Use these pre-built connectors to get started without any hassle. Authenticate and access them from the right panel of Hiver.",dj=H(JA)`
3478
+ `,Ij=({connectors:A,canSubmit:e,setSelectedConnectors:t,selectedConnectors:n,setOptionalDetails:r,handleSubmit:o,isApiText:g})=>{const a=ke(Ff)===RA.LOADING,s=n.length===0?g?CH:iH:"";return w.jsx(PA,{"data-testid":"request-panel",children:w.jsxs(PA,{padding:"30px",height:"100%",children:[w.jsx(PA,{width:"440px",height:"100%",children:w.jsxs(PA,{gap:"14px",children:[w.jsxs(PA,{gap:"4px",marginBottom:"36px",children:[w.jsx(ee,{variant:"h2",children:g?rH:oH}),w.jsx(ee,{variant:"body2",children:g?vf:gH})]}),w.jsx(ll,{"data-testid":"request-dropdown",disablePortal:!0,multiple:!0,disableCloseOnSelect:!0,limitTags:2,options:A,disabled:a,isOptionEqualToValue:(E,I)=>E.id===I.id,renderOption:(E,I,{selected:Q})=>{const{key:f,...c}=E;return w.jsxs(JA,{component:"li",...c,height:"36px",children:[w.jsx(pl,{style:{marginRight:8},checked:Q}),I.label]},f)},renderInput:E=>w.jsx(Ej,{...E,variant:"outlined",placeholder:s}),onChange:(E,I)=>{t(I)}}),w.jsx(Lf,{multiline:!0,fullWidth:!0,minRows:8,variant:"outlined",disabled:a,placeholder:aH,onChange:E=>{r(E.target.value)}})]})}),w.jsx(PA,{alignItems:"flex-end",children:w.jsx(vt,{"data-testid":"submit-request-button",onClick:o,color:"tertiary",size:"medium",sx:{height:"32px",width:"140.25px"},disabled:!e||a,children:a?w.jsx(GF,{sx:{color:"#97A3B7"},size:20}):w.jsx("div",{children:sH})})})]})})},Bj=({handleClose:A})=>w.jsx(PA,{children:w.jsxs(PA,{padding:"30px",height:"100%",children:[w.jsx(PA,{width:"378px",height:"100%",justifyContent:"center",children:w.jsxs(PA,{gap:"14px",children:[w.jsx("img",{src:Df,alt:"checkmark",width:92,height:92}),w.jsxs(PA,{gap:"4px",children:[w.jsx(ee,{variant:"h2",children:EH}),w.jsx(ee,{variant:"body2",children:IH})]})]})}),w.jsx(PA,{alignItems:"flex-end",children:w.jsx(sj,{onClick:A,variant:"outlined",color:"tertiary",size:"medium",children:BH})})]})}),Of=({shown:A,setShown:e,connectorType:t,isApi:n=!1})=>{const r=br(),o=ke(Cj),g=ke(ij),i=ke(Ff),[a,s]=x.useState(""),[E,I]=x.useState([]),[Q,f]=x.useState([]),[c,l]=x.useState(!1),[B,u]=x.useState(!1),h=()=>{const v=n?bf.API:bf.CONNECTOR,d=Q.map(m=>m.id);r(pi({type:v,values:d,description:a})).unwrap().then(()=>{u(!0)}).catch(()=>{J0({message:"Failed to submit the request. Please try again.",type:ki})})};x.useEffect(()=>(A&&B&&u(!1),()=>{f([]),s("")}),[A]),x.useEffect(()=>{var v;if(n){const d=((v=g==null?void 0:g.find(m=>m.connector_type===t))==null?void 0:v.apis)||[];I(d.map(m=>({label:m.name,id:m.key})))}else I((o||[]).map(d=>({label:d.name,id:d.key})))},[g,o,n,t]),x.useEffect(()=>{l(Q.length>0)},[Q,a]);const p=B&&i!==RA.LOADING;return w.jsxs(Pf,{shown:A,setShown:e,showCloseButton:!0,children:[p?w.jsx(Bj,{handleClose:()=>e(!1)}):w.jsx(Ij,{connectors:E,canSubmit:c,setSelectedConnectors:f,selectedConnectors:Q,setOptionalDetails:s,handleSubmit:h,isApiText:n}),w.jsx(aj,{children:w.jsx("img",{loading:"lazy",className:"request-new-connector-img",src:gj,alt:"Request new connector"})})]})},lj="Custom Connectors",Qj="Connectors help you get a better customer context and key actions right into your inbox",cj="Library",uj="Use these pre-built connectors to get started without any hassle. Authenticate and access them from the right panel of Hiver.",dj=H(JA)`
3479
3479
  padding: 14px 0px 0 32px;
3480
3480
  box-sizing: border-box;
3481
3481
  `,fj=H(PA)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-admin",
3
- "version": "0.0.10-beta.63",
3
+ "version": "0.0.10-beta.64",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",
@@ -1,4 +1,4 @@
1
- import { aL as Zo, aM as Yt, N as dt, K as vt, Y as ze, j as P, s as F, a6 as Qo, P as Fe, ai as Gt, ah as Kt, _ as w, Q as mt, U as Me, aN as Zt, w as Jo, V as Ce, W as n, X as ht, aO as er, aP as Qt, aQ as tr, a8 as or, aR as pt, ac as xo, $ as Ct, aS as Jt, aT as rr, an as Oo, ap as eo, Z as To, af as nr, aU as ar, aV as ot, F as ir, E as sr, G as to, aW as lr, aX as oo, aY as rt, aZ as pr, a_ as cr, B as Po, a$ as fr, b as ur, b0 as _e } from "./index-CnGdukeT.js";
1
+ import { aL as Zo, aM as Yt, N as dt, K as vt, Y as ze, j as P, s as F, a6 as Qo, P as Fe, ai as Gt, ah as Kt, _ as w, Q as mt, U as Me, aN as Zt, w as Jo, V as Ce, W as n, X as ht, aO as er, aP as Qt, aQ as tr, a8 as or, aR as pt, ac as xo, $ as Ct, aS as Jt, aT as rr, an as Oo, ap as eo, Z as To, af as nr, aU as ar, aV as ot, F as ir, E as sr, G as to, aW as lr, aX as oo, aY as rt, aZ as pr, a_ as cr, B as Po, a$ as fr, b as ur, b0 as _e } from "./index-D3IxjdLm.js";
2
2
  import * as M from "react";
3
3
  import dr from "react";
4
4
  function vr(e, t = 0, o = 1) {