@astral/ui 4.55.1 → 4.55.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.
Files changed (124) hide show
  1. package/components/ConfigProvider/ConfigProvider.d.ts +3 -2
  2. package/components/ConfigProvider/ConfigProvider.js +10 -4
  3. package/components/ErrorBoundary/ErrorBoundary.d.ts +2 -5
  4. package/components/ErrorBoundary/ErrorBoundary.js +9 -10
  5. package/components/ProductSwitcher/useLogic/useLogic.js +5 -4
  6. package/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +6 -7
  7. package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +8 -1
  8. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +8 -9
  9. package/components/fileUploading/hooks/useFileUploader/hooks/index.d.ts +1 -0
  10. package/components/fileUploading/hooks/useFileUploader/hooks/index.js +1 -0
  11. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/index.d.ts +1 -0
  12. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/index.js +1 -0
  13. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.d.ts +2 -0
  14. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.js +14 -0
  15. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.d.ts +5 -0
  16. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.js +23 -0
  17. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.d.ts +1 -0
  18. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.js +1 -0
  19. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.d.ts +2 -0
  20. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.js +2 -0
  21. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.d.ts +1 -0
  22. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.js +1 -0
  23. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.d.ts +2 -0
  24. package/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.js +10 -0
  25. package/components/fileUploading/hooks/useFileUploader/useFileUploader.js +3 -1
  26. package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +34 -120
  27. package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.js +10 -137
  28. package/components/fileUploading/restrictions/restrictFileType/constants.d.ts +4 -0
  29. package/components/fileUploading/restrictions/restrictFileType/constants.js +4 -0
  30. package/components/fileUploading/restrictions/restrictFileType/restrictFileType.d.ts +2 -2
  31. package/components/fileUploading/restrictions/restrictFileType/restrictFileType.js +31 -55
  32. package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.d.ts +5 -0
  33. package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.js +21 -0
  34. package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/index.d.ts +1 -0
  35. package/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/index.js +1 -0
  36. package/components/fileUploading/restrictions/restrictFileType/utils/index.d.ts +1 -2
  37. package/components/fileUploading/restrictions/restrictFileType/utils/index.js +1 -2
  38. package/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.d.ts +9 -0
  39. package/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.js +27 -0
  40. package/components/fileUploading/services/MimeTypeRegistry/constants.d.ts +1 -0
  41. package/components/fileUploading/services/MimeTypeRegistry/constants.js +343 -0
  42. package/components/fileUploading/services/MimeTypeRegistry/index.d.ts +1 -0
  43. package/components/fileUploading/services/MimeTypeRegistry/index.js +1 -0
  44. package/components/fileUploading/types.d.ts +10 -0
  45. package/components/fileUploading/utils/index.d.ts +1 -1
  46. package/components/fileUploading/utils/index.js +1 -1
  47. package/components/services/ErrorService/ErrorService.d.ts +29 -0
  48. package/components/services/ErrorService/ErrorService.js +36 -0
  49. package/components/services/ErrorService/index.d.ts +1 -0
  50. package/components/services/ErrorService/index.js +1 -0
  51. package/hook-form/useFormWizard/useFormWizard.js +7 -4
  52. package/node/components/ConfigProvider/ConfigProvider.d.ts +3 -2
  53. package/node/components/ConfigProvider/ConfigProvider.js +9 -3
  54. package/node/components/ErrorBoundary/ErrorBoundary.d.ts +2 -5
  55. package/node/components/ErrorBoundary/ErrorBoundary.js +9 -10
  56. package/node/components/ProductSwitcher/useLogic/useLogic.js +4 -3
  57. package/node/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +6 -7
  58. package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +8 -1
  59. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +8 -9
  60. package/node/components/fileUploading/hooks/useFileUploader/hooks/index.d.ts +1 -0
  61. package/node/components/fileUploading/{restrictions/restrictFileType/utils/getFileTypeFromName → hooks/useFileUploader/hooks}/index.js +1 -1
  62. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/index.d.ts +1 -0
  63. package/node/components/fileUploading/{restrictions/restrictFileType/utils/getFileTypeFromFile → hooks/useFileUploader/hooks/usePrepareAccept}/index.js +1 -1
  64. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.d.ts +2 -0
  65. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/usePrepareAccept.js +18 -0
  66. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.d.ts +5 -0
  67. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/getAcceptMeta.js +27 -0
  68. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.d.ts +1 -0
  69. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta/index.js +17 -0
  70. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.d.ts +2 -0
  71. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/index.js +18 -0
  72. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.d.ts +1 -0
  73. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/index.js +17 -0
  74. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.d.ts +2 -0
  75. package/node/components/fileUploading/hooks/useFileUploader/hooks/usePrepareAccept/utils/validateAcceptMeta/validateAcceptMeta.js +14 -0
  76. package/node/components/fileUploading/hooks/useFileUploader/useFileUploader.js +3 -1
  77. package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +34 -120
  78. package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.js +9 -136
  79. package/node/components/fileUploading/restrictions/restrictFileType/constants.d.ts +4 -0
  80. package/node/components/fileUploading/restrictions/restrictFileType/constants.js +5 -1
  81. package/node/components/fileUploading/restrictions/restrictFileType/restrictFileType.d.ts +2 -2
  82. package/node/components/fileUploading/restrictions/restrictFileType/restrictFileType.js +29 -53
  83. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.d.ts +5 -0
  84. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/getFileMeta.js +25 -0
  85. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileMeta/index.d.ts +1 -0
  86. package/node/components/fileUploading/restrictions/restrictFileType/utils/{prepareType → getFileMeta}/index.js +1 -1
  87. package/node/components/fileUploading/restrictions/restrictFileType/utils/index.d.ts +1 -2
  88. package/node/components/fileUploading/restrictions/restrictFileType/utils/index.js +1 -2
  89. package/node/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.d.ts +9 -0
  90. package/node/components/fileUploading/services/MimeTypeRegistry/MimeTypeRegistry.js +31 -0
  91. package/node/components/fileUploading/services/MimeTypeRegistry/constants.d.ts +1 -0
  92. package/node/components/fileUploading/services/MimeTypeRegistry/constants.js +347 -0
  93. package/node/components/fileUploading/services/MimeTypeRegistry/index.d.ts +1 -0
  94. package/node/components/fileUploading/services/MimeTypeRegistry/index.js +17 -0
  95. package/node/components/fileUploading/types.d.ts +10 -0
  96. package/node/components/fileUploading/utils/index.d.ts +1 -1
  97. package/node/components/fileUploading/utils/index.js +16 -3
  98. package/node/components/services/ErrorService/ErrorService.d.ts +29 -0
  99. package/node/components/services/ErrorService/ErrorService.js +40 -0
  100. package/node/components/services/ErrorService/index.d.ts +1 -0
  101. package/node/components/services/ErrorService/index.js +17 -0
  102. package/node/hook-form/useFormWizard/useFormWizard.js +6 -3
  103. package/package.json +1 -1
  104. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.d.ts +0 -4
  105. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.js +0 -10
  106. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.d.ts +0 -1
  107. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.js +0 -1
  108. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.d.ts +0 -4
  109. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.js +0 -13
  110. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.d.ts +0 -1
  111. package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.js +0 -1
  112. package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.d.ts +0 -1
  113. package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.js +0 -1
  114. package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.d.ts +0 -5
  115. package/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.js +0 -5
  116. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.d.ts +0 -4
  117. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/getFileTypeFromFile.js +0 -14
  118. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.d.ts +0 -1
  119. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.d.ts +0 -4
  120. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/getFileTypeFromName.js +0 -17
  121. package/node/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.d.ts +0 -1
  122. package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/index.d.ts +0 -1
  123. package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.d.ts +0 -5
  124. package/node/components/fileUploading/restrictions/restrictFileType/utils/prepareType/prepareType.js +0 -9
