@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.
@@ -1,24 +1,27 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useState, useEffect } from 'react';
3
+ import { humanize, noop, isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
4
+ import { buildUrl, getQueryParams } from '@bigbinary/neeto-commons-frontend/utils';
5
+ import { Daily as Daily$1, GoogleCalendar as GoogleCalendar$1, Google } from '@bigbinary/neeto-icons/misc';
6
+ import { Typography, Button, Tooltip, Modal as Modal$1, Callout } from '@bigbinary/neetoui';
7
+ import { Trans, useTranslation } from 'react-i18next';
3
8
  import '@bigbinary/neeto-molecules/IntegrationCard';
4
9
  import DisconnectAlert from '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
5
10
  import WalkthroughModal from '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
6
11
  import classnames from 'classnames';
7
- import i18next, { t as t$1 } from 'i18next';
8
- import { humanize, noop, isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
9
12
  import { withT, useMutationWithInvalidation, withTitle, useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
13
+ import { Check } from '@bigbinary/neeto-icons';
14
+ import i18next, { t as t$1 } from 'i18next';
10
15
  import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
11
16
  import { useQuery } from 'react-query';
12
17
  import axios from 'axios';
13
- import { buildUrl, getQueryParams } from '@bigbinary/neeto-commons-frontend/utils';
14
- import { Daily as Daily$1, GoogleCalendar as GoogleCalendar$1, Google } from '@bigbinary/neeto-icons/misc';
15
- import { Typography, Button, Tooltip, Modal as Modal$1, Callout } from '@bigbinary/neetoui';
16
- import { Trans, useTranslation } from 'react-i18next';
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';
17
22
  import { Form as Form$2, Input } from '@bigbinary/neetoui/formik';
18
23
  import 'ramda';
19
24
  import * as yup from 'yup';
20
- import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
21
- import { Check } from '@bigbinary/neeto-icons';
22
25
 
23
26
  function _typeof(o) {
24
27
  "@babel/helpers - typeof";
@@ -197,7 +200,7 @@ var Manage$1 = withT(function (_ref) {
197
200
  className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6"
198
201
  }, Icon && /*#__PURE__*/React__default.createElement(Icon, {
199
202
  className: "neeto-ui-text-gray-600",
200
- size: 60
203
+ size: 48
201
204
  }), /*#__PURE__*/React__default.createElement("div", {
202
205
  className: "space-y-2"
203
206
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -374,7 +377,8 @@ var DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({
374
377
  var Form = function Form(_ref) {
375
378
  var helpDocUrl = _ref.helpDocUrl,
376
379
  videoUrl = _ref.videoUrl,
377
- onConnect = _ref.onConnect;
380
+ onConnect = _ref.onConnect,
381
+ breadcrumbs = _ref.breadcrumbs;
378
382
  var _useTranslation = useTranslation(),
379
383
  t = _useTranslation.t;
380
384
  var _useState = useState(false),
@@ -394,7 +398,37 @@ var Form = function Form(_ref) {
394
398
  if (isConnecting) {
395
399
  return /*#__PURE__*/React__default.createElement(PageLoader, null);
396
400
  }
397
- return /*#__PURE__*/React__default.createElement("div", {
401
+ return /*#__PURE__*/React__default.createElement(Container, {
402
+ isHeaderFixed: true
403
+ }, /*#__PURE__*/React__default.createElement(Header, {
404
+ breadcrumbs: breadcrumbs,
405
+ title: /*#__PURE__*/React__default.createElement("span", {
406
+ className: "flex items-center gap-2"
407
+ }, t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/React__default.createElement(HelpPopover, {
408
+ title: t("neetoIntegrations.daily.connect.title"),
409
+ description: /*#__PURE__*/React__default.createElement(Trans, {
410
+ i18nKey: "neetoIntegrations.daily.helpDoc",
411
+ components: {
412
+ externalLink: /*#__PURE__*/React__default.createElement(ExternalLink$1, {
413
+ "data-cy": "api-key-help-doc-link",
414
+ href: helpDocUrl,
415
+ rel: "noreferrer",
416
+ target: "_blank"
417
+ })
418
+ }
419
+ }),
420
+ helpLinkProps: {
421
+ label: /*#__PURE__*/React__default.createElement(Button, {
422
+ className: "mt-8",
423
+ label: t("neetoIntegrations.daily.walkthroughText"),
424
+ style: "link",
425
+ onClick: function onClick() {
426
+ return setIsDemoModalOpen(true);
427
+ }
428
+ })
429
+ }
430
+ }))
431
+ }), /*#__PURE__*/React__default.createElement("div", {
398
432
  className: "mx-auto w-full max-w-md"
399
433
  }, /*#__PURE__*/React__default.createElement(Form$2, {
400
434
  formikProps: {
@@ -405,32 +439,14 @@ var Form = function Form(_ref) {
405
439
  }, function (_ref2) {
406
440
  var dirty = _ref2.dirty;
407
441
  return /*#__PURE__*/React__default.createElement("div", {
408
- className: "mt-10 w-full space-y-5"
442
+ className: "mt-14 w-full space-y-5"
409
443
  }, /*#__PURE__*/React__default.createElement("div", {
410
- className: "block"
444
+ className: "block min-h-20"
411
445
  }, /*#__PURE__*/React__default.createElement(Input, {
412
446
  autoFocus: true,
413
447
  required: true,
414
448
  label: t("neetoIntegrations.daily.apiKey"),
415
- name: "apiKey",
416
- helpText: /*#__PURE__*/React__default.createElement(Trans, {
417
- i18nKey: "neetoIntegrations.daily.helpDoc",
418
- components: {
419
- externalLink: /*#__PURE__*/React__default.createElement(ExternalLink$1, {
420
- "data-cy": "api-key-help-doc-link",
421
- href: helpDocUrl,
422
- rel: "noreferrer",
423
- target: "_blank"
424
- })
425
- }
426
- })
427
- }), /*#__PURE__*/React__default.createElement(Button, {
428
- className: "mt-8",
429
- label: t("neetoIntegrations.daily.walkthroughText"),
430
- style: "link",
431
- onClick: function onClick() {
432
- return setIsDemoModalOpen(true);
433
- }
449
+ name: "apiKey"
434
450
  })), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
435
451
  disabled: isConnecting || !dirty,
436
452
  label: t("neetoIntegrations.common.connect"),
@@ -443,7 +459,7 @@ var Form = function Form(_ref) {
443
459
  onClose: function onClose() {
444
460
  return setIsDemoModalOpen(false);
445
461
  }
446
- }));
462
+ })));
447
463
  };
448
464
  var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
449
465
 
@@ -499,7 +515,7 @@ var Manage = function Manage(_ref) {
499
515
  apiKey: apiKey
500
516
  }
501
517
  }) : description,
502
- title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect"),
518
+ title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect.account"),
503
519
  onClose: function onClose() {
504
520
  return setIsDisconnectAlertOpen(false);
505
521
  },
@@ -604,7 +620,7 @@ var Modal = function Modal(_ref) {
604
620
  }, /*#__PURE__*/React__default.createElement(Modal$1.Header, null, /*#__PURE__*/React__default.createElement(Stepper, {
605
621
  steps: steps
606
622
  })), /*#__PURE__*/React__default.createElement(Modal$1.Body, {
607
- className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-items-center neeto-ui-flex-grow"
623
+ className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-flex-grow"
608
624
  }, /*#__PURE__*/React__default.createElement("div", {
609
625
  className: "neeto-ui-w-full py-10"
610
626
  }, children)));
@@ -706,23 +722,23 @@ var Connect = withT(function (_ref) {
706
722
  children = _ref.children,
707
723
  secondaryButtonProps = _ref.secondaryButtonProps;
708
724
  return /*#__PURE__*/React__default.createElement("div", {
709
- className: "mx-auto w-full max-w-lg"
725
+ className: "mx-auto w-full max-w-3xl"
726
+ }, /*#__PURE__*/React__default.createElement("div", {
727
+ className: "mb-6 flex flex-col gap-y-2"
710
728
  }, /*#__PURE__*/React__default.createElement(Icon, {
711
729
  size: 48
712
- }), /*#__PURE__*/React__default.createElement(Typography, {
713
- className: "neeto-ui-text-gray-800 mb-0.5 mt-6",
714
- style: "h2",
715
- weight: "semibold"
730
+ }), /*#__PURE__*/React__default.createElement("div", {
731
+ className: "flex flex-col gap-y-1"
732
+ }, /*#__PURE__*/React__default.createElement(Typography, {
733
+ style: "h2"
716
734
  }, title), /*#__PURE__*/React__default.createElement(Typography, {
717
- className: "neeto-ui-text-gray-700 mb-8",
718
- style: "body1",
719
- weight: "normal"
720
- }, description), children, /*#__PURE__*/React__default.createElement("div", {
721
- className: "flex w-full items-start space-x-4"
735
+ style: "body2"
736
+ }, description))), children, /*#__PURE__*/React__default.createElement("div", {
737
+ className: "flex w-full items-center gap-x-3"
722
738
  }, /*#__PURE__*/React__default.createElement(Button, _extends$1({
723
739
  label: t("neetoIntegrations.common.connect"),
724
740
  onClick: onConnect
725
- }, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/React__default.createElement(Button, _extends$1({
741
+ }, buttonProps)), secondaryButtonProps && /*#__PURE__*/React__default.createElement(Button, _extends$1({
726
742
  style: "secondary"
727
743
  }, secondaryButtonProps))));
728
744
  });
@@ -730,23 +746,23 @@ Connect.prototypes = {
730
746
  /**
731
747
  * To specify the Icon to be shown
732
748
  */
733
- Icon: propTypesExports.PropTypes.node,
749
+ Icon: PropTypes.node,
734
750
  /**
735
751
  * To specify the title of the connect component
736
752
  */
737
- title: propTypesExports.PropTypes.string,
753
+ title: PropTypes.string,
738
754
  /**
739
755
  * To specify the description for connect component
740
756
  */
741
- description: propTypesExports.PropTypes.string,
757
+ description: PropTypes.string,
742
758
  /**
743
759
  * To specify the props for the connect button
744
760
  */
745
- buttonProps: propTypesExports.PropTypes.object,
761
+ buttonProps: PropTypes.object,
746
762
  /**
747
763
  * Handler function that is triggered when the connect button is clicked.
748
764
  */
749
- onConnect: propTypesExports.PropTypes.func
765
+ onConnect: PropTypes.func
750
766
  };
751
767
 
752
768
  ({
@@ -810,13 +826,13 @@ var Finish = withT(function (_ref) {
810
826
  secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
811
827
  children = _ref.children;
812
828
  return /*#__PURE__*/React__default.createElement("div", {
813
- className: "neeto-ui-w-full mx-auto max-w-lg"
829
+ className: "mx-auto w-full max-w-3xl"
814
830
  }, /*#__PURE__*/React__default.createElement(SvgSuccess, null), /*#__PURE__*/React__default.createElement(Typography, {
815
- className: "neeto-ui-text-gray-800 mb-8 mt-4",
831
+ className: "mb-6 mt-4",
816
832
  style: "h2",
817
833
  weight: "semibold"
818
834
  }, title), children, /*#__PURE__*/React__default.createElement("div", {
819
- className: "flex w-full items-start space-x-2"
835
+ className: "flex w-full items-center gap-x-2"
820
836
  }, /*#__PURE__*/React__default.createElement(Button, _extends$1({
821
837
  onClick: onClick,
822
838
  label: t("neetoIntegrations.common.continue")
@@ -919,15 +935,14 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
919
935
  isOpen: true,
920
936
  onClose: handleClose
921
937
  }, activeTab === STEPS.connect && /*#__PURE__*/React__default.createElement("div", {
922
- className: "w-full max-w-2xl mx-auto"
938
+ className: "mx-auto w-full max-w-3xl"
923
939
  }, /*#__PURE__*/React__default.createElement(GoogleCalendar$1, {
924
- size: 42
940
+ size: 48
925
941
  }), /*#__PURE__*/React__default.createElement(Typography, {
926
- className: "mt-6 mb-3 neeto-ui-text-gray-800",
927
- style: "h2",
928
- weight: "semibold"
942
+ className: "mb-4 mt-2",
943
+ style: "h2"
929
944
  }, t("neetoIntegrations.google.connect.title")), /*#__PURE__*/React__default.createElement("div", {
930
- className: "flex flex-col items-start w-full pt-2"
945
+ className: "flex w-full flex-col items-start"
931
946
  }, /*#__PURE__*/React__default.createElement(Callout, {
932
947
  className: "block leading-5"
933
948
  }, /*#__PURE__*/React__default.createElement(Trans, {
@@ -939,7 +954,7 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
939
954
  selectCheckbox: t("neetoIntegrations.google.connect.selectCheckbox")
940
955
  }
941
956
  })), permissionImage && /*#__PURE__*/React__default.createElement("div", {
942
- className: "my-4 border neeto-ui-border-gray-300"
957
+ className: "neeto-ui-border-gray-300 neeto-ui-rounded-md my-4 overflow-hidden border"
943
958
  }, /*#__PURE__*/React__default.createElement("img", {
944
959
  src: permissionImage
945
960
  }))), /*#__PURE__*/React__default.createElement(Button, {