@bigbinary/neeto-integrations-frontend 3.2.0 → 4.0.1

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.
Files changed (82) hide show
  1. package/README.md +40 -25
  2. package/app/javascript/src/translations/en.json +5 -6
  3. package/dist/Connect.js +16 -15
  4. package/dist/Connect.js.map +1 -1
  5. package/dist/Daily.js +18 -9
  6. package/dist/Daily.js.map +1 -1
  7. package/dist/DailyForm.js +10 -7
  8. package/dist/DailyForm.js.map +1 -1
  9. package/dist/Demo.js +11 -18
  10. package/dist/Demo.js.map +1 -1
  11. package/dist/DisconnectAlert.js +38 -0
  12. package/dist/DisconnectAlert.js.map +1 -0
  13. package/dist/Finish.js +13 -12
  14. package/dist/Finish.js.map +1 -1
  15. package/dist/{Form-be2e5595.js → Form-CPYZSV18.js} +57 -74
  16. package/dist/Form-CPYZSV18.js.map +1 -0
  17. package/dist/{Form-5be03668.js → Form-DY3ljixO.js} +44 -46
  18. package/dist/Form-DY3ljixO.js.map +1 -0
  19. package/dist/GoogleCalendar.js +5 -19
  20. package/dist/GoogleCalendar.js.map +1 -1
  21. package/dist/Manage.js +69 -64
  22. package/dist/Manage.js.map +1 -1
  23. package/dist/Modal.js +4 -4
  24. package/dist/Modal.js.map +1 -1
  25. package/dist/Twilio.js +20 -21
  26. package/dist/Twilio.js.map +1 -1
  27. package/dist/WalkthroughModal.js +51 -0
  28. package/dist/WalkthroughModal.js.map +1 -0
  29. package/dist/ZapierForm.js +72 -56
  30. package/dist/ZapierForm.js.map +1 -1
  31. package/dist/Zoom.js +14 -6
  32. package/dist/Zoom.js.map +1 -1
  33. package/dist/cjs/Connect.js +20 -24
  34. package/dist/cjs/Connect.js.map +1 -1
  35. package/dist/cjs/Daily.js +22 -20
  36. package/dist/cjs/Daily.js.map +1 -1
  37. package/dist/cjs/DailyForm.js +10 -7
  38. package/dist/cjs/DailyForm.js.map +1 -1
  39. package/dist/cjs/Demo.js +11 -23
  40. package/dist/cjs/Demo.js.map +1 -1
  41. package/dist/cjs/DisconnectAlert.js +40 -0
  42. package/dist/cjs/DisconnectAlert.js.map +1 -0
  43. package/dist/cjs/Finish.js +19 -23
  44. package/dist/cjs/Finish.js.map +1 -1
  45. package/dist/cjs/GoogleCalendar.js +12 -34
  46. package/dist/cjs/GoogleCalendar.js.map +1 -1
  47. package/dist/cjs/Manage.js +73 -77
  48. package/dist/cjs/Manage.js.map +1 -1
  49. package/dist/cjs/Modal.js +9 -15
  50. package/dist/cjs/Modal.js.map +1 -1
  51. package/dist/cjs/Twilio.js +37 -47
  52. package/dist/cjs/Twilio.js.map +1 -1
  53. package/dist/cjs/WalkthroughModal.js +53 -0
  54. package/dist/cjs/WalkthroughModal.js.map +1 -0
  55. package/dist/cjs/ZapierForm.js +87 -84
  56. package/dist/cjs/ZapierForm.js.map +1 -1
  57. package/dist/cjs/Zoom.js +18 -16
  58. package/dist/cjs/Zoom.js.map +1 -1
  59. package/dist/cjs/index.js +15 -11
  60. package/dist/cjs/index.js.map +1 -1
  61. package/dist/{index-4bda54e6.js → index-MS1ts-9f.js} +1 -1
  62. package/dist/{index-4bda54e6.js.map → index-MS1ts-9f.js.map} +1 -1
  63. package/dist/{index-2f3a953b.js → index-dxk7jTL7.js} +1 -1
  64. package/dist/{index-2f3a953b.js.map → index-dxk7jTL7.js.map} +1 -1
  65. package/dist/index.js +13 -9
  66. package/dist/index.js.map +1 -1
  67. package/dist/{query-62fcdf0a.js → query-D2CcgTB0.js} +2 -2
  68. package/dist/{query-62fcdf0a.js.map → query-D2CcgTB0.js.map} +1 -1
  69. package/dist/{query-4f9552ab.js → query-MCAJv0II.js} +1 -1
  70. package/dist/{query-4f9552ab.js.map → query-MCAJv0II.js.map} +1 -1
  71. package/package.json +119 -94
  72. package/types.d.ts +17 -0
  73. package/dist/Form-5be03668.js.map +0 -1
  74. package/dist/Form-be2e5595.js.map +0 -1
  75. package/dist/defineProperty-e90a259c.js +0 -43
  76. package/dist/defineProperty-e90a259c.js.map +0 -1
  77. package/dist/defineProperty-f3094d6c.js +0 -45
  78. package/dist/defineProperty-f3094d6c.js.map +0 -1
  79. package/dist/slicedToArray-b4278ecd.js +0 -57
  80. package/dist/slicedToArray-b4278ecd.js.map +0 -1
  81. package/dist/slicedToArray-f320d9e7.js +0 -61
  82. package/dist/slicedToArray-f320d9e7.js.map +0 -1
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # neeto-integrations-nano
2
2
 
3
- The `neeto-integrations-nano` provides support for third-party integrations to neeto
4
- applications. The nano exports the `@bigbinary/neeto-integrations-frontend` NPM package and `neeto-integrations-engine` Rails engine for development.
3
+ The `neeto-integrations-nano` provides support for third-party integrations to
4
+ neeto applications. The nano exports the
5
+ `@bigbinary/neeto-integrations-frontend` NPM package and
6
+ `neeto-integrations-engine` Rails engine for development..
5
7
 
6
- The engine handles the authentication, webhooks and token management for integrations
7
- with the following providers.
8
+ The engine handles the authentication, webhooks and token management for
9
+ integrations with the following providers.
8
10
 
9
11
  - Meta ( Facebook, Instagram, WhatsApp )
10
12
  - Google ( Analytics, YouTube )
@@ -12,21 +14,26 @@ with the following providers.
12
14
  - Zapier
13
15
  - Twilio
14
16
 
15
- Host can provide required permissions for a supported third-party integration, then engine will handle the authentication, token storing and refreshing for the host. Tokens, account details and webhook subscription details are stored in tables handled by the engine.
17
+ Host can provide required permissions for a supported third-party integration,
18
+ then engine will handle the authentication, token storing and refreshing for the
19
+ host. Tokens, account details and webhook subscription details are stored in
20
+ tables handled by the engine.
16
21
 
