@bigbinary/neeto-integrations-frontend 2.10.2 → 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 -47
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +138 -50
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +138 -50
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +144 -56
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Zoom.cjs.js +141 -42
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +143 -44
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +161 -61
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +167 -68
- 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,15 +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/utils');
|
|
16
|
-
require('@bigbinary/neeto-icons/misc');
|
|
17
17
|
var neetoui = require('@bigbinary/neetoui');
|
|
18
18
|
var formik = require('@bigbinary/neetoui/formik');
|
|
19
19
|
require('ramda');
|
|
20
20
|
var yup = require('yup');
|
|
21
21
|
var classnames = require('classnames');
|
|
22
|
+
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
22
23
|
|
|
23
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
25
|
|
|
@@ -194,60 +195,131 @@ function _slicedToArray(arr, i) {
|
|
|
194
195
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
[{
|
|
198
|
-
step: "1",
|
|
199
|
-
label: i18next.t("neetoIntegrations.common.connect"),
|
|
200
|
-
isActive: true,
|
|
201
|
-
isCompleted: false
|
|
202
|
-
}, {
|
|
203
|
-
step: "2",
|
|
204
|
-
label: i18next.t("neetoIntegrations.common.finish"),
|
|
205
|
-
isActive: false,
|
|
206
|
-
isCompleted: false
|
|
207
|
-
}];
|
|
208
|
-
({
|
|
209
|
-
connect: i18next.t("neetoIntegrations.common.connect"),
|
|
210
|
-
finish: i18next.t("neetoIntegrations.common.finish")
|
|
211
|
-
});
|
|
212
|
-
|
|
213
198
|
var Manage$1 = reactUtils.withT(function (_ref) {
|
|
214
199
|
var t = _ref.t,
|
|
215
|
-
title = _ref.title,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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;
|
|
223
236
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
224
|
-
className: "mx-auto w-full max-w-
|
|
237
|
+
className: "mx-auto w-full max-w-3xl"
|
|
225
238
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
226
|
-
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"
|
|
227
247
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
228
248
|
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
229
|
-
style: "
|
|
249
|
+
style: "h2",
|
|
230
250
|
weight: "semibold"
|
|
231
|
-
}, title), /*#__PURE__*/React__default["default"].createElement(
|
|
232
|
-
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",
|
|
233
257
|
style: "body1",
|
|
234
258
|
weight: "normal"
|
|
235
|
-
}, description), /*#__PURE__*/React__default["default"].createElement(neetoui.
|
|
236
|
-
|
|
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, {
|
|
237
282
|
style: "danger",
|
|
283
|
+
label: t("settings.integrations.common.disconnectIntegration", {
|
|
284
|
+
integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
|
|
285
|
+
}),
|
|
238
286
|
onClick: function onClick() {
|
|
239
287
|
return setIsDisconnectAlertOpen(true);
|
|
240
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
|
+
})
|
|
241
297
|
}))), /*#__PURE__*/React__default["default"].createElement(DisconnectAlert__default["default"], {
|
|
242
298
|
isDisconnecting: isDisconnecting,
|
|
243
299
|
onClose: onClose,
|
|
244
300
|
onDisconnect: onDisconnect,
|
|
245
301
|
isOpen: isDisconnectAlertOpen,
|
|
246
|
-
|
|
247
|
-
|
|
302
|
+
title: t("settings.integrations.".concat(integration, ".disconnect.title")),
|
|
303
|
+
message: disconnectMessage !== null && disconnectMessage !== void 0 ? disconnectMessage : t("settings.integrations.".concat(integration, ".disconnect.message"))
|
|
248
304
|
}));
|
|
249
305
|
});
|
|
250
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
|
+
|
|
251
323
|
function _extends$1() {
|
|
252
324
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
253
325
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -613,6 +685,7 @@ var Form = function Form(_ref) {
|
|
|
613
685
|
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
614
686
|
components: {
|
|
615
687
|
externalLink: /*#__PURE__*/React__default["default"].createElement(ExternalLink$1, {
|
|
688
|
+
"data-cy": "api-key-help-doc-link",
|
|
616
689
|
href: helpDocUrl,
|
|
617
690
|
rel: "noreferrer",
|
|
618
691
|
target: "_blank"
|
|
@@ -643,7 +716,8 @@ var Form = function Form(_ref) {
|
|
|
643
716
|
var Form$1 = reactUtils.withTitle(Form, i18next__default["default"].t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
644
717
|
|
|
645
718
|
var Manage = function Manage(_ref) {
|
|
646
|
-
var
|
|
719
|
+
var description = _ref.description,
|
|
720
|
+
onDisconnect = _ref.onDisconnect;
|
|
647
721
|
var _useState = React.useState(false),
|
|
648
722
|
_useState2 = _slicedToArray(_useState, 2),
|
|
649
723
|
isDisconnectAlertOpen = _useState2[0],
|
|
@@ -653,7 +727,7 @@ var Manage = function Manage(_ref) {
|
|
|
653
727
|
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
654
728
|
_useFetchDaily$data2$ = _useFetchDaily$data2.metadata,
|
|
655
729
|
metadata = _useFetchDaily$data2$ === void 0 ? {} : _useFetchDaily$data2$,
|
|
656
|
-
|
|
730
|
+
isFetching = _useFetchDaily.isFetching;
|
|
657
731
|
var _ref2 = metadata || {},
|
|
658
732
|
_ref2$apiKey = _ref2.apiKey,
|
|
659
733
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
@@ -667,24 +741,33 @@ var Manage = function Manage(_ref) {
|
|
|
667
741
|
}),
|
|
668
742
|
destroyIntegration = _useDestroyDaily.mutate,
|
|
669
743
|
isDisconnecting = _useDestroyDaily.isLoading;
|
|
744
|
+
var isConnected = neetoCist.isPresent(apiKey);
|
|
670
745
|
var handleDisconnect = function handleDisconnect() {
|
|
671
746
|
return destroyIntegration("daily");
|
|
672
747
|
};
|
|
673
|
-
if (
|
|
674
|
-
return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
675
|
-
}
|
|
676
|
-
if (neetoCist.isNotPresent(apiKey)) {
|
|
677
|
-
onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
|
|
678
|
-
}
|
|
748
|
+
if (isFetching || isDisconnecting) return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
|
|
679
749
|
return /*#__PURE__*/React__default["default"].createElement(Manage$1, {
|
|
750
|
+
isConnected: isConnected,
|
|
680
751
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
681
752
|
isDisconnecting: isDisconnecting,
|
|
682
753
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
683
|
-
|
|
684
|
-
|
|
754
|
+
Icon: misc.Daily,
|
|
755
|
+
connectPath: utils.buildUrl(window.location.pathname, {
|
|
756
|
+
connect: true
|
|
685
757
|
}),
|
|
686
758
|
integration: "daily",
|
|
687
|
-
|
|
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"),
|
|
688
771
|
onClose: function onClose() {
|
|
689
772
|
return setIsDisconnectAlertOpen(false);
|
|
690
773
|
},
|
|
@@ -699,10 +782,14 @@ var Daily = function Daily(_ref) {
|
|
|
699
782
|
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
700
783
|
_ref$videoUrl = _ref.videoUrl,
|
|
701
784
|
videoUrl = _ref$videoUrl === void 0 ? "" : _ref$videoUrl,
|
|
785
|
+
_ref$description = _ref.description,
|
|
786
|
+
description = _ref$description === void 0 ? "" : _ref$description,
|
|
702
787
|
_ref$onConnect = _ref.onConnect,
|
|
703
788
|
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
704
789
|
_ref$onDisconnect = _ref.onDisconnect,
|
|
705
790
|
onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect;
|
|
791
|
+
var _useQueryParams = reactUtils.useQueryParams(),
|
|
792
|
+
connect = _useQueryParams.connect;
|
|
706
793
|
var _useFetchDaily = useFetchDaily(),
|
|
707
794
|
_useFetchDaily$data = _useFetchDaily.data,
|
|
708
795
|
_useFetchDaily$data2 = _useFetchDaily$data === void 0 ? {} : _useFetchDaily$data,
|
|
@@ -711,8 +798,9 @@ var Daily = function Daily(_ref) {
|
|
|
711
798
|
var _ref2 = metadata || {},
|
|
712
799
|
_ref2$apiKey = _ref2.apiKey,
|
|
713
800
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
714
|
-
if (neetoCist.isPresent(apiKey) && !isOnboarding) {
|
|
801
|
+
if (neetoCist.isPresent(apiKey) && !isOnboarding || !connect) {
|
|
715
802
|
return /*#__PURE__*/React__default["default"].createElement(Manage, {
|
|
803
|
+
description: description,
|
|
716
804
|
onDisconnect: onDisconnect
|
|
717
805
|
});
|
|
718
806
|
}
|