UNPKG

@progress/kendo-angular-utils

Version:

Kendo UI Angular utils component

59 lines (58 loc) 2.27 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { NgZone, OnDestroy } from '@angular/core'; import { Subject } from 'rxjs'; import { AdaptiveSettings } from './models/adaptive-settings'; import { AdaptiveSettingsService } from './adaptive-settings.service'; import { AdaptiveSize } from './models/adaptive-size'; import * as i0 from "@angular/core"; /** * The service responsible for handling changes in the adaptive settings. Should be included in the providers array when implementing the functionality in a standalone component. * * @example * * ```ts-no-run * // Import the AdaptiveService * import { AdaptiveService } from '@progress/kendo-angular-utils'; * * // Define a standalone component * @Component({ * selector: my-component, * standalone: true, * imports: [ ... ], * providers: [AdaptiveService, { provide: ADAPTIVE_SETTINGS , useValue: { small: 300 } }], * template: ... * }) * export class AppComponent {} * ``` */ export declare class AdaptiveService implements OnDestroy { private _adaptiveSettings; private zone; /** * Notifies subscribers of the initial adaptive settings, and upon each call to `notify`. * @hidden */ readonly changes: Subject<AdaptiveSettings>; /** * Notifies subscribers when the window size changes to any of small, medium, or large depending on the set adaptive size breakpoints. * @hidden */ readonly sizeChanges: Subject<AdaptiveSize>; private subs; private previousSize; constructor(_adaptiveSettings: AdaptiveSettings, adaptiveSettingsService: AdaptiveSettingsService, zone: NgZone); /** * @hidden */ get adaptiveSettings(): AdaptiveSettings; /** * @hidden */ get size(): AdaptiveSize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AdaptiveService, [{ optional: true; }, { optional: true; }, null]>; static ɵprov: i0.ɵɵInjectableDeclaration<AdaptiveService>; }