diff --git a/package.json b/package.json index 52979aa9b..205e97ce5 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "sass-loader": "^13.2.0", "sequelize-mock": "^0.7.0", "sinon": "^15.1.0", - "stylelint": "^15.6.2", + "stylelint": "^15.10.1", "stylelint-config-standard-scss": "^9.0.0", "stylelint-order": "^6.0.3", "supertest": "^6.3.3", diff --git a/src/routes/main/invitation/new/New.tsx b/src/routes/main/invitation/new/New.tsx index 86efb12c2..5adb3dcf2 100644 --- a/src/routes/main/invitation/new/New.tsx +++ b/src/routes/main/invitation/new/New.tsx @@ -1,4 +1,4 @@ -import React, { Component, RefObject, createRef } from "react"; +import React, { ChangeEvent, Component, RefObject, createRef } from "react"; import withStyles from "isomorphic-style-loader/withStyles"; import Button from "react-bootstrap/Button"; import Col from "react-bootstrap/Col"; @@ -11,7 +11,11 @@ interface NewProps { email?: string; } -class New extends Component { +interface NewState { + email?: string; +} + +class New extends Component { emailField: RefObject; static defaultProps = { @@ -21,14 +25,21 @@ class New extends Component { constructor(props: NewProps) { super(props); this.emailField = createRef(); + + this.state = { + email: props.email, + }; } componentDidMount() { this.emailField.current?.focus(); } + handleChange = (event: ChangeEvent) => + this.setState({ email: event.currentTarget.value }); + render() { - const { email } = this.props; + const { email } = this.state; return (
@@ -44,11 +55,12 @@ class New extends Component { Email diff --git a/src/routes/main/password/new/New.tsx b/src/routes/main/password/new/New.tsx index d9b60c8ba..7b6e3e436 100644 --- a/src/routes/main/password/new/New.tsx +++ b/src/routes/main/password/new/New.tsx @@ -1,4 +1,4 @@ -import React, { Component, RefObject, createRef } from "react"; +import React, { ChangeEvent, Component, RefObject, createRef } from "react"; import withStyles from "isomorphic-style-loader/withStyles"; import Button from "react-bootstrap/Button"; import Col from "react-bootstrap/Col"; @@ -11,7 +11,11 @@ interface NewProps { email?: string; } -class New extends Component { +interface NewState { + email?: string; +} + +class New extends Component { emailField: RefObject; static defaultProps = { @@ -21,14 +25,21 @@ class New extends Component { constructor(props: NewProps) { super(props); this.emailField = createRef(); + + this.state = { + email: props.email, + }; } componentDidMount() { this.emailField.current?.focus(); } + handleChange = (event: ChangeEvent) => + this.setState({ email: event.currentTarget.value }); + render() { - const { email } = this.props; + const { email } = this.state; return (
@@ -44,11 +55,12 @@ class New extends Component { Email diff --git a/src/routes/main/users/new/New.tsx b/src/routes/main/users/new/New.tsx index e7c16ae13..34e86e7db 100644 --- a/src/routes/main/users/new/New.tsx +++ b/src/routes/main/users/new/New.tsx @@ -1,4 +1,4 @@ -import React, { Component, RefObject, createRef } from "react"; +import React, { ChangeEvent, Component, RefObject, createRef } from "react"; import withStyles from "isomorphic-style-loader/withStyles"; import Button from "react-bootstrap/Button"; import Col from "react-bootstrap/Col"; @@ -11,7 +11,11 @@ interface NewProps { email?: string; } -class New extends Component { +interface NewState { + email?: string; +} + +class New extends Component { emailField: RefObject; static defaultProps = { @@ -21,14 +25,21 @@ class New extends Component { constructor(props: NewProps) { super(props); this.emailField = createRef(); + + this.state = { + email: props.email, + }; } componentDidMount() { this.emailField.current?.focus(); } + handleChange = (event: ChangeEvent) => + this.setState({ email: event.currentTarget.value }); + render() { - const { email } = this.props; + const { email } = this.state; return (
@@ -44,11 +55,12 @@ class New extends Component { Email diff --git a/yarn.lock b/yarn.lock index bd8bbb3da..2e936eb4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1292,12 +1292,12 @@ __metadata: languageName: node linkType: hard -"@csstools/css-parser-algorithms@npm:^2.1.1": - version: 2.1.1 - resolution: "@csstools/css-parser-algorithms@npm:2.1.1" +"@csstools/css-parser-algorithms@npm:^2.3.0": + version: 2.3.0 + resolution: "@csstools/css-parser-algorithms@npm:2.3.0" peerDependencies: "@csstools/css-tokenizer": ^2.1.1 - checksum: 0ba3f3d38b99c933d12c6cb7fc348a9c0056a1e23b8a4b7e66b79295b5071bc443c4c3ed87ad7f155ce7e76e49c20c582dc27d804c9a45c82e5bd37585870d60 + checksum: 3be22a0cfcfe0dc4bb140e2f266590addf21c5052d9e69334da860b3839fbd4369c3d158cbc396032d5ed96d01d2b5d8ebdb5497f75c9830ed9ce99853e3f915 languageName: node linkType: hard @@ -1308,22 +1308,22 @@ __metadata: languageName: node linkType: hard -"@csstools/media-query-list-parser@npm:^2.0.4": - version: 2.0.4 - resolution: "@csstools/media-query-list-parser@npm:2.0.4" +"@csstools/media-query-list-parser@npm:^2.1.2": + version: 2.1.2 + resolution: "@csstools/media-query-list-parser@npm:2.1.2" peerDependencies: - "@csstools/css-parser-algorithms": ^2.1.1 + "@csstools/css-parser-algorithms": ^2.3.0 "@csstools/css-tokenizer": ^2.1.1 - checksum: 059b1e9bb78fc55888d5c51b55ae6a3aa89b7fde14d846a659bc2bc7f01b5a85d4baf02d36b59a44e5157a5a8eb283b24918d567eda34667e5776befbf122983 + checksum: 04936573ba837f14d7d637e172342c473665679c6497bbc0d548d93d08cb22e22151bb19e0e20422954c0b2aa50c3f38c9fc5f45c136e31bc863c656cb79df1b languageName: node linkType: hard -"@csstools/selector-specificity@npm:^2.2.0": - version: 2.2.0 - resolution: "@csstools/selector-specificity@npm:2.2.0" +"@csstools/selector-specificity@npm:^3.0.0": + version: 3.0.0 + resolution: "@csstools/selector-specificity@npm:3.0.0" peerDependencies: - postcss-selector-parser: ^6.0.10 - checksum: 97c89f23b3b527d7bd51ed299969ed2b9fbb219a367948b44aefec228b8eda6ae0ad74fe8a82f9aac8ff32cfd00bb6d0c98d1daeab2e8fc6d5c4af25e5be5673 + postcss-selector-parser: ^6.0.13 + checksum: 4a2dfe69998a499155d9dab4c2a0e7ae7594d8db98bb8a487d2d5347c0c501655051eb5eacad3fe323c86b0ba8212fe092c27fc883621e6ac2a27662edfc3528 languageName: node linkType: hard @@ -2436,7 +2436,7 @@ __metadata: languageName: node linkType: hard -"@types/minimist@npm:^1.2.0, @types/minimist@npm:^1.2.2": +"@types/minimist@npm:^1.2.2": version: 1.2.2 resolution: "@types/minimist@npm:1.2.2" checksum: b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d @@ -4138,17 +4138,6 @@ __metadata: languageName: node linkType: hard -"camelcase-keys@npm:^6.2.2": - version: 6.2.2 - resolution: "camelcase-keys@npm:6.2.2" - dependencies: - camelcase: ^5.3.1 - map-obj: ^4.0.0 - quick-lru: ^4.0.1 - checksum: 43c9af1adf840471e54c68ab3e5fe8a62719a6b7dbf4e2e86886b7b0ff96112c945736342b837bd2529ec9d1c7d1934e5653318478d98e0cf22c475c04658e2a - languageName: node - linkType: hard - "camelcase-keys@npm:^7.0.0": version: 7.0.2 resolution: "camelcase-keys@npm:7.0.2" @@ -4794,15 +4783,15 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:^8.1.3": - version: 8.1.3 - resolution: "cosmiconfig@npm:8.1.3" +"cosmiconfig@npm:^8.2.0": + version: 8.2.0 + resolution: "cosmiconfig@npm:8.2.0" dependencies: import-fresh: ^3.2.1 js-yaml: ^4.1.0 parse-json: ^5.0.0 path-type: ^4.0.0 - checksum: b3d277bc3a8a9e649bf4c3fc9740f4c52bf07387481302aa79839f595045368903bf26ea24a8f7f7b8b180bf46037b027c5cb63b1391ab099f3f78814a147b2b + checksum: 836d5d8efa750f3fb17b03d6ca74cd3154ed025dffd045304b3ef59637f662bde1e5dc88f8830080d180ec60841719cf4ea2ce73fb21ec694b16865c478ff297 languageName: node linkType: hard @@ -6489,7 +6478,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" dependencies: @@ -6502,6 +6491,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.3.0": + version: 3.3.0 + resolution: "fast-glob@npm:3.3.0" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 20df62be28eb5426fe8e40e0d05601a63b1daceb7c3d87534afcad91bdcf1e4b1743cf2d5247d6e225b120b46df0b9053a032b2691ba34ee121e033acd81f547 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -9375,7 +9377,7 @@ __metadata: serialize-javascript: ^6.0.1 sinon: ^15.1.0 source-map-support: ^0.5.21 - stylelint: ^15.6.2 + stylelint: ^15.10.1 stylelint-config-standard-scss: ^9.0.0 stylelint-order: ^6.0.3 supertest: ^6.3.3 @@ -9461,7 +9463,7 @@ __metadata: languageName: node linkType: hard -"map-obj@npm:^4.0.0, map-obj@npm:^4.1.0": +"map-obj@npm:^4.1.0": version: 4.3.0 resolution: "map-obj@npm:4.3.0" checksum: fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e @@ -9552,26 +9554,6 @@ __metadata: languageName: node linkType: hard -"meow@npm:^9.0.0": - version: 9.0.0 - resolution: "meow@npm:9.0.0" - dependencies: - "@types/minimist": ^1.2.0 - camelcase-keys: ^6.2.2 - decamelize: ^1.2.0 - decamelize-keys: ^1.1.0 - hard-rejection: ^2.1.0 - minimist-options: 4.1.0 - normalize-package-data: ^3.0.0 - read-pkg-up: ^7.0.1 - redent: ^3.0.0 - trim-newlines: ^3.0.0 - type-fest: ^0.18.0 - yargs-parser: ^20.2.3 - checksum: 99799c47247f4daeee178e3124f6ef6f84bde2ba3f37652865d5d8f8b8adcf9eedfc551dd043e2455cd8206545fd848e269c0c5ab6b594680a0ad4d3617c9639 - languageName: node - linkType: hard - "merge-descriptors@npm:1.0.1, merge-descriptors@npm:~1.0.0": version: 1.0.1 resolution: "merge-descriptors@npm:1.0.1" @@ -10107,7 +10089,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": +"normalize-package-data@npm:^2.3.2": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" dependencies: @@ -10119,7 +10101,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^3.0.0, normalize-package-data@npm:^3.0.2": +"normalize-package-data@npm:^3.0.2": version: 3.0.3 resolution: "normalize-package-data@npm:3.0.3" dependencies: @@ -11063,7 +11045,7 @@ __metadata: languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.12": +"postcss-selector-parser@npm:^6.0.13": version: 6.0.13 resolution: "postcss-selector-parser@npm:6.0.13" dependencies: @@ -11118,14 +11100,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.23": - version: 8.4.23 - resolution: "postcss@npm:8.4.23" +"postcss@npm:^8.4.24": + version: 8.4.25 + resolution: "postcss@npm:8.4.25" dependencies: nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 8bb9d1b2ea6e694f8987d4f18c94617971b2b8d141602725fedcc2222fdc413b776a6e1b969a25d627d7b2681ca5aabb56f59e727ef94072e1b6ac8412105a2f + checksum: 9ed3ab8af43ad5210c28f56f916fd9b8c9f94fbeaebbf645dcf579bc28bdd8056c2a7ecc934668d399b81fedb6128f0c4b299f931e50454964bc911c25a3a0a2 languageName: node linkType: hard @@ -11417,13 +11399,6 @@ __metadata: languageName: node linkType: hard -"quick-lru@npm:^4.0.1": - version: 4.0.1 - resolution: "quick-lru@npm:4.0.1" - checksum: bea46e1abfaa07023e047d3cf1716a06172c4947886c053ede5c50321893711577cb6119360f810cc3ffcd70c4d7db4069c3cee876b358ceff8596e062bd1154 - languageName: node - linkType: hard - "quick-lru@npm:^5.1.1": version: 5.1.1 resolution: "quick-lru@npm:5.1.1" @@ -11709,17 +11684,6 @@ __metadata: languageName: node linkType: hard -"read-pkg-up@npm:^7.0.1": - version: 7.0.1 - resolution: "read-pkg-up@npm:7.0.1" - dependencies: - find-up: ^4.1.0 - read-pkg: ^5.2.0 - type-fest: ^0.8.1 - checksum: e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 - languageName: node - linkType: hard - "read-pkg-up@npm:^8.0.0": version: 8.0.0 resolution: "read-pkg-up@npm:8.0.0" @@ -11742,18 +11706,6 @@ __metadata: languageName: node linkType: hard -"read-pkg@npm:^5.2.0": - version: 5.2.0 - resolution: "read-pkg@npm:5.2.0" - dependencies: - "@types/normalize-package-data": ^2.4.0 - normalize-package-data: ^2.5.0 - parse-json: ^5.0.0 - type-fest: ^0.6.0 - checksum: eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 - languageName: node - linkType: hard - "read-pkg@npm:^6.0.0": version: 6.0.0 resolution: "read-pkg@npm:6.0.0" @@ -13382,21 +13334,21 @@ __metadata: languageName: node linkType: hard -"stylelint@npm:^15.6.2": - version: 15.6.2 - resolution: "stylelint@npm:15.6.2" +"stylelint@npm:^15.10.1": + version: 15.10.1 + resolution: "stylelint@npm:15.10.1" dependencies: - "@csstools/css-parser-algorithms": ^2.1.1 + "@csstools/css-parser-algorithms": ^2.3.0 "@csstools/css-tokenizer": ^2.1.1 - "@csstools/media-query-list-parser": ^2.0.4 - "@csstools/selector-specificity": ^2.2.0 + "@csstools/media-query-list-parser": ^2.1.2 + "@csstools/selector-specificity": ^3.0.0 balanced-match: ^2.0.0 colord: ^2.9.3 - cosmiconfig: ^8.1.3 + cosmiconfig: ^8.2.0 css-functions-list: ^3.1.0 css-tree: ^2.3.1 debug: ^4.3.4 - fast-glob: ^3.2.12 + fast-glob: ^3.3.0 fastest-levenshtein: ^1.0.16 file-entry-cache: ^6.0.1 global-modules: ^2.0.0 @@ -13409,15 +13361,14 @@ __metadata: is-plain-object: ^5.0.0 known-css-properties: ^0.27.0 mathml-tag-names: ^2.1.3 - meow: ^9.0.0 + meow: ^10.1.5 micromatch: ^4.0.5 normalize-path: ^3.0.0 picocolors: ^1.0.0 - postcss: ^8.4.23 - postcss-media-query-parser: ^0.2.3 + postcss: ^8.4.24 postcss-resolve-nested-selector: ^0.1.1 postcss-safe-parser: ^6.0.0 - postcss-selector-parser: ^6.0.12 + postcss-selector-parser: ^6.0.13 postcss-value-parser: ^4.2.0 resolve-from: ^5.0.0 string-width: ^4.2.3 @@ -13426,11 +13377,10 @@ __metadata: supports-hyperlinks: ^3.0.0 svg-tags: ^1.0.0 table: ^6.8.1 - v8-compile-cache: ^2.3.0 write-file-atomic: ^5.0.1 bin: - stylelint: bin/stylelint.js - checksum: b44949053b0500226d718d810af64a10b43d8faeed6c464ab1c8bebd8ace488135b47e3a6e4a97ae552d7e14f011dce82c6c69624e463476f8408751b7544b2f + stylelint: bin/stylelint.mjs + checksum: 8eeae81fe4ed2dfc580d7c401806dbb058c14631abfafd0821db32f1e649aee62e3d39dda3462c6122826df91bd9799409be926e91b55b007622f51e44eb94c1 languageName: node linkType: hard @@ -13813,13 +13763,6 @@ __metadata: languageName: node linkType: hard -"trim-newlines@npm:^3.0.0": - version: 3.0.1 - resolution: "trim-newlines@npm:3.0.1" - checksum: b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 - languageName: node - linkType: hard - "trim-newlines@npm:^4.0.2": version: 4.0.2 resolution: "trim-newlines@npm:4.0.2" @@ -13956,13 +13899,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.18.0": - version: 0.18.1 - resolution: "type-fest@npm:0.18.1" - checksum: e96dcee18abe50ec82dab6cbc4751b3a82046da54c52e3b2d035b3c519732c0b3dd7a2fa9df24efd1a38d953d8d4813c50985f215f1957ee5e4f26b0fe0da395 - languageName: node - linkType: hard - "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2" @@ -13977,13 +13913,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.6.0": - version: 0.6.0 - resolution: "type-fest@npm:0.6.0" - checksum: b2188e6e4b21557f6e92960ec496d28a51d68658018cba8b597bd3ef757721d1db309f120ae987abeeda874511d14b776157ff809f23c6d1ce8f83b9b2b7d60f - languageName: node - linkType: hard - "type-fest@npm:^0.7.1": version: 0.7.1 resolution: "type-fest@npm:0.7.1" @@ -13991,7 +13920,7 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.8.0, type-fest@npm:^0.8.1": +"type-fest@npm:^0.8.0": version: 0.8.1 resolution: "type-fest@npm:0.8.1" checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 @@ -14348,13 +14277,6 @@ __metadata: languageName: node linkType: hard -"v8-compile-cache@npm:^2.3.0": - version: 2.3.0 - resolution: "v8-compile-cache@npm:2.3.0" - checksum: adb0a271eaa2297f2f4c536acbfee872d0dd26ec2d76f66921aa7fc437319132773483344207bdbeee169225f4739016d8d2dbf0553913a52bb34da6d0334f8e - languageName: node - linkType: hard - "validate-npm-package-license@npm:^3.0.1": version: 3.0.3 resolution: "validate-npm-package-license@npm:3.0.3" @@ -15172,7 +15094,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3, yargs-parser@npm:^20.2.9": +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" checksum: 8bb69015f2b0ff9e17b2c8e6bfe224ab463dd00ca211eece72a4cd8a906224d2703fb8a326d36fdd0e68701e201b2a60ed7cf81ce0fd9b3799f9fe7745977ae3