UNPKG

@progress/kendo-angular-gantt

Version:
30 lines (29 loc) 1.5 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Injectable, Renderer2 } from '@angular/core'; import * as i0 from "@angular/core"; /** * @hidden */ export class ToolbarNavigationService { renderer; focusableContent; focusIndex = 0; constructor(renderer) { this.renderer = renderer; } updateFocus() { this.focusableContent.forEach(el => { this.renderer.setAttribute(el, 'tabindex', '-1'); }); this.renderer.setAttribute(this.focusableContent[this.focusIndex], 'tabindex', '0'); this.focusableContent[this.focusIndex].focus(); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, decorators: [{ type: Injectable }], ctorParameters: () => [{ type: i0.Renderer2 }] });