@bigbinary/neeto-integrations-frontend 2.12.8 → 3.0.0

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.
@@ -3,7 +3,8 @@
3
3
  var React = require('react');
4
4
  var neetoCist = require('@bigbinary/neeto-cist');
5
5
  var utils = require('@bigbinary/neeto-commons-frontend/utils');
6
- var misc = require('@bigbinary/neeto-icons/misc');
6
+ var GoogleCalendarIcon = require('@bigbinary/neeto-icons/misc/GoogleCalendar');
7
+ var Google = require('@bigbinary/neeto-icons/misc/Google');
7
8
  var Typography = require('@bigbinary/neetoui/Typography');
8
9
  var Callout = require('@bigbinary/neetoui/Callout');
9
10
  var Button = require('@bigbinary/neetoui/Button');
@@ -13,11 +14,11 @@ var DisconnectAlert = require('@bigbinary/neeto-molecules/IntegrationDisconnectA
13
14
  var WalkthroughModal = require('@bigbinary/neeto-molecules/IntegrationWalkthroughModal');
14
15
  var classnames = require('classnames');
15
16
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
16
- var neetoIcons = require('@bigbinary/neeto-icons');
17
+ var Check = require('@bigbinary/neeto-icons/Check');
17
18
  var Tooltip = require('@bigbinary/neetoui/Tooltip');
18
19
  var i18next = require('i18next');
20
+ var reactQuery = require('@tanstack/react-query');
19
21
  var constants = require('@bigbinary/neeto-commons-frontend/constants');
20
- var reactQuery = require('react-query');
21
22
  var axios = require('axios');
22
23
  var Container = require('@bigbinary/neeto-molecules/Container');
23
24
  var Header = require('@bigbinary/neeto-molecules/Header');
@@ -31,7 +32,9 @@ var jsxRuntime = require('react/jsx-runtime');
31
32
  require('ramda');
32
33
  require('@bigbinary/neetoui/formik/Select');
33
34
  var yup = require('yup');
35
+ require('@bigbinary/neeto-icons/misc/Zoom');
34
36
  var NeetoUIModal = require('@bigbinary/neetoui/Modal');
37
+ var DailyIcon = require('@bigbinary/neeto-icons/misc/Daily');
35
38
  var CopyToClipboardButton = require('@bigbinary/neeto-molecules/CopyToClipboardButton');
36
39
 
37
40
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -56,12 +59,15 @@ function _interopNamespace(e) {
56
59
 
57
60
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
58
61
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
62
+ var GoogleCalendarIcon__default = /*#__PURE__*/_interopDefaultLegacy(GoogleCalendarIcon);
63
+ var Google__default = /*#__PURE__*/_interopDefaultLegacy(Google);
59
64
  var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
60
65
  var Callout__default = /*#__PURE__*/_interopDefaultLegacy(Callout);
61
66
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
62
67
  var DisconnectAlert__default = /*#__PURE__*/_interopDefaultLegacy(DisconnectAlert);
63
68
  var WalkthroughModal__default = /*#__PURE__*/_interopDefaultLegacy(WalkthroughModal);
64
69
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
70
+ var Check__default = /*#__PURE__*/_interopDefaultLegacy(Check);
65
71
  var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
66
72
  var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
67
73
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
@@ -74,6 +80,7 @@ var FormikForm__default = /*#__PURE__*/_interopDefaultLegacy(FormikForm);
74
80
  var ActionBlock__default = /*#__PURE__*/_interopDefaultLegacy(ActionBlock);
75
81
  var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
76
82
  var NeetoUIModal__default = /*#__PURE__*/_interopDefaultLegacy(NeetoUIModal);
83
+ var DailyIcon__default = /*#__PURE__*/_interopDefaultLegacy(DailyIcon);
77
84
  var CopyToClipboardButton__default = /*#__PURE__*/_interopDefaultLegacy(CopyToClipboardButton);
78
85
 
79
86
  function _typeof(o) {
@@ -257,7 +264,7 @@ var Manage$1 = reactUtils.withT(function (_ref) {
257
264
  children: title
258
265
  }), isConnected && /*#__PURE__*/jsxRuntime.jsx("div", {
259
266
  className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1",
260
- children: /*#__PURE__*/jsxRuntime.jsx(neetoIcons.Check, {
267
+ children: /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
261
268
  size: 24
262
269
  })
263
270
  })]
@@ -368,18 +375,20 @@ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t
368
375
  var useCreateDaily = function useCreateDaily() {
369
376
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
370
377
  return reactUtils.useMutationWithInvalidation(dailiesApi.create, _objectSpread$4({
371
- keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
378
+ keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]]
372
379
  }, options));
373
380
  };
