@strapi/plugin-users-permissions 5.4.0 → 5.4.2

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 (34) hide show
  1. package/admin/src/pages/Roles/pages/EditPage.jsx +1 -1
  2. package/dist/_chunks/{index-D979dyTd.js → index-B31GwOBY.js} +3 -3
  3. package/dist/_chunks/index-B31GwOBY.js.map +1 -0
  4. package/dist/_chunks/{index-DbsOttc5-C1E7ADbJ.mjs → index-BnX71_B4-BeiPUoDw.mjs} +52 -31
  5. package/dist/_chunks/index-BnX71_B4-BeiPUoDw.mjs.map +1 -0
  6. package/dist/_chunks/{index-DbsOttc5-fMZ4nmrb.js → index-BnX71_B4-BwTVUy-u.js} +52 -31
  7. package/dist/_chunks/index-BnX71_B4-BwTVUy-u.js.map +1 -0
  8. package/dist/_chunks/{index-BQl5bjWF.js → index-Bzdgm3YY.js} +10 -10
  9. package/dist/_chunks/{index-BQl5bjWF.js.map → index-Bzdgm3YY.js.map} +1 -1
  10. package/dist/_chunks/{index-aZjfBrAi.js → index-CH7DTQRg.js} +2 -2
  11. package/dist/_chunks/{index-aZjfBrAi.js.map → index-CH7DTQRg.js.map} +1 -1
  12. package/dist/_chunks/{index-vieKhEee.mjs → index-DQjBkqk6.mjs} +3 -3
  13. package/dist/_chunks/index-DQjBkqk6.mjs.map +1 -0
  14. package/dist/_chunks/{index-Bg985nAB.js → index-DS3khL98.js} +4 -4
  15. package/dist/_chunks/{index-Bg985nAB.js.map → index-DS3khL98.js.map} +1 -1
  16. package/dist/_chunks/{index-DDBqIHkB.mjs → index-Dby0-3V3.mjs} +10 -10
  17. package/dist/_chunks/{index-DDBqIHkB.mjs.map → index-Dby0-3V3.mjs.map} +1 -1
  18. package/dist/_chunks/{index-CUzrUd3S.js → index-DkLfQU9x.js} +7 -7
  19. package/dist/_chunks/{index-CUzrUd3S.js.map → index-DkLfQU9x.js.map} +1 -1
  20. package/dist/_chunks/{index-B1dlVilG.mjs → index-YiI4HHBF.mjs} +2 -2
  21. package/dist/_chunks/{index-B1dlVilG.mjs.map → index-YiI4HHBF.mjs.map} +1 -1
  22. package/dist/_chunks/{index-BUZjdJAu.mjs → index-og30lh2q.mjs} +3 -3
  23. package/dist/_chunks/{index-BUZjdJAu.mjs.map → index-og30lh2q.mjs.map} +1 -1
  24. package/dist/_chunks/{index-Dt2qq98e.mjs → index-rj9z5xOr.mjs} +3 -3
  25. package/dist/_chunks/{index-Dt2qq98e.mjs.map → index-rj9z5xOr.mjs.map} +1 -1
  26. package/dist/admin/index.js +1 -1
  27. package/dist/admin/index.mjs +1 -1
  28. package/package.json +6 -6
  29. package/server/graphql/types/index.js +1 -0
  30. package/server/graphql/types/user-input.js +20 -0
  31. package/dist/_chunks/index-D979dyTd.js.map +0 -1
  32. package/dist/_chunks/index-DbsOttc5-C1E7ADbJ.mjs.map +0 -1
  33. package/dist/_chunks/index-DbsOttc5-fMZ4nmrb.js.map +0 -1
  34. package/dist/_chunks/index-vieKhEee.mjs.map +0 -1
@@ -5687,6 +5687,9 @@ const getFetchClient = (defaultOptions = {}) => {
5687
5687
  };
5688
5688
  const paramsSerializer = (params) => (url) => {
5689
5689
  if (params) {
5690
+ if (typeof params === "string") {
5691
+ return `${url}?${params}`;
5692
+ }
5690
5693
  const serializedParams = qs__default.stringify(params, { encode: false });
5691
5694
  return `${url}?${serializedParams}`;
5692
5695
  }
@@ -10468,32 +10471,43 @@ const [Provider, useHistory] = createContext("History", {
10468
10471
  throw new Error("You must use the `HistoryProvider` to access the `goBack` function.");
10469
10472
  }
10470
10473
  });
