@progress/kendo-angular-icons
Version:
Kendo UI Angular component starter template
60 lines (59 loc) • 2.25 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* 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 { Subject } from 'rxjs';
import * as i0 from "@angular/core";
/**
* Represents the service that manages icon settings.
* Use the `notify` method to update icon settings dynamically.
*
* @example
* ```typescript
* constructor(private iconSettingsService: IconSettingsService) {}
*
* this.iconSettingsService.notify({ themeColor: 'primary' });
* ```
*/
export class IconSettingsService {
/**
* @hidden
*/
changes = new Subject();
/**
* Notifies subscribers about changes in the icon settings.
*
* @param iconSettings - (Optional) Sets a new value for the [icon settings token]({% slug api_icons_icon_settings %}).
* @example
* ```typescript
* iconSettingsService.notify({ size: 'large' });
* ```
*/
notify(iconSettings) {
this.changes.next(iconSettings);
}
/**
* Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
* Override in a custom service to provide custom SVG icons.
*
* @hidden
*/
getSvgIcon(_name) {
return null;
}
/**
* Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
* Override in a custom service to provide classes for custom font icons.
*
* @hidden
*/
getCustomFontIconClass(_key) {
return null;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconSettingsService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconSettingsService, decorators: [{
type: Injectable
}] });