File

core/beta-feature/beta-preview.service.ts

Extends

ExtensionPointForPlugins

Index

Properties
Methods
Accessors

Constructor

constructor(rootInjector: Injector, pluginService: PluginsResolveService)
Parameters :
Name Type Optional
rootInjector Injector No
pluginService PluginsResolveService No

Methods

getState$
getState$(key: string)

Get the state of a specific feature.

Parameters :
Name Type Optional Description
key string No

The unique key for the feature.

Returns : Observable<boolean>

Observable representing the state of the feature.

Async markAllFeaturesAsSeen
markAllFeaturesAsSeen()

Marks all features as seen by the user and updates the local storage. This assumes all features are provided via the items$ observable.

Returns : Promise<void>
Async setFeatureActiveState
setFeatureActiveState(key: string, toggleValue: boolean)

Toggle the state of a specific feature.

Parameters :
Name Type Optional Description
key string No

The unique key or label for the feature. Label is used to find the custom features.

toggleValue boolean No
Returns : Promise<void>

Promise after toggling the state.

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

hasUnseenFeatures$
Default value : combineLatest([this.items$, this.seenFeatures$]).pipe( map(([features, seen]) => features.some(feature => !seen.includes(feature.label))), distinctUntilChanged() )
items$
Type : Observable<BetaFeature[]>
Default value : this.setupItemsObservable()
reload$
Type : BehaviorSubject<boolean>
Default value : new BehaviorSubject<boolean>(false)
factories
Type : ExtensionFactory<T>[]
Default value : []
Protected injectors
Type : Injector[]

All injectors to search for an extension.

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

Accessors

state
getstate()

results matching ""

    No results matching ""