UNPKG

@progress/kendo-angular-gantt

Version:
74 lines (73 loc) 3.38 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, Input } from '@angular/core'; import { anyChanged } from '@progress/kendo-angular-common'; import { DependencyDomService } from '../dependencies/dependency-dom.service'; import { OptionChangesService } from '../common/option-changes.service'; import * as i0 from "@angular/core"; import * as i1 from "../common/option-changes.service"; import * as i2 from "../dependencies/dependency-dom.service"; /** * Serves as the base class for the timeline view components of the Gantt. * * @example * ```typescript * export class CustomTimelineViewComponent extends ViewBase { * public readonly type: TimelineViewType = 'custom'; * } * ``` */ export class ViewBase { optionChangesService; dependencyDomService; /** * Sets the width of the time slot headers in pixels. * * @default 100 */ slotWidth = 100; /** * Sets the date format for the Grouped and Column headers. */ timelineHeadersDateFormat; /** * Specifies the current time marker settings. * If you do not set a value, the component uses the value from the Gantt component * [`currentTimeMarker`]({% slug api_gantt_ganttcomponent %}#toc-currentTimeMarker) property. */ currentTimeMarker; /** * * @hidden */ constructor(optionChangesService, dependencyDomService) { this.optionChangesService = optionChangesService; this.dependencyDomService = dependencyDomService; } ngOnChanges(changes) { if (anyChanged(['slotWidth'], changes)) { this.optionChangesService.notifyColumnChanges(); this.dependencyDomService.notifyChanges(); } if (anyChanged(['timelineHeadersDateFormat'], changes)) { this.optionChangesService.notifyDateFormatChanges(); } } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewBase, deps: [{ token: i1.OptionChangesService }, { token: i2.DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat", currentTimeMarker: "currentTimeMarker" }, usesOnChanges: true, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewBase, decorators: [{ type: Directive, args: [{ // eslint-disable-next-line @angular-eslint/directive-selector selector: 'kendo-gantt-view-base' }] }], ctorParameters: () => [{ type: i1.OptionChangesService }, { type: i2.DependencyDomService }], propDecorators: { slotWidth: [{ type: Input }], timelineHeadersDateFormat: [{ type: Input }], currentTimeMarker: [{ type: Input }] } });