17
- The frontend package provides components to handle integration card, steps, disconnect and other integration configuration page support.
22
+ The frontend package provides components to handle integration card, steps,
23
+ disconnect and other integration configuration page support.
18
24
 
19
25
  ## Contents
20
- 1. [Development with Host application](#development-with-host-application)
21
- - [Engine](#engine)
22
- - [Installation](#installation)
23
- - [Details](#details)
24
- - [neeto products currently using this engine](#neeto-products-currently-using-this-engine)
25
- - [Frontend package](#frontend-package---bigbinaryneeto-integrations-frontend)
26
- - [Installation](#installation-1)
27
- - [Usage](#usage)
28
- - [Product integrations](#product-integrations)
29
- 2. [Instructions for publishing](#instructions-for-publishing)
26
+
27
+ 1. [Development with Host application](#development-with-host-application)
28
+ - [Engine](#engine)
29
+ - [Installation](#installation)
30
+ - [Details](#details)
31
+ - [neeto products currently using this engine](#neeto-products-currently-using-this-engine)
32
+ - [Frontend package](#frontend-package---bigbinaryneeto-integrations-frontend)
33
+ - [Installation](#installation-1)
34
+ - [Usage](#usage)
35
+ - [Product integrations](#product-integrations)
36
+ 2. [Instructions for publishing](#instructions-for-publishing)
30
37
 
31
38
  ## Development with Host application
32
39
 
@@ -45,8 +52,8 @@ end
45
52
  2. Run `bundle install`
46
53
 
47
54
  3. Add the required env variables to `.env.development` and update your
48
- `secrets.yml`. Refer [OAuth Config](./docs/engine/oauth-config.md) for more details on specific
49
- integrations.
55
+ `secrets.yml`. Refer [OAuth Config](./docs/engine/oauth-config.md) for more
56
+ details on specific integrations.
50
57
 
51
58
  4. Import migrations to your project:
52
59
 
@@ -83,8 +90,8 @@ other_applications:
83
90
  provider: neeto
84
91
  ```
85
92
 
86
- Refer the [Oauth Config](./docs/engine/oauth-config.md) for list of supported `provider`,
87
- `service_name` and `service_type`.
93
+ Refer the [Oauth Config](./docs/engine/oauth-config.md) for list of supported
94
+ `provider`, `service_name` and `service_type`.
88
95
 
89
96
  7. Import data migration to update the integrations list with the newly added
90
97
  integration from `config/neeto_integrations.yml`:
@@ -125,11 +132,15 @@ has_many :integrated_apps, class_name: "NeetoIntegrationsEngine::IntegratedApp",
125
132
  has_many :integrated_apps, as: :integrable, class_name: "NeetoIntegrationsEngine::IntegratedApp", dependent: :destroy
126
133
  ```
127
134
 
135
+ 12. Add `neeto_integrations_engine.organization.manage_integrations` permission
136
+ to your `permissions.yml` file which authorizes the user to manage
137
+ organization level integrations.
138
+
128
139
  #### Details
129
140
 
130
- - [Endpoints](./docs/engine/endpoints.md)
131
- - [Errors](./docs/engine/errors.md)
132
- - [MS Teams credentials and integration information](./docs/engine/ms-teams.md)
141
+ - [Endpoints](./docs/engine/endpoints.md)
142
+ - [Errors](./docs/engine/errors.md)
143
+ - [MS Teams credentials and integration information](./docs/engine/ms-teams.md)
133
144
 
134
145
  #### neeto products currently using this engine
135
146
 
@@ -185,8 +196,12 @@ Available components:
185
196
 
186
197
  ### Instructions for development
187
198
 
188
- Check the [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) for step-by-step instructions to develop the frontend package.
199
+ Check the
200
+ [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0)
201
+ for step-by-step instructions to develop the frontend package.
189
202
 
190
203
  ## Instructions for Publishing
191
204
 
192
- Consult the [building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages) guide for details on how to publish.
205
+ Consult the
206
+ [building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages)
207
+ guide for details on how to publish.
@@ -40,7 +40,7 @@
40
40
  "zapier": {
41
41
  "apiKeys": "API Keys",
42
42
  "copyApiKey": "Copy API Key",
43
- "emptyText": "Generate an API Key to connect to the Zapier platform",
43
+ "emptyText": "Generate an API Key to connect to the Zapier platform.",
44
44
  "generateApiKey": "Generate API Key",
45
45
  "labelInputPlaceholder": "Enter a Label for the new API Key",
46
46
  "tableColumns": {
@@ -51,14 +51,15 @@
51
51
  "tableTitle": "Previously Generated API Keys",
52
52
  "deleteApiKey": {
53
53
  "title": "Delete API Key?",
54
- "message": "You are permanently deleting the API Key <strong>{{key}}</strong>. This can't be undone."
54
+ "message": "You are permanently deleting the API Key <strong>{{key}}</strong>. All associated Zaps with this API Key will be turned off. This can't be undone."
55
55
  },
56
56
  "walkthroughText": "Check how it behaves",
57
57
  "helpDoc": "Help document",
58
58
  "label": {
59
59
  "required": "Label is required",
60
60
  "noBlankSpaces": "Label should not contain blank spaces"
61
- }
61
+ },
62
+ "learnMore": "Learn more"
62
63
  },
63
64
  "twilio": {
64
65
  "sid": "SID",
@@ -69,8 +70,6 @@
69
70
  "phNumReq": "Phone number is required"
70
71
  },
71
72
  "smsConfiguration": {
72
- "delete": "Twilio SMS integration has been successfully deleted.",
73
- "configuredSuccess": "Twilio SMS integration has been successfully configured.",
74
73
  "invalidCredentials": "Twilio credentials are invalid",
75
74
  "invalidPhoneNumberConfig": "Twilio phone number is invalid"
76
75
  }
@@ -82,7 +81,7 @@
82
81
  "title": "Daily.co",
83
82
  "description": "Include daily.co links in your meetings booked using {{appName, anyCase}}.",
84
83
  "apiKey": "API key",
85
- "helpDoc": "Daily.co is a video conferencing platform. Integrate it to host online meetings. <videoLink>Check how it behaves</videoLink>.",
84
+ "helpDoc": "Daily.co is a video conferencing platform. Integrate it to host online meetings. <videoLink>Check how it behaves</videoLink>",
86
85
  "yourApiKey": "You are connected to Daily.co with the API key: <wrapper><span>{{apiKey, anyCase}}</span><copy /></wrapper>",
87
86
  "connect": {
88
87
  "account": "Connect your Daily.co account",
package/dist/Connect.js CHANGED
@@ -1,9 +1,10 @@
1
- import { _ as _defineProperty } from './defineProperty-e90a259c.js';
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { humanize, noop } from '@bigbinary/neeto-cist';
3
3
  import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
4
+ import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
4
5
  import Typography from '@bigbinary/neetoui/Typography';
5
6
  import Button from '@bigbinary/neetoui/Button';
6
- import { P as PropTypes } from './index-4bda54e6.js';
7
+ import { P as PropTypes } from './index-MS1ts-9f.js';
7
8
  import { Trans } from 'react-i18next';
8
9
  import { jsxs, jsx } from 'react/jsx-runtime';
9
10
 
@@ -28,10 +29,18 @@ var Connect = withT(function (_ref) {
28
29
  onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
29
30
  children = _ref.children,
30
31
  secondaryButtonProps = _ref.secondaryButtonProps;
31
- return /*#__PURE__*/jsxs("div", {
32
- className: "mx-auto w-full max-w-3xl",
32
+ return /*#__PURE__*/jsxs(CardLayout, {
33
+ actionBlock: /*#__PURE__*/jsxs("div", {
34
+ className: "flex w-full flex-wrap items-center gap-2",
35
+ children: [/*#__PURE__*/jsx(Button, _objectSpread({
36
+ label: t("neetoIntegrations.common.connect"),
37
+ onClick: onConnect
38
+ }, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsx(Button, _objectSpread({
39
+ style: "secondary"
40
+ }, secondaryButtonProps))]
41
+ }),
33
42
  children: [/*#__PURE__*/jsxs("div", {
34
- className: "mb-6 flex flex-col gap-y-2",
43
+ className: "flex flex-col gap-y-2",
35
44
  children: [/*#__PURE__*/jsx(Icon, {
36
45
  size: 48
37
46
  }), /*#__PURE__*/jsxs("div", {
@@ -45,7 +54,7 @@ var Connect = withT(function (_ref) {
45
54
  })]
46
55
  })]
47
56
  }), helpDocUrl && /*#__PURE__*/jsx("div", {
48
- className: "mb-4",
57
+ className: "w-full",
49
58
  children: /*#__PURE__*/jsx(Trans, {
50
59
  i18nKey: "neetoIntegrations.common.helpDocUrl",
51
60
  components: {
@@ -61,15 +70,7 @@ var Connect = withT(function (_ref) {
61
70
  integration: integrationName || humanize(integration)
62
71
  }
63
72
  })
64
- }), children, /*#__PURE__*/jsxs("div", {
65
- className: "flex w-full items-center gap-x-3",
66
- children: [/*#__PURE__*/jsx(Button, _objectSpread({
67
- label: t("neetoIntegrations.common.connect"),
68
- onClick: onConnect
69
- }, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsx(Button, _objectSpread({
70
- style: "secondary"
71
- }, secondaryButtonProps))]
72
- })]
73
+ }), children]
73
74
  });
74
75
  });
75
76
  Connect.prototypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"Connect.js","sources":["../app/javascript/src/components/Steps/Connect.jsx"],"sourcesContent":["import { humanize, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nconst Connect = withT(\n ({\n t,\n Icon,\n title = \"\",\n description = \"\",\n integration = \"\",\n integrationName = \"\",\n helpDocUrl = \"\",\n buttonProps = {},\n onConnect = noop,\n children,\n secondaryButtonProps,\n }) => (\n <div className=\"mx-auto w-full max-w-3xl\">\n <div className=\"mb-6 flex flex-col gap-y-2\">\n <Icon size={48} />\n <div className=\"flex flex-col gap-y-1\">\n <Typography style=\"h2\">{title}</Typography>\n <Typography style=\"body2\">{description}</Typography>\n </div>\n </div>\n {helpDocUrl && (\n <div className=\"mb-4\">\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n className=\"text-xs\"\n href={helpDocUrl}\n size=\"small\"\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </div>\n )}\n {children}\n <div className=\"flex w-full items-center gap-x-3\">\n <Button\n label={t(\"neetoIntegrations.common.connect\")}\n onClick={onConnect}\n {...buttonProps}\n />\n {secondaryButtonProps && (\n <Button style=\"secondary\" {...secondaryButtonProps} />\n )}\n </div>\n </div>\n )\n);\n\nConnect.prototypes = {\n /**\n * To specify the Icon to be shown\n */\n Icon: PropTypes.node,\n /**\n * To specify the title of the connect component\n */\n title: PropTypes.string,\n /**\n * To specify the description for connect component\n */\n description: PropTypes.string,\n /**\n * To specify the props for the connect button\n */\n buttonProps: PropTypes.object,\n /**\n * Handler function that is triggered when the connect button is clicked.\n */\n onConnect: PropTypes.func,\n};\n\nexport default Connect;\n"],"names":["Connect","withT","_ref","t","Icon","_ref$title","title","_ref$description","description","_ref$integration","integration","_ref$integrationName","integrationName","_ref$helpDocUrl","helpDocUrl","_ref$buttonProps","buttonProps","_ref$onConnect","onConnect","noop","children","secondaryButtonProps","_jsxs","className","_jsx","size","Typography","style","Trans","i18nKey","components","helpLink","Button","href","target","values","humanize","_objectSpread","label","onClick","prototypes","PropTypes","node","string","object","func"],"mappings":";;;;;;;;;;;AAMA,IAAMA,OAAO,GAAGC,KAAK,C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A,WAAW,CAChB,CAAC,EACDK,oBAAoB,iBACnBG,GAAA,CAACQ,MAAM,EAAAK,aAAA,CAAA;AAACV,QAAAA,KAAK,EAAC,WAAA;OAAgBN,EAAAA,oBAAoB,CAAG,CACtD,CAAA;AAAA,KACE,CAAC,CAAA;AAAA,GACH,CAAC,CAAA;AAAA,CAEV,EAAC;AAEDrB,OAAO,CAACwC,UAAU,GAAG;AACnB;AACF;AACA;EACEpC,IAAI,EAAEqC,SAAS,CAACC,IAAI;AACpB;AACF;AACA;EACEpC,KAAK,EAAEmC,SAAS,CAACE,MAAM;AACvB;AACF;AACA;EACEnC,WAAW,EAAEiC,SAAS,CAACE,MAAM;AAC7B;AACF;AACA;EACE3B,WAAW,EAAEyB,SAAS,CAACG,MAAM;AAC7B;AACF;AACA;EACE1B,SAAS,EAAEuB,SAAS,CAACI,IAAAA;AACvB,CAAC;;;;"}
1
+ {"version":3,"file":"Connect.js","sources":["../app/javascript/src/components/Steps/Connect.jsx"],"sourcesContent":["import { humanize, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nconst Connect = withT(\n ({\n t,\n Icon,\n title = \"\",\n description = \"\",\n integration = \"\",\n integrationName = \"\",\n helpDocUrl = \"\",\n buttonProps = {},\n onConnect = noop,\n children,\n secondaryButtonProps,\n }) => (\n <CardLayout\n actionBlock={\n <div className=\"flex w-full flex-wrap items-center gap-2\">\n <Button\n label={t(\"neetoIntegrations.common.connect\")}\n onClick={onConnect}\n {...buttonProps}\n />\n {secondaryButtonProps && (\n <Button style=\"secondary\" {...secondaryButtonProps} />\n )}\n </div>\n }\n >\n <div className=\"flex flex-col gap-y-2\">\n <Icon size={48} />\n <div className=\"flex flex-col gap-y-1\">\n <Typography style=\"h2\">{title}</Typography>\n <Typography style=\"body2\">{description}</Typography>\n </div>\n </div>\n {helpDocUrl && (\n <div className=\"w-full\">\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n className=\"text-xs\"\n href={helpDocUrl}\n size=\"small\"\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </div>\n )}\n {children}\n </CardLayout>\n )\n);\n\nConnect.prototypes = {\n /**\n * To specify the Icon to be shown\n */\n Icon: PropTypes.node,\n /**\n * To specify the title of the connect component\n */\n title: PropTypes.string,\n /**\n * To specify the description for connect component\n */\n description: PropTypes.string,\n /**\n * To specify the props for the connect button\n */\n buttonProps: PropTypes.object,\n /**\n * Handler function that is triggered when the connect button is clicked.\n */\n onConnect: PropTypes.func,\n};\n\nexport default Connect;\n"],"names":["Connect","withT","_ref","t","Icon","_ref$title","title","_ref$description","description","_ref$integration","integration","_ref$integrationName","integrationName","_ref$helpDocUrl","helpDocUrl","_ref$buttonProps","buttonProps","_ref$onConnect","onConnect","noop","children","secondaryButtonProps","_jsxs","CardLayout","actionBlock","className","_jsx","Button","_objectSpread","label","onClick","style","size","Typography","Trans","i18nKey","components","helpLink","href","target","values","humanize","prototypes","PropTypes","node","string","object","func"],"mappings":";;;;;;;;;;;;AAOA,IAAMA,OAAO,GAAGC,KAAK,CACnB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IACDC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,UAAA,GAAAH,IAAA,CACJI,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,UAAA;IAAAE,gBAAA,GAAAL,IAAA,CACVM,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,gBAAA;IAAAE,gBAAA,GAAAP,IAAA,CAChBQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBA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daily.js CHANGED
@@ -1,36 +1,40 @@
1
1
  import i18next from 'i18next';
2
2
  import { isPresent, noop } from '@bigbinary/neeto-cist';
3
3
  import { withTitle, useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
4
- import { u as useFetchDaily, a as useDestroyDaily, F as Form } from './Form-5be03668.js';
5
- import { _ as _slicedToArray } from './slicedToArray-b4278ecd.js';
4
+ import { u as useFetchDaily, a as useDestroyDaily, F as Form } from './Form-DY3ljixO.js';
5
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import { useState } from 'react';
7
7
  import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
8
8
  import DailyIcon from '@bigbinary/neeto-icons/misc/Daily';
9
9
  import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
10
- import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
10
+ import Spinner from '@bigbinary/neetoui/Spinner';
11
11
  import { useTranslation, Trans } from 'react-i18next';
12
12
  import Manage$1 from './Manage.js';
13
13
  import { jsx } from 'react/jsx-runtime';
14
+ import '@bigbinary/neeto-molecules/CardLayout';
14
15
  import '@bigbinary/neeto-molecules/Container';
15
16
  import '@bigbinary/neeto-molecules/Header';
16
- import '@bigbinary/neeto-molecules/HelpPopover';
17
- import '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
18
17
  import '@bigbinary/neetoui/Button';
19
18
  import '@bigbinary/neetoui/Typography';
20
19
  import '@bigbinary/neetoui/formik/Input';
21
20
  import '@bigbinary/neetoui/formik/Form';
22
21
  import '@bigbinary/neetoui/formik/ActionBlock';
23
22
  import 'react-router-dom';
24
- import './defineProperty-e90a259c.js';
23
+ import './WalkthroughModal.js';
24
+ import '@bigbinary/neeto-commons-frontend/react-utils/withT';
25
+ import '@bigbinary/neetoui/Modal';
26
+ import '@babel/runtime/helpers/defineProperty';
25
27
  import '@tanstack/react-query';
26
28
  import '@bigbinary/neeto-commons-frontend/constants';
27
29
  import 'axios';
28
- import './query-62fcdf0a.js';
30
+ import './query-D2CcgTB0.js';
29
31
  import 'yup';
30
32
  import 'classnames';
31
33
  import '@bigbinary/neeto-icons/Check';
32
- import '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
33
34
  import '@bigbinary/neetoui/Tooltip';
35
+ import './DisconnectAlert.js';
36
+ import '@babel/runtime/helpers/objectWithoutProperties';
37
+ import '@bigbinary/neetoui/Alert';
34
38
 
35
39
  var Manage = function Manage(_ref) {
36
40
  var description = _ref.description,
@@ -62,7 +66,12 @@ var Manage = function Manage(_ref) {
62
66
  var handleDisconnect = function handleDisconnect() {
63
67
  return destroyIntegration("daily");
64
68
  };
65
- if (isFetching || isDisconnecting) return /*#__PURE__*/jsx(PageLoader, {});
69
+ if (isFetching || isDisconnecting) {
70
+ return /*#__PURE__*/jsx("div", {
71
+ className: "flex h-full w-full items-center justify-center",
72
+ children: /*#__PURE__*/jsx(Spinner, {})
73
+ });
74
+ }
66
75
  return /*#__PURE__*/jsx(Manage$1, {
67
76
  isConnected: isConnected,
68
77
  isDisconnectAlertOpen: isDisconnectAlertOpen,
package/dist/Daily.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Daily.js","sources":["../app/javascript/src/components/Integrations/Daily/Manage.jsx","../app/javascript/src/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport PageLoader from \"neetomolecules/PageLoader\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nconst Manage = ({ description, onDisconnect }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata = {} } = {}, isFetching } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n const { t } = useTranslation();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyDaily({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n const handleDisconnect = () => destroyIntegration(\"daily\");\n\n if (isFetching || isDisconnecting) return <PageLoader />;\n\n return (\n <ManageIntegrations\n {...{\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={DailyIcon}\n connectPath={buildUrl(window.location.pathname, { connect: true })}\n integration=\"daily\"\n description={\n isConnected ? (\n <Trans\n i18nKey=\"neetoIntegrations.daily.yourApiKey\"\n values={{ apiKey }}\n components={{\n wrapper: (\n <div className=\"neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 border px-3 py-2\" />\n ),\n span: <span className=\"break-all text-sm\" />,\n copy: (\n <CopyToClipboardButton\n className=\"flex-shrink-0 self-start\"\n style=\"text\"\n value={apiKey}\n />\n ),\n }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.daily.connected\")\n : t(\"neetoIntegrations.daily.connect.account\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={handleDisconnect}\n />\n );\n};\n\nexport default Manage;\n","import i18next from \"i18next\";\nimport { isPresent, noop } from \"neetocist\";\nimport { useQueryParams, withTitle } from \"neetocommons/react-utils\";\n\nimport { useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport Form from \"./Form\";\nimport Manage from \"./Manage\";\n\nconst Daily = ({\n isOnboarding = false,\n helpDocUrl = \"\",\n videoUrl = \"\",\n description = \"\",\n onConnect = noop,\n onDisconnect = noop,\n}) => {\n const { connect } = useQueryParams();\n\n const { data: { metadata = {} } = {} } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n if ((isPresent(apiKey) && !isOnboarding) || !connect) {\n return <Manage {...{ description, onDisconnect }} />;\n }\n\n return <Form {...{ helpDocUrl, onConnect, videoUrl }} />;\n};\n\nexport default withTitle(\n Daily,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["Manage","_ref","description","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchDaily","useFetchDaily","_useFetchDaily$data","data","_useFetchDaily$data2","_useFetchDaily$data2$","metadata","isFetching","_ref2","_ref2$apiKey","apiKey","_useTranslation","useTranslation","t","_useDestroyDaily","useDestroyDaily","onSuccess","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","PageLoader","ManageIntegrations","Icon","DailyIcon","connectPath","buildUrl","window","location","pathname","connect","integration","Trans","i18nKey","values","components","wrapper","className","span","copy","CopyToClipboardButton","style","value","title","onClose","Daily","_ref$isOnboarding","isOnboarding","_ref$helpDocUrl","helpDocUrl","_ref$videoUrl","videoUrl","_ref$description","_ref$onConnect","onConnect","noop","_ref$onDisconnect","_useQueryParams","useQueryParams","Form","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAsC;AAAA,EAAA,IAAhCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY,CAAA;AACzC,EAAA,IAAAC,SAAA,GAA0DC,QAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,wBAAwB,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAEtD,EAAA,IAAAI,cAAA,GAAqDC,aAAa,EAAE;IAAAC,mBAAA,GAAAF,cAAA,CAA5DG,IAAI;AAAAC,IAAAA,oBAAA,GAAAF,mBAAA,K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GAAAA,YAAA,CAAA;EAErB,IAAKa,SAAS,CAACZ,MAAM,CAAC,IAAI,CAACyC,YAAY,IAAK,CAACjB,OAAO,EAAE;IACpD,oBAAOV,GAAA,CAAClC,MAAM,EAAA;AAAOE,MAAAA,WAAW,EAAXA,WAAW;AAAEC,MAAAA,YAAY,EAAZA,YAAAA;AAAY,KAAK,CAAC,CAAA;AACtD,GAAA;EAEA,oBAAO+B,GAAA,CAACuC,IAAI,EAAA;AAAOV,IAAAA,UAAU,EAAVA,UAAU;AAAEK,IAAAA,SAAS,EAATA,SAAS;AAAEH,IAAAA,QAAQ,EAARA,QAAAA;AAAQ,GAAK,CAAC,CAAA;AAC1D,CAAC,CAAA;AAED,YAAeS,SAAS,CACtBf,KAAK,EACLgB,OAAO,CAACpD,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
1
+ {"version":3,"file":"Daily.js","sources":["../app/javascript/src/components/Integrations/Daily/Manage.jsx","../app/javascript/src/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nconst Manage = ({ description, onDisconnect }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata = {} } = {}, isFetching } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n const { t } = useTranslation();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyDaily({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n const handleDisconnect = () => destroyIntegration(\"daily\");\n\n if (isFetching || isDisconnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={DailyIcon}\n connectPath={buildUrl(window.location.pathname, { connect: true })}\n integration=\"daily\"\n description={\n isConnected ? (\n <Trans\n i18nKey=\"neetoIntegrations.daily.yourApiKey\"\n values={{ apiKey }}\n components={{\n wrapper: (\n <div className=\"neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 border px-3 py-2\" />\n ),\n span: <span className=\"break-all text-sm\" />,\n copy: (\n <CopyToClipboardButton\n className=\"flex-shrink-0 self-start\"\n style=\"text\"\n value={apiKey}\n />\n ),\n }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.daily.connected\")\n : t(\"neetoIntegrations.daily.connect.account\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={handleDisconnect}\n />\n );\n};\n\nexport default Manage;\n","import i18next from \"i18next\";\nimport { isPresent, noop } from \"neetocist\";\nimport { useQueryParams, withTitle } from \"neetocommons/react-utils\";\n\nimport { useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport Form from \"./Form\";\nimport Manage from \"./Manage\";\n\nconst Daily = ({\n isOnboarding = false,\n helpDocUrl = \"\",\n videoUrl = \"\",\n description = \"\",\n onConnect = noop,\n onDisconnect = noop,\n}) => {\n const { connect } = useQueryParams();\n\n const { data: { metadata = {} } = {} } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n if ((isPresent(apiKey) && !isOnboarding) || !connect) {\n return <Manage {...{ description, onDisconnect }} />;\n }\n\n return <Form {...{ helpDocUrl, onConnect, videoUrl }} />;\n};\n\nexport default withTitle(\n Daily,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["Manage","_ref","description","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchDaily","useFetchDaily","_useFetchDaily$data","data","_useFetchDaily$data2","_useFetchDaily$data2$","metadata","isFetching","_ref2","_ref2$apiKey","apiKey","_useTranslation","useTranslation","t","_useDestroyDaily","useDestroyDaily","onSuccess","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","DailyIcon","connectPath","buildUrl","window","location","pathname","connect","integration","Trans","i18nKey","values","components","wrapper","span","copy","CopyToClipboardButton","style","value","title","onClose","Daily","_ref$isOnboarding","isOnboarding","_ref$helpDocUrl","helpDocUrl","_ref$videoUrl","videoUrl","_ref$description","_ref$onConnect","onConnect","noop","_ref$onDisconnect","_useQueryParams","useQueryParams","Form","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAsC;AAAA,EAAA,IAAhCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;AACzC,EAAA,IAAAC,SAAA,GAA0DC,QAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,wBAAwB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEtD,EAAA,IAAAI,cAAA,GAAqDC,aAAa,EAAE;IAAAC,mBAAA,GAAAF,cAAA,CAA5DG,IAAI;AAAAC,IAAAA,oBAAA,GAAAF,mBAAA,KAAA,KAAA,CAAA,GAAsB,EAAE,GAAAA,mBAAA;IAAAG,qBAAA,GAAAD,oBAAA,CAApBE,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAG,EAAE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EC,MAAAA,YAAY,EAAZA;AAAY,KAAK,CAAC;AACtD;EAEA,oBAAO+B,GAAA,CAACwC,IAAI,EAAA;AAAOV,IAAAA,UAAU,EAAVA,UAAU;AAAEK,IAAAA,SAAS,EAATA,SAAS;AAAEH,IAAAA,QAAQ,EAARA;AAAQ,GAAK,CAAC;AAC1D,CAAC;AAED,YAAeS,SAAS,CACtBf,KAAK,EACLgB,OAAO,CAACrD,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
package/dist/DailyForm.js CHANGED
@@ -1,25 +1,28 @@
1
- import './slicedToArray-b4278ecd.js';
1
+ import '@babel/runtime/helpers/slicedToArray';
2
2
  import 'react';
3
3
  import 'i18next';
4
4
  import '@bigbinary/neeto-commons-frontend/react-utils';
5
+ import '@bigbinary/neeto-molecules/CardLayout';
5
6
  import '@bigbinary/neeto-molecules/Container';
6
7
  import '@bigbinary/neeto-molecules/Header';
7
- import '@bigbinary/neeto-molecules/HelpPopover';
8
- import '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
9
- import '@bigbinary/neeto-molecules/PageLoader';
10
8
  import '@bigbinary/neetoui/Button';
9
+ import '@bigbinary/neetoui/Spinner';
11
10
  import '@bigbinary/neetoui/Typography';
12
11
  import '@bigbinary/neetoui/formik/Input';
13
12
  import '@bigbinary/neetoui/formik/Form';
14
13
  import '@bigbinary/neetoui/formik/ActionBlock';
15
14
  import 'react-i18next';
16
15
  import 'react-router-dom';
17
- export { F as default } from './Form-5be03668.js';
16
+ import './WalkthroughModal.js';
17
+ export { F as default } from './Form-DY3ljixO.js';
18
18
  import 'react/jsx-runtime';
19
- import './defineProperty-e90a259c.js';
19
+ import '@bigbinary/neeto-cist';
20
+ import '@bigbinary/neeto-commons-frontend/react-utils/withT';
21
+ import '@bigbinary/neetoui/Modal';
22
+ import '@babel/runtime/helpers/defineProperty';
20
23
  import '@tanstack/react-query';
21
24
  import '@bigbinary/neeto-commons-frontend/constants';
22
25
  import 'axios';
23
- import './query-62fcdf0a.js';
26
+ import './query-D2CcgTB0.js';
24
27
  import 'yup';
25
28
  //# sourceMappingURL=DailyForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DailyForm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DailyForm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/Demo.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { noop } from '@bigbinary/neeto-cist';
2
- import Typography from '@bigbinary/neetoui/Typography';
2
+ import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
3
3
  import Button from '@bigbinary/neetoui/Button';
4
- import { P as PropTypes } from './index-4bda54e6.js';
4
+ import { P as PropTypes } from './index-MS1ts-9f.js';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { isEmpty } from 'ramda';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -31,7 +31,7 @@ var Demo = function Demo(_ref) {
31
31
  var renderVideo = function renderVideo(videoUrl) {
32
32
  return isYouTubeLink(videoUrl) ? /*#__PURE__*/jsx("iframe", {
33
33
  allowFullScreen: true,
34
- className: "aspect-video border-none",
34
+ className: "aspect-video w-full max-w-3xl border-none",
35
35
  frameBorder: "0",
36
36
  id: "ytplayer",
37
37
  src: videoUrl,
@@ -48,23 +48,16 @@ var Demo = function Demo(_ref) {
48
48
  })
49
49
  });
50
50
  };
51
- return /*#__PURE__*/jsxs("div", {
52
- className: "mx-auto w-full max-w-3xl",
53
- children: [/*#__PURE__*/jsxs("div", {
54
- className: "mb-6 flex flex-col gap-y-1",
55
- children: [/*#__PURE__*/jsx(Typography, {
56
- style: "h2",
57
- children: renderText(title, t("neetoIntegrations.demo.title"))
58
- }), /*#__PURE__*/jsx(Typography, {
59
- style: "body2",
60
- children: renderText(subtitle, t("neetoIntegrations.demo.subtitle"))
61
- })]
62
- }), children, videoUrl && /*#__PURE__*/jsx("div", {
63
- className: "mb-8",
64
- children: renderVideo(videoUrl)
65
- }), /*#__PURE__*/jsx(Button, {
51
+ return /*#__PURE__*/jsxs(CardLayout, {
52
+ description: renderText(subtitle, t("neetoIntegrations.demo.subtitle")),
53
+ title: renderText(title, t("neetoIntegrations.demo.title")),
54
+ actionBlock: /*#__PURE__*/jsx(Button, {
66
55
  label: t("neetoIntegrations.common.finish"),
67
56
  onClick: onClose
57
+ }),
58
+ children: [children, videoUrl && /*#__PURE__*/jsx("div", {
59
+ className: "w-full",
60
+ children: renderVideo(videoUrl)
68
61
  })]
69
62
  });
70
63
  };
package/dist/Demo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Demo.js","sources":["../app/javascript/src/components/Steps/utils.js","../app/javascript/src/components/Steps/Demo.jsx"],"sourcesContent":["import { isEmpty } from \"ramda\";\n\nexport const isYouTubeLink = videoUrl => {\n const youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtu\\.be)\\//;\n\n return youtubeRegex.test(videoUrl);\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { noop } from \"neetocist\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { isYouTubeLink, renderText } from \"./utils\";\n\nconst Demo = ({\n title = \"\",\n subtitle = \"\",\n iframeTitle = \"\",\n onClose = noop,\n videoUrl = \"\",\n children,\n}) => {\n const { t } = useTranslation();\n\n const renderVideo = videoUrl =>\n isYouTubeLink(videoUrl) ? (\n <iframe\n allowFullScreen\n className=\"aspect-video border-none\"\n frameBorder=\"0\"\n id=\"ytplayer\"\n src={videoUrl}\n title={renderText(iframeTitle, t(\"neetoIntegrations.demo.iFrameTitle\"))}\n type=\"text/html\"\n />\n ) : (\n <video\n autoPlay\n controls\n muted\n className=\"neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n );\n\n return (\n <div className=\"mx-auto w-full max-w-3xl\">\n <div className=\"mb-6 flex flex-col gap-y-1\">\n <Typography style=\"h2\">\n {renderText(title, t(\"neetoIntegrations.demo.title\"))}\n </Typography>\n <Typography style=\"body2\">\n {renderText(subtitle, t(\"neetoIntegrations.demo.subtitle\"))}\n </Typography>\n </div>\n {children}\n {videoUrl && <div className=\"mb-8\">{renderVideo(videoUrl)}</div>}\n <Button label={t(\"neetoIntegrations.common.finish\")} onClick={onClose} />\n </div>\n );\n};\n\nDemo.prototypes = {\n /**\n * To specify whether the integration modal should be opened or closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the walkthrough video link\n */\n videoUrl: PropTypes.string,\n /**\n * To specify the title of the demo component\n */\n title: PropTypes.string,\n /**\n * To specify the subtitle of the demo component\n */\n subtitle: PropTypes.string,\n /**\n * To specify the title of the video in the iframe\n */\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["isYouTubeLink","videoUrl","youtubeRegex","test","renderText","text","fallbackTranslation","isEmpty","Demo","_ref","_ref$title","title","_ref$subtitle","subtitle","_ref$iframeTitle","iframeTitle","_ref$onClose","onClose","noop","_ref$videoUrl","children","_useTranslation","useTranslation","t","renderVideo","_jsx","allowFullScreen","className","frameBorder","id","src","type","autoPlay","controls","muted","_jsxs","Typography","style","Button","label","onClick","prototypes","PropTypes","func","string"],"mappings":";;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,QAAQ,EAAI;EACvC,IAAMC,YAAY,GAAG,mDAAmD,CAAA;AAExE,EAAA,OAAOA,YAAY,CAACC,IAAI,CAACF,QAAQ,CAAC,CAAA;AACpC,CAAC,CAAA;AAEM,IAAMG,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAI,EAAEC,mBAAmB,EAAA;AAAA,EAAA,OAClDC,OAAO,CAACF,IAAI,CAAC,GAAGC,mBAAmB,GAAGD,IAAI,CAAA;AAAA,CAAA;;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;EACExB,OAAO,EAAEyB,SAAS,CAACC,IAAI;AACvB;AACF;AACA;EACE1C,QAAQ,EAAEyC,SAAS,CAACE,MAAM;AAC1B;AACF;AACA;EACEjC,KAAK,EAAE+B,SAAS,CAACE,MAAM;AACvB;AACF;AACA;EACE/B,QAAQ,EAAE6B,SAAS,CAACE,MAAM;AAC1B;AACF;AACA;EACE7B,WAAW,EAAE2B,SAAS,CAACE,MAAAA;AACzB,CAAC;;;;"}
1
+ {"version":3,"file":"Demo.js","sources":["../app/javascript/src/components/Steps/utils.js","../app/javascript/src/components/Steps/Demo.jsx"],"sourcesContent":["import { isEmpty } from \"ramda\";\n\nexport const isYouTubeLink = videoUrl => {\n const youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtu\\.be)\\//;\n\n return youtubeRegex.test(videoUrl);\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { isYouTubeLink, renderText } from \"./utils\";\n\nconst Demo = ({\n title = \"\",\n subtitle = \"\",\n iframeTitle = \"\",\n onClose = noop,\n videoUrl = \"\",\n children,\n}) => {\n const { t } = useTranslation();\n\n const renderVideo = videoUrl =>\n isYouTubeLink(videoUrl) ? (\n <iframe\n allowFullScreen\n className=\"aspect-video w-full max-w-3xl border-none\"\n frameBorder=\"0\"\n id=\"ytplayer\"\n src={videoUrl}\n title={renderText(iframeTitle, t(\"neetoIntegrations.demo.iFrameTitle\"))}\n type=\"text/html\"\n />\n ) : (\n <video\n autoPlay\n controls\n muted\n className=\"neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n );\n\n return (\n <CardLayout\n description={renderText(subtitle, t(\"neetoIntegrations.demo.subtitle\"))}\n title={renderText(title, t(\"neetoIntegrations.demo.title\"))}\n actionBlock={\n <Button\n label={t(\"neetoIntegrations.common.finish\")}\n onClick={onClose}\n />\n }\n >\n {children}\n {videoUrl && <div className=\"w-full\">{renderVideo(videoUrl)}</div>}\n </CardLayout>\n );\n};\n\nDemo.prototypes = {\n /**\n * To specify whether the integration modal should be opened or closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the walkthrough video link\n */\n videoUrl: PropTypes.string,\n /**\n * To specify the title of the demo component\n */\n title: PropTypes.string,\n /**\n * To specify the subtitle of the demo component\n */\n subtitle: PropTypes.string,\n /**\n * To specify the title of the video in the iframe\n */\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["isYouTubeLink","videoUrl","youtubeRegex","test","renderText","text","fallbackTranslation","isEmpty","Demo","_ref","_ref$title","title","_ref$subtitle","subtitle","_ref$iframeTitle","iframeTitle","_ref$onClose","onClose","noop","_ref$videoUrl","children","_useTranslation","useTranslation","t","renderVideo","_jsx","allowFullScreen","className","frameBorder","id","src","type","autoPlay","controls","muted","_jsxs","CardLayout","description","actionBlock","Button","label","onClick","prototypes","PropTypes","func","string"],"mappings":";;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,QAAQ,EAAI;EACvC,IAAMC,YAAY,GAAG,mDAAmD;AAExE,EAAA,OAAOA,YAAY,CAACC,IAAI,CAACF,QAAQ,CAAC;AACpC,CAAC;AAEM,IAAMG,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAI,EAAEC,mBAAmB,EAAA;AAAA,EAAA,OAClDC,OAAO,CAACF,IAAI,CAAC,GAAGC,mBAAmB,GAAGD,IAAI;AAAA,CAAA;;ACD5C,IAAMG,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAOJ;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CANJE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GA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,GAAA,CAAA,QAAA,EAAA;AAAQK,QAAAA,GAAG,EAAE7B;OAAW;AAAC,KACpB,CACR;AAAA,GAAA;EAEH,oBACEkC,IAAA,CAACC,UAAU,EAAA;IACTC,WAAW,EAAEjC,UAAU,CAACS,QAAQ,EAAEU,CAAC,CAAC,iCAAiC,CAAC,CAAE;IACxEZ,KAAK,EAAEP,UAAU,CAACO,KAAK,EAAEY,CAAC,CAAC,8BAA8B,CAAC,CAAE;IAC5De,WAAW,eACTb,GAAA,CAACc,MAAM,EAAA;AACLC,MAAAA,KAAK,EAAEjB,CAAC,CAAC,iCAAiC,CAAE;AAC5CkB,MAAAA,OAAO,EAAExB;AAAQ,KAClB,CACF;AAAAG,IAAAA,QAAA,EAEAA,CAAAA,QAAQ,EACRnB,QAAQ,iBAAIwB,GAAA,CAAA,KAAA,EAAA;AAAKE,MAAAA,SAAS,EAAC,QAAQ;MAAAP,QAAA,EAAEI,WAAW,CAACvB,QAAQ;AAAC,KAAM,CAAC;AAAA,GACxD,CAAC;AAEjB;AAEAO,IAAI,CAACkC,UAAU,GAAG;AAChB;AACF;AACA;EACEzB,OAAO,EAAE0B,SAAS,CAACC,IAAI;AACvB;AACF;AACA;EACE3C,QAAQ,EAAE0C,SAAS,CAACE,MAAM;AAC1B;AACF;AACA;EACElC,KAAK,EAAEgC,SAAS,CAACE,MAAM;AACvB;AACF;AACA;EACEhC,QAAQ,EAAE8B,SAAS,CAACE,MAAM;AAC1B;AACF;AACA;EACE9B,WAAW,EAAE4B,SAAS,CAACE;AACzB,CAAC;;;;"}
@@ -0,0 +1,38 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import { noop } from '@bigbinary/neeto-cist';
4
+ import withT from '@bigbinary/neeto-commons-frontend/react-utils/withT';
5
+ import Alert from '@bigbinary/neetoui/Alert';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ var _excluded = ["t", "isOpen", "isDisconnecting", "title", "message", "onClose", "onDisconnect"];
9
+ 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; }
10
+ 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; }
11
+ var DisconnectAlert = withT(function (_ref) {
12
+ var t = _ref.t,
13
+ _ref$isOpen = _ref.isOpen,
14
+ isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
15
+ _ref$isDisconnecting = _ref.isDisconnecting,
16
+ isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
17
+ _ref$title = _ref.title,
18
+ title = _ref$title === void 0 ? "" : _ref$title,
19
+ _ref$message = _ref.message,
20
+ message = _ref$message === void 0 ? "" : _ref$message,
21
+ _ref$onClose = _ref.onClose,
22
+ onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
23
+ _ref$onDisconnect = _ref.onDisconnect,
24
+ onDisconnect = _ref$onDisconnect === void 0 ? noop : _ref$onDisconnect,
25
+ otherProps = _objectWithoutProperties(_ref, _excluded);
26
+ return /*#__PURE__*/jsx(Alert, _objectSpread({
27
+ isOpen: isOpen,
28
+ message: message,
29
+ onClose: onClose,
30
+ title: title,
31
+ isSubmitting: isDisconnecting,
32
+ submitButtonLabel: t("neetoIntegrations.common.disconnect"),
33
+ onSubmit: onDisconnect
34
+ }, otherProps));
35
+ });
36
+
37
+ export { DisconnectAlert as default };
38
+ //# sourceMappingURL=DisconnectAlert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisconnectAlert.js","sources":["../app/javascript/src/components/DisconnectAlert/index.jsx"],"sourcesContent":["import { noop } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { Alert } from \"neetoui\";\n\nconst DisconnectAlert = withT(\n ({\n t,\n isOpen = false,\n isDisconnecting = false,\n title = \"\",\n message = \"\",\n onClose = noop,\n onDisconnect = noop,\n ...otherProps\n }) => (\n <Alert\n {...{ isOpen, message, onClose, title }}\n isSubmitting={isDisconnecting}\n submitButtonLabel={t(\"neetoIntegrations.common.disconnect\")}\n onSubmit={onDisconnect}\n {...otherProps}\n />\n )\n);\n\nexport default DisconnectAlert;\n"],"names":["DisconnectAlert","withT","_ref","t","_ref$isOpen","isOpen","_ref$isDisconnecting","isDisconnecting","_ref$title","title","_ref$message","message","_ref$onClose","onClose","noop","_ref$onDisconnect","onDisconnect","otherProps","_objectWithoutProperties","_excluded","_jsx","Alert","_objectSpread","isSubmitting","submitButtonLabel","onSubmit"],"mappings":";;;;;;;;;;AAIA,IAAMA,eAAe,GAAGC,KAAK,CAC3B,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,WAAA,GAAAF,IAAA,CACDG,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,WAAA;IAAAE,oBAAA,GAAAJ,IAAA,CACdK,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,oBAAA;IAAAE,UAAA,GAAAN,IAAA,CACvBO,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,UAAA;IAAAE,YAAA,GAAAR,IAAA,CACVS,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,YAAA;IAAAE,YAAA,GAAAV,IAAA,CACZW,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,YAAA;IAAAG,iBAAA,GAAAb,IAAA,CACdc,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGD,KAAAA,CAAAA,GAAAA,IAAI,GAAAC,iBAAA;AAChBE,IAAAA,UAAU,GAAAC,wBAAA,CAAAhB,IAAA,EAAAiB,SAAA,CAAA;AAAA,EAAA,oBAEbC,GAAA,CAACC,KAAK,EAAAC,aAAA,CAAA;AACEjB,IAAAA,MAAM,EAANA,MAAM;AAAEM,IAAAA,OAAO,EAAPA,OAAO;AAAEE,IAAAA,OAAO,EAAPA,OAAO;AAAEJ,IAAAA,KAAK,EAALA,KAAK;AACrCc,IAAAA,YAAY,EAAEhB,eAAgB;AAC9BiB,IAAAA,iBAAiB,EAAErB,CAAC,CAAC,qCAAqC,CAAE;AAC5DsB,IAAAA,QAAQ,EAAET;GACNC,EAAAA,UAAU,CACf,CAAC;AAAA,CAEN;;;;"}
package/dist/Finish.js CHANGED
@@ -1,9 +1,10 @@
1
- import { _ as _defineProperty } from './defineProperty-e90a259c.js';
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { isNotEmpty, noop } from '@bigbinary/neeto-cist';
3
3
  import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
4
+ import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
4
5
  import Typography from '@bigbinary/neetoui/Typography';
5
6
  import Button from '@bigbinary/neetoui/Button';
6
- import { P as PropTypes } from './index-4bda54e6.js';
7
+ import { P as PropTypes } from './index-MS1ts-9f.js';
7
8
  import * as React from 'react';
8
9
  import { jsxs, jsx } from 'react/jsx-runtime';
9
10
 
@@ -46,22 +47,22 @@ var Finish = withT(function (_ref) {
46
47
  _ref$secondaryButtonP = _ref.secondaryButtonProps,
47
48
  secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
48
49
  children = _ref.children;
49
- return /*#__PURE__*/jsxs("div", {
50
- className: "mx-auto w-full max-w-3xl",
51
- children: [/*#__PURE__*/jsx(SvgSuccess, {}), /*#__PURE__*/jsx(Typography, {
52
- className: "mb-6 mt-4",
53
- style: "h2",
54
- weight: "semibold",
55
- children: title
56
- }), children, /*#__PURE__*/jsxs("div", {
57
- className: "flex w-full items-center gap-x-2",
50
+ return /*#__PURE__*/jsxs(CardLayout, {
51
+ actionBlock: /*#__PURE__*/jsxs("div", {
52
+ className: "flex w-full flex-wrap items-center gap-2",
58
53
  children: [/*#__PURE__*/jsx(Button, _objectSpread({
59
54
  onClick: onClick,
60
55
  label: t("neetoIntegrations.common.continue")
61
56
  }, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/jsx(Button, _objectSpread({
62
57
  style: "secondary"
63
58
  }, secondaryButtonProps))]
64
- })]
59
+ }),
60
+ children: [/*#__PURE__*/jsx(SvgSuccess, {}), /*#__PURE__*/jsx(Typography, {
61
+ className: "mb-6 mt-4",
62
+ style: "h2",
63
+ weight: "semibold",
64
+ children: title
65
+ }), children]
65
66
  });
66
67
  });
67
68
  Finish.prototypes = {