@progress/kendo-angular-gauges
Version:
Kendo UI Angular Gauges
77 lines (76 loc) • 3.28 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 { Component, ContentChildren, QueryList } from '@angular/core';
import { CollectionComponent } from '../base-components';
import { ColorComponent } from './color.component';
import { CollectionChangesService, ConfigurationService } from '../services';
import * as i0 from "@angular/core";
import * as i1 from "../services";
/**
* Represents a collection of one or more ArcGauge colors
* ([more information and example]({% slug colorranges_arcgauge %})).
*
* @example
* ```ts
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-app',
* template: `
* <kendo-arcgauge [value]="value">
* <kendo-arcgauge-colors>
* @for (item of colors; track item) {
* <kendo-arcgauge-color
* [from]="item.from" [to]="item.to" [color]="item.color">
* </kendo-arcgauge-color>
* }
* </kendo-arcgauge-colors>
* </kendo-arcgauge>
* `
* })
* export class AppComponent {
* public value: number = 10;
*
* public colors: any[] = [{
* to: 25,
* color: '#0058e9'
* }, {
* from: 25,
* to: 50,
* color: '#37b400'
* }, {
* from: 50,
* to: 75,
* color: '#ffc000'
* }, {
* from: 75,
* color: '#f31700'
* }];
* }
* ```
*
* @remarks
* Supported children components are: {@link ColorComponent}.
*/
export class ColorsComponent extends CollectionComponent {
children;
constructor(configurationService, collectionChangesService) {
super('colors', configurationService, collectionChangesService);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorsComponent, deps: [{ token: i1.ConfigurationService }, { token: i1.CollectionChangesService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColorsComponent, isStandalone: true, selector: "kendo-arcgauge-colors", providers: [CollectionChangesService], queries: [{ propertyName: "children", predicate: ColorComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorsComponent, decorators: [{
type: Component,
args: [{
providers: [CollectionChangesService],
selector: 'kendo-arcgauge-colors',
template: '',
standalone: true
}]
}], ctorParameters: () => [{ type: i1.ConfigurationService }, { type: i1.CollectionChangesService }], propDecorators: { children: [{
type: ContentChildren,
args: [ColorComponent]
}] } });