@strapi/upload 5.0.2 → 5.0.3
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/dist/_chunks/{index-4dDBcT2s.js → index-BwMdH-eI.js} +17 -9
- package/dist/_chunks/index-BwMdH-eI.js.map +1 -0
- package/dist/_chunks/{index-POwhla6y.js → index-C5E7jC83.js} +7 -4
- package/dist/_chunks/index-C5E7jC83.js.map +1 -0
- package/dist/_chunks/{index-p2ufusDD.mjs → index-CCEHGHWW.mjs} +7 -4
- package/dist/_chunks/index-CCEHGHWW.mjs.map +1 -0
- package/dist/_chunks/{index-D0UI77ZE.mjs → index-Cw3NiaYP.mjs} +2 -2
- package/dist/_chunks/{index-D0UI77ZE.mjs.map → index-Cw3NiaYP.mjs.map} +1 -1
- package/dist/_chunks/{index-CZ3rXZbR.mjs → index-Cze6kL5_.mjs} +2 -2
- package/dist/_chunks/{index-CZ3rXZbR.mjs.map → index-Cze6kL5_.mjs.map} +1 -1
- package/dist/_chunks/{index-BWoTIP6T.js → index-DK1he91f.js} +2 -2
- package/dist/_chunks/{index-BWoTIP6T.js.map → index-DK1he91f.js.map} +1 -1
- package/dist/_chunks/{index-DKKpjnQN.mjs → index-DzHgwpS9.mjs} +17 -9
- package/dist/_chunks/index-DzHgwpS9.mjs.map +1 -0
- package/dist/_chunks/{index-DPWou2fL.js → index-ox-PAURv.js} +2 -2
- package/dist/_chunks/{index-DPWou2fL.js.map → index-ox-PAURv.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/shared/contracts/configuration.d.ts +44 -0
- package/dist/shared/contracts/files.d.ts +167 -0
- package/dist/shared/contracts/folders.d.ts +141 -0
- package/dist/shared/contracts/settings.d.ts +41 -0
- package/package.json +6 -6
- package/dist/_chunks/index-4dDBcT2s.js.map +0 -1
- package/dist/_chunks/index-DKKpjnQN.mjs.map +0 -1
- package/dist/_chunks/index-POwhla6y.js.map +0 -1
- package/dist/_chunks/index-p2ufusDD.mjs.map +0 -1
|
@@ -60,7 +60,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
const name$1 = "@strapi/upload";
|
|
63
|
-
const version = "5.0.
|
|
63
|
+
const version = "5.0.2";
|
|
64
64
|
const description = "Makes it easy to upload images and files to your Strapi Application.";
|
|
65
65
|
const license = "SEE LICENSE IN LICENSE";
|
|
66
66
|
const author = {
|
|
@@ -3912,7 +3912,7 @@ const FilterList = ({ appliedFilters, filtersSchema, onRemoveFilter }) => {
|
|
|
3912
3912
|
const nextFilters = appliedFilters.filter((prevFilter) => {
|
|
3913
3913
|
const name2 = Object.keys(filter)[0];
|
|
3914
3914
|
const filterType = Object.keys(filter[name2])[0];
|
|
3915
|
-
const value = filter[name2][filterType];
|
|
3915
|
+
const value = decodeURIComponent(filter[name2][filterType]);
|
|
3916
3916
|
return prevFilter[name2]?.[filterType] !== value;
|
|
3917
3917
|
});
|
|
3918
3918
|
onRemoveFilter(nextFilters);
|
|
@@ -3923,6 +3923,13 @@ const FilterList = ({ appliedFilters, filtersSchema, onRemoveFilter }) => {
|
|
|
3923
3923
|
const filterObj = filter[attributeName];
|
|
3924
3924
|
const operator = Object.keys(filterObj)[0];
|
|
3925
3925
|
let value = filterObj[operator];
|
|
3926
|
+
if (Array.isArray(value)) {
|
|
3927
|
+
value = value.join(", ");
|
|
3928
|
+
} else if (typeof value === "object") {
|
|
3929
|
+
value = Object.values(value).join(", ");
|
|
3930
|
+
} else {
|
|
3931
|
+
value = Array.isArray(value) || typeof value === "object" ? Object.values(value).join(", ") : decodeURIComponent(value);
|
|
3932
|
+
}
|
|
3926
3933
|
let displayedOperator = operator;
|
|
3927
3934
|
if (attribute.name === "mime") {
|
|
3928
3935
|
displayedOperator = operator === "$contains" ? "$eq" : "$ne";
|
|
@@ -4130,7 +4137,8 @@ const FilterPopover = ({ displayedFilters: displayedFilters2, filters, onSubmit,
|
|
|
4130
4137
|
const handleSubmit = (e) => {
|
|
4131
4138
|
e.preventDefault();
|
|
4132
4139
|
e.stopPropagation();
|
|
4133
|
-
|
|
4140
|
+
const encodedValue = encodeURIComponent(modifiedData.value);
|
|
4141
|
+
if (encodedValue) {
|
|
4134
4142
|
if (modifiedData.name === "mime") {
|
|
4135
4143
|
const alreadyAppliedFilters = filters.filter((filter) => {
|
|
4136
4144
|
return Object.keys(filter)[0] === "mime";
|
|
@@ -4212,10 +4220,10 @@ const FilterPopover = ({ displayedFilters: displayedFilters2, filters, onSubmit,
|
|
|
4212
4220
|
return;
|
|
4213
4221
|
}
|
|
4214
4222
|
const hasFilter = filters.find((filter) => {
|
|
4215
|
-
return filter[modifiedData.name] && filter[modifiedData.name]?.[modifiedData.filter] ===
|
|
4223
|
+
return filter[modifiedData.name] && filter[modifiedData.name]?.[modifiedData.filter] === encodedValue;
|
|
4216
4224
|
}) !== void 0;
|
|
4217
4225
|
if (!hasFilter) {
|
|
4218
|
-
let filterToAdd = { [modifiedData.name]: { [modifiedData.filter]:
|
|
4226
|
+
let filterToAdd = { [modifiedData.name]: { [modifiedData.filter]: encodedValue } };
|
|
4219
4227
|
const nextFilters = [...filters, filterToAdd];
|
|
4220
4228
|
onSubmit(nextFilters);
|
|
4221
4229
|
}
|
|
@@ -4768,7 +4776,7 @@ const BrowseStep = ({
|
|
|
4768
4776
|
}
|
|
4769
4777
|
)
|
|
4770
4778
|
] }),
|
|
4771
|
-
(assetCount > 0 || folderCount > 0 || isSearching) && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { marginLeft: "auto", shrink: 0, children: [
|
|
4779
|
+
(assetCount > 0 || folderCount > 0 || isSearching) && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { marginLeft: "auto", shrink: 0, gap: 2, children: [
|
|
4772
4780
|
/* @__PURE__ */ jsxRuntime.jsx(ActionContainer, { paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4773
4781
|
designSystem.IconButton,
|
|
4774
4782
|
{
|
|
@@ -6581,7 +6589,7 @@ const index = {
|
|
|
6581
6589
|
defaultMessage: "Media Library"
|
|
6582
6590
|
},
|
|
6583
6591
|
permissions: PERMISSIONS.main,
|
|
6584
|
-
Component: () => Promise.resolve().then(() => require("./index-
|
|
6592
|
+
Component: () => Promise.resolve().then(() => require("./index-C5E7jC83.js")),
|
|
6585
6593
|
position: 4
|
|
6586
6594
|
});
|
|
6587
6595
|
app.addSettingsLink("global", {
|
|
@@ -6591,7 +6599,7 @@ const index = {
|
|
|
6591
6599
|
defaultMessage: "Media Library"
|
|
6592
6600
|
},
|
|
6593
6601
|
to: "media-library",
|
|
6594
|
-
Component: () => Promise.resolve().then(() => require("./index-
|
|
6602
|
+
Component: () => Promise.resolve().then(() => require("./index-ox-PAURv.js")),
|
|
6595
6603
|
permissions: PERMISSIONS.settings
|
|
6596
6604
|
});
|
|
6597
6605
|
app.addFields({ type: "media", Component: MediaLibraryInput });
|
|
@@ -6660,4 +6668,4 @@ exports.useMediaLibraryPermissions = useMediaLibraryPermissions;
|
|
|
6660
6668
|
exports.usePersistentState = usePersistentState;
|
|
6661
6669
|
exports.useSelectionState = useSelectionState;
|
|
6662
6670
|
exports.viewOptions = viewOptions;
|
|
6663
|
-
//# sourceMappingURL=index-
|
|
6671
|
+
//# sourceMappingURL=index-BwMdH-eI.js.map
|