strapi-plugin-oidc 1.7.4 → 1.7.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.
@@ -166,7 +166,7 @@ const index = {
166
166
  defaultMessage: "Configuration"
167
167
  },
168
168
  Component: async () => {
169
- return await Promise.resolve().then(() => require("./index-Bkm_yRhZ.js"));
169
+ return await Promise.resolve().then(() => require("./index-D2rlNx1-.js"));
170
170
  },
171
171
  permissions: [{ action: "plugin::strapi-plugin-oidc.read", subject: null }]
172
172
  }
@@ -7,7 +7,7 @@ const react = require("react");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const reactIntl = require("react-intl");
10
- const index = require("./index-BxbFHOUO.js");
10
+ const index = require("./index-CrnGXADu.js");
11
11
  const styled = require("styled-components");
12
12
  const lucideReact = require("lucide-react");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -70,15 +70,21 @@ const TagInputWrapper = styled__default.default(designSystem.Box)`
70
70
  flex-wrap: wrap;
71
71
  gap: 4px;
72
72
  align-items: center;
73
- padding: 8px 16px;
73
+ padding-inline: ${({ theme }) => theme.spaces[4]};
74
+ padding-block: ${({ theme }) => theme.spaces[3]};
74
75
  border-radius: 4px;
75
76
  border: 1px solid ${({ theme }) => theme.colors.neutral200};
76
77
  background-color: ${({ theme }) => theme.colors.neutral0};
77
78
  cursor: text;
78
79
  min-width: 220px;
79
- min-height: 4rem;
80
+ min-height: 4.8rem;
80
81
  flex: 0 0 auto;
81
82
 
83
+ ${({ theme }) => theme.breakpoints.medium} {
84
+ padding-block: ${({ theme }) => theme.spaces[2]};
85
+ min-height: 4rem;
86
+ }
87
+
82
88
  &:focus-within {
83
89
  border-color: ${({ theme }) => theme.colors.primary600};
84
90
  box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primary100};
@@ -356,8 +362,7 @@ function ComboboxTagInput({ value, onChange, placeholder, startIcon, options })
356
362
  "aria-autocomplete": "list",
357
363
  "aria-expanded": dropdownOpen,
358
364
  "aria-controls": listboxId,
359
- "aria-activedescendant": activeDescendant,
360
- autoComplete: "off"
365
+ "aria-activedescendant": activeDescendant
361
366
  },
362
367
  children: dropdownOpen && /* @__PURE__ */ jsxRuntime.jsx(Dropdown, { id: listboxId, role: "listbox", children: filteredOptions.map((opt, i) => /* @__PURE__ */ jsxRuntime.jsx(
363
368
  DropdownItem,
@@ -739,6 +744,16 @@ function TagDateInput({ value = [], onChange, placeholder, startIcon }) {
739
744
  }
740
745
  );
741
746
  }
747
+ const SizedButton = styled__default.default(designSystem.Button)`
748
+ && {
749
+ height: 4.8rem;
750
+ }
751
+ ${({ theme }) => theme.breakpoints.medium} {
752
+ && {
753
+ height: 4rem;
754
+ }
755
+ }
756
+ `;
742
757
  const Icon = styled__default.default.span`
743
758
  display: inline-flex;
744
759
  align-items: center;
@@ -903,91 +918,98 @@ function Whitelist({
903
918
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
904
919
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "omega", textColor: "neutral600", marginBottom: 4, children: formatMessage(index.getTrad("whitelist.description")) }),
905
920
  useWhitelist && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
