@astral/ui 4.103.0 → 4.103.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/components/fileUploading/FileUploader/FIleList/FileList.d.ts +1 -1
  2. package/components/fileUploading/FileUploaderFile/Actions/Actions.js +2 -2
  3. package/components/fileUploading/FileUploaderFile/Actions/styles.js +7 -0
  4. package/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.d.ts +6 -1
  5. package/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +2 -1
  6. package/components/fileUploading/FileUploaderFile/FileUploaderFile.d.ts +1 -1
  7. package/components/fileUploading/PreviewFileUploader/FileList/FileList.d.ts +1 -1
  8. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/FilePreview.d.ts +4 -0
  9. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/FilePreview.js +1 -1
  10. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.d.ts +13 -51
  11. package/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +5 -1
  12. package/components/fileUploading/PreviewFileUploaderFile/PreviewFileUploaderFile.d.ts +4 -0
  13. package/components/fileUploading/PreviewFileUploaderFile/PreviewFileUploaderFile.js +2 -2
  14. package/components/fileUploading/hooks/useFileUploader/useFileUploader.d.ts +1 -0
  15. package/components/fileUploading/hooks/useFileUploader/useFileUploader.js +1 -0
  16. package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +1 -0
  17. package/node/components/fileUploading/FileUploader/FIleList/FileList.d.ts +1 -1
  18. package/node/components/fileUploading/FileUploaderFile/Actions/Actions.js +2 -2
  19. package/node/components/fileUploading/FileUploaderFile/Actions/styles.js +7 -0
  20. package/node/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.d.ts +6 -1
  21. package/node/components/fileUploading/FileUploaderFile/Actions/useLogic/useLogic.js +2 -1
  22. package/node/components/fileUploading/FileUploaderFile/FileUploaderFile.d.ts +1 -1
  23. package/node/components/fileUploading/PreviewFileUploader/FileList/FileList.d.ts +1 -1
  24. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/FilePreview.d.ts +4 -0
  25. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/FilePreview.js +1 -1
  26. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.d.ts +13 -51
  27. package/node/components/fileUploading/PreviewFileUploaderFile/FilePreview/useLogic/useLogic.js +5 -1
  28. package/node/components/fileUploading/PreviewFileUploaderFile/PreviewFileUploaderFile.d.ts +4 -0
  29. package/node/components/fileUploading/PreviewFileUploaderFile/PreviewFileUploaderFile.js +2 -2
  30. package/node/components/fileUploading/hooks/useFileUploader/useFileUploader.d.ts +1 -0
  31. package/node/components/fileUploading/hooks/useFileUploader/useFileUploader.js +1 -0
  32. package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +1 -0
  33. package/package.json +1 -1
