Skip to content

Commit

Permalink
Bundled output for commit 4d496e7
Browse files Browse the repository at this point in the history
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
  • Loading branch information
flarum-bot committed Nov 2, 2024
1 parent 4d496e7 commit 62dbaf4
Show file tree
Hide file tree
Showing 30 changed files with 283 additions and 3 deletions.
12 changes: 12 additions & 0 deletions js/dist-typings/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'flarum/common/models/User';

import type Field from '../lib/models/Field';
import type Answer from '../lib/models/Answer';

declare module 'flarum/common/models/User' {
export default interface User {
bioFields(): Field[];
masqueradeAnswers(): Answer[];
canEditMasqueradeProfile(): boolean;
}
}
21 changes: 21 additions & 0 deletions js/dist-typings/admin/components/FieldEdit.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/// <reference types="flarum/@types/translator-icu-rich" />
export default class FieldEdit {
view(vnode: any): JSX.Element;
fieldItems(field: any, onUpdate: any): ItemList<any>;
updateExistingFieldInput(what: any, field: any, value: any): void;
deleteField(field: any, onUpdate: any): void;
toggleField(e: any): void;
submitAddField(field: any, onUpdate: any, e: any): void;
updateExistingField(field: any, onUpdate: any): void;
resetNewField(): void;
newField: import("flarum/common/Model").default | undefined;
readyToAdd(field: any): boolean;
availableTypes(): {
url: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
email: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
boolean: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
select: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
null: import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
};
}
import ItemList from "flarum/common/utils/ItemList";
12 changes: 12 additions & 0 deletions js/dist-typings/admin/components/FieldList.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { Vnode } from 'mithril';
import type Field from '../../lib/models/Field';
interface FieldListAttrs {
existing: Field[];
new: Field;
loading: boolean;
onUpdate: () => void;
}
export default class FieldList {
view(vnode: Vnode<FieldListAttrs>): any;
}
export {};
16 changes: 16 additions & 0 deletions js/dist-typings/admin/components/MasqueradePage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default class MasqueradePage extends ExtensionPage<import("flarum/admin/components/ExtensionPage").ExtensionPageAttrs> {
constructor();
oninit(vnode: any): void;
existing: any[] | import("flarum/common/Model").default[] | undefined;
enforceProfileCompletion: string | boolean | undefined;
config(): void;
oncreate(vnode: any): void;
onupdate(): void;
content(): any;
updateSort(sorting: any): void;
requestSuccess(): void;
loadExisting(): Promise<void>;
resetNew(): void;
newField: import("flarum/common/Model").default | undefined;
}
import ExtensionPage from "flarum/admin/components/ExtensionPage";
13 changes: 13 additions & 0 deletions js/dist-typings/admin/components/SelectFieldOptionEditor.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default class SelectFieldOptionEditor extends Component<any, undefined> {
constructor();
oninit(vnode: any): void;
newOption: any;
view(): any;
updateRules(options: any): void;
options(): any[];
updateOption(index: any, value: any): void;
moveOption(index: any, moveIndex: any): void;
deleteOption(index: any): void;
addOption(): void;
}
import Component from "flarum/common/Component";
10 changes: 10 additions & 0 deletions js/dist-typings/admin/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import FieldEdit from './FieldEdit';
import FieldList from './FieldList';
import MasqueradePage from './MasqueradePage';
import SelectFieldOptionEditor from './SelectFieldOptionEditor';
export declare const components: {
FieldList: typeof FieldList;
FieldEdit: typeof FieldEdit;
MasqueradePage: typeof MasqueradePage;
SelectFieldOptionEditor: typeof SelectFieldOptionEditor;
};
2 changes: 2 additions & 0 deletions js/dist-typings/admin/extend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: import("flarum/common/extenders/Store").default[];
export default _default;
2 changes: 2 additions & 0 deletions js/dist-typings/admin/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as extend } from './extend';
export * from './components';
2 changes: 2 additions & 0 deletions js/dist-typings/common/extend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: import("flarum/common/extenders/Store").default[];
export default _default;
1 change: 1 addition & 0 deletions js/dist-typings/forum/addProfilePane.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function addProfilePane(): void;
2 changes: 2 additions & 0 deletions js/dist-typings/forum/extend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: (import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Model").default)[];
export default _default;
3 changes: 3 additions & 0 deletions js/dist-typings/forum/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default as extend } from './extend';
export * from './panes';
export * from './types';
1 change: 1 addition & 0 deletions js/dist-typings/forum/mutateUserHero.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function mutateUserHero(): void;
19 changes: 19 additions & 0 deletions js/dist-typings/forum/panes/ProfileConfigurePane.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default class ProfileConfigurePane extends Component<any, undefined> {
constructor();
oninit(vnode: any): void;
loading: boolean | undefined;
enforceProfileCompletion: {} | undefined;
profileCompleted: boolean | {} | undefined;
profileNowCompleted: boolean | undefined;
answers: any;
answerValues: {} | undefined;
user: any;
dirty: boolean | undefined;
view(): JSX.Element;
field(field: any): JSX.Element;
load(): void;
set(field: any, value: any): void;
update(e: any): void;
parseResponse(response: any): void;
}
import Component from "flarum/common/Component";
19 changes: 19 additions & 0 deletions js/dist-typings/forum/panes/ProfilePane.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Component, { ComponentAttrs } from 'flarum/common/Component';
import type Answer from '../../lib/models/Answer';
import type Field from 'src/lib/models/Field';
import type User from 'flarum/common/models/User';
import type Mithril from 'mithril';
export interface ProfilePaneAttrs extends ComponentAttrs {
answers: Answer[];
user: User;
loading: boolean;
}
export default class ProfilePane extends Component<ProfilePaneAttrs> {
answers: Answer[];
user: User;
loading: boolean;
oninit(vnode: Mithril.Vnode): void;
view(): JSX.Element;
field(field: Field, content: Answer | null): JSX.Element;
load(): Promise<void>;
}
10 changes: 10 additions & 0 deletions js/dist-typings/forum/panes/RootMasqueradePane.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import UserPage from 'flarum/forum/components/UserPage';
import type User from 'flarum/common/models/User';
import type Mithril from 'mithril';
export default class RootMasqueradePane extends UserPage {
loading: boolean;
oninit(vnode: Mithril.Vnode): void;
pageContentComponent(): JSX.Element | null;
show(user: User): void;
content(): JSX.Element;
}
8 changes: 8 additions & 0 deletions js/dist-typings/forum/panes/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ProfileConfigurePane from './ProfileConfigurePane';
import ProfilePane from './ProfilePane';
import RootMasqueradePane from './RootMasqueradePane';
export declare const panes: {
ProfileConfigurePane: typeof ProfileConfigurePane;
ProfilePane: typeof ProfilePane;
RootMasqueradePane: typeof RootMasqueradePane;
};
34 changes: 34 additions & 0 deletions js/dist-typings/forum/types/BaseField.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export default class BaseField {
static isNoOptionSelectedValue(value: any): boolean;
constructor({ field, set, value }: {
field: any;
set: any;
value: any;
});
field: any;
set: any;
value: any;
readAttribute(object: any, attribute: any): any;
/**
* Gets all Laravel validation rules split by rule
* @returns {Array}
*/
validationRules(): any[];
/**
* Gets a Laravel validation rule by name
* @param {string} ruleName
* @returns {string|null}
*/
validationRule(ruleName: string): string | null;
editorField(): JSX.Element;
editorInput(): JSX.Element;
editorInputAttrs(): {
className: string;
oninput: (event: any) => void;
value: any;
required: any;
};
answerField(): JSX.Element;
answerContent(): any;
hasAnswer(): boolean;
}
18 changes: 18 additions & 0 deletions js/dist-typings/forum/types/BooleanField.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default class BooleanField extends BaseField {
editorInput(): any[];
options(): ({
selected: {};
key: null;
label: any;
} | {
selected: {};
key: string;
label: any;
} | {
selected: () => boolean;
key: any;
label: string;
})[];
answerContent(): any[] | "";
}
import BaseField from "./BaseField";
4 changes: 4 additions & 0 deletions js/dist-typings/forum/types/EmailField.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default class EmailField extends BaseField {
mailTo(): void;
}
import BaseField from "./BaseField";
5 changes: 5 additions & 0 deletions js/dist-typings/forum/types/SelectField.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default class SelectField extends BaseField {
editorInput(): Mithril.Vnode;
options(): {};
}
import BaseField from "./BaseField";
24 changes: 24 additions & 0 deletions js/dist-typings/forum/types/TypeFactory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default class TypeFactory {
static typeForField({ field, set, value }: {
field: any;
set?: undefined;
value: any;
}): BaseField;
static fieldAttribute(field: any, attribute: any): any;
static types(): {
boolean: typeof BooleanField;
email: typeof EmailField;
select: typeof SelectField;
url: typeof UrlField;
};
/**
* Identifies how to parse the field answer.
* @returns {null|string}
*/
static identify(field: any): null | string;
}
import BaseField from "./BaseField";
import BooleanField from "./BooleanField";
import EmailField from "./EmailField";
import SelectField from "./SelectField";
import UrlField from "./UrlField";
4 changes: 4 additions & 0 deletions js/dist-typings/forum/types/UrlField.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default class UrlField extends BaseField {
to(): void;
}
import BaseField from "./BaseField";
14 changes: 14 additions & 0 deletions js/dist-typings/forum/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import BaseField from './BaseField';
import BooleanField from './BooleanField';
import EmailField from './EmailField';
import SelectField from './SelectField';
import TypeFactory from './TypeFactory';
import UrlField from './UrlField';
export declare const types: {
BaseField: typeof BaseField;
BooleanField: typeof BooleanField;
EmailField: typeof EmailField;
SelectField: typeof SelectField;
TypeFactory: typeof TypeFactory;
UrlField: typeof UrlField;
};
8 changes: 8 additions & 0 deletions js/dist-typings/lib/models/Answer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Model from 'flarum/common/Model';
import type Field from './Field';
export default class Answer extends Model {
content: () => unknown;
fieldId: () => unknown;
field: () => Field;
userId: () => unknown;
}
14 changes: 14 additions & 0 deletions js/dist-typings/lib/models/Field.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default class Field extends Model {
name: () => any;
description: () => any;
type: () => any;
validation: () => any;
required: () => any;
prefix: () => any;
icon: () => any;
sort: () => any;
deleted_at: () => Date | null | undefined;
answer: () => false | Model;
on_bio: () => any;
}
import Model from "flarum/common/Model";
2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 62dbaf4

Please sign in to comment.