BREAKING CHANGE(decorators): Migrate to TC39 standard decorators (accessor) across components, update tsconfig and bump dependencies

This commit is contained in:
2025-11-17 13:27:11 +00:00
parent 70c29c778c
commit 92f69e2aa6
75 changed files with 2142 additions and 1901 deletions

View File

@@ -26,43 +26,43 @@ export class DeesInputProfilePicture extends DeesInputBase<DeesInputProfilePictu
public static demo = demoFunc;
@property({ type: String })
public value: string = ''; // Base64 encoded image or URL
accessor value: string = ''; // Base64 encoded image or URL
@property({ type: String })
public shape: ProfileShape = 'round';
accessor shape: ProfileShape = 'round';
@property({ type: Number })
public size: number = 120;
accessor size: number = 120;
@property({ type: String })
public placeholder: string = '';
accessor placeholder: string = '';
@property({ type: Boolean })
public allowUpload: boolean = true;
accessor allowUpload: boolean = true;
@property({ type: Boolean })
public allowDelete: boolean = true;
accessor allowDelete: boolean = true;
@property({ type: Number })
public maxFileSize: number = 5 * 1024 * 1024; // 5MB
accessor maxFileSize: number = 5 * 1024 * 1024; // 5MB
@property({ type: Array })
public acceptedFormats: string[] = ['image/jpeg', 'image/png', 'image/webp'];
accessor acceptedFormats: string[] = ['image/jpeg', 'image/png', 'image/webp'];
@property({ type: Number })
public outputSize: number = 800; // Output resolution in pixels
accessor outputSize: number = 800; // Output resolution in pixels
@property({ type: Number })
public outputQuality: number = 0.95; // 0-1 quality for JPEG
accessor outputQuality: number = 0.95; // 0-1 quality for JPEG
@state()
private isHovered: boolean = false;
accessor isHovered: boolean = false;
@state()
private isDragging: boolean = false;
accessor isDragging: boolean = false;
@state()
private isLoading: boolean = false;
accessor isLoading: boolean = false;
private modalInstance: ProfilePictureModal | null = null;

View File

@@ -21,25 +21,25 @@ import type { ProfileShape } from './dees-input-profilepicture.js';
@customElement('dees-profilepicture-modal')
export class ProfilePictureModal extends DeesElement {
@property({ type: String })
public initialImage: string = '';
accessor initialImage: string = '';
@property({ type: String })
public shape: ProfileShape = 'round';
accessor shape: ProfileShape = 'round';
@property({ type: Number })
public outputSize: number = 800;
accessor outputSize: number = 800;
@property({ type: Number })
public outputQuality: number = 0.95;
accessor outputQuality: number = 0.95;
@state()
private currentStep: 'crop' | 'preview' = 'crop';
accessor currentStep: 'crop' | 'preview' = 'crop';
@state()
private croppedImage: string = '';
accessor croppedImage: string = '';
@state()
private isProcessing: boolean = false;
accessor isProcessing: boolean = false;
private cropper: ImageCropper | null = null;
private windowLayer: any;