@bigbinary/neeto-email-delivery-frontend 1.0.29 → 1.0.32
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 +0 -2
- package/app/javascript/src/translations/de.json +18 -1
- package/dist/.ready +1 -0
- package/dist/EmailDeliveryScreen.js +8 -10
- package/dist/EmailDeliveryScreen.js.map +1 -1
- package/dist/SparkpostDomainSetup.js +4 -4
- package/dist/SparkpostDomainSetup.js.map +1 -1
- package/dist/SparkpostDomainVerify.js +3 -3
- package/dist/SparkpostDomainVerify.js.map +1 -1
- package/dist/cjs/EmailDeliveryScreen.js +8 -10
- package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
- package/dist/cjs/SparkpostDomainSetup.js +3 -3
- package/dist/cjs/SparkpostDomainSetup.js.map +1 -1
- package/dist/cjs/SparkpostDomainVerify.js +3 -3
- package/dist/cjs/SparkpostDomainVerify.js.map +1 -1
- package/dist/cjs/hooks.js +2 -2
- package/dist/cjs/index.js +44 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/constants-DPhFGbtO.js.map +1 -1
- package/dist/constants-DbB8UFcr.js.map +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{index-C7KroEtv.js → index-53D1H-cp.js} +6 -29
- package/dist/index-53D1H-cp.js.map +1 -0
- package/dist/{index-BKKcEEt1.js → index-DmRq-yH1.js} +6 -29
- package/dist/index-DmRq-yH1.js.map +1 -0
- package/dist/index.js +45 -12
- package/dist/index.js.map +1 -1
- package/dist/{useEmailDeliveryIntegrationApi-BD6h2h5w.js → useEmailDeliveryIntegrationApi-BcQDhMIH.js} +2 -2
- package/dist/{useEmailDeliveryIntegrationApi-BD6h2h5w.js.map → useEmailDeliveryIntegrationApi-BcQDhMIH.js.map} +1 -1
- package/dist/{useEmailDeliveryIntegrationApi-NUL8d1xC.js → useEmailDeliveryIntegrationApi-Dk9WPotT.js} +2 -2
- package/dist/{useEmailDeliveryIntegrationApi-NUL8d1xC.js.map → useEmailDeliveryIntegrationApi-Dk9WPotT.js.map} +1 -1
- package/dist/{useSparkpostApi-tYImubXZ.js → useSparkpostApi-B-D8RNRF.js} +5 -5
- package/dist/{useSparkpostApi-C7cHCa3T.js.map → useSparkpostApi-B-D8RNRF.js.map} +1 -1
- package/dist/{useSparkpostApi-C7cHCa3T.js → useSparkpostApi-DlgW14Wu.js} +5 -5
- package/dist/{useSparkpostApi-tYImubXZ.js.map → useSparkpostApi-DlgW14Wu.js.map} +1 -1
- package/dist/{useSparkpostDomain-BiZb7l8r.js → useSparkpostDomain-CXs_VuGP.js} +2 -2
- package/dist/{useSparkpostDomain-BiZb7l8r.js.map → useSparkpostDomain-CXs_VuGP.js.map} +1 -1
- package/dist/{useSparkpostDomain-CmX8ka38.js → useSparkpostDomain-DA1nrWS3.js} +2 -2
- package/dist/{useSparkpostDomain-CmX8ka38.js.map → useSparkpostDomain-DA1nrWS3.js.map} +1 -1
- package/package.json +15 -15
- package/dist/index-BKKcEEt1.js.map +0 -1
- package/dist/index-C7KroEtv.js.map +0 -1
|
@@ -48,7 +48,7 @@ var QUERY_KEYS = {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
51
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t),
|
|
51
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
52
52
|
var useFetchGmail = function useFetchGmail(ownerId, options) {
|
|
53
53
|
return reactQuery.useQuery(_objectSpread$3({
|
|
54
54
|
queryKey: [QUERY_KEYS.INTEGRATION_GMAIL, ownerId],
|
|
@@ -98,7 +98,7 @@ var outlookApi = {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
101
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t),
|
|
101
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
102
102
|
var useFetchOutlook = function useFetchOutlook(ownerId, options) {
|
|
103
103
|
return reactQuery.useQuery(_objectSpread$2({
|
|
104
104
|
queryKey: [QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId],
|
|
@@ -141,7 +141,7 @@ var smtpApi = {
|
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
144
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t),
|
|
144
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
145
145
|
var useFetchSmtp = function useFetchSmtp(ownerId, options) {
|
|
146
146
|
return reactQuery.useQuery(_objectSpread$1({
|
|
147
147
|
queryKey: [QUERY_KEYS.INTEGRATION_SMTP, ownerId],
|
|
@@ -201,7 +201,7 @@ var sparkpostDomainsApi = {
|
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
204
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
204
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
205
205
|
var useFetchSparkpostDomain = function useFetchSparkpostDomain(ownerId, options) {
|
|
206
206
|
return reactQuery.useQuery(_objectSpread({
|
|
207
207
|
queryKey: [QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId],
|
|
@@ -250,4 +250,4 @@ exports.useFetchOutlook = useFetchOutlook;
|
|
|
250
250
|
exports.useFetchSmtp = useFetchSmtp;
|
|
251
251
|
exports.useFetchSparkpostDomain = useFetchSparkpostDomain;
|
|
252
252
|
exports.useVerifySparkpostDomain = useVerifySparkpostDomain;
|
|
253
|
-
//# sourceMappingURL=useSparkpostApi-
|
|
253
|
+
//# sourceMappingURL=useSparkpostApi-DlgW14Wu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSparkpostApi-tYImubXZ.js","sources":["../app/javascript/src/apis/integrations/constants.js","../app/javascript/src/apis/integrations/gmail.js","../app/javascript/src/constants/query.js","../app/javascript/src/hooks/reactQuery/integrations/useGmailIntegrationApi.js","../app/javascript/src/utils.js","../app/javascript/src/apis/integrations/outlook.js","../app/javascript/src/hooks/reactQuery/integrations/useOutlookIntegrationApi.js","../app/javascript/src/apis/integrations/smtp.js","../app/javascript/src/hooks/reactQuery/integrations/useSmtpIntegrationApi.js","../app/javascript/src/apis/integrations/sparkpost_domains.js","../app/javascript/src/hooks/reactQuery/integrations/useSparkpostApi.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/api-connector-should-use-default-export */\n\nconst NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL = \"/neeto_email_delivery/api/v1\";\n\nexport const GMAIL_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/gmail`;\nexport const GMAIL_OAUTH_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/gmail/oauth/:ownerId`;\nexport const GMAIL_OAUTH_CONNECT_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/gmail/oauth/connect`;\n\nexport const OUTLOOK_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/outlook`;\nexport const OUTLOOK_OAUTH_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/outlook/oauth/:ownerId`;\nexport const OUTLOOK_OAUTH_CONNECT_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/outlook/oauth/connect`;\n\nexport const SPARKPOST_DOMAINS_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/sparkpost_domains`;\nexport const SPARKPOST_DOMAINS_INTEGRATIONS_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/sparkpost_domains`;\nexport const SPARKPOST_DOMAINS_VERIFY_URL = `${SPARKPOST_DOMAINS_INTEGRATIONS_URL}/verify`;\n\nexport const SMTP_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/smtp`;\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { GMAIL_URL, GMAIL_OAUTH_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(GMAIL_URL, { ownerId }), { showToastr: false });\n\nconst destroy = ownerId => {\n axios.delete(buildUrl(GMAIL_OAUTH_URL, { ownerId }), { showToastr: false });\n};\n\nconst gmailApi = { get, destroy };\n\nexport default gmailApi;\n","export const QUERY_KEYS = {\n INTEGRATION_GMAIL: \"integration-gmail\",\n INTEGRATION_OUTLOOK: \"integration-outlook\",\n INTEGRATION_SPARKPOST: \"integration-sparkpost\",\n INTEGRATION_SMTP: \"integration-smtp\",\n};\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport gmailApi from \"apis/integrations/gmail\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchGmail = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_GMAIL, ownerId],\n queryFn: () => gmailApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useDestroyGmail = ({ ownerId }) =>\n useMutationWithInvalidation(() => gmailApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_GMAIL, ownerId]],\n });\n","import { QUERY_KEYS } from \"src/constants/query\";\n\nexport const invalidateAllIntegrationQueries = (queryClient, ownerId) => {\n queryClient.invalidateQueries({\n predicate: query => {\n const [key, id] = query.queryKey;\n\n return (\n id === ownerId &&\n [\n QUERY_KEYS.INTEGRATION_GMAIL,\n QUERY_KEYS.INTEGRATION_OUTLOOK,\n QUERY_KEYS.INTEGRATION_SPARKPOST,\n QUERY_KEYS.INTEGRATION_SMTP,\n ].includes(key)\n );\n },\n });\n};\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { OUTLOOK_URL, OUTLOOK_OAUTH_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(OUTLOOK_URL, { ownerId }), { showToastr: false });\n\nconst destroy = ownerId => {\n axios.delete(buildUrl(OUTLOOK_OAUTH_URL, { ownerId }), { showToastr: false });\n};\n\nconst outlookApi = { get, destroy };\n\nexport default outlookApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport outlookApi from \"apis/integrations/outlook\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchOutlook = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId],\n queryFn: () => outlookApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useDestroyOutlook = ({ ownerId }) =>\n useMutationWithInvalidation(() => outlookApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId]],\n });\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { SMTP_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(SMTP_URL, { ownerId }), { showToastr: false });\n\nconst create = (ownerId, payload) =>\n axios.post(buildUrl(SMTP_URL, { ownerId }), payload);\n\nconst destroy = ownerId => axios.delete(buildUrl(SMTP_URL, { ownerId }));\n\nconst smtpApi = { get, create, destroy };\n\nexport default smtpApi;\n","import { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport smtpApi from \"apis/integrations/smtp\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"utils\";\n\nexport const useFetchSmtp = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_SMTP, ownerId],\n queryFn: () => smtpApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useCreateSmtp = ({ ownerId }) =>\n useMutationWithInvalidation(payload => smtpApi.create(ownerId, payload), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SMTP, ownerId]],\n });\n\nexport const useDestroySmtp = ({ ownerId }) => {\n const queryClient = useQueryClient();\n\n return useMutationWithInvalidation(() => smtpApi.destroy(ownerId), {\n keysToInvalidate: [\n [QUERY_KEYS.INTEGRATION_SMTP, ownerId],\n () => invalidateAllIntegrationQueries(queryClient, ownerId),\n ],\n });\n};\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport {\n SPARKPOST_DOMAINS_URL,\n SPARKPOST_DOMAINS_VERIFY_URL,\n SPARKPOST_DOMAINS_INTEGRATIONS_URL,\n} from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(SPARKPOST_DOMAINS_URL, { ownerId }), {\n showToastr: false,\n });\n\nconst create = (ownerId, payload) =>\n axios.post(\n buildUrl(SPARKPOST_DOMAINS_INTEGRATIONS_URL, { ownerId }),\n payload\n );\n\nconst verify = ownerId =>\n axios.post(buildUrl(SPARKPOST_DOMAINS_VERIFY_URL, { ownerId }));\n\nconst destroy = ownerId =>\n axios.delete(buildUrl(SPARKPOST_DOMAINS_INTEGRATIONS_URL, { ownerId }));\n\nconst sparkpostDomainsApi = { get, create, verify, destroy };\n\nexport default sparkpostDomainsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport sparkpostDomainsApi from \"apis/integrations/sparkpost_domains\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchSparkpostDomain = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId],\n queryFn: () => sparkpostDomainsApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useCreateSparkpostDomain = ({ ownerId }) =>\n useMutationWithInvalidation(\n payload => sparkpostDomainsApi.create(ownerId, payload),\n { keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId]] }\n );\n\nexport const useVerifySparkpostDomain = ({ ownerId }) =>\n useMutationWithInvalidation(() => sparkpostDomainsApi.verify(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId]],\n });\n\nexport const useDestroySparkpostDomain = ({ ownerId }) =>\n useMutationWithInvalidation(() => sparkpostDomainsApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId]],\n });\n"],"names":["NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL","GMAIL_URL","concat","GMAIL_OAUTH_URL","GMAIL_OAUTH_CONNECT_URL","OUTLOOK_URL","OUTLOOK_OAUTH_URL","OUTLOOK_OAUTH_CONNECT_URL","SPARKPOST_DOMAINS_URL","SPARKPOST_DOMAINS_INTEGRATIONS_URL","SPARKPOST_DOMAINS_VERIFY_URL","SMTP_URL","get","ownerId","axios","buildUrl","showToastr","destroy","gmailApi","QUERY_KEYS","INTEGRATION_GMAIL","INTEGRATION_OUTLOOK","INTEGRATION_SPARKPOST","INTEGRATION_SMTP","useFetchGmail","options","useQuery","_objectSpread","queryKey","queryFn","retry","useDestroyGmail","_ref","useMutationWithInvalidation","keysToInvalidate","invalidateAllIntegrationQueries","queryClient","invalidateQueries","predicate","query","_query$queryKey","_slicedToArray","key","id","includes","outlookApi","useFetchOutlook","useDestroyOutlook","create","payload","post","smtpApi","useFetchSmtp","useCreateSmtp","useDestroySmtp","_ref2","useQueryClient","ver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;;"}
|
|
1
|
+
{"version":3,"file":"useSparkpostApi-DlgW14Wu.js","sources":["../app/javascript/src/apis/integrations/constants.js","../app/javascript/src/apis/integrations/gmail.js","../app/javascript/src/constants/query.js","../app/javascript/src/hooks/reactQuery/integrations/useGmailIntegrationApi.js","../app/javascript/src/utils.js","../app/javascript/src/apis/integrations/outlook.js","../app/javascript/src/hooks/reactQuery/integrations/useOutlookIntegrationApi.js","../app/javascript/src/apis/integrations/smtp.js","../app/javascript/src/hooks/reactQuery/integrations/useSmtpIntegrationApi.js","../app/javascript/src/apis/integrations/sparkpost_domains.js","../app/javascript/src/hooks/reactQuery/integrations/useSparkpostApi.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/api-connector-should-use-default-export */\n\nconst NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL = \"/neeto_email_delivery/api/v1\";\n\nexport const GMAIL_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/gmail`;\nexport const GMAIL_OAUTH_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/gmail/oauth/:ownerId`;\nexport const GMAIL_OAUTH_CONNECT_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/gmail/oauth/connect`;\n\nexport const OUTLOOK_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/outlook`;\nexport const OUTLOOK_OAUTH_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/outlook/oauth/:ownerId`;\nexport const OUTLOOK_OAUTH_CONNECT_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/outlook/oauth/connect`;\n\nexport const SPARKPOST_DOMAINS_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/sparkpost_domains`;\nexport const SPARKPOST_DOMAINS_INTEGRATIONS_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/integrations/sparkpost_domains`;\nexport const SPARKPOST_DOMAINS_VERIFY_URL = `${SPARKPOST_DOMAINS_INTEGRATIONS_URL}/verify`;\n\nexport const SMTP_URL = `${NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL}/smtp`;\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { GMAIL_URL, GMAIL_OAUTH_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(GMAIL_URL, { ownerId }), { showToastr: false });\n\nconst destroy = ownerId => {\n axios.delete(buildUrl(GMAIL_OAUTH_URL, { ownerId }), { showToastr: false });\n};\n\nconst gmailApi = { get, destroy };\n\nexport default gmailApi;\n","export const QUERY_KEYS = {\n INTEGRATION_GMAIL: \"integration-gmail\",\n INTEGRATION_OUTLOOK: \"integration-outlook\",\n INTEGRATION_SPARKPOST: \"integration-sparkpost\",\n INTEGRATION_SMTP: \"integration-smtp\",\n};\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport gmailApi from \"apis/integrations/gmail\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchGmail = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_GMAIL, ownerId],\n queryFn: () => gmailApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useDestroyGmail = ({ ownerId }) =>\n useMutationWithInvalidation(() => gmailApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_GMAIL, ownerId]],\n });\n","import { QUERY_KEYS } from \"src/constants/query\";\n\nexport const invalidateAllIntegrationQueries = (queryClient, ownerId) => {\n queryClient.invalidateQueries({\n predicate: query => {\n const [key, id] = query.queryKey;\n\n return (\n id === ownerId &&\n [\n QUERY_KEYS.INTEGRATION_GMAIL,\n QUERY_KEYS.INTEGRATION_OUTLOOK,\n QUERY_KEYS.INTEGRATION_SPARKPOST,\n QUERY_KEYS.INTEGRATION_SMTP,\n ].includes(key)\n );\n },\n });\n};\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { OUTLOOK_URL, OUTLOOK_OAUTH_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(OUTLOOK_URL, { ownerId }), { showToastr: false });\n\nconst destroy = ownerId => {\n axios.delete(buildUrl(OUTLOOK_OAUTH_URL, { ownerId }), { showToastr: false });\n};\n\nconst outlookApi = { get, destroy };\n\nexport default outlookApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport outlookApi from \"apis/integrations/outlook\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchOutlook = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId],\n queryFn: () => outlookApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useDestroyOutlook = ({ ownerId }) =>\n useMutationWithInvalidation(() => outlookApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId]],\n });\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { SMTP_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(SMTP_URL, { ownerId }), { showToastr: false });\n\nconst create = (ownerId, payload) =>\n axios.post(buildUrl(SMTP_URL, { ownerId }), payload);\n\nconst destroy = ownerId => axios.delete(buildUrl(SMTP_URL, { ownerId }));\n\nconst smtpApi = { get, create, destroy };\n\nexport default smtpApi;\n","import { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport smtpApi from \"apis/integrations/smtp\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"utils\";\n\nexport const useFetchSmtp = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_SMTP, ownerId],\n queryFn: () => smtpApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useCreateSmtp = ({ ownerId }) =>\n useMutationWithInvalidation(payload => smtpApi.create(ownerId, payload), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SMTP, ownerId]],\n });\n\nexport const useDestroySmtp = ({ ownerId }) => {\n const queryClient = useQueryClient();\n\n return useMutationWithInvalidation(() => smtpApi.destroy(ownerId), {\n keysToInvalidate: [\n [QUERY_KEYS.INTEGRATION_SMTP, ownerId],\n () => invalidateAllIntegrationQueries(queryClient, ownerId),\n ],\n });\n};\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport {\n SPARKPOST_DOMAINS_URL,\n SPARKPOST_DOMAINS_VERIFY_URL,\n SPARKPOST_DOMAINS_INTEGRATIONS_URL,\n} from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(SPARKPOST_DOMAINS_URL, { ownerId }), {\n showToastr: false,\n });\n\nconst create = (ownerId, payload) =>\n axios.post(\n buildUrl(SPARKPOST_DOMAINS_INTEGRATIONS_URL, { ownerId }),\n payload\n );\n\nconst verify = ownerId =>\n axios.post(buildUrl(SPARKPOST_DOMAINS_VERIFY_URL, { ownerId }));\n\nconst destroy = ownerId =>\n axios.delete(buildUrl(SPARKPOST_DOMAINS_INTEGRATIONS_URL, { ownerId }));\n\nconst sparkpostDomainsApi = { get, create, verify, destroy };\n\nexport default sparkpostDomainsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport sparkpostDomainsApi from \"apis/integrations/sparkpost_domains\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchSparkpostDomain = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId],\n queryFn: () => sparkpostDomainsApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useCreateSparkpostDomain = ({ ownerId }) =>\n useMutationWithInvalidation(\n payload => sparkpostDomainsApi.create(ownerId, payload),\n { keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId]] }\n );\n\nexport const useVerifySparkpostDomain = ({ ownerId }) =>\n useMutationWithInvalidation(() => sparkpostDomainsApi.verify(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId]],\n });\n\nexport const useDestroySparkpostDomain = ({ ownerId }) =>\n useMutationWithInvalidation(() => sparkpostDomainsApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SPARKPOST, ownerId]],\n });\n"],"names":["NEETO_EMAIL_DELIVERY_ENGINE_BASE_URL","GMAIL_URL","concat","GMAIL_OAUTH_URL","GMAIL_OAUTH_CONNECT_URL","OUTLOOK_URL","OUTLOOK_OAUTH_URL","OUTLOOK_OAUTH_CONNECT_URL","SPARKPOST_DOMAINS_URL","SPARKPOST_DOMAINS_INTEGRATIONS_URL","SPARKPOST_DOMAINS_VERIFY_URL","SMTP_URL","get","ownerId","axios","buildUrl","showToastr","destroy","gmailApi","QUERY_KEYS","INTEGRATION_GMAIL","INTEGRATION_OUTLOOK","INTEGRATION_SPARKPOST","INTEGRATION_SMTP","useFetchGmail","options","useQuery","_objectSpread","queryKey","queryFn","retry","useDestroyGmail","_ref","useMutationWithInvalidation","keysToInvalidate","invalidateAllIntegrationQueries","queryClient","invalidateQueries","predicate","query","_query$queryKey","_slicedToArray","key","id","includes","outlookApi","useFetchOutlook","useDestroyOutlook","create","payload","post","smtpApi","useFetchSmtp","useCreateSmtp","useDestroySmtp","_ref2","useQueryClient","verify","sparkpostDomainsApi","useFetchSparkpostDomain","useCreateSparkpostDomain","useVerifySparkpostDomain","useDestroySparkpostDomain","_ref3"],"mappings":";;;;;;;;;AAAA;;AAEA,IAAMA,oCAAoC,GAAG,8BAA8B;AAEpE,IAAMC,SAAS,GAAA,EAAA,CAAAC,MAAA,CAAMF,oCAAoC,EAAA,QAAA,CAAQ;AACjE,IAAMG,eAAe,GAAA,EAA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;GAAC,EACLL,OAAO,CACX,CAAC;AAAA;IAESmC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAA5B,IAAA,EAAA;AAAA,EAAA,IAAMnB,OAAO,GAAAmB,IAAA,CAAPnB,OAAO;EAAA,OAChDoB,sCAA2B,CACzB,UAAAgB,OAAO,EAAA;AAAA,IAAA,OAAIS,mBAAmB,CAACV,MAAM,CAACnC,OAAO,EAAEoC,OAAO,CAAC;EAAA,CAAA,EACvD;IAAEf,gBAAgB,EAAE,CAAC,CAACf,UAAU,CAACG,qBAAqB,EAAET,OAAO,CAAC;AAAE,GACpE,CAAC;AAAA;IAEUgD,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAN,KAAA,EAAA;AAAA,EAAA,IAAM1C,OAAO,GAAA0C,KAAA,CAAP1C,OAAO;AAAA,EAAA,OAChDoB,sCAA2B,CAAC,YAAA;AAAA,IAAA,OAAMyB,mBAAmB,CAACD,MAAM,CAAC5C,OAAO,CAAC;EAAA,CAAA,EAAE;IACrEqB,gBAAgB,EAAE,CAAC,CAACf,UAAU,CAACG,qBAAqB,EAAET,OAAO,CAAC;AAChE,GAAC,CAAC;AAAA;IAESiD,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAAC,KAAA,EAAA;AAAA,EAAA,IAAMlD,OAAO,GAAAkD,KAAA,CAAPlD,OAAO;AAAA,EAAA,OACjDoB,sCAA2B,CAAC,YAAA;AAAA,IAAA,OAAMyB,mBAAmB,CAACzC,OAAO,CAACJ,OAAO,CAAC;EAAA,CAAA,EAAE;IACtEqB,gBAAgB,EAAE,CAAC,CAACf,UAAU,CAACG,qBAAqB,EAAET,OAAO,CAAC;AAChE,GAAC,CAAC;AAAA;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ var react = require('react');
|
|
|
5
5
|
var reactQuery = require('@tanstack/react-query');
|
|
6
6
|
var Toastr = require('@bigbinary/neetoui/Toastr');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
|
-
var useSparkpostApi = require('./useSparkpostApi-
|
|
8
|
+
var useSparkpostApi = require('./useSparkpostApi-DlgW14Wu.js');
|
|
9
9
|
|
|
10
10
|
var useSparkpostDomain = function useSparkpostDomain(_ref) {
|
|
11
11
|
var ownerId = _ref.ownerId,
|
|
@@ -98,4 +98,4 @@ var useSparkpostDomain = function useSparkpostDomain(_ref) {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
exports.useSparkpostDomain = useSparkpostDomain;
|
|
101
|
-
//# sourceMappingURL=useSparkpostDomain-
|
|
101
|
+
//# sourceMappingURL=useSparkpostDomain-CXs_VuGP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSparkpostDomain-
|
|
1
|
+
{"version":3,"file":"useSparkpostDomain-CXs_VuGP.js","sources":["../app/javascript/src/hooks/integrations/useSparkpostDomain.js"],"sourcesContent":["import { useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { Toastr } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n useFetchSparkpostDomain,\n useCreateSparkpostDomain,\n useVerifySparkpostDomain,\n useDestroySparkpostDomain,\n} from \"hooks/reactQuery/integrations/useSparkpostApi\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useSparkpostDomain = ({ ownerId, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n const { t } = useTranslation();\n const queryClient = useQueryClient();\n\n const { isLoading, data = {} } = useFetchSparkpostDomain(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isCreating, mutate: createDomain } =\n useCreateSparkpostDomain({ ownerId });\n\n const { isPending: isVerifying, mutate: verifyDomain } =\n useVerifySparkpostDomain({ ownerId });\n\n const { isPending: isDestroying, mutate: destroyDomain } =\n useDestroySparkpostDomain({ ownerId });\n\n const onCreateDomain = (email, displayName, onSuccess, onError) => {\n createDomain(\n { sparkpostDomain: { email, displayName } },\n {\n onSuccess: response => {\n if (response?.alreadyVerified) {\n Toastr.success(\n t(\"neetoEmailDelivery.sparkpost.toasts.domainVerifiedConnected\")\n );\n }\n onSuccess?.(response);\n },\n onError: error => {\n onError?.(error);\n },\n }\n );\n };\n\n const onVerifyDomain = (onSuccess, onError) => {\n verifyDomain(false, {\n onSuccess: response => {\n if (response?.verified) {\n Toastr.success(\n t(\"neetoEmailDelivery.sparkpost.toasts.domainVerified\")\n );\n } else {\n Toastr.warning(\n t(\"neetoEmailDelivery.sparkpost.toasts.verificationPending\")\n );\n }\n onSuccess?.(response);\n },\n onError: error => {\n onError?.(error);\n },\n });\n };\n\n const onDisconnect = onSuccess => {\n destroyDomain(false, {\n onSuccess: () => {\n Toastr.success(\n t(\"neetoEmailDelivery.sparkpost.toasts.domainDisconnected\")\n );\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n onSuccess?.();\n },\n });\n };\n\n return {\n data,\n isLoading,\n isCreating,\n isVerifying,\n isDestroying,\n exists: data?.exists,\n isConnected: data?.connected || false,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onCreateDomain,\n onVerifyDomain,\n onDisconnect,\n };\n};\n\nexport default useSparkpostDomain;\n"],"names":["useSparkpostDomain","_ref","ownerId","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useTranslation","useTranslation","t","queryClient","useQueryClient","_useFetchSparkpostDom","useFetchSparkpostDomain","enabled","isLoading","_useFetchSparkpostDom2","data","_useCreateSparkpostDo","useCreateSparkpostDomain","isCreating","isPending","createDomain","mutate","_useVerifySparkpostDo","useVerifySparkpostDomain","isVerifying","verifyDomain","_useDestroySparkpostD","useDestroySparkpostDomain","isDestroying","destroyDomain","onCreateDomain","email","displayName","onSuccess","onError","sparkpostDomain","response","alreadyVerified","Toastr","success","error","onVerifyDomain","verified","warning","onDisconnect","invalidateAllIntegrationQueries","exists","isConnected","connected"],"mappings":";;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A,cAAc;AACdG,IAAAA,YAAY,EAAZA;GACD;AACH;;;;"}
|
|
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { b as useFetchSparkpostDomain, d as useCreateSparkpostDomain, e as useVerifySparkpostDomain, f as useDestroySparkpostDomain, i as invalidateAllIntegrationQueries } from './useSparkpostApi-
|
|
6
|
+
import { b as useFetchSparkpostDomain, d as useCreateSparkpostDomain, e as useVerifySparkpostDomain, f as useDestroySparkpostDomain, i as invalidateAllIntegrationQueries } from './useSparkpostApi-B-D8RNRF.js';
|
|
7
7
|
|
|
8
8
|
var useSparkpostDomain = function useSparkpostDomain(_ref) {
|
|
9
9
|
var ownerId = _ref.ownerId,
|
|
@@ -96,4 +96,4 @@ var useSparkpostDomain = function useSparkpostDomain(_ref) {
|
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
export { useSparkpostDomain as u };
|
|
99
|
-
//# sourceMappingURL=useSparkpostDomain-
|
|
99
|
+
//# sourceMappingURL=useSparkpostDomain-DA1nrWS3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSparkpostDomain-
|
|
1
|
+
{"version":3,"file":"useSparkpostDomain-DA1nrWS3.js","sources":["../app/javascript/src/hooks/integrations/useSparkpostDomain.js"],"sourcesContent":["import { useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { Toastr } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n useFetchSparkpostDomain,\n useCreateSparkpostDomain,\n useVerifySparkpostDomain,\n useDestroySparkpostDomain,\n} from \"hooks/reactQuery/integrations/useSparkpostApi\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useSparkpostDomain = ({ ownerId, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n const { t } = useTranslation();\n const queryClient = useQueryClient();\n\n const { isLoading, data = {} } = useFetchSparkpostDomain(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isCreating, mutate: createDomain } =\n useCreateSparkpostDomain({ ownerId });\n\n const { isPending: isVerifying, mutate: verifyDomain } =\n useVerifySparkpostDomain({ ownerId });\n\n const { isPending: isDestroying, mutate: destroyDomain } =\n useDestroySparkpostDomain({ ownerId });\n\n const onCreateDomain = (email, displayName, onSuccess, onError) => {\n createDomain(\n { sparkpostDomain: { email, displayName } },\n {\n onSuccess: response => {\n if (response?.alreadyVerified) {\n Toastr.success(\n t(\"neetoEmailDelivery.sparkpost.toasts.domainVerifiedConnected\")\n );\n }\n onSuccess?.(response);\n },\n onError: error => {\n onError?.(error);\n },\n }\n );\n };\n\n const onVerifyDomain = (onSuccess, onError) => {\n verifyDomain(false, {\n onSuccess: response => {\n if (response?.verified) {\n Toastr.success(\n t(\"neetoEmailDelivery.sparkpost.toasts.domainVerified\")\n );\n } else {\n Toastr.warning(\n t(\"neetoEmailDelivery.sparkpost.toasts.verificationPending\")\n );\n }\n onSuccess?.(response);\n },\n onError: error => {\n onError?.(error);\n },\n });\n };\n\n const onDisconnect = onSuccess => {\n destroyDomain(false, {\n onSuccess: () => {\n Toastr.success(\n t(\"neetoEmailDelivery.sparkpost.toasts.domainDisconnected\")\n );\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n onSuccess?.();\n },\n });\n };\n\n return {\n data,\n isLoading,\n isCreating,\n isVerifying,\n isDestroying,\n exists: data?.exists,\n isConnected: data?.connected || false,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onCreateDomain,\n onVerifyDomain,\n onDisconnect,\n };\n};\n\nexport default useSparkpostDomain;\n"],"names":["useSparkpostDomain","_ref","ownerId","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useTranslation","useTranslation","t","queryClient","useQueryClient","_useFetchSparkpostDom","useFetchSparkpostDomain","enabled","isLoading","_useFetchSparkpostDom2","data","_useCreateSparkpostDo","useCreateSparkpostDomain","isCreating","isPending","createDomain","mutate","_useVerifySparkpostDo","useVerifySparkpostDomain","isVerifying","verifyDomain","_useDestroySparkpostD","useDestroySparkpostDomain","isDestroying","destroyDomain","onCreateDomain","email","displayName","onSuccess","onError","sparkpostDomain","response","alreadyVerified","Toastr","success","error","onVerifyDomain","verified","warning","onDisconnect","invalidateAllIntegrationQueries","exists","isConnected","connected"],"mappings":";;;;;;;AAcA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAA2C;AAAA,EAAA,IAArCC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,qBAAqB,GAAAF,IAAA,CAArBE,qBAAqB;AAC1D,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;AACtD,EAAA,IAAAI,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AACT,EAAA,IAAMC,WAAW,GAAGC,cAAc,EAAE;AAEpC,EAAA,IAAAC,qBAAA,GAAiCC,uBAAuB,CAACd,OAAO,EAAE;AAChEe,MAAAA,OAAO,EAAEd;AACX,KAAC,CAAC;IAFMe,SAAS,GAAAH,qBAAA,CAATG,SAAS;IAAAC,sBAAA,GAAAJ,qBAAA,CAAEK,IAAI;AAAJA,IAAAA,IAAI,GAAAD,sBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,sBAAA;EAI5B,IAAAE,qBAAA,GACEC,wBAAwB,CAAC;AAAEpB,MAAAA,OAAO,EAAPA;AAAQ,K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AAZA,YAAY;AACZkB,IAAAA,MAAM,EAAE/B,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,MAAA,GAAA,MAAA,GAAJA,IAAI,CAAE+B,MAAM;IACpBC,WAAW,EAAE,CAAAhC,IAAI,KAAA,IAAA,IAAJA,IAAI,uBAAJA,IAAI,CAAEiC,SAAS,KAAI,KAAK;AACrC7C,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,wBAAwB,EAAxBA,wBAAwB;AACxB0B,IAAAA,cAAc,EAAdA,cAAc;AACdW,IAAAA,cAAc,EAAdA,cAAc;AACdG,IAAAA,YAAY,EAAZA;GACD;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-email-delivery-frontend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "This repo is for implementing custom email delivery functionality for the Neeto platform.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-email-delivery-nano",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"@babel/preset-env": "7.26.0",
|
|
65
65
|
"@babel/preset-react": "7.25.9",
|
|
66
66
|
"@babel/preset-typescript": "7.26.0",
|
|
67
|
-
"@babel/runtime": "7.
|
|
67
|
+
"@babel/runtime": "7.28.6",
|
|
68
68
|
"@bigbinary/babel-preset-neeto": "^1.0.3",
|
|
69
|
-
"@bigbinary/eslint-plugin-neeto": "1.
|
|
69
|
+
"@bigbinary/eslint-plugin-neeto": "1.9.0",
|
|
70
70
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
71
|
-
"@bigbinary/neeto-commons-frontend": "4.13.
|
|
71
|
+
"@bigbinary/neeto-commons-frontend": "4.13.113",
|
|
72
72
|
"@bigbinary/neeto-filters-frontend": "4.3.32",
|
|
73
73
|
"@bigbinary/neeto-icons": "1.20.86",
|
|
74
|
-
"@bigbinary/neeto-molecules": "4.1.
|
|
75
|
-
"@bigbinary/neetoui": "8.
|
|
74
|
+
"@bigbinary/neeto-molecules": "4.1.39",
|
|
75
|
+
"@bigbinary/neetoui": "8.4.1",
|
|
76
76
|
"@emotion/is-prop-valid": "1.2.0",
|
|
77
77
|
"@faker-js/faker": "8.2.0",
|
|
78
78
|
"@honeybadger-io/js": "6.10.1",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
90
90
|
"antd": "5.22.1",
|
|
91
91
|
"autoprefixer": "^10.4.5",
|
|
92
|
-
"axios": "1.13.
|
|
92
|
+
"axios": "1.13.6",
|
|
93
93
|
"babel-loader": "^8.2.5",
|
|
94
94
|
"babel-plugin-istanbul": "^6.1.1",
|
|
95
95
|
"babel-plugin-js-logger": "1.0.17",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"classnames": "2.5.1",
|
|
105
105
|
"crypto-browserify": "3.12.1",
|
|
106
106
|
"css-loader": "6.8.1",
|
|
107
|
-
"dompurify": "
|
|
107
|
+
"dompurify": "3.3.2",
|
|
108
108
|
"dotenv-webpack": "^8.0.1",
|
|
109
109
|
"eslint": "^9.25.1",
|
|
110
110
|
"eslint-config-prettier": "^10.1.2",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"react-i18next": "12.3.1",
|
|
150
150
|
"react-router-dom": "5.3.3",
|
|
151
151
|
"react-toastify": "8.0.2",
|
|
152
|
-
"rollup": "4.
|
|
152
|
+
"rollup": "4.59.0",
|
|
153
153
|
"rollup-plugin-analyzer": "4.0.0",
|
|
154
154
|
"rollup-plugin-cleaner": "1.0.0",
|
|
155
155
|
"rollup-plugin-copy": "3.5.0",
|
|
@@ -174,23 +174,23 @@
|
|
|
174
174
|
"zustand": "4.4.2"
|
|
175
175
|
},
|
|
176
176
|
"peerDependencies": {
|
|
177
|
-
"@babel/runtime": "7.
|
|
177
|
+
"@babel/runtime": "7.28.6",
|
|
178
178
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
179
|
-
"@bigbinary/neeto-commons-frontend": "4.13.
|
|
179
|
+
"@bigbinary/neeto-commons-frontend": "4.13.113",
|
|
180
180
|
"@bigbinary/neeto-filters-frontend": "4.3.32",
|
|
181
181
|
"@bigbinary/neeto-icons": "1.20.86",
|
|
182
|
-
"@bigbinary/neeto-molecules": "4.1.
|
|
183
|
-
"@bigbinary/neetoui": "8.
|
|
182
|
+
"@bigbinary/neeto-molecules": "4.1.39",
|
|
183
|
+
"@bigbinary/neetoui": "8.4.1",
|
|
184
184
|
"@honeybadger-io/js": "6.10.1",
|
|
185
185
|
"@honeybadger-io/react": "6.1.25",
|
|
186
186
|
"@tanstack/react-query": "5.59.20",
|
|
187
187
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
188
188
|
"antd": "5.22.1",
|
|
189
|
-
"axios": "1.13.
|
|
189
|
+
"axios": "1.13.6",
|
|
190
190
|
"buffer": "^6.0.3",
|
|
191
191
|
"classnames": "2.5.1",
|
|
192
192
|
"crypto-browserify": "3.12.1",
|
|
193
|
-
"dompurify": "
|
|
193
|
+
"dompurify": "3.3.2",
|
|
194
194
|
"formik": "2.4.6",
|
|
195
195
|
"https-browserify": "1.0.0",
|
|
196
196
|
"i18next": "22.5.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BKKcEEt1.js","sources":["../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 { 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 { 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 showThumbsUpToastr();\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 { showThumbsUpToastr } from \"neetocommons/utils\";\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 showThumbsUpToastr();\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\";\nimport { Check, Warning } from \"neetoicons\";\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 STATUS_TAG_CONFIG = {\n connected: {\n labelKey: \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n style: \"success\",\n icon: Check,\n },\n pending: {\n labelKey: \"neetoEmailDelivery.integrationDetail.pending\",\n style: \"warning\",\n icon: Warning,\n },\n error: {\n labelKey: \"neetoEmailDelivery.integrationDetail.error\",\n style: \"danger\",\n icon: Warning,\n },\n};\n","import { Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { STATUS_TAG_CONFIG } from \"./constants\";\n\nconst IntegrationCard = ({ icon: Icon, title, description, status, path }) => {\n const { t } = useTranslation();\n\n const tagConfig = STATUS_TAG_CONFIG[status];\n\n return (\n <Link\n className=\"neeto-ui-rounded-lg neeto-ui-border-gray-200 flex cursor-pointer flex-col gap-y-4 border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\"\n to={path}\n >\n <div>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && <Icon className=\"neeto-ui-text-gray-500\" size={24} />}\n <Typography\n className=\"neeto-ui-text-black text-lg leading-6\"\n style=\"h3\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n </div>\n <Typography className=\"neeto-ui-text-gray-600\" style=\"body2\">\n {description}\n </Typography>\n </div>\n {tagConfig && (\n <div className=\"neeto-ui-border-gray-300 border-t pt-3\">\n <Tag\n className=\"flex-row-reverse\"\n icon={tagConfig.icon}\n label={t(tagConfig.labelKey)}\n style={tagConfig.style}\n />\n </div>\n )}\n </Link>\n );\n};\n\nexport default IntegrationCard;\n","import { humanize, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner, Toastr } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\n\nimport { ERROR_MESSAGES } from \"./constants\";\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 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 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 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 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 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 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 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":["useGmail","_ref","ownerId","indexRoute","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","history","useHistory","queryClient","useQueryClient","_useFetchGmail","useFetchGmail","enabled","isLoading","_useFetchGmail$data","data","_useDestroyGmail","useDestroyGmail","isDestroying","isPending","destroyIntegration","mutate","onClose","replace","onDisconnect","onSuccess","showThumbsUpToastr","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","t","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","STATUS_TAG_CONFIG","labelKey","style","icon","Check","pending","Warning","IntegrationCard","Icon","title","description","path","_useTranslation","useTranslation","tagConfig","_jsxs","Link","className","to","children","_jsx","size","Typography","weight","Tag","label","EmailDeliveryScreen","gmailRoute","outlookRoute","customEmailProviderRoute","smtpRoute","_useQueryParams","useQueryParams","errorDescription","isPresent","_errorMessage","concat","Toastr","humanize","gmailIntegration","outlookIntegration","sparkpostIntegration","useSparkpostDomain","smtpIntegration","isGmailConnected","isGmailLoading","gmailError","isOutlookConnected","isOutlookLoading","isOutlookPending","outlookError","isSparkpostConnected","isSparkpostLoading","sparkpostExists","isSmtpConnected","isSmtpLoading","getCardStatus","_ref2","hasError","gmailTitle","gmailDescription","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","smtpTitle","smtpDescription","Spinner","GmailIcon","OutlookIcon","MailSend"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYA,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,GAAiCC,aAAa,CAACd,OAAO,EAAE;AACtDe,MAAAA,OAAO,EAAEb;AACX,KAAC,CAAC;IAFMc,SAAS,GAAAH,cAAA,CAATG,SAAS;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AAM,EAAEuE,aAAa,CAAC;AACpBjF,YAAAA,WAAW,EAAEqE,gBAAgB;YAC7Bc,QAAQ,EAAE,CAAC,CAACZ;WACb;AAAE,SACJ,CAAC,eACF1B,GAAA,CAACb,eAAe,EAAA;AACdG,UAAAA,WAAW,EAAEoD,kBAAmB;AAChC3D,UAAAA,IAAI,EAAEkE,WAAY;AAClB1D,UAAAA,IAAI,EAAEiB,YAAa;AACnBnB,UAAAA,KAAK,EAAEoD,YAAa;UACpB5E,MAAM,EAAEuE,aAAa,CAAC;AACpBjF,YAAAA,WAAW,EAAEwE,kBAAkB;AAC/BlF,YAAAA,SAAS,EAAEoF,gBAAgB;YAC3BS,QAAQ,EAAE,CAAC,CAACR;WACb;AAAE,SACJ,CAAC,eACF9B,GAAA,CAACb,eAAe,EAAA;AACdG,UAAAA,WAAW,EAAEsD,oBAAqB;AAClC7D,UAAAA,IAAI,EAAEmE,QAAS;AACf3D,UAAAA,IAAI,EAAEkB,wBAAyB;AAC/BpB,UAAAA,KAAK,EAAEsD,cAAe;UACtB9E,MAAM,EAAEuE,aAAa,CAAC;AACpBjF,YAAAA,WAAW,EAAE4E,oBAAoB;YACjCtF,SAAS,EAAEwF,eAAe,IAAI,CAACF;WAChC;AAAE,SACJ,CAAC,eACF/B,GAAA,CAACb,eAAe,EAAA;AACdG,UAAAA,WAAW,EAAEwD,eAAgB;AAC7B/D,UAAAA,IAAI,EAAEmE,QAAS;AACf3D,UAAAA,IAAI,EAAEmB,SAAU;UAChB7C,MAAM,EAAEuE,aAAa,CAAC;AAAEjF,YAAAA,WAAW,EAAE+E;AAAgB,WAAC,CAAE;AACxD7C,UAAAA,KAAK,EAAEwD;AAAU,SAClB,CAAC;OACC;KACF;AAAC,GACH,CAAC;AAEV;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-C7KroEtv.js","sources":["../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 { 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 { 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 showThumbsUpToastr();\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 { showThumbsUpToastr } from \"neetocommons/utils\";\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 showThumbsUpToastr();\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\";\nimport { Check, Warning } from \"neetoicons\";\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 STATUS_TAG_CONFIG = {\n connected: {\n labelKey: \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n style: \"success\",\n icon: Check,\n },\n pending: {\n labelKey: \"neetoEmailDelivery.integrationDetail.pending\",\n style: \"warning\",\n icon: Warning,\n },\n error: {\n labelKey: \"neetoEmailDelivery.integrationDetail.error\",\n style: \"danger\",\n icon: Warning,\n },\n};\n","import { Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { STATUS_TAG_CONFIG } from \"./constants\";\n\nconst IntegrationCard = ({ icon: Icon, title, description, status, path }) => {\n const { t } = useTranslation();\n\n const tagConfig = STATUS_TAG_CONFIG[status];\n\n return (\n <Link\n className=\"neeto-ui-rounded-lg neeto-ui-border-gray-200 flex cursor-pointer flex-col gap-y-4 border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\"\n to={path}\n >\n <div>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && <Icon className=\"neeto-ui-text-gray-500\" size={24} />}\n <Typography\n className=\"neeto-ui-text-black text-lg leading-6\"\n style=\"h3\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n </div>\n <Typography className=\"neeto-ui-text-gray-600\" style=\"body2\">\n {description}\n </Typography>\n </div>\n {tagConfig && (\n <div className=\"neeto-ui-border-gray-300 border-t pt-3\">\n <Tag\n className=\"flex-row-reverse\"\n icon={tagConfig.icon}\n label={t(tagConfig.labelKey)}\n style={tagConfig.style}\n />\n </div>\n )}\n </Link>\n );\n};\n\nexport default IntegrationCard;\n","import { humanize, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner, Toastr } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\n\nimport { ERROR_MESSAGES } from \"./constants\";\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 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 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 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 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 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 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 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":["useGmail","_ref","ownerId","indexRoute","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","history","useHistory","queryClient","useQueryClient","_useFetchGmail","useFetchGmail","enabled","isLoading","_useFetchGmail$data","data","_useDestroyGmail","useDestroyGmail","isDestroying","isPending","destroyIntegration","mutate","onClose","replace","onDisconnect","onSuccess","showThumbsUpToastr","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","t","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","STATUS_TAG_CONFIG","labelKey","style","icon","Check","pending","Warning","IntegrationCard","Icon","title","description","path","_useTranslation","useTranslation","tagConfig","_jsxs","Link","className","to","children","_jsx","size","Typography","weight","Tag","label","EmailDeliveryScreen","gmailRoute","outlookRoute","customEmailProviderRoute","smtpRoute","_useQueryParams","useQueryParams","errorDescription","isPresent","_errorMessage","concat","Toastr","humanize","gmailIntegration","outlookIntegration","sparkpostIntegration","useSparkpostDomain","smtpIntegration","isGmailConnected","isGmailLoading","gmailError","isOutlookConnected","isOutlookLoading","isOutlookPending","outlookError","isSparkpostConnected","isSparkpostLoading","sparkpostExists","isSmtpConnected","isSmtpLoading","getCardStatus","_ref2","hasError","gmailTitle","gmailDescription","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","smtpTitle","smtpDescription","Spinner","GmailIcon","OutlookIcon","MailSend"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYA,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,cAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CA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