Bundled output for commit be2da3e12f

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot 2022-04-19 20:19:26 +00:00
parent be2da3e12f
commit 42602a099f
20 changed files with 35 additions and 30 deletions

View File

@ -1,7 +1,7 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" />
import ItemList from '../../common/utils/ItemList';
import AdminPage from './AdminPage';
import { Children } from 'mithril';
import type { Children } from 'mithril';
export default class DashboardPage extends AdminPage {
headerInfo(): {
className: string;

View File

@ -1,4 +1,4 @@
import { Children, Vnode } from 'mithril';
import type { Children, Vnode } from 'mithril';
import Component, { ComponentAttrs } from '../../common/Component';
export interface IDashboardWidgetAttrs extends ComponentAttrs {
}

View File

@ -25,7 +25,7 @@ export interface SavedModelData {
}
export declare type ModelData = UnsavedModelData | SavedModelData;
export interface SaveRelationships {
[relationship: string]: Model | Model[];
[relationship: string]: null | Model | Model[];
}
export interface SaveAttributes {
[key: string]: unknown;

View File

@ -92,8 +92,8 @@ export default class Store {
/**
* Make a request to the API to find record(s) of a specific type.
*/
find<M extends Model>(type: string, params: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;
find<Ms extends Model[]>(type: string, params: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;
find<M extends Model>(type: string, params?: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;
find<Ms extends Model[]>(type: string, params?: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;
find<M extends Model>(type: string, id: string, params?: ApiQueryParamsSingle, options?: ApiQueryRequestOptions<ApiPayloadSingle>): Promise<ApiResponseSingle<M>>;
find<Ms extends Model[]>(type: string, ids: string[], params?: ApiQueryParamsPlural, options?: ApiQueryRequestOptions<ApiPayloadPlural>): Promise<ApiResponsePlural<Ms[number]>>;
/**

View File

@ -7,12 +7,6 @@
*
* - `when` - a callback returning true when the browser should prompt for
* confirmation before closing the window/tab
*
* ### Children
*
* NOTE: Only the first child will be rendered. (Use this component to wrap
* another component / DOM element.)
*
*/
export default class ConfirmDocumentUnload extends Component<import("../Component").ComponentAttrs, undefined> {
constructor();
@ -20,6 +14,6 @@ export default class ConfirmDocumentUnload extends Component<import("../Componen
oncreate(vnode: any): void;
boundHandler: (() => any) | undefined;
onremove(vnode: any): void;
view(vnode: any): any;
view(vnode: any): JSX.Element;
}
import Component from "../Component";

View File

@ -0,0 +1,8 @@
/**
* Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.
*
* @param userTitle: a user friendly title of the error, should be localized.
* @param consoleTitle: an error title that goes in the console, doesn't have to be localized.
* @param error: the error.
*/
export default function fireApplicationError(userTitle: string, consoleTitle: string, error: any): void;

View File

@ -13,6 +13,7 @@ export default class User extends Model {
avatarUrl(): string | null;
preferences(): Record<string, any> | null | undefined;
groups(): false | (Group | undefined)[];
isAdmin(): boolean | undefined;
joinTime(): Date | null | undefined;
lastSeenAt(): Date | null | undefined;
markedAllAsReadAt(): Date | null | undefined;

View File

@ -127,6 +127,7 @@ declare var _default: {
};
'utils/Pane': typeof Pane;
'utils/BasicEditorDriver': typeof BasicEditorDriver;
'utils/isSafariMobile': typeof isSafariMobile;
'states/ComposerState': typeof ComposerState;
'states/DiscussionListState': typeof DiscussionListState;
'states/GlobalSearchState': typeof GlobalSearchState;
@ -198,6 +199,7 @@ import slidable from "./utils/slidable";
import History from "./utils/History";
import alertEmailConfirmation from "./utils/alertEmailConfirmation";
import Pane from "./utils/Pane";
import isSafariMobile from "./utils/isSafariMobile";
import ComposerState from "./states/ComposerState";
import DiscussionListState from "./states/DiscussionListState";
import GlobalSearchState from "./states/GlobalSearchState";

View File

@ -1,9 +1,9 @@
import Component, { ComponentAttrs } from '../../common/Component';
import ItemList from '../../common/utils/ItemList';
import SubtreeRetainer from '../../common/utils/SubtreeRetainer';
import Discussion from '../../common/models/Discussion';
import Mithril from 'mithril';
import { DiscussionListParams } from '../states/DiscussionListState';
import type Discussion from '../../common/models/Discussion';
import type Mithril from 'mithril';
import type { DiscussionListParams } from '../states/DiscussionListState';
export interface IDiscussionListItemAttrs extends ComponentAttrs {
discussion: Discussion;
params: DiscussionListParams;

View File

@ -8,5 +8,5 @@ export default class DiscussionRenamedNotification extends Notification {
icon(): string;
href(): string;
content(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
excerpt(): string;
excerpt(): null;
}

View File

@ -1,6 +1,6 @@
import NotificationModel from '../../common/models/Notification';
import type NotificationModel from '../../common/models/Notification';
import Component, { ComponentAttrs } from '../../common/Component';
import Mithril from 'mithril';
import type Mithril from 'mithril';
export interface INotificationAttrs extends ComponentAttrs {
notification: NotificationModel;
}

View File

@ -1,8 +1,8 @@
import Component, { ComponentAttrs } from '../../common/Component';
import SubtreeRetainer from '../../common/utils/SubtreeRetainer';
import ItemList from '../../common/utils/ItemList';
import PostModel from '../../common/models/Post';
import Mithril from 'mithril';
import type PostModel from '../../common/models/Post';
import type Mithril from 'mithril';
export interface IPostAttrs extends ComponentAttrs {
post: PostModel;
}

View File

@ -1,7 +1,7 @@
import ForumApplication from './ForumApplication';
import Discussion from '../common/models/Discussion';
import Post from '../common/models/Post';
import User from '../common/models/User';
import type Post from '../common/models/Post';
import type User from '../common/models/User';
/**
* Helper functions to generate URLs to form pages.
*/

View File

@ -1,6 +1,6 @@
/// <reference types="node" />
import Discussion from '../../common/models/Discussion';
import Post from '../../common/models/Post';
import type Discussion from '../../common/models/Discussion';
import type Post from '../../common/models/Post';
export default class PostStreamState {
/**
* @see https://github.com/Microsoft/TypeScript/issues/3841#issuecomment-337560146

2
framework/core/js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@
*/
/*!
* focus-trap 6.7.2
* focus-trap 6.7.3
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/

File diff suppressed because one or more lines are too long

2
framework/core/js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@
*/
/*!
* focus-trap 6.7.2
* focus-trap 6.7.3
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/

File diff suppressed because one or more lines are too long