strapi-plugin-magic-link-v5 5.5.5 → 5.5.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.5.6](https://github.com/Schero94/strapi-plugin-magic-link-v5/compare/v5.5.5...v5.5.6) (2026-04-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **settings:** declare emailTemplates state and harden email-designer integration ([d9e6240](https://github.com/Schero94/strapi-plugin-magic-link-v5/commit/d9e62405942ca6432c006b863d0c7a3a9eedba42)), closes [#17](https://github.com/Schero94/strapi-plugin-magic-link-v5/issues/17) [#17](https://github.com/Schero94/strapi-plugin-magic-link-v5/issues/17) [#17](https://github.com/Schero94/strapi-plugin-magic-link-v5/issues/17)
7
+
1
8
  ## [5.5.5](https://github.com/Schero94/strapi-plugin-magic-link-v5/compare/v5.5.4...v5.5.5) (2026-04-21)
2
9
 
3
10
 
@@ -60,7 +60,7 @@ const index = {
60
60
  },
61
61
  Component: () => import(
62
62
  /* webpackChunkName: "magic-link-tokens" */
63
- "./index-B9M8wkAj.mjs"
63
+ "./index-CxCULraY.mjs"
64
64
  ),
65
65
  permissions: pluginPermissions.access
66
66
  });
@@ -82,7 +82,7 @@ const index = {
82
82
  to: `${PLUGIN_ID}/config`,
83
83
  Component: () => import(
84
84
  /* webpackChunkName: "magic-link-settings" */
85
- "./index-CoZjdlQd.mjs"
85
+ "./index-ivgYEX37.mjs"
86
86
  ),
87
87
  permissions: pluginPermissions.readSettings
88
88
  },
@@ -121,7 +121,7 @@ const index = {
121
121
  to: `${PLUGIN_ID}/whatsapp`,
122
122
  Component: () => import(
123
123
  /* webpackChunkName: "magic-link-whatsapp" */
124
- "./index-Ki-zhMlp.mjs"
124
+ "./index-BZFGxKmY.mjs"
125
125
  ),
126
126
  permissions: pluginPermissions.access
127
127
  }
@@ -61,7 +61,7 @@ const index = {
61
61
  },
62
62
  Component: () => Promise.resolve().then(() => require(
63
63
  /* webpackChunkName: "magic-link-tokens" */
64
- "./index-DJyAppvB.js"
64
+ "./index-CddEy_As.js"
65
65
  )),
66
66
  permissions: pluginPermissions.access
67
67
  });
@@ -83,7 +83,7 @@ const index = {
83
83
  to: `${PLUGIN_ID}/config`,
84
84
  Component: () => Promise.resolve().then(() => require(
85
85
  /* webpackChunkName: "magic-link-settings" */
86
- "./index-CQ3Kd12m.js"
86
+ "./index-CuXnqVl4.js"
87
87
  )),
88
88
  permissions: pluginPermissions.readSettings
89
89
  },
@@ -122,7 +122,7 @@ const index = {
122
122
  to: `${PLUGIN_ID}/whatsapp`,
123
123
  Component: () => Promise.resolve().then(() => require(
124
124
  /* webpackChunkName: "magic-link-whatsapp" */
125
- "./index-DC00x-wm.js"
125
+ "./index-M5s7QN5m.js"
126
126
  )),
127
127
  permissions: pluginPermissions.access
128
128
  }
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl";
5
5
  import { Flex, Loader, Box, Typography, Button, TextInput, Badge } from "@strapi/design-system";
6
6
  import { Phone, Check, Message, ArrowClockwise } from "@strapi/icons";
7
7
  import { useNotification, useFetchClient } from "@strapi/strapi/admin";
8
- import { g as getTrad } from "./index-C6WRQuex.mjs";
8
+ import { g as getTrad } from "./index-34ICAF9_.mjs";
9
9
  const theme = {
10
10
  colors: {
11
11
  primary: { 700: "#075985", 100: "#E0F2FE", 50: "#F0F9FF" },
@@ -7,7 +7,7 @@ const styled = require("styled-components");
7
7
  const reactIntl = require("react-intl");
8
8
  const designSystem = require("@strapi/design-system");
9
9
  const icons = require("@strapi/icons");
10
- const index = require("./index-DoSROJog.js");
10
+ const index = require("./index-BFzW7Xex.js");
11
11
  const admin = require("@strapi/strapi/admin");
12
12
  const LicenseGuard = require("./LicenseGuard-DqyOwTlf.js");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -7,7 +7,7 @@ const reactIntl = require("react-intl");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const admin = require("@strapi/strapi/admin");
10
- const index = require("./index-DoSROJog.js");
10
+ const index = require("./index-BFzW7Xex.js");
11
11
  const LicenseGuard = require("./LicenseGuard-DqyOwTlf.js");
12
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
13
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -673,6 +673,7 @@ _Falls du diesen Link nicht angefordert hast, ignoriere diese Nachricht._`,
673
673
  const [textEditorHeight, setTextEditorHeight] = react.useState(300);
674
674
  const [licenseInfo, setLicenseInfo] = react.useState(null);
675
675
  const [magicMailTemplates, setMagicMailTemplates] = react.useState([]);
676
+ const [emailTemplates, setEmailTemplates] = react.useState([]);
676
677
  const placeholderList = react.useMemo(() => [
677
678
  {
678
679
  code: formatMessage({ id: index.getTrad("settings.email.placeholders.url") }),
@@ -777,15 +778,16 @@ _Falls du diesen Link nicht angefordert hast, ignoriere diese Nachricht._`,
777
778
  }, [get, toggleNotification, formatMessage]);
