@obliczeniowo/elementary
Version:
Library made in Angular version 20
63 lines (59 loc) • 2.73 kB
TypeScript
import * as i0 from '@angular/core';
import { TemplateRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { Point2D, Point2DData, IPoint2DData } from '@obliczeniowo/elementary/classes';
import * as i2 from '@angular/common';
import * as i3 from '@obliczeniowo/elementary/simple-diagram2-d';
declare class StatisticDiagramComponent implements ControlValueAccessor {
protected hovered?: {
converted: Point2D;
original: Point2DData<string>;
};
protected touched: boolean;
/** header text to display */
header: string;
/** mixed point coordinates and data as string to display on hover with y value by default */
points: Point2DData<string>[];
/** width */
width: number;
/** height */
height: number;
/**
* disable the whole things
*/
disabled: boolean;
/**
* reference to detected in ng-content template with #hoveredRef used to replace default way of displaying statistic on
* mouse over
*
* @example
*
* <obl-statistic-diagram [points]="points">
* <ng-template let-hovered #hoveredRef>
* {{ hovered.original.extData }} Value:
* {{ hovered.original.y }}
* </ng-template>
* </obl-statistic-diagram>
*/
hoveredRef?: TemplateRef<any>;
onChange: (value: Point2DData<string>[]) => void;
onTouched: () => void;
registerOnValidatorChange(fn: () => void): void;
writeValue(set: IPoint2DData<string>[]): void;
registerOnChange(onChange: any): void;
registerOnTouched(onTouched: any): void;
setDisabledState(disabled: boolean): void;
markAsTouched(): void;
setHovered(point: {
converted: Point2D;
original: Point2DData<string>;
}): void;
static ɵfac: i0.ɵɵFactoryDeclaration<StatisticDiagramComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<StatisticDiagramComponent, "obl-statistic-diagram", never, { "header": { "alias": "header"; "required": false; }; "points": { "alias": "points"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["hoveredRef"], never, false, never>;
}
declare class StatisticDiagramModule {
static ɵfac: i0.ɵɵFactoryDeclaration<StatisticDiagramModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<StatisticDiagramModule, [typeof StatisticDiagramComponent], [typeof i2.CommonModule, typeof i3.SimpleDiagram2DModule], [typeof StatisticDiagramComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<StatisticDiagramModule>;
}
export { StatisticDiagramComponent, StatisticDiagramModule };