@alauda-fe/common
Version:
Alauda frontend team common codes.
42 lines (41 loc) • 2.26 kB
TypeScript
import { ChangeDetectorRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
import { ContextChartService } from '../../chart.service';
import * as i0 from "@angular/core";
export interface LegendItem {
name: string;
color: string;
activate?: boolean;
hover?: boolean;
}
export declare class LegendPayload {
legendItem: LegendItem;
legends: LegendItem[];
}
export declare class ChartLegendComponent implements OnInit {
readonly context: ContextChartService;
private readonly cdr;
legendEntries: LegendItem[];
symbol: 'circle' | 'square' | 'line';
template: TemplateRef<unknown> | string | 'dropdown';
mode: 'card' | 'default';
translation: boolean;
leftOperation: TemplateRef<unknown>;
rightOperation: TemplateRef<unknown>;
hideLegend: boolean;
selectAllOperation: boolean;
selectAllName: string;
labelClick: EventEmitter<LegendPayload>;
labelActivate: EventEmitter<LegendItem>;
labelDeactivate: EventEmitter<LegendItem>;
isTemplateRef: (label: any) => label is TemplateRef<unknown>;
allSelected: boolean;
get symbolName(): string;
constructor(context: ContextChartService, cdr: ChangeDetectorRef);
ngOnInit(): void;
selected(legend: LegendItem): void;
mouseenter(legend: LegendItem): void;
mouseleave(legend: LegendItem): void;
allSelect(select: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ChartLegendComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ChartLegendComponent, "acl-legend", never, { "symbol": { "alias": "symbol"; "required": false; }; "template": { "alias": "template"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "translation": { "alias": "translation"; "required": false; }; "leftOperation": { "alias": "leftOperation"; "required": false; }; "rightOperation": { "alias": "rightOperation"; "required": false; }; "hideLegend": { "alias": "hideLegend"; "required": false; }; "selectAllOperation": { "alias": "selectAllOperation"; "required": false; }; "selectAllName": { "alias": "selectAllName"; "required": false; }; }, { "labelClick": "labelClick"; "labelActivate": "labelActivate"; "labelDeactivate": "labelDeactivate"; }, never, never, false, never>;
}