@strapi/upload 5.4.2 → 5.5.0
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/{App-BnJnub6y.mjs → App-CnKRJSFI.mjs} +3 -3
- package/dist/_chunks/{App-BnJnub6y.mjs.map → App-CnKRJSFI.mjs.map} +1 -1
- package/dist/_chunks/{App-B_qq8rgN.js → App-DvNA8DcO.js} +4 -5
- package/dist/_chunks/{App-B_qq8rgN.js.map → App-DvNA8DcO.js.map} +1 -1
- package/dist/_chunks/{ConfigureTheView-MSDjw9SU.mjs → ConfigureTheView-BiYrBNO5.mjs} +2 -2
- package/dist/_chunks/{ConfigureTheView-MSDjw9SU.mjs.map → ConfigureTheView-BiYrBNO5.mjs.map} +1 -1
- package/dist/_chunks/{ConfigureTheView-vQ7SyJK-.js → ConfigureTheView-CgkgNQgk.js} +3 -4
- package/dist/_chunks/{ConfigureTheView-vQ7SyJK-.js.map → ConfigureTheView-CgkgNQgk.js.map} +1 -1
- package/dist/_chunks/{SettingsPage-NQUNwQi_.mjs → SettingsPage-B0kz2mu3.mjs} +2 -2
- package/dist/_chunks/{SettingsPage-NQUNwQi_.mjs.map → SettingsPage-B0kz2mu3.mjs.map} +1 -1
- package/dist/_chunks/{SettingsPage-C5mG_qOn.js → SettingsPage-BBl5rnJi.js} +3 -4
- package/dist/_chunks/{SettingsPage-C5mG_qOn.js.map → SettingsPage-BBl5rnJi.js.map} +1 -1
- package/dist/_chunks/{graphql-68BJxih-.mjs → graphql-DMPTPlvx.mjs} +2 -2
- package/dist/_chunks/{graphql-68BJxih-.mjs.map → graphql-DMPTPlvx.mjs.map} +1 -1
- package/dist/_chunks/{graphql-DkkRswQX.js → graphql-QF5Y36Qj.js} +2 -2
- package/dist/_chunks/{graphql-DkkRswQX.js.map → graphql-QF5Y36Qj.js.map} +1 -1
- package/dist/_chunks/{index-DR3Ggk1w.mjs → index-B2N2JGA2.mjs} +67 -48
- package/dist/_chunks/index-B2N2JGA2.mjs.map +1 -0
- package/dist/_chunks/{index-BDq2waDf.js → index-D57iKFts.js} +9 -16
- package/dist/_chunks/{index-BDq2waDf.js.map → index-D57iKFts.js.map} +1 -1
- package/dist/_chunks/{index-Bc0RmE2T.js → index-jOutXPCm.js} +59 -40
- package/dist/_chunks/index-jOutXPCm.js.map +1 -0
- package/dist/_chunks/{index-BGwOh3pn.mjs → index-sOlgMDiZ.mjs} +9 -16
- package/dist/_chunks/{index-BGwOh3pn.mjs.map → index-sOlgMDiZ.mjs.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +10 -9
- package/dist/_chunks/index-Bc0RmE2T.js.map +0 -1
- package/dist/_chunks/index-DR3Ggk1w.mjs.map +0 -1
|
@@ -15,6 +15,7 @@ const formik = require("formik");
|
|
|
15
15
|
const isEqual = require("lodash/isEqual");
|
|
16
16
|
const ReactSelect = require("react-select");
|
|
17
17
|
const Cropper = require("cropperjs");
|
|
18
|
+
const MuxPlayer = require("@mux/mux-player-react");
|
|
18
19
|
require("cropperjs/dist/cropper.css");
|
|
19
20
|
const isEmpty = require("lodash/isEmpty");
|
|
20
21
|
const reactDnd = require("react-dnd");
|
|
@@ -23,8 +24,7 @@ const symbols = require("@strapi/icons/symbols");
|
|
|
23
24
|
const parseISO = require("date-fns/parseISO");
|
|
24
25
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
25
26
|
function _interopNamespace(e) {
|
|
26
|
-
if (e && e.__esModule)
|
|
27
|
-
return e;
|
|
27
|
+
if (e && e.__esModule) return e;
|
|
28
28
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
29
29
|
if (e) {
|
|
30
30
|
for (const k in e) {
|
|
@@ -46,19 +46,27 @@ const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
|
|
|
46
46
|
const isEqual__default = /* @__PURE__ */ _interopDefault(isEqual);
|
|
47
47
|
const ReactSelect__default = /* @__PURE__ */ _interopDefault(ReactSelect);
|
|
48
48
|
const Cropper__default = /* @__PURE__ */ _interopDefault(Cropper);
|
|
49
|
+
const MuxPlayer__default = /* @__PURE__ */ _interopDefault(MuxPlayer);
|
|
49
50
|
const isEmpty__default = /* @__PURE__ */ _interopDefault(isEmpty);
|
|
50
51
|
const parseISO__default = /* @__PURE__ */ _interopDefault(parseISO);
|
|
51
|
-
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
52
|
+
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
52
53
|
const v = glob[path];
|
|
53
54
|
if (v) {
|
|
54
55
|
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
55
56
|
}
|
|
56
57
|
return new Promise((_, reject) => {
|
|
57
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
58
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
59
|
+
reject.bind(
|
|
60
|
+
null,
|
|
61
|
+
new Error(
|
|
62
|
+
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
);
|
|
58
66
|
});
|
|
59
67
|
};
|
|
60
68
|
const name$1 = "@strapi/upload";
|
|
61
|
-
const version = "5.4.
|
|
69
|
+
const version = "5.4.2";
|
|
62
70
|
const description = "Makes it easy to upload images and files to your Strapi Application.";
|
|
63
71
|
const license = "SEE LICENSE IN LICENSE";
|
|
64
72
|
const author = {
|
|
@@ -114,10 +122,11 @@ const scripts = {
|
|
|
114
122
|
watch: "pack-up watch"
|
|
115
123
|
};
|
|
116
124
|
const dependencies = {
|
|
117
|
-
"@
|
|
118
|
-
"@strapi/
|
|
119
|
-
"@strapi/
|
|
120
|
-
"@strapi/
|
|
125
|
+
"@mux/mux-player-react": "3.1.0",
|
|
126
|
+
"@strapi/design-system": "2.0.0-rc.14",
|
|
127
|
+
"@strapi/icons": "2.0.0-rc.14",
|
|
128
|
+
"@strapi/provider-upload-local": "workspace:*",
|
|
129
|
+
"@strapi/utils": "workspace:*",
|
|
121
130
|
"byte-size": "8.1.1",
|
|
122
131
|
cropperjs: "1.6.1",
|
|
123
132
|
"date-fns": "2.30.0",
|
|
@@ -139,9 +148,9 @@ const dependencies = {
|
|
|
139
148
|
yup: "0.32.9"
|
|
140
149
|
};
|
|
141
150
|
const devDependencies = {
|
|
142
|
-
"@strapi/admin": "
|
|
143
|
-
"@strapi/pack-up": "5.0.
|
|
144
|
-
"@strapi/types": "
|
|
151
|
+
"@strapi/admin": "workspace:*",
|
|
152
|
+
"@strapi/pack-up": "5.0.2",
|
|
153
|
+
"@strapi/types": "workspace:*",
|
|
145
154
|
"@testing-library/dom": "10.1.0",
|
|
146
155
|
"@testing-library/react": "15.0.7",
|
|
147
156
|
"@testing-library/user-event": "14.5.2",
|
|
@@ -1629,34 +1638,17 @@ const RemoveAssetDialog = ({ open, onClose, asset }) => {
|
|
|
1629
1638
|
};
|
|
1630
1639
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open, onOpenChange: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.ConfirmDialog, { onConfirm: handleConfirm }) });
|
|
1631
1640
|
};
|
|
1632
|
-
const usePersistentState = (key, defaultValue) => {
|
|
1633
|
-
const [value, setValue] = React.useState(() => {
|
|
1634
|
-
const stickyValue = window.localStorage.getItem(key);
|
|
1635
|
-
if (stickyValue !== null) {
|
|
1636
|
-
try {
|
|
1637
|
-
return JSON.parse(stickyValue);
|
|
1638
|
-
} catch {
|
|
1639
|
-
return stickyValue;
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
return defaultValue;
|
|
1643
|
-
});
|
|
1644
|
-
React.useEffect(() => {
|
|
1645
|
-
window.localStorage.setItem(key, JSON.stringify(value));
|
|
1646
|
-
}, [key, value]);
|
|
1647
|
-
return [value, setValue];
|
|
1648
|
-
};
|
|
1649
1641
|
const CardAsset$1 = styledComponents.styled(designSystem.Flex)`
|
|
1650
1642
|
border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
|
|
1651
1643
|
background: linear-gradient(180deg, #ffffff 0%, #f6f6f9 121.48%);
|
|
1652
1644
|
`;
|
|
1653
1645
|
const AssetPreview = React__namespace.forwardRef(({ mime, url, name: name2, ...props }, ref) => {
|
|
1654
|
-
const
|
|
1646
|
+
const theme = styledComponents.useTheme();
|
|
1655
1647
|
if (mime.includes(AssetType.Image)) {
|
|
1656
1648
|
return /* @__PURE__ */ jsxRuntime.jsx("img", { ref, src: url, alt: name2, ...props });
|
|
1657
1649
|
}
|
|
1658
1650
|
if (mime.includes(AssetType.Video)) {
|
|
1659
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1651
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MuxPlayer__default.default, { src: url, accentColor: theme.colors.primary500 });
|
|
1660
1652
|
}
|
|
1661
1653
|
if (mime.includes(AssetType.Audio)) {
|
|
1662
1654
|
return /* @__PURE__ */ jsxRuntime.jsx("audio", { controls: true, src: url, ref, ...props, children: name2 });
|
|
@@ -1686,12 +1678,24 @@ const Wrapper$1 = styledComponents.styled.div`
|
|
|
1686
1678
|
}
|
|
1687
1679
|
|
|
1688
1680
|
img,
|
|
1689
|
-
|
|
1681
|
+
mux-player {
|
|
1690
1682
|
margin: 0;
|
|
1691
1683
|
padding: 0;
|
|
1692
1684
|
max-height: 26.4rem;
|
|
1693
1685
|
max-width: 100%;
|
|
1694
1686
|
}
|
|
1687
|
+
|
|
1688
|
+
mux-player {
|
|
1689
|
+
--play-button: inline-flex;
|
|
1690
|
+
--mute-button: inline-flex;
|
|
1691
|
+
--pip-button: inline-flex;
|
|
1692
|
+
--fullscreen-button: inline-flex;
|
|
1693
|
+
--playback-rate-button: inline-flex;
|
|
1694
|
+
--volume-range: inline-flex;
|
|
1695
|
+
--time-range: inline-flex;
|
|
1696
|
+
--time-display: inline-flex;
|
|
1697
|
+
--duration-display: inline-flex;
|
|
1698
|
+
}
|
|
1695
1699
|
`;
|
|
1696
1700
|
const ActionRow = styledComponents.styled(designSystem.Flex)`
|
|
1697
1701
|
height: 5.2rem;
|
|
@@ -2672,6 +2676,23 @@ const useFolder = (id, { enabled = true } = {}) => {
|
|
|
2672
2676
|
);
|
|
2673
2677
|
return { data, error, isLoading };
|
|
2674
2678
|
};
|
|
2679
|
+
const usePersistentState = (key, defaultValue) => {
|
|
2680
|
+
const [value, setValue] = React.useState(() => {
|
|
2681
|
+
const stickyValue = window.localStorage.getItem(key);
|
|
2682
|
+
if (stickyValue !== null) {
|
|
2683
|
+
try {
|
|
2684
|
+
return JSON.parse(stickyValue);
|
|
2685
|
+
} catch {
|
|
2686
|
+
return stickyValue;
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
return defaultValue;
|
|
2690
|
+
});
|
|
2691
|
+
React.useEffect(() => {
|
|
2692
|
+
window.localStorage.setItem(key, JSON.stringify(value));
|
|
2693
|
+
}, [key, value]);
|
|
2694
|
+
return [value, setValue];
|
|
2695
|
+
};
|
|
2675
2696
|
const Extension$1 = styledComponents.styled.span`
|
|
2676
2697
|
text-transform: uppercase;
|
|
2677
2698
|
`;
|
|
@@ -2840,8 +2861,7 @@ const VideoPreview = ({
|
|
|
2840
2861
|
};
|
|
2841
2862
|
const handleThumbnailVisibility = (e) => {
|
|
2842
2863
|
const video = e.currentTarget;
|
|
2843
|
-
if (video.readyState < HAVE_FUTURE_DATA)
|
|
2844
|
-
return;
|
|
2864
|
+
if (video.readyState < HAVE_FUTURE_DATA) return;
|
|
2845
2865
|
video.play();
|
|
2846
2866
|
};
|
|
2847
2867
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { tag: "figure", ...props, children: [
|
|
@@ -4373,8 +4393,7 @@ const SearchAsset = ({ onChangeSearch, queryValue = null }) => {
|
|
|
4373
4393
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { label: "Search", onClick: handleToggle, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {}) });
|
|
4374
4394
|
};
|
|
4375
4395
|
const isSelectable = (allowedTypes, mime = "") => {
|
|
4376
|
-
if (!mime)
|
|
4377
|
-
return false;
|
|
4396
|
+
if (!mime) return false;
|
|
4378
4397
|
const fileType = mime.split("/")[0];
|
|
4379
4398
|
return allowedTypes.includes(fileType) || allowedTypes.includes("file") && !["video", "image", "audio"].includes(fileType);
|
|
4380
4399
|
};
|
|
@@ -6014,7 +6033,7 @@ const admin = {
|
|
|
6014
6033
|
defaultMessage: "Media Library"
|
|
6015
6034
|
},
|
|
6016
6035
|
permissions: PERMISSIONS.main,
|
|
6017
|
-
Component: () => Promise.resolve().then(() => require("./App-
|
|
6036
|
+
Component: () => Promise.resolve().then(() => require("./App-DvNA8DcO.js")).then((mod) => ({ default: mod.Upload })),
|
|
6018
6037
|
position: 4
|
|
6019
6038
|
});
|
|
6020
6039
|
app.addSettingsLink("global", {
|
|
@@ -6025,7 +6044,7 @@ const admin = {
|
|
|
6025
6044
|
defaultMessage: "Media Library"
|
|
6026
6045
|
},
|
|
6027
6046
|
async Component() {
|
|
6028
|
-
const { ProtectedSettingsPage } = await Promise.resolve().then(() => require("./SettingsPage-
|
|
6047
|
+
const { ProtectedSettingsPage } = await Promise.resolve().then(() => require("./SettingsPage-BBl5rnJi.js"));
|
|
6029
6048
|
return { default: ProtectedSettingsPage };
|
|
6030
6049
|
},
|
|
6031
6050
|
permissions: PERMISSIONS.settings
|
|
@@ -6048,7 +6067,7 @@ const admin = {
|
|
|
6048
6067
|
async registerTrads({ locales }) {
|
|
6049
6068
|
const importedTrads = await Promise.all(
|
|
6050
6069
|
locales.map((locale) => {
|
|
6051
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-BUpuZx8N.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-uGb_Pkq7.js")), "./translations/dk.json": () => Promise.resolve().then(() => require("./dk-Cd8oFO-O.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-BcOqhiNe.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-DWFtw_h4.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-D2bop66d.js")), "./translations/he.json": () => Promise.resolve().then(() => require("./he-BpxHjaZg.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-BKCWXl8t.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-ajHzIJz6.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-Pzj-818C.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-h3gjldBy.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-esgZ7ltN.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-Cazr7Z5I.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-cbUnkHM5.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-H6MzFUxp.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CZxC4dFY.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-C6unJZ8j.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-CY6AwX50.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-BniyNsD4.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-k_xAc6nm.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CsZw0IpM.js")) }), `./translations/${locale}.json
|
|
6070
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-BUpuZx8N.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-uGb_Pkq7.js")), "./translations/dk.json": () => Promise.resolve().then(() => require("./dk-Cd8oFO-O.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-BcOqhiNe.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-DWFtw_h4.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-D2bop66d.js")), "./translations/he.json": () => Promise.resolve().then(() => require("./he-BpxHjaZg.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-BKCWXl8t.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-ajHzIJz6.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-Pzj-818C.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-h3gjldBy.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-esgZ7ltN.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-Cazr7Z5I.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-cbUnkHM5.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-H6MzFUxp.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CZxC4dFY.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-C6unJZ8j.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-CY6AwX50.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-BniyNsD4.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-k_xAc6nm.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CsZw0IpM.js")) }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
|
|
6052
6071
|
return {
|
|
6053
6072
|
data: prefixPluginTranslations(data, pluginId),
|
|
6054
6073
|
locale
|
|
@@ -6101,4 +6120,4 @@ exports.useMediaLibraryPermissions = useMediaLibraryPermissions;
|
|
|
6101
6120
|
exports.usePersistentState = usePersistentState;
|
|
6102
6121
|
exports.useSelectionState = useSelectionState;
|
|
6103
6122
|
exports.viewOptions = viewOptions;
|
|
6104
|
-
//# sourceMappingURL=index-
|
|
6123
|
+
//# sourceMappingURL=index-jOutXPCm.js.map
|