@availity/mui-file-selector 2.0.5 → 3.0.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/CHANGELOG.md +46 -0
- package/dist/index.d.ts +13 -13
- package/dist/index.js +424 -541
- package/package.json +29 -29
- package/project.json +5 -6
- package/src/lib/Dropzone.test.tsx +1 -1
- package/src/lib/Dropzone.tsx +3 -3
- package/src/lib/Dropzone2.test.tsx +1 -1
- package/src/lib/Dropzone2.tsx +3 -3
- package/src/lib/ErrorAlert.test.tsx +1 -1
- package/src/lib/FileList.test.tsx +2 -2
- package/src/lib/FileList.tsx +2 -4
- package/src/lib/FileList2.test.tsx +3 -3
- package/src/lib/FileList2.tsx +2 -4
- package/src/lib/FilePickerBtn.test.tsx +1 -1
- package/src/lib/FileSelector.tsx +2 -2
- package/src/lib/FileSelector2.tsx +1 -1
- package/src/lib/HeaderMessage.tsx +1 -3
- package/src/lib/bs4migration.mdx +1 -1
- package/src/lib/useFileDelivery.tsx +1 -3
- package/src/lib/util.ts +2 -2
- package/dist/index.d.mts +0 -450
- package/dist/index.mjs +0 -1599
- package/jest.config.js +0 -7
- package/tsconfig.spec.json +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [3.0.0](https://github.com/Availity/element/compare/@availity/mui-file-selector@2.0.6...@availity/mui-file-selector@3.0.0) (2026-06-16)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-paper` updated to version `2.0.6`
|
|
10
|
+
* `mui-alert` updated to version `2.0.6`
|
|
11
|
+
* `mui-button` updated to version `2.0.6`
|
|
12
|
+
* `mui-divider` updated to version `2.0.6`
|
|
13
|
+
* `mui-form-utils` updated to version `2.0.6`
|
|
14
|
+
* `mui-icon` updated to version `2.0.6`
|
|
15
|
+
* `mui-layout` updated to version `2.0.6`
|
|
16
|
+
* `mui-list` updated to version `2.0.6`
|
|
17
|
+
* `mui-progress` updated to version `2.0.6`
|
|
18
|
+
* `mui-typography` updated to version `2.0.6`
|
|
19
|
+
* `mui-dialog` updated to version `2.0.6`
|
|
20
|
+
* `mui-textfield` updated to version `2.0.6`
|
|
21
|
+
|
|
22
|
+
### ⚠ BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* CJS builds removed, packages are ESM-only.
|
|
25
|
+
|
|
26
|
+
- Convert all packages to ESM (type: module)
|
|
27
|
+
- Replace Jest with Vitest for all test targets
|
|
28
|
+
- Migrate ESLint to v9 flat config (eslint.config.js)
|
|
29
|
+
- Build output ESM-only (removed CJS dist/index.js require path)
|
|
30
|
+
- Upgrade @tanstack/react-query from v4 to v5
|
|
31
|
+
- Upgrade @availity/api-axios to v13
|
|
32
|
+
- Drop Node 20 support (engines: ^22.0.0 || ^24.0.0)
|
|
33
|
+
- Bump React to 19.2.7, MUI to 7.3.11, TypeScript to 5.9.3
|
|
34
|
+
- Simplify CI caching with built-in yarn cache action + Nx cache
|
|
35
|
+
- Modernize nx.json configuration
|
|
36
|
+
- Update husky hooks to use yarn directly
|
|
37
|
+
- Replace lint-staged nx affected with direct eslint
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* migrate to ESM, Vitest, and ESLint 9 flat config ([cc22bb4](https://github.com/Availity/element/commit/cc22bb4a230bc1f3b190f187c4e61249d015b25b))
|
|
42
|
+
|
|
43
|
+
## [2.0.6](https://github.com/Availity/element/compare/@availity/mui-file-selector@2.0.5...@availity/mui-file-selector@2.0.6) (2026-05-27)
|
|
44
|
+
|
|
45
|
+
### Dependency Updates
|
|
46
|
+
|
|
47
|
+
* `mui-form-utils` updated to version `2.0.5`
|
|
48
|
+
* `mui-list` updated to version `2.0.5`
|
|
49
|
+
* `mui-dialog` updated to version `2.0.5`
|
|
50
|
+
* `mui-textfield` updated to version `2.0.5`
|
|
5
51
|
## [2.0.5](https://github.com/Availity/element/compare/@availity/mui-file-selector@2.0.4...@availity/mui-file-selector@2.0.5) (2026-03-03)
|
|
6
52
|
|
|
7
53
|
### Dependency Updates
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { MouseEvent, Dispatch, ChangeEvent, RefObject, ReactNode } from 'react';
|
|
3
3
|
import MuiBox from '@mui/material/Box';
|
|
4
4
|
import { DropEvent, FileRejection, FileError, DropzoneInputProps } from 'react-dropzone';
|
|
@@ -97,7 +97,7 @@ type DropzoneProps = {
|
|
|
97
97
|
validator?: (file: File) => FileError | FileError[] | null;
|
|
98
98
|
};
|
|
99
99
|
declare const DropzoneContainer: typeof MuiBox;
|
|
100
|
-
declare const Dropzone: ({ allowedFileTypes, allowedFileNameCharacters, disabled, enableDropArea, maxFiles, maxSize, maxTotalSize, multiple, name, onChange, onClick, onDrop, setFileRejections, setTotalSize, validator, }: DropzoneProps) =>
|
|
100
|
+
declare const Dropzone: ({ allowedFileTypes, allowedFileNameCharacters, disabled, enableDropArea, maxFiles, maxSize, maxTotalSize, multiple, name, onChange, onClick, onDrop, setFileRejections, setTotalSize, validator, }: DropzoneProps) => react.JSX.Element;
|
|
101
101
|
|
|
102
102
|
type Dropzone2Props = DropzoneProps & {
|
|
103
103
|
uploadOptions: UploadOptions;
|
|
@@ -110,7 +110,7 @@ type Dropzone2Props = DropzoneProps & {
|
|
|
110
110
|
* `<Dropzone2 />` adds the `uploadOptions` prop that previously existed on
|
|
111
111
|
* `<FileSelector />`.
|
|
112
112
|
*/
|
|
113
|
-
declare const Dropzone2: ({ allowedFileTypes, disabled, enableDropArea, maxFiles, maxSize, maxTotalSize, multiple, name, onChange, onClick, onDrop, setFileRejections, setTotalSize, uploadOptions, validator, }: Dropzone2Props) =>
|
|
113
|
+
declare const Dropzone2: ({ allowedFileTypes, disabled, enableDropArea, maxFiles, maxSize, maxTotalSize, multiple, name, onChange, onClick, onDrop, setFileRejections, setTotalSize, uploadOptions, validator, }: Dropzone2Props) => react.JSX.Element;
|
|
114
114
|
|
|
115
115
|
type ErrorAlertProps = {
|
|
116
116
|
/**
|
|
@@ -128,7 +128,7 @@ type ErrorAlertProps = {
|
|
|
128
128
|
onClose: () => void;
|
|
129
129
|
};
|
|
130
130
|
declare const formatFileTooLarge: (message: string) => string;
|
|
131
|
-
declare const ErrorAlert: ({ errors, fileName, id, onClose }: ErrorAlertProps) =>
|
|
131
|
+
declare const ErrorAlert: ({ errors, fileName, id, onClose }: ErrorAlertProps) => react.JSX.Element | null;
|
|
132
132
|
|
|
133
133
|
type Options = {
|
|
134
134
|
onError?: (error: Error) => void;
|
|
@@ -137,7 +137,7 @@ type Options = {
|
|
|
137
137
|
onChunkComplete?: (chunkSize: number, bytesAccepted: number, bytesTotal: number | null) => void;
|
|
138
138
|
} & UploadOptions;
|
|
139
139
|
type UploadQueryOptions = UseQueryOptions<Upload, Error, Upload, [string, string, Options]>;
|
|
140
|
-
declare function useUploadCore(file: File, options: Options, queryOptions?: UploadQueryOptions): _tanstack_react_query.UseQueryResult<Upload
|
|
140
|
+
declare function useUploadCore(file: File, options: Options, queryOptions?: UploadQueryOptions): _tanstack_react_query.UseQueryResult<NoInfer<Upload>, Error>;
|
|
141
141
|
|
|
142
142
|
type FileRowProps = {
|
|
143
143
|
/**
|
|
@@ -169,7 +169,7 @@ type FileRowProps = {
|
|
|
169
169
|
*/
|
|
170
170
|
disableRemove?: boolean;
|
|
171
171
|
};
|
|
172
|
-
declare const FileRow: ({ file, options, onRemoveFile, queryOptions, customFileRow: CustomRow, disableRemove, }: FileRowProps) =>
|
|
172
|
+
declare const FileRow: ({ file, options, onRemoveFile, queryOptions, customFileRow: CustomRow, disableRemove, }: FileRowProps) => react.JSX.Element | null;
|
|
173
173
|
type FileListProps = {
|
|
174
174
|
/**
|
|
175
175
|
* Array of File objects to be displayed in the list
|
|
@@ -192,7 +192,7 @@ type FileRow2Props = Omit<FileRowProps, 'file' | 'queryOptions'> & {
|
|
|
192
192
|
* `<FileRow2 />` replaces the `file` prop with the `upload` prop and
|
|
193
193
|
* removes the `queryOptions` prop.
|
|
194
194
|
*/
|
|
195
|
-
declare const FileRow2: ({ upload, options, onRemoveFile, customFileRow: CustomRow, disableRemove, }: FileRow2Props) =>
|
|
195
|
+
declare const FileRow2: ({ upload, options, onRemoveFile, customFileRow: CustomRow, disableRemove, }: FileRow2Props) => react.JSX.Element | null;
|
|
196
196
|
type FileList2Props = Omit<FileListProps, 'files'> & {
|
|
197
197
|
/**
|
|
198
198
|
* Array of File objects to be displayed in the list
|
|
@@ -232,7 +232,7 @@ type FilePickerBtnProps = {
|
|
|
232
232
|
*/
|
|
233
233
|
maxSize?: number;
|
|
234
234
|
} & Omit<ButtonProps, 'onChange'>;
|
|
235
|
-
declare const FilePickerBtn: ({ name, children, color, inputId, inputProps, maxSize, onChange, onClick, ...rest }: FilePickerBtnProps) =>
|
|
235
|
+
declare const FilePickerBtn: ({ name, children, color, inputId, inputProps, maxSize, onChange, onClick, ...rest }: FilePickerBtnProps) => react.JSX.Element;
|
|
236
236
|
|
|
237
237
|
declare const CLOUD_URL = "/cloud/web/appl/vault/upload/v1/resumable";
|
|
238
238
|
type FileSelectorProps = {
|
|
@@ -366,7 +366,7 @@ type FileSelectorProps = {
|
|
|
366
366
|
*/
|
|
367
367
|
disableRemove?: boolean;
|
|
368
368
|
};
|
|
369
|
-
declare const FileSelector: ({ name, allowedFileNameCharacters, allowedFileTypes, bucketId, clientId, children, customSizeMessage, customTotalSizeMessage, customTypesMessage, customerId, customFileRow, disabled, enableDropArea, endpoint, isCloud, label, maxFiles, maxSize, maxTotalSize, multiple, onChange, onDrop, onUploadRemove, queryOptions, uploadOptions, validator, disableRemove, }: FileSelectorProps) =>
|
|
369
|
+
declare const FileSelector: ({ name, allowedFileNameCharacters, allowedFileTypes, bucketId, clientId, children, customSizeMessage, customTotalSizeMessage, customTypesMessage, customerId, customFileRow, disabled, enableDropArea, endpoint, isCloud, label, maxFiles, maxSize, maxTotalSize, multiple, onChange, onDrop, onUploadRemove, queryOptions, uploadOptions, validator, disableRemove, }: FileSelectorProps) => react.JSX.Element;
|
|
370
370
|
|
|
371
371
|
type FileSelector2Props = Omit<FileSelectorProps, 'onUploadRemove' | 'queryOptions'> & {
|
|
372
372
|
onUploadRemove?: (uploads: Upload[], removedUploadId: string) => void;
|
|
@@ -380,7 +380,7 @@ type FileSelector2Props = Omit<FileSelectorProps, 'onUploadRemove' | 'queryOptio
|
|
|
380
380
|
* `<FileSelector2 />` removes the reliance on `@tanstack/react-query`. The
|
|
381
381
|
* `Upload` object can now be accessed from the form state.
|
|
382
382
|
*/
|
|
383
|
-
declare const FileSelector2: ({ name, allowedFileNameCharacters, allowedFileTypes, bucketId, clientId, children, customSizeMessage, customTotalSizeMessage, customTypesMessage, customerId, customFileRow, disabled, enableDropArea, endpoint, isCloud, label, maxFiles, maxSize, maxTotalSize, multiple, onChange, onDrop, onUploadRemove, uploadOptions, validator, disableRemove, }: FileSelector2Props) =>
|
|
383
|
+
declare const FileSelector2: ({ name, allowedFileNameCharacters, allowedFileTypes, bucketId, clientId, children, customSizeMessage, customTotalSizeMessage, customTypesMessage, customerId, customFileRow, disabled, enableDropArea, endpoint, isCloud, label, maxFiles, maxSize, maxTotalSize, multiple, onChange, onDrop, onUploadRemove, uploadOptions, validator, disableRemove, }: FileSelector2Props) => react.JSX.Element;
|
|
384
384
|
|
|
385
385
|
type FileTypesMessageProps = {
|
|
386
386
|
/**
|
|
@@ -409,7 +409,7 @@ type FileTypesMessageProps = {
|
|
|
409
409
|
maxTotalSize?: number;
|
|
410
410
|
variant?: 'caption' | 'body2';
|
|
411
411
|
};
|
|
412
|
-
declare const FileTypesMessage: ({ allowedFileTypes, customSizeMessage, customTotalSizeMessage, customTypesMessage, maxFileSize, maxTotalSize, variant, }: FileTypesMessageProps) =>
|
|
412
|
+
declare const FileTypesMessage: ({ allowedFileTypes, customSizeMessage, customTotalSizeMessage, customTypesMessage, maxFileSize, maxTotalSize, variant, }: FileTypesMessageProps) => react.JSX.Element;
|
|
413
413
|
|
|
414
414
|
type HeaderMessageProps = {
|
|
415
415
|
/**
|
|
@@ -425,7 +425,7 @@ type HeaderMessageProps = {
|
|
|
425
425
|
*/
|
|
426
426
|
maxTotalSize?: number;
|
|
427
427
|
};
|
|
428
|
-
declare const HeaderMessage: ({ maxFiles, maxSize, maxTotalSize }: HeaderMessageProps) =>
|
|
428
|
+
declare const HeaderMessage: ({ maxFiles, maxSize, maxTotalSize }: HeaderMessageProps) => react.JSX.Element;
|
|
429
429
|
|
|
430
430
|
type UploadProgressBarProps = {
|
|
431
431
|
/**
|
|
@@ -445,6 +445,6 @@ type UploadProgressBarProps = {
|
|
|
445
445
|
*/
|
|
446
446
|
onError?: (upload: Upload) => void;
|
|
447
447
|
};
|
|
448
|
-
declare const UploadProgressBar: ({ upload, onProgress, onError, onSuccess }: UploadProgressBarProps) =>
|
|
448
|
+
declare const UploadProgressBar: ({ upload, onProgress, onError, onSuccess }: UploadProgressBarProps) => react.JSX.Element;
|
|
449
449
|
|
|
450
450
|
export { CLOUD_URL, Dropzone, Dropzone2, type Dropzone2Props, DropzoneContainer, type DropzoneProps, ErrorAlert, type ErrorAlertProps, FileList, FileList2, type FileList2Props, type FileListProps, FilePickerBtn, type FilePickerBtnProps, FileRow, FileRow2, type FileRow2Props, type FileRowProps, FileSelector, FileSelector2, type FileSelector2Props, type FileSelectorProps, FileTypesMessage, type FileTypesMessageProps, HeaderMessage, type HeaderMessageProps, type Options, UploadProgressBar, type UploadProgressBarProps, type UploadQueryOptions, createCounter, formatFileTooLarge, innerBoxStyles, outerBoxStyles, useUploadCore };
|