UNPKG

ngx-contextual-action-bar

Version:

ngx-contextual-action-bar is an Angular2+ implementation of the [Material Design Contextual Action Bar](https://material.io/components/app-bars-top#contextual-action-bar). The implementation makes it possible to change the action bar properties (i.e. titl

45 lines (44 loc) 1.66 kB
import { EventEmitter } from '@angular/core'; import { ActionBarLayer, ActionBarLayerModel } from './model/action-bar-layer.model'; import { ActionBarLayerRegistration, ActionBarLayerToggleRegistration } from './layer-registration'; import { BehaviorSubject, Observable } from 'rxjs'; import { ComponentType } from '@angular/cdk/portal'; export declare class ContextualActionBarService { constructor(); /** * * Internal property, use at own risk. */ readonly _layers: BehaviorSubject<ActionBarLayerModel[]>; /** * Internal function used to retrieve most recent layer. * @param group - what group to target */ latest(group?: string): Observable<ActionBarLayerModel>; /** * Internal function * @param id id of layer to remove */ _removeLayer(id: string): void; /** * Internal function * @param layer - The layer to add */ _addLayer(layer: ActionBarLayerModel): void; buttonEmitter: EventEmitter<string>; actionEmitter: EventEmitter<[string, string]>; _customElement: BehaviorSubject<[string, ComponentType<any>] | undefined>; private applyMissingProperties; private validateLayer; /** * Function to register a new layer. Returns a registration * @param layerOptions */ register(layerOptions: ActionBarLayer): ActionBarLayerRegistration; /** * Use at own risk, is set to be deprecated after next major version. * @param layer * @param toggleLayer */ registerToggle(layer: ActionBarLayer, toggleLayer: ActionBarLayer): ActionBarLayerToggleRegistration; }