@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
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"tryAgain": "Try Again",
|
|
13
13
|
"verify": "Verify",
|
|
14
14
|
"phNo": "Phone number",
|
|
15
|
-
"saveChanges": "Save changes"
|
|
15
|
+
"saveChanges": "Save changes",
|
|
16
|
+
"disconnectIntegration": "Disconnect {{integration, anyCase}}",
|
|
17
|
+
"connectIntegration": "Connect {{integration, anyCase}}"
|
|
16
18
|
},
|
|
17
19
|
"errors": {
|
|
18
20
|
"required": "{{entity}} is required"
|
|
@@ -79,8 +81,9 @@
|
|
|
79
81
|
"description": "Include daily.co links in your meetings booked using {{appName, anyCase}}.",
|
|
80
82
|
"apiKey": "API key",
|
|
81
83
|
"helpDoc": "<externalLink>See instructions</externalLink> on getting the API key",
|
|
82
|
-
"yourApiKey": "You are connected to Daily.co with
|
|
83
|
-
"
|
|
84
|
+
"yourApiKey": "You are connected to Daily.co with the API key: <underline>{{apiKey, anyCase}}</underline>",
|
|
85
|
+
"connect": "Connect your Daily.co account",
|
|
86
|
+
"connected": "You are connected to Daily.co",
|
|
84
87
|
"disconnect": {
|
|
85
88
|
"title": "Disconnect Daily.co integration?",
|
|
86
89
|
"message": "This action will disconnect Daily.co integration."
|
|
@@ -95,8 +98,9 @@
|
|
|
95
98
|
"zoom": {
|
|
96
99
|
"title": "Zoom",
|
|
97
100
|
"description": "Include Zoom video links in your meetings booked using {{appName, anyCase}}.",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
101
|
+
"connect": "Connect your Zoom account",
|
|
102
|
+
"connected": "You are connected to Zoom",
|
|
103
|
+
"account": "Your connected email is <underline>{{email}}</underline>.",
|
|
100
104
|
"disconnect": {
|
|
101
105
|
"title": "Disconnect Zoom integration?",
|
|
102
106
|
"message": "This action will disconnect Zoom integration."
|
package/dist/Daily.cjs.js
CHANGED
|
@@ -10,16 +10,16 @@ var axios = require('axios');
|
|
|
10
10
|
require('@bigbinary/neeto-molecules/IntegrationCard');
|
|
11
11
|
var DisconnectAlert = require('@bigbinary/neeto-molecules/IntegrationDisconnectAlert');
|
|
12
12
|
var WalkthroughModal = require('@bigbinary/neeto-molecules/IntegrationWalkthroughModal');
|
|
13
|
+
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
14
|
+
var misc = require('@bigbinary/neeto-icons/misc');
|
|
13
15
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
14
16
|
var reactI18next = require('react-i18next');
|
|
15
|
-
require('@bigbinary/neeto-commons-frontend/pure');
|
|
16
|
-
require('@bigbinary/neeto-commons-frontend/utils');
|
|
17
|
-
require('@bigbinary/neeto-icons/misc');
|
|
18
17
|
var neetoui = require('@bigbinary/neetoui');
|
|
19
18
|
var formik = require('@bigbinary/neetoui/formik');
|
|
20
19
|
require('ramda');
|
|
21
20
|
var yup = require('yup');
|
|
22
21
|
var classnames = require('classnames');
|
|
22
|
+
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
23
23
|
|
|
24
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
25
|
|
|
@@ -195,60 +195,131 @@ function _slicedToArray(arr, i) {
|
|
|
195
195
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
[{
|
|
199
|
-
step: "1",
|
|
200
|
-
label: i18next.t("neetoIntegrations.common.connect"),
|
|
201
|
-
isActive: true,
|
|
202
|
-
isCompleted: false
|
|
203
|
-
}, {
|
|
204
|
-
step: "2",
|
|
205
|
-
label: i18next.t("neetoIntegrations.common.finish"),
|
|
206
|
-
isActive: false,
|
|
207
|
-
isCompleted: false
|
|
208
|
-
}];
|
|
209
|
-
({
|
|
210
|
-
connect: i18next.t("neetoIntegrations.common.connect"),
|
|
211
|
-
finish: i18next.t("neetoIntegrations.common.finish")
|
|
212
|
-
});
|
|
213
|
-
|
|
214
198
|
var Manage$1 = reactUtils.withT(function (_ref) {
|
|
215
199
|
var t = _ref.t,
|
|
216
|
-
title = _ref.title,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
200
|
+
_ref$title = _ref.title,
|
|
201
|
+
title = _ref$title === void 0 ? "" : _ref$title,
|
|
202
|
+
_ref$description = _ref.description,
|
|
203
|
+
description = _ref$description === void 0 ? "" : _ref$description,
|
|
204
|
+
_ref$integration = _ref.integration,
|
|
205
|
+
integration = _ref$integration === void 0 ? "" : _ref$integration,
|
|
206
|
+
_ref$isDisconnectAler = _ref.isDisconnectAlertOpen,
|
|
207
|
+
isDisconnectAlertOpen = _ref$isDisconnectAler === void 0 ? false : _ref$isDisconnectAler,
|
|
208
|
+
_ref$setIsDisconnectA = _ref.setIsDisconnectAlertOpen,
|
|
209
|
+
setIsDisconnectAlertOpen = _ref$setIsDisconnectA === void 0 ? neetoCist.noop : _ref$setIsDisconnectA,
|
|
210
|
+
_ref$isDisconnecting = _ref.isDisconnecting,
|
|
211
|
+
isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
|
|
212
|
+
_ref$onDisconnect = _ref.onDisconnect,
|
|
213
|
+
onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect,
|
|
214
|
+
_ref$onClose = _ref.onClose,
|
|
215
|
+
onClose = _ref$onClose === void 0 ? neetoCist.noop : _ref$onClose,
|
|
216
|
+
_ref$Icon = _ref.Icon,
|
|
217
|
+
Icon = _ref$Icon === void 0 ? null : _ref$Icon,
|
|
218
|
+
_ref$isConnected = _ref.isConnected,
|
|
219
|
+
isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
|
|
220
|
+
_ref$connectPath = _ref.connectPath,
|
|
221
|
+
connectPath = _ref$connectPath === void 0 ? "" : _ref$connectPath,
|
|
222
|
+
_ref$connectUrl = _ref.connectUrl,
|
|
223
|
+
connectUrl = _ref$connectUrl === void 0 ? "" : _ref$connectUrl,
|
|
224
|
+
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
225
|
+
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
226
|
+
_ref$managePath = _ref.managePath,
|
|
227
|
+
managePath = _ref$managePath === void 0 ? "" : _ref$managePath,
|
|
228
|
+
_ref$integrationName = _ref.integrationName,
|
|
229
|
+
integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
|
|
230
|
+
_ref$disconnectMessag = _ref.disconnectMessage,
|
|
231
|
+
disconnectMessage = _ref$disconnectMessag === void 0 ? "" : _ref$disconnectMessag,
|
|
232
|
+
_ref$isConnectDisable = _ref.isConnectDisabled,
|
|
233
|
+
isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
|
|
234
|
+
_ref$connectTooltipPr = _ref.connectTooltipProps,
|
|
235
|
+
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr;
|
|
224
236
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
225
|
-
className: "mx-auto w-full max-w-
|
|
237
|
+
className: "mx-auto w-full max-w-3xl"
|
|
226
238
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
227
|
-
className: "mt-10 w-full space-y-4"
|
|
239
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6"
|
|
240
|
+
}, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
241
|
+
className: "neeto-ui-text-gray-600",
|
|
242
|
+
size: 60
|
|
243
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
244
|
+
className: "space-y-2"
|
|
245
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
246
|
+
className: "flex items-center space-x-4"
|
|
228
247
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
229
248
|
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
230
|
-
style: "
|
|
249
|
+
style: "h2",
|
|
231
250
|
weight: "semibold"
|
|
232
|
-
}, title), /*#__PURE__*/React__default["default"].createElement(
|
|
233
|
-
className: "neeto-ui-text-
|
|
251
|
+
}, title), isConnected && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
252
|
+
className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1"
|
|
253
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Check, {
|
|
254
|
+
size: 24
|
|
255
|
+
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
256
|
+
className: "neeto-ui-text-gray-800 break-all",
|
|
234
257
|
style: "body1",
|
|
235
258
|
weight: "normal"
|
|
236
|
-
}, description), /*#__PURE__*/React__default["default"].createElement(neetoui.
|
|
237
|
-
|
|
259
|
+
}, description), helpDocUrl && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
260
|
+
className: "neeto-ui-text-gray-800 break-all",
|
|
261
|
+
style: "body2",
|
|
262
|
+
weight: "normal"
|
|
263
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
264
|
+
i18nKey: "settings.integrations.common.helpDocUrl",
|
|
265
|
+
components: {
|
|
266
|
+
helpLink: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
267
|
+
href: helpDocUrl,
|
|
268
|
+
style: "link"
|
|
269
|
+
})
|
|
270
|
+
},
|
|
271
|
+
values: {
|
|
272
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
273
|
+
}
|
|
274
|
+
}))), isConnected ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
275
|
+
className: "space-x-2"
|
|
276
|
+
}, managePath && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
277
|
+
to: managePath,
|
|
278
|
+
label: t("settings.integrations.common.manageIntegration", {
|
|
279
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
280
|
+
})
|
|
281
|
+
}), onDisconnect && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
238
282
|
style: "danger",
|
|
283
|
+
label: t("settings.integrations.common.disconnectIntegration", {
|
|
284
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
285
|
+
}),
|
|
239
286
|
onClick: function onClick() {
|
|
240
287
|
return setIsDisconnectAlertOpen(true);
|
|
241
288
|
}
|
|
289
|
+
})) : /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
290
|
+
disabled: isConnectDisabled,
|
|
291
|
+
href: connectUrl,
|
|
292
|
+
to: connectPath,
|
|
293
|
+
tooltipProps: connectTooltipProps,
|
|
294
|
+
label: t("settings.integrations.common.connectIntegration", {
|
|
295
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
296
|
+
})
|
|
242
297
|
}))), /*#__PURE__*/React__default["default"].createElement(DisconnectAlert__default["default"], {
|
|
243
298
|
isDisconnecting: isDisconnecting,
|
|
244
299
|
onClose: onClose,
|
|
245
300
|
onDisconnect: onDisconnect,
|
|
246
301
|
isOpen: isDisconnectAlertOpen,
|
|
247
|
-
|
|
248
|
-
|
|
302
|
+
title: t("settings.integrations.".concat(integration, ".disconnect.title")),
|
|
303
|
+
message: disconnectMessage !== null && disconnectMessage !== void 0 ? disconnectMessage : t("settings.integrations.".concat(integration, ".disconnect.message"))
|
|
249
304
|
}));
|
|
250
305
|
});
|
|
251
306
|
|
|
307
|
+
[{
|
|
308
|
+
step: "1",
|
|
309
|
+
label: i18next.t("neetoIntegrations.common.connect"),
|
|
310
|
+
isActive: true,
|
|
311
|
+
isCompleted: false
|
|
312
|
+
}, {
|
|
313
|
+
step: "2",
|
|
314
|
+
label: i18next.t("neetoIntegrations.common.finish"),
|
|
315
|
+
isActive: false,
|
|
316
|
+
isCompleted: false
|
|
317
|
+
}];
|
|
318
|
+
({
|
|
319
|
+
connect: i18next.t("neetoIntegrations.common.connect"),
|
|
320
|
+
finish: i18next.t("neetoIntegrations.common.finish")
|
|
321
|
+
});
|
|
322
|
+
|
|
252
323
|
function _extends$1() {
|
|
253
324
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
254
325
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -614,6 +685,7 @@ var Form = function Form(_ref) {
|
|
|
614
685
|
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
615
686
|
components: {
|
|
616
687
|
externalLink: /*#__PURE__*/React__default["default"].createElement(ExternalLink$1, {
|
|
688
|
+
"data-cy": "api-key-help-doc-link",
|
|
617
689
|
href: helpDocUrl,
|
|
618
690
|
rel: "noreferrer",
|
|
619
691
|
target: "_blank"
|
|
@@ -644,7 +716,8 @@ var Form = function Form(_ref) {
|
|
|
644
716
|
var Form$1 = reactUtils.withTitle(Form, i18next__default["default"].t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
645
717
|
|
|
646
718
|
var Manage = function Manage(_ref) {
|
|
647
|
-
var
|
|
719
|
+
var description = _ref.description,
|
|
720
|
+
onDisconnect = _ref.onDisconnect;
|
|
648
721
|
var _useState = React.useState(false),
|
|
649
722
|
_useState2 = _slicedToArray(_useState, 2),
|
|
650
723
|
isDisconnectAlertOpen = _useState2[0],
|
|
@@ -654,7 +727,7 @@ var Manage = function Manage(_ref) {
|
|
|
654
727
|
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
655
728
|
_useFetchDaily$data2$ = _useFetchDaily$data2.metadata,
|
|
656
729
|
metadata = _useFetchDaily$data2$ === void 0 ? {} : _useFetchDaily$data2$,
|
|
657
|
-
|
|
730
|
+
isFetching = _useFetchDaily.isFetching;
|
|
658
731
|
var _ref2 = metadata || {},
|
|
659
732
|
_ref2$apiKey = _ref2.apiKey,
|
|
660
733
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
@@ -668,24 +741,33 @@ var Manage = function Manage(_ref) {
|
|
|
668
741
|
}),
|
|
669
742
|
destroyIntegration = _useDestroyDaily.mutate,
|
|
670
743
|
isDisconnecting = _useDestroyDaily.isLoading;
|
|
744
|
+
var isConnected = neetoCist.isPresent(apiKey);
|
|
671
745
|
var handleDisconnect = function handleDisconnect() {
|
|
672
746
|
return destroyIntegration("daily");
|
|
673
747
|
};
|
|
674
|
-
if (
|
|
675
|
-
return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
676
|
-
}
|
|
677
|
-
if (neetoCist.isNotPresent(apiKey)) {
|
|
678
|
-
onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
|
|
679
|
-
}
|
|
748
|
+
if (isFetching || isDisconnecting) return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
680
749
|
return /*#__PURE__*/React__default["default"].createElement(Manage$1, {
|
|
750
|
+
isConnected: isConnected,
|
|
681
751
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
682
752
|
isDisconnecting: isDisconnecting,
|
|
683
753
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
684
|
-
|
|
685
|
-
|
|
754
|
+
Icon: misc.Daily,
|
|
755
|
+
connectPath: utils.buildUrl(window.location.pathname, {
|
|
756
|
+
connect: true
|
|
686
757
|
}),
|
|
687
758
|
integration: "daily",
|
|
688
|
-
|
|
759
|
+
description: isConnected ? /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
760
|
+
components: {
|
|
761
|
+
underline: /*#__PURE__*/React__default["default"].createElement("u", {
|
|
762
|
+
className: "font-medium"
|
|
763
|
+
})
|
|
764
|
+
},
|
|
765
|
+
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
766
|
+
values: {
|
|
767
|
+
apiKey: apiKey
|
|
768
|
+
}
|
|
769
|
+
}) : description,
|
|
770
|
+
title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect"),
|
|
689
771
|
onClose: function onClose() {
|
|
690
772
|
return setIsDisconnectAlertOpen(false);
|
|
691
773
|
},
|
|
@@ -700,10 +782,14 @@ var Daily = function Daily(_ref) {
|
|
|
700
782
|
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
701
783
|
_ref$videoUrl = _ref.videoUrl,
|
|
702
784
|
videoUrl = _ref$videoUrl === void 0 ? "" : _ref$videoUrl,
|
|
785
|
+
_ref$description = _ref.description,
|
|
786
|
+
description = _ref$description === void 0 ? "" : _ref$description,
|
|
703
787
|
_ref$onConnect = _ref.onConnect,
|
|
704
788
|
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
705
789
|
_ref$onDisconnect = _ref.onDisconnect,
|
|
706
790
|
onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect;
|
|
791
|
+
var _useQueryParams = reactUtils.useQueryParams(),
|
|
792
|
+
connect = _useQueryParams.connect;
|
|
707
793
|
var _useFetchDaily = useFetchDaily(),
|
|
708
794
|
_useFetchDaily$data = _useFetchDaily.data,
|
|
709
795
|
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
@@ -712,8 +798,9 @@ var Daily = function Daily(_ref) {
|
|
|
712
798
|
var _ref2 = metadata || {},
|
|
713
799
|
_ref2$apiKey = _ref2.apiKey,
|
|
714
800
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
715
|
-
if (neetoCist.isPresent(apiKey) && !isOnboarding) {
|
|
801
|
+
if (neetoCist.isPresent(apiKey) && !isOnboarding || !connect) {
|
|
716
802
|
return /*#__PURE__*/React__default["default"].createElement(Manage, {
|
|
803
|
+
description: description,
|
|
717
804
|
onDisconnect: onDisconnect
|
|
718
805
|
});
|
|
719
806
|
}
|