@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
68 lines • 3.68 kB
TypeScript
import { AfterViewInit, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { FormBuilder } from '@angular/forms';
import { CountdownIntervalComponent } from '@c8y/ngx-components';
import { AlarmsViewService } from './alarms-view.service';
import * as i0 from "@angular/core";
export declare class AlarmsIntervalRefreshComponent implements OnInit, AfterViewInit, OnDestroy {
private fb;
private alarmsViewService;
readonly refreshIntervalsInMilliseconds: number[];
readonly DISABLE_AUTO_REFRESH: "Disable auto refresh";
readonly ENABLE_AUTO_REFRESH: "Enable auto refresh";
readonly SECONDS_UNTIL_REFRESH: "{{ seconds }} s";
isDisabled: boolean;
/**
* Controls the loading state of the alarms list reload button.
*/
alarmsListLoading$: BehaviorSubject<boolean>;
/**
* * Set the value of `isIntervalEnabled` in response to user interactions with the alarm list scroll.
* *
* * This input setter allows you to control the `isIntervalEnabled` property, which is used to manage the state
* * of a toggle button. When a user scrolls through the alarms list, you can update the `isIntervalEnabled` value
* * using this setter.
* *
* * @param value - A boolean value representing the new state of the `isIntervalEnabled` property.
* * - `true` indicates that the interval is enabled.
* * - `false` indicates that the interval is disabled.
*/
set isIntervalToggleEnabled(value: boolean);
/**
* This getter allows you to access the current state of the `isIntervalEnabled` property, which reflects
* the state of a toggle button. It retrieves the value from the associated form control, providing the
* current state of the toggle button.
*/
get isIntervalToggleEnabled(): boolean;
/**
* Event emitter for notifying when a countdown timer has completed.
*/
onCountdownEnded: EventEmitter<void>;
countdownIntervalComponent: CountdownIntervalComponent;
toggleIntervalForm: import("@angular/forms").FormGroup<{
intervalToggle: import("@angular/forms").FormControl<boolean>;
refreshInterval: import("@angular/forms").FormControl<number>;
}>;
private destroy$;
/**
* Indicates whether the user has been interacting with the interval toggle.
* Property holds the current state of the interval toggle input element entered by the user,
* distinguishing it from changes made programmatically (e.g. value from isIntervalToggleEnabled).
*/
private doesUserCheckedIntervalToggle;
constructor(fb: FormBuilder, alarmsViewService: AlarmsViewService);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
resetCountdown(): void;
trackUserClickOnIntervalToggle(target: EventTarget): void;
getTooltip(): "Disable auto refresh" | "Enable auto refresh" | "Disabled";
private startCountdown;
private onIntervalToggleChange;
private initForm;
private listenToRefreshIntervalChange;
private listenOnLoadingChanges;
static ɵfac: i0.ɵɵFactoryDeclaration<AlarmsIntervalRefreshComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AlarmsIntervalRefreshComponent, "c8y-alarms-interval-refresh", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; "alarmsListLoading$": { "alias": "alarmsListLoading$"; "required": false; }; "isIntervalToggleEnabled": { "alias": "isIntervalToggleEnabled"; "required": false; }; }, { "onCountdownEnded": "onCountdownEnded"; }, never, never, true, never>;
}
//# sourceMappingURL=alarms-interval-refresh.component.d.ts.map