UNPKG

@progress/kendo-angular-upload

Version:

Kendo UI Angular Upload Component

38 lines (37 loc) 1.53 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Injectable } from '@angular/core'; import * as i0 from "@angular/core"; const components = {}; /** * @hidden */ export class DropZoneService { addComponent(component, zoneId) { if (this.has(zoneId)) { components[zoneId].push(component); } else { components[zoneId] = [component]; } } clearComponent(component, zoneId) { if (this.has(zoneId)) { const componentIdx = components[zoneId].indexOf(component); components[zoneId].splice(componentIdx, 1); } } getComponents(zoneId) { return components[zoneId]; } has(id) { return id in components; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropZoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropZoneService }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropZoneService, decorators: [{ type: Injectable }] });