strapi-plugin-magic-sessionmanager 4.2.16 → 4.3.1

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 (23) hide show
  1. package/dist/_chunks/{Analytics-BC4jdzBT.mjs → Analytics-sX94t6D9.mjs} +2 -2
  2. package/dist/_chunks/{Analytics-D6RGeWO5.js → Analytics-tOOj5T92.js} +2 -2
  3. package/dist/_chunks/{App-CahdcIEB.mjs → App-Cs4KKd3L.mjs} +155 -54
  4. package/dist/_chunks/{App-BkaaNOpt.js → App-D4qVym6y.js} +154 -53
  5. package/dist/_chunks/{License-BFx721o7.mjs → License-CN5YpqIu.mjs} +1 -1
  6. package/dist/_chunks/{License-C8VnKtV1.js → License-kfVcskd3.js} +1 -1
  7. package/dist/_chunks/{OnlineUsersWidget-uJ6DZB_N.js → OnlineUsersWidget-Cg3R7602.js} +1 -1
  8. package/dist/_chunks/{OnlineUsersWidget-r2ZgSnok.mjs → OnlineUsersWidget-ytykP_tA.mjs} +1 -1
  9. package/dist/_chunks/{Settings-jtZRw_VP.js → Settings-DVRIrGho.js} +26 -54
  10. package/dist/_chunks/{Settings-DOUUwwxB.mjs → Settings-XloJ-aHl.mjs} +26 -54
  11. package/dist/_chunks/StyledButtons-D2EbG_Zw.js +419 -0
  12. package/dist/_chunks/StyledButtons-fbNVRlMY.mjs +418 -0
  13. package/dist/_chunks/{UpgradePage-mqr6dLVY.mjs → UpgradePage-C441wvPX.mjs} +1 -1
  14. package/dist/_chunks/{UpgradePage-Bwy_1m6f.js → UpgradePage-D2FRalDz.js} +1 -1
  15. package/dist/_chunks/{index-BuxWeACw.js → index-DtBfKBne.js} +236 -190
  16. package/dist/_chunks/{index-CUSrDKCG.mjs → index-Ij0JRf9W.mjs} +237 -193
  17. package/dist/_chunks/{useLicense-xjKLHcVq.mjs → useLicense-DJEDGSap.mjs} +1 -1
  18. package/dist/_chunks/{useLicense-D7FSpX8c.js → useLicense-NCFYHpDd.js} +1 -1
  19. package/dist/admin/index.js +1 -1
  20. package/dist/admin/index.mjs +1 -1
  21. package/dist/server/index.js +35938 -169
  22. package/dist/server/index.mjs +35927 -167
  23. package/package.json +7 -7
@@ -7,8 +7,9 @@ const designSystem = require("@strapi/design-system");
7
7
  const admin = require("@strapi/strapi/admin");
8
8
  const icons = require("@strapi/icons");
9
9
  const styled = require("styled-components");
10
- const index = require("./index-BuxWeACw.js");
11
- const useLicense = require("./useLicense-D7FSpX8c.js");
10
+ const index = require("./index-DtBfKBne.js");
11
+ const useLicense = require("./useLicense-NCFYHpDd.js");
12
+ const StyledButtons = require("./StyledButtons-D2EbG_Zw.js");
12
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
14
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
14
15
  const theme = {
@@ -641,12 +642,11 @@ const SettingsPage = () => {
641
642
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "danger600", style: { fontSize: "13px", lineHeight: "1.7" }, children: t("settings.general.danger.description", "Clean All Inactive: Permanently deletes all inactive sessions. This cannot be undone.") })
642
643
  ] }),
643
644
  /* @__PURE__ */ jsxRuntime.jsx(
644
- designSystem.Button,
645
+ StyledButtons.DangerButton,
645
646
  {
646
647
  onClick: handleCleanInactive,
647
648
  loading: cleaning,
648
649
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
649
- variant: "danger",
650
650
  size: "S",
651
651
  style: { flexShrink: 0 },
652
652
  children: t("settings.general.danger.cleanNow", "Clean Now")
@@ -705,9 +705,8 @@ const SettingsPage = () => {
705
705
  }
706
706
  ) }),
707
707
  /* @__PURE__ */ jsxRuntime.jsx(
708
- designSystem.Button,
708
+ StyledButtons.ShowHideButton,
709
709
  {
710
- variant: "secondary",
711
710
  onClick: () => setShowEncryptionKey(!showEncryptionKey),
712
711
  size: "L",
713
712
  children: showEncryptionKey ? t("settings.security.encryption.hide", "Hide") : t("settings.security.encryption.show", "Show")
@@ -716,9 +715,8 @@ const SettingsPage = () => {
716
715
  ] }),
