mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 07:42:48 +08:00
Bundled output for commit 7e6458a125
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
parent
7e6458a125
commit
77a0b11bc8
2
extensions/package-manager/js/dist-typings/components/Installer.d.ts
generated
vendored
2
extensions/package-manager/js/dist-typings/components/Installer.d.ts
generated
vendored
|
@ -3,7 +3,7 @@ import Component, { ComponentAttrs } from 'flarum/common/Component';
|
|||
import Stream from 'flarum/common/utils/Stream';
|
||||
export interface InstallerAttrs extends ComponentAttrs {
|
||||
}
|
||||
export type InstallerLoadingTypes = 'extension-install' | null;
|
||||
export declare type InstallerLoadingTypes = 'extension-install' | null;
|
||||
export default class Installer extends Component<InstallerAttrs> {
|
||||
packageName: Stream<string>;
|
||||
oninit(vnode: Mithril.Vnode<InstallerAttrs, this>): void;
|
||||
|
|
2
extensions/package-manager/js/dist-typings/components/MajorUpdater.d.ts
generated
vendored
2
extensions/package-manager/js/dist-typings/components/MajorUpdater.d.ts
generated
vendored
|
@ -5,7 +5,7 @@ export interface MajorUpdaterAttrs extends ComponentAttrs {
|
|||
coreUpdate: UpdatedPackage;
|
||||
updateState: UpdateState;
|
||||
}
|
||||
export type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';
|
||||
export declare type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';
|
||||
export default class MajorUpdater<T extends MajorUpdaterAttrs = MajorUpdaterAttrs> extends Component<T> {
|
||||
updateState: UpdateState;
|
||||
oninit(vnode: Mithril.Vnode<T, this>): void;
|
||||
|
|
2
extensions/package-manager/js/dist-typings/components/Updater.d.ts
generated
vendored
2
extensions/package-manager/js/dist-typings/components/Updater.d.ts
generated
vendored
|
@ -3,7 +3,7 @@ import Component, { ComponentAttrs } from 'flarum/common/Component';
|
|||
import ItemList from '@flarum/core/src/common/utils/ItemList';
|
||||
export interface IUpdaterAttrs extends ComponentAttrs {
|
||||
}
|
||||
export type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;
|
||||
export declare type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;
|
||||
export default class Updater extends Component<IUpdaterAttrs> {
|
||||
view(): (JSX.Element | null)[];
|
||||
lastUpdateCheckView(): JSX.Element | null;
|
||||
|
|
2
extensions/package-manager/js/dist-typings/models/Task.d.ts
generated
vendored
2
extensions/package-manager/js/dist-typings/models/Task.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
import Model from 'flarum/common/Model';
|
||||
export type TaskOperations = 'extension_install' | 'extension_remove' | 'extension_update' | 'update_global' | 'update_minor' | 'update_major' | 'update_check' | 'why_not';
|
||||
export declare type TaskOperations = 'extension_install' | 'extension_remove' | 'extension_update' | 'update_global' | 'update_minor' | 'update_major' | 'update_check' | 'why_not';
|
||||
export default class Task extends Model {
|
||||
status(): "running" | "pending" | "success" | "failure";
|
||||
operation(): TaskOperations;
|
||||
|
|
18
extensions/package-manager/js/dist-typings/states/ControlSectionState.d.ts
generated
vendored
18
extensions/package-manager/js/dist-typings/states/ControlSectionState.d.ts
generated
vendored
|
@ -2,7 +2,7 @@ import { UpdaterLoadingTypes } from '../components/Updater';
|
|||
import { InstallerLoadingTypes } from '../components/Installer';
|
||||
import { MajorUpdaterLoadingTypes } from '../components/MajorUpdater';
|
||||
import { Extension } from 'flarum/admin/AdminApplication';
|
||||
export type UpdatedPackage = {
|
||||
export declare type UpdatedPackage = {
|
||||
name: string;
|
||||
version: string;
|
||||
latest: string;
|
||||
|
@ -11,28 +11,28 @@ export type UpdatedPackage = {
|
|||
'latest-status': string;
|
||||
description: string;
|
||||
};
|
||||
export type ComposerUpdates = {
|
||||
export declare type ComposerUpdates = {
|
||||
installed: UpdatedPackage[];
|
||||
};
|
||||
export type LastUpdateCheck = {
|
||||
export declare type LastUpdateCheck = {
|
||||
checkedAt: Date | null;
|
||||
updates: ComposerUpdates;
|
||||
};
|
||||
type UpdateType = 'major' | 'minor' | 'global';
|
||||
type UpdateStatus = 'success' | 'failure' | null;
|
||||
export type UpdateState = {
|
||||
declare type UpdateType = 'major' | 'minor' | 'global';
|
||||
declare type UpdateStatus = 'success' | 'failure' | null;
|
||||
export declare type UpdateState = {
|
||||
ranAt: Date | null;
|
||||
status: UpdateStatus;
|
||||
limitedPackages: string[];
|
||||
incompatibleExtensions: string[];
|
||||
};
|
||||
export type LastUpdateRun = {
|
||||
export declare type LastUpdateRun = {
|
||||
[key in UpdateType]: UpdateState;
|
||||
} & {
|
||||
limitedPackages: () => string[];
|
||||
};
|
||||
export type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;
|
||||
export type CoreUpdate = {
|
||||
export declare type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;
|
||||
export declare type CoreUpdate = {
|
||||
package: UpdatedPackage;
|
||||
extension: Extension;
|
||||
};
|
||||
|
|
2
extensions/pusher/js/dist-typings/forum/index.d.ts
generated
vendored
2
extensions/pusher/js/dist-typings/forum/index.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
import * as PusherTypes from 'pusher-js';
|
||||
export type PusherBinding = {
|
||||
export declare type PusherBinding = {
|
||||
channels: {
|
||||
main: PusherTypes.Channel;
|
||||
user: PusherTypes.Channel | null;
|
||||
|
|
2
extensions/tags/js/dist-typings/common/components/TagSelectionModal.d.ts
generated
vendored
2
extensions/tags/js/dist-typings/common/components/TagSelectionModal.d.ts
generated
vendored
|
@ -44,7 +44,7 @@ export interface ITagSelectionModalAttrs extends IInternalModalAttrs {
|
|||
/** Callback for when the selection is submitted. */
|
||||
onsubmit?: (selected: Tag[]) => void;
|
||||
}
|
||||
export type ITagSelectionModalState = undefined;
|
||||
export declare type ITagSelectionModalState = undefined;
|
||||
export default class TagSelectionModal<CustomAttrs extends ITagSelectionModalAttrs = ITagSelectionModalAttrs, CustomState extends ITagSelectionModalState = ITagSelectionModalState> extends Modal<CustomAttrs, CustomState> {
|
||||
protected loading: boolean;
|
||||
protected tags: Tag[];
|
||||
|
|
2
framework/core/js/dist-typings/admin/AdminApplication.d.ts
generated
vendored
2
framework/core/js/dist-typings/admin/AdminApplication.d.ts
generated
vendored
|
@ -2,7 +2,7 @@ import { AdminRoutes } from './routes';
|
|||
import Application, { ApplicationData } from '../common/Application';
|
||||
import ExtensionData from './utils/ExtensionData';
|
||||
import IHistory from '../common/IHistory';
|
||||
export type Extension = {
|
||||
export declare type Extension = {
|
||||
id: string;
|
||||
name: string;
|
||||
version: string;
|
||||
|
|
12
framework/core/js/dist-typings/admin/components/AdminPage.d.ts
generated
vendored
12
framework/core/js/dist-typings/admin/components/AdminPage.d.ts
generated
vendored
|
@ -22,7 +22,7 @@ export interface AdminHeaderOptions {
|
|||
*
|
||||
* @see https://github.com/flarum/core/issues/3039
|
||||
*/
|
||||
export type HTMLInputTypes = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
||||
export declare type HTMLInputTypes = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
||||
export interface CommonSettingsItemOptions extends Mithril.Attributes {
|
||||
setting: string;
|
||||
label?: Mithril.Children;
|
||||
|
@ -80,14 +80,14 @@ export interface CustomSettingComponentOptions extends CommonSettingsItemOptions
|
|||
/**
|
||||
* All valid options for the setting component builder.
|
||||
*/
|
||||
export type SettingsComponentOptions = HTMLInputSettingsComponentOptions | SwitchSettingComponentOptions | SelectSettingComponentOptions | TextareaSettingComponentOptions | ColorPreviewSettingComponentOptions | CustomSettingComponentOptions;
|
||||
export declare type SettingsComponentOptions = HTMLInputSettingsComponentOptions | SwitchSettingComponentOptions | SelectSettingComponentOptions | TextareaSettingComponentOptions | ColorPreviewSettingComponentOptions | CustomSettingComponentOptions;
|
||||
/**
|
||||
* Valid attrs that can be returned by the `headerInfo` function
|
||||
*/
|
||||
export type AdminHeaderAttrs = AdminHeaderOptions & Partial<Omit<Mithril.Attributes, 'class'>>;
|
||||
export type SettingValue = string;
|
||||
export type MutableSettings = Record<string, Stream<SettingValue>>;
|
||||
export type SaveSubmitEvent = SubmitEvent & {
|
||||
export declare type AdminHeaderAttrs = AdminHeaderOptions & Partial<Omit<Mithril.Attributes, 'class'>>;
|
||||
export declare type SettingValue = string;
|
||||
export declare type MutableSettings = Record<string, Stream<SettingValue>>;
|
||||
export declare type SaveSubmitEvent = SubmitEvent & {
|
||||
redraw: boolean;
|
||||
};
|
||||
export default abstract class AdminPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {
|
||||
|
|
2
framework/core/js/dist-typings/admin/components/BasicsPage.d.ts
generated
vendored
2
framework/core/js/dist-typings/admin/components/BasicsPage.d.ts
generated
vendored
|
@ -3,7 +3,7 @@ import ItemList from '../../common/utils/ItemList';
|
|||
import AdminPage from './AdminPage';
|
||||
import type { IPageAttrs } from '../../common/components/Page';
|
||||
import type Mithril from 'mithril';
|
||||
export type HomePageItem = {
|
||||
export declare type HomePageItem = {
|
||||
path: string;
|
||||
label: Mithril.Children;
|
||||
};
|
||||
|
|
4
framework/core/js/dist-typings/admin/components/PermissionGrid.d.ts
generated
vendored
4
framework/core/js/dist-typings/admin/components/PermissionGrid.d.ts
generated
vendored
|
@ -12,8 +12,8 @@ export interface PermissionSetting {
|
|||
icon: string;
|
||||
label: Mithril.Children;
|
||||
}
|
||||
export type PermissionGridEntry = PermissionConfig | PermissionSetting;
|
||||
export type PermissionType = 'view' | 'start' | 'reply' | 'moderate';
|
||||
export declare type PermissionGridEntry = PermissionConfig | PermissionSetting;
|
||||
export declare type PermissionType = 'view' | 'start' | 'reply' | 'moderate';
|
||||
export interface ScopeItem {
|
||||
label: Mithril.Children;
|
||||
render: (permission: PermissionGridEntry) => Mithril.Children;
|
||||
|
|
2
framework/core/js/dist-typings/admin/components/SettingDropdown.d.ts
generated
vendored
2
framework/core/js/dist-typings/admin/components/SettingDropdown.d.ts
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
import SelectDropdown, { ISelectDropdownAttrs } from '../../common/components/SelectDropdown';
|
||||
import Mithril from 'mithril';
|
||||
export type SettingDropdownOption = {
|
||||
export declare type SettingDropdownOption = {
|
||||
value: any;
|
||||
label: string;
|
||||
};
|
||||
|
|
2
framework/core/js/dist-typings/admin/components/UserListPage.d.ts
generated
vendored
2
framework/core/js/dist-typings/admin/components/UserListPage.d.ts
generated
vendored
|
@ -3,7 +3,7 @@ import type Mithril from 'mithril';
|
|||
import type User from '../../common/models/User';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import AdminPage from './AdminPage';
|
||||
type ColumnData = {
|
||||
declare type ColumnData = {
|
||||
/**
|
||||
* Column title
|
||||
*/
|
||||
|
|
12
framework/core/js/dist-typings/admin/utils/ExtensionData.d.ts
generated
vendored
12
framework/core/js/dist-typings/admin/utils/ExtensionData.d.ts
generated
vendored
|
@ -3,12 +3,12 @@ import ItemList from '../../common/utils/ItemList';
|
|||
import { SettingsComponentOptions } from '../components/AdminPage';
|
||||
import ExtensionPage, { ExtensionPageAttrs } from '../components/ExtensionPage';
|
||||
import { PermissionConfig, PermissionType } from '../components/PermissionGrid';
|
||||
type SettingConfigInput = SettingsComponentOptions | (() => Mithril.Children);
|
||||
type SettingConfigInternal = SettingsComponentOptions | ((() => Mithril.Children) & {
|
||||
declare type SettingConfigInput = SettingsComponentOptions | (() => Mithril.Children);
|
||||
declare type SettingConfigInternal = SettingsComponentOptions | ((() => Mithril.Children) & {
|
||||
setting: string;
|
||||
});
|
||||
export type CustomExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionPageAttrs> = new () => ExtensionPage<Attrs>;
|
||||
type ExtensionConfig = {
|
||||
export declare type CustomExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionPageAttrs> = new () => ExtensionPage<Attrs>;
|
||||
declare type ExtensionConfig = {
|
||||
settings?: ItemList<SettingConfigInternal>;
|
||||
permissions?: {
|
||||
view?: ItemList<PermissionConfig>;
|
||||
|
@ -18,13 +18,13 @@ type ExtensionConfig = {
|
|||
};
|
||||
page?: CustomExtensionPage;
|
||||
};
|
||||
type InnerDataNoActiveExtension = {
|
||||
declare type InnerDataNoActiveExtension = {
|
||||
currentExtension: null;
|
||||
data: {
|
||||
[key: string]: ExtensionConfig | undefined;
|
||||
};
|
||||
};
|
||||
type InnerDataActiveExtension = {
|
||||
declare type InnerDataActiveExtension = {
|
||||
currentExtension: string;
|
||||
data: {
|
||||
[key: string]: ExtensionConfig;
|
||||
|
|
6
framework/core/js/dist-typings/common/Application.d.ts
generated
vendored
6
framework/core/js/dist-typings/common/Application.d.ts
generated
vendored
|
@ -15,8 +15,8 @@ import type { ComponentAttrs } from './Component';
|
|||
import Model, { SavedModelData } from './Model';
|
||||
import IHistory from './IHistory';
|
||||
import IExtender from './extenders/IExtender';
|
||||
export type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';
|
||||
export type FlarumGenericRoute = RouteItem<any, any, any>;
|
||||
export declare type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';
|
||||
export declare type FlarumGenericRoute = RouteItem<any, any, any>;
|
||||
export interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {
|
||||
errorHandler?: (error: RequestError) => void;
|
||||
url: string;
|
||||
|
@ -36,7 +36,7 @@ export interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.Request
|
|||
/**
|
||||
* A valid route definition.
|
||||
*/
|
||||
export type RouteItem<Attrs extends ComponentAttrs, Comp extends Component<Attrs & {
|
||||
export declare type RouteItem<Attrs extends ComponentAttrs, Comp extends Component<Attrs & {
|
||||
routeName: string;
|
||||
}>, RouteArgs extends Record<string, unknown> = {}> = {
|
||||
/**
|
||||
|
|
2
framework/core/js/dist-typings/common/Model.d.ts
generated
vendored
2
framework/core/js/dist-typings/common/Model.d.ts
generated
vendored
|
@ -23,7 +23,7 @@ export interface SavedModelData {
|
|||
attributes?: ModelAttributes;
|
||||
relationships?: ModelRelationships;
|
||||
}
|
||||
export type ModelData = UnsavedModelData | SavedModelData;
|
||||
export declare type ModelData = UnsavedModelData | SavedModelData;
|
||||
export interface SaveRelationships {
|
||||
[relationship: string]: null | Model | Model[];
|
||||
}
|
||||
|
|
2
framework/core/js/dist-typings/common/Session.d.ts
generated
vendored
2
framework/core/js/dist-typings/common/Session.d.ts
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
import User from './models/User';
|
||||
import { FlarumRequestOptions } from './Application';
|
||||
export type LoginParams = {
|
||||
export declare type LoginParams = {
|
||||
/**
|
||||
* The username/email
|
||||
*/
|
||||
|
|
10
framework/core/js/dist-typings/common/Store.d.ts
generated
vendored
10
framework/core/js/dist-typings/common/Store.d.ts
generated
vendored
|
@ -25,7 +25,7 @@ export interface ApiQueryParamsPlural {
|
|||
sort?: string;
|
||||
meta?: MetaInformation;
|
||||
}
|
||||
export type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;
|
||||
export declare type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;
|
||||
export interface ApiPayloadSingle {
|
||||
data: SavedModelData;
|
||||
included?: SavedModelData[];
|
||||
|
@ -41,14 +41,14 @@ export interface ApiPayloadPlural {
|
|||
};
|
||||
meta?: MetaInformation;
|
||||
}
|
||||
export type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;
|
||||
export type ApiResponseSingle<M extends Model> = M & {
|
||||
export declare type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;
|
||||
export declare type ApiResponseSingle<M extends Model> = M & {
|
||||
payload: ApiPayloadSingle;
|
||||
};
|
||||
export type ApiResponsePlural<M extends Model> = M[] & {
|
||||
export declare type ApiResponsePlural<M extends Model> = M[] & {
|
||||
payload: ApiPayloadPlural;
|
||||
};
|
||||
export type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;
|
||||
export declare type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;
|
||||
interface ApiQueryRequestOptions<ResponseType> extends Omit<FlarumRequestOptions<ResponseType>, 'url'> {
|
||||
}
|
||||
interface StoreData {
|
||||
|
|
4
framework/core/js/dist-typings/common/Translator.d.ts
generated
vendored
4
framework/core/js/dist-typings/common/Translator.d.ts
generated
vendored
|
@ -1,8 +1,8 @@
|
|||
/// <reference path="../@types/translator-icu-rich.d.ts" />
|
||||
import { RichMessageFormatter } from '@askvortsov/rich-icu-message-formatter';
|
||||
import { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';
|
||||
type Translations = Record<string, string>;
|
||||
type TranslatorParameters = Record<string, unknown>;
|
||||
declare type Translations = Record<string, string>;
|
||||
declare type TranslatorParameters = Record<string, unknown>;
|
||||
export default class Translator {
|
||||
/**
|
||||
* A map of translation keys to their translated values.
|
||||
|
|
2
framework/core/js/dist-typings/common/extenders/Routes.d.ts
generated
vendored
2
framework/core/js/dist-typings/common/extenders/Routes.d.ts
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
import Application from '../Application';
|
||||
import IExtender, { IExtensionModule } from './IExtender';
|
||||
type HelperRoute = (...args: any) => string;
|
||||
declare type HelperRoute = (...args: any) => string;
|
||||
export default class Routes implements IExtender {
|
||||
private routes;
|
||||
private helpers;
|
||||
|
|
14
framework/core/js/dist-typings/common/helpers/listItems.d.ts
generated
vendored
14
framework/core/js/dist-typings/common/helpers/listItems.d.ts
generated
vendored
|
@ -1,26 +1,26 @@
|
|||
import type Mithril from 'mithril';
|
||||
import { ComponentAttrs } from '../Component';
|
||||
type ModdedVnodeAttrs = {
|
||||
declare type ModdedVnodeAttrs = {
|
||||
itemClassName?: string;
|
||||
key?: string;
|
||||
};
|
||||
type ModdedTag = Mithril.Vnode['tag'] & {
|
||||
declare type ModdedTag = Mithril.Vnode['tag'] & {
|
||||
isListItem?: boolean;
|
||||
isActive?: (attrs: ComponentAttrs) => boolean;
|
||||
};
|
||||
type ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & {
|
||||
declare type ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & {
|
||||
itemName?: string;
|
||||
itemClassName?: string;
|
||||
tag: ModdedTag;
|
||||
};
|
||||
type ModdedChild = ModdedVnode | string | number | boolean | null | undefined;
|
||||
type ModdedChildArray = ModdedChildren[];
|
||||
type ModdedChildren = ModdedChild | ModdedChildArray;
|
||||
declare type ModdedChild = ModdedVnode | string | number | boolean | null | undefined;
|
||||
declare type ModdedChildArray = ModdedChildren[];
|
||||
declare type ModdedChildren = ModdedChild | ModdedChildArray;
|
||||
/**
|
||||
* This type represents an element of a list returned by `ItemList.toArray()`,
|
||||
* coupled with some static properties used on various components.
|
||||
*/
|
||||
export type ModdedChildrenWithItemName = ModdedChildren & {
|
||||
export declare type ModdedChildrenWithItemName = ModdedChildren & {
|
||||
itemName?: string;
|
||||
};
|
||||
/**
|
||||
|
|
4
framework/core/js/dist-typings/common/states/AlertManagerState.d.ts
generated
vendored
4
framework/core/js/dist-typings/common/states/AlertManagerState.d.ts
generated
vendored
|
@ -3,8 +3,8 @@ import Alert, { AlertAttrs } from '../components/Alert';
|
|||
/**
|
||||
* Returned by `AlertManagerState.show`. Used to dismiss alerts.
|
||||
*/
|
||||
export type AlertIdentifier = number;
|
||||
export type AlertArray = {
|
||||
export declare type AlertIdentifier = number;
|
||||
export declare type AlertArray = {
|
||||
[id: AlertIdentifier]: AlertState;
|
||||
};
|
||||
export interface AlertState {
|
||||
|
|
4
framework/core/js/dist-typings/common/states/ModalManagerState.d.ts
generated
vendored
4
framework/core/js/dist-typings/common/states/ModalManagerState.d.ts
generated
vendored
|
@ -7,11 +7,11 @@ import Modal, { IDismissibleOptions } from '../components/Modal';
|
|||
* https://github.com/Microsoft/TypeScript/issues/1213
|
||||
* Therefore, we have to use this ugly, messy workaround.
|
||||
*/
|
||||
type UnsafeModalClass = ComponentClass<any, Modal> & {
|
||||
declare type UnsafeModalClass = ComponentClass<any, Modal> & {
|
||||
get dismissibleOptions(): IDismissibleOptions;
|
||||
component: typeof Component.component;
|
||||
};
|
||||
type ModalItem = {
|
||||
declare type ModalItem = {
|
||||
componentClass: UnsafeModalClass;
|
||||
attrs?: Record<string, unknown>;
|
||||
key: number;
|
||||
|
|
4
framework/core/js/dist-typings/common/utils/KeyboardNavigatable.d.ts
generated
vendored
4
framework/core/js/dist-typings/common/utils/KeyboardNavigatable.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
type KeyboardEventHandler = (event: KeyboardEvent) => void;
|
||||
type ShouldHandle = (event: KeyboardEvent) => boolean;
|
||||
declare type KeyboardEventHandler = (event: KeyboardEvent) => void;
|
||||
declare type ShouldHandle = (event: KeyboardEvent) => boolean;
|
||||
/**
|
||||
* The `KeyboardNavigatable` class manages lists that can be navigated with the
|
||||
* keyboard, calling callbacks for each actions.
|
||||
|
|
2
framework/core/js/dist-typings/common/utils/RequestError.d.ts
generated
vendored
2
framework/core/js/dist-typings/common/utils/RequestError.d.ts
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
import type Mithril from 'mithril';
|
||||
import type { AlertAttrs } from '../components/Alert';
|
||||
export type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {
|
||||
export declare type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {
|
||||
url: string;
|
||||
};
|
||||
export default class RequestError<ResponseType = string> {
|
||||
|
|
47
framework/core/js/dist-typings/common/utils/evented.d.ts
generated
vendored
47
framework/core/js/dist-typings/common/utils/evented.d.ts
generated
vendored
|
@ -10,6 +10,16 @@ declare namespace _default {
|
|||
* @deprecated
|
||||
*/
|
||||
function getHandlers(event: string): Function[];
|
||||
/**
|
||||
* Get all of the registered handlers for an event.
|
||||
*
|
||||
* @param {string} event The name of the event.
|
||||
* @return {Function[]}
|
||||
* @protected
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function getHandlers(event: string): Function[];
|
||||
/**
|
||||
* Trigger an event.
|
||||
*
|
||||
|
@ -19,6 +29,24 @@ declare namespace _default {
|
|||
* @deprecated
|
||||
*/
|
||||
function trigger(event: string, ...args: any[]): void;
|
||||
/**
|
||||
* Trigger an event.
|
||||
*
|
||||
* @param {string} event The name of the event.
|
||||
* @param {any[]} args Arguments to pass to event handlers.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function trigger(event: string, ...args: any[]): void;
|
||||
/**
|
||||
* Register an event handler.
|
||||
*
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function to handle the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function on(event: string, handler: Function): void;
|
||||
/**
|
||||
* Register an event handler.
|
||||
*
|
||||
|
@ -38,6 +66,25 @@ declare namespace _default {
|
|||
* @deprecated
|
||||
*/
|
||||
function one(event: string, handler: Function): void;
|
||||
/**
|
||||
* Register an event handler so that it will run only once, and then
|
||||
* unregister itself.
|
||||
*
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function to handle the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function one(event: string, handler: Function): void;
|
||||
/**
|
||||
* Unregister an event handler.
|
||||
*
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function that handles the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function off(event: string, handler: Function): void;
|
||||
/**
|
||||
* Unregister an event handler.
|
||||
*
|
||||
|
|
2
framework/core/js/dist-typings/forum/components/SignUpModal.d.ts
generated
vendored
2
framework/core/js/dist-typings/forum/components/SignUpModal.d.ts
generated
vendored
|
@ -10,7 +10,7 @@ export interface ISignupModalAttrs extends IInternalModalAttrs {
|
|||
token?: string;
|
||||
provided?: string[];
|
||||
}
|
||||
export type SignupBody = {
|
||||
export declare type SignupBody = {
|
||||
username: string;
|
||||
email: string;
|
||||
} & ({
|
||||
|
|
2
framework/core/js/dist-typings/forum/states/GlobalSearchState.d.ts
generated
vendored
2
framework/core/js/dist-typings/forum/states/GlobalSearchState.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
import SearchState from './SearchState';
|
||||
type SearchParams = Record<string, string>;
|
||||
declare type SearchParams = Record<string, string>;
|
||||
export default class GlobalSearchState extends SearchState {
|
||||
private initialValueSet;
|
||||
constructor(cachedSearches?: never[]);
|
||||
|
|
74
framework/core/js/dist-typings/forum/utils/DiscussionControls.d.ts
generated
vendored
74
framework/core/js/dist-typings/forum/utils/DiscussionControls.d.ts
generated
vendored
|
@ -1,4 +1,13 @@
|
|||
declare namespace _default {
|
||||
/**
|
||||
* Get a list of controls for a discussion.
|
||||
*
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
@ -19,6 +28,17 @@ declare namespace _default {
|
|||
* @protected
|
||||
*/
|
||||
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,
|
||||
* follow).
|
||||
*
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
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).
|
||||
*
|
||||
|
@ -29,6 +49,26 @@ declare namespace _default {
|
|||
* @protected
|
||||
*/
|
||||
function moderationControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||
*
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion which are destructive (e.g. delete).
|
||||
*
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion which are destructive (e.g. delete).
|
||||
*
|
||||
|
@ -51,12 +91,36 @@ declare namespace _default {
|
|||
* @return {Promise<void>}
|
||||
*/
|
||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||
/**
|
||||
* Open the reply composer for the discussion. A promise will be returned,
|
||||
* 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
|
||||
* reply, the promise will be rejected.
|
||||
*
|
||||
* @param {boolean} goToLast Whether or not to scroll down to the last post if 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.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||
/**
|
||||
* Hide a discussion.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Hide a discussion.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a discussion.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a discussion.
|
||||
*
|
||||
|
@ -69,6 +133,16 @@ declare namespace _default {
|
|||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(): Promise<void>;
|
||||
/**
|
||||
* Delete the discussion after confirming with the user.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(): Promise<void>;
|
||||
/**
|
||||
* Rename the discussion.
|
||||
*/
|
||||
function renameAction(): any;
|
||||
/**
|
||||
* Rename the discussion.
|
||||
*/
|
||||
|
|
63
framework/core/js/dist-typings/forum/utils/PostControls.d.ts
generated
vendored
63
framework/core/js/dist-typings/forum/utils/PostControls.d.ts
generated
vendored
|
@ -8,6 +8,25 @@ declare namespace _default {
|
|||
* @return {ItemList<import('mithril').Children>}')}
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
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).
|
||||
*
|
||||
|
@ -28,6 +47,26 @@ declare namespace _default {
|
|||
* @protected
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
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).
|
||||
*
|
||||
|
@ -44,6 +83,18 @@ declare namespace _default {
|
|||
* @return {Promise<void>}
|
||||
*/
|
||||
function editAction(): Promise<void>;
|
||||
/**
|
||||
* Open the composer to edit a post.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function editAction(): Promise<void>;
|
||||
/**
|
||||
* Hide a post.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Hide a post.
|
||||
*
|
||||
|
@ -56,6 +107,18 @@ declare namespace _default {
|
|||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a post.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Delete a post.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(context: any): Promise<void>;
|
||||
/**
|
||||
* Delete a post.
|
||||
*
|
||||
|
|
58
framework/core/js/dist-typings/forum/utils/UserControls.d.ts
generated
vendored
58
framework/core/js/dist-typings/forum/utils/UserControls.d.ts
generated
vendored
|
@ -8,6 +8,25 @@ declare namespace _default {
|
|||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||
*
|
||||
|
@ -28,6 +47,26 @@ declare namespace _default {
|
|||
* @protected
|
||||
*/
|
||||
function moderationControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user which are destructive (e.g. delete).
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user which are destructive (e.g. delete).
|
||||
*
|
||||
|
@ -44,6 +83,19 @@ declare namespace _default {
|
|||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function deleteAction(user: import("../../common/models/User").default): void;
|
||||
/**
|
||||
* Delete the user.
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function deleteAction(user: import("../../common/models/User").default): void;
|
||||
/**
|
||||
* Show deletion alert of user.
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {string} type
|
||||
*/
|
||||
function showDeletionAlert(user: import("../../common/models/User").default, type: string): void;
|
||||
/**
|
||||
* Show deletion alert of user.
|
||||
*
|
||||
|
@ -57,6 +109,12 @@ declare namespace _default {
|
|||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function editAction(user: import("../../common/models/User").default): void;
|
||||
/**
|
||||
* Edit the user.
|
||||
*
|
||||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function editAction(user: import("../../common/models/User").default): void;
|
||||
}
|
||||
export default _default;
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
|
Loading…
Reference in New Issue
Block a user