UNPKG

@progress/kendo-angular-indicators

Version:

Kendo UI Indicators for Angular

74 lines (73 loc) 3.22 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, HostBinding } from '@angular/core'; import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n'; import * as i0 from "@angular/core"; import * as i1 from "@progress/kendo-angular-l10n"; /** * Represents the Kendo UI BadgeContainer component for Angular. * Groups and aligns one or more Badge components within a parent element. * * @example * ```html * <kendo-badge-container> * <kendo-badge>new</kendo-badge> * </kendo-badge-container> * ``` * * @remarks * Supported children components are: {@link BadgeComponent}. */ export class BadgeContainerComponent { localizationService; hostClass = true; /** * @hidden */ direction; dynamicRTLSubscription; rtl = false; constructor(localizationService) { this.localizationService = localizationService; this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => { this.rtl = rtl; this.direction = this.rtl ? 'rtl' : 'ltr'; }); } ngOnDestroy() { if (this.dynamicRTLSubscription) { this.dynamicRTLSubscription.unsubscribe(); } } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BadgeContainerComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BadgeContainerComponent, isStandalone: true, selector: "kendo-badge-container", host: { properties: { "class.k-badge-container": "this.hostClass", "attr.dir": "this.direction" } }, providers: [ LocalizationService, { provide: L10N_PREFIX, useValue: 'kendo.badge.component' } ], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BadgeContainerComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-badge-container', providers: [ LocalizationService, { provide: L10N_PREFIX, useValue: 'kendo.badge.component' } ], template: `<ng-content></ng-content>`, standalone: true }] }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { hostClass: [{ type: HostBinding, args: ['class.k-badge-container'] }], direction: [{ type: HostBinding, args: ['attr.dir'] }] } });