@bigbinary/neeto-email-delivery-frontend 1.0.34 → 1.0.35

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 (60) hide show
  1. package/README.md +4 -4
  2. package/dist/.ready +1 -1
  3. package/dist/EmailDeliveryScreen.js +193 -14
  4. package/dist/EmailDeliveryScreen.js.map +1 -1
  5. package/dist/PageLayout-B_USy8hj.js +75 -0
  6. package/dist/PageLayout-B_USy8hj.js.map +1 -0
  7. package/dist/PageLayout-pMKr_80l.js +103 -0
  8. package/dist/PageLayout-pMKr_80l.js.map +1 -0
  9. package/dist/SparkpostDomainSetup.js +3 -3
  10. package/dist/SparkpostDomainVerify.js +4 -4
  11. package/dist/Verify-80b6NK1q.js +295 -0
  12. package/dist/Verify-80b6NK1q.js.map +1 -0
  13. package/dist/{Verify-Cbn8WE7T.js → Verify-D0bZSCRH.js} +4 -4
  14. package/dist/{Verify-Cbn8WE7T.js.map → Verify-D0bZSCRH.js.map} +1 -1
  15. package/dist/Verify-Dnvx5OTi.js +292 -0
  16. package/dist/Verify-Dnvx5OTi.js.map +1 -0
  17. package/dist/cjs/EmailDeliveryScreen.js +189 -14
  18. package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
  19. package/dist/cjs/index.js +7 -6
  20. package/dist/cjs/index.js.map +1 -1
  21. package/dist/cjs/v2/EmailDeliveryScreen.js +201 -0
  22. package/dist/cjs/v2/EmailDeliveryScreen.js.map +1 -0
  23. package/dist/cjs/v2/SparkpostDomainSetup.js +140 -0
  24. package/dist/cjs/v2/SparkpostDomainSetup.js.map +1 -0
  25. package/dist/cjs/v2/SparkpostDomainVerify.js +35 -0
  26. package/dist/cjs/v2/SparkpostDomainVerify.js.map +1 -0
  27. package/dist/cjs/v2/hooks.js +17 -0
  28. package/dist/cjs/v2/hooks.js.map +1 -0
  29. package/dist/cjs/v2/index.js +522 -0
  30. package/dist/cjs/v2/index.js.map +1 -0
  31. package/dist/hooks.js +2 -2
  32. package/dist/index.js +8 -8
  33. package/dist/{useEmailDeliveryIntegrationApi-Dk9WPotT.js → useEmailDeliveryIntegrationApi-CfgmbuRA.js} +2 -2
  34. package/dist/{useEmailDeliveryIntegrationApi-Dk9WPotT.js.map → useEmailDeliveryIntegrationApi-CfgmbuRA.js.map} +1 -1
  35. package/dist/useSmtp-BCcRaVYr.js +136 -0
  36. package/dist/useSmtp-BCcRaVYr.js.map +1 -0
  37. package/dist/useSmtp-DxZlXdtr.js +132 -0
  38. package/dist/useSmtp-DxZlXdtr.js.map +1 -0
  39. package/dist/{useSparkpostApi-B-D8RNRF.js → useSparkpostApi-CQT4JD8-.js} +2 -2
  40. package/dist/{useSparkpostApi-B-D8RNRF.js.map → useSparkpostApi-CQT4JD8-.js.map} +1 -1
  41. package/dist/useSparkpostDomain-DDjj-dyF.js +99 -0
  42. package/dist/useSparkpostDomain-DDjj-dyF.js.map +1 -0
  43. package/dist/{useSparkpostDomain-DA1nrWS3.js → useSparkpostDomain-Dt4Q3GSP.js} +2 -2
  44. package/dist/{useSparkpostDomain-DA1nrWS3.js.map → useSparkpostDomain-Dt4Q3GSP.js.map} +1 -1
  45. package/dist/useSparkpostDomain-IJPoCQ0f.js +101 -0
  46. package/dist/useSparkpostDomain-IJPoCQ0f.js.map +1 -0
  47. package/dist/{index-BbOAmk2e.js → v2/EmailDeliveryScreen.js} +27 -148
  48. package/dist/v2/EmailDeliveryScreen.js.map +1 -0
  49. package/dist/v2/SparkpostDomainSetup.js +138 -0
  50. package/dist/v2/SparkpostDomainSetup.js.map +1 -0
  51. package/dist/v2/SparkpostDomainVerify.js +29 -0
  52. package/dist/v2/SparkpostDomainVerify.js.map +1 -0
  53. package/dist/v2/hooks.js +11 -0
  54. package/dist/v2/hooks.js.map +1 -0
  55. package/dist/v2/index.js +499 -0
  56. package/dist/v2/index.js.map +1 -0
  57. package/package.json +34 -22
  58. package/dist/index-BbOAmk2e.js.map +0 -1
  59. package/dist/index-YMe54v79.js +0 -325
  60. package/dist/index-YMe54v79.js.map +0 -1
