@bigbinary/neeto-integrations-frontend 2.5.3 → 2.7.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/dist/Daily.cjs.js +629 -0
- package/dist/Daily.cjs.js.map +1 -0
- package/dist/Daily.js +598 -0
- package/dist/Daily.js.map +1 -0
- package/dist/Twilio.cjs.js +364 -56
- package/dist/Twilio.cjs.js.map +1 -1
- package/dist/Twilio.js +365 -60
- package/dist/Twilio.js.map +1 -1
- package/dist/Zoom.cjs.js +708 -0
- package/dist/Zoom.cjs.js.map +1 -0
- package/dist/Zoom.js +677 -0
- package/dist/Zoom.js.map +1 -0
- package/dist/index.cjs.js +445 -73
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +442 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +31 -0
- package/types.d.ts +14 -0
package/dist/Twilio.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import React, { useEffect, useRef
|
|
2
|
-
import { noop, keysToSnakeCase, _findBy } from '@bigbinary/neeto-cist';
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { isNotPresent, isPresent, noop, keysToSnakeCase, _findBy } from '@bigbinary/neeto-cist';
|
|
3
3
|
import '@bigbinary/neeto-molecules/IntegrationCard';
|
|
4
|
-
import '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
|
|
5
|
-
import '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { prop, equals } from 'ramda';
|
|
10
|
-
import i18next from 'i18next';
|
|
11
|
-
import { Input, Select, Form, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
12
|
-
import { useMutationWithInvalidation, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
4
|
+
import DisconnectAlert from '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
|
|
5
|
+
import WalkthroughModal from '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
|
|
6
|
+
import i18next, { t as t$1 } from 'i18next';
|
|
7
|
+
import { useMutationWithInvalidation, withTitle, withT, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
|
+
import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
|
|
13
9
|
import { useQuery } from 'react-query';
|
|
14
10
|
import axios from 'axios';
|
|
11
|
+
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
12
|
+
import { Button, Typography, Modal as Modal$1 } from '@bigbinary/neetoui';
|
|
13
|
+
import { Form as Form$2, Input, Select, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
14
|
+
import { useTranslation, Trans } from 'react-i18next';
|
|
15
|
+
import classnames from 'classnames';
|
|
16
|
+
import { prop, equals } from 'ramda';
|
|
15
17
|
import * as yup from 'yup';
|
|
16
18
|
|
|
17
19
|
function _arrayWithHoles(arr) {
|
|
@@ -69,6 +71,357 @@ function _slicedToArray(arr, i) {
|
|
|
69
71
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
70
72
|
}
|
|
71
73
|
|
|
74
|
+
function _typeof(obj) {
|
|
75
|
+
"@babel/helpers - typeof";
|
|
76
|
+
|
|
77
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
78
|
+
return typeof obj;
|
|
79
|
+
} : function (obj) {
|
|
80
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
81
|
+
}, _typeof(obj);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _toPrimitive(input, hint) {
|
|
85
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
86
|
+
var prim = input[Symbol.toPrimitive];
|
|
87
|
+
if (prim !== undefined) {
|
|
88
|
+
var res = prim.call(input, hint || "default");
|
|
89
|
+
if (_typeof(res) !== "object") return res;
|
|
90
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
91
|
+
}
|
|
92
|
+
return (hint === "string" ? String : Number)(input);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function _toPropertyKey(arg) {
|
|
96
|
+
var key = _toPrimitive(arg, "string");
|
|
97
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function _defineProperty(obj, key, value) {
|
|
101
|
+
key = _toPropertyKey(key);
|
|
102
|
+
if (key in obj) {
|
|
103
|
+
Object.defineProperty(obj, key, {
|
|
104
|
+
value: value,
|
|
105
|
+
enumerable: true,
|
|
106
|
+
configurable: true,
|
|
107
|
+
writable: true
|
|
108
|
+
});
|
|
109
|
+
} else {
|
|
110
|
+
obj[key] = value;
|
|
111
|
+
}
|
|
112
|
+
return obj;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
var INTEGRATIONS_ENGINE_BASE_URL = "/neeto_integrations";
|
|
116
|
+
var TWILIO_CONFIGURATION_BASE_URL = "".concat(INTEGRATIONS_ENGINE_BASE_URL, "/twilio/sms_configurations");
|
|
117
|
+
var INTEGRATIONS_ENGINE_DAILY_URL = "".concat(INTEGRATIONS_ENGINE_BASE_URL, "/daily");
|
|
118
|
+
|
|
119
|
+
var create = function create(payload) {
|
|
120
|
+
return axios.post(INTEGRATIONS_ENGINE_DAILY_URL, {
|
|
121
|
+
daily: payload
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
var show = function show() {
|
|
125
|
+
return axios.get(INTEGRATIONS_ENGINE_DAILY_URL);
|
|
126
|
+
};
|
|
127
|
+
var destroy = function destroy() {
|
|
128
|
+
return axios["delete"](INTEGRATIONS_ENGINE_DAILY_URL);
|
|
129
|
+
};
|
|
130
|
+
var dailiesApi = {
|
|
131
|
+
create: create,
|
|
132
|
+
show: show,
|
|
133
|
+
destroy: destroy
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
var QUERY_KEYS = {
|
|
137
|
+
TWILIO_SMS_CONFIGURATION: "twilio-sms-configuration",
|
|
138
|
+
TWILIO_PHONE_NUMBERS: "twilio-phone-numbers",
|
|
139
|
+
DAILY_CO_DETAILS: "daily-co-details",
|
|
140
|
+
ZOOM_DETAILS: "zoom-details"
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
144
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
145
|
+
var useCreateDaily = function useCreateDaily() {
|
|
146
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
147
|
+
return useMutationWithInvalidation(dailiesApi.create, _objectSpread$3({
|
|
148
|
+
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
|
|
149
|
+
}, options));
|
|
150
|
+
};
|
|
151
|
+
var useFetchDaily = function useFetchDaily() {
|
|
152
|
+
return useQuery(QUERY_KEYS.DAILY_CO_DETAILS, dailiesApi.show, {
|
|
153
|
+
staleTime: DEFAULT_STALE_TIME
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
var useDestroyDaily = function useDestroyDaily(_ref) {
|
|
157
|
+
var onSuccess = _ref.onSuccess;
|
|
158
|
+
return useMutationWithInvalidation(dailiesApi.destroy, {
|
|
159
|
+
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS],
|
|
160
|
+
onSuccess: onSuccess
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
function _extends() {
|
|
165
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
166
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
167
|
+
var source = arguments[i];
|
|
168
|
+
for (var key in source) {
|
|
169
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
170
|
+
target[key] = source[key];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return target;
|
|
175
|
+
};
|
|
176
|
+
return _extends.apply(this, arguments);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
180
|
+
if (source == null) return {};
|
|
181
|
+
var target = {};
|
|
182
|
+
var sourceKeys = Object.keys(source);
|
|
183
|
+
var key, i;
|
|
184
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
185
|
+
key = sourceKeys[i];
|
|
186
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
187
|
+
target[key] = source[key];
|
|
188
|
+
}
|
|
189
|
+
return target;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function _objectWithoutProperties(source, excluded) {
|
|
193
|
+
if (source == null) return {};
|
|
194
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
195
|
+
var key, i;
|
|
196
|
+
if (Object.getOwnPropertySymbols) {
|
|
197
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
198
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
199
|
+
key = sourceSymbolKeys[i];
|
|
200
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
201
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
202
|
+
target[key] = source[key];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return target;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
var _excluded = ["className", "children"];
|
|
209
|
+
var ExternalLink = function ExternalLink(_ref) {
|
|
210
|
+
var _ref$className = _ref.className,
|
|
211
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
212
|
+
_ref$children = _ref.children,
|
|
213
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
214
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
215
|
+
return /*#__PURE__*/React.createElement("a", _extends({
|
|
216
|
+
className: classnames(["neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium", className])
|
|
217
|
+
}, props), children);
|
|
218
|
+
};
|
|
219
|
+
var ExternalLink$1 = /*#__PURE__*/React.memo(ExternalLink);
|
|
220
|
+
|
|
221
|
+
var MANAGE_DAILY_CO_FORM_INITIAL_VALUES = {
|
|
222
|
+
apiKey: ""
|
|
223
|
+
};
|
|
224
|
+
var DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({
|
|
225
|
+
apiKey: yup.string().trim().required(t$1("neetoIntegrations.errors.required", {
|
|
226
|
+
entity: t$1("neetoIntegrations.daily.apiKey")
|
|
227
|
+
}))
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
var Form = function Form(_ref) {
|
|
231
|
+
var helpDocUrl = _ref.helpDocUrl,
|
|
232
|
+
videoUrl = _ref.videoUrl,
|
|
233
|
+
onConnect = _ref.onConnect;
|
|
234
|
+
var _useTranslation = useTranslation(),
|
|
235
|
+
t = _useTranslation.t;
|
|
236
|
+
var _useState = useState(false),
|
|
237
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
238
|
+
isDemoModalOpen = _useState2[0],
|
|
239
|
+
setIsDemoModalOpen = _useState2[1];
|
|
240
|
+
var _useCreateDaily = useCreateDaily({
|
|
241
|
+
onSuccess: function onSuccess() {
|
|
242
|
+
return onConnect === null || onConnect === void 0 ? void 0 : onConnect();
|
|
243
|
+
}
|
|
244
|
+
}),
|
|
245
|
+
createDaily = _useCreateDaily.mutate,
|
|
246
|
+
isConnecting = _useCreateDaily.isLoading;
|
|
247
|
+
var handleSubmit = function handleSubmit(payload) {
|
|
248
|
+
return createDaily(payload);
|
|
249
|
+
};
|
|
250
|
+
if (isConnecting) {
|
|
251
|
+
return /*#__PURE__*/React.createElement(PageLoader, null);
|
|
252
|
+
}
|
|
253
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
254
|
+
className: "mx-auto w-full max-w-md"
|
|
255
|
+
}, /*#__PURE__*/React.createElement(Form$2, {
|
|
256
|
+
formikProps: {
|
|
257
|
+
initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,
|
|
258
|
+
validationSchema: DAILY_CO_VALIDATION_SCHEMA,
|
|
259
|
+
onSubmit: handleSubmit
|
|
260
|
+
}
|
|
261
|
+
}, function (_ref2) {
|
|
262
|
+
var dirty = _ref2.dirty;
|
|
263
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
264
|
+
className: "mt-10 w-full space-y-5"
|
|
265
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
266
|
+
className: "block"
|
|
267
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
268
|
+
autoFocus: true,
|
|
269
|
+
required: true,
|
|
270
|
+
label: t("neetoIntegrations.daily.apiKey"),
|
|
271
|
+
name: "apiKey",
|
|
272
|
+
helpText: /*#__PURE__*/React.createElement(Trans, {
|
|
273
|
+
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
274
|
+
components: {
|
|
275
|
+
externalLink: /*#__PURE__*/React.createElement(ExternalLink$1, {
|
|
276
|
+
href: helpDocUrl,
|
|
277
|
+
rel: "noreferrer",
|
|
278
|
+
target: "_blank"
|
|
279
|
+
})
|
|
280
|
+
}
|
|
281
|
+
})
|
|
282
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
283
|
+
className: "mt-8",
|
|
284
|
+
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
285
|
+
style: "link",
|
|
286
|
+
onClick: function onClick() {
|
|
287
|
+
return setIsDemoModalOpen(true);
|
|
288
|
+
}
|
|
289
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
290
|
+
disabled: isConnecting || !dirty,
|
|
291
|
+
label: t("neetoIntegrations.common.connect"),
|
|
292
|
+
loading: isConnecting,
|
|
293
|
+
type: "submit"
|
|
294
|
+
})));
|
|
295
|
+
}), /*#__PURE__*/React.createElement(WalkthroughModal, {
|
|
296
|
+
isOpen: isDemoModalOpen,
|
|
297
|
+
videoUrl: videoUrl,
|
|
298
|
+
onClose: function onClose() {
|
|
299
|
+
return setIsDemoModalOpen(false);
|
|
300
|
+
}
|
|
301
|
+
}));
|
|
302
|
+
};
|
|
303
|
+
var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
304
|
+
|
|
305
|
+
var Manage$1 = withT(function (_ref) {
|
|
306
|
+
var t = _ref.t,
|
|
307
|
+
title = _ref.title,
|
|
308
|
+
description = _ref.description,
|
|
309
|
+
integration = _ref.integration,
|
|
310
|
+
isDisconnectAlertOpen = _ref.isDisconnectAlertOpen,
|
|
311
|
+
setIsDisconnectAlertOpen = _ref.setIsDisconnectAlertOpen,
|
|
312
|
+
isDisconnecting = _ref.isDisconnecting,
|
|
313
|
+
onDisconnect = _ref.onDisconnect,
|
|
314
|
+
onClose = _ref.onClose;
|
|
315
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
316
|
+
className: "mx-auto w-full max-w-md"
|
|
317
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
318
|
+
className: "mt-10 w-full space-y-4"
|
|
319
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
320
|
+
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
321
|
+
style: "h3",
|
|
322
|
+
weight: "semibold"
|
|
323
|
+
}, title), /*#__PURE__*/React.createElement(Typography, {
|
|
324
|
+
className: "neeto-ui-text-gray-600 break-all",
|
|
325
|
+
style: "body1",
|
|
326
|
+
weight: "normal"
|
|
327
|
+
}, description), /*#__PURE__*/React.createElement(Button, {
|
|
328
|
+
label: t("neetoIntegrations.common.disconnect"),
|
|
329
|
+
style: "danger",
|
|
330
|
+
onClick: function onClick() {
|
|
331
|
+
return setIsDisconnectAlertOpen(true);
|
|
332
|
+
}
|
|
333
|
+
}))), /*#__PURE__*/React.createElement(DisconnectAlert, {
|
|
334
|
+
isDisconnecting: isDisconnecting,
|
|
335
|
+
onClose: onClose,
|
|
336
|
+
onDisconnect: onDisconnect,
|
|
337
|
+
isOpen: isDisconnectAlertOpen,
|
|
338
|
+
message: t("neetoIntegrations.".concat(integration, ".disconnect.message")),
|
|
339
|
+
title: t("neetoIntegrations.".concat(integration, ".disconnect.title"))
|
|
340
|
+
}));
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
var Manage = function Manage(_ref) {
|
|
344
|
+
var onDisconnect = _ref.onDisconnect;
|
|
345
|
+
var _useState = useState(false),
|
|
346
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
347
|
+
isDisconnectAlertOpen = _useState2[0],
|
|
348
|
+
setIsDisconnectAlertOpen = _useState2[1];
|
|
349
|
+
var _useFetchDaily = useFetchDaily(),
|
|
350
|
+
_useFetchDaily$data = _useFetchDaily.data,
|
|
351
|
+
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
352
|
+
_useFetchDaily$data2$ = _useFetchDaily$data2.metadata,
|
|
353
|
+
metadata = _useFetchDaily$data2$ === void 0 ? {} : _useFetchDaily$data2$,
|
|
354
|
+
isLoading = _useFetchDaily.isLoading;
|
|
355
|
+
var _ref2 = metadata || {},
|
|
356
|
+
_ref2$apiKey = _ref2.apiKey,
|
|
357
|
+
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
358
|
+
var _useTranslation = useTranslation(),
|
|
359
|
+
t = _useTranslation.t;
|
|
360
|
+
var _useDestroyDaily = useDestroyDaily({
|
|
361
|
+
onSuccess: function onSuccess() {
|
|
362
|
+
setIsDisconnectAlertOpen(false);
|
|
363
|
+
onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
|
|
364
|
+
}
|
|
365
|
+
}),
|
|
366
|
+
destroyIntegration = _useDestroyDaily.mutate,
|
|
367
|
+
isDisconnecting = _useDestroyDaily.isLoading;
|
|
368
|
+
var handleDisconnect = function handleDisconnect() {
|
|
369
|
+
return destroyIntegration("daily");
|
|
370
|
+
};
|
|
371
|
+
if (isLoading || isDisconnecting) {
|
|
372
|
+
return /*#__PURE__*/React.createElement(PageLoader, null);
|
|
373
|
+
}
|
|
374
|
+
if (isNotPresent(apiKey)) {
|
|
375
|
+
onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
|
|
376
|
+
}
|
|
377
|
+
return /*#__PURE__*/React.createElement(Manage$1, {
|
|
378
|
+
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
379
|
+
isDisconnecting: isDisconnecting,
|
|
380
|
+
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
381
|
+
description: t("neetoIntegrations.daily.yourApiKey", {
|
|
382
|
+
apiKey: apiKey
|
|
383
|
+
}),
|
|
384
|
+
integration: "daily",
|
|
385
|
+
title: t("neetoIntegrations.daily.connected"),
|
|
386
|
+
onClose: function onClose() {
|
|
387
|
+
return setIsDisconnectAlertOpen(false);
|
|
388
|
+
},
|
|
389
|
+
onDisconnect: handleDisconnect
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
var Daily = function Daily(_ref) {
|
|
394
|
+
var _ref$isOnboarding = _ref.isOnboarding,
|
|
395
|
+
isOnboarding = _ref$isOnboarding === void 0 ? false : _ref$isOnboarding,
|
|
396
|
+
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
397
|
+
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
398
|
+
_ref$videoUrl = _ref.videoUrl,
|
|
399
|
+
videoUrl = _ref$videoUrl === void 0 ? "" : _ref$videoUrl,
|
|
400
|
+
_ref$onConnect = _ref.onConnect,
|
|
401
|
+
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
402
|
+
_ref$onDisconnect = _ref.onDisconnect,
|
|
403
|
+
onDisconnect = _ref$onDisconnect === void 0 ? noop : _ref$onDisconnect;
|
|
404
|
+
var _useFetchDaily = useFetchDaily(),
|
|
405
|
+
_useFetchDaily$data = _useFetchDaily.data,
|
|
406
|
+
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
407
|
+
_useFetchDaily$data2$ = _useFetchDaily$data2.metadata,
|
|
408
|
+
metadata = _useFetchDaily$data2$ === void 0 ? {} : _useFetchDaily$data2$;
|
|
409
|
+
var _ref2 = metadata || {},
|
|
410
|
+
_ref2$apiKey = _ref2.apiKey,
|
|
411
|
+
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
412
|
+
if (isPresent(apiKey) && !isOnboarding) {
|
|
413
|
+
return /*#__PURE__*/React.createElement(Manage, {
|
|
414
|
+
onDisconnect: onDisconnect
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
return /*#__PURE__*/React.createElement(Form$1, {
|
|
418
|
+
onConnect: onConnect,
|
|
419
|
+
helpDocUrl: helpDocUrl,
|
|
420
|
+
videoUrl: videoUrl
|
|
421
|
+
});
|
|
422
|
+
};
|
|
423
|
+
withTitle(Daily, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
424
|
+
|
|
72
425
|
var Stepper = function Stepper(_ref) {
|
|
73
426
|
var _ref$steps = _ref.steps,
|
|
74
427
|
steps = _ref$steps === void 0 ? {} : _ref$steps;
|
|
@@ -308,47 +661,6 @@ var TWILIO_INTEGRATION_STEPS = [{
|
|
|
308
661
|
isCompleted: false
|
|
309
662
|
}];
|
|
310
663
|
|
|
311
|
-
function _typeof(obj) {
|
|
312
|
-
"@babel/helpers - typeof";
|
|
313
|
-
|
|
314
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
315
|
-
return typeof obj;
|
|
316
|
-
} : function (obj) {
|
|
317
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
318
|
-
}, _typeof(obj);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
function _toPrimitive(input, hint) {
|
|
322
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
323
|
-
var prim = input[Symbol.toPrimitive];
|
|
324
|
-
if (prim !== undefined) {
|
|
325
|
-
var res = prim.call(input, hint || "default");
|
|
326
|
-
if (_typeof(res) !== "object") return res;
|
|
327
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
328
|
-
}
|
|
329
|
-
return (hint === "string" ? String : Number)(input);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
function _toPropertyKey(arg) {
|
|
333
|
-
var key = _toPrimitive(arg, "string");
|
|
334
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
function _defineProperty(obj, key, value) {
|
|
338
|
-
key = _toPropertyKey(key);
|
|
339
|
-
if (key in obj) {
|
|
340
|
-
Object.defineProperty(obj, key, {
|
|
341
|
-
value: value,
|
|
342
|
-
enumerable: true,
|
|
343
|
-
configurable: true,
|
|
344
|
-
writable: true
|
|
345
|
-
});
|
|
346
|
-
} else {
|
|
347
|
-
obj[key] = value;
|
|
348
|
-
}
|
|
349
|
-
return obj;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
664
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
353
665
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
354
666
|
var ConfigurationForm = function ConfigurationForm(_ref) {
|
|
@@ -422,8 +734,6 @@ function _toConsumableArray(arr) {
|
|
|
422
734
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
423
735
|
}
|
|
424
736
|
|
|
425
|
-
var TWILIO_CONFIGURATION_BASE_URL = "/neeto_integrations/twilio/sms_configurations";
|
|
426
|
-
|
|
427
737
|
var twilioApi = {
|
|
428
738
|
fetchTwilioSmsConfiguration: function fetchTwilioSmsConfiguration() {
|
|
429
739
|
return axios.get(TWILIO_CONFIGURATION_BASE_URL);
|
|
@@ -441,11 +751,6 @@ var twilioApi = {
|
|
|
441
751
|
}
|
|
442
752
|
};
|
|
443
753
|
|
|
444
|
-
var QUERY_KEYS = {
|
|
445
|
-
TWILIO_SMS_CONFIGURATION: "twilio-sms-configuration",
|
|
446
|
-
TWILIO_PHONE_NUMBERS: "twilio-phone-numbers"
|
|
447
|
-
};
|
|
448
|
-
|
|
449
754
|
var useFetchTwilioSmsConfiguration = function useFetchTwilioSmsConfiguration() {
|
|
450
755
|
return useQuery(QUERY_KEYS.TWILIO_SMS_CONFIGURATION, twilioApi.fetchTwilioSmsConfiguration, {
|
|
451
756
|
select: function select(response) {
|
|
@@ -632,7 +937,7 @@ var TwilioConfiguration = function TwilioConfiguration(_ref) {
|
|
|
632
937
|
selectedPhoneNumber: selectedPhoneNumber
|
|
633
938
|
});
|
|
634
939
|
};
|
|
635
|
-
return /*#__PURE__*/React.createElement(Form, {
|
|
940
|
+
return /*#__PURE__*/React.createElement(Form$2, {
|
|
636
941
|
className: "mx-auto flex w-full max-w-md flex-col",
|
|
637
942
|
formikProps: {
|
|
638
943
|
enableReinitialize: true,
|