@meshmakers/shared-ui 3.1.147-0 → 3.1.149-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/esm2022/lib/mm-file-upload/mm-file-upload.component.mjs +98 -0
- package/esm2022/lib/mm-multiple-entity-select-input/mm-multiple-entity-select-input.component.mjs +3 -3
- package/esm2022/lib/mm-notification-bar/mm-notification-bar.component.mjs +3 -3
- package/esm2022/lib/mm-shared-ui.module.mjs +44 -8
- package/esm2022/lib/models/confirmation.mjs +1 -1
- package/esm2022/lib/services/file-upload.service.mjs +37 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/meshmakers-shared-ui.mjs +225 -70
- package/fesm2022/meshmakers-shared-ui.mjs.map +1 -1
- package/lib/mm-file-upload/mm-file-upload.component.d.ts +27 -0
- package/lib/mm-shared-ui.module.d.ts +15 -12
- package/lib/models/confirmation.d.ts +9 -0
- package/lib/services/file-upload.service.d.ts +9 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { MatDialogRef } from "@angular/material/dialog";
|
|
3
|
+
import { FileUploadData } from "../models/confirmation";
|
|
4
|
+
import { MatSnackBar } from "@angular/material/snack-bar";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class MmFileUploadComponent {
|
|
7
|
+
private readonly dialogRef;
|
|
8
|
+
protected data: FileUploadData;
|
|
9
|
+
private snackBar;
|
|
10
|
+
protected fileName: import("@angular/core").WritableSignal<string>;
|
|
11
|
+
protected fileSize: import("@angular/core").WritableSignal<number>;
|
|
12
|
+
protected uploadProgress: import("@angular/core").WritableSignal<number>;
|
|
13
|
+
protected fileInput: ElementRef | undefined;
|
|
14
|
+
protected selectedFile: File | null;
|
|
15
|
+
protected uploadSuccess: boolean;
|
|
16
|
+
protected uploadError: boolean;
|
|
17
|
+
constructor(dialogRef: MatDialogRef<MmFileUploadComponent>, data: FileUploadData, snackBar: MatSnackBar);
|
|
18
|
+
onFileChange(event: any): void;
|
|
19
|
+
onFileDrop(event: DragEvent): void;
|
|
20
|
+
onDragOver(event: DragEvent): void;
|
|
21
|
+
uploadFile(file: File | null): void;
|
|
22
|
+
removeFile(): void;
|
|
23
|
+
onOk(): void;
|
|
24
|
+
onCancel(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MmFileUploadComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MmFileUploadComponent, "mm-mm-file-upload", never, {}, {}, never, never, false, never>;
|
|
27
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModuleWithProviders } from "@angular/core";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
import * as i1 from "./mm-breadcrumb/mm-breadcrumb.component";
|
|
3
4
|
import * as i2 from "./mm-confirmation-window/mm-confirmation-window.component";
|
|
@@ -7,19 +8,21 @@ import * as i5 from "./mm-message-details/mm-message-details.component";
|
|
|
7
8
|
import * as i6 from "./mm-autocomplete-input/mm-autocomplete-input.component";
|
|
8
9
|
import * as i7 from "./mm-entity-select-input/mm-entity-select-input.component";
|
|
9
10
|
import * as i8 from "./mm-multiple-entity-select-input/mm-multiple-entity-select-input.component";
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "@angular/
|
|
12
|
-
import * as i11 from "@angular/material/
|
|
13
|
-
import * as i12 from "@angular/material/
|
|
14
|
-
import * as i13 from "@angular/material/
|
|
15
|
-
import * as i14 from "@angular/material/
|
|
16
|
-
import * as i15 from "@angular/material/
|
|
17
|
-
import * as i16 from "@angular/material/
|
|
18
|
-
import * as i17 from "@angular/material/
|
|
19
|
-
import * as i18 from "@angular/material/
|
|
20
|
-
import * as i19 from "@angular/
|
|
11
|
+
import * as i9 from "./mm-file-upload/mm-file-upload.component";
|
|
12
|
+
import * as i10 from "@angular/common";
|
|
13
|
+
import * as i11 from "@angular/material/toolbar";
|
|
14
|
+
import * as i12 from "@angular/material/button";
|
|
15
|
+
import * as i13 from "@angular/material/snack-bar";
|
|
16
|
+
import * as i14 from "@angular/material/dialog";
|
|
17
|
+
import * as i15 from "@angular/material/autocomplete";
|
|
18
|
+
import * as i16 from "@angular/material/input";
|
|
19
|
+
import * as i17 from "@angular/material/progress-spinner";
|
|
20
|
+
import * as i18 from "@angular/material/chips";
|
|
21
|
+
import * as i19 from "@angular/material/icon";
|
|
22
|
+
import * as i20 from "@angular/forms";
|
|
21
23
|
export declare class MmSharedUiModule {
|
|
24
|
+
static forRoot(): ModuleWithProviders<MmSharedUiModule>;
|
|
22
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<MmSharedUiModule, never>;
|
|
23
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MmSharedUiModule, [typeof i1.MmBreadcrumbComponent, typeof i2.MmConfirmationWindowComponent, typeof i3.MmProgressWindowComponent, typeof i4.MmNotificationBarComponent, typeof i5.MmMessageDetailsComponent, typeof i6.MmAutocompleteInputComponent, typeof i7.MmEntitySelectInputComponent, typeof i8.MmMultipleEntitySelectInputComponent], [typeof
|
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MmSharedUiModule, [typeof i1.MmBreadcrumbComponent, typeof i2.MmConfirmationWindowComponent, typeof i3.MmProgressWindowComponent, typeof i4.MmNotificationBarComponent, typeof i5.MmMessageDetailsComponent, typeof i6.MmAutocompleteInputComponent, typeof i7.MmEntitySelectInputComponent, typeof i8.MmMultipleEntitySelectInputComponent, typeof i9.MmFileUploadComponent], [typeof i10.CommonModule, typeof i11.MatToolbarModule, typeof i12.MatButtonModule, typeof i13.MatSnackBarModule, typeof i14.MatDialogModule, typeof i15.MatAutocompleteModule, typeof i16.MatInputModule, typeof i17.MatProgressSpinnerModule, typeof i18.MatChipsModule, typeof i19.MatIconModule, typeof i20.ReactiveFormsModule, typeof i19.MatIcon, typeof i19.MatIcon], [typeof i1.MmBreadcrumbComponent, typeof i2.MmConfirmationWindowComponent, typeof i4.MmNotificationBarComponent, typeof i6.MmAutocompleteInputComponent, typeof i7.MmEntitySelectInputComponent, typeof i8.MmMultipleEntitySelectInputComponent, typeof i9.MmFileUploadComponent]>;
|
|
24
27
|
static ɵinj: i0.ɵɵInjectorDeclaration<MmSharedUiModule>;
|
|
25
28
|
}
|
|
@@ -18,3 +18,12 @@ export interface ConfirmationWindowData {
|
|
|
18
18
|
export interface ConfirmationWindowResult {
|
|
19
19
|
result: ButtonTypes;
|
|
20
20
|
}
|
|
21
|
+
export interface FileUploadData {
|
|
22
|
+
title: string;
|
|
23
|
+
message: string;
|
|
24
|
+
mimeTypes: string;
|
|
25
|
+
}
|
|
26
|
+
export interface FileUploadResult {
|
|
27
|
+
success: boolean;
|
|
28
|
+
selectedFile: File | null;
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MatDialog } from "@angular/material/dialog";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FileUploadService {
|
|
4
|
+
private readonly dialog;
|
|
5
|
+
constructor(dialog: MatDialog);
|
|
6
|
+
showUploadDialog(title: string, message: string, mimeTypes: string): Promise<File | null>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FileUploadService>;
|
|
9
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ export * from './lib/mm-entity-select-input/mm-entity-select-input.component';
|
|
|
5
5
|
export * from './lib/mm-multiple-entity-select-input/mm-multiple-entity-select-input.component';
|
|
6
6
|
export * from './lib/mm-confirmation-window/mm-confirmation-window.component';
|
|
7
7
|
export * from './lib/mm-breadcrumb/mm-breadcrumb.component';
|
|
8
|
+
export * from './lib/mm-file-upload/mm-file-upload.component';
|
|
8
9
|
export * from './lib/services/confirmation.service';
|
|
9
10
|
export * from './lib/services/progress-notifier.service';
|
|
11
|
+
export * from './lib/services/file-upload.service';
|
|
10
12
|
export * from './lib/models/confirmation';
|
|
11
13
|
export * from './lib/models/commonValidators';
|
|
12
14
|
export * from './lib/models/abstractDetailsComponent';
|