@colijnit/sharedcomponents 261.20.2 → 262.1.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/index.d.ts CHANGED
@@ -2504,14 +2504,15 @@ declare abstract class BaseFileUploadComponent implements ScreenConfigAdapterCom
2504
2504
  documentChangeEvent: EventEmitter<CoDocument>;
2505
2505
  popupOpenedStateChange: EventEmitter<boolean>;
2506
2506
  hidden: boolean;
2507
- onDrop(event: DragEvent): void;
2508
- onDragEnd(event: DragEvent): void;
2509
- onDragOver(event: DragEvent): void;
2510
- onDragEnter(event: DragEvent): void;
2511
- onDragLeave(event: DragEvent): void;
2512
2507
  documentUnderEdit: CoDocument;
2513
2508
  acceptedUploadFormats: string;
2509
+ uploadFeedbackMessage: string;
2510
+ uploadFeedbackVisible: boolean;
2511
+ showResizeDialog: boolean;
2512
+ resizeDialogMessage: string;
2513
+ resizeDialogCanSave: boolean;
2514
2514
  protected _maxUploadFileSize: number;
2515
+ protected readonly _resizeTargetBytes: number;
2515
2516
  private _dragEnterTarget;
2516
2517
  private _documentKey;
2517
2518
  private _dropZone;
@@ -2519,22 +2520,46 @@ declare abstract class BaseFileUploadComponent implements ScreenConfigAdapterCom
2519
2520
  private _docChangeSub;
2520
2521
  private _popupCloseSub;
2521
2522
  private _readonly;
2523
+ private _uploadFeedbackTimeout;
2524
+ private _pendingResizeResolver;
2522
2525
  constructor(_dictionaryService: SharedComponentsDictionaryService, _container: ViewContainerRef, _factory: ComponentFactoryResolver);
2523
2526
  ngOnDestroy(): void;
2527
+ onDrop(event: DragEvent): Promise<void>;
2528
+ onDragEnd(event: DragEvent): void;
2529
+ onDragOver(event: DragEvent): void;
2530
+ onDragEnter(event: DragEvent): void;
2531
+ onDragLeave(event: DragEvent): void;
2524
2532
  private _showDropzone;
2525
2533
  private _clearDropzone;
2526
2534
  handleDelete(file: CoDocument): Promise<boolean>;
2527
2535
  private _delete;
2528
2536
  handleSortingChange(docs: CoDocument[]): void;
2529
2537
  handleFileChange(event: any): Promise<void>;
2538
+ filesPicked(files: FileList): Promise<void>;
2539
+ private _processIncomingFiles;
2540
+ protected _prepareFilesForUpload(files: File[]): Promise<File[]>;
2530
2541
  handleEditDocumentClick(docToEdit: CoDocument): Promise<void>;
2531
2542
  openPopup(): Promise<void>;
2532
2543
  openPopupToAddDocumentByUrl(): void;
2533
2544
  private _createDocumentToAddByUrl;
2534
2545
  private _createAndFillPopupInstance;
2535
2546
  protected convertFilesIntoCoDocuments(files: FileList): Promise<CoDocument[]>;
2536
- filesPicked(files: FileList): Promise<void>;
2547
+ protected convertFileArrayIntoCoDocuments(files: File[]): Promise<CoDocument[]>;
2537
2548
  handleAcceptedFileTypesLoaded(value: FileType$1): void;
2549
+ protected showUploadFeedback(message: string): void;
2550
+ protected clearUploadFeedback(): void;
2551
+ protected getTooLargeMessage(file: File): string;
2552
+ protected getUnsupportedExtensionMessage(file: File, allowedExtensions?: string[]): string | null;
2553
+ protected getMaxUploadSizeInMb(): string;
2554
+ protected askResizeForImage(file: File): Promise<boolean>;
2555
+ handleResizeDialogSave(): void;
2556
+ handleResizeDialogClose(): void;
2557
+ private closeResizeDialog;
2558
+ protected resizeImageToUploadLimit(file: File): Promise<File>;
2559
+ protected resizeImage(file: File, maxWidth: number, maxHeight: number, quality: number): Promise<File>;
2560
+ protected readFileAsDataUrl(file: File): Promise<string>;
2561
+ protected loadImage(src: string): Promise<HTMLImageElement>;
2562
+ protected getResizedFileName(originalName: string, mimeType: string): string;
2538
2563
  private _getFileAsDocument;
