@strapi/email 0.0.0-experimental.a65a85fdea97faae8679d3ffc5f9d79af61abd26 → 0.0.0
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 +1 -3
- package/package.json +3 -80
- package/dist/_chunks/Settings-BDuq6QQN.mjs +0 -279
- package/dist/_chunks/Settings-BDuq6QQN.mjs.map +0 -1
- package/dist/_chunks/Settings-Bt_OomWk.js +0 -300
- package/dist/_chunks/Settings-Bt_OomWk.js.map +0 -1
- package/dist/_chunks/ar-Bf9XlLLo.mjs +0 -5
- package/dist/_chunks/ar-Bf9XlLLo.mjs.map +0 -1
- package/dist/_chunks/ar-C_tQu1XS.js +0 -5
- package/dist/_chunks/ar-C_tQu1XS.js.map +0 -1
- package/dist/_chunks/cs-B0QZJTah.mjs +0 -5
- package/dist/_chunks/cs-B0QZJTah.mjs.map +0 -1
- package/dist/_chunks/cs-CPKIUWLp.js +0 -5
- package/dist/_chunks/cs-CPKIUWLp.js.map +0 -1
- package/dist/_chunks/de-B9kiAC-s.mjs +0 -5
- package/dist/_chunks/de-B9kiAC-s.mjs.map +0 -1
- package/dist/_chunks/de-K6IYQk2d.js +0 -5
- package/dist/_chunks/de-K6IYQk2d.js.map +0 -1
- package/dist/_chunks/dk-31mOPYpI.js +0 -26
- package/dist/_chunks/dk-31mOPYpI.js.map +0 -1
- package/dist/_chunks/dk-DqrbgSkv.mjs +0 -26
- package/dist/_chunks/dk-DqrbgSkv.mjs.map +0 -1
- package/dist/_chunks/en-BCu4d6-o.js +0 -29
- package/dist/_chunks/en-BCu4d6-o.js.map +0 -1
- package/dist/_chunks/en-DF4KtAAC.mjs +0 -29
- package/dist/_chunks/en-DF4KtAAC.mjs.map +0 -1
- package/dist/_chunks/es-BNo7eLLJ.mjs +0 -26
- package/dist/_chunks/es-BNo7eLLJ.mjs.map +0 -1
- package/dist/_chunks/es-Dl2HVmwz.js +0 -26
- package/dist/_chunks/es-Dl2HVmwz.js.map +0 -1
- package/dist/_chunks/fr-C8Qw4iPZ.js +0 -5
- package/dist/_chunks/fr-C8Qw4iPZ.js.map +0 -1
- package/dist/_chunks/fr-hkSxFuzl.mjs +0 -5
- package/dist/_chunks/fr-hkSxFuzl.mjs.map +0 -1
- package/dist/_chunks/id-CHtAzAUz.mjs +0 -5
- package/dist/_chunks/id-CHtAzAUz.mjs.map +0 -1
- package/dist/_chunks/id-CvE5f0zz.js +0 -5
- package/dist/_chunks/id-CvE5f0zz.js.map +0 -1
- package/dist/_chunks/index-DMIgejZc.js +0 -80
- package/dist/_chunks/index-DMIgejZc.js.map +0 -1
- package/dist/_chunks/index-N4Dmk_PI.mjs +0 -81
- package/dist/_chunks/index-N4Dmk_PI.mjs.map +0 -1
- package/dist/_chunks/it-C7z82V3g.mjs +0 -5
- package/dist/_chunks/it-C7z82V3g.mjs.map +0 -1
- package/dist/_chunks/it-DYpuAHa5.js +0 -5
- package/dist/_chunks/it-DYpuAHa5.js.map +0 -1
- package/dist/_chunks/ja-CiekkoEN.mjs +0 -26
- package/dist/_chunks/ja-CiekkoEN.mjs.map +0 -1
- package/dist/_chunks/ja-PL3WilO7.js +0 -26
- package/dist/_chunks/ja-PL3WilO7.js.map +0 -1
- package/dist/_chunks/ko-CJBkZ375.mjs +0 -26
- package/dist/_chunks/ko-CJBkZ375.mjs.map +0 -1
- package/dist/_chunks/ko-CL2BB_w_.js +0 -26
- package/dist/_chunks/ko-CL2BB_w_.js.map +0 -1
- package/dist/_chunks/ms-BGlHkuJz.js +0 -5
- package/dist/_chunks/ms-BGlHkuJz.js.map +0 -1
- package/dist/_chunks/ms-C1wNkEQw.mjs +0 -5
- package/dist/_chunks/ms-C1wNkEQw.mjs.map +0 -1
- package/dist/_chunks/nl-BuofSsmb.js +0 -5
- package/dist/_chunks/nl-BuofSsmb.js.map +0 -1
- package/dist/_chunks/nl-C79CwB4e.mjs +0 -5
- package/dist/_chunks/nl-C79CwB4e.mjs.map +0 -1
- package/dist/_chunks/pl-DXcJCevg.mjs +0 -26
- package/dist/_chunks/pl-DXcJCevg.mjs.map +0 -1
- package/dist/_chunks/pl-DdtXf3SH.js +0 -26
- package/dist/_chunks/pl-DdtXf3SH.js.map +0 -1
- package/dist/_chunks/pt-BR-B_ii8U63.js +0 -5
- package/dist/_chunks/pt-BR-B_ii8U63.js.map +0 -1
- package/dist/_chunks/pt-BR-DjINUWGk.mjs +0 -5
- package/dist/_chunks/pt-BR-DjINUWGk.mjs.map +0 -1
- package/dist/_chunks/pt-CzRDvk6c.js +0 -29
- package/dist/_chunks/pt-CzRDvk6c.js.map +0 -1
- package/dist/_chunks/pt-DEVCt2mt.mjs +0 -29
- package/dist/_chunks/pt-DEVCt2mt.mjs.map +0 -1
- package/dist/_chunks/ru-C_7wBr9e.mjs +0 -5
- package/dist/_chunks/ru-C_7wBr9e.mjs.map +0 -1
- package/dist/_chunks/ru-Dc-rSPqb.js +0 -5
- package/dist/_chunks/ru-Dc-rSPqb.js.map +0 -1
- package/dist/_chunks/sk-Cnpb4YOK.js +0 -5
- package/dist/_chunks/sk-Cnpb4YOK.js.map +0 -1
- package/dist/_chunks/sk-i1gQKUBN.mjs +0 -5
- package/dist/_chunks/sk-i1gQKUBN.mjs.map +0 -1
- package/dist/_chunks/th-BXTLF08M.js +0 -5
- package/dist/_chunks/th-BXTLF08M.js.map +0 -1
- package/dist/_chunks/th-D-MxpWKr.mjs +0 -5
- package/dist/_chunks/th-D-MxpWKr.mjs.map +0 -1
- package/dist/_chunks/tr-BXu41MLY.mjs +0 -29
- package/dist/_chunks/tr-BXu41MLY.mjs.map +0 -1
- package/dist/_chunks/tr-DwBySNgJ.js +0 -29
- package/dist/_chunks/tr-DwBySNgJ.js.map +0 -1
- package/dist/_chunks/uk-C_1qrLRM.mjs +0 -5
- package/dist/_chunks/uk-C_1qrLRM.mjs.map +0 -1
- package/dist/_chunks/uk-CxIePjBD.js +0 -5
- package/dist/_chunks/uk-CxIePjBD.js.map +0 -1
- package/dist/_chunks/vi-B4uqmjm6.js +0 -5
- package/dist/_chunks/vi-B4uqmjm6.js.map +0 -1
- package/dist/_chunks/vi-BfZkgFxI.mjs +0 -5
- package/dist/_chunks/vi-BfZkgFxI.mjs.map +0 -1
- package/dist/_chunks/zh-BS-XJCSt.mjs +0 -29
- package/dist/_chunks/zh-BS-XJCSt.mjs.map +0 -1
- package/dist/_chunks/zh-DsMIjTgu.js +0 -29
- package/dist/_chunks/zh-DsMIjTgu.js.map +0 -1
- package/dist/_chunks/zh-Hans-BLEEaLoN.mjs +0 -21
- package/dist/_chunks/zh-Hans-BLEEaLoN.mjs.map +0 -1
- package/dist/_chunks/zh-Hans-CmL3sY9o.js +0 -21
- package/dist/_chunks/zh-Hans-CmL3sY9o.js.map +0 -1
- package/dist/admin/index.js +0 -4
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs +0 -5
- package/dist/admin/index.mjs.map +0 -1
- package/dist/admin/src/constants.d.ts +0 -6
- package/dist/admin/src/index.d.ts +0 -3
- package/dist/admin/src/pages/Settings.d.ts +0 -1
- package/dist/admin/src/utils/getYupInnerErrors.d.ts +0 -7
- package/dist/admin/src/utils/prefixPluginTranslations.d.ts +0 -3
- package/dist/admin/src/utils/schema.d.ts +0 -8
- package/dist/server/index.js +0 -209
- package/dist/server/index.js.map +0 -1
- package/dist/server/index.mjs +0 -191
- package/dist/server/index.mjs.map +0 -1
- package/dist/server/src/bootstrap.d.ts +0 -5
- package/dist/server/src/bootstrap.d.ts.map +0 -1
- package/dist/server/src/config.d.ts +0 -3
- package/dist/server/src/config.d.ts.map +0 -1
- package/dist/server/src/controllers/email.d.ts +0 -13
- package/dist/server/src/controllers/email.d.ts.map +0 -1
- package/dist/server/src/controllers/index.d.ts +0 -9
- package/dist/server/src/controllers/index.d.ts.map +0 -1
- package/dist/server/src/index.d.ts +0 -49
- package/dist/server/src/index.d.ts.map +0 -1
- package/dist/server/src/routes/admin.d.ts +0 -18
- package/dist/server/src/routes/admin.d.ts.map +0 -1
- package/dist/server/src/routes/content-api.d.ts +0 -10
- package/dist/server/src/routes/content-api.d.ts.map +0 -1
- package/dist/server/src/routes/index.d.ts +0 -27
- package/dist/server/src/routes/index.d.ts.map +0 -1
- package/dist/server/src/services/email.d.ts +0 -8
- package/dist/server/src/services/email.d.ts.map +0 -1
- package/dist/server/src/services/index.d.ts +0 -8
- package/dist/server/src/services/index.d.ts.map +0 -1
- package/dist/server/src/types.d.ts +0 -38
- package/dist/server/src/types.d.ts.map +0 -1
- package/dist/shared/types.d.ts +0 -11
- package/dist/shared/types.d.ts.map +0 -1
- package/strapi-server.js +0 -3
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const strapiAdmin = require("@strapi/admin/strapi-admin");
|
|
6
|
-
const designSystem = require("@strapi/design-system");
|
|
7
|
-
const icons = require("@strapi/icons");
|
|
8
|
-
const reactIntl = require("react-intl");
|
|
9
|
-
const reactQuery = require("react-query");
|
|
10
|
-
const styled = require("styled-components");
|
|
11
|
-
const yup = require("yup");
|
|
12
|
-
const index = require("./index-DMIgejZc.js");
|
|
13
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule)
|
|
16
|
-
return e;
|
|
17
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
18
|
-
if (e) {
|
|
19
|
-
for (const k in e) {
|
|
20
|
-
if (k !== "default") {
|
|
21
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: () => e[k]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
n.default = e;
|
|
30
|
-
return Object.freeze(n);
|
|
31
|
-
}
|
|
32
|
-
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
33
|
-
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
34
|
-
const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
|
|
35
|
-
const extractValuesFromYupError = (errorType, errorParams) => {
|
|
36
|
-
if (!errorType || !errorParams) {
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
[errorType]: errorParams[errorType]
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
const getYupInnerErrors = (error) => (error?.inner || []).reduce((acc, currentError) => {
|
|
44
|
-
if (currentError.path) {
|
|
45
|
-
acc[currentError.path.split("[").join(".").split("]").join("")] = {
|
|
46
|
-
id: currentError.message,
|
|
47
|
-
defaultMessage: currentError.message,
|
|
48
|
-
values: extractValuesFromYupError(currentError?.type, currentError?.params)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return acc;
|
|
52
|
-
}, {});
|
|
53
|
-
const schema = yup__namespace.object().shape({
|
|
54
|
-
email: yup__namespace.string().email(strapiAdmin.translatedErrors.email.id).required(strapiAdmin.translatedErrors.required.id)
|
|
55
|
-
});
|
|
56
|
-
const DocumentationLink = styled__default.default.a`
|
|
57
|
-
color: ${({ theme }) => theme.colors.primary600};
|
|
58
|
-
`;
|
|
59
|
-
const ProtectedSettingsPage = () => /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Protect, { permissions: index.PERMISSIONS.settings, children: /* @__PURE__ */ jsxRuntime.jsx(SettingsPage, {}) });
|
|
60
|
-
const SettingsPage = () => {
|
|
61
|
-
const { toggleNotification } = strapiAdmin.useNotification();
|
|
62
|
-
const { formatMessage } = reactIntl.useIntl();
|
|
63
|
-
const { get, post } = strapiAdmin.useFetchClient();
|
|
64
|
-
const [testAddress, setTestAddress] = React__namespace.useState("");
|
|
65
|
-
const [isTestAddressValid, setIsTestAddressValid] = React__namespace.useState(false);
|
|
66
|
-
const [formErrors, setFormErrors] = React__namespace.useState({});
|
|
67
|
-
const { data, isLoading } = reactQuery.useQuery(["email", "settings"], async () => {
|
|
68
|
-
const res = await get("/email/settings");
|
|
69
|
-
const {
|
|
70
|
-
data: { config }
|
|
71
|
-
} = res;
|
|
72
|
-
return config;
|
|
73
|
-
});
|
|
74
|
-
const mutation = reactQuery.useMutation(
|
|
75
|
-
async (body) => {
|
|
76
|
-
await post("/email/test", body);
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
onError() {
|
|
80
|
-
toggleNotification({
|
|
81
|
-
type: "danger",
|
|
82
|
-
message: formatMessage(
|
|
83
|
-
{
|
|
84
|
-
id: "email.Settings.email.plugin.notification.test.error",
|
|
85
|
-
defaultMessage: "Failed to send a test mail to {to}"
|
|
86
|
-
},
|
|
87
|
-
{ to: testAddress }
|
|
88
|
-
)
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
onSuccess() {
|
|
92
|
-
toggleNotification({
|
|
93
|
-
type: "success",
|
|
94
|
-
message: formatMessage(
|
|
95
|
-
{
|
|
96
|
-
id: "email.Settings.email.plugin.notification.test.success",
|
|
97
|
-
defaultMessage: "Email test succeeded, check the {to} mailbox"
|
|
98
|
-
},
|
|
99
|
-
{ to: testAddress }
|
|
100
|
-
)
|
|
101
|
-
});
|
|
102
|
-
},
|
|
103
|
-
retry: false
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
React__namespace.useEffect(() => {
|
|
107
|
-
schema.validate({ email: testAddress }, { abortEarly: false }).then(() => setIsTestAddressValid(true)).catch(() => setIsTestAddressValid(false));
|
|
108
|
-
}, [testAddress]);
|
|
109
|
-
const handleChange = (event) => {
|
|
110
|
-
setTestAddress(() => event.target.value);
|
|
111
|
-
};
|
|
112
|
-
const handleSubmit = async (event) => {
|
|
113
|
-
event.preventDefault();
|
|
114
|
-
try {
|
|
115
|
-
await schema.validate({ email: testAddress }, { abortEarly: false });
|
|
116
|
-
} catch (error) {
|
|
117
|
-
if (error instanceof yup.ValidationError) {
|
|
118
|
-
setFormErrors(getYupInnerErrors(error));
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
mutation.mutate({ to: testAddress });
|
|
122
|
-
};
|
|
123
|
-
if (isLoading) {
|
|
124
|
-
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
|
|
125
|
-
}
|
|
126
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Page.Main, { labelledBy: "title", "aria-busy": isLoading || mutation.isLoading, children: [
|
|
127
|
-
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Title, { children: formatMessage(
|
|
128
|
-
{ id: "Settings.PageTitle", defaultMessage: "Settings - {name}" },
|
|
129
|
-
{
|
|
130
|
-
name: formatMessage({
|
|
131
|
-
id: "email.Settings.email.plugin.title",
|
|
132
|
-
defaultMessage: "Configuration"
|
|
133
|
-
})
|
|
134
|
-
}
|
|
135
|
-
) }),
|
|
136
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
137
|
-
designSystem.HeaderLayout,
|
|
138
|
-
{
|
|
139
|
-
id: "title",
|
|
140
|
-
title: formatMessage({
|
|
141
|
-
id: "email.Settings.email.plugin.title",
|
|
142
|
-
defaultMessage: "Configuration"
|
|
143
|
-
}),
|
|
144
|
-
subtitle: formatMessage({
|
|
145
|
-
id: "email.Settings.email.plugin.subTitle",
|
|
146
|
-
defaultMessage: "Test the settings for the Email plugin"
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
),
|
|
150
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.ContentLayout, { children: data && /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 7, children: [
|
|
151
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
152
|
-
designSystem.Box,
|
|
153
|
-
{
|
|
154
|
-
background: "neutral0",
|
|
155
|
-
hasRadius: true,
|
|
156
|
-
shadow: "filterShadow",
|
|
157
|
-
paddingTop: 6,
|
|
158
|
-
paddingBottom: 6,
|
|
159
|
-
paddingLeft: 7,
|
|
160
|
-
paddingRight: 7,
|
|
161
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
162
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
163
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", as: "h2", children: formatMessage({
|
|
164
|
-
id: "email.Settings.email.plugin.title.config",
|
|
165
|
-
defaultMessage: "Configuration"
|
|
166
|
-
}) }),
|
|
167
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage(
|
|
168
|
-
{
|
|
169
|
-
id: "email.Settings.email.plugin.text.configuration",
|
|
170
|
-
defaultMessage: "The plugin is configured through the {file} file, checkout this {link} for the documentation."
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
file: "./config/plugins.js",
|
|
174
|
-
link: /* @__PURE__ */ jsxRuntime.jsx(
|
|
175
|
-
DocumentationLink,
|
|
176
|
-
{
|
|
177
|
-
href: "https://docs.strapi.io/developer-docs/latest/plugins/email.html",
|
|
178
|
-
target: "_blank",
|
|
179
|
-
rel: "noopener noreferrer",
|
|
180
|
-
children: formatMessage({
|
|
181
|
-
id: "email.link",
|
|
182
|
-
defaultMessage: "Link"
|
|
183
|
-
})
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
) })
|
|
188
|
-
] }),
|
|
189
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid, { gap: 5, children: [
|
|
190
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 6, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
191
|
-
designSystem.TextInput,
|
|
192
|
-
{
|
|
193
|
-
name: "shipper-email",
|
|
194
|
-
label: formatMessage({
|
|
195
|
-
id: "email.Settings.email.plugin.label.defaultFrom",
|
|
196
|
-
defaultMessage: "Default sender email"
|
|
197
|
-
}),
|
|
198
|
-
placeholder: formatMessage({
|
|
199
|
-
id: "email.Settings.email.plugin.placeholder.defaultFrom",
|
|
200
|
-
defaultMessage: "ex: Strapi No-Reply '<'no-reply@strapi.io'>'"
|
|
201
|
-
}),
|
|
202
|
-
disabled: true,
|
|
203
|
-
value: data.settings.defaultFrom
|
|
204
|
-
}
|
|
205
|
-
) }),
|
|
206
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 6, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
207
|
-
designSystem.TextInput,
|
|
208
|
-
{
|
|
209
|
-
name: "response-email",
|
|
210
|
-
label: formatMessage({
|
|
211
|
-
id: "email.Settings.email.plugin.label.defaultReplyTo",
|
|
212
|
-
defaultMessage: "Default response email"
|
|
213
|
-
}),
|
|
214
|
-
placeholder: formatMessage({
|
|
215
|
-
id: "email.Settings.email.plugin.placeholder.defaultReplyTo",
|
|
216
|
-
defaultMessage: `ex: Strapi '<'example@strapi.io'>'`
|
|
217
|
-
}),
|
|
218
|
-
disabled: true,
|
|
219
|
-
value: data.settings.defaultReplyTo
|
|
220
|
-
}
|
|
221
|
-
) }),
|
|
222
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 6, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
223
|
-
designSystem.SingleSelect,
|
|
224
|
-
{
|
|
225
|
-
name: "email-provider",
|
|
226
|
-
label: formatMessage({
|
|
227
|
-
id: "email.Settings.email.plugin.label.provider",
|
|
228
|
-
defaultMessage: "Email provider"
|
|
229
|
-
}),
|
|
230
|
-
disabled: true,
|
|
231
|
-
value: data.provider,
|
|
232
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: data.provider, children: data.provider })
|
|
233
|
-
}
|
|
234
|
-
) })
|
|
235
|
-
] })
|
|
236
|
-
] })
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
240
|
-
designSystem.Flex,
|
|
241
|
-
{
|
|
242
|
-
alignItems: "stretch",
|
|
243
|
-
background: "neutral0",
|
|
244
|
-
direction: "column",
|
|
245
|
-
gap: 4,
|
|
246
|
-
hasRadius: true,
|
|
247
|
-
shadow: "filterShadow",
|
|
248
|
-
paddingTop: 6,
|
|
249
|
-
paddingBottom: 6,
|
|
250
|
-
paddingLeft: 7,
|
|
251
|
-
paddingRight: 7,
|
|
252
|
-
children: [
|
|
253
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", as: "h2", children: formatMessage({
|
|
254
|
-
id: "email.Settings.email.plugin.title.test",
|
|
255
|
-
defaultMessage: "Test email delivery"
|
|
256
|
-
}) }),
|
|
257
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid, { gap: 5, children: [
|
|
258
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 6, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
259
|
-
designSystem.TextInput,
|
|
260
|
-
{
|
|
261
|
-
id: "test-address-input",
|
|
262
|
-
name: "test-address",
|
|
263
|
-
onChange: handleChange,
|
|
264
|
-
label: formatMessage({
|
|
265
|
-
id: "email.Settings.email.plugin.label.testAddress",
|
|
266
|
-
defaultMessage: "Recipient email"
|
|
267
|
-
}),
|
|
268
|
-
value: testAddress,
|
|
269
|
-
error: formErrors.email?.id && formatMessage({
|
|
270
|
-
id: `email.${formErrors.email?.id}`,
|
|
271
|
-
defaultMessage: "This is not a valid email"
|
|
272
|
-
}),
|
|
273
|
-
placeholder: formatMessage({
|
|
274
|
-
id: "email.Settings.email.plugin.placeholder.testAddress",
|
|
275
|
-
defaultMessage: "ex: developer@example.com"
|
|
276
|
-
})
|
|
277
|
-
}
|
|
278
|
-
) }),
|
|
279
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 7, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
280
|
-
designSystem.Button,
|
|
281
|
-
{
|
|
282
|
-
loading: mutation.isLoading,
|
|
283
|
-
disabled: !isTestAddressValid,
|
|
284
|
-
type: "submit",
|
|
285
|
-
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Mail, {}),
|
|
286
|
-
children: formatMessage({
|
|
287
|
-
id: "email.Settings.email.plugin.button.test-email",
|
|
288
|
-
defaultMessage: "Send test email"
|
|
289
|
-
})
|
|
290
|
-
}
|
|
291
|
-
) })
|
|
292
|
-
] })
|
|
293
|
-
]
|
|
294
|
-
}
|
|
295
|
-
)
|
|
296
|
-
] }) }) })
|
|
297
|
-
] });
|
|
298
|
-
};
|
|
299
|
-
exports.ProtectedSettingsPage = ProtectedSettingsPage;
|
|
300
|
-
//# sourceMappingURL=Settings-Bt_OomWk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Settings-Bt_OomWk.js","sources":["../../admin/src/utils/getYupInnerErrors.ts","../../admin/src/utils/schema.ts","../../admin/src/pages/Settings.tsx"],"sourcesContent":["import type { MessageDescriptor, PrimitiveType } from 'react-intl';\nimport type { ValidationError } from 'yup';\n\ninterface TranslationMessage extends MessageDescriptor {\n values?: Record<string, PrimitiveType>;\n}\n\nconst extractValuesFromYupError = (\n errorType?: string | undefined,\n errorParams?: Record<string, any> | undefined\n) => {\n if (!errorType || !errorParams) {\n return {};\n }\n\n return {\n [errorType]: errorParams[errorType],\n };\n};\n\nconst getYupInnerErrors = (error: ValidationError) =>\n (error?.inner || []).reduce<Record<string, TranslationMessage>>((acc, currentError) => {\n if (currentError.path) {\n acc[currentError.path.split('[').join('.').split(']').join('')] = {\n id: currentError.message,\n defaultMessage: currentError.message,\n values: extractValuesFromYupError(currentError?.type, currentError?.params),\n };\n }\n\n return acc;\n }, {});\n\nexport { getYupInnerErrors };\n","import { translatedErrors } from '@strapi/admin/strapi-admin';\nimport * as yup from 'yup';\n\nexport const schema = yup.object().shape({\n email: yup.string().email(translatedErrors.email.id).required(translatedErrors.required.id),\n});\n","import * as React from 'react';\n\nimport { Page, useNotification, useFetchClient } from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Button,\n ContentLayout,\n Flex,\n Grid,\n GridItem,\n HeaderLayout,\n SingleSelectOption,\n SingleSelect,\n TextInput,\n Typography,\n} from '@strapi/design-system';\nimport { Mail } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { useQuery, useMutation } from 'react-query';\nimport styled from 'styled-components';\nimport { ValidationError } from 'yup';\n\nimport { PERMISSIONS } from '../constants';\nimport { getYupInnerErrors } from '../utils/getYupInnerErrors';\nimport { schema } from '../utils/schema';\n\nimport type { EmailSettings } from '../../../shared/types';\n\nconst DocumentationLink = styled.a`\n color: ${({ theme }) => theme.colors.primary600};\n`;\n\ninterface MutationBody {\n to: string;\n}\n\nexport const ProtectedSettingsPage = () => (\n <Page.Protect permissions={PERMISSIONS.settings}>\n <SettingsPage />\n </Page.Protect>\n);\n\nconst SettingsPage = () => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { get, post } = useFetchClient();\n\n const [testAddress, setTestAddress] = React.useState('');\n const [isTestAddressValid, setIsTestAddressValid] = React.useState(false);\n\n // TODO: I'm not sure how to type this. I think it should be Record<string, TranslationMessage> but that type is defined in the helper-plugin\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [formErrors, setFormErrors] = React.useState<Record<string, any>>({});\n\n const { data, isLoading } = useQuery(['email', 'settings'], async () => {\n const res = await get<EmailSettings>('/email/settings');\n const {\n data: { config },\n } = res;\n\n return config;\n });\n\n const mutation = useMutation<void, Error, MutationBody>(\n async (body) => {\n await post('/email/test', body);\n },\n {\n onError() {\n toggleNotification!({\n type: 'danger',\n message: formatMessage(\n {\n id: 'email.Settings.email.plugin.notification.test.error',\n defaultMessage: 'Failed to send a test mail to {to}',\n },\n { to: testAddress }\n ),\n });\n },\n onSuccess() {\n toggleNotification!({\n type: 'success',\n message: formatMessage(\n {\n id: 'email.Settings.email.plugin.notification.test.success',\n defaultMessage: 'Email test succeeded, check the {to} mailbox',\n },\n { to: testAddress }\n ),\n });\n },\n retry: false,\n }\n );\n\n React.useEffect(() => {\n schema\n .validate({ email: testAddress }, { abortEarly: false })\n .then(() => setIsTestAddressValid(true))\n .catch(() => setIsTestAddressValid(false));\n }, [testAddress]);\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setTestAddress(() => event.target.value);\n };\n\n const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n try {\n await schema.validate({ email: testAddress }, { abortEarly: false });\n } catch (error) {\n if (error instanceof ValidationError) {\n setFormErrors(getYupInnerErrors(error));\n }\n }\n\n mutation.mutate({ to: testAddress });\n };\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n return (\n <Page.Main labelledBy=\"title\" aria-busy={isLoading || mutation.isLoading}>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: formatMessage({\n id: 'email.Settings.email.plugin.title',\n defaultMessage: 'Configuration',\n }),\n }\n )}\n </Page.Title>\n <HeaderLayout\n id=\"title\"\n title={formatMessage({\n id: 'email.Settings.email.plugin.title',\n defaultMessage: 'Configuration',\n })}\n subtitle={formatMessage({\n id: 'email.Settings.email.plugin.subTitle',\n defaultMessage: 'Test the settings for the Email plugin',\n })}\n />\n\n <ContentLayout>\n {data && (\n <form onSubmit={handleSubmit}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={7}>\n <Box\n background=\"neutral0\"\n hasRadius\n shadow=\"filterShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingLeft={7}\n paddingRight={7}\n >\n <Flex direction=\"column\" alignItems=\"stretch\" gap={4}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1}>\n <Typography variant=\"delta\" as=\"h2\">\n {formatMessage({\n id: 'email.Settings.email.plugin.title.config',\n defaultMessage: 'Configuration',\n })}\n </Typography>\n <Typography>\n {formatMessage(\n {\n id: 'email.Settings.email.plugin.text.configuration',\n defaultMessage:\n 'The plugin is configured through the {file} file, checkout this {link} for the documentation.',\n },\n {\n file: './config/plugins.js',\n link: (\n <DocumentationLink\n href=\"https://docs.strapi.io/developer-docs/latest/plugins/email.html\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {formatMessage({\n id: 'email.link',\n defaultMessage: 'Link',\n })}\n </DocumentationLink>\n ),\n }\n )}\n </Typography>\n </Flex>\n\n <Grid gap={5}>\n <GridItem col={6} s={12}>\n <TextInput\n name=\"shipper-email\"\n label={formatMessage({\n id: 'email.Settings.email.plugin.label.defaultFrom',\n defaultMessage: 'Default sender email',\n })}\n placeholder={formatMessage({\n id: 'email.Settings.email.plugin.placeholder.defaultFrom',\n defaultMessage: \"ex: Strapi No-Reply '<'no-reply@strapi.io'>'\",\n })}\n disabled\n value={data.settings.defaultFrom}\n />\n </GridItem>\n\n <GridItem col={6} s={12}>\n <TextInput\n name=\"response-email\"\n label={formatMessage({\n id: 'email.Settings.email.plugin.label.defaultReplyTo',\n defaultMessage: 'Default response email',\n })}\n placeholder={formatMessage({\n id: 'email.Settings.email.plugin.placeholder.defaultReplyTo',\n defaultMessage: `ex: Strapi '<'example@strapi.io'>'`,\n })}\n disabled\n value={data.settings.defaultReplyTo}\n />\n </GridItem>\n\n <GridItem col={6} s={12}>\n <SingleSelect\n name=\"email-provider\"\n label={formatMessage({\n id: 'email.Settings.email.plugin.label.provider',\n defaultMessage: 'Email provider',\n })}\n disabled\n value={data.provider}\n >\n <SingleSelectOption value={data.provider}>\n {data.provider}\n </SingleSelectOption>\n </SingleSelect>\n </GridItem>\n </Grid>\n </Flex>\n </Box>\n\n <Flex\n alignItems=\"stretch\"\n background=\"neutral0\"\n direction=\"column\"\n gap={4}\n hasRadius\n shadow=\"filterShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingLeft={7}\n paddingRight={7}\n >\n <Typography variant=\"delta\" as=\"h2\">\n {formatMessage({\n id: 'email.Settings.email.plugin.title.test',\n defaultMessage: 'Test email delivery',\n })}\n </Typography>\n\n <Grid gap={5}>\n <GridItem col={6} s={12}>\n <TextInput\n id=\"test-address-input\"\n name=\"test-address\"\n onChange={handleChange}\n label={formatMessage({\n id: 'email.Settings.email.plugin.label.testAddress',\n defaultMessage: 'Recipient email',\n })}\n value={testAddress}\n error={\n formErrors.email?.id &&\n formatMessage({\n id: `email.${formErrors.email?.id}`,\n defaultMessage: 'This is not a valid email',\n })\n }\n placeholder={formatMessage({\n id: 'email.Settings.email.plugin.placeholder.testAddress',\n defaultMessage: 'ex: developer@example.com',\n })}\n />\n </GridItem>\n <GridItem col={7} s={12}>\n <Button\n loading={mutation.isLoading}\n disabled={!isTestAddressValid}\n type=\"submit\"\n startIcon={<Mail />}\n >\n {formatMessage({\n id: 'email.Settings.email.plugin.button.test-email',\n defaultMessage: 'Send test email',\n })}\n </Button>\n </GridItem>\n </Grid>\n </Flex>\n </Flex>\n </form>\n )}\n </ContentLayout>\n </Page.Main>\n );\n};\n"],"names":["yup","translatedErrors","styled","jsx","Page","PERMISSIONS","useNotification","useIntl","useFetchClient","React","useQuery","useMutation","ValidationError","jsxs","HeaderLayout","ContentLayout","Flex","Box","Typography","Grid","GridItem","TextInput","SingleSelect","SingleSelectOption","Button","Mail"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,4BAA4B,CAChC,WACA,gBACG;AACC,MAAA,CAAC,aAAa,CAAC,aAAa;AAC9B,WAAO;EACT;AAEO,SAAA;AAAA,IACL,CAAC,SAAS,GAAG,YAAY,SAAS;AAAA,EAAA;AAEtC;AAEA,MAAM,oBAAoB,CAAC,WACxB,OAAO,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,oBACzB,IAAI;AAAA,oBACJ,gBAAgB;AAAA,kBAAA,CACjB;AAAA,gBAAA;AAAA,cAAA,GAEL;AAAA,cACClB,2BAAA,IAAAiB,aAAA,UAAA,EAAS,KAAK,GAAG,GAAG,IACnB,UAAAjB,2BAAA;AAAA,gBAACqB,aAAA;AAAA,gBAAA;AAAA,kBACC,SAAS,SAAS;AAAA,kBAClB,UAAU,CAAC;AAAA,kBACX,MAAK;AAAA,kBACL,0CAAYC,MAAK,MAAA,EAAA;AAAA,kBAEhB,UAAc,cAAA;AAAA,oBACb,IAAI;AAAA,oBACJ,gBAAgB;AAAA,kBAAA,CACjB;AAAA,gBAAA;AAAA,cAAA,GAEL;AAAA,YAAA,GACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,EACF,CAAA,EACF,CAAA,GAEJ;AAAA,EACF,EAAA,CAAA;AAEJ;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ar-Bf9XlLLo.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ar-C_tQu1XS.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cs-B0QZJTah.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cs-CPKIUWLp.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"de-B9kiAC-s.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"de-K6IYQk2d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const dk = {
|
|
4
|
-
"Settings.email.plugin.button.test-email": "Send test e-mail",
|
|
5
|
-
"Settings.email.plugin.label.defaultFrom": "Standard afsender e-mail",
|
|
6
|
-
"Settings.email.plugin.label.defaultReplyTo": "Standard svar e-mail",
|
|
7
|
-
"Settings.email.plugin.label.provider": "E-mail provider",
|
|
8
|
-
"Settings.email.plugin.label.testAddress": "Modtager e-mail",
|
|
9
|
-
"Settings.email.plugin.notification.config.error": "Fejlede i at hente e-mail konfiguration",
|
|
10
|
-
"Settings.email.plugin.notification.data.loaded": "E-mail indstillinger er blevet hentet",
|
|
11
|
-
"Settings.email.plugin.notification.test.error": "Fejlede ved udsendelse af test mail til {to}",
|
|
12
|
-
"Settings.email.plugin.notification.test.success": "E-mail test lykkedes, tjek indbakken hos {to}",
|
|
13
|
-
"Settings.email.plugin.placeholder.defaultFrom": "f.eks. Strapi No-Reply <no-reply@strapi.io>",
|
|
14
|
-
"Settings.email.plugin.placeholder.defaultReplyTo": "f.eks. Strapi <example@strapi.io>",
|
|
15
|
-
"Settings.email.plugin.placeholder.testAddress": "f.eks. developer@example.com",
|
|
16
|
-
"Settings.email.plugin.subTitle": "Test indstillingerne for Email plugin",
|
|
17
|
-
"Settings.email.plugin.text.configuration": "Pluginnet er konfigureret igennem {file} filen, tjek {link} for dokumentation.",
|
|
18
|
-
"Settings.email.plugin.title": "Konfiguration",
|
|
19
|
-
"Settings.email.plugin.title.config": "Konfiguration",
|
|
20
|
-
"Settings.email.plugin.title.test": "Test e-mail modtagelse",
|
|
21
|
-
"SettingsNav.link.settings": "Indstillinger",
|
|
22
|
-
"SettingsNav.section-label": "E-mail plugin",
|
|
23
|
-
"components.Input.error.validation.email": "Dette er en ugyldig e-mail"
|
|
24
|
-
};
|
|
25
|
-
exports.default = dk;
|
|
26
|
-
//# sourceMappingURL=dk-31mOPYpI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dk-31mOPYpI.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const dk = {
|
|
2
|
-
"Settings.email.plugin.button.test-email": "Send test e-mail",
|
|
3
|
-
"Settings.email.plugin.label.defaultFrom": "Standard afsender e-mail",
|
|
4
|
-
"Settings.email.plugin.label.defaultReplyTo": "Standard svar e-mail",
|
|
5
|
-
"Settings.email.plugin.label.provider": "E-mail provider",
|
|
6
|
-
"Settings.email.plugin.label.testAddress": "Modtager e-mail",
|
|
7
|
-
"Settings.email.plugin.notification.config.error": "Fejlede i at hente e-mail konfiguration",
|
|
8
|
-
"Settings.email.plugin.notification.data.loaded": "E-mail indstillinger er blevet hentet",
|
|
9
|
-
"Settings.email.plugin.notification.test.error": "Fejlede ved udsendelse af test mail til {to}",
|
|
10
|
-
"Settings.email.plugin.notification.test.success": "E-mail test lykkedes, tjek indbakken hos {to}",
|
|
11
|
-
"Settings.email.plugin.placeholder.defaultFrom": "f.eks. Strapi No-Reply <no-reply@strapi.io>",
|
|
12
|
-
"Settings.email.plugin.placeholder.defaultReplyTo": "f.eks. Strapi <example@strapi.io>",
|
|
13
|
-
"Settings.email.plugin.placeholder.testAddress": "f.eks. developer@example.com",
|
|
14
|
-
"Settings.email.plugin.subTitle": "Test indstillingerne for Email plugin",
|
|
15
|
-
"Settings.email.plugin.text.configuration": "Pluginnet er konfigureret igennem {file} filen, tjek {link} for dokumentation.",
|
|
16
|
-
"Settings.email.plugin.title": "Konfiguration",
|
|
17
|
-
"Settings.email.plugin.title.config": "Konfiguration",
|
|
18
|
-
"Settings.email.plugin.title.test": "Test e-mail modtagelse",
|
|
19
|
-
"SettingsNav.link.settings": "Indstillinger",
|
|
20
|
-
"SettingsNav.section-label": "E-mail plugin",
|
|
21
|
-
"components.Input.error.validation.email": "Dette er en ugyldig e-mail"
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
dk as default
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=dk-DqrbgSkv.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dk-DqrbgSkv.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const link = "Link";
|
|
4
|
-
const en = {
|
|
5
|
-
link,
|
|
6
|
-
"Settings.email.plugin.button.test-email": "Send test email",
|
|
7
|
-
"Settings.email.plugin.label.defaultFrom": "Default sender email",
|
|
8
|
-
"Settings.email.plugin.label.defaultReplyTo": "Default response email",
|
|
9
|
-
"Settings.email.plugin.label.provider": "Email provider",
|
|
10
|
-
"Settings.email.plugin.label.testAddress": "Recipient email",
|
|
11
|
-
"Settings.email.plugin.notification.config.error": "Failed to retrieve the email config",
|
|
12
|
-
"Settings.email.plugin.notification.data.loaded": "Email settings data has been loaded",
|
|
13
|
-
"Settings.email.plugin.notification.test.error": "Failed to send a test mail to {to}",
|
|
14
|
-
"Settings.email.plugin.notification.test.success": "Email test succeeded, check the {to} mailbox",
|
|
15
|
-
"Settings.email.plugin.placeholder.defaultFrom": "ex: Strapi No-Reply <no-reply@strapi.io>",
|
|
16
|
-
"Settings.email.plugin.placeholder.defaultReplyTo": "ex: Strapi <example@strapi.io>",
|
|
17
|
-
"Settings.email.plugin.placeholder.testAddress": "ex: developer@example.com",
|
|
18
|
-
"Settings.email.plugin.subTitle": "Test the settings for the Email plugin",
|
|
19
|
-
"Settings.email.plugin.text.configuration": "The plugin is configured through the {file} file, checkout this {link} for the documentation.",
|
|
20
|
-
"Settings.email.plugin.title": "Configuration",
|
|
21
|
-
"Settings.email.plugin.title.config": "Configuration",
|
|
22
|
-
"Settings.email.plugin.title.test": "Test email delivery",
|
|
23
|
-
"SettingsNav.link.settings": "Settings",
|
|
24
|
-
"SettingsNav.section-label": "Email plugin",
|
|
25
|
-
"components.Input.error.validation.email": "This is not a valid email"
|
|
26
|
-
};
|
|
27
|
-
exports.default = en;
|
|
28
|
-
exports.link = link;
|
|
29
|
-
//# sourceMappingURL=en-BCu4d6-o.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-BCu4d6-o.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const link = "Link";
|
|
2
|
-
const en = {
|
|
3
|
-
link,
|
|
4
|
-
"Settings.email.plugin.button.test-email": "Send test email",
|
|
5
|
-
"Settings.email.plugin.label.defaultFrom": "Default sender email",
|
|
6
|
-
"Settings.email.plugin.label.defaultReplyTo": "Default response email",
|
|
7
|
-
"Settings.email.plugin.label.provider": "Email provider",
|
|
8
|
-
"Settings.email.plugin.label.testAddress": "Recipient email",
|
|
9
|
-
"Settings.email.plugin.notification.config.error": "Failed to retrieve the email config",
|
|
10
|
-
"Settings.email.plugin.notification.data.loaded": "Email settings data has been loaded",
|
|
11
|
-
"Settings.email.plugin.notification.test.error": "Failed to send a test mail to {to}",
|
|
12
|
-
"Settings.email.plugin.notification.test.success": "Email test succeeded, check the {to} mailbox",
|
|
13
|
-
"Settings.email.plugin.placeholder.defaultFrom": "ex: Strapi No-Reply <no-reply@strapi.io>",
|
|
14
|
-
"Settings.email.plugin.placeholder.defaultReplyTo": "ex: Strapi <example@strapi.io>",
|
|
15
|
-
"Settings.email.plugin.placeholder.testAddress": "ex: developer@example.com",
|
|
16
|
-
"Settings.email.plugin.subTitle": "Test the settings for the Email plugin",
|
|
17
|
-
"Settings.email.plugin.text.configuration": "The plugin is configured through the {file} file, checkout this {link} for the documentation.",
|
|
18
|
-
"Settings.email.plugin.title": "Configuration",
|
|
19
|
-
"Settings.email.plugin.title.config": "Configuration",
|
|
20
|
-
"Settings.email.plugin.title.test": "Test email delivery",
|
|
21
|
-
"SettingsNav.link.settings": "Settings",
|
|
22
|
-
"SettingsNav.section-label": "Email plugin",
|
|
23
|
-
"components.Input.error.validation.email": "This is not a valid email"
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
en as default,
|
|
27
|
-
link
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=en-DF4KtAAC.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-DF4KtAAC.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const es = {
|
|
2
|
-
"Settings.email.plugin.button.test-email": "Enviar email de prueba",
|
|
3
|
-
"Settings.email.plugin.label.defaultFrom": "Email del remitente predeterminado",
|
|
4
|
-
"Settings.email.plugin.label.defaultReplyTo": "Email de respuesta predeterminado",
|
|
5
|
-
"Settings.email.plugin.label.provider": "Proveedor de email",
|
|
6
|
-
"Settings.email.plugin.label.testAddress": "Receptor de email",
|
|
7
|
-
"Settings.email.plugin.notification.config.error": "No se pudo recuperar la configuración del email",
|
|
8
|
-
"Settings.email.plugin.notification.data.loaded": "Se han cargado los datos de configuración de email",
|
|
9
|
-
"Settings.email.plugin.notification.test.error": "No se pudo enviar un correo de prueba a {to}",
|
|
10
|
-
"Settings.email.plugin.notification.test.success": "La prueba de correo electrónico se realizó correctamente, verifique el buzón de {to}",
|
|
11
|
-
"Settings.email.plugin.placeholder.defaultFrom": "ej: Strapi No-Reply <no-reply@strapi.io>",
|
|
12
|
-
"Settings.email.plugin.placeholder.defaultReplyTo": "ej: Strapi <example@strapi.io>",
|
|
13
|
-
"Settings.email.plugin.placeholder.testAddress": "ej: developer@example.com",
|
|
14
|
-
"Settings.email.plugin.subTitle": "Pruebe la configuración del complemento de email",
|
|
15
|
-
"Settings.email.plugin.text.configuration": "El complemento se configura a través del archivo {file}, consulte este {link} para ver la documentación.",
|
|
16
|
-
"Settings.email.plugin.title": "Configuración",
|
|
17
|
-
"Settings.email.plugin.title.config": "Configuración",
|
|
18
|
-
"Settings.email.plugin.title.test": "Prueba el envío de email",
|
|
19
|
-
"SettingsNav.link.settings": "Ajustes",
|
|
20
|
-
"SettingsNav.section-label": "Plugin de email",
|
|
21
|
-
"components.Input.error.validation.email": "Este es un correo electrónico inválido"
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
es as default
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=es-BNo7eLLJ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es-BNo7eLLJ.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const es = {
|
|
4
|
-
"Settings.email.plugin.button.test-email": "Enviar email de prueba",
|
|
5
|
-
"Settings.email.plugin.label.defaultFrom": "Email del remitente predeterminado",
|
|
6
|
-
"Settings.email.plugin.label.defaultReplyTo": "Email de respuesta predeterminado",
|
|
7
|
-
"Settings.email.plugin.label.provider": "Proveedor de email",
|
|
8
|
-
"Settings.email.plugin.label.testAddress": "Receptor de email",
|
|
9
|
-
"Settings.email.plugin.notification.config.error": "No se pudo recuperar la configuración del email",
|
|
10
|
-
"Settings.email.plugin.notification.data.loaded": "Se han cargado los datos de configuración de email",
|
|
11
|
-
"Settings.email.plugin.notification.test.error": "No se pudo enviar un correo de prueba a {to}",
|
|
12
|
-
"Settings.email.plugin.notification.test.success": "La prueba de correo electrónico se realizó correctamente, verifique el buzón de {to}",
|
|
13
|
-
"Settings.email.plugin.placeholder.defaultFrom": "ej: Strapi No-Reply <no-reply@strapi.io>",
|
|
14
|
-
"Settings.email.plugin.placeholder.defaultReplyTo": "ej: Strapi <example@strapi.io>",
|
|
15
|
-
"Settings.email.plugin.placeholder.testAddress": "ej: developer@example.com",
|
|
16
|
-
"Settings.email.plugin.subTitle": "Pruebe la configuración del complemento de email",
|
|
17
|
-
"Settings.email.plugin.text.configuration": "El complemento se configura a través del archivo {file}, consulte este {link} para ver la documentación.",
|
|
18
|
-
"Settings.email.plugin.title": "Configuración",
|
|
19
|
-
"Settings.email.plugin.title.config": "Configuración",
|
|
20
|
-
"Settings.email.plugin.title.test": "Prueba el envío de email",
|
|
21
|
-
"SettingsNav.link.settings": "Ajustes",
|
|
22
|
-
"SettingsNav.section-label": "Plugin de email",
|
|
23
|
-
"components.Input.error.validation.email": "Este es un correo electrónico inválido"
|
|
24
|
-
};
|
|
25
|
-
exports.default = es;
|
|
26
|
-
//# sourceMappingURL=es-Dl2HVmwz.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es-Dl2HVmwz.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fr-C8Qw4iPZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fr-hkSxFuzl.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id-CHtAzAUz.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|