@bigbinary/neeto-integrations-frontend 2.12.6 → 2.12.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/javascript/src/translations/en.json +2 -2
- package/dist/Daily.cjs.js +288 -206
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +281 -206
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +384 -284
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +375 -284
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Twilio.cjs.js +73 -59
- package/dist/Twilio.cjs.js.map +1 -1
- package/dist/Twilio.js +66 -55
- 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 +292 -210
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +286 -211
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +526 -412
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +516 -412
- package/dist/index.js.map +1 -1
- package/package.json +14 -13
- package/types.d.ts +3 -0
package/dist/Zoom.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
|
-
import { isPresent, noop,
|
|
3
|
+
import { isPresent, noop, humanize, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { Daily as Daily$1, Zoom as Zoom$1 } from '@bigbinary/neeto-icons/misc';
|
|
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
9
|
import { Check } from '@bigbinary/neeto-icons';
|
|
10
|
-
import
|
|
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';
|
|
@@ -18,10 +20,18 @@ 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/neetoui/Callout';
|
|
23
30
|
import 'ramda';
|
|
31
|
+
import '@bigbinary/neetoui/formik/Select';
|
|
24
32
|
import * as yup from 'yup';
|
|
33
|
+
import '@bigbinary/neetoui/Modal';
|
|
34
|
+
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
25
35
|
|
|
26
36
|
function _arrayWithHoles(arr) {
|
|
27
37
|
if (Array.isArray(arr)) return arr;
|
|
@@ -78,21 +88,6 @@ function _slicedToArray(arr, i) {
|
|
|
78
88
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
79
89
|
}
|
|
80
90
|
|
|
81
|
-
function _extends$1() {
|
|
82
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
83
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
84
|
-
var source = arguments[i];
|
|
85
|
-
for (var key in source) {
|
|
86
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
87
|
-
target[key] = source[key];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return target;
|
|
92
|
-
};
|
|
93
|
-
return _extends$1.apply(this, arguments);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
91
|
function _typeof(o) {
|
|
97
92
|
"@babel/helpers - typeof";
|
|
98
93
|
|
|
@@ -163,11 +158,11 @@ var QUERY_KEYS = {
|
|
|
163
158
|
ZOOM_DETAILS: "zoom-details"
|
|
164
159
|
};
|
|
165
160
|
|
|
166
|
-
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; }
|
|
167
|
-
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; }
|
|
161
|
+
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; }
|
|
162
|
+
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; }
|
|
168
163
|
var useCreateDaily = function useCreateDaily() {
|
|
169
164
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
170
|
-
return useMutationWithInvalidation(dailiesApi.create, _objectSpread({
|
|
165
|
+
return useMutationWithInvalidation(dailiesApi.create, _objectSpread$4({
|
|
171
166
|
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
|
|
172
167
|
}, options));
|
|
173
168
|
};
|
|
@@ -214,15 +209,19 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
214
209
|
}
|
|
215
210
|
|
|
216
211
|
var _excluded = ["className", "children"];
|
|
212
|
+
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; }
|
|
213
|
+
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; }
|
|
217
214
|
var ExternalLink = function ExternalLink(_ref) {
|
|
218
215
|
var _ref$className = _ref.className,
|
|
219
216
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
220
217
|
_ref$children = _ref.children,
|
|
221
218
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
222
219
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
223
|
-
return /*#__PURE__*/
|
|
220
|
+
return /*#__PURE__*/jsx("a", _objectSpread$3(_objectSpread$3({
|
|
224
221
|
className: classnames(["neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium", className])
|
|
225
|
-
}, props),
|
|
222
|
+
}, props), {}, {
|
|
223
|
+
children: children
|
|
224
|
+
}));
|
|
226
225
|
};
|
|
227
226
|
var ExternalLink$1 = /*#__PURE__*/React__default.memo(ExternalLink);
|
|
228
227
|
|
|
@@ -242,6 +241,7 @@ var Form = function Form(_ref) {
|
|
|
242
241
|
breadcrumbs = _ref.breadcrumbs;
|
|
243
242
|
var _useTranslation = useTranslation(),
|
|
244
243
|
t = _useTranslation.t;
|
|
244
|
+
var history = useHistory();
|
|
245
245
|
var _useState = useState(false),
|
|
246
246
|
_useState2 = _slicedToArray(_useState, 2),
|
|
247
247
|
isDemoModalOpen = _useState2[0],
|
|
@@ -257,70 +257,78 @@ var Form = function Form(_ref) {
|
|
|
257
257
|
return createDaily(payload);
|
|
258
258
|
};
|
|
259
259
|
if (isConnecting) {
|
|
260
|
-
return /*#__PURE__*/
|
|
260
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
261
261
|
}
|
|
262
|
-
return /*#__PURE__*/
|
|
263
|
-
isHeaderFixed: true
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
262
|
+
return /*#__PURE__*/jsxs(Container, {
|
|
263
|
+
isHeaderFixed: true,
|
|
264
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
265
|
+
breadcrumbs: breadcrumbs,
|
|
266
|
+
title: /*#__PURE__*/jsxs("span", {
|
|
267
|
+
className: "flex items-center gap-2",
|
|
268
|
+
children: [t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/jsx(HelpPopover, {
|
|
269
|
+
title: t("neetoIntegrations.daily.connect.title"),
|
|
270
|
+
description: /*#__PURE__*/jsx(Trans, {
|
|
271
|
+
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
272
|
+
components: {
|
|
273
|
+
externalLink: /*#__PURE__*/jsx(ExternalLink$1, {
|
|
274
|
+
"data-cy": "api-key-help-doc-link",
|
|
275
|
+
href: helpDocUrl,
|
|
276
|
+
rel: "noreferrer",
|
|
277
|
+
target: "_blank"
|
|
278
|
+
})
|
|
279
|
+
}
|
|
280
|
+
}),
|
|
281
|
+
helpLinkProps: {
|
|
282
|
+
label: /*#__PURE__*/jsx(Button, {
|
|
283
|
+
className: "mt-8",
|
|
284
|
+
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
285
|
+
style: "link",
|
|
286
|
+
onClick: function onClick() {
|
|
287
|
+
return setIsDemoModalOpen(true);
|
|
288
|
+
}
|
|
289
|
+
})
|
|
288
290
|
}
|
|
291
|
+
})]
|
|
292
|
+
})
|
|
293
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
294
|
+
className: "mx-auto w-full max-w-md",
|
|
295
|
+
children: [/*#__PURE__*/jsx(FormikForm, {
|
|
296
|
+
formikProps: {
|
|
297
|
+
initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,
|
|
298
|
+
validationSchema: DAILY_CO_VALIDATION_SCHEMA,
|
|
299
|
+
onSubmit: handleSubmit
|
|
300
|
+
},
|
|
301
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
302
|
+
className: "mt-14 w-full space-y-2",
|
|
303
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
304
|
+
className: "block min-h-20",
|
|
305
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
306
|
+
autoFocus: true,
|
|
307
|
+
required: true,
|
|
308
|
+
label: t("neetoIntegrations.daily.apiKey"),
|
|
309
|
+
name: "apiKey"
|
|
310
|
+
})
|
|
311
|
+
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
312
|
+
cancelButtonProps: {
|
|
313
|
+
onClick: function onClick() {
|
|
314
|
+
return history.goBack();
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
isSubmitting: isConnecting,
|
|
318
|
+
submitButtonProps: {
|
|
319
|
+
label: t("neetoIntegrations.common.connect")
|
|
320
|
+
}
|
|
321
|
+
})]
|
|
289
322
|
})
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
}, function (_ref2) {
|
|
301
|
-
var dirty = _ref2.dirty;
|
|
302
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
303
|
-
className: "mt-14 w-full space-y-5"
|
|
304
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
305
|
-
className: "block min-h-20"
|
|
306
|
-
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
307
|
-
autoFocus: true,
|
|
308
|
-
required: true,
|
|
309
|
-
label: t("neetoIntegrations.daily.apiKey"),
|
|
310
|
-
name: "apiKey"
|
|
311
|
-
})), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
312
|
-
disabled: isConnecting || !dirty,
|
|
313
|
-
label: t("neetoIntegrations.common.connect"),
|
|
314
|
-
loading: isConnecting,
|
|
315
|
-
type: "submit"
|
|
316
|
-
})));
|
|
317
|
-
}), /*#__PURE__*/React__default.createElement(WalkthroughModal, {
|
|
318
|
-
videoUrl: videoUrl,
|
|
319
|
-
isOpen: isDemoModalOpen,
|
|
320
|
-
onClose: function onClose() {
|
|
321
|
-
return setIsDemoModalOpen(false);
|
|
322
|
-
}
|
|
323
|
-
})));
|
|
323
|
+
}), /*#__PURE__*/jsx(WalkthroughModal, {
|
|
324
|
+
videoUrl: videoUrl,
|
|
325
|
+
isOpen: isDemoModalOpen,
|
|
326
|
+
onClose: function onClose() {
|
|
327
|
+
return setIsDemoModalOpen(false);
|
|
328
|
+
}
|
|
329
|
+
})]
|
|
330
|
+
})]
|
|
331
|
+
});
|
|
324
332
|
};
|
|
325
333
|
var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
326
334
|
|
|
@@ -354,8 +362,8 @@ var Manage$1 = function Manage$1(_ref) {
|
|
|
354
362
|
var handleDisconnect = function handleDisconnect() {
|
|
355
363
|
return destroyIntegration("daily");
|
|
356
364
|
};
|
|
357
|
-
if (isFetching || isDisconnecting) return /*#__PURE__*/
|
|
358
|
-
return /*#__PURE__*/
|
|
365
|
+
if (isFetching || isDisconnecting) return /*#__PURE__*/jsx(PageLoader, {});
|
|
366
|
+
return /*#__PURE__*/jsx(Manage, {
|
|
359
367
|
isConnected: isConnected,
|
|
360
368
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
361
369
|
isDisconnecting: isDisconnecting,
|
|
@@ -365,15 +373,23 @@ var Manage$1 = function Manage$1(_ref) {
|
|
|
365
373
|
connect: true
|
|
366
374
|
}),
|
|
367
375
|
integration: "daily",
|
|
368
|
-
description: isConnected ? /*#__PURE__*/
|
|
369
|
-
components: {
|
|
370
|
-
underline: /*#__PURE__*/React__default.createElement("u", {
|
|
371
|
-
className: "font-medium"
|
|
372
|
-
})
|
|
373
|
-
},
|
|
376
|
+
description: isConnected ? /*#__PURE__*/jsx(Trans, {
|
|
374
377
|
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
375
378
|
values: {
|
|
376
379
|
apiKey: apiKey
|
|
380
|
+
},
|
|
381
|
+
components: {
|
|
382
|
+
wrapper: /*#__PURE__*/jsx("div", {
|
|
383
|
+
className: "neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 border px-3 py-2"
|
|
384
|
+
}),
|
|
385
|
+
span: /*#__PURE__*/jsx("span", {
|
|
386
|
+
className: "break-all text-sm"
|
|
387
|
+
}),
|
|
388
|
+
copy: /*#__PURE__*/jsx(CopyToClipboardButton, {
|
|
389
|
+
className: "flex-shrink-0 self-start",
|
|
390
|
+
style: "text",
|
|
391
|
+
value: apiKey
|
|
392
|
+
})
|
|
377
393
|
}
|
|
378
394
|
}) : description,
|
|
379
395
|
title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect.account"),
|
|
@@ -408,12 +424,12 @@ var Daily = function Daily(_ref) {
|
|
|
408
424
|
_ref2$apiKey = _ref2.apiKey,
|
|
409
425
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
410
426
|
if (isPresent(apiKey) && !isOnboarding || !connect) {
|
|
411
|
-
return /*#__PURE__*/
|
|
427
|
+
return /*#__PURE__*/jsx(Manage$1, {
|
|
412
428
|
description: description,
|
|
413
429
|
onDisconnect: onDisconnect
|
|
414
430
|
});
|
|
415
431
|
}
|
|
416
|
-
return /*#__PURE__*/
|
|
432
|
+
return /*#__PURE__*/jsx(Form$1, {
|
|
417
433
|
helpDocUrl: helpDocUrl,
|
|
418
434
|
onConnect: onConnect,
|
|
419
435
|
videoUrl: videoUrl
|
|
@@ -519,6 +535,8 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
|
|
|
519
535
|
var propTypesExports = propTypes.exports;
|
|
520
536
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
521
537
|
|
|
538
|
+
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; }
|
|
539
|
+
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; }
|
|
522
540
|
var Connect = withT(function (_ref) {
|
|
523
541
|
var t = _ref.t,
|
|
524
542
|
Icon = _ref.Icon,
|
|
@@ -526,32 +544,61 @@ var Connect = withT(function (_ref) {
|
|
|
526
544
|
title = _ref$title === void 0 ? "" : _ref$title,
|
|
527
545
|
_ref$description = _ref.description,
|
|
528
546
|
description = _ref$description === void 0 ? "" : _ref$description,
|
|
547
|
+
_ref$integration = _ref.integration,
|
|
548
|
+
integration = _ref$integration === void 0 ? "" : _ref$integration,
|
|
549
|
+
_ref$integrationName = _ref.integrationName,
|
|
550
|
+
integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
|
|
551
|
+
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
552
|
+
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
529
553
|
_ref$buttonProps = _ref.buttonProps,
|
|
530
554
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
531
555
|
_ref$onConnect = _ref.onConnect,
|
|
532
556
|
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
533
557
|
children = _ref.children,
|
|
534
558
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
535
|
-
return /*#__PURE__*/
|
|
536
|
-
className: "mx-auto w-full max-w-3xl"
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
559
|
+
return /*#__PURE__*/jsxs("div", {
|
|
560
|
+
className: "mx-auto w-full max-w-3xl",
|
|
561
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
562
|
+
className: "mb-6 flex flex-col gap-y-2",
|
|
563
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
564
|
+
size: 48
|
|
565
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
566
|
+
className: "flex flex-col gap-y-1",
|
|
567
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
568
|
+
style: "h2",
|
|
569
|
+
children: title
|
|
570
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
571
|
+
style: "body2",
|
|
572
|
+
children: description
|
|
573
|
+
})]
|
|
574
|
+
})]
|
|
575
|
+
}), helpDocUrl && /*#__PURE__*/jsx("div", {
|
|
576
|
+
className: "mb-4",
|
|
577
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
578
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
579
|
+
components: {
|
|
580
|
+
helpLink: /*#__PURE__*/jsx(Button, {
|
|
581
|
+
className: "text-xs",
|
|
582
|
+
href: helpDocUrl,
|
|
583
|
+
size: "small",
|
|
584
|
+
style: "link",
|
|
585
|
+
target: "_blank"
|
|
586
|
+
})
|
|
587
|
+
},
|
|
588
|
+
values: {
|
|
589
|
+
integration: integrationName || humanize(integration)
|
|
590
|
+
}
|
|
591
|
+
})
|
|
592
|
+
}), children, /*#__PURE__*/jsxs("div", {
|
|
593
|
+
className: "flex w-full items-center gap-x-3",
|
|
594
|
+
children: [/*#__PURE__*/jsx(Button, _objectSpread$2({
|
|
595
|
+
label: t("neetoIntegrations.common.connect"),
|
|
596
|
+
onClick: onConnect
|
|
597
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsx(Button, _objectSpread$2({
|
|
598
|
+
style: "secondary"
|
|
599
|
+
}, secondaryButtonProps))]
|
|
600
|
+
})]
|
|
601
|
+
});
|
|
555
602
|
});
|
|
556
603
|
Connect.prototypes = {
|
|
557
604
|
/**
|
|
@@ -625,6 +672,8 @@ const SvgSuccess = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
|
625
672
|
height: 344
|
|
626
673
|
}))));
|
|
627
674
|
|
|
675
|
+
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; }
|
|
676
|
+
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; }
|
|
628
677
|
var Finish = withT(function (_ref) {
|
|
629
678
|
var t = _ref.t,
|
|
630
679
|
_ref$onClick = _ref.onClick,
|
|
@@ -636,20 +685,23 @@ var Finish = withT(function (_ref) {
|
|
|
636
685
|
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
637
686
|
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
|
|
638
687
|
children = _ref.children;
|
|
639
|
-
return /*#__PURE__*/
|
|
640
|
-
className: "mx-auto w-full max-w-3xl"
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
688
|
+
return /*#__PURE__*/jsxs("div", {
|
|
689
|
+
className: "mx-auto w-full max-w-3xl",
|
|
690
|
+
children: [/*#__PURE__*/jsx(SvgSuccess, {}), /*#__PURE__*/jsx(Typography, {
|
|
691
|
+
className: "mb-6 mt-4",
|
|
692
|
+
style: "h2",
|
|
693
|
+
weight: "semibold",
|
|
694
|
+
children: title
|
|
695
|
+
}), children, /*#__PURE__*/jsxs("div", {
|
|
696
|
+
className: "flex w-full items-center gap-x-2",
|
|
697
|
+
children: [/*#__PURE__*/jsx(Button, _objectSpread$1({
|
|
698
|
+
onClick: onClick,
|
|
699
|
+
label: t("neetoIntegrations.common.continue")
|
|
700
|
+
}, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/jsx(Button, _objectSpread$1({
|
|
701
|
+
style: "secondary"
|
|
702
|
+
}, secondaryButtonProps))]
|
|
703
|
+
})]
|
|
704
|
+
});
|
|
653
705
|
});
|
|
654
706
|
Finish.prototypes = {
|
|
655
707
|
/**
|
|
@@ -695,6 +747,8 @@ function n(n, r) {
|
|
|
695
747
|
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%}";
|
|
696
748
|
n(css,{});
|
|
697
749
|
|
|
750
|
+
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; }
|
|
751
|
+
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; }
|
|
698
752
|
var Manage = withT(function (_ref) {
|
|
699
753
|
var t = _ref.t,
|
|
700
754
|
_ref$title = _ref.title,
|
|
@@ -738,86 +792,107 @@ var Manage = withT(function (_ref) {
|
|
|
738
792
|
_ref$isConnectDisable = _ref.isConnectDisabled,
|
|
739
793
|
isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
|
|
740
794
|
_ref$connectTooltipPr = _ref.connectTooltipProps,
|
|
741
|
-
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
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
|
-
|
|
795
|
+
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr,
|
|
796
|
+
_ref$buttonProps = _ref.buttonProps,
|
|
797
|
+
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
798
|
+
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
799
|
+
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP;
|
|
800
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
801
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
802
|
+
className: "mx-auto w-full max-w-3xl",
|
|
803
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
804
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6",
|
|
805
|
+
children: [Icon && /*#__PURE__*/jsx(Icon, {
|
|
806
|
+
className: "neeto-ui-text-gray-600",
|
|
807
|
+
size: 48
|
|
808
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
809
|
+
className: "space-y-2",
|
|
810
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
811
|
+
className: "flex items-center space-x-4",
|
|
812
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
813
|
+
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
814
|
+
style: "h2",
|
|
815
|
+
weight: "semibold",
|
|
816
|
+
children: title
|
|
817
|
+
}), isConnected && /*#__PURE__*/jsx("div", {
|
|
818
|
+
className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1",
|
|
819
|
+
children: /*#__PURE__*/jsx(Check, {
|
|
820
|
+
size: 24
|
|
821
|
+
})
|
|
822
|
+
})]
|
|
823
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
824
|
+
style: "body1",
|
|
825
|
+
weight: "normal",
|
|
826
|
+
className: classnames("neeto-ui-text-gray-800", {
|
|
827
|
+
"break-all": isConnected
|
|
828
|
+
}),
|
|
829
|
+
children: description
|
|
830
|
+
}), helpDocUrl && /*#__PURE__*/jsx(Typography, {
|
|
831
|
+
className: "neeto-ui-text-gray-800",
|
|
832
|
+
style: "body2",
|
|
833
|
+
weight: "normal",
|
|
834
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
835
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
836
|
+
components: {
|
|
837
|
+
helpLink: /*#__PURE__*/jsx(Button, {
|
|
838
|
+
href: helpDocUrl,
|
|
839
|
+
style: "link",
|
|
840
|
+
target: "_blank"
|
|
841
|
+
})
|
|
842
|
+
},
|
|
843
|
+
values: {
|
|
844
|
+
integration: integrationName || humanize(integration)
|
|
845
|
+
}
|
|
846
|
+
})
|
|
847
|
+
})]
|
|
848
|
+
}), isConnected ? /*#__PURE__*/jsxs("div", {
|
|
849
|
+
className: "space-x-2",
|
|
850
|
+
children: [(managePath || manageUrl) && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
851
|
+
"data-cy": "manage-button",
|
|
852
|
+
href: manageUrl,
|
|
853
|
+
target: manageUrl ? "_blank" : "_self",
|
|
854
|
+
to: managePath,
|
|
855
|
+
label: t("neetoIntegrations.common.manageIntegration", {
|
|
856
|
+
integration: integrationName || humanize(integration)
|
|
857
|
+
})
|
|
858
|
+
}, buttonProps)), onDisconnect && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
859
|
+
"data-cy": "disconnect-button",
|
|
860
|
+
style: "secondary",
|
|
861
|
+
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
862
|
+
integration: integrationName || humanize(integration)
|
|
863
|
+
}),
|
|
864
|
+
onClick: function onClick() {
|
|
865
|
+
return setIsDisconnectAlertOpen(true);
|
|
866
|
+
}
|
|
867
|
+
}, secondaryButtonProps))]
|
|
868
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
869
|
+
children: /*#__PURE__*/jsx(Tooltip, _objectSpread(_objectSpread({
|
|
870
|
+
disabled: !isConnectDisabled
|
|
871
|
+
}, connectTooltipProps), {}, {
|
|
872
|
+
children: /*#__PURE__*/jsx("span", {
|
|
873
|
+
children: (connectPath || connectUrl || onConnect) && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
874
|
+
"data-cy": "connect-button",
|
|
875
|
+
disabled: isConnectDisabled,
|
|
876
|
+
href: connectUrl,
|
|
877
|
+
to: connectPath,
|
|
878
|
+
label: t("neetoIntegrations.common.connectIntegration", {
|
|
879
|
+
integration: integrationName || humanize(integration)
|
|
880
|
+
}),
|
|
881
|
+
onClick: onConnect
|
|
882
|
+
}, buttonProps))
|
|
883
|
+
})
|
|
884
|
+
}))
|
|
885
|
+
})]
|
|
778
886
|
})
|
|
779
|
-
},
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
target: manageUrl ? "_blank" : "_self",
|
|
789
|
-
to: managePath,
|
|
790
|
-
label: t("neetoIntegrations.common.manageIntegration", {
|
|
791
|
-
integration: integrationName || humanize(integration)
|
|
792
|
-
})
|
|
793
|
-
}), onDisconnect && /*#__PURE__*/React__default.createElement(Button, {
|
|
794
|
-
"data-cy": "disconnect-button",
|
|
795
|
-
style: "secondary",
|
|
796
|
-
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
797
|
-
integration: integrationName || humanize(integration)
|
|
798
|
-
}),
|
|
799
|
-
onClick: function onClick() {
|
|
800
|
-
return setIsDisconnectAlertOpen(true);
|
|
801
|
-
}
|
|
802
|
-
})) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Tooltip, _extends$1({
|
|
803
|
-
disabled: !isConnectDisabled
|
|
804
|
-
}, connectTooltipProps), /*#__PURE__*/React__default.createElement("span", null, (connectPath || connectUrl || onConnect) && /*#__PURE__*/React__default.createElement(Button, {
|
|
805
|
-
"data-cy": "connect-button",
|
|
806
|
-
disabled: isConnectDisabled,
|
|
807
|
-
href: connectUrl,
|
|
808
|
-
to: connectPath,
|
|
809
|
-
label: t("neetoIntegrations.common.connectIntegration", {
|
|
810
|
-
integration: integrationName || humanize(integration)
|
|
811
|
-
}),
|
|
812
|
-
onClick: onConnect
|
|
813
|
-
})))))), /*#__PURE__*/React__default.createElement(DisconnectAlert, {
|
|
814
|
-
isDisconnecting: isDisconnecting,
|
|
815
|
-
onClose: onClose,
|
|
816
|
-
onDisconnect: onDisconnect,
|
|
817
|
-
isOpen: isDisconnectAlertOpen,
|
|
818
|
-
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
819
|
-
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
820
|
-
}));
|
|
887
|
+
}), /*#__PURE__*/jsx(DisconnectAlert, {
|
|
888
|
+
isDisconnecting: isDisconnecting,
|
|
889
|
+
onClose: onClose,
|
|
890
|
+
onDisconnect: onDisconnect,
|
|
891
|
+
isOpen: isDisconnectAlertOpen,
|
|
892
|
+
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
893
|
+
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
894
|
+
})]
|
|
895
|
+
});
|
|
821
896
|
});
|
|
822
897
|
|
|
823
898
|
var show = function show() {
|
|
@@ -884,8 +959,8 @@ var Zoom = function Zoom(_ref) {
|
|
|
884
959
|
var handleDisconnect = function handleDisconnect() {
|
|
885
960
|
return destroyIntegration("zoom");
|
|
886
961
|
};
|
|
887
|
-
if (isLoading) return /*#__PURE__*/
|
|
888
|
-
return /*#__PURE__*/
|
|
962
|
+
if (isLoading) return /*#__PURE__*/jsx(PageLoader, {});
|
|
963
|
+
return /*#__PURE__*/jsx(Manage, {
|
|
889
964
|
connectUrl: connectUrl,
|
|
890
965
|
isConnected: isConnected,
|
|
891
966
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
@@ -893,9 +968,9 @@ var Zoom = function Zoom(_ref) {
|
|
|
893
968
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
894
969
|
Icon: Zoom$1,
|
|
895
970
|
integration: "zoom",
|
|
896
|
-
description: isConnected ? /*#__PURE__*/
|
|
971
|
+
description: isConnected ? /*#__PURE__*/jsx(Trans, {
|
|
897
972
|
components: {
|
|
898
|
-
underline: /*#__PURE__*/
|
|
973
|
+
underline: /*#__PURE__*/jsx("u", {
|
|
899
974
|
className: "font-medium"
|
|
900
975
|
})
|
|
901
976
|
},
|