/** * The IsLoading Manager object provides access to methods * that are used to indicate a need to trigger a Loading indicator... */ declare class IsLoadingManager { /** * Constructor - Not for use outside of Core! Included for reference only. */ private waitingToPutUpIndicator; private contextArray; private readonly pauseDuration; constructor(); /** * Returns the context of interest to the IsLoading indicator (ex: "app", "app/primary_5") found in the given payload * @param thePayload the Payload where the context can be found * @returns the context of interest for the given payload. Returns null if not found */ getLoadingContext(thePayload: any): string | null; /** * Notes the possible need for a loading indicator for the "context" specified in the payload * @param actionPayload the associated payload. It is assumed that this payload has a "context" * (ex: "app", "app/primary_5") that can be found and used as the target of the loading indicator * @param allowDispatch If true (default), the implementation can call dispatch actions. * If false, do not call dispatch actions (typically because this is being called in the context of a reducer where * calls to actions are not allowed) */ enableLoadingIndicator(actionPayload: any, allowDispatch?: boolean): void; /** * Start a promise that will resolve in this.pauseDuration milliseconds * @param context the context (ex: "app", "app/primary_5") for which we want to * show a loading indicator after the delay if there's still interest in it * @private */ pauseBeforeShowing: (context: string) => Promise; /** * Notes that an earlier note of a possible need for a loading indicator for the "context" specified * in the payload is no longer needed * @param actionPayload the associated payload. It is assumed that this payload has a "context" * (ex: "app", "app/primary_5") that can be found and used as the target of the loading indicator * @param allowDispatch If true (default), the implementation can call dispatch actions. * If false, do not call dispatch actions (typically because this is being called in the context of a reducer where * calls to actions are not allowed) */ disableLoadingIndicator(actionPayload: any, allowDispatch?: boolean): void; /** * Adds and/or increments a context entry to contextArray * @param context the context to be added (ex: "app", "app/primary_5") * @private */ addToContextArray: (context: string) => void; /** * Decrements a context entry to contextArray (and, if decremented to 0, remove the entry) * @param context the context to be added (ex: "app", "app/primary_5") * @private */ removeFromContextArray: (context: string) => void; } declare const IsLoadingManagerInstance: IsLoadingManager; export { IsLoadingManagerInstance };