@dbg-riskit/angular-file 18.0.0 → 20.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/docs/README.md +5 -6
- package/fesm2022/dbg-riskit-angular-file.mjs +124 -157
- package/fesm2022/dbg-riskit-angular-file.mjs.map +1 -1
- package/index.d.ts +175 -5
- package/package.json +11 -14
- package/esm2022/dbg-riskit-angular-file.mjs +0 -5
- package/esm2022/lib/abstract.file.download.directive.mjs +0 -139
- package/esm2022/lib/abstract.file.upload.component.mjs +0 -100
- package/esm2022/lib/binary.file.upload.component.mjs +0 -25
- package/esm2022/lib/binary.file.upload.service.mjs +0 -41
- package/esm2022/lib/csv.file.download.directive.mjs +0 -83
- package/esm2022/lib/csv.file.upload.component.mjs +0 -47
- package/esm2022/lib/csv.file.upload.service.mjs +0 -109
- package/esm2022/lib/download.menu.component.mjs +0 -34
- package/esm2022/lib/file.download.directive.mjs +0 -53
- package/esm2022/lib/file.module.mjs +0 -76
- package/esm2022/lib/file.size.pipe.mjs +0 -34
- package/esm2022/lib/file.types.mjs +0 -2
- package/esm2022/lib/text.file.upload.component.mjs +0 -26
- package/esm2022/lib/text.file.upload.service.mjs +0 -41
- package/esm2022/public_api.mjs +0 -15
- package/lib/abstract.file.download.directive.d.ts +0 -29
- package/lib/abstract.file.upload.component.d.ts +0 -32
- package/lib/binary.file.upload.component.d.ts +0 -13
- package/lib/binary.file.upload.service.d.ts +0 -8
- package/lib/csv.file.download.directive.d.ts +0 -22
- package/lib/csv.file.upload.component.d.ts +0 -15
- package/lib/csv.file.upload.service.d.ts +0 -9
- package/lib/download.menu.component.d.ts +0 -13
- package/lib/file.download.directive.d.ts +0 -17
- package/lib/file.module.d.ts +0 -16
- package/lib/file.size.pipe.d.ts +0 -13
- package/lib/file.types.d.ts +0 -32
- package/lib/text.file.upload.component.d.ts +0 -13
- package/lib/text.file.upload.service.d.ts +0 -8
- package/public_api.d.ts +0 -14
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CSVColumnNameMapper, CSVFile } from './file.types';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CSVFileUploadService {
|
|
5
|
-
readFiles(files: FileList, nameMapper?: CSVColumnNameMapper): Observable<CSVFile[]>;
|
|
6
|
-
static getCSVFile(content: string, file: File, nameMapper: CSVColumnNameMapper, startFromRow?: number): CSVFile;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CSVFileUploadService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CSVFileUploadService>;
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CSVExportColumn } from './file.types';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CSVDownloadMenuComponent {
|
|
5
|
-
menuLabel: string;
|
|
6
|
-
menuTooltip?: string;
|
|
7
|
-
columns?: Array<CSVExportColumn<unknown>>;
|
|
8
|
-
data?: unknown[] | Observable<unknown[]>;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
filename?: string;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CSVDownloadMenuComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CSVDownloadMenuComponent, "risk-download-menu", never, { "menuLabel": { "alias": "menuLabel"; "required": false; }; "menuTooltip": { "alias": "menuTooltip"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "filename": { "alias": "filename"; "required": false; }; }, {}, never, never, false, never>;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { DialogService } from '@dbg-riskit/angular-view';
|
|
3
|
-
import { FileWithContent, Logger, ObservableWithProgress } from '@dbg-riskit/common';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { AbstractFileDownloadDirective } from './abstract.file.download.directive';
|
|
6
|
-
import { FileSizePipe } from './file.size.pipe';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export type SupportedDownloadFormats = FileWithContent | Blob | object | string;
|
|
9
|
-
export declare class FileDownloadDirective extends AbstractFileDownloadDirective<SupportedDownloadFormats> {
|
|
10
|
-
data?: ObservableWithProgress<SupportedDownloadFormats> | Observable<SupportedDownloadFormats> | SupportedDownloadFormats;
|
|
11
|
-
contentType?: string;
|
|
12
|
-
filename?: string;
|
|
13
|
-
constructor(elementRef: ElementRef, dialogService: DialogService, fileSizePipe: FileSizePipe, logger: Logger);
|
|
14
|
-
protected mapToFile(data: SupportedDownloadFormats): FileWithContent;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileDownloadDirective, never>;
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FileDownloadDirective, "[risk-download]", never, { "data": { "alias": "risk-download"; "required": false; }; "contentType": { "alias": "risk-download-content-type"; "required": false; }; "filename": { "alias": "risk-download-filename"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
|
-
}
|
package/lib/file.module.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./binary.file.upload.component";
|
|
3
|
-
import * as i2 from "./csv.file.upload.component";
|
|
4
|
-
import * as i3 from "./text.file.upload.component";
|
|
5
|
-
import * as i4 from "./csv.file.download.directive";
|
|
6
|
-
import * as i5 from "./download.menu.component";
|
|
7
|
-
import * as i6 from "./file.download.directive";
|
|
8
|
-
import * as i7 from "./file.size.pipe";
|
|
9
|
-
import * as i8 from "@angular/common";
|
|
10
|
-
import * as i9 from "@dbg-riskit/angular-view";
|
|
11
|
-
import * as i10 from "@dbg-riskit/angular-logging";
|
|
12
|
-
export declare class FileModule {
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FileModule, [typeof i1.BinaryFileUploadComponent, typeof i2.CSVFileUploadComponent, typeof i3.TextFileUploadComponent, typeof i4.CSVFileDownloadDirective, typeof i5.CSVDownloadMenuComponent, typeof i6.FileDownloadDirective, typeof i7.FileSizePipe], [typeof i8.CommonModule, typeof i9.CommonViewModule, typeof i10.LoggingModule], [typeof i1.BinaryFileUploadComponent, typeof i2.CSVFileUploadComponent, typeof i3.TextFileUploadComponent, typeof i4.CSVFileDownloadDirective, typeof i5.CSVDownloadMenuComponent, typeof i6.FileDownloadDirective, typeof i7.FileSizePipe]>;
|
|
15
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<FileModule>;
|
|
16
|
-
}
|
package/lib/file.size.pipe.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DecimalPipe } from '@angular/common';
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import { Maybe } from '@dbg-riskit/common';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class FileSizePipe implements PipeTransform {
|
|
6
|
-
private readonly decimalPipe;
|
|
7
|
-
private readonly base;
|
|
8
|
-
private readonly powerSuffixes;
|
|
9
|
-
constructor(decimalPipe: DecimalPipe);
|
|
10
|
-
transform(value: Maybe<number | string>): string;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileSizePipe, never>;
|
|
12
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FileSizePipe, "riskFileSize", false>;
|
|
13
|
-
}
|
package/lib/file.types.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ValueGetter } from '@dbg-riskit/common';
|
|
2
|
-
export interface File {
|
|
3
|
-
name: string;
|
|
4
|
-
size: number;
|
|
5
|
-
type: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ValidationResult {
|
|
8
|
-
result: boolean;
|
|
9
|
-
messages?: string[];
|
|
10
|
-
}
|
|
11
|
-
export type CSVValidator = (file: CSVFile) => ValidationResult;
|
|
12
|
-
export type CSVColumnNameMapper = (name: string) => string;
|
|
13
|
-
export interface CSVRow {
|
|
14
|
-
[key: string]: string;
|
|
15
|
-
}
|
|
16
|
-
export interface CSVExportColumn<T> {
|
|
17
|
-
get: ValueGetter<T>;
|
|
18
|
-
header: string;
|
|
19
|
-
}
|
|
20
|
-
export interface IFile {
|
|
21
|
-
file: File;
|
|
22
|
-
}
|
|
23
|
-
export interface CSVFile extends IFile {
|
|
24
|
-
header: string[];
|
|
25
|
-
body: CSVRow[];
|
|
26
|
-
}
|
|
27
|
-
export interface TextFile extends IFile {
|
|
28
|
-
body: string;
|
|
29
|
-
}
|
|
30
|
-
export interface BinaryFile extends IFile {
|
|
31
|
-
bodyBase64: string;
|
|
32
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Renderer2 } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { AbstractFileUploadComponent } from './abstract.file.upload.component';
|
|
4
|
-
import { TextFile } from './file.types';
|
|
5
|
-
import { TextFileUploadService } from './text.file.upload.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class TextFileUploadComponent extends AbstractFileUploadComponent<TextFile> {
|
|
8
|
-
private readonly fileUploadService;
|
|
9
|
-
constructor(fileUploadService: TextFileUploadService, renderer: Renderer2);
|
|
10
|
-
protected readFiles(fileList: FileList): Observable<TextFile[]>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextFileUploadComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextFileUploadComponent, "risk-text-file-upload", never, {}, {}, never, never, false, never>;
|
|
13
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { TextFile } from './file.types';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TextFileUploadService {
|
|
5
|
-
readFiles(files: FileList): Observable<TextFile[]>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextFileUploadService, never>;
|
|
7
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TextFileUploadService>;
|
|
8
|
-
}
|
package/public_api.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './lib/abstract.file.download.directive';
|
|
2
|
-
export * from './lib/abstract.file.upload.component';
|
|
3
|
-
export * from './lib/binary.file.upload.service';
|
|
4
|
-
export * from './lib/binary.file.upload.component';
|
|
5
|
-
export * from './lib/csv.file.download.directive';
|
|
6
|
-
export * from './lib/csv.file.upload.component';
|
|
7
|
-
export * from './lib/csv.file.upload.service';
|
|
8
|
-
export * from './lib/text.file.upload.service';
|
|
9
|
-
export * from './lib/text.file.upload.component';
|
|
10
|
-
export * from './lib/download.menu.component';
|
|
11
|
-
export * from './lib/file.download.directive';
|
|
12
|
-
export * from './lib/file.module';
|
|
13
|
-
export * from './lib/file.size.pipe';
|
|
14
|
-
export * from './lib/file.types';
|