1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 07:57:46 +02:00

Bundled output for commit 4b126d9f4c

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

[skip ci]
This commit is contained in:
flarum-bot
2023-11-11 18:46:13 +00:00
parent 4b126d9f4c
commit 6cbdfb6aa1
48 changed files with 155 additions and 29 deletions

View File

@@ -36,7 +36,9 @@ export interface AdminApplicationData extends ApplicationData {
}>;
displayNameDrivers: string[];
slugDrivers: Record<string, string[]>;
searchDrivers: Record<string, string[]>;
permissions: Record<string, string[]>;
advancedPageEmpty: boolean;
}
export default class AdminApplication extends Application {
extensionData: ExtensionData;

View File

@@ -206,5 +206,6 @@ export default abstract class AdminPage<CustomAttrs extends IPageAttrs = IPageAt
* Saves the modified settings to the database.
*/
saveSettings(e: SaveSubmitEvent): Promise<void>;
modelLocale(): Record<string, string>;
}
export {};

View File

@@ -0,0 +1,16 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" />
import AdminPage from './AdminPage';
import type { IPageAttrs } from '../../common/components/Page';
import type Mithril from 'mithril';
export default class AdvancedPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends AdminPage<CustomAttrs> {
searchDriverOptions: Record<string, Record<string, string>>;
oninit(vnode: Mithril.Vnode<CustomAttrs, this>): void;
headerInfo(): {
className: string;
icon: string;
title: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
description: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
};
content(): JSX.Element[];
driverLocale(): Record<string, Record<string, string>>;
}

View File

@@ -7,6 +7,10 @@ export declare type HomePageItem = {
path: string;
label: Mithril.Children;
};
export declare type DriverLocale = {
display_name: Record<string, string>;
slug: Record<string, Record<string, string>>;
};
export default class BasicsPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends AdminPage<CustomAttrs> {
localeOptions: Record<string, string>;
displayNameOptions: Record<string, string>;
@@ -24,4 +28,5 @@ export default class BasicsPage<CustomAttrs extends IPageAttrs = IPageAttrs> ext
* object with `path` and `label` properties.
*/
homePageItems(): ItemList<HomePageItem>;
driverLocale(): DriverLocale;
}

View File

@@ -0,0 +1,14 @@
import Component from '../../common/Component';
import type { ComponentAttrs } from '../../common/Component';
import Mithril from 'mithril';
export interface IFormSectionGroupAttrs extends ComponentAttrs {
}
export default class FormSectionGroup<CustomAttrs extends IFormSectionGroupAttrs = IFormSectionGroupAttrs> extends Component<CustomAttrs> {
view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
}
export interface IFormSectionAttrs extends ComponentAttrs {
label: any;
}
export declare class FormSection<CustomAttrs extends IFormSectionAttrs = IFormSectionAttrs> extends Component<CustomAttrs> {
view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
}

View File

@@ -0,0 +1,12 @@
import IGambit from './query/IGambit';
/**
* The gambit registry. A map of resource types to gambit classes that
* should be used to filter resources of that type. Gambits are automatically
* converted to API filters when requesting resources. Gambits must be applied
* on a filter object that has a `q` property containing the search query.
*/
export default class GambitManager {
gambits: Record<string, Array<new () => IGambit>>;
apply(type: string, filter: Record<string, any>): Record<string, any>;
from(type: string, q: string, filter: Record<string, any>): string;
}

View File

@@ -1,5 +1,6 @@
import { FlarumRequestOptions } from './Application';
import Model, { ModelData, SavedModelData } from './Model';
import GambitManager from './GambitManager';
export interface MetaInformation {
[key: string]: any;
}
@@ -14,7 +15,7 @@ export interface ApiQueryParamsPlural {
include?: string;
filter?: {
q: string;
} | Record<string, string>;
} | Record<string, any>;
page?: {
near?: number;
offset?: number;
@@ -76,6 +77,11 @@ export default class Store {
models: Record<string, {
new (): Model;
}>;
/**
* The gambit manager that will convert search query gambits
* into API filters.
*/
gambits: GambitManager;
constructor(models: Record<string, {
new (): Model;
}>);

View File

@@ -0,0 +1,9 @@
import type IExtender from './IExtender';
import type { IExtensionModule } from './IExtender';
import type Application from '../Application';
import IGambit from '../query/IGambit';
export default class Search implements IExtender {
protected gambits: Record<string, Array<new () => IGambit>>;
gambit(modelType: string, gambit: new () => IGambit): this;
extend(app: Application, extension: IExtensionModule): void;
}

View File

@@ -2,10 +2,12 @@ import Model from './Model';
import PostTypes from './PostTypes';
import Routes from './Routes';
import Store from './Store';
import Search from './Search';
declare const extenders: {
Model: typeof Model;
PostTypes: typeof PostTypes;
Routes: typeof Routes;
Store: typeof Store;
Search: typeof Search;
};
export default extenders;

View File

@@ -0,0 +1,6 @@
export default interface IGambit {
pattern(): string;
toFilter(matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -0,0 +1,7 @@
import IGambit from '../IGambit';
export default class AuthorGambit implements IGambit {
pattern(): string;
toFilter(matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -0,0 +1,7 @@
import IGambit from '../IGambit';
export default class CreatedGambit implements IGambit {
pattern(): string;
toFilter(matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -0,0 +1,7 @@
import IGambit from '../IGambit';
export default class HiddenGambit implements IGambit {
pattern(): string;
toFilter(_matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -0,0 +1,7 @@
import IGambit from '../IGambit';
export default class UnreadGambit implements IGambit {
pattern(): string;
toFilter(_matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -0,0 +1,7 @@
import IGambit from '../IGambit';
export default class EmailGambit implements IGambit {
pattern(): string;
toFilter(matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -0,0 +1,7 @@
import IGambit from '../IGambit';
export default class GroupGambit implements IGambit {
pattern(): string;
toFilter(matches: string[], negate: boolean): Record<string, any>;
filterKey(): string;
fromFilter(value: string, negate: boolean): string;
}

View File

@@ -10,6 +10,7 @@ export default class GlobalSearchState extends SearchState {
* @inheritdoc
*/
getInitialSearch(): string;
private searchToQuery;
/**
* Clear the search input and the current controller's active search.
*/

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