@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.
104 lines (103 loc) • 5.15 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 { Component, Input, HostBinding, Output, EventEmitter } from '@angular/core';
import { ViewStateService } from '../view-state.service';
import { FocusableDirective } from '../../navigation/focusable.directive';
import { ButtonComponent } from '@progress/kendo-angular-buttons';
import { NgClass } from '@angular/common';
import * as i0 from "@angular/core";
import * as i1 from "../view-state.service";
/**
* @hidden
*/
export class ViewFooterComponent {
hostClasses = true;
toolbarRole = 'toolbar';
sub;
/**
* @hidden
* TODO: Drop in next MAJOR version
*/
inlineJustifyContentStyle = 'start';
itemClick = new EventEmitter();
items;
constructor(viewState) {
this.sub = viewState.toggleWorkHours.subscribe(() => this.itemClick.emit());
}
ngOnDestroy() {
// eslint-disable-next-line no-unused-expressions
this.sub && this.sub.unsubscribe();
}
onItemClick(e, item) {
e.preventDefault();
this.itemClick.emit(item);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewFooterComponent, deps: [{ token: i1.ViewStateService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ViewFooterComponent, isStandalone: true, selector: "[viewFooter]", inputs: { items: "items" }, outputs: { itemClick: "itemClick" }, host: { properties: { "class.k-scheduler-footer": "this.hostClasses", "class.k-toolbar": "this.hostClasses", "class.k-toolbar-solid": "this.hostClasses", "class.k-toolbar-md": "this.hostClasses", "attr.role": "this.toolbarRole", "style.justify-content": "this.inlineJustifyContentStyle" } }, ngImport: i0, template: `
<span class="k-scheduler-navigation">
@for (item of items; track item) {
<button
type="button"
kendoButton
[]="item.fontIcon"
[]="item.svgIcon"
[]="item.cssClass"
(click)="onItemClick($event, item)"
[]="0"
containerType='footer'>
<span class="k-button-text">{{ item.text }}</span>
</button>
}
</span>
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoSchedulerFocusIndex]", inputs: ["kendoSchedulerFocusIndex", "containerType"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewFooterComponent, decorators: [{
type: Component,
args: [{
// eslint-disable-next-line @angular-eslint/component-selector
selector: '[viewFooter]',
template: `
<span class="k-scheduler-navigation">
@for (item of items; track item) {
<button
type="button"
kendoButton
[]="item.fontIcon"
[]="item.svgIcon"
[]="item.cssClass"
(click)="onItemClick($event, item)"
[]="0"
containerType='footer'>
<span class="k-button-text">{{ item.text }}</span>
</button>
}
</span>
`,
standalone: true,
imports: [ButtonComponent, NgClass, FocusableDirective]
}]
}], ctorParameters: () => [{ type: i1.ViewStateService }], propDecorators: { hostClasses: [{
type: HostBinding,
args: ['class.k-scheduler-footer']
}, {
type: HostBinding,
args: ['class.k-toolbar']
}, {
type: HostBinding,
args: ['class.k-toolbar-solid']
}, {
type: HostBinding,
args: ['class.k-toolbar-md']
}], toolbarRole: [{
type: HostBinding,
args: ['attr.role']
}], inlineJustifyContentStyle: [{
type: HostBinding,
args: ['style.justify-content']
}], itemClick: [{
type: Output
}], items: [{
type: Input
}] } });