@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.
@@ -51,14 +51,14 @@ var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
51
51
  var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
52
52
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
53
53
 
54
- function _typeof(obj) {
54
+ function _typeof(o) {
55
55
  "@babel/helpers - typeof";
56
56
 
57
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
58
- return typeof obj;
59
- } : function (obj) {
60
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
61
- }, _typeof(obj);
57
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
58
+ return typeof o;
59
+ } : function (o) {
60
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
61
+ }, _typeof(o);
62
62
  }
63
63
 
64
64
  function _toPrimitive(input, hint) {
@@ -127,31 +127,31 @@ function _arrayWithHoles(arr) {
127
127
  if (Array.isArray(arr)) return arr;
128
128
  }
129
129
 
130
- function _iterableToArrayLimit(arr, i) {
131
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
132
- if (null != _i) {
133
- var _s,
134
- _e,
135
- _x,
136
- _r,
137
- _arr = [],
138
- _n = !0,
139
- _d = !1;
130
+ function _iterableToArrayLimit(r, l) {
131
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
132
+ if (null != t) {
133
+ var e,
134
+ n,
135
+ i,
136
+ u,
137
+ a = [],
138
+ f = !0,
139
+ o = !1;
140
140
  try {
141
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
142
- if (Object(_i) !== _i) return;
143
- _n = !1;
144
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
145
- } catch (err) {
146
- _d = !0, _e = err;
141
+ if (i = (t = t.call(r)).next, 0 === l) {
142
+ if (Object(t) !== t) return;
143
+ f = !1;
144
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
145
+ } catch (r) {
146
+ o = !0, n = r;
147
147
  } finally {
148
148
  try {
149
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
149
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
150
150
  } finally {
151
- if (_d) throw _e;
151
+ if (o) throw n;
152
152
  }
153
153
  }
154
- return _arr;
154
+ return a;
155
155
  }
156
156
  }
157
157
 
@@ -178,7 +178,7 @@ var Manage$1 = reactUtils.withT(function (_ref) {
178
178
  _ref$isDisconnecting = _ref.isDisconnecting,
179
179
  isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
180
180
  _ref$onDisconnect = _ref.onDisconnect,
181
- onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect,
181
+ onDisconnect = _ref$onDisconnect === void 0 ? undefined : _ref$onDisconnect,
182
182
  _ref$onClose = _ref.onClose,
183
183
  onClose = _ref$onClose === void 0 ? neetoCist.noop : _ref$onClose,
184
184
  _ref$Icon = _ref.Icon,
@@ -229,38 +229,42 @@ var Manage$1 = reactUtils.withT(function (_ref) {
229
229
  style: "body2",
230
230
  weight: "normal"
231
231
  }, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
232
- i18nKey: "settings.integrations.common.helpDocUrl",
232
+ i18nKey: "neetoIntegrations.common.helpDocUrl",
233
233
  components: {
234
234
  helpLink: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
235
235
  href: helpDocUrl,
236
- style: "link"
236
+ style: "link",
237
+ target: "_blank"
237
238
  })
238
239
  },
239
240
  values: {
240
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
241
+ integration: integrationName || neetoCist.humanize(integration)
241
242
  }
242
243
  }))), isConnected ? /*#__PURE__*/React__default["default"].createElement("div", {
243
244
  className: "space-x-2"
244
245
  }, managePath && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
246
+ "data-cy": "manage-button",
245
247
  to: managePath,
246
- label: t("settings.integrations.common.manageIntegration", {
247
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
248
+ label: t("neetoIntegrations.common.manageIntegration", {
249
+ integration: integrationName || neetoCist.humanize(integration)
248
250
  })
249
251
  }), onDisconnect && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
250
- style: "danger",
251
- label: t("settings.integrations.common.disconnectIntegration", {
252
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
252
+ "data-cy": "disconnect-button",
253
+ style: "secondary",
254
+ label: t("neetoIntegrations.common.disconnectIntegration", {
255
+ integration: integrationName || neetoCist.humanize(integration)
253
256
  }),
254
257
  onClick: function onClick() {
255
258
  return setIsDisconnectAlertOpen(true);
256
259
  }
257
260
  })) : /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
261
+ "data-cy": "connect-button",
258
262
  disabled: isConnectDisabled,
259
263
  href: connectUrl,
260
264
  to: connectPath,
261
265
  tooltipProps: connectTooltipProps,
262
- label: t("settings.integrations.common.connectIntegration", {
263
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : neetoCist.humanize(integration)
266
+ label: t("neetoIntegrations.common.connectIntegration", {
267
+ integration: integrationName || neetoCist.humanize(integration)
264
268
  })
265
269
  }))), /*#__PURE__*/React__default["default"].createElement(DisconnectAlert__default["default"], {
266
270
  isDisconnecting: isDisconnecting,
@@ -268,7 +272,7 @@ var Manage$1 = reactUtils.withT(function (_ref) {
268
272
  onDisconnect: onDisconnect,
269
273
  isOpen: isDisconnectAlertOpen,
270
274
  title: t("settings.integrations.".concat(integration, ".disconnect.title")),
271
- message: disconnectMessage !== null && disconnectMessage !== void 0 ? disconnectMessage : t("settings.integrations.".concat(integration, ".disconnect.message"))
275
+ message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message"))
272
276
  }));
273
277
  });
274
278
 
@@ -299,8 +303,8 @@ var QUERY_KEYS = {
299
303
  ZOOM_DETAILS: "zoom-details"
300
304
  };
301
305
 
302
- 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; }
303
- 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; }
306
+ 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; }
307
+ 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; }
304
308
  var useCreateDaily = function useCreateDaily() {
305
309
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
306
310
  return reactUtils.useMutationWithInvalidation(dailiesApi.create, _objectSpread$1({
@@ -483,7 +487,7 @@ var Manage = function Manage(_ref) {
483
487
  var _useDestroyDaily = useDestroyDaily({
484
488
  onSuccess: function onSuccess() {
485
489
  setIsDisconnectAlertOpen(false);
486
- onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
490
+ onDisconnect === null || onDisconnect === void 0 || onDisconnect();
487
491
  }
488
492
  }),
489
493
  destroyIntegration = _useDestroyDaily.mutate,
@@ -894,8 +898,8 @@ var STEPS = {
894
898
  finish: i18next.t("neetoIntegrations.common.finish")
895
899
  };
896
900
 
897
- 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; }
898
- 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; }
901
+ 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; }
902
+ 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; }
899
903
  var GoogleCalendar = function GoogleCalendar(_ref) {
900
904
  var permissionImage = _ref.permissionImage,
901
905
  fetchAuthorizationUrl = _ref.fetchAuthorizationUrl,