@astral/ui 4.55.1 → 4.55.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.
- package/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/components/ConfigProvider/ConfigProvider.js +10 -4
- package/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +4 -3
- package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +8 -1
- package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +6 -5
- package/components/fileUploading/hooks/useFileUploader/hooks/index.d.ts +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/index.js +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/index.d.ts +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/index.js +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.d.ts +2 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.js +14 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.d.ts +5 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.js +23 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.d.ts +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.js +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.d.ts +2 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.js +2 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.d.ts +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.js +1 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.d.ts +2 -0
- package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.js +10 -0
- package/components/fileUploading/hooks/useFileUploader/useFileUploader.js +3 -1
- package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +34 -120
- package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.js +10 -137
- package/components/fileUploading/restrictions/restrictFileType/constants.d.ts +4 -0
- package/components/fileUploading/restrictions/restrictFileType/constants.js +4 -0
- package/components/fileUploading/restrictions/restrictFileType/restrictFileType.d.ts +2 -2
- package/components/fileUploading/restrictions/restrictFileType/restrictFileType.js +31 -55
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.d.ts +5 -0
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.js +21 -0
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/index.d.ts +1 -0
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/index.js +1 -0
- package/components/fileUploading/restrictions/restrictFileType/utils/index.d.ts +1 -2
- package/components/fileUploading/restrictions/restrictFileType/utils/index.js +1 -2
- package/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.d.ts +9 -0
- package/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.js +27 -0
- package/components/fileUploading/services/MimeTypeRegistry/constants.d.ts +1 -0
- package/components/fileUploading/services/MimeTypeRegistry/constants.js +343 -0
- package/components/fileUploading/services/MimeTypeRegistry/index.d.ts +1 -0
- package/components/fileUploading/services/MimeTypeRegistry/index.js +1 -0
- package/components/fileUploading/types.d.ts +10 -0
- package/components/fileUploading/utils/index.d.ts +1 -1
- package/components/fileUploading/utils/index.js +1 -1
- package/components/services/ErrorService/ErrorService.d.ts +17 -0
- package/components/services/ErrorService/ErrorService.js +33 -0
- package/components/services/ErrorService/index.d.ts +1 -0
- package/components/services/ErrorService/index.js +1 -0
- package/node/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/node/components/ConfigProvider/ConfigProvider.js +9 -3
- package/node/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +4 -3
- package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +8 -1
- package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +6 -5
- package/node/components/fileUploading/hooks/useFileUploader/hooks/index.d.ts +1 -0
- package/node/components/fileUploading/{restrictions/restrictFileType/utils/getFileTypeFromName → hooks/useFileUploader/hooks}/index.js +1 -1
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/index.d.ts +1 -0
- package/node/components/fileUploading/{restrictions/restrictFileType/utils/getFileTypeFromFile → hooks/useFileUploader/hooks/usePrepareAccept}/index.js +1 -1
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.d.ts +2 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.js +18 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.d.ts +5 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.js +27 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.d.ts +1 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.js +17 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.d.ts +2 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.js +18 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.d.ts +1 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.js +17 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.d.ts +2 -0
- package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.js +14 -0
- package/node/components/fileUploading/hooks/useFileUploader/useFileUploader.js +3 -1
- package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +34 -120
- package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.js +9 -136
- package/node/components/fileUploading/restrictions/restrictFileType/constants.d.ts +4 -0
- package/node/components/fileUploading/restrictions/restrictFileType/constants.js +5 -1
- package/node/components/fileUploading/restrictions/restrictFileType/restrictFileType.d.ts +2 -2
- package/node/components/fileUploading/restrictions/restrictFileType/restrictFileType.js +29 -53
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.d.ts +5 -0
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.js +25 -0
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/index.d.ts +1 -0
- package/node/components/fileUploading/restrictions/restrictFileType/utils/{prepareType → getFileMeta}/index.js +1 -1
- package/node/components/fileUploading/restrictions/restrictFileType/utils/index.d.ts +1 -2
- package/node/components/fileUploading/restrictions/restrictFileType/utils/index.js +1 -2
- package/node/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.d.ts +9 -0
- package/node/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.js +31 -0
- package/node/components/fileUploading/services/MimeTypeRegistry/constants.d.ts +1 -0
- package/node/components/fileUploading/services/MimeTypeRegistry/constants.js +347 -0
- package/node/components/fileUploading/services/MimeTypeRegistry/index.d.ts +1 -0
- package/node/components/fileUploading/services/MimeTypeRegistry/index.js +17 -0
- package/node/components/fileUploading/types.d.ts +10 -0
- package/node/components/fileUploading/utils/index.d.ts +1 -1
- package/node/components/fileUploading/utils/index.js +16 -3
- package/node/components/services/ErrorService/ErrorService.d.ts +17 -0
- package/node/components/services/ErrorService/ErrorService.js +37 -0
- package/node/components/services/ErrorService/index.d.ts +1 -0
- package/node/components/services/ErrorService/index.js +17 -0
- package/package.json +1 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.d.ts +0 -4
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.js +0 -10
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.d.ts +0 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.js +0 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.d.ts +0 -4
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.js +0 -13
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.d.ts +0 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.js +0 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.d.ts +0 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.js +0 -1
- package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.d.ts +0 -5
- package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.js +0 -5
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.d.ts +0 -4
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.js +0 -14
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.d.ts +0 -1
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.d.ts +0 -4
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.js +0 -17
- package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.d.ts +0 -1
- package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.d.ts +0 -1
- package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.d.ts +0 -5
- package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.js +0 -9
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Возвращает формат файла из названия файла
|
|
3
|
-
*/
|
|
4
|
-
export declare const getFileTypeFromName: (filename: string) => "" | "application/andrew-inset" | "application/applixware" | "application/atom+xml" | "application/atomcat+xml" | "application/atomdeleted+xml" | "application/atomsvc+xml" | "application/atsc-dwd+xml" | "application/atsc-held+xml" | "application/atsc-rsat+xml" | "application/bdoc" | "application/calendar+xml" | "application/ccxml+xml" | "application/cdfx+xml" | "application/cdmi-capability" | "application/cdmi-container" | "application/cdmi-domain" | "application/cdmi-object" | "application/cdmi-queue" | "application/cu-seeme" | "application/dash+xml" | "application/davmount+xml" | "application/docbook+xml" | "application/dssc+der" | "application/dssc+xml" | "application/ecmascript" | "application/emma+xml" | "application/emotionml+xml" | "application/epub+zip" | "application/exi" | "application/fdt+xml" | "application/font-tdpfr" | "application/geo+json" | "application/gml+xml" | "application/gpx+xml" | "application/gxf" | "application/gzip" | "application/hjson" | "application/hyperstudio" | "application/inkml+xml" | "application/ipfix" | "application/its+xml" | "application/java-archive" | "application/java-serialized-object" | "application/java-vm" | "application/javascript" | "application/json" | "application/json5" | "application/jsonml+json" | "application/ld+json" | "application/lgr+xml" | "application/lost+xml" | "application/mac-binhex40" | "application/mac-compactpro" | "application/mads+xml" | "application/manifest+json" | "application/marc" | "application/marcxml+xml" | "application/mathematica" | "application/mathml+xml" | "application/mbox" | "application/mediaservercontrol+xml" | "application/metalink+xml" | "application/metalink4+xml" | "application/mets+xml" | "application/mmt-aei+xml" | "application/mmt-usd+xml" | "application/mods+xml" | "application/mp21" | "application/mp4" | "application/mrb-consumer+xml" | "application/mrb-publish+xml" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/mxf" | "application/n-quads" | "application/n-triples" | "application/node" | "application/octet-stream" | "application/oda" | "application/oebps-package+xml" | "application/ogg" | "application/omdoc+xml" | "application/onenote" | "application/oxps" | "application/p2p-overlay+xml" | "application/patch-ops-error+xml" | "application/pdf" | "application/pgp-encrypted" | "application/pgp-signature" | "application/pics-rules" | "application/pkcs10" | "application/pkcs7-mime" | "application/pkcs7-signature" | "application/pkcs8" | "application/pkix-attr-cert" | "application/pkix-cert" | "application/pkix-crl" | "application/pkix-pkipath" | "application/pkixcmp" | "application/pls+xml" | "application/postscript" | "application/provenance+xml" | "application/pskc+xml" | "application/raml+yaml" | "application/rdf+xml" | "application/reginfo+xml" | "application/relax-ng-compact-syntax" | "application/resource-lists+xml" | "application/resource-lists-diff+xml" | "application/rls-services+xml" | "application/route-apd+xml" | "application/route-s-tsid+xml" | "application/route-usd+xml" | "application/rpki-ghostbusters" | "application/rpki-manifest" | "application/rpki-roa" | "application/rsd+xml" | "application/rss+xml" | "application/rtf" | "application/sbml+xml" | "application/scvp-cv-request" | "application/scvp-cv-response" | "application/scvp-vp-request" | "application/scvp-vp-response" | "application/sdp" | "application/senml+xml" | "application/sensml+xml" | "application/set-payment-initiation" | "application/set-registration-initiation" | "application/shf+xml" | "application/sieve" | "application/smil+xml" | "application/sparql-query" | "application/sparql-results+xml" | "application/srgs" | "application/srgs+xml" | "application/sru+xml" | "application/ssdl+xml" | "application/ssml+xml" | "application/swid+xml" | "application/tei+xml" | "application/thraud+xml" | "application/timestamped-data" | "application/toml" | "application/ttml+xml" | "application/ubjson" | "application/urc-ressheet+xml" | "application/urc-targetdesc+xml" | "application/voicexml+xml" | "application/wasm" | "application/widget" | "application/winhlp" | "application/wsdl+xml" | "application/wspolicy+xml" | "application/xaml+xml" | "application/xcap-att+xml" | "application/xcap-caps+xml" | "application/xcap-diff+xml" | "application/xcap-el+xml" | "application/xcap-error+xml" | "application/xcap-ns+xml" | "application/xenc+xml" | "application/xhtml+xml" | "application/xliff+xml" | "application/xml" | "application/xml-dtd" | "application/vnd.oasis.opendocument.text" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.graphics" | "application/vnd.oasis.opendocument.presentation" | "application/xop+xml" | "application/xproc+xml" | "application/xslt+xml" | "application/xspf+xml" | "application/xv+xml" | "application/yang" | "application/yin+xml" | "application/zip" | "audio/3gpp" | "audio/adpcm" | "audio/amr" | "audio/basic" | "audio/midi" | "audio/mobile-xmf" | "audio/mp3" | "audio/mp4" | "audio/mpeg" | "audio/ogg" | "audio/s3m" | "audio/silk" | "audio/wav" | "audio/wave" | "audio/webm" | "audio/xm" | "font/collection" | "font/otf" | "font/ttf" | "font/woff" | "font/woff2" | "image/aces" | "image/apng" | "image/avif" | "image/bmp" | "image/cgm" | "image/dicom-rle" | "image/emf" | "image/fits" | "image/g3fax" | "image/gif" | "image/heic" | "image/heic-sequence" | "image/heif" | "image/heif-sequence" | "image/hej2k" | "image/hsj2" | "image/ief" | "image/jls" | "image/jp2" | "image/jpeg" | "image/jph" | "image/jphc" | "image/jpm" | "image/jpx" | "image/jxr" | "image/jxra" | "image/jxrs" | "image/jxs" | "image/jxsc" | "image/jxsi" | "image/jxss" | "image/ktx" | "image/ktx2" | "image/png" | "image/sgi" | "image/svg+xml" | "image/t38" | "image/tiff" | "image/tiff-fx" | "image/webp" | "image/wmf" | "message/disposition-notification" | "message/global" | "message/global-delivery-status" | "message/global-disposition-notification" | "message/global-headers" | "message/rfc822" | "model/3mf" | "model/gltf+json" | "model/gltf-binary" | "model/iges" | "model/mesh" | "model/mtl" | "model/obj" | "model/stl" | "model/vrml" | "model/x3d+binary" | "model/x3d+fastinfoset" | "model/x3d+vrml" | "model/x3d+xml" | "model/x3d-vrml" | "text/cache-manifest" | "text/calendar" | "text/coffeescript" | "text/css" | "text/csv" | "text/html" | "text/jade" | "text/jsx" | "text/less" | "text/markdown" | "text/mathml" | "text/mdx" | "text/n3" | "text/plain" | "text/richtext" | "text/rtf" | "text/sgml" | "text/shex" | "text/slim" | "text/spdx" | "text/stylus" | "text/tab-separated-values" | "text/troff" | "text/turtle" | "text/uri-list" | "text/vcard" | "text/vtt" | "text/xml" | "text/yaml" | "video/3gpp" | "video/3gpp2" | "video/h261" | "video/h263" | "video/h264" | "video/iso.segment" | "video/jpeg" | "video/jpm" | "video/mj2" | "video/mp2t" | "video/mp4" | "video/mpeg" | "video/ogg" | "video/quicktime" | "video/webm" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-excel" | "application/x-x509-ca-cert" | "application/x-pkcs7-certificates" | "application/sig";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFileTypeFromName = void 0;
|
|
4
|
-
const getFileType_1 = require("@astral/utils/file/getFileType");
|
|
5
|
-
/**
|
|
6
|
-
* Возвращает формат файла из названия файла
|
|
7
|
-
*/
|
|
8
|
-
const getFileTypeFromName = (filename) => {
|
|
9
|
-
const lastDotIndex = filename.lastIndexOf('.');
|
|
10
|
-
if (lastDotIndex < 0) {
|
|
11
|
-
return '';
|
|
12
|
-
}
|
|
13
|
-
// Берём всё после последней точки
|
|
14
|
-
const extension = filename.slice(lastDotIndex + 1);
|
|
15
|
-
return (0, getFileType_1.getFileType)(extension) || extension;
|
|
16
|
-
};
|
|
17
|
-
exports.getFileTypeFromName = getFileTypeFromName;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './getFileTypeFromName';
|
package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './prepareType';
|
package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prepareType = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Убирает точку в типе файла, приводит к нижнему регистру
|
|
6
|
-
* Необходимо для корректного сравнения fileType
|
|
7
|
-
*/
|
|
8
|
-
const prepareType = (type) => type.toLowerCase().trim().replace(/^\.*/, '');
|
|
9
|
-
exports.prepareType = prepareType;
|