mirror of
https://github.com/flarum/core.git
synced 2025-08-13 20:04:24 +02:00
Compare commits
82 Commits
dw/sidenav
...
as/monorep
Author | SHA1 | Date | |
---|---|---|---|
|
82b9b7e866 | ||
|
bdf9ddf33a | ||
|
9b302a1029 | ||
|
97dfb50f17 | ||
|
6a940cd34f | ||
|
edd93dad77 | ||
|
2d18d37ba9 | ||
|
b58b3e2224 | ||
|
2c902c6563 | ||
|
a38dc889e9 | ||
|
851907b88c | ||
|
dfa3b47cf3 | ||
|
289ea49cc7 | ||
|
d769ee2b7b | ||
|
6e3051b36a | ||
|
c622070366 | ||
|
21d3e33613 | ||
|
b0d9f10280 | ||
|
d192185d13 | ||
|
6dba5c8e67 | ||
|
34c753040c | ||
|
7c4992c401 | ||
|
a7254773dd | ||
|
1217b11896 | ||
|
7a22527b72 | ||
|
bd4d53323c | ||
|
ad69cf84fe | ||
|
aa77df46ee | ||
|
19e48617f0 | ||
|
d8b83cc372 | ||
|
a04b420295 | ||
|
5f4b5c0841 | ||
|
beae75dab3 | ||
|
e304cf7cb5 | ||
|
9f87674626 | ||
|
54329d0827 | ||
|
a7aad46068 | ||
|
7551a14ae5 | ||
|
f4c29db182 | ||
|
a291134da1 | ||
|
c702f5e228 | ||
|
749e7e34f7 | ||
|
67821d95bd | ||
|
aa44677df3 | ||
|
3978efa533 | ||
|
687e1e2789 | ||
|
7cec4d1f42 | ||
|
fbe1a48bec | ||
|
17a8d2c9d8 | ||
|
85ee80659d | ||
|
af77214967 | ||
|
7c3b51fec0 | ||
|
ed3ea05c1a | ||
|
9fd6e5d0a2 | ||
|
2541cdec94 | ||
|
8fac735be0 | ||
|
53c3d13047 | ||
|
993500aae4 | ||
|
0e9c169e06 | ||
|
94f9e7f9de | ||
|
4b25b90b48 | ||
|
a4fbf16eef | ||
|
809620750f | ||
|
066cf02b88 | ||
|
cff672424b | ||
|
2e94e31bb6 | ||
|
b7f2fe2429 | ||
|
64dab138c4 | ||
|
a55b61e058 | ||
|
206aa227f2 | ||
|
e926758060 | ||
|
ad8ac4e342 | ||
|
2e5cd6f5c3 | ||
|
d5cd0bd339 | ||
|
09d1e289de | ||
|
d65deeccb5 | ||
|
3d62a6af27 | ||
|
d268894e61 | ||
|
d89031f057 | ||
|
0c95d28e94 | ||
|
4df72e5ac6 | ||
|
a2f417e9c5 |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -13,5 +13,7 @@ tests export-ignore
|
||||
js/dist/* -diff
|
||||
js/dist/* linguist-generated
|
||||
js/dist-typings/* linguist-generated
|
||||
js/yarn.lock -diff
|
||||
js/package-lock.json -diff
|
||||
|
||||
* text=auto eol=lf
|
||||
|
15
.github/workflows/backend.yml
vendored
Normal file
15
.github/workflows/backend.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Core PHP
|
||||
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||
# This will break your current script.
|
||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||
|
||||
jobs:
|
||||
run:
|
||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
||||
with:
|
||||
enable_backend_testing: true
|
||||
|
||||
backend_directory: .
|
23
.github/workflows/frontend.yml
vendored
Normal file
23
.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Core JS
|
||||
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||
# This will break your current script.
|
||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||
|
||||
jobs:
|
||||
run:
|
||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
||||
with:
|
||||
enable_bundlewatch: true
|
||||
enable_prettier: true
|
||||
enable_typescript: true
|
||||
|
||||
frontend_directory: ./js
|
||||
backend_directory: .
|
||||
js_package_manager: yarn
|
||||
main_git_branch: master
|
||||
|
||||
secrets:
|
||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
137
.github/workflows/js.yml
vendored
137
.github/workflows/js.yml
vendored
@@ -1,137 +0,0 @@
|
||||
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: "yarn"
|
||||
cache-dependency-path: js/yarn.lock
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --immutable
|
||||
working-directory: ./js
|
||||
|
||||
- name: Check JS formatting
|
||||
run: yarn run format-check
|
||||
working-directory: ./js
|
||||
|
||||
typecheck:
|
||||
name: Typecheck
|
||||
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: "yarn"
|
||||
cache-dependency-path: js/yarn.lock
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
working-directory: ./js
|
||||
|
||||
- name: Typecheck
|
||||
run: yarn run check-typings
|
||||
working-directory: ./js
|
||||
|
||||
type-coverage:
|
||||
name: Type Coverage
|
||||
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: "yarn"
|
||||
cache-dependency-path: js/yarn.lock
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
working-directory: ./js
|
||||
|
||||
- name: Check type coverage
|
||||
run: yarn run check-typings-coverage
|
||||
working-directory: ./js
|
||||
|
||||
build-prod:
|
||||
name: Build and commit
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prettier, typecheck, type-coverage]
|
||||
|
||||
# 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: "yarn"
|
||||
cache-dependency-path: js/yarn.lock
|
||||
|
||||
# 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: yarn
|
||||
typings_script: build-typings
|
||||
|
||||
build-test:
|
||||
name: Test build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prettier, typecheck, type-coverage]
|
||||
|
||||
# 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: "yarn"
|
||||
cache-dependency-path: js/yarn.lock
|
||||
|
||||
# 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: yarn
|
||||
typings_script: build-typings
|
||||
do_not_commit: true
|
45
.github/workflows/pr_size_change.yml
vendored
45
.github/workflows/pr_size_change.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: Bundle size checker
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
push:
|
||||
paths:
|
||||
- "js/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "js/**"
|
||||
|
||||
jobs:
|
||||
bundlewatch:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: Bundlewatch
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
|
||||
- name: Use npm v7
|
||||
run: sudo npm install -g npm@7.x.x
|
||||
|
||||
- name: Install JS dependencies
|
||||
# We need to use `npm install` here. If we don't, the workflow will fail.
|
||||
run: npm install
|
||||
working-directory: ./js
|
||||
|
||||
- name: Build production assets
|
||||
run: npm run build
|
||||
working-directory: ./js
|
||||
|
||||
- name: Check bundle size change
|
||||
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
|
||||
working-directory: ./js
|
||||
env:
|
||||
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
||||
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
79
.github/workflows/test.yml
vendored
79
.github/workflows/test.yml
vendored
@@ -1,79 +0,0 @@
|
||||
name: Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php: [7.3, 7.4, '8.0', '8.1']
|
||||
service: ['mysql:5.7', mariadb]
|
||||
prefix: ['', flarum_]
|
||||
|
||||
include:
|
||||
- service: 'mysql:5.7'
|
||||
db: MySQL
|
||||
- service: mariadb
|
||||
db: MariaDB
|
||||
- prefix: flarum_
|
||||
prefixStr: (prefix)
|
||||
|
||||
exclude:
|
||||
- php: 7.3
|
||||
service: 'mysql:5.7'
|
||||
prefix: flarum_
|
||||
- php: 7.3
|
||||
service: mariadb
|
||||
prefix: flarum_
|
||||
- php: 8.0
|
||||
service: 'mysql:5.7'
|
||||
prefix: flarum_
|
||||
- php: 8.0
|
||||
service: mariadb
|
||||
prefix: flarum_
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: ${{ matrix.service }}
|
||||
ports:
|
||||
- 13306:3306
|
||||
|
||||
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@0b9d33cd0782337377999751fc10ea079fdd7104 # pin@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: xdebug
|
||||
extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
|
||||
tools: phpunit, composer:v2
|
||||
|
||||
# The authentication alter is necessary because newer mysql versions use the `caching_sha2_password` driver,
|
||||
# which isn't supported prior to PHP7.4
|
||||
# When we drop support for PHP7.3, we should remove this from the setup.
|
||||
- name: Create MySQL Database
|
||||
run: |
|
||||
sudo systemctl start mysql
|
||||
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306
|
||||
mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" --port 13306
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: composer install
|
||||
|
||||
- name: Setup Composer tests
|
||||
run: composer test:setup
|
||||
env:
|
||||
DB_PORT: 13306
|
||||
DB_PASSWORD: root
|
||||
DB_PREFIX: ${{ matrix.prefix }}
|
||||
|
||||
- name: Run Composer tests
|
||||
run: composer test
|
||||
env:
|
||||
COMPOSER_PROCESS_TIMEOUT: 600
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
/vendor
|
||||
composer.lock
|
||||
composer.phar
|
||||
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
tests/.phpunit.result.cache
|
||||
|
110
CHANGELOG.md
110
CHANGELOG.md
@@ -1,5 +1,115 @@
|
||||
# Changelog
|
||||
|
||||
## [1.2.0](https://github.com/flarum/core/compare/v1.1.1...v1.2.0)
|
||||
|
||||
### Added
|
||||
- View `README` documentation in extension pages (https://github.com/flarum/core/pull/3094).
|
||||
- Declare & Use CSS Custom Properties (https://github.com/flarum/core/pull/3146).
|
||||
- Lazy draw dropdowns to improve performance (https://github.com/flarum/core/pull/2925).
|
||||
- Default Settings Extender (https://github.com/flarum/core/pull/3127).
|
||||
- Add `textarea` setting type to admin pages (https://github.com/flarum/core/pull/3141).
|
||||
- Allow registering settings as `Less` config vars through Settings Extender (https://github.com/flarum/core/pull/3011).
|
||||
- Allow replacing of blade template namespaces via extender (https://github.com/flarum/core/pull/3167).
|
||||
- Update to Webpack 5 (https://github.com/flarum/core/pull/3135).
|
||||
- Introduce `Less` custom function extender with a `is-extension-enabled` function (https://github.com/flarum/core/pull/3190).
|
||||
- Support for `few` in ICU Message syntax (https://github.com/flarum/core/pull/3122).
|
||||
- ES6 local support for number formatting (https://github.com/flarum/core/pull/3099).
|
||||
- Added dedicated endpoint for retrieving single groups (https://github.com/flarum/core/pull/3084).
|
||||
- Callback `loadWhere` relation eager loading extender (https://github.com/flarum/core/pull/3116).
|
||||
- Extensible document title driver implementation (https://github.com/flarum/core/pull/3109).
|
||||
- Type checks, typescript coverage GH action (https://github.com/flarum/core/pull/3136).
|
||||
- Add color indicator in appearance admin page instead of validating colors (https://github.com/flarum/core/pull/3140).
|
||||
- Add typing files for our translator libraries (https://github.com/flarum/core/pull/3175).
|
||||
- `StatusWidget` tools extensibility (https://github.com/flarum/core/pull/3189).
|
||||
- Allow switching the `ImageManager` driver (https://github.com/flarum/core/pull/3195).
|
||||
- Events for notification read/all read actions (https://github.com/flarum/core/pull/3203).
|
||||
|
||||
### Changed
|
||||
- Testing with php8.1 (https://github.com/flarum/core/pull/3102).
|
||||
- Migrate fully to Yarn (https://github.com/flarum/core/pull/3155).
|
||||
- Handle post rendering errors to avoid crashes (https://github.com/flarum/core/pull/3061).
|
||||
- Added basic filtering, sorting, and pagination to groups endpoint (https://github.com/flarum/core/pull/3084).
|
||||
- Pass IP address to API Client pipeline (https://github.com/flarum/core/pull/3124).
|
||||
- Rename Extension Page "Uninstall" to "Purge" (https://github.com/flarum/core/pull/3123).
|
||||
- [A11Y] Improve accessibility for discussion reply count on post stream (https://github.com/flarum/core/pull/3090).
|
||||
- Improved post loading support (https://github.com/flarum/core/pull/3100).
|
||||
- Rewrite SubtreeRetainer into Typescript (https://github.com/flarum/core/pull/3137).
|
||||
- Rewrite ModalManager and state to Typescript (https://github.com/flarum/core/pull/3007).
|
||||
- Rewrite frontend application files to Typescript (https://github.com/flarum/core/pull/3006).
|
||||
- Allow extensions to modify the minimum search length in the Search component (https://github.com/flarum/core/pull/3130).
|
||||
- Allow use of any tag in `listItems` helper (https://github.com/flarum/core/pull/3147).
|
||||
- Replace `for ... in` with `Array.reduce` (https://github.com/flarum/core/pull/3149).
|
||||
- Page title format is now implemented through translations (https://github.com/flarum/core/pull/3077, https://github.com/flarum/core/pull/3228)
|
||||
- Add `aria-label` attribute to the navigation drawer button (https://github.com/flarum/core/pull/3157).
|
||||
- Convert extend util to TypeScript (https://github.com/flarum/core/pull/2928).
|
||||
- Better typings for DiscussionListState (https://github.com/flarum/core/pull/3132).
|
||||
- Rewrite ItemList, update `ItemList` typings (https://github.com/flarum/core/pull/3005).
|
||||
- Add priority order to discussion page controls (https://github.com/flarum/core/pull/3165).
|
||||
- Use `@php` in Blade templates (https://github.com/flarum/core/pull/3172).
|
||||
- Convert some common classes/utils to TS (https://github.com/flarum/core/pull/2929).
|
||||
- Convert routes to Typescript (https://github.com/flarum/core/pull/3177).
|
||||
- Move admin `colorItems` to an `ItemList` (https://github.com/flarum/core/pull/3186).
|
||||
- Centralize pagination/canonical meta URL generation in Document (https://github.com/flarum/core/pull/3077).
|
||||
- Use revision versioner to allow custom asset versioning (https://github.com/flarum/core/pull/3183).
|
||||
- Split up application error handling (https://github.com/flarum/core/pull/3184).
|
||||
- Make SlugManager available to blade template (https://github.com/flarum/core/pull/3194).
|
||||
- Convert models to TS (https://github.com/flarum/core/pull/3174).
|
||||
- Allow loading relations in other discussion endpoints (https://github.com/flarum/core/pull/3191).
|
||||
- Improve selected text stylization (https://github.com/flarum/core/pull/2961).
|
||||
- Extract notification `primaryControl` items to an ItemList (https://github.com/flarum/core/pull/3204).
|
||||
- Frontend code housekeeping (#3214, #3213).
|
||||
- Only retain scroll position if coming from discussion (https://github.com/flarum/core/pull/3229).
|
||||
- Use `aria-live` regions to focus screenreader attention on alerts as they appear (https://github.com/flarum/core/pull/3237).
|
||||
- Prevent unwarranted `a11y` warnings on custom Button subclasses (https://github.com/flarum/core/pull/3238).
|
||||
|
||||
### Fixed
|
||||
- Missing locale text in the user editing modal (https://github.com/flarum/core/pull/3093).
|
||||
- Dashes in table prefix prevent installation (https://github.com/flarum/core/pull/3089).
|
||||
- Missing autocomplete attributes to input fields (https://github.com/flarum/core/pull/3088).
|
||||
- Missing route parameters throwing an error (https://github.com/flarum/core/pull/3118).
|
||||
- Mail settings select component never used (https://github.com/flarum/core/pull/3120).
|
||||
- White avatar image throws javascript errors on the profile page (https://github.com/flarum/core/pull/3119).
|
||||
- Unformatted avatar upload validation errors (https://github.com/flarum/core/pull/2946).
|
||||
- Webkit input clear button shows up with the custom one (https://github.com/flarum/core/pull/3128).
|
||||
- Media query breakpoints conflict with Windows display scaling (https://github.com/flarum/core/pull/3139).
|
||||
- `typeof this` not recognized by some IDEs (https://github.com/flarum/core/pull/3142).
|
||||
- `Model.save()` cannot save `null` `hasOne` relationship (https://github.com/flarum/core/pull/3131).
|
||||
- Edit post `until reply` policy broken on PHP 8 (https://github.com/flarum/core/pull/3145).
|
||||
- Inaccurate `Component.component` argument typings (https://github.com/flarum/core/pull/3148).
|
||||
- Scrolling notification list infinitely repeats (https://github.com/flarum/core/pull/3159).
|
||||
- Argument for INFO constant was assigned to `maxfiles` argument incorrectly (bfd81a83cfd0fa8125395a147ff0c9ce622f38e3).
|
||||
- `Activated` event is sent every time an email is confirmed instead of just once (https://github.com/flarum/core/pull/3163).
|
||||
- [A11Y] Modal close button missing accessible label (https://github.com/flarum/core/pull/3161).
|
||||
- [A11Y] Auth modal inputs missing accessible labels (https://github.com/flarum/core/pull/3207).
|
||||
- [A11Y] Triggering click on drawer button can cause layered backdrops (https://github.com/flarum/core/pull/3018).
|
||||
- [A11Y] Focus can leave open nav drawer on mobile (https://github.com/flarum/core/pull/3018).
|
||||
- [A11Y] Post action items not showing when focus is within the post (https://github.com/flarum/core/pull/3173).
|
||||
- [A11Y] Missing accessible label for alert dismiss button (https://github.com/flarum/core/pull/3237).
|
||||
- Error accessing the forum after saving a setting with more than 65k characters (https://github.com/flarum/core/pull/3162).
|
||||
- Cannot restart queue from within (https://github.com/flarum/core/pull/3166).
|
||||
- `Post--by-actor` not showing when comparing user instances (https://github.com/flarum/core/pull/3170).
|
||||
- Incorrect typings for Modal `hide()` method (https://github.com/flarum/core/pull/3180).
|
||||
- Avatar Upload throws errors with correct mimetype and incorrect extension (https://github.com/flarum/core/pull/3181).
|
||||
- Clicking the dropdown button on a post opens all dropdowns in `Post-actions` (https://github.com/flarum/core/pull/3185).
|
||||
- `getPlainContent()` causes external content to be fetched (https://github.com/flarum/core/pull/3193).
|
||||
- `listItems` not accepting all `Mithril.Children` (https://github.com/flarum/core/pull/3176).
|
||||
- Notifications mark as read option updates all notifications including the read ones (https://github.com/flarum/core/pull/3202).
|
||||
- Post meta permalink not properly generated (https://github.com/flarum/core/pull/3216).
|
||||
- Broken contribution link in README (https://github.com/flarum/core/pull/3211).
|
||||
- `WelcomeHero` is displayed when content is empty (https://github.com/flarum/core/pull/3219).
|
||||
- `last_activity_at, last_seen_at` updated on all API requests (https://github.com/flarum/core/pull/3231).
|
||||
- `RememberMe` access token updated twice in API requests (https://github.com/flarum/core/pull/3233).
|
||||
- Error in `funding` item in `composer.json` bricks the frontend (https://github.com/flarum/core/pull/3239).
|
||||
- Escaped quotes in window title (https://github.com/flarum/core/pull/3264)
|
||||
- `schedule:list` command fails due to missing timezone configuration.
|
||||
|
||||
### Deprecated
|
||||
- Unused `evented` utility (https://github.com/flarum/core/pull/3125).
|
||||
|
||||
## [1.1.1](https://github.com/flarum/core/compare/v1.1.0...v1.1.1)
|
||||
|
||||
### Fixed
|
||||
- Performance issue with very large communities.
|
||||
|
||||
## [1.1.0](https://github.com/flarum/core/compare/v1.0.4...v1.1.0)
|
||||
|
||||
|
@@ -86,7 +86,7 @@
|
||||
"wikimedia/less.php": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"flarum/testing": "1.0@dev"
|
||||
"flarum/testing": "^1.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -107,6 +107,28 @@
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
},
|
||||
"flarum-cli": {
|
||||
"excludeScaffolding": [
|
||||
"LICENSE.md",
|
||||
"js/tsconfig.json",
|
||||
"js/webpack.config.js"
|
||||
],
|
||||
"modules": {
|
||||
"backendTesting": true,
|
||||
"js": true,
|
||||
"gitConf": true,
|
||||
"githubActions": true,
|
||||
"prettier": true,
|
||||
"typescript": true,
|
||||
"bundlewatch": true,
|
||||
"editorConfig": true,
|
||||
"styleci": true,
|
||||
"admin": true,
|
||||
"forum": true,
|
||||
"jsCommon": true,
|
||||
"css": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,2 +1,3 @@
|
||||
yarnPath: .yarn/releases/yarn-3.1.0.cjs
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.1.1.cjs
|
||||
|
@@ -1,2 +1,2 @@
|
||||
export * from './src/common';
|
||||
export * from './src/admin';
|
||||
export * from './src/admin';
|
517
js/dist-typings/@types/mithril/index.d.ts
vendored
Normal file
517
js/dist-typings/@types/mithril/index.d.ts
vendored
Normal file
@@ -0,0 +1,517 @@
|
||||
// Type definitions for Mithril 2.0
|
||||
// Project: https://mithril.js.org/, https://github.com/mithriljs/mithril.js
|
||||
// Definitions by: Mike Linkovich <https://github.com/spacejack>, András Parditka <https://github.com/andraaspar>, Isiah Meadows <https://github.com/isiahmeadows>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.2
|
||||
/** Renders a vnode structure into a DOM element. */
|
||||
declare function render(el: Element, vnodes: Mithril.Children): void;
|
||||
|
||||
/** Mounts a component to a DOM element, enabling it to autoredraw on user events. */
|
||||
declare function mount(element: Element, component: Mithril.ComponentTypes<any, any>): void;
|
||||
/** Unmounts a component from a DOM element. */
|
||||
declare function mount(element: Element, component: null): void; // tslint:disable-line unified-signatures
|
||||
|
||||
/** Makes an XHR request and returns a promise. */
|
||||
declare function request<T>(options: Mithril.RequestOptions<T> & { url: string }): Promise<T>;
|
||||
/** Makes an XHR request and returns a promise. */
|
||||
declare function request<T>(url: string, options?: Mithril.RequestOptions<T>): Promise<T>;
|
||||
|
||||
/** Makes a JSON-P request and returns a promise. */
|
||||
declare function jsonp<T>(options: Mithril.JsonpOptions & { url: string }): Promise<T>; // tslint:disable-line:no-unnecessary-generics
|
||||
/** Makes a JSON-P request and returns a promise. */
|
||||
declare function jsonp<T>(url: string, options?: Mithril.JsonpOptions): Promise<T>; // tslint:disable-line:no-unnecessary-generics
|
||||
|
||||
declare namespace Mithril {
|
||||
interface CommonAttributes<Attrs, State> {
|
||||
/** The oninit hook is called before a vnode is touched by the virtual DOM engine. */
|
||||
oninit?(this: State, vnode: Vnode<Attrs, State>): any;
|
||||
/** The oncreate hook is called after a DOM element is created and attached to the document. */
|
||||
oncreate?(this: State, vnode: VnodeDOM<Attrs, State>): any;
|
||||
/** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */
|
||||
onbeforeremove?(this: State, vnode: VnodeDOM<Attrs, State>): Promise<any> | void;
|
||||
/** The onremove hook is called before a DOM element is removed from the document. */
|
||||
onremove?(this: State, vnode: VnodeDOM<Attrs, State>): any;
|
||||
/** The onbeforeupdate hook is called before a vnode is diffed in a update. */
|
||||
onbeforeupdate?(this: State, vnode: Vnode<Attrs, State>, old: VnodeDOM<Attrs, State>): boolean | void;
|
||||
/** The onupdate hook is called after a DOM element is updated, while attached to the document. */
|
||||
onupdate?(this: State, vnode: VnodeDOM<Attrs, State>): any;
|
||||
/** A key to optionally associate with this element. */
|
||||
key?: string | number | undefined;
|
||||
}
|
||||
|
||||
interface Hyperscript {
|
||||
/** Creates a virtual element (Vnode). */
|
||||
(selector: string, ...children: Children[]): Vnode<any, any>;
|
||||
/** Creates a virtual element (Vnode). */
|
||||
(selector: string, attributes: Attributes, ...children: Children[]): Vnode<any, any>;
|
||||
/** Creates a virtual element (Vnode). */
|
||||
<Attrs, State>(component: ComponentTypes<Attrs, State>, ...args: Children[]): Vnode<Attrs, State>;
|
||||
/** Creates a virtual element (Vnode). */
|
||||
<Attrs, State>(
|
||||
component: ComponentTypes<Attrs, State>,
|
||||
attributes: Attrs & CommonAttributes<Attrs, State>,
|
||||
...args: Children[]
|
||||
): Vnode<Attrs, State>;
|
||||
/** Creates a fragment virtual element (Vnode). */
|
||||
fragment(attrs: CommonAttributes<any, any> & { [key: string]: any }, children: ChildArrayOrPrimitive): Vnode<any, any>;
|
||||
/** Turns an HTML string into a virtual element (Vnode). Do not use trust on unsanitized user input. */
|
||||
trust(html: string): Vnode<any, any>;
|
||||
}
|
||||
|
||||
interface RouteResolver<Attrs = {}, State = {}> {
|
||||
/** The onmatch hook is called when the router needs to find a component to render. */
|
||||
onmatch?(
|
||||
this: this,
|
||||
args: Attrs,
|
||||
requestedPath: string,
|
||||
route: string,
|
||||
): ComponentTypes<any, any> | Promise<any> | void;
|
||||
/** The render method is called on every redraw for a matching route. */
|
||||
render?(this: this, vnode: Vnode<Attrs, State>): Children;
|
||||
}
|
||||
|
||||
/** This represents a key-value mapping linking routes to components. */
|
||||
interface RouteDefs {
|
||||
/** The key represents the route. The value represents the corresponding component. */
|
||||
[url: string]: ComponentTypes<any, any> | RouteResolver<any, any>;
|
||||
}
|
||||
|
||||
interface RouteOptions {
|
||||
/** Routing parameters. If path has routing parameter slots, the properties of this object are interpolated into the path string. */
|
||||
replace?: boolean | undefined;
|
||||
/** The state object to pass to the underlying history.pushState / history.replaceState call. */
|
||||
state?: any;
|
||||
/** The title string to pass to the underlying history.pushState / history.replaceState call. */
|
||||
title?: string | undefined;
|
||||
}
|
||||
|
||||
interface RouteLinkAttrs extends Attributes {
|
||||
href: string;
|
||||
selector?: string | ComponentTypes<any> | undefined;
|
||||
options?: RouteOptions | undefined;
|
||||
}
|
||||
|
||||
interface Route {
|
||||
/** Creates application routes and mounts Components and/or RouteResolvers to a DOM element. */
|
||||
(element: Element, defaultRoute: string, routes: RouteDefs): void;
|
||||
/** Returns the last fully resolved routing path, without the prefix. */
|
||||
get(): string;
|
||||
/** Redirects to a matching route or to the default route if no matching routes can be found. */
|
||||
set(route: string, data?: any, options?: RouteOptions): void;
|
||||
/** Defines a router prefix which is a fragment of the URL that dictates the underlying strategy used by the router. */
|
||||
prefix: string;
|
||||
/** This Component renders a link <a href> that will use the current routing strategy */
|
||||
Link: Component<RouteLinkAttrs>;
|
||||
/** Returns the named parameter value from the current route. */
|
||||
param(name: string): string;
|
||||
/** Gets all route parameters. */
|
||||
param(): any;
|
||||
}
|
||||
|
||||
interface RequestOptions<T> {
|
||||
/** The HTTP method to use. */
|
||||
method?: string | undefined;
|
||||
/** The data to be interpolated into the URL and serialized into the querystring. */
|
||||
params?: { [key: string]: any } | undefined;
|
||||
/** The data to be serialized into the request body. */
|
||||
body?: (XMLHttpRequest['send'] extends (x: infer R) => any ? R : never) | (object & { [id: string]: any }) | undefined;
|
||||
/** Whether the request should be asynchronous. Defaults to true. */
|
||||
async?: boolean | undefined;
|
||||
/** A username for HTTP authorization. */
|
||||
user?: string | undefined;
|
||||
/** A password for HTTP authorization. */
|
||||
password?: string | undefined;
|
||||
/** Whether to send cookies to 3rd party domains. */
|
||||
withCredentials?: boolean | undefined;
|
||||
/** Exposes the underlying XMLHttpRequest object for low-level configuration. */
|
||||
config?(xhr: XMLHttpRequest, options: this): XMLHttpRequest | void;
|
||||
/** Headers to append to the request before sending it. */
|
||||
headers?: { [key: string]: string } | undefined;
|
||||
/** A constructor to be applied to each object in the response. */
|
||||
type?: new (o: any) => any;
|
||||
/** A serialization method to be applied to data. Defaults to JSON.stringify, or if options.data is an instance of FormData, defaults to the identity function. */
|
||||
serialize?(data: any): any;
|
||||
/** A deserialization method to be applied to the response. Defaults to a small wrapper around JSON.parse that returns null for empty responses. */
|
||||
deserialize?(data: string): T;
|
||||
/** A hook to specify how the XMLHttpRequest response should be read. Useful for reading response headers and cookies. Defaults to a function that returns xhr.responseText */
|
||||
extract?(xhr: XMLHttpRequest, options: this): T;
|
||||
/**
|
||||
* Force the use of the HTTP body section for data in GET requests when set to true,
|
||||
* or the use of querystring for other HTTP methods when set to false.
|
||||
* Defaults to false for GET requests and true for other methods.
|
||||
*/
|
||||
useBody?: boolean | undefined;
|
||||
/** If false, redraws mounted components upon completion of the request. If true, it does not. */
|
||||
background?: boolean | undefined;
|
||||
/** Milliseconds a request can take before automatically being terminated. */
|
||||
timeout?: number | undefined;
|
||||
/** The expected type of the response, as a legal value of XMLHttpRequest.responseType. */
|
||||
responseType?: '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | undefined;
|
||||
}
|
||||
|
||||
interface JsonpOptions {
|
||||
/** The data to be interpolated into the URL and serialized into the querystring. */
|
||||
params?: { [id: string]: any } | undefined;
|
||||
/** The data to be serialized into the request body. */
|
||||
body?: any;
|
||||
/** A constructor to be applied to each object in the response. */
|
||||
type?: new (o: any) => any;
|
||||
/** The name of the function that will be called as the callback. */
|
||||
callbackName?: string | undefined;
|
||||
/** The name of the querystring parameter name that specifies the callback name. */
|
||||
callbackKey?: string | undefined;
|
||||
/** If false, redraws mounted components upon completion of the request. If true, it does not. */
|
||||
background?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface Redraw {
|
||||
/** Manually triggers an asynchronous redraw of mounted components. */
|
||||
(): void;
|
||||
/** Manually triggers a synchronous redraw of mounted components. */
|
||||
sync(): void;
|
||||
}
|
||||
|
||||
type Params = object & ParamsRec;
|
||||
|
||||
interface ParamsRec {
|
||||
// Ideally, it'd be this:
|
||||
// `[key: string | number]: Params | !symbol & !object`
|
||||
[key: string]: string | number | boolean | null | undefined | Params;
|
||||
}
|
||||
|
||||
interface Static extends Hyperscript {
|
||||
route: Route;
|
||||
mount: typeof mount;
|
||||
render: typeof render;
|
||||
redraw: Redraw;
|
||||
request: typeof request;
|
||||
jsonp: typeof jsonp;
|
||||
/** Returns an object with key/value pairs parsed from a string of the form: ?a=1&b=2 */
|
||||
parseQueryString(queryString: string): Params;
|
||||
/** Turns the key/value pairs of an object into a string of the form: a=1&b=2 */
|
||||
buildQueryString(values: Params): string;
|
||||
/** Parse path name */
|
||||
parsePathname(url: string): { path: string; params: Params };
|
||||
/** Build path name */
|
||||
buildPathname(template: string, params?: Params): string;
|
||||
}
|
||||
|
||||
// Vnode children types
|
||||
type Child = Vnode<any, any> | string | number | boolean | null | undefined;
|
||||
interface ChildArray extends Array<Children> {}
|
||||
type Children = Child | ChildArray;
|
||||
type ChildArrayOrPrimitive = ChildArray | string | number | boolean;
|
||||
|
||||
/** Virtual DOM nodes, or vnodes, are Javascript objects that represent an element (or parts of the DOM). */
|
||||
interface Vnode<Attrs = {}, State = {}> {
|
||||
/** The nodeName of a DOM element. It may also be the string [ if a vnode is a fragment, # if it's a text vnode, or < if it's a trusted HTML vnode. Additionally, it may be a component. */
|
||||
tag: string | ComponentTypes<Attrs, State>;
|
||||
/** A hashmap of DOM attributes, events, properties and lifecycle methods. */
|
||||
attrs: Attrs;
|
||||
/** An object that is persisted between redraws. In component vnodes, state is a shallow clone of the component object. */
|
||||
state: State;
|
||||
/** The value used to map a DOM element to its respective item in an array of data. */
|
||||
key?: string | number | undefined;
|
||||
/** In most vnode types, the children property is an array of vnodes. For text and trusted HTML vnodes, The children property is either a string, a number or a boolean. */
|
||||
children?: ChildArrayOrPrimitive | undefined;
|
||||
/**
|
||||
* This is used instead of children if a vnode contains a text node as its only child.
|
||||
* This is done for performance reasons.
|
||||
* Component vnodes never use the text property even if they have a text node as their only child.
|
||||
*/
|
||||
text?: string | number | boolean | undefined;
|
||||
}
|
||||
|
||||
// In some lifecycle methods, Vnode will have a dom property
|
||||
// and possibly a domSize property.
|
||||
interface VnodeDOM<Attrs = {}, State = {}> extends Vnode<Attrs, State> {
|
||||
/** Points to the element that corresponds to the vnode. */
|
||||
dom: Element;
|
||||
/** This defines the number of DOM elements that the vnode represents (starting from the element referenced by the dom property). */
|
||||
domSize?: number | undefined;
|
||||
}
|
||||
|
||||
type _NoLifecycle<T> = Omit<T, keyof Component>;
|
||||
|
||||
interface CVnode<A = {}> extends Vnode<A, ClassComponent<A>> {}
|
||||
|
||||
interface CVnodeDOM<A = {}> extends VnodeDOM<A, ClassComponent<A>> {}
|
||||
|
||||
/**
|
||||
* Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
|
||||
* Any Javascript object that has a view method can be used as a Mithril component.
|
||||
* Components can be consumed via the m() utility.
|
||||
*/
|
||||
interface Component<Attrs = {}, State = {}> {
|
||||
/** The oninit hook is called before a vnode is touched by the virtual DOM engine. */
|
||||
oninit?(this: _NoLifecycle<this & State>, vnode: Vnode<Attrs, _NoLifecycle<this & State>>): any;
|
||||
/** The oncreate hook is called after a DOM element is created and attached to the document. */
|
||||
oncreate?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): any;
|
||||
/** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */
|
||||
onbeforeremove?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): Promise<any> | void;
|
||||
/** The onremove hook is called before a DOM element is removed from the document. */
|
||||
onremove?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): any;
|
||||
/** The onbeforeupdate hook is called before a vnode is diffed in a update. */
|
||||
onbeforeupdate?(this: _NoLifecycle<this & State>, vnode: Vnode<Attrs, _NoLifecycle<this & State>>, old: VnodeDOM<Attrs, _NoLifecycle<this & State>>): boolean | void;
|
||||
/** The onupdate hook is called after a DOM element is updated, while attached to the document. */
|
||||
onupdate?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): any;
|
||||
/** Creates a view out of virtual elements. */
|
||||
view(this: _NoLifecycle<this & State>, vnode: Vnode<Attrs, _NoLifecycle<this & State>>): Children | null | void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
|
||||
* Any class that implements a view method can be used as a Mithril component.
|
||||
* Components can be consumed via the m() utility.
|
||||
*/
|
||||
interface ClassComponent<A = {}> {
|
||||
/** The oninit hook is called before a vnode is touched by the virtual DOM engine. */
|
||||
oninit?(vnode: Vnode<A, this>): any;
|
||||
/** The oncreate hook is called after a DOM element is created and attached to the document. */
|
||||
oncreate?(vnode: VnodeDOM<A, this>): any;
|
||||
/** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */
|
||||
onbeforeremove?(vnode: VnodeDOM<A, this>): Promise<any> | void;
|
||||
/** The onremove hook is called before a DOM element is removed from the document. */
|
||||
onremove?(vnode: VnodeDOM<A, this>): any;
|
||||
/** The onbeforeupdate hook is called before a vnode is diffed in a update. */
|
||||
onbeforeupdate?(vnode: Vnode<A, this>, old: VnodeDOM<A, this>): boolean | void;
|
||||
/** The onupdate hook is called after a DOM element is updated, while attached to the document. */
|
||||
onupdate?(vnode: VnodeDOM<A, this>): any;
|
||||
/** Creates a view out of virtual elements. */
|
||||
view(vnode: Vnode<A, this>): Children | null | void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
|
||||
* Any function that returns an object with a view method can be used as a Mithril component.
|
||||
* Components can be consumed via the m() utility.
|
||||
*/
|
||||
type FactoryComponent<A = {}> = (vnode: Vnode<A>) => Component<A>;
|
||||
|
||||
/**
|
||||
* Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
|
||||
* Any function that returns an object with a view method can be used as a Mithril component.
|
||||
* Components can be consumed via the m() utility.
|
||||
*/
|
||||
type ClosureComponent<A = {}> = FactoryComponent<A>;
|
||||
|
||||
/**
|
||||
* Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
|
||||
* Any Javascript object that has a view method is a Mithril component. Components can be consumed via the m() utility.
|
||||
*/
|
||||
type Comp<Attrs = {}, State = {}> = _NoLifecycle<State> & Component<Attrs, _NoLifecycle<State>>;
|
||||
|
||||
/** Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse. Components can be consumed via the m() utility. */
|
||||
type ComponentTypes<A = {}, S = {}> =
|
||||
| Component<A, S>
|
||||
| { new (vnode: CVnode<A>): ClassComponent<A> }
|
||||
| FactoryComponent<A>;
|
||||
|
||||
/** This represents the attributes available for configuring virtual elements, beyond the applicable DOM attributes. */
|
||||
interface Attributes extends CommonAttributes<any, any> {
|
||||
/** The class name(s) for this virtual element, as a space-separated list. */
|
||||
className?: string | undefined;
|
||||
/** The class name(s) for this virtual element, as a space-separated list. */
|
||||
class?: string | undefined;
|
||||
/** Any other virtual element properties, including attributes and event handlers. */
|
||||
[property: string]: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Element extends Mithril.Vnode {}
|
||||
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface IntrinsicAttributes extends Mithril.Attributes {}
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface IntrinsicClassAttributes extends Mithril.Attributes {}
|
||||
|
||||
interface IntrinsicElements {
|
||||
// HTML
|
||||
a: Mithril.Attributes;
|
||||
abbr: Mithril.Attributes;
|
||||
address: Mithril.Attributes;
|
||||
area: Mithril.Attributes;
|
||||
article: Mithril.Attributes;
|
||||
aside: Mithril.Attributes;
|
||||
audio: Mithril.Attributes;
|
||||
b: Mithril.Attributes;
|
||||
base: Mithril.Attributes;
|
||||
bdi: Mithril.Attributes;
|
||||
bdo: Mithril.Attributes;
|
||||
big: Mithril.Attributes;
|
||||
blockquote: Mithril.Attributes;
|
||||
body: Mithril.Attributes;
|
||||
br: Mithril.Attributes;
|
||||
button: Mithril.Attributes;
|
||||
canvas: Mithril.Attributes;
|
||||
caption: Mithril.Attributes;
|
||||
cite: Mithril.Attributes;
|
||||
code: Mithril.Attributes;
|
||||
col: Mithril.Attributes;
|
||||
colgroup: Mithril.Attributes;
|
||||
data: Mithril.Attributes;
|
||||
datalist: Mithril.Attributes;
|
||||
dd: Mithril.Attributes;
|
||||
del: Mithril.Attributes;
|
||||
details: Mithril.Attributes;
|
||||
dfn: Mithril.Attributes;
|
||||
dialog: Mithril.Attributes;
|
||||
div: Mithril.Attributes;
|
||||
dl: Mithril.Attributes;
|
||||
dt: Mithril.Attributes;
|
||||
em: Mithril.Attributes;
|
||||
embed: Mithril.Attributes;
|
||||
fieldset: Mithril.Attributes;
|
||||
figcaption: Mithril.Attributes;
|
||||
figure: Mithril.Attributes;
|
||||
footer: Mithril.Attributes;
|
||||
form: Mithril.Attributes;
|
||||
h1: Mithril.Attributes;
|
||||
h2: Mithril.Attributes;
|
||||
h3: Mithril.Attributes;
|
||||
h4: Mithril.Attributes;
|
||||
h5: Mithril.Attributes;
|
||||
h6: Mithril.Attributes;
|
||||
head: Mithril.Attributes;
|
||||
header: Mithril.Attributes;
|
||||
hgroup: Mithril.Attributes;
|
||||
hr: Mithril.Attributes;
|
||||
html: Mithril.Attributes;
|
||||
i: Mithril.Attributes;
|
||||
iframe: Mithril.Attributes;
|
||||
img: Mithril.Attributes;
|
||||
input: Mithril.Attributes;
|
||||
ins: Mithril.Attributes;
|
||||
kbd: Mithril.Attributes;
|
||||
keygen: Mithril.Attributes;
|
||||
label: Mithril.Attributes;
|
||||
legend: Mithril.Attributes;
|
||||
li: Mithril.Attributes;
|
||||
link: Mithril.Attributes;
|
||||
main: Mithril.Attributes;
|
||||
map: Mithril.Attributes;
|
||||
mark: Mithril.Attributes;
|
||||
menu: Mithril.Attributes;
|
||||
menuitem: Mithril.Attributes;
|
||||
meta: Mithril.Attributes;
|
||||
meter: Mithril.Attributes;
|
||||
nav: Mithril.Attributes;
|
||||
noindex: Mithril.Attributes;
|
||||
noscript: Mithril.Attributes;
|
||||
object: Mithril.Attributes;
|
||||
ol: Mithril.Attributes;
|
||||
optgroup: Mithril.Attributes;
|
||||
option: Mithril.Attributes;
|
||||
output: Mithril.Attributes;
|
||||
p: Mithril.Attributes;
|
||||
param: Mithril.Attributes;
|
||||
picture: Mithril.Attributes;
|
||||
pre: Mithril.Attributes;
|
||||
progress: Mithril.Attributes;
|
||||
q: Mithril.Attributes;
|
||||
rp: Mithril.Attributes;
|
||||
rt: Mithril.Attributes;
|
||||
ruby: Mithril.Attributes;
|
||||
s: Mithril.Attributes;
|
||||
samp: Mithril.Attributes;
|
||||
script: Mithril.Attributes;
|
||||
section: Mithril.Attributes;
|
||||
select: Mithril.Attributes;
|
||||
small: Mithril.Attributes;
|
||||
source: Mithril.Attributes;
|
||||
span: Mithril.Attributes;
|
||||
strong: Mithril.Attributes;
|
||||
style: Mithril.Attributes;
|
||||
sub: Mithril.Attributes;
|
||||
summary: Mithril.Attributes;
|
||||
sup: Mithril.Attributes;
|
||||
table: Mithril.Attributes;
|
||||
template: Mithril.Attributes;
|
||||
tbody: Mithril.Attributes;
|
||||
td: Mithril.Attributes;
|
||||
textarea: Mithril.Attributes;
|
||||
tfoot: Mithril.Attributes;
|
||||
th: Mithril.Attributes;
|
||||
thead: Mithril.Attributes;
|
||||
time: Mithril.Attributes;
|
||||
title: Mithril.Attributes;
|
||||
tr: Mithril.Attributes;
|
||||
track: Mithril.Attributes;
|
||||
u: Mithril.Attributes;
|
||||
ul: Mithril.Attributes;
|
||||
var: Mithril.Attributes;
|
||||
video: Mithril.Attributes;
|
||||
wbr: Mithril.Attributes;
|
||||
webview: Mithril.Attributes;
|
||||
|
||||
// SVG
|
||||
svg: Mithril.Attributes;
|
||||
animate: Mithril.Attributes;
|
||||
animateMotion: Mithril.Attributes;
|
||||
animateTransform: Mithril.Attributes;
|
||||
circle: Mithril.Attributes;
|
||||
clipPath: Mithril.Attributes;
|
||||
defs: Mithril.Attributes;
|
||||
desc: Mithril.Attributes;
|
||||
ellipse: Mithril.Attributes;
|
||||
feBlend: Mithril.Attributes;
|
||||
feColorMatrix: Mithril.Attributes;
|
||||
feComponentTransfer: Mithril.Attributes;
|
||||
feComposite: Mithril.Attributes;
|
||||
feConvolveMatrix: Mithril.Attributes;
|
||||
feDiffuseLighting: Mithril.Attributes;
|
||||
feDisplacementMap: Mithril.Attributes;
|
||||
feDistantLight: Mithril.Attributes;
|
||||
feDropShadow: Mithril.Attributes;
|
||||
feFlood: Mithril.Attributes;
|
||||
feFuncA: Mithril.Attributes;
|
||||
feFuncB: Mithril.Attributes;
|
||||
feFuncG: Mithril.Attributes;
|
||||
feFuncR: Mithril.Attributes;
|
||||
feGaussianBlur: Mithril.Attributes;
|
||||
feImage: Mithril.Attributes;
|
||||
feMerge: Mithril.Attributes;
|
||||
feMergeNode: Mithril.Attributes;
|
||||
feMorphology: Mithril.Attributes;
|
||||
feOffset: Mithril.Attributes;
|
||||
fePointLight: Mithril.Attributes;
|
||||
feSpecularLighting: Mithril.Attributes;
|
||||
feSpotLight: Mithril.Attributes;
|
||||
feTile: Mithril.Attributes;
|
||||
feTurbulence: Mithril.Attributes;
|
||||
filter: Mithril.Attributes;
|
||||
foreignObject: Mithril.Attributes;
|
||||
g: Mithril.Attributes;
|
||||
image: Mithril.Attributes;
|
||||
line: Mithril.Attributes;
|
||||
linearGradient: Mithril.Attributes;
|
||||
marker: Mithril.Attributes;
|
||||
mask: Mithril.Attributes;
|
||||
metadata: Mithril.Attributes;
|
||||
mpath: Mithril.Attributes;
|
||||
path: Mithril.Attributes;
|
||||
pattern: Mithril.Attributes;
|
||||
polygon: Mithril.Attributes;
|
||||
polyline: Mithril.Attributes;
|
||||
radialGradient: Mithril.Attributes;
|
||||
rect: Mithril.Attributes;
|
||||
stop: Mithril.Attributes;
|
||||
switch: Mithril.Attributes;
|
||||
symbol: Mithril.Attributes;
|
||||
text: Mithril.Attributes;
|
||||
textPath: Mithril.Attributes;
|
||||
tspan: Mithril.Attributes;
|
||||
use: Mithril.Attributes;
|
||||
view: Mithril.Attributes;
|
||||
|
||||
// Special Mithril types
|
||||
'[': Mithril.Attributes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare const Mithril: Mithril.Static;
|
||||
export = Mithril;
|
43
js/dist-typings/@types/mithril/stream/index.d.ts
vendored
Normal file
43
js/dist-typings/@types/mithril/stream/index.d.ts
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// tslint:disable:rulename strict-export-declare-modifiers
|
||||
/** Creates an empty stream. */
|
||||
declare function Stream<T>(): Stream<T>; // tslint:disable-line no-unnecessary-generics
|
||||
/** Creates a stream with an initial value. */
|
||||
declare function Stream<T>(value: T): Stream<T>; // tslint:disable-line unified-signatures
|
||||
|
||||
declare interface Stream<T> {
|
||||
/** Returns the value of the stream. */
|
||||
(): T;
|
||||
/** Sets the value of the stream. */
|
||||
(value: T): this;
|
||||
/** Creates a dependent stream whose value is set to the result of the callback function. */
|
||||
map<U>(f: (current: T) => U | typeof Stream.SKIP): Stream<U>;
|
||||
/** This method is functionally identical to stream. It exists to conform to Fantasy Land's Applicative specification. */
|
||||
of(val: T): Stream<T>;
|
||||
/** Apply. */
|
||||
ap<U>(f: Stream<(value: T) => U>): Stream<U>;
|
||||
/** A co-dependent stream that unregisters dependent streams when set to true. */
|
||||
end: Stream<boolean>;
|
||||
/** When a stream is passed as the argument to JSON.stringify(), the value of the stream is serialized. */
|
||||
toJSON(): string;
|
||||
/** Returns the value of the stream. */
|
||||
valueOf(): T;
|
||||
}
|
||||
|
||||
declare namespace Stream {
|
||||
/** Creates a computed stream that reactively updates if any of its upstreams are updated. */
|
||||
export function combine<T>(combiner: (...streams: any[]) => T, streams: Array<Stream<any>>): Stream<T>;
|
||||
/** Combines the values of one or more streams into a single stream that is updated whenever one or more of the sources are updated */
|
||||
export function lift<S extends any[], T>(fn: (...values: S) => T, ...streams: {[I in keyof S]: Stream<S[I]>}): Stream<T>;
|
||||
/** Creates a stream whose value is the array of values from an array of streams. */
|
||||
export function merge<S extends any[]>(streams: {[I in keyof S]: Stream<S[I]>}): Stream<{[I in keyof S]: S[I]}>;
|
||||
/** Creates a new stream with the results of calling the function on every incoming stream with and accumulator and the incoming value. */
|
||||
export function scan<T, U>(fn: (acc: U, value: T) => U, acc: U, stream: Stream<T>): Stream<U>;
|
||||
/** Takes an array of pairs of streams and scan functions and merges all those streams using the given functions into a single stream. */
|
||||
export function scanMerge<T, U>(pairs: Array<[Stream<T>, (acc: U, value: T) => U]>, acc: U): Stream<U>;
|
||||
/** Takes an array of pairs of streams and scan functions and merges all those streams using the given functions into a single stream. */
|
||||
export function scanMerge<U>(pairs: Array<[Stream<any>, (acc: U, value: any) => U]>, acc: U): Stream<U>;
|
||||
/** A special value that can be returned to stream callbacks to skip execution of downstreams. */
|
||||
export const SKIP: unique symbol;
|
||||
}
|
||||
|
||||
export = Stream;
|
4
js/dist-typings/admin/compat.d.ts
vendored
4
js/dist-typings/admin/compat.d.ts
vendored
@@ -4,8 +4,8 @@ declare var _default: {
|
||||
Store: typeof import("../common/Store").default;
|
||||
'utils/BasicEditorDriver': typeof import("../common/utils/BasicEditorDriver").default;
|
||||
'utils/evented': {
|
||||
handlers: Object;
|
||||
getHandlers(event: string): any[];
|
||||
handlers: Record<string, unknown>;
|
||||
getHandlers(event: string): Function[];
|
||||
trigger(event: string, ...args: any[]): void;
|
||||
on(event: string, handler: Function): void;
|
||||
one(event: string, handler: Function): void;
|
||||
|
@@ -5,9 +5,9 @@ export default class AdminNav extends Component<import("../../common/Component")
|
||||
/**
|
||||
* Build an item list of main links to show in the admin navigation.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
extensionItems(): ItemList<any>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -7,10 +7,12 @@ export default class BasicsPage extends AdminPage<import("../../common/component
|
||||
* Build a list of options for the default homepage. Each option must be an
|
||||
* object with `path` and `label` properties.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @return {ItemList<{ path: string, label: import('mithril').Children }>}
|
||||
*/
|
||||
public homePageItems(): ItemList<any>;
|
||||
homePageItems(): ItemList<{
|
||||
path: string;
|
||||
label: import('mithril').Children;
|
||||
}>;
|
||||
}
|
||||
import AdminPage from "./AdminPage";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -3,14 +3,14 @@ export default class DashboardWidget extends Component<import("../../common/Comp
|
||||
/**
|
||||
* Get the class name to apply to the widget.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
*/
|
||||
className(): string;
|
||||
/**
|
||||
* Get the content of the widget.
|
||||
*
|
||||
* @return {VirtualElement}
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
content(): any;
|
||||
content(): import('mithril').Children;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -8,9 +8,9 @@ export default class HeaderPrimary extends Component<import("../../common/Compon
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -6,9 +6,9 @@ export default class HeaderSecondary extends Component<import("../../common/Comp
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
export interface ILoadingModalAttrs extends IInternalModalAttrs {
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import ExtensionReadme from '../models/ExtensionReadme';
|
||||
import type Mithril from 'mithril';
|
||||
|
@@ -13,16 +13,16 @@ export default class UploadImageButton extends Button<import("../../common/compo
|
||||
/**
|
||||
* After a successful upload/removal, reload the page.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @param {object} response
|
||||
* @protected
|
||||
*/
|
||||
protected success(response: Object): void;
|
||||
protected success(response: object): void;
|
||||
/**
|
||||
* If upload/removal fails, stop loading.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @param {object} response
|
||||
* @protected
|
||||
*/
|
||||
protected failure(response: Object): void;
|
||||
protected failure(response: object): void;
|
||||
}
|
||||
import Button from "../../common/components/Button";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import type Mithril from 'mithril';
|
||||
import type User from '../../common/models/User';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
|
12
js/dist-typings/common/Application.d.ts
vendored
12
js/dist-typings/common/Application.d.ts
vendored
@@ -73,6 +73,8 @@ export interface RouteResolver<Attrs extends ComponentAttrs, Comp extends Compon
|
||||
*
|
||||
* Returns the component class, and **not** a Vnode or JSX
|
||||
* expression.
|
||||
*
|
||||
* @see https://mithril.js.org/route.html#routeresolveronmatch
|
||||
*/
|
||||
onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): {
|
||||
new (): Comp;
|
||||
@@ -80,9 +82,14 @@ export interface RouteResolver<Attrs extends ComponentAttrs, Comp extends Compon
|
||||
/**
|
||||
* A function which renders the provided component.
|
||||
*
|
||||
* If not specified, the route will default to rendering the
|
||||
* component on its own, inside of a fragment.
|
||||
*
|
||||
* Returns a Mithril Vnode or other children.
|
||||
*
|
||||
* @see https://mithril.js.org/route.html#routeresolverrender
|
||||
*/
|
||||
render(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;
|
||||
render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;
|
||||
}
|
||||
/**
|
||||
* The `App` class provides a container for an application, as well as various
|
||||
@@ -215,9 +222,6 @@ export default class Application {
|
||||
* Make an AJAX request, handling any low-level errors that may occur.
|
||||
*
|
||||
* @see https://mithril.js.org/request.html
|
||||
*
|
||||
* @param options
|
||||
* @return {Promise}
|
||||
*/
|
||||
request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType>;
|
||||
/**
|
||||
|
4
js/dist-typings/common/Fragment.d.ts
vendored
4
js/dist-typings/common/Fragment.d.ts
vendored
@@ -28,8 +28,8 @@ export default abstract class Fragment {
|
||||
* containing all of the `li` elements inside the DOM element of this
|
||||
* fragment.
|
||||
*
|
||||
* @param {String} [selector] a jQuery-compatible selector string
|
||||
* @returns {jQuery} the jQuery object for the DOM node
|
||||
* @param [selector] a jQuery-compatible selector string
|
||||
* @returns the jQuery object for the DOM node
|
||||
* @final
|
||||
*/
|
||||
$(selector?: string): JQuery;
|
||||
|
2
js/dist-typings/common/Store.d.ts
vendored
2
js/dist-typings/common/Store.d.ts
vendored
@@ -78,7 +78,7 @@ export default class Store {
|
||||
* within the 'data' key of the payload.
|
||||
*/
|
||||
pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;
|
||||
pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponseSingle<Ms[number]>;
|
||||
pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;
|
||||
/**
|
||||
* Create a model to represent a resource object (or update an existing one),
|
||||
* and push it into the store.
|
||||
|
2
js/dist-typings/common/Translator.d.ts
vendored
2
js/dist-typings/common/Translator.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../@types/translator-icu-rich.d.ts" />
|
||||
import { RichMessageFormatter } from '@askvortsov/rich-icu-message-formatter';
|
||||
import { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';
|
||||
declare type Translations = Record<string, string>;
|
||||
|
4
js/dist-typings/common/compat.d.ts
vendored
4
js/dist-typings/common/compat.d.ts
vendored
@@ -4,8 +4,8 @@ declare var _default: {
|
||||
Store: typeof Store;
|
||||
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
||||
'utils/evented': {
|
||||
handlers: Object;
|
||||
getHandlers(event: string): any[];
|
||||
handlers: Record<string, unknown>;
|
||||
getHandlers(event: string): Function[];
|
||||
trigger(event: string, ...args: any[]): void;
|
||||
on(event: string, handler: Function): void;
|
||||
one(event: string, handler: Function): void;
|
||||
|
@@ -15,14 +15,14 @@ export default class Checkbox extends Component<import("../Component").Component
|
||||
/**
|
||||
* Get the template for the checkbox's display (tick/cross icon).
|
||||
*
|
||||
* @return {*}
|
||||
* @return {import('mithril').Children}
|
||||
* @protected
|
||||
*/
|
||||
protected getDisplay(): any;
|
||||
protected getDisplay(): import('mithril').Children;
|
||||
/**
|
||||
* Run a callback when the state of the checkbox is changed.
|
||||
*
|
||||
* @param {Boolean} checked
|
||||
* @param {boolean} checked
|
||||
* @protected
|
||||
*/
|
||||
protected onchange(checked: boolean): void;
|
||||
|
@@ -22,17 +22,17 @@ export default class Dropdown extends Component<import("../Component").Component
|
||||
/**
|
||||
* Get the template for the button.
|
||||
*
|
||||
* @return {*}
|
||||
* @return {import('mithril').Children}
|
||||
* @protected
|
||||
*/
|
||||
protected getButton(children: any): any;
|
||||
protected getButton(children: any): import('mithril').Children;
|
||||
/**
|
||||
* Get the template for the button's content.
|
||||
*
|
||||
* @return {*}
|
||||
* @return {import('mithril').Children}
|
||||
* @protected
|
||||
*/
|
||||
protected getButtonContent(children: any): any;
|
||||
protected getButtonContent(children: any): import('mithril').Children;
|
||||
getMenu(items: any): JSX.Element;
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from './Modal';
|
||||
import ItemList from '../utils/ItemList';
|
||||
import Stream from '../utils/Stream';
|
||||
|
@@ -16,10 +16,10 @@ export default class LinkButton extends Button<import("./Button").IButtonAttrs>
|
||||
/**
|
||||
* Determine whether a component with the given attrs is 'active'.
|
||||
*
|
||||
* @param {Object} attrs
|
||||
* @return {Boolean}
|
||||
* @param {object} attrs
|
||||
* @return {boolean}
|
||||
*/
|
||||
static isActive(attrs: Object): boolean;
|
||||
static isActive(attrs: object): boolean;
|
||||
constructor();
|
||||
}
|
||||
import Button from "./Button";
|
||||
|
@@ -1,4 +1,3 @@
|
||||
/// <reference types="mithril" />
|
||||
import Component, { ComponentAttrs } from '../Component';
|
||||
export interface LoadingIndicatorAttrs extends ComponentAttrs {
|
||||
/**
|
||||
|
@@ -18,23 +18,23 @@ export default class Navigation extends Component<import("../Component").Compone
|
||||
/**
|
||||
* Get the back button.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {import('mithril').Children}
|
||||
* @protected
|
||||
*/
|
||||
protected getBackButton(): Object;
|
||||
protected getBackButton(): import('mithril').Children;
|
||||
/**
|
||||
* Get the pane pinned toggle button.
|
||||
*
|
||||
* @return {Object|String}
|
||||
* @return {import('mithril').Children}
|
||||
* @protected
|
||||
*/
|
||||
protected getPaneButton(): Object | string;
|
||||
protected getPaneButton(): import('mithril').Children;
|
||||
/**
|
||||
* Get the drawer toggle button.
|
||||
*
|
||||
* @return {Object|String}
|
||||
* @return {import('mithril').Children}
|
||||
* @protected
|
||||
*/
|
||||
protected getDrawerButton(): Object | string;
|
||||
protected getDrawerButton(): import('mithril').Children;
|
||||
}
|
||||
import Component from "../Component";
|
||||
|
@@ -1,4 +1,3 @@
|
||||
/// <reference types="mithril" />
|
||||
import type RequestError from '../utils/RequestError';
|
||||
import Modal, { IInternalModalAttrs } from './Modal';
|
||||
export interface IRequestErrorModalAttrs extends IInternalModalAttrs {
|
||||
|
@@ -7,9 +7,10 @@ export default class SplitDropdown extends Dropdown {
|
||||
* Get the first child. If the first child is an array, the first item in that
|
||||
* array will be returned.
|
||||
*
|
||||
* @return {*}
|
||||
* @param {unknown[] | unknown} children
|
||||
* @return {unknown}
|
||||
* @protected
|
||||
*/
|
||||
protected getFirstChild(children: any): any;
|
||||
protected getFirstChild(children: unknown[] | unknown): unknown;
|
||||
}
|
||||
import Dropdown from "./Dropdown";
|
||||
|
@@ -36,19 +36,19 @@ export default class TextEditor extends Component<import("../Component").Compone
|
||||
/**
|
||||
* Build an item list for the text editor controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
controlItems(): ItemList<any>;
|
||||
controlItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the toolbar controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
toolbarItems(): ItemList<any>;
|
||||
toolbarItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Handle input into the textarea.
|
||||
*
|
||||
* @param {String} value
|
||||
* @param {string} value
|
||||
*/
|
||||
oninput(value: string): void;
|
||||
/**
|
||||
|
4
js/dist-typings/common/extend.d.ts
vendored
4
js/dist-typings/common/extend.d.ts
vendored
@@ -23,7 +23,7 @@
|
||||
* @param methods The name or names of the method(s) to extend
|
||||
* @param callback A callback which mutates the method's output
|
||||
*/
|
||||
export declare function extend<T extends object, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void): void;
|
||||
export declare function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void): void;
|
||||
/**
|
||||
* Override an object's method by replacing it with a new function, so that the
|
||||
* new function will be run every time the object's method is called.
|
||||
@@ -51,4 +51,4 @@ export declare function extend<T extends object, K extends KeyOfType<T, Function
|
||||
* @param methods The name or names of the method(s) to override
|
||||
* @param newMethod The method to replace it with
|
||||
*/
|
||||
export declare function override<T extends object, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void): void;
|
||||
export declare function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(object: T, methods: K | K[], newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void): void;
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion
|
||||
* ```
|
||||
*
|
||||
* @param {Array} items
|
||||
* @return {VirtualElement}
|
||||
* @param {import('mithril').Children[]} items
|
||||
* @return {import('mithril').Children}')}
|
||||
*/
|
||||
export default function punctuateSeries(items: any[]): any;
|
||||
export default function punctuateSeries(items: import('mithril').Children[]): import('mithril').Children;
|
||||
|
14
js/dist-typings/common/index.d.ts
vendored
14
js/dist-typings/common/index.d.ts
vendored
@@ -1,3 +1,13 @@
|
||||
import * as Extend from "./extend/index";
|
||||
import app from "./app";
|
||||
import 'expose-loader?exposes=$,jQuery!jquery';
|
||||
import 'expose-loader?exposes=m!mithril';
|
||||
import 'expose-loader?exposes=dayjs!dayjs';
|
||||
import 'bootstrap/js/affix';
|
||||
import 'bootstrap/js/dropdown';
|
||||
import 'bootstrap/js/modal';
|
||||
import 'bootstrap/js/tooltip';
|
||||
import 'bootstrap/js/transition';
|
||||
import 'jquery.hotkeys/jquery.hotkeys';
|
||||
import * as Extend from './extend/index';
|
||||
import app from './app';
|
||||
export { Extend, app };
|
||||
import './utils/arrayFlatPolyfill';
|
||||
|
@@ -20,7 +20,7 @@ export default class AlertManagerState {
|
||||
/**
|
||||
* Show an Alert in the alerts area.
|
||||
*
|
||||
* @returns The alert's ID, which can be used to dismiss the alert.
|
||||
* @return The alert's ID, which can be used to dismiss the alert.
|
||||
*/
|
||||
show(children: Mithril.Children): AlertIdentifier;
|
||||
show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;
|
||||
|
@@ -23,7 +23,13 @@ export default class ModalManagerState {
|
||||
modal: null | {
|
||||
componentClass: UnsafeModalClass;
|
||||
attrs?: Record<string, unknown>;
|
||||
key: number;
|
||||
};
|
||||
/**
|
||||
* Used to force re-initialization of modals if a modal
|
||||
* is replaced by another of the same type.
|
||||
*/
|
||||
private key;
|
||||
private closeTimeout?;
|
||||
/**
|
||||
* Shows a modal dialog.
|
||||
@@ -45,7 +51,7 @@ export default class ModalManagerState {
|
||||
/**
|
||||
* Checks if a modal is currently open.
|
||||
*
|
||||
* @returns `true` if a modal dialog is currently open, otherwise `false`.
|
||||
* @return `true` if a modal dialog is currently open, otherwise `false`.
|
||||
*/
|
||||
isModalOpen(): boolean;
|
||||
}
|
||||
|
7
js/dist-typings/common/states/PageState.d.ts
vendored
7
js/dist-typings/common/states/PageState.d.ts
vendored
@@ -5,12 +5,11 @@ export default class PageState {
|
||||
/**
|
||||
* Determine whether the page matches the given class and data.
|
||||
*
|
||||
* @param {object} type The page class to check against. Subclasses are
|
||||
* accepted as well.
|
||||
* @param {object} data
|
||||
* @param {object} type The page class to check against. Subclasses are accepted as well.
|
||||
* @param {Record<string, unknown>} data
|
||||
* @return {boolean}
|
||||
*/
|
||||
matches(type: object, data?: object): boolean;
|
||||
matches(type: object, data?: Record<string, unknown>): boolean;
|
||||
get(key: any): any;
|
||||
set(key: any, value: any): void;
|
||||
}
|
||||
|
11
js/dist-typings/common/utils/Drawer.d.ts
vendored
11
js/dist-typings/common/utils/Drawer.d.ts
vendored
@@ -34,20 +34,15 @@ export default class Drawer {
|
||||
* Check whether or not the drawer is currently open.
|
||||
*
|
||||
* @return {boolean}
|
||||
* @public
|
||||
*/
|
||||
public isOpen(): boolean;
|
||||
isOpen(): boolean;
|
||||
/**
|
||||
* Hide the drawer.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public hide(): void;
|
||||
hide(): void;
|
||||
/**
|
||||
* Show the drawer.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public show(): void;
|
||||
show(): void;
|
||||
$backdrop: JQuery<HTMLElement> | undefined;
|
||||
}
|
||||
|
2
js/dist-typings/common/utils/ItemList.d.ts
vendored
2
js/dist-typings/common/utils/ItemList.d.ts
vendored
@@ -192,7 +192,7 @@ export default class ItemList<T> {
|
||||
*
|
||||
* @param content The item's content (objects only)
|
||||
* @param key The item's key
|
||||
* @returns Proxied content
|
||||
* @return Proxied content
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
|
13
js/dist-typings/common/utils/ScrollListener.d.ts
vendored
13
js/dist-typings/common/utils/ScrollListener.d.ts
vendored
@@ -6,7 +6,6 @@ export default class ScrollListener {
|
||||
/**
|
||||
* @param {(top: number) => void} callback The callback to run when the scroll position
|
||||
* changes.
|
||||
* @public
|
||||
*/
|
||||
constructor(callback: (top: number) => void);
|
||||
callback: (top: number) => void;
|
||||
@@ -20,21 +19,15 @@ export default class ScrollListener {
|
||||
protected loop(): void;
|
||||
/**
|
||||
* Run the callback, whether there was a scroll event or not.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public update(): void;
|
||||
update(): void;
|
||||
/**
|
||||
* Start listening to and handling the window's scroll position.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public start(): void;
|
||||
start(): void;
|
||||
active: (() => void) | null | undefined;
|
||||
/**
|
||||
* Stop listening to and handling the window's scroll position.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public stop(): void;
|
||||
stop(): void;
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
* position can be anchor to an element that is in or below the viewport, so
|
||||
* the content in the viewport will stay the same.
|
||||
*
|
||||
* @param {DOMElement} element The element to anchor the scroll position to.
|
||||
* @param {Function} callback The callback to run that will change page content.
|
||||
* @param {HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.
|
||||
* @param {() => void} callback The callback to run that will change page content.
|
||||
*/
|
||||
export default function anchorScroll(element: any, callback: Function): void;
|
||||
export default function anchorScroll(element: HTMLElement | SVGElement | Element, callback: () => void): void;
|
||||
|
5
js/dist-typings/common/utils/computed.d.ts
vendored
5
js/dist-typings/common/utils/computed.d.ts
vendored
@@ -3,9 +3,8 @@ import Model from '../Model';
|
||||
* The `computed` utility creates a function that will cache its output until
|
||||
* any of the dependent values are dirty.
|
||||
*
|
||||
* @param {...String} dependentKeys The keys of the dependent values.
|
||||
* @param {function} compute The function which computes the value using the
|
||||
* @param dependentKeys The keys of the dependent values.
|
||||
* @param compute The function which computes the value using the
|
||||
* dependent values.
|
||||
* @return {Function}
|
||||
*/
|
||||
export default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T;
|
||||
|
68
js/dist-typings/common/utils/evented.d.ts
vendored
68
js/dist-typings/common/utils/evented.d.ts
vendored
@@ -1,79 +1,97 @@
|
||||
declare namespace _default {
|
||||
const handlers: Object;
|
||||
const handlers: Record<string, unknown>;
|
||||
/**
|
||||
* Get all of the registered handlers for an event.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @return {Array}
|
||||
* @param {string} event The name of the event.
|
||||
* @return {Function[]}
|
||||
* @protected
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function getHandlers(event: string): any[];
|
||||
function getHandlers(event: string): Function[];
|
||||
/**
|
||||
* Get all of the registered handlers for an event.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @return {Array}
|
||||
* @param {string} event The name of the event.
|
||||
* @return {Function[]}
|
||||
* @protected
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function getHandlers(event: string): any[];
|
||||
function getHandlers(event: string): Function[];
|
||||
/**
|
||||
* Trigger an event.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {...*} args Arguments to pass to event handlers.
|
||||
* @public
|
||||
* @param {string} event The name of the event.
|
||||
* @param {any[]} args Arguments to pass to event handlers.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function trigger(event: string, ...args: any[]): void;
|
||||
/**
|
||||
* Trigger an event.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {...*} args Arguments to pass to event handlers.
|
||||
* @public
|
||||
* @param {string} event The name of the event.
|
||||
* @param {any[]} args Arguments to pass to event handlers.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function trigger(event: string, ...args: any[]): void;
|
||||
/**
|
||||
* Register an event handler.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {function} handler The function to handle the event.
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function to handle the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function on(event: string, handler: Function): void;
|
||||
/**
|
||||
* Register an event handler.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {function} handler The function to handle the event.
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function to handle the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function on(event: string, handler: Function): void;
|
||||
/**
|
||||
* Register an event handler so that it will run only once, and then
|
||||
* unregister itself.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {function} handler The function to handle the event.
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function to handle the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function one(event: string, handler: Function): void;
|
||||
/**
|
||||
* Register an event handler so that it will run only once, and then
|
||||
* unregister itself.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {function} handler The function to handle the event.
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function to handle the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function one(event: string, handler: Function): void;
|
||||
/**
|
||||
* Unregister an event handler.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {function} handler The function that handles the event.
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function that handles the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function off(event: string, handler: Function): void;
|
||||
/**
|
||||
* Unregister an event handler.
|
||||
*
|
||||
* @param {String} event The name of the event.
|
||||
* @param {function} handler The function that handles the event.
|
||||
* @param {string} event The name of the event.
|
||||
* @param {Function} handler The function that handles the event.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function off(event: string, handler: Function): void;
|
||||
}
|
||||
|
8
js/dist-typings/common/utils/mixin.d.ts
vendored
8
js/dist-typings/common/utils/mixin.d.ts
vendored
@@ -5,8 +5,8 @@
|
||||
* @example
|
||||
* class MyClass extends mixin(ExistingClass, evented, etc) {}
|
||||
*
|
||||
* @param {Class} Parent The class to extend the new class from.
|
||||
* @param {...Object} mixins The objects to mix in.
|
||||
* @return {Class} A new class that extends Parent and contains the mixins.
|
||||
* @param {object} Parent The class to extend the new class from.
|
||||
* @param {Record<string, any>[]} mixins The objects to mix in.
|
||||
* @return {object} A new class that extends Parent and contains the mixins.
|
||||
*/
|
||||
export default function mixin(Parent: any, ...mixins: Object[]): any;
|
||||
export default function mixin(Parent: object, ...mixins: Record<string, any>[]): object;
|
||||
|
52
js/dist-typings/forum/compat.d.ts
vendored
52
js/dist-typings/forum/compat.d.ts
vendored
@@ -4,8 +4,8 @@ declare var _default: {
|
||||
Store: typeof import("../common/Store").default;
|
||||
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
||||
'utils/evented': {
|
||||
handlers: Object;
|
||||
getHandlers(event: string): any[];
|
||||
handlers: Record<string, unknown>;
|
||||
getHandlers(event: string): Function[];
|
||||
trigger(event: string, ...args: any[]): void;
|
||||
on(event: string, handler: Function): void;
|
||||
one(event: string, handler: Function): void;
|
||||
@@ -92,38 +92,38 @@ declare var _default: {
|
||||
'states/PaginatedListState': typeof import("../common/states/PaginatedListState").default;
|
||||
} & {
|
||||
'utils/PostControls': {
|
||||
controls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
userControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
moderationControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
destructiveControls(post: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
editAction(): Promise<any>;
|
||||
hideAction(): Promise<any>;
|
||||
restoreAction(): Promise<any>;
|
||||
deleteAction(context: any): Promise<any>;
|
||||
controls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
userControls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
moderationControls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
destructiveControls(post: import("../common/models/Post").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
editAction(): Promise<void>;
|
||||
hideAction(): Promise<void>;
|
||||
restoreAction(): Promise<void>;
|
||||
deleteAction(context: any): Promise<void>;
|
||||
};
|
||||
'utils/KeyboardNavigatable': typeof KeyboardNavigatable;
|
||||
'utils/slidable': typeof slidable;
|
||||
'utils/History': typeof History;
|
||||
'utils/DiscussionControls': {
|
||||
controls(discussion: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
userControls(discussion: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
moderationControls(discussion: any): import("../common/utils/ItemList").default<any>;
|
||||
destructiveControls(discussion: any): import("../common/utils/ItemList").default<any>;
|
||||
replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
||||
hideAction(): Promise<any>;
|
||||
restoreAction(): Promise<any>;
|
||||
deleteAction(): Promise<any>;
|
||||
renameAction(): Promise<any>;
|
||||
controls(discussion: import("../common/models/Discussion").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
userControls(discussion: import("../common/models/Discussion").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
moderationControls(discussion: import("../common/models/Discussion").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
destructiveControls(discussion: import("../common/models/Discussion").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||
hideAction(): Promise<void>;
|
||||
restoreAction(): Promise<void>;
|
||||
deleteAction(): Promise<void>;
|
||||
renameAction(): any;
|
||||
};
|
||||
'utils/alertEmailConfirmation': typeof alertEmailConfirmation;
|
||||
'utils/UserControls': {
|
||||
controls(user: any, context: any): import("../common/utils/ItemList").default<any>;
|
||||
userControls(): import("../common/utils/ItemList").default<any>;
|
||||
moderationControls(user: any): import("../common/utils/ItemList").default<any>;
|
||||
destructiveControls(user: any): import("../common/utils/ItemList").default<any>;
|
||||
deleteAction(user: any): void;
|
||||
showDeletionAlert(user: any, type: string): void;
|
||||
editAction(user: any): void;
|
||||
controls(user: import("../common/models/User").default, context: import("../common/Component").default<any, any>): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
userControls(): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
moderationControls(user: import("../common/models/User").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
destructiveControls(user: import("../common/models/User").default): import("../common/utils/ItemList").default<import("mithril").Children>;
|
||||
deleteAction(user: import("../common/models/User").default): void;
|
||||
showDeletionAlert(user: import("../common/models/User").default, type: string): void;
|
||||
editAction(user: import("../common/models/User").default): void;
|
||||
};
|
||||
'utils/Pane': typeof Pane;
|
||||
'utils/BasicEditorDriver': typeof BasicEditorDriver;
|
||||
|
@@ -24,36 +24,36 @@ export default class AvatarEditor extends Component<import("../../common/Compone
|
||||
/**
|
||||
* Get the items in the edit avatar dropdown menu.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
controlItems(): ItemList<any>;
|
||||
controlItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Enable dragover style
|
||||
*
|
||||
* @param {Event} e
|
||||
* @param {DragEvent} e
|
||||
*/
|
||||
enableDragover(e: Event): void;
|
||||
enableDragover(e: DragEvent): void;
|
||||
/**
|
||||
* Disable dragover style
|
||||
*
|
||||
* @param {Event} e
|
||||
* @param {DragEvent} e
|
||||
*/
|
||||
disableDragover(e: Event): void;
|
||||
disableDragover(e: DragEvent): void;
|
||||
/**
|
||||
* Upload avatar when file is dropped into dropzone.
|
||||
*
|
||||
* @param {Event} e
|
||||
* @param {DragEvent} e
|
||||
*/
|
||||
dropUpload(e: Event): void;
|
||||
dropUpload(e: DragEvent): void;
|
||||
/**
|
||||
* If the user doesn't have an avatar, there's no point in showing the
|
||||
* controls dropdown, because only one option would be viable: uploading.
|
||||
* Thus, when the avatar editor's dropdown toggle button is clicked, we prompt
|
||||
* the user to upload an avatar immediately.
|
||||
*
|
||||
* @param {Event} e
|
||||
* @param {MouseEvent} e
|
||||
*/
|
||||
quickUpload(e: Event): void;
|
||||
quickUpload(e: MouseEvent): void;
|
||||
/**
|
||||
* Upload avatar using file picker
|
||||
*/
|
||||
@@ -72,17 +72,17 @@ export default class AvatarEditor extends Component<import("../../common/Compone
|
||||
* After a successful upload/removal, push the updated user data into the
|
||||
* store, and force a recomputation of the user's avatar color.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @param {object} response
|
||||
* @protected
|
||||
*/
|
||||
protected success(response: Object): void;
|
||||
protected success(response: object): void;
|
||||
/**
|
||||
* If avatar upload/removal fails, stop loading.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @param {object} response
|
||||
* @protected
|
||||
*/
|
||||
protected failure(response: Object): void;
|
||||
protected failure(response: object): void;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -32,9 +32,9 @@ export default class CommentPost extends Post {
|
||||
/**
|
||||
* Build an item list for the post's header.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
headerItems(): ItemList<any>;
|
||||
headerItems(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Post from "./Post";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
16
js/dist-typings/forum/components/Composer.d.ts
vendored
16
js/dist-typings/forum/components/Composer.d.ts
vendored
@@ -21,9 +21,9 @@ export default class Composer extends Component<import("../../common/Component")
|
||||
/**
|
||||
* Resize the composer according to mouse movement.
|
||||
*
|
||||
* @param {Event} e
|
||||
* @param {MouseEvent} e
|
||||
*/
|
||||
onmousemove(e: Event): void;
|
||||
onmousemove(e: MouseEvent): void;
|
||||
/**
|
||||
* Finish resizing the composer when the mouse is released.
|
||||
*/
|
||||
@@ -83,23 +83,23 @@ export default class Composer extends Component<import("../../common/Component")
|
||||
/**
|
||||
* Build an item list for the composer's controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
controlItems(): ItemList<any>;
|
||||
controlItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Initialize default Composer height.
|
||||
*/
|
||||
initializeHeight(): void;
|
||||
/**
|
||||
* Default height of the Composer in case none is saved.
|
||||
* @returns {Integer}
|
||||
* @returns {number}
|
||||
*/
|
||||
defaultHeight(): any;
|
||||
defaultHeight(): number;
|
||||
/**
|
||||
* Save a new Composer height and update the DOM.
|
||||
* @param {Integer} height
|
||||
* @param {number} height
|
||||
*/
|
||||
changeHeight(height: any): void;
|
||||
changeHeight(height: number): void;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -27,15 +27,15 @@ export default class ComposerBody extends Component<import("../../common/Compone
|
||||
/**
|
||||
* Check if there is any unsaved data.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasChanges(): string;
|
||||
hasChanges(): boolean;
|
||||
/**
|
||||
* Build an item list for the composer's header.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
headerItems(): ItemList<any>;
|
||||
headerItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Handle the submit event of the text editor.
|
||||
*
|
||||
|
@@ -21,14 +21,14 @@ export default class DiscussionComposer extends ComposerBody {
|
||||
* Handle the title input's keydown event. When the return key is pressed,
|
||||
* move the focus to the start of the text editor.
|
||||
*
|
||||
* @param {Event} e
|
||||
* @param {KeyboardEvent} e
|
||||
*/
|
||||
onkeydown(e: Event): void;
|
||||
onkeydown(e: KeyboardEvent): void;
|
||||
/**
|
||||
* Get the data to submit to the server when the discussion is saved.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {Record<string, unknown>}
|
||||
*/
|
||||
data(): Object;
|
||||
data(): Record<string, unknown>;
|
||||
}
|
||||
import ComposerBody from "./ComposerBody";
|
||||
|
@@ -10,9 +10,9 @@ export default class DiscussionHero extends Component<import("../../common/Compo
|
||||
/**
|
||||
* Build an item list for the contents of the discussion hero.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -23,7 +23,7 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
||||
/**
|
||||
* Determine whether or not the discussion is currently being viewed.
|
||||
*
|
||||
* @return {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
active(): boolean;
|
||||
/**
|
||||
@@ -31,14 +31,14 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
||||
* should be displayed instead of information about the most recent reply to
|
||||
* the discussion.
|
||||
*
|
||||
* @return {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
showFirstPost(): boolean;
|
||||
/**
|
||||
* Determine whether or not the number of replies should be shown instead of
|
||||
* the number of unread posts.
|
||||
*
|
||||
* @return {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
showRepliesCount(): boolean;
|
||||
/**
|
||||
@@ -49,9 +49,9 @@ export default class DiscussionListItem extends Component<import("../../common/C
|
||||
* Build an item list of info for a discussion listing. By default this is
|
||||
* just the first/last post indicator.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
infoItems(): ItemList<any>;
|
||||
infoItems(): ItemList<import('mithril').Children>;
|
||||
replyCountItem(): JSX.Element;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
@@ -31,34 +31,24 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
||||
view(): JSX.Element;
|
||||
/**
|
||||
* List of components shown while the discussion is loading.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
loadingItems(): ItemList<unknown>;
|
||||
loadingItems(): ItemList<Mithril.Children>;
|
||||
/**
|
||||
* Function that renders the `sidebarItems` ItemList.
|
||||
*
|
||||
* @returns {import('mithril').Children}
|
||||
*/
|
||||
sidebar(): JSX.Element;
|
||||
sidebar(): Mithril.Children;
|
||||
/**
|
||||
* Renders the discussion's hero.
|
||||
*
|
||||
* @returns {import('mithril').Children}
|
||||
*/
|
||||
hero(): JSX.Element;
|
||||
hero(): Mithril.Children;
|
||||
/**
|
||||
* List of items rendered as the main page content.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
pageContent(): ItemList<unknown>;
|
||||
pageContent(): ItemList<Mithril.Children>;
|
||||
/**
|
||||
* List of items rendered inside the main page content container.
|
||||
*
|
||||
* @returns {ItemList}
|
||||
*/
|
||||
mainContent(): ItemList<unknown>;
|
||||
mainContent(): ItemList<Mithril.Children>;
|
||||
/**
|
||||
* Load the discussion from the API or use the preloaded one.
|
||||
*/
|
||||
@@ -66,15 +56,8 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
||||
/**
|
||||
* Get the parameters that should be passed in the API request to get the
|
||||
* discussion.
|
||||
*
|
||||
* @return {Object}
|
||||
*/
|
||||
requestParams(): {
|
||||
bySlug: boolean;
|
||||
page: {
|
||||
near: number;
|
||||
};
|
||||
};
|
||||
requestParams(): Record<string, unknown>;
|
||||
/**
|
||||
* Initialize the component to display the given discussion.
|
||||
*/
|
||||
@@ -82,7 +65,7 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
||||
/**
|
||||
* Build an item list for the contents of the sidebar.
|
||||
*/
|
||||
sidebarItems(): ItemList<Mithril.Vnode<{}, {}>>;
|
||||
sidebarItems(): ItemList<Mithril.Children>;
|
||||
/**
|
||||
* When the posts that are visible in the post stream change (i.e. the user
|
||||
* scrolls up or down), then we update the URL and mark the posts as read.
|
||||
|
@@ -17,8 +17,8 @@ export default class EditPostComposer extends ComposerBody {
|
||||
/**
|
||||
* Get the data to submit to the server when the post is saved.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {Record<string, unknown>}
|
||||
*/
|
||||
data(): Object;
|
||||
data(): Record<string, unknown>;
|
||||
}
|
||||
import ComposerBody from "./ComposerBody";
|
||||
|
14
js/dist-typings/forum/components/EventPost.d.ts
vendored
14
js/dist-typings/forum/components/EventPost.d.ts
vendored
@@ -13,27 +13,27 @@ export default class EventPost extends Post {
|
||||
/**
|
||||
* Get the name of the event icon.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
*/
|
||||
icon(): string;
|
||||
/**
|
||||
* Get the description text for the event.
|
||||
*
|
||||
* @param {Object} data
|
||||
* @return {String|Object} The description to render in the DOM
|
||||
* @param {Record<string, unknown>} data
|
||||
* @return {import('mithril').Children} The description to render in the DOM
|
||||
*/
|
||||
description(data: Object): string | Object;
|
||||
description(data: Record<string, unknown>): import('mithril').Children;
|
||||
/**
|
||||
* Get the translation key for the description of the event.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
*/
|
||||
descriptionKey(): string;
|
||||
/**
|
||||
* Get the translation data for the description of the event.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {Record<string, unknown>}
|
||||
*/
|
||||
descriptionData(): Object;
|
||||
descriptionData(): Record<string, unknown>;
|
||||
}
|
||||
import Post from "./Post";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import Stream from '../../common/utils/Stream';
|
||||
import Mithril from 'mithril';
|
||||
|
@@ -7,9 +7,9 @@ export default class HeaderPrimary extends Component<import("../../common/Compon
|
||||
/**
|
||||
* Build an item list for the controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
26
js/dist-typings/forum/components/IndexPage.d.ts
vendored
26
js/dist-typings/forum/components/IndexPage.d.ts
vendored
@@ -10,49 +10,47 @@ export default class IndexPage extends Page<import("../../common/components/Page
|
||||
/**
|
||||
* Get the component to display as the hero.
|
||||
*
|
||||
* @return {MithrilComponent}
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
hero(): any;
|
||||
hero(): import('mithril').Children;
|
||||
/**
|
||||
* Build an item list for the sidebar of the index page. By default this is a
|
||||
* "New Discussion" button, and then a DropdownSelect component containing a
|
||||
* list of navigation items.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
sidebarItems(): ItemList<any>;
|
||||
sidebarItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the navigation in the sidebar of the index page. By
|
||||
* default this is just the 'All Discussions' link.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
navItems(): ItemList<any>;
|
||||
navItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the part of the toolbar which is concerned with how
|
||||
* the results are displayed. By default this is just a select box to change
|
||||
* the way discussions are sorted.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
viewItems(): ItemList<any>;
|
||||
viewItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the part of the toolbar which is about taking action
|
||||
* on the results. By default this is just a "mark all as read" button.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
actionItems(): ItemList<any>;
|
||||
actionItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Open the composer for a new discussion or prompt the user to login.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
newDiscussionAction(): Promise<any>;
|
||||
newDiscussionAction(): Promise<void>;
|
||||
/**
|
||||
* Mark all discussions as read.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
markAllAsRead(): void;
|
||||
}
|
||||
|
@@ -6,10 +6,9 @@ export default class LogInButtons extends Component<import("../../common/Compone
|
||||
/**
|
||||
* Build a list of LogInButton components.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
public items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import Stream from '../../common/utils/Stream';
|
||||
|
@@ -13,31 +13,31 @@ export default class Notification extends Component<import("../../common/Compone
|
||||
/**
|
||||
* Get the name of the icon that should be displayed in the notification.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
* @abstract
|
||||
*/
|
||||
icon(): string;
|
||||
/**
|
||||
* Get the URL that the notification should link to.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
* @abstract
|
||||
*/
|
||||
href(): string;
|
||||
/**
|
||||
* Get the content of the notification.
|
||||
*
|
||||
* @return {VirtualElement}
|
||||
* @return {import('mithril').Children}
|
||||
* @abstract
|
||||
*/
|
||||
content(): any;
|
||||
content(): import('mithril').Children;
|
||||
/**
|
||||
* Get the excerpt of the notification.
|
||||
*
|
||||
* @return {VirtualElement}
|
||||
* @return {import('mithril').Children}
|
||||
* @abstract
|
||||
*/
|
||||
excerpt(): any;
|
||||
excerpt(): import('mithril').Children;
|
||||
/**
|
||||
* Mark the notification as read.
|
||||
*/
|
||||
|
@@ -11,47 +11,55 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
||||
/**
|
||||
* Information about the available notification methods.
|
||||
*
|
||||
* @type {Array}
|
||||
* @type {({ name: string, icon: string, label: import('mithril').Children })[]}
|
||||
*/
|
||||
methods: any[] | undefined;
|
||||
methods: {
|
||||
name: string;
|
||||
icon: string;
|
||||
label: import('mithril').Children;
|
||||
}[] | undefined;
|
||||
/**
|
||||
* A map of which notification checkboxes are loading.
|
||||
*
|
||||
* @type {Object}
|
||||
* @type {Record<string, boolean>}
|
||||
*/
|
||||
loading: Object | undefined;
|
||||
loading: Record<string, boolean> | undefined;
|
||||
/**
|
||||
* Information about the available notification types.
|
||||
*
|
||||
* @type {Array}
|
||||
* @type {({ name: string, icon: string, label: import('mithril').Children })[]}
|
||||
*/
|
||||
types: any[] | undefined;
|
||||
types: {
|
||||
name: string;
|
||||
icon: string;
|
||||
label: import('mithril').Children;
|
||||
}[] | undefined;
|
||||
/**
|
||||
* Toggle the state of the given preferences, based on the value of the first
|
||||
* one.
|
||||
*
|
||||
* @param {Array} keys
|
||||
* @param {string[]} keys
|
||||
*/
|
||||
toggle(keys: any[]): void;
|
||||
toggle(keys: string[]): void;
|
||||
/**
|
||||
* Toggle all notification types for the given method.
|
||||
*
|
||||
* @param {String} method
|
||||
* @param {string} method
|
||||
*/
|
||||
toggleMethod(method: string): void;
|
||||
/**
|
||||
* Toggle all notification methods for the given type.
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {string} type
|
||||
*/
|
||||
toggleType(type: string): void;
|
||||
/**
|
||||
* Get the name of the preference key for the given notification type-method
|
||||
* combination.
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {String} method
|
||||
* @return {String}
|
||||
* @param {string} type
|
||||
* @param {string} method
|
||||
* @return {string}
|
||||
*/
|
||||
preferenceKey(type: string, method: string): string;
|
||||
/**
|
||||
@@ -63,9 +71,13 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
||||
* - `icon` The icon to display in the column header.
|
||||
* - `label` The label to display in the column header.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}
|
||||
*/
|
||||
notificationMethods(): ItemList<any>;
|
||||
notificationMethods(): ItemList<{
|
||||
name: string;
|
||||
icon: string;
|
||||
label: import('mithril').Children;
|
||||
}>;
|
||||
/**
|
||||
* Build an item list for the notification types to display in the grid.
|
||||
*
|
||||
@@ -75,9 +87,14 @@ export default class NotificationGrid extends Component<import("../../common/Com
|
||||
* - `icon` The icon to display in the notification grid row.
|
||||
* - `label` The label to display in the notification grid row.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}
|
||||
*/
|
||||
notificationTypes(): ItemList<any>;
|
||||
notificationTypes(): ItemList<{
|
||||
name: string;
|
||||
icon: string;
|
||||
label: import('mithril').Children;
|
||||
}>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
import icon from "../../common/helpers/icon";
|
||||
|
20
js/dist-typings/forum/components/Post.d.ts
vendored
20
js/dist-typings/forum/components/Post.d.ts
vendored
@@ -25,34 +25,34 @@ export default class Post extends Component<import("../../common/Component").Com
|
||||
/**
|
||||
* Get attributes for the post element.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {Record<string, unknown>}
|
||||
*/
|
||||
elementAttrs(): Object;
|
||||
elementAttrs(): Record<string, unknown>;
|
||||
/**
|
||||
* Get the post's content.
|
||||
*
|
||||
* @return {Array}
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
content(): any[];
|
||||
content(): import('mithril').Children;
|
||||
/**
|
||||
* Get the post's classes.
|
||||
*
|
||||
* @param existing string
|
||||
* @param {string} existing
|
||||
* @returns {string[]}
|
||||
*/
|
||||
classes(existing: any): string[];
|
||||
classes(existing: string): string[];
|
||||
/**
|
||||
* Build an item list for the post's actions.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
actionItems(): ItemList<any>;
|
||||
actionItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the post's footer.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
footerItems(): ItemList<any>;
|
||||
footerItems(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import SubtreeRetainer from "../../common/utils/SubtreeRetainer";
|
||||
|
@@ -12,9 +12,9 @@ export default class PostMeta extends Component<import("../../common/Component")
|
||||
/**
|
||||
* Get the permalink for the given post.
|
||||
*
|
||||
* @param {Post} post
|
||||
* @returns {String}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @returns {string}
|
||||
*/
|
||||
getPermalink(post: any): string;
|
||||
getPermalink(post: import('../../common/models/Post').default): string;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
|
46
js/dist-typings/forum/components/PostStream.d.ts
vendored
46
js/dist-typings/forum/components/PostStream.d.ts
vendored
@@ -20,17 +20,17 @@ export default class PostStream extends Component<import("../../common/Component
|
||||
triggerScroll(): void;
|
||||
/**
|
||||
*
|
||||
* @param {Integer} top
|
||||
* @param {number} top
|
||||
*/
|
||||
onscroll(top?: any): void;
|
||||
onscroll(top?: number): void;
|
||||
calculatePositionTimeout: NodeJS.Timeout | undefined;
|
||||
/**
|
||||
* Check if either extreme of the post stream is in the viewport,
|
||||
* and if so, trigger loading the next/previous page.
|
||||
*
|
||||
* @param {Integer} top
|
||||
* @param {number} top
|
||||
*/
|
||||
loadPostsIfNeeded(top?: any): void;
|
||||
loadPostsIfNeeded(top?: number): void;
|
||||
updateScrubber(top?: number): void;
|
||||
/**
|
||||
* Work out which posts (by number) are currently visible in the viewport, and
|
||||
@@ -41,43 +41,43 @@ export default class PostStream extends Component<import("../../common/Component
|
||||
* Get the distance from the top of the viewport to the point at which we
|
||||
* would consider a post to be the first one visible.
|
||||
*
|
||||
* @return {Integer}
|
||||
* @return {number}
|
||||
*/
|
||||
getMarginTop(): any;
|
||||
getMarginTop(): number;
|
||||
/**
|
||||
* Scroll down to a certain post by number and 'flash' it.
|
||||
*
|
||||
* @param {Integer} number
|
||||
* @param {Boolean} animate
|
||||
* @return {jQuery.Deferred}
|
||||
* @param {number} number
|
||||
* @param {boolean} animate
|
||||
* @return {JQueryDeferred}
|
||||
*/
|
||||
scrollToNumber(number: any, animate: boolean): any;
|
||||
scrollToNumber(number: number, animate: boolean): JQueryDeferred<any>;
|
||||
/**
|
||||
* Scroll down to a certain post by index.
|
||||
*
|
||||
* @param {Integer} index
|
||||
* @param {Boolean} animate
|
||||
* @param {Boolean} reply Whether or not to scroll to the reply placeholder.
|
||||
* @return {jQuery.Deferred}
|
||||
* @param {number} index
|
||||
* @param {boolean} animate
|
||||
* @param {boolean} reply Whether or not to scroll to the reply placeholder.
|
||||
* @return {JQueryDeferred}
|
||||
*/
|
||||
scrollToIndex(index: any, animate: boolean, reply: boolean): any;
|
||||
scrollToIndex(index: number, animate: boolean, reply: boolean): JQueryDeferred<any>;
|
||||
/**
|
||||
* Scroll down to the given post.
|
||||
*
|
||||
* @param {jQuery} $item
|
||||
* @param {Boolean} animate
|
||||
* @param {Boolean} force Whether or not to force scrolling to the item, even
|
||||
* @param {JQuery} $item
|
||||
* @param {boolean} animate
|
||||
* @param {boolean} force Whether or not to force scrolling to the item, even
|
||||
* if it is already in the viewport.
|
||||
* @param {Boolean} reply Whether or not to scroll to the reply placeholder.
|
||||
* @return {jQuery.Deferred}
|
||||
* @param {boolean} reply Whether or not to scroll to the reply placeholder.
|
||||
* @return {JQueryDeferred}
|
||||
*/
|
||||
scrollToItem($item: JQueryStatic, animate: boolean, force: boolean, reply: boolean): any;
|
||||
scrollToItem($item: JQuery, animate: boolean, force: boolean, reply: boolean): JQueryDeferred<any>;
|
||||
/**
|
||||
* 'Flash' the given post, drawing the user's attention to it.
|
||||
*
|
||||
* @param {jQuery} $item
|
||||
* @param {JQuery} $item
|
||||
*/
|
||||
flashItem($item: JQueryStatic): void;
|
||||
flashItem($item: JQuery): void;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ScrollListener from "../../common/utils/ScrollListener";
|
||||
|
@@ -19,9 +19,13 @@ export default class PostStreamScrubber extends Component<import("../../common/C
|
||||
* Update the scrollbar's position to reflect the current values of the
|
||||
* index/visible properties.
|
||||
*
|
||||
* @param {Boolean} animate
|
||||
* @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options
|
||||
*/
|
||||
updateScrubberValues(options?: {}): void;
|
||||
updateScrubberValues(options?: Partial<{
|
||||
fromScroll: boolean;
|
||||
forceHeightChange: boolean;
|
||||
animate: boolean;
|
||||
}>): void;
|
||||
adjustingHeight: boolean | undefined;
|
||||
/**
|
||||
* Go to the first post in the discussion.
|
||||
@@ -40,13 +44,16 @@ export default class PostStreamScrubber extends Component<import("../../common/C
|
||||
* Get the percentage of the height of the scrubber that should be allocated
|
||||
* to each post.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {{ index: number, visible: number }}
|
||||
* @property {Number} index The percent per post for posts on either side of
|
||||
* the visible part of the scrubber.
|
||||
* @property {Number} visible The percent per post for the visible part of the
|
||||
* scrubber.
|
||||
*/
|
||||
percentPerPost(): Object;
|
||||
percentPerPost(): {
|
||||
index: number;
|
||||
visible: number;
|
||||
};
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ScrollListener from "../../common/utils/ScrollListener";
|
||||
|
@@ -20,39 +20,35 @@ export default class PostsUserPage extends UserPage {
|
||||
*
|
||||
* @type {Post[]}
|
||||
*/
|
||||
posts: any[] | undefined;
|
||||
posts: Post[] | undefined;
|
||||
/**
|
||||
* The number of activity items to load per request.
|
||||
*
|
||||
* @type {Integer}
|
||||
* @type {number}
|
||||
*/
|
||||
loadLimit: any;
|
||||
loadLimit: number | undefined;
|
||||
/**
|
||||
* Clear and reload the user's activity feed.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public refresh(): void;
|
||||
refresh(): void;
|
||||
/**
|
||||
* Load a new page of the user's activity feed.
|
||||
*
|
||||
* @param {Integer} [offset] The position to start getting results from.
|
||||
* @return {Promise}
|
||||
* @param {number} [offset] The position to start getting results from.
|
||||
* @return {Promise<import('../../common/models/Post').default[]>}
|
||||
* @protected
|
||||
*/
|
||||
protected loadResults(offset?: any): Promise<any>;
|
||||
protected loadResults(offset?: number | undefined): Promise<import('../../common/models/Post').default[]>;
|
||||
/**
|
||||
* Load the next page of results.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public loadMore(): void;
|
||||
loadMore(): void;
|
||||
/**
|
||||
* Parse results and append them to the activity feed.
|
||||
*
|
||||
* @param {Post[]} results
|
||||
* @return {Post[]}
|
||||
* @param {import('../../common/models/Post').default[]} results
|
||||
* @return {import('../../common/models/Post').default[]}
|
||||
*/
|
||||
parseResults(results: any[]): any[];
|
||||
parseResults(results: import('../../common/models/Post').default[]): import('../../common/models/Post').default[];
|
||||
}
|
||||
import UserPage from "./UserPage";
|
||||
|
@@ -16,8 +16,8 @@ export default class ReplyComposer extends ComposerBody {
|
||||
/**
|
||||
* Get the data to submit to the server when the reply is saved.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {Record<string, unknown>}
|
||||
*/
|
||||
data(): Object;
|
||||
data(): Record<string, unknown>;
|
||||
}
|
||||
import ComposerBody from "./ComposerBody";
|
||||
|
3
js/dist-typings/forum/components/Search.d.ts
vendored
3
js/dist-typings/forum/components/Search.d.ts
vendored
@@ -65,7 +65,7 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
||||
/**
|
||||
* An array of SearchSources.
|
||||
*/
|
||||
protected sources: SearchSource[];
|
||||
protected sources?: SearchSource[];
|
||||
/**
|
||||
* The number of sources that are still loading results.
|
||||
*/
|
||||
@@ -104,6 +104,7 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
||||
selectableItems(): JQuery;
|
||||
/**
|
||||
* Get the position of the currently selected search result item.
|
||||
* Returns zero if not found.
|
||||
*/
|
||||
getCurrentNumericIndex(): number;
|
||||
/**
|
||||
|
@@ -6,9 +6,9 @@ export default class SessionDropdown extends Dropdown {
|
||||
/**
|
||||
* Build an item list for the contents of the dropdown menu.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
items(): ItemList<any>;
|
||||
items(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Dropdown from "../../common/components/Dropdown";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -6,27 +6,27 @@ export default class SettingsPage extends UserPage {
|
||||
/**
|
||||
* Build an item list for the user's settings controls.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
settingsItems(): ItemList<any>;
|
||||
settingsItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the user's account settings.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
accountItems(): ItemList<any>;
|
||||
accountItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the user's notification settings.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
notificationsItems(): ItemList<any>;
|
||||
notificationsItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the user's privacy settings.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
privacyItems(): ItemList<any>;
|
||||
privacyItems(): ItemList<import('mithril').Children>;
|
||||
discloseOnlineLoading: boolean | undefined;
|
||||
}
|
||||
import UserPage from "./UserPage";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import Stream from '../../common/utils/Stream';
|
||||
@@ -42,8 +42,6 @@ export default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignup
|
||||
/**
|
||||
* Open the log in modal, prefilling it with an email/username/password if
|
||||
* the user has entered one.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
logIn(): void;
|
||||
onready(): void;
|
||||
|
@@ -15,9 +15,9 @@ export default class UserCard extends Component<import("../../common/Component")
|
||||
/**
|
||||
* Build an item list of tidbits of info to show on this user's profile.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
infoItems(): ItemList<any>;
|
||||
infoItems(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Component from "../../common/Component";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
18
js/dist-typings/forum/components/UserPage.d.ts
vendored
18
js/dist-typings/forum/components/UserPage.d.ts
vendored
@@ -16,36 +16,36 @@ export default class UserPage extends Page<import("../../common/components/Page"
|
||||
/**
|
||||
* Get the content to display in the user page.
|
||||
*
|
||||
* @return {VirtualElement}
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
content(): any;
|
||||
content(): import('mithril').Children;
|
||||
/**
|
||||
* Initialize the component with a user, and trigger the loading of their
|
||||
* activity feed.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @protected
|
||||
*/
|
||||
protected show(user: any): void;
|
||||
protected show(user: import('../../common/models/User').default): void;
|
||||
/**
|
||||
* Given a username, load the user's profile from the store, or make a request
|
||||
* if we don't have it yet. Then initialize the profile page with that user.
|
||||
*
|
||||
* @param {String} username
|
||||
* @param {string} username
|
||||
*/
|
||||
loadUser(username: string): void;
|
||||
/**
|
||||
* Build an item list for the content of the sidebar.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
sidebarItems(): ItemList<any>;
|
||||
sidebarItems(): ItemList<import('mithril').Children>;
|
||||
/**
|
||||
* Build an item list for the navigation in the sidebar.
|
||||
*
|
||||
* @return {ItemList}
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
navItems(): ItemList<any>;
|
||||
navItems(): ItemList<import('mithril').Children>;
|
||||
}
|
||||
import Page from "../../common/components/Page";
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
2
js/dist-typings/forum/routes.d.ts
vendored
2
js/dist-typings/forum/routes.d.ts
vendored
@@ -10,7 +10,7 @@ export declare function makeRouteHelpers(app: ForumApplication): {
|
||||
/**
|
||||
* Generate a URL to a discussion.
|
||||
*/
|
||||
discussion: (discussion: Discussion, near: number) => string;
|
||||
discussion: (discussion: Discussion, near?: number | undefined) => string;
|
||||
/**
|
||||
* Generate a URL to a post.
|
||||
*/
|
||||
|
71
js/dist-typings/forum/states/ComposerState.d.ts
vendored
71
js/dist-typings/forum/states/ComposerState.d.ts
vendored
@@ -15,9 +15,9 @@ declare class ComposerState {
|
||||
* The composer's intended height, which can be modified by the user
|
||||
* (by dragging the composer handle).
|
||||
*
|
||||
* @type {Integer}
|
||||
* @type {number}
|
||||
*/
|
||||
height: any;
|
||||
height: number;
|
||||
/**
|
||||
* The dynamic component being shown inside the composer.
|
||||
*
|
||||
@@ -33,16 +33,15 @@ declare class ComposerState {
|
||||
/**
|
||||
* Load a content component into the composer.
|
||||
*
|
||||
* @param {ComposerBody} componentClass
|
||||
* @public
|
||||
* @param {typeof import('../components/ComposerBody').default} componentClass
|
||||
*/
|
||||
public load(componentClass: any, attrs: any): void;
|
||||
load(componentClass: typeof import('../components/ComposerBody').default, attrs: any): void;
|
||||
/**
|
||||
* Clear the composer's content component.
|
||||
*/
|
||||
clear(): void;
|
||||
onExit: {
|
||||
callback: Function;
|
||||
callback: () => boolean;
|
||||
message: string;
|
||||
} | null | undefined;
|
||||
fields: {
|
||||
@@ -50,47 +49,34 @@ declare class ComposerState {
|
||||
} | undefined;
|
||||
/**
|
||||
* Show the composer.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public show(): void;
|
||||
show(): void;
|
||||
/**
|
||||
* Close the composer.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public hide(): void;
|
||||
hide(): void;
|
||||
/**
|
||||
* Confirm with the user so they don't lose their content, then close the
|
||||
* composer.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public close(): void;
|
||||
close(): void;
|
||||
/**
|
||||
* Minimize the composer. Has no effect if the composer is hidden.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public minimize(): void;
|
||||
minimize(): void;
|
||||
/**
|
||||
* Take the composer into fullscreen mode. Has no effect if the composer is
|
||||
* hidden.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public fullScreen(): void;
|
||||
fullScreen(): void;
|
||||
/**
|
||||
* Exit fullscreen mode.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public exitFullScreen(): void;
|
||||
exitFullScreen(): void;
|
||||
/**
|
||||
* Determine whether the body matches the given component class and data.
|
||||
*
|
||||
* @param {object} type The component class to check against. Subclasses are
|
||||
* accepted as well.
|
||||
* @param {object} type The component class to check against. Subclasses are accepted as well.
|
||||
* @param {object} data
|
||||
* @return {boolean}
|
||||
*/
|
||||
@@ -110,23 +96,22 @@ declare class ComposerState {
|
||||
* This will be true if the Composer is in full-screen mode on desktop,
|
||||
* or if we are on a mobile device, where we always consider the composer as full-screen..
|
||||
*
|
||||
* @return {Boolean}
|
||||
* @public
|
||||
* @return {boolean}
|
||||
*/
|
||||
public isFullScreen(): boolean;
|
||||
isFullScreen(): boolean;
|
||||
/**
|
||||
* Check whether or not the user is currently composing a reply to a
|
||||
* discussion.
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @return {Boolean}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @return {boolean}
|
||||
*/
|
||||
composingReplyTo(discussion: any): boolean;
|
||||
composingReplyTo(discussion: import('../../common/models/Discussion').default): boolean;
|
||||
/**
|
||||
* Confirm with the user that they want to close the composer and lose their
|
||||
* content.
|
||||
*
|
||||
* @return {Boolean} Whether or not the exit was cancelled.
|
||||
* @return {boolean} Whether or not the exit was cancelled.
|
||||
*/
|
||||
preventExit(): boolean;
|
||||
/**
|
||||
@@ -136,27 +121,27 @@ declare class ComposerState {
|
||||
* confirmation is necessary. If the callback returns true at the time of
|
||||
* closing, the provided text will be shown in a standard confirmation dialog.
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @param {String} message
|
||||
* @param {() => boolean} callback
|
||||
* @param {string} message
|
||||
*/
|
||||
preventClosingWhen(callback: Function, message: string): void;
|
||||
preventClosingWhen(callback: () => boolean, message: string): void;
|
||||
/**
|
||||
* Minimum height of the Composer.
|
||||
* @returns {Integer}
|
||||
* @returns {number}
|
||||
*/
|
||||
minimumHeight(): any;
|
||||
minimumHeight(): number;
|
||||
/**
|
||||
* Maxmimum height of the Composer.
|
||||
* @returns {Integer}
|
||||
* @returns {number}
|
||||
*/
|
||||
maximumHeight(): any;
|
||||
maximumHeight(): number;
|
||||
/**
|
||||
* Computed the composer's current height, based on the intended height, and
|
||||
* the composer's current state. This will be applied to the composer's
|
||||
* the composer's current state. This will be applied to the composer
|
||||
* content's DOM element.
|
||||
* @returns {Integer|String}
|
||||
* @returns {number | string}
|
||||
*/
|
||||
computedHeight(): any | string;
|
||||
computedHeight(): number | string;
|
||||
}
|
||||
declare namespace ComposerState {
|
||||
namespace Position {
|
||||
|
@@ -6,7 +6,7 @@ declare class PostStreamState {
|
||||
*
|
||||
* @type {Discussion}
|
||||
*/
|
||||
discussion: any;
|
||||
discussion: Discussion;
|
||||
/**
|
||||
* Whether or not the infinite-scrolling auto-load functionality is
|
||||
* disabled.
|
||||
@@ -46,33 +46,30 @@ declare class PostStreamState {
|
||||
/**
|
||||
* Update the stream so that it loads and includes the latest posts in the
|
||||
* discussion, if the end is being viewed.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public update(): Promise<any>;
|
||||
update(): Promise<void>;
|
||||
visibleEnd: any;
|
||||
/**
|
||||
* Load and scroll up to the first post in the discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
goToFirst(): Promise<any>;
|
||||
goToFirst(): Promise<void>;
|
||||
/**
|
||||
* Load and scroll down to the last post in the discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
goToLast(): Promise<any>;
|
||||
goToLast(): Promise<void>;
|
||||
/**
|
||||
* Load and scroll to a post with a certain number.
|
||||
*
|
||||
* @param {number|String} number The post number to go to. If 'reply', go to
|
||||
* the last post and scroll the reply preview into view.
|
||||
* @param {Boolean} noAnimation
|
||||
* @return {Promise}
|
||||
* @param {number | string} number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.
|
||||
* @param {boolean} [noAnimation]
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
goToNumber(number: number | string, noAnimation?: boolean): Promise<any>;
|
||||
loadPromise: Promise<any> | undefined;
|
||||
goToNumber(number: number | string, noAnimation?: boolean | undefined): Promise<void>;
|
||||
loadPromise: Promise<void> | undefined;
|
||||
needsScroll: boolean | undefined;
|
||||
targetPost: {
|
||||
number: string | number;
|
||||
@@ -86,28 +83,28 @@ declare class PostStreamState {
|
||||
* Load and scroll to a certain index within the discussion.
|
||||
*
|
||||
* @param {number} index
|
||||
* @param {Boolean} noAnimation
|
||||
* @return {Promise}
|
||||
* @param {boolean} [noAnimation]
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
goToIndex(index: number, noAnimation?: boolean): Promise<any>;
|
||||
goToIndex(index: number, noAnimation?: boolean | undefined): Promise<void>;
|
||||
/**
|
||||
* Clear the stream and load posts near a certain number. Returns a promise.
|
||||
* If the post with the given number is already loaded, the promise will be
|
||||
* resolved immediately.
|
||||
*
|
||||
* @param {number} number
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
loadNearNumber(number: number): Promise<any>;
|
||||
loadNearNumber(number: number): Promise<void>;
|
||||
/**
|
||||
* Clear the stream and load posts near a certain index. A page of posts
|
||||
* surrounding the given index will be loaded. Returns a promise. If the given
|
||||
* index is already loaded, the promise will be resolved immediately.
|
||||
*
|
||||
* @param {number} index
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
loadNearIndex(index: number): Promise<any>;
|
||||
loadNearIndex(index: number): Promise<void>;
|
||||
/**
|
||||
* Load the next page of posts.
|
||||
*/
|
||||
@@ -122,7 +119,7 @@ declare class PostStreamState {
|
||||
*
|
||||
* @param {number} start
|
||||
* @param {number} end
|
||||
* @param {Boolean} backwards
|
||||
* @param {boolean} backwards
|
||||
*/
|
||||
loadPage(start: number, end: number, backwards?: boolean): void;
|
||||
/**
|
||||
@@ -131,15 +128,15 @@ declare class PostStreamState {
|
||||
*
|
||||
* @param {number} start
|
||||
* @param {number} end
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
loadRange(start: number, end: number): Promise<any>;
|
||||
loadRange(start: number, end: number): Promise<void>;
|
||||
/**
|
||||
* Set up the stream with the given array of posts.
|
||||
*
|
||||
* @param {Post[]} posts
|
||||
* @param {import('../../common/models/Post').default[]} posts
|
||||
*/
|
||||
show(posts: any[]): void;
|
||||
show(posts: import('../../common/models/Post').default[]): void;
|
||||
/**
|
||||
* Reset the stream so that a specific range of posts is displayed. If a range
|
||||
* is not specified, the first page of posts will be displayed.
|
||||
@@ -153,7 +150,7 @@ declare class PostStreamState {
|
||||
*
|
||||
* @return {Post[]}
|
||||
*/
|
||||
posts(): any[];
|
||||
posts(): Post[];
|
||||
/**
|
||||
* Get the total number of posts in the discussion.
|
||||
*
|
||||
@@ -164,7 +161,7 @@ declare class PostStreamState {
|
||||
* Check whether or not the scrubber should be disabled, i.e. if all of the
|
||||
* posts are visible in the viewport.
|
||||
*
|
||||
* @return {Boolean}
|
||||
* @return {boolean}
|
||||
*/
|
||||
disabled(): boolean;
|
||||
/**
|
||||
|
136
js/dist-typings/forum/utils/DiscussionControls.d.ts
vendored
136
js/dist-typings/forum/utils/DiscussionControls.d.ts
vendored
@@ -2,159 +2,151 @@ declare namespace _default {
|
||||
/**
|
||||
* Get a list of controls for a discussion.
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
function controls(discussion: any, context: any): ItemList<any>;
|
||||
function controls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get a list of controls for a discussion.
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
function controls(discussion: any, context: any): ItemList<any>;
|
||||
function controls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
||||
* follow).
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(discussion: any, context: any): ItemList<any>;
|
||||
function userControls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to the current user (e.g. reply,
|
||||
* follow).
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(discussion: any, context: any): ItemList<any>;
|
||||
function userControls(discussion: import("../../common/models/Discussion").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(discussion: any): ItemList<any>;
|
||||
function moderationControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion pertaining to moderation (e.g. rename, lock).
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(discussion: any): ItemList<any>;
|
||||
function moderationControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion which are destructive (e.g. delete).
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(discussion: any): ItemList<any>;
|
||||
function destructiveControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a discussion which are destructive (e.g. delete).
|
||||
*
|
||||
* @param {Discussion} discussion
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Discussion').default} discussion
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(discussion: any): ItemList<any>;
|
||||
function destructiveControls(discussion: import("../../common/models/Discussion").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Open the reply composer for the discussion. A promise will be returned,
|
||||
* which resolves when the composer opens successfully. If the user is not
|
||||
* logged in, they will be prompted. If they don't have permission to
|
||||
* reply, the promise will be rejected.
|
||||
*
|
||||
* @param {Boolean} goToLast Whether or not to scroll down to the last post if
|
||||
* the discussion is being viewed.
|
||||
* @param {Boolean} forceRefresh Whether or not to force a reload of the
|
||||
* composer component, even if it is already open for this discussion.
|
||||
* @return {Promise}
|
||||
* @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.
|
||||
* @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||
/**
|
||||
* Open the reply composer for the discussion. A promise will be returned,
|
||||
* which resolves when the composer opens successfully. If the user is not
|
||||
* logged in, they will be prompted. If they don't have permission to
|
||||
* reply, the promise will be rejected.
|
||||
*
|
||||
* @param {Boolean} goToLast Whether or not to scroll down to the last post if
|
||||
* the discussion is being viewed.
|
||||
* @param {Boolean} forceRefresh Whether or not to force a reload of the
|
||||
* composer component, even if it is already open for this discussion.
|
||||
* @return {Promise}
|
||||
* @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.
|
||||
* @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.
|
||||
*
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<any>;
|
||||
function replyAction(goToLast: boolean, forceRefresh: boolean): Promise<void>;
|
||||
/**
|
||||
* Hide a discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<any>;
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Hide a discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<any>;
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<any>;
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<any>;
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Delete the discussion after confirming with the user.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(): Promise<any>;
|
||||
function deleteAction(): Promise<void>;
|
||||
/**
|
||||
* Delete the discussion after confirming with the user.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(): Promise<any>;
|
||||
function deleteAction(): Promise<void>;
|
||||
/**
|
||||
* Rename the discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
*/
|
||||
function renameAction(): Promise<any>;
|
||||
function renameAction(): any;
|
||||
/**
|
||||
* Rename the discussion.
|
||||
*
|
||||
* @return {Promise}
|
||||
*/
|
||||
function renameAction(): Promise<any>;
|
||||
function renameAction(): any;
|
||||
}
|
||||
export default _default;
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
24
js/dist-typings/forum/utils/Pane.d.ts
vendored
24
js/dist-typings/forum/utils/Pane.d.ts
vendored
@@ -44,42 +44,30 @@ export default class Pane {
|
||||
protected showing: boolean;
|
||||
/**
|
||||
* Enable the pane.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public enable(): void;
|
||||
enable(): void;
|
||||
/**
|
||||
* Disable the pane.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public disable(): void;
|
||||
disable(): void;
|
||||
/**
|
||||
* Show the pane.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public show(): void;
|
||||
show(): void;
|
||||
/**
|
||||
* Hide the pane.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public hide(): void;
|
||||
hide(): void;
|
||||
/**
|
||||
* Begin a timeout to hide the pane, which can be cancelled by showing the
|
||||
* pane.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public onmouseleave(): void;
|
||||
onmouseleave(): void;
|
||||
hideTimeout: NodeJS.Timeout | undefined;
|
||||
/**
|
||||
* Toggle whether or not the pane is pinned.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
public togglePinned(): void;
|
||||
togglePinned(): void;
|
||||
/**
|
||||
* Apply the appropriate CSS classes to the page element.
|
||||
*
|
||||
|
114
js/dist-typings/forum/utils/PostControls.d.ts
vendored
114
js/dist-typings/forum/utils/PostControls.d.ts
vendored
@@ -2,131 +2,129 @@ declare namespace _default {
|
||||
/**
|
||||
* Get a list of controls for a post.
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
*/
|
||||
function controls(post: any, context: any): ItemList<any>;
|
||||
function controls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get a list of controls for a post.
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
*/
|
||||
function controls(post: any, context: any): ItemList<any>;
|
||||
function controls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a post pertaining to the current user (e.g. report).
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(post: any, context: any): ItemList<any>;
|
||||
function userControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a post pertaining to the current user (e.g. report).
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(post: any, context: any): ItemList<any>;
|
||||
function userControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a post pertaining to moderation (e.g. edit).
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(post: any, context: any): ItemList<any>;
|
||||
function moderationControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a post pertaining to moderation (e.g. edit).
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(post: any, context: any): ItemList<any>;
|
||||
function moderationControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a post that are destructive (e.g. delete).
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(post: any, context: any): ItemList<any>;
|
||||
function destructiveControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a post that are destructive (e.g. delete).
|
||||
*
|
||||
* @param {Post} post
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/Post').default} post
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}')}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(post: any, context: any): ItemList<any>;
|
||||
function destructiveControls(post: import("../../common/models/Post").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Open the composer to edit a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function editAction(): Promise<any>;
|
||||
function editAction(): Promise<void>;
|
||||
/**
|
||||
* Open the composer to edit a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function editAction(): Promise<any>;
|
||||
function editAction(): Promise<void>;
|
||||
/**
|
||||
* Hide a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<any>;
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Hide a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function hideAction(): Promise<any>;
|
||||
function hideAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<any>;
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Restore a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function restoreAction(): Promise<any>;
|
||||
function restoreAction(): Promise<void>;
|
||||
/**
|
||||
* Delete a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(context: any): Promise<any>;
|
||||
function deleteAction(context: any): Promise<void>;
|
||||
/**
|
||||
* Delete a post.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function deleteAction(context: any): Promise<any>;
|
||||
function deleteAction(context: any): Promise<void>;
|
||||
}
|
||||
export default _default;
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
106
js/dist-typings/forum/utils/UserControls.d.ts
vendored
106
js/dist-typings/forum/utils/UserControls.d.ts
vendored
@@ -2,121 +2,119 @@ declare namespace _default {
|
||||
/**
|
||||
* Get a list of controls for a user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
function controls(user: any, context: any): ItemList<any>;
|
||||
function controls(user: import("../../common/models/User").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get a list of controls for a user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @public
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
*/
|
||||
function controls(user: any, context: any): ItemList<any>;
|
||||
function controls(user: import("../../common/models/User").default, context: import("../../common/Component").default<any, any>): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(): ItemList<any>;
|
||||
function userControls(): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user pertaining to the current user (e.g. poke, follow).
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function userControls(): ItemList<any>;
|
||||
function userControls(): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(user: any): ItemList<any>;
|
||||
function moderationControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user pertaining to moderation (e.g. suspend, edit).
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function moderationControls(user: any): ItemList<any>;
|
||||
function moderationControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user which are destructive (e.g. delete).
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(user: any): ItemList<any>;
|
||||
function destructiveControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Get controls for a user which are destructive (e.g. delete).
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {*} context The parent component under which the controls menu will
|
||||
* be displayed.
|
||||
* @return {ItemList}
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.
|
||||
*
|
||||
* @return {ItemList<import('mithril').Children>}
|
||||
* @protected
|
||||
*/
|
||||
function destructiveControls(user: any): ItemList<any>;
|
||||
function destructiveControls(user: import("../../common/models/User").default): ItemList<import("mithril").Children>;
|
||||
/**
|
||||
* Delete the user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function deleteAction(user: any): void;
|
||||
function deleteAction(user: import("../../common/models/User").default): void;
|
||||
/**
|
||||
* Delete the user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function deleteAction(user: any): void;
|
||||
function deleteAction(user: import("../../common/models/User").default): void;
|
||||
/**
|
||||
* Show deletion alert of user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {string} type
|
||||
*/
|
||||
function showDeletionAlert(user: any, type: string): void;
|
||||
function showDeletionAlert(user: import("../../common/models/User").default, type: string): void;
|
||||
/**
|
||||
* Show deletion alert of user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
* @param {string} type
|
||||
*/
|
||||
function showDeletionAlert(user: any, type: string): void;
|
||||
function showDeletionAlert(user: import("../../common/models/User").default, type: string): void;
|
||||
/**
|
||||
* Edit the user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function editAction(user: any): void;
|
||||
function editAction(user: import("../../common/models/User").default): void;
|
||||
/**
|
||||
* Edit the user.
|
||||
*
|
||||
* @param {User} user
|
||||
* @param {import('../../common/models/User').default} user
|
||||
*/
|
||||
function editAction(user: any): void;
|
||||
function editAction(user: import("../../common/models/User").default): void;
|
||||
}
|
||||
export default _default;
|
||||
import ItemList from "../../common/utils/ItemList";
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Shows an alert if the user has not yet confirmed their email address.
|
||||
*
|
||||
* @param {ForumApplication} app
|
||||
* @param {import('../ForumApplication').default} app
|
||||
*/
|
||||
export default function alertEmailConfirmation(app: any): void;
|
||||
export default function alertEmailConfirmation(app: import('../ForumApplication').default): void;
|
||||
|
15
js/dist-typings/forum/utils/slidable.d.ts
vendored
15
js/dist-typings/forum/utils/slidable.d.ts
vendored
@@ -4,11 +4,14 @@
|
||||
* controls.
|
||||
*
|
||||
* It relies on the element having children with particular CSS classes.
|
||||
* TODO: document
|
||||
*
|
||||
* @param {DOMElement} element
|
||||
* @return {Object}
|
||||
* @property {function} reset Revert the slider to its original position. This
|
||||
* should be called, for example, when a controls dropdown is closed.
|
||||
* The function returns a record with a `reset` proeprty. This is a function
|
||||
* which reverts the slider to its original position. This should be called,
|
||||
* for example, when a controls dropdown is closed.
|
||||
*
|
||||
* @param {HTMLElement | SVGElement | Element} element
|
||||
* @return {{ reset : () => void }}
|
||||
*/
|
||||
export default function slidable(element: any): Object;
|
||||
export default function slidable(element: HTMLElement | SVGElement | Element): {
|
||||
reset: () => void;
|
||||
};
|
||||
|
2
js/dist/admin.js
generated
vendored
2
js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/admin.js.LICENSE.txt
generated
vendored
2
js/dist/admin.js.LICENSE.txt
generated
vendored
@@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
* focus-trap 6.7.1
|
||||
* focus-trap 6.7.2
|
||||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
|
2
js/dist/admin.js.map
generated
vendored
2
js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js
generated
vendored
2
js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js.LICENSE.txt
generated
vendored
2
js/dist/forum.js.LICENSE.txt
generated
vendored
@@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
* focus-trap 6.7.1
|
||||
* focus-trap 6.7.2
|
||||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
|
2
js/dist/forum.js.map
generated
vendored
2
js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
export * from './src/common';
|
||||
export * from './src/forum';
|
||||
export * from './src/forum';
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user