906
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 8, marginTop: 5, marginBottom: 5, alignItems: "stretch", wrap: "wrap", children: [
907
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", style: { minWidth: "280px", flex: "1 1 280px" }, children: [
908
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: 1, minWidth: "200px" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(
909
- designSystem.Field.Input,
910
- {
911
- type: "text",
912
- disabled: loading,
913
- value: email,
914
- hasError: Boolean(email && !EMAIL_REGEX.test(email)),
915
- onChange: (e) => setEmail(e.currentTarget.value),
916
- placeholder: formatMessage(index.getTrad("whitelist.email.placeholder")),
917
- style: { fontSize: "1.4rem", lineHeight: "2.2rem" }
918
- }
919
- ) }) }),
920
- /* @__PURE__ */ jsxRuntime.jsx(
921
- designSystem.Button,
922
- {
923
- size: "S",
924
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
925
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
926
- disabled: loading || email.trim() === "" || !EMAIL_REGEX.test(email),
927
- loading,
928
- onClick: onSaveEmail,
929
- children: formatMessage(index.getTrad("page.add"))
930
- }
931
- )
932
- ] }),
933
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
934
- /* @__PURE__ */ jsxRuntime.jsx(
935
- designSystem.Button,
936
- {
937
- size: "S",
938
- variant: "tertiary",
939
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
940
- onClick: onExport,
941
- disabled: users.length === 0,
942
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
943
- children: formatMessage(index.getTrad("whitelist.export"))
944
- }
945
- ),
946
- /* @__PURE__ */ jsxRuntime.jsx(
947
- designSystem.Button,
948
- {
949
- size: "S",
950
- variant: "tertiary",
951
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Upload, {}),
952
- onClick: () => fileInputRef.current?.click(),
953
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
954
- children: formatMessage(index.getTrad("whitelist.import"))
955
- }
956
- ),
957
- /* @__PURE__ */ jsxRuntime.jsx(
958
- "input",
959
- {
960
- ref: fileInputRef,
961
- type: "file",
962
- accept: ".json,application/json",
963
- style: { display: "none" },
964
- onChange: handleImport
965
- }
966
- ),
967
- /* @__PURE__ */ jsxRuntime.jsx(
968
- ConfirmDialog,
969
- {
970
- trigger: /* @__PURE__ */ jsxRuntime.jsx(
971
- designSystem.Button,
921
+ /* @__PURE__ */ jsxRuntime.jsxs(
922
+ designSystem.Flex,
923
+ {
924
+ gap: 8,
925
+ marginTop: 5,
926
+ marginBottom: 5,
927
+ alignItems: "stretch",
928
+ wrap: "wrap",
929
+ style: { rowGap: "0.8rem" },
930
+ children: [
931
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", style: { minWidth: "280px", flex: "1 1 280px" }, children: [
932
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: 1, minWidth: "200px" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(
933
+ designSystem.Field.Input,
934
+ {
935
+ type: "text",
936
+ disabled: loading,
937
+ value: email,
938
+ hasError: Boolean(email && !EMAIL_REGEX.test(email)),
939
+ onChange: (e) => setEmail(e.currentTarget.value),
940
+ placeholder: formatMessage(index.getTrad("whitelist.email.placeholder")),
941
+ style: { fontSize: "1.4rem", lineHeight: "2.2rem" }
942
+ }
943
+ ) }) }),
944
+ /* @__PURE__ */ jsxRuntime.jsx(
945
+ SizedButton,
972
946
  {
973
947
  size: "S",
974
- variant: "danger-light",
975
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
948
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
949
+ disabled: loading || email.trim() === "" || !EMAIL_REGEX.test(email),
950
+ loading,
951
+ onClick: onSaveEmail,
952
+ children: formatMessage(index.getTrad("page.add"))
953
+ }
954
+ )
955
+ ] }),
956
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
957
+ /* @__PURE__ */ jsxRuntime.jsx(
958
+ SizedButton,
959
+ {
960
+ size: "S",
961
+ variant: "tertiary",
962
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
963
+ onClick: onExport,
976
964
  disabled: users.length === 0,
977
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
978
- children: formatMessage(index.getTrad("whitelist.delete.all.label"))
965
+ children: formatMessage(index.getTrad("whitelist.export"))
979
966
  }
980
967
  ),
