@bigbinary/neeto-integrations-frontend 2.12.6 → 2.12.8
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/app/javascript/src/translations/en.json +2 -2
- package/dist/Daily.cjs.js +288 -206
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +281 -206
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +384 -284
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +375 -284
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Twilio.cjs.js +73 -59
- package/dist/Twilio.cjs.js.map +1 -1
- package/dist/Twilio.js +66 -55
- package/dist/Twilio.js.map +1 -1
- package/dist/ZapierForm.cjs.js +138 -105
- package/dist/ZapierForm.cjs.js.map +1 -1
- package/dist/ZapierForm.js +126 -100
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.cjs.js +292 -210
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +286 -211
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +526 -412
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +516 -412
- package/dist/index.js.map +1 -1
- package/package.json +14 -13
- package/types.d.ts +3 -0
|
@@ -4,7 +4,9 @@ var React = require('react');
|
|
|
4
4
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
5
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
6
6
|
var misc = require('@bigbinary/neeto-icons/misc');
|
|
7
|
-
var
|
|
7
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
8
|
+
var Callout = require('@bigbinary/neetoui/Callout');
|
|
9
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
8
10
|
var reactI18next = require('react-i18next');
|
|
9
11
|
require('@bigbinary/neeto-molecules/IntegrationCard');
|
|
10
12
|
var DisconnectAlert = require('@bigbinary/neeto-molecules/IntegrationDisconnectAlert');
|
|
@@ -12,6 +14,7 @@ var WalkthroughModal = require('@bigbinary/neeto-molecules/IntegrationWalkthroug
|
|
|
12
14
|
var classnames = require('classnames');
|
|
13
15
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
14
16
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
17
|
+
var Tooltip = require('@bigbinary/neetoui/Tooltip');
|
|
15
18
|
var i18next = require('i18next');
|
|
16
19
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
17
20
|
var reactQuery = require('react-query');
|
|
@@ -20,9 +23,16 @@ var Container = require('@bigbinary/neeto-molecules/Container');
|
|
|
20
23
|
var Header = require('@bigbinary/neeto-molecules/Header');
|
|
21
24
|
var HelpPopover = require('@bigbinary/neeto-molecules/HelpPopover');
|
|
22
25
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
23
|
-
var
|
|
26
|
+
var Input = require('@bigbinary/neetoui/formik/Input');
|
|
27
|
+
var FormikForm = require('@bigbinary/neetoui/formik/Form');
|
|
28
|
+
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
29
|
+
var reactRouterDom = require('react-router-dom');
|
|
30
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
24
31
|
require('ramda');
|
|
32
|
+
require('@bigbinary/neetoui/formik/Select');
|
|
25
33
|
var yup = require('yup');
|
|
34
|
+
var NeetoUIModal = require('@bigbinary/neetoui/Modal');
|
|
35
|
+
var CopyToClipboardButton = require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
26
36
|
|
|
27
37
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
28
38
|
|
|
@@ -46,16 +56,25 @@ function _interopNamespace(e) {
|
|
|
46
56
|
|
|
47
57
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
48
58
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
59
|
+
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
60
|
+
var Callout__default = /*#__PURE__*/_interopDefaultLegacy(Callout);
|
|
61
|
+
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
49
62
|
var DisconnectAlert__default = /*#__PURE__*/_interopDefaultLegacy(DisconnectAlert);
|
|
50
63
|
var WalkthroughModal__default = /*#__PURE__*/_interopDefaultLegacy(WalkthroughModal);
|
|
51
64
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
65
|
+
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
|
52
66
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
53
67
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
54
68
|
var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
|
|
55
69
|
var Header__default = /*#__PURE__*/_interopDefaultLegacy(Header);
|
|
56
70
|
var HelpPopover__default = /*#__PURE__*/_interopDefaultLegacy(HelpPopover);
|
|
57
71
|
var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
|
|
72
|
+
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
|
|
73
|
+
var FormikForm__default = /*#__PURE__*/_interopDefaultLegacy(FormikForm);
|
|
74
|
+
var ActionBlock__default = /*#__PURE__*/_interopDefaultLegacy(ActionBlock);
|
|
58
75
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
76
|
+
var NeetoUIModal__default = /*#__PURE__*/_interopDefaultLegacy(NeetoUIModal);
|
|
77
|
+
var CopyToClipboardButton__default = /*#__PURE__*/_interopDefaultLegacy(CopyToClipboardButton);
|
|
59
78
|
|
|
60
79
|
function _typeof(o) {
|
|
61
80
|
"@babel/helpers - typeof";
|
|
@@ -169,21 +188,8 @@ function _slicedToArray(arr, i) {
|
|
|
169
188
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
170
189
|
}
|
|
171
190
|
|
|
172
|
-
function
|
|
173
|
-
|
|
174
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
175
|
-
var source = arguments[i];
|
|
176
|
-
for (var key in source) {
|
|
177
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
178
|
-
target[key] = source[key];
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return target;
|
|
183
|
-
};
|
|
184
|
-
return _extends$1.apply(this, arguments);
|
|
185
|
-
}
|
|
186
|
-
|
|
191
|
+
function ownKeys$5(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; }
|
|
192
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
187
193
|
var Manage$1 = reactUtils.withT(function (_ref) {
|
|
188
194
|
var t = _ref.t,
|
|
189
195
|
_ref$title = _ref.title,
|
|
@@ -227,86 +233,107 @@ var Manage$1 = reactUtils.withT(function (_ref) {
|
|
|
227
233
|
_ref$isConnectDisable = _ref.isConnectDisabled,
|
|
228
234
|
isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
|
|
229
235
|
_ref$connectTooltipPr = _ref.connectTooltipProps,
|
|
230
|
-
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
236
|
+
connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr,
|
|
237
|
+
_ref$buttonProps = _ref.buttonProps,
|
|
238
|
+
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
239
|
+
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
240
|
+
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP;
|
|
241
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
242
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
243
|
+
className: "mx-auto w-full max-w-3xl",
|
|
244
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
245
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6",
|
|
246
|
+
children: [Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
247
|
+
className: "neeto-ui-text-gray-600",
|
|
248
|
+
size: 48
|
|
249
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
250
|
+
className: "space-y-2",
|
|
251
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
252
|
+
className: "flex items-center space-x-4",
|
|
253
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
254
|
+
className: "neeto-ui-text-gray-800 mb-0.5",
|
|
255
|
+
style: "h2",
|
|
256
|
+
weight: "semibold",
|
|
257
|
+
children: title
|
|
258
|
+
}), isConnected && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
259
|
+
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, {
|
|
261
|
+
size: 24
|
|
262
|
+
})
|
|
263
|
+
})]
|
|
264
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
265
|
+
style: "body1",
|
|
266
|
+
weight: "normal",
|
|
267
|
+
className: classnames__default["default"]("neeto-ui-text-gray-800", {
|
|
268
|
+
"break-all": isConnected
|
|
269
|
+
}),
|
|
270
|
+
children: description
|
|
271
|
+
}), helpDocUrl && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
272
|
+
className: "neeto-ui-text-gray-800",
|
|
273
|
+
style: "body2",
|
|
274
|
+
weight: "normal",
|
|
275
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
276
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
277
|
+
components: {
|
|
278
|
+
helpLink: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
279
|
+
href: helpDocUrl,
|
|
280
|
+
style: "link",
|
|
281
|
+
target: "_blank"
|
|
282
|
+
})
|
|
283
|
+
},
|
|
284
|
+
values: {
|
|
285
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
286
|
+
}
|
|
287
|
+
})
|
|
288
|
+
})]
|
|
289
|
+
}), isConnected ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
290
|
+
className: "space-x-2",
|
|
291
|
+
children: [(managePath || manageUrl) && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$5({
|
|
292
|
+
"data-cy": "manage-button",
|
|
293
|
+
href: manageUrl,
|
|
294
|
+
target: manageUrl ? "_blank" : "_self",
|
|
295
|
+
to: managePath,
|
|
296
|
+
label: t("neetoIntegrations.common.manageIntegration", {
|
|
297
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
298
|
+
})
|
|
299
|
+
}, buttonProps)), onDisconnect && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$5({
|
|
300
|
+
"data-cy": "disconnect-button",
|
|
301
|
+
style: "secondary",
|
|
302
|
+
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
303
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
304
|
+
}),
|
|
305
|
+
onClick: function onClick() {
|
|
306
|
+
return setIsDisconnectAlertOpen(true);
|
|
307
|
+
}
|
|
308
|
+
}, secondaryButtonProps))]
|
|
309
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
310
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Tooltip__default["default"], _objectSpread$5(_objectSpread$5({
|
|
311
|
+
disabled: !isConnectDisabled
|
|
312
|
+
}, connectTooltipProps), {}, {
|
|
313
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
314
|
+
children: (connectPath || connectUrl || onConnect) && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$5({
|
|
315
|
+
"data-cy": "connect-button",
|
|
316
|
+
disabled: isConnectDisabled,
|
|
317
|
+
href: connectUrl,
|
|
318
|
+
to: connectPath,
|
|
319
|
+
label: t("neetoIntegrations.common.connectIntegration", {
|
|
320
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
321
|
+
}),
|
|
322
|
+
onClick: onConnect
|
|
323
|
+
}, buttonProps))
|
|
324
|
+
})
|
|
325
|
+
}))
|
|
326
|
+
})]
|
|
267
327
|
})
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
target: manageUrl ? "_blank" : "_self",
|
|
278
|
-
to: managePath,
|
|
279
|
-
label: t("neetoIntegrations.common.manageIntegration", {
|
|
280
|
-
integration: integrationName || neetoCist.humanize(integration)
|
|
281
|
-
})
|
|
282
|
-
}), onDisconnect && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
283
|
-
"data-cy": "disconnect-button",
|
|
284
|
-
style: "secondary",
|
|
285
|
-
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
286
|
-
integration: integrationName || neetoCist.humanize(integration)
|
|
287
|
-
}),
|
|
288
|
-
onClick: function onClick() {
|
|
289
|
-
return setIsDisconnectAlertOpen(true);
|
|
290
|
-
}
|
|
291
|
-
})) : /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends$1({
|
|
292
|
-
disabled: !isConnectDisabled
|
|
293
|
-
}, connectTooltipProps), /*#__PURE__*/React__default["default"].createElement("span", null, (connectPath || connectUrl || onConnect) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
294
|
-
"data-cy": "connect-button",
|
|
295
|
-
disabled: isConnectDisabled,
|
|
296
|
-
href: connectUrl,
|
|
297
|
-
to: connectPath,
|
|
298
|
-
label: t("neetoIntegrations.common.connectIntegration", {
|
|
299
|
-
integration: integrationName || neetoCist.humanize(integration)
|
|
300
|
-
}),
|
|
301
|
-
onClick: onConnect
|
|
302
|
-
})))))), /*#__PURE__*/React__default["default"].createElement(DisconnectAlert__default["default"], {
|
|
303
|
-
isDisconnecting: isDisconnecting,
|
|
304
|
-
onClose: onClose,
|
|
305
|
-
onDisconnect: onDisconnect,
|
|
306
|
-
isOpen: isDisconnectAlertOpen,
|
|
307
|
-
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
308
|
-
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
309
|
-
}));
|
|
328
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisconnectAlert__default["default"], {
|
|
329
|
+
isDisconnecting: isDisconnecting,
|
|
330
|
+
onClose: onClose,
|
|
331
|
+
onDisconnect: onDisconnect,
|
|
332
|
+
isOpen: isDisconnectAlertOpen,
|
|
333
|
+
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
334
|
+
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
335
|
+
})]
|
|
336
|
+
});
|
|
310
337
|
});
|
|
311
338
|
|
|
312
339
|
var INTEGRATIONS_ENGINE_BASE_URL = "/neeto_integrations";
|
|
@@ -336,11 +363,11 @@ var QUERY_KEYS = {
|
|
|
336
363
|
ZOOM_DETAILS: "zoom-details"
|
|
337
364
|
};
|
|
338
365
|
|
|
339
|
-
function ownKeys$
|
|
340
|
-
function _objectSpread$
|
|
366
|
+
function ownKeys$4(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; }
|
|
367
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
341
368
|
var useCreateDaily = function useCreateDaily() {
|
|
342
369
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
343
|
-
return reactUtils.useMutationWithInvalidation(dailiesApi.create, _objectSpread$
|
|
370
|
+
return reactUtils.useMutationWithInvalidation(dailiesApi.create, _objectSpread$4({
|
|
344
371
|
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
|
|
345
372
|
}, options));
|
|
346
373
|
};
|
|
@@ -387,15 +414,19 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
387
414
|
}
|
|
388
415
|
|
|
389
416
|
var _excluded = ["className", "children"];
|
|
417
|
+
function ownKeys$3(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; }
|
|
418
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
390
419
|
var ExternalLink = function ExternalLink(_ref) {
|
|
391
420
|
var _ref$className = _ref.className,
|
|
392
421
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
393
422
|
_ref$children = _ref.children,
|
|
394
423
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
395
424
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
396
|
-
return /*#__PURE__*/
|
|
425
|
+
return /*#__PURE__*/jsxRuntime.jsx("a", _objectSpread$3(_objectSpread$3({
|
|
397
426
|
className: classnames__default["default"](["neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium", className])
|
|
398
|
-
}, props),
|
|
427
|
+
}, props), {}, {
|
|
428
|
+
children: children
|
|
429
|
+
}));
|
|
399
430
|
};
|
|
400
431
|
var ExternalLink$1 = /*#__PURE__*/React__default["default"].memo(ExternalLink);
|
|
401
432
|
|
|
@@ -415,6 +446,7 @@ var Form = function Form(_ref) {
|
|
|
415
446
|
breadcrumbs = _ref.breadcrumbs;
|
|
416
447
|
var _useTranslation = reactI18next.useTranslation(),
|
|
417
448
|
t = _useTranslation.t;
|
|
449
|
+
var history = reactRouterDom.useHistory();
|
|
418
450
|
var _useState = React.useState(false),
|
|
419
451
|
_useState2 = _slicedToArray(_useState, 2),
|
|
420
452
|
isDemoModalOpen = _useState2[0],
|
|
@@ -430,70 +462,78 @@ var Form = function Form(_ref) {
|
|
|
430
462
|
return createDaily(payload);
|
|
431
463
|
};
|
|
432
464
|
if (isConnecting) {
|
|
433
|
-
return /*#__PURE__*/
|
|
465
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
434
466
|
}
|
|
435
|
-
return /*#__PURE__*/
|
|
436
|
-
isHeaderFixed: true
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
467
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container__default["default"], {
|
|
468
|
+
isHeaderFixed: true,
|
|
469
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header__default["default"], {
|
|
470
|
+
breadcrumbs: breadcrumbs,
|
|
471
|
+
title: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
472
|
+
className: "flex items-center gap-2",
|
|
473
|
+
children: [t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], {
|
|
474
|
+
title: t("neetoIntegrations.daily.connect.title"),
|
|
475
|
+
description: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
476
|
+
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
477
|
+
components: {
|
|
478
|
+
externalLink: /*#__PURE__*/jsxRuntime.jsx(ExternalLink$1, {
|
|
479
|
+
"data-cy": "api-key-help-doc-link",
|
|
480
|
+
href: helpDocUrl,
|
|
481
|
+
rel: "noreferrer",
|
|
482
|
+
target: "_blank"
|
|
483
|
+
})
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
helpLinkProps: {
|
|
487
|
+
label: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
488
|
+
className: "mt-8",
|
|
489
|
+
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
490
|
+
style: "link",
|
|
491
|
+
onClick: function onClick() {
|
|
492
|
+
return setIsDemoModalOpen(true);
|
|
493
|
+
}
|
|
494
|
+
})
|
|
461
495
|
}
|
|
496
|
+
})]
|
|
497
|
+
})
|
|
498
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
499
|
+
className: "mx-auto w-full max-w-md",
|
|
500
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(FormikForm__default["default"], {
|
|
501
|
+
formikProps: {
|
|
502
|
+
initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,
|
|
503
|
+
validationSchema: DAILY_CO_VALIDATION_SCHEMA,
|
|
504
|
+
onSubmit: handleSubmit
|
|
505
|
+
},
|
|
506
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
507
|
+
className: "mt-14 w-full space-y-2",
|
|
508
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
509
|
+
className: "block min-h-20",
|
|
510
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
511
|
+
autoFocus: true,
|
|
512
|
+
required: true,
|
|
513
|
+
label: t("neetoIntegrations.daily.apiKey"),
|
|
514
|
+
name: "apiKey"
|
|
515
|
+
})
|
|
516
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ActionBlock__default["default"], {
|
|
517
|
+
cancelButtonProps: {
|
|
518
|
+
onClick: function onClick() {
|
|
519
|
+
return history.goBack();
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
isSubmitting: isConnecting,
|
|
523
|
+
submitButtonProps: {
|
|
524
|
+
label: t("neetoIntegrations.common.connect")
|
|
525
|
+
}
|
|
526
|
+
})]
|
|
462
527
|
})
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
}, function (_ref2) {
|
|
474
|
-
var dirty = _ref2.dirty;
|
|
475
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
476
|
-
className: "mt-14 w-full space-y-5"
|
|
477
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
478
|
-
className: "block min-h-20"
|
|
479
|
-
}, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
|
|
480
|
-
autoFocus: true,
|
|
481
|
-
required: true,
|
|
482
|
-
label: t("neetoIntegrations.daily.apiKey"),
|
|
483
|
-
name: "apiKey"
|
|
484
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
485
|
-
disabled: isConnecting || !dirty,
|
|
486
|
-
label: t("neetoIntegrations.common.connect"),
|
|
487
|
-
loading: isConnecting,
|
|
488
|
-
type: "submit"
|
|
489
|
-
})));
|
|
490
|
-
}), /*#__PURE__*/React__default["default"].createElement(WalkthroughModal__default["default"], {
|
|
491
|
-
videoUrl: videoUrl,
|
|
492
|
-
isOpen: isDemoModalOpen,
|
|
493
|
-
onClose: function onClose() {
|
|
494
|
-
return setIsDemoModalOpen(false);
|
|
495
|
-
}
|
|
496
|
-
})));
|
|
528
|
+
}), /*#__PURE__*/jsxRuntime.jsx(WalkthroughModal__default["default"], {
|
|
529
|
+
videoUrl: videoUrl,
|
|
530
|
+
isOpen: isDemoModalOpen,
|
|
531
|
+
onClose: function onClose() {
|
|
532
|
+
return setIsDemoModalOpen(false);
|
|
533
|
+
}
|
|
534
|
+
})]
|
|
535
|
+
})]
|
|
536
|
+
});
|
|
497
537
|
};
|
|
498
538
|
var Form$1 = reactUtils.withTitle(Form, i18next__default["default"].t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
499
539
|
|
|
@@ -527,8 +567,8 @@ var Manage = function Manage(_ref) {
|
|
|
527
567
|
var handleDisconnect = function handleDisconnect() {
|
|
528
568
|
return destroyIntegration("daily");
|
|
529
569
|
};
|
|
530
|
-
if (isFetching || isDisconnecting) return /*#__PURE__*/
|
|
531
|
-
return /*#__PURE__*/
|
|
570
|
+
if (isFetching || isDisconnecting) return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
571
|
+
return /*#__PURE__*/jsxRuntime.jsx(Manage$1, {
|
|
532
572
|
isConnected: isConnected,
|
|
533
573
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
534
574
|
isDisconnecting: isDisconnecting,
|
|
@@ -538,15 +578,23 @@ var Manage = function Manage(_ref) {
|
|
|
538
578
|
connect: true
|
|
539
579
|
}),
|
|
540
580
|
integration: "daily",
|
|
541
|
-
description: isConnected ? /*#__PURE__*/
|
|
542
|
-
components: {
|
|
543
|
-
underline: /*#__PURE__*/React__default["default"].createElement("u", {
|
|
544
|
-
className: "font-medium"
|
|
545
|
-
})
|
|
546
|
-
},
|
|
581
|
+
description: isConnected ? /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
547
582
|
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
548
583
|
values: {
|
|
549
584
|
apiKey: apiKey
|
|
585
|
+
},
|
|
586
|
+
components: {
|
|
587
|
+
wrapper: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
588
|
+
className: "neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 border px-3 py-2"
|
|
589
|
+
}),
|
|
590
|
+
span: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
591
|
+
className: "break-all text-sm"
|
|
592
|
+
}),
|
|
593
|
+
copy: /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton__default["default"], {
|
|
594
|
+
className: "flex-shrink-0 self-start",
|
|
595
|
+
style: "text",
|
|
596
|
+
value: apiKey
|
|
597
|
+
})
|
|
550
598
|
}
|
|
551
599
|
}) : description,
|
|
552
600
|
title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect.account"),
|
|
@@ -581,12 +629,12 @@ var Daily = function Daily(_ref) {
|
|
|
581
629
|
_ref2$apiKey = _ref2.apiKey,
|
|
582
630
|
apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
|
|
583
631
|
if (neetoCist.isPresent(apiKey) && !isOnboarding || !connect) {
|
|
584
|
-
return /*#__PURE__*/
|
|
632
|
+
return /*#__PURE__*/jsxRuntime.jsx(Manage, {
|
|
585
633
|
description: description,
|
|
586
634
|
onDisconnect: onDisconnect
|
|
587
635
|
});
|
|
588
636
|
}
|
|
589
|
-
return /*#__PURE__*/
|
|
637
|
+
return /*#__PURE__*/jsxRuntime.jsx(Form$1, {
|
|
590
638
|
helpDocUrl: helpDocUrl,
|
|
591
639
|
onConnect: onConnect,
|
|
592
640
|
videoUrl: videoUrl
|
|
@@ -600,42 +648,47 @@ var Stepper = function Stepper(_ref) {
|
|
|
600
648
|
var isActiveOrCompleted = function isActiveOrCompleted(activeStatus, completedStatus) {
|
|
601
649
|
return activeStatus || completedStatus;
|
|
602
650
|
};
|
|
603
|
-
return /*#__PURE__*/
|
|
604
|
-
className: "flex gap-4"
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
651
|
+
return /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
652
|
+
className: "flex gap-4",
|
|
653
|
+
children: steps === null || steps === void 0 ? void 0 : steps.map(function (_ref2) {
|
|
654
|
+
var step = _ref2.step,
|
|
655
|
+
label = _ref2.label,
|
|
656
|
+
isActive = _ref2.isActive,
|
|
657
|
+
isCompleted = _ref2.isCompleted;
|
|
658
|
+
return /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
659
|
+
className: "flex items-center gap-4",
|
|
660
|
+
children: [step !== "1" && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
661
|
+
className: classnames__default["default"]("w-10 border-b", {
|
|
662
|
+
"neeto-ui-border-gray-800": isActiveOrCompleted(isActive, isCompleted),
|
|
663
|
+
"neeto-ui-border-gray-400": !isActiveOrCompleted(isActive, isCompleted)
|
|
664
|
+
})
|
|
665
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
666
|
+
className: "flex items-center gap-2",
|
|
667
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
668
|
+
className: classnames__default["default"]("neeto-ui-rounded-full neeto-ui-gray-600 flex h-6 w-6 items-center justify-center border", {
|
|
669
|
+
"neeto-ui-bg-success-600 neeto-ui-border-success-600 neeto-ui-text-white": isActive,
|
|
670
|
+
"neeto-ui-bg-primary-600 neeto-ui-border-primary-600 neeto-ui-text-white": isCompleted,
|
|
671
|
+
"neeto-ui-border-gray-400": !isActiveOrCompleted(isActive, isCompleted)
|
|
672
|
+
}),
|
|
673
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
674
|
+
component: "span",
|
|
675
|
+
style: "body2",
|
|
676
|
+
weight: "normal",
|
|
677
|
+
children: step
|
|
678
|
+
})
|
|
679
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
680
|
+
style: "body2",
|
|
681
|
+
weight: "normal",
|
|
682
|
+
className: classnames__default["default"]({
|
|
683
|
+
"neeto-ui-text-gray-800": isActiveOrCompleted(isActive, isCompleted),
|
|
684
|
+
"neeto-ui-text-gray-600": !isActiveOrCompleted(isActive, isCompleted)
|
|
685
|
+
}),
|
|
686
|
+
children: label
|
|
687
|
+
})]
|
|
688
|
+
})]
|
|
689
|
+
}, step);
|
|
690
|
+
})
|
|
691
|
+
});
|
|
639
692
|
};
|
|
640
693
|
|
|
641
694
|
var Modal = function Modal(_ref) {
|
|
@@ -646,18 +699,23 @@ var Modal = function Modal(_ref) {
|
|
|
646
699
|
_ref$steps = _ref.steps,
|
|
647
700
|
steps = _ref$steps === void 0 ? {} : _ref$steps,
|
|
648
701
|
children = _ref.children;
|
|
649
|
-
return /*#__PURE__*/
|
|
702
|
+
return /*#__PURE__*/jsxRuntime.jsxs(NeetoUIModal__default["default"], {
|
|
650
703
|
isOpen: isOpen,
|
|
651
704
|
onClose: onClose,
|
|
652
705
|
className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-transform-none w-screen overflow-y-auto",
|
|
653
|
-
size: "fullScreen"
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
706
|
+
size: "fullScreen",
|
|
707
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NeetoUIModal__default["default"].Header, {
|
|
708
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Stepper, {
|
|
709
|
+
steps: steps
|
|
710
|
+
})
|
|
711
|
+
}), /*#__PURE__*/jsxRuntime.jsx(NeetoUIModal__default["default"].Body, {
|
|
712
|
+
className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-flex-grow",
|
|
713
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
714
|
+
className: "neeto-ui-w-full py-10",
|
|
715
|
+
children: children
|
|
716
|
+
})
|
|
717
|
+
})]
|
|
718
|
+
});
|
|
661
719
|
};
|
|
662
720
|
|
|
663
721
|
function getDefaultExportFromCjs (x) {
|
|
@@ -742,6 +800,8 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
|
|
|
742
800
|
var propTypesExports = propTypes.exports;
|
|
743
801
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
744
802
|
|
|
803
|
+
function ownKeys$2(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; }
|
|
804
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
745
805
|
var Connect = reactUtils.withT(function (_ref) {
|
|
746
806
|
var t = _ref.t,
|
|
747
807
|
Icon = _ref.Icon,
|
|
@@ -749,32 +809,61 @@ var Connect = reactUtils.withT(function (_ref) {
|
|
|
749
809
|
title = _ref$title === void 0 ? "" : _ref$title,
|
|
750
810
|
_ref$description = _ref.description,
|
|
751
811
|
description = _ref$description === void 0 ? "" : _ref$description,
|
|
812
|
+
_ref$integration = _ref.integration,
|
|
813
|
+
integration = _ref$integration === void 0 ? "" : _ref$integration,
|
|
814
|
+
_ref$integrationName = _ref.integrationName,
|
|
815
|
+
integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
|
|
816
|
+
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
817
|
+
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
752
818
|
_ref$buttonProps = _ref.buttonProps,
|
|
753
819
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
754
820
|
_ref$onConnect = _ref.onConnect,
|
|
755
821
|
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
756
822
|
children = _ref.children,
|
|
757
823
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
758
|
-
return /*#__PURE__*/
|
|
759
|
-
className: "mx-auto w-full max-w-3xl"
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
824
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
825
|
+
className: "mx-auto w-full max-w-3xl",
|
|
826
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
827
|
+
className: "mb-6 flex flex-col gap-y-2",
|
|
828
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
829
|
+
size: 48
|
|
830
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
831
|
+
className: "flex flex-col gap-y-1",
|
|
832
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
833
|
+
style: "h2",
|
|
834
|
+
children: title
|
|
835
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
836
|
+
style: "body2",
|
|
837
|
+
children: description
|
|
838
|
+
})]
|
|
839
|
+
})]
|
|
840
|
+
}), helpDocUrl && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
841
|
+
className: "mb-4",
|
|
842
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
843
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
844
|
+
components: {
|
|
845
|
+
helpLink: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
846
|
+
className: "text-xs",
|
|
847
|
+
href: helpDocUrl,
|
|
848
|
+
size: "small",
|
|
849
|
+
style: "link",
|
|
850
|
+
target: "_blank"
|
|
851
|
+
})
|
|
852
|
+
},
|
|
853
|
+
values: {
|
|
854
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
855
|
+
}
|
|
856
|
+
})
|
|
857
|
+
}), children, /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
858
|
+
className: "flex w-full items-center gap-x-3",
|
|
859
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$2({
|
|
860
|
+
label: t("neetoIntegrations.common.connect"),
|
|
861
|
+
onClick: onConnect
|
|
862
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$2({
|
|
863
|
+
style: "secondary"
|
|
864
|
+
}, secondaryButtonProps))]
|
|
865
|
+
})]
|
|
866
|
+
});
|
|
778
867
|
});
|
|
779
868
|
Connect.prototypes = {
|
|
780
869
|
/**
|
|
@@ -848,6 +937,8 @@ const SvgSuccess = props => /*#__PURE__*/React__namespace.createElement("svg", _
|
|
|
848
937
|
height: 344
|
|
849
938
|
}))));
|
|
850
939
|
|
|
940
|
+
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; }
|
|
941
|
+
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; }
|
|
851
942
|
var Finish = reactUtils.withT(function (_ref) {
|
|
852
943
|
var t = _ref.t,
|
|
853
944
|
_ref$onClick = _ref.onClick,
|
|
@@ -859,20 +950,23 @@ var Finish = reactUtils.withT(function (_ref) {
|
|
|
859
950
|
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
860
951
|
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
|
|
861
952
|
children = _ref.children;
|
|
862
|
-
return /*#__PURE__*/
|
|
863
|
-
className: "mx-auto w-full max-w-3xl"
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
953
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
954
|
+
className: "mx-auto w-full max-w-3xl",
|
|
955
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SvgSuccess, {}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
956
|
+
className: "mb-6 mt-4",
|
|
957
|
+
style: "h2",
|
|
958
|
+
weight: "semibold",
|
|
959
|
+
children: title
|
|
960
|
+
}), children, /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
961
|
+
className: "flex w-full items-center gap-x-2",
|
|
962
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$1({
|
|
963
|
+
onClick: onClick,
|
|
964
|
+
label: t("neetoIntegrations.common.continue")
|
|
965
|
+
}, buttonProps)), neetoCist.isNotEmpty(secondaryButtonProps) && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$1({
|
|
966
|
+
style: "secondary"
|
|
967
|
+
}, secondaryButtonProps))]
|
|
968
|
+
})]
|
|
969
|
+
});
|
|
876
970
|
});
|
|
877
971
|
Finish.prototypes = {
|
|
878
972
|
/**
|
|
@@ -964,41 +1058,47 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
|
964
1058
|
return stepsClone;
|
|
965
1059
|
});
|
|
966
1060
|
}, [activeTab]);
|
|
967
|
-
return /*#__PURE__*/
|
|
1061
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Modal, {
|
|
968
1062
|
steps: steps,
|
|
969
1063
|
isOpen: true,
|
|
970
|
-
onClose: handleClose
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1064
|
+
onClose: handleClose,
|
|
1065
|
+
children: [activeTab === STEPS.connect && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1066
|
+
className: "mx-auto w-full max-w-3xl",
|
|
1067
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(misc.GoogleCalendar, {
|
|
1068
|
+
size: 48
|
|
1069
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1070
|
+
className: "mb-4 mt-2",
|
|
1071
|
+
style: "h2",
|
|
1072
|
+
children: t("neetoIntegrations.google.connect.title")
|
|
1073
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1074
|
+
className: "flex w-full flex-col items-start",
|
|
1075
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Callout__default["default"], {
|
|
1076
|
+
className: "block leading-5",
|
|
1077
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
1078
|
+
components: {
|
|
1079
|
+
bold: /*#__PURE__*/jsxRuntime.jsx("strong", {})
|
|
1080
|
+
},
|
|
1081
|
+
i18nKey: "neetoIntegrations.google.connect.reminderToAcceptPermissions",
|
|
1082
|
+
values: {
|
|
1083
|
+
selectCheckbox: t("neetoIntegrations.google.connect.selectCheckbox")
|
|
1084
|
+
}
|
|
1085
|
+
})
|
|
1086
|
+
}), permissionImage && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1087
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-md my-4 overflow-hidden border",
|
|
1088
|
+
children: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
1089
|
+
src: permissionImage
|
|
1090
|
+
})
|
|
1091
|
+
})]
|
|
1092
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
1093
|
+
icon: misc.Google,
|
|
1094
|
+
label: t("neetoIntegrations.google.connect.signIn"),
|
|
1095
|
+
onClick: fetchAuthorizationUrl
|
|
1096
|
+
})]
|
|
1097
|
+
}), activeTab === STEPS.finish && /*#__PURE__*/jsxRuntime.jsx(Finish, {
|
|
1098
|
+
title: t("neetoIntegrations.google.finish.title"),
|
|
1099
|
+
onClick: handleRedirect
|
|
1100
|
+
})]
|
|
1101
|
+
});
|
|
1002
1102
|
};
|
|
1003
1103
|
|
|
1004
1104
|
module.exports = GoogleCalendar;
|