mirror of
https://github.com/flarum/core.git
synced 2025-08-09 01:46:35 +02:00
Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
17
js/dist-typings/admin/AdminApplication.d.ts
vendored
Normal file
17
js/dist-typings/admin/AdminApplication.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export default class AdminApplication extends Application {
|
||||
extensionData: ExtensionData;
|
||||
extensionCategories: {
|
||||
feature: number;
|
||||
theme: number;
|
||||
language: number;
|
||||
};
|
||||
history: {
|
||||
canGoBack: () => boolean;
|
||||
getPrevious: () => void;
|
||||
backUrl: () => any;
|
||||
back: () => void;
|
||||
};
|
||||
getRequiredPermissions(permission: any): string[];
|
||||
}
|
||||
import Application from "../common/Application";
|
||||
import ExtensionData from "./utils/ExtensionData";
|
3
js/dist-typings/admin/app.d.ts
vendored
Normal file
3
js/dist-typings/admin/app.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import Admin from './AdminApplication';
|
||||
declare const app: Admin;
|
||||
export default app;
|
164
js/dist-typings/admin/compat.d.ts
vendored
Normal file
164
js/dist-typings/admin/compat.d.ts
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
declare var _default: {
|
||||
extend: typeof import("../common/extend");
|
||||
Session: typeof import("../common/Session").default;
|
||||
Store: typeof import("../common/Store").default;
|
||||
'utils/BasicEditorDriver': typeof import("../common/utils/BasicEditorDriver").default;
|
||||
'utils/evented': {
|
||||
handlers: Object;
|
||||
getHandlers(event: string): any[];
|
||||
trigger(event: string, ...args: any[]): void;
|
||||
on(event: string, handler: Function): void;
|
||||
one(event: string, handler: Function): void;
|
||||
off(event: string, handler: Function): void;
|
||||
};
|
||||
'utils/liveHumanTimes': typeof import("../common/utils/liveHumanTimes").default;
|
||||
'utils/ItemList': typeof import("../common/utils/ItemList").default;
|
||||
'utils/mixin': typeof import("../common/utils/mixin").default;
|
||||
'utils/humanTime': typeof import("../common/utils/humanTime").default;
|
||||
'utils/computed': typeof import("../common/utils/computed").default;
|
||||
'utils/insertText': typeof import("../common/utils/insertText").default;
|
||||
'utils/styleSelectedText': typeof import("../common/utils/styleSelectedText").default;
|
||||
'utils/Drawer': typeof import("../common/utils/Drawer").default;
|
||||
'utils/anchorScroll': typeof import("../common/utils/anchorScroll").default;
|
||||
'utils/RequestError': typeof import("../common/utils/RequestError").default;
|
||||
'utils/abbreviateNumber': typeof import("../common/utils/abbreviateNumber").default;
|
||||
'utils/string': typeof import("../common/utils/string");
|
||||
'utils/SubtreeRetainer': typeof import("../common/utils/SubtreeRetainer").default;
|
||||
'utils/escapeRegExp': typeof import("../common/utils/escapeRegExp").default;
|
||||
'utils/extract': typeof import("../common/utils/extract").default;
|
||||
'utils/ScrollListener': typeof import("../common/utils/ScrollListener").default;
|
||||
'utils/stringToColor': typeof import("../common/utils/stringToColor").default;
|
||||
'utils/Stream': typeof import("mithril/stream");
|
||||
'utils/subclassOf': typeof import("../common/utils/subclassOf").default;
|
||||
'utils/setRouteWithForcedRefresh': typeof import("../common/utils/setRouteWithForcedRefresh").default;
|
||||
'utils/patchMithril': typeof import("../common/utils/patchMithril").default;
|
||||
'utils/proxifyCompat': (compat: {
|
||||
[key: string]: any;
|
||||
}, namespace: string) => {
|
||||
[key: string]: any;
|
||||
};
|
||||
'utils/classList': (...classes: import("clsx").ClassValue[]) => string;
|
||||
'utils/extractText': typeof import("../common/utils/extractText").default;
|
||||
'utils/formatNumber': typeof import("../common/utils/formatNumber").default;
|
||||
'utils/mapRoutes': typeof import("../common/utils/mapRoutes").default;
|
||||
'utils/withAttr': (key: string, cb: Function) => (this: Element) => void;
|
||||
'utils/throttleDebounce': typeof import("../common/utils/throttleDebounce");
|
||||
'models/Notification': typeof import("../common/models/Notification").default;
|
||||
'models/User': typeof import("../common/models/User").default;
|
||||
'models/Post': typeof import("../common/models/Post").default;
|
||||
'models/Discussion': typeof import("../common/models/Discussion").default;
|
||||
'models/Group': typeof import("../common/models/Group").default;
|
||||
'models/Forum': typeof import("../common/models/Forum").default;
|
||||
Component: typeof import("../common/Component").default;
|
||||
Fragment: typeof import("../common/Fragment").default;
|
||||
Translator: typeof import("../common/Translator").default;
|
||||
'components/AlertManager': typeof import("../common/components/AlertManager").default;
|
||||
'components/Page': typeof import("../common/components/Page").default;
|
||||
'components/Switch': typeof import("../common/components/Switch").default;
|
||||
'components/Badge': typeof import("../common/components/Badge").default;
|
||||
'components/LoadingIndicator': typeof import("../common/components/LoadingIndicator").default;
|
||||
'components/Placeholder': typeof import("../common/components/Placeholder").default;
|
||||
'components/Separator': typeof import("../common/components/Separator").default;
|
||||
'components/Dropdown': typeof import("../common/components/Dropdown").default;
|
||||
'components/SplitDropdown': typeof import("../common/components/SplitDropdown").default;
|
||||
'components/RequestErrorModal': typeof import("../common/components/RequestErrorModal").default;
|
||||
'components/FieldSet': typeof import("../common/components/FieldSet").default;
|
||||
'components/Select': typeof import("../common/components/Select").default;
|
||||
'components/Navigation': typeof import("../common/components/Navigation").default;
|
||||
'components/Alert': typeof import("../common/components/Alert").default;
|
||||
'components/Link': typeof import("../common/components/Link").default;
|
||||
'components/LinkButton': typeof import("../common/components/LinkButton").default;
|
||||
'components/Checkbox': typeof import("../common/components/Checkbox").default;
|
||||
'components/SelectDropdown': typeof import("../common/components/SelectDropdown").default;
|
||||
'components/ModalManager': typeof import("../common/components/ModalManager").default;
|
||||
'components/Button': typeof import("../common/components/Button").default;
|
||||
'components/Modal': typeof import("../common/components/Modal").default;
|
||||
'components/GroupBadge': typeof import("../common/components/GroupBadge").default;
|
||||
'components/TextEditor': typeof import("../common/components/TextEditor").default;
|
||||
'components/TextEditorButton': typeof import("../common/components/TextEditorButton").default;
|
||||
'components/Tooltip': typeof import("../common/components/Tooltip").default;
|
||||
'components/EditUserModal': typeof import("../common/components/EditUserModal").default;
|
||||
Model: typeof import("../common/Model").default;
|
||||
Application: typeof import("../common/Application").default;
|
||||
'helpers/fullTime': typeof import("../common/helpers/fullTime").default;
|
||||
'helpers/avatar': typeof import("../common/helpers/avatar").default;
|
||||
'helpers/icon': typeof import("../common/helpers/icon").default;
|
||||
'helpers/humanTime': typeof import("../common/helpers/humanTime").default;
|
||||
'helpers/punctuateSeries': typeof import("../common/helpers/punctuateSeries").default;
|
||||
'helpers/highlight': typeof import("../common/helpers/highlight").default;
|
||||
'helpers/username': typeof import("../common/helpers/username").default;
|
||||
'helpers/userOnline': typeof import("../common/helpers/userOnline").default;
|
||||
'helpers/listItems': typeof import("../common/helpers/listItems").default;
|
||||
'resolvers/DefaultResolver': typeof import("../common/resolvers/DefaultResolver").default;
|
||||
'states/PaginatedListState': typeof import("../common/states/PaginatedListState").default;
|
||||
} & {
|
||||
'utils/saveSettings': typeof saveSettings;
|
||||
'utils/ExtensionData': typeof ExtensionData;
|
||||
'utils/isExtensionEnabled': typeof isExtensionEnabled;
|
||||
'utils/getCategorizedExtensions': typeof getCategorizedExtensions;
|
||||
'components/SettingDropdown': typeof SettingDropdown;
|
||||
'components/EditCustomFooterModal': typeof EditCustomFooterModal;
|
||||
'components/SessionDropdown': typeof SessionDropdown;
|
||||
'components/HeaderPrimary': typeof HeaderPrimary;
|
||||
'components/AdminPage': typeof AdminPage;
|
||||
'components/AppearancePage': typeof AppearancePage;
|
||||
'components/StatusWidget': typeof StatusWidget;
|
||||
'components/ExtensionsWidget': typeof ExtensionsWidget;
|
||||
'components/HeaderSecondary': typeof HeaderSecondary;
|
||||
'components/SettingsModal': typeof SettingsModal;
|
||||
'components/DashboardWidget': typeof DashboardWidget;
|
||||
'components/ExtensionPage': typeof ExtensionPage;
|
||||
'components/ExtensionLinkButton': typeof ExtensionLinkButton;
|
||||
'components/PermissionGrid': typeof PermissionGrid;
|
||||
'components/ExtensionPermissionGrid': typeof ExtensionPermissionGrid;
|
||||
'components/MailPage': typeof MailPage;
|
||||
'components/UploadImageButton': typeof UploadImageButton;
|
||||
'components/LoadingModal': typeof LoadingModal;
|
||||
'components/DashboardPage': typeof DashboardPage;
|
||||
'components/BasicsPage': typeof BasicsPage;
|
||||
'components/UserListPage': typeof UserListPage;
|
||||
'components/EditCustomHeaderModal': typeof EditCustomHeaderModal;
|
||||
'components/PermissionsPage': typeof PermissionsPage;
|
||||
'components/PermissionDropdown': typeof PermissionDropdown;
|
||||
'components/AdminNav': typeof AdminNav;
|
||||
'components/AdminHeader': typeof AdminHeader;
|
||||
'components/EditCustomCssModal': typeof EditCustomCssModal;
|
||||
'components/EditGroupModal': typeof EditGroupModal;
|
||||
routes: typeof routes;
|
||||
AdminApplication: typeof AdminApplication;
|
||||
};
|
||||
export default _default;
|
||||
import saveSettings from "./utils/saveSettings";
|
||||
import ExtensionData from "./utils/ExtensionData";
|
||||
import isExtensionEnabled from "./utils/isExtensionEnabled";
|
||||
import getCategorizedExtensions from "./utils/getCategorizedExtensions";
|
||||
import SettingDropdown from "./components/SettingDropdown";
|
||||
import EditCustomFooterModal from "./components/EditCustomFooterModal";
|
||||
import SessionDropdown from "./components/SessionDropdown";
|
||||
import HeaderPrimary from "./components/HeaderPrimary";
|
||||
import AdminPage from "./components/AdminPage";
|
||||
import AppearancePage from "./components/AppearancePage";
|
||||
import StatusWidget from "./components/StatusWidget";
|
||||
import ExtensionsWidget from "./components/ExtensionsWidget";
|
||||
import HeaderSecondary from "./components/HeaderSecondary";
|
||||
import SettingsModal from "./components/SettingsModal";
|
||||
import DashboardWidget from "./components/DashboardWidget";
|
||||
import ExtensionPage from "./components/ExtensionPage";
|
||||
import ExtensionLinkButton from "./components/ExtensionLinkButton";
|
||||
import PermissionGrid from "./components/PermissionGrid";
|
||||
import ExtensionPermissionGrid from "./components/ExtensionPermissionGrid";
|
||||
import MailPage from "./components/MailPage";
|
||||
import UploadImageButton from "./components/UploadImageButton";
|
||||
import LoadingModal from "./components/LoadingModal";
|
||||
import DashboardPage from "./components/DashboardPage";
|
||||
import BasicsPage from "./components/BasicsPage";
|
||||
import UserListPage from "./components/UserListPage";
|
||||
import EditCustomHeaderModal from "./components/EditCustomHeaderModal";
|
||||
import PermissionsPage from "./components/PermissionsPage";
|
||||
import PermissionDropdown from "./components/PermissionDropdown";
|
||||
import AdminNav from "./components/AdminNav";
|
||||
import AdminHeader from "./components/AdminHeader";
|
||||
import EditCustomCssModal from "./components/EditCustomCssModal";
|
||||
import EditGroupModal from "./components/EditGroupModal";
|
||||
import routes from "./routes";
|
||||
import AdminApplication from "./AdminApplication";
|
4
js/dist-typings/admin/components/AdminHeader.d.ts
vendored
Normal file
4
js/dist-typings/admin/components/AdminHeader.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export default class AdminHeader extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
15
js/dist-typings/admin/components/AdminNav.d.ts
vendored
Normal file
15
js/dist-typings/admin/components/AdminNav.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export default class AdminNav extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
constructor();
|
||||
query: Stream<string> | undefined;
|
||||
scrollToActive(): void;
|
||||
/**
|
||||
* Build an item list of main links to show in the admin navigation.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
extensionItems(): ItemList;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import Stream from "../../common/utils/Stream";
|
||||
import ItemList from "../../common/utils/ItemList";
|
55
js/dist-typings/admin/components/AdminPage.d.ts
vendored
Normal file
55
js/dist-typings/admin/components/AdminPage.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
export default class AdminPage extends Page {
|
||||
settings: {} | undefined;
|
||||
loading: boolean | undefined;
|
||||
content(): string;
|
||||
submitButton(): JSX.Element;
|
||||
header(): JSX.Element;
|
||||
headerInfo(): {
|
||||
className: string;
|
||||
icon: string;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
/**
|
||||
* buildSettingComponent takes a settings object and turns it into a component.
|
||||
* Depending on the type of input, you can set the type to 'bool', 'select', or
|
||||
* any standard <input> type. Any values inside the 'extra' object will be added
|
||||
* to the component as an attribute.
|
||||
*
|
||||
* Alternatively, you can pass a callback that will be executed in ExtensionPage's
|
||||
* context to include custom JSX elements.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* {
|
||||
* setting: 'acme.checkbox',
|
||||
* label: app.translator.trans('acme.admin.setting_label'),
|
||||
* type: 'bool',
|
||||
* help: app.translator.trans('acme.admin.setting_help'),
|
||||
* className: 'Setting-item'
|
||||
* }
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* {
|
||||
* setting: 'acme.select',
|
||||
* label: app.translator.trans('acme.admin.setting_label'),
|
||||
* type: 'select',
|
||||
* options: {
|
||||
* 'option1': 'Option 1 label',
|
||||
* 'option2': 'Option 2 label',
|
||||
* },
|
||||
* default: 'option1',
|
||||
* }
|
||||
*
|
||||
* @param setting
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
buildSettingComponent(entry: any): JSX.Element;
|
||||
onsaved(): void;
|
||||
setting(key: any, fallback?: string): any;
|
||||
dirty(): {};
|
||||
isChanged(): number;
|
||||
saveSettings(e: any): Promise<void>;
|
||||
}
|
||||
import Page from "../../common/components/Page";
|
3
js/dist-typings/admin/components/AppearancePage.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/AppearancePage.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class AppearancePage extends AdminPage {
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
15
js/dist-typings/admin/components/BasicsPage.d.ts
vendored
Normal file
15
js/dist-typings/admin/components/BasicsPage.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export default class BasicsPage extends AdminPage {
|
||||
localeOptions: {} | undefined;
|
||||
displayNameOptions: {} | undefined;
|
||||
slugDriverOptions: {} | undefined;
|
||||
/**
|
||||
* Build a list of options for the default homepage. Each option must be an
|
||||
* object with `path` and `label` properties.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
public homePageItems(): ItemList;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
import ItemList from "../../common/utils/ItemList";
|
5
js/dist-typings/admin/components/DashboardPage.d.ts
vendored
Normal file
5
js/dist-typings/admin/components/DashboardPage.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export default class DashboardPage extends AdminPage {
|
||||
availableWidgets(): ItemList;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
import ItemList from "../../common/utils/ItemList";
|
16
js/dist-typings/admin/components/DashboardWidget.d.ts
vendored
Normal file
16
js/dist-typings/admin/components/DashboardWidget.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export default class DashboardWidget extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
constructor();
|
||||
/**
|
||||
* Get the class name to apply to the widget.
|
||||
*
|
||||
* @return {String}
|
||||
*/
|
||||
className(): string;
|
||||
/**
|
||||
* Get the content of the widget.
|
||||
*
|
||||
* @return {VirtualElement}
|
||||
*/
|
||||
content(): any;
|
||||
}
|
||||
import Component from "../../common/Component";
|
3
js/dist-typings/admin/components/EditCustomCssModal.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/EditCustomCssModal.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class EditCustomCssModal extends SettingsModal {
|
||||
}
|
||||
import SettingsModal from "./SettingsModal";
|
3
js/dist-typings/admin/components/EditCustomFooterModal.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/EditCustomFooterModal.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class EditCustomFooterModal extends SettingsModal {
|
||||
}
|
||||
import SettingsModal from "./SettingsModal";
|
3
js/dist-typings/admin/components/EditCustomHeaderModal.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/EditCustomHeaderModal.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class EditCustomHeaderModal extends SettingsModal {
|
||||
}
|
||||
import SettingsModal from "./SettingsModal";
|
24
js/dist-typings/admin/components/EditGroupModal.d.ts
vendored
Normal file
24
js/dist-typings/admin/components/EditGroupModal.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* The `EditGroupModal` component shows a modal dialog which allows the user
|
||||
* to create or edit a group.
|
||||
*/
|
||||
export default class EditGroupModal extends Modal {
|
||||
group: any;
|
||||
nameSingular: Stream<any> | undefined;
|
||||
namePlural: Stream<any> | undefined;
|
||||
icon: Stream<any> | undefined;
|
||||
color: Stream<any> | undefined;
|
||||
isHidden: Stream<any> | undefined;
|
||||
fields(): ItemList;
|
||||
submitData(): {
|
||||
nameSingular: any;
|
||||
namePlural: any;
|
||||
color: any;
|
||||
icon: any;
|
||||
isHidden: any;
|
||||
};
|
||||
deleteGroup(): void;
|
||||
}
|
||||
import Modal from "../../common/components/Modal";
|
||||
import Stream from "../../common/utils/Stream";
|
||||
import ItemList from "../../common/utils/ItemList";
|
5
js/dist-typings/admin/components/ExtensionLinkButton.d.ts
vendored
Normal file
5
js/dist-typings/admin/components/ExtensionLinkButton.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export default class ExtensionLinkButton extends LinkButton {
|
||||
statusItems(name: any): ItemList;
|
||||
}
|
||||
import LinkButton from "../../common/components/LinkButton";
|
||||
import ItemList from "../../common/utils/ItemList";
|
21
js/dist-typings/admin/components/ExtensionPage.d.ts
vendored
Normal file
21
js/dist-typings/admin/components/ExtensionPage.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export default class ExtensionPage extends AdminPage {
|
||||
extension: any;
|
||||
changingState: boolean | undefined;
|
||||
infoFields: {
|
||||
discuss: string;
|
||||
documentation: string;
|
||||
support: string;
|
||||
website: string;
|
||||
donate: string;
|
||||
source: string;
|
||||
} | undefined;
|
||||
className(): string;
|
||||
sections(): ItemList;
|
||||
topItems(): ItemList;
|
||||
infoItems(): ItemList;
|
||||
toggle(): void;
|
||||
isEnabled(): any;
|
||||
onerror(e: any): void;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
import ItemList from "../../common/utils/ItemList";
|
4
js/dist-typings/admin/components/ExtensionPermissionGrid.d.ts
vendored
Normal file
4
js/dist-typings/admin/components/ExtensionPermissionGrid.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export default class ExtensionPermissionGrid extends PermissionGrid {
|
||||
extensionId: any;
|
||||
}
|
||||
import PermissionGrid from "./PermissionGrid";
|
6
js/dist-typings/admin/components/ExtensionsWidget.d.ts
vendored
Normal file
6
js/dist-typings/admin/components/ExtensionsWidget.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default class ExtensionsWidget extends DashboardWidget {
|
||||
categorizedExtensions: {} | undefined;
|
||||
extensionCategory(category: any): JSX.Element;
|
||||
extensionWidget(extension: any): JSX.Element;
|
||||
}
|
||||
import DashboardWidget from "./DashboardWidget";
|
16
js/dist-typings/admin/components/HeaderPrimary.d.ts
vendored
Normal file
16
js/dist-typings/admin/components/HeaderPrimary.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* The `HeaderPrimary` component displays primary header controls. On the
|
||||
* default skin, these are shown just to the right of the forum title.
|
||||
*/
|
||||
export default class HeaderPrimary extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
constructor();
|
||||
config(isInitialized: any, context: any): void;
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
14
js/dist-typings/admin/components/HeaderSecondary.d.ts
vendored
Normal file
14
js/dist-typings/admin/components/HeaderSecondary.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* The `HeaderSecondary` component displays secondary header controls.
|
||||
*/
|
||||
export default class HeaderSecondary extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
constructor();
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
3
js/dist-typings/admin/components/LoadingModal.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/LoadingModal.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class LoadingModal extends Modal {
|
||||
}
|
||||
import Modal from "../../common/components/Modal";
|
12
js/dist-typings/admin/components/MailPage.d.ts
vendored
Normal file
12
js/dist-typings/admin/components/MailPage.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export default class MailPage extends AdminPage {
|
||||
sendingTest: boolean | undefined;
|
||||
refresh(): void;
|
||||
status: {
|
||||
sending: boolean;
|
||||
errors: {};
|
||||
} | undefined;
|
||||
driverFields: any;
|
||||
sendTestEmail(): void;
|
||||
testEmailSuccessAlert: number | undefined;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
6
js/dist-typings/admin/components/PermissionDropdown.d.ts
vendored
Normal file
6
js/dist-typings/admin/components/PermissionDropdown.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default class PermissionDropdown extends Dropdown {
|
||||
save(groupIds: any): void;
|
||||
toggle(groupId: any): void;
|
||||
isGroupDisabled(id: any): boolean;
|
||||
}
|
||||
import Dropdown from "../../common/components/Dropdown";
|
12
js/dist-typings/admin/components/PermissionGrid.d.ts
vendored
Normal file
12
js/dist-typings/admin/components/PermissionGrid.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export default class PermissionGrid extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
constructor();
|
||||
permissionItems(): ItemList;
|
||||
viewItems(): ItemList;
|
||||
startItems(): ItemList;
|
||||
replyItems(): ItemList;
|
||||
moderateItems(): ItemList;
|
||||
scopeItems(): ItemList;
|
||||
scopeControlItems(): ItemList;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
3
js/dist-typings/admin/components/PermissionsPage.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/PermissionsPage.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class PermissionsPage extends AdminPage {
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
14
js/dist-typings/admin/components/SessionDropdown.d.ts
vendored
Normal file
14
js/dist-typings/admin/components/SessionDropdown.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* The `SessionDropdown` component shows a button with the current user's
|
||||
* avatar/name, with a dropdown of session controls.
|
||||
*/
|
||||
export default class SessionDropdown extends Dropdown {
|
||||
/**
|
||||
* Build an item list for the contents of the dropdown menu.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items(): ItemList;
|
||||
}
|
||||
import Dropdown from "../../common/components/Dropdown";
|
||||
import ItemList from "../../common/utils/ItemList";
|
3
js/dist-typings/admin/components/SettingDropdown.d.ts
vendored
Normal file
3
js/dist-typings/admin/components/SettingDropdown.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default class SettingDropdown extends SelectDropdown {
|
||||
}
|
||||
import SelectDropdown from "../../common/components/SelectDropdown";
|
10
js/dist-typings/admin/components/SettingsModal.d.ts
vendored
Normal file
10
js/dist-typings/admin/components/SettingsModal.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default class SettingsModal extends Modal {
|
||||
settings: {} | undefined;
|
||||
form(): string;
|
||||
submitButton(): JSX.Element;
|
||||
setting(key: any, fallback?: string): any;
|
||||
dirty(): {};
|
||||
changed(): number;
|
||||
onsaved(): void;
|
||||
}
|
||||
import Modal from "../../common/components/Modal";
|
6
js/dist-typings/admin/components/StatusWidget.d.ts
vendored
Normal file
6
js/dist-typings/admin/components/StatusWidget.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default class StatusWidget extends DashboardWidget {
|
||||
items(): ItemList;
|
||||
handleClearCache(e: any): void;
|
||||
}
|
||||
import DashboardWidget from "./DashboardWidget";
|
||||
import ItemList from "../../common/utils/ItemList";
|
27
js/dist-typings/admin/components/UploadImageButton.d.ts
vendored
Normal file
27
js/dist-typings/admin/components/UploadImageButton.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
export default class UploadImageButton extends Button {
|
||||
loading: boolean;
|
||||
/**
|
||||
* Prompt the user to upload an image.
|
||||
*/
|
||||
upload(): void;
|
||||
/**
|
||||
* Remove the logo.
|
||||
*/
|
||||
remove(): void;
|
||||
resourceUrl(): string;
|
||||
/**
|
||||
* After a successful upload/removal, reload the page.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @protected
|
||||
*/
|
||||
protected success(response: Object): void;
|
||||
/**
|
||||
* If upload/removal fails, stop loading.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @protected
|
||||
*/
|
||||
protected failure(response: Object): void;
|
||||
}
|
||||
import Button from "../../common/components/Button";
|
72
js/dist-typings/admin/components/UserListPage.d.ts
vendored
Normal file
72
js/dist-typings/admin/components/UserListPage.d.ts
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/// <reference types="mithril" />
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import AdminPage from './AdminPage';
|
||||
/**
|
||||
* Admin page which displays a paginated list of all users on the forum.
|
||||
*/
|
||||
export default class UserListPage extends AdminPage {
|
||||
/**
|
||||
* Number of users to load per page.
|
||||
*/
|
||||
private numPerPage;
|
||||
/**
|
||||
* Current page number. Zero-indexed.
|
||||
*/
|
||||
private pageNumber;
|
||||
/**
|
||||
* Total number of forum users.
|
||||
*
|
||||
* Fetched from the active `AdminApplication` (`app`), with
|
||||
* data provided by `AdminPayload.php`, or `flarum/statistics`
|
||||
* if installed.
|
||||
*/
|
||||
readonly userCount: number;
|
||||
/**
|
||||
* Get total number of user pages.
|
||||
*/
|
||||
private getTotalPageCount;
|
||||
/**
|
||||
* This page's array of users.
|
||||
*
|
||||
* `undefined` when page loads as no data has been fetched.
|
||||
*/
|
||||
private pageData;
|
||||
/**
|
||||
* Are there more users available?
|
||||
*/
|
||||
private moreData;
|
||||
private isLoadingPage;
|
||||
/**
|
||||
* Component to render.
|
||||
*/
|
||||
content(): JSX.Element[];
|
||||
/**
|
||||
* Build an item list of columns to show for each user.
|
||||
*
|
||||
* Each column in the list should be an object with keys `name` and `content`.
|
||||
*
|
||||
* `name` is a string that will be used as the column name.
|
||||
* `content` is a function with the User model passed as the first and only argument.
|
||||
*
|
||||
* See `UserListPage.tsx` for examples.
|
||||
*/
|
||||
columns(): ItemList;
|
||||
headerInfo(): {
|
||||
className: string;
|
||||
icon: string;
|
||||
title: any;
|
||||
description: any;
|
||||
};
|
||||
/**
|
||||
* Asynchronously fetch the next set of users to be rendered.
|
||||
*
|
||||
* Returns an array of Users, plus the raw API payload.
|
||||
*
|
||||
* Uses the `this.numPerPage` as the response limit, and automatically calculates the offset required from `pageNumber`.
|
||||
*
|
||||
* @param pageNumber The page number to load and display
|
||||
*/
|
||||
loadPage(pageNumber: number): Promise<void>;
|
||||
nextPage(): void;
|
||||
previousPage(): void;
|
||||
}
|
5
js/dist-typings/admin/index.d.ts
vendored
Normal file
5
js/dist-typings/admin/index.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import app from './app';
|
||||
export { app };
|
||||
export declare const compat: {
|
||||
[key: string]: any;
|
||||
};
|
9
js/dist-typings/admin/resolvers/ExtensionPageResolver.d.ts
vendored
Normal file
9
js/dist-typings/admin/resolvers/ExtensionPageResolver.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import DefaultResolver from '../../common/resolvers/DefaultResolver';
|
||||
/**
|
||||
* A custom route resolver for ExtensionPage that generates handles routes
|
||||
* to default extension pages or a page provided by an extension.
|
||||
*/
|
||||
export default class ExtensionPageResolver extends DefaultResolver {
|
||||
static extension: string | null;
|
||||
onmatch(args: any, requestedPath: any, route: any): any;
|
||||
}
|
6
js/dist-typings/admin/routes.d.ts
vendored
Normal file
6
js/dist-typings/admin/routes.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* The `routes` initializer defines the forum app's routes.
|
||||
*
|
||||
* @param {App} app
|
||||
*/
|
||||
export default function _default(app: any): void;
|
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