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

Rewrite AdminPage abstract component into Typescript (#2996)

* Rewrite AdminPage.js into Typescript

* Export more interfaces and types

* Use Stream type

* Update js/src/admin/components/AdminPage.tsx

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Move `HTMLInputTypes` type to global declarations

* Add missing app import

* Export options interface

* Remove unused method

* Add random element ID generator

* Add attrs for Page component

Full rewrite needed later

* Provide correct attrs

* Add missing a11y attributes for help text and labels

* Update TSDoc comment

* Allow Children to be passed for label/help text

* Extract setting types to arrays

* Make Page class abstract; fix incorrect Component generic call

* Mark AdminPage as abstract

* Mark `content` as abstract

* Revert "Move `HTMLInputTypes` type to global declarations"

This reverts commit c900cb3f6d.

* Restore TSDoc on HTMLInputTypes type

* Fix typo

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
David Wheatley
2021-08-23 01:59:50 +01:00
committed by GitHub
parent 8ee783a06b
commit 4ceba63d27
7 changed files with 344 additions and 179 deletions

View File

@@ -13,6 +13,7 @@
"jquery": "^3.6.0",
"jquery.hotkeys": "^0.1.0",
"mithril": "^2.0.4",
"nanoid": "^3.1.25",
"punycode": "^2.1.1",
"textarea-caret": "^3.1.0",
"throttle-debounce": "^3.0.1"