@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.
@@ -3,7 +3,9 @@ import React__default, { useState, useEffect } from 'react';
3
3
  import { humanize, noop, isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
4
4
  import { buildUrl, getQueryParams } from '@bigbinary/neeto-commons-frontend/utils';
5
5
  import { Daily as Daily$1, GoogleCalendar as GoogleCalendar$1, Google } from '@bigbinary/neeto-icons/misc';
6
- import { Typography, Button, Tooltip, Modal as Modal$1, Callout } from '@bigbinary/neetoui';
6
+ import Typography from '@bigbinary/neetoui/Typography';
7
+ import Callout from '@bigbinary/neetoui/Callout';
8
+ import Button from '@bigbinary/neetoui/Button';
7
9
  import { Trans, useTranslation } from 'react-i18next';
8
10
  import '@bigbinary/neeto-molecules/IntegrationCard';
9
11
  import DisconnectAlert from '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
@@ -11,6 +13,7 @@ import WalkthroughModal from '@bigbinary/neeto-molecules/IntegrationWalkthroughM
11
13
  import classnames from 'classnames';
12
14
  import { withT, useMutationWithInvalidation, withTitle, useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
13
15
  import { Check } from '@bigbinary/neeto-icons';
16
+ import Tooltip from '@bigbinary/neetoui/Tooltip';
14
17
  import i18next, { t as t$1 } from 'i18next';
15
18
  import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
16
19
  import { useQuery } from 'react-query';
@@ -19,9 +22,16 @@ import Container from '@bigbinary/neeto-molecules/Container';
19
22
  import Header from '@bigbinary/neeto-molecules/Header';
20
23
  import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
21
24
  import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
22
- import { Form as Form$2, Input } from '@bigbinary/neetoui/formik';
25
+ import Input from '@bigbinary/neetoui/formik/Input';
26
+ import FormikForm from '@bigbinary/neetoui/formik/Form';
27
+ import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
28
+ import { useHistory } from 'react-router-dom';
29
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
23
30
  import 'ramda';
31
+ import '@bigbinary/neetoui/formik/Select';
24
32
  import * as yup from 'yup';
33
+ import NeetoUIModal from '@bigbinary/neetoui/Modal';
34
+ import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
25
35
 
26
36
  function _typeof(o) {
27
37
  "@babel/helpers - typeof";
@@ -135,21 +145,8 @@ function _slicedToArray(arr, i) {
135
145
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
136
146
  }
137
147
 
138
- function _extends$1() {
139
- _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
140
- for (var i = 1; i < arguments.length; i++) {
141
- var source = arguments[i];
142
- for (var key in source) {
143
- if (Object.prototype.hasOwnProperty.call(source, key)) {
144
- target[key] = source[key];
145
- }
146
- }
147
- }
148
- return target;
149
- };
150
- return _extends$1.apply(this, arguments);
151
- }
152
-
148
+ 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; }
149
+ 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; }
153
150
  var Manage$1 = withT(function (_ref) {
154
151
  var t = _ref.t,
155
152
  _ref$title = _ref.title,
@@ -193,86 +190,107 @@ var Manage$1 = withT(function (_ref) {
193
190
  _ref$isConnectDisable = _ref.isConnectDisabled,
194
191
  isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
195
192
  _ref$connectTooltipPr = _ref.connectTooltipProps,
196
- connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr;
197
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
198
- className: "mx-auto w-full max-w-3xl"
199
- }, /*#__PURE__*/React__default.createElement("div", {
200
- className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6"
201
- }, Icon && /*#__PURE__*/React__default.createElement(Icon, {
202
- className: "neeto-ui-text-gray-600",
203
- size: 48
204
- }), /*#__PURE__*/React__default.createElement("div", {
205
- className: "space-y-2"
206
- }, /*#__PURE__*/React__default.createElement("div", {
207
- className: "flex items-center space-x-4"
208
- }, /*#__PURE__*/React__default.createElement(Typography, {
209
- className: "neeto-ui-text-gray-800 mb-0.5",
210
- style: "h2",
211
- weight: "semibold"
212
- }, title), isConnected && /*#__PURE__*/React__default.createElement("div", {
213
- className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1"
214
- }, /*#__PURE__*/React__default.createElement(Check, {
215
- size: 24
216
- }))), /*#__PURE__*/React__default.createElement(Typography, {
217
- style: "body1",
218
- weight: "normal",
219
- className: classnames("neeto-ui-text-gray-800", {
220
- "break-all": isConnected
221
- })
222
- }, description), helpDocUrl && /*#__PURE__*/React__default.createElement(Typography, {
223
- className: "neeto-ui-text-gray-800",
224
- style: "body2",
225
- weight: "normal"
226
- }, /*#__PURE__*/React__default.createElement(Trans, {
227
- i18nKey: "neetoIntegrations.common.helpDocUrl",
228
- components: {
229
- helpLink: /*#__PURE__*/React__default.createElement(Button, {
230
- href: helpDocUrl,
231
- style: "link",
232
- target: "_blank"
193
+ connectTooltipProps = _ref$connectTooltipPr === void 0 ? null : _ref$connectTooltipPr,
194
+ _ref$buttonProps = _ref.buttonProps,
195
+ buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
196
+ _ref$secondaryButtonP = _ref.secondaryButtonProps,
197
+ secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP;
198
+ return /*#__PURE__*/jsxs(Fragment, {
199
+ children: [/*#__PURE__*/jsx("div", {
200
+ className: "mx-auto w-full max-w-3xl",
201
+ children: /*#__PURE__*/jsxs("div", {
202
+ className: "neeto-ui-border-gray-300 neeto-ui-rounded-xl mt-10 w-full space-y-4 border p-6",
203
+ children: [Icon && /*#__PURE__*/jsx(Icon, {
204
+ className: "neeto-ui-text-gray-600",
205
+ size: 48
206
+ }), /*#__PURE__*/jsxs("div", {
207
+ className: "space-y-2",
208
+ children: [/*#__PURE__*/jsxs("div", {
209
+ className: "flex items-center space-x-4",
210
+ children: [/*#__PURE__*/jsx(Typography, {
211
+ className: "neeto-ui-text-gray-800 mb-0.5",
212
+ style: "h2",
213
+ weight: "semibold",
214
+ children: title
215
+ }), isConnected && /*#__PURE__*/jsx("div", {
216
+ className: "neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1",
217
+ children: /*#__PURE__*/jsx(Check, {
218
+ size: 24
219
+ })
220
+ })]
221
+ }), /*#__PURE__*/jsx(Typography, {
222
+ style: "body1",
223
+ weight: "normal",
224
+ className: classnames("neeto-ui-text-gray-800", {
225
+ "break-all": isConnected
226
+ }),
227
+ children: description
228
+ }), helpDocUrl && /*#__PURE__*/jsx(Typography, {
229
+ className: "neeto-ui-text-gray-800",
230
+ style: "body2",
231
+ weight: "normal",
232
+ children: /*#__PURE__*/jsx(Trans, {
233
+ i18nKey: "neetoIntegrations.common.helpDocUrl",
234
+ components: {
235
+ helpLink: /*#__PURE__*/jsx(Button, {
236
+ href: helpDocUrl,
237
+ style: "link",
238
+ target: "_blank"
239
+ })
240
+ },
241
+ values: {
242
+ integration: integrationName || humanize(integration)
243
+ }
244
+ })
245
+ })]
246
+ }), isConnected ? /*#__PURE__*/jsxs("div", {
247
+ className: "space-x-2",
248
+ children: [(managePath || manageUrl) && /*#__PURE__*/jsx(Button, _objectSpread$5({
249
+ "data-cy": "manage-button",
250
+ href: manageUrl,
251
+ target: manageUrl ? "_blank" : "_self",
252
+ to: managePath,
253
+ label: t("neetoIntegrations.common.manageIntegration", {
254
+ integration: integrationName || humanize(integration)
255
+ })
256
+ }, buttonProps)), onDisconnect && /*#__PURE__*/jsx(Button, _objectSpread$5({
257
+ "data-cy": "disconnect-button",
258
+ style: "secondary",
259
+ label: t("neetoIntegrations.common.disconnectIntegration", {
260
+ integration: integrationName || humanize(integration)
261
+ }),
262
+ onClick: function onClick() {
263
+ return setIsDisconnectAlertOpen(true);
264
+ }
265
+ }, secondaryButtonProps))]
266
+ }) : /*#__PURE__*/jsx("div", {
267
+ children: /*#__PURE__*/jsx(Tooltip, _objectSpread$5(_objectSpread$5({
268
+ disabled: !isConnectDisabled
269
+ }, connectTooltipProps), {}, {
270
+ children: /*#__PURE__*/jsx("span", {
271
+ children: (connectPath || connectUrl || onConnect) && /*#__PURE__*/jsx(Button, _objectSpread$5({
272
+ "data-cy": "connect-button",
273
+ disabled: isConnectDisabled,
274
+ href: connectUrl,
275
+ to: connectPath,
276
+ label: t("neetoIntegrations.common.connectIntegration", {
277
+ integration: integrationName || humanize(integration)
278
+ }),
279
+ onClick: onConnect
280
+ }, buttonProps))
281
+ })
282
+ }))
283
+ })]
233
284
  })
234
- },
235
- values: {
236
- integration: integrationName || humanize(integration)
237
- }
238
- }))), isConnected ? /*#__PURE__*/React__default.createElement("div", {
239
- className: "space-x-2"
240
- }, (managePath || manageUrl) && /*#__PURE__*/React__default.createElement(Button, {
241
- "data-cy": "manage-button",
242
- href: manageUrl,
243
- target: manageUrl ? "_blank" : "_self",
244
- to: managePath,
245
- label: t("neetoIntegrations.common.manageIntegration", {
246
- integration: integrationName || humanize(integration)
247
- })
248
- }), onDisconnect && /*#__PURE__*/React__default.createElement(Button, {
249
- "data-cy": "disconnect-button",
250
- style: "secondary",
251
- label: t("neetoIntegrations.common.disconnectIntegration", {
252
- integration: integrationName || humanize(integration)
253
- }),
254
- onClick: function onClick() {
255
- return setIsDisconnectAlertOpen(true);
256
- }
257
- })) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Tooltip, _extends$1({
258
- disabled: !isConnectDisabled
259
- }, connectTooltipProps), /*#__PURE__*/React__default.createElement("span", null, (connectPath || connectUrl || onConnect) && /*#__PURE__*/React__default.createElement(Button, {
260
- "data-cy": "connect-button",
261
- disabled: isConnectDisabled,
262
- href: connectUrl,
263
- to: connectPath,
264
- label: t("neetoIntegrations.common.connectIntegration", {
265
- integration: integrationName || humanize(integration)
266
- }),
267
- onClick: onConnect
268
- })))))), /*#__PURE__*/React__default.createElement(DisconnectAlert, {
269
- isDisconnecting: isDisconnecting,
270
- onClose: onClose,
271
- onDisconnect: onDisconnect,
272
- isOpen: isDisconnectAlertOpen,
273
- message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
274
- title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
275
- }));
285
+ }), /*#__PURE__*/jsx(DisconnectAlert, {
286
+ isDisconnecting: isDisconnecting,
287
+ onClose: onClose,
288
+ onDisconnect: onDisconnect,
289
+ isOpen: isDisconnectAlertOpen,
290
+ message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
291
+ title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
292
+ })]
293
+ });
276
294
  });