981
- title: formatMessage(index.getTrad("whitelist.delete.all.title")),
982
- body: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", textAlign: "center", children: formatMessage(index.getTrad("whitelist.delete.all.description"), {
983
- count: users.length
984
- }) }) }),
985
- confirmLabel: formatMessage(index.getTrad("whitelist.delete.all.label")),
986
- onConfirm: onDeleteAll
987
- }
988
- )
989
- ] })
990
- ] }),
968
+ /* @__PURE__ */ jsxRuntime.jsx(
969
+ SizedButton,
970
+ {
971
+ size: "S",
972
+ variant: "tertiary",
973
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Upload, {}),
974
+ onClick: () => fileInputRef.current?.click(),
975
+ children: formatMessage(index.getTrad("whitelist.import"))
976
+ }
977
+ ),
978
+ /* @__PURE__ */ jsxRuntime.jsx(
979
+ "input",
980
+ {
981
+ ref: fileInputRef,
982
+ type: "file",
983
+ accept: ".json,application/json",
984
+ style: { display: "none" },
985
+ onChange: handleImport
986
+ }
987
+ ),
988
+ /* @__PURE__ */ jsxRuntime.jsx(
989
+ ConfirmDialog,
990
+ {
991
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
992
+ SizedButton,
993
+ {
994
+ size: "S",
995
+ variant: "danger-light",
996
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
997
+ disabled: users.length === 0,
998
+ children: formatMessage(index.getTrad("whitelist.delete.all.label"))
999
+ }
1000
+ ),
1001
+ title: formatMessage(index.getTrad("whitelist.delete.all.title")),
1002
+ body: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", textAlign: "center", children: formatMessage(index.getTrad("whitelist.delete.all.description"), {
1003
+ count: users.length
1004
+ }) }) }),
1005
+ confirmLabel: formatMessage(index.getTrad("whitelist.delete.all.label")),
1006
+ onConfirm: onDeleteAll
1007
+ }
1008
+ )
1009
+ ] })
1010
+ ]
1011
+ }
1012
+ ),
991
1013
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
992
1014
  /* @__PURE__ */ jsxRuntime.jsxs(CustomTable, { colCount: 4, rowCount: users.length, children: [
993
1015
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
@@ -3732,14 +3754,13 @@ function AuditLog({ title } = {}) {
3732
3754
  title ?? /* @__PURE__ */ jsxRuntime.jsx("span", {}),
3733
3755
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
3734
3756
  /* @__PURE__ */ jsxRuntime.jsx(
3735
- designSystem.Button,
3757
+ SizedButton,
3736
3758
  {
3737
3759
  size: "S",
3738
3760
  variant: "tertiary",
3739
3761
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
3740
3762
  onClick: handleExport,
3741
3763
  disabled: pagination.total === 0,
3742
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
3743
3764
  children: formatMessage(index.getTrad("auditlog.export"))
3744
3765
  }
3745
3766
  ),
@@ -3747,13 +3768,12 @@ function AuditLog({ title } = {}) {
3747
3768
  ConfirmDialog,
3748
3769
  {
3749
3770
  trigger: /* @__PURE__ */ jsxRuntime.jsx(
3750
- designSystem.Button,
3771
+ SizedButton,
3751
3772
  {
3752
3773
  size: "S",
3753
3774
  variant: "danger-light",
3754
3775
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
3755
3776
  disabled: pagination.total === 0,
3756
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
3757
3777
  children: formatMessage(index.getTrad("auditlog.clear"))
3758
3778
  }
3759
3779
  ),
@@ -3834,13 +3854,12 @@ function AuditLog({ title } = {}) {
3834
3854
  }
3835
3855
  ),
3836
3856
  hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsx(
3837
- designSystem.Button,
3857
+ SizedButton,
3838
3858
  {
3839
3859
  size: "S",
3840
3860
  variant: "danger-light",
3841
3861
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
3842
3862
  onClick: clearFilters,
3843
- style: { height: "4rem" },
3844
3863
  children: formatMessage(index.getTrad("auditlog.filters.clear"))
3845
3864
  }
3846
3865
  )
@@ -4361,7 +4380,7 @@ function HomePage$1() {
4361
4380
  ] }) })
4362
4381
  ] })
4363
4382
  ] }),
4364
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(
4383
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", marginBottom: 8, children: /* @__PURE__ */ jsxRuntime.jsx(
4365
4384
  designSystem.Button,
4366
4385
  {
4367
4386
  size: "L",
@@ -165,7 +165,7 @@ const index = {
165
165
  defaultMessage: "Configuration"
166
166
  },
167
167
  Component: async () => {
168
- return await import("./index-BO4eHxAw.mjs");
168
+ return await import("./index-pieFAsgM.mjs");
169
169
  },
170
170
  permissions: [{ action: "plugin::strapi-plugin-oidc.read", subject: null }]
171
171
  }
@@ -2,10 +2,10 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useBlocker, Routes, Route } from "react-router-dom";
3
3
  import { useNotification, useFetchClient, Page, Layouts } from "@strapi/strapi/admin";
4
4
  import { useState, useRef, useId, useEffect, useCallback, useReducer, useMemo, memo } from "react";
5
- import { Typography, Flex, Box, MultiSelect, MultiSelectOption, Dialog, Button, Table, Pagination, PreviousLink, NextLink, PageLink, Field, Divider, Thead, Tr, Th, Tbody, Td, IconButton, Tooltip, Alert } from "@strapi/design-system";
5
+ import { Typography, Flex, Box, MultiSelect, MultiSelectOption, Button, Dialog, Table, Pagination, PreviousLink, NextLink, PageLink, Field, Divider, Thead, Tr, Th, Tbody, Td, IconButton, Tooltip, Alert } from "@strapi/design-system";
6
6
  import { Cross, WarningCircle, Plus, Download, Upload, Trash, Calendar, Mail, Information } from "@strapi/icons";
