Skip to content

Commit

Permalink
Bundled output for commit 57ddc06
Browse files Browse the repository at this point in the history
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
  • Loading branch information
flarum-bot committed Oct 12, 2023
1 parent 57ddc06 commit 46b723b
Show file tree
Hide file tree
Showing 22 changed files with 278 additions and 3 deletions.
7 changes: 7 additions & 0 deletions js/dist-typings/admin/components/InspectMimeModal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default class InspectMimeModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs, undefined> {
constructor();
uploading: boolean | undefined;
inspection: any;
onupload(event: any): Promise<void>;
}
import Modal from "flarum/common/components/Modal";
63 changes: 63 additions & 0 deletions js/dist-typings/admin/components/UploadPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/// <reference types="flarum/@types/translator-icu-rich" />
export default class UploadPage extends ExtensionPage<import("flarum/admin/components/ExtensionPage").ExtensionPageAttrs> {
constructor();
fields: string[] | undefined;
checkboxes: string[] | undefined;
objects: string[] | undefined;
watermarkPositions: {
'top-left': string;
'top-right': string;
'bottom-left': string;
'bottom-right': string;
center: string;
left: string;
top: string;
right: string;
bottom: string;
} | undefined;
composerButtonVisiblityOptions: {
both: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
'upload-btn': import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
'media-btn': import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
} | undefined;
settingsPrefix: string | undefined;
uploadMethodOptions: {} | undefined;
templateOptions: {} | undefined;
values: {} | undefined;
defaultAdap: string | undefined;
newMimeType: {
regex: any;
adapter: any;
template: any;
} | undefined;
adaptorItems(): ItemList<any>;
getTemplateOptionsForInput(): {};
updateMimeTypeKey(mime: any, value: any): void;
updateMimeTypeAdapter(mime: any, config: any, value: any): void;
updateMimeTypeTemplate(mime: any, config: any, value: any): void;
deleteMimeType(mime: any): void;
templateOptionsDescriptions(): any;
addMimeType(): void;
/**
* Checks if the values of the fields and checkboxes are different from
* the ones stored in the database
*
* @returns boolean
*/
changed(): boolean;
/**
* Saves the settings to the database and redraw the page
*
* @param e
*/
onsubmit(e: any): void;
successAlert: number | undefined;
/**
* Adds the prefix `this.settingsPrefix` at the beginning of `key`
*
* @returns string
*/
addPrefix(key: any): string;
}
import ExtensionPage from "flarum/admin/components/ExtensionPage";
import ItemList from "flarum/common/utils/ItemList";
4 changes: 4 additions & 0 deletions js/dist-typings/admin/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import UploadPage from './UploadPage';
export declare const components: {
UploadPage: typeof UploadPage;
};
1 change: 1 addition & 0 deletions js/dist-typings/admin/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components';
9 changes: 9 additions & 0 deletions js/dist-typings/common/mimeToIcon.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Returns a FontAwesome icon class for a specified MIME type.
*
* If it's a known image type, it returns `image` instead.
*
* @param {string} fileType MIME type
* @returns {string} Icon for MIME type
*/
export default function mimeToIcon(fileType: string): string;
6 changes: 6 additions & 0 deletions js/dist-typings/common/models/File.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default class File {
/**
* Use FoF Uploads endpoint
*/
apiEndpoint(): string;
}
1 change: 1 addition & 0 deletions js/dist-typings/forum/addUploadButton.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
13 changes: 13 additions & 0 deletions js/dist-typings/forum/components/DragAndDrop.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default class DragAndDrop {
constructor(upload: any, composerElement: any);
upload: any;
composerElement: any;
handlers: {};
supportsFileDragging(): boolean;
unload(): void;
isNotFile(event: any): boolean;
in(event: any): void;
over: boolean | undefined;
out(event: any): void;
dropping(event: any): void;
}
10 changes: 10 additions & 0 deletions js/dist-typings/forum/components/FileManagerButton.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default class FileManagerButton extends Component<any, undefined> {
constructor();
/**
* Event handler for upload button being clicked
*
* @param {PointerEvent} e
*/
fileManagerButtonClicked(e: PointerEvent): void;
}
import Component from "flarum/common/Component";
24 changes: 24 additions & 0 deletions js/dist-typings/forum/components/FileManagerModal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default class FileManagerModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs, undefined> {
constructor();
uploader: any;
selectedFiles: any[] | undefined;
multiSelect: any;
restrictFileType: any;
dragDrop: DragAndDrop | null | undefined;
/**
* Add or remove file from selected files
*
* @param {File} file
*/
onFileSelect(file: File): void;
/**
* Add files to file list after upload
*/
onUpload(): void;
/**
* Add selected files to the composer
*/
onSelect(): void;
}
import Modal from "flarum/common/components/Modal";
import DragAndDrop from "./DragAndDrop";
5 changes: 5 additions & 0 deletions js/dist-typings/forum/components/PasteClipboard.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default class PasteClipboard {
constructor(upload: any, element: any);
upload: any;
paste(e: any): void;
}
17 changes: 17 additions & 0 deletions js/dist-typings/forum/components/UploadButton.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default class UploadButton extends Component<any, undefined> {
constructor();
isMediaUploadButton: any;
/**
* Process the upload event.
*
* @param e
*/
process(e: any): void;
/**
* Event handler for upload button being clicked
*
* @param {PointerEvent} e
*/
uploadButtonClicked(e: PointerEvent): void;
}
import Component from "flarum/common/Component";
4 changes: 4 additions & 0 deletions js/dist-typings/forum/components/UploadsUserPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default class UploadsUserPage extends UserPage<import("flarum/forum/components/UserPage").IUserPageAttrs, undefined> {
constructor();
}
import UserPage from "flarum/forum/components/UserPage";
36 changes: 36 additions & 0 deletions js/dist-typings/forum/components/UserFileList.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export default class UserFileList extends Component<any, undefined> {
constructor();
inModal: any;
restrictFileType: any;
downloadOnClick: any;
/**
* @type {string[]} List of file UUIDs currently being hidden.
*/
filesBeingHidden: string[] | undefined;
/**
* The user who's media we are dealing with
*/
user: any;
/**
* Execute function on file click
*
* @param {import('../../common/models/File').default} file
*/
onFileClick(file: import('../../common/models/File').default): void;
/**
* Check if a file is selectable
*
* @param {import('../../common/models/File').default} file
*/
isSelectable(file: import('../../common/models/File').default): any;
/**
* Begins the hiding process for a file.
*
* - Shows a native confirmation dialog
* - If confirmed, sends AJAX request to the hide file API
*
* @param {import('../../common/models/File').default} file File to hide
*/
hideFile(file: import('../../common/models/File').default): void;
}
import Component from "flarum/common/Component";
14 changes: 14 additions & 0 deletions js/dist-typings/forum/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export namespace components {
export { DragAndDrop };
export { FileManagerButton };
export { FileManagerModal };
export { UserFileList };
export { Uploader };
export { UploadButton };
}
import DragAndDrop from "./DragAndDrop";
import FileManagerButton from "./FileManagerButton";
import FileManagerModal from "./FileManagerModal";
import UserFileList from "./UserFileList";
import Uploader from "../handler/Uploader";
import UploadButton from "./UploadButton";
1 change: 1 addition & 0 deletions js/dist-typings/forum/downloadButtonInteraction.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function _default(): void;
13 changes: 13 additions & 0 deletions js/dist-typings/forum/handler/Uploader.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default class Uploader {
callbacks: {
success: never[];
failure: never[];
uploading: never[];
uploaded: never[];
};
uploading: boolean;
on(type: any, callback: any): void;
dispatch(type: any, response: any): void;
upload(files: any, addBBcode?: boolean): Promise<void>;
uploaded(result: any, addBBcode?: boolean): void;
}
1 change: 1 addition & 0 deletions js/dist-typings/forum/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./components";
46 changes: 46 additions & 0 deletions js/dist-typings/forum/states/FileListState.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export default class FileListState {
user: any;
files: any[];
moreResults: boolean;
loading: boolean;
/**
* Set user and load list
*
* @param user A user to populate the media manager
*/
setUser(user: any): void;
/**
* Load more user files
*
* @param offset The index to start the page at.
*/
loadResults(offset?: number): Promise<any> | undefined;
/**
* Load the next page of discussion results.
*/
loadMore(): void;
/**
* Parse results and append them to the file list.
*/
parseResults(results: any): any;
/**
* Add files to the beginning of the list
*/
addToList(files: any): void;
/**
* Are there any files in the list?
*/
hasFiles(): boolean;
/**
* Is the file list loading?
*/
isLoading(): boolean;
/**
* Does this user has more files?
*/
hasMoreResults(): boolean;
/**
* Does this user have any files?
*/
empty(): boolean;
}
2 changes: 1 addition & 1 deletion js/dist/admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

0 comments on commit 46b723b

Please sign in to comment.