@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.
package/dist/Daily.js CHANGED
@@ -20,14 +20,14 @@ import * as yup from 'yup';
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) {
@@ -88,8 +88,8 @@ var QUERY_KEYS = {
88
88
  ZOOM_DETAILS: "zoom-details"
89
89
  };
90
90
 
91
- 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; }
92
- 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; }
91
+ 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; }
92
+ 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; }
93
93
  var useCreateDaily = function useCreateDaily() {
94
94
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
95
95
  return useMutationWithInvalidation(dailiesApi.create, _objectSpread({
@@ -113,31 +113,31 @@ function _arrayWithHoles(arr) {
113
113
  if (Array.isArray(arr)) return arr;
114
114
  }
115
115
 
116
- function _iterableToArrayLimit(arr, i) {
117
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
118
- if (null != _i) {
119
- var _s,
120
- _e,
121
- _x,
122
- _r,
123
- _arr = [],
124
- _n = !0,
125
- _d = !1;
116
+ function _iterableToArrayLimit(r, l) {
117
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
118
+ if (null != t) {
119
+ var e,
120
+ n,
121
+ i,
122
+ u,
123
+ a = [],
124
+ f = !0,
125
+ o = !1;
126
126
  try {
127
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
128
- if (Object(_i) !== _i) return;
129
- _n = !1;
130
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
131
- } catch (err) {
132
- _d = !0, _e = err;
127
+ if (i = (t = t.call(r)).next, 0 === l) {
128
+ if (Object(t) !== t) return;
129
+ f = !1;
130
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
131
+ } catch (r) {
132
+ o = !0, n = r;
133
133
  } finally {
134
134
  try {
135
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
135
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
136
136
  } finally {
137
- if (_d) throw _e;
137
+ if (o) throw n;
138
138
  }
139
139
  }
140
- return _arr;
140
+ return a;
141
141
  }
142
142
  }
143
143
 
@@ -179,7 +179,7 @@ var Manage$1 = withT(function (_ref) {
179
179
  _ref$isDisconnecting = _ref.isDisconnecting,
180
180
  isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
181
181
  _ref$onDisconnect = _ref.onDisconnect,
182
- onDisconnect = _ref$onDisconnect === void 0 ? noop : _ref$onDisconnect,
182
+ onDisconnect = _ref$onDisconnect === void 0 ? undefined : _ref$onDisconnect,
183
183
  _ref$onClose = _ref.onClose,
184
184
  onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
185
185
  _ref$Icon = _ref.Icon,
@@ -230,38 +230,42 @@ var Manage$1 = withT(function (_ref) {
230
230
  style: "body2",
231
231
  weight: "normal"
232
232
  }, /*#__PURE__*/React__default.createElement(Trans, {
233
- i18nKey: "settings.integrations.common.helpDocUrl",
233
+ i18nKey: "neetoIntegrations.common.helpDocUrl",
234
234
  components: {
235
235
  helpLink: /*#__PURE__*/React__default.createElement(Button, {
236
236
  href: helpDocUrl,
237
- style: "link"
237
+ style: "link",
238
+ target: "_blank"
238
239
  })
239
240
  },
240
241
  values: {
241
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
242
+ integration: integrationName || humanize(integration)
242
243
  }
243
244
  }))), isConnected ? /*#__PURE__*/React__default.createElement("div", {
244
245
  className: "space-x-2"
245
246
  }, managePath && /*#__PURE__*/React__default.createElement(Button, {
247
+ "data-cy": "manage-button",
246
248
  to: managePath,
247
- label: t("settings.integrations.common.manageIntegration", {
248
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
249
+ label: t("neetoIntegrations.common.manageIntegration", {
250
+ integration: integrationName || humanize(integration)
249
251
  })
250
252
  }), onDisconnect && /*#__PURE__*/React__default.createElement(Button, {
251
- style: "danger",
252
- label: t("settings.integrations.common.disconnectIntegration", {
253
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
253
+ "data-cy": "disconnect-button",
254
+ style: "secondary",
255
+ label: t("neetoIntegrations.common.disconnectIntegration", {
256
+ integration: integrationName || humanize(integration)
254
257
  }),
255
258
  onClick: function onClick() {
256
259
  return setIsDisconnectAlertOpen(true);
257
260
  }
258
261
  })) : /*#__PURE__*/React__default.createElement(Button, {
262
+ "data-cy": "connect-button",
259
263
  disabled: isConnectDisabled,
260
264
  href: connectUrl,
261
265
  to: connectPath,
262
266
  tooltipProps: connectTooltipProps,
263
- label: t("settings.integrations.common.connectIntegration", {
264
- integration: integrationName !== null && integrationName !== void 0 ? integrationName : humanize(integration)
267
+ label: t("neetoIntegrations.common.connectIntegration", {
268
+ integration: integrationName || humanize(integration)
265
269
  })
266
270
  }))), /*#__PURE__*/React__default.createElement(DisconnectAlert, {
267
271
  isDisconnecting: isDisconnecting,
@@ -269,7 +273,7 @@ var Manage$1 = withT(function (_ref) {
269
273
  onDisconnect: onDisconnect,
270
274
  isOpen: isDisconnectAlertOpen,
271
275
  title: t("settings.integrations.".concat(integration, ".disconnect.title")),
272
- message: disconnectMessage !== null && disconnectMessage !== void 0 ? disconnectMessage : t("settings.integrations.".concat(integration, ".disconnect.message"))
276
+ message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message"))
273
277
  }));
274
278
  });
275
279
 
@@ -705,7 +709,7 @@ var Manage = function Manage(_ref) {
705
709
  var _useDestroyDaily = useDestroyDaily({
706
710
  onSuccess: function onSuccess() {
707
711
  setIsDisconnectAlertOpen(false);
708
- onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect();
712
+ onDisconnect === null || onDisconnect === void 0 || onDisconnect();
709
713
  }
710
714
  }),
711
715
  destroyIntegration = _useDestroyDaily.mutate,