717
716
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 3, children: [
718
717
  /* @__PURE__ */ jsxRuntime.jsx(
719
- designSystem.Button,
718
+ StyledButtons.GradientButton,
720
719
  {
721
- variant: "default",
722
720
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Code, {}),
723
721
  onClick: () => {
724
722
  const key = generateSecureKey();
@@ -734,9 +732,8 @@ const SettingsPage = () => {
734
732
  }
735
733
  ),
736
734
  /* @__PURE__ */ jsxRuntime.jsx(
737
- designSystem.Button,
735
+ StyledButtons.CopyButton,
738
736
  {
739
- variant: "tertiary",
740
737
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Duplicate, {}),
741
738
  onClick: () => {
742
739
  if (encryptionKey) {
@@ -753,9 +750,8 @@ const SettingsPage = () => {
753
750
  }
754
751
  ),
755
752
  /* @__PURE__ */ jsxRuntime.jsx(
756
- designSystem.Button,
753
+ StyledButtons.CopyButton,
757
754
  {
758
- variant: "tertiary",
759
755
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Duplicate, {}),
760
756
  onClick: () => {
761
757
  if (encryptionKey) {
@@ -1098,10 +1094,9 @@ const SettingsPage = () => {
1098
1094
  ] }),
1099
1095
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { variant: "success", children: t("settings.email.templates.html.badge", "Main Template") })
1100
1096
  ] }),
1101
- /* @__PURE__ */ jsxRuntime.jsxs(
1102
- designSystem.Button,
1097
+ /* @__PURE__ */ jsxRuntime.jsx(
1098
+ StyledButtons.TertiaryButton,
1103
1099
  {
1104
- variant: "tertiary",
1105
1100
  size: "S",
1106
1101
  onClick: () => {
1107
1102
  const defaultTemplates = getDefaultTemplates();
@@ -1110,10 +1105,7 @@ const SettingsPage = () => {
1110
1105
  handleChange("emailTemplates", newTemplates);
1111
1106
  toggleNotification({ type: "success", message: t("notifications.success.defaultLoaded", "Default template loaded!") });
1112
1107
  },
1113
- children: [
1114
- "📋 ",
1115
- t("settings.email.templates.html.loadDefault", "Load Default")
1116
- ]
1108
+ children: t("settings.email.templates.html.loadDefault", "Load Default")
1117
1109
  }
1118
1110
  )
1119
1111
  ] }),
@@ -1173,25 +1165,20 @@ const SettingsPage = () => {
1173
1165
  }
1174
1166
  ),
1175
1167
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, style: { marginTop: "12px" }, wrap: "wrap", children: [
1176
- /* @__PURE__ */ jsxRuntime.jsxs(
1177
- designSystem.Button,
1168
+ /* @__PURE__ */ jsxRuntime.jsx(
1169
+ StyledButtons.CopyButton,
1178
1170
  {
1179
- variant: "secondary",
1180
1171
  size: "S",
1181
1172
  onClick: () => {
1182
1173
  navigator.clipboard.writeText(settings.emailTemplates[templateKey].html);
1183
1174
  toggleNotification({ type: "success", message: t("notifications.success.htmlCopied", "HTML template copied!") });
1184
1175
  },
1185
- children: [
1186
- "📋 ",
1187
- t("settings.email.templates.html.copy", "Copy Template")
1188
- ]
1176
+ children: t("settings.email.templates.html.copy", "Copy Template")
1189
1177
  }
1190
1178
  ),
1191
- /* @__PURE__ */ jsxRuntime.jsxs(
1192
- designSystem.Button,
1179
+ /* @__PURE__ */ jsxRuntime.jsx(
1180
+ StyledButtons.SecondaryButton,
1193
1181
  {
1194
- variant: "tertiary",
1195
1182
  size: "S",
1196
1183
  onClick: () => {
1197
1184
  const validation = validateTemplate(settings.emailTemplates[templateKey].html, templateKey);
@@ -1200,16 +1187,12 @@ const SettingsPage = () => {
1200
1187
  message: validation.isValid ? t("notifications.success.validated", "Template valid! Found {found}/{total} variables.", { found: validation.foundVars.length, total: validation.totalAvailable }) : t("notifications.warning.noVariables", "[WARNING] No variables found. Add at least one variable.")
1201
1188
  });
1202
1189
  },
1203
- children: [
1204
- "✓ ",
1205
- t("settings.email.templates.html.validate", "Validate")
1206
- ]
1190
+ children: t("settings.email.templates.html.validate", "Validate")
1207
1191
  }
1208
1192
  ),
1209
- /* @__PURE__ */ jsxRuntime.jsxs(
1210
- designSystem.Button,
1193
+ /* @__PURE__ */ jsxRuntime.jsx(
1194
+ StyledButtons.TertiaryButton,
1211
1195
  {
1212
- variant: "tertiary",
1213
1196
  size: "S",
1214
1197
  onClick: () => {
1215
1198
  const lines = settings.emailTemplates[templateKey].html.split("\n").length;
@@ -1219,10 +1202,7 @@ const SettingsPage = () => {
1219
1202
  message: t("notifications.info.templateStats", "Template has {lines} lines and {chars} characters", { lines, chars })
1220
1203
  });
1221
1204
  },
1222
- children: [
1223
- "ℹ️ ",
1224
- t("settings.email.templates.html.info", "Template Info")
1225
- ]
1205
+ children: t("settings.email.templates.html.info", "Template Info")
1226
1206
  }
1227
1207
  )
1228
1208
  ] })
