1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 15:37:51 +02:00

Bundled output for commit 64f0ae7c33

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

[skip ci]
This commit is contained in:
flarum-bot
2022-07-19 09:36:41 +00:00
parent 64f0ae7c33
commit 6b577e6f1f
5 changed files with 55 additions and 39 deletions

View File

@@ -0,0 +1,12 @@
import DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';
import type Mithril from 'mithril';
export default class MiniStatisticsWidget extends DashboardWidget {
entities: string[];
lifetimeData: any;
loadingLifetime: boolean;
oncreate(vnode: Mithril.VnodeDOM<IDashboardWidgetAttrs, this>): void;
loadLifetimeData(): Promise<void>;
className(): string;
content(): JSX.Element;
getTotalCount(entity: string): number;
}

View File

@@ -0,0 +1,5 @@
/// <reference types="mithril" />
import ExtensionPage from 'flarum/admin/components/ExtensionPage';
export default class StatisticsPage extends ExtensionPage {
content(): JSX.Element;
}

View File

@@ -1,42 +1,41 @@
export default class StatisticsWidget { import DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';
oninit(vnode: any): void; import type Mithril from 'mithril';
entities: string[] | undefined; interface IPeriodDeclaration {
periods: {
today: {
start: Date;
end: any;
step: number;
};
last_7_days: {
start: number; start: number;
end: Date; end: number;
step: number; step: number;
}; }
last_28_days: { export default class StatisticsWidget extends DashboardWidget {
start: number; entities: string[];
end: Date; periods: undefined | Record<string, IPeriodDeclaration>;
step: number; chart: any;
}; timedData: any;
last_12_months: { lifetimeData: any;
start: number; loadingLifetime: boolean;
end: Date; loadingTimed: boolean;
step: number; selectedEntity: string;
}; selectedPeriod: undefined | string;
} | undefined; chartEntity?: string;
selectedEntity: any; chartPeriod?: string;
selectedPeriod: any; oncreate(vnode: Mithril.VnodeDOM<IDashboardWidgetAttrs, this>): void;
loadLifetimeData(): Promise<void>;
loadTimedData(): Promise<void>;
className(): string; className(): string;
content(): JSX.Element; content(): JSX.Element;
drawChart(vnode: any): void; drawChart(vnode: Mithril.VnodeDOM<any, any>): void;
chart: any; changeEntity(entity: string): void;
entity: any; changePeriod(period: string): void;
period: any; getTotalCount(entity: string): number;
changeEntity(entity: any): void; getPeriodCount(entity: string, period: {
changePeriod(period: any): void;
getTotalCount(entity: any): any;
getPeriodCount(entity: any, period: any): number;
getLastPeriod(thisPeriod: any): {
start: number; start: number;
end: any; end: number;
}): number;
getLastPeriod(thisPeriod: {
start: number;
end: number;
}): {
start: number;
end: number;
}; };
} }
export {};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long