@progress/kendo-angular-gantt
Version:
Kendo UI Angular Gantt
44 lines (43 loc) • 2.47 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 { Directive, Optional, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Defines a template for the entire summary task component.
* Place an `<ng-template>` tag with the `kendoGanttSummaryTaskTemplate` directive inside the `<kendo-gantt>` tag to set the template.
*
* The template context uses the current data item. The following field is also available:
* - `elementWidth`—The calculated width in pixels of the current summary task wrapper element, based on its start and end date.
* Use `let-elementWidth="elementWidth"` to access it in the template.
* This helps you render custom elements for summary task progress.
*
* @example
* ```html
* <kendo-gantt [kendoGanttHierarchyBinding]="data">
* <ng-template kendoGanttSummaryTaskTemplate let-dataItem let-elementWidth="elementWidth">
* <div [style]="'color: white; font-size: 8px;'">
* {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete; width: {{ elementWidth }}
* </div>
* </ng-template>
* </kendo-gantt>
* ```
*/
export class GanttSummaryTaskTemplateDirective {
templateRef;
constructor(templateRef) {
this.templateRef = templateRef;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttSummaryTaskTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttSummaryTaskTemplateDirective, isStandalone: true, selector: "[kendoGanttSummaryTaskTemplate]", ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttSummaryTaskTemplateDirective, decorators: [{
type: Directive,
args: [{
selector: '[kendoGanttSummaryTaskTemplate]',
standalone: true
}]
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
type: Optional
}] }] });