@bigbinary/neeto-email-delivery-frontend 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/app/javascript/src/translations/en.json +2 -1
- package/dist/.ready +1 -1
- package/dist/EmailDeliveryScreen.js +1 -1
- package/dist/{constants-DPhFGbtO.js → PageLayout-CUMq2CmP.js} +27 -27
- package/dist/PageLayout-CUMq2CmP.js.map +1 -0
- package/dist/{constants-DbB8UFcr.js → PageLayout-RWJHf21f.js} +27 -27
- package/dist/PageLayout-RWJHf21f.js.map +1 -0
- package/dist/SparkpostDomainSetup.js +3 -3
- package/dist/SparkpostDomainVerify.js +22 -295
- package/dist/SparkpostDomainVerify.js.map +1 -1
- package/dist/Verify-BDOXn-By.js +299 -0
- package/dist/Verify-BDOXn-By.js.map +1 -0
- package/dist/Verify-Cbn8WE7T.js +296 -0
- package/dist/Verify-Cbn8WE7T.js.map +1 -0
- package/dist/cjs/EmailDeliveryScreen.js +1 -1
- package/dist/cjs/SparkpostDomainSetup.js +7 -7
- package/dist/cjs/SparkpostDomainSetup.js.map +1 -1
- package/dist/cjs/SparkpostDomainVerify.js +23 -292
- package/dist/cjs/SparkpostDomainVerify.js.map +1 -1
- package/dist/cjs/index.js +28 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/{index-DmRq-yH1.js → index-BbOAmk2e.js} +8 -2
- package/dist/index-BbOAmk2e.js.map +1 -0
- package/dist/{index-53D1H-cp.js → index-YMe54v79.js} +8 -2
- package/dist/index-YMe54v79.js.map +1 -0
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/package.json +18 -18
- package/dist/constants-DPhFGbtO.js.map +0 -1
- package/dist/constants-DbB8UFcr.js.map +0 -1
- package/dist/index-53D1H-cp.js.map +0 -1
- package/dist/index-DmRq-yH1.js.map +0 -1
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@ structure, configs, data etc..
|
|
|
13
13
|
- [Installation](#installation-1)
|
|
14
14
|
- [Instructions for development](#instructions-for-development)
|
|
15
15
|
- [Usage](#usage-1)
|
|
16
|
-
2. [
|
|
16
|
+
2. [Automation testing endpoints](#automation-testing-endpoints)
|
|
17
|
+
3. [Instructions for Publishing](#instructions-for-publishing)
|
|
17
18
|
|
|
18
19
|
## Development with Host Application
|
|
19
20
|
|
|
@@ -43,7 +44,6 @@ structure, configs, data etc..
|
|
|
43
44
|
mount NeetoEmailDeliveryEngine::Engine, at: "/neeto_email_delivery"
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
|
|
47
47
|
4. Add required migrations in the `db/migrate` folder. Run the following
|
|
48
48
|
commands to copy the migrations from the engine to the host application.
|
|
49
49
|
|
|
@@ -329,6 +329,15 @@ mailers.
|
|
|
329
329
|
|
|
330
330
|
Override the base_email_service.rb as mentioned above in installation step 9.
|
|
331
331
|
|
|
332
|
+
## Automation testing endpoints
|
|
333
|
+
|
|
334
|
+
The engine exposes testing endpoints under
|
|
335
|
+
`/neeto_email_delivery/api/v1/testing` for use in automation tests. They let
|
|
336
|
+
tests connect Gmail/Outlook and verify sent emails without the browser OAuth
|
|
337
|
+
flow, and are disabled in production. Refer to the
|
|
338
|
+
[Testing Endpoints Guide](docs/email_delivery_testing_endpoints.md) for the
|
|
339
|
+
request/response shapes and instructions for obtaining refresh tokens.
|
|
340
|
+
|
|
332
341
|
```
|
|
333
342
|
|
|
334
343
|
## Instructions for Publishing
|
|
@@ -100,7 +100,8 @@
|
|
|
100
100
|
"disconnect": "Disconnect",
|
|
101
101
|
"setupDomain": "Setup domain",
|
|
102
102
|
"continueVerification": "Continue verification",
|
|
103
|
-
"verificationPending": "The verification for {{domain}} is pending. Please continue to the verification page to complete the verification process."
|
|
103
|
+
"verificationPending": "The verification for {{domain}} is pending. Please continue to the verification page to complete the verification process.",
|
|
104
|
+
"spfGuidance": "<bold>SPF guidance:</bold> We send emails through a shared sending infrastructure, so there is no fixed IP or CIDR to allowlist. If your organization requires an SPF entry, add <code>include:sparkpostmail.com</code> to your existing SPF record. This is optional, DKIM alignment already satisfies DMARC for your sender domain."
|
|
104
105
|
},
|
|
105
106
|
"toasts": {
|
|
106
107
|
"domainVerifiedConnected": "Domain verified and connected successfully!",
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-
|
|
1
|
+
Built at 2026-04-15T12:06:04.963Z
|
|
@@ -3,7 +3,7 @@ import '@bigbinary/neeto-icons/misc/Gmail';
|
|
|
3
3
|
import '@bigbinary/neeto-icons/misc/Outlook';
|
|
4
4
|
import '@bigbinary/neetoui/Spinner';
|
|
5
5
|
import 'react-i18next';
|
|
6
|
-
export { E as default } from './index-
|
|
6
|
+
export { E as default } from './index-BbOAmk2e.js';
|
|
7
7
|
import './useSparkpostDomain-DA1nrWS3.js';
|
|
8
8
|
import 'react/jsx-runtime';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var i18next = require('i18next');
|
|
4
|
+
var yup = require('yup');
|
|
3
5
|
require('@babel/runtime/helpers/defineProperty');
|
|
4
6
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
7
|
var react = require('react');
|
|
@@ -8,8 +10,6 @@ var Container = require('@bigbinary/neeto-molecules/Container');
|
|
|
8
10
|
require('@bigbinary/neeto-molecules/Header');
|
|
9
11
|
require('react-i18next');
|
|
10
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
-
var i18next = require('i18next');
|
|
12
|
-
var yup = require('yup');
|
|
13
13
|
|
|
14
14
|
function _interopNamespaceDefault(e) {
|
|
15
15
|
var n = Object.create(null);
|
|
@@ -30,30 +30,6 @@ function _interopNamespaceDefault(e) {
|
|
|
30
30
|
|
|
31
31
|
var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
|
|
32
32
|
|
|
33
|
-
var PageWrapper = function PageWrapper(_ref) {
|
|
34
|
-
var children = _ref.children,
|
|
35
|
-
_ref$className = _ref.className,
|
|
36
|
-
className = _ref$className === void 0 ? "" : _ref$className;
|
|
37
|
-
return /*#__PURE__*/jsxRuntime.jsx(Container, {
|
|
38
|
-
className: className,
|
|
39
|
-
children: children
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
var PageContent = /*#__PURE__*/react.forwardRef(function (_ref3, ref) {
|
|
43
|
-
var children = _ref3.children,
|
|
44
|
-
_ref3$className = _ref3.className,
|
|
45
|
-
className = _ref3$className === void 0 ? "" : _ref3$className;
|
|
46
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
47
|
-
className: "min-h-0 w-full grow",
|
|
48
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49
|
-
ref: ref,
|
|
50
|
-
className: classnames(["mx-auto max-w-7xl", className]),
|
|
51
|
-
children: children
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
PageContent.displayName = "PageContent";
|
|
56
|
-
|
|
57
33
|
var PURPOSE_COLORS = {
|
|
58
34
|
dkim: "info",
|
|
59
35
|
txt: "warning"
|
|
@@ -92,6 +68,30 @@ var VALIDATION_SCHEMA = yup__namespace.object().shape({
|
|
|
92
68
|
}))
|
|
93
69
|
});
|
|
94
70
|
|
|
71
|
+
var PageWrapper = function PageWrapper(_ref) {
|
|
72
|
+
var children = _ref.children,
|
|
73
|
+
_ref$className = _ref.className,
|
|
74
|
+
className = _ref$className === void 0 ? "" : _ref$className;
|
|
75
|
+
return /*#__PURE__*/jsxRuntime.jsx(Container, {
|
|
76
|
+
className: className,
|
|
77
|
+
children: children
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
var PageContent = /*#__PURE__*/react.forwardRef(function (_ref3, ref) {
|
|
81
|
+
var children = _ref3.children,
|
|
82
|
+
_ref3$className = _ref3.className,
|
|
83
|
+
className = _ref3$className === void 0 ? "" : _ref3$className;
|
|
84
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
85
|
+
className: "min-h-0 w-full grow",
|
|
86
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
87
|
+
ref: ref,
|
|
88
|
+
className: classnames(["mx-auto max-w-7xl", className]),
|
|
89
|
+
children: children
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
PageContent.displayName = "PageContent";
|
|
94
|
+
|
|
95
95
|
exports.DEFAULT_COLOR = DEFAULT_COLOR;
|
|
96
96
|
exports.INITIAL_VALUES = INITIAL_VALUES;
|
|
97
97
|
exports.PURPOSE_COLORS = PURPOSE_COLORS;
|
|
@@ -100,4 +100,4 @@ exports.PageWrapper = PageWrapper;
|
|
|
100
100
|
exports.VALIDATION_SCHEMA = VALIDATION_SCHEMA;
|
|
101
101
|
exports.VERIFICATION_STATUSES = VERIFICATION_STATUSES;
|
|
102
102
|
exports.VERIFICATION_STATUS_CONFIG = VERIFICATION_STATUS_CONFIG;
|
|
103
|
-
//# sourceMappingURL=
|
|
103
|
+
//# sourceMappingURL=PageLayout-CUMq2CmP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout-CUMq2CmP.js","sources":["../app/javascript/src/components/SparkpostDomain/constants.js","../app/javascript/src/components/PageLayout.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const PURPOSE_COLORS = { dkim: \"info\", txt: \"warning\" };\nexport const DEFAULT_COLOR = \"secondary\";\n\nexport const VERIFICATION_STATUSES = {\n SUCCESS: \"success\",\n ERROR: \"error\",\n PENDING: \"pending\",\n};\n\nexport const VERIFICATION_STATUS_CONFIG = {\n success: {\n style: \"success\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.successTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.successDescription\",\n },\n error: {\n style: \"danger\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.errorTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.errorDescription\",\n },\n pending: {\n style: \"warning\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.pendingTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.pendingDescription\",\n },\n};\n\nexport const INITIAL_VALUES = { email: \"\", displayName: \"\" };\n\nexport const VALIDATION_SCHEMA = yup.object().shape({\n email: yup\n .string()\n .trim()\n .required(t(\"neetoEmailDelivery.sparkpost.setup.validation.emailRequired\"))\n .email(t(\"neetoEmailDelivery.sparkpost.setup.validation.emailInvalid\")),\n displayName: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.sparkpost.setup.validation.requiredField\", {\n field: t(\"neetoEmailDelivery.sparkpost.setup.displayNameLabel\"),\n })\n ),\n});\n","import { forwardRef, memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { useTranslation } from \"react-i18next\";\n\nconst PageWrapper = ({ children, className = \"\" }) => (\n <Container {...{ className }}>{children}</Container>\n);\n\nconst PageHeader = ({\n title,\n actionBlock,\n breadcrumbs,\n titleHelpPopoverProps,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n const defaultBreadcrumbs = [\n { text: t(\"neetoEmailDelivery.settings\"), link: \"/\" },\n { text: title },\n ];\n\n return (\n <Header\n {...{ title, titleHelpPopoverProps, ...otherProps }}\n actionBlock={actionBlock && actionBlock}\n breadcrumbs={breadcrumbs ?? defaultBreadcrumbs}\n size=\"small\"\n />\n );\n};\n\nconst customPropEqualityCheck = (prevProps, nextProps) =>\n prevProps.title === nextProps.title &&\n prevProps.breadcrumbs === nextProps.breadcrumbs;\nconst MemoizedPageHeader = memo(PageHeader, customPropEqualityCheck);\n\nconst PageContent = forwardRef(({ children, className = \"\" }, ref) => (\n <div className=\"min-h-0 w-full grow\">\n <div {...{ ref }} className={classnames([\"mx-auto max-w-7xl\", className])}>\n {children}\n </div>\n </div>\n));\n\nPageContent.displayName = \"PageContent\";\n\nexport { PageWrapper, MemoizedPageHeader as PageHeader, PageContent };\n"],"names":["PURPOSE_COLORS","dkim","txt","DEFAULT_COLOR","VERIFICATION_STATUSES","SUCCESS","ERROR","PENDING","VERIFICATION_STATUS_CONFIG","success","style","titleKey","descriptionKey","error","pending","INITIAL_VALUES","email","displayName","VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","field","PageWrapper","_ref","children","_ref$className","className","_jsx","Container","PageContent","forwardRef","_ref3","ref","_ref3$className","classnames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,cAAc,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,GAAG,EAAE;AAAU;AACtD,IAAMC,aAAa,GAAG;AAEtB,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE;AACX;AAEO,IAAMC,0BAA0B,GAAG;AACxCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,KAAK,EAAE,SAAS;AAChBC,IAAAA,QAAQ,EAAE,kDAAkD;AAC5DC,IAAAA,cAAc,EAAE;GACjB;AACDC,EAAAA,KAAK,EAAE;AACLH,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,QAAQ,EAAE,gDAAgD;AAC1DC,IAAAA,cAAc,EAAE;GACjB;AACDE,EAAAA,OAAO,EAAE;AACPJ,IAAAA,KAAK,EAAE,SAAS;AAChBC,IAAAA,QAAQ,EAAE,kDAAkD;AAC5DC,IAAAA,cAAc,EAAE;AAClB;AACF;AAEO,IAAMG,cAAc,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,WAAW,EAAE;AAAG;AAEpD,IAAMC,iBAAiB,GAAGC,cAAG,CAACC,MAAM,EAAE,CAACC,KAAK,CAAC;EAClDL,KAAK,EAAEG,cAAG,CACPG,MAAM,EAAE,CACRC,IAAI,EAAE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|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { t } from 'i18next';
|
|
2
|
+
import * as yup from 'yup';
|
|
1
3
|
import '@babel/runtime/helpers/defineProperty';
|
|
2
4
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
5
|
import { forwardRef } from 'react';
|
|
@@ -6,32 +8,6 @@ import Container from '@bigbinary/neeto-molecules/Container';
|
|
|
6
8
|
import '@bigbinary/neeto-molecules/Header';
|
|
7
9
|
import 'react-i18next';
|
|
8
10
|
import { jsx } from 'react/jsx-runtime';
|
|
9
|
-
import { t } from 'i18next';
|
|
10
|
-
import * as yup from 'yup';
|
|
11
|
-
|
|
12
|
-
var PageWrapper = function PageWrapper(_ref) {
|
|
13
|
-
var children = _ref.children,
|
|
14
|
-
_ref$className = _ref.className,
|
|
15
|
-
className = _ref$className === void 0 ? "" : _ref$className;
|
|
16
|
-
return /*#__PURE__*/jsx(Container, {
|
|
17
|
-
className: className,
|
|
18
|
-
children: children
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var PageContent = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
22
|
-
var children = _ref3.children,
|
|
23
|
-
_ref3$className = _ref3.className,
|
|
24
|
-
className = _ref3$className === void 0 ? "" : _ref3$className;
|
|
25
|
-
return /*#__PURE__*/jsx("div", {
|
|
26
|
-
className: "min-h-0 w-full grow",
|
|
27
|
-
children: /*#__PURE__*/jsx("div", {
|
|
28
|
-
ref: ref,
|
|
29
|
-
className: classnames(["mx-auto max-w-7xl", className]),
|
|
30
|
-
children: children
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
PageContent.displayName = "PageContent";
|
|
35
11
|
|
|
36
12
|
var PURPOSE_COLORS = {
|
|
37
13
|
dkim: "info",
|
|
@@ -71,5 +47,29 @@ var VALIDATION_SCHEMA = yup.object().shape({
|
|
|
71
47
|
}))
|
|
72
48
|
});
|
|
73
49
|
|
|
50
|
+
var PageWrapper = function PageWrapper(_ref) {
|
|
51
|
+
var children = _ref.children,
|
|
52
|
+
_ref$className = _ref.className,
|
|
53
|
+
className = _ref$className === void 0 ? "" : _ref$className;
|
|
54
|
+
return /*#__PURE__*/jsx(Container, {
|
|
55
|
+
className: className,
|
|
56
|
+
children: children
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var PageContent = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
60
|
+
var children = _ref3.children,
|
|
61
|
+
_ref3$className = _ref3.className,
|
|
62
|
+
className = _ref3$className === void 0 ? "" : _ref3$className;
|
|
63
|
+
return /*#__PURE__*/jsx("div", {
|
|
64
|
+
className: "min-h-0 w-full grow",
|
|
65
|
+
children: /*#__PURE__*/jsx("div", {
|
|
66
|
+
ref: ref,
|
|
67
|
+
className: classnames(["mx-auto max-w-7xl", className]),
|
|
68
|
+
children: children
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
PageContent.displayName = "PageContent";
|
|
73
|
+
|
|
74
74
|
export { DEFAULT_COLOR as D, INITIAL_VALUES as I, PageWrapper as P, VALIDATION_SCHEMA as V, PageContent as a, PURPOSE_COLORS as b, VERIFICATION_STATUS_CONFIG as c, VERIFICATION_STATUSES as d };
|
|
75
|
-
//# sourceMappingURL=
|
|
75
|
+
//# sourceMappingURL=PageLayout-RWJHf21f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout-RWJHf21f.js","sources":["../app/javascript/src/components/SparkpostDomain/constants.js","../app/javascript/src/components/PageLayout.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const PURPOSE_COLORS = { dkim: \"info\", txt: \"warning\" };\nexport const DEFAULT_COLOR = \"secondary\";\n\nexport const VERIFICATION_STATUSES = {\n SUCCESS: \"success\",\n ERROR: \"error\",\n PENDING: \"pending\",\n};\n\nexport const VERIFICATION_STATUS_CONFIG = {\n success: {\n style: \"success\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.successTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.successDescription\",\n },\n error: {\n style: \"danger\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.errorTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.errorDescription\",\n },\n pending: {\n style: \"warning\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.pendingTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.pendingDescription\",\n },\n};\n\nexport const INITIAL_VALUES = { email: \"\", displayName: \"\" };\n\nexport const VALIDATION_SCHEMA = yup.object().shape({\n email: yup\n .string()\n .trim()\n .required(t(\"neetoEmailDelivery.sparkpost.setup.validation.emailRequired\"))\n .email(t(\"neetoEmailDelivery.sparkpost.setup.validation.emailInvalid\")),\n displayName: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.sparkpost.setup.validation.requiredField\", {\n field: t(\"neetoEmailDelivery.sparkpost.setup.displayNameLabel\"),\n })\n ),\n});\n","import { forwardRef, memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { useTranslation } from \"react-i18next\";\n\nconst PageWrapper = ({ children, className = \"\" }) => (\n <Container {...{ className }}>{children}</Container>\n);\n\nconst PageHeader = ({\n title,\n actionBlock,\n breadcrumbs,\n titleHelpPopoverProps,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n const defaultBreadcrumbs = [\n { text: t(\"neetoEmailDelivery.settings\"), link: \"/\" },\n { text: title },\n ];\n\n return (\n <Header\n {...{ title, titleHelpPopoverProps, ...otherProps }}\n actionBlock={actionBlock && actionBlock}\n breadcrumbs={breadcrumbs ?? defaultBreadcrumbs}\n size=\"small\"\n />\n );\n};\n\nconst customPropEqualityCheck = (prevProps, nextProps) =>\n prevProps.title === nextProps.title &&\n prevProps.breadcrumbs === nextProps.breadcrumbs;\nconst MemoizedPageHeader = memo(PageHeader, customPropEqualityCheck);\n\nconst PageContent = forwardRef(({ children, className = \"\" }, ref) => (\n <div className=\"min-h-0 w-full grow\">\n <div {...{ ref }} className={classnames([\"mx-auto max-w-7xl\", className])}>\n {children}\n </div>\n </div>\n));\n\nPageContent.displayName = \"PageContent\";\n\nexport { PageWrapper, MemoizedPageHeader as PageHeader, PageContent };\n"],"names":["PURPOSE_COLORS","dkim","txt","DEFAULT_COLOR","VERIFICATION_STATUSES","SUCCESS","ERROR","PENDING","VERIFICATION_STATUS_CONFIG","success","style","titleKey","descriptionKey","error","pending","INITIAL_VALUES","email","displayName","VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","field","PageWrapper","_ref","children","_ref$className","className","_jsx","Container","PageContent","forwardRef","_ref3","ref","_ref3$className","classnames"],"mappings":";;;;;;;;;;;AAGO,IAAMA,cAAc,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,GAAG,EAAE;AAAU;AACtD,IAAMC,aAAa,GAAG;AAEtB,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE;AACX;AAEO,IAAMC,0BAA0B,GAAG;AACxCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,KAAK,EAAE,SAAS;AAChBC,IAAAA,QAAQ,EAAE,kDAAkD;AAC5DC,IAAAA,cAAc,EAAE;GACjB;AACDC,EAAAA,KAAK,EAAE;AACLH,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,QAAQ,EAAE,gDAAgD;AAC1DC,IAAAA,cAAc,EAAE;GACjB;AACDE,EAAAA,OAAO,EAAE;AACPJ,IAAAA,KAAK,EAAE,SAAS;AAChBC,IAAAA,QAAQ,EAAE,kDAAkD;AAC5DC,IAAAA,cAAc,EAAE;AAClB;AACF;AAEO,IAAMG,cAAc,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,WAAW,EAAE;AAAG;AAEpD,I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,CAAE;AAAAF,MAAAA,QAAA,EACvEA;KACE;AAAC,GACH,CAAC;AAAA,CACP;AAEDK,WAAW,CAACjB,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -7,18 +7,18 @@ import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
|
7
7
|
import Form from '@bigbinary/neetoui/formik/Form';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { useHistory } from 'react-router-dom';
|
|
10
|
-
import { P as PageWrapper, a as PageContent, V as VALIDATION_SCHEMA, I as INITIAL_VALUES } from './
|
|
10
|
+
import { P as PageWrapper, a as PageContent, V as VALIDATION_SCHEMA, I as INITIAL_VALUES } from './PageLayout-RWJHf21f.js';
|
|
11
11
|
import { u as useSparkpostDomain } from './useSparkpostDomain-DA1nrWS3.js';
|
|
12
12
|
import { u as useFetchConnectedIntegration } from './useEmailDeliveryIntegrationApi-Dk9WPotT.js';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
+
import 'i18next';
|
|
15
|
+
import 'yup';
|
|
14
16
|
import '@babel/runtime/helpers/defineProperty';
|
|
15
17
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
16
18
|
import 'react';
|
|
17
19
|
import 'classnames';
|
|
18
20
|
import '@bigbinary/neeto-molecules/Container';
|
|
19
21
|
import '@bigbinary/neeto-molecules/Header';
|
|
20
|
-
import 'i18next';
|
|
21
|
-
import 'yup';
|
|
22
22
|
import '@babel/runtime/helpers/slicedToArray';
|
|
23
23
|
import '@tanstack/react-query';
|
|
24
24
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -1,306 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
18
|
-
import Button from '@bigbinary/neetoui/Button';
|
|
19
|
-
import Callout from '@bigbinary/neetoui/Callout';
|
|
1
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
4
|
+
import '@bigbinary/neeto-molecules/CardLayout';
|
|
5
|
+
import '@bigbinary/neetoui/Spinner';
|
|
6
|
+
import 'ramda';
|
|
7
|
+
import 'react-i18next';
|
|
8
|
+
import 'react-router-dom';
|
|
9
|
+
import './PageLayout-RWJHf21f.js';
|
|
10
|
+
import './useSparkpostDomain-DA1nrWS3.js';
|
|
11
|
+
import './useEmailDeliveryIntegrationApi-Dk9WPotT.js';
|
|
12
|
+
import './useSparkpostApi-B-D8RNRF.js';
|
|
13
|
+
export { S as default } from './Verify-Cbn8WE7T.js';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
15
|
+
import 'i18next';
|
|
16
|
+
import 'yup';
|
|
20
17
|
import '@babel/runtime/helpers/defineProperty';
|
|
21
18
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
22
19
|
import 'classnames';
|
|
23
20
|
import '@bigbinary/neeto-molecules/Container';
|
|
24
21
|
import '@bigbinary/neeto-molecules/Header';
|
|
25
|
-
import 'i18next';
|
|
26
|
-
import 'yup';
|
|
27
22
|
import '@tanstack/react-query';
|
|
28
23
|
import '@bigbinary/neetoui/Toastr';
|
|
29
24
|
import '@bigbinary/neeto-cist';
|
|
30
25
|
import 'axios';
|
|
31
26
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
className: "flex w-full flex-col gap-2",
|
|
39
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
40
|
-
className: "flex items-center justify-between",
|
|
41
|
-
children: /*#__PURE__*/jsx(Typography, {
|
|
42
|
-
style: "h5",
|
|
43
|
-
children: label
|
|
44
|
-
})
|
|
45
|
-
}), /*#__PURE__*/jsxs("code", {
|
|
46
|
-
className: "neeto-ui-text-gray-800 neeto-ui-bg-gray-100 neeto-ui-rounded-md relative block p-4 pe-10 font-mono text-xs break-all",
|
|
47
|
-
"data-testid": dataTestid,
|
|
48
|
-
children: [value, /*#__PURE__*/jsx(CopyToClipboardButton, {
|
|
49
|
-
value: value,
|
|
50
|
-
className: "absolute top-1 end-1 shrink-0",
|
|
51
|
-
style: "tertiary"
|
|
52
|
-
})]
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
var DnsRecordsSection = function DnsRecordsSection(_ref) {
|
|
58
|
-
var dnsRecords = _ref.dnsRecords,
|
|
59
|
-
domain = _ref.domain,
|
|
60
|
-
sparkpostData = _ref.sparkpostData;
|
|
61
|
-
var _useTranslation = useTranslation(),
|
|
62
|
-
t = _useTranslation.t;
|
|
63
|
-
var formatPurpose = function formatPurpose(purpose) {
|
|
64
|
-
switch (purpose) {
|
|
65
|
-
case "dkim":
|
|
66
|
-
return t("neetoEmailDelivery.sparkpost.dnsRecords.dkimSigning");
|
|
67
|
-
case "txt":
|
|
68
|
-
return t("neetoEmailDelivery.sparkpost.dnsRecords.txtVerification");
|
|
69
|
-
default:
|
|
70
|
-
return purpose;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var formatRecordName = function formatRecordName(hostname) {
|
|
74
|
-
if (!hostname) return "";
|
|
75
|
-
return hostname.endsWith(".".concat(domain)) ? hostname : "".concat(hostname, ".").concat(domain);
|
|
76
|
-
};
|
|
77
|
-
var status = sparkpostData.status,
|
|
78
|
-
txtVerificationValue = sparkpostData.txtVerificationValue,
|
|
79
|
-
txtVerificationHostname = sparkpostData.txtVerificationHostname;
|
|
80
|
-
var allRecords = [];
|
|
81
|
-
var isTxtUnverified = status === "txt_unverified";
|
|
82
|
-
if (isTxtUnverified) {
|
|
83
|
-
if (txtVerificationValue && txtVerificationHostname) {
|
|
84
|
-
allRecords.push({
|
|
85
|
-
type: "TXT",
|
|
86
|
-
purpose: "txt",
|
|
87
|
-
hostname: txtVerificationHostname,
|
|
88
|
-
value: txtVerificationValue
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
allRecords.push.apply(allRecords, _toConsumableArray(dnsRecords));
|
|
93
|
-
}
|
|
94
|
-
if (isEmpty(allRecords)) {
|
|
95
|
-
return /*#__PURE__*/jsx("div", {
|
|
96
|
-
className: "p-8 text-center",
|
|
97
|
-
children: /*#__PURE__*/jsx(Typography, {
|
|
98
|
-
className: "neeto-ui-text-gray-600",
|
|
99
|
-
style: "body2",
|
|
100
|
-
children: sparkpostData !== null && sparkpostData !== void 0 && sparkpostData.connected ? t("neetoEmailDelivery.sparkpost.dnsRecords.alreadyVerified") : t("neetoEmailDelivery.sparkpost.dnsRecords.loading")
|
|
101
|
-
})
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
return /*#__PURE__*/jsxs("div", {
|
|
105
|
-
className: "flex flex-col gap-4",
|
|
106
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
107
|
-
style: "h4",
|
|
108
|
-
weight: "medium",
|
|
109
|
-
children: t("neetoEmailDelivery.sparkpost.dnsRecords.title")
|
|
110
|
-
}), allRecords.map(function (record, index) {
|
|
111
|
-
return /*#__PURE__*/jsxs("div", {
|
|
112
|
-
className: "neeto-ui-rounded-lg neeto-ui-bg-white neeto-ui-border-gray-300 border p-3",
|
|
113
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
114
|
-
className: "mb-4 flex items-center justify-between",
|
|
115
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
116
|
-
className: "flex items-center gap-2",
|
|
117
|
-
children: [/*#__PURE__*/jsx(Tag, {
|
|
118
|
-
label: formatPurpose(record.purpose),
|
|
119
|
-
size: "small",
|
|
120
|
-
style: PURPOSE_COLORS[record.purpose] || DEFAULT_COLOR
|
|
121
|
-
}), /*#__PURE__*/jsx(Tag, {
|
|
122
|
-
label: record.type,
|
|
123
|
-
size: "small",
|
|
124
|
-
style: "secondary"
|
|
125
|
-
})]
|
|
126
|
-
})
|
|
127
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
128
|
-
className: "flex flex-col gap-4",
|
|
129
|
-
children: [/*#__PURE__*/jsx(RecordField, {
|
|
130
|
-
dataTestid: "record-name",
|
|
131
|
-
label: t("neetoEmailDelivery.sparkpost.dnsRecords.nameLabel"),
|
|
132
|
-
value: formatRecordName(record.hostname)
|
|
133
|
-
}), /*#__PURE__*/jsx(RecordField, {
|
|
134
|
-
dataTestid: "record-value",
|
|
135
|
-
label: t("neetoEmailDelivery.sparkpost.dnsRecords.valueLabel"),
|
|
136
|
-
value: record.value
|
|
137
|
-
})]
|
|
138
|
-
})]
|
|
139
|
-
}, index);
|
|
140
|
-
})]
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
var VerificationActions = withT(function (_ref) {
|
|
145
|
-
var t = _ref.t,
|
|
146
|
-
isVerifying = _ref.isVerifying,
|
|
147
|
-
verificationStatus = _ref.verificationStatus,
|
|
148
|
-
onVerify = _ref.onVerify,
|
|
149
|
-
onCancel = _ref.onCancel;
|
|
150
|
-
return /*#__PURE__*/jsxs("div", {
|
|
151
|
-
className: "flex gap-3",
|
|
152
|
-
children: [/*#__PURE__*/jsx(Button, {
|
|
153
|
-
"data-testid": "verify-domain-button",
|
|
154
|
-
disabled: isVerifying || verificationStatus === "success",
|
|
155
|
-
loading: isVerifying,
|
|
156
|
-
onClick: onVerify,
|
|
157
|
-
children: isVerifying ? t("neetoEmailDelivery.sparkpost.verify.verifying") : t("neetoEmailDelivery.sparkpost.verify.verifyDomain")
|
|
158
|
-
}), /*#__PURE__*/jsx(Button, {
|
|
159
|
-
"data-testid": "cancel-button",
|
|
160
|
-
disabled: isVerifying,
|
|
161
|
-
style: "secondary",
|
|
162
|
-
onClick: onCancel,
|
|
163
|
-
children: t("neetoEmailDelivery.sparkpost.verify.cancel")
|
|
164
|
-
})]
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
var VerificationInstructions = function VerificationInstructions() {
|
|
169
|
-
var _useTranslation = useTranslation(),
|
|
170
|
-
t = _useTranslation.t;
|
|
171
|
-
var instructionText = t("neetoEmailDelivery.sparkpost.instructions.fullText");
|
|
172
|
-
var lines = instructionText.split("\n");
|
|
173
|
-
return /*#__PURE__*/jsx(Callout, {
|
|
174
|
-
style: "info",
|
|
175
|
-
children: /*#__PURE__*/jsx("div", {
|
|
176
|
-
className: "w-full",
|
|
177
|
-
children: /*#__PURE__*/jsx(Typography, {
|
|
178
|
-
style: "body2",
|
|
179
|
-
children: lines.map(function (line, index) {
|
|
180
|
-
return /*#__PURE__*/jsxs("span", {
|
|
181
|
-
children: [line, index < lines.length - 1 && /*#__PURE__*/jsx("br", {})]
|
|
182
|
-
}, index);
|
|
183
|
-
})
|
|
184
|
-
})
|
|
185
|
-
})
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
var VerificationStatusCallout = function VerificationStatusCallout(_ref) {
|
|
190
|
-
var verificationStatus = _ref.verificationStatus;
|
|
191
|
-
var _useTranslation = useTranslation(),
|
|
192
|
-
t = _useTranslation.t;
|
|
193
|
-
var config = VERIFICATION_STATUS_CONFIG[verificationStatus];
|
|
194
|
-
if (!config) return null;
|
|
195
|
-
return /*#__PURE__*/jsx(Callout, {
|
|
196
|
-
style: config.style,
|
|
197
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
198
|
-
className: "space-y-1",
|
|
199
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
200
|
-
style: "body2",
|
|
201
|
-
weight: "medium",
|
|
202
|
-
children: t(config.titleKey)
|
|
203
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
204
|
-
style: "body3",
|
|
205
|
-
children: t(config.descriptionKey)
|
|
206
|
-
})]
|
|
207
|
-
})
|
|
208
|
-
});
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
var SparkpostDomainVerify = function SparkpostDomainVerify(_ref) {
|
|
212
|
-
var ownerId = _ref.ownerId,
|
|
213
|
-
canManageIntegrations = _ref.canManageIntegrations,
|
|
214
|
-
emailDeliveryIndexRoute = _ref.emailDeliveryIndexRoute;
|
|
215
|
-
var _useState = useState(""),
|
|
216
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
217
|
-
verificationStatus = _useState2[0],
|
|
218
|
-
setVerificationStatus = _useState2[1];
|
|
219
|
-
var _useTranslation = useTranslation(),
|
|
220
|
-
t = _useTranslation.t;
|
|
221
|
-
var history = useHistory();
|
|
222
|
-
var _useFetchConnectedInt = useFetchConnectedIntegration(ownerId),
|
|
223
|
-
integration = _useFetchConnectedInt.integration,
|
|
224
|
-
isIntegrationLoading = _useFetchConnectedInt.isLoading;
|
|
225
|
-
var hasConnectedIntegration = integration && !integration.isPending;
|
|
226
|
-
var _useQueryParams = useQueryParams(),
|
|
227
|
-
queryDomain = _useQueryParams.domain;
|
|
228
|
-
var _useFetchSparkpostDom = useFetchSparkpostDomain(ownerId),
|
|
229
|
-
sparkpostData = _useFetchSparkpostDom.data,
|
|
230
|
-
isLoading = _useFetchSparkpostDom.isLoading;
|
|
231
|
-
var _useSparkpostDomain = useSparkpostDomain({
|
|
232
|
-
ownerId: ownerId,
|
|
233
|
-
canManageIntegrations: canManageIntegrations
|
|
234
|
-
}),
|
|
235
|
-
onVerifyDomain = _useSparkpostDomain.onVerifyDomain,
|
|
236
|
-
isVerifying = _useSparkpostDomain.isVerifying;
|
|
237
|
-
var domain = pathOr(queryDomain, ["domain"], sparkpostData);
|
|
238
|
-
var dnsRecords = pathOr([], ["verificationRecords"], sparkpostData);
|
|
239
|
-
useEffect(function () {
|
|
240
|
-
// Check if domain is already verified
|
|
241
|
-
if (!(sparkpostData !== null && sparkpostData !== void 0 && sparkpostData.connected)) return;
|
|
242
|
-
setVerificationStatus(VERIFICATION_STATUSES.SUCCESS);
|
|
243
|
-
setTimeout(function () {
|
|
244
|
-
history.push(emailDeliveryIndexRoute);
|
|
245
|
-
}, 5000);
|
|
246
|
-
}, [sparkpostData, emailDeliveryIndexRoute, history]);
|
|
247
|
-
var handleVerify = function handleVerify() {
|
|
248
|
-
onVerifyDomain(function (response) {
|
|
249
|
-
if ((response === null || response === void 0 ? void 0 : response.status) === "active") {
|
|
250
|
-
setVerificationStatus(VERIFICATION_STATUSES.SUCCESS);
|
|
251
|
-
setTimeout(function () {
|
|
252
|
-
history.push(emailDeliveryIndexRoute);
|
|
253
|
-
}, 3000);
|
|
254
|
-
} else {
|
|
255
|
-
setVerificationStatus(VERIFICATION_STATUSES.PENDING);
|
|
256
|
-
}
|
|
257
|
-
}, function (_error) {
|
|
258
|
-
setVerificationStatus(VERIFICATION_STATUSES.ERROR);
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
var isVerificationSuccessful = verificationStatus === VERIFICATION_STATUSES.SUCCESS;
|
|
262
|
-
var handleCancel = function handleCancel() {
|
|
263
|
-
history.push(emailDeliveryIndexRoute);
|
|
264
|
-
};
|
|
265
|
-
if (isLoading || isIntegrationLoading) {
|
|
266
|
-
return /*#__PURE__*/jsx("div", {
|
|
267
|
-
className: "flex justify-center p-6",
|
|
268
|
-
children: /*#__PURE__*/jsx(Spinner, {})
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
if (hasConnectedIntegration) {
|
|
272
|
-
history.replace(emailDeliveryIndexRoute);
|
|
273
|
-
return null;
|
|
274
|
-
}
|
|
275
|
-
return /*#__PURE__*/jsx(PageWrapper, {
|
|
276
|
-
children: /*#__PURE__*/jsx(PageContent, {
|
|
277
|
-
children: /*#__PURE__*/jsx(CardLayout, {
|
|
278
|
-
title: t("neetoEmailDelivery.sparkpost.verify.title"),
|
|
279
|
-
actionBlock: /*#__PURE__*/jsx(VerificationActions, {
|
|
280
|
-
isVerifying: isVerifying,
|
|
281
|
-
verificationStatus: verificationStatus,
|
|
282
|
-
onCancel: handleCancel,
|
|
283
|
-
onVerify: handleVerify
|
|
284
|
-
}),
|
|
285
|
-
description: t("neetoEmailDelivery.sparkpost.verify.description", {
|
|
286
|
-
domain: domain
|
|
287
|
-
}).replace(/<strong>|<\/strong>/g, ""),
|
|
288
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
289
|
-
className: "flex flex-col gap-4",
|
|
290
|
-
children: [/*#__PURE__*/jsx(VerificationStatusCallout, {
|
|
291
|
-
verificationStatus: verificationStatus
|
|
292
|
-
}), !isVerificationSuccessful && /*#__PURE__*/jsxs(Fragment, {
|
|
293
|
-
children: [/*#__PURE__*/jsx(DnsRecordsSection, {
|
|
294
|
-
dnsRecords: dnsRecords,
|
|
295
|
-
domain: domain,
|
|
296
|
-
sparkpostData: sparkpostData
|
|
297
|
-
}), /*#__PURE__*/jsx(VerificationInstructions, {})]
|
|
298
|
-
})]
|
|
299
|
-
})
|
|
300
|
-
})
|
|
301
|
-
})
|
|
302
|
-
});
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
export { SparkpostDomainVerify as default };
|
|
27
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
28
|
+
import '@bigbinary/neetoui/Typography';
|
|
29
|
+
import '@bigbinary/neetoui/Tag';
|
|
30
|
+
import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
31
|
+
import '@bigbinary/neetoui/Button';
|
|
32
|
+
import '@bigbinary/neetoui/Callout';
|
|
306
33
|
//# sourceMappingURL=SparkpostDomainVerify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparkpostDomainVerify.js","sources":["../app/javascript/src/components/SparkpostDomain/RecordField.jsx","../app/javascript/src/components/SparkpostDomain/DnsRecordsSection.jsx","../app/javascript/src/components/SparkpostDomain/VerificationActions.jsx","../app/javascript/src/components/SparkpostDomain/VerificationInstructions.jsx","../app/javascript/src/components/SparkpostDomain/VerificationStatusCallout.jsx","../app/javascript/src/components/SparkpostDomain/Verify.jsx"],"sourcesContent":["import CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Typography } from \"neetoui\";\n\nconst RecordField = ({ label, value, dataTestid }) => (\n <div className=\"flex w-full flex-col gap-2\">\n <div className=\"flex items-center justify-between\">\n <Typography style=\"h5\">{label}</Typography>\n </div>\n <code\n className=\"neeto-ui-text-gray-800 neeto-ui-bg-gray-100 neeto-ui-rounded-md relative block p-4 pe-10 font-mono text-xs break-all\"\n data-testid={dataTestid}\n >\n {value}\n <CopyToClipboardButton\n {...{ value }}\n className=\"absolute top-1 end-1 shrink-0\"\n style=\"tertiary\"\n />\n </code>\n </div>\n);\n\nexport default RecordField;\n","import { Typography, Tag } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { PURPOSE_COLORS, DEFAULT_COLOR } from \"./constants\";\nimport RecordField from \"./RecordField\";\n\nconst DnsRecordsSection = ({ dnsRecords, domain, sparkpostData }) => {\n const { t } = useTranslation();\n\n const formatPurpose = purpose => {\n switch (purpose) {\n case \"dkim\":\n return t(\"neetoEmailDelivery.sparkpost.dnsRecords.dkimSigning\");\n case \"txt\":\n return t(\"neetoEmailDelivery.sparkpost.dnsRecords.txtVerification\");\n default:\n return purpose;\n }\n };\n\n const formatRecordName = hostname => {\n if (!hostname) return \"\";\n\n return hostname.endsWith(`.${domain}`) ? hostname : `${hostname}.${domain}`;\n };\n\n const { status, txtVerificationValue, txtVerificationHostname } =\n sparkpostData;\n\n const allRecords = [];\n const isTxtUnverified = status === \"txt_unverified\";\n\n if (isTxtUnverified) {\n if (txtVerificationValue && txtVerificationHostname) {\n allRecords.push({\n type: \"TXT\",\n purpose: \"txt\",\n hostname: txtVerificationHostname,\n value: txtVerificationValue,\n });\n }\n } else {\n allRecords.push(...dnsRecords);\n }\n\n if (isEmpty(allRecords)) {\n return (\n <div className=\"p-8 text-center\">\n <Typography className=\"neeto-ui-text-gray-600\" style=\"body2\">\n {sparkpostData?.connected\n ? t(\"neetoEmailDelivery.sparkpost.dnsRecords.alreadyVerified\")\n : t(\"neetoEmailDelivery.sparkpost.dnsRecords.loading\")}\n </Typography>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col gap-4\">\n <Typography style=\"h4\" weight=\"medium\">\n {t(\"neetoEmailDelivery.sparkpost.dnsRecords.title\")}\n </Typography>\n {allRecords.map((record, index) => (\n <div\n className=\"neeto-ui-rounded-lg neeto-ui-bg-white neeto-ui-border-gray-300 border p-3\"\n key={index}\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <Tag\n label={formatPurpose(record.purpose)}\n size=\"small\"\n style={PURPOSE_COLORS[record.purpose] || DEFAULT_COLOR}\n />\n <Tag label={record.type} size=\"small\" style=\"secondary\" />\n </div>\n </div>\n <div className=\"flex flex-col gap-4\">\n <RecordField\n dataTestid=\"record-name\"\n label={t(\"neetoEmailDelivery.sparkpost.dnsRecords.nameLabel\")}\n value={formatRecordName(record.hostname)}\n />\n <RecordField\n dataTestid=\"record-value\"\n label={t(\"neetoEmailDelivery.sparkpost.dnsRecords.valueLabel\")}\n value={record.value}\n />\n </div>\n </div>\n ))}\n </div>\n );\n};\n\nexport default DnsRecordsSection;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Button } from \"neetoui\";\n\nconst VerificationActions = withT(\n ({ t, isVerifying, verificationStatus, onVerify, onCancel }) => (\n <div className=\"flex gap-3\">\n <Button\n data-testid=\"verify-domain-button\"\n disabled={isVerifying || verificationStatus === \"success\"}\n loading={isVerifying}\n onClick={onVerify}\n >\n {isVerifying\n ? t(\"neetoEmailDelivery.sparkpost.verify.verifying\")\n : t(\"neetoEmailDelivery.sparkpost.verify.verifyDomain\")}\n </Button>\n <Button\n data-testid=\"cancel-button\"\n disabled={isVerifying}\n style=\"secondary\"\n onClick={onCancel}\n >\n {t(\"neetoEmailDelivery.sparkpost.verify.cancel\")}\n </Button>\n </div>\n )\n);\n\nexport default VerificationActions;\n","import { Typography, Callout } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst VerificationInstructions = () => {\n const { t } = useTranslation();\n\n const instructionText = t(\n \"neetoEmailDelivery.sparkpost.instructions.fullText\"\n );\n const lines = instructionText.split(\"\\n\");\n\n return (\n <Callout style=\"info\">\n <div className=\"w-full\">\n <Typography style=\"body2\">\n {lines.map((line, index) => (\n <span key={index}>\n {line}\n {index < lines.length - 1 && <br />}\n </span>\n ))}\n </Typography>\n </div>\n </Callout>\n );\n};\n\nexport default VerificationInstructions;\n","import { Callout, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { VERIFICATION_STATUS_CONFIG } from \"./constants\";\n\nconst VerificationStatusCallout = ({ verificationStatus }) => {\n const { t } = useTranslation();\n\n const config = VERIFICATION_STATUS_CONFIG[verificationStatus];\n\n if (!config) return null;\n\n return (\n <Callout style={config.style}>\n <div className=\"space-y-1\">\n <Typography style=\"body2\" weight=\"medium\">\n {t(config.titleKey)}\n </Typography>\n <Typography style=\"body3\">{t(config.descriptionKey)}</Typography>\n </div>\n </Callout>\n );\n};\n\nexport default VerificationStatusCallout;\n","import { useState, useEffect } from \"react\";\n\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Spinner } from \"neetoui\";\nimport { pathOr } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { PageContent, PageWrapper } from \"components/PageLayout\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\nimport { useFetchConnectedIntegration } from \"hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi\";\nimport { useFetchSparkpostDomain } from \"hooks/reactQuery/integrations/useSparkpostApi\";\n\nimport { VERIFICATION_STATUSES } from \"./constants\";\nimport DnsRecordsSection from \"./DnsRecordsSection\";\nimport VerificationActions from \"./VerificationActions\";\nimport VerificationInstructions from \"./VerificationInstructions\";\nimport VerificationStatusCallout from \"./VerificationStatusCallout\";\n\nconst SparkpostDomainVerify = ({\n ownerId,\n canManageIntegrations,\n emailDeliveryIndexRoute,\n}) => {\n const [verificationStatus, setVerificationStatus] = useState(\"\");\n const { t } = useTranslation();\n\n const history = useHistory();\n\n const { integration, isLoading: isIntegrationLoading } =\n useFetchConnectedIntegration(ownerId);\n\n const hasConnectedIntegration = integration && !integration.isPending;\n\n const { domain: queryDomain } = useQueryParams();\n\n const { data: sparkpostData, isLoading } = useFetchSparkpostDomain(ownerId);\n const { onVerifyDomain, isVerifying } = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const domain = pathOr(queryDomain, [\"domain\"], sparkpostData);\n const dnsRecords = pathOr([], [\"verificationRecords\"], sparkpostData);\n\n useEffect(() => {\n // Check if domain is already verified\n if (!sparkpostData?.connected) return;\n setVerificationStatus(VERIFICATION_STATUSES.SUCCESS);\n setTimeout(() => {\n history.push(emailDeliveryIndexRoute);\n }, 5000);\n }, [sparkpostData, emailDeliveryIndexRoute, history]);\n\n const handleVerify = () => {\n onVerifyDomain(\n response => {\n if (response?.status === \"active\") {\n setVerificationStatus(VERIFICATION_STATUSES.SUCCESS);\n setTimeout(() => {\n history.push(emailDeliveryIndexRoute);\n }, 3000);\n } else {\n setVerificationStatus(VERIFICATION_STATUSES.PENDING);\n }\n },\n _error => {\n setVerificationStatus(VERIFICATION_STATUSES.ERROR);\n }\n );\n };\n\n const isVerificationSuccessful =\n verificationStatus === VERIFICATION_STATUSES.SUCCESS;\n\n const handleCancel = () => {\n history.push(emailDeliveryIndexRoute);\n };\n\n if (isLoading || isIntegrationLoading) {\n return (\n <div className=\"flex justify-center p-6\">\n <Spinner />\n </div>\n );\n }\n\n if (hasConnectedIntegration) {\n history.replace(emailDeliveryIndexRoute);\n\n return null;\n }\n\n return (\n <PageWrapper>\n <PageContent>\n <CardLayout\n title={t(\"neetoEmailDelivery.sparkpost.verify.title\")}\n actionBlock={\n <VerificationActions\n {...{ isVerifying, verificationStatus }}\n onCancel={handleCancel}\n onVerify={handleVerify}\n />\n }\n description={t(\"neetoEmailDelivery.sparkpost.verify.description\", {\n domain,\n }).replace(/<strong>|<\\/strong>/g, \"\")}\n >\n <div className=\"flex flex-col gap-4\">\n <VerificationStatusCallout {...{ verificationStatus }} />\n {!isVerificationSuccessful && (\n <>\n <DnsRecordsSection {...{ dnsRecords, domain, sparkpostData }} />\n <VerificationInstructions />\n </>\n )}\n </div>\n </CardLayout>\n </PageContent>\n </PageWrapper>\n );\n};\n\nexport default SparkpostDomainVerify;\n"],"names":["RecordField","_ref","label","value","dataTestid","_jsxs","className","children","_jsx","Typography","style","CopyToClipboardButton","DnsRecordsSection","dnsRecords","domain","sparkpostData","_useTranslation","useTranslation","t","formatPurpose","purpose","formatRecordName","hostname","endsWith","concat","status","txtVerificationValue","txtVerificationHostname","allRecords","isTxtUnverified","push","type","apply","_toConsumableArray","isEmpty","connected","weight","map","record","index","Tag","size","PURPOSE_COLORS","DEFAULT_COLOR","VerificationActions","withT","isVerifying","verificationStatus","onVerify","onCancel","Button","disabled","loading","onClick","VerificationInstructions","instructionText","lines","split","Callout","line","length","VerificationStatusCallout","config","VERIFICATION_STATUS_CONFIG","titleKey","descriptionKey","SparkpostDomainVerify","ownerId","canManageIntegrations","emailDeliveryIndexRoute","_useState","useState","_useState2","_slicedToArray","setVerificationStatus","history","useHistory","_useFetchConnectedInt","useFetchConnectedIntegration","integration","isIntegrationLoading","isLoading","hasConnectedIntegration","isPending","_useQueryParams","useQueryParams","queryDomain","_useFetchSparkpostDom","useFetchSparkpostDomain","data","_useSparkpostDomain","useSparkpostDomain","onVerifyDomain","pathOr","useEffect","VERIFICATION_STATUSES","SUCCESS","setTimeout","handleVerify","response","PENDING","_error","ERROR","isVerificationSuccessful","handleCancel","Spinner","replace","PageWrapper","PageContent","CardLayout","title","actionBlock","description","_Fragment"],"mappings":";;;;;;;;;;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