@bigbinary/neeto-integrations-frontend 2.12.3 → 2.12.5
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/README.md +4 -0
- package/app/javascript/src/translations/en.json +5 -2
- package/dist/Daily.cjs.js +114 -95
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +109 -93
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +80 -62
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +76 -61
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/ZapierForm.cjs.js +7 -11
- package/dist/ZapierForm.cjs.js.map +1 -1
- package/dist/ZapierForm.js +7 -12
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.cjs.js +68 -49
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +65 -49
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +93 -80
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +89 -79
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
package/dist/index.js
CHANGED
|
@@ -6,21 +6,24 @@ export { default as WalkthroughModal } from '@bigbinary/neeto-molecules/Integrat
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
8
8
|
import classnames from 'classnames';
|
|
9
|
-
import i18next, { t as t$1 } from 'i18next';
|
|
10
9
|
import { humanize, noop, isPresent, keysToSnakeCase, _findBy, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
11
10
|
import { withT, useMutationWithInvalidation, withTitle, useQueryParams, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
11
|
+
import { Check } from '@bigbinary/neeto-icons';
|
|
12
|
+
import { Typography, Button, Tooltip, Callout, Modal as Modal$1 } from '@bigbinary/neetoui';
|
|
13
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
14
|
+
import i18next, { t as t$1 } from 'i18next';
|
|
12
15
|
import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
|
|
13
16
|
import { useQuery } from 'react-query';
|
|
14
17
|
import axios from 'axios';
|
|
18
|
+
import Container from '@bigbinary/neeto-molecules/Container';
|
|
19
|
+
import Header from '@bigbinary/neeto-molecules/Header';
|
|
20
|
+
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
21
|
+
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
22
|
+
import { Form as Form$2, Input, Select, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
15
23
|
import { buildUrl, getQueryParams } from '@bigbinary/neeto-commons-frontend/utils';
|
|
16
24
|
import { Daily as Daily$1, GoogleCalendar as GoogleCalendar$1, Google, Zoom as Zoom$1 } from '@bigbinary/neeto-icons/misc';
|
|
17
|
-
import { Typography, Button, Tooltip, Callout, Modal as Modal$1 } from '@bigbinary/neetoui';
|
|
18
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
19
|
-
import { Form as Form$2, Input, Select, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
20
25
|
import { prop, equals, isEmpty } from 'ramda';
|
|
21
26
|
import * as yup from 'yup';
|
|
22
|
-
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
23
|
-
import { Check } from '@bigbinary/neeto-icons';
|
|
24
27
|
|
|
25
28
|
function _extends$1() {
|
|
26
29
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -87,7 +90,7 @@ var Manage$1 = withT(function (_ref) {
|
|
|
87
90
|
className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6"
|
|
88
91
|
}, Icon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
89
92
|
className: "neeto-ui-text-gray-600",
|
|
90
|
-
size:
|
|
93
|
+
size: 48
|
|
91
94
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
92
95
|
className: "space-y-2"
|
|
93
96
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -363,7 +366,8 @@ var DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({
|
|
|
363
366
|
var Form = function Form(_ref) {
|
|
364
367
|
var helpDocUrl = _ref.helpDocUrl,
|
|
365
368
|
videoUrl = _ref.videoUrl,
|
|
366
|
-
onConnect = _ref.onConnect
|
|
369
|
+
onConnect = _ref.onConnect,
|
|
370
|
+
breadcrumbs = _ref.breadcrumbs;
|
|
367
371
|
var _useTranslation = useTranslation(),
|
|
368
372
|
t = _useTranslation.t;
|
|
369
373
|
var _useState = useState(false),
|
|
@@ -383,7 +387,37 @@ var Form = function Form(_ref) {
|
|
|
383
387
|
if (isConnecting) {
|
|
384
388
|
return /*#__PURE__*/React__default.createElement(PageLoader, null);
|
|
385
389
|
}
|
|
386
|
-
return /*#__PURE__*/React__default.createElement(
|
|
390
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
391
|
+
isHeaderFixed: true
|
|
392
|
+
}, /*#__PURE__*/React__default.createElement(Header, {
|
|
393
|
+
breadcrumbs: breadcrumbs,
|
|
394
|
+
title: /*#__PURE__*/React__default.createElement("span", {
|
|
395
|
+
className: "flex items-center gap-2"
|
|
396
|
+
}, t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/React__default.createElement(HelpPopover, {
|
|
397
|
+
title: t("neetoIntegrations.daily.connect.title"),
|
|
398
|
+
description: /*#__PURE__*/React__default.createElement(Trans, {
|
|
399
|
+
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
400
|
+
components: {
|
|
401
|
+
externalLink: /*#__PURE__*/React__default.createElement(ExternalLink$1, {
|
|
402
|
+
"data-cy": "api-key-help-doc-link",
|
|
403
|
+
href: helpDocUrl,
|
|
404
|
+
rel: "noreferrer",
|
|
405
|
+
target: "_blank"
|
|
406
|
+
})
|
|
407
|
+
}
|
|
408
|
+
}),
|
|
409
|
+
helpLinkProps: {
|
|
410
|
+
label: /*#__PURE__*/React__default.createElement(Button, {
|
|
411
|
+
className: "mt-8",
|
|
412
|
+
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
413
|
+
style: "link",
|
|
414
|
+
onClick: function onClick() {
|
|
415
|
+
return setIsDemoModalOpen(true);
|
|
416
|
+
}
|
|
417
|
+
})
|
|
418
|
+
}
|
|
419
|
+
}))
|
|
420
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
387
421
|
className: "mx-auto w-full max-w-md"
|
|
388
422
|
}, /*#__PURE__*/React__default.createElement(Form$2, {
|
|
389
423
|
formikProps: {
|
|
@@ -394,32 +428,14 @@ var Form = function Form(_ref) {
|
|
|
394
428
|
}, function (_ref2) {
|
|
395
429
|
var dirty = _ref2.dirty;
|
|
396
430
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
397
|
-
className: "mt-
|
|
431
|
+
className: "mt-14 w-full space-y-5"
|
|
398
432
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
399
|
-
className: "block"
|
|
433
|
+
className: "block min-h-20"
|
|
400
434
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
401
435
|
autoFocus: true,
|
|
402
436
|
required: true,
|
|
403
437
|
label: t("neetoIntegrations.daily.apiKey"),
|
|
404
|
-
name: "apiKey"
|
|
405
|
-
helpText: /*#__PURE__*/React__default.createElement(Trans, {
|
|
406
|
-
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
407
|
-
components: {
|
|
408
|
-
externalLink: /*#__PURE__*/React__default.createElement(ExternalLink$1, {
|
|
409
|
-
"data-cy": "api-key-help-doc-link",
|
|
410
|
-
href: helpDocUrl,
|
|
411
|
-
rel: "noreferrer",
|
|
412
|
-
target: "_blank"
|
|
413
|
-
})
|
|
414
|
-
}
|
|
415
|
-
})
|
|
416
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
417
|
-
className: "mt-8",
|
|
418
|
-
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
419
|
-
style: "link",
|
|
420
|
-
onClick: function onClick() {
|
|
421
|
-
return setIsDemoModalOpen(true);
|
|
422
|
-
}
|
|
438
|
+
name: "apiKey"
|
|
423
439
|
})), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
424
440
|
disabled: isConnecting || !dirty,
|
|
425
441
|
label: t("neetoIntegrations.common.connect"),
|
|
@@ -432,7 +448,7 @@ var Form = function Form(_ref) {
|
|
|
432
448
|
onClose: function onClose() {
|
|
433
449
|
return setIsDemoModalOpen(false);
|
|
434
450
|
}
|
|
435
|
-
}));
|
|
451
|
+
})));
|
|
436
452
|
};
|
|
437
453
|
var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
438
454
|
|
|
@@ -488,7 +504,7 @@ var Manage = function Manage(_ref) {
|
|
|
488
504
|
apiKey: apiKey
|
|
489
505
|
}
|
|
490
506
|
}) : description,
|
|
491
|
-
title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect"),
|
|
507
|
+
title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect.account"),
|
|
492
508
|
onClose: function onClose() {
|
|
493
509
|
return setIsDisconnectAlertOpen(false);
|
|
494
510
|
},
|
|
@@ -600,15 +616,14 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
|
600
616
|
isOpen: true,
|
|
601
617
|
onClose: handleClose
|
|
602
618
|
}, activeTab === STEPS.connect && /*#__PURE__*/React__default.createElement("div", {
|
|
603
|
-
className: "w-full max-w-
|
|
619
|
+
className: "mx-auto w-full max-w-3xl"
|
|
604
620
|
}, /*#__PURE__*/React__default.createElement(GoogleCalendar$1, {
|
|
605
|
-
size:
|
|
621
|
+
size: 48
|
|
606
622
|
}), /*#__PURE__*/React__default.createElement(Typography, {
|
|
607
|
-
className: "
|
|
608
|
-
style: "h2"
|
|
609
|
-
weight: "semibold"
|
|
623
|
+
className: "mb-4 mt-2",
|
|
624
|
+
style: "h2"
|
|
610
625
|
}, t("neetoIntegrations.google.connect.title")), /*#__PURE__*/React__default.createElement("div", {
|
|
611
|
-
className: "flex flex-col items-start
|
|
626
|
+
className: "flex w-full flex-col items-start"
|
|
612
627
|
}, /*#__PURE__*/React__default.createElement(Callout, {
|
|
613
628
|
className: "block leading-5"
|
|
614
629
|
}, /*#__PURE__*/React__default.createElement(Trans, {
|
|
@@ -620,7 +635,7 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
|
620
635
|
selectCheckbox: t("neetoIntegrations.google.connect.selectCheckbox")
|
|
621
636
|
}
|
|
622
637
|
})), permissionImage && /*#__PURE__*/React__default.createElement("div", {
|
|
623
|
-
className: "
|
|
638
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-md my-4 overflow-hidden border"
|
|
624
639
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
625
640
|
src: permissionImage
|
|
626
641
|
}))), /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -1048,7 +1063,7 @@ var Modal = function Modal(_ref) {
|
|
|
1048
1063
|
}, /*#__PURE__*/React__default.createElement(Modal$1.Header, null, /*#__PURE__*/React__default.createElement(Stepper, {
|
|
1049
1064
|
steps: steps
|
|
1050
1065
|
})), /*#__PURE__*/React__default.createElement(Modal$1.Body, {
|
|
1051
|
-
className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-
|
|
1066
|
+
className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-flex-grow"
|
|
1052
1067
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1053
1068
|
className: "neeto-ui-w-full py-10"
|
|
1054
1069
|
}, children)));
|
|
@@ -1150,23 +1165,23 @@ var Connect = withT(function (_ref) {
|
|
|
1150
1165
|
children = _ref.children,
|
|
1151
1166
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
1152
1167
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1153
|
-
className: "mx-auto w-full max-w-
|
|
1168
|
+
className: "mx-auto w-full max-w-3xl"
|
|
1169
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1170
|
+
className: "mb-6 flex flex-col gap-y-2"
|
|
1154
1171
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
1155
1172
|
size: 48
|
|
1156
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
1157
|
-
className: "
|
|
1158
|
-
|
|
1159
|
-
|
|
1173
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1174
|
+
className: "flex flex-col gap-y-1"
|
|
1175
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1176
|
+
style: "h2"
|
|
1160
1177
|
}, title), /*#__PURE__*/React__default.createElement(Typography, {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
}, description), children, /*#__PURE__*/React__default.createElement("div", {
|
|
1165
|
-
className: "flex w-full items-start space-x-4"
|
|
1178
|
+
style: "body2"
|
|
1179
|
+
}, description))), children, /*#__PURE__*/React__default.createElement("div", {
|
|
1180
|
+
className: "flex w-full items-center gap-x-3"
|
|
1166
1181
|
}, /*#__PURE__*/React__default.createElement(Button, _extends$1({
|
|
1167
1182
|
label: t("neetoIntegrations.common.connect"),
|
|
1168
1183
|
onClick: onConnect
|
|
1169
|
-
}, buttonProps)),
|
|
1184
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/React__default.createElement(Button, _extends$1({
|
|
1170
1185
|
style: "secondary"
|
|
1171
1186
|
}, secondaryButtonProps))));
|
|
1172
1187
|
});
|
|
@@ -1174,23 +1189,23 @@ Connect.prototypes = {
|
|
|
1174
1189
|
/**
|
|
1175
1190
|
* To specify the Icon to be shown
|
|
1176
1191
|
*/
|
|
1177
|
-
Icon:
|
|
1192
|
+
Icon: PropTypes.node,
|
|
1178
1193
|
/**
|
|
1179
1194
|
* To specify the title of the connect component
|
|
1180
1195
|
*/
|
|
1181
|
-
title:
|
|
1196
|
+
title: PropTypes.string,
|
|
1182
1197
|
/**
|
|
1183
1198
|
* To specify the description for connect component
|
|
1184
1199
|
*/
|
|
1185
|
-
description:
|
|
1200
|
+
description: PropTypes.string,
|
|
1186
1201
|
/**
|
|
1187
1202
|
* To specify the props for the connect button
|
|
1188
1203
|
*/
|
|
1189
|
-
buttonProps:
|
|
1204
|
+
buttonProps: PropTypes.object,
|
|
1190
1205
|
/**
|
|
1191
1206
|
* Handler function that is triggered when the connect button is clicked.
|
|
1192
1207
|
*/
|
|
1193
|
-
onConnect:
|
|
1208
|
+
onConnect: PropTypes.func
|
|
1194
1209
|
};
|
|
1195
1210
|
|
|
1196
1211
|
var isYouTubeLink = function isYouTubeLink(videoUrl) {
|
|
@@ -1216,43 +1231,38 @@ var Demo = function Demo(_ref) {
|
|
|
1216
1231
|
var _useTranslation = useTranslation(),
|
|
1217
1232
|
t = _useTranslation.t;
|
|
1218
1233
|
var renderVideo = function renderVideo(videoUrl) {
|
|
1219
|
-
return isYouTubeLink(videoUrl) ? /*#__PURE__*/React__default.createElement("
|
|
1220
|
-
className: "intrinsic-container intrinsic-container-16x9"
|
|
1221
|
-
}, /*#__PURE__*/React__default.createElement("iframe", {
|
|
1234
|
+
return isYouTubeLink(videoUrl) ? /*#__PURE__*/React__default.createElement("iframe", {
|
|
1222
1235
|
allowFullScreen: true,
|
|
1223
|
-
className: "border-none",
|
|
1236
|
+
className: "aspect-video border-none",
|
|
1224
1237
|
frameBorder: "0",
|
|
1225
1238
|
id: "ytplayer",
|
|
1226
1239
|
src: videoUrl,
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
})
|
|
1240
|
+
title: renderText(iframeTitle, t("neetoIntegrations.demo.iFrameTitle")),
|
|
1241
|
+
type: "text/html"
|
|
1242
|
+
}) : /*#__PURE__*/React__default.createElement("video", {
|
|
1230
1243
|
autoPlay: true,
|
|
1231
1244
|
controls: true,
|
|
1232
1245
|
muted: true,
|
|
1233
|
-
className: "max-w-3xl cursor-pointer
|
|
1246
|
+
className: "neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer",
|
|
1234
1247
|
id: "walkthrough-video"
|
|
1235
1248
|
}, /*#__PURE__*/React__default.createElement("source", {
|
|
1236
1249
|
src: videoUrl
|
|
1237
1250
|
}));
|
|
1238
1251
|
};
|
|
1239
1252
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1240
|
-
className: "mx-auto
|
|
1253
|
+
className: "mx-auto w-full max-w-3xl"
|
|
1254
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1255
|
+
className: "mb-6 flex flex-col gap-y-1"
|
|
1241
1256
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1242
|
-
|
|
1243
|
-
style: "h2",
|
|
1244
|
-
weight: "semibold"
|
|
1257
|
+
style: "h2"
|
|
1245
1258
|
}, renderText(title, t("neetoIntegrations.demo.title"))), /*#__PURE__*/React__default.createElement(Typography, {
|
|
1246
|
-
style: "body2"
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}, renderVideo(videoUrl)), /*#__PURE__*/React__default.createElement("div", {
|
|
1251
|
-
className: "flex w-full items-start space-x-2"
|
|
1252
|
-
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1259
|
+
style: "body2"
|
|
1260
|
+
}, renderText(subtitle, t("neetoIntegrations.demo.subtitle")))), children, videoUrl && /*#__PURE__*/React__default.createElement("div", {
|
|
1261
|
+
className: "mb-8"
|
|
1262
|
+
}, renderVideo(videoUrl)), /*#__PURE__*/React__default.createElement(Button, {
|
|
1253
1263
|
label: t("neetoIntegrations.common.finish"),
|
|
1254
1264
|
onClick: onClose
|
|
1255
|
-
}))
|
|
1265
|
+
}));
|
|
1256
1266
|
};
|
|
1257
1267
|
Demo.prototypes = {
|
|
1258
1268
|
/**
|
|
@@ -1315,13 +1325,13 @@ var Finish = withT(function (_ref) {
|
|
|
1315
1325
|
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
|
|
1316
1326
|
children = _ref.children;
|
|
1317
1327
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1318
|
-
className: "
|
|
1328
|
+
className: "mx-auto w-full max-w-3xl"
|
|
1319
1329
|
}, /*#__PURE__*/React__default.createElement(SvgSuccess, null), /*#__PURE__*/React__default.createElement(Typography, {
|
|
1320
|
-
className: "
|
|
1330
|
+
className: "mb-6 mt-4",
|
|
1321
1331
|
style: "h2",
|
|
1322
1332
|
weight: "semibold"
|
|
1323
1333
|
}, title), children, /*#__PURE__*/React__default.createElement("div", {
|
|
1324
|
-
className: "flex w-full items-
|
|
1334
|
+
className: "flex w-full items-center gap-x-2"
|
|
1325
1335
|
}, /*#__PURE__*/React__default.createElement(Button, _extends$1({
|
|
1326
1336
|
onClick: onClick,
|
|
1327
1337
|
label: t("neetoIntegrations.common.continue")
|