@bigbinary/neeto-email-delivery-frontend 1.0.25 → 1.0.27
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/app/javascript/src/translations/en.json +16 -0
- package/app/javascript/src/translations/hu.json +113 -0
- package/dist/EmailDeliveryScreen.js +22 -584
- package/dist/EmailDeliveryScreen.js.map +1 -1
- package/dist/SparkpostDomainSetup.js +20 -2
- package/dist/SparkpostDomainSetup.js.map +1 -1
- package/dist/SparkpostDomainVerify.js +13 -3
- package/dist/SparkpostDomainVerify.js.map +1 -1
- package/dist/cjs/EmailDeliveryScreen.js +23 -600
- package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
- package/dist/cjs/SparkpostDomainSetup.js +20 -2
- package/dist/cjs/SparkpostDomainSetup.js.map +1 -1
- package/dist/cjs/SparkpostDomainVerify.js +13 -3
- package/dist/cjs/SparkpostDomainVerify.js.map +1 -1
- package/dist/cjs/hooks.js +6 -46
- package/dist/cjs/hooks.js.map +1 -1
- package/dist/cjs/index.js +424 -29
- package/dist/cjs/index.js.map +1 -1
- package/dist/hooks.js +4 -48
- package/dist/hooks.js.map +1 -1
- package/dist/index-BKKcEEt1.js +337 -0
- package/dist/index-BKKcEEt1.js.map +1 -0
- package/dist/index-C7KroEtv.js +342 -0
- package/dist/index-C7KroEtv.js.map +1 -0
- package/dist/index.js +408 -28
- package/dist/index.js.map +1 -1
- package/dist/useEmailDeliveryIntegrationApi-BD6h2h5w.js +57 -0
- package/dist/useEmailDeliveryIntegrationApi-BD6h2h5w.js.map +1 -0
- package/dist/useEmailDeliveryIntegrationApi-NUL8d1xC.js +55 -0
- package/dist/useEmailDeliveryIntegrationApi-NUL8d1xC.js.map +1 -0
- package/dist/useSparkpostApi-C7cHCa3T.js +253 -0
- package/dist/useSparkpostApi-C7cHCa3T.js.map +1 -0
- package/dist/{useOutlookIntegrationApi-b_mNVfRE.js → useSparkpostApi-tYImubXZ.js} +150 -53
- package/dist/useSparkpostApi-tYImubXZ.js.map +1 -0
- package/dist/{useSparkpostDomain-DtEcunpG.js → useSparkpostDomain-BiZb7l8r.js} +2 -2
- package/dist/{useSparkpostDomain-DtEcunpG.js.map → useSparkpostDomain-BiZb7l8r.js.map} +1 -1
- package/dist/{useSparkpostDomain-De-Fz3ek.js → useSparkpostDomain-CmX8ka38.js} +2 -2
- package/dist/{useSparkpostDomain-De-Fz3ek.js.map → useSparkpostDomain-CmX8ka38.js.map} +1 -1
- package/package.json +16 -18
- package/types.d.ts +23 -2
- package/dist/useOutlookIntegrationApi-BC-RPHmJ.js +0 -149
- package/dist/useOutlookIntegrationApi-BC-RPHmJ.js.map +0 -1
- package/dist/useOutlookIntegrationApi-b_mNVfRE.js.map +0 -1
- package/dist/useSparkpostApi-D9NOjTNA.js +0 -120
- package/dist/useSparkpostApi-D9NOjTNA.js.map +0 -1
- package/dist/useSparkpostApi-qpRhsK7H.js +0 -106
- package/dist/useSparkpostApi-qpRhsK7H.js.map +0 -1
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { isPresent, humanize } from '@bigbinary/neeto-cist';
|
|
2
|
+
import { useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
3
|
+
import MailSend from '@bigbinary/neeto-icons/MailSend';
|
|
4
|
+
import GmailIcon from '@bigbinary/neeto-icons/misc/Gmail';
|
|
5
|
+
import OutlookIcon from '@bigbinary/neeto-icons/misc/Outlook';
|
|
6
|
+
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
7
|
+
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { useHistory, Link } from 'react-router-dom';
|
|
10
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
+
import { useState } from 'react';
|
|
12
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
13
|
+
import { showThumbsUpToastr } from '@bigbinary/neeto-commons-frontend/utils';
|
|
14
|
+
import { u as useFetchGmail, h as useDestroyGmail, i as invalidateAllIntegrationQueries, a as useFetchOutlook, j as useDestroyOutlook, c as useFetchSmtp, k as useDestroySmtp } from './useSparkpostApi-tYImubXZ.js';
|
|
15
|
+
import { u as useSparkpostDomain } from './useSparkpostDomain-CmX8ka38.js';
|
|
16
|
+
import { t } from 'i18next';
|
|
17
|
+
import Check from '@bigbinary/neeto-icons/Check';
|
|
18
|
+
import Warning from '@bigbinary/neeto-icons/Warning';
|
|
19
|
+
import Tag from '@bigbinary/neetoui/Tag';
|
|
20
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
21
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
22
|
+
|
|
23
|
+
var useGmail = function useGmail(_ref) {
|
|
24
|
+
var ownerId = _ref.ownerId,
|
|
25
|
+
indexRoute = _ref.indexRoute,
|
|
26
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
isDisconnectAlertOpen = _useState2[0],
|
|
30
|
+
setIsDisconnectAlertOpen = _useState2[1];
|
|
31
|
+
var history = useHistory();
|
|
32
|
+
var queryClient = useQueryClient();
|
|
33
|
+
var _useFetchGmail = useFetchGmail(ownerId, {
|
|
34
|
+
enabled: canManageIntegrations
|
|
35
|
+
}),
|
|
36
|
+
isLoading = _useFetchGmail.isLoading,
|
|
37
|
+
_useFetchGmail$data = _useFetchGmail.data,
|
|
38
|
+
data = _useFetchGmail$data === void 0 ? {} : _useFetchGmail$data;
|
|
39
|
+
var _useDestroyGmail = useDestroyGmail({
|
|
40
|
+
ownerId: ownerId
|
|
41
|
+
}),
|
|
42
|
+
isDestroying = _useDestroyGmail.isPending,
|
|
43
|
+
destroyIntegration = _useDestroyGmail.mutate;
|
|
44
|
+
var onClose = function onClose() {
|
|
45
|
+
return history.replace(indexRoute);
|
|
46
|
+
};
|
|
47
|
+
var onDisconnect = function onDisconnect() {
|
|
48
|
+
destroyIntegration(false, {
|
|
49
|
+
onSuccess: function onSuccess() {
|
|
50
|
+
showThumbsUpToastr();
|
|
51
|
+
setIsDisconnectAlertOpen(false);
|
|
52
|
+
invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
53
|
+
history.replace(indexRoute);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
return {
|
|
58
|
+
data: data,
|
|
59
|
+
isLoading: isLoading,
|
|
60
|
+
isDestroying: isDestroying,
|
|
61
|
+
exists: data === null || data === void 0 ? void 0 : data.exists,
|
|
62
|
+
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
63
|
+
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
64
|
+
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
65
|
+
onDisconnect: onDisconnect,
|
|
66
|
+
onClose: onClose,
|
|
67
|
+
errorMessage: data === null || data === void 0 ? void 0 : data.error
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var useOutlook = function useOutlook(_ref) {
|
|
72
|
+
var ownerId = _ref.ownerId,
|
|
73
|
+
indexRoute = _ref.indexRoute,
|
|
74
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
75
|
+
var _useState = useState(false),
|
|
76
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
77
|
+
isDisconnectAlertOpen = _useState2[0],
|
|
78
|
+
setIsDisconnectAlertOpen = _useState2[1];
|
|
79
|
+
var history = useHistory();
|
|
80
|
+
var queryClient = useQueryClient();
|
|
81
|
+
var _useFetchOutlook = useFetchOutlook(ownerId, {
|
|
82
|
+
enabled: canManageIntegrations
|
|
83
|
+
}),
|
|
84
|
+
isLoading = _useFetchOutlook.isLoading,
|
|
85
|
+
_useFetchOutlook$data = _useFetchOutlook.data,
|
|
86
|
+
data = _useFetchOutlook$data === void 0 ? {} : _useFetchOutlook$data;
|
|
87
|
+
var _useDestroyOutlook = useDestroyOutlook({
|
|
88
|
+
ownerId: ownerId
|
|
89
|
+
}),
|
|
90
|
+
isDestroying = _useDestroyOutlook.isPending,
|
|
91
|
+
destroyIntegration = _useDestroyOutlook.mutate;
|
|
92
|
+
var onClose = function onClose() {
|
|
93
|
+
return history.replace(indexRoute);
|
|
94
|
+
};
|
|
95
|
+
var onDisconnect = function onDisconnect() {
|
|
96
|
+
destroyIntegration(false, {
|
|
97
|
+
onSuccess: function onSuccess() {
|
|
98
|
+
showThumbsUpToastr();
|
|
99
|
+
setIsDisconnectAlertOpen(false);
|
|
100
|
+
invalidateAllIntegrationQueries(queryClient, ownerId);
|
|
101
|
+
history.replace(indexRoute);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
data: data,
|
|
107
|
+
isLoading: isLoading,
|
|
108
|
+
exists: data === null || data === void 0 ? void 0 : data.exists,
|
|
109
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
110
|
+
shadowAccount: data === null || data === void 0 ? void 0 : data.shadowAccount,
|
|
111
|
+
isWaitingForTestEmail: (data === null || data === void 0 ? void 0 : data.status) === "inactive" && !(data !== null && data !== void 0 && data.connected),
|
|
112
|
+
isDestroying: isDestroying,
|
|
113
|
+
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
114
|
+
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
115
|
+
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
116
|
+
onDisconnect: onDisconnect,
|
|
117
|
+
onClose: onClose,
|
|
118
|
+
errorMessage: data === null || data === void 0 ? void 0 : data.error
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var useSmtp = function useSmtp(_ref) {
|
|
123
|
+
var ownerId = _ref.ownerId,
|
|
124
|
+
canManageIntegrations = _ref.canManageIntegrations;
|
|
125
|
+
var _useFetchSmtp = useFetchSmtp(ownerId, {
|
|
126
|
+
enabled: canManageIntegrations
|
|
127
|
+
}),
|
|
128
|
+
isLoading = _useFetchSmtp.isLoading,
|
|
129
|
+
_useFetchSmtp$data = _useFetchSmtp.data,
|
|
130
|
+
data = _useFetchSmtp$data === void 0 ? {} : _useFetchSmtp$data;
|
|
131
|
+
var _useDestroySmtp = useDestroySmtp({
|
|
132
|
+
ownerId: ownerId
|
|
133
|
+
}),
|
|
134
|
+
isDestroying = _useDestroySmtp.isPending,
|
|
135
|
+
onDisconnect = _useDestroySmtp.mutate;
|
|
136
|
+
return {
|
|
137
|
+
data: data,
|
|
138
|
+
isConnected: data === null || data === void 0 ? void 0 : data.connected,
|
|
139
|
+
isLoading: isLoading,
|
|
140
|
+
isDestroying: isDestroying,
|
|
141
|
+
onDisconnect: onDisconnect,
|
|
142
|
+
exists: data === null || data === void 0 ? void 0 : data.exists
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var ERROR_MESSAGES = {
|
|
147
|
+
gmail_permission_not_given: t("neetoEmailDelivery.gmail.permissionNotGiven"),
|
|
148
|
+
outlook_permission_not_given: t("neetoEmailDelivery.outlook.permissionNotGiven"),
|
|
149
|
+
outlook_invalid_client: t("neetoEmailDelivery.outlook.invalidClient"),
|
|
150
|
+
outlook_nil_json_web_token: t("neetoEmailDelivery.outlook.nilJsonWebToken")
|
|
151
|
+
};
|
|
152
|
+
var STATUS_TAG_CONFIG = {
|
|
153
|
+
connected: {
|
|
154
|
+
labelKey: "neetoEmailDelivery.sparkpost.emailDelivery.connected",
|
|
155
|
+
style: "success",
|
|
156
|
+
icon: Check
|
|
157
|
+
},
|
|
158
|
+
pending: {
|
|
159
|
+
labelKey: "neetoEmailDelivery.integrationDetail.pending",
|
|
160
|
+
style: "warning",
|
|
161
|
+
icon: Warning
|
|
162
|
+
},
|
|
163
|
+
error: {
|
|
164
|
+
labelKey: "neetoEmailDelivery.integrationDetail.error",
|
|
165
|
+
style: "danger",
|
|
166
|
+
icon: Warning
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
var IntegrationCard = function IntegrationCard(_ref) {
|
|
171
|
+
var Icon = _ref.icon,
|
|
172
|
+
title = _ref.title,
|
|
173
|
+
description = _ref.description,
|
|
174
|
+
status = _ref.status,
|
|
175
|
+
path = _ref.path;
|
|
176
|
+
var _useTranslation = useTranslation(),
|
|
177
|
+
t = _useTranslation.t;
|
|
178
|
+
var tagConfig = STATUS_TAG_CONFIG[status];
|
|
179
|
+
return /*#__PURE__*/jsxs(Link, {
|
|
180
|
+
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",
|
|
181
|
+
to: path,
|
|
182
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
183
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
184
|
+
className: "mb-2.5 flex items-center gap-3",
|
|
185
|
+
children: [Icon && /*#__PURE__*/jsx(Icon, {
|
|
186
|
+
className: "neeto-ui-text-gray-500",
|
|
187
|
+
size: 24
|
|
188
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
189
|
+
className: "neeto-ui-text-black text-lg leading-6",
|
|
190
|
+
style: "h3",
|
|
191
|
+
weight: "semibold",
|
|
192
|
+
children: title
|
|
193
|
+
})]
|
|
194
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
195
|
+
className: "neeto-ui-text-gray-600",
|
|
196
|
+
style: "body2",
|
|
197
|
+
children: description
|
|
198
|
+
})]
|
|
199
|
+
}), tagConfig && /*#__PURE__*/jsx("div", {
|
|
200
|
+
className: "neeto-ui-border-gray-300 border-t pt-3",
|
|
201
|
+
children: /*#__PURE__*/jsx(Tag, {
|
|
202
|
+
className: "flex-row-reverse",
|
|
203
|
+
icon: tagConfig.icon,
|
|
204
|
+
label: t(tagConfig.labelKey),
|
|
205
|
+
style: tagConfig.style
|
|
206
|
+
})
|
|
207
|
+
})]
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
var EmailDeliveryScreen = function EmailDeliveryScreen(_ref) {
|
|
212
|
+
var indexRoute = _ref.indexRoute,
|
|
213
|
+
ownerId = _ref.ownerId,
|
|
214
|
+
canManageIntegrations = _ref.canManageIntegrations,
|
|
215
|
+
gmailRoute = _ref.gmailRoute,
|
|
216
|
+
outlookRoute = _ref.outlookRoute,
|
|
217
|
+
customEmailProviderRoute = _ref.customEmailProviderRoute,
|
|
218
|
+
smtpRoute = _ref.smtpRoute;
|
|
219
|
+
var _useTranslation = useTranslation(),
|
|
220
|
+
t = _useTranslation.t;
|
|
221
|
+
var history = useHistory();
|
|
222
|
+
var _useQueryParams = useQueryParams(),
|
|
223
|
+
error = _useQueryParams.error,
|
|
224
|
+
errorDescription = _useQueryParams.errorDescription;
|
|
225
|
+
if (isPresent(error)) {
|
|
226
|
+
var _errorMessage;
|
|
227
|
+
var errorMessage = ERROR_MESSAGES[error];
|
|
228
|
+
if (errorDescription) {
|
|
229
|
+
errorMessage = "".concat(errorMessage, " ").concat(errorDescription);
|
|
230
|
+
}
|
|
231
|
+
Toastr.error((_errorMessage = errorMessage) !== null && _errorMessage !== void 0 ? _errorMessage : humanize(error));
|
|
232
|
+
history.replace(indexRoute);
|
|
233
|
+
}
|
|
234
|
+
var gmailIntegration = useGmail({
|
|
235
|
+
ownerId: ownerId,
|
|
236
|
+
indexRoute: indexRoute,
|
|
237
|
+
canManageIntegrations: canManageIntegrations
|
|
238
|
+
});
|
|
239
|
+
var outlookIntegration = useOutlook({
|
|
240
|
+
ownerId: ownerId,
|
|
241
|
+
indexRoute: indexRoute,
|
|
242
|
+
canManageIntegrations: canManageIntegrations
|
|
243
|
+
});
|
|
244
|
+
var sparkpostIntegration = useSparkpostDomain({
|
|
245
|
+
ownerId: ownerId,
|
|
246
|
+
canManageIntegrations: canManageIntegrations
|
|
247
|
+
});
|
|
248
|
+
var smtpIntegration = useSmtp({
|
|
249
|
+
ownerId: ownerId,
|
|
250
|
+
canManageIntegrations: canManageIntegrations
|
|
251
|
+
});
|
|
252
|
+
var isGmailConnected = gmailIntegration.isConnected,
|
|
253
|
+
isGmailLoading = gmailIntegration.isLoading,
|
|
254
|
+
gmailError = gmailIntegration.errorMessage;
|
|
255
|
+
var isOutlookConnected = outlookIntegration.isConnected,
|
|
256
|
+
isOutlookLoading = outlookIntegration.isLoading,
|
|
257
|
+
isOutlookPending = outlookIntegration.isWaitingForTestEmail,
|
|
258
|
+
outlookError = outlookIntegration.errorMessage;
|
|
259
|
+
var isSparkpostConnected = sparkpostIntegration.isConnected,
|
|
260
|
+
isSparkpostLoading = sparkpostIntegration.isLoading,
|
|
261
|
+
sparkpostExists = sparkpostIntegration.exists;
|
|
262
|
+
var isSmtpConnected = smtpIntegration.isConnected,
|
|
263
|
+
isSmtpLoading = smtpIntegration.isLoading;
|
|
264
|
+
var getCardStatus = function getCardStatus(_ref2) {
|
|
265
|
+
var isConnected = _ref2.isConnected,
|
|
266
|
+
isPending = _ref2.isPending,
|
|
267
|
+
hasError = _ref2.hasError;
|
|
268
|
+
if (isConnected) return "connected";
|
|
269
|
+
if (hasError) return "error";
|
|
270
|
+
if (isPending) return "pending";
|
|
271
|
+
return null;
|
|
272
|
+
};
|
|
273
|
+
var isLoading = isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;
|
|
274
|
+
var gmailTitle = t("neetoEmailDelivery.gmail.title");
|
|
275
|
+
var gmailDescription = t("neetoEmailDelivery.gmail.description");
|
|
276
|
+
var outlookTitle = t("neetoEmailDelivery.outlook.title");
|
|
277
|
+
var outlookDescription = t("neetoEmailDelivery.outlook.description");
|
|
278
|
+
var ownDomainTitle = t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle");
|
|
279
|
+
var ownDomainDescription = t("neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription");
|
|
280
|
+
var smtpTitle = t("neetoEmailDelivery.smtp.title");
|
|
281
|
+
var smtpDescription = t("neetoEmailDelivery.smtp.description");
|
|
282
|
+
if (isLoading) {
|
|
283
|
+
return /*#__PURE__*/jsx("div", {
|
|
284
|
+
className: "flex grow items-center justify-center w-full",
|
|
285
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
return /*#__PURE__*/jsx("div", {
|
|
289
|
+
className: "min-h-0 w-full grow",
|
|
290
|
+
children: /*#__PURE__*/jsx("div", {
|
|
291
|
+
className: "@container mx-auto space-y-6",
|
|
292
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
293
|
+
className: "grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4",
|
|
294
|
+
children: [/*#__PURE__*/jsx(IntegrationCard, {
|
|
295
|
+
description: gmailDescription,
|
|
296
|
+
icon: GmailIcon,
|
|
297
|
+
path: gmailRoute,
|
|
298
|
+
title: gmailTitle,
|
|
299
|
+
status: getCardStatus({
|
|
300
|
+
isConnected: isGmailConnected,
|
|
301
|
+
hasError: !!gmailError
|
|
302
|
+
})
|
|
303
|
+
}), /*#__PURE__*/jsx(IntegrationCard, {
|
|
304
|
+
description: outlookDescription,
|
|
305
|
+
icon: OutlookIcon,
|
|
306
|
+
path: outlookRoute,
|
|
307
|
+
title: outlookTitle,
|
|
308
|
+
status: getCardStatus({
|
|
309
|
+
isConnected: isOutlookConnected,
|
|
310
|
+
isPending: isOutlookPending,
|
|
311
|
+
hasError: !!outlookError
|
|
312
|
+
})
|
|
313
|
+
}), /*#__PURE__*/jsx(IntegrationCard, {
|
|
314
|
+
description: ownDomainDescription,
|
|
315
|
+
icon: MailSend,
|
|
316
|
+
path: customEmailProviderRoute,
|
|
317
|
+
title: ownDomainTitle,
|
|
318
|
+
status: getCardStatus({
|
|
319
|
+
isConnected: isSparkpostConnected,
|
|
320
|
+
isPending: sparkpostExists && !isSparkpostConnected
|
|
321
|
+
})
|
|
322
|
+
}), /*#__PURE__*/jsx(IntegrationCard, {
|
|
323
|
+
description: smtpDescription,
|
|
324
|
+
icon: MailSend,
|
|
325
|
+
path: smtpRoute,
|
|
326
|
+
status: getCardStatus({
|
|
327
|
+
isConnected: isSmtpConnected
|
|
328
|
+
}),
|
|
329
|
+
title: smtpTitle
|
|
330
|
+
})]
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
export { EmailDeliveryScreen as E, useOutlook as a, useSmtp as b, useGmail as u };
|
|
337
|
+
//# sourceMappingURL=index-BKKcEEt1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","ownDomainD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