Bundled output for commit fb717db57cc53d44d064d34b8aacb71ebca47322

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

[skip ci]
This commit is contained in:
flarum-bot 2022-04-16 10:34:07 +00:00
parent fb717db57c
commit 09bed537b3
19 changed files with 108 additions and 93 deletions

View File

@ -19,3 +19,20 @@ declare module 'flarum/common/models/Discussion' {
canTag: () => boolean | undefined;
}
}
declare module 'flarum/forum/components/IndexPage' {
export default interface IndexPage {
currentActiveTag?: Tag;
currentTagLoading?: boolean;
currentTag: () => Tag | undefined;
}
}
declare module 'flarum/admin/components/PermissionGrid' {
export interface PermissionConfig {
tagScoped?: boolean;
}
export default interface PermissionGrid {
loading?: boolean;
}
}

View File

@ -1 +1 @@
export default function _default(): void;
export default function (): void;

View File

@ -1,22 +1,29 @@
/// <reference types="flarum/@types/translator-icu-rich" />
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
import Stream from 'flarum/common/utils/Stream';
import type Mithril from 'mithril';
import type Tag from '../../common/models/Tag';
export interface EditTagModalAttrs extends IInternalModalAttrs {
primary?: boolean;
model?: Tag;
}
/**
* The `EditTagModal` component shows a modal dialog which allows the user
* to create or edit a tag.
*/
export default class EditTagModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> {
constructor();
oninit(vnode: any): void;
tag: any;
name: Stream<any> | undefined;
slug: Stream<any> | undefined;
description: Stream<any> | undefined;
color: Stream<any> | undefined;
icon: Stream<any> | undefined;
isHidden: Stream<any> | undefined;
primary: Stream<any> | undefined;
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray | import("mithril").Vnode<any, any>;
export default class EditTagModal extends Modal<EditTagModalAttrs> {
tag: Tag;
name: Stream<string>;
slug: Stream<string>;
description: Stream<string>;
color: Stream<string>;
icon: Stream<string>;
isHidden: Stream<boolean>;
primary: Stream<boolean>;
oninit(vnode: Mithril.Vnode<EditTagModalAttrs, this>): void;
className(): string;
title(): any;
content(): JSX.Element;
fields(): ItemList<any>;
fields(): any;
submitData(): {
name: any;
slug: any;
@ -26,9 +33,6 @@ export default class EditTagModal extends Modal<import("flarum/common/components
isHidden: any;
primary: any;
};
onsubmit(e: any): void;
onsubmit(e: SubmitEvent): void;
delete(): void;
}
import Modal from "flarum/common/components/Modal";
import Stream from "flarum/common/utils/Stream";
import ItemList from "flarum/common/utils/ItemList";

View File

@ -1,10 +1,9 @@
export default class TagsPage extends ExtensionPage<import("flarum/admin/components/ExtensionPage").ExtensionPageAttrs> {
constructor();
export default class TagsPage {
oninit(vnode: any): void;
forcedRefreshKey: number | undefined;
loading: boolean | undefined;
content(): JSX.Element;
onListOnCreate(vnode: any): void;
setMinTags(minTags: any, maxTags: any, value: any): void;
onSortUpdate(e: any): void;
}
import ExtensionPage from "flarum/admin/components/ExtensionPage";

View File

@ -1 +1 @@
export default function tagLabel(tag: any, attrs?: {}): import("mithril").Vnode<any, any>;
export default function tagLabel(tag: any, attrs?: {}): any;

View File

@ -1,24 +1,23 @@
import Model from 'flarum/common/Model';
import Discussion from 'flarum/common/models/Discussion';
export default class Tag extends Model {
name(): string;
slug(): string;
description(): string | null;
color(): string | null;
backgroundUrl(): string | null;
backgroundMode(): string | null;
icon(): string | null;
position(): number | null;
parent(): false | Tag | null;
children(): false | (Tag | undefined)[];
defaultSort(): string | null;
isChild(): boolean;
isHidden(): boolean;
discussionCount(): number;
lastPostedAt(): Date | null | undefined;
lastPostedDiscussion(): false | Discussion | null;
isRestricted(): boolean;
canStartDiscussion(): boolean;
canAddToDiscussion(): boolean;
isPrimary(): boolean;
name(): any;
slug(): any;
description(): any;
color(): any;
backgroundUrl(): any;
backgroundMode(): any;
icon(): any;
position(): any;
parent(): any;
children(): any;
defaultSort(): any;
isChild(): any;
isHidden(): any;
discussionCount(): any;
lastPostedAt(): any;
lastPostedDiscussion(): any;
isRestricted(): any;
canStartDiscussion(): any;
canAddToDiscussion(): any;
isPrimary(): any;
}

View File

@ -1 +1,2 @@
export default function sortTags(tags: any): any;
import Tag from "../models/Tag";
export default function sortTags(tags: Tag[]): Tag[];

View File

@ -1 +1 @@
export default function _default(): void;
export default function (): void;

View File

@ -1,9 +1,9 @@
export default class DiscussionTaggedPost extends EventPost {
export default class DiscussionTaggedPost {
static initAttrs(attrs: any): void;
icon(): string;
descriptionKey(): "flarum-tags.forum.post_stream.added_and_removed_tags_text" | "flarum-tags.forum.post_stream.added_tags_text" | "flarum-tags.forum.post_stream.removed_tags_text";
descriptionData(): {
tagsAdded: any;
tagsRemoved: any;
};
}
import EventPost from "flarum/forum/components/EventPost";

View File

@ -1,44 +1,46 @@
export default class TagDiscussionModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> {
constructor();
oninit(vnode: any): void;
tagsLoading: boolean | undefined;
selected: any[] | undefined;
filter: Stream<string> | undefined;
focused: boolean | undefined;
import type Mithril from 'mithril';
import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
import Discussion from 'flarum/common/models/Discussion';
import Tag from '../../common/models/Tag';
export interface TagDiscussionModalAttrs extends IInternalModalAttrs {
discussion?: Discussion;
selectedTags?: Tag[];
onsubmit?: (tags: Tag[]) => {};
}
export default class TagDiscussionModal extends Modal<TagDiscussionModalAttrs> {
tagsLoading: boolean;
selected: Tag[];
filter: any;
focused: boolean;
minPrimary: any;
maxPrimary: any;
minSecondary: any;
maxSecondary: any;
bypassReqs: any;
navigator: KeyboardNavigatable | undefined;
tags: any;
index: any;
bypassReqs: boolean;
navigator: any;
tags?: Tag[];
selectedTag?: Tag;
oninit(vnode: Mithril.Vnode<TagDiscussionModalAttrs, this>): void;
primaryCount(): number;
secondaryCount(): number;
/**
* Add the given tag to the list of selected tags.
*
* @param {Tag} tag
*/
addTag(tag: Tag): void;
/**
* Remove the given tag from the list of selected tags.
*
* @param {Tag} tag
*/
removeTag(tag: Tag): void;
className(): string;
title(): any;
getInstruction(primaryCount: any, secondaryCount: any): any;
getInstruction(primaryCount: number, secondaryCount: number): any;
content(): JSX.Element | JSX.Element[];
meetsRequirements(primaryCount: any, secondaryCount: any): boolean;
toggleTag(tag: any): void;
select(e: any): void;
selectableItems(): JQuery<HTMLElement>;
getCurrentNumericIndex(): number;
getItem(index: any): JQuery<HTMLElement>;
setIndex(index: any, scrollToItem: any): void;
onsubmit(e: any): void;
meetsRequirements(primaryCount: number, secondaryCount: number): boolean;
toggleTag(tag: Tag): void;
select(e: KeyboardEvent): void;
selectableItems(): any;
getCurrentNumericIndex(): any;
getItem(selectedTag: Tag): any;
setIndex(index: number, scrollToItem: boolean): void;
onsubmit(e: SubmitEvent): void;
}
import Modal from "flarum/common/components/Modal";
import Stream from "flarum/common/utils/Stream";
import KeyboardNavigatable from "flarum/forum/utils/KeyboardNavigatable";

View File

@ -1,5 +1,3 @@
export default class TagHero extends Component<import("flarum/common/Component").ComponentAttrs, undefined> {
constructor();
export default class TagHero {
view(): JSX.Element;
}
import Component from "flarum/common/Component";

View File

@ -1,5 +1,4 @@
export default class TagLinkButton extends LinkButton {
export default class TagLinkButton {
static initAttrs(attrs: any): void;
view(vnode: any): JSX.Element;
}
import LinkButton from "flarum/common/components/LinkButton";

View File

@ -1,9 +1,7 @@
export default class TagsPage extends Page<import("flarum/common/components/Page").IPageAttrs> {
constructor();
export default class TagsPage {
oninit(vnode: any): void;
tags: any;
tags: any[] | undefined;
loading: boolean | undefined;
view(): JSX.Element;
oncreate(vnode: any): void;
}
import Page from "flarum/common/components/Page";

View File

@ -1,8 +1,6 @@
/**
* @TODO move to core
*/
export default class ToggleButton extends Component<import("flarum/common/Component").ComponentAttrs, undefined> {
constructor();
export default class ToggleButton {
view(vnode: any): JSX.Element;
}
import Component from "flarum/common/Component";

View File

@ -1,5 +1,5 @@
import Tag from "../../common/models/Tag";
import type Tag from "../../common/models/Tag";
export default class TagListState {
loadedIncludes: Set<unknown>;
load(includes?: never[]): Promise<Tag[]>;
load(includes?: string[]): Promise<Tag[]>;
}

2
extensions/tags/js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
extensions/tags/js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long