-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
- Loading branch information
1 parent
57ddc06
commit 46b723b
Showing
22 changed files
with
278 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './components'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default class File { | ||
/** | ||
* Use FoF Uploads endpoint | ||
*/ | ||
apiEndpoint(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function _default(): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function _default(): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./components"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.