@progress/kendo-angular-scheduler
Version:
Kendo UI Scheduler Angular - Outlook or Google-style angular scheduler calendar. Full-featured and customizable embedded scheduling from the creator developers trust for professional UI components.
54 lines (53 loc) • 2.97 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, TemplateRef, Optional, Input } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Represents the template directive for customizing the Scheduler edit dialog.
* To define the template, nest an `<ng-template>` tag
* with the `kendoSchedulerEditDialogTemplate` directive inside the `<kendo-scheduler>` tag ([see example](slug:custom_reactive_editing_scheduler)).
*
* The template context is set to the current event and the following additional fields are passed:
* - `event`—The currently edited event. Represents the default context that will be assigned to any template variable which utilizes the `let-x` syntax—for example, `let-event`.
* - `formGroup`—The current [`FormGroup`](https://angular.io/docs/ts/latest/api/forms/index/FormGroup-class.html).
* - `editMode`—The current edit mode.
* - `isNew`—The state of the current event.
*
* @example
* ```html
* <kendo-scheduler>
* <ng-template kendoSchedulerEditDialogTemplate let-formGroup="formGroup" let-isNew="isNew"
* autoFocusedElement=".title-input" let-editMode="editMode" let-event>
* <div>
* <label>Title:</label>
* <kendo-textbox placeholder="Title" [formControl]="formGroup.get('title') />
* </div>
* </ng-template>
* </kendo-scheduler>
* ```
*/
export class EditDialogTemplateDirective {
templateRef;
/**
* Specifies the query selector used to set the initial focus.
*/
autoFocusedElement;
constructor(templateRef) {
this.templateRef = templateRef;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditDialogTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EditDialogTemplateDirective, isStandalone: true, selector: "[kendoSchedulerEditDialogTemplate]", inputs: { autoFocusedElement: "autoFocusedElement" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditDialogTemplateDirective, decorators: [{
type: Directive,
args: [{
selector: '[kendoSchedulerEditDialogTemplate]',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
type: Optional
}] }]; }, propDecorators: { autoFocusedElement: [{
type: Input
}] } });