package/README.md CHANGED
@@ -169,12 +169,12 @@ sparkpost:
169
169
  routing /neetoemaildelivery/i => "neeto_email_delivery_engine/inbound"
170
170
  ```
171
171
 
172
- 16. Override `skip_rate_limits?` for `NeetoRateLimitEngine::MailDeliveryJob` to
173
- skip rate limiting if user has their SMTP integration configured.
172
+ 16. Override `skip_rate_limits?` for `NeetoEmailPipelineEngine::MailDeliveryJob`
173
+ to skip rate limiting if user has their SMTP integration configured.
174
174
 
175
175
  ```ruby
176
- # app/overrides/neeto_rate_limit_engine/jobs/mail_delivery_job_override.rb
177
- NeetoRateLimitEngine::MailDeliveryJob.class_eval do
176
+ # app/overrides/neeto_email_pipeline_engine/jobs/mail_delivery_job_override.rb
177
+ NeetoEmailPipelineEngine::MailDeliveryJob.class_eval do
178
178
 
179
179
  private
180
180
 
package/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-05-10T05:06:34.696Z
1
+ Built at 2026-07-17T09:49:08.695Z
@@ -1,23 +1,202 @@
1
- import '@bigbinary/neeto-icons/MailSend';
2
- import '@bigbinary/neeto-icons/misc/Gmail';
3
- import '@bigbinary/neeto-icons/misc/Outlook';
4
- import '@bigbinary/neetoui/Spinner';
5
- import 'react-i18next';
6
- export { E as default } from './index-BbOAmk2e.js';
7
- import './useSparkpostDomain-DA1nrWS3.js';
8
- import 'react/jsx-runtime';
1
+ import MailSend from '@bigbinary/neeto-icons/MailSend';
2
+ import GmailIcon from '@bigbinary/neeto-icons/misc/Gmail';
3
+ import OutlookIcon from '@bigbinary/neeto-icons/misc/Outlook';
4
+ import Spinner from '@bigbinary/neetoui/Spinner';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { u as useGmail, a as useOutlook, b as useSmtp } from './useSmtp-DxZlXdtr.js';
7
+ import { u as useSparkpostDomain } from './useSparkpostDomain-Dt4Q3GSP.js';
8
+ import Tag from '@bigbinary/neetoui/Tag';
9
+ import Typography from '@bigbinary/neetoui/Typography';
10
+ import { Link } from 'react-router-dom';
11
+ import Check from '@bigbinary/neeto-icons/Check';
12
+ import Warning from '@bigbinary/neeto-icons/Warning';
13
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
14
  import '@babel/runtime/helpers/slicedToArray';
10
15
  import 'react';
11
16
  import '@tanstack/react-query';
12
17
  import '@bigbinary/neeto-commons-frontend/utils';
13
- import 'react-router-dom';
14
- import './useSparkpostApi-B-D8RNRF.js';
18
+ import './useSparkpostApi-CQT4JD8-.js';
15
19
  import '@babel/runtime/helpers/defineProperty';
16
20
  import '@bigbinary/neeto-commons-frontend/react-utils';
17
21
  import 'axios';
18
- import '@bigbinary/neetoui/Tag';
19
- import '@bigbinary/neetoui/Typography';
20
- import '@bigbinary/neeto-icons/Check';
21
- import '@bigbinary/neeto-icons/Warning';
22
22
  import '@bigbinary/neetoui/Toastr';
