@progress/kendo-angular-layout
Version:
Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts
54 lines (53 loc) • 1.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 { Injectable } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
import * as i0 from "@angular/core";
/**
* @hidden
*/
let nextPanelbarId = 0;
/**
* @hidden
*/
export class PanelBarService {
children$;
keepContent$;
parent$;
pbId;
animate;
expandMode;
itemClick;
childSource;
keepContentSource;
parentSource;
onKeepContent(keepContent) {
this.keepContentSource.next(keepContent);
}
onSelect(event) {
this.childSource.next(event);
}
onFocus() {
this.parentSource.next(true);
}
onBlur() {
this.parentSource.next(false);
}
constructor() {
this.parentSource = new Subject();
this.keepContentSource = new BehaviorSubject(false);
this.childSource = new Subject();
this.itemClick = new Subject();
this.parent$ = this.parentSource.asObservable();
this.children$ = this.childSource.asObservable();
this.keepContent$ = this.keepContentSource.asObservable();
this.pbId = nextPanelbarId++;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PanelBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PanelBarService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PanelBarService, decorators: [{
type: Injectable
}], ctorParameters: function () { return []; } });