@@ -1244,10 +1224,9 @@ const SettingsPage = () => {
1244
1224
  ] }),
1245
1225
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { variant: "secondary", children: t("settings.email.templates.text.badge", "Fallback") })
1246
1226
  ] }),
1247
- /* @__PURE__ */ jsxRuntime.jsxs(
1248
- designSystem.Button,
1227
+ /* @__PURE__ */ jsxRuntime.jsx(
1228
+ StyledButtons.TertiaryButton,
1249
1229
  {
1250
- variant: "tertiary",
1251
1230
  size: "S",
1252
1231
  onClick: () => {
1253
1232
  const defaultTemplates = getDefaultTemplates();
@@ -1256,10 +1235,7 @@ const SettingsPage = () => {
1256
1235
  handleChange("emailTemplates", newTemplates);
1257
1236
  toggleNotification({ type: "success", message: t("notifications.success.defaultLoaded", "Default template loaded!") });
1258
1237
  },
1259
- children: [
1260
- "📋 ",
1261
- t("settings.email.templates.text.loadDefault", "Load Default")
1262
- ]
1238
+ children: t("settings.email.templates.text.loadDefault", "Load Default")
1263
1239
  }
1264
1240
  )
1265
1241
  ] }),
@@ -1318,19 +1294,15 @@ const SettingsPage = () => {
1318
1294
  ]
1319
1295
  }
1320
1296
  ),
1321
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, style: { marginTop: "12px" }, wrap: "wrap", children: /* @__PURE__ */ jsxRuntime.jsxs(
1322
- designSystem.Button,
1297
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, style: { marginTop: "12px" }, wrap: "wrap", children: /* @__PURE__ */ jsxRuntime.jsx(
1298
+ StyledButtons.CopyButton,
1323
1299
  {
1324
- variant: "secondary",
1325
1300
  size: "S",
1326
1301
  onClick: () => {
1327
1302
  navigator.clipboard.writeText(settings.emailTemplates[templateKey].text);
1328
1303
  toggleNotification({ type: "success", message: t("notifications.success.textCopied", "Text template copied!") });
1329
1304
  },
1330
- children: [
1331
- "📋 ",
1332
- t("settings.email.templates.text.copy", "Copy Template")
1333
- ]
1305
+ children: t("settings.email.templates.text.copy", "Copy Template")
1334
1306
  }
1335
1307
  ) })
1336
1308
  ]
@@ -5,8 +5,9 @@ import { Flex, Loader, Typography, Button, Box, Badge, Accordion, Grid, SingleSe
5
5
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
6
6
  import { Check, Information, Cog, Trash, Shield, Code, Duplicate, Mail } from "@strapi/icons";
7
7
  import styled, { css, keyframes } from "styled-components";
8
- import { a as pluginId, g as getTranslation } from "./index-CUSrDKCG.mjs";
9
- import { u as useLicense } from "./useLicense-xjKLHcVq.mjs";
8
+ import { a as pluginId, g as getTranslation } from "./index-Ij0JRf9W.mjs";
9
+ import { u as useLicense } from "./useLicense-DJEDGSap.mjs";
10
+ import { D as DangerButton, S as ShowHideButton, G as GradientButton, C as CopyButton, T as TertiaryButton, c as SecondaryButton } from "./StyledButtons-fbNVRlMY.mjs";
10
11
  const theme = {
11
12
  colors: {
12
13
  primary: { 600: "#0284C7", 700: "#075985", 100: "#E0F2FE", 50: "#F0F9FF" },
@@ -637,12 +638,11 @@ const SettingsPage = () => {
637
638
  /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "danger600", style: { fontSize: "13px", lineHeight: "1.7" }, children: t("settings.general.danger.description", "Clean All Inactive: Permanently deletes all inactive sessions. This cannot be undone.") })
638
639
  ] }),