2539
2564
  private _setInternalParamObj;
2540
2565
  private _lockDocument;
@@ -2547,6 +2572,7 @@ declare abstract class BaseFileUploadComponent implements ScreenConfigAdapterCom
2547
2572
  declare class FilesUploadComponent extends BaseFileUploadComponent implements OnDestroy {
2548
2573
  protected _container: ViewContainerRef;
2549
2574
  protected _factory: ComponentFactoryResolver;
2575
+ iconCacheService: IconCacheService;
2550
2576
  icon: typeof Icon;
2551
2577
  set dropzone(value: boolean);
2552
2578
  slideoutTemplate: TemplateRef<any>;
@@ -2567,7 +2593,7 @@ declare class FilesUploadComponent extends BaseFileUploadComponent implements On
2567
2593
  mouseOverAdd: boolean;
2568
2594
  slideoutShown: boolean;
2569
2595
  isDropzone: boolean;
2570
- constructor(dictionaryService: SharedComponentsDictionaryService, _container: ViewContainerRef, _factory: ComponentFactoryResolver);
2596
+ constructor(dictionaryService: SharedComponentsDictionaryService, _container: ViewContainerRef, _factory: ComponentFactoryResolver, iconCacheService: IconCacheService);
2571
2597
  ngOnDestroy(): void;
2572
2598
  openFileBrowser(): Promise<void>;
2573
2599
  handleAddClick(): void;
@@ -2885,7 +2911,7 @@ declare class AppFileDropzoneModule {
2885
2911
 
2886
2912
  declare class FilesUploadModule {
2887
2913
  static ɵfac: i0.ɵɵFactoryDeclaration<FilesUploadModule, never>;
2888
- static ɵmod: i0.ɵɵNgModuleDeclaration<FilesUploadModule, [typeof FilesUploadComponent], [typeof i3.CoDialogModule, typeof i3.FormModule, typeof i3.InputTextModule, typeof i3.ScreenConfigurationModule, typeof i3.ButtonModule, typeof SharedComponentsTranslationModule, typeof i3.IconModule, typeof ImageDisplayModule, typeof i2.CommonModule, typeof i3.InputCheckboxModule, typeof FileUploadModule, typeof FileUploadPopupModule, typeof AppFileDropzoneModule, typeof i3.DragDropModule], [typeof FilesUploadComponent]>;
2914
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FilesUploadModule, [typeof FilesUploadComponent], [typeof i3.CoDialogModule, typeof i3.FormModule, typeof i3.InputTextModule, typeof i3.ScreenConfigurationModule, typeof i3.ButtonModule, typeof SharedComponentsTranslationModule, typeof i3.IconModule, typeof ImageDisplayModule, typeof i2.CommonModule, typeof i3.InputCheckboxModule, typeof FileUploadModule, typeof FileUploadPopupModule, typeof AppFileDropzoneModule, typeof i3.DragDropModule, typeof SimpleTagsFormModule, typeof SimpleTagsRecentModule], [typeof FilesUploadComponent]>;
2889
2915
  static ɵinj: i0.ɵɵInjectorDeclaration<FilesUploadModule>;
2890
2916
  }
2891
2917
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/sharedcomponents",
3
- "version": "261.20.2",
3
+ "version": "262.1.0",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "chart.js": "4.3.0",
@@ -10,12 +10,12 @@
10
10
  "peerDependencies": {
11
11
  "@angular/common": "^20.3.16",
12
12
  "@angular/core": "^20.3.16",
13
- "@colijnit/articleapi": ">=261.1.0",
14
- "@colijnit/mainapi": ">=261.1.0",
15
- "@colijnit/corecomponents_v12": ">=261.20.0",
16
- "@colijnit/ioneconnector": ">=261.1.0",
13
+ "@colijnit/articleapi": ">=262.1.0",
14
+ "@colijnit/mainapi": ">=262.1.1",
15
+ "@colijnit/corecomponents_v12": ">=262.1.0",
16
+ "@colijnit/ioneconnector": ">=262.1.0",
17
17
  "@colijnit/sharedapi": ">=1.0.20",
18
- "@colijnit/relationapi": ">=261.1.0",
18
+ "@colijnit/relationapi": ">=262.1.0",
19
19
  "html-to-image": "^1.11.11",
20
20
  "jspdf": "^4.0.0",
21
21
  "jspdf-autotable": "5.0.7",