@bigbinary/neeto-integrations-frontend 2.12.7 → 3.0.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/javascript/src/translations/en.json +1 -1
- package/dist/Daily.cjs.js +292 -213
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +284 -213
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +390 -291
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +378 -291
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Twilio.cjs.js +88 -70
- package/dist/Twilio.cjs.js.map +1 -1
- package/dist/Twilio.js +81 -66
- package/dist/Twilio.js.map +1 -1
- package/dist/ZapierForm.cjs.js +138 -105
- package/dist/ZapierForm.cjs.js.map +1 -1
- package/dist/ZapierForm.js +126 -100
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.cjs.js +303 -221
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +295 -222
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +553 -433
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +539 -433
- package/dist/index.js.map +1 -1
- package/package.json +17 -16
- package/types.d.ts +3 -0
package/dist/Zoom.js
CHANGED
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
|
-
import { isPresent, noop,
|
|
4
|
-
import
|
|
3
|
+
import { isPresent, noop, humanize, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
4
|
+
import ZoomIcon from '@bigbinary/neeto-icons/misc/Zoom';
|
|
5
5
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
6
6
|
import { useTranslation, Trans } from 'react-i18next';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { useMutationWithInvalidation, withTitle, useQueryParams, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import Check from '@bigbinary/neeto-icons/Check';
|
|
10
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
11
|
+
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
12
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
11
13
|
import '@bigbinary/neeto-molecules/IntegrationCard';
|
|
12
14
|
import DisconnectAlert from '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
|
|
13
15
|
import WalkthroughModal from '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
|
|
14
16
|
import i18next, { t as t$1 } from 'i18next';
|
|
17
|
+
import { useQuery } from '@tanstack/react-query';
|
|
15
18
|
import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
|
|
16
|
-
import { useQuery } from 'react-query';
|
|
17
19
|
import axios from 'axios';
|
|
18
20
|
import Container from '@bigbinary/neeto-molecules/Container';
|
|
19
21
|
import Header from '@bigbinary/neeto-molecules/Header';
|
|
20
22
|
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
21
|
-
import
|
|
23
|
+
import Input from '@bigbinary/neetoui/formik/Input';
|
|
24
|
+
import FormikForm from '@bigbinary/neetoui/formik/Form';
|
|
25
|
+
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
26
|
+
import { useHistory } from 'react-router-dom';
|
|
27
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
28
|
import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
29
|
+
import '@bigbinary/neeto-icons/misc/GoogleCalendar';
|
|
30
|
+
import '@bigbinary/neeto-icons/misc/Google';
|
|
31
|
+
import '@bigbinary/neetoui/Callout';
|
|
23
32
|
import 'ramda';
|
|
33
|
+
import '@bigbinary/neetoui/formik/Select';
|
|
24
34
|
import * as yup from 'yup';
|
|
35
|
+
import '@bigbinary/neetoui/Modal';
|
|
36
|
+
import DailyIcon from '@bigbinary/neeto-icons/misc/Daily';
|
|
25
37
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
26
38
|
|
|
27
39
|
function _arrayWithHoles(arr) {
|
|
@@ -79,21 +91,6 @@ function _slicedToArray(arr, i) {
|
|
|
79
91
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
80
92
|
}
|
|
81
93
|
|
|
82
|
-
function _extends$1() {
|
|
83
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
84
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
85
|
-
var source = arguments[i];
|
|
86
|
-
for (var key in source) {
|
|
87
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
88
|
-
target[key] = source[key];
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return target;
|
|
93
|
-
};
|
|
94
|
-
return _extends$1.apply(this, arguments);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
94
|
function _typeof(o) {
|
|
98
95
|
"@babel/helpers - typeof";
|
|
99
96
|
|
|
@@ -164,23 +161,25 @@ var QUERY_KEYS = {
|
|
|
164
161
|
ZOOM_DETAILS: "zoom-details"
|
|
165
162
|
};
|
|
166
163
|
|
|
167
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
168
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
164
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
165
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
169
166
|
var useCreateDaily = function useCreateDaily() {
|
|
170
167
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
171
|
-
return useMutationWithInvalidation(dailiesApi.create, _objectSpread({
|
|
172
|
-
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
|
|
168
|
+
return useMutationWithInvalidation(dailiesApi.create, _objectSpread$4({
|
|
169
|
+
keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]]
|
|
173
170
|
}, options));
|
|
174
171
|
};
|
|
175
172
|
var useFetchDaily = function useFetchDaily() {
|
|
176
|
-
return useQuery(
|
|
173
|
+
return useQuery({
|
|
174
|
+
queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],
|
|
175
|
+
queryFn: dailiesApi.show,
|
|
177
176
|
staleTime: DEFAULT_STALE_TIME
|
|
178
177
|
});
|
|
179
178
|
};
|
|
180
179
|
var useDestroyDaily = function useDestroyDaily(_ref) {
|
|
181
180
|
var onSuccess = _ref.onSuccess;
|
|
182
181
|
return useMutationWithInvalidation(dailiesApi.destroy, {
|
|
183
|
-
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS],
|
|
182
|
+
keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],
|
|
184
183
|
onSuccess: onSuccess
|
|
185
184
|
});
|
|
186
185
|
};
|
|
@@ -215,15 +214,19 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
215
214
|
}
|
|
216
215
|
|
|
217
216
|
var _excluded = ["className", "children"];
|
|
217
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
218
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
218
219
|
var ExternalLink = function ExternalLink(_ref) {
|
|
219
220
|
var _ref$className = _ref.className,
|
|
220
221
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
221
222
|
_ref$children = _ref.children,
|
|
222
223
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
223
224
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
224
|
-
return /*#__PURE__*/
|
|
225
|
+
return /*#__PURE__*/jsx("a", _objectSpread$3(_objectSpread$3({
|
|
225
226
|
className: classnames(["neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium", className])
|
|
226
|
-
}, props),
|
|
227
|
+
}, props), {}, {
|
|
228
|
+
children: children
|
|
229
|
+
}));
|
|
227
230
|
};
|
|
228
231
|
var ExternalLink$1 = /*#__PURE__*/React__default.memo(ExternalLink);
|
|
229
232
|
|
|
@@ -243,6 +246,7 @@ var Form = function Form(_ref) {
|
|
|
243
246
|
breadcrumbs = _ref.breadcrumbs;
|
|
244
247
|
var _useTranslation = useTranslation(),
|
|
245
248
|
t = _useTranslation.t;
|
|
249
|
+
var history = useHistory();
|
|
246
250
|
var _useState = useState(false),
|
|
247
251
|
_useState2 = _slicedToArray(_useState, 2),
|
|
248
252
|
isDemoModalOpen = _useState2[0],
|
|
@@ -253,75 +257,83 @@ var Form = function Form(_ref) {
|
|
|
253
257
|
}
|
|
254
258
|
}),
|
|
255
259
|
createDaily = _useCreateDaily.mutate,
|
|
256
|
-
isConnecting = _useCreateDaily.
|
|
260
|
+
isConnecting = _useCreateDaily.isPending;
|
|
257
261
|
var handleSubmit = function handleSubmit(payload) {
|
|
258
262
|
return createDaily(payload);
|
|
259
263
|
};
|
|
260
264
|
if (isConnecting) {
|
|
261
|
-
return /*#__PURE__*/
|
|
265
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
262
266
|
}
|
|
263
|
-
return /*#__PURE__*/
|
|
264
|
-
isHeaderFixed: true
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
267
|
+
return /*#__PURE__*/jsxs(Container, {
|
|
268
|
+
isHeaderFixed: true,
|
|
269
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
270
|
+
breadcrumbs: breadcrumbs,
|
|
271
|
+
title: /*#__PURE__*/jsxs("span", {
|
|
272
|
+
className: "flex items-center gap-2",
|
|
273
|
+
children: [t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/jsx(HelpPopover, {
|
|
274
|
+
title: t("neetoIntegrations.daily.connect.title"),
|
|
275
|
+
description: /*#__PURE__*/jsx(Trans, {
|
|
276
|
+
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
277
|
+
components: {
|
|
278
|
+
externalLink: /*#__PURE__*/jsx(ExternalLink$1, {
|
|
279
|
+
"data-cy": "api-key-help-doc-link",
|
|
280
|
+
href: helpDocUrl,
|
|
281
|
+
rel: "noreferrer",
|
|
282
|
+
target: "_blank"
|
|
283
|
+
})
|
|
284
|
+
}
|
|
285
|
+
}),
|
|
286
|
+
helpLinkProps: {
|
|
287
|
+
label: /*#__PURE__*/jsx(Button, {
|
|
288
|
+
className: "mt-8",
|
|
289
|
+
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
290
|
+
style: "link",
|
|
291
|
+
onClick: function onClick() {
|
|
292
|
+
return setIsDemoModalOpen(true);
|
|
293
|
+
}
|
|
294
|
+
})
|
|
289
295
|
}
|
|
296
|
+
})]
|
|
297
|
+
})
|
|
298
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
299
|
+
className: "mx-auto w-full max-w-md",
|
|
300
|
+
children: [/*#__PURE__*/jsx(FormikForm, {
|
|
301
|
+
formikProps: {
|
|
302
|
+
initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,
|
|
303
|
+
validationSchema: DAILY_CO_VALIDATION_SCHEMA,
|
|
304
|
+
onSubmit: handleSubmit
|
|
305
|
+
},
|
|
306
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
307
|
+
className: "mt-14 w-full space-y-2",
|
|
308
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
309
|
+
className: "block min-h-20",
|
|
310
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
311
|
+
autoFocus: true,
|
|
312
|
+
required: true,
|
|
313
|
+
label: t("neetoIntegrations.daily.apiKey"),
|
|
314
|
+
name: "apiKey"
|
|
315
|
+
})
|
|
316
|
+
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
317
|
+
cancelButtonProps: {
|
|
318
|
+
onClick: function onClick() {
|
|
319
|
+
return history.goBack();
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
isSubmitting: isConnecting,
|
|
323
|
+
submitButtonProps: {
|
|
324
|
+
label: t("neetoIntegrations.common.connect")
|
|
325
|
+
}
|
|
326
|
+
})]
|
|
290
327
|
})
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
}, function (_ref2) {
|
|
302
|
-
var dirty = _ref2.dirty;
|
|
303
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
304
|
-
className: "mt-14 w-full space-y-5"
|
|
305
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
306
|
-
className: "block min-h-20"
|
|
307
|
-
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
308
|
-
autoFocus: true,
|
|
309
|
-
required: true,
|
|
310
|
-
label: t("neetoIntegrations.daily.apiKey"),
|
|
311
|
-
name: "apiKey"
|
|
312
|
-
})), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
313
|
-
disabled: isConnecting || !dirty,
|
|
314
|
-
label: t("neetoIntegrations.common.connect"),
|
|
315
|
-
loading: isConnecting,
|
|
316
|
-
type: "submit"
|
|
317
|
-
})));
|
|
318
|
-
}), /*#__PURE__*/React__default.createElement(WalkthroughModal, {
|
|
319
|
-
videoUrl: videoUrl,
|
|
320
|
-
isOpen: isDemoModalOpen,
|
|
321
|
-
onClose: function onClose() {
|
|
322
|
-
return setIsDemoModalOpen(false);
|
|
323
|
-
}
|
|
324
|
-
})));
|
|
328
|
+
}), /*#__PURE__*/jsx(WalkthroughModal, {
|
|
329
|
+
videoUrl: videoUrl,
|
|
330
|
+
isOpen: isDemoModalOpen,
|
|
331
|
+
onClose: function onClose() {
|
|
332
|
+
return setIsDemoModalOpen(false);
|
|
333
|
+
}
|
|
334
|
+
})]
|
|
335
|
+
})]
|
|
336
|
+
});
|
|
325
337
|
};
|
|
326
338
|
var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
327
339
|
|
|
@@ -350,35 +362,35 @@ var Manage$1 = function Manage$1(_ref) {
|
|
|
350
362
|
}
|
|
351
363
|
}),
|
|
352
364
|
destroyIntegration = _useDestroyDaily.mutate,
|
|
353
|
-
isDisconnecting = _useDestroyDaily.
|
|
365
|
+
isDisconnecting = _useDestroyDaily.isPending;
|
|
354
366
|
var isConnected = isPresent(apiKey);
|
|
355
367
|
var handleDisconnect = function handleDisconnect() {
|
|
356
368
|
return destroyIntegration("daily");
|
|
357
369
|
};
|
|
358
|
-
if (isFetching || isDisconnecting) return /*#__PURE__*/
|
|
359
|
-
return /*#__PURE__*/
|
|
370
|
+
if (isFetching || isDisconnecting) return /*#__PURE__*/jsx(PageLoader, {});
|
|
371
|
+
return /*#__PURE__*/jsx(Manage, {
|
|
360
372
|
isConnected: isConnected,
|
|
361
373
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
362
374
|
isDisconnecting: isDisconnecting,
|
|
363
375
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
364
|
-
Icon:
|
|
376
|
+
Icon: DailyIcon,
|
|
365
377
|
connectPath: buildUrl(window.location.pathname, {
|
|
366
378
|
connect: true
|
|
367
379
|
}),
|
|
368
380
|
integration: "daily",
|
|
369
|
-
description: isConnected ? /*#__PURE__*/
|
|
381
|
+
description: isConnected ? /*#__PURE__*/jsx(Trans, {
|
|
370
382
|
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
371
383
|
values: {
|
|
372
384
|
apiKey: apiKey
|
|
373
385
|
},
|
|
374
386
|
components: {
|
|
375
|
-
wrapper: /*#__PURE__*/
|
|
387
|
+
wrapper: /*#__PURE__*/jsx("div", {
|
|
376
388
|
className: "neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 border px-3 py-2"
|
|
377
389
|
}),
|
|
378
|
-
span: /*#__PURE__*/
|
|
390
|
+
span: /*#__PURE__*/jsx("span", {
|
|
379
391
|
className: "break-all text-sm"
|
|
380
392
|
}),
|
|
381
|
-
copy: /*#__PURE__*/
|
|
393
|
+
copy: /*#__PURE__*/jsx(CopyToClipboardButton, {
|
|
382
394
|
className: "flex-shrink-0 self-start",
|
|
383
395
|
style: "text",
|
|
384
396
|
value: apiKey
|
|
@@ -417,12 +429,12 @@ var Daily = function Daily(_ref) {
|
|
|
417
429
|
_ref2$apiKey = _ref2.apiKey,
|
|
418
430
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
419
431
|
if (isPresent(apiKey) && !isOnboarding || !connect) {
|
|
420
|
-
return /*#__PURE__*/
|
|
432
|
+
return /*#__PURE__*/jsx(Manage$1, {
|
|
421
433
|
description: description,
|
|
422
434
|
onDisconnect: onDisconnect
|
|
423
435
|
});
|
|
424
436
|
}
|
|
425
|
-
return /*#__PURE__*/
|
|
437
|
+
return /*#__PURE__*/jsx(Form$1, {
|
|
426
438
|
helpDocUrl: helpDocUrl,
|
|
427
439
|
onConnect: onConnect,
|
|
428
440
|
videoUrl: videoUrl
|
|
@@ -528,6 +540,8 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
|
|
|
528
540
|
var propTypesExports = propTypes.exports;
|
|
529
541
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
530
542
|
|
|
543
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
544
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
531
545
|
var Connect = withT(function (_ref) {
|
|
532
546
|
var t = _ref.t,
|
|
533
547
|
Icon = _ref.Icon,
|
|
@@ -535,32 +549,61 @@ var Connect = withT(function (_ref) {
|
|
|
535
549
|
title = _ref$title === void 0 ? "" : _ref$title,
|
|
536
550
|
_ref$description = _ref.description,
|
|
537
551
|
description = _ref$description === void 0 ? "" : _ref$description,
|
|
552
|
+
_ref$integration = _ref.integration,
|
|
553
|
+
integration = _ref$integration === void 0 ? "" : _ref$integration,
|
|
554
|
+
_ref$integrationName = _ref.integrationName,
|
|
555
|
+
integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
|
|
556
|
+
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
557
|
+
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
538
558
|
_ref$buttonProps = _ref.buttonProps,
|
|
539
559
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
540
560
|
_ref$onConnect = _ref.onConnect,
|
|
541
561
|
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
542
562
|
children = _ref.children,
|
|
543
563
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
544
|
-
return /*#__PURE__*/
|
|
545
|
-
className: "mx-auto w-full max-w-3xl"
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
+
return /*#__PURE__*/jsxs("div", {
|
|
565
|
+
className: "mx-auto w-full max-w-3xl",
|
|
566
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
567
|
+
className: "mb-6 flex flex-col gap-y-2",
|
|
568
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
569
|
+
size: 48
|
|
570
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
571
|
+
className: "flex flex-col gap-y-1",
|
|
572
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
573
|
+
style: "h2",
|
|
574
|
+
children: title
|
|
575
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
576
|
+
style: "body2",
|
|
577
|
+
children: description
|
|
578
|
+
})]
|
|
579
|
+
})]
|
|
580
|
+
}), helpDocUrl && /*#__PURE__*/jsx("div", {
|
|
581
|
+
className: "mb-4",
|
|
582
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
583
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
584
|
+
components: {
|
|
585
|
+
helpLink: /*#__PURE__*/jsx(Button, {
|
|
586
|
+
className: "text-xs",
|
|
587
|
+
href: helpDocUrl,
|
|
588
|
+
size: "small",
|
|
589
|
+
style: "link",
|
|
590
|
+
target: "_blank"
|
|
591
|
+
})
|
|
592
|
+
},
|
|
593
|
+
values: {
|
|
594
|
+
integration: integrationName || humanize(integration)
|
|
595
|
+
}
|
|
596
|
+
})
|
|
597
|
+
}), children, /*#__PURE__*/jsxs("div", {
|
|
598
|
+
className: "flex w-full items-center gap-x-3",
|
|
599
|
+
children: [/*#__PURE__*/jsx(Button, _objectSpread$2({
|
|
600
|
+
label: t("neetoIntegrations.common.connect"),
|
|
601
|
+
onClick: onConnect
|
|
602
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsx(Button, _objectSpread$2({
|
|
603
|
+
style: "secondary"
|
|
604
|
+
}, secondaryButtonProps))]
|
|
605
|
+
})]
|
|
606
|
+
});
|
|
564
607
|
});
|
|
565
608
|
Connect.prototypes = {
|
|
566
609
|
/**
|
|
@@ -634,6 +677,8 @@ const SvgSuccess = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
|
634
677
|
height: 344
|
|
635
678
|
}))));
|
|
636
679
|
|
|
680
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
681
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
637
682
|
var Finish = withT(function (_ref) {
|
|
638
683
|
var t = _ref.t,
|
|
639
684
|
_ref$onClick = _ref.onClick,
|
|
@@ -645,20 +690,23 @@ var Finish = withT(function (_ref) {
|
|
|
645
690
|
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
646
691
|
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
|
|
647
692
|
children = _ref.children;
|
|
648
|
-
return /*#__PURE__*/
|
|
649
|
-
className: "mx-auto w-full max-w-3xl"
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
693
|
+
return /*#__PURE__*/jsxs("div", {
|
|
694
|
+
className: "mx-auto w-full max-w-3xl",
|
|
695
|
+
children: [/*#__PURE__*/jsx(SvgSuccess, {}), /*#__PURE__*/jsx(Typography, {
|
|
696
|
+
className: "mb-6 mt-4",
|
|
697
|
+
style: "h2",
|
|
698
|
+
weight: "semibold",
|
|
699
|
+
children: title
|
|
700
|
+
}), children, /*#__PURE__*/jsxs("div", {
|
|
701
|
+
className: "flex w-full items-center gap-x-2",
|
|
702
|
+
children: [/*#__PURE__*/jsx(Button, _objectSpread$1({
|
|
703
|
+
onClick: onClick,
|
|
704
|
+
label: t("neetoIntegrations.common.continue")
|
|
705
|
+
}, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/jsx(Button, _objectSpread$1({
|
|
706
|
+
style: "secondary"
|
|
707
|
+
}, secondaryButtonProps))]
|
|
708
|
+
})]
|
|
709
|
+
});
|
|
662
710
|
});
|
|
663
711
|
Finish.prototypes = {
|
|
664
712
|
/**
|
|
@@ -704,6 +752,8 @@ function n(n, r) {
|
|
|
704
752
|
var css = ".intrinsic-container{height:0;overflow:hidden;position:relative}.intrinsic-container-16x9{padding-bottom:56.25%}.intrinsic-container-4x3{padding-bottom:75%}.intrinsic-container iframe{height:100%;left:0;position:absolute;top:0;width:100%}";
|
|
705
753
|
n(css,{});
|
|
706
754
|
|
|
755
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
756
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
707
757
|
var Manage = withT(function (_ref) {
|
|
708
758
|
var t = _ref.t,
|
|
709
759
|
_ref$title = _ref.title,
|
|
@@ -747,86 +797,107 @@ var Manage = withT(function (_ref) {
|
|
|
747
797
|
_ref$isConnectDisable = _ref.isConnectDisabled,
|
|
748
798
|
isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
|
|
749
799
|
_ref$connectTooltipPr = _ref.connectTooltipProps,
|
|
750
|
-
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
800
|
+
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr,
|
|
801
|
+
_ref$buttonProps = _ref.buttonProps,
|
|
802
|
+
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
803
|
+
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
804
|
+
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP;
|
|
805
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
806
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
807
|
+
className: "mx-auto w-full max-w-3xl",
|
|
808
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
809
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6",
|
|
810
|
+
children: [Icon && /*#__PURE__*/jsx(Icon, {
|
|
811
|
+
className: "neeto-ui-text-gray-600",
|
|
812
|
+
size: 48
|
|
813
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
814
|
+
className: "space-y-2",
|
|
815
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
816
|
+
className: "flex items-center space-x-4",
|
|
817
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
818
|
+
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
819
|
+
style: "h2",
|
|
820
|
+
weight: "semibold",
|
|
821
|
+
children: title
|
|
822
|
+
}), isConnected && /*#__PURE__*/jsx("div", {
|
|
823
|
+
className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1",
|
|
824
|
+
children: /*#__PURE__*/jsx(Check, {
|
|
825
|
+
size: 24
|
|
826
|
+
})
|
|
827
|
+
})]
|
|
828
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
829
|
+
style: "body1",
|
|
830
|
+
weight: "normal",
|
|
831
|
+
className: classnames("neeto-ui-text-gray-800", {
|
|
832
|
+
"break-all": isConnected
|
|
833
|
+
}),
|
|
834
|
+
children: description
|
|
835
|
+
}), helpDocUrl && /*#__PURE__*/jsx(Typography, {
|
|
836
|
+
className: "neeto-ui-text-gray-800",
|
|
837
|
+
style: "body2",
|
|
838
|
+
weight: "normal",
|
|
839
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
840
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
841
|
+
components: {
|
|
842
|
+
helpLink: /*#__PURE__*/jsx(Button, {
|
|
843
|
+
href: helpDocUrl,
|
|
844
|
+
style: "link",
|
|
845
|
+
target: "_blank"
|
|
846
|
+
})
|
|
847
|
+
},
|
|
848
|
+
values: {
|
|
849
|
+
integration: integrationName || humanize(integration)
|
|
850
|
+
}
|
|
851
|
+
})
|
|
852
|
+
})]
|
|
853
|
+
}), isConnected ? /*#__PURE__*/jsxs("div", {
|
|
854
|
+
className: "space-x-2",
|
|
855
|
+
children: [(managePath || manageUrl) && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
856
|
+
"data-cy": "manage-button",
|
|
857
|
+
href: manageUrl,
|
|
858
|
+
target: manageUrl ? "_blank" : "_self",
|
|
859
|
+
to: managePath,
|
|
860
|
+
label: t("neetoIntegrations.common.manageIntegration", {
|
|
861
|
+
integration: integrationName || humanize(integration)
|
|
862
|
+
})
|
|
863
|
+
}, buttonProps)), onDisconnect && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
864
|
+
"data-cy": "disconnect-button",
|
|
865
|
+
style: "secondary",
|
|
866
|
+
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
867
|
+
integration: integrationName || humanize(integration)
|
|
868
|
+
}),
|
|
869
|
+
onClick: function onClick() {
|
|
870
|
+
return setIsDisconnectAlertOpen(true);
|
|
871
|
+
}
|
|
872
|
+
}, secondaryButtonProps))]
|
|
873
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
874
|
+
children: /*#__PURE__*/jsx(Tooltip, _objectSpread(_objectSpread({
|
|
875
|
+
disabled: !isConnectDisabled
|
|
876
|
+
}, connectTooltipProps), {}, {
|
|
877
|
+
children: /*#__PURE__*/jsx("span", {
|
|
878
|
+
children: (connectPath || connectUrl || onConnect) && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
879
|
+
"data-cy": "connect-button",
|
|
880
|
+
disabled: isConnectDisabled,
|
|
881
|
+
href: connectUrl,
|
|
882
|
+
to: connectPath,
|
|
883
|
+
label: t("neetoIntegrations.common.connectIntegration", {
|
|
884
|
+
integration: integrationName || humanize(integration)
|
|
885
|
+
}),
|
|
886
|
+
onClick: onConnect
|
|
887
|
+
}, buttonProps))
|
|
888
|
+
})
|
|
889
|
+
}))
|
|
890
|
+
})]
|
|
787
891
|
})
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
target: manageUrl ? "_blank" : "_self",
|
|
798
|
-
to: managePath,
|
|
799
|
-
label: t("neetoIntegrations.common.manageIntegration", {
|
|
800
|
-
integration: integrationName || humanize(integration)
|
|
801
|
-
})
|
|
802
|
-
}), onDisconnect && /*#__PURE__*/React__default.createElement(Button, {
|
|
803
|
-
"data-cy": "disconnect-button",
|
|
804
|
-
style: "secondary",
|
|
805
|
-
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
806
|
-
integration: integrationName || humanize(integration)
|
|
807
|
-
}),
|
|
808
|
-
onClick: function onClick() {
|
|
809
|
-
return setIsDisconnectAlertOpen(true);
|
|
810
|
-
}
|
|
811
|
-
})) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Tooltip, _extends$1({
|
|
812
|
-
disabled: !isConnectDisabled
|
|
813
|
-
}, connectTooltipProps), /*#__PURE__*/React__default.createElement("span", null, (connectPath || connectUrl || onConnect) && /*#__PURE__*/React__default.createElement(Button, {
|
|
814
|
-
"data-cy": "connect-button",
|
|
815
|
-
disabled: isConnectDisabled,
|
|
816
|
-
href: connectUrl,
|
|
817
|
-
to: connectPath,
|
|
818
|
-
label: t("neetoIntegrations.common.connectIntegration", {
|
|
819
|
-
integration: integrationName || humanize(integration)
|
|
820
|
-
}),
|
|
821
|
-
onClick: onConnect
|
|
822
|
-
})))))), /*#__PURE__*/React__default.createElement(DisconnectAlert, {
|
|
823
|
-
isDisconnecting: isDisconnecting,
|
|
824
|
-
onClose: onClose,
|
|
825
|
-
onDisconnect: onDisconnect,
|
|
826
|
-
isOpen: isDisconnectAlertOpen,
|
|
827
|
-
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
828
|
-
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
829
|
-
}));
|
|
892
|
+
}), /*#__PURE__*/jsx(DisconnectAlert, {
|
|
893
|
+
isDisconnecting: isDisconnecting,
|
|
894
|
+
onClose: onClose,
|
|
895
|
+
onDisconnect: onDisconnect,
|
|
896
|
+
isOpen: isDisconnectAlertOpen,
|
|
897
|
+
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
898
|
+
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
899
|
+
})]
|
|
900
|
+
});
|
|
830
901
|
});
|
|
831
902
|
|
|
832
903
|
var show = function show() {
|
|
@@ -846,14 +917,16 @@ var zoomApi = {
|
|
|
846
917
|
};
|
|
847
918
|
|
|
848
919
|
var useShowZoom = function useShowZoom() {
|
|
849
|
-
return useQuery(
|
|
920
|
+
return useQuery({
|
|
921
|
+
queryKey: [QUERY_KEYS.ZOOM_DETAILS],
|
|
922
|
+
queryFn: zoomApi.show,
|
|
850
923
|
staleTime: DEFAULT_STALE_TIME
|
|
851
924
|
});
|
|
852
925
|
};
|
|
853
926
|
var useDestroyZoom = function useDestroyZoom(_ref) {
|
|
854
927
|
var _onSuccess = _ref.onSuccess;
|
|
855
928
|
return useMutationWithInvalidation(zoomApi.destroy, {
|
|
856
|
-
keysToInvalidate: [QUERY_KEYS.ZOOM_DETAILS],
|
|
929
|
+
keysToInvalidate: [[QUERY_KEYS.ZOOM_DETAILS]],
|
|
857
930
|
onSuccess: function onSuccess() {
|
|
858
931
|
return _onSuccess === null || _onSuccess === void 0 ? void 0 : _onSuccess();
|
|
859
932
|
}
|
|
@@ -888,23 +961,23 @@ var Zoom = function Zoom(_ref) {
|
|
|
888
961
|
}
|
|
889
962
|
}),
|
|
890
963
|
destroyIntegration = _useDestroyZoom.mutate,
|
|
891
|
-
isDisconnecting = _useDestroyZoom.
|
|
964
|
+
isDisconnecting = _useDestroyZoom.isPending;
|
|
892
965
|
var isConnected = isPresent(email);
|
|
893
966
|
var handleDisconnect = function handleDisconnect() {
|
|
894
967
|
return destroyIntegration("zoom");
|
|
895
968
|
};
|
|
896
|
-
if (isLoading) return /*#__PURE__*/
|
|
897
|
-
return /*#__PURE__*/
|
|
969
|
+
if (isLoading) return /*#__PURE__*/jsx(PageLoader, {});
|
|
970
|
+
return /*#__PURE__*/jsx(Manage, {
|
|
898
971
|
connectUrl: connectUrl,
|
|
899
972
|
isConnected: isConnected,
|
|
900
973
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
901
974
|
isDisconnecting: isDisconnecting,
|
|
902
975
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
903
|
-
Icon:
|
|
976
|
+
Icon: ZoomIcon,
|
|
904
977
|
integration: "zoom",
|
|
905
|
-
description: isConnected ? /*#__PURE__*/
|
|
978
|
+
description: isConnected ? /*#__PURE__*/jsx(Trans, {
|
|
906
979
|
components: {
|
|
907
|
-
underline: /*#__PURE__*/
|
|
980
|
+
underline: /*#__PURE__*/jsx("u", {
|
|
908
981
|
className: "font-medium"
|
|
909
982
|
})
|
|
910
983
|
},
|