UNPKG

@progress/kendo-angular-gantt

Version:
57 lines (56 loc) 2.62 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, TemplateRef, Optional, Input } from '@angular/core'; import * as i0 from "@angular/core"; /** * Represents the toolbar template of the Gantt. * * The template context includes: * - `position`&mdash;The position where the toolbar template renders. Possible values are `'top'` and `'bottom'`. * * @example * ```html * <kendo-gantt [kendoGanttHierarchyBinding]="data" [style.height.px]="400"> * <ng-template kendoGanttToolbarTemplate [position]="position" let-position="position"> * <button kendoButton (click)="onClick()">Custom action</button> * </ng-template> * </kendo-gantt> * ``` */ export class ToolbarTemplateDirective { templateRef; _position = "top"; /** * Sets the Gantt Toolbar that uses this template. * * Possible values: * - `top`&mdash;Renders the template in the top toolbar (if present) only. * - `bottom`&mdash;Renders the template in the bottom toolbar (if present) only. * - `both`&mdash;Renders the template in both toolbars (if present). */ set position(position) { this._position = position; } get position() { return this._position; } constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ToolbarTemplateDirective, isStandalone: true, selector: "[kendoGanttToolbarTemplate]", inputs: { position: "position" }, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoGanttToolbarTemplate]', standalone: true }] }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }], propDecorators: { position: [{ type: Input, args: ['position'] }] } });