Bundled output for commit 5bc47c0278d00d06ace033dccfa96cdff3d0a0c0

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

[skip ci]
This commit is contained in:
flarum-bot 2022-11-27 09:40:52 +00:00
parent 5bc47c0278
commit f33fbdd0b5
13 changed files with 101 additions and 72 deletions

View File

@ -36,6 +36,7 @@ export interface AdminApplicationData extends ApplicationData {
}>; }>;
displayNameDrivers: string[]; displayNameDrivers: string[];
slugDrivers: Record<string, string[]>; slugDrivers: Record<string, string[]>;
permissions: Record<string, string[]>;
} }
export default class AdminApplication extends Application { export default class AdminApplication extends Application {
extensionData: ExtensionData; extensionData: ExtensionData;

View File

@ -1,6 +1,12 @@
export default class PermissionDropdown extends Dropdown { import Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';
save(groupIds: any): void; import Mithril from 'mithril';
toggle(groupId: any): void; export interface IPermissionDropdownAttrs extends IDropdownAttrs {
isGroupDisabled(id: any): boolean; permission: string;
}
export default class PermissionDropdown<CustomAttrs extends IPermissionDropdownAttrs = IPermissionDropdownAttrs> extends Dropdown<CustomAttrs> {
static initAttrs(attrs: IPermissionDropdownAttrs): void;
view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
save(groupIds: string[]): void;
toggle(groupId: string): void;
isGroupDisabled(id: string): boolean;
} }
import Dropdown from "../../common/components/Dropdown";

View File

@ -1,15 +1,18 @@
import Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';
import ItemList from '../../common/utils/ItemList';
import type Mithril from 'mithril';
export interface ISessionDropdownAttrs extends IDropdownAttrs {
}
/** /**
* The `SessionDropdown` component shows a button with the current user's * The `SessionDropdown` component shows a button with the current user's
* avatar/name, with a dropdown of session controls. * avatar/name, with a dropdown of session controls.
*/ */
export default class SessionDropdown extends Dropdown { export default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {
static initAttrs(attrs: ISessionDropdownAttrs): void;
view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
getButtonContent(): (string | JSX.Element)[]; getButtonContent(): (string | JSX.Element)[];
/** /**
* Build an item list for the contents of the dropdown menu. * Build an item list for the contents of the dropdown menu.
*
* @return {ItemList}
*/ */
items(): ItemList<any>; items(): ItemList<Mithril.Children>;
} }
import Dropdown from "../../common/components/Dropdown";
import ItemList from "../../common/utils/ItemList";

View File

@ -1,3 +1,14 @@
export default class SettingDropdown extends SelectDropdown { import SelectDropdown, { ISelectDropdownAttrs } from '../../common/components/SelectDropdown';
import Mithril from 'mithril';
export type SettingDropdownOption = {
value: any;
label: string;
};
export interface ISettingDropdownAttrs extends ISelectDropdownAttrs {
setting?: string;
options: Array<SettingDropdownOption>;
}
export default class SettingDropdown<CustomAttrs extends ISettingDropdownAttrs = ISettingDropdownAttrs> extends SelectDropdown<CustomAttrs> {
static initAttrs(attrs: ISettingDropdownAttrs): void;
view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
} }
import SelectDropdown from "../../common/components/SelectDropdown";

View File

@ -1,41 +1,42 @@
import Component, { ComponentAttrs } from '../Component';
import type Mithril from 'mithril';
export interface IDropdownAttrs extends ComponentAttrs {
/** A class name to apply to the dropdown toggle button. */
buttonClassName?: string;
/** A class name to apply to the dropdown menu. */
menuClassName?: string;
/** The name of an icon to show in the dropdown toggle button. */
icon?: string;
/** The name of an icon to show on the right of the button. */
caretIcon?: string;
/** The label of the dropdown toggle button. Defaults to 'Controls'. */
label: Mithril.Children;
/** The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'. */
accessibleToggleLabel?: string;
/** An action to take when the dropdown is collapsed. */
onhide?: () => void;
/** An action to take when the dropdown is opened. */
onshow?: () => void;
lazyDraw?: boolean;
}
/** /**
* The `Dropdown` component displays a button which, when clicked, shows a * The `Dropdown` component displays a button which, when clicked, shows a
* dropdown menu beneath it. * dropdown menu beneath it.
* *
* ### Attrs * The children will be displayed as a list inside the dropdown menu.
*
* - `buttonClassName` A class name to apply to the dropdown toggle button.
* - `menuClassName` A class name to apply to the dropdown menu.
* - `icon` The name of an icon to show in the dropdown toggle button.
* - `caretIcon` The name of an icon to show on the right of the button.
* - `label` The label of the dropdown toggle button. Defaults to 'Controls'.
* - `accessibleToggleLabel` The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'.
* - `onhide`
* - `onshow`
*
* The children will be displayed as a list inside of the dropdown menu.
*/ */
export default class Dropdown extends Component<import("../Component").ComponentAttrs, undefined> { export default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Component<CustomAttrs> {
static initAttrs(attrs: any): void; protected showing: boolean;
constructor(); static initAttrs(attrs: IDropdownAttrs): void;
oninit(vnode: any): void; view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
showing: boolean | undefined; oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>): void;
view(vnode: any): JSX.Element;
oncreate(vnode: any): void;
/** /**
* Get the template for the button. * Get the template for the button.
*
* @return {import('mithril').Children}
* @protected
*/ */
protected getButton(children: any): import('mithril').Children; getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any>;
/** /**
* Get the template for the button's content. * Get the template for the button's content.
*
* @return {import('mithril').Children}
* @protected
*/ */
protected getButtonContent(children: any): import('mithril').Children; getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray;
getMenu(items: any): JSX.Element; getMenu(items: Mithril.Vnode<any, any>[]): Mithril.Vnode<any, any>;
} }
import Component from "../Component";

View File

@ -1,14 +1,14 @@
import Dropdown, { IDropdownAttrs } from './Dropdown';
import type Mithril from 'mithril';
export interface ISelectDropdownAttrs extends IDropdownAttrs {
defaultLabel: string;
}
/** /**
* The `SelectDropdown` component is the same as a `Dropdown`, except the toggle * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle
* button's label is set as the label of the first child which has a truthy * button's label is set as the label of the first child which has a truthy
* `active` prop. * `active` prop.
*
* ### Attrs
*
* - `caretIcon`
* - `defaultLabel`
*/ */
export default class SelectDropdown extends Dropdown { export default class SelectDropdown<CustomAttrs extends ISelectDropdownAttrs = ISelectDropdownAttrs> extends Dropdown<CustomAttrs> {
getButtonContent(children: any): JSX.Element[]; static initAttrs(attrs: ISelectDropdownAttrs): void;
getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray;
} }
import Dropdown from "./Dropdown";

View File

@ -1,17 +1,17 @@
import Dropdown, { IDropdownAttrs } from './Dropdown';
import Mithril from 'mithril';
export interface ISplitDropdownAttrs extends IDropdownAttrs {
}
/** /**
* The `SplitDropdown` component is similar to `Dropdown`, but the first child * The `SplitDropdown` component is similar to `Dropdown`, but the first child
* is displayed as its own button prior to the toggle button. * is displayed as its own button prior to the toggle button.
*/ */
export default class SplitDropdown extends Dropdown { export default class SplitDropdown extends Dropdown {
getButton(children: any): JSX.Element[]; static initAttrs(attrs: ISplitDropdownAttrs): void;
getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any>;
/** /**
* Get the first child. If the first child is an array, the first item in that * Get the first child. If the first child is an array, the first item in that
* array will be returned. * array will be returned.
*
* @param {unknown[] | unknown} children
* @return {unknown}
* @protected
*/ */
protected getFirstChild(children: unknown[] | unknown): unknown; protected getFirstChild(children: Mithril.Children): Mithril.Vnode<any, any>;
} }
import Dropdown from "./Dropdown";

View File

@ -1,11 +1,15 @@
export default class NotificationsDropdown extends Dropdown { import Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';
getButton(): import("mithril").Children; import type Mithril from 'mithril';
getButtonContent(): (false | JSX.Element)[]; export interface INotificationsDropdown extends IDropdownAttrs {
}
export default class NotificationsDropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Dropdown<CustomAttrs> {
static initAttrs(attrs: INotificationsDropdown): void;
getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any>;
getButtonContent(): Mithril.ChildArray;
getMenu(): JSX.Element; getMenu(): JSX.Element;
onclick(): void; onclick(): void;
goToRoute(): void; goToRoute(): void;
getUnreadCount(): number | undefined; getUnreadCount(): number | undefined;
getNewCount(): number | undefined; getNewCount(): number | undefined;
menuClick(e: any): void; menuClick(e: MouseEvent): void;
} }
import Dropdown from "../../common/components/Dropdown";

View File

@ -1,15 +1,18 @@
import Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';
import ItemList from '../../common/utils/ItemList';
import type Mithril from 'mithril';
export interface ISessionDropdownAttrs extends IDropdownAttrs {
}
/** /**
* The `SessionDropdown` component shows a button with the current user's * The `SessionDropdown` component shows a button with the current user's
* avatar/name, with a dropdown of session controls. * avatar/name, with a dropdown of session controls.
*/ */
export default class SessionDropdown extends Dropdown { export default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {
static initAttrs(attrs: ISessionDropdownAttrs): void;
view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
getButtonContent(): (string | JSX.Element)[]; getButtonContent(): (string | JSX.Element)[];
/** /**
* Build an item list for the contents of the dropdown menu. * Build an item list for the contents of the dropdown menu.
*
* @return {ItemList<import('mithril').Children>}
*/ */
items(): ItemList<import('mithril').Children>; items(): ItemList<Mithril.Children>;
} }
import Dropdown from "../../common/components/Dropdown";
import ItemList from "../../common/utils/ItemList";

2
framework/core/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
framework/core/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