23
+
24
+ var STATUS_TAG_CONFIG = {
25
+ connected: {
26
+ labelKey: "neetoEmailDelivery.sparkpost.emailDelivery.connected",
27
+ style: "success",
28
+ icon: Check
29
+ },
30
+ pending: {
31
+ labelKey: "neetoEmailDelivery.integrationDetail.pending",
32
+ style: "warning",
33
+ icon: Warning
34
+ },
35
+ error: {
36
+ labelKey: "neetoEmailDelivery.integrationDetail.error",
37
+ style: "danger",
38
+ icon: Warning
39
+ }
40
+ };
41
+
42
+ var IntegrationCard = function IntegrationCard(_ref) {
43
+ var Icon = _ref.icon,
44
+ title = _ref.title,
45
+ description = _ref.description,
46
+ status = _ref.status,
47
+ path = _ref.path,
48
+ dataTestId = _ref["data-testid"];
49
+ var _useTranslation = useTranslation(),
50
+ t = _useTranslation.t;
51
+ var tagConfig = STATUS_TAG_CONFIG[status];
52
+ return /*#__PURE__*/jsxs(Link, {
53
+ className: "neeto-ui-rounded-lg neeto-ui-border-gray-200 flex cursor-pointer flex-col gap-y-4 border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out",
54
+ "data-testid": dataTestId,
55
+ to: path,
56
+ children: [/*#__PURE__*/jsxs("div", {
57
+ children: [/*#__PURE__*/jsxs("div", {
58
+ className: "mb-2.5 flex items-center gap-3",
59
+ children: [Icon && /*#__PURE__*/jsx(Icon, {
60
+ className: "neeto-ui-text-gray-500",
61
+ size: 24
62
+ }), /*#__PURE__*/jsx(Typography, {
63
+ className: "neeto-ui-text-black text-lg leading-6",
64
+ style: "h3",
65
+ weight: "semibold",
66
+ children: title
67
+ })]
68
+ }), /*#__PURE__*/jsx(Typography, {
69
+ className: "neeto-ui-text-gray-600",
70
+ style: "body2",
71
+ children: description
72
+ })]
73
+ }), tagConfig && /*#__PURE__*/jsx("div", {
74
+ className: "neeto-ui-border-gray-300 border-t pt-3",
75
+ children: /*#__PURE__*/jsx(Tag, {
76
+ className: "flex-row-reverse",
77
+ icon: tagConfig.icon,
78
+ label: t(tagConfig.labelKey),
79
+ style: tagConfig.style
80
+ })
81
+ })]
82
+ });
83
+ };
84
+
85
+ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
86
+ var indexRoute = _ref.indexRoute,
87
+ ownerId = _ref.ownerId,
88
+ canManageIntegrations = _ref.canManageIntegrations,
89
+ gmailRoute = _ref.gmailRoute,
90
+ outlookRoute = _ref.outlookRoute,
91
+ customEmailProviderRoute = _ref.customEmailProviderRoute,
92
+ smtpRoute = _ref.smtpRoute;
93
+ var _useTranslation = useTranslation(),
94
+ t = _useTranslation.t;
95
+ var gmailIntegration = useGmail({
96
+ ownerId: ownerId,
97
+ indexRoute: indexRoute,
98
+ canManageIntegrations: canManageIntegrations
99
+ });
100
+ var outlookIntegration = useOutlook({
101
+ ownerId: ownerId,
102
+ indexRoute: indexRoute,
103
+ canManageIntegrations: canManageIntegrations
104
+ });
105
+ var sparkpostIntegration = useSparkpostDomain({
106
+ ownerId: ownerId,
107
+ canManageIntegrations: canManageIntegrations
108
+ });
109
+ var smtpIntegration = useSmtp({
110
+ ownerId: ownerId,
111
+ canManageIntegrations: canManageIntegrations
112
+ });
113
+ var isGmailConnected = gmailIntegration.isConnected,
114
+ isGmailLoading = gmailIntegration.isLoading,
115
+ gmailError = gmailIntegration.errorMessage;
116
+ var isOutlookConnected = outlookIntegration.isConnected,
117
+ isOutlookLoading = outlookIntegration.isLoading,
118
+ isOutlookPending = outlookIntegration.isWaitingForTestEmail,
119
+ outlookError = outlookIntegration.errorMessage;
120
+ var isSparkpostConnected = sparkpostIntegration.isConnected,
121
+ isSparkpostLoading = sparkpostIntegration.isLoading,
122
+ sparkpostExists = sparkpostIntegration.exists;
123
+ var isSmtpConnected = smtpIntegration.isConnected,
124
+ isSmtpLoading = smtpIntegration.isLoading;
125
+ var getCardStatus = function getCardStatus(_ref2) {
126
+ var isConnected = _ref2.isConnected,
127
+ isPending = _ref2.isPending,
128
+ hasError = _ref2.hasError;
129
+ if (isConnected) return "connected";
130
+ if (hasError) return "error";
131
+ if (isPending) return "pending";
132
+ return null;
133
+ };
134
+ var isLoading = isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;
135
+ var gmailTitle = t("neetoEmailDelivery.gmail.title");
136
+ var gmailDescription = t("neetoEmailDelivery.gmail.description");
137
+ var outlookTitle = t("neetoEmailDelivery.outlook.title");
138
+ var outlookDescription = t("neetoEmailDelivery.outlook.description");
139
+ var ownDomainTitle = t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle");
140
+ var ownDomainDescription = t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription");
141
+ var smtpTitle = t("neetoEmailDelivery.smtp.title");
142
+ var smtpDescription = t("neetoEmailDelivery.smtp.description");
143
+ if (isLoading) {
144
+ return /*#__PURE__*/jsx("div", {
145
+ className: "flex grow items-center justify-center w-full",
146
+ children: /*#__PURE__*/jsx(Spinner, {})
147
+ });
148
+ }
149
+ return /*#__PURE__*/jsx("div", {
150
+ className: "min-h-0 w-full grow",
151
+ children: /*#__PURE__*/jsx("div", {
152
+ className: "@container mx-auto space-y-6",
153
+ children: /*#__PURE__*/jsxs("div", {
154
+ className: "grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4",
155
+ children: [/*#__PURE__*/jsx(IntegrationCard, {
156
+ "data-testid": "gmail-integration-card",
157
+ description: gmailDescription,
158
+ icon: GmailIcon,
159
+ path: gmailRoute,
160
+ title: gmailTitle,
161
+ status: getCardStatus({
162
+ isConnected: isGmailConnected,
163
+ hasError: !!gmailError
164
+ })
165
+ }), /*#__PURE__*/jsx(IntegrationCard, {
166
+ "data-testid": "outlook-integration-card",
167
+ description: outlookDescription,
168
+ icon: OutlookIcon,
169
+ path: outlookRoute,
170
+ title: outlookTitle,
171
+ status: getCardStatus({
172
+ isConnected: isOutlookConnected,
173
+ isPending: isOutlookPending,
174
+ hasError: !!outlookError
175
+ })
176
+ }), /*#__PURE__*/jsx(IntegrationCard, {
177
+ "data-testid": "custom-email-provider-integration-card",
178
+ description: ownDomainDescription,
179
+ icon: MailSend,
180
+ path: customEmailProviderRoute,
181
+ title: ownDomainTitle,
182
+ status: getCardStatus({
183
+ isConnected: isSparkpostConnected,
184
+ isPending: sparkpostExists && !isSparkpostConnected
185
+ })
186
+ }), /*#__PURE__*/jsx(IntegrationCard, {
187
+ "data-testid": "smtp-integration-card",
188
+ description: smtpDescription,
189
+ icon: MailSend,
190
+ path: smtpRoute,
191
+ status: getCardStatus({
192
+ isConnected: isSmtpConnected
193
+ }),
194
+ title: smtpTitle
195
+ })]
196
+ })
197
+ })
198
+ });
199
+ };
200
+
201
+ export { EmailDeliveryScreen as default };
23
202
  //# sourceMappingURL=EmailDeliveryScreen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmailDeliveryScreen.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"EmailDeliveryScreen.js","sources":["../app/javascript/src/components/EmailDeliveryScreen/constants.js","../app/javascript/src/components/EmailDeliveryScreen/IntegrationCard.jsx","../app/javascript/src/components/EmailDeliveryScreen/index.jsx"],"sourcesContent":["import { Check, Warning } from \"neetoicons\";\n\nexport const STATUS_TAG_CONFIG = {\n connected: {\n labelKey: \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n style: \"success\",\n icon: Check,\n },\n pending: {\n labelKey: \"neetoEmailDelivery.integrationDetail.pending\",\n style: \"warning\",\n icon: Warning,\n },\n error: {\n labelKey: \"neetoEmailDelivery.integrationDetail.error\",\n style: \"danger\",\n icon: Warning,\n },\n};\n","import { Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { STATUS_TAG_CONFIG } from \"./constants\";\n\nconst IntegrationCard = ({\n icon: Icon,\n title,\n description,\n status,\n path,\n \"data-testid\": dataTestId,\n}) => {\n const { t } = useTranslation();\n\n const tagConfig = STATUS_TAG_CONFIG[status];\n\n return (\n <Link\n className=\"neeto-ui-rounded-lg neeto-ui-border-gray-200 flex cursor-pointer flex-col gap-y-4 border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\"\n data-testid={dataTestId}\n to={path}\n >\n <div>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && <Icon className=\"neeto-ui-text-gray-500\" size={24} />}\n <Typography\n className=\"neeto-ui-text-black text-lg leading-6\"\n style=\"h3\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n </div>\n <Typography className=\"neeto-ui-text-gray-600\" style=\"body2\">\n {description}\n </Typography>\n </div>\n {tagConfig && (\n <div className=\"neeto-ui-border-gray-300 border-t pt-3\">\n <Tag\n className=\"flex-row-reverse\"\n icon={tagConfig.icon}\n label={t(tagConfig.labelKey)}\n style={tagConfig.style}\n />\n </div>\n )}\n </Link>\n );\n};\n\nexport default IntegrationCard;\n","import { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\n\nimport IntegrationCard from \"./IntegrationCard\";\n\nconst EmailDeliveryScreen = ({\n indexRoute,\n ownerId,\n canManageIntegrations,\n gmailRoute,\n outlookRoute,\n customEmailProviderRoute,\n smtpRoute,\n}) => {\n const { t } = useTranslation();\n\n const gmailIntegration = useGmail({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const outlookIntegration = useOutlook({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const sparkpostIntegration = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const smtpIntegration = useSmtp({ ownerId, canManageIntegrations });\n\n const {\n isConnected: isGmailConnected,\n isLoading: isGmailLoading,\n errorMessage: gmailError,\n } = gmailIntegration;\n\n const {\n isConnected: isOutlookConnected,\n isLoading: isOutlookLoading,\n isWaitingForTestEmail: isOutlookPending,\n errorMessage: outlookError,\n } = outlookIntegration;\n\n const {\n isConnected: isSparkpostConnected,\n isLoading: isSparkpostLoading,\n exists: sparkpostExists,\n } = sparkpostIntegration;\n\n const { isConnected: isSmtpConnected, isLoading: isSmtpLoading } =\n smtpIntegration;\n\n const getCardStatus = ({ isConnected, isPending, hasError }) => {\n if (isConnected) return \"connected\";\n\n if (hasError) return \"error\";\n\n if (isPending) return \"pending\";\n\n return null;\n };\n\n const isLoading =\n isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;\n\n const gmailTitle = t(\"neetoEmailDelivery.gmail.title\");\n const gmailDescription = t(\"neetoEmailDelivery.gmail.description\");\n\n const outlookTitle = t(\"neetoEmailDelivery.outlook.title\");\n const outlookDescription = t(\"neetoEmailDelivery.outlook.description\");\n\n const ownDomainTitle = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle\"\n );\n\n const ownDomainDescription = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription\"\n );\n\n const smtpTitle = t(\"neetoEmailDelivery.smtp.title\");\n const smtpDescription = t(\"neetoEmailDelivery.smtp.description\");\n\n if (isLoading) {\n return (\n <div className=\"flex grow items-center justify-center w-full\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-0 w-full grow\">\n <div className=\"@container mx-auto space-y-6\">\n <div className=\"grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4\">\n <IntegrationCard\n data-testid=\"gmail-integration-card\"\n description={gmailDescription}\n icon={GmailIcon}\n path={gmailRoute}\n title={gmailTitle}\n status={getCardStatus({\n isConnected: isGmailConnected,\n hasError: !!gmailError,\n })}\n />\n <IntegrationCard\n data-testid=\"outlook-integration-card\"\n description={outlookDescription}\n icon={OutlookIcon}\n path={outlookRoute}\n title={outlookTitle}\n status={getCardStatus({\n isConnected: isOutlookConnected,\n isPending: isOutlookPending,\n hasError: !!outlookError,\n })}\n />\n <IntegrationCard\n data-testid=\"custom-email-provider-integration-card\"\n description={ownDomainDescription}\n icon={MailSend}\n path={customEmailProviderRoute}\n title={ownDomainTitle}\n status={getCardStatus({\n isConnected: isSparkpostConnected,\n isPending: sparkpostExists && !isSparkpostConnected,\n })}\n />\n <IntegrationCard\n data-testid=\"smtp-integration-card\"\n description={smtpDescription}\n icon={MailSend}\n path={smtpRoute}\n status={getCardStatus({ isConnected: isSmtpConnected })}\n title={smtpTitle}\n />\n </div>\n </div>\n </div>\n );\n};\n\nexport default EmailDeliveryScreen;\n"],"names":["STATUS_TAG_CONFIG","connected","labelKey","style","icon","Check","pending","Warning","error","IntegrationCard","_ref","Icon","title","description","status","path","dataTestId","_useTranslation","useTranslation","t","tagConfig","_jsxs","Link","className","to","children","_jsx","size","Typography","weight","Tag","label","EmailDeliveryScreen","indexRoute","ownerId","canManageIntegrations","gmailRoute","outlookRoute","customEmailProviderRoute","smtpRoute","gmailIntegration","useGmail","outlookIntegration","useOutlook","sparkpostIntegration","useSparkpostDomain","smtpIntegration","useSmtp","isGmailConnected","isConnected","isGmailLoading","isLoading","gmailError","errorMessage","isOutlookConnected","isOutlookLoading","isOutlookPending","isWaitingForTestEmail","outlookError","isSparkpostConnected","isSparkpostLoading","sparkpostExists","exists","isSmtpConnected","isSmtpLoading","getCardStatus","_ref2","isPending","hasError","gmailTitle","gmailDescription","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","smtpTitle","smtpDescription","Spinner","GmailIcon","OutlookIcon","MailSend"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,iBAAiB,GAAG;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,QAAQ,EAAE,sDAAsD;AAChEC,IAAAA,KAAK,EAAE,SAAS;AAChBC,IAAAA,IAAI,EAAEC;GACP;AACDC,EAAAA,OAAO,EAAE;AACPJ,IAAAA,QAAQ,EAAE,8CAA8C;AACxDC,IAAAA,KAAK,EAAE,SAAS;AAChBC,IAAAA,IAAI,EAAEG;GACP;AACDC,EAAAA,KAAK,EAAE;AACLN,IAAAA,QAAQ,EAAE,4CAA4C;AACtDC,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,IAAI,EAAEG;AACR;AACF,CAAC;;ACZD,IAAME,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAOf;AAAA,EAAA,IANEC,IAAI,GAAAD,IAAA,CAAVN,IAAI;IACJQ,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACWC,UAAU,GAAAN,IAAA,CAAzB,aAAa,CAAA;AAEb,EAAA,IAAAO,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AAET,EAAA,IAAMC,SAAS,GAAGpB,iBAAiB,CAACc,MAAM,CAAC;EAE3C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UAAAA,WAAW,EAAE6D,oBAAqB;AAClCtE,UAAAA,IAAI,EAAE4E,QAAS;AACfjE,UAAAA,IAAI,EAAEuB,wBAAyB;AAC/B1B,UAAAA,KAAK,EAAE6D,cAAe;UACtB3D,MAAM,EAAEmD,aAAa,CAAC;AACpBhB,YAAAA,WAAW,EAAEU,oBAAoB;YACjCQ,SAAS,EAAEN,eAAe,IAAI,CAACF;WAChC;AAAE,SACJ,CAAC,eACFjC,GAAA,CAACjB,eAAe,EAAA;AACd,UAAA,aAAA,EAAY,uBAAuB;AACnCI,UAAAA,WAAW,EAAE+D,eAAgB;AAC7BxE,UAAAA,IAAI,EAAE4E,QAAS;AACfjE,UAAAA,IAAI,EAAEwB,SAAU;UAChBzB,MAAM,EAAEmD,aAAa,CAAC;AAAEhB,YAAAA,WAAW,EAAEc;AAAgB,WAAC,CAAE;AACxDnD,UAAAA,KAAK,EAAE+D;AAAU,SAClB,CAAC;OACC;KACF;AAAC,GACH,CAAC;AAEV;;;;"}
