ados-rcm 1.1.537 → 1.1.538

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.
@@ -2,7 +2,7 @@ import { TUseValues } from '../../AHooks/useValues';
2
2
  import { IABaseProps } from '../ABase/ABase';
3
3
  import { Resources } from '../AResource/AResource';
4
4
  import { IAWrapProps } from '../AWrap/AWrap';
5
- export type TFileUploaderType = 'Upload' | 'Download';
5
+ export type TFileUploaderType = 'Upload' | 'Download' | 'View';
6
6
  export type TFileStatus = 'Normal' | 'Error' | 'Loading';
7
7
  export interface ExtendedFile extends File {
8
8
  [key: string]: any;
@@ -12,11 +12,13 @@ export interface ExtendedFile extends File {
12
12
  }
13
13
  export interface IAFileUploaderProps extends IAWrapProps, IABaseProps {
14
14
  accept?: string;
15
+ csvFilename?: string;
15
16
  limit?: number;
16
17
  maxFileCount?: number;
17
18
  onDelete?: (file: ExtendedFile) => void;
18
19
  onDownload?: (file: ExtendedFile, updateStatus: (status: TFileStatus) => void) => void;
19
20
  onDownloadAll?: (files: ExtendedFile[], updateAllStatus: (statuses: Record<string, TFileStatus>) => void) => void;
21
+ onDownloadCsv?: (files: ExtendedFile[]) => void;
20
22
  onInvalidFileFormat?: () => void;
21
23
  resources?: Partial<typeof Resources.AFileUploader>;
22
24
  type: TFileUploaderType;
@@ -96,6 +96,7 @@ export declare const Resources: {
96
96
  Delete: string;
97
97
  'Fail Download': string;
98
98
  Download: string;
99
+ 'Download List': string;
99
100
  'Drop file to select': string;
100
101
  'Insert File': string;
101
102
  'Download All': string;
@@ -1,21 +1,4 @@
1
1
  import { ExtendedFile } from '../AComponents/AFileUploder/AFileUploader';
2
- /**
3
- *
4
- */
5
- declare function toBase64(file: File): Promise<string | undefined>;
6
- /**
7
- * toFile : Convert Base64 to File
8
- *
9
- * Description: Convert Base64 to File
10
- */
11
- declare function toFile(base64Data: string, filename: string): File;
12
- export declare const getFileKey: (file: ExtendedFile) => string;
13
- /**
14
- * fileF : File Functions
15
- */
16
2
  export declare const fileF: {
17
- toBase64: typeof toBase64;
18
- toFile: typeof toFile;
19
3
  getFileKey: (file: ExtendedFile) => string;
20
4
  };
21
- export {};
@@ -1,30 +1,4 @@
1
- import { IATableFilter, IATableSortation, TATableDefs, TATableFilterType, TATableFilteration } from '../AComponents/ATable/ATable';
2
- import { IItem } from './objF';
3
- type TDefaultPredicate = {
4
- [key in TATableFilterType]: IATableFilter<any>[key]['predicate'];
5
- };
6
- export declare const defaultPredicate: TDefaultPredicate;
7
- /**
8
- * tableF : table functions
9
- */
1
+ import { ExtendedFile } from '../AComponents/AFileUploder/AFileUploader';
10
2
  export declare const tableF: {
11
- applyFilteration: <T extends IItem>(items: T[], defs: TATableDefs<T>, filteration: TATableFilteration<T>) => T[];
12
- applySortation: <T extends IItem>(items: T[], defs: TATableDefs<T>, sortation?: IATableSortation<T>) => T[];
13
- applyPagination: <T extends IItem>(items: T[], page: number, pageSize: number) => T[];
14
- getPages: (totalCount: number, pageSize: number) => number[];
15
- getRangedPages: (page: number, totalCount: number, pageSize: number, pageRange: number) => {
16
- pages: number[];
17
- rangedPages: number[];
18
- };
19
- downloadCsv: <T extends IItem>(name: string, items: T[], defs: TATableDefs<T>) => void;
20
- getSingleFilterValue: <T extends IItem>(filteration: TATableFilteration<T>) => string | undefined;
21
- getMultiFilterValues: <T extends IItem, K extends IItem = any>(filteration: TATableFilteration<T, K>) => Partial<K>;
22
- getSelectFilterValue: <T extends IItem>(filteration: TATableFilteration<T>) => {
23
- selectedKey: string | number | keyof T;
24
- value: undefined;
25
- } | {
26
- selectedKey: string | number | keyof T;
27
- value: string | number | Date | import('../..').IDateRange;
28
- } | undefined;
3
+ downloadCsv: (files: ExtendedFile[], filename?: string) => void;
29
4
  };
30
- export {};