mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Bundled output for commit 1ab3029e78
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
2
extensions/likes/js/dist/forum.js
generated
vendored
2
extensions/likes/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/likes/js/dist/forum.js.map
generated
vendored
2
extensions/likes/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/mentions/js/dist/admin.js
generated
vendored
2
extensions/mentions/js/dist/admin.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
(()=>{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const r=flarum.reg.get("core","admin/app");var a=e.n(r);a().initializers.add("flarum-mentions",(()=>{a().extensionData.for("flarum-mentions").registerSetting({setting:"flarum-mentions.allow_username_format",type:"boolean",label:a().translator.trans("flarum-mentions.admin.settings.allow_username_format_label"),help:a().translator.trans("flarum-mentions.admin.settings.allow_username_format_text")}).registerPermission({permission:"mentionGroups",label:a().translator.trans("flarum-mentions.admin.permissions.mention_groups_label"),icon:"fas fa-at"},"start")}))})(),module.exports=t})();
|
(()=>{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t),e.d(t,{extend:()=>u});const r=flarum.reg.get("core","admin/app");var n=e.n(r);const a=flarum.reg.get("core","common/extenders");var o=e.n(a);const s=flarum.reg.get("core","common/query/IGambit"),m=flarum.reg.get("core","common/app");var i=e.n(m);class l extends s.KeyValueGambit{key(){return i().translator.trans("flarum-mentions.lib.gambits.posts.mentioned.key",{},!0)}hint(){return i().translator.trans("flarum-mentions.lib.gambits.posts.mentioned.hint",{},!0)}filterKey(){return"mentioned"}}flarum.reg.add("flarum-mentions","common/query/posts/MentionedGambit",l);const u=[(new(o().Search)).gambit("posts",l)];n().initializers.add("flarum-mentions",(()=>{n().extensionData.for("flarum-mentions").registerSetting({setting:"flarum-mentions.allow_username_format",type:"boolean",label:n().translator.trans("flarum-mentions.admin.settings.allow_username_format_label"),help:n().translator.trans("flarum-mentions.admin.settings.allow_username_format_text")}).registerPermission({permission:"mentionGroups",label:n().translator.trans("flarum-mentions.admin.permissions.mention_groups_label"),icon:"fas fa-at"},"start")}))})(),module.exports=t})();
|
||||||
//# sourceMappingURL=admin.js.map
|
//# sourceMappingURL=admin.js.map
|
2
extensions/mentions/js/dist/admin.js.map
generated
vendored
2
extensions/mentions/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/mentions/js/dist/forum.js
generated
vendored
2
extensions/mentions/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/mentions/js/dist/forum.js.map
generated
vendored
2
extensions/mentions/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
4
framework/core/js/dist-typings/common/helpers/highlight.d.ts
generated
vendored
4
framework/core/js/dist-typings/common/helpers/highlight.d.ts
generated
vendored
@@ -7,5 +7,7 @@ import type Mithril from 'mithril';
|
|||||||
* @param phrase The word or words to highlight.
|
* @param phrase The word or words to highlight.
|
||||||
* @param [length] The number of characters to truncate the string to.
|
* @param [length] The number of characters to truncate the string to.
|
||||||
* The string will be truncated surrounding the first match.
|
* The string will be truncated surrounding the first match.
|
||||||
|
* @param safe Whether the content is safe to render as HTML or
|
||||||
|
* should be escaped (HTML entities encoded).
|
||||||
*/
|
*/
|
||||||
export default function highlight(string: string, phrase?: string | RegExp, length?: number): Mithril.Vnode<any, any> | string;
|
export default function highlight(string: string, phrase?: string | RegExp, length?: number, safe?: boolean): Mithril.Vnode<any, any> | string;
|
||||||
|
6
framework/core/js/dist-typings/common/query/discussions/DiscussionGambit.d.ts
generated
vendored
Normal file
6
framework/core/js/dist-typings/common/query/discussions/DiscussionGambit.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { KeyValueGambit } from '../IGambit';
|
||||||
|
export default class DiscussionGambit extends KeyValueGambit {
|
||||||
|
key(): string;
|
||||||
|
hint(): string;
|
||||||
|
filterKey(): string;
|
||||||
|
}
|
14
framework/core/js/dist-typings/common/states/PageState.d.ts
generated
vendored
14
framework/core/js/dist-typings/common/states/PageState.d.ts
generated
vendored
@@ -1,7 +1,9 @@
|
|||||||
export default class PageState {
|
export default class PageState {
|
||||||
constructor(type: any, data?: {});
|
type: Function | null;
|
||||||
type: any;
|
data: {
|
||||||
data: {};
|
routeName?: string | null;
|
||||||
|
} & Record<string, any>;
|
||||||
|
constructor(type: Function | null, data?: any);
|
||||||
/**
|
/**
|
||||||
* Determine whether the page matches the given class and data.
|
* Determine whether the page matches the given class and data.
|
||||||
*
|
*
|
||||||
@@ -9,7 +11,7 @@ export default class PageState {
|
|||||||
* @param {Record<string, unknown>} data
|
* @param {Record<string, unknown>} data
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
matches(type: object, data?: Record<string, unknown>): boolean;
|
matches(type: Function, data?: any): boolean;
|
||||||
get(key: any): any;
|
get(key: string): any;
|
||||||
set(key: any, value: any): void;
|
set(key: string, value: any): void;
|
||||||
}
|
}
|
||||||
|
6
framework/core/js/dist-typings/common/states/PaginatedListState.d.ts
generated
vendored
6
framework/core/js/dist-typings/common/states/PaginatedListState.d.ts
generated
vendored
@@ -25,7 +25,7 @@ export default abstract class PaginatedListState<T extends Model, P extends Pagi
|
|||||||
*/
|
*/
|
||||||
static DEFAULT_PAGE_SIZE: number;
|
static DEFAULT_PAGE_SIZE: number;
|
||||||
protected location: PaginationLocation;
|
protected location: PaginationLocation;
|
||||||
protected pageSize: number | null;
|
pageSize: number | null;
|
||||||
protected pages: Page<T>[];
|
protected pages: Page<T>[];
|
||||||
protected params: P;
|
protected params: P;
|
||||||
protected initialLoading: boolean;
|
protected initialLoading: boolean;
|
||||||
@@ -88,4 +88,8 @@ export default abstract class PaginatedListState<T extends Model, P extends Pagi
|
|||||||
protected getPrevPageNumber(): number;
|
protected getPrevPageNumber(): number;
|
||||||
protected paramsChanged(newParams: P): boolean;
|
protected paramsChanged(newParams: P): boolean;
|
||||||
protected getAllItems(): T[];
|
protected getAllItems(): T[];
|
||||||
|
/**
|
||||||
|
* In the last request, has the user searched for a model?
|
||||||
|
*/
|
||||||
|
isSearchResults(): boolean;
|
||||||
}
|
}
|
||||||
|
5
framework/core/js/dist-typings/forum/components/DiscussionListItem.d.ts
generated
vendored
5
framework/core/js/dist-typings/forum/components/DiscussionListItem.d.ts
generated
vendored
@@ -4,9 +4,14 @@ import SubtreeRetainer from '../../common/utils/SubtreeRetainer';
|
|||||||
import type Discussion from '../../common/models/Discussion';
|
import type Discussion from '../../common/models/Discussion';
|
||||||
import type Mithril from 'mithril';
|
import type Mithril from 'mithril';
|
||||||
import type { DiscussionListParams } from '../states/DiscussionListState';
|
import type { DiscussionListParams } from '../states/DiscussionListState';
|
||||||
|
import Post from '../../common/models/Post';
|
||||||
|
import type User from '../../common/models/User';
|
||||||
export interface IDiscussionListItemAttrs extends ComponentAttrs {
|
export interface IDiscussionListItemAttrs extends ComponentAttrs {
|
||||||
discussion: Discussion;
|
discussion: Discussion;
|
||||||
|
post?: Post;
|
||||||
params: DiscussionListParams;
|
params: DiscussionListParams;
|
||||||
|
jumpTo?: number;
|
||||||
|
author?: User;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The `DiscussionListItem` component shows a single discussion in the
|
* The `DiscussionListItem` component shows a single discussion in the
|
||||||
|
9
framework/core/js/dist-typings/forum/components/PostList.d.ts
generated
vendored
Normal file
9
framework/core/js/dist-typings/forum/components/PostList.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/// <reference types="mithril" />
|
||||||
|
import Component, { type ComponentAttrs } from '../../common/Component';
|
||||||
|
import PostListState from '../states/PostListState';
|
||||||
|
export interface IPostListAttrs extends ComponentAttrs {
|
||||||
|
state: PostListState;
|
||||||
|
}
|
||||||
|
export default class PostList<CustomAttrs extends IPostListAttrs = IPostListAttrs> extends Component<CustomAttrs> {
|
||||||
|
view(): JSX.Element;
|
||||||
|
}
|
11
framework/core/js/dist-typings/forum/components/PostListItem.d.ts
generated
vendored
Normal file
11
framework/core/js/dist-typings/forum/components/PostListItem.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import Component, { type ComponentAttrs } from '../../common/Component';
|
||||||
|
import type Post from '../../common/models/Post';
|
||||||
|
import Mithril from 'mithril';
|
||||||
|
import { PostListParams } from '../states/PostListState';
|
||||||
|
export interface IPostListItemAttrs extends ComponentAttrs {
|
||||||
|
post: Post;
|
||||||
|
params: PostListParams;
|
||||||
|
}
|
||||||
|
export default class PostListItem<CustomAttrs extends IPostListItemAttrs = IPostListItemAttrs> extends Component<CustomAttrs> {
|
||||||
|
view(): Mithril.Children;
|
||||||
|
}
|
35
framework/core/js/dist-typings/forum/components/PostsPage.d.ts
generated
vendored
Normal file
35
framework/core/js/dist-typings/forum/components/PostsPage.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import Page, { IPageAttrs } from '../../common/components/Page';
|
||||||
|
import ItemList from '../../common/utils/ItemList';
|
||||||
|
import type Mithril from 'mithril';
|
||||||
|
import PostListState from '../states/PostListState';
|
||||||
|
export interface IPostsPageAttrs extends IPageAttrs {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The `PostsPage` component displays the index page, including the welcome
|
||||||
|
* hero, the sidebar, and the discussion list.
|
||||||
|
*/
|
||||||
|
export default class PostsPage<CustomAttrs extends IPostsPageAttrs = IPostsPageAttrs, CustomState = {}> extends Page<CustomAttrs, CustomState> {
|
||||||
|
static providesInitialSearch: boolean;
|
||||||
|
protected posts: PostListState;
|
||||||
|
oninit(vnode: Mithril.Vnode<CustomAttrs, this>): void;
|
||||||
|
view(): JSX.Element;
|
||||||
|
setTitle(): void;
|
||||||
|
oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>): void;
|
||||||
|
onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>): void;
|
||||||
|
/**
|
||||||
|
* Get the component to display as the hero.
|
||||||
|
*/
|
||||||
|
hero(): JSX.Element;
|
||||||
|
sidebar(): JSX.Element;
|
||||||
|
/**
|
||||||
|
* 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 way discussions are sorted.
|
||||||
|
*/
|
||||||
|
viewItems(): ItemList<Mithril.Children>;
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
actionItems(): ItemList<Mithril.Children>;
|
||||||
|
}
|
17
framework/core/js/dist-typings/forum/components/PostsSearchSource.d.ts
generated
vendored
Normal file
17
framework/core/js/dist-typings/forum/components/PostsSearchSource.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import type Mithril from 'mithril';
|
||||||
|
import type Post from '../../common/models/Post';
|
||||||
|
import type { SearchSource } from './Search';
|
||||||
|
/**
|
||||||
|
* The `PostsSearchSource` finds and displays post search results in
|
||||||
|
* the search dropdown.
|
||||||
|
*/
|
||||||
|
export default class PostsSearchSource implements SearchSource {
|
||||||
|
protected results: Map<string, Post[]>;
|
||||||
|
resource: string;
|
||||||
|
title(): string;
|
||||||
|
isCached(query: string): boolean;
|
||||||
|
search(query: string, limit: number): Promise<void>;
|
||||||
|
view(query: string): Array<Mithril.Vnode>;
|
||||||
|
fullPage(query: string): Mithril.Vnode;
|
||||||
|
gotoItem(id: string): string | null;
|
||||||
|
}
|
37
framework/core/js/dist-typings/forum/components/PostsUserPage.d.ts
generated
vendored
37
framework/core/js/dist-typings/forum/components/PostsUserPage.d.ts
generated
vendored
@@ -1,24 +1,16 @@
|
|||||||
import UserPage, { IUserPageAttrs } from './UserPage';
|
import UserPage, { IUserPageAttrs } from './UserPage';
|
||||||
import type Post from '../../common/models/Post';
|
|
||||||
import type Mithril from 'mithril';
|
import type Mithril from 'mithril';
|
||||||
import type User from '../../common/models/User';
|
import type User from '../../common/models/User';
|
||||||
|
import PostListState from '../states/PostListState';
|
||||||
/**
|
/**
|
||||||
* The `PostsUserPage` component shows a user's activity feed inside of their
|
* The `PostsUserPage` component shows a user's activity feed inside of their
|
||||||
* profile.
|
* profile.
|
||||||
*/
|
*/
|
||||||
export default class PostsUserPage extends UserPage {
|
export default class PostsUserPage extends UserPage {
|
||||||
/**
|
/**
|
||||||
* Whether or not the activity feed is currently loading.
|
* The state of the Post models in the feed.
|
||||||
*/
|
*/
|
||||||
loading: boolean;
|
posts: PostListState;
|
||||||
/**
|
|
||||||
* Whether or not there are any more activity items that can be loaded.
|
|
||||||
*/
|
|
||||||
moreResults: boolean;
|
|
||||||
/**
|
|
||||||
* The Post models in the feed.
|
|
||||||
*/
|
|
||||||
posts: Post[];
|
|
||||||
/**
|
/**
|
||||||
* The number of activity items to load per request.
|
* The number of activity items to load per request.
|
||||||
*/
|
*/
|
||||||
@@ -30,22 +22,9 @@ export default class PostsUserPage extends UserPage {
|
|||||||
* activity feed.
|
* activity feed.
|
||||||
*/
|
*/
|
||||||
show(user: User): void;
|
show(user: User): void;
|
||||||
/**
|
params(user: User): {
|
||||||
* Clear and reload the user's activity feed.
|
filter: {
|
||||||
*/
|
author: string;
|
||||||
refresh(): void;
|
};
|
||||||
/**
|
};
|
||||||
* Load a new page of the user's activity feed.
|
|
||||||
*
|
|
||||||
* @protected
|
|
||||||
*/
|
|
||||||
loadResults(offset?: number): Promise<import("../../common/Store").ApiResponsePlural<Post>>;
|
|
||||||
/**
|
|
||||||
* Load the next page of results.
|
|
||||||
*/
|
|
||||||
loadMore(): void;
|
|
||||||
/**
|
|
||||||
* Parse results and append them to the activity feed.
|
|
||||||
*/
|
|
||||||
parseResults(results: Post[]): Post[];
|
|
||||||
}
|
}
|
||||||
|
3
framework/core/js/dist-typings/forum/components/SearchModal.d.ts
generated
vendored
3
framework/core/js/dist-typings/forum/components/SearchModal.d.ts
generated
vendored
@@ -84,4 +84,7 @@ export default class SearchModal<CustomAttrs extends ISearchModalAttrs = ISearch
|
|||||||
*/
|
*/
|
||||||
setIndex(index: number, scrollToItem?: boolean): void;
|
setIndex(index: number, scrollToItem?: boolean): void;
|
||||||
inputElement(): JQuery<HTMLInputElement>;
|
inputElement(): JQuery<HTMLInputElement>;
|
||||||
|
defaultActiveSource(): string | null;
|
||||||
|
defaultFilters(): Record<string, Record<string, any>>;
|
||||||
|
prefill(value: string): string;
|
||||||
}
|
}
|
||||||
|
4
framework/core/js/dist-typings/forum/states/DiscussionListState.d.ts
generated
vendored
4
framework/core/js/dist-typings/forum/states/DiscussionListState.d.ts
generated
vendored
@@ -18,10 +18,6 @@ export default class DiscussionListState<P extends DiscussionListParams = Discus
|
|||||||
* translation) to the API sort value that they represent.
|
* translation) to the API sort value that they represent.
|
||||||
*/
|
*/
|
||||||
sortMap(): any;
|
sortMap(): any;
|
||||||
/**
|
|
||||||
* In the last request, has the user searched for a discussion?
|
|
||||||
*/
|
|
||||||
isSearchResults(): boolean;
|
|
||||||
removeDiscussion(discussion: Discussion): void;
|
removeDiscussion(discussion: Discussion): void;
|
||||||
deleteDiscussion(discussion: Discussion): void;
|
deleteDiscussion(discussion: Discussion): void;
|
||||||
/**
|
/**
|
||||||
|
23
framework/core/js/dist-typings/forum/states/PostListState.d.ts
generated
vendored
Normal file
23
framework/core/js/dist-typings/forum/states/PostListState.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from '../../common/states/PaginatedListState';
|
||||||
|
import Post from '../../common/models/Post';
|
||||||
|
import { ApiResponsePlural } from '../../common/Store';
|
||||||
|
import EventEmitter from '../../common/utils/EventEmitter';
|
||||||
|
export interface PostListParams extends PaginatedListParams {
|
||||||
|
sort?: string;
|
||||||
|
}
|
||||||
|
export default class PostListState<P extends PostListParams = PostListParams> extends PaginatedListState<Post, P> {
|
||||||
|
protected extraPosts: Post[];
|
||||||
|
protected eventEmitter: EventEmitter;
|
||||||
|
constructor(params: P, page?: number, pageSize?: number | null);
|
||||||
|
get type(): string;
|
||||||
|
requestParams(): PaginatedListRequestParams;
|
||||||
|
protected loadPage(page?: number): Promise<ApiResponsePlural<Post>>;
|
||||||
|
clear(): void;
|
||||||
|
/**
|
||||||
|
* Get a map of sort keys (which appear in the URL, and are used for
|
||||||
|
* translation) to the API sort value that they represent.
|
||||||
|
*/
|
||||||
|
sortMap(): any;
|
||||||
|
protected getAllItems(): Post[];
|
||||||
|
getPages(): Page<Post>[];
|
||||||
|
}
|
Reference in New Issue
Block a user