639
640
  /* @__PURE__ */ jsx(
640
- Button,
641
+ DangerButton,
641
642
  {
642
643
  onClick: handleCleanInactive,
643
644
  loading: cleaning,
644
645
  startIcon: /* @__PURE__ */ jsx(Trash, {}),
645
- variant: "danger",
646
646
  size: "S",
647
647
  style: { flexShrink: 0 },
648
648
  children: t("settings.general.danger.cleanNow", "Clean Now")
@@ -701,9 +701,8 @@ const SettingsPage = () => {
701
701
  }
702
702
  ) }),
703
703
  /* @__PURE__ */ jsx(
704
- Button,
704
+ ShowHideButton,
705
705
  {
706
- variant: "secondary",
707
706
  onClick: () => setShowEncryptionKey(!showEncryptionKey),
708
707
  size: "L",
709
708
  children: showEncryptionKey ? t("settings.security.encryption.hide", "Hide") : t("settings.security.encryption.show", "Show")
@@ -712,9 +711,8 @@ const SettingsPage = () => {
712
711
  ] }),
713
712
  /* @__PURE__ */ jsxs(Flex, { gap: 3, children: [
714
713
  /* @__PURE__ */ jsx(
715
- Button,
714
+ GradientButton,
716
715
  {
717
- variant: "default",
718
716
  startIcon: /* @__PURE__ */ jsx(Code, {}),
719
717
  onClick: () => {
720
718
  const key = generateSecureKey();
@@ -730,9 +728,8 @@ const SettingsPage = () => {
730
728
  }
731
729
  ),
732
730
  /* @__PURE__ */ jsx(
733
- Button,
731
+ CopyButton,
734
732
  {
735
- variant: "tertiary",
736
733
  startIcon: /* @__PURE__ */ jsx(Duplicate, {}),
737
734
  onClick: () => {
738
735
  if (encryptionKey) {
@@ -749,9 +746,8 @@ const SettingsPage = () => {
749
746
  }
750
747
  ),
751
748
  /* @__PURE__ */ jsx(
752
- Button,
749
+ CopyButton,
753
750
  {
754
- variant: "tertiary",
755
751
  startIcon: /* @__PURE__ */ jsx(Duplicate, {}),
756
752
  onClick: () => {
757
753
  if (encryptionKey) {
@@ -1094,10 +1090,9 @@ const SettingsPage = () => {
1094
1090
  ] }),
1095
1091
  /* @__PURE__ */ jsx(Badge, { variant: "success", children: t("settings.email.templates.html.badge", "Main Template") })
1096
1092
  ] }),
1097
- /* @__PURE__ */ jsxs(
1098
- Button,
1093
+ /* @__PURE__ */ jsx(
1094
+ TertiaryButton,
1099
1095
  {
1100
- variant: "tertiary",
1101
1096
  size: "S",
1102
1097
  onClick: () => {
1103
1098
  const defaultTemplates = getDefaultTemplates();
@@ -1106,10 +1101,7 @@ const SettingsPage = () => {
1106
1101
  handleChange("emailTemplates", newTemplates);
1107
1102
  toggleNotification({ type: "success", message: t("notifications.success.defaultLoaded", "Default template loaded!") });
1108
1103
  },
1109
- children: [
1110
- "📋 ",
1111
- t("settings.email.templates.html.loadDefault", "Load Default")
1112
- ]
1104
+ children: t("settings.email.templates.html.loadDefault", "Load Default")
1113
1105
  }
1114
1106
  )
1115
1107
  ] }),
@@ -1169,25 +1161,20 @@ const SettingsPage = () => {
1169
1161
  }
1170
1162
  ),
1171
1163
  /* @__PURE__ */ jsxs(Flex, { gap: 2, style: { marginTop: "12px" }, wrap: "wrap", children: [
1172
- /* @__PURE__ */ jsxs(
1173
- Button,
1164
+ /* @__PURE__ */ jsx(
1165
+ CopyButton,
1174
1166
  {
1175
- variant: "secondary",
1176
1167
  size: "S",
1177
1168
  onClick: () => {
1178
1169
  navigator.clipboard.writeText(settings.emailTemplates[templateKey].html);
1179
1170
  toggleNotification({ type: "success", message: t("notifications.success.htmlCopied", "HTML template copied!") });
1180
1171
  },
1181
- children: [
1182
- "📋 ",
1183
- t("settings.email.templates.html.copy", "Copy Template")
1184
- ]
1172
+ children: t("settings.email.templates.html.copy", "Copy Template")
1185
1173
  }
1186
1174
  ),
1187
- /* @__PURE__ */ jsxs(
1188
- Button,
1175
+ /* @__PURE__ */ jsx(
1176
+ SecondaryButton,
1189
1177
  {
1190
- variant: "tertiary",
1191
1178
  size: "S",
1192
1179
  onClick: () => {
1193
1180
  const validation = validateTemplate(settings.emailTemplates[templateKey].html, templateKey);
@@ -1196,16 +1183,12 @@ const SettingsPage = () => {
1196
1183
  message: validation.isValid ? t("notifications.success.validated", "Template valid! Found {found}/{total} variables.", { found: validation.foundVars.length, total: validation.totalAvailable }) : t("notifications.warning.noVariables", "[WARNING] No variables found. Add at least one variable.")
1197
1184
  });
1198
1185
  },
1199
- children: [
1200
- "✓ ",
1201
- t("settings.email.templates.html.validate", "Validate")
1202
- ]
1186
+ children: t("settings.email.templates.html.validate", "Validate")
1203
1187
  }
1204
1188
  ),
1205
- /* @__PURE__ */ jsxs(
1206
- Button,
1189
+ /* @__PURE__ */ jsx(
1190
+ TertiaryButton,
1207
1191
  {
1208
- variant: "tertiary",
1209
1192
  size: "S",
1210
1193
  onClick: () => {
1211
1194
  const lines = settings.emailTemplates[templateKey].html.split("\n").length;
@@ -1215,10 +1198,7 @@ const SettingsPage = () => {
1215
1198
  message: t("notifications.info.templateStats", "Template has {lines} lines and {chars} characters", { lines, chars })
1216
1199
  });
1217
1200
  },
1218
- children: [
1219
- "ℹ️ ",
1220
- t("settings.email.templates.html.info", "Template Info")
1221
- ]
1201
+ children: t("settings.email.templates.html.info", "Template Info")
1222
1202
  }
1223
1203
  )
1224
1204
  ] })
@@ -1240,10 +1220,9 @@ const SettingsPage = () => {
1240
1220
  ] }),
1241
1221
  /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: t("settings.email.templates.text.badge", "Fallback") })
1242
1222
  ] }),
