UNPKG

@ngx-file-upload/ui

Version:

Angular 16 file upload components for @ngx-file-upload/core

49 lines (48 loc) 2.17 kB
import { OnInit, NgZone } from "@angular/core"; import * as i0 from "@angular/core"; declare class ProgressbarCircleData { radius: number; circumferences: number; offset: number; progress: number; } export declare class ProgressbarCircleComponent implements OnInit { private zone; data: ProgressbarCircleData; dashArray: string; maskId: string; private circleParts; private circleGap; private progressbar; set radius(radius: number); set parts(parts: number); set gap(gap: number); set progress(progressed: number); constructor(zone: NgZone); ngOnInit(): void; /** * initialize data, currently we running into a problem if data comes straight * from storage, then the css properties are not set correctly but element is allready * rendered. Seems it belongs to a document fragment but not the page / parent component. * * So we need to run into an loop to ensure we have all data we need, this loop will break * after 100ms to ensure we dont run into infinite loop and take what we have. * * Neither zone.onStable nor afterViewInit are working for me here. Maybe afterViewChecked but this * will trigger multiple times. * * @todo check for better ways to solve this without loop * @todo think about second option make size and radius mandatory could be bad for responsive design but will work without loop */ private initializeData; /** calculate dasharray offset for mask */ private updateOffset; /** * calculate circle radius if no one is passed */ private calcRadius; private calcDashArray; static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarCircleComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ProgressbarCircleComponent, "ngx-file-upload-ui--progressbar-circle", never, { "radius": { "alias": "radius"; "required": false; }; "parts": { "alias": "parts"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; }, {}, never, never, false, never>; } export {};