@netgrif/components-core
Version:
Netgrif Application engine frontend core Angular library
39 lines (38 loc) • 1.59 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { Case } from '../../resources/interface/case';
import { BehaviorSubject, Observable } from 'rxjs';
import * as i0 from "@angular/core";
/**
* Holds information about the currently selected {@link Case}.
*
* Services that handle various task operations, can use this service to take into consideration changes in frontend data in
* between backend call and backend response.
*
* This service is used by Tree Case View's {@link TreeTaskContentService}.
*/
export declare class SelectedCaseService implements OnDestroy {
/**
* Stores the currently selected {@link Case}.
*
* The initial value is `undefined`.
*
* Beware that setting new values doesn't make copies of the provided {@link Case} object,
* so it is possible that any subscriber could modify the shared object.
* Subscribed library services don't modify the provided {@link Case}, only the owner ({@link TreeTaskContentService})
* of the {@link Case} object performs modifications of it.
*/
protected _selectedCase$: BehaviorSubject<Case>;
constructor();
ngOnDestroy(): void;
get selectedCase$(): Observable<Case>;
/**
* @param selectedCase the new value, that is emitted into the underlying stream
*/
set selectedCase(selectedCase: Case);
/**
* @returns the current value of the underlying stream
*/
get selectedCase(): Case;
static ɵfac: i0.ɵɵFactoryDeclaration<SelectedCaseService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SelectedCaseService>;
}