@bigbinary/neeto-email-delivery-frontend 1.0.11 → 1.0.13
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 +77 -6
- package/app/javascript/src/translations/en.json +24 -0
- package/dist/EmailDeliveryScreen.js +225 -45
- package/dist/EmailDeliveryScreen.js.map +1 -1
- package/dist/SparkpostDomainSetup.js +2 -2
- package/dist/SparkpostDomainVerify.js +2 -2
- package/dist/cjs/EmailDeliveryScreen.js +245 -46
- package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
- package/dist/cjs/SparkpostDomainSetup.js +2 -2
- package/dist/cjs/SparkpostDomainVerify.js +2 -2
- package/dist/cjs/hooks.js +7 -2
- package/dist/cjs/hooks.js.map +1 -1
- package/dist/cjs/index.js +13 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/hooks.js +7 -2
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/{useOutlookIntegrationApi-CtHj_BzG.js → useOutlookIntegrationApi-BC-RPHmJ.js} +59 -2
- package/dist/useOutlookIntegrationApi-BC-RPHmJ.js.map +1 -0
- package/dist/{useOutlookIntegrationApi-ZgRWrUQN.js → useOutlookIntegrationApi-b_mNVfRE.js} +58 -4
- package/dist/useOutlookIntegrationApi-b_mNVfRE.js.map +1 -0
- package/dist/{useSparkpostApi-pa64NIl6.js → useSparkpostApi-D9NOjTNA.js} +18 -2
- package/dist/useSparkpostApi-D9NOjTNA.js.map +1 -0
- package/dist/{useSparkpostApi-W7XibjIp.js → useSparkpostApi-qpRhsK7H.js} +17 -3
- package/dist/useSparkpostApi-qpRhsK7H.js.map +1 -0
- package/dist/{useSparkpostDomain-CK-k6Xrr.js → useSparkpostDomain-Brk7SmL4.js} +3 -15
- package/dist/useSparkpostDomain-Brk7SmL4.js.map +1 -0
- package/dist/{useSparkpostDomain-DDI4pHcZ.js → useSparkpostDomain-CuX-Gl5a.js} +3 -14
- package/dist/useSparkpostDomain-CuX-Gl5a.js.map +1 -0
- package/package.json +7 -7
- package/dist/useOutlookIntegrationApi-CtHj_BzG.js.map +0 -1
- package/dist/useOutlookIntegrationApi-ZgRWrUQN.js.map +0 -1
- package/dist/useSparkpostApi-W7XibjIp.js.map +0 -1
- package/dist/useSparkpostApi-pa64NIl6.js.map +0 -1
- package/dist/useSparkpostDomain-CK-k6Xrr.js.map +0 -1
- package/dist/useSparkpostDomain-DDI4pHcZ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailDeliveryScreen.js","sources":["../app/javascript/src/hooks/integrations/useGmail.js","../app/javascript/src/hooks/integrations/useOutlook.js","../app/javascript/src/components/EmailDeliveryScreen/constants.js","../app/javascript/src/components/EmailDeliveryScreen/IntegrationCard.jsx","../app/javascript/src/components/EmailDeliveryScreen/index.jsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { showThumbsUpToastr } from \"neetocommons/utils\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchGmail,\n useDestroyGmail,\n} from \"hooks/reactQuery/integrations/useGmailIntegrationApi\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useGmail = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const {\n isLoading,\n data = {},\n isSuccess: isGmailFetched,\n } = useFetchGmail(ownerId, { enabled: canManageIntegrations });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyGmail({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n showThumbsUpToastr();\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n useEffect(() => {\n if (isGmailFetched) {\n queryClient.invalidateQueries({\n predicate: query => {\n const [key, id] = query.queryKey;\n\n return key === QUERY_KEYS.INTEGRATION_GMAIL && id !== ownerId;\n },\n });\n }\n }, [isGmailFetched, queryClient, ownerId]);\n\n return {\n data,\n isLoading,\n isDestroying,\n exists: data?.exists,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useGmail;\n","import { useEffect, useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { showThumbsUpToastr } from \"neetocommons/utils\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchOutlook,\n useDestroyOutlook,\n} from \"hooks/reactQuery/integrations/useOutlookIntegrationApi\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useOutlook = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const {\n isLoading,\n data = {},\n isSuccess: isOutlookFetched,\n } = useFetchOutlook(ownerId, { enabled: canManageIntegrations });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyOutlook({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n showThumbsUpToastr();\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n useEffect(() => {\n if (isOutlookFetched) {\n queryClient.invalidateQueries({\n predicate: query => {\n const [key, id] = query.queryKey;\n\n return key === QUERY_KEYS.INTEGRATION_OUTLOOK && id !== ownerId;\n },\n });\n }\n }, [isOutlookFetched, queryClient, ownerId]);\n\n return {\n data,\n isLoading,\n exists: data?.exists,\n status: data?.status,\n shadowAccount: data?.shadowAccount,\n isWaitingForTestEmail: data?.status === \"inactive\" && !data?.connected,\n isDestroying,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useOutlook;\n","import { t } from \"i18next\";\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","import { Button, Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationCard = ({\n icon: Icon,\n title,\n description,\n isConnected,\n isDisconnecting,\n onConnect,\n onDisconnect,\n connectButtonText,\n disconnectButtonText = \"neetoEmailDelivery.sparkpost.emailDelivery.disconnect\",\n connectedTagText = \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n showDisconnect = false,\n}) => {\n const { t } = useTranslation();\n\n const shouldShowDisconnect = isConnected || showDisconnect;\n\n return (\n <div className=\"neeto-ui-rounded-lg neeto-ui-shadow-xs neeto-ui-border-gray-300 translate flex flex-col gap-y-4 border p-6 no-underline transition-transform duration-300 ease-in-out outline-none hover:-translate-y-1\">\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-3\">\n <Icon className=\"shrink-0\" size={32} />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <Typography style=\"h4\" weight=\"semibold\">\n {title}\n </Typography>\n {isConnected && <Tag label={t(connectedTagText)} />}\n </div>\n </div>\n </div>\n <Typography style=\"body2\">{description}</Typography>\n {connectButtonText && (\n <div className=\"flex gap-2\">\n {shouldShowDisconnect ? (\n <Button\n data-cy=\"disconnect-button\"\n label={t(disconnectButtonText)}\n loading={isDisconnecting}\n size=\"small\"\n style=\"danger\"\n onClick={onDisconnect}\n />\n ) : (\n <Button\n data-cy=\"connect-button\"\n label={t(connectButtonText)}\n size=\"small\"\n style=\"primary\"\n onClick={onConnect}\n />\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default IntegrationCard;\n","import { humanize, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner, Callout, Toastr } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { 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 useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\n\nimport { ERROR_MESSAGES } from \"./constants\";\nimport IntegrationCard from \"./IntegrationCard\";\n\nconst EmailDeliveryScreen = ({\n indexRoute,\n ownerId,\n ownDomainSetupRoute,\n canManageIntegrations,\n}) => {\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription } = useQueryParams();\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\n history.replace(indexRoute);\n }\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 {\n data: gmailData = {},\n isConnected: isGmailConnected,\n isLoading: isGmailLoading,\n isDestroying: isGmailDisconnecting,\n onDisconnect: onGmailDisconnect,\n exists: isGmailExists,\n } = gmailIntegration;\n\n const {\n data: outlookData = {},\n isConnected: isOutlookConnected,\n isLoading: isOutlookLoading,\n isDestroying: isOutlookDisconnecting,\n isWaitingForTestEmail: isOutlookWaitingForTestEmail,\n shadowAccount: isOutlookShadowAccount,\n onDisconnect: onOutlookDisconnect,\n exists: isOutlookExists,\n } = outlookIntegration;\n\n const {\n data: sparkpostData = {},\n isConnected: isSparkpostConnected,\n isLoading: isSparkpostLoading,\n onDisconnect: onSparkpostDisconnect,\n isDestroying: isSparkpostDisconnecting,\n exists: isSparkpostExists,\n } = sparkpostIntegration;\n\n const isLoading = isGmailLoading || isOutlookLoading || isSparkpostLoading;\n const noneExists = !isGmailExists && !isOutlookExists && !isSparkpostExists;\n const showGmail = noneExists || isGmailExists;\n const showOutlook = noneExists || isOutlookExists;\n const showSparkpost = noneExists || isSparkpostExists;\n\n const handleGmailConnect = () => {\n window.location.href = buildUrl(GMAIL_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOutlookConnect = () => {\n window.location.href = buildUrl(OUTLOOK_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOwnDomainConnect = () => {\n history.push(ownDomainSetupRoute);\n };\n\n const gmailEmail = prop(\"email\", gmailData);\n const outlookEmail = prop(\"email\", outlookData);\n const sparkpostEmail = prop(\"email\", sparkpostData);\n\n const gmailTitle = t(\"neetoEmailDelivery.gmail.title\");\n const gmailDescription = isGmailConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: gmailEmail,\n })\n : t(\"neetoEmailDelivery.gmail.description\");\n\n const outlookTitle = t(\"neetoEmailDelivery.outlook.title\");\n const outlookDescription = isOutlookConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: outlookEmail,\n })\n : t(\"neetoEmailDelivery.outlook.description\");\n\n const ownDomainTitle = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle\"\n );\n\n const ownDomainDescription = isSparkpostConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: sparkpostEmail,\n })\n : t(\"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription\");\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 const activeMessage =\n (isGmailConnected && t(\"neetoEmailDelivery.gmail.gmailConfigured\")) ||\n (isOutlookConnected && t(\"neetoEmailDelivery.outlook.outlookConfigured\")) ||\n (isSparkpostConnected &&\n t(\"neetoEmailDelivery.sparkpost.ownDomainConfigured\"));\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 {/* Gmail Option */}\n {showGmail && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.gmail.connectGmail\"\n description={gmailDescription}\n icon={GmailIcon}\n isConnected={isGmailConnected}\n isDisconnecting={isGmailDisconnecting}\n title={gmailTitle}\n onConnect={handleGmailConnect}\n onDisconnect={onGmailDisconnect}\n />\n )}\n {/* Outlook Option */}\n {showOutlook && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.outlook.connectOutlook\"\n description={outlookDescription}\n icon={OutlookIcon}\n isConnected={isOutlookConnected}\n isDisconnecting={isOutlookDisconnecting}\n title={outlookTitle}\n showDisconnect={\n isOutlookWaitingForTestEmail || isOutlookShadowAccount\n }\n onConnect={handleOutlookConnect}\n onDisconnect={onOutlookDisconnect}\n />\n )}\n {/* Own Domain (Sparkpost) Option */}\n {showSparkpost && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.sparkpost.emailDelivery.setupDomain\"\n description={ownDomainDescription}\n icon={MailSend}\n isConnected={isSparkpostConnected}\n isDisconnecting={isSparkpostDisconnecting}\n title={ownDomainTitle}\n onConnect={handleOwnDomainConnect}\n onDisconnect={onSparkpostDisconnect}\n />\n )}\n </div>\n {activeMessage && <Callout style=\"success\">{activeMessage}</Callout>}\n {isOutlookWaitingForTestEmail && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.waitingForTestEmail\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n {isOutlookShadowAccount && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.shadowAccountMessage\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n </div>\n </div>\n );\n};\n\nexport default EmailDeliveryScreen;\n"],"names":["useGmail","_ref","ownerId","indexRoute","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","history","useHistory","queryClient","useQueryClient","_useFetchGmail","useFetchGmail","enabled","isLoading","_useFetchGmail$data","data","isGmailFetched","isSuccess","_useDestroyGmail","useDestroyGmail","isDestroying","isPending","destroyIntegration","mutate","onClose","replace","onDisconnect","onSuccess","showThumbsUpToastr","invalidateAllIntegrationQueries","useEffect","invalidateQueries","predicate","query","_query$queryKey","queryKey","key","id","QUERY_KEYS","INTEGRATION_GMAIL","exists","isConnected","connected","errorMessage","error","useOutlook","_useFetchOutlook","useFetchOutlook","_useFetchOutlook$data","isOutlookFetched","_useDestroyOutlook","useDestroyOutlook","INTEGRATION_OUTLOOK","status","shadowAccount","isWaitingForTestEmail","ERROR_MESSAGES","gmail_permission_not_given","t","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","IntegrationCard","Icon","icon","title","description","isDisconnecting","onConnect","connectButtonText","_ref$disconnectButton","disconnectButtonText","_ref$connectedTagText","connectedTagText","_ref$showDisconnect","showDisconnect","_useTranslation","useTranslation","shouldShowDisconnect","_jsx","className","children","_jsxs","size","Typography","style","weight","Tag","label","Button","loading","onClick","EmailDeliveryScreen","ownDomainSetupRoute","_useQueryParams","useQueryParams","errorDescription","isPresent","_errorMessage","concat","Toastr","humanize","gmailIntegration","outlookIntegration","sparkpostIntegration","useSparkpostDomain","_gmailIntegration$dat","gmailData","isGmailConnected","isGmailLoading","isGmailDisconnecting","onGmailDisconnect","isGmailExists","_outlookIntegration$d","outlookData","isOutlookConnected","isOutlookLoading","isOutlookDisconnecting","isOutlookWaitingForTestEmail","isOutlookShadowAccount","onOutlookDisconnect","isOutlookExists","_sparkpostIntegration","sparkpostData","isSparkpostConnected","isSparkpostLoading","onSparkpostDisconnect","isSparkpostDisconnecting","isSparkpostExists","noneExists","showGmail","showOutlook","showSparkpost","handleGmailConnect","window","location","href","buildUrl","GMAIL_OAUTH_CONNECT_URL","handleOutlookConnect","OUTLOOK_OAUTH_CONNECT_URL","handleOwnDomainConnect","push","gmailEmail","prop","outlookEmail","sparkpostEmail","gmailTitle","gmailDescription","email","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","Spinner","activeMessage","GmailIcon","OutlookIcon","MailSend","Callout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAuD;AAAA,EAAA,IAAjDC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAEC,qBAAqB,GAAAH,IAAA,CAArBG,qBAAqB;AAC5D,EAAA,IAAAC,SAAA,GAA0DC,QAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,wBAAwB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEtD,EAAA,IAAMI,OAAO,GAAGC,UAAU,EAAE;AAE5B,EAAA,IAAMC,WAAW,GAAGC,cAAc,EAAE;AAEpC,EAAA,IAAAC,cAAA,GAIIC,aAAa,CAACd,OAAO,EAAE;AAAEe,MAAAA,OAAO,EAAEb;AAAsB,KAAC,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E,kBAAmB;AAChChD,UAAAA,eAAe,EAAEkD,sBAAuB;AACxCpD,UAAAA,KAAK,EAAEqF,YAAa;UACpB3E,cAAc,EACZ2C,4BAA4B,IAAIC,sBACjC;AACDnD,UAAAA,SAAS,EAAEuE,oBAAqB;AAChCjH,UAAAA,YAAY,EAAE8F;AAAoB,SACnC,CACF,EAEAY,aAAa,iBACZrD,GAAA,CAACjB,eAAe,EAAA;AACdO,UAAAA,iBAAiB,EAAC,wDAAwD;AAC1EH,UAAAA,WAAW,EAAEuF,oBAAqB;AAClCzF,UAAAA,IAAI,EAAE8F,QAAS;AACfrH,UAAAA,WAAW,EAAEmF,oBAAqB;AAClCzD,UAAAA,eAAe,EAAE4D,wBAAyB;AAC1C9D,UAAAA,KAAK,EAAEuF,cAAe;AACtBpF,UAAAA,SAAS,EAAEyE,sBAAuB;AAClCnH,UAAAA,YAAY,EAAEoG;AAAsB,SACrC,CACF;AAAA,OACE,CAAC,EACL6B,aAAa,iBAAI5E,GAAA,CAACgF,OAAO,EAAA;AAAC1E,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EAAE0E;AAAa,OAAU,CAAC,EACnErC,4BAA4B,iBAC3BvC,GAAA,CAACgF,OAAO,EAAA;AAAC1E,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EACrBvB,CAAC,CAAC,gDAAgD,EAAE;AACnD2F,UAAAA,KAAK,EAAEJ;SACR;AAAC,OACK,CACV,EACA1B,sBAAsB,iBACrBxC,GAAA,CAACgF,OAAO,EAAA;AAAC1E,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EACrBvB,CAAC,CAAC,iDAAiD,EAAE;AACpD2F,UAAAA,KAAK,EAAEJ;SACR;AAAC,OACK,CACV;KACE;AAAC,GACH,CAAC;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"EmailDeliveryScreen.js","sources":["../app/javascript/src/components/Smtp/constants.js","../app/javascript/src/components/Smtp/Setup.jsx","../app/javascript/src/hooks/integrations/useGmail.js","../app/javascript/src/hooks/integrations/useOutlook.js","../app/javascript/src/hooks/integrations/useSmtp.js","../app/javascript/src/components/EmailDeliveryScreen/constants.js","../app/javascript/src/components/EmailDeliveryScreen/IntegrationCard.jsx","../app/javascript/src/components/EmailDeliveryScreen/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 display_name: \"\",\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 }) => {\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 { useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchGmail,\n useDestroyGmail,\n} from \"hooks/reactQuery/integrations/useGmailIntegrationApi\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useGmail = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const { isLoading, data = {} } = useFetchGmail(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyGmail({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n return {\n data,\n isLoading,\n isDestroying,\n exists: data?.exists,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useGmail;\n","import { useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchOutlook,\n useDestroyOutlook,\n} from \"hooks/reactQuery/integrations/useOutlookIntegrationApi\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useOutlook = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const { isLoading, data = {} } = useFetchOutlook(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyOutlook({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n return {\n data,\n isLoading,\n exists: data?.exists,\n status: data?.status,\n shadowAccount: data?.shadowAccount,\n isWaitingForTestEmail: data?.status === \"inactive\" && !data?.connected,\n isDestroying,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useOutlook;\n","import {\n useFetchSmtp,\n useDestroySmtp,\n} from \"hooks/reactQuery/integrations/useSmtpIntegrationApi\";\n\nconst useSmtp = ({ ownerId, canManageIntegrations }) => {\n const { isLoading, data = {} } = useFetchSmtp(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isDestroying, mutate: onDisconnect } = useDestroySmtp({\n ownerId,\n });\n\n return {\n data,\n isConnected: data?.connected,\n isLoading,\n isDestroying,\n onDisconnect,\n exists: data?.exists,\n };\n};\n\nexport default useSmtp;\n","import { t } from \"i18next\";\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","import { Button, Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationCard = ({\n icon: Icon,\n title,\n description,\n isConnected,\n isDisconnecting,\n onConnect,\n onDisconnect,\n connectButtonText,\n disconnectButtonText = \"neetoEmailDelivery.sparkpost.emailDelivery.disconnect\",\n connectedTagText = \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n showDisconnect = false,\n}) => {\n const { t } = useTranslation();\n\n const shouldShowDisconnect = isConnected || showDisconnect;\n\n return (\n <div className=\"neeto-ui-rounded-lg neeto-ui-shadow-xs neeto-ui-border-gray-300 translate flex flex-col gap-y-4 border p-6 no-underline transition-transform duration-300 ease-in-out outline-none hover:-translate-y-1\">\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-3\">\n <Icon className=\"shrink-0\" size={32} />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <Typography style=\"h4\" weight=\"semibold\">\n {title}\n </Typography>\n {isConnected && <Tag label={t(connectedTagText)} />}\n </div>\n </div>\n </div>\n <Typography style=\"body2\">{description}</Typography>\n {connectButtonText && (\n <div className=\"flex gap-2\">\n {shouldShowDisconnect ? (\n <Button\n data-cy=\"disconnect-button\"\n label={t(disconnectButtonText)}\n loading={isDisconnecting}\n size=\"small\"\n style=\"danger\"\n onClick={onDisconnect}\n />\n ) : (\n <Button\n data-cy=\"connect-button\"\n label={t(connectButtonText)}\n size=\"small\"\n style=\"primary\"\n onClick={onConnect}\n />\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default IntegrationCard;\n","import { useState } from \"react\";\n\nimport { humanize, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner, Callout, Toastr } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { 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 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 { ERROR_MESSAGES } from \"./constants\";\nimport IntegrationCard from \"./IntegrationCard\";\n\nconst EmailDeliveryScreen = ({\n indexRoute,\n ownerId,\n ownDomainSetupRoute,\n canManageIntegrations,\n}) => {\n const { t } = useTranslation();\n const history = useHistory();\n const [isSmtpPaneOpen, setIsSmtpPaneOpen] = useState(false);\n const { error, errorDescription } = useQueryParams();\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\n history.replace(indexRoute);\n }\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 data: gmailData = {},\n isConnected: isGmailConnected,\n isLoading: isGmailLoading,\n isDestroying: isGmailDisconnecting,\n onDisconnect: onGmailDisconnect,\n exists: isGmailExists,\n } = gmailIntegration;\n\n const {\n data: outlookData = {},\n isConnected: isOutlookConnected,\n isLoading: isOutlookLoading,\n isDestroying: isOutlookDisconnecting,\n isWaitingForTestEmail: isOutlookWaitingForTestEmail,\n shadowAccount: isOutlookShadowAccount,\n onDisconnect: onOutlookDisconnect,\n exists: isOutlookExists,\n } = outlookIntegration;\n\n const {\n data: sparkpostData = {},\n isConnected: isSparkpostConnected,\n isLoading: isSparkpostLoading,\n onDisconnect: onSparkpostDisconnect,\n isDestroying: isSparkpostDisconnecting,\n exists: isSparkpostExists,\n } = sparkpostIntegration;\n\n const {\n data: smtpData = {},\n isConnected: isSmtpConnected,\n isLoading: isSmtpLoading,\n isDestroying: isSmtpDisconnecting,\n onDisconnect: onSmtpDisconnect,\n exists: isSmtpExists,\n } = smtpIntegration;\n\n const isLoading =\n isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;\n\n const noneExists =\n !isGmailExists && !isOutlookExists && !isSparkpostExists && !isSmtpExists;\n const showGmail = noneExists || isGmailExists;\n const showOutlook = noneExists || isOutlookExists;\n const showSparkpost = noneExists || isSparkpostExists;\n const showSmtp = noneExists || isSmtpExists;\n\n const handleGmailConnect = () => {\n window.location.href = buildUrl(GMAIL_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOutlookConnect = () => {\n window.location.href = buildUrl(OUTLOOK_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOwnDomainConnect = () => {\n history.push(ownDomainSetupRoute);\n };\n\n const handleSmtpConnect = () => {\n setIsSmtpPaneOpen(true);\n };\n\n const handleSmtpPaneClose = () => {\n setIsSmtpPaneOpen(false);\n };\n\n const gmailEmail = prop(\"email\", gmailData);\n const outlookEmail = prop(\"email\", outlookData);\n const sparkpostEmail = prop(\"email\", sparkpostData);\n const smtpEmail = prop(\"email\", smtpData);\n\n const gmailTitle = t(\"neetoEmailDelivery.gmail.title\");\n const gmailDescription = isGmailConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: gmailEmail,\n })\n : t(\"neetoEmailDelivery.gmail.description\");\n\n const outlookTitle = t(\"neetoEmailDelivery.outlook.title\");\n const outlookDescription = isOutlookConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: outlookEmail,\n })\n : t(\"neetoEmailDelivery.outlook.description\");\n\n const ownDomainTitle = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle\"\n );\n\n const ownDomainDescription = isSparkpostConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: sparkpostEmail,\n })\n : t(\"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription\");\n\n const smtpTitle = t(\"neetoEmailDelivery.smtp.title\");\n const smtpDescription = isSmtpConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: smtpEmail,\n })\n : 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 const activeMessage =\n (isGmailConnected && t(\"neetoEmailDelivery.gmail.gmailConfigured\")) ||\n (isOutlookConnected && t(\"neetoEmailDelivery.outlook.outlookConfigured\")) ||\n (isSparkpostConnected &&\n t(\"neetoEmailDelivery.sparkpost.ownDomainConfigured\")) ||\n (isSmtpConnected && t(\"neetoEmailDelivery.smtp.smtpConfigured\"));\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 {/* Gmail Option */}\n {showGmail && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.gmail.connectGmail\"\n description={gmailDescription}\n icon={GmailIcon}\n isConnected={isGmailConnected}\n isDisconnecting={isGmailDisconnecting}\n title={gmailTitle}\n onConnect={handleGmailConnect}\n onDisconnect={onGmailDisconnect}\n />\n )}\n {/* Outlook Option */}\n {showOutlook && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.outlook.connectOutlook\"\n description={outlookDescription}\n icon={OutlookIcon}\n isConnected={isOutlookConnected}\n isDisconnecting={isOutlookDisconnecting}\n title={outlookTitle}\n showDisconnect={\n isOutlookWaitingForTestEmail || isOutlookShadowAccount\n }\n onConnect={handleOutlookConnect}\n onDisconnect={onOutlookDisconnect}\n />\n )}\n {/* Own Domain (Sparkpost) Option */}\n {showSparkpost && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.sparkpost.emailDelivery.setupDomain\"\n description={ownDomainDescription}\n icon={MailSend}\n isConnected={isSparkpostConnected}\n isDisconnecting={isSparkpostDisconnecting}\n title={ownDomainTitle}\n onConnect={handleOwnDomainConnect}\n onDisconnect={onSparkpostDisconnect}\n />\n )}\n {/* SMTP Option */}\n {showSmtp && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.smtp.connectSmtp\"\n description={smtpDescription}\n icon={MailSend}\n isConnected={isSmtpConnected}\n isDisconnecting={isSmtpDisconnecting}\n title={smtpTitle}\n onConnect={handleSmtpConnect}\n onDisconnect={onSmtpDisconnect}\n />\n )}\n </div>\n {activeMessage && <Callout style=\"success\">{activeMessage}</Callout>}\n {isOutlookWaitingForTestEmail && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.waitingForTestEmail\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n {isOutlookShadowAccount && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.shadowAccountMessage\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n </div>\n {isSmtpPaneOpen && (\n <SmtpSetup\n {...{ ownerId }}\n onCancel={handleSmtpPaneClose}\n onDone={handleSmtpPaneClose}\n />\n )}\n </div>\n );\n};\n\nexport default EmailDeliveryScreen;\n"],"names":["ENCRYPTION_OPTIONS","label","value","SMTP_ACCOUNT_INITIAL_VALUES","host","port","username","password","email","encryption","display_name","SMTP_ACCOUNT_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","field","number","displayName","SmtpSetup","_ref","ownerId","onDone","onCancel","_useTranslation","useTranslation","_useCreateSmtp","useCreateSmtp","isCreating","isPending","createSmtp","mutate","handleSubmit","values","smtp_account","onSuccess","_jsxs","Pane","isOpen","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","useGmail","indexRoute","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","history","useHistory","queryClient","useQueryClient","_useFetchGmail","useFetchGmail","enabled","isLoading","_useFetchGmail$data","data","_useDestroyGmail","useDestroyGmail","isDestroying","destroyIntegration","replace","onDisconnect","invalidateAllIntegrationQueries","exists","isConnected","connected","errorMessage","error","useOutlook","_useFetchOutlook","useFetchOutlook","_useFetchOutlook$data","_useDestroyOutlook","useDestroyOutlook","status","shadowAccount","isWaitingForTestEmail","useSmtp","_useFetchSmtp","useFetchSmtp","_useFetchSmtp$data","_useDestroySmtp","useDestroySmtp","ERROR_MESSAGES","gmail_permission_not_given","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","IntegrationCard","Icon","icon","title","description","isDisconnecting","onConnect","connectButtonText","_ref$disconnectButton","disconnectButtonText","_ref$connectedTagText","connectedTagText","_ref$showDisconnect","showDisconnect","shouldShowDisconnect","Tag","Button","loading","EmailDeliveryScreen","ownDomainSetupRoute","isSmtpPaneOpen","setIsSmtpPaneOpen","_useQueryParams","useQueryParams","errorDescription","isPresent","_errorMessage","concat","Toastr","humanize","gmailIntegration","outlookIntegration","sparkpostIntegration","useSparkpostDomain","smtpIntegration","_gmailIntegration$dat","gmailData","isGmailConnected","isGmailLoading","isGmailDisconnecting","onGmailDisconnect","isGmailExists","_outlookIntegration$d","outlookData","isOutlookConnected","isOutlookLoading","isOutlookDisconnecting","isOutlookWaitingForTestEmail","isOutlookShadowAccount","onOutlookDisconnect","isOutlookExists","_sparkpostIntegration","sparkpostData","isSparkpostConnected","isSparkpostLoading","onSparkpostDisconnect","isSparkpostDisconnecting","isSparkpostExists","_smtpIntegration$data","smtpData","isSmtpConnected","isSmtpLoading","isSmtpDisconnecting","onSmtpDisconnect","isSmtpExists","noneExists","showGmail","showOutlook","showSparkpost","showSmtp","handleGmailConnect","window","location","href","buildUrl","GMAIL_OAUTH_CONNECT_URL","handleOutlookConnect","OUTLOOK_OAUTH_CONNECT_URL","handleOwnDomainConnect","push","handleSmtpConnect","handleSmtpPaneClose","gmailEmail","prop","outlookEmail","sparkpostEmail","smtpEmail","gmailTitle","gmailDescription","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","smtpTitle","smtpDescription","Spinner","activeMessage","GmailIcon","OutlookIcon","MailSend"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,kBAAkB,GAAG,CAChC;AAAEC,EAAAA,KAAK,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE;AAAO,CAAC,EAChC;AAAED,EAAAA,KAAK,EAAE,UAAU;AAAEC,EAAAA,KAAK,EAAE;AAAW,CAAC,EACxC;AAAED,EAAAA,KAAK,EAAE,KAAK;AAAEC,EAAAA,KAAK,EAAE;AAAM,CAAC,CAC/B;AAEM,IAAMC,2BAA2B,GAAG;AACzCC,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,KAAK,EAAE,EAAE;AACTC,EAAAA,UAAU,EAAE,UAAU;AACtBC,EAAAA,YAAY,EAAE;AAChB,CAAC;AAEM,IAAMC,8BAA8B,GAAGC,GAAG,CAACC,MAAM,EAAE,CAACC,KAAK,CAAC;AAC/DV,EAAAA,IAAI,EAAEQ,GAAG,CACNG,MAAM,EAAE,CACRC,IAAI,EAAE,CACNC,QAAQ,CACPC,CAAC,CA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AC,SAAS;AAAAJ,QAAAA,QAAA,EAAE8K;AAAa,OAAU,CAAC,EACnEjD,4BAA4B,iBAC3B5H,GAAA,CAACY,OAAO,EAAA;AAACT,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EACrB1B,CAAC,CAAC,gDAAgD,EAAE;AACnDV,UAAAA,KAAK,EAAEsM;SACR;AAAC,OACK,CACV,EACApC,sBAAsB,iBACrB7H,GAAA,CAACY,OAAO,EAAA;AAACT,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EACrB1B,CAAC,CAAC,iDAAiD,EAAE;AACpDV,UAAAA,KAAK,EAAEsM;SACR;AAAC,OACK,CACV;AAAA,KACE,CAAC,EACLhE,cAAc,iBACbjG,GAAA,CAACvB,SAAS,EAAA;AACFE,MAAAA,OAAO,EAAPA,OAAO;AACbE,MAAAA,QAAQ,EAAEiL,mBAAoB;AAC9BlL,MAAAA,MAAM,EAAEkL;AAAoB,KAC7B,CACF;AAAA,GACE,CAAC;AAEV;;;;"}
|
|
@@ -7,7 +7,7 @@ import Form from '@bigbinary/neetoui/formik/Form';
|
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { useHistory } from 'react-router-dom';
|
|
9
9
|
import { P as PageWrapper, a as PageContent, V as VALIDATION_SCHEMA } from './constants-Cvxv8ly7.js';
|
|
10
|
-
import { u as useSparkpostDomain } from './useSparkpostDomain-
|
|
10
|
+
import { u as useSparkpostDomain } from './useSparkpostDomain-CuX-Gl5a.js';
|
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
12
|
import '@babel/runtime/helpers/defineProperty';
|
|
13
13
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -20,7 +20,7 @@ import 'yup';
|
|
|
20
20
|
import '@babel/runtime/helpers/slicedToArray';
|
|
21
21
|
import '@tanstack/react-query';
|
|
22
22
|
import '@bigbinary/neetoui/Toastr';
|
|
23
|
-
import './useSparkpostApi-
|
|
23
|
+
import './useSparkpostApi-qpRhsK7H.js';
|
|
24
24
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
25
25
|
import 'axios';
|
|
26
26
|
|
|
@@ -7,8 +7,8 @@ import { isEmpty, pathOr } from 'ramda';
|
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { useHistory } from 'react-router-dom';
|
|
9
9
|
import { b as PURPOSE_COLORS, D as DEFAULT_COLOR, c as VERIFICATION_STATUS_CONFIG, d as VERIFICATION_STATUSES, P as PageWrapper, a as PageContent } from './constants-Cvxv8ly7.js';
|
|
10
|
-
import { u as useSparkpostDomain } from './useSparkpostDomain-
|
|
11
|
-
import { u as useFetchSparkpostDomain } from './useSparkpostApi-
|
|
10
|
+
import { u as useSparkpostDomain } from './useSparkpostDomain-CuX-Gl5a.js';
|
|
11
|
+
import { u as useFetchSparkpostDomain } from './useSparkpostApi-qpRhsK7H.js';
|
|
12
12
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
13
13
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
14
14
|
import Tag from '@bigbinary/neetoui/Tag';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var react = require('react');
|
|
3
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
6
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
5
7
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
@@ -12,20 +14,181 @@ var Toastr = require('@bigbinary/neetoui/Toastr');
|
|
|
12
14
|
var ramda = require('ramda');
|
|
13
15
|
var reactI18next = require('react-i18next');
|
|
14
16
|
var reactRouterDom = require('react-router-dom');
|
|
15
|
-
var useSparkpostApi = require('../useSparkpostApi-
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
17
|
+
var useSparkpostApi = require('../useSparkpostApi-D9NOjTNA.js');
|
|
18
|
+
var Pane = require('@bigbinary/neetoui/Pane');
|
|
19
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
20
|
+
var Form = require('@bigbinary/neetoui/formik/Form');
|
|
21
|
+
var Input = require('@bigbinary/neetoui/formik/Input');
|
|
22
|
+
var Radio = require('@bigbinary/neetoui/formik/Radio');
|
|
23
|
+
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
24
|
+
var useOutlookIntegrationApi = require('../useOutlookIntegrationApi-BC-RPHmJ.js');
|
|
21
25
|
var i18next = require('i18next');
|
|
26
|
+
var yup = require('yup');
|
|
27
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
28
|
+
var reactQuery = require('@tanstack/react-query');
|
|
29
|
+
var useSparkpostDomain = require('../useSparkpostDomain-Brk7SmL4.js');
|
|
22
30
|
var Button = require('@bigbinary/neetoui/Button');
|
|
23
31
|
var Tag = require('@bigbinary/neetoui/Tag');
|
|
24
|
-
var Typography = require('@bigbinary/neetoui/Typography');
|
|
25
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
26
32
|
require('@babel/runtime/helpers/defineProperty');
|
|
27
33
|
require('axios');
|
|
28
34
|
|
|
35
|
+
function _interopNamespaceDefault(e) {
|
|
36
|
+
var n = Object.create(null);
|
|
37
|
+
if (e) {
|
|
38
|
+
Object.keys(e).forEach(function (k) {
|
|
39
|
+
if (k !== 'default') {
|
|
40
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
41
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return e[k]; }
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
n.default = e;
|
|
49
|
+
return Object.freeze(n);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
|
|
53
|
+
|
|
54
|
+
var ENCRYPTION_OPTIONS = [{
|
|
55
|
+
label: "None",
|
|
56
|
+
value: "none"
|
|
57
|
+
}, {
|
|
58
|
+
label: "StartTLS",
|
|
59
|
+
value: "starttls"
|
|
60
|
+
}, {
|
|
61
|
+
label: "SSL",
|
|
62
|
+
value: "ssl"
|
|
63
|
+
}];
|
|
64
|
+
var SMTP_ACCOUNT_INITIAL_VALUES = {
|
|
65
|
+
host: "",
|
|
66
|
+
port: 587,
|
|
67
|
+
username: "",
|
|
68
|
+
password: "",
|
|
69
|
+
email: "",
|
|
70
|
+
encryption: "starttls",
|
|
71
|
+
display_name: ""
|
|
72
|
+
};
|
|
73
|
+
var SMTP_ACCOUNT_VALIDATION_SCHEMA = yup__namespace.object().shape({
|
|
74
|
+
host: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
75
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.hostLabel")
|
|
76
|
+
})),
|
|
77
|
+
port: yup__namespace.number().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
78
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.portLabel")
|
|
79
|
+
})),
|
|
80
|
+
username: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
81
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.usernameLabel")
|
|
82
|
+
})),
|
|
83
|
+
password: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
84
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.passwordLabel")
|
|
85
|
+
})),
|
|
86
|
+
email: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
87
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.emailLabel")
|
|
88
|
+
})).email(i18next.t("neetoEmailDelivery.smtp.setup.emailInvalid")),
|
|
89
|
+
displayName: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
90
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.displayNameLabel")
|
|
91
|
+
})),
|
|
92
|
+
encryption: yup__namespace.string().trim().required(i18next.t("neetoEmailDelivery.smtp.setup.requiredField", {
|
|
93
|
+
field: i18next.t("neetoEmailDelivery.smtp.setup.encryptionLabel")
|
|
94
|
+
}))
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
var SmtpSetup = function SmtpSetup(_ref) {
|
|
98
|
+
var ownerId = _ref.ownerId,
|
|
99
|
+
onDone = _ref.onDone,
|
|
100
|
+
onCancel = _ref.onCancel;
|
|
101
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
102
|
+
t = _useTranslation.t;
|
|
103
|
+
var _useCreateSmtp = useOutlookIntegrationApi.useCreateSmtp({
|
|
104
|
+
ownerId: ownerId
|
|
105
|
+
}),
|
|
106
|
+
isCreating = _useCreateSmtp.isPending,
|
|
107
|
+
createSmtp = _useCreateSmtp.mutate;
|
|
108
|
+
var handleSubmit = function handleSubmit(values) {
|
|
109
|
+
createSmtp({
|
|
110
|
+
smtp_account: values
|
|
111
|
+
}, {
|
|
112
|
+
onSuccess: onDone
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Pane, {
|
|
116
|
+
isOpen: true,
|
|
117
|
+
size: "lg",
|
|
118
|
+
onClose: onCancel,
|
|
119
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Header, {
|
|
120
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
121
|
+
style: "h2",
|
|
122
|
+
weight: "semibold",
|
|
123
|
+
children: t("neetoEmailDelivery.smtp.setup.title")
|
|
124
|
+
})
|
|
125
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Form, {
|
|
126
|
+
className: "w-full",
|
|
127
|
+
formikProps: {
|
|
128
|
+
initialValues: SMTP_ACCOUNT_INITIAL_VALUES,
|
|
129
|
+
validationSchema: SMTP_ACCOUNT_VALIDATION_SCHEMA,
|
|
130
|
+
onSubmit: handleSubmit
|
|
131
|
+
},
|
|
132
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Body, {
|
|
133
|
+
className: "space-y-4",
|
|
134
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
135
|
+
className: "flex flex-col gap-6",
|
|
136
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Callout, {
|
|
137
|
+
style: "warning",
|
|
138
|
+
children: t("neetoEmailDelivery.smtp.setup.note")
|
|
139
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
140
|
+
required: true,
|
|
141
|
+
label: t("neetoEmailDelivery.smtp.setup.hostLabel"),
|
|
142
|
+
name: "host"
|
|
143
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
144
|
+
required: true,
|
|
145
|
+
label: t("neetoEmailDelivery.smtp.setup.portLabel"),
|
|
146
|
+
name: "port",
|
|
147
|
+
type: "number"
|
|
148
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
149
|
+
required: true,
|
|
150
|
+
label: t("neetoEmailDelivery.smtp.setup.usernameLabel"),
|
|
151
|
+
name: "username"
|
|
152
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
153
|
+
required: true,
|
|
154
|
+
label: t("neetoEmailDelivery.smtp.setup.passwordLabel"),
|
|
155
|
+
name: "password",
|
|
156
|
+
type: "password"
|
|
157
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
158
|
+
required: true,
|
|
159
|
+
label: t("neetoEmailDelivery.smtp.setup.emailLabel"),
|
|
160
|
+
name: "email",
|
|
161
|
+
type: "email"
|
|
162
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
163
|
+
required: true,
|
|
164
|
+
label: t("neetoEmailDelivery.smtp.setup.displayNameLabel"),
|
|
165
|
+
name: "displayName"
|
|
166
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Radio, {
|
|
167
|
+
label: t("neetoEmailDelivery.smtp.setup.encryptionLabel"),
|
|
168
|
+
name: "encryption",
|
|
169
|
+
children: ENCRYPTION_OPTIONS.map(function (option) {
|
|
170
|
+
return /*#__PURE__*/jsxRuntime.jsx(Radio.Item, {
|
|
171
|
+
label: option.label,
|
|
172
|
+
value: option.value
|
|
173
|
+
}, option.value);
|
|
174
|
+
})
|
|
175
|
+
})]
|
|
176
|
+
})
|
|
177
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Pane.Footer, {
|
|
178
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ActionBlock, {
|
|
179
|
+
cancelButtonProps: {
|
|
180
|
+
onClick: onCancel
|
|
181
|
+
},
|
|
182
|
+
isSubmitting: isCreating,
|
|
183
|
+
submitButtonProps: {
|
|
184
|
+
label: t("neetoEmailDelivery.smtp.setup.saveAndActivate")
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
})]
|
|
188
|
+
})]
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
|
|
29
192
|
var useGmail = function useGmail(_ref) {
|
|
30
193
|
var ownerId = _ref.ownerId,
|
|
31
194
|
indexRoute = _ref.indexRoute,
|
|
@@ -41,8 +204,7 @@ var useGmail = function useGmail(_ref) {
|
|
|
41
204
|
}),
|
|
42
205
|
isLoading = _useFetchGmail.isLoading,
|
|
43
206
|
_useFetchGmail$data = _useFetchGmail.data,
|
|
44
|
-
data = _useFetchGmail$data === void 0 ? {} : _useFetchGmail$data
|
|
45
|
-
isGmailFetched = _useFetchGmail.isSuccess;
|
|
207
|
+
data = _useFetchGmail$data === void 0 ? {} : _useFetchGmail$data;
|
|
46
208
|
var _useDestroyGmail = useOutlookIntegrationApi.useDestroyGmail({
|
|
47
209
|
ownerId: ownerId
|
|
48
210
|
}),
|
|
@@ -54,25 +216,12 @@ var useGmail = function useGmail(_ref) {
|
|
|
54
216
|
var onDisconnect = function onDisconnect() {
|
|
55
217
|
destroyIntegration(false, {
|
|
56
218
|
onSuccess: function onSuccess() {
|
|
57
|
-
utils.showThumbsUpToastr();
|
|
58
219
|
setIsDisconnectAlertOpen(false);
|
|
59
|
-
|
|
220
|
+
useSparkpostApi.invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
60
221
|
history.replace(indexRoute);
|
|
61
222
|
}
|
|
62
223
|
});
|
|
63
224
|
};
|
|
64
|
-
react.useEffect(function () {
|
|
65
|
-
if (isGmailFetched) {
|
|
66
|
-
queryClient.invalidateQueries({
|
|
67
|
-
predicate: function predicate(query) {
|
|
68
|
-
var _query$queryKey = _slicedToArray(query.queryKey, 2),
|
|
69
|
-
key = _query$queryKey[0],
|
|
70
|
-
id = _query$queryKey[1];
|
|
71
|
-
return key === useSparkpostApi.QUERY_KEYS.INTEGRATION_GMAIL && id !== ownerId;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}, [isGmailFetched, queryClient, ownerId]);
|
|
76
225
|
return {
|
|
77
226
|
data: data,
|
|
78
227
|
isLoading: isLoading,
|
|
@@ -102,8 +251,7 @@ var useOutlook = function useOutlook(_ref) {
|
|
|
102
251
|
}),
|
|
103
252
|
isLoading = _useFetchOutlook.isLoading,
|
|
104
253
|
_useFetchOutlook$data = _useFetchOutlook.data,
|
|
105
|
-
data = _useFetchOutlook$data === void 0 ? {} : _useFetchOutlook$data
|
|
106
|
-
isOutlookFetched = _useFetchOutlook.isSuccess;
|
|
254
|
+
data = _useFetchOutlook$data === void 0 ? {} : _useFetchOutlook$data;
|
|
107
255
|
var _useDestroyOutlook = useOutlookIntegrationApi.useDestroyOutlook({
|
|
108
256
|
ownerId: ownerId
|
|
109
257
|
}),
|
|
@@ -115,25 +263,12 @@ var useOutlook = function useOutlook(_ref) {
|
|
|
115
263
|
var onDisconnect = function onDisconnect() {
|
|
116
264
|
destroyIntegration(false, {
|
|
117
265
|
onSuccess: function onSuccess() {
|
|
118
|
-
utils.showThumbsUpToastr();
|
|
119
266
|
setIsDisconnectAlertOpen(false);
|
|
120
|
-
|
|
267
|
+
useSparkpostApi.invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
121
268
|
history.replace(indexRoute);
|
|
122
269
|
}
|
|
123
270
|
});
|
|
124
271
|
};
|
|
125
|
-
react.useEffect(function () {
|
|
126
|
-
if (isOutlookFetched) {
|
|
127
|
-
queryClient.invalidateQueries({
|
|
128
|
-
predicate: function predicate(query) {
|
|
129
|
-
var _query$queryKey = _slicedToArray(query.queryKey, 2),
|
|
130
|
-
key = _query$queryKey[0],
|
|
131
|
-
id = _query$queryKey[1];
|
|
132
|
-
return key === useSparkpostApi.QUERY_KEYS.INTEGRATION_OUTLOOK && id !== ownerId;
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}, [isOutlookFetched, queryClient, ownerId]);
|
|
137
272
|
return {
|
|
138
273
|
data: data,
|
|
139
274
|
isLoading: isLoading,
|
|
@@ -151,6 +286,30 @@ var useOutlook = function useOutlook(_ref) {
|
|
|
151
286
|
};
|
|
152
287
|
};
|
|
153
288
|
|
|
289
|
+
var useSmtp = function useSmtp(_ref) {
|
|
290
|
+
var ownerId = _ref.ownerId,
|
|
291
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
292
|
+
var _useFetchSmtp = useOutlookIntegrationApi.useFetchSmtp(ownerId, {
|
|
293
|
+
enabled: canManageIntegrations
|
|
294
|
+
}),
|
|
295
|
+
isLoading = _useFetchSmtp.isLoading,
|
|
296
|
+
_useFetchSmtp$data = _useFetchSmtp.data,
|
|
297
|
+
data = _useFetchSmtp$data === void 0 ? {} : _useFetchSmtp$data;
|
|
298
|
+
var _useDestroySmtp = useOutlookIntegrationApi.useDestroySmtp({
|
|
299
|
+
ownerId: ownerId
|
|
300
|
+
}),
|
|
301
|
+
isDestroying = _useDestroySmtp.isPending,
|
|
302
|
+
onDisconnect = _useDestroySmtp.mutate;
|
|
303
|
+
return {
|
|
304
|
+
data: data,
|
|
305
|
+
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
306
|
+
isLoading: isLoading,
|
|
307
|
+
isDestroying: isDestroying,
|
|
308
|
+
onDisconnect: onDisconnect,
|
|
309
|
+
exists: data === null || data === void 0 ? void 0 : data.exists
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
|
|
154
313
|
var ERROR_MESSAGES = {
|
|
155
314
|
gmail_permission_not_given: i18next.t("neetoEmailDelivery.gmail.permissionNotGiven"),
|
|
156
315
|
outlook_permission_not_given: i18next.t("neetoEmailDelivery.outlook.permissionNotGiven"),
|
|
@@ -230,6 +389,10 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
230
389
|
var _useTranslation = reactI18next.useTranslation(),
|
|
231
390
|
t = _useTranslation.t;
|
|
232
391
|
var history = reactRouterDom.useHistory();
|
|
392
|
+
var _useState = react.useState(false),
|
|
393
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
394
|
+
isSmtpPaneOpen = _useState2[0],
|
|
395
|
+
setIsSmtpPaneOpen = _useState2[1];
|
|
233
396
|
var _useQueryParams = reactUtils.useQueryParams(),
|
|
234
397
|
error = _useQueryParams.error,
|
|
235
398
|
errorDescription = _useQueryParams.errorDescription;
|
|
@@ -256,6 +419,10 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
256
419
|
ownerId: ownerId,
|
|
257
420
|
canManageIntegrations: canManageIntegrations
|
|
258
421
|
});
|
|
422
|
+
var smtpIntegration = useSmtp({
|
|
423
|
+
ownerId: ownerId,
|
|
424
|
+
canManageIntegrations: canManageIntegrations
|
|
425
|
+
});
|
|
259
426
|
var _gmailIntegration$dat = gmailIntegration.data,
|
|
260
427
|
gmailData = _gmailIntegration$dat === void 0 ? {} : _gmailIntegration$dat,
|
|
261
428
|
isGmailConnected = gmailIntegration.isConnected,
|
|
@@ -279,11 +446,19 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
279
446
|
onSparkpostDisconnect = sparkpostIntegration.onDisconnect,
|
|
280
447
|
isSparkpostDisconnecting = sparkpostIntegration.isDestroying,
|
|
281
448
|
isSparkpostExists = sparkpostIntegration.exists;
|
|
282
|
-
var
|
|
283
|
-
|
|
449
|
+
var _smtpIntegration$data = smtpIntegration.data,
|
|
450
|
+
smtpData = _smtpIntegration$data === void 0 ? {} : _smtpIntegration$data,
|
|
451
|
+
isSmtpConnected = smtpIntegration.isConnected,
|
|
452
|
+
isSmtpLoading = smtpIntegration.isLoading,
|
|
453
|
+
isSmtpDisconnecting = smtpIntegration.isDestroying,
|
|
454
|
+
onSmtpDisconnect = smtpIntegration.onDisconnect,
|
|
455
|
+
isSmtpExists = smtpIntegration.exists;
|
|
456
|
+
var isLoading = isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;
|
|
457
|
+
var noneExists = !isGmailExists && !isOutlookExists && !isSparkpostExists && !isSmtpExists;
|
|
284
458
|
var showGmail = noneExists || isGmailExists;
|
|
285
459
|
var showOutlook = noneExists || isOutlookExists;
|
|
286
460
|
var showSparkpost = noneExists || isSparkpostExists;
|
|
461
|
+
var showSmtp = noneExists || isSmtpExists;
|
|
287
462
|
var handleGmailConnect = function handleGmailConnect() {
|
|
288
463
|
window.location.href = utils.buildUrl(useSparkpostApi.GMAIL_OAUTH_CONNECT_URL, {
|
|
289
464
|
ownerId: ownerId
|
|
@@ -297,9 +472,16 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
297
472
|
var handleOwnDomainConnect = function handleOwnDomainConnect() {
|
|
298
473
|
history.push(ownDomainSetupRoute);
|
|
299
474
|
};
|
|
475
|
+
var handleSmtpConnect = function handleSmtpConnect() {
|
|
476
|
+
setIsSmtpPaneOpen(true);
|
|
477
|
+
};
|
|
478
|
+
var handleSmtpPaneClose = function handleSmtpPaneClose() {
|
|
479
|
+
setIsSmtpPaneOpen(false);
|
|
480
|
+
};
|
|
300
481
|
var gmailEmail = ramda.prop("email", gmailData);
|
|
301
482
|
var outlookEmail = ramda.prop("email", outlookData);
|
|
302
483
|
var sparkpostEmail = ramda.prop("email", sparkpostData);
|
|
484
|
+
var smtpEmail = ramda.prop("email", smtpData);
|
|
303
485
|
var gmailTitle = t("neetoEmailDelivery.gmail.title");
|
|
304
486
|
var gmailDescription = isGmailConnected ? t("neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail", {
|
|
305
487
|
email: gmailEmail
|
|
@@ -312,16 +494,20 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
312
494
|
var ownDomainDescription = isSparkpostConnected ? t("neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail", {
|
|
313
495
|
email: sparkpostEmail
|
|
314
496
|
}) : t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription");
|
|
497
|
+
var smtpTitle = t("neetoEmailDelivery.smtp.title");
|
|
498
|
+
var smtpDescription = isSmtpConnected ? t("neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail", {
|
|
499
|
+
email: smtpEmail
|
|
500
|
+
}) : t("neetoEmailDelivery.smtp.description");
|
|
315
501
|
if (isLoading) {
|
|
316
502
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
317
503
|
className: "flex grow items-center justify-center w-full",
|
|
318
504
|
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
319
505
|
});
|
|
320
506
|
}
|
|
321
|
-
var activeMessage = isGmailConnected && t("neetoEmailDelivery.gmail.gmailConfigured") || isOutlookConnected && t("neetoEmailDelivery.outlook.outlookConfigured") || isSparkpostConnected && t("neetoEmailDelivery.sparkpost.ownDomainConfigured");
|
|
322
|
-
return /*#__PURE__*/jsxRuntime.
|
|
507
|
+
var activeMessage = isGmailConnected && t("neetoEmailDelivery.gmail.gmailConfigured") || isOutlookConnected && t("neetoEmailDelivery.outlook.outlookConfigured") || isSparkpostConnected && t("neetoEmailDelivery.sparkpost.ownDomainConfigured") || isSmtpConnected && t("neetoEmailDelivery.smtp.smtpConfigured");
|
|
508
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
323
509
|
className: "min-h-0 w-full grow",
|
|
324
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
510
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
325
511
|
className: "@container mx-auto space-y-6",
|
|
326
512
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
327
513
|
className: "grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4",
|
|
@@ -353,6 +539,15 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
353
539
|
title: ownDomainTitle,
|
|
354
540
|
onConnect: handleOwnDomainConnect,
|
|
355
541
|
onDisconnect: onSparkpostDisconnect
|
|
542
|
+
}), showSmtp && /*#__PURE__*/jsxRuntime.jsx(IntegrationCard, {
|
|
543
|
+
connectButtonText: "neetoEmailDelivery.smtp.connectSmtp",
|
|
544
|
+
description: smtpDescription,
|
|
545
|
+
icon: MailSend,
|
|
546
|
+
isConnected: isSmtpConnected,
|
|
547
|
+
isDisconnecting: isSmtpDisconnecting,
|
|
548
|
+
title: smtpTitle,
|
|
549
|
+
onConnect: handleSmtpConnect,
|
|
550
|
+
onDisconnect: onSmtpDisconnect
|
|
356
551
|
})]
|
|
357
552
|
}), activeMessage && /*#__PURE__*/jsxRuntime.jsx(Callout, {
|
|
358
553
|
style: "success",
|
|
@@ -368,7 +563,11 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
368
563
|
email: outlookEmail
|
|
369
564
|
})
|
|
370
565
|
})]
|
|
371
|
-
})
|
|
566
|
+
}), isSmtpPaneOpen && /*#__PURE__*/jsxRuntime.jsx(SmtpSetup, {
|
|
567
|
+
ownerId: ownerId,
|
|
568
|
+
onCancel: handleSmtpPaneClose,
|
|
569
|
+
onDone: handleSmtpPaneClose
|
|
570
|
+
})]
|
|
372
571
|
});
|
|
373
572
|
};
|
|
374
573
|
|