@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.
48 lines (47 loc) • 1.93 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 { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
/**
* A service for communication with the toolbar controls
* which is used by the toolbar components for publishing navigation actions
* ([see example]({% slug toolbar_scheduler %}#toc-using-the-toolbar-service)).
*/
export class ToolbarService {
/**
* A stream of navigation actions that is intended for consumption by the toolbar.
*
* @hidden
*/
action;
/**
* The context for the built-in navigation components.
*
* @hidden
*/
context;
actionSource = new Subject();
/** @hidden */
constructor() {
this.action = this.actionSource.asObservable();
}
/**
* Emits the specified navigation action.
*
* @param action - The navigation action that will be executed.
*/
navigate(action) {
this.actionSource.next(action);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });