UNPKG

@iotize/ionic

Version:

Iotize specific building blocks on top of @ionic/angular.

47 lines (46 loc) 1.99 kB
import { ValidationErrors } from '@angular/forms'; import { ProgressState } from '@iotize/common/progress/api'; import { TapInfoCacheService, TapInfoConfigService, TapInfoDAOService, TapInfoKey, TapInfoKeyObjectOrString } from '@iotize/ionic'; import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export declare class TapConfigItemStateService { private tapInfoDAOService; private tapInfoCacheService; private tapInfoConfigService; private _pendingChanges; loading: boolean; hasPendingChanges: Observable<boolean>; validationErrorsChange: Observable<Map<TapInfoKey, { value: any; errors: ValidationErrors; }>>; validationErrorsCountChange: Observable<number>; hasValidationErrors: Observable<boolean>; /** * Value change taking into acccount the edited value. * If no editaded value for the key, it will take the lasted fetched value from the Tap * @param key * @returns */ valueChange<T>(key: TapInfoKeyObjectOrString): Observable<T>; getPendingChangeForKey<T = unknown>(key: TapInfoKeyObjectOrString): Observable<T | undefined>; get pendingChangesChange(): Observable<{ key: TapInfoKey; value: any; }[]>; private _saveProgress; get saveProgress(): Observable<ProgressState>; constructor(tapInfoDAOService: TapInfoDAOService, tapInfoCacheService: TapInfoCacheService, tapInfoConfigService: TapInfoConfigService); savePendingChanges(): Promise<void>; private _savePendingChangesWithProgress; clearPendingChanges(): void; getPendingChangesSnapshot(): { key: TapInfoKey; value: any; }[]; clearPendingChange(tapInfoKey: TapInfoKey): void; setPendingChange(info: TapInfoKey, newValue: any): void; removePendingChange(info: TapInfoKey): void; static ɵfac: i0.ɵɵFactoryDeclaration<TapConfigItemStateService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<TapConfigItemStateService>; }