mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +02:00
Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
98
js/dist-typings/admin/utils/ExtensionData.d.ts
vendored
Normal file
98
js/dist-typings/admin/utils/ExtensionData.d.ts
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
export default class ExtensionData {
|
||||
data: {};
|
||||
currentExtension: any;
|
||||
/**
|
||||
* This function simply takes the extension id
|
||||
*
|
||||
* @example
|
||||
* app.extensionData.load('flarum-tags')
|
||||
*
|
||||
* flarum/flags -> flarum-flags | acme/extension -> acme-extension
|
||||
*
|
||||
* @param extension
|
||||
*/
|
||||
for(extension: any): ExtensionData;
|
||||
/**
|
||||
* This function registers your settings with Flarum
|
||||
*
|
||||
* It takes either a settings object or a callback.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* .registerSetting({
|
||||
* setting: 'flarum-flags.guidelines_url',
|
||||
* type: 'text', // This will be inputted into the input tag for the setting (text/number/etc)
|
||||
* label: app.translator.trans('flarum-flags.admin.settings.guidelines_url_label')
|
||||
* }, 15) // priority is optional (ItemList)
|
||||
*
|
||||
*
|
||||
* @param content
|
||||
* @param priority
|
||||
* @returns {ExtensionData}
|
||||
*/
|
||||
registerSetting(content: any, priority?: number): ExtensionData;
|
||||
/**
|
||||
* This function registers your permission with Flarum
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* .registerPermission('permissions', {
|
||||
* icon: 'fas fa-flag',
|
||||
* label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),
|
||||
* permission: 'discussion.viewFlags'
|
||||
* }, 'moderate', 65)
|
||||
*
|
||||
* @param content
|
||||
* @param permissionType
|
||||
* @param priority
|
||||
* @returns {ExtensionData}
|
||||
*/
|
||||
registerPermission(content: any, permissionType?: any, priority?: number): ExtensionData;
|
||||
/**
|
||||
* Replace the default extension page with a custom component.
|
||||
* This component would typically extend ExtensionPage
|
||||
*
|
||||
* @param component
|
||||
* @returns {ExtensionData}
|
||||
*/
|
||||
registerPage(component: any): ExtensionData;
|
||||
/**
|
||||
* Get an extension's registered settings
|
||||
*
|
||||
* @param extensionId
|
||||
* @returns {boolean|*}
|
||||
*/
|
||||
getSettings(extensionId: any): boolean | any;
|
||||
/**
|
||||
*
|
||||
* Get an ItemList of all extensions' registered permissions
|
||||
*
|
||||
* @param extension
|
||||
* @param type
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
getAllExtensionPermissions(type: any): ItemList;
|
||||
/**
|
||||
* Get a singular extension's registered permissions
|
||||
*
|
||||
* @param extension
|
||||
* @param type
|
||||
* @returns {boolean|*}
|
||||
*/
|
||||
getExtensionPermissions(extension: any, type: any): boolean | any;
|
||||
/**
|
||||
* Checks whether a given extension has registered permissions.
|
||||
*
|
||||
* @param extension
|
||||
* @returns {boolean}
|
||||
*/
|
||||
extensionHasPermissions(extension: any): boolean;
|
||||
/**
|
||||
* Returns an extension's custom page component if it exists.
|
||||
*
|
||||
* @param extension
|
||||
* @returns {boolean|*}
|
||||
*/
|
||||
getPage(extension: any): boolean | any;
|
||||
}
|
||||
import ItemList from "../../common/utils/ItemList";
|
1
js/dist-typings/admin/utils/getCategorizedExtensions.d.ts
vendored
Normal file
1
js/dist-typings/admin/utils/getCategorizedExtensions.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function getCategorizedExtensions(): {};
|
1
js/dist-typings/admin/utils/isExtensionEnabled.d.ts
vendored
Normal file
1
js/dist-typings/admin/utils/isExtensionEnabled.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function isExtensionEnabled(name: any): any;
|
1
js/dist-typings/admin/utils/saveSettings.d.ts
vendored
Normal file
1
js/dist-typings/admin/utils/saveSettings.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function saveSettings(settings: any): Promise<any>;
|
Reference in New Issue
Block a user