@hiver/connector-admin 0.0.8-beta.0 → 0.0.8

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.
@@ -0,0 +1,55 @@
1
+ import { s as o, B as e, M as c, j as t, C as d, N as h, S as l, a as g, O as f } from "./index-g_hNAZie.js";
2
+ import { useContext as m } from "react";
3
+ import { T as b } from "./Typography-BvoDUPsi.js";
4
+ const u = o(e)`
5
+ box-sizing: border-box;
6
+ background-color: #ffffff;
7
+ position: fixed;
8
+ height: 100%;
9
+ z-index: 2;
10
+ `, j = o(e)`
11
+ padding-top: 17px;
12
+ box-sizing: border-box;
13
+ width: 178px;
14
+ border-right: 1px solid rgba(214, 221, 232, 1);
15
+ height: 100%;
16
+ `, C = o(b)`
17
+ font-size: 14px;
18
+ line-height: 24px;
19
+ `, O = o(e)`
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 8px;
23
+ margin-top: 29px;
24
+ & a {
25
+ display: block;
26
+ height: 32px;
27
+ width: 162px;
28
+ padding: 4px 12px;
29
+ text-decoration: none;
30
+ color: #6f7c90;
31
+ font-size: 13px;
32
+ line-height: 24px;
33
+ &.active {
34
+ font-size: 14px;
35
+ background-color: rgba(246, 248, 252, 1);
36
+ border-radius: 4px;
37
+ color: #343c45;
38
+ }
39
+ }
40
+ `, S = ({ sidebarOptions: n = [] }) => {
41
+ const { currentSideBar: s } = m(c), a = () => /* @__PURE__ */ t.jsx(O, { children: n.map(({ id: i, value: r, route: p }) => {
42
+ const x = s === r;
43
+ return /* @__PURE__ */ t.jsx(h, { to: p, "data-testid": i, className: x ? "active" : "", children: r }, i);
44
+ }) });
45
+ return /* @__PURE__ */ t.jsx(u, { "data-testid": "sideBarParent", children: /* @__PURE__ */ t.jsxs(j, { children: [
46
+ /* @__PURE__ */ t.jsx(C, { variant: "h3", "data-testid": "custom-connector-heading", children: d }),
47
+ a()
48
+ ] }) });
49
+ }, v = () => /* @__PURE__ */ t.jsxs(l, { direction: "row", alignItems: "stretch", sx: { minHeight: "100vh" }, children: [
50
+ /* @__PURE__ */ t.jsx(S, { sidebarOptions: g }),
51
+ /* @__PURE__ */ t.jsx(f, {})
52
+ ] });
53
+ export {
54
+ v as ConnectorView
55
+ };
@@ -0,0 +1,5 @@
1
+ import { j as r } from "./index-g_hNAZie.js";
2
+ const e = () => /* @__PURE__ */ r.jsx("div", { children: "Agent Dashboard" });
3
+ export {
4
+ e as Agent
5
+ };
@@ -0,0 +1,68 @@
1
+ import { s as c, S as n, I as b, K as f, j as t, Z as v, R as w, U as m, L as A } from "./index-g_hNAZie.js";
2
+ import { C as g, a as r, t as I, b as S, v as y, w as T, x as P, T as k, r as B } from "./index-CPqWySPe.js";
3
+ import { useRef as E } from "react";
4
+ import { T as p } from "./Typography-BvoDUPsi.js";
5
+ const Z = c(n)`
6
+ margin: 43px 0 0 229px;
7
+ position: relative;
8
+ `, M = c(b)`
9
+ position: absolute;
10
+ left: -30px;
11
+ img {
12
+ width: 15px;
13
+ height: 15px;
14
+ margin: 3.5px 2.5px;
15
+ }
16
+ `, _ = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.86421%2015.9708C9.20287%2016.3941%209.13423%2017.0118%208.71091%2017.3505C8.28758%2017.6891%207.66987%2017.6205%207.33121%2017.1972L8.86421%2015.9708ZM2.94434%2010.1423L2.17784%2010.7555C1.89104%2010.397%201.89104%209.88757%202.17784%209.52907L2.94434%2010.1423ZM7.33121%203.08735C7.66987%202.66403%208.28758%202.59539%208.71091%202.93405C9.13423%203.27271%209.20287%203.89042%208.86421%204.31375L7.33121%203.08735ZM3.31243%2011.1852C2.77031%2011.1852%202.33084%2010.7457%202.33084%2010.2036C2.33084%209.66149%202.77031%209.22201%203.31243%209.22201L3.31243%2011.1852ZM17.0548%209.22201C17.5969%209.22201%2018.0364%209.66149%2018.0364%2010.2036C18.0364%2010.7457%2017.5969%2011.1852%2017.0548%2011.1852V9.22201ZM7.33121%2017.1972L2.17784%2010.7555L3.71083%209.52907L8.86421%2015.9708L7.33121%2017.1972ZM2.17784%209.52907L7.33121%203.08735L8.86421%204.31375L3.71083%2010.7555L2.17784%209.52907ZM3.31243%209.22201L17.0548%209.22201V11.1852L3.31243%2011.1852L3.31243%209.22201Z'%20fill='%236F7C90'/%3e%3c/svg%3e", R = c(n)`
17
+ margin-left: 32px;
18
+ `, N = "APIs in {{connector}} connector", D = "Following are the list of APIs that you will find in this connector", W = c(n)`
19
+ width: 100%;
20
+ height: 72px;
21
+ gap: 12px;
22
+ padding: 16px;
23
+ border: 1px solid ${f.palette.gray.gray6};
24
+ border-radius: 8px;
25
+ box-sizing: border-box;
26
+ `, O = () => /* @__PURE__ */ t.jsx(n, { gap: "12px", children: Array(3).fill(0).map((e, s) => /* @__PURE__ */ t.jsxs(W, { children: [
27
+ /* @__PURE__ */ t.jsx(g, { variant: "rounded", width: "40%", height: "10px", animation: "wave" }),
28
+ /* @__PURE__ */ t.jsx(g, { variant: "rounded", width: "80%", height: "10px", animation: "wave" })
29
+ ] }, s)) }), U = ({ isConfigSettingsPage: e, currentConnector: s }) => {
30
+ var h;
31
+ const { pathname: l } = v(), i = r(I), L = l === m.CARD_SETTINGS, a = r(S), o = E(), x = r(y), u = r(T);
32
+ if (!e)
33
+ return null;
34
+ e && s && (o.current = L && (a != null && a[s]) ? a == null ? void 0 : a[s] : i == null ? void 0 : i[s]);
35
+ const C = (x == null ? void 0 : x.apiList) ?? [], j = N.replace("{{connector}}", ((h = o == null ? void 0 : o.current) == null ? void 0 : h.name) ?? "");
36
+ return /* @__PURE__ */ t.jsxs(R, { children: [
37
+ /* @__PURE__ */ t.jsx(p, { variant: "h2", children: j }),
38
+ /* @__PURE__ */ t.jsx(p, { variant: "body1", marginBottom: "20px", children: D }),
39
+ u === w.LOADING ? /* @__PURE__ */ t.jsx(O, {}) : /* @__PURE__ */ t.jsx(n, { gap: "12px", children: C.map((d) => /* @__PURE__ */ t.jsxs(
40
+ n,
41
+ {
42
+ width: "100%",
43
+ height: "72px",
44
+ border: "1px solid #E0E0E0",
45
+ borderRadius: "5px",
46
+ padding: "12px",
47
+ gap: "10px",
48
+ children: [
49
+ /* @__PURE__ */ t.jsx(p, { variant: "body1_medium", children: d.name }),
50
+ /* @__PURE__ */ t.jsx(p, { variant: "body2", children: d.description })
51
+ ]
52
+ },
53
+ d.keyName
54
+ )) })
55
+ ] });
56
+ }, H = () => {
57
+ const e = A(), s = r(P), l = (i) => {
58
+ i == null || i.stopPropagation(), e(m.BASEPATH);
59
+ };
60
+ return /* @__PURE__ */ t.jsxs(Z, { children: [
61
+ /* @__PURE__ */ t.jsx(k, { title: "Back", placement: "bottom", children: /* @__PURE__ */ t.jsx(M, { onClick: l, children: /* @__PURE__ */ t.jsx("img", { src: _ }) }) }),
62
+ /* @__PURE__ */ t.jsx(B, { isConfigSettingsPage: !0, currentConnector: s }),
63
+ /* @__PURE__ */ t.jsx(U, { isConfigSettingsPage: !0, currentConnector: s })
64
+ ] });
65
+ };
66
+ export {
67
+ H as ConnectorConfig
68
+ };