gantri-components 2.147.0-beta.1 → 2.147.0-beta.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/dist/components/file-uploader/components/configured-custom-content/configured-custom-content.types.d.ts +2 -0
- package/dist/components/file-uploader/components/file-uploader-thumbnail-variant/components/thumbnail-render/thumbnail-render.types.d.ts +1 -1
- package/dist/components/file-uploader/components/file-uploader-thumbnail-variant/file-uploader-thumbnail-variant.types.d.ts +1 -1
- package/dist/components/file-uploader/components/icon-recover/icon-recover.d.ts +2 -2
- package/dist/components/file-uploader/components/icon-recover/icon-recover.types.d.ts +4 -3
- package/dist/components/file-uploader/components/uploader-actions/uploader-actions.types.d.ts +1 -1
- package/dist/components/file-uploader/file-uploader.types.d.ts +4 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -3,5 +3,7 @@ import { OptionalValues } from '../../../../types/common';
|
|
|
3
3
|
export type ConfiguredCustomContentProps = OptionalValues<Required<Pick<FileUploaderProps, 'CustomContent' | 'enableCopyUrl' | 'fileName' | 'fileUrl' | 'isDisabled' | 'isDraggable' | 'isReplaceable' | 'processing' | 'SortableDragHandleWrapper'>>> & {
|
|
4
4
|
deleteFile: () => Promise<void>;
|
|
5
5
|
handleOpenFileSelect: () => void;
|
|
6
|
+
handleRecoverFile?: (fileUrl: string) => Promise<void>;
|
|
6
7
|
isDraggingOver: boolean;
|
|
8
|
+
thumbnailUrl?: string;
|
|
7
9
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OptionalValues } from '../../../../../../types/common';
|
|
2
2
|
import { DeleteFile, FileUploaderProps } from '../../../../file-uploader.types';
|
|
3
|
-
export type ThumbnailRenderProps = OptionalValues<Required<Pick<FileUploaderProps, '
|
|
3
|
+
export type ThumbnailRenderProps = OptionalValues<Required<Pick<FileUploaderProps, 'enableCopyUrl' | 'fileUrl' | 'handleRecoverFile' | 'isDisabled' | 'isDraggable' | 'isReplaceable' | 'onClick' | 'SortableDragHandleWrapper' | 'thumbnailSize' | 'transformThumbnailSrc'>>> & {
|
|
4
4
|
deleteFile: DeleteFile;
|
|
5
5
|
handleOpenFileSelect: () => void;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileUploaderProps, DeleteFile } from '../../file-uploader.types';
|
|
2
2
|
import { OptionalValues } from '../../../../types/common';
|
|
3
|
-
export type FileUploaderThumbnailVariantProps = OptionalValues<Required<Pick<FileUploaderProps, '
|
|
3
|
+
export type FileUploaderThumbnailVariantProps = OptionalValues<Required<Pick<FileUploaderProps, 'disabledDescription' | 'enableCopyUrl' | 'fileUrl' | 'handleRecoverFile' | 'isActive' | 'isDisabled' | 'isDraggable' | 'isReplaceable' | 'onClick' | 'processing' | 'SortableDragHandleWrapper' | 'thumbnailSize' | 'transformThumbnailSrc'>>> & {
|
|
4
4
|
deleteFile: DeleteFile;
|
|
5
5
|
handleOpenFileSelect: () => void;
|
|
6
6
|
isDraggingOver: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { IconRecoverFilePropsDef } from './icon-recover.types';
|
|
3
|
+
export declare const IconRecoverFile: (props: IconRecoverFilePropsDef) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export interface
|
|
1
|
+
export type HandleRecoverFileDef = (fileUrl: string) => Promise<void>;
|
|
2
|
+
export interface IconRecoverFilePropsDef {
|
|
3
3
|
fileUrl: string | undefined;
|
|
4
|
-
|
|
4
|
+
handleRecoverFile: HandleRecoverFileDef | undefined;
|
|
5
|
+
isDisabled: boolean | undefined;
|
|
5
6
|
thumbnailUrl: string | undefined;
|
|
6
7
|
}
|
package/dist/components/file-uploader/components/uploader-actions/uploader-actions.types.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export type UploaderActionIconsProps = OptionalValues<{
|
|
|
5
5
|
enableCopyUrl: boolean;
|
|
6
6
|
fileUrl: string;
|
|
7
7
|
handleOpenFileSelect: () => void;
|
|
8
|
+
handleRecoverFile?: (fileUrl: string) => Promise<void>;
|
|
8
9
|
isDisabled: boolean;
|
|
9
10
|
isReplaceable: boolean;
|
|
10
|
-
recoverFile?: (fileUrl: string) => Promise<void>;
|
|
11
11
|
thumbnailUrl?: string;
|
|
12
12
|
}>;
|
|
@@ -2,7 +2,7 @@ import { FocusEventHandler, HTMLAttributes, PropsWithChildren, ReactNode } from
|
|
|
2
2
|
import { ButtonProps } from '../button/button.types';
|
|
3
3
|
import { BoxProps } from '../box/box.types';
|
|
4
4
|
import { fileUploaderVariants } from './file-uploader.constants';
|
|
5
|
-
import {
|
|
5
|
+
import { HandleRecoverFileDef } from './components/icon-recover/icon-recover.types';
|
|
6
6
|
export type FileUploaderProps = {
|
|
7
7
|
/** Any children passed will appear just within the uploader above everything else. Use this for notifications like download toasts. */
|
|
8
8
|
children?: ReactNode;
|
|
@@ -13,6 +13,8 @@ export type FileUploaderProps = {
|
|
|
13
13
|
fileUrl: string;
|
|
14
14
|
/** This function should delete the record from the database, ***then*** delete the file. */
|
|
15
15
|
handleDeleteFile: HandleDeleteFile;
|
|
16
|
+
/** Provides a method for potential file recovery. */
|
|
17
|
+
handleRecoverFile?: HandleRecoverFileDef;
|
|
16
18
|
inputName?: string;
|
|
17
19
|
isActive?: boolean;
|
|
18
20
|
isDisabled?: boolean;
|
|
@@ -29,8 +31,6 @@ export type FileUploaderProps = {
|
|
|
29
31
|
/** Used to show loading indicator for `'thumbnail'` variant. For the `'button'` variant, it can be passed here or as part of `buttonProps`. */
|
|
30
32
|
processing: boolean;
|
|
31
33
|
purifyFileName?: boolean;
|
|
32
|
-
/** Provides a method for potential file recovery. */
|
|
33
|
-
recoverFile?: RecoverFileDef;
|
|
34
34
|
transformThumbnailSrc?: TransformThumbnailSrc;
|
|
35
35
|
/** If invalid, return the error message to display. */
|
|
36
36
|
validateFile?: ValidateFile;
|
|
@@ -81,6 +81,7 @@ export interface FileUploaderCustomContentPropsDef {
|
|
|
81
81
|
IconCopyUrl: () => JSX.Element;
|
|
82
82
|
IconDelete: () => JSX.Element;
|
|
83
83
|
IconDrag: () => JSX.Element;
|
|
84
|
+
IconRecoverFile: () => JSX.Element;
|
|
84
85
|
IconReplace: () => JSX.Element;
|
|
85
86
|
UploaderActionIcons: () => JSX.Element;
|
|
86
87
|
fileName: string;
|