File

core/action-bar/action-bar.service.ts

Description

A service which defines action-bar items via the multi provider concept.

Example :
// preferred way, multi provider concept:
providers: [
  {
    provide: HOOK_ACTION_BAR,
    useValue: [{ template: SomeComponent, priority: 10, placement: 'left' } as ActionBarItem],
    multi: true
  }
]

// use services:
this.actionBarService.add({ template: SomeComponent, priority: 10, placement: 'left' });

Extends

ExtensionPointForPlugins

Index

Properties
Methods
Accessors

Methods

add
add(item: ActionBarItem)

Adds a new item to the action bar in the header and emits a state change.

Parameters :
Name Type Optional Description
item ActionBarItem No

The item to add.

Returns : void
Protected pickItemFromGroup
pickItemFromGroup(groupedItems: ActionBarItem[])
Parameters :
Name Type Optional
groupedItems ActionBarItem[] No
Returns : ActionBarItem
remove
remove(item: ActionBarItem)

Removes an action bar item from the header and emits a state change.

Parameters :
Name Type Optional Description
item ActionBarItem No

The item to remove.

Returns : void
Protected setupItemsObservable
setupItemsObservable()
refresh
refresh()

Refresh the extension factories

Returns : void
Protected emitNewState
emitNewState()

Emits a new state.

Returns : void
map
map(mappedProperty: (undefined) => void)

Maps to a property and just returns that property.

Parameters :
Name Type Optional Description
mappedProperty function No

The property to map to.

Returns : Observable<any>

Properties

factories
Type : ExtensionFactory<T>[]
Default value : []
Protected injectors
Type : Injector[]

All injectors to search for an extension.

items$
Type : Observable<T[]>
Readonly refresh$
Type : Observable<void>
Readonly state$
Default value : new BehaviorSubject<Set<T>>(new Set<T>())

Accessors

state
getstate()

Returns the current state.

Returns : Set<ActionBarItem>

results matching ""

    No results matching ""