@bigbinary/neeto-integrations-frontend 2.10.1 → 2.10.3
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 +9 -5
- package/dist/Daily.cjs.js +135 -48
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +138 -51
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +143 -56
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +149 -62
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Zoom.cjs.js +141 -43
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +143 -45
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +166 -67
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +172 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +3 -0
package/dist/index.cjs.js
CHANGED
|
@@ -12,7 +12,6 @@ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
|
12
12
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
13
13
|
var reactQuery = require('react-query');
|
|
14
14
|
var axios = require('axios');
|
|
15
|
-
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
16
15
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
17
16
|
var misc = require('@bigbinary/neeto-icons/misc');
|
|
18
17
|
var neetoui = require('@bigbinary/neetoui');
|
|
@@ -22,6 +21,7 @@ var ramda = require('ramda');
|
|
|
22
21
|
var yup = require('yup');
|
|
23
22
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
24
23
|
var classnames = require('classnames');
|
|
24
|
+
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
25
25
|
|
|
26
26
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
27
|
|
|
@@ -54,6 +54,115 @@ var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
|
54
54
|
var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
|
|
55
55
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
56
56
|
|
|
57
|
+
var Manage$1 = reactUtils.withT(function (_ref) {
|
|
58
|
+
var t = _ref.t,
|
|
59
|
+
_ref$title = _ref.title,
|
|
60
|
+
title = _ref$title === void 0 ? "" : _ref$title,
|
|
61
|
+
_ref$description = _ref.description,
|
|
62
|
+
description = _ref$description === void 0 ? "" : _ref$description,
|
|
63
|
+
_ref$integration = _ref.integration,
|
|
64
|
+
integration = _ref$integration === void 0 ? "" : _ref$integration,
|
|
65
|
+
_ref$isDisconnectAler = _ref.isDisconnectAlertOpen,
|
|
66
|
+
isDisconnectAlertOpen = _ref$isDisconnectAler === void 0 ? false : _ref$isDisconnectAler,
|
|
67
|
+
_ref$setIsDisconnectA = _ref.setIsDisconnectAlertOpen,
|
|
68
|
+
setIsDisconnectAlertOpen = _ref$setIsDisconnectA === void 0 ? neetoCist.noop : _ref$setIsDisconnectA,
|
|
69
|
+
_ref$isDisconnecting = _ref.isDisconnecting,
|
|
70
|
+
isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
|
|
71
|
+
_ref$onDisconnect = _ref.onDisconnect,
|
|
72
|
+
onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect,
|
|
73
|
+
_ref$onClose = _ref.onClose,
|
|
74
|
+
onClose = _ref$onClose === void 0 ? neetoCist.noop : _ref$onClose,
|
|
75
|
+
_ref$Icon = _ref.Icon,
|
|
76
|
+
Icon = _ref$Icon === void 0 ? null : _ref$Icon,
|
|
77
|
+
_ref$isConnected = _ref.isConnected,
|
|
78
|
+
isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
|
|
79
|
+
_ref$connectPath = _ref.connectPath,
|
|
80
|
+
connectPath = _ref$connectPath === void 0 ? "" : _ref$connectPath,
|
|
81
|
+
_ref$connectUrl = _ref.connectUrl,
|
|
82
|
+
connectUrl = _ref$connectUrl === void 0 ? "" : _ref$connectUrl,
|
|
83
|
+
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
84
|
+
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
85
|
+
_ref$managePath = _ref.managePath,
|
|
86
|
+
managePath = _ref$managePath === void 0 ? "" : _ref$managePath,
|
|
87
|
+
_ref$integrationName = _ref.integrationName,
|
|
88
|
+
integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
|
|
89
|
+
_ref$disconnectMessag = _ref.disconnectMessage,
|
|
90
|
+
disconnectMessage = _ref$disconnectMessag === void 0 ? "" : _ref$disconnectMessag,
|
|
91
|
+
_ref$isConnectDisable = _ref.isConnectDisabled,
|
|
92
|
+
isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
|
|
93
|
+
_ref$connectTooltipPr = _ref.connectTooltipProps,
|
|
94
|
+
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr;
|
|
95
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
96
|
+
className: "mx-auto w-full max-w-3xl"
|
|
97
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
98
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6"
|
|
99
|
+
}, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
100
|
+
className: "neeto-ui-text-gray-600",
|
|
101
|
+
size: 60
|
|
102
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
103
|
+
className: "space-y-2"
|
|
104
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
105
|
+
className: "flex items-center space-x-4"
|
|
106
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
107
|
+
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
108
|
+
style: "h2",
|
|
109
|
+
weight: "semibold"
|
|
110
|
+
}, title), isConnected && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
111
|
+
className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1"
|
|
112
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Check, {
|
|
113
|
+
size: 24
|
|
114
|
+
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
115
|
+
className: "neeto-ui-text-gray-800 break-all",
|
|
116
|
+
style: "body1",
|
|
117
|
+
weight: "normal"
|
|
118
|
+
}, description), helpDocUrl && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
119
|
+
className: "neeto-ui-text-gray-800 break-all",
|
|
120
|
+
style: "body2",
|
|
121
|
+
weight: "normal"
|
|
122
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
123
|
+
i18nKey: "settings.integrations.common.helpDocUrl",
|
|
124
|
+
components: {
|
|
125
|
+
helpLink: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
126
|
+
href: helpDocUrl,
|
|
127
|
+
style: "link"
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
values: {
|
|
131
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
132
|
+
}
|
|
133
|
+
}))), isConnected ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
134
|
+
className: "space-x-2"
|
|
135
|
+
}, managePath && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
136
|
+
to: managePath,
|
|
137
|
+
label: t("settings.integrations.common.manageIntegration", {
|
|
138
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
139
|
+
})
|
|
140
|
+
}), onDisconnect && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
141
|
+
style: "danger",
|
|
142
|
+
label: t("settings.integrations.common.disconnectIntegration", {
|
|
143
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
144
|
+
}),
|
|
145
|
+
onClick: function onClick() {
|
|
146
|
+
return setIsDisconnectAlertOpen(true);
|
|
147
|
+
}
|
|
148
|
+
})) : /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
149
|
+
disabled: isConnectDisabled,
|
|
150
|
+
href: connectUrl,
|
|
151
|
+
to: connectPath,
|
|
152
|
+
tooltipProps: connectTooltipProps,
|
|
153
|
+
label: t("settings.integrations.common.connectIntegration", {
|
|
154
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
155
|
+
})
|
|
156
|
+
}))), /*#__PURE__*/React__default["default"].createElement(DisconnectAlert__default["default"], {
|
|
157
|
+
isDisconnecting: isDisconnecting,
|
|
158
|
+
onClose: onClose,
|
|
159
|
+
onDisconnect: onDisconnect,
|
|
160
|
+
isOpen: isDisconnectAlertOpen,
|
|
161
|
+
title: t("settings.integrations.".concat(integration, ".disconnect.title")),
|
|
162
|
+
message: disconnectMessage !== null && disconnectMessage !== void 0 ? disconnectMessage : t("settings.integrations.".concat(integration, ".disconnect.message"))
|
|
163
|
+
}));
|
|
164
|
+
});
|
|
165
|
+
|
|
57
166
|
function _typeof(obj) {
|
|
58
167
|
"@babel/helpers - typeof";
|
|
59
168
|
|
|
@@ -313,6 +422,7 @@ var Form = function Form(_ref) {
|
|
|
313
422
|
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
314
423
|
components: {
|
|
315
424
|
externalLink: /*#__PURE__*/React__default["default"].createElement(ExternalLink$1, {
|
|
425
|
+
"data-cy": "api-key-help-doc-link",
|
|
316
426
|
href: helpDocUrl,
|
|
317
427
|
rel: "noreferrer",
|
|
318
428
|
target: "_blank"
|
|
@@ -342,46 +452,9 @@ var Form = function Form(_ref) {
|
|
|
342
452
|
};
|
|
343
453
|
var Form$1 = reactUtils.withTitle(Form, i18next__default["default"].t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
344
454
|
|
|
345
|
-
var Manage$1 = reactUtils.withT(function (_ref) {
|
|
346
|
-
var t = _ref.t,
|
|
347
|
-
title = _ref.title,
|
|
348
|
-
description = _ref.description,
|
|
349
|
-
integration = _ref.integration,
|
|
350
|
-
isDisconnectAlertOpen = _ref.isDisconnectAlertOpen,
|
|
351
|
-
setIsDisconnectAlertOpen = _ref.setIsDisconnectAlertOpen,
|
|
352
|
-
isDisconnecting = _ref.isDisconnecting,
|
|
353
|
-
onDisconnect = _ref.onDisconnect,
|
|
354
|
-
onClose = _ref.onClose;
|
|
355
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
356
|
-
className: "mx-auto w-full max-w-md"
|
|
357
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
358
|
-
className: "mt-10 w-full space-y-4"
|
|
359
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
360
|
-
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
361
|
-
style: "h3",
|
|
362
|
-
weight: "semibold"
|
|
363
|
-
}, title), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
364
|
-
className: "neeto-ui-text-gray-600 break-all",
|
|
365
|
-
style: "body1",
|
|
366
|
-
weight: "normal"
|
|
367
|
-
}, description), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
368
|
-
label: t("neetoIntegrations.common.disconnect"),
|
|
369
|
-
style: "danger",
|
|
370
|
-
onClick: function onClick() {
|
|
371
|
-
return setIsDisconnectAlertOpen(true);
|
|
372
|
-
}
|
|
373
|
-
}))), /*#__PURE__*/React__default["default"].createElement(DisconnectAlert__default["default"], {
|
|
374
|
-
isDisconnecting: isDisconnecting,
|
|
375
|
-
onClose: onClose,
|
|
376
|
-
onDisconnect: onDisconnect,
|
|
377
|
-
isOpen: isDisconnectAlertOpen,
|
|
378
|
-
message: t("neetoIntegrations.".concat(integration, ".disconnect.message")),
|
|
379
|
-
title: t("neetoIntegrations.".concat(integration, ".disconnect.title"))
|
|
380
|
-
}));
|
|
381
|
-
});
|
|
382
|
-
|
|
383
455
|
var Manage = function Manage(_ref) {
|
|
384
|
-
var
|
|
456
|
+
var description = _ref.description,
|
|
457
|
+
onDisconnect = _ref.onDisconnect;
|
|
385
458
|
var _useState = React.useState(false),
|
|
386
459
|
_useState2 = _slicedToArray(_useState, 2),
|
|
387
460
|
isDisconnectAlertOpen = _useState2[0],
|
|
@@ -391,7 +464,7 @@ var Manage = function Manage(_ref) {
|
|
|
391
464
|
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
392
465
|
_useFetchDaily$data2$ = _useFetchDaily$data2.metadata,
|
|
393
466
|
metadata = _useFetchDaily$data2$ === void 0 ? {} : _useFetchDaily$data2$,
|
|
394
|
-
|
|
467
|
+
isFetching = _useFetchDaily.isFetching;
|
|
395
468
|
var _ref2 = metadata || {},
|
|
396
469
|
_ref2$apiKey = _ref2.apiKey,
|
|
397
470
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
@@ -405,24 +478,33 @@ var Manage = function Manage(_ref) {
|
|
|
405
478
|
}),
|
|
406
479
|
destroyIntegration = _useDestroyDaily.mutate,
|
|
407
480
|
isDisconnecting = _useDestroyDaily.isLoading;
|
|
481
|
+
var isConnected = neetoCist.isPresent(apiKey);
|
|
408
482
|
var handleDisconnect = function handleDisconnect() {
|
|
409
483
|
return destroyIntegration("daily");
|
|
410
484
|
};
|
|
411
|
-
if (
|
|
412
|
-
return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
413
|
-
}
|
|
414
|
-
if (neetoCist.isNotPresent(apiKey)) {
|
|
415
|
-
onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
|
|
416
|
-
}
|
|
485
|
+
if (isFetching || isDisconnecting) return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
417
486
|
return /*#__PURE__*/React__default["default"].createElement(Manage$1, {
|
|
487
|
+
isConnected: isConnected,
|
|
418
488
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
419
489
|
isDisconnecting: isDisconnecting,
|
|
420
490
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
421
|
-
|
|
422
|
-
|
|
491
|
+
Icon: misc.Daily,
|
|
492
|
+
connectPath: utils.buildUrl(window.location.pathname, {
|
|
493
|
+
connect: true
|
|
423
494
|
}),
|
|
424
495
|
integration: "daily",
|
|
425
|
-
|
|
496
|
+
description: isConnected ? /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
497
|
+
components: {
|
|
498
|
+
underline: /*#__PURE__*/React__default["default"].createElement("u", {
|
|
499
|
+
className: "font-medium"
|
|
500
|
+
})
|
|
501
|
+
},
|
|
502
|
+
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
503
|
+
values: {
|
|
504
|
+
apiKey: apiKey
|
|
505
|
+
}
|
|
506
|
+
}) : description,
|
|
507
|
+
title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect"),
|
|
426
508
|
onClose: function onClose() {
|
|
427
509
|
return setIsDisconnectAlertOpen(false);
|
|
428
510
|
},
|
|
@@ -437,10 +519,14 @@ var Daily = function Daily(_ref) {
|
|
|
437
519
|
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
438
520
|
_ref$videoUrl = _ref.videoUrl,
|
|
439
521
|
videoUrl = _ref$videoUrl === void 0 ? "" : _ref$videoUrl,
|
|
522
|
+
_ref$description = _ref.description,
|
|
523
|
+
description = _ref$description === void 0 ? "" : _ref$description,
|
|
440
524
|
_ref$onConnect = _ref.onConnect,
|
|
441
525
|
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
442
526
|
_ref$onDisconnect = _ref.onDisconnect,
|
|
443
527
|
onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect;
|
|
528
|
+
var _useQueryParams = reactUtils.useQueryParams(),
|
|
529
|
+
connect = _useQueryParams.connect;
|
|
444
530
|
var _useFetchDaily = useFetchDaily(),
|
|
445
531
|
_useFetchDaily$data = _useFetchDaily.data,
|
|
446
532
|
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
@@ -449,8 +535,9 @@ var Daily = function Daily(_ref) {
|
|
|
449
535
|
var _ref2 = metadata || {},
|
|
450
536
|
_ref2$apiKey = _ref2.apiKey,
|
|
451
537
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
452
|
-
if (neetoCist.isPresent(apiKey) && !isOnboarding) {
|
|
538
|
+
if (neetoCist.isPresent(apiKey) && !isOnboarding || !connect) {
|
|
453
539
|
return /*#__PURE__*/React__default["default"].createElement(Manage, {
|
|
540
|
+
description: description,
|
|
454
541
|
onDisconnect: onDisconnect
|
|
455
542
|
});
|
|
456
543
|
}
|
|
@@ -509,7 +596,7 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
|
509
596
|
setSteps = _useState2[1];
|
|
510
597
|
var _getQueryParams = utils.getQueryParams(),
|
|
511
598
|
status = _getQueryParams.status;
|
|
512
|
-
var activeTab =
|
|
599
|
+
var activeTab = neetoCist.isPresent(status) ? STEPS.finish : STEPS.connect;
|
|
513
600
|
React.useEffect(function () {
|
|
514
601
|
setSteps(function () {
|
|
515
602
|
var stepsClone = _toConsumableArray(steps);
|
|
@@ -529,15 +616,15 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
|
529
616
|
isOpen: true,
|
|
530
617
|
onClose: handleClose
|
|
531
618
|
}, activeTab === STEPS.connect && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
532
|
-
className: "
|
|
619
|
+
className: "w-full max-w-2xl mx-auto"
|
|
533
620
|
}, /*#__PURE__*/React__default["default"].createElement(misc.GoogleCalendar, {
|
|
534
621
|
size: 42
|
|
535
622
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
536
|
-
className: "neeto-ui-text-gray-800
|
|
623
|
+
className: "mt-6 mb-3 neeto-ui-text-gray-800",
|
|
537
624
|
style: "h2",
|
|
538
625
|
weight: "semibold"
|
|
539
626
|
}, t("neetoIntegrations.google.connect.title")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
540
|
-
className: "flex
|
|
627
|
+
className: "flex flex-col items-start w-full pt-2"
|
|
541
628
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
|
|
542
629
|
className: "block leading-5"
|
|
543
630
|
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
@@ -549,7 +636,7 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
|
549
636
|
selectCheckbox: t("neetoIntegrations.google.connect.selectCheckbox")
|
|
550
637
|
}
|
|
551
638
|
})), permissionImage && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
552
|
-
className: "neeto-ui-border-gray-300
|
|
639
|
+
className: "my-4 border neeto-ui-border-gray-300"
|
|
553
640
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
554
641
|
src: permissionImage
|
|
555
642
|
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
@@ -854,7 +941,11 @@ var useDestroyZoom = function useDestroyZoom(_ref) {
|
|
|
854
941
|
};
|
|
855
942
|
|
|
856
943
|
var Zoom = function Zoom(_ref) {
|
|
857
|
-
var _ref$
|
|
944
|
+
var _ref$connectUrl = _ref.connectUrl,
|
|
945
|
+
connectUrl = _ref$connectUrl === void 0 ? "" : _ref$connectUrl,
|
|
946
|
+
_ref$description = _ref.description,
|
|
947
|
+
description = _ref$description === void 0 ? "" : _ref$description,
|
|
948
|
+
_ref$onDisconnect = _ref.onDisconnect,
|
|
858
949
|
onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect;
|
|
859
950
|
var _useTranslation = reactI18next.useTranslation(),
|
|
860
951
|
t = _useTranslation.t;
|
|
@@ -878,24 +969,31 @@ var Zoom = function Zoom(_ref) {
|
|
|
878
969
|
}),
|
|
879
970
|
destroyIntegration = _useDestroyZoom.mutate,
|
|
880
971
|
isDisconnecting = _useDestroyZoom.isLoading;
|
|
972
|
+
var isConnected = neetoCist.isPresent(email);
|
|
881
973
|
var handleDisconnect = function handleDisconnect() {
|
|
882
974
|
return destroyIntegration("zoom");
|
|
883
975
|
};
|
|
884
|
-
if (isLoading)
|
|
885
|
-
return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
886
|
-
}
|
|
887
|
-
if (neetoCist.isNotPresent(email)) {
|
|
888
|
-
onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
|
|
889
|
-
}
|
|
976
|
+
if (isLoading) return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
890
977
|
return /*#__PURE__*/React__default["default"].createElement(Manage$1, {
|
|
978
|
+
connectUrl: connectUrl,
|
|
979
|
+
isConnected: isConnected,
|
|
891
980
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
892
981
|
isDisconnecting: isDisconnecting,
|
|
893
982
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
894
|
-
|
|
895
|
-
email: email
|
|
896
|
-
}),
|
|
983
|
+
Icon: misc.Zoom,
|
|
897
984
|
integration: "zoom",
|
|
898
|
-
|
|
985
|
+
description: isConnected ? /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
986
|
+
components: {
|
|
987
|
+
underline: /*#__PURE__*/React__default["default"].createElement("u", {
|
|
988
|
+
className: "font-medium"
|
|
989
|
+
})
|
|
990
|
+
},
|
|
991
|
+
i18nKey: "neetoIntegrations.zoom.account",
|
|
992
|
+
values: {
|
|
993
|
+
email: email
|
|
994
|
+
}
|
|
995
|
+
}) : description,
|
|
996
|
+
title: isConnected ? t("neetoIntegrations.zoom.connected") : t("neetoIntegrations.zoom.connect"),
|
|
899
997
|
onClose: function onClose() {
|
|
900
998
|
return setIsDisconnectAlertOpen(false);
|
|
901
999
|
},
|
|
@@ -1302,6 +1400,7 @@ exports.Daily = index;
|
|
|
1302
1400
|
exports.Demo = Demo;
|
|
1303
1401
|
exports.Finish = Finish;
|
|
1304
1402
|
exports.GoogleCalendar = GoogleCalendar;
|
|
1403
|
+
exports.Manage = Manage$1;
|
|
1305
1404
|
exports.Modal = Modal;
|
|
1306
1405
|
exports.Twilio = Twilio;
|
|
1307
1406
|
exports.Zoom = Zoom;
|