@bigbinary/neeto-integrations-frontend 2.10.3 → 2.10.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.
@@ -20,14 +20,14 @@ import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
20
20
  import classnames from 'classnames';
21
21
  import { Check } from '@bigbinary/neeto-icons';
22
22
 
23
- function _typeof(obj) {
23
+ function _typeof(o) {
24
24
  "@babel/helpers - typeof";
25
25
 
26
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
27
- return typeof obj;
28
- } : function (obj) {
29
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
30
- }, _typeof(obj);
26
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
27
+ return typeof o;
28
+ } : function (o) {
29
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
30
+ }, _typeof(o);
31
31
  }
32
32
 
33
33
  function _toPrimitive(input, hint) {
@@ -96,31 +96,31 @@ function _arrayWithHoles(arr) {
96
96
  if (Array.isArray(arr)) return arr;
97
97
  }
98
98
 
99
- function _iterableToArrayLimit(arr, i) {
100
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
101
- if (null != _i) {
102
- var _s,
103
- _e,
104
- _x,
105
- _r,
106
- _arr = [],
107
- _n = !0,
108
- _d = !1;
99
+ function _iterableToArrayLimit(r, l) {
100
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
101
+ if (null != t) {
102
+ var e,
103
+ n,
104
+ i,
105
+ u,
106
+ a = [],
107
+ f = !0,
108
+ o = !1;
109
109
  try {
110
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
111
- if (Object(_i) !== _i) return;
112
- _n = !1;
113
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
114
- } catch (err) {
115
- _d = !0, _e = err;
110
+ if (i = (t = t.call(r)).next, 0 === l) {
111
+ if (Object(t) !== t) return;
112
+ f = !1;
113
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
114
+ } catch (r) {
115
+ o = !0, n = r;
116
116
  } finally {
117
117
  try {
118
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
118
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
119
119
  } finally {
120
- if (_d) throw _e;
120
+ if (o) throw n;
121
121
  }
122
122
  }
123
- return _arr;
123
+ return a;
124
124
  }
125
125
  }
126
126
 
@@ -147,7 +147,7 @@ var Manage$1 = withT(function (_ref) {
147
147
  _ref$isDisconnecting = _ref.isDisconnecting,
148
148
  isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
149
149
  _ref$onDisconnect = _ref.onDisconnect,
150
- onDisconnect = _ref$onDisconnect === void 0 ? noop : _ref$onDisconnect,
150
+ onDisconnect = _ref$onDisconnect === void 0 ? undefined : _ref$onDisconnect,
151
151
  _ref$onClose = _ref.onClose,
152
152
  onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
153
153
  _ref$Icon = _ref.Icon,
@@ -198,38 +198,42 @@ var Manage$1 = withT(function (_ref) {
198
198
  style: "body2",
199
199
  weight: "normal"
200
200
  }, /*#__PURE__*/React__default.createElement(Trans, {
201
- i18nKey: "settings.integrations.common.helpDocUrl",
201
+ i18nKey: "neetoIntegrations.common.helpDocUrl",
202
202
  components: {
203
203
  helpLink: /*#__PURE__*/React__default.createElement(Button, {
204
204
  href: helpDocUrl,
205
- style: "link"
205
+ style: "link",
206
+ target: "_blank"
206
207
  })
207
208
  },
208
209
  values: {
209
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
210
+ integration: integrationName || humanize(integration)
210
211
  }
211
212
  }))), isConnected ? /*#__PURE__*/React__default.createElement("div", {
212
213
  className: "space-x-2"
213
214
  }, managePath && /*#__PURE__*/React__default.createElement(Button, {
215
+ "data-cy": "manage-button",
214
216
  to: managePath,
215
- label: t("settings.integrations.common.manageIntegration", {
216
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
217
+ label: t("neetoIntegrations.common.manageIntegration", {
218
+ integration: integrationName || humanize(integration)
217
219
  })
218
220
  }), onDisconnect && /*#__PURE__*/React__default.createElement(Button, {
219
- style: "danger",
220
- label: t("settings.integrations.common.disconnectIntegration", {
221
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
221
+ "data-cy": "disconnect-button",
222
+ style: "secondary",
223
+ label: t("neetoIntegrations.common.disconnectIntegration", {
224
+ integration: integrationName || humanize(integration)
222
225
  }),
223
226
  onClick: function onClick() {
224
227
  return setIsDisconnectAlertOpen(true);
225
228
  }
226
229
  })) : /*#__PURE__*/React__default.createElement(Button, {
230
+ "data-cy": "connect-button",
227
231
  disabled: isConnectDisabled,
228
232
  href: connectUrl,
229
233
  to: connectPath,
230
234
  tooltipProps: connectTooltipProps,
231
- label: t("settings.integrations.common.connectIntegration", {
232
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
235
+ label: t("neetoIntegrations.common.connectIntegration", {
236
+ integration: integrationName || humanize(integration)
233
237
  })
234
238
  }))), /*#__PURE__*/React__default.createElement(DisconnectAlert, {
235
239
  isDisconnecting: isDisconnecting,
@@ -237,7 +241,7 @@ var Manage$1 = withT(function (_ref) {
237
241
  onDisconnect: onDisconnect,
238
242
  isOpen: isDisconnectAlertOpen,
239
243
  title: t("settings.integrations.".concat(integration, ".disconnect.title")),
240
- message: disconnectMessage !== null && disconnectMessage !== void 0 ? disconnectMessage : t("settings.integrations.".concat(integration, ".disconnect.message"))
244
+ message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message"))
241
245
  }));
242
246
  });
243
247
 
@@ -268,8 +272,8 @@ var QUERY_KEYS = {
268
272
  ZOOM_DETAILS: "zoom-details"
269
273
  };
270
274
 
271
- function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
272
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
275
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
276
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
273
277
  var useCreateDaily = function useCreateDaily() {
274
278
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
275
279
  return useMutationWithInvalidation(dailiesApi.create, _objectSpread$1({
@@ -452,7 +456,7 @@ var Manage = function Manage(_ref) {
452
456
  var _useDestroyDaily = useDestroyDaily({
453
457
  onSuccess: function onSuccess() {
454
458
  setIsDisconnectAlertOpen(false);
455
- onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
459
+ onDisconnect === null || onDisconnect === void 0 || onDisconnect();
456
460
  }
457
461
  }),
458
462
  destroyIntegration = _useDestroyDaily.mutate,
@@ -863,8 +867,8 @@ var STEPS = {
863
867
  finish: t$1("neetoIntegrations.common.finish")
864
868
  };
865
869
 
866
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
867
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
870
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
871
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
868
872
  var GoogleCalendar = function GoogleCalendar(_ref) {
869
873
  var permissionImage = _ref.permissionImage,
870
874
  fetchAuthorizationUrl = _ref.fetchAuthorizationUrl,