@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.
- package/components/ConfigProvider/ConfigProvider.d.ts +3 -2
- package/components/ConfigProvider/ConfigProvider.js +10 -4
- package/components/ErrorBoundary/ErrorBoundary.d.ts +2 -5
- package/components/ErrorBoundary/ErrorBoundary.js +9 -10
- package/components/ProductSwitcher/useLogic/useLogic.js +5 -4
- package/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +6 -7
- package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +8 -1
- package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +8 -9
- 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 +29 -0
- package/components/services/ErrorService/ErrorService.js +36 -0
- package/components/services/ErrorService/index.d.ts +1 -0
- package/components/services/ErrorService/index.js +1 -0
- package/hook-form/useFormWizard/useFormWizard.js +7 -4
- package/node/components/ConfigProvider/ConfigProvider.d.ts +3 -2
- package/node/components/ConfigProvider/ConfigProvider.js +9 -3
- package/node/components/ErrorBoundary/ErrorBoundary.d.ts +2 -5
- package/node/components/ErrorBoundary/ErrorBoundary.js +9 -10
- package/node/components/ProductSwitcher/useLogic/useLogic.js +4 -3
- package/node/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +6 -7
- package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +8 -1
- package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +8 -9
- 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 +29 -0
- package/node/components/services/ErrorService/ErrorService.js +40 -0
- package/node/components/services/ErrorService/index.d.ts +1 -0
- package/node/components/services/ErrorService/index.js +17 -0
- package/node/hook-form/useFormWizard/useFormWizard.js +6 -3
- 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
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMimeTypesMap = void 0;
|
|
4
|
+
/* cSpell:disable */
|
|
5
|
+
const getMimeTypesMap = () => ({
|
|
6
|
+
'application/andrew-inset': ['ez'],
|
|
7
|
+
'application/applixware': ['aw'],
|
|
8
|
+
'application/atom+xml': ['atom'],
|
|
9
|
+
'application/atomcat+xml': ['atomcat'],
|
|
10
|
+
'application/atomdeleted+xml': ['atomdeleted'],
|
|
11
|
+
'application/atomsvc+xml': ['atomsvc'],
|
|
12
|
+
'application/atsc-dwd+xml': ['dwd'],
|
|
13
|
+
'application/atsc-held+xml': ['held'],
|
|
14
|
+
'application/atsc-rsat+xml': ['rsat'],
|
|
15
|
+
'application/bdoc': ['bdoc'],
|
|
16
|
+
'application/calendar+xml': ['xcs'],
|
|
17
|
+
'application/ccxml+xml': ['ccxml'],
|
|
18
|
+
'application/cdfx+xml': ['cdfx'],
|
|
19
|
+
'application/cdmi-capability': ['cdmia'],
|
|
20
|
+
'application/cdmi-container': ['cdmic'],
|
|
21
|
+
'application/cdmi-domain': ['cdmid'],
|
|
22
|
+
'application/cdmi-object': ['cdmio'],
|
|
23
|
+
'application/cdmi-queue': ['cdmiq'],
|
|
24
|
+
'application/cu-seeme': ['cu'],
|
|
25
|
+
'application/dash+xml': ['mpd'],
|
|
26
|
+
'application/davmount+xml': ['davmount'],
|
|
27
|
+
'application/docbook+xml': ['dbk'],
|
|
28
|
+
'application/dssc+der': ['dssc'],
|
|
29
|
+
'application/dssc+xml': ['xdssc'],
|
|
30
|
+
'application/ecmascript': ['ecma', 'es'],
|
|
31
|
+
'application/emma+xml': ['emma'],
|
|
32
|
+
'application/emotionml+xml': ['emotionml'],
|
|
33
|
+
'application/epub+zip': ['epub'],
|
|
34
|
+
'application/exi': ['exi'],
|
|
35
|
+
'application/fdt+xml': ['fdt'],
|
|
36
|
+
'application/font-tdpfr': ['pfr'],
|
|
37
|
+
'application/geo+json': ['geojson'],
|
|
38
|
+
'application/gml+xml': ['gml'],
|
|
39
|
+
'application/gpx+xml': ['gpx'],
|
|
40
|
+
'application/gxf': ['gxf'],
|
|
41
|
+
'application/gzip': ['gz'],
|
|
42
|
+
'application/hjson': ['hjson'],
|
|
43
|
+
'application/hyperstudio': ['stk'],
|
|
44
|
+
'application/inkml+xml': ['ink', 'inkml'],
|
|
45
|
+
'application/ipfix': ['ipfix'],
|
|
46
|
+
'application/its+xml': ['its'],
|
|
47
|
+
'application/java-archive': ['jar', 'war', 'ear'],
|
|
48
|
+
'application/java-serialized-object': ['ser'],
|
|
49
|
+
'application/java-vm': ['class'],
|
|
50
|
+
'application/javascript': ['js', 'mjs'],
|
|
51
|
+
'application/json': ['json', 'map'],
|
|
52
|
+
'application/json5': ['json5'],
|
|
53
|
+
'application/jsonml+json': ['jsonml'],
|
|
54
|
+
'application/ld+json': ['jsonld'],
|
|
55
|
+
'application/lgr+xml': ['lgr'],
|
|
56
|
+
'application/lost+xml': ['lostxml'],
|
|
57
|
+
'application/mac-binhex40': ['hqx'],
|
|
58
|
+
'application/mac-compactpro': ['cpt'],
|
|
59
|
+
'application/mads+xml': ['mads'],
|
|
60
|
+
'application/manifest+json': ['webmanifest'],
|
|
61
|
+
'application/marc': ['mrc'],
|
|
62
|
+
'application/marcxml+xml': ['mrcx'],
|
|
63
|
+
'application/mathematica': ['ma', 'nb', 'mb'],
|
|
64
|
+
'application/mathml+xml': ['mathml'],
|
|
65
|
+
'application/mbox': ['mbox'],
|
|
66
|
+
'application/mediaservercontrol+xml': ['mscml'],
|
|
67
|
+
'application/metalink+xml': ['metalink'],
|
|
68
|
+
'application/metalink4+xml': ['meta4'],
|
|
69
|
+
'application/mets+xml': ['mets'],
|
|
70
|
+
'application/mmt-aei+xml': ['maei'],
|
|
71
|
+
'application/mmt-usd+xml': ['musd'],
|
|
72
|
+
'application/mods+xml': ['mods'],
|
|
73
|
+
'application/mp21': ['m21', 'mp21'],
|
|
74
|
+
'application/mp4': ['mp4s', 'm4p'],
|
|
75
|
+
'application/mrb-consumer+xml': ['*xdf'],
|
|
76
|
+
'application/mrb-publish+xml': ['*xdf'],
|
|
77
|
+
'application/msword': ['doc', 'dot'],
|
|
78
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [
|
|
79
|
+
'docx',
|
|
80
|
+
],
|
|
81
|
+
'application/mxf': ['mxf'],
|
|
82
|
+
'application/n-quads': ['nq'],
|
|
83
|
+
'application/n-triples': ['nt'],
|
|
84
|
+
'application/node': ['cjs'],
|
|
85
|
+
'application/octet-stream': [
|
|
86
|
+
'bin',
|
|
87
|
+
'dms',
|
|
88
|
+
'lrf',
|
|
89
|
+
'mar',
|
|
90
|
+
'so',
|
|
91
|
+
'dist',
|
|
92
|
+
'distz',
|
|
93
|
+
'pkg',
|
|
94
|
+
'bpk',
|
|
95
|
+
'dump',
|
|
96
|
+
'elc',
|
|
97
|
+
'deploy',
|
|
98
|
+
'exe',
|
|
99
|
+
'dll',
|
|
100
|
+
'deb',
|
|
101
|
+
'dmg',
|
|
102
|
+
'iso',
|
|
103
|
+
'img',
|
|
104
|
+
'msi',
|
|
105
|
+
'msp',
|
|
106
|
+
'msm',
|
|
107
|
+
'buffer',
|
|
108
|
+
],
|
|
109
|
+
'application/oda': ['oda'],
|
|
110
|
+
'application/oebps-package+xml': ['opf'],
|
|
111
|
+
'application/ogg': ['ogx'],
|
|
112
|
+
'application/omdoc+xml': ['omdoc'],
|
|
113
|
+
'application/onenote': ['onetoc', 'onetoc2', 'onetmp', 'onepkg'],
|
|
114
|
+
'application/oxps': ['oxps'],
|
|
115
|
+
'application/p2p-overlay+xml': ['relo'],
|
|
116
|
+
'application/patch-ops-error+xml': ['*xer'],
|
|
117
|
+
'application/pdf': ['pdf'],
|
|
118
|
+
'application/pgp-encrypted': ['pgp'],
|
|
119
|
+
'application/pgp-signature': ['asc', 'sig'],
|
|
120
|
+
'application/pics-rules': ['prf'],
|
|
121
|
+
'application/pkcs10': ['p10'],
|
|
122
|
+
'application/pkcs7-mime': ['p7m', 'p7c'],
|
|
123
|
+
'application/pkcs7-signature': ['p7s'],
|
|
124
|
+
'application/pkcs8': ['p8'],
|
|
125
|
+
'application/pkix-attr-cert': ['ac'],
|
|
126
|
+
'application/pkix-cert': ['cer'],
|
|
127
|
+
'application/pkix-crl': ['crl'],
|
|
128
|
+
'application/pkix-pkipath': ['pkipath'],
|
|
129
|
+
'application/pkixcmp': ['pki'],
|
|
130
|
+
'application/pls+xml': ['pls'],
|
|
131
|
+
'application/postscript': ['ai', 'eps', 'ps'],
|
|
132
|
+
'application/provenance+xml': ['provx'],
|
|
133
|
+
'application/pskc+xml': ['pskcxml'],
|
|
134
|
+
'application/raml+yaml': ['raml'],
|
|
135
|
+
'application/rdf+xml': ['rdf', 'owl'],
|
|
136
|
+
'application/reginfo+xml': ['rif'],
|
|
137
|
+
'application/relax-ng-compact-syntax': ['rnc'],
|
|
138
|
+
'application/resource-lists+xml': ['rl'],
|
|
139
|
+
'application/resource-lists-diff+xml': ['rld'],
|
|
140
|
+
'application/rls-services+xml': ['rs'],
|
|
141
|
+
'application/route-apd+xml': ['rapd'],
|
|
142
|
+
'application/route-s-tsid+xml': ['sls'],
|
|
143
|
+
'application/route-usd+xml': ['rusd'],
|
|
144
|
+
'application/rpki-ghostbusters': ['gbr'],
|
|
145
|
+
'application/rpki-manifest': ['mft'],
|
|
146
|
+
'application/rpki-roa': ['roa'],
|
|
147
|
+
'application/rsd+xml': ['rsd'],
|
|
148
|
+
'application/rss+xml': ['rss'],
|
|
149
|
+
'application/rtf': ['rtf'],
|
|
150
|
+
'application/sbml+xml': ['sbml'],
|
|
151
|
+
'application/scvp-cv-request': ['scq'],
|
|
152
|
+
'application/scvp-cv-response': ['scs'],
|
|
153
|
+
'application/scvp-vp-request': ['spq'],
|
|
154
|
+
'application/scvp-vp-response': ['spp'],
|
|
155
|
+
'application/sdp': ['sdp'],
|
|
156
|
+
'application/senml+xml': ['senmlx'],
|
|
157
|
+
'application/sensml+xml': ['sensmlx'],
|
|
158
|
+
'application/set-payment-initiation': ['setpay'],
|
|
159
|
+
'application/set-registration-initiation': ['setreg'],
|
|
160
|
+
'application/shf+xml': ['shf'],
|
|
161
|
+
'application/sieve': ['siv', 'sieve'],
|
|
162
|
+
'application/smil+xml': ['smi', 'smil'],
|
|
163
|
+
'application/sparql-query': ['rq'],
|
|
164
|
+
'application/sparql-results+xml': ['srx'],
|
|
165
|
+
'application/srgs': ['gram'],
|
|
166
|
+
'application/srgs+xml': ['grxml'],
|
|
167
|
+
'application/sru+xml': ['sru'],
|
|
168
|
+
'application/ssdl+xml': ['ssdl'],
|
|
169
|
+
'application/ssml+xml': ['ssml'],
|
|
170
|
+
'application/swid+xml': ['swidtag'],
|
|
171
|
+
'application/tei+xml': ['tei', 'teicorpus'],
|
|
172
|
+
'application/thraud+xml': ['tfi'],
|
|
173
|
+
'application/timestamped-data': ['tsd'],
|
|
174
|
+
'application/toml': ['toml'],
|
|
175
|
+
'application/ttml+xml': ['ttml'],
|
|
176
|
+
'application/ubjson': ['ubj'],
|
|
177
|
+
'application/urc-ressheet+xml': ['rsheet'],
|
|
178
|
+
'application/urc-targetdesc+xml': ['td'],
|
|
179
|
+
'application/voicexml+xml': ['vxml'],
|
|
180
|
+
'application/wasm': ['wasm'],
|
|
181
|
+
'application/widget': ['wgt'],
|
|
182
|
+
'application/winhlp': ['hlp'],
|
|
183
|
+
'application/wsdl+xml': ['wsdl'],
|
|
184
|
+
'application/wspolicy+xml': ['wspolicy'],
|
|
185
|
+
'application/xaml+xml': ['xaml'],
|
|
186
|
+
'application/xcap-att+xml': ['xav'],
|
|
187
|
+
'application/xcap-caps+xml': ['xca'],
|
|
188
|
+
'application/xcap-diff+xml': ['xdf'],
|
|
189
|
+
'application/xcap-el+xml': ['xel'],
|
|
190
|
+
'application/xcap-error+xml': ['xer'],
|
|
191
|
+
'application/xcap-ns+xml': ['xns'],
|
|
192
|
+
'application/xenc+xml': ['xenc'],
|
|
193
|
+
'application/xhtml+xml': ['xhtml', 'xht'],
|
|
194
|
+
'application/xliff+xml': ['xlf'],
|
|
195
|
+
'application/xml': ['xml', 'xsl', 'xsd', 'rng'],
|
|
196
|
+
'application/xml-dtd': ['dtd'],
|
|
197
|
+
'application/vnd.oasis.opendocument.text': ['odt'],
|
|
198
|
+
'application/vnd.oasis.opendocument.spreadsheet': ['ods'],
|
|
199
|
+
'application/vnd.oasis.opendocument.graphics': ['odg'],
|
|
200
|
+
'application/vnd.oasis.opendocument.presentation': ['odp'],
|
|
201
|
+
'application/xop+xml': ['xop'],
|
|
202
|
+
'application/xproc+xml': ['xpl'],
|
|
203
|
+
'application/xslt+xml': ['*xsl', 'xslt'],
|
|
204
|
+
'application/xspf+xml': ['xspf'],
|
|
205
|
+
'application/xv+xml': ['mxml', 'xhvml', 'xvml', 'xvm'],
|
|
206
|
+
'application/yang': ['yang'],
|
|
207
|
+
'application/yin+xml': ['yin'],
|
|
208
|
+
'application/zip': ['zip'],
|
|
209
|
+
'application/zip-compressed': ['zip'],
|
|
210
|
+
'application/x-zip-compressed': ['zip'],
|
|
211
|
+
'application/x-rar-compressed': ['rar'],
|
|
212
|
+
'application/vnd.rar': ['rar'],
|
|
213
|
+
'application/x-compressed': ['rar'],
|
|
214
|
+
'audio/3gpp': ['*3gpp'],
|
|
215
|
+
'audio/adpcm': ['adp'],
|
|
216
|
+
'audio/amr': ['amr'],
|
|
217
|
+
'audio/basic': ['au', 'snd'],
|
|
218
|
+
'audio/midi': ['mid', 'midi', 'kar', 'rmi'],
|
|
219
|
+
'audio/mobile-xmf': ['mxmf'],
|
|
220
|
+
'audio/mp3': ['*mp3'],
|
|
221
|
+
'audio/mp4': ['m4a', 'mp4a'],
|
|
222
|
+
'audio/mpeg': ['mpga', 'mp2', 'mp2a', 'mp3', 'm2a', 'm3a'],
|
|
223
|
+
'audio/ogg': ['oga', 'ogg', 'spx', 'opus'],
|
|
224
|
+
'audio/s3m': ['s3m'],
|
|
225
|
+
'audio/silk': ['sil'],
|
|
226
|
+
'audio/wav': ['wav'],
|
|
227
|
+
'audio/wave': ['*wav'],
|
|
228
|
+
'audio/webm': ['weba'],
|
|
229
|
+
'audio/xm': ['xm'],
|
|
230
|
+
'font/collection': ['ttc'],
|
|
231
|
+
'font/otf': ['otf'],
|
|
232
|
+
'font/ttf': ['ttf'],
|
|
233
|
+
'font/woff': ['woff'],
|
|
234
|
+
'font/woff2': ['woff2'],
|
|
235
|
+
'image/aces': ['exr'],
|
|
236
|
+
'image/apng': ['apng'],
|
|
237
|
+
'image/avif': ['avif'],
|
|
238
|
+
'image/bmp': ['bmp'],
|
|
239
|
+
'image/cgm': ['cgm'],
|
|
240
|
+
'image/dicom-rle': ['drle'],
|
|
241
|
+
'image/emf': ['emf'],
|
|
242
|
+
'image/fits': ['fits'],
|
|
243
|
+
'image/g3fax': ['g3'],
|
|
244
|
+
'image/gif': ['gif'],
|
|
245
|
+
'image/heic': ['heic'],
|
|
246
|
+
'image/heic-sequence': ['heics'],
|
|
247
|
+
'image/heif': ['heif'],
|
|
248
|
+
'image/heif-sequence': ['heifs'],
|
|
249
|
+
'image/hej2k': ['hej2'],
|
|
250
|
+
'image/hsj2': ['hsj2'],
|
|
251
|
+
'image/ief': ['ief'],
|
|
252
|
+
'image/jls': ['jls'],
|
|
253
|
+
'image/jp2': ['jp2', 'jpg2'],
|
|
254
|
+
'image/jpeg': ['jpeg', 'jpg', 'jpe'],
|
|
255
|
+
'image/jph': ['jph'],
|
|
256
|
+
'image/jphc': ['jhc'],
|
|
257
|
+
'image/jpm': ['jpm'],
|
|
258
|
+
'image/jpx': ['jpx', 'jpf'],
|
|
259
|
+
'image/jxr': ['jxr'],
|
|
260
|
+
'image/jxra': ['jxra'],
|
|
261
|
+
'image/jxrs': ['jxrs'],
|
|
262
|
+
'image/jxs': ['jxs'],
|
|
263
|
+
'image/jxsc': ['jxsc'],
|
|
264
|
+
'image/jxsi': ['jxsi'],
|
|
265
|
+
'image/jxss': ['jxss'],
|
|
266
|
+
'image/ktx': ['ktx'],
|
|
267
|
+
'image/ktx2': ['ktx2'],
|
|
268
|
+
'image/png': ['png'],
|
|
269
|
+
'image/sgi': ['sgi'],
|
|
270
|
+
'image/svg+xml': ['svg', 'svgz'],
|
|
271
|
+
'image/t38': ['t38'],
|
|
272
|
+
'image/tiff': ['tif', 'tiff'],
|
|
273
|
+
'image/tiff-fx': ['tfx'],
|
|
274
|
+
'image/webp': ['webp'],
|
|
275
|
+
'image/wmf': ['wmf'],
|
|
276
|
+
'message/disposition-notification': ['disposition-notification'],
|
|
277
|
+
'message/global': ['u8msg'],
|
|
278
|
+
'message/global-delivery-status': ['u8dsn'],
|
|
279
|
+
'message/global-disposition-notification': ['u8mdn'],
|
|
280
|
+
'message/global-headers': ['u8hdr'],
|
|
281
|
+
'message/rfc822': ['eml', 'mime'],
|
|
282
|
+
'model/3mf': ['3mf'],
|
|
283
|
+
'model/gltf+json': ['gltf'],
|
|
284
|
+
'model/gltf-binary': ['glb'],
|
|
285
|
+
'model/iges': ['igs', 'iges'],
|
|
286
|
+
'model/mesh': ['msh', 'mesh', 'silo'],
|
|
287
|
+
'model/mtl': ['mtl'],
|
|
288
|
+
'model/obj': ['obj'],
|
|
289
|
+
'model/stl': ['stl'],
|
|
290
|
+
'model/vrml': ['wrl', 'vrml'],
|
|
291
|
+
'model/x3d+binary': ['*x3db', 'x3dbz'],
|
|
292
|
+
'model/x3d+fastinfoset': ['x3db'],
|
|
293
|
+
'model/x3d+vrml': ['*x3dv', 'x3dvz'],
|
|
294
|
+
'model/x3d+xml': ['x3d', 'x3dz'],
|
|
295
|
+
'model/x3d-vrml': ['x3dv'],
|
|
296
|
+
'text/cache-manifest': ['appcache', 'manifest'],
|
|
297
|
+
'text/calendar': ['ics', 'ifb'],
|
|
298
|
+
'text/coffeescript': ['coffee', 'litcoffee'],
|
|
299
|
+
'text/css': ['css'],
|
|
300
|
+
'text/csv': ['csv'],
|
|
301
|
+
'application/csv': ['csv'],
|
|
302
|
+
'text/html': ['html', 'htm', 'shtml'],
|
|
303
|
+
'text/jade': ['jade'],
|
|
304
|
+
'text/jsx': ['jsx'],
|
|
305
|
+
'text/less': ['less'],
|
|
306
|
+
'text/markdown': ['markdown', 'md'],
|
|
307
|
+
'text/mathml': ['mml'],
|
|
308
|
+
'text/mdx': ['mdx'],
|
|
309
|
+
'text/n3': ['n3'],
|
|
310
|
+
'text/plain': ['txt', 'text', 'conf', 'def', 'list', 'log', 'in', 'ini'],
|
|
311
|
+
'text/richtext': ['rtx'],
|
|
312
|
+
'text/rtf': ['*rtf'],
|
|
313
|
+
'text/sgml': ['sgml', 'sgm'],
|
|
314
|
+
'text/shex': ['shex'],
|
|
315
|
+
'text/slim': ['slim', 'slm'],
|
|
316
|
+
'text/spdx': ['spdx'],
|
|
317
|
+
'text/stylus': ['stylus', 'styl'],
|
|
318
|
+
'text/tab-separated-values': ['tsv'],
|
|
319
|
+
'text/troff': ['t', 'tr', 'roff', 'man', 'me', 'ms'],
|
|
320
|
+
'text/turtle': ['ttl'],
|
|
321
|
+
'text/uri-list': ['uri', 'uris', 'urls'],
|
|
322
|
+
'text/vcard': ['vcard'],
|
|
323
|
+
'text/vtt': ['vtt'],
|
|
324
|
+
'text/xml': ['*xml'],
|
|
325
|
+
'text/yaml': ['yaml', 'yml'],
|
|
326
|
+
'video/3gpp': ['3gp', '3gpp'],
|
|
327
|
+
'video/3gpp2': ['3g2'],
|
|
328
|
+
'video/h261': ['h261'],
|
|
329
|
+
'video/h263': ['h263'],
|
|
330
|
+
'video/h264': ['h264'],
|
|
331
|
+
'video/iso.segment': ['m4s'],
|
|
332
|
+
'video/jpeg': ['jpgv'],
|
|
333
|
+
'video/jpm': ['*jpm', 'jpgm'],
|
|
334
|
+
'video/mj2': ['mj2', 'mjp2'],
|
|
335
|
+
'video/mp2t': ['ts'],
|
|
336
|
+
'video/mp4': ['mp4', 'mp4v', 'mpg4'],
|
|
337
|
+
'video/mpeg': ['mpeg', 'mpg', 'mpe', 'm1v', 'm2v'],
|
|
338
|
+
'video/ogg': ['ogv'],
|
|
339
|
+
'video/quicktime': ['qt', 'mov'],
|
|
340
|
+
'video/webm': ['webm'],
|
|
341
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['xlsx'],
|
|
342
|
+
'application/vnd.ms-excel': ['xls', 'csv'],
|
|
343
|
+
'application/x-x509-ca-cert': ['cer'],
|
|
344
|
+
'application/x-pkcs7-certificates': ['p7b'],
|
|
345
|
+
'application/sig': ['sig'],
|
|
346
|
+
});
|
|
347
|
+
exports.getMimeTypesMap = getMimeTypesMap;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MimeTypeRegistry';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MimeTypeRegistry"), exports);
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
export type FileMimeType = string;
|
|
2
3
|
export type RestrictionFnResult = {
|
|
3
4
|
code: string;
|
|
4
5
|
message: string;
|
|
5
6
|
};
|
|
6
7
|
export type RestrictionFn = (value: File) => RestrictionFnResult | undefined;
|
|
7
8
|
export type FileId = string;
|
|
9
|
+
/**
|
|
10
|
+
* Расширенная информация о переданном accept
|
|
11
|
+
*/
|
|
12
|
+
export type AcceptMeta = {
|
|
13
|
+
extensions: string[];
|
|
14
|
+
mimeTypes: string[];
|
|
15
|
+
generalMimeTypes: string[];
|
|
16
|
+
isOnlyExtensions: boolean;
|
|
17
|
+
};
|
|
8
18
|
export type FileStatus = {
|
|
9
19
|
/**
|
|
10
20
|
* Если true, будет отображен progress-бар загрузки файла
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { getFileTypeFromName } from '../restrictions/restrictFileType/utils/getFileTypeFromName';
|
|
2
1
|
export { compareFile } from './compareFile';
|
|
3
2
|
export { declensionFile } from './declensionFile';
|
|
4
3
|
export { generateAttrLinkNewTab } from './generateAttrLinkNewTab';
|
|
5
4
|
export { rulePipe } from './rulePipe';
|
|
6
5
|
export { toArray } from './toArray';
|
|
6
|
+
export * from '../hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta';
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toArray = exports.rulePipe = exports.generateAttrLinkNewTab = exports.declensionFile = exports.compareFile =
|
|
4
|
-
var getFileTypeFromName_1 = require("../restrictions/restrictFileType/utils/getFileTypeFromName");
|
|
5
|
-
Object.defineProperty(exports, "getFileTypeFromName", { enumerable: true, get: function () { return getFileTypeFromName_1.getFileTypeFromName; } });
|
|
17
|
+
exports.toArray = exports.rulePipe = exports.generateAttrLinkNewTab = exports.declensionFile = exports.compareFile = void 0;
|
|
6
18
|
var compareFile_1 = require("./compareFile");
|
|
7
19
|
Object.defineProperty(exports, "compareFile", { enumerable: true, get: function () { return compareFile_1.compareFile; } });
|
|
8
20
|
var declensionFile_1 = require("./declensionFile");
|
|
@@ -13,3 +25,4 @@ var rulePipe_1 = require("./rulePipe");
|
|
|
13
25
|
Object.defineProperty(exports, "rulePipe", { enumerable: true, get: function () { return rulePipe_1.rulePipe; } });
|
|
14
26
|
var toArray_1 = require("./toArray");
|
|
15
27
|
Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArray; } });
|
|
28
|
+
__exportStar(require("../hooks/useFileUploader/hooks/usePrepareAccept/utils/getAcceptMeta"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type CaptureException = (error: unknown, data?: {
|
|
2
|
+
extra?: Record<string, unknown>;
|
|
3
|
+
}) => void;
|
|
4
|
+
type ErrorExtra = {
|
|
5
|
+
/**
|
|
6
|
+
* Место, где произошла ошибка. Например, название компонента
|
|
7
|
+
*/
|
|
8
|
+
place: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Занимается логированием ошибок и отправкой их в sentry
|
|
13
|
+
*/
|
|
14
|
+
export declare class ErrorService {
|
|
15
|
+
private readonly logger;
|
|
16
|
+
private static instance;
|
|
17
|
+
private _captureException?;
|
|
18
|
+
private constructor();
|
|
19
|
+
init(captureException: CaptureException): void;
|
|
20
|
+
captureException: (error: unknown, extra?: ErrorExtra) => void;
|
|
21
|
+
captureCustomError: (place: string, message: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Логирует ошибку в консоль и отправляет в sentry
|
|
24
|
+
* */
|
|
25
|
+
logError: (place: string, message: string) => void;
|
|
26
|
+
static getInstance(): ErrorService;
|
|
27
|
+
private createError;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorService = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Занимается логированием ошибок и отправкой их в sentry
|
|
6
|
+
*/
|
|
7
|
+
class ErrorService {
|
|
8
|
+
constructor(logger) {
|
|
9
|
+
this.logger = logger;
|
|
10
|
+
this.captureException = (error, extra) => {
|
|
11
|
+
if (this._captureException) {
|
|
12
|
+
this._captureException(error, extra ? { extra } : undefined);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
this.captureCustomError = (place, message) => {
|
|
16
|
+
this.captureException(this.createError(place, message));
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Логирует ошибку в консоль и отправляет в sentry
|
|
20
|
+
* */
|
|
21
|
+
this.logError = (place, message) => {
|
|
22
|
+
const error = this.createError(place, message);
|
|
23
|
+
this.logger.error(error);
|
|
24
|
+
this.captureException(error);
|
|
25
|
+
};
|
|
26
|
+
this.createError = (componentName, message) => {
|
|
27
|
+
return new Error(`ASTRAL_UI:${componentName}: ${message}`);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
init(captureException) {
|
|
31
|
+
this._captureException = captureException;
|
|
32
|
+
}
|
|
33
|
+
static getInstance() {
|
|
34
|
+
if (!ErrorService.instance) {
|
|
35
|
+
ErrorService.instance = new ErrorService(console);
|
|
36
|
+
}
|
|
37
|
+
return ErrorService.instance;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.ErrorService = ErrorService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ErrorService';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ErrorService"), exports);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormWizard = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const ErrorService_1 = require("../../components/services/ErrorService");
|
|
6
6
|
const useForm_1 = require("../useForm");
|
|
7
7
|
const useFormWatchFields_1 = require("../useFormWatchFields");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
@@ -23,7 +23,6 @@ const utils_1 = require("./utils");
|
|
|
23
23
|
* <FormWizard {...formWizardProps} />
|
|
24
24
|
*/
|
|
25
25
|
const useFormWizard = ({ initialStepId, defaultValues, isDisabled, steps, autoSaveStrategy, onChangeStep, onAutoSave, onSubmit, onAutoSaveError, }) => {
|
|
26
|
-
const { captureException } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
|
|
27
26
|
const calculateInitialVisibleSteps = () => steps.filter(({ shouldSkip }) => shouldSkip?.calculate
|
|
28
27
|
? !shouldSkip.calculate(defaultValues)
|
|
29
28
|
: true);
|
|
@@ -98,7 +97,11 @@ const useFormWizard = ({ initialStepId, defaultValues, isDisabled, steps, autoSa
|
|
|
98
97
|
setCurrentStepId(nextStepId);
|
|
99
98
|
})
|
|
100
99
|
.catch((error) => {
|
|
101
|
-
captureException(error
|
|
100
|
+
ErrorService_1.ErrorService.getInstance().captureException(error, {
|
|
101
|
+
place: 'useFormWizard',
|
|
102
|
+
currentStepId,
|
|
103
|
+
nextStepId,
|
|
104
|
+
});
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
107
|
setCurrentStepId(nextStepId);
|
package/package.json
CHANGED
package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './getFileTypeFromFile';
|
package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromFile/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './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,13 +0,0 @@
|
|
|
1
|
-
import { getFileType } from '@astral/utils/file/getFileType';
|
|
2
|
-
/**
|
|
3
|
-
* Возвращает формат файла из названия файла
|
|
4
|
-
*/
|
|
5
|
-
export const getFileTypeFromName = (filename) => {
|
|
6
|
-
const lastDotIndex = filename.lastIndexOf('.');
|
|
7
|
-
if (lastDotIndex < 0) {
|
|
8
|
-
return '';
|
|
9
|
-
}
|
|
10
|
-
// Берём всё после последней точки
|
|
11
|
-
const extension = filename.slice(lastDotIndex + 1);
|
|
12
|
-
return getFileType(extension) || extension;
|
|
13
|
-
};
|
package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './getFileTypeFromName';
|
package/components/fileUploading/restrictions/restrictFileType/utils/getFileTypeFromName/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './getFileTypeFromName';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './prepareType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './prepareType';
|