UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

69 lines (68 loc) 3.74 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Component, EventEmitter, Output, ViewChild, ChangeDetectionStrategy } from '@angular/core'; import { TypeRegistrar } from "./type"; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; export let IgxSimpleDefaultTooltipComponent = /*@__PURE__*/ (() => { class IgxSimpleDefaultTooltipComponent { constructor(_changeDetectorRef) { this._changeDetectorRef = _changeDetectorRef; this.onContentReady = new EventEmitter(); } ensureDefaultTooltip(gauge) { if (gauge.showToolTip) { gauge.tooltipTemplate = this.tooltip; } else { gauge.tooltipTemplate = null; } } getLabel(context) { if (context.itemName == null) { let label = context.label.split(":"); return label.length < 2 ? context.label : label[1].trim(); } return context.label; } ngAfterContentInit() { this.onContentReady.emit({}); } static register() { TypeRegistrar.registerCons("IgxSimpleDefaultTooltipComponent", IgxSimpleDefaultTooltipComponent); } } IgxSimpleDefaultTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxSimpleDefaultTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); IgxSimpleDefaultTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxSimpleDefaultTooltipComponent, selector: "igx-simple-default-tooltips", outputs: { onContentReady: "onContentReady" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }], ngImport: i0, template: ` <ng-template #tooltip let-context="i" > <div class='ui-simple-default-tooltip-content' *ngIf="context"> <span style="white-space: nowrap;font-weight: bold;" >{{getLabel(context)}}</span> </div> </ng-template> `, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxSimpleDefaultTooltipComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxSimpleDefaultTooltipComponent, decorators: [{ type: Component, args: [{ selector: 'igx-simple-default-tooltips', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <ng-template #tooltip let-context="i" > <div class='ui-simple-default-tooltip-content' *ngIf="context"> <span style="white-space: nowrap;font-weight: bold;" >{{getLabel(context)}}</span> </div> </ng-template> `, styles: [] }] }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tooltip: [{ type: ViewChild, args: ["tooltip", { static: true }] }], onContentReady: [{ type: Output }] } });