1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 10:11:43 +02:00
Files
php-flarum/js/dist-typings/forum/ForumApplication.d.ts
flarum-bot 823c337c1e Bundled output for commit f8232b9c1b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-10-30 22:46:26 +00:00

73 lines
2.5 KiB
TypeScript

import History from './utils/History';
import Pane from './utils/Pane';
import Application from '../common/Application';
import NotificationListState from './states/NotificationListState';
import GlobalSearchState from './states/GlobalSearchState';
import DiscussionListState from './states/DiscussionListState';
import ComposerState from './states/ComposerState';
import type Notification from './components/Notification';
import type Post from './components/Post';
export default class ForumApplication extends Application {
/**
* A map of notification types to their components.
*/
notificationComponents: Record<string, typeof Notification>;
/**
* A map of post types to their components.
*/
postComponents: Record<string, typeof Post>;
/**
* An object which controls the state of the page's side pane.
*/
pane: Pane | null;
/**
* The app's history stack, which keeps track of which routes the user visits
* so that they can easily navigate back to the previous route.
*/
history: History;
/**
* An object which controls the state of the user's notifications.
*/
notifications: NotificationListState;
/**
* An object which stores previously searched queries and provides convenient
* tools for retrieving and managing search values.
*/
search: GlobalSearchState;
/**
* An object which controls the state of the composer.
*/
composer: ComposerState;
/**
* An object which controls the state of the cached discussion list, which
* is used in the index page and the slideout pane.
*/
discussions: DiscussionListState;
constructor();
/**
* @inheritdoc
*/
mount(): void;
/**
* Check whether or not the user is currently viewing a discussion.
*
* @param {Discussion} discussion
* @return {Boolean}
*/
viewingDiscussion(discussion: any): boolean;
/**
* Callback for when an external authenticator (social login) action has
* completed.
*
* If the payload indicates that the user has been logged in, then the page
* will be reloaded. Otherwise, a SignUpModal will be opened, prefilled
* with the provided details.
*
* @param {Object} payload A dictionary of attrs to pass into the sign up
* modal. A truthy `loggedIn` attr indicates that the user has logged
* in, and thus the page is reloaded.
* @public
*/
authenticationComplete(payload: any): void;
}