@strapi/plugin-users-permissions 5.0.0-beta.7 → 5.0.0-beta.8
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/admin/src/components/Permissions/index.jsx +26 -35
- package/admin/src/pages/EmailTemplates/components/EmailTable.jsx +10 -6
- package/admin/src/pages/Providers/index.jsx +4 -3
- package/admin/src/pages/Roles/pages/ListPage/components/TableBody.jsx +4 -4
- package/dist/_chunks/{index-Du8DLJcX.mjs → index-00_Lq0-y.mjs} +6 -6
- package/dist/_chunks/{index-Du8DLJcX.mjs.map → index-00_Lq0-y.mjs.map} +1 -1
- package/dist/_chunks/{index--VHJr8__-a6vFdIyj.js → index-69WUS0qJ-621Sl9hj.js} +54 -53
- package/dist/_chunks/index-69WUS0qJ-621Sl9hj.js.map +1 -0
- package/dist/_chunks/{index--VHJr8__-Cx-PmaTb.mjs → index-69WUS0qJ-DzUzGVgd.mjs} +54 -53
- package/dist/_chunks/index-69WUS0qJ-DzUzGVgd.mjs.map +1 -0
- package/dist/_chunks/{index-BEhglMSg.mjs → index-B6AAcVOR.mjs} +15 -15
- package/dist/_chunks/{index-BEhglMSg.mjs.map → index-B6AAcVOR.mjs.map} +1 -1
- package/dist/_chunks/{index-QrGtUO_1.js → index-BGu68xEV.js} +15 -15
- package/dist/_chunks/{index-QrGtUO_1.js.map → index-BGu68xEV.js.map} +1 -1
- package/dist/_chunks/{index-lnrC9bmZ.js → index-BSqwdKVh.js} +20 -39
- package/dist/_chunks/index-BSqwdKVh.js.map +1 -0
- package/dist/_chunks/{index-B-kWBHFg.mjs → index-B_rNTZBF.mjs} +21 -40
- package/dist/_chunks/index-B_rNTZBF.mjs.map +1 -0
- package/dist/_chunks/{index-B0IECp2U.js → index-CIJz4WB2.js} +2 -2
- package/dist/_chunks/{index-B0IECp2U.js.map → index-CIJz4WB2.js.map} +1 -1
- package/dist/_chunks/{index-CvBfU3H9.js → index-DGyiWVHr.js} +10 -10
- package/dist/_chunks/{index-CvBfU3H9.js.map → index-DGyiWVHr.js.map} +1 -1
- package/dist/_chunks/{index-D6s_GV1d.js → index-DTK4DMrt.js} +10 -8
- package/dist/_chunks/index-DTK4DMrt.js.map +1 -0
- package/dist/_chunks/{index-CYVy1i0_.mjs → index-DaCuO0x_.mjs} +2 -2
- package/dist/_chunks/{index-CYVy1i0_.mjs.map → index-DaCuO0x_.mjs.map} +1 -1
- package/dist/_chunks/{index-BRZCpa1U.mjs → index-fnfzDsYv.mjs} +9 -7
- package/dist/_chunks/index-fnfzDsYv.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +11 -11
- package/dist/_chunks/index--VHJr8__-Cx-PmaTb.mjs.map +0 -1
- package/dist/_chunks/index--VHJr8__-a6vFdIyj.js.map +0 -1
- package/dist/_chunks/index-B-kWBHFg.mjs.map +0 -1
- package/dist/_chunks/index-BRZCpa1U.mjs.map +0 -1
- package/dist/_chunks/index-D6s_GV1d.js.map +0 -1
- package/dist/_chunks/index-lnrC9bmZ.js.map +0 -1
|
@@ -6406,35 +6406,15 @@ const fetchBaseQuery = () => async (query, { signal }) => {
|
|
|
6406
6406
|
const adminApi = createApi({
|
|
6407
6407
|
reducerPath: "adminApi",
|
|
6408
6408
|
baseQuery: fetchBaseQuery(),
|
|
6409
|
-
tagTypes: [
|
|
6410
|
-
|
|
6411
|
-
"LicenseLimits",
|
|
6412
|
-
"Me",
|
|
6413
|
-
"ProjectSettings",
|
|
6414
|
-
"ProvidersOptions",
|
|
6415
|
-
"Role",
|
|
6416
|
-
"RolePermissions",
|
|
6417
|
-
"TransferToken",
|
|
6418
|
-
"User",
|
|
6419
|
-
"Webhook"
|
|
6420
|
-
],
|
|
6421
|
-
endpoints: (builder) => ({
|
|
6422
|
-
/**
|
|
6423
|
-
* This is here because it's shared between the transfer-token routes & the api-tokens.
|
|
6424
|
-
*/
|
|
6425
|
-
regenerateToken: builder.mutation({
|
|
6426
|
-
query: (url) => ({
|
|
6427
|
-
method: "POST",
|
|
6428
|
-
url: `${url}/regenerate`
|
|
6429
|
-
}),
|
|
6430
|
-
transformResponse: (response) => response.data
|
|
6431
|
-
})
|
|
6432
|
-
})
|
|
6409
|
+
tagTypes: [],
|
|
6410
|
+
endpoints: () => ({})
|
|
6433
6411
|
});
|
|
6434
6412
|
const prefixFileUrlWithBackendUrl = (fileURL) => {
|
|
6435
6413
|
return !!fileURL && fileURL.startsWith("/") ? `${window.strapi.backendURL}${fileURL}` : fileURL;
|
|
6436
6414
|
};
|
|
6437
|
-
adminApi.
|
|
6415
|
+
adminApi.enhanceEndpoints({
|
|
6416
|
+
addTagTypes: ["ProjectSettings", "LicenseLimits"]
|
|
6417
|
+
}).injectEndpoints({
|
|
6438
6418
|
endpoints: (builder) => ({
|
|
6439
6419
|
init: builder.query({
|
|
6440
6420
|
query: () => ({
|
|
@@ -8586,7 +8566,9 @@ const adminSlice = createSlice({
|
|
|
8586
8566
|
}
|
|
8587
8567
|
});
|
|
8588
8568
|
const reducer$1 = adminSlice.reducer;
|
|
8589
|
-
adminApi.
|
|
8569
|
+
adminApi.enhanceEndpoints({
|
|
8570
|
+
addTagTypes: ["User", "Me", "ProvidersOptions"]
|
|
8571
|
+
}).injectEndpoints({
|
|
8590
8572
|
endpoints: (builder) => ({
|
|
8591
8573
|
/**
|
|
8592
8574
|
* ME
|
|
@@ -9207,17 +9189,7 @@ React.forwardRef(
|
|
|
9207
9189
|
return { data };
|
|
9208
9190
|
} catch (err) {
|
|
9209
9191
|
if (isErrorYupValidationError(err)) {
|
|
9210
|
-
|
|
9211
|
-
if (err.inner) {
|
|
9212
|
-
if (err.inner.length === 0) {
|
|
9213
|
-
return setIn(errors, err.path, err.message);
|
|
9214
|
-
}
|
|
9215
|
-
for (const error of err.inner) {
|
|
9216
|
-
if (!getIn(errors, error.path)) {
|
|
9217
|
-
errors = setIn(errors, error.path, error.message);
|
|
9218
|
-
}
|
|
9219
|
-
}
|
|
9220
|
-
}
|
|
9192
|
+
const errors = getYupValidationErrors(err);
|
|
9221
9193
|
if (shouldSetErrors) {
|
|
9222
9194
|
setErrors(errors);
|
|
9223
9195
|
}
|
|
@@ -9392,6 +9364,20 @@ React.forwardRef(
|
|
|
9392
9364
|
}
|
|
9393
9365
|
);
|
|
9394
9366
|
const isErrorYupValidationError = (err) => typeof err === "object" && err !== null && "name" in err && typeof err.name === "string" && err.name === "ValidationError";
|
|
9367
|
+
const getYupValidationErrors = (err) => {
|
|
9368
|
+
let errors = {};
|
|
9369
|
+
if (err.inner) {
|
|
9370
|
+
if (err.inner.length === 0) {
|
|
9371
|
+
return setIn(errors, err.path, err.message);
|
|
9372
|
+
}
|
|
9373
|
+
for (const error of err.inner) {
|
|
9374
|
+
if (!getIn(errors, error.path)) {
|
|
9375
|
+
errors = setIn(errors, error.path, error.message);
|
|
9376
|
+
}
|
|
9377
|
+
}
|
|
9378
|
+
}
|
|
9379
|
+
return errors;
|
|
9380
|
+
};
|
|
9395
9381
|
const reducer = (state, action) => produce(state, (draft) => {
|
|
9396
9382
|
switch (action.type) {
|
|
9397
9383
|
case "SET_INITIAL_VALUES":
|
|
@@ -9553,6 +9539,7 @@ const BooleanInput = forwardRef(
|
|
|
9553
9539
|
] });
|
|
9554
9540
|
}
|
|
9555
9541
|
);
|
|
9542
|
+
const MemoizedBooleanInput = memo(BooleanInput);
|
|
9556
9543
|
const CheckboxInput = forwardRef(
|
|
9557
9544
|
({ name, required, label, hint, ...props }, ref) => {
|
|
9558
9545
|
const field = useField(name);
|
|
@@ -9574,6 +9561,7 @@ const CheckboxInput = forwardRef(
|
|
|
9574
9561
|
] });
|
|
9575
9562
|
}
|
|
9576
9563
|
);
|
|
9564
|
+
const MemoizedCheckboxInput = memo(CheckboxInput);
|
|
9577
9565
|
const DateInput = forwardRef(
|
|
9578
9566
|
({ name, required, label, hint, labelAction, type: _type, ...props }, ref) => {
|
|
9579
9567
|
const { formatMessage } = useIntl();
|
|
@@ -9592,7 +9580,7 @@ const DateInput = forwardRef(
|
|
|
9592
9580
|
field.onChange(name, date);
|
|
9593
9581
|
},
|
|
9594
9582
|
onClear: () => field.onChange(name, void 0),
|
|
9595
|
-
|
|
9583
|
+
value,
|
|
9596
9584
|
...props
|
|
9597
9585
|
}
|
|
9598
9586
|
),
|
|
@@ -9601,6 +9589,7 @@ const DateInput = forwardRef(
|
|
|
9601
9589
|
] });
|
|
9602
9590
|
}
|
|
9603
9591
|
);
|
|
9592
|
+
const MemoizedDateInput = memo(DateInput);
|
|
9604
9593
|
const DateTimeInput = forwardRef(
|
|
9605
9594
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9606
9595
|
const { formatMessage } = useIntl();
|
|
@@ -9628,6 +9617,7 @@ const DateTimeInput = forwardRef(
|
|
|
9628
9617
|
] });
|
|
9629
9618
|
}
|
|
9630
9619
|
);
|
|
9620
|
+
const MemoizedDateTimeInput = memo(DateTimeInput);
|
|
9631
9621
|
const EmailInput = forwardRef(
|
|
9632
9622
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9633
9623
|
const field = useField(name);
|
|
@@ -9652,6 +9642,7 @@ const EmailInput = forwardRef(
|
|
|
9652
9642
|
] });
|
|
9653
9643
|
}
|
|
9654
9644
|
);
|
|
9645
|
+
const MemoizedEmailInput = memo(EmailInput);
|
|
9655
9646
|
const EnumerationInput = forwardRef(
|
|
9656
9647
|
({ name, required, label, hint, labelAction, options = [], ...props }, ref) => {
|
|
9657
9648
|
const field = useField(name);
|
|
@@ -9678,6 +9669,7 @@ const EnumerationInput = forwardRef(
|
|
|
9678
9669
|
] });
|
|
9679
9670
|
}
|
|
9680
9671
|
);
|
|
9672
|
+
const MemoizedEnumerationInput = memo(EnumerationInput);
|
|
9681
9673
|
const JsonInput = forwardRef(
|
|
9682
9674
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9683
9675
|
const field = useField(name);
|
|
@@ -9704,6 +9696,7 @@ const JsonInput = forwardRef(
|
|
|
9704
9696
|
] });
|
|
9705
9697
|
}
|
|
9706
9698
|
);
|
|
9699
|
+
const MemoizedJsonInput = memo(JsonInput);
|
|
9707
9700
|
const NumberInputImpl = forwardRef(
|
|
9708
9701
|
({ name, required, label, hint, labelAction, type, ...props }, ref) => {
|
|
9709
9702
|
const field = useField(name);
|
|
@@ -9729,6 +9722,7 @@ const NumberInputImpl = forwardRef(
|
|
|
9729
9722
|
] });
|
|
9730
9723
|
}
|
|
9731
9724
|
);
|
|
9725
|
+
const MemoizedNumberInput = memo(NumberInputImpl);
|
|
9732
9726
|
const PasswordInput = forwardRef(
|
|
9733
9727
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9734
9728
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -9774,6 +9768,7 @@ const PasswordInput = forwardRef(
|
|
|
9774
9768
|
] });
|
|
9775
9769
|
}
|
|
9776
9770
|
);
|
|
9771
|
+
const MemoizedPasswordInput = memo(PasswordInput);
|
|
9777
9772
|
const StringInput = forwardRef(
|
|
9778
9773
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9779
9774
|
const field = useField(name);
|
|
@@ -9796,6 +9791,7 @@ const StringInput = forwardRef(
|
|
|
9796
9791
|
] });
|
|
9797
9792
|
}
|
|
9798
9793
|
);
|
|
9794
|
+
const MemoizedStringInput = memo(StringInput);
|
|
9799
9795
|
const TextareaInput = forwardRef(
|
|
9800
9796
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9801
9797
|
const field = useField(name);
|
|
@@ -9818,6 +9814,7 @@ const TextareaInput = forwardRef(
|
|
|
9818
9814
|
] });
|
|
9819
9815
|
}
|
|
9820
9816
|
);
|
|
9817
|
+
const MemoizedTextareaInput = memo(TextareaInput);
|
|
9821
9818
|
const TimeInput = forwardRef(
|
|
9822
9819
|
({ name, required, label, hint, labelAction, ...props }, ref) => {
|
|
9823
9820
|
const { formatMessage } = useIntl();
|
|
@@ -9844,37 +9841,38 @@ const TimeInput = forwardRef(
|
|
|
9844
9841
|
] });
|
|
9845
9842
|
}
|
|
9846
9843
|
);
|
|
9847
|
-
memo(
|
|
9844
|
+
const MemoizedTimeInput = memo(TimeInput);
|
|
9845
|
+
const InputRenderer = memo(
|
|
9848
9846
|
forwardRef((props, forwardRef2) => {
|
|
9849
9847
|
switch (props.type) {
|
|
9850
9848
|
case "biginteger":
|
|
9851
9849
|
case "timestamp":
|
|
9852
9850
|
case "string":
|
|
9853
|
-
return /* @__PURE__ */ jsx(
|
|
9851
|
+
return /* @__PURE__ */ jsx(MemoizedStringInput, { ref: forwardRef2, ...props });
|
|
9854
9852
|
case "boolean":
|
|
9855
|
-
return /* @__PURE__ */ jsx(
|
|
9853
|
+
return /* @__PURE__ */ jsx(MemoizedBooleanInput, { ref: forwardRef2, ...props });
|
|
9856
9854
|
case "checkbox":
|
|
9857
|
-
return /* @__PURE__ */ jsx(
|
|
9855
|
+
return /* @__PURE__ */ jsx(MemoizedCheckboxInput, { ref: forwardRef2, ...props });
|
|
9858
9856
|
case "datetime":
|
|
9859
|
-
return /* @__PURE__ */ jsx(
|
|
9857
|
+
return /* @__PURE__ */ jsx(MemoizedDateTimeInput, { ref: forwardRef2, ...props });
|
|
9860
9858
|
case "date":
|
|
9861
|
-
return /* @__PURE__ */ jsx(
|
|
9859
|
+
return /* @__PURE__ */ jsx(MemoizedDateInput, { ref: forwardRef2, ...props });
|
|
9862
9860
|
case "decimal":
|
|
9863
9861
|
case "float":
|
|
9864
9862
|
case "integer":
|
|
9865
|
-
return /* @__PURE__ */ jsx(
|
|
9863
|
+
return /* @__PURE__ */ jsx(MemoizedNumberInput, { ref: forwardRef2, ...props });
|
|
9866
9864
|
case "json":
|
|
9867
|
-
return /* @__PURE__ */ jsx(
|
|
9865
|
+
return /* @__PURE__ */ jsx(MemoizedJsonInput, { ref: forwardRef2, ...props });
|
|
9868
9866
|
case "email":
|
|
9869
|
-
return /* @__PURE__ */ jsx(
|
|
9867
|
+
return /* @__PURE__ */ jsx(MemoizedEmailInput, { ref: forwardRef2, ...props });
|
|
9870
9868
|
case "enumeration":
|
|
9871
|
-
return /* @__PURE__ */ jsx(
|
|
9869
|
+
return /* @__PURE__ */ jsx(MemoizedEnumerationInput, { ref: forwardRef2, ...props });
|
|
9872
9870
|
case "password":
|
|
9873
|
-
return /* @__PURE__ */ jsx(
|
|
9871
|
+
return /* @__PURE__ */ jsx(MemoizedPasswordInput, { ref: forwardRef2, ...props });
|
|
9874
9872
|
case "text":
|
|
9875
|
-
return /* @__PURE__ */ jsx(
|
|
9873
|
+
return /* @__PURE__ */ jsx(MemoizedTextareaInput, { ref: forwardRef2, ...props });
|
|
9876
9874
|
case "time":
|
|
9877
|
-
return /* @__PURE__ */ jsx(
|
|
9875
|
+
return /* @__PURE__ */ jsx(MemoizedTimeInput, { ref: forwardRef2, ...props });
|
|
9878
9876
|
default:
|
|
9879
9877
|
return /* @__PURE__ */ jsx(NotSupportedField, { ref: forwardRef2, ...props });
|
|
9880
9878
|
}
|
|
@@ -9903,6 +9901,7 @@ const NotSupportedField = forwardRef(
|
|
|
9903
9901
|
] });
|
|
9904
9902
|
}
|
|
9905
9903
|
);
|
|
9904
|
+
memo(InputRenderer);
|
|
9906
9905
|
styled.img`
|
|
9907
9906
|
height: 7.2rem;
|
|
9908
9907
|
`;
|
|
@@ -10414,7 +10413,9 @@ createContext("Table");
|
|
|
10414
10413
|
styled(CaretDown)`
|
|
10415
10414
|
transform: ${({ $isUp }) => `rotate(${$isUp ? "180" : "0"}deg)`};
|
|
10416
10415
|
`;
|
|
10417
|
-
adminApi.
|
|
10416
|
+
adminApi.enhanceEndpoints({
|
|
10417
|
+
addTagTypes: ["LicenseLimits", "User", "Role", "RolePermissions"]
|
|
10418
|
+
}).injectEndpoints({
|
|
10418
10419
|
endpoints: (builder) => ({
|
|
10419
10420
|
/**
|
|
10420
10421
|
* users
|
|
@@ -10574,4 +10575,4 @@ export {
|
|
|
10574
10575
|
Layouts as L,
|
|
10575
10576
|
useTracking as u
|
|
10576
10577
|
};
|
|
10577
|
-
//# sourceMappingURL=index
|
|
10578
|
+
//# sourceMappingURL=index-69WUS0qJ-DzUzGVgd.mjs.map
|