mirror of
https://github.com/flarum/core.git
synced 2025-08-13 11:54:32 +02:00
Compare commits
123 Commits
dk/2890-ve
...
v1.1.0
Author | SHA1 | Date | |
---|---|---|---|
|
99112429f9 | ||
|
b4772e5399 | ||
|
2b47e90827 | ||
|
1c2465b2da | ||
|
a6717ee981 | ||
|
450ab61620 | ||
|
e2f01c040b | ||
|
1d15cff9ca | ||
|
88724bb4cb | ||
|
1637b90531 | ||
|
245d0d2550 | ||
|
5dd48e1b86 | ||
|
c1a8c6c190 | ||
|
c10a30bae9 | ||
|
b0bc021034 | ||
|
1b193196da | ||
|
f56fc11af9 | ||
|
ebdc232b11 | ||
|
eb0dd1f0d0 | ||
|
1aa61f1f01 | ||
|
e8153ccc79 | ||
|
55d8af44a2 | ||
|
4de5ad94f0 | ||
|
735583397c | ||
|
da94488f7b | ||
|
581d9517db | ||
|
3db724e0b3 | ||
|
71073b064a | ||
|
d82c093c0f | ||
|
c2a0cf8d04 | ||
|
1b77df12b6 | ||
|
d333d0b0e6 | ||
|
6defca5a6d | ||
|
0a2b28ebe0 | ||
|
6c64837247 | ||
|
66aaa862fd | ||
|
1ab35d89ac | ||
|
3cf19dd2ea | ||
|
01082a44ea | ||
|
aba6836bdd | ||
|
af89b23f67 | ||
|
b5620e0549 | ||
|
57eb621885 | ||
|
c2ec36b2e2 | ||
|
656cc35a0d | ||
|
b8754c7d7d | ||
|
7f2e6543ed | ||
|
cc29cf3e10 | ||
|
2831ce226c | ||
|
8fe2332f98 | ||
|
e05ccf9f62 | ||
|
83529e23de | ||
|
51ce89b61f | ||
|
ef20e29b20 | ||
|
5798c4b355 | ||
|
afc1a1bbbe | ||
|
cbf4b9c0b4 | ||
|
b88b530c7e | ||
|
c8b514106a | ||
|
634dfc69f3 | ||
|
2a83022727 | ||
|
b32496d30c | ||
|
d8c112088d | ||
|
f1ba5e7b70 | ||
|
2dd9e17568 | ||
|
13d302b650 | ||
|
9490b3dc32 | ||
|
a26f279e0f | ||
|
ef3d4ca018 | ||
|
c449ea211a | ||
|
ce824b0ccf | ||
|
34803f4b43 | ||
|
81e6b17f83 | ||
|
f949b0a28e | ||
|
66064ca9be | ||
|
f9fc78a10d | ||
|
e195ca27a8 | ||
|
61624d1533 | ||
|
d31690e7f5 | ||
|
2bed1d8038 | ||
|
0ce6a1ea9a | ||
|
4bcfc5078c | ||
|
8a7fd66919 | ||
|
ac0e98e721 | ||
|
5a1948c4fc | ||
|
9ff1a42396 | ||
|
3130e3de5e | ||
|
da20d75e3c | ||
|
7a0df21c5a | ||
|
7d4d3d977b | ||
|
408bb38cc0 | ||
|
b7cb1e8d36 | ||
|
42dabea81f | ||
|
a077ae9ca3 | ||
|
17e9bccc15 | ||
|
4a5b84d2e7 | ||
|
557fc2cd39 | ||
|
e92c267cde | ||
|
f959a69530 | ||
|
4e246779f4 | ||
|
5b0f5aeaa0 | ||
|
6e92af8b00 | ||
|
1cf9491fe6 | ||
|
3fcc7bd3b9 | ||
|
4acff91f80 | ||
|
a0152ffb18 | ||
|
d1e38558c5 | ||
|
0cca808275 | ||
|
5ee5f82e3d | ||
|
9077fef5b2 | ||
|
93cebec0be | ||
|
a4a81c0ec2 | ||
|
50dcfdb2a6 | ||
|
8149397850 | ||
|
1ced907e52 | ||
|
17c5a40740 | ||
|
440bed81b8 | ||
|
eeb8fe1443 | ||
|
11b1ab5932 | ||
|
6f34c43dc1 | ||
|
8ced9eef45 | ||
|
8af52153e4 | ||
|
2c5e5f13dd |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -12,5 +12,6 @@ tests export-ignore
|
||||
|
||||
js/dist/* -diff
|
||||
js/dist/* linguist-generated
|
||||
js/dist-typings/* linguist-generated
|
||||
|
||||
* text=auto eol=lf
|
||||
|
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@@ -1,3 +0,0 @@
|
||||
github: flarum
|
||||
open_collective: flarum
|
||||
tidelift: packagist/flarum/core
|
24
.github/PULL_REQUEST_TEMPLATE.md
vendored
24
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,24 +0,0 @@
|
||||
<!--
|
||||
IMPORTANT: We applaud pull requests, they excite us every single time. As we have an obligation to maintain a healthy code standard and quality, we take sufficient time for reviews. Please do create a separate pull request per change/issue/feature; we will ask you to split bundled pull requests.
|
||||
-->
|
||||
|
||||
**Fixes #0000**
|
||||
|
||||
**Changes proposed in this pull request:**
|
||||
<!-- fill this out, mention the pages and/or components which have been impacted -->
|
||||
|
||||
**Reviewers should focus on:**
|
||||
<!-- fill this out, ask for feedback on specific changes you are unsure about -->
|
||||
|
||||
**Screenshot**
|
||||
<!-- include an image of the most relevant user-facing change, if any -->
|
||||
|
||||
**Confirmed**
|
||||
|
||||
- [ ] Frontend changes: tested on a local Flarum installation.
|
||||
- [ ] Backend changes: tests are green (run `composer test`).
|
||||
|
||||
**Required changes:**
|
||||
|
||||
- [ ] Related documentation PR: (Remove if irrelevant)
|
||||
- [ ] Related core extension PRs: (Remove if irrelevant)
|
13
.github/SECURITY.md
vendored
13
.github/SECURITY.md
vendored
@@ -1,13 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
We will only patch security vulnerabilities in the stable 1.x release.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you discover a security vulnerability within Flarum, please send an email to security@flarum.org so we can address it promptly.
|
||||
|
||||
We will get back to you as time allows.
|
||||
Discussions may commence internally, so you may not hear back immediately.
|
||||
When reporting a vulnerability, please provide your GitHub username (if available), so that we can invite you to collaborate on a [security advisory on GitHub](https://help.github.com/en/articles/about-maintainer-security-advisories).
|
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: JavaScript
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: JS / Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Restore npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('js/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
# Our action will install npm, cd into `./js`, run `npm run build` and
|
||||
# `npm run build-typings`, then commit and upload any changes
|
||||
- name: Build production JS
|
||||
uses: flarum/action-build@2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build_script: build
|
||||
package_manager: npm
|
||||
typings_script: build-typings
|
91
.github/workflows/js.yml
vendored
Normal file
91
.github/workflows/js.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
name: JS
|
||||
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
env:
|
||||
NODE_VERSION: 16
|
||||
|
||||
jobs:
|
||||
prettier:
|
||||
name: Prettier
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: "npm"
|
||||
cache-dependency-path: js/package-lock.json
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: npm ci
|
||||
working-directory: ./js
|
||||
|
||||
- name: Check JS formatting
|
||||
run: npm run format-check
|
||||
working-directory: ./js
|
||||
|
||||
build-prod:
|
||||
name: Build and commit
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prettier]
|
||||
|
||||
# Only commit JS on push to master branch
|
||||
# Remember to change in `build-test` job too
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: "npm"
|
||||
cache-dependency-path: js/package-lock.json
|
||||
|
||||
# Our action will install npm, cd into `./js`, run `npm run build` and
|
||||
# `npm run build-typings`, then commit and upload any changes
|
||||
- name: Build production JS
|
||||
uses: flarum/action-build@2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build_script: build
|
||||
package_manager: npm
|
||||
typings_script: build-typings
|
||||
|
||||
build-test:
|
||||
name: Test build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prettier]
|
||||
|
||||
# Inverse check of `build-prod`
|
||||
# Remember to change in `build-prod` job too
|
||||
if: github.ref != 'refs/heads/master' || github.event_name != 'push'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: "npm"
|
||||
cache-dependency-path: js/package-lock.json
|
||||
|
||||
# Our action will install npm, cd into `./js`, run `npm run build` and
|
||||
# `npm run build-typings`, then commit and upload any changes
|
||||
- name: Build production JS
|
||||
uses: flarum/action-build@2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build_script: build
|
||||
package_manager: npm
|
||||
typings_script: build-typings
|
||||
do_not_commit: true
|
28
.github/workflows/lint.yml
vendored
28
.github/workflows/lint.yml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'js/src/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'js/src/**'
|
||||
|
||||
jobs:
|
||||
prettier:
|
||||
name: JS / Prettier
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
|
||||
- name: Check JS formatting
|
||||
run: npx prettier --check src
|
||||
working-directory: ./js
|
85
CHANGELOG.md
85
CHANGELOG.md
@@ -1,5 +1,90 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## [1.1.0](https://github.com/flarum/core/compare/v1.0.4...v1.1.0)
|
||||
|
||||
### Added
|
||||
- Info command now displays MySQL version, queue driver, mail driver (https://github.com/flarum/core/pull/2991)
|
||||
- Use organization Prettier config (https://github.com/flarum/core/pull/2967)
|
||||
- Support for global typings in extensions (https://github.com/flarum/core/pull/2992)
|
||||
- Typings for class component state attribute (https://github.com/flarum/core/pull/2995)
|
||||
- Custom colorising with CSS custom properties (https://github.com/flarum/core/pull/3001)
|
||||
- Theme Extender to allow overriding LESS files (https://github.com/flarum/core/pull/3008)
|
||||
- Update lastSeenAt when authenticating via API (https://github.com/flarum/core/pull/3058)
|
||||
- NoJs Admin View (https://github.com/flarum/core/pull/3059)
|
||||
- Preload FontAwesome, JS and CSS, and add `preload` extender (https://github.com/flarum/core/pull/3057)
|
||||
|
||||
### Changed
|
||||
- Move Day.js plugin types import to global typings (https://github.com/flarum/core/pull/2954)
|
||||
- Avoid resolving excluded middleware on each middleware items
|
||||
- Allow extra attrs provided to `<Select>` to be passed through to the DOM element (https://github.com/flarum/core/pull/2959)
|
||||
- Limit height of code blocks (https://github.com/flarum/core/pull/3012)
|
||||
- Update normalize.css from v3.0.2 to v8.0.1 (https://github.com/flarum/core/pull/3015)
|
||||
- Permission Grid: stick the headers to handle a lot of tags (https://github.com/flarum/core/pull/2887)
|
||||
- Use `ItemList` for `DiscussionPage` content (https://github.com/flarum/core/pull/3004)
|
||||
- Move email confirmation to POST request (https://github.com/flarum/core/pull/3038)
|
||||
- Minor CSS code cleanup (https://github.com/flarum/core/pull/3026)
|
||||
- Replace username with display name in more places (https://github.com/flarum/core/pull/3040)
|
||||
- Rewrite Button to Typescript (https://github.com/flarum/core/pull/2984)
|
||||
- Rewrite AdminPage abstract component into Typescript (https://github.com/flarum/core/pull/2996)
|
||||
- Allow adding page parameters to PaginatedListState (https://github.com/flarum/core/pull/2935)
|
||||
- Pass filter params to getApiDocument (https://github.com/flarum/core/pull/3037)
|
||||
- Use author filter instead of gambit to get a user's discussions (https://github.com/flarum/core/pull/3068)
|
||||
- [A11Y] Accessibility improvements for the Search component (https://github.com/flarum/core/pull/3017)
|
||||
- Add determinsm to extension order resolution (https://github.com/flarum/core/pull/3076)
|
||||
- Add cache control headers to the admin area (https://github.com/flarum/core/pull/3097)
|
||||
|
||||
### Fixed
|
||||
- HLJS 11 new styles resulting in double padding (https://github.com/flarum/core/pull/2909)
|
||||
- Internal API client attempting to load an uninstantiated session
|
||||
- Empty post footer taking visual space (https://github.com/flarum/core/pull/2926)
|
||||
- Unrecognized component class custom attribute typings (https://github.com/flarum/core/pull/2962)
|
||||
- User edit groups permission not visually depending on view hidden groups permission (https://github.com/flarum/core/pull/2880)
|
||||
- Event post excerpt preview triggers error (https://github.com/flarum/core/pull/2964)
|
||||
- Missing settings defaults for display name driver and User slug driver (https://github.com/flarum/core/pull/2971)
|
||||
- [A11Y] Icons not hidden from screenreaders (https://github.com/flarum/core/pull/3027)
|
||||
- [A11Y] Checkboxes not focusable (https://github.com/flarum/core/pull/3014)
|
||||
- Uploading ICO favicons resulting in server errors (https://github.com/flarum/core/pull/2949)
|
||||
- Missing proper validation for large avatar upload payload (https://github.com/flarum/core/pull/3042)
|
||||
- [A11Y] Missing focus rings in control elements (https://github.com/flarum/core/pull/3016)
|
||||
- Unsanitised integer query parameters (https://github.com/flarum/core/pull/3064)
|
||||
|
||||
###### Code Contributors
|
||||
@lhsazevedo, @Ornanovitch, @pierres, @the-turk, @iPurpl3x
|
||||
|
||||
###### Issue Reporters
|
||||
@uamv, @dannyuk1982, @BurnNoticeSpy, @haarp, @peopleinside, @matteocontrini
|
||||
|
||||
## [1.0.4](https://github.com/flarum/core/compare/v1.0.3...v1.0.4)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Upgrade to v1.0 resets the "view" permission on all tags (https://github.com/flarum/core/pull/2941)
|
||||
|
||||
## [1.0.3](https://github.com/flarum/core/compare/v1.0.2...v1.0.3)
|
||||
|
||||
### Changed
|
||||
|
||||
- Removed [forum] prefix from Request Password and Email Confirmation emails ([a4a81c0](https://github.com/flarum/core/commit/a4a81c0ec237476cd6e7ca00c1ed9465493af476))
|
||||
- Adopt huntr.dev for handling our security vulnerability reports (https://github.com/flarum/core/pull/2918)
|
||||
- Maintenance handler can now be replaced through the service container (ioc) ([4acff91](https://github.com/flarum/core/commit/4acff91f8063fcced9bf8c9a76fbb510d06823c0))
|
||||
- The colors on the auto generated avatars are now based on the Display Name of the user (https://github.com/flarum/core/pull/2873)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Avatar in notifications list are incorrectly aligned (https://github.com/flarum/core/pull/2906)
|
||||
- FilesystemManager is not compatible with upstream Laravel implementation (https://github.com/flarum/core/pull/2936)
|
||||
|
||||
## [1.0.2](https://github.com/flarum/core/compare/v1.0.1...v1.0.2)
|
||||
|
||||
### Fixed
|
||||
- Critical XSS vulnerability
|
||||
|
||||
## [1.0.1](https://github.com/flarum/core/compare/v1.0.0...v1.0.1)
|
||||
|
||||
### Fixed
|
||||
- Installation fails on environments without proc_* functions enabled or mysql client binary (https://github.com/flarum/core/issues/2890)
|
||||
|
||||
## [1.0.0](https://github.com/flarum/core/compare/v0.1.0-beta.16...v1.0.0)
|
||||
|
||||
### Added
|
||||
|
@@ -5,6 +5,7 @@
|
||||
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/dt/flarum/core" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/github/v/release/flarum/core?sort=semver" alt="Latest Version"></a>
|
||||
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/l/flarum/core" alt="License"></a>
|
||||
<a href="https://huntr.dev/bounties/disclose/?target=https://github.com/flarum/core"><img src="https://cdn.huntr.dev/huntr_security_badge_mono.svg" alt="huntr"></a>
|
||||
<a href="https://github.styleci.io/repos/28257573"><img src="https://github.styleci.io/repos/28257573/shield?style=flat" alt="StyleCI"></a>
|
||||
</p>
|
||||
|
||||
|
@@ -14,10 +14,26 @@
|
||||
"homepage": "https://flarum.org/team"
|
||||
}
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/flarum"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/flarum"
|
||||
},
|
||||
{
|
||||
"type": "other",
|
||||
"url": "https://flarum.org/donate"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/flarum/core/issues",
|
||||
"source": "https://github.com/flarum/core",
|
||||
"docs": "https://flarum.org/docs/"
|
||||
"docs": "https://docs.flarum.org",
|
||||
"forum": "https://discuss.flarum.org",
|
||||
"chat": "https://flarum.org/chat"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
@@ -43,7 +59,7 @@
|
||||
"illuminate/support": "^8.0",
|
||||
"illuminate/validation": "^8.0",
|
||||
"illuminate/view": "^8.0",
|
||||
"intervention/image": "^2.5.0",
|
||||
"intervention/image": "2.5.* || ^2.6.1",
|
||||
"laminas/laminas-diactoros": "^2.4.1",
|
||||
"laminas/laminas-httphandlerrunner": "^1.2.0",
|
||||
"laminas/laminas-stratigility": "^3.2.2",
|
||||
|
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"printWidth": 150,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "es5"
|
||||
}
|
39
js/@types/global/index.d.ts
vendored
39
js/@types/global/index.d.ts
vendored
@@ -1,39 +0,0 @@
|
||||
// Mithril
|
||||
import Mithril from 'mithril';
|
||||
|
||||
// Other third-party libs
|
||||
import * as _dayjs from 'dayjs';
|
||||
import * as _$ from 'jquery';
|
||||
|
||||
// Globals from flarum/core
|
||||
import Application from '../../src/common/Application';
|
||||
|
||||
import type { TooltipJQueryFunction } from '../tooltips';
|
||||
|
||||
/**
|
||||
* flarum/core exposes several extensions globally:
|
||||
*
|
||||
* - jQuery for convenient DOM manipulation
|
||||
* - Mithril for VDOM and components
|
||||
* - dayjs for date/time operations
|
||||
*
|
||||
* Since these are already part of the global namespace, extensions won't need
|
||||
* to (and should not) bundle these themselves.
|
||||
*/
|
||||
declare global {
|
||||
// $ is already defined by `@types/jquery`
|
||||
const m: Mithril.Static;
|
||||
const dayjs: typeof _dayjs;
|
||||
|
||||
// Extend JQuery with our custom functions, defined with $.fn
|
||||
interface JQuery {
|
||||
tooltip: TooltipJQueryFunction;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* All global variables owned by flarum/core.
|
||||
*/
|
||||
declare global {
|
||||
const app: Application;
|
||||
}
|
82
js/dist-typings/@types/global.d.ts
vendored
Normal file
82
js/dist-typings/@types/global.d.ts
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* @deprecated Please import `app` from a namespace instead of using it as a global variable.
|
||||
*
|
||||
* @example App in forum JS
|
||||
* ```
|
||||
* import app from 'flarum/forum/app';
|
||||
* ```
|
||||
*
|
||||
* @example App in admin JS
|
||||
* ```
|
||||
* import app from 'flarum/admin/app';
|
||||
* ```
|
||||
*
|
||||
* @example App in common JS
|
||||
* ```
|
||||
* import app from 'flarum/common/app';
|
||||
* ```
|
||||
*/
|
||||
declare const app: never;
|
||||
|
||||
declare const m: import('mithril').Static;
|
||||
declare const dayjs: typeof import('dayjs');
|
||||
|
||||
type ESModule = { __esModule: true; [key: string]: unknown };
|
||||
|
||||
/**
|
||||
* The global `flarum` variable.
|
||||
*
|
||||
* Contains the compiled ES Modules for all Flarum extensions and core.
|
||||
*
|
||||
* @example <caption>Check if `flarum-tags` is present</captions>
|
||||
* if ('flarum-tags' in flarum.extensions) {
|
||||
* // Tags is installed and enabled!
|
||||
* }
|
||||
*/
|
||||
interface FlarumObject {
|
||||
/**
|
||||
* Contains the compiled ES Module for Flarum's core.
|
||||
*
|
||||
* You shouldn't need to access this directly for any reason.
|
||||
*/
|
||||
core: Readonly<ESModule>;
|
||||
/**
|
||||
* Contains the compiled ES Modules for all Flarum extensions.
|
||||
*
|
||||
* @example <caption>Check if `flarum-tags` is present</captions>
|
||||
* if ('flarum-tags' in flarum.extensions) {
|
||||
* // Tags is installed and enabled!
|
||||
* }
|
||||
*/
|
||||
extensions: Readonly<Record<string, ESModule>>;
|
||||
}
|
||||
|
||||
declare const flarum: FlarumObject;
|
||||
|
||||
// Extend JQuery with our custom functions, defined with $.fn
|
||||
interface JQuery {
|
||||
/**
|
||||
* Flarum's tooltip JQuery plugin.
|
||||
*
|
||||
* Do not use this directly. Instead use the `<Tooltip>` component that
|
||||
* is exported from `flarum/common/components/Tooltip`.
|
||||
*
|
||||
* This will be removed in a future version of Flarum.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
tooltip: import('./tooltips/index').TooltipJQueryFunction;
|
||||
}
|
||||
|
||||
/**
|
||||
* For more info, see: https://www.typescriptlang.org/docs/handbook/jsx.html#attribute-type-checking
|
||||
*
|
||||
* In a nutshell, we need to add `ElementAttributesProperty` to tell Typescript
|
||||
* what property on component classes to look at for attribute typings. For our
|
||||
* Component class, this would be `attrs` (e.g. `this.attrs...`)
|
||||
*/
|
||||
interface JSX {
|
||||
ElementAttributesProperty: {
|
||||
attrs: Record<string, unknown>;
|
||||
};
|
||||
}
|
39
js/dist-typings/@types/global/index.d.ts
vendored
39
js/dist-typings/@types/global/index.d.ts
vendored
@@ -1,39 +0,0 @@
|
||||
// Mithril
|
||||
import Mithril from 'mithril';
|
||||
|
||||
// Other third-party libs
|
||||
import * as _dayjs from 'dayjs';
|
||||
import * as _$ from 'jquery';
|
||||
|
||||
// Globals from flarum/core
|
||||
import Application from '../../src/common/Application';
|
||||
|
||||
import type { TooltipJQueryFunction } from '../tooltips';
|
||||
|
||||
/**
|
||||
* flarum/core exposes several extensions globally:
|
||||
*
|
||||
* - jQuery for convenient DOM manipulation
|
||||
* - Mithril for VDOM and components
|
||||
* - dayjs for date/time operations
|
||||
*
|
||||
* Since these are already part of the global namespace, extensions won't need
|
||||
* to (and should not) bundle these themselves.
|
||||
*/
|
||||
declare global {
|
||||
// $ is already defined by `@types/jquery`
|
||||
const m: Mithril.Static;
|
||||
const dayjs: typeof _dayjs;
|
||||
|
||||
// Extend JQuery with our custom functions, defined with $.fn
|
||||
interface JQuery {
|
||||
tooltip: TooltipJQueryFunction;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* All global variables owned by flarum/core.
|
||||
*/
|
||||
declare global {
|
||||
const app: Application;
|
||||
}
|
2
js/dist-typings/admin/compat.d.ts
vendored
2
js/dist-typings/admin/compat.d.ts
vendored
@@ -96,6 +96,7 @@ declare var _default: {
|
||||
'utils/ExtensionData': typeof ExtensionData;
|
||||
'utils/isExtensionEnabled': typeof isExtensionEnabled;
|
||||
'utils/getCategorizedExtensions': typeof getCategorizedExtensions;
|
||||
'utils/generateElementId': typeof generateElementId;
|
||||
'components/SettingDropdown': typeof SettingDropdown;
|
||||
'components/EditCustomFooterModal': typeof EditCustomFooterModal;
|
||||
'components/SessionDropdown': typeof SessionDropdown;
|
||||
@@ -132,6 +133,7 @@ import saveSettings from "./utils/saveSettings";
|
||||
import ExtensionData from "./utils/ExtensionData";
|
||||
import isExtensionEnabled from "./utils/isExtensionEnabled";
|
||||
import getCategorizedExtensions from "./utils/getCategorizedExtensions";
|
||||
import generateElementId from "./utils/generateElementId";
|
||||
import SettingDropdown from "./components/SettingDropdown";
|
||||
import EditCustomFooterModal from "./components/EditCustomFooterModal";
|
||||
import SessionDropdown from "./components/SessionDropdown";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
export default class AdminHeader extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class AdminHeader extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
export default class AdminNav extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class AdminNav extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
query: Stream<string> | undefined;
|
||||
scrollToActive(): void;
|
||||
|
55
js/dist-typings/admin/components/AdminPage.d.ts
vendored
55
js/dist-typings/admin/components/AdminPage.d.ts
vendored
@@ -1,55 +0,0 @@
|
||||
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";
|
@@ -1,3 +1,4 @@
|
||||
export default class AppearancePage extends AdminPage {
|
||||
export default class AppearancePage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
|
@@ -1,4 +1,5 @@
|
||||
export default class BasicsPage extends AdminPage {
|
||||
export default class BasicsPage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
localeOptions: {} | undefined;
|
||||
displayNameOptions: {} | undefined;
|
||||
slugDriverOptions: {} | undefined;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
export default class DashboardPage extends AdminPage {
|
||||
export default class DashboardPage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
availableWidgets(): ItemList;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
export default class DashboardWidget extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class DashboardWidget extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Get the class name to apply to the widget.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
export default class ExtensionPage extends AdminPage {
|
||||
export default class ExtensionPage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
extension: any;
|
||||
changingState: boolean | undefined;
|
||||
infoFields: {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* 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> {
|
||||
export default class HeaderPrimary extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
config(isInitialized: any, context: any): void;
|
||||
/**
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* The `HeaderSecondary` component displays secondary header controls.
|
||||
*/
|
||||
export default class HeaderSecondary extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class HeaderSecondary extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
export default class MailPage extends AdminPage {
|
||||
export default class MailPage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
sendingTest: boolean | undefined;
|
||||
refresh(): void;
|
||||
status: {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
export default class PermissionGrid extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PermissionGrid extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
permissionItems(): ItemList;
|
||||
viewItems(): ItemList;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
export default class PermissionsPage extends AdminPage {
|
||||
export default class PermissionsPage extends AdminPage<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
|
@@ -1,4 +1,5 @@
|
||||
export default class UploadImageButton extends Button {
|
||||
export default class UploadImageButton extends Button<import("../../common/components/Button").IButtonAttrs> {
|
||||
constructor();
|
||||
loading: boolean;
|
||||
/**
|
||||
* Prompt the user to upload an image.
|
||||
|
1
js/dist-typings/admin/utils/generateElementId.d.ts
vendored
Normal file
1
js/dist-typings/admin/utils/generateElementId.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { nanoid as default } from 'nanoid';
|
32
js/dist-typings/common/Component.d.ts
vendored
32
js/dist-typings/common/Component.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
export interface ComponentAttrs extends Mithril.Attributes {
|
||||
}
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ export interface ComponentAttrs extends Mithril.Attributes {
|
||||
*
|
||||
* @see https://mithril.js.org/components.html
|
||||
*/
|
||||
export default abstract class Component<T extends ComponentAttrs = ComponentAttrs> implements Mithril.ClassComponent<T> {
|
||||
export default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {
|
||||
/**
|
||||
* The root DOM element for the component.
|
||||
*/
|
||||
@@ -38,35 +38,47 @@ export default abstract class Component<T extends ComponentAttrs = ComponentAttr
|
||||
*
|
||||
* @see https://mithril.js.org/components.html#passing-data-to-components
|
||||
*/
|
||||
protected attrs: T;
|
||||
protected attrs: Attrs;
|
||||
/**
|
||||
* Class component state that is persisted between redraws.
|
||||
*
|
||||
* Updating this will **not** automatically trigger a redraw, unlike
|
||||
* other frameworks.
|
||||
*
|
||||
* This is different to Vnode state, which is always an instance of your
|
||||
* class component.
|
||||
*
|
||||
* This is `undefined` by default.
|
||||
*/
|
||||
protected state: State;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
abstract view(vnode: Mithril.Vnode<T, this>): Mithril.Children;
|
||||
abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
oninit(vnode: Mithril.Vnode<T, this>): void;
|
||||
oninit(vnode: Mithril.Vnode<Attrs, this>): void;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
oncreate(vnode: Mithril.VnodeDOM<T, this>): void;
|
||||
oncreate(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
onbeforeupdate(vnode: Mithril.VnodeDOM<T, this>): void;
|
||||
onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
onupdate(vnode: Mithril.VnodeDOM<T, this>): void;
|
||||
onupdate(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
onbeforeremove(vnode: Mithril.VnodeDOM<T, this>): void;
|
||||
onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
onremove(vnode: Mithril.VnodeDOM<T, this>): void;
|
||||
onremove(vnode: Mithril.VnodeDOM<Attrs, this>): void;
|
||||
/**
|
||||
* Returns a jQuery object for this component's element. If you pass in a
|
||||
* selector string, this method will return a jQuery object, using the current
|
||||
|
2
js/dist-typings/common/Fragment.d.ts
vendored
2
js/dist-typings/common/Fragment.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `Fragment` class represents a chunk of DOM that is rendered once with Mithril and then takes
|
||||
* over control of its own DOM and lifecycle.
|
||||
|
6
js/dist-typings/common/app.d.ts
vendored
Normal file
6
js/dist-typings/common/app.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type Application from './Application';
|
||||
declare const _default: Application;
|
||||
/**
|
||||
* The instance of Application within the common namespace.
|
||||
*/
|
||||
export default _default;
|
2
js/dist-typings/common/components/Alert.d.ts
vendored
2
js/dist-typings/common/components/Alert.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import Component, { ComponentAttrs } from '../Component';
|
||||
import Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
export interface AlertAttrs extends ComponentAttrs {
|
||||
/** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */
|
||||
type?: string;
|
||||
|
@@ -2,8 +2,7 @@
|
||||
* The `AlertManager` component provides an area in which `Alert` components can
|
||||
* be shown and dismissed.
|
||||
*/
|
||||
export default class AlertManager extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class AlertManager extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
state: any;
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
2
js/dist-typings/common/components/Badge.d.ts
vendored
2
js/dist-typings/common/components/Badge.d.ts
vendored
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* All other attrs will be assigned as attributes on the badge element.
|
||||
*/
|
||||
export default class Badge extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Badge extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
76
js/dist-typings/common/components/Button.d.ts
vendored
76
js/dist-typings/common/components/Button.d.ts
vendored
@@ -1,29 +1,69 @@
|
||||
import type Mithril from 'mithril';
|
||||
import Component, { ComponentAttrs } from '../Component';
|
||||
export interface IButtonAttrs extends ComponentAttrs {
|
||||
/**
|
||||
* Class(es) of an optional icon to be rendered within the button.
|
||||
*
|
||||
* If provided, the button will gain a `has-icon` class.
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Disables button from user input.
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* Show a loading spinner within the button.
|
||||
*
|
||||
* If `true`, also disables the button.
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
loading?: boolean;
|
||||
/**
|
||||
* **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use
|
||||
* the `<Tooltip>` component.
|
||||
*
|
||||
* Accessible text for the button. This should always be present if the button only
|
||||
* contains an icon.
|
||||
*
|
||||
* The textual content of this attribute is passed to the DOM element as `aria-label`.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
title?: string | Mithril.ChildArray;
|
||||
/**
|
||||
* Accessible text for the button. This should always be present if the button only
|
||||
* contains an icon.
|
||||
*
|
||||
* The textual content of this attribute is passed to the DOM element as `aria-label`.
|
||||
*/
|
||||
'aria-label'?: string | Mithril.ChildArray;
|
||||
/**
|
||||
* Button type.
|
||||
*
|
||||
* Default: `"button"`
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type
|
||||
*/
|
||||
type?: string;
|
||||
}
|
||||
/**
|
||||
* The `Button` component defines an element which, when clicked, performs an
|
||||
* action.
|
||||
*
|
||||
* ### Attrs
|
||||
*
|
||||
* - `icon` The name of the icon class. If specified, the button will be given a
|
||||
* 'has-icon' class name.
|
||||
* - `disabled` Whether or not the button is disabled. If truthy, the button
|
||||
* will be given a 'disabled' class name, and any `onclick` handler will be
|
||||
* removed.
|
||||
* - `loading` Whether or not the button should be in a disabled loading state.
|
||||
*
|
||||
* All other attrs will be assigned as attributes on the button element.
|
||||
* Other attrs will be assigned as attributes on the `<button>` element.
|
||||
*
|
||||
* Note that a Button has no default class names. This is because a Button can
|
||||
* be used to represent any generic clickable control, like a menu item.
|
||||
* be used to represent any generic clickable control, like a menu item. Common
|
||||
* styles can be applied by providing `className="Button"` to the Button component.
|
||||
*/
|
||||
export default class Button extends Component<import("../Component").ComponentAttrs> {
|
||||
constructor();
|
||||
export default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {
|
||||
view(vnode: Mithril.Vnode<IButtonAttrs, never>): JSX.Element;
|
||||
oncreate(vnode: Mithril.VnodeDOM<IButtonAttrs, this>): void;
|
||||
/**
|
||||
* Get the template for the button's content.
|
||||
*
|
||||
* @return {*}
|
||||
* @protected
|
||||
*/
|
||||
protected getButtonContent(children: any): any;
|
||||
protected getButtonContent(children: Mithril.Children): Mithril.ChildArray;
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -10,7 +10,7 @@
|
||||
* - `onchange` A callback to run when the checkbox is checked/unchecked.
|
||||
* - `children` A text label to display next to the checkbox.
|
||||
*/
|
||||
export default class Checkbox extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Checkbox extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Get the template for the checkbox's display (tick/cross icon).
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* another component / DOM element.)
|
||||
*
|
||||
*/
|
||||
export default class ConfirmDocumentUnload extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class ConfirmDocumentUnload extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
handler(): any;
|
||||
boundHandler: (() => any) | undefined;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* The children will be displayed as a list inside of the dropdown menu.
|
||||
*/
|
||||
export default class Dropdown extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Dropdown extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
static initAttrs(attrs: any): void;
|
||||
constructor();
|
||||
showing: boolean | undefined;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* The children should be an array of items to show in the fieldset.
|
||||
*/
|
||||
export default class FieldSet extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class FieldSet extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
2
js/dist-typings/common/components/Link.d.ts
vendored
2
js/dist-typings/common/components/Link.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
* Links will default to internal; the 'external' attr must be set to
|
||||
* `true` for the link to be external.
|
||||
*/
|
||||
export default class Link extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Link extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -11,7 +11,7 @@
|
||||
* the `active` prop will automatically be set to true.
|
||||
* - `force` Whether the page should be fully rerendered. Defaults to `true`.
|
||||
*/
|
||||
export default class LinkButton extends Button {
|
||||
export default class LinkButton extends Button<import("./Button").IButtonAttrs> {
|
||||
static initAttrs(attrs: any): void;
|
||||
/**
|
||||
* Determine whether a component with the given attrs is 'active'.
|
||||
@@ -20,5 +20,6 @@ export default class LinkButton extends Button {
|
||||
* @return {Boolean}
|
||||
*/
|
||||
static isActive(attrs: Object): boolean;
|
||||
constructor();
|
||||
}
|
||||
import Button from "./Button";
|
||||
|
2
js/dist-typings/common/components/Modal.d.ts
vendored
2
js/dist-typings/common/components/Modal.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @abstract
|
||||
*/
|
||||
export default class Modal extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Modal extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
/**
|
||||
* Determine whether or not the modal should be dismissible via an 'x' button.
|
||||
*/
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* can be shown at once; loading a new component into the ModalManager will
|
||||
* overwrite the previous one.
|
||||
*/
|
||||
export default class ModalManager extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class ModalManager extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
animateShow(readyCallback: any): void;
|
||||
animateHide(): void;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
* - `drawer` Whether or not to show a button to toggle the app's drawer if
|
||||
* there is no more history to pop.
|
||||
*/
|
||||
export default class Navigation extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Navigation extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Get the back button.
|
||||
|
30
js/dist-typings/common/components/Page.d.ts
vendored
30
js/dist-typings/common/components/Page.d.ts
vendored
@@ -1,27 +1,15 @@
|
||||
import Component from '../Component';
|
||||
export interface IPageAttrs {
|
||||
key?: number;
|
||||
routeName: string;
|
||||
}
|
||||
/**
|
||||
* The `Page` component
|
||||
*
|
||||
* @abstract
|
||||
*/
|
||||
export default class Page extends Component<import("../Component").ComponentAttrs> {
|
||||
constructor();
|
||||
/**
|
||||
* A class name to apply to the body while the route is active.
|
||||
*
|
||||
* @type {String}
|
||||
*/
|
||||
bodyClass: string | undefined;
|
||||
/**
|
||||
* Whether we should scroll to the top of the page when its rendered.
|
||||
*
|
||||
* @type {Boolean}
|
||||
*/
|
||||
scrollTopOnCreate: boolean | undefined;
|
||||
/**
|
||||
* Whether the browser should restore scroll state on refreshes.
|
||||
*
|
||||
* @type {Boolean}
|
||||
*/
|
||||
useBrowserScrollRestoration: boolean | undefined;
|
||||
export default abstract class Page<CustomAttrs extends IPageAttrs = IPageAttrs> extends Component<CustomAttrs> {
|
||||
oninit(vnode: any): void;
|
||||
oncreate(vnode: any): void;
|
||||
onremove(vnode: any): void;
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* - `text`
|
||||
*/
|
||||
export default class Placeholder extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Placeholder extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -6,8 +6,11 @@
|
||||
* - `onchange` A callback to run when the selected value is changed.
|
||||
* - `value` The value of the selected option.
|
||||
* - `disabled` Disabled state for the input.
|
||||
* - `wrapperAttrs` A map of attrs to be passed to the DOM element wrapping the `<select>`
|
||||
*
|
||||
* Other attributes are passed directly to the `<select>` element rendered to the DOM.
|
||||
*/
|
||||
export default class Select extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class Select extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -2,7 +2,7 @@ export default Separator;
|
||||
/**
|
||||
* The `Separator` component defines a menu separator item.
|
||||
*/
|
||||
declare class Separator extends Component<import("../Component").ComponentAttrs> {
|
||||
declare class Separator extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
declare namespace Separator {
|
||||
|
@@ -11,7 +11,7 @@
|
||||
* - `disabled`
|
||||
* - `preview`
|
||||
*/
|
||||
export default class TextEditor extends Component<import("../Component").ComponentAttrs> {
|
||||
export default class TextEditor extends Component<import("../Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* The value of the editor.
|
||||
|
@@ -1,8 +1,14 @@
|
||||
/**
|
||||
* The `TextEditorButton` component displays a button suitable for the text
|
||||
* editor toolbar.
|
||||
*
|
||||
* Automatically creates tooltips using the Tooltip component and provided text.
|
||||
*
|
||||
* ## Attrs
|
||||
* - `title` - Tooltip for the button
|
||||
*/
|
||||
export default class TextEditorButton extends Button {
|
||||
export default class TextEditorButton extends Button<import("./Button").IButtonAttrs> {
|
||||
static initAttrs(attrs: any): void;
|
||||
constructor();
|
||||
}
|
||||
import Button from "./Button";
|
||||
|
2
js/dist-typings/common/helpers/avatar.d.ts
vendored
2
js/dist-typings/common/helpers/avatar.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
import User from '../models/User';
|
||||
/**
|
||||
* The `avatar` helper displays a user's avatar.
|
||||
|
12
js/dist-typings/common/helpers/fireDebugWarning.d.ts
vendored
Normal file
12
js/dist-typings/common/helpers/fireDebugWarning.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.
|
||||
*
|
||||
* This function is intended to provide warnings to extension developers about issues with
|
||||
* their extensions that may not be easily noticed when testing, such as accessibility
|
||||
* issues.
|
||||
*
|
||||
* These warnings should be hidden on production forums to ensure webmasters are not
|
||||
* inundated with do-gooders telling them they have an issue when it isn't something they
|
||||
* can fix.
|
||||
*/
|
||||
export default function fireDebugWarning(...args: Parameters<typeof console.warn>): void;
|
2
js/dist-typings/common/helpers/fullTime.d.ts
vendored
2
js/dist-typings/common/helpers/fullTime.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `fullTime` helper displays a formatted time string wrapped in a <time>
|
||||
* tag.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `highlight` helper searches for a word phrase in a string, and wraps
|
||||
* matches with the <mark> tag.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `humanTime` helper displays a time in a human-friendly time-ago format
|
||||
* (e.g. '12 days ago'), wrapped in a <time> tag with other information about
|
||||
|
2
js/dist-typings/common/helpers/icon.d.ts
vendored
2
js/dist-typings/common/helpers/icon.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `icon` helper displays an icon.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `listItems` helper wraps a collection of components in <li> tags,
|
||||
* stripping out any unnecessary `Separator` components.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
import User from '../models/User';
|
||||
/**
|
||||
* The `useronline` helper displays a green circle if the user is online
|
||||
|
2
js/dist-typings/common/helpers/username.d.ts
vendored
2
js/dist-typings/common/helpers/username.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import * as Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
import User from '../models/User';
|
||||
/**
|
||||
* The `username` helper displays a user's username in a <span class="username">
|
||||
|
3
js/dist-typings/common/index.d.ts
vendored
3
js/dist-typings/common/index.d.ts
vendored
@@ -1,2 +1,3 @@
|
||||
export { Extend };
|
||||
import * as Extend from "./extend/index";
|
||||
import app from "./app";
|
||||
export { Extend, app };
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* Generates a route resolver for a given component.
|
||||
* In addition to regular route resolver functionality:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
import Alert, { AlertAttrs } from '../components/Alert';
|
||||
/**
|
||||
* Returned by `AlertManagerState.show`. Used to dismiss alerts.
|
||||
|
1
js/dist-typings/common/utils/humanTime.d.ts
vendored
1
js/dist-typings/common/utils/humanTime.d.ts
vendored
@@ -1,4 +1,3 @@
|
||||
import 'dayjs/plugin/relativeTime';
|
||||
/**
|
||||
* The `humanTime` utility converts a date to a localized, human-readable time-
|
||||
* ago string.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* Mithril 2 does not completely rerender the page if a route change leads to the same route
|
||||
* (or the same component handling a different route). This util calls m.route.set, forcing a reonit.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* @see https://getbootstrap.com/docs/3.4/javascript/#affix
|
||||
*/
|
||||
export default class AffixedSidebar extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class AffixedSidebar extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
boundOnresize: (() => void) | undefined;
|
||||
onresize(): void;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* - `className`
|
||||
* - `user`
|
||||
*/
|
||||
export default class AvatarEditor extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class AvatarEditor extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Whether or not an avatar upload is in progress.
|
||||
|
@@ -24,7 +24,7 @@ export default class CommentPost extends Post {
|
||||
cardVisible: boolean | undefined;
|
||||
refreshContent(): void;
|
||||
contentHtml: any;
|
||||
isEditing(): any;
|
||||
isEditing(): boolean;
|
||||
/**
|
||||
* Toggle the visibility of a hidden post's content.
|
||||
*/
|
||||
|
@@ -3,14 +3,8 @@
|
||||
* content component with `load` and then its position/state can be altered with
|
||||
* `show`, `hide`, `close`, `minimize`, `fullScreen`, and `exitFullScreen`.
|
||||
*/
|
||||
export default class Composer extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class Composer extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* The composer's "state".
|
||||
*
|
||||
* @type {ComposerState}
|
||||
*/
|
||||
state: ComposerState | undefined;
|
||||
/**
|
||||
* Whether or not the composer currently has focus.
|
||||
*
|
||||
@@ -108,5 +102,4 @@ export default class Composer extends Component<import("../../common/Component")
|
||||
changeHeight(height: any): void;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ComposerState from "../states/ComposerState";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* @abstract
|
||||
*/
|
||||
export default class ComposerBody extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class ComposerBody extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
composer: any;
|
||||
/**
|
||||
|
@@ -2,7 +2,8 @@
|
||||
* The `ComposerButton` component displays a button suitable for the composer
|
||||
* controls.
|
||||
*/
|
||||
export default class ComposerButton extends Button {
|
||||
export default class ComposerButton extends Button<import("../../common/components/Button").IButtonAttrs> {
|
||||
static initAttrs(attrs: any): void;
|
||||
constructor();
|
||||
}
|
||||
import Button from "../../common/components/Button";
|
||||
|
@@ -10,7 +10,7 @@
|
||||
* - `className` A CSS class for the element surrounding the preview.
|
||||
* - `surround` A callback that can execute code before and after re-render, e.g. for scroll anchoring.
|
||||
*/
|
||||
export default class ComposerPostPreview extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class ComposerPostPreview extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
static initAttrs(attrs: any): void;
|
||||
constructor();
|
||||
updateInterval: number | undefined;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* - `discussion`
|
||||
*/
|
||||
export default class DiscussionHero extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class DiscussionHero extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Build an item list for the contents of the discussion hero.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* - `state` A DiscussionListState object that represents the discussion lists's state.
|
||||
*/
|
||||
export default class DiscussionList extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class DiscussionList extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* - `discussion`
|
||||
* - `params`
|
||||
*/
|
||||
export default class DiscussionListItem extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class DiscussionListItem extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Set up a subtree retainer so that the discussion will not be redrawn
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* - `state` A DiscussionListState object that represents the discussion lists's state.
|
||||
*/
|
||||
export default class DiscussionListPane extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class DiscussionListPane extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Are we on a device that's larger than we consider "mobile"?
|
||||
|
@@ -2,7 +2,9 @@
|
||||
* The `DiscussionPage` component displays a whole discussion page, including
|
||||
* the discussion list pane, the hero, the posts, and the sidebar.
|
||||
*/
|
||||
export default class DiscussionPage extends Page {
|
||||
export default class DiscussionPage extends Page<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
useBrowserScrollRestoration: boolean | undefined;
|
||||
/**
|
||||
* The discussion that is being viewed.
|
||||
*
|
||||
@@ -15,6 +17,37 @@ export default class DiscussionPage extends Page {
|
||||
* @type {number}
|
||||
*/
|
||||
near: number | undefined;
|
||||
bodyClass: string | undefined;
|
||||
/**
|
||||
* List of components shown while the discussion is loading.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
loadingItems(): ItemList;
|
||||
/**
|
||||
* Function that renders the `sidebarItems` ItemList.
|
||||
*
|
||||
* @returns {import('mithril').Children}
|
||||
*/
|
||||
sidebar(): import('mithril').Children;
|
||||
/**
|
||||
* Renders the discussion's hero.
|
||||
*
|
||||
* @returns {import('mithril').Children}
|
||||
*/
|
||||
hero(): import('mithril').Children;
|
||||
/**
|
||||
* List of items rendered as the main page content.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
pageContent(): ItemList;
|
||||
/**
|
||||
* List of items rendered inside the main page content container.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
mainContent(): ItemList;
|
||||
/**
|
||||
* Load the discussion from the API or use the preloaded one.
|
||||
*/
|
||||
@@ -49,5 +82,5 @@ export default class DiscussionPage extends Page {
|
||||
positionChanged(startNumber: any, endNumber: any): void;
|
||||
}
|
||||
import Page from "../../common/components/Page";
|
||||
import PostStreamState from "../states/PostStreamState";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
import PostStreamState from "../states/PostStreamState";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { SearchSource } from './Search';
|
||||
import Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `DiscussionsSearchSource` finds and displays discussion search results in
|
||||
* the search dropdown.
|
||||
|
@@ -3,7 +3,5 @@
|
||||
* page.
|
||||
*/
|
||||
export default class DiscussionsUserPage extends UserPage {
|
||||
state: DiscussionListState | undefined;
|
||||
}
|
||||
import UserPage from "./UserPage";
|
||||
import DiscussionListState from "../states/DiscussionListState";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* 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> {
|
||||
export default class HeaderPrimary extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* the search box and the user menu. On the default skin, these are shown on the
|
||||
* right side of the header.
|
||||
*/
|
||||
export default class HeaderSecondary extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class HeaderSecondary extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
|
@@ -2,9 +2,12 @@
|
||||
* The `IndexPage` component displays the index page, including the welcome
|
||||
* hero, the sidebar, and the discussion list.
|
||||
*/
|
||||
export default class IndexPage extends Page {
|
||||
export default class IndexPage extends Page<import("../../common/components/Page").IPageAttrs> {
|
||||
static providesInitialSearch: boolean;
|
||||
constructor();
|
||||
lastDiscussion: any;
|
||||
bodyClass: string | undefined;
|
||||
scrollTopOnCreate: boolean | undefined;
|
||||
setTitle(): void;
|
||||
/**
|
||||
* Get the component to display as the hero.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* The `LoadingPost` component shows a placeholder that looks like a post,
|
||||
* indicating that the post is loading.
|
||||
*/
|
||||
export default class LoadingPost extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class LoadingPost extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -6,7 +6,8 @@
|
||||
*
|
||||
* - `path`
|
||||
*/
|
||||
export default class LogInButton extends Button {
|
||||
export default class LogInButton extends Button<import("../../common/components/Button").IButtonAttrs> {
|
||||
static initAttrs(attrs: any): void;
|
||||
constructor();
|
||||
}
|
||||
import Button from "../../common/components/Button";
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* The `LogInButtons` component displays a collection of social login buttons.
|
||||
*/
|
||||
export default class LogInButtons extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class LogInButtons extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Build a list of LogInButton components.
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* @abstract
|
||||
*/
|
||||
export default class Notification extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class Notification extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Get the name of the icon that should be displayed in the notification.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* - `user`
|
||||
*/
|
||||
export default class NotificationGrid extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class NotificationGrid extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Information about the available notification methods.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* The `NotificationList` component displays a list of the logged-in user's
|
||||
* notifications, grouped by discussion.
|
||||
*/
|
||||
export default class NotificationList extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class NotificationList extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
content(state: any): any;
|
||||
$notifications: JQuery<HTMLElement> | undefined;
|
||||
|
@@ -2,6 +2,8 @@
|
||||
* The `NotificationsPage` component shows the notifications list. It is only
|
||||
* used on mobile devices where the notifications dropdown is within the drawer.
|
||||
*/
|
||||
export default class NotificationsPage extends Page {
|
||||
export default class NotificationsPage extends Page<import("../../common/components/Page").IPageAttrs> {
|
||||
constructor();
|
||||
bodyClass: string | undefined;
|
||||
}
|
||||
import Page from "../../common/components/Page";
|
||||
|
2
js/dist-typings/forum/components/Post.d.ts
vendored
2
js/dist-typings/forum/components/Post.d.ts
vendored
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* @abstract
|
||||
*/
|
||||
export default class Post extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class Post extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
loading: boolean | undefined;
|
||||
/**
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* - `post`
|
||||
*/
|
||||
export default class PostEdited extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PostEdited extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* - `post`
|
||||
*/
|
||||
export default class PostMeta extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PostMeta extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Get the permalink for the given post.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* - `post`
|
||||
*/
|
||||
export default class PostPreview extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PostPreview extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* - `targetPost`
|
||||
* - `onPositionChange`
|
||||
*/
|
||||
export default class PostStream extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PostStream extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
discussion: any;
|
||||
stream: any;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* - `stream`
|
||||
* - `className`
|
||||
*/
|
||||
export default class PostStreamScrubber extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PostStreamScrubber extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
stream: any;
|
||||
handlers: {} | undefined;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* - `post`
|
||||
*/
|
||||
export default class PostUser extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class PostUser extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
/**
|
||||
* Show the user card.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* - `discussion`
|
||||
*/
|
||||
export default class ReplyPlaceholder extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class ReplyPlaceholder extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
anchorPreview(preview: any): void;
|
||||
}
|
||||
|
2
js/dist-typings/forum/components/Search.d.ts
vendored
2
js/dist-typings/forum/components/Search.d.ts
vendored
@@ -2,7 +2,7 @@ import Component, { ComponentAttrs } from '../../common/Component';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import KeyboardNavigatable from '../utils/KeyboardNavigatable';
|
||||
import SearchState from '../states/SearchState';
|
||||
import Mithril from 'mithril';
|
||||
import type Mithril from 'mithril';
|
||||
/**
|
||||
* The `SearchSource` interface defines a section of search results in the
|
||||
* search dropdown.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* - `discussion`
|
||||
* - `lastPost`
|
||||
*/
|
||||
export default class TerminalPost extends Component<import("../../common/Component").ComponentAttrs> {
|
||||
export default class TerminalPost extends Component<import("../../common/Component").ComponentAttrs, undefined> {
|
||||
constructor();
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user