1243
- /* @__PURE__ */ jsxs(
1244
- Button,
1223
+ /* @__PURE__ */ jsx(
1224
+ TertiaryButton,
1245
1225
  {
1246
- variant: "tertiary",
1247
1226
  size: "S",
1248
1227
  onClick: () => {
1249
1228
  const defaultTemplates = getDefaultTemplates();
@@ -1252,10 +1231,7 @@ const SettingsPage = () => {
1252
1231
  handleChange("emailTemplates", newTemplates);
1253
1232
  toggleNotification({ type: "success", message: t("notifications.success.defaultLoaded", "Default template loaded!") });
1254
1233
  },
1255
- children: [
1256
- "📋 ",
1257
- t("settings.email.templates.text.loadDefault", "Load Default")
1258
- ]
1234
+ children: t("settings.email.templates.text.loadDefault", "Load Default")
1259
1235
  }
1260
1236
  )
1261
1237
  ] }),
@@ -1314,19 +1290,15 @@ const SettingsPage = () => {
1314
1290
  ]
1315
1291
  }
1316
1292
  ),
1317
- /* @__PURE__ */ jsx(Flex, { gap: 2, style: { marginTop: "12px" }, wrap: "wrap", children: /* @__PURE__ */ jsxs(
1318
- Button,
1293
+ /* @__PURE__ */ jsx(Flex, { gap: 2, style: { marginTop: "12px" }, wrap: "wrap", children: /* @__PURE__ */ jsx(
1294
+ CopyButton,
1319
1295
  {
1320
- variant: "secondary",
1321
1296
  size: "S",
1322
1297
  onClick: () => {
1323
1298
  navigator.clipboard.writeText(settings.emailTemplates[templateKey].text);
1324
1299
  toggleNotification({ type: "success", message: t("notifications.success.textCopied", "Text template copied!") });
1325
1300
  },
1326
- children: [
1327
- "📋 ",
1328
- t("settings.email.templates.text.copy", "Copy Template")
1329
- ]
1301
+ children: t("settings.email.templates.text.copy", "Copy Template")
1330
1302
  }
1331
1303
  ) })
1332
1304
  ]