@@ -11,5 +11,5 @@ export type FileListProps = {
11
11
  * Идентификатор файла, для которого выполняется удаление
12
12
  */
13
13
  deletingFileId?: FileId | null;
14
- } & Pick<FileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile'>;
14
+ } & Pick<FileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile' | 'isDisabled'>;
15
15
  export declare const FileList: ({ isMultiple, files, className, deletingFileId, ...restProps }: FileListProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,7 +10,7 @@ import { useViewportType } from '../../../useViewportType';
10
10
  import { Wrapper } from './styles';
11
11
  import { useLogic } from './useLogic';
12
12
  export const Actions = (props) => {
13
- const { downloadButtonProps, viewButtonProps, isVisibleAbortButton, isVisibleRetryButton, handleAbort, handleDelete, handleRetry, isLoading, isError, isDeletingFile, fileName, } = useLogic(props);
13
+ const { downloadButtonProps, viewButtonProps, isVisibleAbortButton, isVisibleRetryButton, handleAbort, handleDelete, handleRetry, isLoading, isError, isDeletingFile, isDisabled, fileName, } = useLogic(props);
14
14
  const { isMobile } = useViewportType();
15
15
  if (isLoading) {
16
16
  return (_jsx(Wrapper, { children: isVisibleAbortButton && (_jsx(Tooltip, { title: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", children: _jsx(IconButton, { variant: "text", onClick: handleAbort, children: _jsx(CrossOutlineMd, {}) }) })) }));
@@ -19,5 +19,5 @@ export const Actions = (props) => {
19
19
  return (_jsxs(Wrapper, { children: [isVisibleRetryButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", children: _jsx(IconButton, { variant: "text", onClick: handleRetry, children: _jsx(RetryOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: _jsx(IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: _jsx(CrossOutlineMd, {}) }) })] }));
20
20
  }
21
21
  const { isShowViewButton, ...restViewButtonProps } = viewButtonProps;
22
- return (_jsxs(Wrapper, { children: [!isMobile && (_jsxs(_Fragment, { children: [isShowViewButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", children: _jsx(IconButton, { variant: "text", ...restViewButtonProps, children: _jsx(EyeOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: _jsx(IconButton, { component: "a", variant: "text", download: fileName, ...downloadButtonProps, children: _jsx(DownloadOutlineMd, {}) }) })] })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: _jsx(IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: _jsx(BinOutlineMd, {}) }) })] }));
22
+ return (_jsxs(Wrapper, { children: [!isMobile && (_jsxs(_Fragment, { children: [isShowViewButton && (_jsx(Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", children: _jsx(IconButton, { variant: "text", ...restViewButtonProps, children: _jsx(EyeOutlineMd, {}) }) })), _jsx(Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: _jsx(IconButton, { component: "a", variant: "text", download: fileName, ...downloadButtonProps, children: _jsx(DownloadOutlineMd, {}) }) })] })), _jsx(Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", withoutContainer: !isDisabled, children: _jsx(IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, disabled: isDisabled, "aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: _jsx(BinOutlineMd, {}) }) })] }));
23
23
  };
@@ -1,4 +1,11 @@
1
1
  import { styled } from '../../../styled';
2
+ import { tooltipClassnames } from '../../../Tooltip';
2
3
  export const Wrapper = styled.div `
3
4
  text-align: right;
5
+
6
+ & .${tooltipClassnames.contentWrapper} {
7
+ display: inline-flex;
8
+
9
+ vertical-align: middle;
10
+ }
4
11
  `;
@@ -49,9 +49,13 @@ export type UseLogicParams = {
49
49
  * Флаг загрузки при удалении файла
50
50
  */
51
51
  isDeletingFile?: boolean;
52
+ /**
53
+ * Флаг блокировки действий
54
+ */
55
+ isDisabled?: boolean;
52
56
  abortController?: AbortController;
53
57
  } & Pick<SelfFileApi, 'selfFiles' | 'setErrorStatusFile'>;
54
- export declare const useLogic: ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, fileName, }: UseLogicParams) => {
58
+ export declare const useLogic: ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, isDisabled, fileName, }: UseLogicParams) => {
55
59
  downloadButtonProps: {
56
60
  href: string;
57
61
  };
@@ -74,5 +78,6 @@ export declare const useLogic: ({ fileId, file, fileUrl, isUploadError, generate
74
78
  isLoading: boolean | undefined;
75
79
  isError: boolean | undefined;
76
80
  isDeletingFile: boolean | undefined;
81
+ isDisabled: boolean | undefined;
77
82
  fileName: string;
78
83
  };
@@ -3,7 +3,7 @@ import { ABORT_ERROR_MESSAGE, EXTENSIONS_IN_NEW_TAB, VIEW_NEW_TAB_ERROR_MESSAGE,
3
3
  import { useGenerateLocalFileURL } from '../../../hooks/useGenerateLocalFileURL';
4
4
  import { MimeTypeRegistry } from '../../../services/MimeTypeRegistry';
5
5
  import { generateAttrLinkNewTab } from '../../../utils/generateAttrLinkNewTab';
6
- export const useLogic = ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, fileName, }) => {
6
+ export const useLogic = ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, isDisabled, fileName, }) => {
7
7
  const { generateUrl } = useGenerateLocalFileURL();
8
8
  const { controller } = selfFiles[fileId] || {};
9
9
  const isVisibleAbortButton = Boolean(controller);
@@ -71,6 +71,7 @@ export const useLogic = ({ fileId, file, fileUrl, isUploadError, generateDownloa
71
71
  isLoading,
72
72
  isError,
73
73
  isDeletingFile,
74
+ isDisabled,
74
75
  fileName,
75
76
  };
76
77
  };
@@ -21,5 +21,5 @@ export type FileUploaderFileProps = UploadFile & {
21
21
  * Флаг загрузки при удалении файла
22
22
  */
23
23
  isDeletingFile?: boolean;
24
- } & Pick<ActionsProps, 'selfFiles' | 'setErrorStatusFile'>;
24
+ } & Pick<ActionsProps, 'selfFiles' | 'setErrorStatusFile' | 'isDisabled'>;
25
25
  export declare const FileUploaderFile: (props: FileUploaderFileProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,5 +6,5 @@ export type FileListProps = {
6
6
  * Идентификатор файла, для которого выполняется удаление
7
7
  */
8
8
  deletingFileId?: FileId | null;
9
- } & Pick<PreviewFileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile'>;
9
+ } & Pick<PreviewFileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile' | 'isDisabled'>;
10
10
  export declare const FileList: ({ files, deletingFileId, ...restProps }: FileListProps) => import("react/jsx-runtime").JSX.Element;
@@ -46,6 +46,10 @@ export type FilePreviewProps = {
46
46
  * Флаг загрузки при удалении файла
47
47
  */
48
48
  isDeletingFile?: boolean;
49
+ /**
50
+ * Флаг блокировки действий
51
+ */
52
+ isDisabled?: boolean;
49
53
  /**
50
54
  * Компонент для отображения превью pdf-файлов
51
55
  */
@@ -10,5 +10,5 @@ import { useLogic } from './useLogic';
10
10
  export const FilePreview = (props) => {
11
11
  const { getActionsList, isImageFile, isPdfFile, isOtherFile } = useLogic(props);
12
12
  const { file, fileName, fileSize, fileUrl, generateDownloadLink, isHidePersonalData, PdfViewer, } = props;
13
- return (_jsxs(Wrapper, { children: [!isOtherFile && (_jsx(Preview, { isImageFile: isImageFile, isPdfFile: isPdfFile, file: file, fileUrl: fileUrl, generateDownloadLink: generateDownloadLink, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer })), _jsxs(Details, { className: previewFileUploaderClassnames.details, "$isOtherFile": isOtherFile, children: [isOtherFile && _jsx(Typography, { variant: "h6", children: "\u0424\u0430\u0439\u043B \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D" }), _jsx(StyledFileInfo, { "$isOtherFile": isOtherFile, fileName: fileName, fileSize: fileSize }), _jsx(Actions, { children: getActionsList().map(({ type, ...action }) => (_jsx(Tooltip, { title: action.tooltip, disableInteractive: true, children: type === 'iconButton' ? (_jsx(IconButton, { ...action, children: action.icon })) : (_jsx(Button, { ...action, children: 'title' in action ? action.title : '' })) }, action.tooltip))) })] })] }));
13
+ return (_jsxs(Wrapper, { children: [!isOtherFile && (_jsx(Preview, { isImageFile: isImageFile, isPdfFile: isPdfFile, file: file, fileUrl: fileUrl, generateDownloadLink: generateDownloadLink, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer })), _jsxs(Details, { className: previewFileUploaderClassnames.details, "$isOtherFile": isOtherFile, children: [isOtherFile && _jsx(Typography, { variant: "h6", children: "\u0424\u0430\u0439\u043B \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D" }), _jsx(StyledFileInfo, { "$isOtherFile": isOtherFile, fileName: fileName, fileSize: fileSize }), _jsx(Actions, { children: getActionsList().map(({ type, ...action }) => (_jsx(Tooltip, { title: action.tooltip, disableInteractive: true, withoutContainer: !action.disabled, children: type === 'iconButton' ? (_jsx(IconButton, { ...action, children: action.icon })) : (_jsx(Button, { ...action, children: action.title ?? '' })) }, action.tooltip))) })] })] }));
14
14
  };
@@ -1,61 +1,23 @@
1
- /// <reference types="react" />
1
+ import { type ReactElement } from 'react';
2
+ import { type ButtonProps } from '../../../../Button';
2
3
  import { type FilePreviewProps } from '../FilePreview';
3
4
  type UseLogicParams = FilePreviewProps;
4
- export declare const useLogic: ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, }: UseLogicParams) => {
5
+ /**
6
+ * Действие в списке actions превью файла.
7
+ */
8
+ type FileAction = Omit<ButtonProps, 'type'> & {
9
+ type: 'button' | 'iconButton';
10
+ tooltip: string;
11
+ icon?: ReactElement;
12
+ title?: string;
13
+ };
14
+ export declare const useLogic: ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, isDisabled, }: UseLogicParams) => {
5
15
  isImageFile: boolean;
6
16
  isPdfFile: boolean;
7
17
  /**
8
18
  * Формат файла отличающийся от pdf и изображения
9
19
  */
10
20
  isOtherFile: boolean;
11
- getActionsList: () => {
12
- type: string;
13
- tooltip: string;
14
- title: string;
15
- variant: "light";
16
- color: "grey";
17
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
18
- loading: boolean | undefined;
19
- onClick: () => void;
20
- }[] | ({
21
- component: import("react").ElementType;
22
- href: string;
23
- target: string;
24
- rel: string;
25
- type: string;
26
- tooltip: string;
27
- variant: "light";
28
- color: "grey";
29
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
30
- } | {
31
- onClick: () => void | undefined;
32
- type: string;
33
- tooltip: string;
34
- variant: "light";
35
- color: "grey";
36
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
37
- } | {
38
- type: string;
39
- tooltip: string;
40
- component: "a";
41
- variant: "light";
42
- color: "grey";
43
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
44
- download: string;
45
- href: string;
46
- loading?: undefined;
47
- onClick?: undefined;
48
- } | {
49
- type: string;
50
- tooltip: string;
51
- variant: "light";
52
- color: "grey";
53
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
54
- loading: boolean | undefined;
55
- onClick: () => void;
56
- component?: undefined;
57
- download?: undefined;
58
- href?: undefined;
59
- })[];
21
+ getActionsList: () => FileAction[];
60
22
  };
61
23
  export {};
@@ -8,7 +8,7 @@ import { EXTENSIONS_IN_NEW_TAB, VIEW_NEW_TAB_ERROR_MESSAGE, } from '../../../con
8
8
  import { useGenerateLocalFileURL } from '../../../hooks/useGenerateLocalFileURL';
9
9
  import { MimeTypeRegistry } from '../../../services/MimeTypeRegistry';
10
10
  import { generateAttrLinkNewTab } from '../../../utils/generateAttrLinkNewTab';
11
- export const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, }) => {
11
+ export const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, isDisabled, }) => {
12
12
  const { generateUrl } = useGenerateLocalFileURL();
13
13
  const { isMobile } = useViewportType();
14
14
  const isPdfFile = MimeTypeRegistry.getInstance()
@@ -81,6 +81,8 @@ export const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink
81
81
  color: 'grey',
82
82
  icon: createElement(BinOutlineMd),
83
83
  loading: isDeletingFile,
84
+ disabled: isDisabled,
85
+ 'aria-label': 'Удалить',
84
86
  onClick: handleDelete,
85
87
  },
86
88
  ];
@@ -104,6 +106,8 @@ export const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink
104
106
  color: 'grey',
105
107
  icon: createElement(BinOutlineMd),
106
108
  loading: isDeletingFile,
109
+ disabled: isDisabled,
110
+ 'aria-label': 'Удалить',
107
111
  onClick: handleDelete,
108
112
  },
109
113
  ];
@@ -27,6 +27,10 @@ export type PreviewFileUploaderFileProps = UploadFile & {
27
27
  * Флаг загрузки при удалении файла
28
28
  */
29
29
  isDeletingFile?: boolean;
30
+ /**
31
+ * Флаг блокировки действий
32
+ */
33
+ isDisabled?: boolean;
30
34
  /**
31
35
  * Компонент для отображения превью pdf-файлов
32
36
  */
@@ -5,8 +5,8 @@ import { FileLoading } from './FileLoading';
5
5
  import { FilePreview } from './FilePreview';
6
6
  import { Wrapper } from './styles';
7
7
  export const PreviewFileUploaderFile = (props) => {
8
- const { id, name, type, file, url, size, status, generateDownloadLink, onRetry, onDelete, onView, selfFiles, setErrorStatusFile, isHidePersonalData, PdfViewer, isDeletingFile, } = props;
8
+ const { id, name, type, file, url, size, status, generateDownloadLink, onRetry, onDelete, onView, selfFiles, setErrorStatusFile, isHidePersonalData, PdfViewer, isDeletingFile, isDisabled, } = props;
9
9
  const { isLoading, isUploadError, isRestrictionError, errorMsg, progress } = status || {};
10
10
  const isError = isUploadError || isRestrictionError;
11
- return (_jsx(Fade, { in: true, children: _jsxs(Wrapper, { "$isLoading": isLoading, "$isError": isError, children: [!isLoading && !isError && (_jsx(FilePreview, { fileId: id, fileName: name, fileType: type, file: file, fileUrl: url, fileSize: size, generateDownloadLink: generateDownloadLink, onView: onView, onDelete: onDelete, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer, isDeletingFile: isDeletingFile })), isLoading && (_jsx(FileLoading, { selfFiles: selfFiles, setErrorStatusFile: setErrorStatusFile, fileId: id, fileName: name, fileSize: size, progress: progress })), isError && (_jsx(FileError, { fileId: id, fileName: name, file: file, fileSize: size, errorMsg: errorMsg, isUploadError: isUploadError, onRetry: onRetry, onDelete: onDelete }))] }) }));
11
+ return (_jsx(Fade, { in: true, children: _jsxs(Wrapper, { "$isLoading": isLoading, "$isError": isError, children: [!isLoading && !isError && (_jsx(FilePreview, { fileId: id, fileName: name, fileType: type, file: file, fileUrl: url, fileSize: size, generateDownloadLink: generateDownloadLink, onView: onView, onDelete: onDelete, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer, isDeletingFile: isDeletingFile, isDisabled: isDisabled })), isLoading && (_jsx(FileLoading, { selfFiles: selfFiles, setErrorStatusFile: setErrorStatusFile, fileId: id, fileName: name, fileSize: size, progress: progress })), isError && (_jsx(FileError, { fileId: id, fileName: name, file: file, fileSize: size, errorMsg: errorMsg, isUploadError: isUploadError, onRetry: onRetry, onDelete: onDelete }))] }) }));
12
12
  };
@@ -44,6 +44,7 @@ export declare const useFileUploader: ({ value, isDisabled, isMultiple, accept,
44
44
  className: string;
45
45
  };
46
46
  fileListProps: {
47
+ isDisabled: boolean | undefined;
47
48
  onDelete: (fileId: FileId) => void;
48
49
  onRetry: ((fileId: FileId, file: File) => void) | undefined;
49
50
  onView: ((fileId: string, file?: File | undefined, fileUrl?: string | undefined) => void) | undefined;
@@ -162,6 +162,7 @@ inputRef, notify, onChange, onUploadFile, onDeleteFile, name, isError, onView, g
162
162
  },
163
163
  },
164
164
  fileListProps: {
165
+ isDisabled,
165
166
  onDelete: handleDelete,
166
167
  onRetry: getHandlerOnRetry(),
167
168
  onView,
@@ -90,6 +90,7 @@ export declare const usePreviewFileUploader: ({ placeholderImgSrc, isHidePersona
90
90
  fileListProps: {
91
91
  isHidePersonalData: boolean | undefined;
92
92
  PdfViewer: LazyExoticComponent<(props: PdfViewerProps) => ReactElement> | ((props: PdfViewerProps) => ReactElement) | undefined;
93
+ isDisabled: boolean | undefined;
93
94
  onDelete: (fileId: string) => void;
94
95
  onRetry: ((fileId: string, file: File) => void) | undefined;
95
96
  onView: ((fileId: string, file?: File | undefined, fileUrl?: string | undefined) => void) | undefined;
@@ -11,5 +11,5 @@ export type FileListProps = {
11
11
  * Идентификатор файла, для которого выполняется удаление
12
12
  */
13
13
  deletingFileId?: FileId | null;
14
- } & Pick<FileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile'>;
14
+ } & Pick<FileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile' | 'isDisabled'>;
15
15
  export declare const FileList: ({ isMultiple, files, className, deletingFileId, ...restProps }: FileListProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,7 +13,7 @@ const useViewportType_1 = require("../../../useViewportType");
13
13
  const styles_1 = require("./styles");
14
14
  const useLogic_1 = require("./useLogic");
15
15
  const Actions = (props) => {
16
- const { downloadButtonProps, viewButtonProps, isVisibleAbortButton, isVisibleRetryButton, handleAbort, handleDelete, handleRetry, isLoading, isError, isDeletingFile, fileName, } = (0, useLogic_1.useLogic)(props);
16
+ const { downloadButtonProps, viewButtonProps, isVisibleAbortButton, isVisibleRetryButton, handleAbort, handleDelete, handleRetry, isLoading, isError, isDeletingFile, isDisabled, fileName, } = (0, useLogic_1.useLogic)(props);
17
17
  const { isMobile } = (0, useViewportType_1.useViewportType)();
18
18
  if (isLoading) {
19
19
  return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: isVisibleAbortButton && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", onClick: handleAbort, children: (0, jsx_runtime_1.jsx)(CrossOutlineMd_1.CrossOutlineMd, {}) }) })) }));
@@ -22,6 +22,6 @@ const Actions = (props) => {
22
22
  return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [isVisibleRetryButton && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", onClick: handleRetry, children: (0, jsx_runtime_1.jsx)(RetryOutlineMd_1.RetryOutlineMd, {}) }) })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: (0, jsx_runtime_1.jsx)(CrossOutlineMd_1.CrossOutlineMd, {}) }) })] }));
23
23
  }
24
24
  const { isShowViewButton, ...restViewButtonProps } = viewButtonProps;
25
- return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [!isMobile && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowViewButton && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", ...restViewButtonProps, children: (0, jsx_runtime_1.jsx)(EyeOutlineMd_1.EyeOutlineMd, {}) }) })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { component: "a", variant: "text", download: fileName, ...downloadButtonProps, children: (0, jsx_runtime_1.jsx)(DownloadOutlineMd_1.DownloadOutlineMd, {}) }) })] })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, children: (0, jsx_runtime_1.jsx)(BinOutlineMd_1.BinOutlineMd, {}) }) })] }));
25
+ return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [!isMobile && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowViewButton && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", ...restViewButtonProps, children: (0, jsx_runtime_1.jsx)(EyeOutlineMd_1.EyeOutlineMd, {}) }) })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { component: "a", variant: "text", download: fileName, ...downloadButtonProps, children: (0, jsx_runtime_1.jsx)(DownloadOutlineMd_1.DownloadOutlineMd, {}) }) })] })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", withoutContainer: !isDisabled, children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", onClick: handleDelete, loading: isDeletingFile, disabled: isDisabled, "aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", children: (0, jsx_runtime_1.jsx)(BinOutlineMd_1.BinOutlineMd, {}) }) })] }));
26
26
  };
27
27
  exports.Actions = Actions;
@@ -2,6 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Wrapper = void 0;
4
4
  const styled_1 = require("../../../styled");
5
+ const Tooltip_1 = require("../../../Tooltip");
5
6
  exports.Wrapper = styled_1.styled.div `
6
7
  text-align: right;
8
+
9
+ & .${Tooltip_1.tooltipClassnames.contentWrapper} {
10
+ display: inline-flex;
11
+
12
+ vertical-align: middle;
13
+ }
7
14
  `;
@@ -49,9 +49,13 @@ export type UseLogicParams = {
49
49
  * Флаг загрузки при удалении файла
50
50
  */
51
51
  isDeletingFile?: boolean;
52
+ /**
53
+ * Флаг блокировки действий
54
+ */
55
+ isDisabled?: boolean;
52
56
  abortController?: AbortController;
53
57
  } & Pick<SelfFileApi, 'selfFiles' | 'setErrorStatusFile'>;
54
- export declare const useLogic: ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, fileName, }: UseLogicParams) => {
58
+ export declare const useLogic: ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, isDisabled, fileName, }: UseLogicParams) => {
55
59
  downloadButtonProps: {
56
60
  href: string;
57
61
  };
@@ -74,5 +78,6 @@ export declare const useLogic: ({ fileId, file, fileUrl, isUploadError, generate
74
78
  isLoading: boolean | undefined;
75
79
  isError: boolean | undefined;
76
80
  isDeletingFile: boolean | undefined;
81
+ isDisabled: boolean | undefined;
77
82
  fileName: string;
78
83
  };
@@ -6,7 +6,7 @@ const constants_1 = require("../../../constants");
6
6
  const useGenerateLocalFileURL_1 = require("../../../hooks/useGenerateLocalFileURL");
7
7
  const MimeTypeRegistry_1 = require("../../../services/MimeTypeRegistry");
8
8
  const generateAttrLinkNewTab_1 = require("../../../utils/generateAttrLinkNewTab");
9
- const useLogic = ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, fileName, }) => {
9
+ const useLogic = ({ fileId, file, fileUrl, isUploadError, generateDownloadLink, onDelete, onRetry, onView, setErrorStatusFile, selfFiles, isLoading, isError, isDeletingFile, isDisabled, fileName, }) => {
10
10
  const { generateUrl } = (0, useGenerateLocalFileURL_1.useGenerateLocalFileURL)();
11
11
  const { controller } = selfFiles[fileId] || {};
12
12
  const isVisibleAbortButton = Boolean(controller);
@@ -74,6 +74,7 @@ const useLogic = ({ fileId, file, fileUrl, isUploadError, generateDownloadLink,
74
74
  isLoading,
75
75
  isError,
76
76
  isDeletingFile,
77
+ isDisabled,
77
78
  fileName,
78
79
  };
79
80
  };
@@ -21,5 +21,5 @@ export type FileUploaderFileProps = UploadFile & {
21
21
  * Флаг загрузки при удалении файла
22
22
  */
23
23
  isDeletingFile?: boolean;
24
- } & Pick<ActionsProps, 'selfFiles' | 'setErrorStatusFile'>;
24
+ } & Pick<ActionsProps, 'selfFiles' | 'setErrorStatusFile' | 'isDisabled'>;
25
25
  export declare const FileUploaderFile: (props: FileUploaderFileProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,5 +6,5 @@ export type FileListProps = {
6
6
  * Идентификатор файла, для которого выполняется удаление
7
7
  */
8
8
  deletingFileId?: FileId | null;
9
- } & Pick<PreviewFileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile'>;
9
+ } & Pick<PreviewFileUploaderFileProps, 'onDelete' | 'onRetry' | 'onView' | 'generateDownloadLink' | 'selfFiles' | 'setErrorStatusFile' | 'isDisabled'>;
10
10
  export declare const FileList: ({ files, deletingFileId, ...restProps }: FileListProps) => import("react/jsx-runtime").JSX.Element;
@@ -46,6 +46,10 @@ export type FilePreviewProps = {
46
46
  * Флаг загрузки при удалении файла
47
47
  */
48
48
  isDeletingFile?: boolean;
49
+ /**
50
+ * Флаг блокировки действий
51
+ */
52
+ isDisabled?: boolean;
49
53
  /**
50
54
  * Компонент для отображения превью pdf-файлов
51
55
  */
@@ -13,6 +13,6 @@ const useLogic_1 = require("./useLogic");
13
13
  const FilePreview = (props) => {
14
14
  const { getActionsList, isImageFile, isPdfFile, isOtherFile } = (0, useLogic_1.useLogic)(props);
15
15
  const { file, fileName, fileSize, fileUrl, generateDownloadLink, isHidePersonalData, PdfViewer, } = props;
16
- return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [!isOtherFile && ((0, jsx_runtime_1.jsx)(Preview_1.Preview, { isImageFile: isImageFile, isPdfFile: isPdfFile, file: file, fileUrl: fileUrl, generateDownloadLink: generateDownloadLink, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer })), (0, jsx_runtime_1.jsxs)(styles_1.Details, { className: constants_1.previewFileUploaderClassnames.details, "$isOtherFile": isOtherFile, children: [isOtherFile && (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h6", children: "\u0424\u0430\u0439\u043B \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D" }), (0, jsx_runtime_1.jsx)(styles_1.StyledFileInfo, { "$isOtherFile": isOtherFile, fileName: fileName, fileSize: fileSize }), (0, jsx_runtime_1.jsx)(styles_1.Actions, { children: getActionsList().map(({ type, ...action }) => ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: action.tooltip, disableInteractive: true, children: type === 'iconButton' ? ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { ...action, children: action.icon })) : ((0, jsx_runtime_1.jsx)(Button_1.Button, { ...action, children: 'title' in action ? action.title : '' })) }, action.tooltip))) })] })] }));
16
+ return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [!isOtherFile && ((0, jsx_runtime_1.jsx)(Preview_1.Preview, { isImageFile: isImageFile, isPdfFile: isPdfFile, file: file, fileUrl: fileUrl, generateDownloadLink: generateDownloadLink, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer })), (0, jsx_runtime_1.jsxs)(styles_1.Details, { className: constants_1.previewFileUploaderClassnames.details, "$isOtherFile": isOtherFile, children: [isOtherFile && (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h6", children: "\u0424\u0430\u0439\u043B \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D" }), (0, jsx_runtime_1.jsx)(styles_1.StyledFileInfo, { "$isOtherFile": isOtherFile, fileName: fileName, fileSize: fileSize }), (0, jsx_runtime_1.jsx)(styles_1.Actions, { children: getActionsList().map(({ type, ...action }) => ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: action.tooltip, disableInteractive: true, withoutContainer: !action.disabled, children: type === 'iconButton' ? ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { ...action, children: action.icon })) : ((0, jsx_runtime_1.jsx)(Button_1.Button, { ...action, children: action.title ?? '' })) }, action.tooltip))) })] })] }));
17
17
  };
18
18
  exports.FilePreview = FilePreview;
@@ -1,61 +1,23 @@
1
- /// <reference types="react" />
1
+ import { type ReactElement } from 'react';
2
+ import { type ButtonProps } from '../../../../Button';
2
3
  import { type FilePreviewProps } from '../FilePreview';
3
4
  type UseLogicParams = FilePreviewProps;
4
- export declare const useLogic: ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, }: UseLogicParams) => {
5
+ /**
6
+ * Действие в списке actions превью файла.
7
+ */
8
+ type FileAction = Omit<ButtonProps, 'type'> & {
9
+ type: 'button' | 'iconButton';
10
+ tooltip: string;
11
+ icon?: ReactElement;
12
+ title?: string;
13
+ };
14
+ export declare const useLogic: ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, isDisabled, }: UseLogicParams) => {
5
15
  isImageFile: boolean;
6
16
  isPdfFile: boolean;
7
17
  /**
8
18
  * Формат файла отличающийся от pdf и изображения
9
19
  */
10
20
  isOtherFile: boolean;
11
- getActionsList: () => {
12
- type: string;
13
- tooltip: string;
14
- title: string;
15
- variant: "light";
16
- color: "grey";
17
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
18
- loading: boolean | undefined;
19
- onClick: () => void;
20
- }[] | ({
21
- component: import("react").ElementType;
22
- href: string;
23
- target: string;
24
- rel: string;
25
- type: string;
26
- tooltip: string;
27
- variant: "light";
28
- color: "grey";
29
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
30
- } | {
31
- onClick: () => void | undefined;
32
- type: string;
33
- tooltip: string;
34
- variant: "light";
35
- color: "grey";
36
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
37
- } | {
38
- type: string;
39
- tooltip: string;
40
- component: "a";
41
- variant: "light";
42
- color: "grey";
43
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
44
- download: string;
45
- href: string;
46
- loading?: undefined;
47
- onClick?: undefined;
48
- } | {
49
- type: string;
50
- tooltip: string;
51
- variant: "light";
52
- color: "grey";
53
- icon: import("react").FunctionComponentElement<import("../../../..").SvgIconProps>;
54
- loading: boolean | undefined;
55
- onClick: () => void;
56
- component?: undefined;
57
- download?: undefined;
58
- href?: undefined;
59
- })[];
21
+ getActionsList: () => FileAction[];
60
22
  };
61
23
  export {};
@@ -11,7 +11,7 @@ const constants_1 = require("../../../constants");
11
11
  const useGenerateLocalFileURL_1 = require("../../../hooks/useGenerateLocalFileURL");
12
12
  const MimeTypeRegistry_1 = require("../../../services/MimeTypeRegistry");
13
13
  const generateAttrLinkNewTab_1 = require("../../../utils/generateAttrLinkNewTab");
14
- const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, }) => {
14
+ const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDelete, onView, fileType, isDeletingFile, isDisabled, }) => {
15
15
  const { generateUrl } = (0, useGenerateLocalFileURL_1.useGenerateLocalFileURL)();
16
16
  const { isMobile } = (0, useViewportType_1.useViewportType)();
17
17
  const isPdfFile = MimeTypeRegistry_1.MimeTypeRegistry.getInstance()
@@ -84,6 +84,8 @@ const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDel
84
84
  color: 'grey',
85
85
  icon: (0, react_1.createElement)(BinOutlineMd_1.BinOutlineMd),
86
86
  loading: isDeletingFile,
87
+ disabled: isDisabled,
88
+ 'aria-label': 'Удалить',
87
89
  onClick: handleDelete,
88
90
  },
89
91
  ];
@@ -107,6 +109,8 @@ const useLogic = ({ fileId, file, fileUrl, fileName, generateDownloadLink, onDel
107
109
  color: 'grey',
108
110
  icon: (0, react_1.createElement)(BinOutlineMd_1.BinOutlineMd),
109
111
  loading: isDeletingFile,
112
+ disabled: isDisabled,
113
+ 'aria-label': 'Удалить',
110
114
  onClick: handleDelete,
111
115
  },
112
116
  ];
@@ -27,6 +27,10 @@ export type PreviewFileUploaderFileProps = UploadFile & {
27
27
  * Флаг загрузки при удалении файла
28
28
  */
29
29
  isDeletingFile?: boolean;
30
+ /**
31
+ * Флаг блокировки действий
32
+ */
33
+ isDisabled?: boolean;
30
34
  /**
31
35
  * Компонент для отображения превью pdf-файлов
32
36
  */
@@ -8,9 +8,9 @@ const FileLoading_1 = require("./FileLoading");
8
8
  const FilePreview_1 = require("./FilePreview");
9
9
  const styles_1 = require("./styles");
10
10
  const PreviewFileUploaderFile = (props) => {
11
- const { id, name, type, file, url, size, status, generateDownloadLink, onRetry, onDelete, onView, selfFiles, setErrorStatusFile, isHidePersonalData, PdfViewer, isDeletingFile, } = props;
11
+ const { id, name, type, file, url, size, status, generateDownloadLink, onRetry, onDelete, onView, selfFiles, setErrorStatusFile, isHidePersonalData, PdfViewer, isDeletingFile, isDisabled, } = props;
12
12
  const { isLoading, isUploadError, isRestrictionError, errorMsg, progress } = status || {};
13
13
  const isError = isUploadError || isRestrictionError;
14
- return ((0, jsx_runtime_1.jsx)(Fade_1.Fade, { in: true, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isLoading": isLoading, "$isError": isError, children: [!isLoading && !isError && ((0, jsx_runtime_1.jsx)(FilePreview_1.FilePreview, { fileId: id, fileName: name, fileType: type, file: file, fileUrl: url, fileSize: size, generateDownloadLink: generateDownloadLink, onView: onView, onDelete: onDelete, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer, isDeletingFile: isDeletingFile })), isLoading && ((0, jsx_runtime_1.jsx)(FileLoading_1.FileLoading, { selfFiles: selfFiles, setErrorStatusFile: setErrorStatusFile, fileId: id, fileName: name, fileSize: size, progress: progress })), isError && ((0, jsx_runtime_1.jsx)(FileError_1.FileError, { fileId: id, fileName: name, file: file, fileSize: size, errorMsg: errorMsg, isUploadError: isUploadError, onRetry: onRetry, onDelete: onDelete }))] }) }));
14
+ return ((0, jsx_runtime_1.jsx)(Fade_1.Fade, { in: true, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isLoading": isLoading, "$isError": isError, children: [!isLoading && !isError && ((0, jsx_runtime_1.jsx)(FilePreview_1.FilePreview, { fileId: id, fileName: name, fileType: type, file: file, fileUrl: url, fileSize: size, generateDownloadLink: generateDownloadLink, onView: onView, onDelete: onDelete, isHidePersonalData: isHidePersonalData, PdfViewer: PdfViewer, isDeletingFile: isDeletingFile, isDisabled: isDisabled })), isLoading && ((0, jsx_runtime_1.jsx)(FileLoading_1.FileLoading, { selfFiles: selfFiles, setErrorStatusFile: setErrorStatusFile, fileId: id, fileName: name, fileSize: size, progress: progress })), isError && ((0, jsx_runtime_1.jsx)(FileError_1.FileError, { fileId: id, fileName: name, file: file, fileSize: size, errorMsg: errorMsg, isUploadError: isUploadError, onRetry: onRetry, onDelete: onDelete }))] }) }));
15
15
  };
16
16
  exports.PreviewFileUploaderFile = PreviewFileUploaderFile;
@@ -44,6 +44,7 @@ export declare const useFileUploader: ({ value, isDisabled, isMultiple, accept,
44
44
  className: string;
45
45
  };
46
46
  fileListProps: {
47
+ isDisabled: boolean | undefined;
47
48
  onDelete: (fileId: FileId) => void;
48
49
  onRetry: ((fileId: FileId, file: File) => void) | undefined;
49
50
  onView: ((fileId: string, file?: File | undefined, fileUrl?: string | undefined) => void) | undefined;
@@ -165,6 +165,7 @@ inputRef, notify, onChange, onUploadFile, onDeleteFile, name, isError, onView, g
165
165
  },
166
166
  },
167
167
  fileListProps: {
168
+ isDisabled,
168
169
  onDelete: handleDelete,
169
170
  onRetry: getHandlerOnRetry(),
170
171
  onView,
@@ -90,6 +90,7 @@ export declare const usePreviewFileUploader: ({ placeholderImgSrc, isHidePersona
90
90
  fileListProps: {
91
91
  isHidePersonalData: boolean | undefined;
92
92
  PdfViewer: LazyExoticComponent<(props: PdfViewerProps) => ReactElement> | ((props: PdfViewerProps) => ReactElement) | undefined;
93
+ isDisabled: boolean | undefined;
93
94
  onDelete: (fileId: string) => void;
94
95
  onRetry: ((fileId: string, file: File) => void) | undefined;
95
96
  onView: ((fileId: string, file?: File | undefined, fileUrl?: string | undefined) => void) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.103.0",
3
+ "version": "4.103.1",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {