@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.
- package/README.md +4 -4
- package/dist/.ready +1 -1
- package/dist/EmailDeliveryScreen.js +193 -14
- package/dist/EmailDeliveryScreen.js.map +1 -1
- package/dist/PageLayout-B_USy8hj.js +75 -0
- package/dist/PageLayout-B_USy8hj.js.map +1 -0
- package/dist/PageLayout-pMKr_80l.js +103 -0
- package/dist/PageLayout-pMKr_80l.js.map +1 -0
- package/dist/SparkpostDomainSetup.js +3 -3
- package/dist/SparkpostDomainVerify.js +4 -4
- package/dist/Verify-80b6NK1q.js +295 -0
- package/dist/Verify-80b6NK1q.js.map +1 -0
- package/dist/{Verify-Cbn8WE7T.js → Verify-D0bZSCRH.js} +4 -4
- package/dist/{Verify-Cbn8WE7T.js.map → Verify-D0bZSCRH.js.map} +1 -1
- package/dist/Verify-Dnvx5OTi.js +292 -0
- package/dist/Verify-Dnvx5OTi.js.map +1 -0
- package/dist/cjs/EmailDeliveryScreen.js +189 -14
- package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
- package/dist/cjs/index.js +7 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/EmailDeliveryScreen.js +201 -0
- package/dist/cjs/v2/EmailDeliveryScreen.js.map +1 -0
- package/dist/cjs/v2/SparkpostDomainSetup.js +140 -0
- package/dist/cjs/v2/SparkpostDomainSetup.js.map +1 -0
- package/dist/cjs/v2/SparkpostDomainVerify.js +35 -0
- package/dist/cjs/v2/SparkpostDomainVerify.js.map +1 -0
- package/dist/cjs/v2/hooks.js +17 -0
- package/dist/cjs/v2/hooks.js.map +1 -0
- package/dist/cjs/v2/index.js +522 -0
- package/dist/cjs/v2/index.js.map +1 -0
- package/dist/hooks.js +2 -2
- package/dist/index.js +8 -8
- package/dist/{useEmailDeliveryIntegrationApi-Dk9WPotT.js → useEmailDeliveryIntegrationApi-CfgmbuRA.js} +2 -2
- package/dist/{useEmailDeliveryIntegrationApi-Dk9WPotT.js.map → useEmailDeliveryIntegrationApi-CfgmbuRA.js.map} +1 -1
- package/dist/useSmtp-BCcRaVYr.js +136 -0
- package/dist/useSmtp-BCcRaVYr.js.map +1 -0
- package/dist/useSmtp-DxZlXdtr.js +132 -0
- package/dist/useSmtp-DxZlXdtr.js.map +1 -0
- package/dist/{useSparkpostApi-B-D8RNRF.js → useSparkpostApi-CQT4JD8-.js} +2 -2
- package/dist/{useSparkpostApi-B-D8RNRF.js.map → useSparkpostApi-CQT4JD8-.js.map} +1 -1
- package/dist/useSparkpostDomain-DDjj-dyF.js +99 -0
- package/dist/useSparkpostDomain-DDjj-dyF.js.map +1 -0
- package/dist/{useSparkpostDomain-DA1nrWS3.js → useSparkpostDomain-Dt4Q3GSP.js} +2 -2
- package/dist/{useSparkpostDomain-DA1nrWS3.js.map → useSparkpostDomain-Dt4Q3GSP.js.map} +1 -1
- package/dist/useSparkpostDomain-IJPoCQ0f.js +101 -0
- package/dist/useSparkpostDomain-IJPoCQ0f.js.map +1 -0
- package/dist/{index-BbOAmk2e.js → v2/EmailDeliveryScreen.js} +27 -148
- package/dist/v2/EmailDeliveryScreen.js.map +1 -0
- package/dist/v2/SparkpostDomainSetup.js +138 -0
- package/dist/v2/SparkpostDomainSetup.js.map +1 -0
- package/dist/v2/SparkpostDomainVerify.js +29 -0
- package/dist/v2/SparkpostDomainVerify.js.map +1 -0
- package/dist/v2/hooks.js +11 -0
- package/dist/v2/hooks.js.map +1 -0
- package/dist/v2/index.js +499 -0
- package/dist/v2/index.js.map +1 -0
- package/package.json +34 -22
- package/dist/index-BbOAmk2e.js.map +0 -1
- package/dist/index-YMe54v79.js +0 -325
- package/dist/index-YMe54v79.js.map +0 -1
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../app/javascript/src/components/Smtp/constants.js","../../app/javascript/src/components/Smtp/Setup.jsx","../../app/javascript/src/components/IntegrationDetailPage/constants.js","../../app/javascript/src/components/IntegrationDetailPage/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const ENCRYPTION_OPTIONS = [\n { label: \"None\", value: \"none\" },\n { label: \"StartTLS\", value: \"starttls\" },\n { label: \"SSL\", value: \"ssl\" },\n];\n\nexport const SMTP_ACCOUNT_INITIAL_VALUES = {\n host: \"\",\n port: 587,\n username: \"\",\n password: \"\",\n email: \"\",\n encryption: \"starttls\",\n displayName: \"\",\n};\n\nexport const SMTP_ACCOUNT_VALIDATION_SCHEMA = yup.object().shape({\n host: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.hostLabel\"),\n })\n ),\n port: yup.number().required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.portLabel\"),\n })\n ),\n username: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.usernameLabel\"),\n })\n ),\n password: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.passwordLabel\"),\n })\n ),\n email: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.emailLabel\"),\n })\n )\n .email(t(\"neetoEmailDelivery.smtp.setup.emailInvalid\")),\n displayName: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.displayNameLabel\"),\n })\n ),\n encryption: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.encryptionLabel\"),\n })\n ),\n});\n","import { Callout, Pane, Typography } from \"neetoui\";\nimport { Form, Input, Radio, ActionBlock } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateSmtp } from \"hooks/reactQuery/integrations/useSmtpIntegrationApi\";\n\nimport {\n SMTP_ACCOUNT_INITIAL_VALUES,\n SMTP_ACCOUNT_VALIDATION_SCHEMA,\n ENCRYPTION_OPTIONS,\n} from \"./constants\";\n\nconst SmtpSetup = ({ ownerId, onDone, onCancel, isOpen }) => {\n const { t } = useTranslation();\n\n const { isPending: isCreating, mutate: createSmtp } = useCreateSmtp({\n ownerId,\n });\n\n const handleSubmit = values => {\n createSmtp({ smtp_account: values }, { onSuccess: onDone });\n };\n\n return (\n <Pane {...{ isOpen }} size=\"lg\" onClose={onCancel}>\n <Pane.Header>\n <Typography style=\"h2\" weight=\"semibold\">\n {t(\"neetoEmailDelivery.smtp.setup.title\")}\n </Typography>\n </Pane.Header>\n <Form\n className=\"w-full\"\n formikProps={{\n initialValues: SMTP_ACCOUNT_INITIAL_VALUES,\n validationSchema: SMTP_ACCOUNT_VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <Pane.Body className=\"space-y-4\">\n <div className=\"flex flex-col gap-6\">\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.smtp.setup.note\")}\n </Callout>\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.hostLabel\")}\n name=\"host\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.portLabel\")}\n name=\"port\"\n type=\"number\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.usernameLabel\")}\n name=\"username\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.passwordLabel\")}\n name=\"password\"\n type=\"password\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.emailLabel\")}\n name=\"email\"\n type=\"email\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.displayNameLabel\")}\n name=\"displayName\"\n />\n <Radio\n label={t(\"neetoEmailDelivery.smtp.setup.encryptionLabel\")}\n name=\"encryption\"\n >\n {ENCRYPTION_OPTIONS.map(option => (\n <Radio.Item\n key={option.value}\n label={option.label}\n value={option.value}\n />\n ))}\n </Radio>\n </div>\n </Pane.Body>\n <Pane.Footer>\n <ActionBlock\n cancelButtonProps={{ onClick: onCancel }}\n isSubmitting={isCreating}\n submitButtonProps={{\n label: t(\"neetoEmailDelivery.smtp.setup.saveAndActivate\"),\n }}\n />\n </Pane.Footer>\n </Form>\n </Pane>\n );\n};\n\nexport default SmtpSetup;\n","import { t } from \"i18next\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\n\nexport const ERROR_MESSAGES = {\n gmail_permission_not_given: t(\"neetoEmailDelivery.gmail.permissionNotGiven\"),\n outlook_permission_not_given: t(\n \"neetoEmailDelivery.outlook.permissionNotGiven\"\n ),\n outlook_invalid_client: t(\"neetoEmailDelivery.outlook.invalidClient\"),\n outlook_nil_json_web_token: t(\"neetoEmailDelivery.outlook.nilJsonWebToken\"),\n};\n\nexport const INTEGRATION_TYPES = {\n GMAIL: \"gmail\",\n OUTLOOK: \"outlook\",\n SPARKPOST: \"sparkpost\",\n SMTP: \"smtp\",\n};\n\nexport const PROVIDER_LABELS = {\n [INTEGRATION_TYPES.GMAIL]: \"Gmail\",\n [INTEGRATION_TYPES.OUTLOOK]: \"Outlook\",\n [INTEGRATION_TYPES.SPARKPOST]: \"Custom email provider\",\n [INTEGRATION_TYPES.SMTP]: \"SMTP\",\n};\n\nexport const PROVIDER_ICONS = {\n [INTEGRATION_TYPES.GMAIL]: GmailIcon,\n [INTEGRATION_TYPES.OUTLOOK]: OutlookIcon,\n [INTEGRATION_TYPES.SPARKPOST]: MailSend,\n [INTEGRATION_TYPES.SMTP]: MailSend,\n};\n","import { useState } from \"react\";\n\nimport { humanize, isNotEmpty, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Check, Warning } from \"neetoicons\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button, Callout, Spinner, Toastr, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n GMAIL_OAUTH_CONNECT_URL,\n OUTLOOK_OAUTH_CONNECT_URL,\n} from \"apis/integrations/constants\";\nimport SmtpSetup from \"components/Smtp/Setup\";\nimport DnsRecordsSection from \"components/SparkpostDomain/DnsRecordsSection\";\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\nimport { useFetchConnectedIntegration } from \"hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi\";\n\nimport {\n ERROR_MESSAGES,\n INTEGRATION_TYPES,\n PROVIDER_LABELS,\n PROVIDER_ICONS,\n} from \"./constants\";\n\nconst IntegrationDetailPage = ({\n type,\n ownerId,\n canManageIntegrations,\n appName,\n scopeText,\n connectedScopeText,\n helpArticleUrl,\n indexRoute,\n integrationRoutes,\n ownDomainSetupRoute,\n ownDomainVerifyRoute,\n onBeforeAction,\n}) => {\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription } = useQueryParams();\n const [isSmtpPaneOpen, setIsSmtpPaneOpen] = useState(false);\n\n if (isPresent(error)) {\n let errorMessage = ERROR_MESSAGES[error];\n if (errorDescription) {\n errorMessage = `${errorMessage} ${errorDescription}`;\n }\n Toastr.error(errorMessage ?? humanize(error));\n history.replace(integrationRoutes?.[type] ?? indexRoute);\n }\n\n const providerLabel = PROVIDER_LABELS[type];\n const Icon = PROVIDER_ICONS[type];\n const description = t(`neetoEmailDelivery.${type}.description`);\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 { integration: connectedIntegration, isLoading: isIntegrationLoading } =\n useFetchConnectedIntegration(ownerId);\n\n const integrationMap = {\n [INTEGRATION_TYPES.GMAIL]: gmailIntegration,\n [INTEGRATION_TYPES.OUTLOOK]: outlookIntegration,\n [INTEGRATION_TYPES.SPARKPOST]: sparkpostIntegration,\n [INTEGRATION_TYPES.SMTP]: smtpIntegration,\n };\n\n const currentIntegration = integrationMap[type];\n const {\n isConnected,\n isDestroying,\n onDisconnect,\n data = {},\n errorMessage,\n } = currentIntegration;\n\n const connectedEmail = data?.email;\n const sparkpostVerificationRecords = data?.verificationRecords || [];\n const showSparkpostConnectedDetails =\n type === INTEGRATION_TYPES.SPARKPOST && isConnected;\n\n const isOutlookPending =\n type === INTEGRATION_TYPES.OUTLOOK &&\n outlookIntegration.isWaitingForTestEmail;\n\n const isSparkpostPending =\n type === INTEGRATION_TYPES.SPARKPOST &&\n sparkpostIntegration.exists &&\n !isConnected;\n\n const isPending = isOutlookPending || isSparkpostPending;\n\n const isLoading =\n gmailIntegration.isLoading ||\n outlookIntegration.isLoading ||\n sparkpostIntegration.isLoading ||\n smtpIntegration.isLoading ||\n isIntegrationLoading;\n\n const isBlocked = connectedIntegration && connectedIntegration.type !== type;\n\n const activeProviderLabel = isBlocked\n ? PROVIDER_LABELS[connectedIntegration.type]\n : null;\n\n const activeProviderRoute = isBlocked\n ? integrationRoutes?.[connectedIntegration.type]\n : null;\n\n const executeConnect = () => {\n switch (type) {\n case INTEGRATION_TYPES.GMAIL:\n window.location.href = buildUrl(GMAIL_OAUTH_CONNECT_URL, { ownerId });\n break;\n case INTEGRATION_TYPES.OUTLOOK:\n window.location.href = buildUrl(OUTLOOK_OAUTH_CONNECT_URL, {\n ownerId,\n });\n break;\n case INTEGRATION_TYPES.SPARKPOST:\n history.push(ownDomainSetupRoute);\n break;\n case INTEGRATION_TYPES.SMTP:\n setIsSmtpPaneOpen(true);\n break;\n default:\n break;\n }\n };\n\n const handleConnect = () => {\n if (onBeforeAction) {\n onBeforeAction(executeConnect);\n } else {\n executeConnect();\n }\n };\n\n const handleDisconnect = () => {\n if (onBeforeAction) {\n onBeforeAction(onDisconnect);\n } else {\n onDisconnect();\n }\n };\n\n const getConnectButtonLabel = () => {\n switch (type) {\n case INTEGRATION_TYPES.GMAIL:\n return t(\"neetoEmailDelivery.integrationDetail.connectGmail\");\n case INTEGRATION_TYPES.OUTLOOK:\n return t(\"neetoEmailDelivery.integrationDetail.connectOutlook\");\n case INTEGRATION_TYPES.SPARKPOST:\n return t(\"neetoEmailDelivery.integrationDetail.setupDomain\");\n case INTEGRATION_TYPES.SMTP:\n return t(\"neetoEmailDelivery.integrationDetail.connectSmtp\");\n default:\n return \"\";\n }\n };\n\n const renderTitle = () => {\n if (isConnected) {\n return (\n <div className=\"flex items-center gap-2\">\n <span>\n {t(\"neetoEmailDelivery.integrationDetail.connectedTitle\", {\n provider: providerLabel,\n })}\n </span>\n <div className=\"neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1\">\n <Check size={24} />\n </div>\n </div>\n );\n }\n\n if (isPending) {\n return (\n <div className=\"flex items-center gap-2\">\n <span>\n {t(\"neetoEmailDelivery.integrationDetail.pendingTitle\", {\n provider: providerLabel,\n })}\n </span>\n <div className=\"neeto-ui-text-warning-500 flex items-center justify-center p-1\">\n <Warning size={24} />\n </div>\n </div>\n );\n }\n\n return t(\"neetoEmailDelivery.integrationDetail.connectTitle\", {\n appName,\n provider: providerLabel,\n });\n };\n\n const renderActionBlock = () => {\n if (isConnected) {\n return (\n <Button\n data-testid=\"disconnect-button\"\n label={t(\"neetoEmailDelivery.integrationDetail.disconnect\")}\n loading={isDestroying}\n style=\"danger\"\n onClick={handleDisconnect}\n />\n );\n }\n\n if (isPending) {\n return (\n <div className=\"flex items-center gap-2\">\n {isSparkpostPending && (\n <Button\n data-testid=\"continue-verification-button\"\n to={ownDomainVerifyRoute}\n label={t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.continueVerification\"\n )}\n />\n )}\n <Button\n data-testid=\"disconnect-button\"\n label={t(\"neetoEmailDelivery.integrationDetail.disconnect\")}\n loading={isDestroying}\n style=\"danger\"\n onClick={handleDisconnect}\n />\n </div>\n );\n }\n\n if (isBlocked) return null;\n\n return (\n <Button\n data-testid=\"connect-button\"\n label={getConnectButtonLabel()}\n style=\"primary\"\n onClick={handleConnect}\n />\n );\n };\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 <>\n <CardLayout\n actionBlock={renderActionBlock()}\n icon={<Icon size={48} />}\n title={renderTitle()}\n description={\n isConnected ? (\n <Trans\n components={{ bold: <strong /> }}\n i18nKey=\"neetoEmailDelivery.integrationDetail.connectedEmail\"\n values={{ email: connectedEmail }}\n />\n ) : (\n description\n )\n }\n >\n {(isConnected ? connectedScopeText || scopeText : scopeText) && (\n <Typography style=\"body1\">\n {isConnected ? connectedScopeText || scopeText : scopeText}\n </Typography>\n )}\n {!isConnected && helpArticleUrl && (\n <Typography className=\"my-2\" style=\"body2\">\n <Trans\n i18nKey=\"neetoEmailDelivery.integrationDetail.helpArticleText\"\n values={{ provider: providerLabel }}\n components={{\n helpLink: (\n <Button\n data-testid=\"help-doc-link\"\n href={helpArticleUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n />\n </Typography>\n )}\n {!isConnected && !isPending && isBlocked && (\n <Callout\n style={connectedIntegration.isPending ? \"warning\" : \"danger\"}\n >\n <p>\n <Trans\n components={{\n disconnectLink: (\n <Button\n data-testid=\"disconnect-link\"\n href={activeProviderRoute}\n style=\"link\"\n />\n ),\n }}\n i18nKey={\n connectedIntegration.isPending\n ? \"neetoEmailDelivery.integrationDetail.pendingIntegrationBlocked\"\n : \"neetoEmailDelivery.integrationDetail.onlyOneIntegration\"\n }\n values={{\n activeProvider: activeProviderLabel,\n targetProvider: providerLabel,\n }}\n />\n </p>\n </Callout>\n )}\n {errorMessage && <Callout style=\"danger\">{errorMessage}</Callout>}\n {isOutlookPending && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.waitingForTestEmail\", {\n email: connectedEmail,\n })}\n </Callout>\n )}\n {isSparkpostPending && (\n <Callout style=\"warning\">\n {t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.verificationPending\",\n { domain: data?.domain }\n )}\n </Callout>\n )}\n {showSparkpostConnectedDetails && (\n <div className=\"flex flex-col gap-2 mt-4\">\n {isNotEmpty(sparkpostVerificationRecords) && (\n <DnsRecordsSection\n dnsRecords={sparkpostVerificationRecords}\n domain={data?.domain}\n showTitle={false}\n sparkpostData={data}\n />\n )}\n <Callout style=\"info\">\n <Typography style=\"body3\">\n <Trans\n i18nKey=\"neetoEmailDelivery.sparkpost.emailDelivery.spfGuidance\"\n components={{\n bold: <strong />,\n code: (\n <code className=\"neeto-ui-bg-gray-100 neeto-ui-rounded px-1\" />\n ),\n }}\n />\n </Typography>\n </Callout>\n </div>\n )}\n </CardLayout>\n {type === INTEGRATION_TYPES.SMTP && (\n <SmtpSetup\n {...{ ownerId }}\n isOpen={isSmtpPaneOpen}\n onCancel={() => setIsSmtpPaneOpen(false)}\n onDone={() => setIsSmtpPaneOpen(false)}\n />\n )}\n </>\n );\n};\n\nexport default IntegrationDetailPage;\n"],"names":["ENCRYPTION_OPTIONS","label","value","SMTP_ACCOUNT_INITIAL_VALUES","host","port","username","password","email","encryption","displayName","SMTP_ACCOUNT_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","field","number","SmtpSetup","_ref","ownerId","onDone","onCancel","isOpen","_useTranslation","useTranslation","_useCreateSmtp","useCreateSmtp","isCreating","isPending","createSmtp","mutate","handleSubmit","values","smtp_account","onSuccess","_jsxs","Pane","size","onClose","children","_jsx","Header","Typography","style","weight","Form","className","formikProps","initialValues","validationSchema","onSubmit","Body","Callout","Input","name","type","Radio","map","option","Item","Footer","ActionBlock","cancelButtonProps","onClick","isSubmitting","submitButtonProps","ERROR_MESSAGES","gmail_permission_not_given","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","INTEGRATION_TYPES","GMAIL","OUTLOOK","SPARKPOST","SMTP","PROVIDER_LABELS","_defineProperty","PROVIDER_ICONS","GmailIcon","OutlookIcon","MailSend","IntegrationDetailPage","canManageIntegrations","appName","scopeText","connectedScopeText","helpArticleUrl","indexRoute","integrationRoutes","ownDomainSetupRoute","ownDomainVerifyRoute","onBeforeAction","history","useHistory","_useQueryParams","useQueryParams","error","errorDescription","_useState","useState","_useState2","_slicedToArray","isSmtpPaneOpen","setIsSmtpPaneOpen","isPresent","_errorMessage2","_integrationRoutes$ty","errorMessage","concat","Toastr","humanize","replace","providerLabel","Icon","description","gmailIntegration","useGmail","outlookIntegration","useOutlook","sparkpostIntegration","useSparkpostDomain","smtpIntegration","useSmtp","_useFetchConnectedInt","useFetchConnectedIntegration","connectedIntegration","integration","isIntegrationLoading","isLoading","integrationMap","currentIntegration","isConnected","isDestroying","onDisconnect","_currentIntegration$d","data","connectedEmail","sparkpostVerificationRecords","verificationRecords","showSparkpostConnectedDetails","isOutlookPending","isWaitingForTestEmail","isSparkpostPending","exists","isBlocked","activeProviderLabel","activeProviderRoute","executeConnect","window","location","href","buildUrl","GMAIL_OAUTH_CONNECT_URL","OUTLOOK_OAUTH_CONNECT_URL","push","handleConnect","handleDisconnect","getConnectButtonLabel","renderTitle","provider","Check","Warning","renderActionBlock","Button","loading","to","Spinner","_Fragment","CardLayout","actionBlock","icon","title","Trans","components","bold","i18nKey","helpLink","target","disconnectLink","activeProvider","targetProvider","domain","isNotEmpty","DnsRecordsSection","dnsRecords","showTitle","sparkpostData","code"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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../app/javascript/src/components/Smtp/constants.js","../../app/javascript/src/components/Smtp/Setup.jsx","../../app/javascript/src/components/IntegrationDetailPage/constants.js","../../app/javascript/src/components/IntegrationDetailPage/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const ENCRYPTION_OPTIONS = [\n { label: \"None\", value: \"none\" },\n { label: \"StartTLS\", value: \"starttls\" },\n { label: \"SSL\", value: \"ssl\" },\n];\n\nexport const SMTP_ACCOUNT_INITIAL_VALUES = {\n host: \"\",\n port: 587,\n username: \"\",\n password: \"\",\n email: \"\",\n encryption: \"starttls\",\n displayName: \"\",\n};\n\nexport const SMTP_ACCOUNT_VALIDATION_SCHEMA = yup.object().shape({\n host: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.hostLabel\"),\n })\n ),\n port: yup.number().required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.portLabel\"),\n })\n ),\n username: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.usernameLabel\"),\n })\n ),\n password: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.passwordLabel\"),\n })\n ),\n email: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.emailLabel\"),\n })\n )\n .email(t(\"neetoEmailDelivery.smtp.setup.emailInvalid\")),\n displayName: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.displayNameLabel\"),\n })\n ),\n encryption: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.encryptionLabel\"),\n })\n ),\n});\n","import { Callout, Pane, Typography } from \"neetoui\";\nimport { Form, Input, Radio, ActionBlock } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateSmtp } from \"hooks/reactQuery/integrations/useSmtpIntegrationApi\";\n\nimport {\n SMTP_ACCOUNT_INITIAL_VALUES,\n SMTP_ACCOUNT_VALIDATION_SCHEMA,\n ENCRYPTION_OPTIONS,\n} from \"./constants\";\n\nconst SmtpSetup = ({ ownerId, onDone, onCancel, isOpen }) => {\n const { t } = useTranslation();\n\n const { isPending: isCreating, mutate: createSmtp } = useCreateSmtp({\n ownerId,\n });\n\n const handleSubmit = values => {\n createSmtp({ smtp_account: values }, { onSuccess: onDone });\n };\n\n return (\n <Pane {...{ isOpen }} size=\"lg\" onClose={onCancel}>\n <Pane.Header>\n <Typography style=\"h2\" weight=\"semibold\">\n {t(\"neetoEmailDelivery.smtp.setup.title\")}\n </Typography>\n </Pane.Header>\n <Form\n className=\"w-full\"\n formikProps={{\n initialValues: SMTP_ACCOUNT_INITIAL_VALUES,\n validationSchema: SMTP_ACCOUNT_VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <Pane.Body className=\"space-y-4\">\n <div className=\"flex flex-col gap-6\">\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.smtp.setup.note\")}\n </Callout>\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.hostLabel\")}\n name=\"host\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.portLabel\")}\n name=\"port\"\n type=\"number\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.usernameLabel\")}\n name=\"username\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.passwordLabel\")}\n name=\"password\"\n type=\"password\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.emailLabel\")}\n name=\"email\"\n type=\"email\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.displayNameLabel\")}\n name=\"displayName\"\n />\n <Radio\n label={t(\"neetoEmailDelivery.smtp.setup.encryptionLabel\")}\n name=\"encryption\"\n >\n {ENCRYPTION_OPTIONS.map(option => (\n <Radio.Item\n key={option.value}\n label={option.label}\n value={option.value}\n />\n ))}\n </Radio>\n </div>\n </Pane.Body>\n <Pane.Footer>\n <ActionBlock\n cancelButtonProps={{ onClick: onCancel }}\n isSubmitting={isCreating}\n submitButtonProps={{\n label: t(\"neetoEmailDelivery.smtp.setup.saveAndActivate\"),\n }}\n />\n </Pane.Footer>\n </Form>\n </Pane>\n );\n};\n\nexport default SmtpSetup;\n","import { t } from \"i18next\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\n\nexport const ERROR_MESSAGES = {\n gmail_permission_not_given: t(\"neetoEmailDelivery.gmail.permissionNotGiven\"),\n outlook_permission_not_given: t(\n \"neetoEmailDelivery.outlook.permissionNotGiven\"\n ),\n outlook_invalid_client: t(\"neetoEmailDelivery.outlook.invalidClient\"),\n outlook_nil_json_web_token: t(\"neetoEmailDelivery.outlook.nilJsonWebToken\"),\n};\n\nexport const INTEGRATION_TYPES = {\n GMAIL: \"gmail\",\n OUTLOOK: \"outlook\",\n SPARKPOST: \"sparkpost\",\n SMTP: \"smtp\",\n};\n\nexport const PROVIDER_LABELS = {\n [INTEGRATION_TYPES.GMAIL]: \"Gmail\",\n [INTEGRATION_TYPES.OUTLOOK]: \"Outlook\",\n [INTEGRATION_TYPES.SPARKPOST]: \"Custom email provider\",\n [INTEGRATION_TYPES.SMTP]: \"SMTP\",\n};\n\nexport const PROVIDER_ICONS = {\n [INTEGRATION_TYPES.GMAIL]: GmailIcon,\n [INTEGRATION_TYPES.OUTLOOK]: OutlookIcon,\n [INTEGRATION_TYPES.SPARKPOST]: MailSend,\n [INTEGRATION_TYPES.SMTP]: MailSend,\n};\n","import { useState } from \"react\";\n\nimport { humanize, isNotEmpty, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Check, Warning } from \"neetoicons\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button, Callout, Spinner, Toastr, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n GMAIL_OAUTH_CONNECT_URL,\n OUTLOOK_OAUTH_CONNECT_URL,\n} from \"apis/integrations/constants\";\nimport SmtpSetup from \"components/Smtp/Setup\";\nimport DnsRecordsSection from \"components/SparkpostDomain/DnsRecordsSection\";\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\nimport { useFetchConnectedIntegration } from \"hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi\";\n\nimport {\n ERROR_MESSAGES,\n INTEGRATION_TYPES,\n PROVIDER_LABELS,\n PROVIDER_ICONS,\n} from \"./constants\";\n\nconst IntegrationDetailPage = ({\n type,\n ownerId,\n canManageIntegrations,\n appName,\n scopeText,\n connectedScopeText,\n helpArticleUrl,\n indexRoute,\n integrationRoutes,\n ownDomainSetupRoute,\n ownDomainVerifyRoute,\n onBeforeAction,\n}) => {\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription } = useQueryParams();\n const [isSmtpPaneOpen, setIsSmtpPaneOpen] = useState(false);\n\n if (isPresent(error)) {\n let errorMessage = ERROR_MESSAGES[error];\n if (errorDescription) {\n errorMessage = `${errorMessage} ${errorDescription}`;\n }\n Toastr.error(errorMessage ?? humanize(error));\n history.replace(integrationRoutes?.[type] ?? indexRoute);\n }\n\n const providerLabel = PROVIDER_LABELS[type];\n const Icon = PROVIDER_ICONS[type];\n const description = t(`neetoEmailDelivery.${type}.description`);\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 { integration: connectedIntegration, isLoading: isIntegrationLoading } =\n useFetchConnectedIntegration(ownerId);\n\n const integrationMap = {\n [INTEGRATION_TYPES.GMAIL]: gmailIntegration,\n [INTEGRATION_TYPES.OUTLOOK]: outlookIntegration,\n [INTEGRATION_TYPES.SPARKPOST]: sparkpostIntegration,\n [INTEGRATION_TYPES.SMTP]: smtpIntegration,\n };\n\n const currentIntegration = integrationMap[type];\n const {\n isConnected,\n isDestroying,\n onDisconnect,\n data = {},\n errorMessage,\n } = currentIntegration;\n\n const connectedEmail = data?.email;\n const sparkpostVerificationRecords = data?.verificationRecords || [];\n const showSparkpostConnectedDetails =\n type === INTEGRATION_TYPES.SPARKPOST && isConnected;\n\n const isOutlookPending =\n type === INTEGRATION_TYPES.OUTLOOK &&\n outlookIntegration.isWaitingForTestEmail;\n\n const isSparkpostPending =\n type === INTEGRATION_TYPES.SPARKPOST &&\n sparkpostIntegration.exists &&\n !isConnected;\n\n const isPending = isOutlookPending || isSparkpostPending;\n\n const isLoading =\n gmailIntegration.isLoading ||\n outlookIntegration.isLoading ||\n sparkpostIntegration.isLoading ||\n smtpIntegration.isLoading ||\n isIntegrationLoading;\n\n const isBlocked = connectedIntegration && connectedIntegration.type !== type;\n\n const activeProviderLabel = isBlocked\n ? PROVIDER_LABELS[connectedIntegration.type]\n : null;\n\n const activeProviderRoute = isBlocked\n ? integrationRoutes?.[connectedIntegration.type]\n : null;\n\n const executeConnect = () => {\n switch (type) {\n case INTEGRATION_TYPES.GMAIL:\n window.location.href = buildUrl(GMAIL_OAUTH_CONNECT_URL, { ownerId });\n break;\n case INTEGRATION_TYPES.OUTLOOK:\n window.location.href = buildUrl(OUTLOOK_OAUTH_CONNECT_URL, {\n ownerId,\n });\n break;\n case INTEGRATION_TYPES.SPARKPOST:\n history.push(ownDomainSetupRoute);\n break;\n case INTEGRATION_TYPES.SMTP:\n setIsSmtpPaneOpen(true);\n break;\n default:\n break;\n }\n };\n\n const handleConnect = () => {\n if (onBeforeAction) {\n onBeforeAction(executeConnect);\n } else {\n executeConnect();\n }\n };\n\n const handleDisconnect = () => {\n if (onBeforeAction) {\n onBeforeAction(onDisconnect);\n } else {\n onDisconnect();\n }\n };\n\n const getConnectButtonLabel = () => {\n switch (type) {\n case INTEGRATION_TYPES.GMAIL:\n return t(\"neetoEmailDelivery.integrationDetail.connectGmail\");\n case INTEGRATION_TYPES.OUTLOOK:\n return t(\"neetoEmailDelivery.integrationDetail.connectOutlook\");\n case INTEGRATION_TYPES.SPARKPOST:\n return t(\"neetoEmailDelivery.integrationDetail.setupDomain\");\n case INTEGRATION_TYPES.SMTP:\n return t(\"neetoEmailDelivery.integrationDetail.connectSmtp\");\n default:\n return \"\";\n }\n };\n\n const renderTitle = () => {\n if (isConnected) {\n return (\n <div className=\"flex items-center gap-2\">\n <span>\n {t(\"neetoEmailDelivery.integrationDetail.connectedTitle\", {\n provider: providerLabel,\n })}\n </span>\n <div className=\"neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1\">\n <Check size={24} />\n </div>\n </div>\n );\n }\n\n if (isPending) {\n return (\n <div className=\"flex items-center gap-2\">\n <span>\n {t(\"neetoEmailDelivery.integrationDetail.pendingTitle\", {\n provider: providerLabel,\n })}\n </span>\n <div className=\"neeto-ui-text-warning-500 flex items-center justify-center p-1\">\n <Warning size={24} />\n </div>\n </div>\n );\n }\n\n return t(\"neetoEmailDelivery.integrationDetail.connectTitle\", {\n appName,\n provider: providerLabel,\n });\n };\n\n const renderActionBlock = () => {\n if (isConnected) {\n return (\n <Button\n data-testid=\"disconnect-button\"\n label={t(\"neetoEmailDelivery.integrationDetail.disconnect\")}\n loading={isDestroying}\n style=\"danger\"\n onClick={handleDisconnect}\n />\n );\n }\n\n if (isPending) {\n return (\n <div className=\"flex items-center gap-2\">\n {isSparkpostPending && (\n <Button\n data-testid=\"continue-verification-button\"\n to={ownDomainVerifyRoute}\n label={t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.continueVerification\"\n )}\n />\n )}\n <Button\n data-testid=\"disconnect-button\"\n label={t(\"neetoEmailDelivery.integrationDetail.disconnect\")}\n loading={isDestroying}\n style=\"danger\"\n onClick={handleDisconnect}\n />\n </div>\n );\n }\n\n if (isBlocked) return null;\n\n return (\n <Button\n data-testid=\"connect-button\"\n label={getConnectButtonLabel()}\n style=\"primary\"\n onClick={handleConnect}\n />\n );\n };\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 <>\n <CardLayout\n actionBlock={renderActionBlock()}\n icon={<Icon size={48} />}\n title={renderTitle()}\n description={\n isConnected ? (\n <Trans\n components={{ bold: <strong /> }}\n i18nKey=\"neetoEmailDelivery.integrationDetail.connectedEmail\"\n values={{ email: connectedEmail }}\n />\n ) : (\n description\n )\n }\n >\n {(isConnected ? connectedScopeText || scopeText : scopeText) && (\n <Typography style=\"body1\">\n {isConnected ? connectedScopeText || scopeText : scopeText}\n </Typography>\n )}\n {!isConnected && helpArticleUrl && (\n <Typography className=\"my-2\" style=\"body2\">\n <Trans\n i18nKey=\"neetoEmailDelivery.integrationDetail.helpArticleText\"\n values={{ provider: providerLabel }}\n components={{\n helpLink: (\n <Button\n data-testid=\"help-doc-link\"\n href={helpArticleUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n />\n </Typography>\n )}\n {!isConnected && !isPending && isBlocked && (\n <Callout\n style={connectedIntegration.isPending ? \"warning\" : \"danger\"}\n >\n <p>\n <Trans\n components={{\n disconnectLink: (\n <Button\n data-testid=\"disconnect-link\"\n href={activeProviderRoute}\n style=\"link\"\n />\n ),\n }}\n i18nKey={\n connectedIntegration.isPending\n ? \"neetoEmailDelivery.integrationDetail.pendingIntegrationBlocked\"\n : \"neetoEmailDelivery.integrationDetail.onlyOneIntegration\"\n }\n values={{\n activeProvider: activeProviderLabel,\n targetProvider: providerLabel,\n }}\n />\n </p>\n </Callout>\n )}\n {errorMessage && <Callout style=\"danger\">{errorMessage}</Callout>}\n {isOutlookPending && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.waitingForTestEmail\", {\n email: connectedEmail,\n })}\n </Callout>\n )}\n {isSparkpostPending && (\n <Callout style=\"warning\">\n {t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.verificationPending\",\n { domain: data?.domain }\n )}\n </Callout>\n )}\n {showSparkpostConnectedDetails && (\n <div className=\"flex flex-col gap-2 mt-4\">\n {isNotEmpty(sparkpostVerificationRecords) && (\n <DnsRecordsSection\n dnsRecords={sparkpostVerificationRecords}\n domain={data?.domain}\n showTitle={false}\n sparkpostData={data}\n />\n )}\n <Callout style=\"info\">\n <Typography style=\"body3\">\n <Trans\n i18nKey=\"neetoEmailDelivery.sparkpost.emailDelivery.spfGuidance\"\n components={{\n bold: <strong />,\n code: (\n <code className=\"neeto-ui-bg-gray-100 neeto-ui-rounded px-1\" />\n ),\n }}\n />\n </Typography>\n </Callout>\n </div>\n )}\n </CardLayout>\n {type === INTEGRATION_TYPES.SMTP && (\n <SmtpSetup\n {...{ ownerId }}\n isOpen={isSmtpPaneOpen}\n onCancel={() => setIsSmtpPaneOpen(false)}\n onDone={() => setIsSmtpPaneOpen(false)}\n />\n )}\n </>\n );\n};\n\nexport default IntegrationDetailPage;\n"],"names":["ENCRYPTION_OPTIONS","label","value","SMTP_ACCOUNT_INITIAL_VALUES","host","port","username","password","email","encryption","displayName","SMTP_ACCOUNT_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","field","number","SmtpSetup","_ref","ownerId","onDone","onCancel","isOpen","_useTranslation","useTranslation","_useCreateSmtp","useCreateSmtp","isCreating","isPending","createSmtp","mutate","handleSubmit","values","smtp_account","onSuccess","_jsxs","Pane","size","onClose","children","_jsx","Header","Typography","style","weight","Form","className","formikProps","initialValues","validationSchema","onSubmit","Body","Callout","Input","name","type","Radio","map","option","Item","Footer","ActionBlock","cancelButtonProps","onClick","isSubmitting","submitButtonProps","ERROR_MESSAGES","gmail_permission_not_given","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","INTEGRATION_TYPES","GMAIL","OUTLOOK","SPARKPOST","SMTP","PROVIDER_LABELS","_defineProperty","PROVIDER_ICONS","GmailIcon","OutlookIcon","MailSend","IntegrationDetailPage","canManageIntegrations","appName","scopeText","connectedScopeText","helpArticleUrl","indexRoute","integrationRoutes","ownDomainSetupRoute","ownDomainVerifyRoute","onBeforeAction","history","useHistory","_useQueryParams","useQueryParams","error","errorDescription","_useState","useState","_useState2","_slicedToArray","isSmtpPaneOpen","setIsSmtpPaneOpen","isPresent","_errorMessage2","_integrationRoutes$ty","errorMessage","concat","Toastr","humanize","replace","providerLabel","Icon","description","gmailIntegration","useGmail","outlookIntegration","useOutlook","sparkpostIntegration","useSparkpostDomain","smtpIntegration","useSmtp","_useFetchConnectedInt","useFetchConnectedIntegration","connectedIntegration","integration","isIntegrationLoading","isLoading","integrationMap","currentIntegration","isConnected","isDestroying","onDisconnect","_currentIntegration$d","data","connectedEmail","sparkpostVerificationRecords","verificationRecords","showSparkpostConnectedDetails","isOutlookPending","isWaitingForTestEmail","isSparkpostPending","exists","isBlocked","activeProviderLabel","activeProviderRoute","executeConnect","window","location","href","buildUrl","GMAIL_OAUTH_CONNECT_URL","OUTLOOK_OAUTH_CONNECT_URL","push","handleConnect","handleDisconnect","getConnectButtonLabel","renderTitle","provider","Check","Warning","renderActionBlock","Button","loading","to","Spinner","_Fragment","CardLayout","actionBlock","icon","title","Trans","components","bold","i18nKey","helpLink","target","disconnectLink","activeProvider","targetProvider","domain","isNotEmpty","DnsRecordsSection","dnsRecords","showTitle","sparkpostData","code"],"mappings":";;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;;;;;;"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
4
|
+
var MailSend = require('@bigbinary/neeto-icons/MailSend');
|
|
5
|
+
var GmailIcon = require('@bigbinary/neeto-icons/misc/Gmail');
|
|
6
|
+
var OutlookIcon = require('@bigbinary/neeto-icons/misc/Outlook');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
var useSmtp = require('../../useSmtp-BCcRaVYr.js');
|
|
9
|
+
var useSparkpostDomain = require('../../useSparkpostDomain-IJPoCQ0f.js');
|
|
10
|
+
var reactRouterDom = require('react-router-dom');
|
|
11
|
+
var Check = require('@bigbinary/neeto-icons/Check');
|
|
12
|
+
var Warning = require('@bigbinary/neeto-icons/Warning');
|
|
13
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
15
|
+
require('react');
|
|
16
|
+
require('@tanstack/react-query');
|
|
17
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
18
|
+
require('../../useSparkpostApi-DlgW14Wu.js');
|
|
19
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
20
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
21
|
+
require('axios');
|
|
22
|
+
|
|
23
|
+
var STATUS_TAG_CONFIG = {
|
|
24
|
+
connected: {
|
|
25
|
+
labelKey: "neetoEmailDelivery.sparkpost.emailDelivery.connected",
|
|
26
|
+
variant: "green",
|
|
27
|
+
icon: Check
|
|
28
|
+
},
|
|
29
|
+
pending: {
|
|
30
|
+
labelKey: "neetoEmailDelivery.integrationDetail.pending",
|
|
31
|
+
variant: "amber",
|
|
32
|
+
icon: Warning
|
|
33
|
+
},
|
|
34
|
+
error: {
|
|
35
|
+
labelKey: "neetoEmailDelivery.integrationDetail.error",
|
|
36
|
+
variant: "red",
|
|
37
|
+
icon: Warning
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var IntegrationCard = function IntegrationCard(_ref) {
|
|
42
|
+
var Icon = _ref.icon,
|
|
43
|
+
title = _ref.title,
|
|
44
|
+
description = _ref.description,
|
|
45
|
+
status = _ref.status,
|
|
46
|
+
path = _ref.path,
|
|
47
|
+
dataTestId = _ref["data-testid"];
|
|
48
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
49
|
+
t = _useTranslation.t;
|
|
50
|
+
var tagConfig = STATUS_TAG_CONFIG[status];
|
|
51
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactRouterDom.Link, {
|
|
52
|
+
className: "border-border flex cursor-pointer flex-col gap-y-4 rounded-lg border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out",
|
|
53
|
+
"data-testid": dataTestId,
|
|
54
|
+
to: path,
|
|
55
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
56
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
57
|
+
className: "mb-2.5 flex items-center gap-3",
|
|
58
|
+
children: [Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
59
|
+
className: "text-muted-foreground",
|
|
60
|
+
size: 24
|
|
61
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
62
|
+
className: "text-foreground text-lg leading-6",
|
|
63
|
+
variant: "h3",
|
|
64
|
+
weight: "semibold",
|
|
65
|
+
children: title
|
|
66
|
+
})]
|
|
67
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
68
|
+
className: "text-muted-foreground",
|
|
69
|
+
variant: "body2",
|
|
70
|
+
children: description
|
|
71
|
+
})]
|
|
72
|
+
}), tagConfig && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
73
|
+
className: "border-border border-t pt-3",
|
|
74
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
75
|
+
icon: tagConfig.icon,
|
|
76
|
+
iconPosition: "right",
|
|
77
|
+
label: t(tagConfig.labelKey),
|
|
78
|
+
variant: tagConfig.variant
|
|
79
|
+
})
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
85
|
+
var indexRoute = _ref.indexRoute,
|
|
86
|
+
ownerId = _ref.ownerId,
|
|
87
|
+
canManageIntegrations = _ref.canManageIntegrations,
|
|
88
|
+
gmailRoute = _ref.gmailRoute,
|
|
89
|
+
outlookRoute = _ref.outlookRoute,
|
|
90
|
+
customEmailProviderRoute = _ref.customEmailProviderRoute,
|
|
91
|
+
smtpRoute = _ref.smtpRoute;
|
|
92
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
93
|
+
t = _useTranslation.t;
|
|
94
|
+
var gmailIntegration = useSmtp.useGmail({
|
|
95
|
+
ownerId: ownerId,
|
|
96
|
+
indexRoute: indexRoute,
|
|
97
|
+
canManageIntegrations: canManageIntegrations
|
|
98
|
+
});
|
|
99
|
+
var outlookIntegration = useSmtp.useOutlook({
|
|
100
|
+
ownerId: ownerId,
|
|
101
|
+
indexRoute: indexRoute,
|
|
102
|
+
canManageIntegrations: canManageIntegrations
|
|
103
|
+
});
|
|
104
|
+
var sparkpostIntegration = useSparkpostDomain.useSparkpostDomain({
|
|
105
|
+
ownerId: ownerId,
|
|
106
|
+
canManageIntegrations: canManageIntegrations
|
|
107
|
+
});
|
|
108
|
+
var smtpIntegration = useSmtp.useSmtp({
|
|
109
|
+
ownerId: ownerId,
|
|
110
|
+
canManageIntegrations: canManageIntegrations
|
|
111
|
+
});
|
|
112
|
+
var isGmailConnected = gmailIntegration.isConnected,
|
|
113
|
+
isGmailLoading = gmailIntegration.isLoading,
|
|
114
|
+
gmailError = gmailIntegration.errorMessage;
|
|
115
|
+
var isOutlookConnected = outlookIntegration.isConnected,
|
|
116
|
+
isOutlookLoading = outlookIntegration.isLoading,
|
|
117
|
+
isOutlookPending = outlookIntegration.isWaitingForTestEmail,
|
|
118
|
+
outlookError = outlookIntegration.errorMessage;
|
|
119
|
+
var isSparkpostConnected = sparkpostIntegration.isConnected,
|
|
120
|
+
isSparkpostLoading = sparkpostIntegration.isLoading,
|
|
121
|
+
sparkpostExists = sparkpostIntegration.exists;
|
|
122
|
+
var isSmtpConnected = smtpIntegration.isConnected,
|
|
123
|
+
isSmtpLoading = smtpIntegration.isLoading;
|
|
124
|
+
var getCardStatus = function getCardStatus(_ref2) {
|
|
125
|
+
var isConnected = _ref2.isConnected,
|
|
126
|
+
isPending = _ref2.isPending,
|
|
127
|
+
hasError = _ref2.hasError;
|
|
128
|
+
if (isConnected) return "connected";
|
|
129
|
+
if (hasError) return "error";
|
|
130
|
+
if (isPending) return "pending";
|
|
131
|
+
return null;
|
|
132
|
+
};
|
|
133
|
+
var isLoading = isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;
|
|
134
|
+
var gmailTitle = t("neetoEmailDelivery.gmail.title");
|
|
135
|
+
var gmailDescription = t("neetoEmailDelivery.gmail.description");
|
|
136
|
+
var outlookTitle = t("neetoEmailDelivery.outlook.title");
|
|
137
|
+
var outlookDescription = t("neetoEmailDelivery.outlook.description");
|
|
138
|
+
var ownDomainTitle = t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle");
|
|
139
|
+
var ownDomainDescription = t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription");
|
|
140
|
+
var smtpTitle = t("neetoEmailDelivery.smtp.title");
|
|
141
|
+
var smtpDescription = t("neetoEmailDelivery.smtp.description");
|
|
142
|
+
if (isLoading) {
|
|
143
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
144
|
+
className: "flex grow items-center justify-center w-full",
|
|
145
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
149
|
+
className: "min-h-0 w-full grow",
|
|
150
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
151
|
+
className: "@container mx-auto space-y-6",
|
|
152
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
153
|
+
className: "grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4",
|
|
154
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(IntegrationCard, {
|
|
155
|
+
"data-testid": "gmail-integration-card",
|
|
156
|
+
description: gmailDescription,
|
|
157
|
+
icon: GmailIcon,
|
|
158
|
+
path: gmailRoute,
|
|
159
|
+
title: gmailTitle,
|
|
160
|
+
status: getCardStatus({
|
|
161
|
+
isConnected: isGmailConnected,
|
|
162
|
+
hasError: !!gmailError
|
|
163
|
+
})
|
|
164
|
+
}), /*#__PURE__*/jsxRuntime.jsx(IntegrationCard, {
|
|
165
|
+
"data-testid": "outlook-integration-card",
|
|
166
|
+
description: outlookDescription,
|
|
167
|
+
icon: OutlookIcon,
|
|
168
|
+
path: outlookRoute,
|
|
169
|
+
title: outlookTitle,
|
|
170
|
+
status: getCardStatus({
|
|
171
|
+
isConnected: isOutlookConnected,
|
|
172
|
+
isPending: isOutlookPending,
|
|
173
|
+
hasError: !!outlookError
|
|
174
|
+
})
|
|
175
|
+
}), /*#__PURE__*/jsxRuntime.jsx(IntegrationCard, {
|
|
176
|
+
"data-testid": "custom-email-provider-integration-card",
|
|
177
|
+
description: ownDomainDescription,
|
|
178
|
+
icon: MailSend,
|
|
179
|
+
path: customEmailProviderRoute,
|
|
180
|
+
title: ownDomainTitle,
|
|
181
|
+
status: getCardStatus({
|
|
182
|
+
isConnected: isSparkpostConnected,
|
|
183
|
+
isPending: sparkpostExists && !isSparkpostConnected
|
|
184
|
+
})
|
|
185
|
+
}), /*#__PURE__*/jsxRuntime.jsx(IntegrationCard, {
|
|
186
|
+
"data-testid": "smtp-integration-card",
|
|
187
|
+
description: smtpDescription,
|
|
188
|
+
icon: MailSend,
|
|
189
|
+
path: smtpRoute,
|
|
190
|
+
status: getCardStatus({
|
|
191
|
+
isConnected: isSmtpConnected
|
|
192
|
+
}),
|
|
193
|
+
title: smtpTitle
|
|
194
|
+
})]
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
module.exports = EmailDeliveryScreen;
|
|
201
|
+
//# sourceMappingURL=EmailDeliveryScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailDeliveryScreen.js","sources":["../../../app/javascript/src/v2/components/EmailDeliveryScreen/constants.js","../../../app/javascript/src/v2/components/EmailDeliveryScreen/IntegrationCard.jsx","../../../app/javascript/src/v2/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 variant: \"green\",\n icon: Check,\n },\n pending: {\n labelKey: \"neetoEmailDelivery.integrationDetail.pending\",\n variant: \"amber\",\n icon: Warning,\n },\n error: {\n labelKey: \"neetoEmailDelivery.integrationDetail.error\",\n variant: \"red\",\n icon: Warning,\n },\n};\n","import { Badge, Typography } from \"@bigbinary/neeto-atoms\";\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=\"border-border flex cursor-pointer flex-col gap-y-4 rounded-lg 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=\"text-muted-foreground\" size={24} />}\n <Typography\n className=\"text-foreground text-lg leading-6\"\n variant=\"h3\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n </div>\n <Typography className=\"text-muted-foreground\" variant=\"body2\">\n {description}\n </Typography>\n </div>\n {tagConfig && (\n <div className=\"border-border border-t pt-3\">\n <Badge\n icon={tagConfig.icon}\n iconPosition=\"right\"\n label={t(tagConfig.labelKey)}\n variant={tagConfig.variant}\n />\n </div>\n )}\n </Link>\n );\n};\n\nexport default IntegrationCard;\n","import { Spinner } from \"@bigbinary/neeto-atoms\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\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 \"v2/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","variant","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","Badge","iconPosition","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,OAAO,EAAE,OAAO;AAChBC,IAAAA,IAAI,EAAEC;GACP;AACDC,EAAAA,OAAO,EAAE;AACPJ,IAAAA,QAAQ,EAAE,8CAA8C;AACxDC,IAAAA,OAAO,EAAE,OAAO;AAChBC,IAAAA,IAAI,EAAEG;GACP;AACDC,EAAAA,KAAK,EAAE;AACLN,IAAAA,QAAQ,EAAE,4CAA4C;AACtDC,IAAAA,OAAO,EAAE,KAAK;AAC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
|
4
|
+
var formik = require('@bigbinary/neeto-atoms/formik');
|
|
5
|
+
var utils = require('@bigbinary/neeto-commons-frontend/v2/utils');
|
|
6
|
+
var CardLayout = require('@bigbinary/neeto-molecules/v2/CardLayout');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
|
+
var useEmailDeliveryIntegrationApi = require('../../useEmailDeliveryIntegrationApi-BcQDhMIH.js');
|
|
10
|
+
var PageLayout = require('../../PageLayout-pMKr_80l.js');
|
|
11
|
+
var useSparkpostDomain = require('../../useSparkpostDomain-IJPoCQ0f.js');
|
|
12
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
+
require('@bigbinary/neeto-cist');
|
|
14
|
+
require('ramda');
|
|
15
|
+
require('../../useSparkpostApi-DlgW14Wu.js');
|
|
16
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
17
|
+
require('@tanstack/react-query');
|
|
18
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
19
|
+
require('axios');
|
|
20
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
21
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
22
|
+
require('i18next');
|
|
23
|
+
require('yup');
|
|
24
|
+
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
25
|
+
require('react');
|
|
26
|
+
require('classnames');
|
|
27
|
+
require('@bigbinary/neeto-molecules/v2/Container');
|
|
28
|
+
require('@bigbinary/neeto-molecules/v2/Header');
|
|
29
|
+
|
|
30
|
+
var getDomainFromEmail = function getDomainFromEmail(email) {
|
|
31
|
+
return email.trim().split("@")[1];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var SparkpostDomainSetup = function SparkpostDomainSetup(_ref) {
|
|
35
|
+
var ownerId = _ref.ownerId,
|
|
36
|
+
alreadyVerifiedRoute = _ref.alreadyVerifiedRoute,
|
|
37
|
+
verifyRoute = _ref.verifyRoute,
|
|
38
|
+
onCancelRoute = _ref.onCancelRoute,
|
|
39
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
40
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
41
|
+
t = _useTranslation.t;
|
|
42
|
+
var history = reactRouterDom.useHistory();
|
|
43
|
+
var _useFetchConnectedInt = useEmailDeliveryIntegrationApi.useFetchConnectedIntegration(ownerId),
|
|
44
|
+
integration = _useFetchConnectedInt.integration,
|
|
45
|
+
isIntegrationLoading = _useFetchConnectedInt.isLoading;
|
|
46
|
+
var hasConnectedIntegration = integration && !integration.isPending;
|
|
47
|
+
var _useSparkpostDomain = useSparkpostDomain.useSparkpostDomain({
|
|
48
|
+
ownerId: ownerId,
|
|
49
|
+
canManageIntegrations: canManageIntegrations
|
|
50
|
+
}),
|
|
51
|
+
onCreateDomain = _useSparkpostDomain.onCreateDomain,
|
|
52
|
+
isCreating = _useSparkpostDomain.isCreating;
|
|
53
|
+
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
54
|
+
var setFieldError = _ref2.setFieldError;
|
|
55
|
+
onCreateDomain(values.email.trim(), values.displayName.trim(), function (response) {
|
|
56
|
+
if (response !== null && response !== void 0 && response.alreadyVerified) {
|
|
57
|
+
// Domain is already verified, go back to email delivery settings
|
|
58
|
+
history.push(alreadyVerifiedRoute);
|
|
59
|
+
} else {
|
|
60
|
+
// Navigate to verification page with domain query parameter
|
|
61
|
+
var domain = getDomainFromEmail(values.email);
|
|
62
|
+
history.push(utils.buildUrl(verifyRoute, {
|
|
63
|
+
domain: domain,
|
|
64
|
+
email: values.email.trim()
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
}, function (error) {
|
|
68
|
+
var _error$response;
|
|
69
|
+
var errorMessage = (error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 || (_error$response = _error$response.data) === null || _error$response === void 0 ? void 0 : _error$response.error) || t("neetoEmailDelivery.sparkpost.setup.validation.setupFailed");
|
|
70
|
+
setFieldError("email", errorMessage);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
var handleCancel = function handleCancel() {
|
|
74
|
+
history.push(onCancelRoute);
|
|
75
|
+
};
|
|
76
|
+
if (isIntegrationLoading) {
|
|
77
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
78
|
+
className: "flex justify-center p-6",
|
|
79
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (hasConnectedIntegration) {
|
|
83
|
+
history.replace(onCancelRoute);
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return /*#__PURE__*/jsxRuntime.jsx(PageLayout.PageWrapper, {
|
|
87
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PageLayout.PageContent, {
|
|
88
|
+
children: /*#__PURE__*/jsxRuntime.jsx(formik.Form, {
|
|
89
|
+
className: "w-full",
|
|
90
|
+
formikProps: {
|
|
91
|
+
initialValues: PageLayout.INITIAL_VALUES,
|
|
92
|
+
validationSchema: PageLayout.VALIDATION_SCHEMA,
|
|
93
|
+
onSubmit: handleSubmit
|
|
94
|
+
},
|
|
95
|
+
children: function children(_ref3) {
|
|
96
|
+
var values = _ref3.values;
|
|
97
|
+
var domain = values.email ? getDomainFromEmail(values.email) : t("neetoEmailDelivery.sparkpost.customDomain");
|
|
98
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardLayout, {
|
|
99
|
+
title: String(t("neetoEmailDelivery.sparkpost.setup.title")),
|
|
100
|
+
actionBlock: /*#__PURE__*/jsxRuntime.jsx(formik.ActionBlock, {
|
|
101
|
+
cancelButtonProps: {
|
|
102
|
+
onClick: handleCancel
|
|
103
|
+
},
|
|
104
|
+
isSubmitting: isCreating,
|
|
105
|
+
submitButtonProps: {
|
|
106
|
+
label: t("neetoEmailDelivery.sparkpost.setup.setupEmail")
|
|
107
|
+
}
|
|
108
|
+
}),
|
|
109
|
+
description: String(t("neetoEmailDelivery.sparkpost.setup.description")),
|
|
110
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
111
|
+
className: "flex flex-col gap-6",
|
|
112
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Callout, {
|
|
113
|
+
variant: "warning",
|
|
114
|
+
children: t("neetoEmailDelivery.sparkpost.setup.note")
|
|
115
|
+
}), /*#__PURE__*/jsxRuntime.jsx(formik.Input, {
|
|
116
|
+
required: true,
|
|
117
|
+
unlimitedChars: true,
|
|
118
|
+
label: t("neetoEmailDelivery.sparkpost.setup.emailLabel"),
|
|
119
|
+
name: "email",
|
|
120
|
+
type: "email",
|
|
121
|
+
helpText: t("neetoEmailDelivery.sparkpost.setup.emailHelp", {
|
|
122
|
+
domain: domain
|
|
123
|
+
}),
|
|
124
|
+
placeholder: t("neetoEmailDelivery.sparkpost.setup.emailPlaceholder")
|
|
125
|
+
}), /*#__PURE__*/jsxRuntime.jsx(formik.Input, {
|
|
126
|
+
required: true,
|
|
127
|
+
name: "displayName",
|
|
128
|
+
helpText: t("neetoEmailDelivery.sparkpost.setup.displayNameHelp"),
|
|
129
|
+
label: t("neetoEmailDelivery.sparkpost.setup.displayNameLabel")
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
module.exports = SparkpostDomainSetup;
|
|
140
|
+
//# sourceMappingURL=SparkpostDomainSetup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SparkpostDomainSetup.js","sources":["../../../app/javascript/src/v2/components/SparkpostDomain/utils.js","../../../app/javascript/src/v2/components/SparkpostDomain/Setup.jsx"],"sourcesContent":["const getDomainFromEmail = email => email.trim().split(\"@\")[1];\n\nexport { getDomainFromEmail };\n","import { Callout, Spinner } from \"@bigbinary/neeto-atoms\";\nimport { Input, ActionBlock, Form } from \"@bigbinary/neeto-atoms/formik\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchConnectedIntegration } from \"hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi\";\nimport { PageContent, PageWrapper } from \"v2/components/PageLayout\";\nimport useSparkpostDomain from \"v2/hooks/integrations/useSparkpostDomain\";\n\nimport { VALIDATION_SCHEMA, INITIAL_VALUES } from \"./constants\";\nimport { getDomainFromEmail } from \"./utils\";\n\nconst SparkpostDomainSetup = ({\n ownerId,\n alreadyVerifiedRoute,\n verifyRoute,\n onCancelRoute,\n canManageIntegrations,\n}) => {\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 { onCreateDomain, isCreating } = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const handleSubmit = (values, { setFieldError }) => {\n onCreateDomain(\n values.email.trim(),\n values.displayName.trim(),\n response => {\n if (response?.alreadyVerified) {\n // Domain is already verified, go back to email delivery settings\n history.push(alreadyVerifiedRoute);\n } else {\n // Navigate to verification page with domain query parameter\n const domain = getDomainFromEmail(values.email);\n history.push(\n buildUrl(verifyRoute, { domain, email: values.email.trim() })\n );\n }\n },\n error => {\n const errorMessage =\n error?.response?.data?.error ||\n t(\"neetoEmailDelivery.sparkpost.setup.validation.setupFailed\");\n setFieldError(\"email\", errorMessage);\n }\n );\n };\n\n const handleCancel = () => {\n history.push(onCancelRoute);\n };\n\n if (isIntegrationLoading) {\n return (\n <div className=\"flex justify-center p-6\">\n <Spinner />\n </div>\n );\n }\n\n if (hasConnectedIntegration) {\n history.replace(onCancelRoute);\n\n return null;\n }\n\n return (\n <PageWrapper>\n <PageContent>\n <Form\n className=\"w-full\"\n formikProps={{\n initialValues: INITIAL_VALUES,\n validationSchema: VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n {({ values }) => {\n const domain = values.email\n ? getDomainFromEmail(values.email)\n : t(\"neetoEmailDelivery.sparkpost.customDomain\");\n\n return (\n <CardLayout\n title={String(t(\"neetoEmailDelivery.sparkpost.setup.title\"))}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: handleCancel }}\n isSubmitting={isCreating}\n submitButtonProps={{\n label: t(\"neetoEmailDelivery.sparkpost.setup.setupEmail\"),\n }}\n />\n }\n description={String(\n t(\"neetoEmailDelivery.sparkpost.setup.description\")\n )}\n >\n <div className=\"flex flex-col gap-6\">\n <Callout variant=\"warning\">\n {t(\"neetoEmailDelivery.sparkpost.setup.note\")}\n </Callout>\n <Input\n required\n unlimitedChars\n label={t(\"neetoEmailDelivery.sparkpost.setup.emailLabel\")}\n name=\"email\"\n type=\"email\"\n helpText={t(\n \"neetoEmailDelivery.sparkpost.setup.emailHelp\",\n { domain }\n )}\n placeholder={t(\n \"neetoEmailDelivery.sparkpost.setup.emailPlaceholder\"\n )}\n />\n <Input\n required\n name=\"displayName\"\n helpText={t(\n \"neetoEmailDelivery.sparkpost.setup.displayNameHelp\"\n )}\n label={t(\n \"neetoEmailDelivery.sparkpost.setup.displayNameLabel\"\n )}\n />\n </div>\n </CardLayout>\n );\n }}\n </Form>\n </PageContent>\n </PageWrapper>\n );\n};\n\nexport default SparkpostDomainSetup;\n"],"names":["getDomainFromEmail","email","trim","split","SparkpostDomainSetup","_ref","ownerId","alreadyVerifiedRoute","verifyRoute","onCancelRoute","canManageIntegrations","_useTranslation","useTranslation","t","history","useHistory","_useFetchConnectedInt","useFetchConnectedIntegration","integration","isIntegrationLoading","isLoading","hasConnectedIntegration","isPending","_useSparkpostDomain","useSparkpostDomain","onCreateDomain","isCreating","handleSubmit","values","_ref2","setFieldError","displayName","response","alreadyVerified","push","domain","buildUrl","error","_error$response","errorMessage","data","handleCancel","_jsx","className","children","Spinner","replace","PageWrapper","PageContent","Form","formikProps","initialValues","INITIAL_VALUES","validationSchema","VALIDATION_SCHEMA","onSubmit","_ref3","CardLayout","title","String","actionBlock","ActionBlock","cancelButtonProps","onClick","isSubmitting","submitButtonProps","label","description","_jsxs","Callout","variant","Input","required","unlimitedChars","name","type","helpText","placeholder"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAGC,KAAK,EAAA;AAAA,EAAA,OAAIA,KAAK,CAACC,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAAA,CAAA;;ACc9D,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAMpB;AAAA,EAAA,IALJC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IACpBC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,qBAAqB,GAAAL,IAAA,CAArBK,qBAAqB;AAErB,EAAA,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AAET,EAAA,IAAMC,OAAO,GAAGC,yBAAU,EAAE;AAE5B,EAAA,IAAAC,qBAAA,GACEC,2DAA4B,CAACX,OAAO,CAAC;IAD/BY,WAAW,GAAAF,qBAAA,CAAXE,WAAW;IAAaC,oBAAoB,GAAAH,qBAAA,CAA/BI,SAAS;AAG9B,EAAA,IAAMC,uBAAuB,GAAGH,WAAW,IAAI,CAACA,WAAW,CAACI,SAAS;EAErE,IAAAC,mBAAA,GAAuCC,qCAAkB,CAAC;AACxDlB,MAAAA,OAAO,EAAPA,OAAO;AACPI,MAAAA,qBAAqB,EAArBA;AACF,KAAC,CAAC;IAHMe,cAAc,GAAAF,mBAAA,CAAdE,cAAc;IAAEC,UAAU,GAAAH,mBAAA,CAAVG,UAAU;EAKlC,IAAMC,YAAY,GAAG,SAA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+CAA+C;AAC1D;AAAE,aACH,CACF;AACDsD,YAAAA,WAAW,EAAER,MAAM,CACjB9C,CAAC,CAAC,gDAAgD,CACpD,CAAE;AAAA+B,YAAAA,QAAA,eAEFwB,eAAA,CAAA,KAAA,EAAA;AAAKzB,cAAAA,SAAS,EAAC,qBAAqB;cAAAC,QAAA,EAAA,cAClCF,cAAA,CAAC2B,kBAAO,EAAA;AAACC,gBAAAA,OAAO,EAAC,SAAS;gBAAA1B,QAAA,EACvB/B,CAAC,CAAC,yCAAyC;AAAC,eACtC,CAAC,eACV6B,cAAA,CAAC6B,YAAK,EAAA;gBACJC,QAAQ,EAAA,IAAA;gBACRC,cAAc,EAAA,IAAA;AACdP,gBAAAA,KAAK,EAAErD,CAAC,CAAC,+CAA+C,CAAE;AAC1D6D,gBAAAA,IAAI,EAAC,OAAO;AACZC,gBAAAA,IAAI,EAAC,OAAO;AACZC,gBAAAA,QAAQ,EAAE/D,CAAC,CACT,8CAA8C,EAC9C;AAAEsB,kBAAAA,MAAM,EAANA;AAAO,iBACX,CAAE;gBACF0C,WAAW,EAAEhE,CAAC,CACZ,qDACF;AAAE,eACH,CAAC,eACF6B,cAAA,CAAC6B,YAAK,EAAA;gBACJC,QAAQ,EAAA,IAAA;AACRE,gBAAAA,IAAI,EAAC,aAAa;AAClBE,gBAAAA,QAAQ,EAAE/D,CAAC,CACT,oDACF,CAAE;gBACFqD,KAAK,EAAErD,CAAC,CACN,qDACF;AAAE,eACH,CAAC;aACC;AAAC,WACI,CAAC;AAEjB,QAAA;OACI;KACK;AAAC,GACH,CAAC;AAElB;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
require('react');
|
|
5
|
+
require('@bigbinary/neeto-atoms');
|
|
6
|
+
require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
7
|
+
require('@bigbinary/neeto-molecules/v2/CardLayout');
|
|
8
|
+
require('ramda');
|
|
9
|
+
require('react-i18next');
|
|
10
|
+
require('react-router-dom');
|
|
11
|
+
require('../../useEmailDeliveryIntegrationApi-BcQDhMIH.js');
|
|
12
|
+
require('../../useSparkpostApi-DlgW14Wu.js');
|
|
13
|
+
require('../../PageLayout-pMKr_80l.js');
|
|
14
|
+
require('../../useSparkpostDomain-IJPoCQ0f.js');
|
|
15
|
+
var v2_SparkpostDomainVerify = require('../../Verify-80b6NK1q.js');
|
|
16
|
+
require('react/jsx-runtime');
|
|
17
|
+
require('@bigbinary/neeto-cist');
|
|
18
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
19
|
+
require('@tanstack/react-query');
|
|
20
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
21
|
+
require('axios');
|
|
22
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
23
|
+
require('i18next');
|
|
24
|
+
require('yup');
|
|
25
|
+
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
26
|
+
require('classnames');
|
|
27
|
+
require('@bigbinary/neeto-molecules/v2/Container');
|
|
28
|
+
require('@bigbinary/neeto-molecules/v2/Header');
|
|
29
|
+
require('@babel/runtime/helpers/toConsumableArray');
|
|
30
|
+
require('@bigbinary/neeto-molecules/v2/CopyToClipboardButton');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
module.exports = v2_SparkpostDomainVerify.SparkpostDomainVerify;
|
|
35
|
+
//# sourceMappingURL=SparkpostDomainVerify.js.map
|