mirror of
https://github.com/flarum/framework.git
synced 2025-02-27 06:15:24 +08:00
Bundled output for commit b4f39520bdb10a83182dfc67faedc7b225b45242
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
parent
b4f39520bd
commit
c38b7d10aa
@ -1,3 +1,8 @@
|
||||
declare type Writable<T> = { -readonly [P in keyof T]: T[P] };
|
||||
declare type DeepWritable<T> = { -readonly [P in keyof T]: DeepWritable<T[P]> };
|
||||
|
||||
declare type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> };
|
||||
|
||||
/**
|
||||
* UTILITY TYPES
|
||||
*/
|
||||
|
@ -39,6 +39,7 @@ declare var _default: {
|
||||
'utils/mapRoutes': typeof import("../common/utils/mapRoutes").default;
|
||||
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
|
||||
'utils/throttleDebounce': typeof import("../common/utils/throttleDebounce");
|
||||
'utils/isObject': typeof import("../common/utils/isObject").default;
|
||||
'models/Notification': typeof import("../common/models/Notification").default;
|
||||
'models/User': typeof import("../common/models/User").default;
|
||||
'models/Post': typeof import("../common/models/Post").default;
|
||||
|
@ -7,8 +7,8 @@ export default class AdminNav extends Component<import("../../common/Component")
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
extensionItems(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
extensionItems(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import Stream from "../../common/utils/Stream";
|
||||
|
@ -10,7 +10,7 @@ export default class BasicsPage extends AdminPage<import("../../common/component
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
public homePageItems(): ItemList;
|
||||
public homePageItems(): ItemList<any>;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -1,6 +1,6 @@
|
||||
export default class DashboardPage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
availableWidgets(): ItemList;
|
||||
availableWidgets(): ItemList<any>;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -10,7 +10,7 @@ export default class EditGroupModal extends Modal<any> {
|
||||
icon: Stream<any> | undefined;
|
||||
color: Stream<any> | undefined;
|
||||
isHidden: Stream<any> | undefined;
|
||||
fields(): ItemList;
|
||||
fields(): ItemList<any>;
|
||||
submitData(): {
|
||||
nameSingular: any;
|
||||
namePlural: any;
|
||||
|
@ -1,5 +1,5 @@
|
||||
export default class ExtensionLinkButton extends LinkButton {
|
||||
statusItems(name: any): ItemList;
|
||||
statusItems(name: any): ItemList<any>;
|
||||
}
|
||||
import LinkButton from "../../common/components/LinkButton";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -22,10 +22,10 @@ export default class ExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionP
|
||||
className(): string;
|
||||
view(vnode: Mithril.VnodeDOM<Attrs, this>): JSX.Element | null;
|
||||
header(): JSX.Element[];
|
||||
sections(vnode: Mithril.VnodeDOM<Attrs, this>): ItemList;
|
||||
sections(vnode: Mithril.VnodeDOM<Attrs, this>): ItemList<unknown>;
|
||||
content(vnode: Mithril.VnodeDOM<Attrs, this>): JSX.Element;
|
||||
topItems(): ItemList;
|
||||
infoItems(): ItemList;
|
||||
topItems(): ItemList<unknown>;
|
||||
infoItems(): ItemList<unknown>;
|
||||
toggle(): void;
|
||||
isEnabled(): any;
|
||||
onerror(e: RequestError): void;
|
||||
|
@ -10,7 +10,7 @@ export default class HeaderPrimary extends Component<import("../../common/Compon
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -8,7 +8,7 @@ export default class HeaderSecondary extends Component<import("../../common/Comp
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -1,12 +1,12 @@
|
||||
export default class PermissionGrid extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
permissionItems(): ItemList;
|
||||
viewItems(): ItemList;
|
||||
startItems(): ItemList;
|
||||
replyItems(): ItemList;
|
||||
moderateItems(): ItemList;
|
||||
scopeItems(): ItemList;
|
||||
scopeControlItems(): ItemList;
|
||||
permissionItems(): ItemList<any>;
|
||||
viewItems(): ItemList<any>;
|
||||
startItems(): ItemList<any>;
|
||||
replyItems(): ItemList<any>;
|
||||
moderateItems(): ItemList<any>;
|
||||
scopeItems(): ItemList<any>;
|
||||
scopeControlItems(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -8,7 +8,7 @@ export default class SessionDropdown extends Dropdown {
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Dropdown from "../../common/components/Dropdown";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -1,5 +1,5 @@
|
||||
export default class StatusWidget extends DashboardWidget {
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
handleClearCache(e: any): void;
|
||||
}
|
||||
import DashboardWidget from "./DashboardWidget";
|
||||
|
@ -1,6 +1,17 @@
|
||||
/// <reference types="mithril" />
|
||||
import type User from '../../common/models/User';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import AdminPage from './AdminPage';
|
||||
declare type ColumnData = {
|
||||
/**
|
||||
* Column title
|
||||
*/
|
||||
name: String;
|
||||
/**
|
||||
* Component(s) to show for this column.
|
||||
*/
|
||||
content: (user: User) => JSX.Element;
|
||||
};
|
||||
/**
|
||||
* Admin page which displays a paginated list of all users on the forum.
|
||||
*/
|
||||
@ -50,7 +61,7 @@ export default class UserListPage extends AdminPage {
|
||||
*
|
||||
* See `UserListPage.tsx` for examples.
|
||||
*/
|
||||
columns(): ItemList;
|
||||
columns(): ItemList<ColumnData>;
|
||||
headerInfo(): {
|
||||
className: string;
|
||||
icon: string;
|
||||
@ -70,3 +81,4 @@ export default class UserListPage extends AdminPage {
|
||||
nextPage(): void;
|
||||
previousPage(): void;
|
||||
}
|
||||
export {};
|
||||
|
@ -71,7 +71,7 @@ export default class ExtensionData {
|
||||
* @param type
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
getAllExtensionPermissions(type: any): ItemList;
|
||||
getAllExtensionPermissions(type: any): ItemList<any>;
|
||||
/**
|
||||
* Get a singular extension's registered permissions
|
||||
*
|
||||
|
@ -39,6 +39,7 @@ declare var _default: {
|
||||
'utils/mapRoutes': typeof mapRoutes;
|
||||
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
|
||||
'utils/throttleDebounce': typeof ThrottleDebounce;
|
||||
'utils/isObject': typeof isObject;
|
||||
'models/Notification': typeof Notification;
|
||||
'models/User': typeof User;
|
||||
'models/Post': typeof Post;
|
||||
@ -118,6 +119,7 @@ import extractText from "./utils/extractText";
|
||||
import formatNumber from "./utils/formatNumber";
|
||||
import mapRoutes from "./utils/mapRoutes";
|
||||
import * as ThrottleDebounce from "./utils/throttleDebounce";
|
||||
import isObject from "./utils/isObject";
|
||||
import Notification from "./models/Notification";
|
||||
import User from "./models/User";
|
||||
import Post from "./models/Post";
|
||||
|
@ -9,7 +9,7 @@ export default class EditUserModal extends Modal<any> {
|
||||
setPassword: Stream<boolean> | undefined;
|
||||
password: Stream<any> | undefined;
|
||||
groups: {} | undefined;
|
||||
fields(): ItemList;
|
||||
fields(): ItemList<any>;
|
||||
activate(): void;
|
||||
data(): {
|
||||
relationships: {};
|
||||
|
@ -38,13 +38,13 @@ export default class TextEditor extends Component<import("../Component").Compone
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
controlItems(): ItemList;
|
||||
controlItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the toolbar controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
toolbarItems(): ItemList;
|
||||
toolbarItems(): ItemList<any>;
|
||||
/**
|
||||
* Handle input into the textarea.
|
||||
*
|
||||
|
@ -1,20 +1,31 @@
|
||||
declare class Item {
|
||||
content: any;
|
||||
export interface IItemObject<T> {
|
||||
content: T;
|
||||
itemName: string;
|
||||
priority: number;
|
||||
key?: number;
|
||||
constructor(content: any, priority?: number);
|
||||
}
|
||||
declare class Item<T> {
|
||||
content: T;
|
||||
priority: number;
|
||||
constructor(content: T, priority: number);
|
||||
}
|
||||
/**
|
||||
* The `ItemList` class collects items and then arranges them into an array
|
||||
* by priority.
|
||||
*/
|
||||
export default class ItemList {
|
||||
export default class ItemList<T> {
|
||||
/**
|
||||
* The items in the list
|
||||
* The items in the list.
|
||||
*/
|
||||
items: {
|
||||
[key: string]: Item;
|
||||
};
|
||||
protected _items: Record<string, Item<T>>;
|
||||
/**
|
||||
* A **read-only copy** of items in the list.
|
||||
*
|
||||
* We don't allow adding new items to the ItemList via setting new properties,
|
||||
* nor do we allow modifying existing items directly.
|
||||
*
|
||||
* @deprecated Use {@link ItemList.toObject} instead.
|
||||
*/
|
||||
get items(): DeepReadonly<Record<string, Item<T>>>;
|
||||
/**
|
||||
* Check whether the list is empty.
|
||||
*/
|
||||
@ -26,33 +37,165 @@ export default class ItemList {
|
||||
/**
|
||||
* Get the content of an item.
|
||||
*/
|
||||
get(key: string): any;
|
||||
get(key: string): T;
|
||||
/**
|
||||
* Get the priority of an item.
|
||||
*/
|
||||
getPriority(key: string): number;
|
||||
/**
|
||||
* Add an item to the list.
|
||||
*
|
||||
* @param key A unique key for the item.
|
||||
* @param content The item's content.
|
||||
* @param [priority] The priority of the item. Items with a higher
|
||||
* priority will be positioned before items with a lower priority.
|
||||
* @param priority The priority of the item. Items with a higher priority
|
||||
* will be positioned before items with a lower priority.
|
||||
*/
|
||||
add(key: string, content: any, priority?: number): this;
|
||||
add(key: string, content: T, priority?: number): this;
|
||||
/**
|
||||
* Replace an item in the list, only if it is already present.
|
||||
* Replace an item and/or priority in the list, only if it is already present.
|
||||
*
|
||||
* If `content` or `priority` are `null`, these values will not be replaced.
|
||||
*
|
||||
* If the provided `key` is not present, nothing will happen.
|
||||
*
|
||||
* @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}
|
||||
* methods to replace items and their priorities. This method will be removed in Flarum 2.0.
|
||||
*
|
||||
* @param key The key of the item in the list
|
||||
* @param content The item's new content
|
||||
* @param priority The item's new priority
|
||||
*
|
||||
* @example <caption>Replace priority and not content.</caption>
|
||||
* items.replace('myItem', null, 10);
|
||||
*
|
||||
* @example <caption>Replace content and not priority.</caption>
|
||||
* items.replace('myItem', <p>My new value.</p>);
|
||||
*
|
||||
* @example <caption>Replace content and priority.</caption>
|
||||
* items.replace('myItem', <p>My new value.</p>, 10);
|
||||
*/
|
||||
replace(key: string, content?: any, priority?: number): this;
|
||||
replace(key: string, content?: T | null, priority?: number | null): this;
|
||||
/**
|
||||
* Replaces an item's content, if the provided item key exists.
|
||||
*
|
||||
* If the provided `key` is not present, nothing will happen.
|
||||
*
|
||||
* @param key The key of the item in the list
|
||||
* @param content The item's new content
|
||||
*
|
||||
* @example <caption>Replace item content.</caption>
|
||||
* items.setContent('myItem', <p>My new value.</p>);
|
||||
*
|
||||
* @example <caption>Replace item content and priority.</caption>
|
||||
* items
|
||||
* .setContent('myItem', <p>My new value.</p>)
|
||||
* .setPriority('myItem', 10);
|
||||
*
|
||||
* @throws If the provided `key` is not present in the ItemList.
|
||||
*/
|
||||
setContent(key: string, content: T): this;
|
||||
/**
|
||||
* Replaces an item's priority, if the provided item key exists.
|
||||
*
|
||||
* If the provided `key` is not present, nothing will happen.
|
||||
*
|
||||
* @param key The key of the item in the list
|
||||
* @param priority The item's new priority
|
||||
*
|
||||
* @example <caption>Replace item priority.</caption>
|
||||
* items.setPriority('myItem', 10);
|
||||
*
|
||||
* @example <caption>Replace item priority and content.</caption>
|
||||
* items
|
||||
* .setPriority('myItem', 10)
|
||||
* .setContent('myItem', <p>My new value.</p>);
|
||||
*
|
||||
* @throws If the provided `key` is not present in the ItemList.
|
||||
*/
|
||||
setPriority(key: string, priority: number): this;
|
||||
/**
|
||||
* Remove an item from the list.
|
||||
*/
|
||||
remove(key: string): this;
|
||||
/**
|
||||
* Merge another list's items into this one.
|
||||
*
|
||||
* The list passed to this function will overwrite items which already exist
|
||||
* with the same key.
|
||||
*/
|
||||
merge(items: this): this;
|
||||
merge(otherList: ItemList<T>): ItemList<T>;
|
||||
/**
|
||||
* Convert the list into an array of item content arranged by priority. Each
|
||||
* item's content will be assigned an `itemName` property equal to the item's
|
||||
* unique key.
|
||||
* Convert the list into an array of item content arranged by priority.
|
||||
*
|
||||
* This **does not** preserve the original types of primitives and proxies
|
||||
* all content values to make `itemName` accessible on them.
|
||||
*
|
||||
* **NOTE:** If your ItemList holds primitive types (such as numbers, booleans
|
||||
* or strings), these will be converted to their object counterparts if you do
|
||||
* not provide `true` to this function.
|
||||
*
|
||||
* **NOTE:** Modifying any objects in the final array may also update the
|
||||
* content of the original ItemList.
|
||||
*
|
||||
* @param keepPrimitives Converts item content to objects and sets the
|
||||
* `itemName` property on them.
|
||||
*
|
||||
* @see https://github.com/flarum/core/issues/3030
|
||||
*/
|
||||
toArray(): any[];
|
||||
toArray(keepPrimitives?: false): (T & {
|
||||
itemName: string;
|
||||
})[];
|
||||
/**
|
||||
* Convert the list into an array of item content arranged by priority.
|
||||
*
|
||||
* Content values that are already objects will be proxied and have
|
||||
* `itemName` accessible on them. Primitive values will not have the
|
||||
* `itemName` property accessible.
|
||||
*
|
||||
* **NOTE:** Modifying any objects in the final array may also update the
|
||||
* content of the original ItemList.
|
||||
*
|
||||
* @param keepPrimitives Converts item content to objects and sets the
|
||||
* `itemName` property on them.
|
||||
*/
|
||||
toArray(keepPrimitives: true): (T extends object ? T & Readonly<{
|
||||
itemName: string;
|
||||
}> : T)[];
|
||||
/**
|
||||
* A read-only map of all keys to their respective items in no particular order.
|
||||
*
|
||||
* We don't allow adding new items to the ItemList via setting new properties,
|
||||
* nor do we allow modifying existing items directly. You should use the
|
||||
* {@link ItemList.add}, {@link ItemList.setContent} and
|
||||
* {@link ItemList.setPriority} methods instead.
|
||||
*
|
||||
* To match the old behaviour of the `ItemList.items` property, call
|
||||
* `Object.values(ItemList.toObject())`.
|
||||
*
|
||||
* @example
|
||||
* const items = new ItemList();
|
||||
* items.add('b', 'My cool value', 20);
|
||||
* items.add('a', 'My value', 10);
|
||||
* items.toObject();
|
||||
* // {
|
||||
* // a: { content: 'My value', priority: 10, itemName: 'a' },
|
||||
* // b: { content: 'My cool value', priority: 20, itemName: 'b' },
|
||||
* // }
|
||||
*/
|
||||
toObject(): DeepReadonly<Record<string, IItemObject<T>>>;
|
||||
/**
|
||||
* Proxies an item's content, adding the `itemName` readonly property to it.
|
||||
*
|
||||
* @example
|
||||
* createItemContentProxy({ foo: 'bar' }, 'myItem');
|
||||
* // { foo: 'bar', itemName: 'myItem' }
|
||||
*
|
||||
* @param content The item's content (objects only)
|
||||
* @param key The item's key
|
||||
* @returns Proxied content
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
private createItemContentProxy;
|
||||
}
|
||||
export {};
|
||||
|
24
framework/core/js/dist-typings/common/utils/isObject.d.ts
vendored
Normal file
24
framework/core/js/dist-typings/common/utils/isObject.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Returns if the passed value is an object.
|
||||
*
|
||||
* In this context, "object" refers to **any non-primitive value**, including
|
||||
* arrays, function, maps, dates, and more.
|
||||
*
|
||||
* @example
|
||||
* isObject({}); // true
|
||||
* @example
|
||||
* isObject([]); // true
|
||||
* @example
|
||||
* isObject(function () {}); // true
|
||||
* @example
|
||||
* isObject(Object(1)); // true
|
||||
* @example
|
||||
* isObject(null); // false
|
||||
* @example
|
||||
* isObject(1); // false
|
||||
* @example
|
||||
* isObject("hello world"); // false
|
||||
*
|
||||
* @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91
|
||||
*/
|
||||
export default function isObject(obj: unknown): obj is object;
|
25
framework/core/js/dist-typings/forum/compat.d.ts
vendored
25
framework/core/js/dist-typings/forum/compat.d.ts
vendored
@ -39,6 +39,7 @@ declare var _default: {
|
||||
'utils/mapRoutes': typeof import("../common/utils/mapRoutes").default;
|
||||
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
|
||||
'utils/throttleDebounce': typeof import("../common/utils/throttleDebounce");
|
||||
'utils/isObject': typeof import("../common/utils/isObject").default;
|
||||
'models/Notification': typeof import("../common/models/Notification").default;
|
||||
'models/User': typeof import("../common/models/User").default;
|
||||
'models/Post': typeof import("../common/models/Post").default;
|
||||
@ -89,10 +90,10 @@ declare var _default: {
|
||||
'states/PaginatedListState': typeof import("../common/states/PaginatedListState").default;
|
||||
} & {
|
||||
'utils/PostControls': {
|
||||
controls(post: any, context: any): import("../common/utils/ItemList").default;
|
||||
userControls(post: any, context: any): import("../common/utils/ItemList").default;
|
||||
moderationControls(post: any, context: any): import("../common/utils/ItemList").default;
|
||||
destructiveControls(post: any, context: any): import("../common/utils/ItemList").default;
|
||||
controls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
userControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
moderationControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
destructiveControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
editAction(): Promise<any>;
|
||||
hideAction(): Promise<any>;
|
||||
restoreAction(): Promise<any>;
|
||||
@ -102,10 +103,10 @@ declare var _default: {
|
||||
'utils/slidable': typeof slidable;
|
||||
'utils/History': typeof History;
|
||||
'utils/DiscussionControls': {
|
||||
controls(discussion: any, context: any): import("../common/utils/ItemList").default;
|
||||
userControls(discussion: any, context: any): import("../common/utils/ItemList").default;
|
||||
moderationControls(discussion: any): import("../common/utils/ItemList").default;
|
||||
destructiveControls(discussion: any): import("../common/utils/ItemList").default;
|
||||
controls(discussion: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
userControls(discussion: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
moderationControls(discussion: any): import("../common/utils/ItemList").default<any>;
|
||||
destructiveControls(discussion: any): import("../common/utils/ItemList").default<any>;
|
||||
replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
||||
hideAction(): Promise<any>;
|
||||
restoreAction(): Promise<any>;
|
||||
@ -114,10 +115,10 @@ declare var _default: {
|
||||
};
|
||||
'utils/alertEmailConfirmation': typeof alertEmailConfirmation;
|
||||
'utils/UserControls': {
|
||||
controls(user: any, context: any): import("../common/utils/ItemList").default;
|
||||
userControls(): import("../common/utils/ItemList").default;
|
||||
moderationControls(user: any): import("../common/utils/ItemList").default;
|
||||
destructiveControls(user: any): import("../common/utils/ItemList").default;
|
||||
controls(user: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
userControls(): import("../common/utils/ItemList").default<any>;
|
||||
moderationControls(user: any): import("../common/utils/ItemList").default<any>;
|
||||
destructiveControls(user: any): import("../common/utils/ItemList").default<any>;
|
||||
deleteAction(user: any): void;
|
||||
showDeletionAlert(user: any, type: string): void;
|
||||
editAction(user: any): void;
|
||||
|
@ -26,7 +26,7 @@ export default class AvatarEditor extends Component<import("../../common/Compone
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
controlItems(): ItemList;
|
||||
controlItems(): ItemList<any>;
|
||||
/**
|
||||
* Enable dragover style
|
||||
*
|
||||
|
@ -34,7 +34,7 @@ export default class CommentPost extends Post {
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
headerItems(): ItemList;
|
||||
headerItems(): ItemList<any>;
|
||||
}
|
||||
import Post from "./Post";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -85,7 +85,7 @@ export default class Composer extends Component<import("../../common/Component")
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
controlItems(): ItemList;
|
||||
controlItems(): ItemList<any>;
|
||||
/**
|
||||
* Initialize default Composer height.
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@ export default class ComposerBody extends Component<import("../../common/Compone
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
headerItems(): ItemList;
|
||||
headerItems(): ItemList<any>;
|
||||
/**
|
||||
* Handle the submit event of the text editor.
|
||||
*
|
||||
|
@ -12,7 +12,7 @@ export default class DiscussionHero extends Component<import("../../common/Compo
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -51,7 +51,7 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
infoItems(): ItemList;
|
||||
infoItems(): ItemList<any>;
|
||||
replyCountItem(): JSX.Element;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@ -33,7 +33,7 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
loadingItems(): ItemList;
|
||||
loadingItems(): ItemList<unknown>;
|
||||
/**
|
||||
* Function that renders the `sidebarItems` ItemList.
|
||||
*
|
||||
@ -51,13 +51,13 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
pageContent(): ItemList;
|
||||
pageContent(): ItemList<unknown>;
|
||||
/**
|
||||
* List of items rendered inside the main page content container.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
mainContent(): ItemList;
|
||||
mainContent(): ItemList<unknown>;
|
||||
/**
|
||||
* Load the discussion from the API or use the preloaded one.
|
||||
*/
|
||||
@ -83,7 +83,7 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
sidebarItems(): ItemList;
|
||||
sidebarItems(): ItemList<unknown>;
|
||||
/**
|
||||
* 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.
|
||||
|
@ -9,7 +9,7 @@ export default class HeaderPrimary extends Component<import("../../common/Compon
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -10,7 +10,7 @@ export default class HeaderSecondary extends Component<import("../../common/Comp
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -20,14 +20,14 @@ export default class IndexPage extends Page<import("../../common/components/Page
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
sidebarItems(): ItemList;
|
||||
sidebarItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the navigation in the sidebar of the index page. By
|
||||
* default this is just the 'All Discussions' link.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
navItems(): ItemList;
|
||||
navItems(): ItemList<any>;
|
||||
/**
|
||||
* 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
|
||||
@ -35,14 +35,14 @@ export default class IndexPage extends Page<import("../../common/components/Page
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
viewItems(): ItemList;
|
||||
viewItems(): ItemList<any>;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
actionItems(): ItemList;
|
||||
actionItems(): ItemList<any>;
|
||||
/**
|
||||
* Open the composer for a new discussion or prompt the user to login.
|
||||
*
|
||||
|
@ -9,7 +9,7 @@ export default class LogInButtons extends Component<import("../../common/Compone
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
public items(): ItemList;
|
||||
public items(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -27,7 +27,7 @@ export default class LogInModal extends Modal<any> {
|
||||
*/
|
||||
remember: Function | undefined;
|
||||
body(): JSX.Element[];
|
||||
fields(): ItemList;
|
||||
fields(): ItemList<any>;
|
||||
footer(): (string | JSX.Element)[];
|
||||
/**
|
||||
* Open the forgot password modal, prefilling it with an email if the user has
|
||||
|
@ -65,7 +65,7 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
notificationMethods(): ItemList;
|
||||
notificationMethods(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the notification types to display in the grid.
|
||||
*
|
||||
@ -77,7 +77,7 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
notificationTypes(): ItemList;
|
||||
notificationTypes(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -46,13 +46,13 @@ export default class Post extends Component<import("../../common/Component").Com
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
actionItems(): ItemList;
|
||||
actionItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the post's footer.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
footerItems(): ItemList;
|
||||
footerItems(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import SubtreeRetainer from "../../common/utils/SubtreeRetainer";
|
||||
|
@ -8,7 +8,7 @@ export default class SessionDropdown extends Dropdown {
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
items(): ItemList<any>;
|
||||
}
|
||||
import Dropdown from "../../common/components/Dropdown";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -8,25 +8,25 @@ export default class SettingsPage extends UserPage {
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
settingsItems(): ItemList;
|
||||
settingsItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the user's account settings.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
accountItems(): ItemList;
|
||||
accountItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the user's notification settings.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
notificationsItems(): ItemList;
|
||||
notificationsItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the user's privacy settings.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
privacyItems(): ItemList;
|
||||
privacyItems(): ItemList<any>;
|
||||
discloseOnlineLoading: boolean | undefined;
|
||||
}
|
||||
import UserPage from "./UserPage";
|
||||
|
@ -30,7 +30,7 @@ export default class SignUpModal extends Modal<any> {
|
||||
password: Function | undefined;
|
||||
isProvided(field: any): any;
|
||||
body(): (string | JSX.Element)[];
|
||||
fields(): ItemList;
|
||||
fields(): ItemList<any>;
|
||||
footer(): JSX.Element[];
|
||||
/**
|
||||
* Open the log in modal, prefilling it with an email/username/password if
|
||||
|
@ -17,7 +17,7 @@ export default class UserCard extends Component<import("../../common/Component")
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
infoItems(): ItemList;
|
||||
infoItems(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -39,13 +39,13 @@ export default class UserPage extends Page<import("../../common/components/Page"
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
sidebarItems(): ItemList;
|
||||
sidebarItems(): ItemList<any>;
|
||||
/**
|
||||
* Build an item list for the navigation in the sidebar.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
navItems(): ItemList;
|
||||
navItems(): ItemList<any>;
|
||||
}
|
||||
import Page from "../../common/components/Page";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@ -8,7 +8,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
function controls(discussion: any, context: any): ItemList;
|
||||
function controls(discussion: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get a list of controls for a discussion.
|
||||
*
|
||||
@ -18,7 +18,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
function controls(discussion: any, context: any): ItemList;
|
||||
function controls(discussion: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
||||
* follow).
|
||||
@ -29,7 +29,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(discussion: any, context: any): ItemList;
|
||||
function userControls(discussion: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
||||
* follow).
|
||||
@ -40,7 +40,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(discussion: any, context: any): ItemList;
|
||||
function userControls(discussion: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||
*
|
||||
@ -50,7 +50,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(discussion: any): ItemList;
|
||||
function moderationControls(discussion: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||
*
|
||||
@ -60,7 +60,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(discussion: any): ItemList;
|
||||
function moderationControls(discussion: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a discussion which are destructive (e.g. delete).
|
||||
*
|
||||
@ -70,7 +70,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(discussion: any): ItemList;
|
||||
function destructiveControls(discussion: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a discussion which are destructive (e.g. delete).
|
||||
*
|
||||
@ -80,7 +80,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(discussion: any): ItemList;
|
||||
function destructiveControls(discussion: any): ItemList<any>;
|
||||
/**
|
||||
* Open the reply composer for the discussion. A promise will be returned,
|
||||
* which resolves when the composer opens successfully. If the user is not
|
||||
|
@ -8,7 +8,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
function controls(post: any, context: any): ItemList;
|
||||
function controls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get a list of controls for a post.
|
||||
*
|
||||
@ -18,7 +18,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
function controls(post: any, context: any): ItemList;
|
||||
function controls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a post pertaining to the current user (e.g. report).
|
||||
*
|
||||
@ -28,7 +28,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(post: any, context: any): ItemList;
|
||||
function userControls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a post pertaining to the current user (e.g. report).
|
||||
*
|
||||
@ -38,7 +38,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(post: any, context: any): ItemList;
|
||||
function userControls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a post pertaining to moderation (e.g. edit).
|
||||
*
|
||||
@ -48,7 +48,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(post: any, context: any): ItemList;
|
||||
function moderationControls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a post pertaining to moderation (e.g. edit).
|
||||
*
|
||||
@ -58,7 +58,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(post: any, context: any): ItemList;
|
||||
function moderationControls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a post that are destructive (e.g. delete).
|
||||
*
|
||||
@ -68,7 +68,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(post: any, context: any): ItemList;
|
||||
function destructiveControls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a post that are destructive (e.g. delete).
|
||||
*
|
||||
@ -78,7 +78,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(post: any, context: any): ItemList;
|
||||
function destructiveControls(post: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Open the composer to edit a post.
|
||||
*
|
||||
|
@ -8,7 +8,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
function controls(user: any, context: any): ItemList;
|
||||
function controls(user: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get a list of controls for a user.
|
||||
*
|
||||
@ -18,7 +18,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
function controls(user: any, context: any): ItemList;
|
||||
function controls(user: any, context: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||
*
|
||||
@ -28,7 +28,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(): ItemList;
|
||||
function userControls(): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||
*
|
||||
@ -38,7 +38,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(): ItemList;
|
||||
function userControls(): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||
*
|
||||
@ -48,7 +48,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(user: any): ItemList;
|
||||
function moderationControls(user: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||
*
|
||||
@ -58,7 +58,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(user: any): ItemList;
|
||||
function moderationControls(user: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a user which are destructive (e.g. delete).
|
||||
*
|
||||
@ -68,7 +68,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(user: any): ItemList;
|
||||
function destructiveControls(user: any): ItemList<any>;
|
||||
/**
|
||||
* Get controls for a user which are destructive (e.g. delete).
|
||||
*
|
||||
@ -78,7 +78,7 @@ declare namespace _default {
|
||||
* @return {ItemList}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(user: any): ItemList;
|
||||
function destructiveControls(user: any): ItemList<any>;
|
||||
/**
|
||||
* Delete the user.
|
||||
*
|
||||
|
2
framework/core/js/dist/admin.js
generated
vendored
2
framework/core/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
framework/core/js/dist/admin.js.map
generated
vendored
2
framework/core/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
framework/core/js/dist/forum.js
generated
vendored
2
framework/core/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
framework/core/js/dist/forum.js.map
generated
vendored
2
framework/core/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user