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

@@ -23,33 +23,33 @@ export class DeesInputFileupload extends DeesInputBase<DeesInputFileupload> {
public static demo = demoFunc;
@property({ attribute: false })
public value: File[] = [];
accessor value: File[] = [];
@state()
public state: 'idle' | 'dragOver' | 'dropped' | 'uploading' | 'completed' = 'idle';
accessor state: 'idle' | 'dragOver' | 'dropped' | 'uploading' | 'completed' = 'idle';
@state()
public isLoading: boolean = false;
accessor isLoading: boolean = false;
@property({ type: String })
public buttonText: string = 'Select files';
accessor buttonText: string = 'Select files';
@property({ type: String })
public accept: string = '';
accessor accept: string = '';
@property({ type: Boolean })
public multiple: boolean = true;
accessor multiple: boolean = true;
@property({ type: Number })
public maxSize: number = 0; // 0 means no limit
accessor maxSize: number = 0; // 0 means no limit
@property({ type: Number })
public maxFiles: number = 0; // 0 means no limit
accessor maxFiles: number = 0; // 0 means no limit
@property({ type: String, reflect: true })
public validationState: 'valid' | 'invalid' | 'warn' | 'pending' = null;
accessor validationState: 'valid' | 'invalid' | 'warn' | 'pending' = null;
public validationMessage: string = '';
accessor validationMessage: string = '';
private previewUrlMap: WeakMap<File, string> = new WeakMap();
private dropArea: HTMLElement | null = null;