ados-rcm 1.1.723 → 1.1.725

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.
@@ -19,21 +19,21 @@ export interface ExtendedFile extends File {
19
19
  uniqueId?: string;
20
20
  url?: string;
21
21
  }
22
- export interface IAFileUploaderProps extends IAWrapProps, IABaseProps {
22
+ export interface IAFileUploaderProps<TFile extends ExtendedFile = ExtendedFile> extends IAWrapProps, IABaseProps {
23
23
  accept?: string;
24
24
  csvFilename?: string;
25
25
  limit?: number;
26
26
  maxFileCount?: number;
27
27
  mode: TFileUploaderMode;
28
- onDelete?: (file: ExtendedFile, updateStatus: (status: TFileStatus) => void) => Promise<void> | void;
29
- onDownload?: (file: ExtendedFile, updateStatus: (status: TFileStatus, progress?: number) => void) => void;
30
- onDownloadAll?: (files: ExtendedFile[], updateAllStatus: (statuses: Record<string, TFileStatus>, progress?: Record<string, number>) => void) => void;
31
- onDownloadCsv?: (files: ExtendedFile[]) => void;
28
+ onDelete?: (file: TFile, updateStatus: (status: TFileStatus) => void) => Promise<void> | void;
29
+ onDownload?: (file: TFile, updateStatus: (status: TFileStatus, progress?: number) => void) => void;
30
+ onDownloadAll?: (files: TFile[], updateAllStatus: (statuses: Record<string, TFileStatus>, progress?: Record<string, number>) => void) => void;
31
+ onDownloadCsv?: (files: TFile[]) => void;
32
32
  onInvalidFileFormat?: () => void;
33
- onUpload?: (file: ExtendedFile, updateStatus: (status: TFileStatus, progress?: number) => void) => Promise<void> | void;
33
+ onUpload?: (file: TFile, updateStatus: (status: TFileStatus, progress?: number) => void) => Promise<void> | void;
34
34
  resources?: Partial<typeof Resources.AFileUploader>;
35
35
  type?: TFileUploaderType;
36
36
  useError?: TUseValues<boolean>;
37
- useFiles: TUseValues<ExtendedFile[] | undefined>;
37
+ useFiles: TUseValues<TFile[] | undefined>;
38
38
  }
39
- export declare const AFileUploader: (props: IAFileUploaderProps) => import("react/jsx-runtime").JSX.Element | null;
39
+ export declare const AFileUploader: <TFile extends ExtendedFile = ExtendedFile>(props: IAFileUploaderProps<TFile>) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,3 +1,4 @@
1
+ import { Dispatch, SetStateAction } from 'react';
1
2
  /**
2
3
  * useValues
3
4
  * Notice 1 : useValues uses conditional hook. YOU SHOULD NEVER change the conditions. or it will boom
@@ -8,5 +9,5 @@
8
9
  * 4. use === [T, (newState: T) => void] 이면 use (external value, external setter)
9
10
  *
10
11
  */
11
- export type TUseValues<T, K = T> = [T] | [T, ((newState: K) => void) | undefined];
12
- export declare function useValues<T, K = T>(use: TUseValues<T, K> | undefined, defaultValue: T): [T, ((newState: K) => void) | undefined] | [T, import('react').Dispatch<import('react').SetStateAction<T>>];
12
+ export type TUseValues<T, K = T> = [T] | [T, ((newState: K) => void) | Dispatch<SetStateAction<T>> | undefined];
13
+ export declare function useValues<T, K = T>(use: TUseValues<T, K> | undefined, defaultValue: T): [T, Dispatch<SetStateAction<T>> | ((newState: K) => void) | undefined];