10471
- React__namespace.forwardRef(({ disabled }, ref2) => {
10472
- const { formatMessage } = reactIntl.useIntl();
10473
- const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
10474
- const goBack = useHistory("BackButton", (state) => state.goBack);
10475
- const history = useHistory("BackButton", (state) => state.history);
10476
- const handleClick = (e) => {
10477
- e.preventDefault();
10478
- goBack();
10479
- };
10480
- return /* @__PURE__ */ jsxRuntime.jsx(
10481
- designSystem.Link,
10482
- {
10483
- ref: ref2,
10484
- tag: reactRouterDom.NavLink,
10485
- to: history.at(-1) ?? "",
10486
- onClick: handleClick,
10487
- disabled: disabled || !canGoBack,
10488
- "aria-disabled": disabled || !canGoBack,
10489
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeft, {}),
10490
- children: formatMessage({
10491
- id: "global.back",
10492
- defaultMessage: "Back"
10493
- })
10494
- }
10495
- );
10496
- });
10474
+ React__namespace.forwardRef(
10475
+ ({ disabled, fallback = "" }, ref2) => {
10476
+ const { formatMessage } = reactIntl.useIntl();
10477
+ const navigate = reactRouterDom.useNavigate();
10478
+ const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
10479
+ const goBack = useHistory("BackButton", (state) => state.goBack);
10480
+ const history = useHistory("BackButton", (state) => state.history);
10481
+ const hasFallback = fallback !== "";
10482
+ const shouldBeDisabled = disabled || !canGoBack && !hasFallback;
10483
+ const handleClick = (e) => {
10484
+ e.preventDefault();
10485
+ if (canGoBack) {
10486
+ goBack();
10487
+ } else if (hasFallback) {
10488
+ navigate(fallback);
10489
+ }
10490
+ };
10491
+ const historyTo = canGoBack ? history.at(-1) : void 0;
10492
+ const toWithFallback = historyTo ?? fallback;
10493
+ return /* @__PURE__ */ jsxRuntime.jsx(
10494
+ designSystem.Link,
10495
+ {
10496
+ ref: ref2,
10497
+ tag: reactRouterDom.NavLink,
10498
+ to: toWithFallback,
10499
+ onClick: handleClick,
10500
+ disabled: shouldBeDisabled,
10501
+ "aria-disabled": shouldBeDisabled,
10502
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeft, {}),
10503
+ children: formatMessage({
10504
+ id: "global.back",
10505
+ defaultMessage: "Back"
10506
+ })
10507
+ }
10508
+ );
10509
+ }
10510
+ );
10497
10511
  new reactQuery.QueryClient({
10498
10512
  defaultOptions: {
10499
10513
  queries: {
@@ -11266,12 +11280,13 @@ const EmailInput = React.forwardRef(
11266
11280
  const MemoizedEmailInput = React.memo(EmailInput);
11267
11281
  const EnumerationInput = React.forwardRef(
11268
11282
  ({ name, required, label, hint, labelAction, options = [], ...props }, ref2) => {
11283
+ const { formatMessage } = reactIntl.useIntl();
11269
11284
  const field = useField(name);
11270
11285
  const fieldRef = useFocusInputField(name);
11271
11286
  const composedRefs = designSystem.useComposedRefs(ref2, fieldRef);
11272
11287
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { error: field.error, name, hint, required, children: [
11273
11288
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
11274
- /* @__PURE__ */ jsxRuntime.jsx(
11289
+ /* @__PURE__ */ jsxRuntime.jsxs(
11275
11290
  designSystem.SingleSelect,
11276
11291
  {
11277
11292
  ref: composedRefs,
@@ -11280,9 +11295,15 @@ const EnumerationInput = React.forwardRef(
11280
11295
  },
11281
11296
  value: field.value,
11282
11297
  ...props,
11283
- children: options.map(({ value, label: label2, disabled, hidden }) => {
11284
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value, disabled, hidden, children: label2 ?? value }, value);
11285
- })
11298
+ children: [
11299
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "", disabled: required, hidden: required, children: formatMessage({
11300
+ id: "components.InputSelect.option.placeholder",
11301
+ defaultMessage: "Choose here"
11302
+ }) }),
11303
+ options.map(({ value, label: label2, disabled, hidden }) => {
11304
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value, disabled, hidden, children: label2 ?? value }, value);
11305
+ })
11306
+ ]
11286
11307
  }
11287
11308
  ),
11288
11309
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
@@ -12005,4 +12026,4 @@ adminApi.enhanceEndpoints({
12005
12026
  });
12006
12027
  exports.Layouts = Layouts;
12007
12028
  exports.useTracking = useTracking;
12008
- //# sourceMappingURL=index-DbsOttc5-fMZ4nmrb.js.map
12029
+ //# sourceMappingURL=index-BnX71_B4-BwTVUy-u.js.map