@@ -1,5 +0,0 @@
1
- /**
2
- * Убирает точку в типе файла, приводит к нижнему регистру
3
- * Необходимо для корректного сравнения fileType
4
- */
5
- export declare const prepareType: (type: string) => string;
@@ -1,5 +0,0 @@
1
- /**
2
- * Убирает точку в типе файла, приводит к нижнему регистру
3
- * Необходимо для корректного сравнения fileType
4
- */
5
- export const prepareType = (type) => type.toLowerCase().trim().replace(/^\.*/, '');
@@ -1,4 +0,0 @@
1
- /**
2
- * Возвращает формат файла из файла
3
- */
4
- export declare const getFileTypeFromFile: (file: File) => string;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFileTypeFromFile = void 0;
4
- const getFileTypeFromName_1 = require("../getFileTypeFromName");
5
- /**
6
- * Возвращает формат файла из файла
7
- */
8
- const getFileTypeFromFile = (file) => {
9
- if (file.type) {
10
- return file.type;
11
- }
12
- return (0, getFileTypeFromName_1.getFileTypeFromName)(file.name);
13
- };
14
- exports.getFileTypeFromFile = getFileTypeFromFile;
@@ -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,5 +0,0 @@
1
- /**
2
- * Убирает точку в типе файла, приводит к нижнему регистру
3
- * Необходимо для корректного сравнения fileType
4
- */
5
- export declare const prepareType: (type: string) => string;
@@ -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;