carriera-intern-components 1.1.171 → 1.1.173
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.
|
@@ -16,6 +16,7 @@ export declare class DropZoneComponent {
|
|
|
16
16
|
smallView: import("@angular/core").WritableSignal<boolean>;
|
|
17
17
|
cropHeight: import("@angular/core").WritableSignal<number>;
|
|
18
18
|
cropWidth: import("@angular/core").WritableSignal<number>;
|
|
19
|
+
private initialFilesProcessed;
|
|
19
20
|
driver: import("@angular/core").WritableSignal<Driver>;
|
|
20
21
|
transform: ImageTransform;
|
|
21
22
|
imageChangedEvent: Event | null;
|
|
@@ -67,7 +68,7 @@ export declare class DropZoneComponent {
|
|
|
67
68
|
ngOnInit(): void;
|
|
68
69
|
ngAfterViewInit(): void;
|
|
69
70
|
emitDocs(): void;
|
|
70
|
-
populateDocs(): void;
|
|
71
|
+
populateDocs(currentFiles: FileResponse[]): void;
|
|
71
72
|
updateRangeBackground(input: HTMLInputElement): void;
|
|
72
73
|
cropDimensions(): void;
|
|
73
74
|
ratioHelper(): number;
|
|
@@ -3388,6 +3388,7 @@ class DropZoneComponent {
|
|
|
3388
3388
|
smallView = signal(false);
|
|
3389
3389
|
cropHeight = signal(0);
|
|
3390
3390
|
cropWidth = signal(0);
|
|
3391
|
+
initialFilesProcessed = signal(false);
|
|
3391
3392
|
driver = signal({
|
|
3392
3393
|
id: 0,
|
|
3393
3394
|
firstName: '',
|
|
@@ -3455,21 +3456,27 @@ class DropZoneComponent {
|
|
|
3455
3456
|
inputRange;
|
|
3456
3457
|
constructor(sanitizer) {
|
|
3457
3458
|
this.sanitizer = sanitizer;
|
|
3459
|
+
effect(() => {
|
|
3460
|
+
const files = this.files();
|
|
3461
|
+
if (!this.initialFilesProcessed() && files?.length) {
|
|
3462
|
+
this.populateDocs(files);
|
|
3463
|
+
this.initialFilesProcessed.set(true);
|
|
3464
|
+
}
|
|
3465
|
+
});
|
|
3458
3466
|
}
|
|
3459
3467
|
ngOnInit() {
|
|
3460
|
-
this.populateDocs();
|
|
3461
3468
|
this.cropDimensions();
|
|
3462
3469
|
}
|
|
3463
3470
|
ngAfterViewInit() { }
|
|
3464
3471
|
emitDocs() {
|
|
3465
3472
|
this.docsChange.emit(this.docs());
|
|
3466
3473
|
}
|
|
3467
|
-
populateDocs() {
|
|
3468
|
-
|
|
3469
|
-
if (currentFiles.length) {
|
|
3474
|
+
populateDocs(currentFiles) {
|
|
3475
|
+
if (currentFiles?.length) {
|
|
3470
3476
|
this.docs.set(currentFiles.map((file) => ({
|
|
3471
3477
|
fileName: file.fileName || '',
|
|
3472
3478
|
baseName: file.fileName || '',
|
|
3479
|
+
fileId: file.fileId || 0,
|
|
3473
3480
|
type: file.fileName
|
|
3474
3481
|
?.split('.')
|
|
3475
3482
|
.pop()
|
|
@@ -3751,6 +3758,7 @@ class DropZoneComponent {
|
|
|
3751
3758
|
handleDelete(fileName) {
|
|
3752
3759
|
this.carouselLeft();
|
|
3753
3760
|
const fileIdToDelete = this.docs().find((doc) => doc.fileName === fileName)?.fileId;
|
|
3761
|
+
console.log(fileIdToDelete, "fileIdToDelete");
|
|
3754
3762
|
if (fileIdToDelete) {
|
|
3755
3763
|
this.deletedDocs.set([
|
|
3756
3764
|
...this.deletedDocs(),
|