778
779
  react.useEffect(() => {
779
780
  const fetchEmailTemplates = async () => {
780
- if (emailDesignerInstalled) {
781
- try {
782
- const response = await get("/email-designer-5/templates");
783
- if (response && response.data) {
784
- setEmailTemplates(response.data);
785
- }
786
- } catch (error) {
787
- console.error("Error fetching email templates:", error);
788
- }
781
+ if (!emailDesignerInstalled) return;
782
+ try {
783
+ const response = await get("/email-designer-5/templates");
784
+ const payload = response?.data;
785
+ const templates = Array.isArray(payload) ? payload : payload?.data || payload?.templates || [];
786
+ setEmailTemplates(templates);
787
+ console.log(`✅ Email Designer templates loaded: ${templates.length}`);
788
+ } catch (error) {
789
+ console.error("❌ Error fetching email templates:", error);
790
+ setEmailTemplates([]);
789
791
  }
790
792
  };
791
793
  fetchEmailTemplates();
@@ -5,7 +5,7 @@ import styled, { keyframes, css } from "styled-components";
5
5
  import { useIntl } from "react-intl";
6
6
  import { Box, Flex, Typography, Button, TextInput, Textarea, Checkbox, IconButton, Loader, Searchbar, SingleSelect, SingleSelectOption, Thead, Tr, Th, Tbody, Td, Pagination, PreviousLink, PageLink, NextLink, Table, Badge, VisuallyHidden, Main } from "@strapi/design-system";
7
7
  import { Cross, Sparkle, Check, Shield, Clock, Lock, Trash, ArrowClockwise, CaretDown, User, Monitor, Calendar, Plus, Earth, WarningCircle, Server, Eye, Mail, Cog, Key, Link } from "@strapi/icons";
8
- import { g as getTrad, P as PLUGIN_ID } from "./index-C6WRQuex.mjs";
8
+ import { g as getTrad, P as PLUGIN_ID } from "./index-34ICAF9_.mjs";
9
9
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
10
10
  import { L as LicenseGuard, a as LanguageProvider } from "./LicenseGuard-5sMwgS6j.mjs";
11
11
  const CreateTokenModal = ({ isOpen, onClose, onSubmit, formData, setFormData }) => {
@@ -7,7 +7,7 @@ const reactIntl = require("react-intl");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const admin = require("@strapi/strapi/admin");
10
- const index = require("./index-DoSROJog.js");
10
+ const index = require("./index-BFzW7Xex.js");
11
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
12
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
13
13
  const theme = {
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl";
5
5
  import { Box, Typography, Flex, Button, Accordion, SingleSelect, SingleSelectOption, Grid, Switch, NumberInput, TextInput, Divider, Textarea, Badge } from "@strapi/design-system";
6
6
  import { Check, Cog, Lightning, Shield, Mail, CheckCircle, Code, Link, Lock, Key } from "@strapi/icons";
7
7
  import { useNotification, useFetchClient } from "@strapi/strapi/admin";
8
- import { g as getTrad } from "./index-C6WRQuex.mjs";
8
+ import { g as getTrad } from "./index-34ICAF9_.mjs";
9
9
  import { u as usePluginLanguage, L as LicenseGuard, a as LanguageProvider } from "./LicenseGuard-5sMwgS6j.mjs";
10
10
  const EMAIL_TEMPLATES = {
11
11
  modern: {
@@ -669,6 +669,7 @@ _Falls du diesen Link nicht angefordert hast, ignoriere diese Nachricht._`,
669
669
  const [textEditorHeight, setTextEditorHeight] = useState(300);
670
670
  const [licenseInfo, setLicenseInfo] = useState(null);
671
671
  const [magicMailTemplates, setMagicMailTemplates] = useState([]);
672
+ const [emailTemplates, setEmailTemplates] = useState([]);
672
673
  const placeholderList = useMemo(() => [
673
674
  {
674
675
  code: formatMessage({ id: getTrad("settings.email.placeholders.url") }),
@@ -773,15 +774,16 @@ _Falls du diesen Link nicht angefordert hast, ignoriere diese Nachricht._`,
773
774
  }, [get, toggleNotification, formatMessage]);
774
775
  useEffect(() => {
775
776
  const fetchEmailTemplates = async () => {
776
- if (emailDesignerInstalled) {
777
- try {
778
- const response = await get("/email-designer-5/templates");
779
- if (response && response.data) {
780
- setEmailTemplates(response.data);
781
- }
782
- } catch (error) {
783
- console.error("Error fetching email templates:", error);
784
- }
777
+ if (!emailDesignerInstalled) return;
778
+ try {
779
+ const response = await get("/email-designer-5/templates");
780
+ const payload = response?.data;
781
+ const templates = Array.isArray(payload) ? payload : payload?.data || payload?.templates || [];
782
+ setEmailTemplates(templates);
783
+ console.log(`✅ Email Designer templates loaded: ${templates.length}`);
784
+ } catch (error) {
785
+ console.error("❌ Error fetching email templates:", error);
786
+ setEmailTemplates([]);
785
787
  }
786
788
  };
787
789
  fetchEmailTemplates();
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-DoSROJog.js");
2
+ const index = require("../_chunks/index-BFzW7Xex.js");
3
3
  require("@strapi/icons");
4
4
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-C6WRQuex.mjs";
1
+ import { i } from "../_chunks/index-34ICAF9_.mjs";
2
2
  import "@strapi/icons";
3
3
  export {
4
4
  i as default