@@ -0,0 +1,75 @@
1
+ import { t } from 'i18next';
2
+ import * as yup from 'yup';
3
+ import '@babel/runtime/helpers/defineProperty';
4
+ import '@babel/runtime/helpers/objectWithoutProperties';
5
+ import { forwardRef } from 'react';
6
+ import classnames from 'classnames';
7
+ import Container from '@bigbinary/neeto-molecules/v2/Container';
8
+ import '@bigbinary/neeto-molecules/v2/Header';
9
+ import 'react-i18next';
10
+ import { jsx } from 'react/jsx-runtime';
11
+
12
+ var PURPOSE_COLORS = {
13
+ dkim: "blue",
14
+ txt: "amber"
15
+ };
16
+ var DEFAULT_COLOR = "secondary";
17
+ var VERIFICATION_STATUSES = {
18
+ SUCCESS: "success",
19
+ ERROR: "error",
20
+ PENDING: "pending"
21
+ };
22
+ var VERIFICATION_STATUS_CONFIG = {
23
+ success: {
24
+ variant: "success",
25
+ titleKey: "neetoEmailDelivery.sparkpost.status.successTitle",
26
+ descriptionKey: "neetoEmailDelivery.sparkpost.status.successDescription"
27
+ },
28
+ error: {
29
+ variant: "danger",
30
+ titleKey: "neetoEmailDelivery.sparkpost.status.errorTitle",
31
+ descriptionKey: "neetoEmailDelivery.sparkpost.status.errorDescription"
32
+ },
33
+ pending: {
34
+ variant: "warning",
35
+ titleKey: "neetoEmailDelivery.sparkpost.status.pendingTitle",
36
+ descriptionKey: "neetoEmailDelivery.sparkpost.status.pendingDescription"
37
+ }
38
+ };
39
+ var INITIAL_VALUES = {
40
+ email: "",
41
+ displayName: ""
42
+ };
43
+ var VALIDATION_SCHEMA = yup.object().shape({
44
+ email: yup.string().trim().required(t("neetoEmailDelivery.sparkpost.setup.validation.emailRequired")).email(t("neetoEmailDelivery.sparkpost.setup.validation.emailInvalid")),
45
+ displayName: yup.string().trim().required(t("neetoEmailDelivery.sparkpost.setup.validation.requiredField", {
46
+ field: t("neetoEmailDelivery.sparkpost.setup.displayNameLabel")
47
+ }))
48
+ });
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
+ 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=PageLayout-B_USy8hj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageLayout-B_USy8hj.js","sources":["../app/javascript/src/v2/components/SparkpostDomain/constants.js","../app/javascript/src/v2/components/PageLayout.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const PURPOSE_COLORS = { dkim: \"blue\", txt: \"amber\" };\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 variant: \"success\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.successTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.successDescription\",\n },\n error: {\n variant: \"danger\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.errorTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.errorDescription\",\n },\n pending: {\n variant: \"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/v2/Container\";\nimport Header from \"neetomolecules/v2/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","variant","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;AAAQ;AACpD,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,OAAO,EAAE,SAAS;AAClBC,IAAAA,QAAQ,EAAE,kDAAkD;AAC5DC,IAA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AA/BR,QAAQ,GAAAO,KAAA,CAARP,QAAQ;IAAAS,eAAA,GAAAF,KAAA,CAAEL,SAAS;AAATA,IAAAA,SAAS,GAAAO,eAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,eAAA;AAAA,EAAA,oBACxDN,GAAA,CAAA,KAAA,EAAA;AAAKD,IAAAA,SAAS,EAAC,qBAAqB;AAAAF,IAAAA,QAAA,eAClCG,GAAA,CAAA,KAAA,EAAA;AAAWK,MAAAA,GAAG,EAAHA,GAAG;MAAIN,SAAS,EAAEQ,UAAU,CAAC,CAAC,mBAAmB,EAAER,SAAS,CAAC,CAAE;AAAAF,MAAAA,QAAA,EACvEA;KACE;AAAC,GACH,CAAC;AAAA,CACP;AAEDK,WAAW,CAACjB,WAAW,GAAG,aAAa;;;;"}
@@ -0,0 +1,103 @@
1
+ 'use strict';
2
+
3
+ var i18next = require('i18next');
4
+ var yup = require('yup');
5
+ require('@babel/runtime/helpers/defineProperty');
6
+ require('@babel/runtime/helpers/objectWithoutProperties');
7
+ var react = require('react');
8
+ var classnames = require('classnames');
9
+ var Container = require('@bigbinary/neeto-molecules/v2/Container');
10
+ require('@bigbinary/neeto-molecules/v2/Header');
11
+ require('react-i18next');
12
+ var jsxRuntime = require('react/jsx-runtime');
13
+
14
+ function _interopNamespaceDefault(e) {
15
+ var n = Object.create(null);
16
+ if (e) {
17
+ Object.keys(e).forEach(function (k) {
18
+ if (k !== 'default') {
19
+ var d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: function () { return e[k]; }
23
+ });
24
+ }
25
+ });
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
30
+
31
+ var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
32
+
33
+ var PURPOSE_COLORS = {
34
+ dkim: "blue",
35
+ txt: "amber"
36
+ };
37
+ var DEFAULT_COLOR = "secondary";
38
+ var VERIFICATION_STATUSES = {
39
+ SUCCESS: "success",
40
+ ERROR: "error",
41
+ PENDING: "pending"
42
+ };
43
+ var VERIFICATION_STATUS_CONFIG = {
44
+ success: {
45
+ variant: "success",
46
+ titleKey: "neetoEmailDelivery.sparkpost.status.successTitle",
47
+ descriptionKey: "neetoEmailDelivery.sparkpost.status.successDescription"
48
+ },
49
+ error: {
50
+ variant: "danger",
51
+ titleKey: "neetoEmailDelivery.sparkpost.status.errorTitle",
52
+ descriptionKey: "neetoEmailDelivery.sparkpost.status.errorDescription"
53
+ },
54
+ pending: {
55
+ variant: "warning",
56
+ titleKey: "neetoEmailDelivery.sparkpost.status.pendingTitle",
57
+ descriptionKey: "neetoEmailDelivery.sparkpost.status.pendingDescription"
58
+ }
59
+ };
60
+ var INITIAL_VALUES = {
61
+ email: "",
62
+ displayName: ""
63
+ };
64
+ var VALIDATION_SCHEMA = yup__namespace.object().shape({
65
+ email: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.sparkpost.setup.validation.emailRequired")).email(i18next.t("neetoEmailDelivery.sparkpost.setup.validation.emailInvalid")),
66
+ displayName: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.sparkpost.setup.validation.requiredField", {
67
+ field: i18next.t("neetoEmailDelivery.sparkpost.setup.displayNameLabel")
68
+ }))
69
+ });
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
+ exports.DEFAULT_COLOR = DEFAULT_COLOR;
96
+ exports.INITIAL_VALUES = INITIAL_VALUES;
97
+ exports.PURPOSE_COLORS = PURPOSE_COLORS;
98
+ exports.PageContent = PageContent;
99
+ exports.PageWrapper = PageWrapper;
100
+ exports.VALIDATION_SCHEMA = VALIDATION_SCHEMA;
101
+ exports.VERIFICATION_STATUSES = VERIFICATION_STATUSES;
102
+ exports.VERIFICATION_STATUS_CONFIG = VERIFICATION_STATUS_CONFIG;
103
+ //# sourceMappingURL=PageLayout-pMKr_80l.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageLayout-pMKr_80l.js","sources":["../app/javascript/src/v2/components/SparkpostDomain/constants.js","../app/javascript/src/v2/components/PageLayout.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const PURPOSE_COLORS = { dkim: \"blue\", txt: \"amber\" };\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 variant: \"success\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.successTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.successDescription\",\n },\n error: {\n variant: \"danger\",\n titleKey: \"neetoEmailDelivery.sparkpost.status.errorTitle\",\n descriptionKey: \"neetoEmailDelivery.sparkpost.status.errorDescription\",\n },\n pending: {\n variant: \"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/v2/Container\";\nimport Header from \"neetomolecules/v2/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","variant","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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,GAAC,CACH;AACJ,CAAC;;ACvCD,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,cAAA,GAAAF,IAAA,CAAEG,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;EAAA,oBAC7CE,cAAA,CAACC,SAAS,EAAA;AAAOF,IAAAA,SAAS,EAATA,SAAS;AAAAF,IAAAA,QAAA,EAAKA;AAAQ,GAAY,CAAC;AAAA;AA+BtD,IAAMK,WAAW,gBAAGC,gBAAU,CAAC,UAAAC,KAAA,EAA+BC,GAAG,EAAA;AAAA,EAAA,IAA/BR,QAAQ,GAAAO,KAAA,CAARP,QAAQ;IAAAS,eAAA,GAAAF,KAAA,CAAEL,SAAS;AAATA,IAAAA,SAAS,GAAAO,eAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,eAAA;AAAA,EAAA,oBACxDN,cAAA,CAAA,KAAA,EAAA;AAAKD,IAAAA,SAAS,EAAC,qBAAqB;AAAAF,IAAAA,QAAA,eAClCG,cAAA,CAAA,KAAA,EAAA;AAAWK,MAAAA,GAAG,EAAHA,GAAG;MAAIN,SAAS,EAAEQ,UAAU,CAAC,CAAC,mBAAmB,EAAER,SAAS,CAAC,CAAE;AAAAF,MAAAA,QAAA,EACvEA;KACE;AAAC,GACH,CAAC;AAAA,CACP;AAEDK,WAAW,CAACjB,WAAW,GAAG,aAAa;;;;;;;;;;;"}
@@ -8,8 +8,8 @@ import Form from '@bigbinary/neetoui/formik/Form';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import { useHistory } from 'react-router-dom';
10
10
  import { P as PageWrapper, a as PageContent, V as VALIDATION_SCHEMA, I as INITIAL_VALUES } from './PageLayout-RWJHf21f.js';
