@bigbinary/neeto-email-delivery-frontend 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/app/javascript/src/translations/ar.json +4 -3
- package/app/javascript/src/translations/bg.json +4 -3
- package/app/javascript/src/translations/ca.json +4 -3
- package/app/javascript/src/translations/cs.json +4 -3
- package/app/javascript/src/translations/da.json +4 -3
- package/app/javascript/src/translations/de.json +4 -3
- package/app/javascript/src/translations/en.json +1 -1
- package/app/javascript/src/translations/es-MX.json +4 -3
- package/app/javascript/src/translations/es.json +4 -3
- package/app/javascript/src/translations/et.json +4 -3
- package/app/javascript/src/translations/fi.json +4 -3
- package/app/javascript/src/translations/fil.json +4 -3
- package/app/javascript/src/translations/fr.json +4 -3
- package/app/javascript/src/translations/he.json +4 -3
- package/app/javascript/src/translations/hi.json +4 -3
- package/app/javascript/src/translations/hr.json +4 -3
- package/app/javascript/src/translations/hu.json +4 -3
- package/app/javascript/src/translations/id.json +4 -3
- package/app/javascript/src/translations/it.json +4 -3
- package/app/javascript/src/translations/ja.json +4 -3
- package/app/javascript/src/translations/ko.json +4 -3
- package/app/javascript/src/translations/nl.json +4 -3
- package/app/javascript/src/translations/pl.json +4 -3
- package/app/javascript/src/translations/pt-BR.json +4 -3
- package/app/javascript/src/translations/pt.json +4 -3
- package/app/javascript/src/translations/ro.json +4 -3
- package/app/javascript/src/translations/ru.json +4 -3
- package/app/javascript/src/translations/sk.json +4 -3
- package/app/javascript/src/translations/sl.json +4 -3
- package/app/javascript/src/translations/sv.json +4 -3
- package/app/javascript/src/translations/th.json +4 -3
- package/app/javascript/src/translations/tr.json +4 -3
- package/app/javascript/src/translations/uk.json +4 -3
- package/app/javascript/src/translations/vi.json +4 -3
- package/app/javascript/src/translations/zh-CN.json +4 -3
- package/app/javascript/src/translations/zh-TW.json +4 -3
- package/dist/.ready +1 -1
- package/dist/EmailDeliveryScreen.js +193 -14
- package/dist/EmailDeliveryScreen.js.map +1 -1
- package/dist/PageLayout-B_USy8hj.js +75 -0
- package/dist/PageLayout-B_USy8hj.js.map +1 -0
- package/dist/PageLayout-pMKr_80l.js +103 -0
- package/dist/PageLayout-pMKr_80l.js.map +1 -0
- package/dist/SparkpostDomainSetup.js +3 -3
- package/dist/SparkpostDomainVerify.js +4 -4
- package/dist/Verify-80b6NK1q.js +295 -0
- package/dist/Verify-80b6NK1q.js.map +1 -0
- package/dist/{Verify-Cbn8WE7T.js → Verify-D0bZSCRH.js} +4 -4
- package/dist/{Verify-Cbn8WE7T.js.map → Verify-D0bZSCRH.js.map} +1 -1
- package/dist/Verify-Dnvx5OTi.js +292 -0
- package/dist/Verify-Dnvx5OTi.js.map +1 -0
- package/dist/cjs/EmailDeliveryScreen.js +189 -14
- package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
- package/dist/cjs/index.js +7 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/EmailDeliveryScreen.js +201 -0
- package/dist/cjs/v2/EmailDeliveryScreen.js.map +1 -0
- package/dist/cjs/v2/SparkpostDomainSetup.js +140 -0
- package/dist/cjs/v2/SparkpostDomainSetup.js.map +1 -0
- package/dist/cjs/v2/SparkpostDomainVerify.js +35 -0
- package/dist/cjs/v2/SparkpostDomainVerify.js.map +1 -0
- package/dist/cjs/v2/hooks.js +17 -0
- package/dist/cjs/v2/hooks.js.map +1 -0
- package/dist/cjs/v2/index.js +522 -0
- package/dist/cjs/v2/index.js.map +1 -0
- package/dist/hooks.js +2 -2
- package/dist/index.js +8 -8
- package/dist/{useEmailDeliveryIntegrationApi-Dk9WPotT.js → useEmailDeliveryIntegrationApi-CfgmbuRA.js} +2 -2
- package/dist/{useEmailDeliveryIntegrationApi-Dk9WPotT.js.map → useEmailDeliveryIntegrationApi-CfgmbuRA.js.map} +1 -1
- package/dist/useSmtp-BCcRaVYr.js +136 -0
- package/dist/useSmtp-BCcRaVYr.js.map +1 -0
- package/dist/useSmtp-DxZlXdtr.js +132 -0
- package/dist/useSmtp-DxZlXdtr.js.map +1 -0
- package/dist/{useSparkpostApi-B-D8RNRF.js → useSparkpostApi-CQT4JD8-.js} +2 -2
- package/dist/{useSparkpostApi-B-D8RNRF.js.map → useSparkpostApi-CQT4JD8-.js.map} +1 -1
- package/dist/useSparkpostDomain-DDjj-dyF.js +99 -0
- package/dist/useSparkpostDomain-DDjj-dyF.js.map +1 -0
- package/dist/{useSparkpostDomain-DA1nrWS3.js → useSparkpostDomain-Dt4Q3GSP.js} +2 -2
- package/dist/{useSparkpostDomain-DA1nrWS3.js.map → useSparkpostDomain-Dt4Q3GSP.js.map} +1 -1
- package/dist/useSparkpostDomain-IJPoCQ0f.js +101 -0
- package/dist/useSparkpostDomain-IJPoCQ0f.js.map +1 -0
- package/dist/{index-BbOAmk2e.js → v2/EmailDeliveryScreen.js} +27 -148
- package/dist/v2/EmailDeliveryScreen.js.map +1 -0
- package/dist/v2/SparkpostDomainSetup.js +138 -0
- package/dist/v2/SparkpostDomainSetup.js.map +1 -0
- package/dist/v2/SparkpostDomainVerify.js +29 -0
- package/dist/v2/SparkpostDomainVerify.js.map +1 -0
- package/dist/v2/hooks.js +11 -0
- package/dist/v2/hooks.js.map +1 -0
- package/dist/v2/index.js +499 -0
- package/dist/v2/index.js.map +1 -0
- package/package.json +34 -22
- package/dist/index-BbOAmk2e.js.map +0 -1
- package/dist/index-YMe54v79.js +0 -325
- package/dist/index-YMe54v79.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSparkpostDomain-
|
|
1
|
+
{"version":3,"file":"useSparkpostDomain-Dt4Q3GSP.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,I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,OAAO;AACLlB,IAAAA,IAAI,EAAJA,IAAI;AACJF,IAAAA,SAAS,EAATA,SAAS;AACTK,IAAAA,UAAU,EAAVA,UAAU;AACVM,IAAAA,WAAW,EAAXA,WAAW;AACXI,IAAAA,YAAY,EAAZA,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;;;;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
6
|
+
var reactQuery = require('@tanstack/react-query');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
var useSparkpostApi = require('./useSparkpostApi-DlgW14Wu.js');
|
|
9
|
+
|
|
10
|
+
var useSparkpostDomain = function useSparkpostDomain(_ref) {
|
|
11
|
+
var ownerId = _ref.ownerId,
|
|
12
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
13
|
+
var _useState = react.useState(false),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
isDisconnectAlertOpen = _useState2[0],
|
|
16
|
+
setIsDisconnectAlertOpen = _useState2[1];
|
|
17
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
18
|
+
t = _useTranslation.t;
|
|
19
|
+
var queryClient = reactQuery.useQueryClient();
|
|
20
|
+
var _useFetchSparkpostDom = useSparkpostApi.useFetchSparkpostDomain(ownerId, {
|
|
21
|
+
enabled: canManageIntegrations
|
|
22
|
+
}),
|
|
23
|
+
isLoading = _useFetchSparkpostDom.isLoading,
|
|
24
|
+
_useFetchSparkpostDom2 = _useFetchSparkpostDom.data,
|
|
25
|
+
data = _useFetchSparkpostDom2 === void 0 ? {} : _useFetchSparkpostDom2;
|
|
26
|
+
var _useCreateSparkpostDo = useSparkpostApi.useCreateSparkpostDomain({
|
|
27
|
+
ownerId: ownerId
|
|
28
|
+
}),
|
|
29
|
+
isCreating = _useCreateSparkpostDo.isPending,
|
|
30
|
+
createDomain = _useCreateSparkpostDo.mutate;
|
|
31
|
+
var _useVerifySparkpostDo = useSparkpostApi.useVerifySparkpostDomain({
|
|
32
|
+
ownerId: ownerId
|
|
33
|
+
}),
|
|
34
|
+
isVerifying = _useVerifySparkpostDo.isPending,
|
|
35
|
+
verifyDomain = _useVerifySparkpostDo.mutate;
|
|
36
|
+
var _useDestroySparkpostD = useSparkpostApi.useDestroySparkpostDomain({
|
|
37
|
+
ownerId: ownerId
|
|
38
|
+
}),
|
|
39
|
+
isDestroying = _useDestroySparkpostD.isPending,
|
|
40
|
+
destroyDomain = _useDestroySparkpostD.mutate;
|
|
41
|
+
var onCreateDomain = function onCreateDomain(email, displayName, _onSuccess, _onError) {
|
|
42
|
+
createDomain({
|
|
43
|
+
sparkpostDomain: {
|
|
44
|
+
email: email,
|
|
45
|
+
displayName: displayName
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
onSuccess: function onSuccess(response) {
|
|
49
|
+
if (response !== null && response !== void 0 && response.alreadyVerified) {
|
|
50
|
+
neetoAtoms.Toastr.success(t("neetoEmailDelivery.sparkpost.toasts.domainVerifiedConnected"));
|
|
51
|
+
}
|
|
52
|
+
_onSuccess === null || _onSuccess === void 0 || _onSuccess(response);
|
|
53
|
+
},
|
|
54
|
+
onError: function onError(error) {
|
|
55
|
+
_onError === null || _onError === void 0 || _onError(error);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var onVerifyDomain = function onVerifyDomain(_onSuccess2, _onError2) {
|
|
60
|
+
verifyDomain(false, {
|
|
61
|
+
onSuccess: function onSuccess(response) {
|
|
62
|
+
if (response !== null && response !== void 0 && response.verified) {
|
|
63
|
+
neetoAtoms.Toastr.success(t("neetoEmailDelivery.sparkpost.toasts.domainVerified"));
|
|
64
|
+
} else {
|
|
65
|
+
neetoAtoms.Toastr.warning(t("neetoEmailDelivery.sparkpost.toasts.verificationPending"));
|
|
66
|
+
}
|
|
67
|
+
_onSuccess2 === null || _onSuccess2 === void 0 || _onSuccess2(response);
|
|
68
|
+
},
|
|
69
|
+
onError: function onError(error) {
|
|
70
|
+
_onError2 === null || _onError2 === void 0 || _onError2(error);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
var onDisconnect = function onDisconnect(_onSuccess3) {
|
|
75
|
+
destroyDomain(false, {
|
|
76
|
+
onSuccess: function onSuccess() {
|
|
77
|
+
neetoAtoms.Toastr.success(t("neetoEmailDelivery.sparkpost.toasts.domainDisconnected"));
|
|
78
|
+
setIsDisconnectAlertOpen(false);
|
|
79
|
+
useSparkpostApi.invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
80
|
+
_onSuccess3 === null || _onSuccess3 === void 0 || _onSuccess3();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
data: data,
|
|
86
|
+
isLoading: isLoading,
|
|
87
|
+
isCreating: isCreating,
|
|
88
|
+
isVerifying: isVerifying,
|
|
89
|
+
isDestroying: isDestroying,
|
|
90
|
+
exists: data === null || data === void 0 ? void 0 : data.exists,
|
|
91
|
+
isConnected: (data === null || data === void 0 ? void 0 : data.connected) || false,
|
|
92
|
+
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
93
|
+
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
94
|
+
onCreateDomain: onCreateDomain,
|
|
95
|
+
onVerifyDomain: onVerifyDomain,
|
|
96
|
+
onDisconnect: onDisconnect
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
exports.useSparkpostDomain = useSparkpostDomain;
|
|
101
|
+
//# sourceMappingURL=useSparkpostDomain-IJPoCQ0f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSparkpostDomain-IJPoCQ0f.js","sources":["../app/javascript/src/v2/hooks/integrations/useSparkpostDomain.js"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Toastr } from \"@bigbinary/neeto-atoms\";\nimport { useQueryClient } from \"@tanstack/react-query\";\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,CAArB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binary/neeto-icons/MailSend';
|
|
2
3
|
import GmailIcon from '@bigbinary/neeto-icons/misc/Gmail';
|
|
3
4
|
import OutlookIcon from '@bigbinary/neeto-icons/misc/Outlook';
|
|
4
|
-
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { showThumbsUpToastr } from '@bigbinary/neeto-commons-frontend/utils';
|
|
10
|
-
import { useHistory, Link } from 'react-router-dom';
|
|
11
|
-
import { u as useFetchGmail, h as useDestroyGmail, i as invalidateAllIntegrationQueries, a as useFetchOutlook, j as useDestroyOutlook, c as useFetchSmtp, k as useDestroySmtp } from './useSparkpostApi-B-D8RNRF.js';
|
|
12
|
-
import { u as useSparkpostDomain } from './useSparkpostDomain-DA1nrWS3.js';
|
|
13
|
-
import Tag from '@bigbinary/neetoui/Tag';
|
|
14
|
-
import Typography from '@bigbinary/neetoui/Typography';
|
|
6
|
+
import { u as useGmail, a as useOutlook, b as useSmtp } from '../useSmtp-DxZlXdtr.js';
|
|
7
|
+
import { u as useSparkpostDomain } from '../useSparkpostDomain-DDjj-dyF.js';
|
|
8
|
+
import { Link } from 'react-router-dom';
|
|
15
9
|
import Check from '@bigbinary/neeto-icons/Check';
|
|
16
10
|
import Warning from '@bigbinary/neeto-icons/Warning';
|
|
17
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
setIsDisconnectAlertOpen = _useState2[1];
|
|
27
|
-
var history = useHistory();
|
|
28
|
-
var queryClient = useQueryClient();
|
|
29
|
-
var _useFetchGmail = useFetchGmail(ownerId, {
|
|
30
|
-
enabled: canManageIntegrations
|
|
31
|
-
}),
|
|
32
|
-
isLoading = _useFetchGmail.isLoading,
|
|
33
|
-
_useFetchGmail$data = _useFetchGmail.data,
|
|
34
|
-
data = _useFetchGmail$data === void 0 ? {} : _useFetchGmail$data;
|
|
35
|
-
var _useDestroyGmail = useDestroyGmail({
|
|
36
|
-
ownerId: ownerId
|
|
37
|
-
}),
|
|
38
|
-
isDestroying = _useDestroyGmail.isPending,
|
|
39
|
-
destroyIntegration = _useDestroyGmail.mutate;
|
|
40
|
-
var onClose = function onClose() {
|
|
41
|
-
return history.replace(indexRoute);
|
|
42
|
-
};
|
|
43
|
-
var onDisconnect = function onDisconnect() {
|
|
44
|
-
destroyIntegration(false, {
|
|
45
|
-
onSuccess: function onSuccess() {
|
|
46
|
-
showThumbsUpToastr();
|
|
47
|
-
setIsDisconnectAlertOpen(false);
|
|
48
|
-
invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
49
|
-
history.replace(indexRoute);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
return {
|
|
54
|
-
data: data,
|
|
55
|
-
isLoading: isLoading,
|
|
56
|
-
isDestroying: isDestroying,
|
|
57
|
-
exists: data === null || data === void 0 ? void 0 : data.exists,
|
|
58
|
-
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
59
|
-
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
60
|
-
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
61
|
-
onDisconnect: onDisconnect,
|
|
62
|
-
onClose: onClose,
|
|
63
|
-
errorMessage: data === null || data === void 0 ? void 0 : data.error
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
var useOutlook = function useOutlook(_ref) {
|
|
68
|
-
var ownerId = _ref.ownerId,
|
|
69
|
-
indexRoute = _ref.indexRoute,
|
|
70
|
-
canManageIntegrations = _ref.canManageIntegrations;
|
|
71
|
-
var _useState = useState(false),
|
|
72
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
73
|
-
isDisconnectAlertOpen = _useState2[0],
|
|
74
|
-
setIsDisconnectAlertOpen = _useState2[1];
|
|
75
|
-
var history = useHistory();
|
|
76
|
-
var queryClient = useQueryClient();
|
|
77
|
-
var _useFetchOutlook = useFetchOutlook(ownerId, {
|
|
78
|
-
enabled: canManageIntegrations
|
|
79
|
-
}),
|
|
80
|
-
isLoading = _useFetchOutlook.isLoading,
|
|
81
|
-
_useFetchOutlook$data = _useFetchOutlook.data,
|
|
82
|
-
data = _useFetchOutlook$data === void 0 ? {} : _useFetchOutlook$data;
|
|
83
|
-
var _useDestroyOutlook = useDestroyOutlook({
|
|
84
|
-
ownerId: ownerId
|
|
85
|
-
}),
|
|
86
|
-
isDestroying = _useDestroyOutlook.isPending,
|
|
87
|
-
destroyIntegration = _useDestroyOutlook.mutate;
|
|
88
|
-
var onClose = function onClose() {
|
|
89
|
-
return history.replace(indexRoute);
|
|
90
|
-
};
|
|
91
|
-
var onDisconnect = function onDisconnect() {
|
|
92
|
-
destroyIntegration(false, {
|
|
93
|
-
onSuccess: function onSuccess() {
|
|
94
|
-
showThumbsUpToastr();
|
|
95
|
-
setIsDisconnectAlertOpen(false);
|
|
96
|
-
invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
97
|
-
history.replace(indexRoute);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
return {
|
|
102
|
-
data: data,
|
|
103
|
-
isLoading: isLoading,
|
|
104
|
-
exists: data === null || data === void 0 ? void 0 : data.exists,
|
|
105
|
-
status: data === null || data === void 0 ? void 0 : data.status,
|
|
106
|
-
shadowAccount: data === null || data === void 0 ? void 0 : data.shadowAccount,
|
|
107
|
-
isWaitingForTestEmail: (data === null || data === void 0 ? void 0 : data.status) === "inactive" && !(data !== null && data !== void 0 && data.connected),
|
|
108
|
-
isDestroying: isDestroying,
|
|
109
|
-
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
110
|
-
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
111
|
-
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
112
|
-
onDisconnect: onDisconnect,
|
|
113
|
-
onClose: onClose,
|
|
114
|
-
errorMessage: data === null || data === void 0 ? void 0 : data.error
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
var useSmtp = function useSmtp(_ref) {
|
|
119
|
-
var ownerId = _ref.ownerId,
|
|
120
|
-
canManageIntegrations = _ref.canManageIntegrations;
|
|
121
|
-
var _useFetchSmtp = useFetchSmtp(ownerId, {
|
|
122
|
-
enabled: canManageIntegrations
|
|
123
|
-
}),
|
|
124
|
-
isLoading = _useFetchSmtp.isLoading,
|
|
125
|
-
_useFetchSmtp$data = _useFetchSmtp.data,
|
|
126
|
-
data = _useFetchSmtp$data === void 0 ? {} : _useFetchSmtp$data;
|
|
127
|
-
var _useDestroySmtp = useDestroySmtp({
|
|
128
|
-
ownerId: ownerId
|
|
129
|
-
}),
|
|
130
|
-
isDestroying = _useDestroySmtp.isPending,
|
|
131
|
-
onDisconnect = _useDestroySmtp.mutate;
|
|
132
|
-
return {
|
|
133
|
-
data: data,
|
|
134
|
-
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
135
|
-
isLoading: isLoading,
|
|
136
|
-
isDestroying: isDestroying,
|
|
137
|
-
onDisconnect: onDisconnect,
|
|
138
|
-
exists: data === null || data === void 0 ? void 0 : data.exists
|
|
139
|
-
};
|
|
140
|
-
};
|
|
12
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
13
|
+
import 'react';
|
|
14
|
+
import '@tanstack/react-query';
|
|
15
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
16
|
+
import '../useSparkpostApi-CQT4JD8-.js';
|
|
17
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
18
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
19
|
+
import 'axios';
|
|
141
20
|
|
|
142
21
|
var STATUS_TAG_CONFIG = {
|
|
143
22
|
connected: {
|
|
144
23
|
labelKey: "neetoEmailDelivery.sparkpost.emailDelivery.connected",
|
|
145
|
-
|
|
24
|
+
variant: "green",
|
|
146
25
|
icon: Check
|
|
147
26
|
},
|
|
148
27
|
pending: {
|
|
149
28
|
labelKey: "neetoEmailDelivery.integrationDetail.pending",
|
|
150
|
-
|
|
29
|
+
variant: "amber",
|
|
151
30
|
icon: Warning
|
|
152
31
|
},
|
|
153
32
|
error: {
|
|
154
33
|
labelKey: "neetoEmailDelivery.integrationDetail.error",
|
|
155
|
-
|
|
34
|
+
variant: "red",
|
|
156
35
|
icon: Warning
|
|
157
36
|
}
|
|
158
37
|
};
|
|
@@ -168,33 +47,33 @@ var IntegrationCard = function IntegrationCard(_ref) {
|
|
|
168
47
|
t = _useTranslation.t;
|
|
169
48
|
var tagConfig = STATUS_TAG_CONFIG[status];
|
|
170
49
|
return /*#__PURE__*/jsxs(Link, {
|
|
171
|
-
className: "
|
|
50
|
+
className: "border-border flex cursor-pointer flex-col gap-y-4 rounded-lg border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out",
|
|
172
51
|
"data-testid": dataTestId,
|
|
173
52
|
to: path,
|
|
174
53
|
children: [/*#__PURE__*/jsxs("div", {
|
|
175
54
|
children: [/*#__PURE__*/jsxs("div", {
|
|
176
55
|
className: "mb-2.5 flex items-center gap-3",
|
|
177
56
|
children: [Icon && /*#__PURE__*/jsx(Icon, {
|
|
178
|
-
className: "
|
|
57
|
+
className: "text-muted-foreground",
|
|
179
58
|
size: 24
|
|
180
59
|
}), /*#__PURE__*/jsx(Typography, {
|
|
181
|
-
className: "
|
|
182
|
-
|
|
60
|
+
className: "text-foreground text-lg leading-6",
|
|
61
|
+
variant: "h3",
|
|
183
62
|
weight: "semibold",
|
|
184
63
|
children: title
|
|
185
64
|
})]
|
|
186
65
|
}), /*#__PURE__*/jsx(Typography, {
|
|
187
|
-
className: "
|
|
188
|
-
|
|
66
|
+
className: "text-muted-foreground",
|
|
67
|
+
variant: "body2",
|
|
189
68
|
children: description
|
|
190
69
|
})]
|
|
191
70
|
}), tagConfig && /*#__PURE__*/jsx("div", {
|
|
192
|
-
className: "
|
|
193
|
-
children: /*#__PURE__*/jsx(
|
|
194
|
-
className: "flex-row-reverse",
|
|
71
|
+
className: "border-border border-t pt-3",
|
|
72
|
+
children: /*#__PURE__*/jsx(Badge, {
|
|
195
73
|
icon: tagConfig.icon,
|
|
74
|
+
iconPosition: "right",
|
|
196
75
|
label: t(tagConfig.labelKey),
|
|
197
|
-
|
|
76
|
+
variant: tagConfig.variant
|
|
198
77
|
})
|
|
199
78
|
})]
|
|
200
79
|
});
|
|
@@ -316,5 +195,5 @@ var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
|
316
195
|
});
|
|
317
196
|
};
|
|
318
197
|
|
|
319
|
-
export { EmailDeliveryScreen as
|
|
320
|
-
//# sourceMappingURL=
|
|
198
|
+
export { EmailDeliveryScreen as default };
|
|
199
|
+
//# sourceMappingURL=EmailDeliveryScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailDeliveryScreen.js","sources":["../../app/javascript/src/v2/components/EmailDeliveryScreen/constants.js","../../app/javascript/src/v2/components/EmailDeliveryScreen/IntegrationCard.jsx","../../app/javascript/src/v2/components/EmailDeliveryScreen/index.jsx"],"sourcesContent":["import { Check, Warning } from \"neetoicons\";\n\nexport const STATUS_TAG_CONFIG = {\n connected: {\n labelKey: \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n variant: \"green\",\n icon: Check,\n },\n pending: {\n labelKey: \"neetoEmailDelivery.integrationDetail.pending\",\n variant: \"amber\",\n icon: Warning,\n },\n error: {\n labelKey: \"neetoEmailDelivery.integrationDetail.error\",\n variant: \"red\",\n icon: Warning,\n },\n};\n","import { Badge, Typography } from \"@bigbinary/neeto-atoms\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { STATUS_TAG_CONFIG } from \"./constants\";\n\nconst IntegrationCard = ({\n icon: Icon,\n title,\n description,\n status,\n path,\n \"data-testid\": dataTestId,\n}) => {\n const { t } = useTranslation();\n\n const tagConfig = STATUS_TAG_CONFIG[status];\n\n return (\n <Link\n className=\"border-border flex cursor-pointer flex-col gap-y-4 rounded-lg border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\"\n data-testid={dataTestId}\n to={path}\n >\n <div>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && <Icon className=\"text-muted-foreground\" size={24} />}\n <Typography\n className=\"text-foreground text-lg leading-6\"\n variant=\"h3\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n </div>\n <Typography className=\"text-muted-foreground\" variant=\"body2\">\n {description}\n </Typography>\n </div>\n {tagConfig && (\n <div className=\"border-border border-t pt-3\">\n <Badge\n icon={tagConfig.icon}\n iconPosition=\"right\"\n label={t(tagConfig.labelKey)}\n variant={tagConfig.variant}\n />\n </div>\n )}\n </Link>\n );\n};\n\nexport default IntegrationCard;\n","import { Spinner } from \"@bigbinary/neeto-atoms\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { useTranslation } from \"react-i18next\";\n\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"v2/hooks/integrations/useSparkpostDomain\";\n\nimport IntegrationCard from \"./IntegrationCard\";\n\nconst EmailDeliveryScreen = ({\n indexRoute,\n ownerId,\n canManageIntegrations,\n gmailRoute,\n outlookRoute,\n customEmailProviderRoute,\n smtpRoute,\n}) => {\n const { t } = useTranslation();\n\n const gmailIntegration = useGmail({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const outlookIntegration = useOutlook({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const sparkpostIntegration = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const smtpIntegration = useSmtp({ ownerId, canManageIntegrations });\n\n const {\n isConnected: isGmailConnected,\n isLoading: isGmailLoading,\n errorMessage: gmailError,\n } = gmailIntegration;\n\n const {\n isConnected: isOutlookConnected,\n isLoading: isOutlookLoading,\n isWaitingForTestEmail: isOutlookPending,\n errorMessage: outlookError,\n } = outlookIntegration;\n\n const {\n isConnected: isSparkpostConnected,\n isLoading: isSparkpostLoading,\n exists: sparkpostExists,\n } = sparkpostIntegration;\n\n const { isConnected: isSmtpConnected, isLoading: isSmtpLoading } =\n smtpIntegration;\n\n const getCardStatus = ({ isConnected, isPending, hasError }) => {\n if (isConnected) return \"connected\";\n\n if (hasError) return \"error\";\n\n if (isPending) return \"pending\";\n\n return null;\n };\n\n const isLoading =\n isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;\n\n const gmailTitle = t(\"neetoEmailDelivery.gmail.title\");\n const gmailDescription = t(\"neetoEmailDelivery.gmail.description\");\n\n const outlookTitle = t(\"neetoEmailDelivery.outlook.title\");\n const outlookDescription = t(\"neetoEmailDelivery.outlook.description\");\n\n const ownDomainTitle = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle\"\n );\n\n const ownDomainDescription = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription\"\n );\n\n const smtpTitle = t(\"neetoEmailDelivery.smtp.title\");\n const smtpDescription = t(\"neetoEmailDelivery.smtp.description\");\n\n if (isLoading) {\n return (\n <div className=\"flex grow items-center justify-center w-full\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-0 w-full grow\">\n <div className=\"@container mx-auto space-y-6\">\n <div className=\"grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4\">\n <IntegrationCard\n data-testid=\"gmail-integration-card\"\n description={gmailDescription}\n icon={GmailIcon}\n path={gmailRoute}\n title={gmailTitle}\n status={getCardStatus({\n isConnected: isGmailConnected,\n hasError: !!gmailError,\n })}\n />\n <IntegrationCard\n data-testid=\"outlook-integration-card\"\n description={outlookDescription}\n icon={OutlookIcon}\n path={outlookRoute}\n title={outlookTitle}\n status={getCardStatus({\n isConnected: isOutlookConnected,\n isPending: isOutlookPending,\n hasError: !!outlookError,\n })}\n />\n <IntegrationCard\n data-testid=\"custom-email-provider-integration-card\"\n description={ownDomainDescription}\n icon={MailSend}\n path={customEmailProviderRoute}\n title={ownDomainTitle}\n status={getCardStatus({\n isConnected: isSparkpostConnected,\n isPending: sparkpostExists && !isSparkpostConnected,\n })}\n />\n <IntegrationCard\n data-testid=\"smtp-integration-card\"\n description={smtpDescription}\n icon={MailSend}\n path={smtpRoute}\n status={getCardStatus({ isConnected: isSmtpConnected })}\n title={smtpTitle}\n />\n </div>\n </div>\n </div>\n );\n};\n\nexport default EmailDeliveryScreen;\n"],"names":["STATUS_TAG_CONFIG","connected","labelKey","variant","icon","Check","pending","Warning","error","IntegrationCard","_ref","Icon","title","description","status","path","dataTestId","_useTranslation","useTranslation","t","tagConfig","_jsxs","Link","className","to","children","_jsx","size","Typography","weight","Badge","iconPosition","label","EmailDeliveryScreen","indexRoute","ownerId","canManageIntegrations","gmailRoute","outlookRoute","customEmailProviderRoute","smtpRoute","gmailIntegration","useGmail","outlookIntegration","useOutlook","sparkpostIntegration","useSparkpostDomain","smtpIntegration","useSmtp","isGmailConnected","isConnected","isGmailLoading","isLoading","gmailError","errorMessage","isOutlookConnected","isOutlookLoading","isOutlookPending","isWaitingForTestEmail","outlookError","isSparkpostConnected","isSparkpostLoading","sparkpostExists","exists","isSmtpConnected","isSmtpLoading","getCardStatus","_ref2","isPending","hasError","gmailTitle","gmailDescription","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","smtpTitle","smtpDescription","Spinner","GmailIcon","OutlookIcon","MailSend"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,iBAAiB,GAAG;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,QAAQ,EAAE,sDAAsD;AAChEC,IAAAA,OAAO,EAAE,OAAO;AAChBC,IAAA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YAAAA,WAAW,EAAEc;AAAgB,WAAC,CAAE;AACxDpD,UAAAA,KAAK,EAAEgE;AAAU,SAClB,CAAC;OACC;KACF;AAAC,GACH,CAAC;AAEV;;;;"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { Spinner, Callout } from '@bigbinary/neeto-atoms';
|
|
2
|
+
import { Form, Input, ActionBlock } from '@bigbinary/neeto-atoms/formik';
|
|
3
|
+
import { buildUrl } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
4
|
+
import CardLayout from '@bigbinary/neeto-molecules/v2/CardLayout';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { useHistory } from 'react-router-dom';
|
|
7
|
+
import { u as useFetchConnectedIntegration } from '../useEmailDeliveryIntegrationApi-CfgmbuRA.js';
|
|
8
|
+
import { P as PageWrapper, a as PageContent, V as VALIDATION_SCHEMA, I as INITIAL_VALUES } from '../PageLayout-B_USy8hj.js';
|
|
9
|
+
import { u as useSparkpostDomain } from '../useSparkpostDomain-DDjj-dyF.js';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
import '@bigbinary/neeto-cist';
|
|
12
|
+
import 'ramda';
|
|
13
|
+
import '../useSparkpostApi-CQT4JD8-.js';
|
|
14
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
15
|
+
import '@tanstack/react-query';
|
|
16
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
|
+
import 'axios';
|
|
18
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
19
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
20
|
+
import 'i18next';
|
|
21
|
+
import 'yup';
|
|
22
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
23
|
+
import 'react';
|
|
24
|
+
import 'classnames';
|
|
25
|
+
import '@bigbinary/neeto-molecules/v2/Container';
|
|
26
|
+
import '@bigbinary/neeto-molecules/v2/Header';
|
|
27
|
+
|
|
28
|
+
var getDomainFromEmail = function getDomainFromEmail(email) {
|
|
29
|
+
return email.trim().split("@")[1];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var SparkpostDomainSetup = function SparkpostDomainSetup(_ref) {
|
|
33
|
+
var ownerId = _ref.ownerId,
|
|
34
|
+
alreadyVerifiedRoute = _ref.alreadyVerifiedRoute,
|
|
35
|
+
verifyRoute = _ref.verifyRoute,
|
|
36
|
+
onCancelRoute = _ref.onCancelRoute,
|
|
37
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
38
|
+
var _useTranslation = useTranslation(),
|
|
39
|
+
t = _useTranslation.t;
|
|
40
|
+
var history = useHistory();
|
|
41
|
+
var _useFetchConnectedInt = useFetchConnectedIntegration(ownerId),
|
|
42
|
+
integration = _useFetchConnectedInt.integration,
|
|
43
|
+
isIntegrationLoading = _useFetchConnectedInt.isLoading;
|
|
44
|
+
var hasConnectedIntegration = integration && !integration.isPending;
|
|
45
|
+
var _useSparkpostDomain = useSparkpostDomain({
|
|
46
|
+
ownerId: ownerId,
|
|
47
|
+
canManageIntegrations: canManageIntegrations
|
|
48
|
+
}),
|
|
49
|
+
onCreateDomain = _useSparkpostDomain.onCreateDomain,
|
|
50
|
+
isCreating = _useSparkpostDomain.isCreating;
|
|
51
|
+
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
52
|
+
var setFieldError = _ref2.setFieldError;
|
|
53
|
+
onCreateDomain(values.email.trim(), values.displayName.trim(), function (response) {
|
|
54
|
+
if (response !== null && response !== void 0 && response.alreadyVerified) {
|
|
55
|
+
// Domain is already verified, go back to email delivery settings
|
|
56
|
+
history.push(alreadyVerifiedRoute);
|
|
57
|
+
} else {
|
|
58
|
+
// Navigate to verification page with domain query parameter
|
|
59
|
+
var domain = getDomainFromEmail(values.email);
|
|
60
|
+
history.push(buildUrl(verifyRoute, {
|
|
61
|
+
domain: domain,
|
|
62
|
+
email: values.email.trim()
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
}, function (error) {
|
|
66
|
+
var _error$response;
|
|
67
|
+
var errorMessage = (error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 || (_error$response = _error$response.data) === null || _error$response === void 0 ? void 0 : _error$response.error) || t("neetoEmailDelivery.sparkpost.setup.validation.setupFailed");
|
|
68
|
+
setFieldError("email", errorMessage);
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
var handleCancel = function handleCancel() {
|
|
72
|
+
history.push(onCancelRoute);
|
|
73
|
+
};
|
|
74
|
+
if (isIntegrationLoading) {
|
|
75
|
+
return /*#__PURE__*/jsx("div", {
|
|
76
|
+
className: "flex justify-center p-6",
|
|
77
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (hasConnectedIntegration) {
|
|
81
|
+
history.replace(onCancelRoute);
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return /*#__PURE__*/jsx(PageWrapper, {
|
|
85
|
+
children: /*#__PURE__*/jsx(PageContent, {
|
|
86
|
+
children: /*#__PURE__*/jsx(Form, {
|
|
87
|
+
className: "w-full",
|
|
88
|
+
formikProps: {
|
|
89
|
+
initialValues: INITIAL_VALUES,
|
|
90
|
+
validationSchema: VALIDATION_SCHEMA,
|
|
91
|
+
onSubmit: handleSubmit
|
|
92
|
+
},
|
|
93
|
+
children: function children(_ref3) {
|
|
94
|
+
var values = _ref3.values;
|
|
95
|
+
var domain = values.email ? getDomainFromEmail(values.email) : t("neetoEmailDelivery.sparkpost.customDomain");
|
|
96
|
+
return /*#__PURE__*/jsx(CardLayout, {
|
|
97
|
+
title: String(t("neetoEmailDelivery.sparkpost.setup.title")),
|
|
98
|
+
actionBlock: /*#__PURE__*/jsx(ActionBlock, {
|
|
99
|
+
cancelButtonProps: {
|
|
100
|
+
onClick: handleCancel
|
|
101
|
+
},
|
|
102
|
+
isSubmitting: isCreating,
|
|
103
|
+
submitButtonProps: {
|
|
104
|
+
label: t("neetoEmailDelivery.sparkpost.setup.setupEmail")
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
description: String(t("neetoEmailDelivery.sparkpost.setup.description")),
|
|
108
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
109
|
+
className: "flex flex-col gap-6",
|
|
110
|
+
children: [/*#__PURE__*/jsx(Callout, {
|
|
111
|
+
variant: "warning",
|
|
112
|
+
children: t("neetoEmailDelivery.sparkpost.setup.note")
|
|
113
|
+
}), /*#__PURE__*/jsx(Input, {
|
|
114
|
+
required: true,
|
|
115
|
+
unlimitedChars: true,
|
|
116
|
+
label: t("neetoEmailDelivery.sparkpost.setup.emailLabel"),
|
|
117
|
+
name: "email",
|
|
118
|
+
type: "email",
|
|
119
|
+
helpText: t("neetoEmailDelivery.sparkpost.setup.emailHelp", {
|
|
120
|
+
domain: domain
|
|
121
|
+
}),
|
|
122
|
+
placeholder: t("neetoEmailDelivery.sparkpost.setup.emailPlaceholder")
|
|
123
|
+
}), /*#__PURE__*/jsx(Input, {
|
|
124
|
+
required: true,
|
|
125
|
+
name: "displayName",
|
|
126
|
+
helpText: t("neetoEmailDelivery.sparkpost.setup.displayNameHelp"),
|
|
127
|
+
label: t("neetoEmailDelivery.sparkpost.setup.displayNameLabel")
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { SparkpostDomainSetup as default };
|
|
138
|
+
//# sourceMappingURL=SparkpostDomainSetup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SparkpostDomainSetup.js","sources":["../../app/javascript/src/v2/components/SparkpostDomain/utils.js","../../app/javascript/src/v2/components/SparkpostDomain/Setup.jsx"],"sourcesContent":["const getDomainFromEmail = email => email.trim().split(\"@\")[1];\n\nexport { getDomainFromEmail };\n","import { Callout, Spinner } from \"@bigbinary/neeto-atoms\";\nimport { Input, ActionBlock, Form } from \"@bigbinary/neeto-atoms/formik\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchConnectedIntegration } from \"hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi\";\nimport { PageContent, PageWrapper } from \"v2/components/PageLayout\";\nimport useSparkpostDomain from \"v2/hooks/integrations/useSparkpostDomain\";\n\nimport { VALIDATION_SCHEMA, INITIAL_VALUES } from \"./constants\";\nimport { getDomainFromEmail } from \"./utils\";\n\nconst SparkpostDomainSetup = ({\n ownerId,\n alreadyVerifiedRoute,\n verifyRoute,\n onCancelRoute,\n canManageIntegrations,\n}) => {\n const { t } = useTranslation();\n\n const history = useHistory();\n\n const { integration, isLoading: isIntegrationLoading } =\n useFetchConnectedIntegration(ownerId);\n\n const hasConnectedIntegration = integration && !integration.isPending;\n\n const { onCreateDomain, isCreating } = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const handleSubmit = (values, { setFieldError }) => {\n onCreateDomain(\n values.email.trim(),\n values.displayName.trim(),\n response => {\n if (response?.alreadyVerified) {\n // Domain is already verified, go back to email delivery settings\n history.push(alreadyVerifiedRoute);\n } else {\n // Navigate to verification page with domain query parameter\n const domain = getDomainFromEmail(values.email);\n history.push(\n buildUrl(verifyRoute, { domain, email: values.email.trim() })\n );\n }\n },\n error => {\n const errorMessage =\n error?.response?.data?.error ||\n t(\"neetoEmailDelivery.sparkpost.setup.validation.setupFailed\");\n setFieldError(\"email\", errorMessage);\n }\n );\n };\n\n const handleCancel = () => {\n history.push(onCancelRoute);\n };\n\n if (isIntegrationLoading) {\n return (\n <div className=\"flex justify-center p-6\">\n <Spinner />\n </div>\n );\n }\n\n if (hasConnectedIntegration) {\n history.replace(onCancelRoute);\n\n return null;\n }\n\n return (\n <PageWrapper>\n <PageContent>\n <Form\n className=\"w-full\"\n formikProps={{\n initialValues: INITIAL_VALUES,\n validationSchema: VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n {({ values }) => {\n const domain = values.email\n ? getDomainFromEmail(values.email)\n : t(\"neetoEmailDelivery.sparkpost.customDomain\");\n\n return (\n <CardLayout\n title={String(t(\"neetoEmailDelivery.sparkpost.setup.title\"))}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: handleCancel }}\n isSubmitting={isCreating}\n submitButtonProps={{\n label: t(\"neetoEmailDelivery.sparkpost.setup.setupEmail\"),\n }}\n />\n }\n description={String(\n t(\"neetoEmailDelivery.sparkpost.setup.description\")\n )}\n >\n <div className=\"flex flex-col gap-6\">\n <Callout variant=\"warning\">\n {t(\"neetoEmailDelivery.sparkpost.setup.note\")}\n </Callout>\n <Input\n required\n unlimitedChars\n label={t(\"neetoEmailDelivery.sparkpost.setup.emailLabel\")}\n name=\"email\"\n type=\"email\"\n helpText={t(\n \"neetoEmailDelivery.sparkpost.setup.emailHelp\",\n { domain }\n )}\n placeholder={t(\n \"neetoEmailDelivery.sparkpost.setup.emailPlaceholder\"\n )}\n />\n <Input\n required\n name=\"displayName\"\n helpText={t(\n \"neetoEmailDelivery.sparkpost.setup.displayNameHelp\"\n )}\n label={t(\n \"neetoEmailDelivery.sparkpost.setup.displayNameLabel\"\n )}\n />\n </div>\n </CardLayout>\n );\n }}\n </Form>\n </PageContent>\n </PageWrapper>\n );\n};\n\nexport default SparkpostDomainSetup;\n"],"names":["getDomainFromEmail","email","trim","split","SparkpostDomainSetup","_ref","ownerId","alreadyVerifiedRoute","verifyRoute","onCancelRoute","canManageIntegrations","_useTranslation","useTranslation","t","history","useHistory","_useFetchConnectedInt","useFetchConnectedIntegration","integration","isIntegrationLoading","isLoading","hasConnectedIntegration","isPending","_useSparkpostDomain","useSparkpostDomain","onCreateDomain","isCreating","handleSubmit","values","_ref2","setFieldError","displayName","response","alreadyVerified","push","domain","buildUrl","error","_error$response","errorMessage","data","handleCancel","_jsx","className","children","Spinner","replace","PageWrapper","PageContent","Form","formikProps","initialValues","INITIAL_VALUES","validationSchema","VALIDATION_SCHEMA","onSubmit","_ref3","CardLayout","title","String","actionBlock","ActionBlock","cancelButtonProps","onClick","isSubmitting","submitButtonProps","label","description","_jsxs","Callout","variant","Input","required","unlimitedChars","name","type","helpText","placeholder"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAGC,KAAK,EAAA;AAAA,EAAA,OAAIA,KAAK,CAACC,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAAA,CAAA;;ACc9D,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAMpB;AAAA,EAAA,IALJC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IACpBC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,qBAAqB,GAAAL,IAAA,CAArBK,qBAAqB;AAErB,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AAET,EAAA,IAAMC,OAAO,GAAGC,UAAU,EAAE;AAE5B,EAAA,IAAAC,qBAAA,GACEC,4BAA4B,CAACX,OAAO,CAAC;IAD/BY,WAAW,GAAAF,qBAAA,CAAXE,WAAW;IAAaC,oBAAoB,GAAAH,qBAAA,CAA/BI,SAAS;AAG9B,EAAA,IAAMC,uBAAuB,GAAGH,WAAW,IAAI,CAACA,WAAW,CAACI,SAAS;EAErE,IAAAC,mBAAA,GAAuCC,kBAAkB,CAAC;AACxDlB,MAAAA,OAAO,EAAPA,OAAO;AACPI,MAAAA,qBAAqB,EAArBA;AACF,KAAC,CAAC;IAHMe,cAAc,GAAAF,mBAAA,CAAdE,cAAc;IAAEC,UAAU,GAAAH,mBAA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EAAE;gBACjBC,KAAK,EAAErD,CAAC,CAAC,+CAA+C;AAC1D;AAAE,aACH,CACF;AACDsD,YAAAA,WAAW,EAAER,MAAM,CACjB9C,CAAC,CAAC,gDAAgD,CACpD,CAAE;AAAA+B,YAAAA,QAAA,eAEFwB,IAAA,CAAA,KAAA,EAAA;AAAKzB,cAAAA,SAAS,EAAC,qBAAqB;cAAAC,QAAA,EAAA,cAClCF,GAAA,CAAC2B,OAAO,EAAA;AAACC,gBAAAA,OAAO,EAAC,SAAS;gBAAA1B,QAAA,EACvB/B,CAAC,CAAC,yCAAyC;AAAC,eACtC,CAAC,eACV6B,GAAA,CAAC6B,KAAK,EAAA;gBACJC,QAAQ,EAAA,IAAA;gBACRC,cAAc,EAAA,IAAA;AACdP,gBAAAA,KAAK,EAAErD,CAAC,CAAC,+CAA+C,CAAE;AAC1D6D,gBAAAA,IAAI,EAAC,OAAO;AACZC,gBAAAA,IAAI,EAAC,OAAO;AACZC,gBAAAA,QAAQ,EAAE/D,CAAC,CACT,8CAA8C,EAC9C;AAAEsB,kBAAAA,MAAM,EAANA;AAAO,iBACX,CAAE;gBACF0C,WAAW,EAAEhE,CAAC,CACZ,qDACF;AAAE,eACH,CAAC,eACF6B,GAAA,CAAC6B,KAAK,EAAA;gBACJC,QAAQ,EAAA,IAAA;AACRE,gBAAAA,IAAI,EAAC,aAAa;AAClBE,gBAAAA,QAAQ,EAAE/D,CAAC,CACT,oDACF,CAAE;gBACFqD,KAAK,EAAErD,CAAC,CACN,qDACF;AAAE,eACH,CAAC;aACC;AAAC,WACI,CAAC;AAEjB,QAAA;OACI;KACK;AAAC,GACH,CAAC;AAElB;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@bigbinary/neeto-atoms';
|
|
4
|
+
import '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
5
|
+
import '@bigbinary/neeto-molecules/v2/CardLayout';
|
|
6
|
+
import 'ramda';
|
|
7
|
+
import 'react-i18next';
|
|
8
|
+
import 'react-router-dom';
|
|
9
|
+
import '../useEmailDeliveryIntegrationApi-CfgmbuRA.js';
|
|
10
|
+
import '../useSparkpostApi-CQT4JD8-.js';
|
|
11
|
+
import '../PageLayout-B_USy8hj.js';
|
|
12
|
+
import '../useSparkpostDomain-DDjj-dyF.js';
|
|
13
|
+
export { S as default } from '../Verify-Dnvx5OTi.js';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
15
|
+
import '@bigbinary/neeto-cist';
|
|
16
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
17
|
+
import '@tanstack/react-query';
|
|
18
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
19
|
+
import 'axios';
|
|
20
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
21
|
+
import 'i18next';
|
|
22
|
+
import 'yup';
|
|
23
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
24
|
+
import 'classnames';
|
|
25
|
+
import '@bigbinary/neeto-molecules/v2/Container';
|
|
26
|
+
import '@bigbinary/neeto-molecules/v2/Header';
|
|
27
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
28
|
+
import '@bigbinary/neeto-molecules/v2/CopyToClipboardButton';
|
|
29
|
+
//# sourceMappingURL=SparkpostDomainVerify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SparkpostDomainVerify.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/v2/hooks.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { u as useFetchConnectedIntegration } from '../useEmailDeliveryIntegrationApi-CfgmbuRA.js';
|
|
2
|
+
import '@bigbinary/neeto-cist';
|
|
3
|
+
import 'ramda';
|
|
4
|
+
import '../useSparkpostApi-CQT4JD8-.js';
|
|
5
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import '@tanstack/react-query';
|
|
7
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
|
+
import 'axios';
|
|
9
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
10
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
11
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|