Bundled output for commit f83020cd1f

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

[skip ci]
This commit is contained in:
flarum-bot 2024-10-12 13:40:26 +00:00
parent f83020cd1f
commit abe1a4cc30
9 changed files with 36 additions and 8 deletions

View File

@ -1,2 +1,2 @@
declare const _default: import("flarum/common/extenders/Admin").default[];
declare const _default: any[];
export default _default;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,28 @@
export type GeneralIndexItem = {
/**
* The unique identifier for this index item.
*/
id: string;
/**
* Optional: The tree path to this item, used for grouping in the search results.
*/
tree?: string[];
/**
* The label to display in the search results.
*/
label: string;
/**
* Optional: The description to display in the search results.
*/
help?: string;
/**
* Optional: The URL to navigate to when this item is selected.
* The default is to navigate to the extension page.
*/
link?: string;
/**
* Optional: A callback that returns a boolean indicating whether this item should be visible in the search results.
*/
visible?: () => boolean;
};
export type GeneralIndexData = Record<string, Record<'settings' | 'permissions', GeneralIndexItem[]>>;

View File

@ -2,7 +2,8 @@ import IExtender, { IExtensionModule } from './IExtender';
import type AdminApplication from '../../admin/AdminApplication';
import type { CustomExtensionPage, SettingConfigInternal } from '../../admin/utils/AdminRegistry';
import type { PermissionConfig, PermissionType } from '../../admin/components/PermissionGrid';
import Mithril from 'mithril';
import type Mithril from 'mithril';
import type { GeneralIndexItem } from '../../admin/states/GeneralSearchIndex';
export default class Admin implements IExtender<AdminApplication> {
protected settings: {
setting?: () => SettingConfigInternal;
@ -15,6 +16,10 @@ export default class Admin implements IExtender<AdminApplication> {
priority: number;
}[];
protected customPage: CustomExtensionPage | null;
protected generalIndexes: {
settings?: () => GeneralIndexItem[];
permissions?: () => GeneralIndexItem[];
};
/**
* Register a setting to be shown on the extension's settings page.
*/
@ -31,5 +36,9 @@ export default class Admin implements IExtender<AdminApplication> {
* Register a custom page to be shown in the admin interface.
*/
page(page: CustomExtensionPage): this;
/**
* Register a custom general search index entry.
*/
generalIndexItems(type: 'settings' | 'permissions', items: () => GeneralIndexItem[]): this;
extend(app: AdminApplication, extension: IExtensionModule): void;
}

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