@hiver/connector-admin 0.0.8 → 0.0.10-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.
- package/app/connectors/index.d.ts +1 -1
- package/app/connectors/index.d.ts.map +1 -1
- package/app/connectors/pages/auth-success/index.d.ts +2 -0
- package/app/connectors/pages/auth-success/index.d.ts.map +1 -0
- package/app/connectors/pages/auth-success/styles.d.ts +4 -0
- package/app/connectors/pages/auth-success/styles.d.ts.map +1 -0
- package/app/connectors/pages/connector-view/dashboard/index.d.ts.map +1 -1
- package/app/connectors/pages/settings/index.d.ts.map +1 -1
- package/app/connectors/pages/settings/styles.d.ts +1 -0
- package/app/connectors/pages/settings/styles.d.ts.map +1 -1
- package/app/connectors/router.d.ts.map +1 -1
- package/components/ui/form/index.d.ts +19 -0
- package/components/ui/form/index.d.ts.map +1 -0
- package/components/ui/form/styles.d.ts +4 -0
- package/components/ui/form/styles.d.ts.map +1 -0
- package/components/ui/form-fields/index.d.ts +14 -0
- package/components/ui/form-fields/index.d.ts.map +1 -0
- package/components/ui/form-fields/styles.d.ts +7 -0
- package/components/ui/form-fields/styles.d.ts.map +1 -0
- package/components/ui/select/index.d.ts +3 -0
- package/components/ui/select/index.d.ts.map +1 -0
- package/components/ui/select/style.d.ts +2 -0
- package/components/ui/select/style.d.ts.map +1 -0
- package/constants/api.d.ts +1 -0
- package/constants/api.d.ts.map +1 -1
- package/constants/app-constants.d.ts +5 -0
- package/constants/app-constants.d.ts.map +1 -0
- package/constants/router-paths.d.ts +1 -0
- package/constants/router-paths.d.ts.map +1 -1
- package/context/index.d.ts +7 -0
- package/context/index.d.ts.map +1 -1
- package/context/main-app-provider/index.d.ts.map +1 -1
- package/features/auth/api/index.d.ts +8 -0
- package/features/auth/api/index.d.ts.map +1 -0
- package/features/auth/components/api-executor/index.d.ts +8 -0
- package/features/auth/components/api-executor/index.d.ts.map +1 -0
- package/features/auth/components/api-executor/styles.d.ts +12 -0
- package/features/auth/components/api-executor/styles.d.ts.map +1 -0
- package/features/auth/components/auth-form/index.d.ts +10 -0
- package/features/auth/components/auth-form/index.d.ts.map +1 -0
- package/features/auth/components/auth-form/reducer.d.ts +11 -0
- package/features/auth/components/auth-form/reducer.d.ts.map +1 -0
- package/features/auth/components/auth-form/styles.d.ts +8 -0
- package/features/auth/components/auth-form/styles.d.ts.map +1 -0
- package/features/auth/components/auth-header-skeleton/index.d.ts +2 -0
- package/features/auth/components/auth-header-skeleton/index.d.ts.map +1 -0
- package/features/auth/constants/api.d.ts +6 -0
- package/features/auth/constants/api.d.ts.map +1 -0
- package/features/auth/constants/form-config.d.ts +71 -0
- package/features/auth/constants/form-config.d.ts.map +1 -0
- package/features/auth/constants/index.d.ts +4 -1
- package/features/auth/constants/index.d.ts.map +1 -1
- package/features/auth/store/initial-state.d.ts +19 -0
- package/features/auth/store/initial-state.d.ts.map +1 -0
- package/features/auth/store/selectors.d.ts +12 -0
- package/features/auth/store/selectors.d.ts.map +1 -0
- package/features/auth/store/slice.d.ts +75 -0
- package/features/auth/store/slice.d.ts.map +1 -0
- package/features/auth/types/connector.d.ts +2 -0
- package/features/auth/types/connector.d.ts.map +1 -0
- package/features/auth/types/form.d.ts +24 -0
- package/features/auth/types/form.d.ts.map +1 -0
- package/features/auth/types/request.d.ts +33 -0
- package/features/auth/types/request.d.ts.map +1 -0
- package/features/auth/utils/index.d.ts +13 -0
- package/features/auth/utils/index.d.ts.map +1 -0
- package/features/auth/utils/type-guards.d.ts +8 -0
- package/features/auth/utils/type-guards.d.ts.map +1 -0
- package/features/connector-library/constants/api.d.ts.map +1 -1
- package/features/connector-library/store/initial-state.d.ts +3 -2
- package/features/connector-library/store/initial-state.d.ts.map +1 -1
- package/features/connector-library/store/selectors.d.ts +1 -1
- package/features/connector-library/store/selectors.d.ts.map +1 -1
- package/features/connector-library/store/slice.d.ts +3 -1
- package/features/connector-library/store/slice.d.ts.map +1 -1
- package/features/connector-library/types/connector.d.ts +1 -42
- package/features/connector-library/types/connector.d.ts.map +1 -1
- package/features/connector-library/utils/type-guards.d.ts +3 -2
- package/features/connector-library/utils/type-guards.d.ts.map +1 -1
- package/features/request-new-connector/api/index.d.ts +8 -0
- package/features/request-new-connector/api/index.d.ts.map +1 -0
- package/features/request-new-connector/components/custom-connector-card/index.d.ts +1 -0
- package/features/request-new-connector/components/custom-connector-card/index.d.ts.map +1 -1
- package/features/request-new-connector/components/request-new-modal/index.d.ts +1 -0
- package/features/request-new-connector/components/request-new-modal/index.d.ts.map +1 -1
- package/features/request-new-connector/components/request-new-modal/request-panel.d.ts.map +1 -1
- package/features/request-new-connector/constants/api.d.ts +2 -0
- package/features/request-new-connector/constants/api.d.ts.map +1 -0
- package/features/request-new-connector/constants/index.d.ts +4 -0
- package/features/request-new-connector/constants/index.d.ts.map +1 -1
- package/features/request-new-connector/types/index.d.ts +16 -1
- package/features/request-new-connector/types/index.d.ts.map +1 -1
- package/features/request-new-connector/utils/type-guards.d.ts +3 -0
- package/features/request-new-connector/utils/type-guards.d.ts.map +1 -0
- package/features/toast-message/CloseButton.d.ts +4 -0
- package/features/toast-message/CloseButton.d.ts.map +1 -0
- package/features/toast-message/HiverIconToast.d.ts +7 -0
- package/features/toast-message/HiverIconToast.d.ts.map +1 -0
- package/features/toast-message/__tests__/toastMessage.test.d.ts +2 -0
- package/features/toast-message/__tests__/toastMessage.test.d.ts.map +1 -0
- package/features/toast-message/constants/toast.d.ts +4 -0
- package/features/toast-message/constants/toast.d.ts.map +1 -0
- package/features/toast-message/showMessage.d.ts +13 -0
- package/features/toast-message/showMessage.d.ts.map +1 -0
- package/features/toast-message/style.d.ts +7 -0
- package/features/toast-message/style.d.ts.map +1 -0
- package/{index-CWnqz_7p.js → index-3QhF4nPL.js} +13 -14
- package/index-BG0JDAxl.js +711 -0
- package/{index-CihMwBsW.js → index-BTijOkJN.js} +1 -1
- package/{index-D5knnyWw.js → index-CTf_uj1d.js} +25 -25
- package/{index-0ckwA6Bt.js → index-DHQTzZga.js} +1063 -1028
- package/{index-g_hNAZie.js → index-DwS53blc.js} +10386 -9235
- package/index-MhhY7aRi.js +3772 -0
- package/index.es.js +1 -1
- package/index.umd.js +373 -194
- package/package.json +3 -2
- package/store/hooks.d.ts +4 -0
- package/store/hooks.d.ts.map +1 -1
- package/store/index.d.ts +8 -0
- package/store/index.d.ts.map +1 -1
- package/store/request-connector-api/initial-state.d.ts +9 -0
- package/store/request-connector-api/initial-state.d.ts.map +1 -0
- package/store/request-connector-api/selectors.d.ts +5 -0
- package/store/request-connector-api/selectors.d.ts.map +1 -0
- package/store/request-connector-api/slice.d.ts +39 -0
- package/store/request-connector-api/slice.d.ts.map +1 -0
- package/styled-ui-components-BiFtpk_x.js +2253 -0
- package/testing/mocks/handlers/auth.d.ts +2 -0
- package/testing/mocks/handlers/auth.d.ts.map +1 -0
- package/testing/mocks/handlers/connector-template.d.ts +8 -0
- package/testing/mocks/handlers/connector-template.d.ts.map +1 -1
- package/testing/mocks/handlers/request-connector-api.d.ts +2 -0
- package/testing/mocks/handlers/request-connector-api.d.ts.map +1 -0
- package/testing/mocks/handlers/update-connector.d.ts.map +1 -1
- package/testing/mocks/handlers.d.ts.map +1 -1
- package/testing/setup-store.d.ts +4 -0
- package/testing/setup-store.d.ts.map +1 -1
- package/types/common.d.ts +2 -0
- package/types/common.d.ts.map +1 -0
- package/types/connector.d.ts +60 -0
- package/types/connector.d.ts.map +1 -0
- package/types/form.d.ts +36 -0
- package/types/form.d.ts.map +1 -0
- package/types/json.d.ts +7 -0
- package/types/json.d.ts.map +1 -0
- package/types/router.d.ts +2 -0
- package/types/router.d.ts.map +1 -1
- package/utils/index.d.ts +2 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/type-guards.d.ts +3 -0
- package/utils/type-guards.d.ts.map +1 -0
- package/Typography-BvoDUPsi.js +0 -174
- package/features/auth/components/auth.d.ts +0 -2
- package/features/auth/components/auth.d.ts.map +0 -1
- package/index-CPqWySPe.js +0 -2954
- package/index-xau7jZsj.js +0 -40
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
import { g as Q, f as H, s as h, p as re, _ as m, D as ce, k as X, b as de, a5 as le, j as a, l as G, P as t, E as Z, h as k, m as V, n as W, a6 as pe, a7 as ue, i as he, B as F, K as U, T as Y, S as A, Z as K, L as ge, a4 as fe, Q as Ce, R as I, a2 as be, X as E, I as xe, V as we, a8 as Ee, W as me, Y as Le } from "./index-DwS53blc.js";
|
|
2
|
+
import * as J from "react";
|
|
3
|
+
import { useRef as Te, useEffect as Se } from "react";
|
|
4
|
+
import { c as ke, d as ye, a as ve, h as Re, T as q } from "./styled-ui-components-BiFtpk_x.js";
|
|
5
|
+
function _e(e) {
|
|
6
|
+
return Q("PrivateSwitchBase", e);
|
|
7
|
+
}
|
|
8
|
+
H("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
9
|
+
const Ne = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"], Oe = (e) => {
|
|
10
|
+
const {
|
|
11
|
+
classes: o,
|
|
12
|
+
checked: n,
|
|
13
|
+
disabled: l,
|
|
14
|
+
edge: u
|
|
15
|
+
} = e, C = {
|
|
16
|
+
root: ["root", n && "checked", l && "disabled", u && `edge${k(u)}`],
|
|
17
|
+
input: ["input"]
|
|
18
|
+
};
|
|
19
|
+
return V(C, _e, o);
|
|
20
|
+
}, Ie = h(re)(({
|
|
21
|
+
ownerState: e
|
|
22
|
+
}) => m({
|
|
23
|
+
padding: 9,
|
|
24
|
+
borderRadius: "50%"
|
|
25
|
+
}, e.edge === "start" && {
|
|
26
|
+
marginLeft: e.size === "small" ? -3 : -12
|
|
27
|
+
}, e.edge === "end" && {
|
|
28
|
+
marginRight: e.size === "small" ? -3 : -12
|
|
29
|
+
})), Ae = h("input", {
|
|
30
|
+
shouldForwardProp: ce
|
|
31
|
+
})({
|
|
32
|
+
cursor: "inherit",
|
|
33
|
+
position: "absolute",
|
|
34
|
+
opacity: 0,
|
|
35
|
+
width: "100%",
|
|
36
|
+
height: "100%",
|
|
37
|
+
top: 0,
|
|
38
|
+
left: 0,
|
|
39
|
+
margin: 0,
|
|
40
|
+
padding: 0,
|
|
41
|
+
zIndex: 1
|
|
42
|
+
}), ee = /* @__PURE__ */ J.forwardRef(function(o, n) {
|
|
43
|
+
const {
|
|
44
|
+
autoFocus: l,
|
|
45
|
+
checked: u,
|
|
46
|
+
checkedIcon: C,
|
|
47
|
+
className: L,
|
|
48
|
+
defaultChecked: g,
|
|
49
|
+
disabled: T,
|
|
50
|
+
disableFocusRipple: c = !1,
|
|
51
|
+
edge: p = !1,
|
|
52
|
+
icon: f,
|
|
53
|
+
id: b,
|
|
54
|
+
inputProps: $,
|
|
55
|
+
inputRef: B,
|
|
56
|
+
name: j,
|
|
57
|
+
onBlur: _,
|
|
58
|
+
onChange: N,
|
|
59
|
+
onFocus: v,
|
|
60
|
+
readOnly: s,
|
|
61
|
+
required: i = !1,
|
|
62
|
+
tabIndex: S,
|
|
63
|
+
type: y,
|
|
64
|
+
value: O
|
|
65
|
+
} = o, D = X(o, Ne), [r, oe] = de({
|
|
66
|
+
controlled: u,
|
|
67
|
+
default: !!g,
|
|
68
|
+
name: "SwitchBase",
|
|
69
|
+
state: "checked"
|
|
70
|
+
}), w = le(), se = (x) => {
|
|
71
|
+
v && v(x), w && w.onFocus && w.onFocus(x);
|
|
72
|
+
}, ae = (x) => {
|
|
73
|
+
_ && _(x), w && w.onBlur && w.onBlur(x);
|
|
74
|
+
}, ne = (x) => {
|
|
75
|
+
if (x.nativeEvent.defaultPrevented)
|
|
76
|
+
return;
|
|
77
|
+
const M = x.target.checked;
|
|
78
|
+
oe(M), N && N(x, M);
|
|
79
|
+
};
|
|
80
|
+
let R = T;
|
|
81
|
+
w && typeof R > "u" && (R = w.disabled);
|
|
82
|
+
const ie = y === "checkbox" || y === "radio", P = m({}, o, {
|
|
83
|
+
checked: r,
|
|
84
|
+
disabled: R,
|
|
85
|
+
disableFocusRipple: c,
|
|
86
|
+
edge: p
|
|
87
|
+
}), z = Oe(P);
|
|
88
|
+
return /* @__PURE__ */ a.jsxs(Ie, m({
|
|
89
|
+
component: "span",
|
|
90
|
+
className: G(z.root, L),
|
|
91
|
+
centerRipple: !0,
|
|
92
|
+
focusRipple: !c,
|
|
93
|
+
disabled: R,
|
|
94
|
+
tabIndex: null,
|
|
95
|
+
role: void 0,
|
|
96
|
+
onFocus: se,
|
|
97
|
+
onBlur: ae,
|
|
98
|
+
ownerState: P,
|
|
99
|
+
ref: n
|
|
100
|
+
}, D, {
|
|
101
|
+
children: [/* @__PURE__ */ a.jsx(Ae, m({
|
|
102
|
+
autoFocus: l,
|
|
103
|
+
checked: u,
|
|
104
|
+
defaultChecked: g,
|
|
105
|
+
className: z.input,
|
|
106
|
+
disabled: R,
|
|
107
|
+
id: ie ? b : void 0,
|
|
108
|
+
name: j,
|
|
109
|
+
onChange: ne,
|
|
110
|
+
readOnly: s,
|
|
111
|
+
ref: B,
|
|
112
|
+
required: i,
|
|
113
|
+
ownerState: P,
|
|
114
|
+
tabIndex: S,
|
|
115
|
+
type: y
|
|
116
|
+
}, y === "checkbox" && O === void 0 ? {} : {
|
|
117
|
+
value: O
|
|
118
|
+
}, $)), r ? C : f]
|
|
119
|
+
}));
|
|
120
|
+
});
|
|
121
|
+
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
122
|
+
/**
|
|
123
|
+
* If `true`, the `input` element is focused during the first mount.
|
|
124
|
+
*/
|
|
125
|
+
autoFocus: t.bool,
|
|
126
|
+
/**
|
|
127
|
+
* If `true`, the component is checked.
|
|
128
|
+
*/
|
|
129
|
+
checked: t.bool,
|
|
130
|
+
/**
|
|
131
|
+
* The icon to display when the component is checked.
|
|
132
|
+
*/
|
|
133
|
+
checkedIcon: t.node.isRequired,
|
|
134
|
+
/**
|
|
135
|
+
* Override or extend the styles applied to the component.
|
|
136
|
+
*/
|
|
137
|
+
classes: t.object,
|
|
138
|
+
/**
|
|
139
|
+
* @ignore
|
|
140
|
+
*/
|
|
141
|
+
className: t.string,
|
|
142
|
+
/**
|
|
143
|
+
* @ignore
|
|
144
|
+
*/
|
|
145
|
+
defaultChecked: t.bool,
|
|
146
|
+
/**
|
|
147
|
+
* If `true`, the component is disabled.
|
|
148
|
+
*/
|
|
149
|
+
disabled: t.bool,
|
|
150
|
+
/**
|
|
151
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
152
|
+
* @default false
|
|
153
|
+
*/
|
|
154
|
+
disableFocusRipple: t.bool,
|
|
155
|
+
/**
|
|
156
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
157
|
+
* side (this is often helpful for aligning the left or right
|
|
158
|
+
* side of the icon with content above or below, without ruining the border
|
|
159
|
+
* size and shape).
|
|
160
|
+
* @default false
|
|
161
|
+
*/
|
|
162
|
+
edge: t.oneOf(["end", "start", !1]),
|
|
163
|
+
/**
|
|
164
|
+
* The icon to display when the component is unchecked.
|
|
165
|
+
*/
|
|
166
|
+
icon: t.node.isRequired,
|
|
167
|
+
/**
|
|
168
|
+
* The id of the `input` element.
|
|
169
|
+
*/
|
|
170
|
+
id: t.string,
|
|
171
|
+
/**
|
|
172
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
173
|
+
*/
|
|
174
|
+
inputProps: t.object,
|
|
175
|
+
/**
|
|
176
|
+
* Pass a ref to the `input` element.
|
|
177
|
+
*/
|
|
178
|
+
inputRef: Z,
|
|
179
|
+
/*
|
|
180
|
+
* @ignore
|
|
181
|
+
*/
|
|
182
|
+
name: t.string,
|
|
183
|
+
/**
|
|
184
|
+
* @ignore
|
|
185
|
+
*/
|
|
186
|
+
onBlur: t.func,
|
|
187
|
+
/**
|
|
188
|
+
* Callback fired when the state is changed.
|
|
189
|
+
*
|
|
190
|
+
* @param {object} event The event source of the callback.
|
|
191
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
192
|
+
*/
|
|
193
|
+
onChange: t.func,
|
|
194
|
+
/**
|
|
195
|
+
* @ignore
|
|
196
|
+
*/
|
|
197
|
+
onFocus: t.func,
|
|
198
|
+
/**
|
|
199
|
+
* It prevents the user from changing the value of the field
|
|
200
|
+
* (not from interacting with the field).
|
|
201
|
+
*/
|
|
202
|
+
readOnly: t.bool,
|
|
203
|
+
/**
|
|
204
|
+
* If `true`, the `input` element is required.
|
|
205
|
+
*/
|
|
206
|
+
required: t.bool,
|
|
207
|
+
/**
|
|
208
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
209
|
+
*/
|
|
210
|
+
sx: t.object,
|
|
211
|
+
/**
|
|
212
|
+
* @ignore
|
|
213
|
+
*/
|
|
214
|
+
tabIndex: t.oneOfType([t.number, t.string]),
|
|
215
|
+
/**
|
|
216
|
+
* The input component prop `type`.
|
|
217
|
+
*/
|
|
218
|
+
type: t.string.isRequired,
|
|
219
|
+
/**
|
|
220
|
+
* The value of the component.
|
|
221
|
+
*/
|
|
222
|
+
value: t.any
|
|
223
|
+
});
|
|
224
|
+
function $e(e) {
|
|
225
|
+
return Q("MuiSwitch", e);
|
|
226
|
+
}
|
|
227
|
+
const d = H("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), Be = ["className", "color", "edge", "size", "sx"], je = (e) => {
|
|
228
|
+
const {
|
|
229
|
+
classes: o,
|
|
230
|
+
edge: n,
|
|
231
|
+
size: l,
|
|
232
|
+
color: u,
|
|
233
|
+
checked: C,
|
|
234
|
+
disabled: L
|
|
235
|
+
} = e, g = {
|
|
236
|
+
root: ["root", n && `edge${k(n)}`, `size${k(l)}`],
|
|
237
|
+
switchBase: ["switchBase", `color${k(u)}`, C && "checked", L && "disabled"],
|
|
238
|
+
thumb: ["thumb"],
|
|
239
|
+
track: ["track"],
|
|
240
|
+
input: ["input"]
|
|
241
|
+
}, T = V(g, $e, o);
|
|
242
|
+
return m({}, o, T);
|
|
243
|
+
}, De = h("span", {
|
|
244
|
+
name: "MuiSwitch",
|
|
245
|
+
slot: "Root",
|
|
246
|
+
overridesResolver: (e, o) => {
|
|
247
|
+
const {
|
|
248
|
+
ownerState: n
|
|
249
|
+
} = e;
|
|
250
|
+
return [o.root, n.edge && o[`edge${k(n.edge)}`], o[`size${k(n.size)}`]];
|
|
251
|
+
}
|
|
252
|
+
})({
|
|
253
|
+
display: "inline-flex",
|
|
254
|
+
width: 34 + 12 * 2,
|
|
255
|
+
height: 14 + 12 * 2,
|
|
256
|
+
overflow: "hidden",
|
|
257
|
+
padding: 12,
|
|
258
|
+
boxSizing: "border-box",
|
|
259
|
+
position: "relative",
|
|
260
|
+
flexShrink: 0,
|
|
261
|
+
zIndex: 0,
|
|
262
|
+
// Reset the stacking context.
|
|
263
|
+
verticalAlign: "middle",
|
|
264
|
+
// For correct alignment with the text.
|
|
265
|
+
"@media print": {
|
|
266
|
+
colorAdjust: "exact"
|
|
267
|
+
},
|
|
268
|
+
variants: [{
|
|
269
|
+
props: {
|
|
270
|
+
edge: "start"
|
|
271
|
+
},
|
|
272
|
+
style: {
|
|
273
|
+
marginLeft: -8
|
|
274
|
+
}
|
|
275
|
+
}, {
|
|
276
|
+
props: {
|
|
277
|
+
edge: "end"
|
|
278
|
+
},
|
|
279
|
+
style: {
|
|
280
|
+
marginRight: -8
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
props: {
|
|
284
|
+
size: "small"
|
|
285
|
+
},
|
|
286
|
+
style: {
|
|
287
|
+
width: 40,
|
|
288
|
+
height: 24,
|
|
289
|
+
padding: 7,
|
|
290
|
+
[`& .${d.thumb}`]: {
|
|
291
|
+
width: 16,
|
|
292
|
+
height: 16
|
|
293
|
+
},
|
|
294
|
+
[`& .${d.switchBase}`]: {
|
|
295
|
+
padding: 4,
|
|
296
|
+
[`&.${d.checked}`]: {
|
|
297
|
+
transform: "translateX(16px)"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}]
|
|
302
|
+
}), Pe = h(ee, {
|
|
303
|
+
name: "MuiSwitch",
|
|
304
|
+
slot: "SwitchBase",
|
|
305
|
+
overridesResolver: (e, o) => {
|
|
306
|
+
const {
|
|
307
|
+
ownerState: n
|
|
308
|
+
} = e;
|
|
309
|
+
return [o.switchBase, {
|
|
310
|
+
[`& .${d.input}`]: o.input
|
|
311
|
+
}, n.color !== "default" && o[`color${k(n.color)}`]];
|
|
312
|
+
}
|
|
313
|
+
})(({
|
|
314
|
+
theme: e
|
|
315
|
+
}) => ({
|
|
316
|
+
position: "absolute",
|
|
317
|
+
top: 0,
|
|
318
|
+
left: 0,
|
|
319
|
+
zIndex: 1,
|
|
320
|
+
// Render above the focus ripple.
|
|
321
|
+
color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
|
|
322
|
+
transition: e.transitions.create(["left", "transform"], {
|
|
323
|
+
duration: e.transitions.duration.shortest
|
|
324
|
+
}),
|
|
325
|
+
[`&.${d.checked}`]: {
|
|
326
|
+
transform: "translateX(20px)"
|
|
327
|
+
},
|
|
328
|
+
[`&.${d.disabled}`]: {
|
|
329
|
+
color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}`
|
|
330
|
+
},
|
|
331
|
+
[`&.${d.checked} + .${d.track}`]: {
|
|
332
|
+
opacity: 0.5
|
|
333
|
+
},
|
|
334
|
+
[`&.${d.disabled} + .${d.track}`]: {
|
|
335
|
+
opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? 0.12 : 0.2}`
|
|
336
|
+
},
|
|
337
|
+
[`& .${d.input}`]: {
|
|
338
|
+
left: "-100%",
|
|
339
|
+
width: "300%"
|
|
340
|
+
}
|
|
341
|
+
}), ({
|
|
342
|
+
theme: e
|
|
343
|
+
}) => ({
|
|
344
|
+
"&:hover": {
|
|
345
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette.action.active, e.palette.action.hoverOpacity),
|
|
346
|
+
// Reset on touch devices, it doesn't add specificity
|
|
347
|
+
"@media (hover: none)": {
|
|
348
|
+
backgroundColor: "transparent"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
variants: [...Object.entries(e.palette).filter(([, o]) => o.main && o.light).map(([o]) => ({
|
|
352
|
+
props: {
|
|
353
|
+
color: o
|
|
354
|
+
},
|
|
355
|
+
style: {
|
|
356
|
+
[`&.${d.checked}`]: {
|
|
357
|
+
color: (e.vars || e).palette[o].main,
|
|
358
|
+
"&:hover": {
|
|
359
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette[o].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette[o].main, e.palette.action.hoverOpacity),
|
|
360
|
+
"@media (hover: none)": {
|
|
361
|
+
backgroundColor: "transparent"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
[`&.${d.disabled}`]: {
|
|
365
|
+
color: e.vars ? e.vars.palette.Switch[`${o}DisabledColor`] : `${e.palette.mode === "light" ? pe(e.palette[o].main, 0.62) : ue(e.palette[o].main, 0.55)}`
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
[`&.${d.checked} + .${d.track}`]: {
|
|
369
|
+
backgroundColor: (e.vars || e).palette[o].main
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}))]
|
|
373
|
+
})), Ue = h("span", {
|
|
374
|
+
name: "MuiSwitch",
|
|
375
|
+
slot: "Track",
|
|
376
|
+
overridesResolver: (e, o) => o.track
|
|
377
|
+
})(({
|
|
378
|
+
theme: e
|
|
379
|
+
}) => ({
|
|
380
|
+
height: "100%",
|
|
381
|
+
width: "100%",
|
|
382
|
+
borderRadius: 14 / 2,
|
|
383
|
+
zIndex: -1,
|
|
384
|
+
transition: e.transitions.create(["opacity", "background-color"], {
|
|
385
|
+
duration: e.transitions.duration.shortest
|
|
386
|
+
}),
|
|
387
|
+
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
388
|
+
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? 0.38 : 0.3}`
|
|
389
|
+
})), Fe = h("span", {
|
|
390
|
+
name: "MuiSwitch",
|
|
391
|
+
slot: "Thumb",
|
|
392
|
+
overridesResolver: (e, o) => o.thumb
|
|
393
|
+
})(({
|
|
394
|
+
theme: e
|
|
395
|
+
}) => ({
|
|
396
|
+
boxShadow: (e.vars || e).shadows[1],
|
|
397
|
+
backgroundColor: "currentColor",
|
|
398
|
+
width: 20,
|
|
399
|
+
height: 20,
|
|
400
|
+
borderRadius: "50%"
|
|
401
|
+
})), te = /* @__PURE__ */ J.forwardRef(function(o, n) {
|
|
402
|
+
const l = he({
|
|
403
|
+
props: o,
|
|
404
|
+
name: "MuiSwitch"
|
|
405
|
+
}), {
|
|
406
|
+
className: u,
|
|
407
|
+
color: C = "primary",
|
|
408
|
+
edge: L = !1,
|
|
409
|
+
size: g = "medium",
|
|
410
|
+
sx: T
|
|
411
|
+
} = l, c = X(l, Be), p = m({}, l, {
|
|
412
|
+
color: C,
|
|
413
|
+
edge: L,
|
|
414
|
+
size: g
|
|
415
|
+
}), f = je(p), b = /* @__PURE__ */ a.jsx(Fe, {
|
|
416
|
+
className: f.thumb,
|
|
417
|
+
ownerState: p
|
|
418
|
+
});
|
|
419
|
+
return /* @__PURE__ */ a.jsxs(De, {
|
|
420
|
+
className: G(f.root, u),
|
|
421
|
+
sx: T,
|
|
422
|
+
ownerState: p,
|
|
423
|
+
children: [/* @__PURE__ */ a.jsx(Pe, m({
|
|
424
|
+
type: "checkbox",
|
|
425
|
+
icon: b,
|
|
426
|
+
checkedIcon: b,
|
|
427
|
+
ref: n,
|
|
428
|
+
ownerState: p
|
|
429
|
+
}, c, {
|
|
430
|
+
classes: m({}, f, {
|
|
431
|
+
root: f.switchBase
|
|
432
|
+
})
|
|
433
|
+
})), /* @__PURE__ */ a.jsx(Ue, {
|
|
434
|
+
className: f.track,
|
|
435
|
+
ownerState: p
|
|
436
|
+
})]
|
|
437
|
+
});
|
|
438
|
+
});
|
|
439
|
+
process.env.NODE_ENV !== "production" && (te.propTypes = {
|
|
440
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
441
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
442
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
443
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
444
|
+
/**
|
|
445
|
+
* If `true`, the component is checked.
|
|
446
|
+
*/
|
|
447
|
+
checked: t.bool,
|
|
448
|
+
/**
|
|
449
|
+
* The icon to display when the component is checked.
|
|
450
|
+
*/
|
|
451
|
+
checkedIcon: t.node,
|
|
452
|
+
/**
|
|
453
|
+
* Override or extend the styles applied to the component.
|
|
454
|
+
*/
|
|
455
|
+
classes: t.object,
|
|
456
|
+
/**
|
|
457
|
+
* @ignore
|
|
458
|
+
*/
|
|
459
|
+
className: t.string,
|
|
460
|
+
/**
|
|
461
|
+
* The color of the component.
|
|
462
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
463
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
464
|
+
* @default 'primary'
|
|
465
|
+
*/
|
|
466
|
+
color: t.oneOfType([t.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), t.string]),
|
|
467
|
+
/**
|
|
468
|
+
* The default checked state. Use when the component is not controlled.
|
|
469
|
+
*/
|
|
470
|
+
defaultChecked: t.bool,
|
|
471
|
+
/**
|
|
472
|
+
* If `true`, the component is disabled.
|
|
473
|
+
*/
|
|
474
|
+
disabled: t.bool,
|
|
475
|
+
/**
|
|
476
|
+
* If `true`, the ripple effect is disabled.
|
|
477
|
+
* @default false
|
|
478
|
+
*/
|
|
479
|
+
disableRipple: t.bool,
|
|
480
|
+
/**
|
|
481
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
482
|
+
* side (this is often helpful for aligning the left or right
|
|
483
|
+
* side of the icon with content above or below, without ruining the border
|
|
484
|
+
* size and shape).
|
|
485
|
+
* @default false
|
|
486
|
+
*/
|
|
487
|
+
edge: t.oneOf(["end", "start", !1]),
|
|
488
|
+
/**
|
|
489
|
+
* The icon to display when the component is unchecked.
|
|
490
|
+
*/
|
|
491
|
+
icon: t.node,
|
|
492
|
+
/**
|
|
493
|
+
* The id of the `input` element.
|
|
494
|
+
*/
|
|
495
|
+
id: t.string,
|
|
496
|
+
/**
|
|
497
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
498
|
+
*/
|
|
499
|
+
inputProps: t.object,
|
|
500
|
+
/**
|
|
501
|
+
* Pass a ref to the `input` element.
|
|
502
|
+
*/
|
|
503
|
+
inputRef: Z,
|
|
504
|
+
/**
|
|
505
|
+
* Callback fired when the state is changed.
|
|
506
|
+
*
|
|
507
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
508
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
509
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
510
|
+
*/
|
|
511
|
+
onChange: t.func,
|
|
512
|
+
/**
|
|
513
|
+
* If `true`, the `input` element is required.
|
|
514
|
+
* @default false
|
|
515
|
+
*/
|
|
516
|
+
required: t.bool,
|
|
517
|
+
/**
|
|
518
|
+
* The size of the component.
|
|
519
|
+
* `small` is equivalent to the dense switch styling.
|
|
520
|
+
* @default 'medium'
|
|
521
|
+
*/
|
|
522
|
+
size: t.oneOfType([t.oneOf(["medium", "small"]), t.string]),
|
|
523
|
+
/**
|
|
524
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
525
|
+
*/
|
|
526
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
527
|
+
/**
|
|
528
|
+
* The value of the component. The DOM API casts this to a string.
|
|
529
|
+
* The browser uses "on" as the default value.
|
|
530
|
+
*/
|
|
531
|
+
value: t.any
|
|
532
|
+
});
|
|
533
|
+
const at = "Enhance with Custom Connectors", nt = "Let us know your use case, and we'll design and deliver a custom connector tailored to your needs within 2-3 working days.", it = "Request new connector", rt = "Create your own (coming soon)", ct = "Request new API", dt = "Request a new connector", ze = "Tell us your use case and we will create a connector for you in 2-3 working days.", lt = `Request new connectors to get better customer context and key actions right into your inbox. ${ze}`, pt = "Select an API", ut = "Select a connector", ht = "Feel free to add specific details (Optional)", gt = "Submit Request", ft = "Request submitted", Ct = "Your request has been submitted successfully. We will get back to you within 2-3 working days", bt = "Done", Me = "+Request new API", We = "Add connector", qe = "Edit connector", Qe = "Enable", He = "Disable", xt = {
|
|
534
|
+
CONNECTOR: "connector",
|
|
535
|
+
API: "api"
|
|
536
|
+
}, Xe = h(F)`
|
|
537
|
+
height: 60px;
|
|
538
|
+
margin-bottom: 32px;
|
|
539
|
+
max-width: 892px;
|
|
540
|
+
box-sizing: border-box;
|
|
541
|
+
|
|
542
|
+
&.connector-grid,
|
|
543
|
+
.connector-grid {
|
|
544
|
+
display: grid;
|
|
545
|
+
padding: 0 16px;
|
|
546
|
+
width: 864px;
|
|
547
|
+
}
|
|
548
|
+
.connector-flex {
|
|
549
|
+
cursor: pointer;
|
|
550
|
+
display: flex;
|
|
551
|
+
flex-direction: row;
|
|
552
|
+
justify-content: space-between;
|
|
553
|
+
padding: 16px;
|
|
554
|
+
border: 1px solid ${U.palette.gray.gray5};
|
|
555
|
+
border-radius: 4px;
|
|
556
|
+
height: 60px;
|
|
557
|
+
&:hover {
|
|
558
|
+
background: ${U.palette.gray.gray6};
|
|
559
|
+
}
|
|
560
|
+
&.connector-settings {
|
|
561
|
+
height: auto;
|
|
562
|
+
cursor: auto;
|
|
563
|
+
padding-top: 0;
|
|
564
|
+
padding-bottom: 0;
|
|
565
|
+
border: none;
|
|
566
|
+
&:hover {
|
|
567
|
+
background: white;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
img {
|
|
572
|
+
max-height: 28px;
|
|
573
|
+
max-width: 28px;
|
|
574
|
+
&.logoIcon {
|
|
575
|
+
margin-right: 9px;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
.settingsIcon {
|
|
579
|
+
cursor: pointer;
|
|
580
|
+
padding: 5px;
|
|
581
|
+
}
|
|
582
|
+
`, Ge = h(Y)`
|
|
583
|
+
height: 100%;
|
|
584
|
+
display: flex;
|
|
585
|
+
align-items: center;
|
|
586
|
+
`, Ze = h(A)`
|
|
587
|
+
align-items: center;
|
|
588
|
+
flex-direction: row;
|
|
589
|
+
`, Ve = h(te)`
|
|
590
|
+
margin-left: 10px;
|
|
591
|
+
`, Ye = h(A)`
|
|
592
|
+
flex-direction: row;
|
|
593
|
+
align-items: center;
|
|
594
|
+
justify-content: center;
|
|
595
|
+
width: 58px;
|
|
596
|
+
height: 38px;
|
|
597
|
+
position: relative;
|
|
598
|
+
margin-left: 10px;
|
|
599
|
+
`, Ke = h(F)`
|
|
600
|
+
margin-left: 30px;
|
|
601
|
+
width: 50px;
|
|
602
|
+
aspect-ratio: 1;
|
|
603
|
+
border-radius: 50%;
|
|
604
|
+
padding: 0;
|
|
605
|
+
height: 20px;
|
|
606
|
+
width: 20px;
|
|
607
|
+
border: 4px solid #d1d7e3;
|
|
608
|
+
border-right-color: #5d9bfb;
|
|
609
|
+
animation: rotate 1s infinite linear;
|
|
610
|
+
position: absolute;
|
|
611
|
+
left: -10px;
|
|
612
|
+
|
|
613
|
+
@keyframes rotate {
|
|
614
|
+
0%,
|
|
615
|
+
15% {
|
|
616
|
+
transform: rotate(0deg);
|
|
617
|
+
}
|
|
618
|
+
50% {
|
|
619
|
+
transform: rotate(290deg);
|
|
620
|
+
}
|
|
621
|
+
100% {
|
|
622
|
+
transform: rotate(360deg);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
`, Je = h(K)`
|
|
626
|
+
white-space: pre;
|
|
627
|
+
width: 133px;
|
|
628
|
+
height: 32px;
|
|
629
|
+
`, et = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_68286)'%3e%3cpath%20d='M16.192%2010.8165C16.2254%2010.5498%2016.2504%2010.2832%2016.2504%209.99984C16.2504%209.7165%2016.2254%209.44984%2016.192%209.18317L17.9504%207.80817C18.1087%207.68317%2018.1504%207.45817%2018.0504%207.27484L16.3837%204.3915C16.3087%204.25817%2016.167%204.18317%2016.017%204.18317C15.967%204.18317%2015.917%204.1915%2015.8754%204.20817L13.8004%205.0415C13.367%204.70817%2012.9004%204.43317%2012.392%204.22484L12.0754%202.0165C12.0504%201.8165%2011.8754%201.6665%2011.667%201.6665H8.33369C8.12535%201.6665%207.95035%201.8165%207.92535%202.0165L7.60869%204.22484C7.10035%204.43317%206.63369%204.7165%206.20035%205.0415L4.12535%204.20817C4.07535%204.1915%204.02535%204.18317%203.97535%204.18317C3.83369%204.18317%203.69202%204.25817%203.61702%204.3915L1.95035%207.27484C1.84202%207.45817%201.89202%207.68317%202.05035%207.80817L3.80869%209.18317C3.77535%209.44984%203.75035%209.72484%203.75035%209.99984C3.75035%2010.2748%203.77535%2010.5498%203.80869%2010.8165L2.05035%2012.1915C1.89202%2012.3165%201.85035%2012.5415%201.95035%2012.7248L3.61702%2015.6082C3.69202%2015.7415%203.83369%2015.8165%203.98369%2015.8165C4.03369%2015.8165%204.08369%2015.8082%204.12535%2015.7915L6.20035%2014.9582C6.63369%2015.2915%207.10035%2015.5665%207.60869%2015.7748L7.92535%2017.9832C7.95035%2018.1832%208.12535%2018.3332%208.33369%2018.3332H11.667C11.8754%2018.3332%2012.0504%2018.1832%2012.0754%2017.9832L12.392%2015.7748C12.9004%2015.5665%2013.367%2015.2832%2013.8004%2014.9582L15.8754%2015.7915C15.9254%2015.8082%2015.9754%2015.8165%2016.0254%2015.8165C16.167%2015.8165%2016.3087%2015.7415%2016.3837%2015.6082L18.0504%2012.7248C18.1504%2012.5415%2018.1087%2012.3165%2017.9504%2012.1915L16.192%2010.8165ZM14.542%209.3915C14.5754%209.64984%2014.5837%209.82484%2014.5837%209.99984C14.5837%2010.1748%2014.567%2010.3582%2014.542%2010.6082L14.4254%2011.5498L15.167%2012.1332L16.067%2012.8332L15.4837%2013.8415L14.4254%2013.4165L13.5587%2013.0665L12.8087%2013.6332C12.4504%2013.8998%2012.1087%2014.0998%2011.767%2014.2415L10.8837%2014.5998L10.7504%2015.5415L10.5837%2016.6665H9.41702L9.25869%2015.5415L9.12535%2014.5998L8.24202%2014.2415C7.88369%2014.0915%207.55035%2013.8998%207.21702%2013.6498L6.45869%2013.0665L5.57535%2013.4248L4.51702%2013.8498L3.93369%2012.8415L4.83369%2012.1415L5.57535%2011.5582L5.45869%2010.6165C5.43369%2010.3582%205.41702%2010.1665%205.41702%209.99984C5.41702%209.83317%205.43369%209.6415%205.45869%209.3915L5.57535%208.44984L4.83369%207.8665L3.93369%207.1665L4.51702%206.15817L5.57535%206.58317L6.44202%206.93317L7.19202%206.3665C7.55035%206.09984%207.89202%205.89984%208.23369%205.75817L9.11702%205.39984L9.25035%204.45817L9.41702%203.33317H10.5754L10.7337%204.45817L10.867%205.39984L11.7504%205.75817C12.1087%205.90817%2012.442%206.09984%2012.7754%206.34984L13.5337%206.93317L14.417%206.57484L15.4754%206.14984L16.0587%207.15817L15.167%207.8665L14.4254%208.44984L14.542%209.3915ZM10.0004%206.6665C8.15869%206.6665%206.66702%208.15817%206.66702%209.99984C6.66702%2011.8415%208.15869%2013.3332%2010.0004%2013.3332C11.842%2013.3332%2013.3337%2011.8415%2013.3337%209.99984C13.3337%208.15817%2011.842%206.6665%2010.0004%206.6665ZM10.0004%2011.6665C9.08369%2011.6665%208.33369%2010.9165%208.33369%209.99984C8.33369%209.08317%209.08369%208.33317%2010.0004%208.33317C10.917%208.33317%2011.667%209.08317%2011.667%209.99984C11.667%2010.9165%2010.917%2011.6665%2010.0004%2011.6665Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_68286'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", wt = ({
|
|
630
|
+
setModal: e,
|
|
631
|
+
setConnectorId: o,
|
|
632
|
+
isConfigSettingsPage: n = !1,
|
|
633
|
+
currentConnector: l
|
|
634
|
+
}) => {
|
|
635
|
+
const u = ge(), { pathname: C } = fe(), L = C === E.BASEPATH + E.CARD_SETTINGS, g = Ce(), T = I(ke), c = I(ye), p = I(ve), f = I(Re), b = Te();
|
|
636
|
+
if (n && l && (b.current = L && (p != null && p[l]) ? p == null ? void 0 : p[l] : c == null ? void 0 : c[l]), Se(() => {
|
|
637
|
+
c || g(be());
|
|
638
|
+
}, [g, c]), n && !b.current) return null;
|
|
639
|
+
const $ = (s, i) => {
|
|
640
|
+
s == null || s.stopPropagation(), g(Ee({ id: i, enabled: s.target.checked }));
|
|
641
|
+
}, B = (s, i) => {
|
|
642
|
+
s == null || s.stopPropagation(), o == null || o(i), e == null || e(!0);
|
|
643
|
+
}, j = (s, i) => {
|
|
644
|
+
s == null || s.stopPropagation(), u(`${E.BASEPATH}${E.CONNECTOR_SETTINGS}/${i}`);
|
|
645
|
+
}, _ = (s, i) => {
|
|
646
|
+
s == null || s.stopPropagation(), u(`${E.BASEPATH}${E.CONNECTOR_SETTINGS}/${i}?isEdit=true`);
|
|
647
|
+
}, N = (s, i = "") => {
|
|
648
|
+
if (s == null || s.preventDefault(), s == null || s.stopPropagation(), n) return;
|
|
649
|
+
const { updateCurrentSelectedConnector: S } = Le;
|
|
650
|
+
g(S({ currentDashboard: i })), g(me(i)), u(E.BASEPATH + E.CONNECTOR_CONFIG);
|
|
651
|
+
}, v = (s) => {
|
|
652
|
+
const { id: i, isEnabled: S, name: y, logo: O, description: D } = s || {};
|
|
653
|
+
return /* @__PURE__ */ a.jsxs(Xe, { "data-testid": i, className: "connector-grid", onClick: (r) => N(r, i), children: [
|
|
654
|
+
/* @__PURE__ */ a.jsxs(A, { className: `connector-flex ${n ? "connector-settings" : ""}`, width: "100%", children: [
|
|
655
|
+
/* @__PURE__ */ a.jsxs(A, { flexDirection: "row", alignItems: "center", children: [
|
|
656
|
+
n ? /* @__PURE__ */ a.jsx("img", { src: O, className: "logoIcon", width: "28xp", height: "28px" }) : null,
|
|
657
|
+
/* @__PURE__ */ a.jsx(Ge, { variant: "body1_medium", children: y })
|
|
658
|
+
] }),
|
|
659
|
+
n && typeof S != "boolean" ? /* @__PURE__ */ a.jsx(Je, { variant: "contained", onClick: (r) => j(r, i), children: We }) : /* @__PURE__ */ a.jsxs(Ze, { children: [
|
|
660
|
+
n ? null : /* @__PURE__ */ a.jsx(K, { variant: "text", onClick: (r) => B(r, i), children: Me }),
|
|
661
|
+
/* @__PURE__ */ a.jsx(q, { title: qe, placement: "bottom", children: /* @__PURE__ */ a.jsx(xe, { children: /* @__PURE__ */ a.jsx("img", { src: et, className: "settingsIcon", onClick: (r) => _(r, i) }) }) }),
|
|
662
|
+
(f == null ? void 0 : f[i]) !== we.LOADING ? /* @__PURE__ */ a.jsx(q, { title: S ? He : Qe, placement: "bottom", children: /* @__PURE__ */ a.jsx(
|
|
663
|
+
Ve,
|
|
664
|
+
{
|
|
665
|
+
id: `switch_${i}`,
|
|
666
|
+
checked: S,
|
|
667
|
+
onClick: (r) => r == null ? void 0 : r.stopPropagation(),
|
|
668
|
+
onChange: (r) => $(r, i)
|
|
669
|
+
}
|
|
670
|
+
) }) : /* @__PURE__ */ a.jsx(
|
|
671
|
+
Ye,
|
|
672
|
+
{
|
|
673
|
+
width: "58px",
|
|
674
|
+
height: "38px",
|
|
675
|
+
alignItems: "center",
|
|
676
|
+
flexDirection: "row",
|
|
677
|
+
justifyContent: "center",
|
|
678
|
+
children: /* @__PURE__ */ a.jsx(Ke, { "data-testid": "loading" })
|
|
679
|
+
}
|
|
680
|
+
)
|
|
681
|
+
] })
|
|
682
|
+
] }),
|
|
683
|
+
n ? /* @__PURE__ */ a.jsx(Y, { variant: "body1", color: U.palette.gray.gray3, className: "connector-grid", children: D }) : null
|
|
684
|
+
] });
|
|
685
|
+
};
|
|
686
|
+
return /* @__PURE__ */ a.jsx(F, { "data-testid": "connector-custom-card", children: b.current ? /* @__PURE__ */ a.jsx(a.Fragment, { children: v(b.current) }) : T.map((s) => {
|
|
687
|
+
if (!(c != null && c[s])) return null;
|
|
688
|
+
const { id: i } = c[s];
|
|
689
|
+
return i ? /* @__PURE__ */ a.jsx("div", { children: v(c[s]) }, i) : null;
|
|
690
|
+
}) });
|
|
691
|
+
};
|
|
692
|
+
export {
|
|
693
|
+
rt as C,
|
|
694
|
+
at as E,
|
|
695
|
+
it as R,
|
|
696
|
+
ee as S,
|
|
697
|
+
ze as T,
|
|
698
|
+
nt as a,
|
|
699
|
+
ct as b,
|
|
700
|
+
dt as c,
|
|
701
|
+
lt as d,
|
|
702
|
+
pt as e,
|
|
703
|
+
ut as f,
|
|
704
|
+
ht as g,
|
|
705
|
+
gt as h,
|
|
706
|
+
ft as i,
|
|
707
|
+
Ct as j,
|
|
708
|
+
bt as k,
|
|
709
|
+
xt as l,
|
|
710
|
+
wt as m
|
|
711
|
+
};
|