mirror of
https://github.com/flarum/core.git
synced 2025-08-10 10:24:46 +02:00
Bundled output for commit d268894e61
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
4
js/dist-typings/admin/compat.d.ts
vendored
4
js/dist-typings/admin/compat.d.ts
vendored
@@ -4,8 +4,8 @@ declare var _default: {
|
|||||||
Store: typeof import("../common/Store").default;
|
Store: typeof import("../common/Store").default;
|
||||||
'utils/BasicEditorDriver': typeof import("../common/utils/BasicEditorDriver").default;
|
'utils/BasicEditorDriver': typeof import("../common/utils/BasicEditorDriver").default;
|
||||||
'utils/evented': {
|
'utils/evented': {
|
||||||
handlers: Object;
|
handlers: Record<string, unknown>;
|
||||||
getHandlers(event: string): any[];
|
getHandlers(event: string): Function[];
|
||||||
trigger(event: string, ...args: any[]): void;
|
trigger(event: string, ...args: any[]): void;
|
||||||
on(event: string, handler: Function): void;
|
on(event: string, handler: Function): void;
|
||||||
one(event: string, handler: Function): void;
|
one(event: string, handler: Function): void;
|
||||||
|
@@ -5,9 +5,9 @@ export default class AdminNav extends Component<import("../../common/Component")
|
|||||||
/**
|
/**
|
||||||
* Build an item list of main links to show in the admin navigation.
|
* Build an item list of main links to show in the admin navigation.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
extensionItems(): ItemList<any>;
|
extensionItems(): ItemList<any>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
|
@@ -7,10 +7,12 @@ export default class BasicsPage extends AdminPage<import("../../common/component
|
|||||||
* Build a list of options for the default homepage. Each option must be an
|
* Build a list of options for the default homepage. Each option must be an
|
||||||
* object with `path` and `label` properties.
|
* object with `path` and `label` properties.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<{ path: string, label: import('mithril').Children }>}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public homePageItems(): ItemList<any>;
|
homePageItems(): ItemList<{
|
||||||
|
path: string;
|
||||||
|
label: import('mithril').Children;
|
||||||
|
}>;
|
||||||
}
|
}
|
||||||
import AdminPage from "./AdminPage";
|
import AdminPage from "./AdminPage";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -3,14 +3,14 @@ export default class DashboardWidget extends Component<import("../../common/Comp
|
|||||||
/**
|
/**
|
||||||
* Get the class name to apply to the widget.
|
* Get the class name to apply to the widget.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
className(): string;
|
className(): string;
|
||||||
/**
|
/**
|
||||||
* Get the content of the widget.
|
* Get the content of the widget.
|
||||||
*
|
*
|
||||||
* @return {VirtualElement}
|
* @return {import('mithril').Children}
|
||||||
*/
|
*/
|
||||||
content(): any;
|
content(): import('mithril').Children;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
|
@@ -8,9 +8,9 @@ export default class HeaderPrimary extends Component<import("../../common/Compon
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the controls.
|
* Build an item list for the controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -6,9 +6,9 @@ export default class HeaderSecondary extends Component<import("../../common/Comp
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the controls.
|
* Build an item list for the controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -13,16 +13,16 @@ export default class UploadImageButton extends Button<import("../../common/compo
|
|||||||
/**
|
/**
|
||||||
* After a successful upload/removal, reload the page.
|
* After a successful upload/removal, reload the page.
|
||||||
*
|
*
|
||||||
* @param {Object} response
|
* @param {object} response
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected success(response: Object): void;
|
protected success(response: object): void;
|
||||||
/**
|
/**
|
||||||
* If upload/removal fails, stop loading.
|
* If upload/removal fails, stop loading.
|
||||||
*
|
*
|
||||||
* @param {Object} response
|
* @param {object} response
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected failure(response: Object): void;
|
protected failure(response: object): void;
|
||||||
}
|
}
|
||||||
import Button from "../../common/components/Button";
|
import Button from "../../common/components/Button";
|
||||||
|
3
js/dist-typings/common/Application.d.ts
vendored
3
js/dist-typings/common/Application.d.ts
vendored
@@ -215,9 +215,6 @@ export default class Application {
|
|||||||
* Make an AJAX request, handling any low-level errors that may occur.
|
* Make an AJAX request, handling any low-level errors that may occur.
|
||||||
*
|
*
|
||||||
* @see https://mithril.js.org/request.html
|
* @see https://mithril.js.org/request.html
|
||||||
*
|
|
||||||
* @param options
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
*/
|
||||||
request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType>;
|
request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType>;
|
||||||
/**
|
/**
|
||||||
|
4
js/dist-typings/common/Fragment.d.ts
vendored
4
js/dist-typings/common/Fragment.d.ts
vendored
@@ -28,8 +28,8 @@ export default abstract class Fragment {
|
|||||||
* containing all of the `li` elements inside the DOM element of this
|
* containing all of the `li` elements inside the DOM element of this
|
||||||
* fragment.
|
* fragment.
|
||||||
*
|
*
|
||||||
* @param {String} [selector] a jQuery-compatible selector string
|
* @param [selector] a jQuery-compatible selector string
|
||||||
* @returns {jQuery} the jQuery object for the DOM node
|
* @returns the jQuery object for the DOM node
|
||||||
* @final
|
* @final
|
||||||
*/
|
*/
|
||||||
$(selector?: string): JQuery;
|
$(selector?: string): JQuery;
|
||||||
|
4
js/dist-typings/common/compat.d.ts
vendored
4
js/dist-typings/common/compat.d.ts
vendored
@@ -4,8 +4,8 @@ declare var _default: {
|
|||||||
Store: typeof Store;
|
Store: typeof Store;
|
||||||
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
||||||
'utils/evented': {
|
'utils/evented': {
|
||||||
handlers: Object;
|
handlers: Record<string, unknown>;
|
||||||
getHandlers(event: string): any[];
|
getHandlers(event: string): Function[];
|
||||||
trigger(event: string, ...args: any[]): void;
|
trigger(event: string, ...args: any[]): void;
|
||||||
on(event: string, handler: Function): void;
|
on(event: string, handler: Function): void;
|
||||||
one(event: string, handler: Function): void;
|
one(event: string, handler: Function): void;
|
||||||
|
@@ -15,14 +15,14 @@ export default class Checkbox extends Component<import("../Component").Component
|
|||||||
/**
|
/**
|
||||||
* Get the template for the checkbox's display (tick/cross icon).
|
* Get the template for the checkbox's display (tick/cross icon).
|
||||||
*
|
*
|
||||||
* @return {*}
|
* @return {import('mithril').Children}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getDisplay(): any;
|
protected getDisplay(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Run a callback when the state of the checkbox is changed.
|
* Run a callback when the state of the checkbox is changed.
|
||||||
*
|
*
|
||||||
* @param {Boolean} checked
|
* @param {boolean} checked
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected onchange(checked: boolean): void;
|
protected onchange(checked: boolean): void;
|
||||||
|
@@ -22,17 +22,17 @@ export default class Dropdown extends Component<import("../Component").Component
|
|||||||
/**
|
/**
|
||||||
* Get the template for the button.
|
* Get the template for the button.
|
||||||
*
|
*
|
||||||
* @return {*}
|
* @return {import('mithril').Children}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getButton(children: any): any;
|
protected getButton(children: any): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Get the template for the button's content.
|
* Get the template for the button's content.
|
||||||
*
|
*
|
||||||
* @return {*}
|
* @return {import('mithril').Children}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getButtonContent(children: any): any;
|
protected getButtonContent(children: any): import('mithril').Children;
|
||||||
getMenu(items: any): JSX.Element;
|
getMenu(items: any): JSX.Element;
|
||||||
}
|
}
|
||||||
import Component from "../Component";
|
import Component from "../Component";
|
||||||
|
@@ -16,10 +16,10 @@ export default class LinkButton extends Button<import("./Button").IButtonAttrs>
|
|||||||
/**
|
/**
|
||||||
* Determine whether a component with the given attrs is 'active'.
|
* Determine whether a component with the given attrs is 'active'.
|
||||||
*
|
*
|
||||||
* @param {Object} attrs
|
* @param {object} attrs
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
static isActive(attrs: Object): boolean;
|
static isActive(attrs: object): boolean;
|
||||||
constructor();
|
constructor();
|
||||||
}
|
}
|
||||||
import Button from "./Button";
|
import Button from "./Button";
|
||||||
|
@@ -18,23 +18,23 @@ export default class Navigation extends Component<import("../Component").Compone
|
|||||||
/**
|
/**
|
||||||
* Get the back button.
|
* Get the back button.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {import('mithril').Children}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getBackButton(): Object;
|
protected getBackButton(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Get the pane pinned toggle button.
|
* Get the pane pinned toggle button.
|
||||||
*
|
*
|
||||||
* @return {Object|String}
|
* @return {import('mithril').Children}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getPaneButton(): Object | string;
|
protected getPaneButton(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Get the drawer toggle button.
|
* Get the drawer toggle button.
|
||||||
*
|
*
|
||||||
* @return {Object|String}
|
* @return {import('mithril').Children}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getDrawerButton(): Object | string;
|
protected getDrawerButton(): import('mithril').Children;
|
||||||
}
|
}
|
||||||
import Component from "../Component";
|
import Component from "../Component";
|
||||||
|
@@ -7,9 +7,10 @@ export default class SplitDropdown extends Dropdown {
|
|||||||
* Get the first child. If the first child is an array, the first item in that
|
* Get the first child. If the first child is an array, the first item in that
|
||||||
* array will be returned.
|
* array will be returned.
|
||||||
*
|
*
|
||||||
* @return {*}
|
* @param {unknown[] | unknown} children
|
||||||
|
* @return {unknown}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getFirstChild(children: any): any;
|
protected getFirstChild(children: unknown[] | unknown): unknown;
|
||||||
}
|
}
|
||||||
import Dropdown from "./Dropdown";
|
import Dropdown from "./Dropdown";
|
||||||
|
@@ -36,19 +36,19 @@ export default class TextEditor extends Component<import("../Component").Compone
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the text editor controls.
|
* Build an item list for the text editor controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
controlItems(): ItemList<any>;
|
controlItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the toolbar controls.
|
* Build an item list for the toolbar controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
toolbarItems(): ItemList<any>;
|
toolbarItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Handle input into the textarea.
|
* Handle input into the textarea.
|
||||||
*
|
*
|
||||||
* @param {String} value
|
* @param {string} value
|
||||||
*/
|
*/
|
||||||
oninput(value: string): void;
|
oninput(value: string): void;
|
||||||
/**
|
/**
|
||||||
|
4
js/dist-typings/common/extend.d.ts
vendored
4
js/dist-typings/common/extend.d.ts
vendored
@@ -23,7 +23,7 @@
|
|||||||
* @param methods The name or names of the method(s) to extend
|
* @param methods The name or names of the method(s) to extend
|
||||||
* @param callback A callback which mutates the method's output
|
* @param callback A callback which mutates the method's output
|
||||||
*/
|
*/
|
||||||
export declare function extend<T extends object, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void): void;
|
export declare function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void): void;
|
||||||
/**
|
/**
|
||||||
* Override an object's method by replacing it with a new function, so that the
|
* Override an object's method by replacing it with a new function, so that the
|
||||||
* new function will be run every time the object's method is called.
|
* new function will be run every time the object's method is called.
|
||||||
@@ -51,4 +51,4 @@ export declare function extend<T extends object, K extends KeyOfType<T, Function
|
|||||||
* @param methods The name or names of the method(s) to override
|
* @param methods The name or names of the method(s) to override
|
||||||
* @param newMethod The method to replace it with
|
* @param newMethod The method to replace it with
|
||||||
*/
|
*/
|
||||||
export declare function override<T extends object, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void): void;
|
export declare function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void): void;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion
|
* punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param {Array} items
|
* @param {import('mithril').Children[]} items
|
||||||
* @return {VirtualElement}
|
* @return {import('mithril').Children}')}
|
||||||
*/
|
*/
|
||||||
export default function punctuateSeries(items: any[]): any;
|
export default function punctuateSeries(items: import('mithril').Children[]): import('mithril').Children;
|
||||||
|
@@ -20,7 +20,7 @@ export default class AlertManagerState {
|
|||||||
/**
|
/**
|
||||||
* Show an Alert in the alerts area.
|
* Show an Alert in the alerts area.
|
||||||
*
|
*
|
||||||
* @returns The alert's ID, which can be used to dismiss the alert.
|
* @return The alert's ID, which can be used to dismiss the alert.
|
||||||
*/
|
*/
|
||||||
show(children: Mithril.Children): AlertIdentifier;
|
show(children: Mithril.Children): AlertIdentifier;
|
||||||
show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;
|
show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;
|
||||||
|
@@ -45,7 +45,7 @@ export default class ModalManagerState {
|
|||||||
/**
|
/**
|
||||||
* Checks if a modal is currently open.
|
* Checks if a modal is currently open.
|
||||||
*
|
*
|
||||||
* @returns `true` if a modal dialog is currently open, otherwise `false`.
|
* @return `true` if a modal dialog is currently open, otherwise `false`.
|
||||||
*/
|
*/
|
||||||
isModalOpen(): boolean;
|
isModalOpen(): boolean;
|
||||||
}
|
}
|
||||||
|
7
js/dist-typings/common/states/PageState.d.ts
vendored
7
js/dist-typings/common/states/PageState.d.ts
vendored
@@ -5,12 +5,11 @@ export default class PageState {
|
|||||||
/**
|
/**
|
||||||
* Determine whether the page matches the given class and data.
|
* Determine whether the page matches the given class and data.
|
||||||
*
|
*
|
||||||
* @param {object} type The page class to check against. Subclasses are
|
* @param {object} type The page class to check against. Subclasses are accepted as well.
|
||||||
* accepted as well.
|
* @param {Record<string, unknown>} data
|
||||||
* @param {object} data
|
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
matches(type: object, data?: object): boolean;
|
matches(type: object, data?: Record<string, unknown>): boolean;
|
||||||
get(key: any): any;
|
get(key: any): any;
|
||||||
set(key: any, value: any): void;
|
set(key: any, value: any): void;
|
||||||
}
|
}
|
||||||
|
11
js/dist-typings/common/utils/Drawer.d.ts
vendored
11
js/dist-typings/common/utils/Drawer.d.ts
vendored
@@ -34,20 +34,15 @@ export default class Drawer {
|
|||||||
* Check whether or not the drawer is currently open.
|
* Check whether or not the drawer is currently open.
|
||||||
*
|
*
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public isOpen(): boolean;
|
isOpen(): boolean;
|
||||||
/**
|
/**
|
||||||
* Hide the drawer.
|
* Hide the drawer.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public hide(): void;
|
hide(): void;
|
||||||
/**
|
/**
|
||||||
* Show the drawer.
|
* Show the drawer.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public show(): void;
|
show(): void;
|
||||||
$backdrop: JQuery<HTMLElement> | undefined;
|
$backdrop: JQuery<HTMLElement> | undefined;
|
||||||
}
|
}
|
||||||
|
2
js/dist-typings/common/utils/ItemList.d.ts
vendored
2
js/dist-typings/common/utils/ItemList.d.ts
vendored
@@ -192,7 +192,7 @@ export default class ItemList<T> {
|
|||||||
*
|
*
|
||||||
* @param content The item's content (objects only)
|
* @param content The item's content (objects only)
|
||||||
* @param key The item's key
|
* @param key The item's key
|
||||||
* @returns Proxied content
|
* @return Proxied content
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
13
js/dist-typings/common/utils/ScrollListener.d.ts
vendored
13
js/dist-typings/common/utils/ScrollListener.d.ts
vendored
@@ -6,7 +6,6 @@ export default class ScrollListener {
|
|||||||
/**
|
/**
|
||||||
* @param {(top: number) => void} callback The callback to run when the scroll position
|
* @param {(top: number) => void} callback The callback to run when the scroll position
|
||||||
* changes.
|
* changes.
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
constructor(callback: (top: number) => void);
|
constructor(callback: (top: number) => void);
|
||||||
callback: (top: number) => void;
|
callback: (top: number) => void;
|
||||||
@@ -20,21 +19,15 @@ export default class ScrollListener {
|
|||||||
protected loop(): void;
|
protected loop(): void;
|
||||||
/**
|
/**
|
||||||
* Run the callback, whether there was a scroll event or not.
|
* Run the callback, whether there was a scroll event or not.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public update(): void;
|
update(): void;
|
||||||
/**
|
/**
|
||||||
* Start listening to and handling the window's scroll position.
|
* Start listening to and handling the window's scroll position.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public start(): void;
|
start(): void;
|
||||||
active: (() => void) | null | undefined;
|
active: (() => void) | null | undefined;
|
||||||
/**
|
/**
|
||||||
* Stop listening to and handling the window's scroll position.
|
* Stop listening to and handling the window's scroll position.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public stop(): void;
|
stop(): void;
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
* position can be anchor to an element that is in or below the viewport, so
|
* position can be anchor to an element that is in or below the viewport, so
|
||||||
* the content in the viewport will stay the same.
|
* the content in the viewport will stay the same.
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element The element to anchor the scroll position to.
|
* @param {HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.
|
||||||
* @param {Function} callback The callback to run that will change page content.
|
* @param {() => void} callback The callback to run that will change page content.
|
||||||
*/
|
*/
|
||||||
export default function anchorScroll(element: any, callback: Function): void;
|
export default function anchorScroll(element: HTMLElement | SVGElement | Element, callback: () => void): void;
|
||||||
|
5
js/dist-typings/common/utils/computed.d.ts
vendored
5
js/dist-typings/common/utils/computed.d.ts
vendored
@@ -3,9 +3,8 @@ import Model from '../Model';
|
|||||||
* The `computed` utility creates a function that will cache its output until
|
* The `computed` utility creates a function that will cache its output until
|
||||||
* any of the dependent values are dirty.
|
* any of the dependent values are dirty.
|
||||||
*
|
*
|
||||||
* @param {...String} dependentKeys The keys of the dependent values.
|
* @param dependentKeys The keys of the dependent values.
|
||||||
* @param {function} compute The function which computes the value using the
|
* @param compute The function which computes the value using the
|
||||||
* dependent values.
|
* dependent values.
|
||||||
* @return {Function}
|
|
||||||
*/
|
*/
|
||||||
export default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T;
|
export default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T;
|
||||||
|
68
js/dist-typings/common/utils/evented.d.ts
vendored
68
js/dist-typings/common/utils/evented.d.ts
vendored
@@ -1,79 +1,97 @@
|
|||||||
declare namespace _default {
|
declare namespace _default {
|
||||||
const handlers: Object;
|
const handlers: Record<string, unknown>;
|
||||||
/**
|
/**
|
||||||
* Get all of the registered handlers for an event.
|
* Get all of the registered handlers for an event.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @return {Array}
|
* @return {Function[]}
|
||||||
* @protected
|
* @protected
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function getHandlers(event: string): any[];
|
function getHandlers(event: string): Function[];
|
||||||
/**
|
/**
|
||||||
* Get all of the registered handlers for an event.
|
* Get all of the registered handlers for an event.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @return {Array}
|
* @return {Function[]}
|
||||||
* @protected
|
* @protected
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function getHandlers(event: string): any[];
|
function getHandlers(event: string): Function[];
|
||||||
/**
|
/**
|
||||||
* Trigger an event.
|
* Trigger an event.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {...*} args Arguments to pass to event handlers.
|
* @param {any[]} args Arguments to pass to event handlers.
|
||||||
* @public
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function trigger(event: string, ...args: any[]): void;
|
function trigger(event: string, ...args: any[]): void;
|
||||||
/**
|
/**
|
||||||
* Trigger an event.
|
* Trigger an event.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {...*} args Arguments to pass to event handlers.
|
* @param {any[]} args Arguments to pass to event handlers.
|
||||||
* @public
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function trigger(event: string, ...args: any[]): void;
|
function trigger(event: string, ...args: any[]): void;
|
||||||
/**
|
/**
|
||||||
* Register an event handler.
|
* Register an event handler.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {function} handler The function to handle the event.
|
* @param {Function} handler The function to handle the event.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function on(event: string, handler: Function): void;
|
function on(event: string, handler: Function): void;
|
||||||
/**
|
/**
|
||||||
* Register an event handler.
|
* Register an event handler.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {function} handler The function to handle the event.
|
* @param {Function} handler The function to handle the event.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function on(event: string, handler: Function): void;
|
function on(event: string, handler: Function): void;
|
||||||
/**
|
/**
|
||||||
* Register an event handler so that it will run only once, and then
|
* Register an event handler so that it will run only once, and then
|
||||||
* unregister itself.
|
* unregister itself.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {function} handler The function to handle the event.
|
* @param {Function} handler The function to handle the event.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function one(event: string, handler: Function): void;
|
function one(event: string, handler: Function): void;
|
||||||
/**
|
/**
|
||||||
* Register an event handler so that it will run only once, and then
|
* Register an event handler so that it will run only once, and then
|
||||||
* unregister itself.
|
* unregister itself.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {function} handler The function to handle the event.
|
* @param {Function} handler The function to handle the event.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function one(event: string, handler: Function): void;
|
function one(event: string, handler: Function): void;
|
||||||
/**
|
/**
|
||||||
* Unregister an event handler.
|
* Unregister an event handler.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {function} handler The function that handles the event.
|
* @param {Function} handler The function that handles the event.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function off(event: string, handler: Function): void;
|
function off(event: string, handler: Function): void;
|
||||||
/**
|
/**
|
||||||
* Unregister an event handler.
|
* Unregister an event handler.
|
||||||
*
|
*
|
||||||
* @param {String} event The name of the event.
|
* @param {string} event The name of the event.
|
||||||
* @param {function} handler The function that handles the event.
|
* @param {Function} handler The function that handles the event.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function off(event: string, handler: Function): void;
|
function off(event: string, handler: Function): void;
|
||||||
}
|
}
|
||||||
|
8
js/dist-typings/common/utils/mixin.d.ts
vendored
8
js/dist-typings/common/utils/mixin.d.ts
vendored
@@ -5,8 +5,8 @@
|
|||||||
* @example
|
* @example
|
||||||
* class MyClass extends mixin(ExistingClass, evented, etc) {}
|
* class MyClass extends mixin(ExistingClass, evented, etc) {}
|
||||||
*
|
*
|
||||||
* @param {Class} Parent The class to extend the new class from.
|
* @param {object} Parent The class to extend the new class from.
|
||||||
* @param {...Object} mixins The objects to mix in.
|
* @param {Record<string, any>[]} mixins The objects to mix in.
|
||||||
* @return {Class} A new class that extends Parent and contains the mixins.
|
* @return {object} A new class that extends Parent and contains the mixins.
|
||||||
*/
|
*/
|
||||||
export default function mixin(Parent: any, ...mixins: Object[]): any;
|
export default function mixin(Parent: object, ...mixins: Record<string, any>[]): object;
|
||||||
|
52
js/dist-typings/forum/compat.d.ts
vendored
52
js/dist-typings/forum/compat.d.ts
vendored
@@ -4,8 +4,8 @@ declare var _default: {
|
|||||||
Store: typeof import("../common/Store").default;
|
Store: typeof import("../common/Store").default;
|
||||||
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
||||||
'utils/evented': {
|
'utils/evented': {
|
||||||
handlers: Object;
|
handlers: Record<string, unknown>;
|
||||||
getHandlers(event: string): any[];
|
getHandlers(event: string): Function[];
|
||||||
trigger(event: string, ...args: any[]): void;
|
trigger(event: string, ...args: any[]): void;
|
||||||
on(event: string, handler: Function): void;
|
on(event: string, handler: Function): void;
|
||||||
one(event: string, handler: Function): void;
|
one(event: string, handler: Function): void;
|
||||||
@@ -92,38 +92,38 @@ declare var _default: {
|
|||||||
'states/PaginatedListState': typeof import("../common/states/PaginatedListState").default;
|
'states/PaginatedListState': typeof import("../common/states/PaginatedListState").default;
|
||||||
} & {
|
} & {
|
||||||
'utils/PostControls': {
|
'utils/PostControls': {
|
||||||
controls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
controls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
userControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
userControls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
moderationControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
moderationControls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
destructiveControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
destructiveControls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
editAction(): Promise<any>;
|
editAction(): Promise<void>;
|
||||||
hideAction(): Promise<any>;
|
hideAction(): Promise<void>;
|
||||||
restoreAction(): Promise<any>;
|
restoreAction(): Promise<void>;
|
||||||
deleteAction(context: any): Promise<any>;
|
deleteAction(context: any): Promise<void>;
|
||||||
};
|
};
|
||||||
'utils/KeyboardNavigatable': typeof KeyboardNavigatable;
|
'utils/KeyboardNavigatable': typeof KeyboardNavigatable;
|
||||||
'utils/slidable': typeof slidable;
|
'utils/slidable': typeof slidable;
|
||||||
'utils/History': typeof History;
|
'utils/History': typeof History;
|
||||||
'utils/DiscussionControls': {
|
'utils/DiscussionControls': {
|
||||||
controls(discussion: any, context: any): import("../common/utils/ItemList").default<any>;
|
controls(discussion: import("../common/models/Discussion").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
userControls(discussion: any, context: any): import("../common/utils/ItemList").default<any>;
|
userControls(discussion: import("../common/models/Discussion").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
moderationControls(discussion: any): import("../common/utils/ItemList").default<any>;
|
moderationControls(discussion: import("../common/models/Discussion").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
destructiveControls(discussion: any): import("../common/utils/ItemList").default<any>;
|
destructiveControls(discussion: import("../common/models/Discussion").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||||
hideAction(): Promise<any>;
|
hideAction(): Promise<void>;
|
||||||
restoreAction(): Promise<any>;
|
restoreAction(): Promise<void>;
|
||||||
deleteAction(): Promise<any>;
|
deleteAction(): Promise<void>;
|
||||||
renameAction(): Promise<any>;
|
renameAction(): any;
|
||||||
};
|
};
|
||||||
'utils/alertEmailConfirmation': typeof alertEmailConfirmation;
|
'utils/alertEmailConfirmation': typeof alertEmailConfirmation;
|
||||||
'utils/UserControls': {
|
'utils/UserControls': {
|
||||||
controls(user: any, context: any): import("../common/utils/ItemList").default<any>;
|
controls(user: import("../common/models/User").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
userControls(): import("../common/utils/ItemList").default<any>;
|
userControls(): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
moderationControls(user: any): import("../common/utils/ItemList").default<any>;
|
moderationControls(user: import("../common/models/User").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
destructiveControls(user: any): import("../common/utils/ItemList").default<any>;
|
destructiveControls(user: import("../common/models/User").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||||
deleteAction(user: any): void;
|
deleteAction(user: import("../common/models/User").default): void;
|
||||||
showDeletionAlert(user: any, type: string): void;
|
showDeletionAlert(user: import("../common/models/User").default, type: string): void;
|
||||||
editAction(user: any): void;
|
editAction(user: import("../common/models/User").default): void;
|
||||||
};
|
};
|
||||||
'utils/Pane': typeof Pane;
|
'utils/Pane': typeof Pane;
|
||||||
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
||||||
|
@@ -24,36 +24,36 @@ export default class AvatarEditor extends Component<import("../../common/Compone
|
|||||||
/**
|
/**
|
||||||
* Get the items in the edit avatar dropdown menu.
|
* Get the items in the edit avatar dropdown menu.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
controlItems(): ItemList<any>;
|
controlItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Enable dragover style
|
* Enable dragover style
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {DragEvent} e
|
||||||
*/
|
*/
|
||||||
enableDragover(e: Event): void;
|
enableDragover(e: DragEvent): void;
|
||||||
/**
|
/**
|
||||||
* Disable dragover style
|
* Disable dragover style
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {DragEvent} e
|
||||||
*/
|
*/
|
||||||
disableDragover(e: Event): void;
|
disableDragover(e: DragEvent): void;
|
||||||
/**
|
/**
|
||||||
* Upload avatar when file is dropped into dropzone.
|
* Upload avatar when file is dropped into dropzone.
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {DragEvent} e
|
||||||
*/
|
*/
|
||||||
dropUpload(e: Event): void;
|
dropUpload(e: DragEvent): void;
|
||||||
/**
|
/**
|
||||||
* If the user doesn't have an avatar, there's no point in showing the
|
* If the user doesn't have an avatar, there's no point in showing the
|
||||||
* controls dropdown, because only one option would be viable: uploading.
|
* controls dropdown, because only one option would be viable: uploading.
|
||||||
* Thus, when the avatar editor's dropdown toggle button is clicked, we prompt
|
* Thus, when the avatar editor's dropdown toggle button is clicked, we prompt
|
||||||
* the user to upload an avatar immediately.
|
* the user to upload an avatar immediately.
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {MouseEvent} e
|
||||||
*/
|
*/
|
||||||
quickUpload(e: Event): void;
|
quickUpload(e: MouseEvent): void;
|
||||||
/**
|
/**
|
||||||
* Upload avatar using file picker
|
* Upload avatar using file picker
|
||||||
*/
|
*/
|
||||||
@@ -72,17 +72,17 @@ export default class AvatarEditor extends Component<import("../../common/Compone
|
|||||||
* After a successful upload/removal, push the updated user data into the
|
* After a successful upload/removal, push the updated user data into the
|
||||||
* store, and force a recomputation of the user's avatar color.
|
* store, and force a recomputation of the user's avatar color.
|
||||||
*
|
*
|
||||||
* @param {Object} response
|
* @param {object} response
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected success(response: Object): void;
|
protected success(response: object): void;
|
||||||
/**
|
/**
|
||||||
* If avatar upload/removal fails, stop loading.
|
* If avatar upload/removal fails, stop loading.
|
||||||
*
|
*
|
||||||
* @param {Object} response
|
* @param {object} response
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected failure(response: Object): void;
|
protected failure(response: object): void;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -32,9 +32,9 @@ export default class CommentPost extends Post {
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the post's header.
|
* Build an item list for the post's header.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
headerItems(): ItemList<any>;
|
headerItems(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Post from "./Post";
|
import Post from "./Post";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
16
js/dist-typings/forum/components/Composer.d.ts
vendored
16
js/dist-typings/forum/components/Composer.d.ts
vendored
@@ -21,9 +21,9 @@ export default class Composer extends Component<import("../../common/Component")
|
|||||||
/**
|
/**
|
||||||
* Resize the composer according to mouse movement.
|
* Resize the composer according to mouse movement.
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {MouseEvent} e
|
||||||
*/
|
*/
|
||||||
onmousemove(e: Event): void;
|
onmousemove(e: MouseEvent): void;
|
||||||
/**
|
/**
|
||||||
* Finish resizing the composer when the mouse is released.
|
* Finish resizing the composer when the mouse is released.
|
||||||
*/
|
*/
|
||||||
@@ -83,23 +83,23 @@ export default class Composer extends Component<import("../../common/Component")
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the composer's controls.
|
* Build an item list for the composer's controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
controlItems(): ItemList<any>;
|
controlItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Initialize default Composer height.
|
* Initialize default Composer height.
|
||||||
*/
|
*/
|
||||||
initializeHeight(): void;
|
initializeHeight(): void;
|
||||||
/**
|
/**
|
||||||
* Default height of the Composer in case none is saved.
|
* Default height of the Composer in case none is saved.
|
||||||
* @returns {Integer}
|
* @returns {number}
|
||||||
*/
|
*/
|
||||||
defaultHeight(): any;
|
defaultHeight(): number;
|
||||||
/**
|
/**
|
||||||
* Save a new Composer height and update the DOM.
|
* Save a new Composer height and update the DOM.
|
||||||
* @param {Integer} height
|
* @param {number} height
|
||||||
*/
|
*/
|
||||||
changeHeight(height: any): void;
|
changeHeight(height: number): void;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -27,15 +27,15 @@ export default class ComposerBody extends Component<import("../../common/Compone
|
|||||||
/**
|
/**
|
||||||
* Check if there is any unsaved data.
|
* Check if there is any unsaved data.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
hasChanges(): string;
|
hasChanges(): boolean;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the composer's header.
|
* Build an item list for the composer's header.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
headerItems(): ItemList<any>;
|
headerItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Handle the submit event of the text editor.
|
* Handle the submit event of the text editor.
|
||||||
*
|
*
|
||||||
|
@@ -21,14 +21,14 @@ export default class DiscussionComposer extends ComposerBody {
|
|||||||
* Handle the title input's keydown event. When the return key is pressed,
|
* Handle the title input's keydown event. When the return key is pressed,
|
||||||
* move the focus to the start of the text editor.
|
* move the focus to the start of the text editor.
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {KeyboardEvent} e
|
||||||
*/
|
*/
|
||||||
onkeydown(e: Event): void;
|
onkeydown(e: KeyboardEvent): void;
|
||||||
/**
|
/**
|
||||||
* Get the data to submit to the server when the discussion is saved.
|
* Get the data to submit to the server when the discussion is saved.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Record<string, unknown>}
|
||||||
*/
|
*/
|
||||||
data(): Object;
|
data(): Record<string, unknown>;
|
||||||
}
|
}
|
||||||
import ComposerBody from "./ComposerBody";
|
import ComposerBody from "./ComposerBody";
|
||||||
|
@@ -10,9 +10,9 @@ export default class DiscussionHero extends Component<import("../../common/Compo
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the contents of the discussion hero.
|
* Build an item list for the contents of the discussion hero.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -23,7 +23,7 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
|||||||
/**
|
/**
|
||||||
* Determine whether or not the discussion is currently being viewed.
|
* Determine whether or not the discussion is currently being viewed.
|
||||||
*
|
*
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
active(): boolean;
|
active(): boolean;
|
||||||
/**
|
/**
|
||||||
@@ -31,14 +31,14 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
|||||||
* should be displayed instead of information about the most recent reply to
|
* should be displayed instead of information about the most recent reply to
|
||||||
* the discussion.
|
* the discussion.
|
||||||
*
|
*
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
showFirstPost(): boolean;
|
showFirstPost(): boolean;
|
||||||
/**
|
/**
|
||||||
* Determine whether or not the number of replies should be shown instead of
|
* Determine whether or not the number of replies should be shown instead of
|
||||||
* the number of unread posts.
|
* the number of unread posts.
|
||||||
*
|
*
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
showRepliesCount(): boolean;
|
showRepliesCount(): boolean;
|
||||||
/**
|
/**
|
||||||
@@ -49,9 +49,9 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
|||||||
* Build an item list of info for a discussion listing. By default this is
|
* Build an item list of info for a discussion listing. By default this is
|
||||||
* just the first/last post indicator.
|
* just the first/last post indicator.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
infoItems(): ItemList<any>;
|
infoItems(): ItemList<import('mithril').Children>;
|
||||||
replyCountItem(): JSX.Element;
|
replyCountItem(): JSX.Element;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
|
@@ -31,34 +31,24 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||||||
view(): JSX.Element;
|
view(): JSX.Element;
|
||||||
/**
|
/**
|
||||||
* List of components shown while the discussion is loading.
|
* List of components shown while the discussion is loading.
|
||||||
*
|
|
||||||
* @returns {ItemList}
|
|
||||||
*/
|
*/
|
||||||
loadingItems(): ItemList<unknown>;
|
loadingItems(): ItemList<Mithril.Children>;
|
||||||
/**
|
/**
|
||||||
* Function that renders the `sidebarItems` ItemList.
|
* Function that renders the `sidebarItems` ItemList.
|
||||||
*
|
|
||||||
* @returns {import('mithril').Children}
|
|
||||||
*/
|
*/
|
||||||
sidebar(): JSX.Element;
|
sidebar(): Mithril.Children;
|
||||||
/**
|
/**
|
||||||
* Renders the discussion's hero.
|
* Renders the discussion's hero.
|
||||||
*
|
|
||||||
* @returns {import('mithril').Children}
|
|
||||||
*/
|
*/
|
||||||
hero(): JSX.Element;
|
hero(): Mithril.Children;
|
||||||
/**
|
/**
|
||||||
* List of items rendered as the main page content.
|
* List of items rendered as the main page content.
|
||||||
*
|
|
||||||
* @returns {ItemList}
|
|
||||||
*/
|
*/
|
||||||
pageContent(): ItemList<unknown>;
|
pageContent(): ItemList<Mithril.Children>;
|
||||||
/**
|
/**
|
||||||
* List of items rendered inside the main page content container.
|
* List of items rendered inside the main page content container.
|
||||||
*
|
|
||||||
* @returns {ItemList}
|
|
||||||
*/
|
*/
|
||||||
mainContent(): ItemList<unknown>;
|
mainContent(): ItemList<Mithril.Children>;
|
||||||
/**
|
/**
|
||||||
* Load the discussion from the API or use the preloaded one.
|
* Load the discussion from the API or use the preloaded one.
|
||||||
*/
|
*/
|
||||||
@@ -66,15 +56,8 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||||||
/**
|
/**
|
||||||
* Get the parameters that should be passed in the API request to get the
|
* Get the parameters that should be passed in the API request to get the
|
||||||
* discussion.
|
* discussion.
|
||||||
*
|
|
||||||
* @return {Object}
|
|
||||||
*/
|
*/
|
||||||
requestParams(): {
|
requestParams(): Record<string, unknown>;
|
||||||
bySlug: boolean;
|
|
||||||
page: {
|
|
||||||
near: number;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* Initialize the component to display the given discussion.
|
* Initialize the component to display the given discussion.
|
||||||
*/
|
*/
|
||||||
@@ -82,7 +65,7 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the contents of the sidebar.
|
* Build an item list for the contents of the sidebar.
|
||||||
*/
|
*/
|
||||||
sidebarItems(): ItemList<Mithril.Vnode<{}, {}>>;
|
sidebarItems(): ItemList<Mithril.Children>;
|
||||||
/**
|
/**
|
||||||
* When the posts that are visible in the post stream change (i.e. the user
|
* When the posts that are visible in the post stream change (i.e. the user
|
||||||
* scrolls up or down), then we update the URL and mark the posts as read.
|
* scrolls up or down), then we update the URL and mark the posts as read.
|
||||||
|
@@ -17,8 +17,8 @@ export default class EditPostComposer extends ComposerBody {
|
|||||||
/**
|
/**
|
||||||
* Get the data to submit to the server when the post is saved.
|
* Get the data to submit to the server when the post is saved.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Record<string, unknown>}
|
||||||
*/
|
*/
|
||||||
data(): Object;
|
data(): Record<string, unknown>;
|
||||||
}
|
}
|
||||||
import ComposerBody from "./ComposerBody";
|
import ComposerBody from "./ComposerBody";
|
||||||
|
14
js/dist-typings/forum/components/EventPost.d.ts
vendored
14
js/dist-typings/forum/components/EventPost.d.ts
vendored
@@ -13,27 +13,27 @@ export default class EventPost extends Post {
|
|||||||
/**
|
/**
|
||||||
* Get the name of the event icon.
|
* Get the name of the event icon.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
icon(): string;
|
icon(): string;
|
||||||
/**
|
/**
|
||||||
* Get the description text for the event.
|
* Get the description text for the event.
|
||||||
*
|
*
|
||||||
* @param {Object} data
|
* @param {Record<string, unknown>} data
|
||||||
* @return {String|Object} The description to render in the DOM
|
* @return {import('mithril').Children} The description to render in the DOM
|
||||||
*/
|
*/
|
||||||
description(data: Object): string | Object;
|
description(data: Record<string, unknown>): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Get the translation key for the description of the event.
|
* Get the translation key for the description of the event.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
descriptionKey(): string;
|
descriptionKey(): string;
|
||||||
/**
|
/**
|
||||||
* Get the translation data for the description of the event.
|
* Get the translation data for the description of the event.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Record<string, unknown>}
|
||||||
*/
|
*/
|
||||||
descriptionData(): Object;
|
descriptionData(): Record<string, unknown>;
|
||||||
}
|
}
|
||||||
import Post from "./Post";
|
import Post from "./Post";
|
||||||
|
@@ -7,9 +7,9 @@ export default class HeaderPrimary extends Component<import("../../common/Compon
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the controls.
|
* Build an item list for the controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
26
js/dist-typings/forum/components/IndexPage.d.ts
vendored
26
js/dist-typings/forum/components/IndexPage.d.ts
vendored
@@ -10,49 +10,47 @@ export default class IndexPage extends Page<import("../../common/components/Page
|
|||||||
/**
|
/**
|
||||||
* Get the component to display as the hero.
|
* Get the component to display as the hero.
|
||||||
*
|
*
|
||||||
* @return {MithrilComponent}
|
* @return {import('mithril').Children}
|
||||||
*/
|
*/
|
||||||
hero(): any;
|
hero(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the sidebar of the index page. By default this is a
|
* Build an item list for the sidebar of the index page. By default this is a
|
||||||
* "New Discussion" button, and then a DropdownSelect component containing a
|
* "New Discussion" button, and then a DropdownSelect component containing a
|
||||||
* list of navigation items.
|
* list of navigation items.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
sidebarItems(): ItemList<any>;
|
sidebarItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the navigation in the sidebar of the index page. By
|
* Build an item list for the navigation in the sidebar of the index page. By
|
||||||
* default this is just the 'All Discussions' link.
|
* default this is just the 'All Discussions' link.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
navItems(): ItemList<any>;
|
navItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the part of the toolbar which is concerned with how
|
* Build an item list for the part of the toolbar which is concerned with how
|
||||||
* the results are displayed. By default this is just a select box to change
|
* the results are displayed. By default this is just a select box to change
|
||||||
* the way discussions are sorted.
|
* the way discussions are sorted.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
viewItems(): ItemList<any>;
|
viewItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the part of the toolbar which is about taking action
|
* Build an item list for the part of the toolbar which is about taking action
|
||||||
* on the results. By default this is just a "mark all as read" button.
|
* on the results. By default this is just a "mark all as read" button.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
actionItems(): ItemList<any>;
|
actionItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Open the composer for a new discussion or prompt the user to login.
|
* Open the composer for a new discussion or prompt the user to login.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
newDiscussionAction(): Promise<any>;
|
newDiscussionAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Mark all discussions as read.
|
* Mark all discussions as read.
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
markAllAsRead(): void;
|
markAllAsRead(): void;
|
||||||
}
|
}
|
||||||
|
@@ -6,10 +6,9 @@ export default class LogInButtons extends Component<import("../../common/Compone
|
|||||||
/**
|
/**
|
||||||
* Build a list of LogInButton components.
|
* Build a list of LogInButton components.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -13,31 +13,31 @@ export default class Notification extends Component<import("../../common/Compone
|
|||||||
/**
|
/**
|
||||||
* Get the name of the icon that should be displayed in the notification.
|
* Get the name of the icon that should be displayed in the notification.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {string}
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
icon(): string;
|
icon(): string;
|
||||||
/**
|
/**
|
||||||
* Get the URL that the notification should link to.
|
* Get the URL that the notification should link to.
|
||||||
*
|
*
|
||||||
* @return {String}
|
* @return {string}
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
href(): string;
|
href(): string;
|
||||||
/**
|
/**
|
||||||
* Get the content of the notification.
|
* Get the content of the notification.
|
||||||
*
|
*
|
||||||
* @return {VirtualElement}
|
* @return {import('mithril').Children}
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
content(): any;
|
content(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Get the excerpt of the notification.
|
* Get the excerpt of the notification.
|
||||||
*
|
*
|
||||||
* @return {VirtualElement}
|
* @return {import('mithril').Children}
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
excerpt(): any;
|
excerpt(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Mark the notification as read.
|
* Mark the notification as read.
|
||||||
*/
|
*/
|
||||||
|
@@ -11,47 +11,55 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
|||||||
/**
|
/**
|
||||||
* Information about the available notification methods.
|
* Information about the available notification methods.
|
||||||
*
|
*
|
||||||
* @type {Array}
|
* @type {({ name: string, icon: string, label: import('mithril').Children })[]}
|
||||||
*/
|
*/
|
||||||
methods: any[] | undefined;
|
methods: {
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
label: import('mithril').Children;
|
||||||
|
}[] | undefined;
|
||||||
/**
|
/**
|
||||||
* A map of which notification checkboxes are loading.
|
* A map of which notification checkboxes are loading.
|
||||||
*
|
*
|
||||||
* @type {Object}
|
* @type {Record<string, boolean>}
|
||||||
*/
|
*/
|
||||||
loading: Object | undefined;
|
loading: Record<string, boolean> | undefined;
|
||||||
/**
|
/**
|
||||||
* Information about the available notification types.
|
* Information about the available notification types.
|
||||||
*
|
*
|
||||||
* @type {Array}
|
* @type {({ name: string, icon: string, label: import('mithril').Children })[]}
|
||||||
*/
|
*/
|
||||||
types: any[] | undefined;
|
types: {
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
label: import('mithril').Children;
|
||||||
|
}[] | undefined;
|
||||||
/**
|
/**
|
||||||
* Toggle the state of the given preferences, based on the value of the first
|
* Toggle the state of the given preferences, based on the value of the first
|
||||||
* one.
|
* one.
|
||||||
*
|
*
|
||||||
* @param {Array} keys
|
* @param {string[]} keys
|
||||||
*/
|
*/
|
||||||
toggle(keys: any[]): void;
|
toggle(keys: string[]): void;
|
||||||
/**
|
/**
|
||||||
* Toggle all notification types for the given method.
|
* Toggle all notification types for the given method.
|
||||||
*
|
*
|
||||||
* @param {String} method
|
* @param {string} method
|
||||||
*/
|
*/
|
||||||
toggleMethod(method: string): void;
|
toggleMethod(method: string): void;
|
||||||
/**
|
/**
|
||||||
* Toggle all notification methods for the given type.
|
* Toggle all notification methods for the given type.
|
||||||
*
|
*
|
||||||
* @param {String} type
|
* @param {string} type
|
||||||
*/
|
*/
|
||||||
toggleType(type: string): void;
|
toggleType(type: string): void;
|
||||||
/**
|
/**
|
||||||
* Get the name of the preference key for the given notification type-method
|
* Get the name of the preference key for the given notification type-method
|
||||||
* combination.
|
* combination.
|
||||||
*
|
*
|
||||||
* @param {String} type
|
* @param {string} type
|
||||||
* @param {String} method
|
* @param {string} method
|
||||||
* @return {String}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
preferenceKey(type: string, method: string): string;
|
preferenceKey(type: string, method: string): string;
|
||||||
/**
|
/**
|
||||||
@@ -63,9 +71,13 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
|||||||
* - `icon` The icon to display in the column header.
|
* - `icon` The icon to display in the column header.
|
||||||
* - `label` The label to display in the column header.
|
* - `label` The label to display in the column header.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}
|
||||||
*/
|
*/
|
||||||
notificationMethods(): ItemList<any>;
|
notificationMethods(): ItemList<{
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
label: import('mithril').Children;
|
||||||
|
}>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the notification types to display in the grid.
|
* Build an item list for the notification types to display in the grid.
|
||||||
*
|
*
|
||||||
@@ -75,9 +87,14 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
|||||||
* - `icon` The icon to display in the notification grid row.
|
* - `icon` The icon to display in the notification grid row.
|
||||||
* - `label` The label to display in the notification grid row.
|
* - `label` The label to display in the notification grid row.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}
|
||||||
*/
|
*/
|
||||||
notificationTypes(): ItemList<any>;
|
notificationTypes(): ItemList<{
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
label: import('mithril').Children;
|
||||||
|
}>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
import icon from "../../common/helpers/icon";
|
||||||
|
20
js/dist-typings/forum/components/Post.d.ts
vendored
20
js/dist-typings/forum/components/Post.d.ts
vendored
@@ -25,34 +25,34 @@ export default class Post extends Component<import("../../common/Component").Com
|
|||||||
/**
|
/**
|
||||||
* Get attributes for the post element.
|
* Get attributes for the post element.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Record<string, unknown>}
|
||||||
*/
|
*/
|
||||||
elementAttrs(): Object;
|
elementAttrs(): Record<string, unknown>;
|
||||||
/**
|
/**
|
||||||
* Get the post's content.
|
* Get the post's content.
|
||||||
*
|
*
|
||||||
* @return {Array}
|
* @return {import('mithril').Children}
|
||||||
*/
|
*/
|
||||||
content(): any[];
|
content(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Get the post's classes.
|
* Get the post's classes.
|
||||||
*
|
*
|
||||||
* @param existing string
|
* @param {string} existing
|
||||||
* @returns {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
classes(existing: any): string[];
|
classes(existing: string): string[];
|
||||||
/**
|
/**
|
||||||
* Build an item list for the post's actions.
|
* Build an item list for the post's actions.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
actionItems(): ItemList<any>;
|
actionItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the post's footer.
|
* Build an item list for the post's footer.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
footerItems(): ItemList<any>;
|
footerItems(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import SubtreeRetainer from "../../common/utils/SubtreeRetainer";
|
import SubtreeRetainer from "../../common/utils/SubtreeRetainer";
|
||||||
|
@@ -12,9 +12,9 @@ export default class PostMeta extends Component<import("../../common/Component")
|
|||||||
/**
|
/**
|
||||||
* Get the permalink for the given post.
|
* Get the permalink for the given post.
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @returns {String}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
getPermalink(post: any): string;
|
getPermalink(post: import('../../common/models/Post').default): string;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
|
46
js/dist-typings/forum/components/PostStream.d.ts
vendored
46
js/dist-typings/forum/components/PostStream.d.ts
vendored
@@ -20,17 +20,17 @@ export default class PostStream extends Component<import("../../common/Component
|
|||||||
triggerScroll(): void;
|
triggerScroll(): void;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Integer} top
|
* @param {number} top
|
||||||
*/
|
*/
|
||||||
onscroll(top?: any): void;
|
onscroll(top?: number): void;
|
||||||
calculatePositionTimeout: NodeJS.Timeout | undefined;
|
calculatePositionTimeout: NodeJS.Timeout | undefined;
|
||||||
/**
|
/**
|
||||||
* Check if either extreme of the post stream is in the viewport,
|
* Check if either extreme of the post stream is in the viewport,
|
||||||
* and if so, trigger loading the next/previous page.
|
* and if so, trigger loading the next/previous page.
|
||||||
*
|
*
|
||||||
* @param {Integer} top
|
* @param {number} top
|
||||||
*/
|
*/
|
||||||
loadPostsIfNeeded(top?: any): void;
|
loadPostsIfNeeded(top?: number): void;
|
||||||
updateScrubber(top?: number): void;
|
updateScrubber(top?: number): void;
|
||||||
/**
|
/**
|
||||||
* Work out which posts (by number) are currently visible in the viewport, and
|
* Work out which posts (by number) are currently visible in the viewport, and
|
||||||
@@ -41,43 +41,43 @@ export default class PostStream extends Component<import("../../common/Component
|
|||||||
* Get the distance from the top of the viewport to the point at which we
|
* Get the distance from the top of the viewport to the point at which we
|
||||||
* would consider a post to be the first one visible.
|
* would consider a post to be the first one visible.
|
||||||
*
|
*
|
||||||
* @return {Integer}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
getMarginTop(): any;
|
getMarginTop(): number;
|
||||||
/**
|
/**
|
||||||
* Scroll down to a certain post by number and 'flash' it.
|
* Scroll down to a certain post by number and 'flash' it.
|
||||||
*
|
*
|
||||||
* @param {Integer} number
|
* @param {number} number
|
||||||
* @param {Boolean} animate
|
* @param {boolean} animate
|
||||||
* @return {jQuery.Deferred}
|
* @return {JQueryDeferred}
|
||||||
*/
|
*/
|
||||||
scrollToNumber(number: any, animate: boolean): any;
|
scrollToNumber(number: number, animate: boolean): JQueryDeferred<any>;
|
||||||
/**
|
/**
|
||||||
* Scroll down to a certain post by index.
|
* Scroll down to a certain post by index.
|
||||||
*
|
*
|
||||||
* @param {Integer} index
|
* @param {number} index
|
||||||
* @param {Boolean} animate
|
* @param {boolean} animate
|
||||||
* @param {Boolean} reply Whether or not to scroll to the reply placeholder.
|
* @param {boolean} reply Whether or not to scroll to the reply placeholder.
|
||||||
* @return {jQuery.Deferred}
|
* @return {JQueryDeferred}
|
||||||
*/
|
*/
|
||||||
scrollToIndex(index: any, animate: boolean, reply: boolean): any;
|
scrollToIndex(index: number, animate: boolean, reply: boolean): JQueryDeferred<any>;
|
||||||
/**
|
/**
|
||||||
* Scroll down to the given post.
|
* Scroll down to the given post.
|
||||||
*
|
*
|
||||||
* @param {jQuery} $item
|
* @param {JQuery} $item
|
||||||
* @param {Boolean} animate
|
* @param {boolean} animate
|
||||||
* @param {Boolean} force Whether or not to force scrolling to the item, even
|
* @param {boolean} force Whether or not to force scrolling to the item, even
|
||||||
* if it is already in the viewport.
|
* if it is already in the viewport.
|
||||||
* @param {Boolean} reply Whether or not to scroll to the reply placeholder.
|
* @param {boolean} reply Whether or not to scroll to the reply placeholder.
|
||||||
* @return {jQuery.Deferred}
|
* @return {JQueryDeferred}
|
||||||
*/
|
*/
|
||||||
scrollToItem($item: JQueryStatic, animate: boolean, force: boolean, reply: boolean): any;
|
scrollToItem($item: JQuery, animate: boolean, force: boolean, reply: boolean): JQueryDeferred<any>;
|
||||||
/**
|
/**
|
||||||
* 'Flash' the given post, drawing the user's attention to it.
|
* 'Flash' the given post, drawing the user's attention to it.
|
||||||
*
|
*
|
||||||
* @param {jQuery} $item
|
* @param {JQuery} $item
|
||||||
*/
|
*/
|
||||||
flashItem($item: JQueryStatic): void;
|
flashItem($item: JQuery): void;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ScrollListener from "../../common/utils/ScrollListener";
|
import ScrollListener from "../../common/utils/ScrollListener";
|
||||||
|
@@ -19,9 +19,13 @@ export default class PostStreamScrubber extends Component<import("../../common/C
|
|||||||
* Update the scrollbar's position to reflect the current values of the
|
* Update the scrollbar's position to reflect the current values of the
|
||||||
* index/visible properties.
|
* index/visible properties.
|
||||||
*
|
*
|
||||||
* @param {Boolean} animate
|
* @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options
|
||||||
*/
|
*/
|
||||||
updateScrubberValues(options?: {}): void;
|
updateScrubberValues(options?: Partial<{
|
||||||
|
fromScroll: boolean;
|
||||||
|
forceHeightChange: boolean;
|
||||||
|
animate: boolean;
|
||||||
|
}>): void;
|
||||||
adjustingHeight: boolean | undefined;
|
adjustingHeight: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Go to the first post in the discussion.
|
* Go to the first post in the discussion.
|
||||||
@@ -40,13 +44,16 @@ export default class PostStreamScrubber extends Component<import("../../common/C
|
|||||||
* Get the percentage of the height of the scrubber that should be allocated
|
* Get the percentage of the height of the scrubber that should be allocated
|
||||||
* to each post.
|
* to each post.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {{ index: number, visible: number }}
|
||||||
* @property {Number} index The percent per post for posts on either side of
|
* @property {Number} index The percent per post for posts on either side of
|
||||||
* the visible part of the scrubber.
|
* the visible part of the scrubber.
|
||||||
* @property {Number} visible The percent per post for the visible part of the
|
* @property {Number} visible The percent per post for the visible part of the
|
||||||
* scrubber.
|
* scrubber.
|
||||||
*/
|
*/
|
||||||
percentPerPost(): Object;
|
percentPerPost(): {
|
||||||
|
index: number;
|
||||||
|
visible: number;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ScrollListener from "../../common/utils/ScrollListener";
|
import ScrollListener from "../../common/utils/ScrollListener";
|
||||||
|
@@ -24,35 +24,31 @@ export default class PostsUserPage extends UserPage {
|
|||||||
/**
|
/**
|
||||||
* The number of activity items to load per request.
|
* The number of activity items to load per request.
|
||||||
*
|
*
|
||||||
* @type {Integer}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
loadLimit: any;
|
loadLimit: number | undefined;
|
||||||
/**
|
/**
|
||||||
* Clear and reload the user's activity feed.
|
* Clear and reload the user's activity feed.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public refresh(): void;
|
refresh(): void;
|
||||||
/**
|
/**
|
||||||
* Load a new page of the user's activity feed.
|
* Load a new page of the user's activity feed.
|
||||||
*
|
*
|
||||||
* @param {Integer} [offset] The position to start getting results from.
|
* @param {number} [offset] The position to start getting results from.
|
||||||
* @return {Promise}
|
* @return {Promise<import('../../common/models/Post').default[]>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected loadResults(offset?: any): Promise<any>;
|
protected loadResults(offset?: number | undefined): Promise<import('../../common/models/Post').default[]>;
|
||||||
/**
|
/**
|
||||||
* Load the next page of results.
|
* Load the next page of results.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public loadMore(): void;
|
loadMore(): void;
|
||||||
/**
|
/**
|
||||||
* Parse results and append them to the activity feed.
|
* Parse results and append them to the activity feed.
|
||||||
*
|
*
|
||||||
* @param {Post[]} results
|
* @param {import('../../common/models/Post').default[]} results
|
||||||
* @return {Post[]}
|
* @return {import('../../common/models/Post').default[]}
|
||||||
*/
|
*/
|
||||||
parseResults(results: any[]): any[];
|
parseResults(results: import('../../common/models/Post').default[]): import('../../common/models/Post').default[];
|
||||||
}
|
}
|
||||||
import UserPage from "./UserPage";
|
import UserPage from "./UserPage";
|
||||||
|
@@ -16,8 +16,8 @@ export default class ReplyComposer extends ComposerBody {
|
|||||||
/**
|
/**
|
||||||
* Get the data to submit to the server when the reply is saved.
|
* Get the data to submit to the server when the reply is saved.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Record<string, unknown>}
|
||||||
*/
|
*/
|
||||||
data(): Object;
|
data(): Record<string, unknown>;
|
||||||
}
|
}
|
||||||
import ComposerBody from "./ComposerBody";
|
import ComposerBody from "./ComposerBody";
|
||||||
|
@@ -6,9 +6,9 @@ export default class SessionDropdown extends Dropdown {
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the contents of the dropdown menu.
|
* Build an item list for the contents of the dropdown menu.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items(): ItemList<any>;
|
items(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Dropdown from "../../common/components/Dropdown";
|
import Dropdown from "../../common/components/Dropdown";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -6,27 +6,27 @@ export default class SettingsPage extends UserPage {
|
|||||||
/**
|
/**
|
||||||
* Build an item list for the user's settings controls.
|
* Build an item list for the user's settings controls.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
settingsItems(): ItemList<any>;
|
settingsItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the user's account settings.
|
* Build an item list for the user's account settings.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
accountItems(): ItemList<any>;
|
accountItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the user's notification settings.
|
* Build an item list for the user's notification settings.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
notificationsItems(): ItemList<any>;
|
notificationsItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the user's privacy settings.
|
* Build an item list for the user's privacy settings.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
privacyItems(): ItemList<any>;
|
privacyItems(): ItemList<import('mithril').Children>;
|
||||||
discloseOnlineLoading: boolean | undefined;
|
discloseOnlineLoading: boolean | undefined;
|
||||||
}
|
}
|
||||||
import UserPage from "./UserPage";
|
import UserPage from "./UserPage";
|
||||||
|
@@ -42,8 +42,6 @@ export default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignup
|
|||||||
/**
|
/**
|
||||||
* Open the log in modal, prefilling it with an email/username/password if
|
* Open the log in modal, prefilling it with an email/username/password if
|
||||||
* the user has entered one.
|
* the user has entered one.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
logIn(): void;
|
logIn(): void;
|
||||||
onready(): void;
|
onready(): void;
|
||||||
|
@@ -15,9 +15,9 @@ export default class UserCard extends Component<import("../../common/Component")
|
|||||||
/**
|
/**
|
||||||
* Build an item list of tidbits of info to show on this user's profile.
|
* Build an item list of tidbits of info to show on this user's profile.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
infoItems(): ItemList<any>;
|
infoItems(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Component from "../../common/Component";
|
import Component from "../../common/Component";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
18
js/dist-typings/forum/components/UserPage.d.ts
vendored
18
js/dist-typings/forum/components/UserPage.d.ts
vendored
@@ -16,36 +16,36 @@ export default class UserPage extends Page<import("../../common/components/Page"
|
|||||||
/**
|
/**
|
||||||
* Get the content to display in the user page.
|
* Get the content to display in the user page.
|
||||||
*
|
*
|
||||||
* @return {VirtualElement}
|
* @return {import('mithril').Children}
|
||||||
*/
|
*/
|
||||||
content(): any;
|
content(): import('mithril').Children;
|
||||||
/**
|
/**
|
||||||
* Initialize the component with a user, and trigger the loading of their
|
* Initialize the component with a user, and trigger the loading of their
|
||||||
* activity feed.
|
* activity feed.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected show(user: any): void;
|
protected show(user: import('../../common/models/User').default): void;
|
||||||
/**
|
/**
|
||||||
* Given a username, load the user's profile from the store, or make a request
|
* Given a username, load the user's profile from the store, or make a request
|
||||||
* if we don't have it yet. Then initialize the profile page with that user.
|
* if we don't have it yet. Then initialize the profile page with that user.
|
||||||
*
|
*
|
||||||
* @param {String} username
|
* @param {string} username
|
||||||
*/
|
*/
|
||||||
loadUser(username: string): void;
|
loadUser(username: string): void;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the content of the sidebar.
|
* Build an item list for the content of the sidebar.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
sidebarItems(): ItemList<any>;
|
sidebarItems(): ItemList<import('mithril').Children>;
|
||||||
/**
|
/**
|
||||||
* Build an item list for the navigation in the sidebar.
|
* Build an item list for the navigation in the sidebar.
|
||||||
*
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
navItems(): ItemList<any>;
|
navItems(): ItemList<import('mithril').Children>;
|
||||||
}
|
}
|
||||||
import Page from "../../common/components/Page";
|
import Page from "../../common/components/Page";
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
71
js/dist-typings/forum/states/ComposerState.d.ts
vendored
71
js/dist-typings/forum/states/ComposerState.d.ts
vendored
@@ -15,9 +15,9 @@ declare class ComposerState {
|
|||||||
* The composer's intended height, which can be modified by the user
|
* The composer's intended height, which can be modified by the user
|
||||||
* (by dragging the composer handle).
|
* (by dragging the composer handle).
|
||||||
*
|
*
|
||||||
* @type {Integer}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
height: any;
|
height: number;
|
||||||
/**
|
/**
|
||||||
* The dynamic component being shown inside the composer.
|
* The dynamic component being shown inside the composer.
|
||||||
*
|
*
|
||||||
@@ -33,16 +33,15 @@ declare class ComposerState {
|
|||||||
/**
|
/**
|
||||||
* Load a content component into the composer.
|
* Load a content component into the composer.
|
||||||
*
|
*
|
||||||
* @param {ComposerBody} componentClass
|
* @param {typeof import('../components/ComposerBody').default} componentClass
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public load(componentClass: any, attrs: any): void;
|
load(componentClass: typeof import('../components/ComposerBody').default, attrs: any): void;
|
||||||
/**
|
/**
|
||||||
* Clear the composer's content component.
|
* Clear the composer's content component.
|
||||||
*/
|
*/
|
||||||
clear(): void;
|
clear(): void;
|
||||||
onExit: {
|
onExit: {
|
||||||
callback: Function;
|
callback: () => boolean;
|
||||||
message: string;
|
message: string;
|
||||||
} | null | undefined;
|
} | null | undefined;
|
||||||
fields: {
|
fields: {
|
||||||
@@ -50,47 +49,34 @@ declare class ComposerState {
|
|||||||
} | undefined;
|
} | undefined;
|
||||||
/**
|
/**
|
||||||
* Show the composer.
|
* Show the composer.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public show(): void;
|
show(): void;
|
||||||
/**
|
/**
|
||||||
* Close the composer.
|
* Close the composer.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public hide(): void;
|
hide(): void;
|
||||||
/**
|
/**
|
||||||
* Confirm with the user so they don't lose their content, then close the
|
* Confirm with the user so they don't lose their content, then close the
|
||||||
* composer.
|
* composer.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public close(): void;
|
close(): void;
|
||||||
/**
|
/**
|
||||||
* Minimize the composer. Has no effect if the composer is hidden.
|
* Minimize the composer. Has no effect if the composer is hidden.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public minimize(): void;
|
minimize(): void;
|
||||||
/**
|
/**
|
||||||
* Take the composer into fullscreen mode. Has no effect if the composer is
|
* Take the composer into fullscreen mode. Has no effect if the composer is
|
||||||
* hidden.
|
* hidden.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public fullScreen(): void;
|
fullScreen(): void;
|
||||||
/**
|
/**
|
||||||
* Exit fullscreen mode.
|
* Exit fullscreen mode.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public exitFullScreen(): void;
|
exitFullScreen(): void;
|
||||||
/**
|
/**
|
||||||
* Determine whether the body matches the given component class and data.
|
* Determine whether the body matches the given component class and data.
|
||||||
*
|
*
|
||||||
* @param {object} type The component class to check against. Subclasses are
|
* @param {object} type The component class to check against. Subclasses are accepted as well.
|
||||||
* accepted as well.
|
|
||||||
* @param {object} data
|
* @param {object} data
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
@@ -110,23 +96,22 @@ declare class ComposerState {
|
|||||||
* This will be true if the Composer is in full-screen mode on desktop,
|
* This will be true if the Composer is in full-screen mode on desktop,
|
||||||
* or if we are on a mobile device, where we always consider the composer as full-screen..
|
* or if we are on a mobile device, where we always consider the composer as full-screen..
|
||||||
*
|
*
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public isFullScreen(): boolean;
|
isFullScreen(): boolean;
|
||||||
/**
|
/**
|
||||||
* Check whether or not the user is currently composing a reply to a
|
* Check whether or not the user is currently composing a reply to a
|
||||||
* discussion.
|
* discussion.
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
composingReplyTo(discussion: any): boolean;
|
composingReplyTo(discussion: import('../../common/models/Discussion').default): boolean;
|
||||||
/**
|
/**
|
||||||
* Confirm with the user that they want to close the composer and lose their
|
* Confirm with the user that they want to close the composer and lose their
|
||||||
* content.
|
* content.
|
||||||
*
|
*
|
||||||
* @return {Boolean} Whether or not the exit was cancelled.
|
* @return {boolean} Whether or not the exit was cancelled.
|
||||||
*/
|
*/
|
||||||
preventExit(): boolean;
|
preventExit(): boolean;
|
||||||
/**
|
/**
|
||||||
@@ -136,27 +121,27 @@ declare class ComposerState {
|
|||||||
* confirmation is necessary. If the callback returns true at the time of
|
* confirmation is necessary. If the callback returns true at the time of
|
||||||
* closing, the provided text will be shown in a standard confirmation dialog.
|
* closing, the provided text will be shown in a standard confirmation dialog.
|
||||||
*
|
*
|
||||||
* @param {Function} callback
|
* @param {() => boolean} callback
|
||||||
* @param {String} message
|
* @param {string} message
|
||||||
*/
|
*/
|
||||||
preventClosingWhen(callback: Function, message: string): void;
|
preventClosingWhen(callback: () => boolean, message: string): void;
|
||||||
/**
|
/**
|
||||||
* Minimum height of the Composer.
|
* Minimum height of the Composer.
|
||||||
* @returns {Integer}
|
* @returns {number}
|
||||||
*/
|
*/
|
||||||
minimumHeight(): any;
|
minimumHeight(): number;
|
||||||
/**
|
/**
|
||||||
* Maxmimum height of the Composer.
|
* Maxmimum height of the Composer.
|
||||||
* @returns {Integer}
|
* @returns {number}
|
||||||
*/
|
*/
|
||||||
maximumHeight(): any;
|
maximumHeight(): number;
|
||||||
/**
|
/**
|
||||||
* Computed the composer's current height, based on the intended height, and
|
* Computed the composer's current height, based on the intended height, and
|
||||||
* the composer's current state. This will be applied to the composer's
|
* the composer's current state. This will be applied to the composer
|
||||||
* content's DOM element.
|
* content's DOM element.
|
||||||
* @returns {Integer|String}
|
* @returns {number | string}
|
||||||
*/
|
*/
|
||||||
computedHeight(): any | string;
|
computedHeight(): number | string;
|
||||||
}
|
}
|
||||||
declare namespace ComposerState {
|
declare namespace ComposerState {
|
||||||
namespace Position {
|
namespace Position {
|
||||||
|
@@ -46,33 +46,30 @@ declare class PostStreamState {
|
|||||||
/**
|
/**
|
||||||
* Update the stream so that it loads and includes the latest posts in the
|
* Update the stream so that it loads and includes the latest posts in the
|
||||||
* discussion, if the end is being viewed.
|
* discussion, if the end is being viewed.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public update(): Promise<any>;
|
update(): Promise<void>;
|
||||||
visibleEnd: any;
|
visibleEnd: any;
|
||||||
/**
|
/**
|
||||||
* Load and scroll up to the first post in the discussion.
|
* Load and scroll up to the first post in the discussion.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
goToFirst(): Promise<any>;
|
goToFirst(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Load and scroll down to the last post in the discussion.
|
* Load and scroll down to the last post in the discussion.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
goToLast(): Promise<any>;
|
goToLast(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Load and scroll to a post with a certain number.
|
* Load and scroll to a post with a certain number.
|
||||||
*
|
*
|
||||||
* @param {number|String} number The post number to go to. If 'reply', go to
|
* @param {number | string} number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.
|
||||||
* the last post and scroll the reply preview into view.
|
* @param {boolean} [noAnimation]
|
||||||
* @param {Boolean} noAnimation
|
* @return {Promise<void>}
|
||||||
* @return {Promise}
|
|
||||||
*/
|
*/
|
||||||
goToNumber(number: number | string, noAnimation?: boolean): Promise<any>;
|
goToNumber(number: number | string, noAnimation?: boolean | undefined): Promise<void>;
|
||||||
loadPromise: Promise<any> | undefined;
|
loadPromise: Promise<void> | undefined;
|
||||||
needsScroll: boolean | undefined;
|
needsScroll: boolean | undefined;
|
||||||
targetPost: {
|
targetPost: {
|
||||||
number: string | number;
|
number: string | number;
|
||||||
@@ -86,28 +83,28 @@ declare class PostStreamState {
|
|||||||
* Load and scroll to a certain index within the discussion.
|
* Load and scroll to a certain index within the discussion.
|
||||||
*
|
*
|
||||||
* @param {number} index
|
* @param {number} index
|
||||||
* @param {Boolean} noAnimation
|
* @param {boolean} [noAnimation]
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
goToIndex(index: number, noAnimation?: boolean): Promise<any>;
|
goToIndex(index: number, noAnimation?: boolean | undefined): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Clear the stream and load posts near a certain number. Returns a promise.
|
* Clear the stream and load posts near a certain number. Returns a promise.
|
||||||
* If the post with the given number is already loaded, the promise will be
|
* If the post with the given number is already loaded, the promise will be
|
||||||
* resolved immediately.
|
* resolved immediately.
|
||||||
*
|
*
|
||||||
* @param {number} number
|
* @param {number} number
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
loadNearNumber(number: number): Promise<any>;
|
loadNearNumber(number: number): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Clear the stream and load posts near a certain index. A page of posts
|
* Clear the stream and load posts near a certain index. A page of posts
|
||||||
* surrounding the given index will be loaded. Returns a promise. If the given
|
* surrounding the given index will be loaded. Returns a promise. If the given
|
||||||
* index is already loaded, the promise will be resolved immediately.
|
* index is already loaded, the promise will be resolved immediately.
|
||||||
*
|
*
|
||||||
* @param {number} index
|
* @param {number} index
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
loadNearIndex(index: number): Promise<any>;
|
loadNearIndex(index: number): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Load the next page of posts.
|
* Load the next page of posts.
|
||||||
*/
|
*/
|
||||||
@@ -122,7 +119,7 @@ declare class PostStreamState {
|
|||||||
*
|
*
|
||||||
* @param {number} start
|
* @param {number} start
|
||||||
* @param {number} end
|
* @param {number} end
|
||||||
* @param {Boolean} backwards
|
* @param {boolean} backwards
|
||||||
*/
|
*/
|
||||||
loadPage(start: number, end: number, backwards?: boolean): void;
|
loadPage(start: number, end: number, backwards?: boolean): void;
|
||||||
/**
|
/**
|
||||||
@@ -131,15 +128,15 @@ declare class PostStreamState {
|
|||||||
*
|
*
|
||||||
* @param {number} start
|
* @param {number} start
|
||||||
* @param {number} end
|
* @param {number} end
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
loadRange(start: number, end: number): Promise<any>;
|
loadRange(start: number, end: number): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Set up the stream with the given array of posts.
|
* Set up the stream with the given array of posts.
|
||||||
*
|
*
|
||||||
* @param {Post[]} posts
|
* @param {import('../../common/models/Post').default[]} posts
|
||||||
*/
|
*/
|
||||||
show(posts: any[]): void;
|
show(posts: import('../../common/models/Post').default[]): void;
|
||||||
/**
|
/**
|
||||||
* Reset the stream so that a specific range of posts is displayed. If a range
|
* Reset the stream so that a specific range of posts is displayed. If a range
|
||||||
* is not specified, the first page of posts will be displayed.
|
* is not specified, the first page of posts will be displayed.
|
||||||
@@ -164,7 +161,7 @@ declare class PostStreamState {
|
|||||||
* Check whether or not the scrubber should be disabled, i.e. if all of the
|
* Check whether or not the scrubber should be disabled, i.e. if all of the
|
||||||
* posts are visible in the viewport.
|
* posts are visible in the viewport.
|
||||||
*
|
*
|
||||||
* @return {Boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
disabled(): boolean;
|
disabled(): boolean;
|
||||||
/**
|
/**
|
||||||
|
136
js/dist-typings/forum/utils/DiscussionControls.d.ts
vendored
136
js/dist-typings/forum/utils/DiscussionControls.d.ts
vendored
@@ -2,159 +2,151 @@ declare namespace _default {
|
|||||||
/**
|
/**
|
||||||
* Get a list of controls for a discussion.
|
* Get a list of controls for a discussion.
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
function controls(discussion: any, context: any): ItemList<any>;
|
function controls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get a list of controls for a discussion.
|
* Get a list of controls for a discussion.
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
function controls(discussion: any, context: any): ItemList<any>;
|
function controls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
||||||
* follow).
|
* follow).
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function userControls(discussion: any, context: any): ItemList<any>;
|
function userControls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
||||||
* follow).
|
* follow).
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function userControls(discussion: any, context: any): ItemList<any>;
|
function userControls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function moderationControls(discussion: any): ItemList<any>;
|
function moderationControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function moderationControls(discussion: any): ItemList<any>;
|
function moderationControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a discussion which are destructive (e.g. delete).
|
* Get controls for a discussion which are destructive (e.g. delete).
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function destructiveControls(discussion: any): ItemList<any>;
|
function destructiveControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a discussion which are destructive (e.g. delete).
|
* Get controls for a discussion which are destructive (e.g. delete).
|
||||||
*
|
*
|
||||||
* @param {Discussion} discussion
|
* @param {import('../../common/models/Discussion').default} discussion
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function destructiveControls(discussion: any): ItemList<any>;
|
function destructiveControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Open the reply composer for the discussion. A promise will be returned,
|
* Open the reply composer for the discussion. A promise will be returned,
|
||||||
* which resolves when the composer opens successfully. If the user is not
|
* which resolves when the composer opens successfully. If the user is not
|
||||||
* logged in, they will be prompted. If they don't have permission to
|
* logged in, they will be prompted. If they don't have permission to
|
||||||
* reply, the promise will be rejected.
|
* reply, the promise will be rejected.
|
||||||
*
|
*
|
||||||
* @param {Boolean} goToLast Whether or not to scroll down to the last post if
|
* @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.
|
||||||
* the discussion is being viewed.
|
* @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.
|
||||||
* @param {Boolean} forceRefresh Whether or not to force a reload of the
|
*
|
||||||
* composer component, even if it is already open for this discussion.
|
* @return {Promise<void>}
|
||||||
* @return {Promise}
|
|
||||||
*/
|
*/
|
||||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Open the reply composer for the discussion. A promise will be returned,
|
* Open the reply composer for the discussion. A promise will be returned,
|
||||||
* which resolves when the composer opens successfully. If the user is not
|
* which resolves when the composer opens successfully. If the user is not
|
||||||
* logged in, they will be prompted. If they don't have permission to
|
* logged in, they will be prompted. If they don't have permission to
|
||||||
* reply, the promise will be rejected.
|
* reply, the promise will be rejected.
|
||||||
*
|
*
|
||||||
* @param {Boolean} goToLast Whether or not to scroll down to the last post if
|
* @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.
|
||||||
* the discussion is being viewed.
|
* @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.
|
||||||
* @param {Boolean} forceRefresh Whether or not to force a reload of the
|
*
|
||||||
* composer component, even if it is already open for this discussion.
|
* @return {Promise<void>}
|
||||||
* @return {Promise}
|
|
||||||
*/
|
*/
|
||||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Hide a discussion.
|
* Hide a discussion.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function hideAction(): Promise<any>;
|
function hideAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Hide a discussion.
|
* Hide a discussion.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function hideAction(): Promise<any>;
|
function hideAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Restore a discussion.
|
* Restore a discussion.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function restoreAction(): Promise<any>;
|
function restoreAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Restore a discussion.
|
* Restore a discussion.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function restoreAction(): Promise<any>;
|
function restoreAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Delete the discussion after confirming with the user.
|
* Delete the discussion after confirming with the user.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function deleteAction(): Promise<any>;
|
function deleteAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Delete the discussion after confirming with the user.
|
* Delete the discussion after confirming with the user.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function deleteAction(): Promise<any>;
|
function deleteAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Rename the discussion.
|
* Rename the discussion.
|
||||||
*
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
*/
|
||||||
function renameAction(): Promise<any>;
|
function renameAction(): any;
|
||||||
/**
|
/**
|
||||||
* Rename the discussion.
|
* Rename the discussion.
|
||||||
*
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
*/
|
||||||
function renameAction(): Promise<any>;
|
function renameAction(): any;
|
||||||
}
|
}
|
||||||
export default _default;
|
export default _default;
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
24
js/dist-typings/forum/utils/Pane.d.ts
vendored
24
js/dist-typings/forum/utils/Pane.d.ts
vendored
@@ -44,42 +44,30 @@ export default class Pane {
|
|||||||
protected showing: boolean;
|
protected showing: boolean;
|
||||||
/**
|
/**
|
||||||
* Enable the pane.
|
* Enable the pane.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public enable(): void;
|
enable(): void;
|
||||||
/**
|
/**
|
||||||
* Disable the pane.
|
* Disable the pane.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public disable(): void;
|
disable(): void;
|
||||||
/**
|
/**
|
||||||
* Show the pane.
|
* Show the pane.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public show(): void;
|
show(): void;
|
||||||
/**
|
/**
|
||||||
* Hide the pane.
|
* Hide the pane.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public hide(): void;
|
hide(): void;
|
||||||
/**
|
/**
|
||||||
* Begin a timeout to hide the pane, which can be cancelled by showing the
|
* Begin a timeout to hide the pane, which can be cancelled by showing the
|
||||||
* pane.
|
* pane.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public onmouseleave(): void;
|
onmouseleave(): void;
|
||||||
hideTimeout: NodeJS.Timeout | undefined;
|
hideTimeout: NodeJS.Timeout | undefined;
|
||||||
/**
|
/**
|
||||||
* Toggle whether or not the pane is pinned.
|
* Toggle whether or not the pane is pinned.
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
public togglePinned(): void;
|
togglePinned(): void;
|
||||||
/**
|
/**
|
||||||
* Apply the appropriate CSS classes to the page element.
|
* Apply the appropriate CSS classes to the page element.
|
||||||
*
|
*
|
||||||
|
114
js/dist-typings/forum/utils/PostControls.d.ts
vendored
114
js/dist-typings/forum/utils/PostControls.d.ts
vendored
@@ -2,131 +2,129 @@ declare namespace _default {
|
|||||||
/**
|
/**
|
||||||
* Get a list of controls for a post.
|
* Get a list of controls for a post.
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
function controls(post: any, context: any): ItemList<any>;
|
function controls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get a list of controls for a post.
|
* Get a list of controls for a post.
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
function controls(post: any, context: any): ItemList<any>;
|
function controls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a post pertaining to the current user (e.g. report).
|
* Get controls for a post pertaining to the current user (e.g. report).
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function userControls(post: any, context: any): ItemList<any>;
|
function userControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a post pertaining to the current user (e.g. report).
|
* Get controls for a post pertaining to the current user (e.g. report).
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function userControls(post: any, context: any): ItemList<any>;
|
function userControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a post pertaining to moderation (e.g. edit).
|
* Get controls for a post pertaining to moderation (e.g. edit).
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function moderationControls(post: any, context: any): ItemList<any>;
|
function moderationControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a post pertaining to moderation (e.g. edit).
|
* Get controls for a post pertaining to moderation (e.g. edit).
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function moderationControls(post: any, context: any): ItemList<any>;
|
function moderationControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a post that are destructive (e.g. delete).
|
* Get controls for a post that are destructive (e.g. delete).
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function destructiveControls(post: any, context: any): ItemList<any>;
|
function destructiveControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a post that are destructive (e.g. delete).
|
* Get controls for a post that are destructive (e.g. delete).
|
||||||
*
|
*
|
||||||
* @param {Post} post
|
* @param {import('../../common/models/Post').default} post
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}')}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function destructiveControls(post: any, context: any): ItemList<any>;
|
function destructiveControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Open the composer to edit a post.
|
* Open the composer to edit a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function editAction(): Promise<any>;
|
function editAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Open the composer to edit a post.
|
* Open the composer to edit a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function editAction(): Promise<any>;
|
function editAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Hide a post.
|
* Hide a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function hideAction(): Promise<any>;
|
function hideAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Hide a post.
|
* Hide a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function hideAction(): Promise<any>;
|
function hideAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Restore a post.
|
* Restore a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function restoreAction(): Promise<any>;
|
function restoreAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Restore a post.
|
* Restore a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function restoreAction(): Promise<any>;
|
function restoreAction(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Delete a post.
|
* Delete a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function deleteAction(context: any): Promise<any>;
|
function deleteAction(context: any): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Delete a post.
|
* Delete a post.
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
function deleteAction(context: any): Promise<any>;
|
function deleteAction(context: any): Promise<void>;
|
||||||
}
|
}
|
||||||
export default _default;
|
export default _default;
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
106
js/dist-typings/forum/utils/UserControls.d.ts
vendored
106
js/dist-typings/forum/utils/UserControls.d.ts
vendored
@@ -2,121 +2,119 @@ declare namespace _default {
|
|||||||
/**
|
/**
|
||||||
* Get a list of controls for a user.
|
* Get a list of controls for a user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
function controls(user: any, context: any): ItemList<any>;
|
function controls(user: import("../../common/models/User").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get a list of controls for a user.
|
* Get a list of controls for a user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
function controls(user: any, context: any): ItemList<any>;
|
function controls(user: import("../../common/models/User").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function userControls(): ItemList<any>;
|
function userControls(): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function userControls(): ItemList<any>;
|
function userControls(): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function moderationControls(user: any): ItemList<any>;
|
function moderationControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function moderationControls(user: any): ItemList<any>;
|
function moderationControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a user which are destructive (e.g. delete).
|
* Get controls for a user which are destructive (e.g. delete).
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function destructiveControls(user: any): ItemList<any>;
|
function destructiveControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Get controls for a user which are destructive (e.g. delete).
|
* Get controls for a user which are destructive (e.g. delete).
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {*} context The parent component under which the controls menu will
|
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||||
* be displayed.
|
*
|
||||||
* @return {ItemList}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
function destructiveControls(user: any): ItemList<any>;
|
function destructiveControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||||
/**
|
/**
|
||||||
* Delete the user.
|
* Delete the user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
*/
|
*/
|
||||||
function deleteAction(user: any): void;
|
function deleteAction(user: import("../../common/models/User").default): void;
|
||||||
/**
|
/**
|
||||||
* Delete the user.
|
* Delete the user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
*/
|
*/
|
||||||
function deleteAction(user: any): void;
|
function deleteAction(user: import("../../common/models/User").default): void;
|
||||||
/**
|
/**
|
||||||
* Show deletion alert of user.
|
* Show deletion alert of user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
*/
|
*/
|
||||||
function showDeletionAlert(user: any, type: string): void;
|
function showDeletionAlert(user: import("../../common/models/User").default, type: string): void;
|
||||||
/**
|
/**
|
||||||
* Show deletion alert of user.
|
* Show deletion alert of user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
*/
|
*/
|
||||||
function showDeletionAlert(user: any, type: string): void;
|
function showDeletionAlert(user: import("../../common/models/User").default, type: string): void;
|
||||||
/**
|
/**
|
||||||
* Edit the user.
|
* Edit the user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
*/
|
*/
|
||||||
function editAction(user: any): void;
|
function editAction(user: import("../../common/models/User").default): void;
|
||||||
/**
|
/**
|
||||||
* Edit the user.
|
* Edit the user.
|
||||||
*
|
*
|
||||||
* @param {User} user
|
* @param {import('../../common/models/User').default} user
|
||||||
*/
|
*/
|
||||||
function editAction(user: any): void;
|
function editAction(user: import("../../common/models/User").default): void;
|
||||||
}
|
}
|
||||||
export default _default;
|
export default _default;
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Shows an alert if the user has not yet confirmed their email address.
|
* Shows an alert if the user has not yet confirmed their email address.
|
||||||
*
|
*
|
||||||
* @param {ForumApplication} app
|
* @param {import('../ForumApplication').default} app
|
||||||
*/
|
*/
|
||||||
export default function alertEmailConfirmation(app: any): void;
|
export default function alertEmailConfirmation(app: import('../ForumApplication').default): void;
|
||||||
|
15
js/dist-typings/forum/utils/slidable.d.ts
vendored
15
js/dist-typings/forum/utils/slidable.d.ts
vendored
@@ -4,11 +4,14 @@
|
|||||||
* controls.
|
* controls.
|
||||||
*
|
*
|
||||||
* It relies on the element having children with particular CSS classes.
|
* It relies on the element having children with particular CSS classes.
|
||||||
* TODO: document
|
|
||||||
*
|
*
|
||||||
* @param {DOMElement} element
|
* The function returns a record with a `reset` proeprty. This is a function
|
||||||
* @return {Object}
|
* which reverts the slider to its original position. This should be called,
|
||||||
* @property {function} reset Revert the slider to its original position. This
|
* for example, when a controls dropdown is closed.
|
||||||
* should be called, for example, when a controls dropdown is closed.
|
*
|
||||||
|
* @param {HTMLElement | SVGElement | Element} element
|
||||||
|
* @return {{ reset : () => void }}
|
||||||
*/
|
*/
|
||||||
export default function slidable(element: any): Object;
|
export default function slidable(element: HTMLElement | SVGElement | Element): {
|
||||||
|
reset: () => void;
|
||||||
|
};
|
||||||
|
2
js/dist/admin.js
generated
vendored
2
js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/admin.js.map
generated
vendored
2
js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js
generated
vendored
2
js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js.map
generated
vendored
2
js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user