util-helpers 5.2.0 → 5.2.1
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/util-helpers.js +5 -5
- package/dist/util-helpers.js.map +1 -1
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/VERSION.js +1 -1
- package/esm/getFileType.js +2 -2
- package/esm/getMimeType.js +1 -1
- package/esm/utils/file.util.js +1 -1
- package/lib/VERSION.js +1 -1
- package/lib/getFileType.js +2 -2
- package/lib/getMimeType.js +1 -1
- package/lib/utils/file.util.js +1 -1
- package/package.json +1 -1
- package/types/AsyncMemo.d.ts +1 -1
- package/types/VERSION.d.ts +1 -2
- package/types/ajax.d.ts +19 -2
- package/types/download.d.ts +6 -19
- package/types/getFileType.d.ts +12 -1
- package/types/getImageInfo.d.ts +13 -3
- package/types/getMimeType.d.ts +40 -3
- package/types/loadImageWithBlob.d.ts +2 -1
- package/types/utils/file.util.d.ts +0 -1
package/dist/util-helpers.js
CHANGED
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
return !!name && name.slice(-ext.length) === ext;
|
|
1490
1490
|
}
|
|
1491
1491
|
function isUploadFile(fileObj) {
|
|
1492
|
-
if (isObjectLike(fileObj) && isString(fileObj.
|
|
1492
|
+
if (isObjectLike(fileObj) && isString(fileObj.name)) {
|
|
1493
1493
|
return true;
|
|
1494
1494
|
}
|
|
1495
1495
|
return false;
|
|
@@ -1733,9 +1733,9 @@
|
|
|
1733
1733
|
}
|
|
1734
1734
|
|
|
1735
1735
|
var config = {
|
|
1736
|
-
image: 'image/*,.jpeg,.jpg,.gif,.bmp,.png,.webp',
|
|
1736
|
+
image: 'image/*,.jpeg,.jpg,.gif,.bmp,.png,.webp,.svg,.apng,.avif,.ico,.tif,.tiff',
|
|
1737
1737
|
audio: 'audio/*,.mp3,.wav,.aac,.flac',
|
|
1738
|
-
video: 'video/*,.mp4,.webm,.ogg',
|
|
1738
|
+
video: 'video/*,.mp4,.webm,.ogg,.mov',
|
|
1739
1739
|
pdf: 'application/pdf,.pdf',
|
|
1740
1740
|
word: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,.doc,.docx',
|
|
1741
1741
|
excel: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,.xls,.xlsx'
|
|
@@ -1809,7 +1809,7 @@
|
|
|
1809
1809
|
];
|
|
1810
1810
|
function getMimeType(fileName) {
|
|
1811
1811
|
var _a;
|
|
1812
|
-
var ext = isString(fileName) ? nth(fileName.split('.'), -1) : '';
|
|
1812
|
+
var ext = isString(fileName) && fileName.indexOf('.') > 0 ? nth(fileName.split('.'), -1) : '';
|
|
1813
1813
|
return ext ? (_a = mimeTypes.find(function (item) { return item[1].includes(ext); })) === null || _a === void 0 ? void 0 : _a[0] : nativeUndefined;
|
|
1814
1814
|
}
|
|
1815
1815
|
|
|
@@ -2124,7 +2124,7 @@
|
|
|
2124
2124
|
return internalFindTreeSelect(tree, predicate, childrenField);
|
|
2125
2125
|
}
|
|
2126
2126
|
|
|
2127
|
-
var VERSION = "5.2.
|
|
2127
|
+
var VERSION = "5.2.1";
|
|
2128
2128
|
|
|
2129
2129
|
/**
|
|
2130
2130
|
* 事件触发器,支持浏览器端和 node 端。
|