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; 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 * The `EditTagModal` component shows a modal dialog which allows the user
* to create or edit a tag. * to create or edit a tag.
*/ */
export default class EditTagModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> { export default class EditTagModal extends Modal<EditTagModalAttrs> {
constructor(); tag: Tag;
oninit(vnode: any): void; name: Stream<string>;
tag: any; slug: Stream<string>;
name: Stream<any> | undefined; description: Stream<string>;
slug: Stream<any> | undefined; color: Stream<string>;
description: Stream<any> | undefined; icon: Stream<string>;
color: Stream<any> | undefined; isHidden: Stream<boolean>;
icon: Stream<any> | undefined; primary: Stream<boolean>;
isHidden: Stream<any> | undefined; oninit(vnode: Mithril.Vnode<EditTagModalAttrs, this>): void;
primary: Stream<any> | undefined; className(): string;
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray | import("mithril").Vnode<any, any>; title(): any;
content(): JSX.Element; content(): JSX.Element;
fields(): ItemList<any>; fields(): any;
submitData(): { submitData(): {
name: any; name: any;
slug: any; slug: any;
@ -26,9 +33,6 @@ export default class EditTagModal extends Modal<import("flarum/common/components
isHidden: any; isHidden: any;
primary: any; primary: any;
}; };
onsubmit(e: any): void; onsubmit(e: SubmitEvent): void;
delete(): 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> { export default class TagsPage {
constructor();
oninit(vnode: any): void; oninit(vnode: any): void;
forcedRefreshKey: number | undefined; forcedRefreshKey: number | undefined;
loading: boolean | undefined;
content(): JSX.Element; content(): JSX.Element;
onListOnCreate(vnode: any): void; onListOnCreate(vnode: any): void;
setMinTags(minTags: any, maxTags: any, value: any): void; setMinTags(minTags: any, maxTags: any, value: any): void;
onSortUpdate(e: 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 Model from 'flarum/common/Model';
import Discussion from 'flarum/common/models/Discussion';
export default class Tag extends Model { export default class Tag extends Model {
name(): string; name(): any;
slug(): string; slug(): any;
description(): string | null; description(): any;
color(): string | null; color(): any;
backgroundUrl(): string | null; backgroundUrl(): any;
backgroundMode(): string | null; backgroundMode(): any;
icon(): string | null; icon(): any;
position(): number | null; position(): any;
parent(): false | Tag | null; parent(): any;
children(): false | (Tag | undefined)[]; children(): any;
defaultSort(): string | null; defaultSort(): any;
isChild(): boolean; isChild(): any;
isHidden(): boolean; isHidden(): any;
discussionCount(): number; discussionCount(): any;
lastPostedAt(): Date | null | undefined; lastPostedAt(): any;
lastPostedDiscussion(): false | Discussion | null; lastPostedDiscussion(): any;
isRestricted(): boolean; isRestricted(): any;
canStartDiscussion(): boolean; canStartDiscussion(): any;
canAddToDiscussion(): boolean; canAddToDiscussion(): any;
isPrimary(): boolean; 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; 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"; 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(): { descriptionData(): {
tagsAdded: any; tagsAdded: any;
tagsRemoved: 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> { import type Mithril from 'mithril';
constructor(); import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';
oninit(vnode: any): void; import Discussion from 'flarum/common/models/Discussion';
tagsLoading: boolean | undefined; import Tag from '../../common/models/Tag';
selected: any[] | undefined; export interface TagDiscussionModalAttrs extends IInternalModalAttrs {
filter: Stream<string> | undefined; discussion?: Discussion;
focused: boolean | undefined; selectedTags?: Tag[];
onsubmit?: (tags: Tag[]) => {};
}
export default class TagDiscussionModal extends Modal<TagDiscussionModalAttrs> {
tagsLoading: boolean;
selected: Tag[];
filter: any;
focused: boolean;
minPrimary: any; minPrimary: any;
maxPrimary: any; maxPrimary: any;
minSecondary: any; minSecondary: any;
maxSecondary: any; maxSecondary: any;
bypassReqs: any; bypassReqs: boolean;
navigator: KeyboardNavigatable | undefined; navigator: any;
tags: any; tags?: Tag[];
index: any; selectedTag?: Tag;
oninit(vnode: Mithril.Vnode<TagDiscussionModalAttrs, this>): void;
primaryCount(): number; primaryCount(): number;
secondaryCount(): number; secondaryCount(): number;
/** /**
* Add the given tag to the list of selected tags. * Add the given tag to the list of selected tags.
*
* @param {Tag} tag
*/ */
addTag(tag: Tag): void; addTag(tag: Tag): void;
/** /**
* Remove the given tag from the list of selected tags. * Remove the given tag from the list of selected tags.
*
* @param {Tag} tag
*/ */
removeTag(tag: Tag): void; removeTag(tag: Tag): void;
className(): string;
title(): any; title(): any;
getInstruction(primaryCount: any, secondaryCount: any): any; getInstruction(primaryCount: number, secondaryCount: number): any;
content(): JSX.Element | JSX.Element[]; content(): JSX.Element | JSX.Element[];
meetsRequirements(primaryCount: any, secondaryCount: any): boolean; meetsRequirements(primaryCount: number, secondaryCount: number): boolean;
toggleTag(tag: any): void; toggleTag(tag: Tag): void;
select(e: any): void; select(e: KeyboardEvent): void;
selectableItems(): JQuery<HTMLElement>; selectableItems(): any;
getCurrentNumericIndex(): number; getCurrentNumericIndex(): any;
getItem(index: any): JQuery<HTMLElement>; getItem(selectedTag: Tag): any;
setIndex(index: any, scrollToItem: any): void; setIndex(index: number, scrollToItem: boolean): void;
onsubmit(e: any): 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> { export default class TagHero {
constructor();
view(): JSX.Element; 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; static initAttrs(attrs: any): void;
view(vnode: any): JSX.Element; 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> { export default class TagsPage {
constructor();
oninit(vnode: any): void; oninit(vnode: any): void;
tags: any; tags: any[] | undefined;
loading: boolean | undefined; loading: boolean | undefined;
view(): JSX.Element; view(): JSX.Element;
oncreate(vnode: any): void; oncreate(vnode: any): void;
} }
import Page from "flarum/common/components/Page";

View File

@ -1,8 +1,6 @@
/** /**
* @TODO move to core * @TODO move to core
*/ */
export default class ToggleButton extends Component<import("flarum/common/Component").ComponentAttrs, undefined> { export default class ToggleButton {
constructor();
view(vnode: any): JSX.Element; 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 { export default class TagListState {
loadedIncludes: Set<unknown>; 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