374
381
  var useFetchDaily = function useFetchDaily() {
375
- return reactQuery.useQuery(QUERY_KEYS.DAILY_CO_DETAILS, dailiesApi.show, {
382
+ return reactQuery.useQuery({
383
+ queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],
384
+ queryFn: dailiesApi.show,
376
385
  staleTime: constants.DEFAULT_STALE_TIME
377
386
  });
378
387
  };
379
388
  var useDestroyDaily = function useDestroyDaily(_ref) {
380
389
  var onSuccess = _ref.onSuccess;
381
390
  return reactUtils.useMutationWithInvalidation(dailiesApi.destroy, {
382
- keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS],
391
+ keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],
383
392
  onSuccess: onSuccess
384
393
  });
385
394
  };
@@ -457,7 +466,7 @@ var Form = function Form(_ref) {
457
466
  }
458
467
  }),
459
468
  createDaily = _useCreateDaily.mutate,
460
- isConnecting = _useCreateDaily.isLoading;
469
+ isConnecting = _useCreateDaily.isPending;
461
470
  var handleSubmit = function handleSubmit(payload) {
462
471
  return createDaily(payload);
463
472
  };
@@ -562,7 +571,7 @@ var Manage = function Manage(_ref) {
562
571
  }
563
572
  }),
564
573
  destroyIntegration = _useDestroyDaily.mutate,
565
- isDisconnecting = _useDestroyDaily.isLoading;
574
+ isDisconnecting = _useDestroyDaily.isPending;
566
575
  var isConnected = neetoCist.isPresent(apiKey);
567
576
  var handleDisconnect = function handleDisconnect() {
568
577
  return destroyIntegration("daily");
@@ -573,7 +582,7 @@ var Manage = function Manage(_ref) {
573
582
  isDisconnectAlertOpen: isDisconnectAlertOpen,
574
583
  isDisconnecting: isDisconnecting,
575
584
  setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
576
- Icon: misc.Daily,
585
+ Icon: DailyIcon__default["default"],
577
586
  connectPath: utils.buildUrl(window.location.pathname, {
578
587
  connect: true
579
588
  }),
@@ -1064,7 +1073,7 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
1064
1073
  onClose: handleClose,
1065
1074
  children: [activeTab === STEPS.connect && /*#__PURE__*/jsxRuntime.jsxs("div", {
1066
1075
  className: "mx-auto w-full max-w-3xl",
1067
- children: [/*#__PURE__*/jsxRuntime.jsx(misc.GoogleCalendar, {
1076
+ children: [/*#__PURE__*/jsxRuntime.jsx(GoogleCalendarIcon__default["default"], {
1068
1077
  size: 48
1069
1078
  }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
1070
1079
  className: "mb-4 mt-2",
@@ -1090,7 +1099,7 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
1090
1099
  })
1091
1100
  })]
1092
1101
  }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
1093
- icon: misc.Google,
1102
+ icon: Google__default["default"],
1094
1103
  label: t("neetoIntegrations.google.connect.signIn"),
1095
1104
  onClick: fetchAuthorizationUrl
1096
1105
  })]