7
7
  import { useIntl } from "react-intl";
8
- import { g as getTrad } from "./index-5ifX6lA1.mjs";
8
+ import { g as getTrad } from "./index-DRJ6Ty2J.mjs";
9
9
  import styled from "styled-components";
10
10
  import { Filter, ClipboardList, Server } from "lucide-react";
11
11
  function Role({ oidcRoles, roles, onChangeRole }) {
@@ -66,15 +66,21 @@ const TagInputWrapper = styled(Box)`
66
66
  flex-wrap: wrap;
67
67
  gap: 4px;
68
68
  align-items: center;
69
- padding: 8px 16px;
69
+ padding-inline: ${({ theme }) => theme.spaces[4]};
70
+ padding-block: ${({ theme }) => theme.spaces[3]};
70
71
  border-radius: 4px;
71
72
  border: 1px solid ${({ theme }) => theme.colors.neutral200};
72
73
  background-color: ${({ theme }) => theme.colors.neutral0};
73
74
  cursor: text;
74
75
  min-width: 220px;
75
- min-height: 4rem;
76
+ min-height: 4.8rem;
76
77
  flex: 0 0 auto;
77
78
 
79
+ ${({ theme }) => theme.breakpoints.medium} {
80
+ padding-block: ${({ theme }) => theme.spaces[2]};
81
+ min-height: 4rem;
82
+ }
83
+
78
84
  &:focus-within {
79
85
  border-color: ${({ theme }) => theme.colors.primary600};
80
86
  box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primary100};
@@ -352,8 +358,7 @@ function ComboboxTagInput({ value, onChange, placeholder, startIcon, options })
352
358
  "aria-autocomplete": "list",
353
359
  "aria-expanded": dropdownOpen,
354
360
  "aria-controls": listboxId,
355
- "aria-activedescendant": activeDescendant,
356
- autoComplete: "off"
361
+ "aria-activedescendant": activeDescendant
357
362
  },
358
363
  children: dropdownOpen && /* @__PURE__ */ jsx(Dropdown, { id: listboxId, role: "listbox", children: filteredOptions.map((opt, i) => /* @__PURE__ */ jsx(
359
364
  DropdownItem,
@@ -735,6 +740,16 @@ function TagDateInput({ value = [], onChange, placeholder, startIcon }) {
735
740
  }
736
741
  );
737
742
  }
743
+ const SizedButton = styled(Button)`
744
+ && {
745
+ height: 4.8rem;
746
+ }
747
+ ${({ theme }) => theme.breakpoints.medium} {
748
+ && {
749
+ height: 4rem;
750
+ }
751
+ }
752
+ `;
738
753
  const Icon = styled.span`
739
754
  display: inline-flex;
740
755
  align-items: center;
@@ -899,91 +914,98 @@ function Whitelist({
899
914
  return /* @__PURE__ */ jsxs(Box, { children: [
900
915
  /* @__PURE__ */ jsx(Typography, { tag: "p", variant: "omega", textColor: "neutral600", marginBottom: 4, children: formatMessage(getTrad("whitelist.description")) }),
901
916
  useWhitelist && /* @__PURE__ */ jsxs(Fragment, { children: [
902
- /* @__PURE__ */ jsxs(Flex, { gap: 8, marginTop: 5, marginBottom: 5, alignItems: "stretch", wrap: "wrap", children: [
903
- /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "center", style: { minWidth: "280px", flex: "1 1 280px" }, children: [
904
- /* @__PURE__ */ jsx(Box, { style: { flex: 1, minWidth: "200px" }, children: /* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsx(
905
- Field.Input,
906
- {
907
- type: "text",
908
- disabled: loading,
909
- value: email,
910
- hasError: Boolean(email && !EMAIL_REGEX.test(email)),
911
- onChange: (e) => setEmail(e.currentTarget.value),
912
- placeholder: formatMessage(getTrad("whitelist.email.placeholder")),
913
- style: { fontSize: "1.4rem", lineHeight: "2.2rem" }
914
- }
915
- ) }) }),
916
- /* @__PURE__ */ jsx(
917
- Button,
918
- {
919
- size: "S",
920
- startIcon: /* @__PURE__ */ jsx(Plus, {}),
921
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
922
- disabled: loading || email.trim() === "" || !EMAIL_REGEX.test(email),
923
- loading,
924
- onClick: onSaveEmail,
925
- children: formatMessage(getTrad("page.add"))
926
- }
927
- )
928
- ] }),
929
- /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "center", children: [
930
- /* @__PURE__ */ jsx(
931
- Button,
932
- {
933
- size: "S",
934
- variant: "tertiary",
935
- startIcon: /* @__PURE__ */ jsx(Download, {}),
936
- onClick: onExport,
937
- disabled: users.length === 0,
938
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
939
- children: formatMessage(getTrad("whitelist.export"))
940
- }
941
- ),
942
- /* @__PURE__ */ jsx(
943
- Button,
944
- {
945
- size: "S",
946
- variant: "tertiary",
947
- startIcon: /* @__PURE__ */ jsx(Upload, {}),
948
- onClick: () => fileInputRef.current?.click(),
949
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
950
- children: formatMessage(getTrad("whitelist.import"))
951
- }
952
- ),
953
- /* @__PURE__ */ jsx(
954
- "input",
955
- {
956
- ref: fileInputRef,
957
- type: "file",
958
- accept: ".json,application/json",
959
- style: { display: "none" },
960
- onChange: handleImport
961
- }
962
- ),
963
- /* @__PURE__ */ jsx(
964
- ConfirmDialog,
965
- {
966
- trigger: /* @__PURE__ */ jsx(
967
- Button,
917
+ /* @__PURE__ */ jsxs(
918
+ Flex,
919
+ {
920
+ gap: 8,
921
+ marginTop: 5,
922
+ marginBottom: 5,
923
+ alignItems: "stretch",
924
+ wrap: "wrap",
925
+ style: { rowGap: "0.8rem" },
926
+ children: [
927
+ /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "center", style: { minWidth: "280px", flex: "1 1 280px" }, children: [
928
+ /* @__PURE__ */ jsx(Box, { style: { flex: 1, minWidth: "200px" }, children: /* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsx(
929
+ Field.Input,
930
+ {
931
+ type: "text",
932
+ disabled: loading,
933
+ value: email,
934
+ hasError: Boolean(email && !EMAIL_REGEX.test(email)),
935
+ onChange: (e) => setEmail(e.currentTarget.value),
936
+ placeholder: formatMessage(getTrad("whitelist.email.placeholder")),
937
+ style: { fontSize: "1.4rem", lineHeight: "2.2rem" }
938
+ }
939
+ ) }) }),
940
+ /* @__PURE__ */ jsx(
941
+ SizedButton,
968
942
  {
969
943
  size: "S",
970
- variant: "danger-light",
971
- startIcon: /* @__PURE__ */ jsx(Trash, {}),
944
+ startIcon: /* @__PURE__ */ jsx(Plus, {}),
945
+ disabled: loading || email.trim() === "" || !EMAIL_REGEX.test(email),
946
+ loading,
947
+ onClick: onSaveEmail,
948
+ children: formatMessage(getTrad("page.add"))
949
+ }
950
+ )
951
+ ] }),
952
+ /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "center", children: [
953
+ /* @__PURE__ */ jsx(
954
+ SizedButton,
955
+ {
956
+ size: "S",
957
+ variant: "tertiary",
958
+ startIcon: /* @__PURE__ */ jsx(Download, {}),
959
+ onClick: onExport,
972
960
  disabled: users.length === 0,
973
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
974
- children: formatMessage(getTrad("whitelist.delete.all.label"))
961
+ children: formatMessage(getTrad("whitelist.export"))
975
962
  }
976
963
  ),
977
- title: formatMessage(getTrad("whitelist.delete.all.title")),
978
- body: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", textAlign: "center", children: formatMessage(getTrad("whitelist.delete.all.description"), {
979
- count: users.length
980
- }) }) }),
981
- confirmLabel: formatMessage(getTrad("whitelist.delete.all.label")),
982
- onConfirm: onDeleteAll
983
- }
984
- )
985
- ] })
986
- ] }),
964
+ /* @__PURE__ */ jsx(
965
+ SizedButton,
966
+ {
967
+ size: "S",
968
+ variant: "tertiary",
969
+ startIcon: /* @__PURE__ */ jsx(Upload, {}),
970
+ onClick: () => fileInputRef.current?.click(),
971
+ children: formatMessage(getTrad("whitelist.import"))
972
+ }
973
+ ),
974
+ /* @__PURE__ */ jsx(
975
+ "input",
976
+ {
977
+ ref: fileInputRef,
978
+ type: "file",
979
+ accept: ".json,application/json",
980
+ style: { display: "none" },
981
+ onChange: handleImport
982
+ }
983
+ ),
984
+ /* @__PURE__ */ jsx(
985
+ ConfirmDialog,
986
+ {
987
+ trigger: /* @__PURE__ */ jsx(
988
+ SizedButton,
989
+ {
990
+ size: "S",
991
+ variant: "danger-light",
992
+ startIcon: /* @__PURE__ */ jsx(Trash, {}),
993
+ disabled: users.length === 0,
994
+ children: formatMessage(getTrad("whitelist.delete.all.label"))
995
+ }
996
+ ),
997
+ title: formatMessage(getTrad("whitelist.delete.all.title")),
998
+ body: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", textAlign: "center", children: formatMessage(getTrad("whitelist.delete.all.description"), {
999
+ count: users.length
1000
+ }) }) }),
1001
+ confirmLabel: formatMessage(getTrad("whitelist.delete.all.label")),
1002
+ onConfirm: onDeleteAll
1003
+ }
1004
+ )
1005
+ ] })
1006
+ ]
1007
+ }
1008
+ ),
987
1009
  /* @__PURE__ */ jsx(Divider, {}),