277
295
 
278
296
  var INTEGRATIONS_ENGINE_BASE_URL = "/neeto_integrations";
@@ -302,11 +320,11 @@ var QUERY_KEYS = {
302
320
  ZOOM_DETAILS: "zoom-details"
303
321
  };
304
322
 
305
- 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; }
306
- 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; }
323
+ 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; }
324
+ 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; }
307
325
  var useCreateDaily = function useCreateDaily() {
308
326
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
309
- return useMutationWithInvalidation(dailiesApi.create, _objectSpread$1({
327
+ return useMutationWithInvalidation(dailiesApi.create, _objectSpread$4({
310
328
  keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
311
329
  }, options));
312
330
  };
@@ -353,15 +371,19 @@ function _objectWithoutProperties(source, excluded) {
353
371
  }
354
372
 
355
373
  var _excluded = ["className", "children"];
374
+ 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; }
375
+ 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; }
356
376
  var ExternalLink = function ExternalLink(_ref) {
357
377
  var _ref$className = _ref.className,
358
378
  className = _ref$className === void 0 ? "" : _ref$className,
359
379
  _ref$children = _ref.children,
360
380
  children = _ref$children === void 0 ? null : _ref$children,
361
381
  props = _objectWithoutProperties(_ref, _excluded);
362
- return /*#__PURE__*/React__default.createElement("a", _extends$1({
382
+ return /*#__PURE__*/jsx("a", _objectSpread$3(_objectSpread$3({
363
383
  className: classnames(["neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium", className])
364
- }, props), children);
384
+ }, props), {}, {
385
+ children: children
386
+ }));
365
387
  };
366
388
  var ExternalLink$1 = /*#__PURE__*/React__default.memo(ExternalLink);
367
389
 
@@ -381,6 +403,7 @@ var Form = function Form(_ref) {
381
403
  breadcrumbs = _ref.breadcrumbs;
382
404
  var _useTranslation = useTranslation(),
383
405
  t = _useTranslation.t;
406
+ var history = useHistory();
384
407
  var _useState = useState(false),
385
408
  _useState2 = _slicedToArray(_useState, 2),
386
409
  isDemoModalOpen = _useState2[0],
@@ -396,70 +419,78 @@ var Form = function Form(_ref) {
396
419
  return createDaily(payload);
397
420
  };
398
421
  if (isConnecting) {
399
- return /*#__PURE__*/React__default.createElement(PageLoader, null);
422
+ return /*#__PURE__*/jsx(PageLoader, {});
400
423
  }
401
- return /*#__PURE__*/React__default.createElement(Container, {
402
- isHeaderFixed: true
403
- }, /*#__PURE__*/React__default.createElement(Header, {
404
- breadcrumbs: breadcrumbs,
405
- title: /*#__PURE__*/React__default.createElement("span", {
406
- className: "flex items-center gap-2"
407
- }, t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/React__default.createElement(HelpPopover, {
408
- title: t("neetoIntegrations.daily.connect.title"),
409
- description: /*#__PURE__*/React__default.createElement(Trans, {
410
- i18nKey: "neetoIntegrations.daily.helpDoc",
411
- components: {
412
- externalLink: /*#__PURE__*/React__default.createElement(ExternalLink$1, {
413
- "data-cy": "api-key-help-doc-link",
414
- href: helpDocUrl,
415
- rel: "noreferrer",
416
- target: "_blank"
417
- })
418
- }
419
- }),
420
- helpLinkProps: {
421
- label: /*#__PURE__*/React__default.createElement(Button, {
422
- className: "mt-8",
423
- label: t("neetoIntegrations.daily.walkthroughText"),
424
- style: "link",
425
- onClick: function onClick() {
426
- return setIsDemoModalOpen(true);
424
+ return /*#__PURE__*/jsxs(Container, {
425
+ isHeaderFixed: true,
426
+ children: [/*#__PURE__*/jsx(Header, {
427
+ breadcrumbs: breadcrumbs,
428
+ title: /*#__PURE__*/jsxs("span", {
429
+ className: "flex items-center gap-2",
430
+ children: [t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/jsx(HelpPopover, {
431
+ title: t("neetoIntegrations.daily.connect.title"),
432
+ description: /*#__PURE__*/jsx(Trans, {
433
+ i18nKey: "neetoIntegrations.daily.helpDoc",
434
+ components: {
435
+ externalLink: /*#__PURE__*/jsx(ExternalLink$1, {
436
+ "data-cy": "api-key-help-doc-link",
437
+ href: helpDocUrl,
438
+ rel: "noreferrer",
439
+ target: "_blank"
440
+ })
441
+ }
442
+ }),
443
+ helpLinkProps: {
444
+ label: /*#__PURE__*/jsx(Button, {
445
+ className: "mt-8",
446
+ label: t("neetoIntegrations.daily.walkthroughText"),
447
+ style: "link",
448
+ onClick: function onClick() {
449
+ return setIsDemoModalOpen(true);
450
+ }
451
+ })
427
452
  }
453
+ })]
454
+ })
455
+ }), /*#__PURE__*/jsxs("div", {
456
+ className: "mx-auto w-full max-w-md",
457
+ children: [/*#__PURE__*/jsx(FormikForm, {
458
+ formikProps: {
459
+ initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,
460
+ validationSchema: DAILY_CO_VALIDATION_SCHEMA,
461
+ onSubmit: handleSubmit
462
+ },
463
+ children: /*#__PURE__*/jsxs("div", {
464
+ className: "mt-14 w-full space-y-2",
465
+ children: [/*#__PURE__*/jsx("div", {
466
+ className: "block min-h-20",
467
+ children: /*#__PURE__*/jsx(Input, {
468
+ autoFocus: true,
469
+ required: true,
470
+ label: t("neetoIntegrations.daily.apiKey"),
471
+ name: "apiKey"
472
+ })
473
+ }), /*#__PURE__*/jsx(ActionBlock, {
474
+ cancelButtonProps: {
475
+ onClick: function onClick() {
476
+ return history.goBack();
477
+ }
478
+ },
479
+ isSubmitting: isConnecting,
480
+ submitButtonProps: {
481
+ label: t("neetoIntegrations.common.connect")
482
+ }
483
+ })]
428
484
  })
429
- }
430
- }))
431
- }), /*#__PURE__*/React__default.createElement("div", {
432
- className: "mx-auto w-full max-w-md"
433
- }, /*#__PURE__*/React__default.createElement(Form$2, {
434
- formikProps: {
435
- initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,
436
- validationSchema: DAILY_CO_VALIDATION_SCHEMA,
437
- onSubmit: handleSubmit
438
- }
439
- }, function (_ref2) {
440
- var dirty = _ref2.dirty;
441
- return /*#__PURE__*/React__default.createElement("div", {
442
- className: "mt-14 w-full space-y-5"
443
- }, /*#__PURE__*/React__default.createElement("div", {
444
- className: "block min-h-20"
445
- }, /*#__PURE__*/React__default.createElement(Input, {
446
- autoFocus: true,
447
- required: true,
448
- label: t("neetoIntegrations.daily.apiKey"),
449
- name: "apiKey"
450
- })), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
451
- disabled: isConnecting || !dirty,
452
- label: t("neetoIntegrations.common.connect"),
453
- loading: isConnecting,
454
- type: "submit"
455
- })));
456
- }), /*#__PURE__*/React__default.createElement(WalkthroughModal, {
457
- videoUrl: videoUrl,
458
- isOpen: isDemoModalOpen,
459
- onClose: function onClose() {
460
- return setIsDemoModalOpen(false);
461
- }
462
- })));
485
+ }), /*#__PURE__*/jsx(WalkthroughModal, {
486
+ videoUrl: videoUrl,
487
+ isOpen: isDemoModalOpen,
488
+ onClose: function onClose() {
489
+ return setIsDemoModalOpen(false);
490
+ }
491
+ })]
492
+ })]
493
+ });
463
494
  };
464
495
  var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
465
496
 
@@ -493,8 +524,8 @@ var Manage = function Manage(_ref) {
493
524
  var handleDisconnect = function handleDisconnect() {
494
525
  return destroyIntegration("daily");
495
526
  };
496
- if (isFetching || isDisconnecting) return /*#__PURE__*/React__default.createElement(PageLoader, null);
497
- return /*#__PURE__*/React__default.createElement(Manage$1, {
527
+ if (isFetching || isDisconnecting) return /*#__PURE__*/jsx(PageLoader, {});
528
+ return /*#__PURE__*/jsx(Manage$1, {
498
529
  isConnected: isConnected,
499
530
  isDisconnectAlertOpen: isDisconnectAlertOpen,
500
531
  isDisconnecting: isDisconnecting,
@@ -504,15 +535,23 @@ var Manage = function Manage(_ref) {
504
535
  connect: true
505
536
  }),
506
537
  integration: "daily",
507
- description: isConnected ? /*#__PURE__*/React__default.createElement(Trans, {
508
- components: {
509
- underline: /*#__PURE__*/React__default.createElement("u", {
510
- className: "font-medium"
511
- })
512
- },
538
+ description: isConnected ? /*#__PURE__*/jsx(Trans, {
513
539
  i18nKey: "neetoIntegrations.daily.yourApiKey",
514
540
  values: {
515
541
  apiKey: apiKey
542
+ },
543
+ components: {
544
+ wrapper: /*#__PURE__*/jsx("div", {
545
+ className: "neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 border px-3 py-2"
546
+ }),
547
+ span: /*#__PURE__*/jsx("span", {
548
+ className: "break-all text-sm"
549
+ }),
550
+ copy: /*#__PURE__*/jsx(CopyToClipboardButton, {
551
+ className: "flex-shrink-0 self-start",
552
+ style: "text",
553
+ value: apiKey
554
+ })
516
555
  }
517
556
  }) : description,
518
557
  title: isConnected ? t("neetoIntegrations.daily.connected") : t("neetoIntegrations.daily.connect.account"),
@@ -547,12 +586,12 @@ var Daily = function Daily(_ref) {
547
586
  _ref2$apiKey = _ref2.apiKey,
548
587
  apiKey = _ref2$apiKey === void 0 ? null : _ref2$apiKey;
549
588
  if (isPresent(apiKey) && !isOnboarding || !connect) {
550
- return /*#__PURE__*/React__default.createElement(Manage, {
589
+ return /*#__PURE__*/jsx(Manage, {
551
590
  description: description,
552
591
  onDisconnect: onDisconnect
553
592
  });
554
593
  }
555
- return /*#__PURE__*/React__default.createElement(Form$1, {
594
+ return /*#__PURE__*/jsx(Form$1, {
556
595
  helpDocUrl: helpDocUrl,
557
596
  onConnect: onConnect,
558
597
  videoUrl: videoUrl
@@ -566,42 +605,47 @@ var Stepper = function Stepper(_ref) {
566
605
  var isActiveOrCompleted = function isActiveOrCompleted(activeStatus, completedStatus) {
567
606
  return activeStatus || completedStatus;
568
607
  };
569
- return /*#__PURE__*/React__default.createElement("ul", {
570
- className: "flex gap-4"
571
- }, steps === null || steps === void 0 ? void 0 : steps.map(function (_ref2) {
572
- var step = _ref2.step,
573
- label = _ref2.label,
574
- isActive = _ref2.isActive,
575
- isCompleted = _ref2.isCompleted;
576
- return /*#__PURE__*/React__default.createElement("li", {
577
- className: "flex items-center gap-4",
578
- key: step
579
- }, step !== "1" && /*#__PURE__*/React__default.createElement("div", {
580
- className: classnames("w-10 border-b", {
581
- "neeto-ui-border-gray-800": isActiveOrCompleted(isActive, isCompleted),
582
- "neeto-ui-border-gray-400": !isActiveOrCompleted(isActive, isCompleted)
583
- })
584
- }), /*#__PURE__*/React__default.createElement("div", {
585
- className: "flex items-center gap-2"
586
- }, /*#__PURE__*/React__default.createElement("div", {
587
- className: classnames("neeto-ui-rounded-full neeto-ui-gray-600 flex h-6 w-6 items-center justify-center border", {
588
- "neeto-ui-bg-success-600 neeto-ui-border-success-600 neeto-ui-text-white": isActive,
589
- "neeto-ui-bg-primary-600 neeto-ui-border-primary-600 neeto-ui-text-white": isCompleted,
590
- "neeto-ui-border-gray-400": !isActiveOrCompleted(isActive, isCompleted)
591
- })
592
- }, /*#__PURE__*/React__default.createElement(Typography, {
593
- component: "span",
594
- style: "body2",
595
- weight: "normal"
596
- }, step)), /*#__PURE__*/React__default.createElement(Typography, {
597
- style: "body2",
598
- weight: "normal",
599
- className: classnames({
600
- "neeto-ui-text-gray-800": isActiveOrCompleted(isActive, isCompleted),
601
- "neeto-ui-text-gray-600": !isActiveOrCompleted(isActive, isCompleted)
602
- })
603
- }, label)));
604
- }));
608
+ return /*#__PURE__*/jsx("ul", {
609
+ className: "flex gap-4",
610
+ children: steps === null || steps === void 0 ? void 0 : steps.map(function (_ref2) {
611
+ var step = _ref2.step,
612
+ label = _ref2.label,
613
+ isActive = _ref2.isActive,
614
+ isCompleted = _ref2.isCompleted;
615
+ return /*#__PURE__*/jsxs("li", {
616
+ className: "flex items-center gap-4",
617
+ children: [step !== "1" && /*#__PURE__*/jsx("div", {
618
+ className: classnames("w-10 border-b", {
619
+ "neeto-ui-border-gray-800": isActiveOrCompleted(isActive, isCompleted),
620
+ "neeto-ui-border-gray-400": !isActiveOrCompleted(isActive, isCompleted)
621
+ })
622
+ }), /*#__PURE__*/jsxs("div", {
623
+ className: "flex items-center gap-2",
624
+ children: [/*#__PURE__*/jsx("div", {
625
+ className: classnames("neeto-ui-rounded-full neeto-ui-gray-600 flex h-6 w-6 items-center justify-center border", {
626
+ "neeto-ui-bg-success-600 neeto-ui-border-success-600 neeto-ui-text-white": isActive,
627
+ "neeto-ui-bg-primary-600 neeto-ui-border-primary-600 neeto-ui-text-white": isCompleted,
628
+ "neeto-ui-border-gray-400": !isActiveOrCompleted(isActive, isCompleted)
629
+ }),
630
+ children: /*#__PURE__*/jsx(Typography, {
631
+ component: "span",
632
+ style: "body2",
633
+ weight: "normal",
634
+ children: step
635
+ })
636
+ }), /*#__PURE__*/jsx(Typography, {
637
+ style: "body2",
638
+ weight: "normal",
639
+ className: classnames({
640
+ "neeto-ui-text-gray-800": isActiveOrCompleted(isActive, isCompleted),
641
+ "neeto-ui-text-gray-600": !isActiveOrCompleted(isActive, isCompleted)
642
+ }),
643
+ children: label
644
+ })]
645
+ })]
646
+ }, step);
647
+ })
648
+ });
605
649
  };
606
650
 
607
651
  var Modal = function Modal(_ref) {
@@ -612,18 +656,23 @@ var Modal = function Modal(_ref) {
612
656
  _ref$steps = _ref.steps,
613
657
  steps = _ref$steps === void 0 ? {} : _ref$steps,
614
658
  children = _ref.children;
615
- return /*#__PURE__*/React__default.createElement(Modal$1, {
659
+ return /*#__PURE__*/jsxs(NeetoUIModal, {
616
660
  isOpen: isOpen,
617
661
  onClose: onClose,
618
662
  className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-transform-none w-screen overflow-y-auto",
619
- size: "fullScreen"
620
- }, /*#__PURE__*/React__default.createElement(Modal$1.Header, null, /*#__PURE__*/React__default.createElement(Stepper, {
621
- steps: steps
622
- })), /*#__PURE__*/React__default.createElement(Modal$1.Body, {
623
- className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-flex-grow"
624
- }, /*#__PURE__*/React__default.createElement("div", {
625
- className: "neeto-ui-w-full py-10"
626
- }, children)));
663
+ size: "fullScreen",
664
+ children: [/*#__PURE__*/jsx(NeetoUIModal.Header, {
665
+ children: /*#__PURE__*/jsx(Stepper, {
666
+ steps: steps
667
+ })
668
+ }), /*#__PURE__*/jsx(NeetoUIModal.Body, {
669
+ className: "neeto-ui-flex neeto-ui-justify-center neeto-ui-flex-grow",
670
+ children: /*#__PURE__*/jsx("div", {
671
+ className: "neeto-ui-w-full py-10",
672
+ children: children
673
+ })
674
+ })]
675
+ });
627
676
  };
628
677
 
629
678
  function getDefaultExportFromCjs (x) {
@@ -708,6 +757,8 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
708
757
  var propTypesExports = propTypes.exports;
709
758
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
710
759
 
760
+ 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; }
761
+ 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; }
711
762
  var Connect = withT(function (_ref) {
712
763
  var t = _ref.t,
713
764
  Icon = _ref.Icon,
@@ -715,32 +766,61 @@ var Connect = withT(function (_ref) {
715
766
  title = _ref$title === void 0 ? "" : _ref$title,
716
767
  _ref$description = _ref.description,
717
768
  description = _ref$description === void 0 ? "" : _ref$description,
769
+ _ref$integration = _ref.integration,
770
+ integration = _ref$integration === void 0 ? "" : _ref$integration,
771
+ _ref$integrationName = _ref.integrationName,
772
+ integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
773
+ _ref$helpDocUrl = _ref.helpDocUrl,
774
+ helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
718
775
  _ref$buttonProps = _ref.buttonProps,
719
776
  buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
720
777
  _ref$onConnect = _ref.onConnect,
721
778
  onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
722
779
  children = _ref.children,
723
780
  secondaryButtonProps = _ref.secondaryButtonProps;
724
- return /*#__PURE__*/React__default.createElement("div", {
725
- className: "mx-auto w-full max-w-3xl"
726
- }, /*#__PURE__*/React__default.createElement("div", {
727
- className: "mb-6 flex flex-col gap-y-2"
728
- }, /*#__PURE__*/React__default.createElement(Icon, {
729
- size: 48
730
- }), /*#__PURE__*/React__default.createElement("div", {
731
- className: "flex flex-col gap-y-1"
732
- }, /*#__PURE__*/React__default.createElement(Typography, {
733
- style: "h2"
734
- }, title), /*#__PURE__*/React__default.createElement(Typography, {
735
- style: "body2"
736
- }, description))), children, /*#__PURE__*/React__default.createElement("div", {
737
- className: "flex w-full items-center gap-x-3"
738
- }, /*#__PURE__*/React__default.createElement(Button, _extends$1({
739
- label: t("neetoIntegrations.common.connect"),
740
- onClick: onConnect
741
- }, buttonProps)), secondaryButtonProps && /*#__PURE__*/React__default.createElement(Button, _extends$1({
742
- style: "secondary"
743
- }, secondaryButtonProps))));
781
+ return /*#__PURE__*/jsxs("div", {
782
+ className: "mx-auto w-full max-w-3xl",
783
+ children: [/*#__PURE__*/jsxs("div", {
784
+ className: "mb-6 flex flex-col gap-y-2",
785
+ children: [/*#__PURE__*/jsx(Icon, {
786
+ size: 48
787
+ }), /*#__PURE__*/jsxs("div", {
788
+ className: "flex flex-col gap-y-1",
789
+ children: [/*#__PURE__*/jsx(Typography, {
790
+ style: "h2",
791
+ children: title
792
+ }), /*#__PURE__*/jsx(Typography, {
793
+ style: "body2",
794
+ children: description
795
+ })]
796
+ })]
797
+ }), helpDocUrl && /*#__PURE__*/jsx("div", {
798
+ className: "mb-4",
799
+ children: /*#__PURE__*/jsx(Trans, {
800
+ i18nKey: "neetoIntegrations.common.helpDocUrl",
801
+ components: {
802
+ helpLink: /*#__PURE__*/jsx(Button, {
803
+ className: "text-xs",
804
+ href: helpDocUrl,
805
+ size: "small",
806
+ style: "link",
807
+ target: "_blank"
808
+ })
809
+ },
810
+ values: {
811
+ integration: integrationName || humanize(integration)
812
+ }
813
+ })
814
+ }), children, /*#__PURE__*/jsxs("div", {
815
+ className: "flex w-full items-center gap-x-3",
816
+ children: [/*#__PURE__*/jsx(Button, _objectSpread$2({
817
+ label: t("neetoIntegrations.common.connect"),
818
+ onClick: onConnect
819
+ }, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsx(Button, _objectSpread$2({
820
+ style: "secondary"
821
+ }, secondaryButtonProps))]
822
+ })]
823
+ });
744
824
  });
745
825
  Connect.prototypes = {
746
826
  /**
@@ -814,6 +894,8 @@ const SvgSuccess = props => /*#__PURE__*/React.createElement("svg", _extends({
814
894
  height: 344
815
895
  }))));
816
896
 
897
+ 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; }
898
+ 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; }
817
899
  var Finish = withT(function (_ref) {
818
900
  var t = _ref.t,
819
901
  _ref$onClick = _ref.onClick,
@@ -825,20 +907,23 @@ var Finish = withT(function (_ref) {
825
907
  _ref$secondaryButtonP = _ref.secondaryButtonProps,
826
908
  secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
827
909
  children = _ref.children;
828
- return /*#__PURE__*/React__default.createElement("div", {
829
- className: "mx-auto w-full max-w-3xl"
830
- }, /*#__PURE__*/React__default.createElement(SvgSuccess, null), /*#__PURE__*/React__default.createElement(Typography, {
831
- className: "mb-6 mt-4",
832
- style: "h2",
833
- weight: "semibold"
834
- }, title), children, /*#__PURE__*/React__default.createElement("div", {
835
- className: "flex w-full items-center gap-x-2"
836
- }, /*#__PURE__*/React__default.createElement(Button, _extends$1({
837
- onClick: onClick,
838
- label: t("neetoIntegrations.common.continue")
839
- }, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/React__default.createElement(Button, _extends$1({
840
- style: "secondary"
841
- }, secondaryButtonProps))));
910
+ return /*#__PURE__*/jsxs("div", {
911
+ className: "mx-auto w-full max-w-3xl",
912
+ children: [/*#__PURE__*/jsx(SvgSuccess, {}), /*#__PURE__*/jsx(Typography, {
913
+ className: "mb-6 mt-4",
914
+ style: "h2",
915
+ weight: "semibold",
916
+ children: title
917
+ }), children, /*#__PURE__*/jsxs("div", {
918
+ className: "flex w-full items-center gap-x-2",
919
+ children: [/*#__PURE__*/jsx(Button, _objectSpread$1({
920
+ onClick: onClick,
921
+ label: t("neetoIntegrations.common.continue")
922
+ }, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/jsx(Button, _objectSpread$1({
923
+ style: "secondary"
924
+ }, secondaryButtonProps))]
925
+ })]
926
+ });
842
927
  });
843
928
  Finish.prototypes = {
844
929
  /**
@@ -930,41 +1015,47 @@ var GoogleCalendar = function GoogleCalendar(_ref) {
930
1015
  return stepsClone;
931
1016
  });
932
1017
  }, [activeTab]);
933
- return /*#__PURE__*/React__default.createElement(Modal, {
1018
+ return /*#__PURE__*/jsxs(Modal, {
934
1019
  steps: steps,
935
1020
  isOpen: true,
936
- onClose: handleClose
937
- }, activeTab === STEPS.connect && /*#__PURE__*/React__default.createElement("div", {
938
- className: "mx-auto w-full max-w-3xl"
939
- }, /*#__PURE__*/React__default.createElement(GoogleCalendar$1, {
940
- size: 48
941
- }), /*#__PURE__*/React__default.createElement(Typography, {
942
- className: "mb-4 mt-2",
943
- style: "h2"
944
- }, t("neetoIntegrations.google.connect.title")), /*#__PURE__*/React__default.createElement("div", {
945
- className: "flex w-full flex-col items-start"
946
- }, /*#__PURE__*/React__default.createElement(Callout, {
947
- className: "block leading-5"
948
- }, /*#__PURE__*/React__default.createElement(Trans, {
949
- components: {
950
- bold: /*#__PURE__*/React__default.createElement("strong", null)
951
- },
952
- i18nKey: "neetoIntegrations.google.connect.reminderToAcceptPermissions",
953
- values: {
954
- selectCheckbox: t("neetoIntegrations.google.connect.selectCheckbox")
955
- }
956
- })), permissionImage && /*#__PURE__*/React__default.createElement("div", {
957
- className: "neeto-ui-border-gray-300 neeto-ui-rounded-md my-4 overflow-hidden border"
958
- }, /*#__PURE__*/React__default.createElement("img", {
959
- src: permissionImage
960
- }))), /*#__PURE__*/React__default.createElement(Button, {
961
- icon: Google,
962
- label: t("neetoIntegrations.google.connect.signIn"),
963
- onClick: fetchAuthorizationUrl
964
- })), activeTab === STEPS.finish && /*#__PURE__*/React__default.createElement(Finish, {
965
- title: t("neetoIntegrations.google.finish.title"),
966
- onClick: handleRedirect
967
- }));
1021
+ onClose: handleClose,
1022
+ children: [activeTab === STEPS.connect && /*#__PURE__*/jsxs("div", {
1023
+ className: "mx-auto w-full max-w-3xl",
1024
+ children: [/*#__PURE__*/jsx(GoogleCalendar$1, {
1025
+ size: 48
1026
+ }), /*#__PURE__*/jsx(Typography, {
1027
+ className: "mb-4 mt-2",
1028
+ style: "h2",
1029
+ children: t("neetoIntegrations.google.connect.title")
1030
+ }), /*#__PURE__*/jsxs("div", {
1031
+ className: "flex w-full flex-col items-start",
1032
+ children: [/*#__PURE__*/jsx(Callout, {
1033
+ className: "block leading-5",
1034
+ children: /*#__PURE__*/jsx(Trans, {
1035
+ components: {
1036
+ bold: /*#__PURE__*/jsx("strong", {})
1037
+ },
1038
+ i18nKey: "neetoIntegrations.google.connect.reminderToAcceptPermissions",
1039
+ values: {
1040
+ selectCheckbox: t("neetoIntegrations.google.connect.selectCheckbox")
1041
+ }
1042
+ })
1043
+ }), permissionImage && /*#__PURE__*/jsx("div", {
1044
+ className: "neeto-ui-border-gray-300 neeto-ui-rounded-md my-4 overflow-hidden border",
1045
+ children: /*#__PURE__*/jsx("img", {
1046
+ src: permissionImage
1047
+ })
1048
+ })]
1049
+ }), /*#__PURE__*/jsx(Button, {
1050
+ icon: Google,
1051
+ label: t("neetoIntegrations.google.connect.signIn"),
1052
+ onClick: fetchAuthorizationUrl
1053
+ })]
1054
+ }), activeTab === STEPS.finish && /*#__PURE__*/jsx(Finish, {
1055
+ title: t("neetoIntegrations.google.finish.title"),
1056
+ onClick: handleRedirect
1057
+ })]
1058
+ });
968
1059
  };
969
1060
 
970
1061
  export { GoogleCalendar as default };