Bundled output for commit eaf1b86785

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

[skip ci]
This commit is contained in:
flarum-bot 2021-11-21 19:49:09 +00:00
parent eaf1b86785
commit 9117747d41
13 changed files with 93 additions and 14 deletions

View File

@ -40,6 +40,7 @@ declare var _default: {
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
'utils/throttleDebounce': typeof import("../common/utils/throttleDebounce");
'utils/isObject': typeof import("../common/utils/isObject").default;
'utils/focusTrap': typeof import("../common/utils/focusTrap");
'models/Notification': typeof import("../common/models/Notification").default;
'models/User': typeof import("../common/models/User").default;
'models/Post': typeof import("../common/models/Post").default;

View File

@ -40,6 +40,7 @@ declare var _default: {
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
'utils/throttleDebounce': typeof ThrottleDebounce;
'utils/isObject': typeof isObject;
'utils/focusTrap': typeof FocusTrap;
'models/Notification': typeof Notification;
'models/User': typeof User;
'models/Post': typeof Post;
@ -120,6 +121,7 @@ import formatNumber from "./utils/formatNumber";
import mapRoutes from "./utils/mapRoutes";
import * as ThrottleDebounce from "./utils/throttleDebounce";
import isObject from "./utils/isObject";
import * as FocusTrap from "./utils/focusTrap";
import Notification from "./models/Notification";
import User from "./models/User";
import Post from "./models/Post";

View File

@ -1,6 +1,7 @@
import Component from '../Component';
import type Mithril from 'mithril';
import { FocusTrap } from '../utils/focusTrap';
import type ModalManagerState from '../states/ModalManagerState';
import type Mithril from 'mithril';
interface IModalManagerAttrs {
state: ModalManagerState;
}
@ -10,8 +11,14 @@ interface IModalManagerAttrs {
* overwrite the previous one.
*/
export default class ModalManager extends Component<IModalManagerAttrs> {
view(): JSX.Element;
protected focusTrap: FocusTrap | undefined;
/**
* Whether a modal is currently shown by this modal manager.
*/
protected modalShown: boolean;
view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children;
oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void;
onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void;
animateShow(readyCallback: () => void): void;
animateHide(): void;
}

View File

@ -4,10 +4,36 @@
* footer.
*/
export default class Drawer {
/**
* @type {import('./focusTrap').FocusTrap}
*/
focusTrap: import('./focusTrap').FocusTrap;
/**
* @type {HTMLDivElement}
*/
appElement: HTMLDivElement;
/**
* @internal
* @type {MediaQueryList}
*/
drawerAvailableMediaQuery: MediaQueryList;
/**
* Handler for the `resize` event on `window`.
*
* This is used to close the drawer when the viewport is widened past the `phone` size.
* At this point, the drawer turns into the standard header that we see on desktop, but
* the drawer is still registered as 'open' internally.
*
* This causes issues with the focus trap, resulting in focus becoming trapped within
* the header on desktop viewports.
*
* @internal
*/
resizeHandler: (e: any) => void;
/**
* Check whether or not the drawer is currently open.
*
* @return {Boolean}
* @return {boolean}
* @public
*/
public isOpen(): boolean;

View File

@ -0,0 +1,20 @@
import { createFocusTrap as _createFocusTrap } from 'focus-trap';
/**
* Creates a focus trap for the given element with the given options.
*
* This function applies some default options that are different to the library.
* Your own options still override these custom defaults:
*
* ```json
* {
escapeDeactivates: false,
* }
* ```
*
* @param element The element to be the focus trap, or a selector that will be used to find the element.
*
* @see https://github.com/focus-trap/focus-trap#readme - Library documentation
*/
declare function createFocusTrap(...args: Parameters<typeof _createFocusTrap>): ReturnType<typeof _createFocusTrap>;
export * from 'focus-trap';
export { createFocusTrap };

View File

@ -40,6 +40,7 @@ declare var _default: {
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
'utils/throttleDebounce': typeof import("../common/utils/throttleDebounce");
'utils/isObject': typeof import("../common/utils/isObject").default;
'utils/focusTrap': typeof import("../common/utils/focusTrap");
'models/Notification': typeof import("../common/models/Notification").default;
'models/User': typeof import("../common/models/User").default;
'models/Post': typeof import("../common/models/Post").default;

View File

@ -32,9 +32,15 @@ export default class KeyboardNavigatable {
/**
* Provide a callback to be executed when the current item is selected..
*
* This will be triggered by the Return and Tab keys..
* This will be triggered by the Return key (and Tab key, if not disabled).
*/
onSelect(callback: KeyboardEventHandler): KeyboardNavigatable;
onSelect(callback: KeyboardEventHandler, ignoreTabPress?: boolean): KeyboardNavigatable;
/**
* Provide a callback to be executed when the current item is tabbed into.
*
* This will be triggered by the Tab key.
*/
onTab(callback: KeyboardEventHandler): KeyboardNavigatable;
/**
* Provide a callback to be executed when the navigation is canceled.
*
@ -45,10 +51,6 @@ export default class KeyboardNavigatable {
* Provide a callback to be executed when previous input is removed.
*
* This will be triggered by the Backspace key.
*
* @public
* @param {KeyboardNavigatable~keyCallback} callback
* @return {KeyboardNavigatable}
*/
onRemove(callback: KeyboardEventHandler): KeyboardNavigatable;
/**
@ -58,7 +60,7 @@ export default class KeyboardNavigatable {
/**
* Set up the navigation key bindings on the given jQuery element.
*/
bindTo($element: JQuery): void;
bindTo($element: JQuery<HTMLElement>): void;
/**
* Interpret the given keyboard event as navigation commands.
*/

2
js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

10
js/dist/admin.js.LICENSE.txt generated vendored
View File

@ -22,3 +22,13 @@
*
* Date: 2021-03-02T17:08Z
*/
/*!
* focus-trap 6.7.1
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/
/*!
* tabbable 5.2.1
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/

2
js/dist/admin.js.map generated vendored

File diff suppressed because one or more lines are too long

2
js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

10
js/dist/forum.js.LICENSE.txt generated vendored
View File

@ -47,7 +47,17 @@
* Date: 2021-03-02T17:08Z
*/
/*!
* focus-trap 6.7.1
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
/*!
* tabbable 5.2.1
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/

2
js/dist/forum.js.map generated vendored

File diff suppressed because one or more lines are too long