UNPKG

1.14 kBTypeScriptView Raw
1import { OnInit, OnChanges, OnDestroy } from '@angular/core';
2/**
3<api-state [state]="conditions.state" ignore="modifying" [hover]="true" *ngIf="conditionsState$ | async as conditions">
4Transcluded content here
5</api-state>
6 */
7export interface ApiStatus {
8 loading?: boolean;
9 loaded?: boolean;
10 loadError?: any;
11 modifying?: boolean;
12 modified?: boolean;
13 modifyError?: any;
14}
15export declare class ApiStateComponent implements OnInit, OnChanges, OnDestroy {
16 /** API State */
17 state: ApiStatus;
18 /** Should the success/loading/error messages appear inline or as a toaster pop in the lower right of the screen */
19 toaster: boolean;
20 /** Should the success message be visible or not */
21 showSuccess: boolean;
22 /** Set this flag after the initial load of data */
23 initialLoadComplete: boolean;
24 /** Toggle the visibility of the success message */
25 successVisible: boolean;
26 constructor();
27 ngOnInit(): void;
28 ngOnChanges(): void;
29 /**
30 * Close the alert and clear success state
31 */
32 closeSuccess(): void;
33 ngOnDestroy(): void;
34}