strapi-plugin-magic-mail 3.1.0 → 4.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/README.md +630 -1154
  3. package/dist/admin/App-Bi6mzEff.mjs +10973 -0
  4. package/dist/admin/App-aaEU9cpu.js +10976 -0
  5. package/dist/admin/PluginSettings-BR2-PVHx.mjs +705 -0
  6. package/dist/admin/PluginSettings-DbTkOzCh.js +707 -0
  7. package/dist/admin/analyticsLogs-BCY0Zv3Y.mjs +685 -0
  8. package/dist/admin/analyticsLogs-DNU09hoB.js +686 -0
  9. package/dist/admin/de-B5bPRK6l.js +717 -0
  10. package/dist/admin/de-BqYqMhOn.mjs +717 -0
  11. package/dist/admin/en-8xANOQdO.mjs +717 -0
  12. package/dist/admin/en-Bk5eVrtc.js +717 -0
  13. package/dist/admin/es-BfPsCsam.js +717 -0
  14. package/dist/admin/es-DgpTufJ_.mjs +717 -0
  15. package/dist/admin/fr-BuotP0Gc.mjs +717 -0
  16. package/dist/admin/fr-IQ3KPUoS.js +717 -0
  17. package/dist/admin/index-QGqbGw6k.js +102 -0
  18. package/dist/admin/index-qvFJ-a0Q.mjs +103 -0
  19. package/dist/admin/index.js +2 -99
  20. package/dist/admin/index.mjs +2 -99
  21. package/dist/admin/pt-BI63Lncs.js +717 -0
  22. package/dist/admin/pt-DBZu2cDY.mjs +717 -0
  23. package/dist/server/index.js +4623 -2214
  24. package/dist/server/index.mjs +4623 -2214
  25. package/package.json +30 -19
  26. package/strapi-admin.js +3 -2
  27. package/strapi-server.js +3 -2
  28. package/dist/admin/App-Bmav09Ol.mjs +0 -7156
  29. package/dist/admin/App-mX8QtU1Q.js +0 -7177
  30. package/dist/admin/PluginSettings-D5F5y7n2.mjs +0 -386
  31. package/dist/admin/PluginSettings-DE2PMxlS.js +0 -388
  32. package/dist/admin/StyledButtons-aq1EWrQ-.mjs +0 -433
  33. package/dist/admin/StyledButtons-jHF7TXal.js +0 -434
  34. package/dist/admin/de-BXyjQhJQ.mjs +0 -43
  35. package/dist/admin/de-VtWzTjWV.js +0 -43
  36. package/dist/admin/en-DL_aZYfg.js +0 -43
  37. package/dist/admin/en-DMdnprlB.mjs +0 -43
  38. package/dist/admin/es-BJ1KgkMA.js +0 -43
  39. package/dist/admin/es-g3CHX4iu.mjs +0 -43
  40. package/dist/admin/fr-Bmh5-45j.js +0 -43
  41. package/dist/admin/fr-CN1X3dM-.mjs +0 -43
  42. package/dist/admin/pt-DJ6GNCKb.js +0 -43
  43. package/dist/admin/pt-m8_Gnsqe.mjs +0 -43
  44. package/pics/EmailAccountDashboard.png +0 -0
  45. package/pics/Emailaddccount1.png +0 -0
  46. package/pics/RoutingEmailTemplates.png +0 -0
  47. package/pics/Templates.png +0 -0
  48. package/pics/codesnippet.png +0 -0
  49. package/pics/emailAnalytics.png +0 -0
  50. package/pics/emailDesigner.png +0 -0
  51. package/pics/emailTemplateSendTest.png +0 -0
  52. package/pics/emailVersionHistory.png +0 -0
  53. package/pics/emailaddaccount2.png +0 -0
  54. package/pics/emailaddaccount3.png +0 -0
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ const React = require("react");
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const outline = require("@heroicons/react/24/outline");
5
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
6
+ const v = glob[path];
7
+ if (v) {
8
+ return typeof v === "function" ? v() : Promise.resolve(v);
9
+ }
10
+ return new Promise((_, reject) => {
11
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
12
+ reject.bind(
13
+ null,
14
+ new Error(
15
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
16
+ )
17
+ )
18
+ );
19
+ });
20
+ };
21
+ const strapi = { "name": "magic-mail" };
22
+ const pluginPkg = {
23
+ strapi
24
+ };
25
+ const pluginId = "magic-mail";
26
+ const Initializer = ({ setPlugin }) => {
27
+ const ref = React.useRef(setPlugin);
28
+ React.useEffect(() => {
29
+ if (typeof ref.current === "function") ref.current(pluginId);
30
+ }, []);
31
+ return null;
32
+ };
33
+ const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(outline.EnvelopeIcon, { "aria-hidden": "true", focusable: "false", style: { width: 24, height: 24 } });
34
+ const pluginPermissions = {
35
+ access: [{ action: `plugin::${pluginId}.access`, subject: null }],
36
+ read: [{ action: `plugin::${pluginId}.read`, subject: null }],
37
+ manage: [{ action: `plugin::${pluginId}.manage`, subject: null }],
38
+ testSend: [{ action: `plugin::${pluginId}.test-send`, subject: null }]
39
+ };
40
+ const getTranslation = (key) => `${pluginId}.${key}`;
41
+ const prefixPluginTranslations = (data, prefix = pluginId) => {
42
+ const prefixed = {};
43
+ for (const [key, value] of Object.entries(data ?? {})) {
44
+ if (typeof value === "string") prefixed[`${prefix}.${key}`] = value;
45
+ }
46
+ return prefixed;
47
+ };
48
+ const name = pluginPkg.strapi.name;
49
+ const loadLocale = async (locale) => {
50
+ try {
51
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-B5bPRK6l.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-Bk5eVrtc.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-BfPsCsam.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-IQ3KPUoS.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-BI63Lncs.js")) }), `./translations/${locale}.json`, 3);
52
+ return { data: prefixPluginTranslations(data, pluginId), locale };
53
+ } catch {
54
+ return { data: {}, locale };
55
+ }
56
+ };
57
+ const index = {
58
+ register(app) {
59
+ app.addMenuLink({
60
+ to: `plugins/${pluginId}`,
61
+ icon: PluginIcon,
62
+ intlLabel: {
63
+ id: getTranslation("plugin.name"),
64
+ defaultMessage: "MagicMail"
65
+ },
66
+ Component: () => Promise.resolve().then(() => require("./App-aaEU9cpu.js")),
67
+ permissions: pluginPermissions.access
68
+ });
69
+ app.createSettingSection(
70
+ {
71
+ intlLabel: { id: getTranslation("plugin.settings.section"), defaultMessage: "MagicMail" },
72
+ id: pluginId,
73
+ to: pluginId
74
+ },
75
+ [
76
+ {
77
+ intlLabel: {
78
+ id: getTranslation("plugin.settings.pluginSettings"),
79
+ defaultMessage: "Plugin Settings"
80
+ },
81
+ id: "plugin-settings",
82
+ to: `${pluginId}/plugin-settings`,
83
+ Component: () => Promise.resolve().then(() => require("./PluginSettings-DbTkOzCh.js")),
84
+ permissions: pluginPermissions.read
85
+ }
86
+ ]
87
+ );
88
+ app.registerPlugin({
89
+ id: pluginId,
90
+ initializer: Initializer,
91
+ isReady: true,
92
+ name
93
+ });
94
+ },
95
+ async registerTrads({ locales }) {
96
+ return Promise.all(locales.map(loadLocale));
97
+ }
98
+ };
99
+ exports.getTranslation = getTranslation;
100
+ exports.index = index;
101
+ exports.pluginId = pluginId;
102
+ exports.pluginPermissions = pluginPermissions;
@@ -0,0 +1,103 @@
1
+ import { useRef, useEffect } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { EnvelopeIcon } from "@heroicons/react/24/outline";
4
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
5
+ const v = glob[path];
6
+ if (v) {
7
+ return typeof v === "function" ? v() : Promise.resolve(v);
8
+ }
9
+ return new Promise((_, reject) => {
10
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
11
+ reject.bind(
12
+ null,
13
+ new Error(
14
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
15
+ )
16
+ )
17
+ );
18
+ });
19
+ };
20
+ const strapi = { "name": "magic-mail" };
21
+ const pluginPkg = {
22
+ strapi
23
+ };
24
+ const pluginId = "magic-mail";
25
+ const Initializer = ({ setPlugin }) => {
26
+ const ref = useRef(setPlugin);
27
+ useEffect(() => {
28
+ if (typeof ref.current === "function") ref.current(pluginId);
29
+ }, []);
30
+ return null;
31
+ };
32
+ const PluginIcon = () => /* @__PURE__ */ jsx(EnvelopeIcon, { "aria-hidden": "true", focusable: "false", style: { width: 24, height: 24 } });
33
+ const pluginPermissions = {
34
+ access: [{ action: `plugin::${pluginId}.access`, subject: null }],
35
+ read: [{ action: `plugin::${pluginId}.read`, subject: null }],
36
+ manage: [{ action: `plugin::${pluginId}.manage`, subject: null }],
37
+ testSend: [{ action: `plugin::${pluginId}.test-send`, subject: null }]
38
+ };
39
+ const getTranslation = (key) => `${pluginId}.${key}`;
40
+ const prefixPluginTranslations = (data, prefix = pluginId) => {
41
+ const prefixed = {};
42
+ for (const [key, value] of Object.entries(data ?? {})) {
43
+ if (typeof value === "string") prefixed[`${prefix}.${key}`] = value;
44
+ }
45
+ return prefixed;
46
+ };
47
+ const name = pluginPkg.strapi.name;
48
+ const loadLocale = async (locale) => {
49
+ try {
50
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-BqYqMhOn.mjs"), "./translations/en.json": () => import("./en-8xANOQdO.mjs"), "./translations/es.json": () => import("./es-DgpTufJ_.mjs"), "./translations/fr.json": () => import("./fr-BuotP0Gc.mjs"), "./translations/pt.json": () => import("./pt-DBZu2cDY.mjs") }), `./translations/${locale}.json`, 3);
51
+ return { data: prefixPluginTranslations(data, pluginId), locale };
52
+ } catch {
53
+ return { data: {}, locale };
54
+ }
55
+ };
56
+ const index = {
57
+ register(app) {
58
+ app.addMenuLink({
59
+ to: `plugins/${pluginId}`,
60
+ icon: PluginIcon,
61
+ intlLabel: {
62
+ id: getTranslation("plugin.name"),
63
+ defaultMessage: "MagicMail"
64
+ },
65
+ Component: () => import("./App-Bi6mzEff.mjs"),
66
+ permissions: pluginPermissions.access
67
+ });
68
+ app.createSettingSection(
69
+ {
70
+ intlLabel: { id: getTranslation("plugin.settings.section"), defaultMessage: "MagicMail" },
71
+ id: pluginId,
72
+ to: pluginId
73
+ },
74
+ [
75
+ {
76
+ intlLabel: {
77
+ id: getTranslation("plugin.settings.pluginSettings"),
78
+ defaultMessage: "Plugin Settings"
79
+ },
80
+ id: "plugin-settings",
81
+ to: `${pluginId}/plugin-settings`,
82
+ Component: () => import("./PluginSettings-BR2-PVHx.mjs"),
83
+ permissions: pluginPermissions.read
84
+ }
85
+ ]
86
+ );
87
+ app.registerPlugin({
88
+ id: pluginId,
89
+ initializer: Initializer,
90
+ isReady: true,
91
+ name
92
+ });
93
+ },
94
+ async registerTrads({ locales }) {
95
+ return Promise.all(locales.map(loadLocale));
96
+ }
97
+ };
98
+ export {
99
+ pluginId as a,
100
+ getTranslation as g,
101
+ index as i,
102
+ pluginPermissions as p
103
+ };
@@ -1,101 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const React = require("react");
4
- const jsxRuntime = require("react/jsx-runtime");
5
- const outline = require("@heroicons/react/24/outline");
6
- const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
7
- const v = glob[path];
8
- if (v) {
9
- return typeof v === "function" ? v() : Promise.resolve(v);
10
- }
11
- return new Promise((_, reject) => {
12
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
13
- reject.bind(
14
- null,
15
- new Error(
16
- "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
17
- )
18
- )
19
- );
20
- });
21
- };
22
- const strapi = { "name": "magic-mail" };
23
- const pluginPkg = {
24
- strapi
25
- };
26
- const pluginId = "magic-mail";
27
- const Initializer = ({ setPlugin }) => {
28
- const ref = React.useRef(setPlugin);
29
- React.useEffect(() => {
30
- ref.current(pluginId);
31
- }, []);
32
- return null;
33
- };
34
- const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(outline.EnvelopeIcon, { style: { width: 24, height: 24 } });
35
- const name = pluginPkg.strapi.name;
36
- const prefixPluginTranslations = (data, pluginId2) => {
37
- const prefixed = {};
38
- Object.keys(data).forEach((key) => {
39
- prefixed[`${pluginId2}.${key}`] = data[key];
40
- });
41
- return prefixed;
42
- };
43
- const index = {
44
- register(app) {
45
- const pluginPermissions = [{ action: `plugin::${pluginId}.access`, subject: null }];
46
- app.addMenuLink({
47
- to: `plugins/${pluginId}`,
48
- icon: PluginIcon,
49
- intlLabel: {
50
- id: `${pluginId}.plugin.name`,
51
- defaultMessage: "MagicMail"
52
- },
53
- Component: () => Promise.resolve().then(() => require("./App-mX8QtU1Q.js")),
54
- permissions: pluginPermissions
55
- });
56
- app.createSettingSection(
57
- {
58
- intlLabel: { id: `${pluginId}.settings.section`, defaultMessage: "MagicMail" },
59
- id: pluginId,
60
- to: pluginId
61
- },
62
- [
63
- {
64
- intlLabel: {
65
- id: `${pluginId}.settings.plugin-settings`,
66
- defaultMessage: "Plugin Settings"
67
- },
68
- id: "plugin-settings",
69
- to: `${pluginId}/plugin-settings`,
70
- Component: () => Promise.resolve().then(() => require("./PluginSettings-DE2PMxlS.js")),
71
- permissions: pluginPermissions
72
- }
73
- ]
74
- );
75
- app.registerPlugin({
76
- id: pluginId,
77
- initializer: Initializer,
78
- isReady: true,
79
- name
80
- });
81
- },
82
- async registerTrads({ locales }) {
83
- const importedTrads = await Promise.all(
84
- locales.map((locale) => {
85
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-VtWzTjWV.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-DL_aZYfg.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-BJ1KgkMA.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-Bmh5-45j.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-DJ6GNCKb.js")) }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
86
- return {
87
- data: prefixPluginTranslations(data, pluginId),
88
- locale
89
- };
90
- }).catch(() => {
91
- return {
92
- data: {},
93
- locale
94
- };
95
- });
96
- })
97
- );
98
- return Promise.resolve(importedTrads);
99
- }
100
- };
101
- exports.default = index;
3
+ const index = require("./index-QGqbGw6k.js");
4
+ exports.default = index.index;
@@ -1,101 +1,4 @@
1
- import { useRef, useEffect } from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import { EnvelopeIcon } from "@heroicons/react/24/outline";
4
- const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
5
- const v = glob[path];
6
- if (v) {
7
- return typeof v === "function" ? v() : Promise.resolve(v);
8
- }
9
- return new Promise((_, reject) => {
10
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
11
- reject.bind(
12
- null,
13
- new Error(
14
- "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
15
- )
16
- )
17
- );
18
- });
19
- };
20
- const strapi = { "name": "magic-mail" };
21
- const pluginPkg = {
22
- strapi
23
- };
24
- const pluginId = "magic-mail";
25
- const Initializer = ({ setPlugin }) => {
26
- const ref = useRef(setPlugin);
27
- useEffect(() => {
28
- ref.current(pluginId);
29
- }, []);
30
- return null;
31
- };
32
- const PluginIcon = () => /* @__PURE__ */ jsx(EnvelopeIcon, { style: { width: 24, height: 24 } });
33
- const name = pluginPkg.strapi.name;
34
- const prefixPluginTranslations = (data, pluginId2) => {
35
- const prefixed = {};
36
- Object.keys(data).forEach((key) => {
37
- prefixed[`${pluginId2}.${key}`] = data[key];
38
- });
39
- return prefixed;
40
- };
41
- const index = {
42
- register(app) {
43
- const pluginPermissions = [{ action: `plugin::${pluginId}.access`, subject: null }];
44
- app.addMenuLink({
45
- to: `plugins/${pluginId}`,
46
- icon: PluginIcon,
47
- intlLabel: {
48
- id: `${pluginId}.plugin.name`,
49
- defaultMessage: "MagicMail"
50
- },
51
- Component: () => import("./App-Bmav09Ol.mjs"),
52
- permissions: pluginPermissions
53
- });
54
- app.createSettingSection(
55
- {
56
- intlLabel: { id: `${pluginId}.settings.section`, defaultMessage: "MagicMail" },
57
- id: pluginId,
58
- to: pluginId
59
- },
60
- [
61
- {
62
- intlLabel: {
63
- id: `${pluginId}.settings.plugin-settings`,
64
- defaultMessage: "Plugin Settings"
65
- },
66
- id: "plugin-settings",
67
- to: `${pluginId}/plugin-settings`,
68
- Component: () => import("./PluginSettings-D5F5y7n2.mjs"),
69
- permissions: pluginPermissions
70
- }
71
- ]
72
- );
73
- app.registerPlugin({
74
- id: pluginId,
75
- initializer: Initializer,
76
- isReady: true,
77
- name
78
- });
79
- },
80
- async registerTrads({ locales }) {
81
- const importedTrads = await Promise.all(
82
- locales.map((locale) => {
83
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-BXyjQhJQ.mjs"), "./translations/en.json": () => import("./en-DMdnprlB.mjs"), "./translations/es.json": () => import("./es-g3CHX4iu.mjs"), "./translations/fr.json": () => import("./fr-CN1X3dM-.mjs"), "./translations/pt.json": () => import("./pt-m8_Gnsqe.mjs") }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
84
- return {
85
- data: prefixPluginTranslations(data, pluginId),
86
- locale
87
- };
88
- }).catch(() => {
89
- return {
90
- data: {},
91
- locale
92
- };
93
- });
94
- })
95
- );
96
- return Promise.resolve(importedTrads);
97
- }
98
- };
1
+ import { i } from "./index-qvFJ-a0Q.mjs";
99
2
  export {
100
- index as default
3
+ i as default
101
4
  };