11
- import { u as useSparkpostDomain } from './useSparkpostDomain-DA1nrWS3.js';
12
- import { u as useFetchConnectedIntegration } from './useEmailDeliveryIntegrationApi-Dk9WPotT.js';
11
+ import { u as useSparkpostDomain } from './useSparkpostDomain-Dt4Q3GSP.js';
12
+ import { u as useFetchConnectedIntegration } from './useEmailDeliveryIntegrationApi-CfgmbuRA.js';
13
13
  import { jsx, jsxs } from 'react/jsx-runtime';
14
14
  import 'i18next';
15
15
  import 'yup';
@@ -22,7 +22,7 @@ import '@bigbinary/neeto-molecules/Header';
22
22
  import '@babel/runtime/helpers/slicedToArray';
23
23
  import '@tanstack/react-query';
24
24
  import '@bigbinary/neetoui/Toastr';
25
- import './useSparkpostApi-B-D8RNRF.js';
25
+ import './useSparkpostApi-CQT4JD8-.js';
26
26
  import '@bigbinary/neeto-commons-frontend/react-utils';
27
27
  import 'axios';
28
28
  import '@bigbinary/neeto-cist';
@@ -7,10 +7,10 @@ import 'ramda';
7
7
  import 'react-i18next';
8
8
  import 'react-router-dom';
9
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';
10
+ import './useSparkpostDomain-Dt4Q3GSP.js';
11
+ import './useEmailDeliveryIntegrationApi-CfgmbuRA.js';
12
+ import './useSparkpostApi-CQT4JD8-.js';
13
+ export { S as default } from './Verify-D0bZSCRH.js';
14
14
  import 'react/jsx-runtime';
15
15
  import 'i18next';
16
16
  import 'yup';