988
1010
  /* @__PURE__ */ jsxs(CustomTable, { colCount: 4, rowCount: users.length, children: [
989
1011
  /* @__PURE__ */ jsx(Thead, { children: /* @__PURE__ */ jsxs(Tr, { children: [
@@ -3728,14 +3750,13 @@ function AuditLog({ title } = {}) {
3728
3750
  title ?? /* @__PURE__ */ jsx("span", {}),
3729
3751
  /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
3730
3752
  /* @__PURE__ */ jsx(
3731
- Button,
3753
+ SizedButton,
3732
3754
  {
3733
3755
  size: "S",
3734
3756
  variant: "tertiary",
3735
3757
  startIcon: /* @__PURE__ */ jsx(Download, {}),
3736
3758
  onClick: handleExport,
3737
3759
  disabled: pagination.total === 0,
3738
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
3739
3760
  children: formatMessage(getTrad("auditlog.export"))
3740
3761
  }
3741
3762
  ),
@@ -3743,13 +3764,12 @@ function AuditLog({ title } = {}) {
3743
3764
  ConfirmDialog,
3744
3765
  {
3745
3766
  trigger: /* @__PURE__ */ jsx(
3746
- Button,
3767
+ SizedButton,
3747
3768
  {
3748
3769
  size: "S",
3749
3770
  variant: "danger-light",
3750
3771
  startIcon: /* @__PURE__ */ jsx(Trash, {}),
3751
3772
  disabled: pagination.total === 0,
3752
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
3753
3773
  children: formatMessage(getTrad("auditlog.clear"))
3754
3774
  }
3755
3775
  ),
@@ -3830,13 +3850,12 @@ function AuditLog({ title } = {}) {
3830
3850
  }
3831
3851
  ),
3832
3852
  hasActiveFilters && /* @__PURE__ */ jsx(
3833
- Button,
3853
+ SizedButton,
3834
3854
  {
3835
3855
  size: "S",
3836
3856
  variant: "danger-light",
3837
3857
  startIcon: /* @__PURE__ */ jsx(Trash, {}),
3838
3858
  onClick: clearFilters,
3839
- style: { height: "4rem" },
3840
3859
  children: formatMessage(getTrad("auditlog.filters.clear"))
3841
3860
  }
3842
3861
  )
@@ -4357,7 +4376,7 @@ function HomePage() {
4357
4376
  ] }) })
4358
4377
  ] })
4359
4378
  ] }),
4360
- /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsx(
4379
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", marginBottom: 8, children: /* @__PURE__ */ jsx(
4361
4380
  Button,
4362
4381
  {
4363
4382
  size: "L",
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-BxbFHOUO.js");
3
+ const index = require("./index-CrnGXADu.js");
4
4
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-5ifX6lA1.mjs";
1
+ import { i } from "./index-DRJ6Ty2J.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-oidc",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "A Strapi plugin that provides OpenID Connect (OIDC) authentication functionality for the Strapi Admin Panel.",
5
5
  "strapi": {
6
6
  "displayName": "OIDC Plugin",