diff --git a/CHANGELOG.md b/CHANGELOG.md index 47d560514..4425f3d61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [5.70.3](https://github.com/rsuite/rsuite/compare/v5.70.2...v5.70.3) (2024-09-20) + + +### Bug Fixes + +* **CheckTree:** fix the incorrect check state after loading child nodes through `getChildren` ([#3974](https://github.com/rsuite/rsuite/issues/3974)) ([afaaf2d](https://github.com/rsuite/rsuite/commit/afaaf2d8017799089cc79c369802b8d53232c2b0)) +* docs/package.json & docs/package-lock.json to reduce vulnerabilities ([#3972](https://github.com/rsuite/rsuite/issues/3972)) ([41d5334](https://github.com/rsuite/rsuite/commit/41d533468bfe8b25be126378124bcaa2df55cb72)) +* **Form:** clear error caused by uncontrolled form state ([#3971](https://github.com/rsuite/rsuite/issues/3971)) ([dbc75fd](https://github.com/rsuite/rsuite/commit/dbc75fd39886df4f558c48ee51cd95b28ce75c7a)) + + + ## [5.70.2](https://github.com/rsuite/rsuite/compare/v5.70.1...v5.70.2) (2024-09-13) diff --git a/docs/package-lock.json b/docs/package-lock.json index 909bc4d62..b225d85f9 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -1,12 +1,12 @@ { "name": "docs", - "version": "5.70.1", + "version": "5.70.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "docs", - "version": "5.70.1", + "version": "5.70.2", "license": "MIT", "dependencies": { "@docsearch/react": "^3.2.1", @@ -29,7 +29,7 @@ "formik": "^2.4.5", "lunar-typescript": "^1.7.5", "lz-string": "^1.4.4", - "next": "^14.2.3", + "next": "^14.2.10", "nprogress": "^0.2.0", "react": "^18.2.0", "react-code-view": "^2.4.0", @@ -42,7 +42,7 @@ "react-icons": "^5.0.1", "react-json-tree": "^0.18.0", "react-select": "^5.5.9", - "rsuite": "^5.70.1", + "rsuite": "^5.70.2", "svg-sprite-loader": "^6.0.11", "svgo": "^2.3.1", "svgo-loader": "^3.0.3", @@ -2644,17 +2644,19 @@ } }, "node_modules/@next/env": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.3.tgz", - "integrity": "sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==" + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.10.tgz", + "integrity": "sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==", + "license": "MIT" }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.3.tgz", - "integrity": "sha512-3pEYo/RaGqPP0YzwnlmPN2puaF2WMLM3apt5jLW2fFdXD9+pqcoTzRk+iZsf8ta7+quAe4Q6Ms0nR0SFGFdS1A==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz", + "integrity": "sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2664,12 +2666,13 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.3.tgz", - "integrity": "sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz", + "integrity": "sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2679,12 +2682,13 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.3.tgz", - "integrity": "sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz", + "integrity": "sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -2694,12 +2698,13 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.3.tgz", - "integrity": "sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz", + "integrity": "sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -2709,12 +2714,13 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.3.tgz", - "integrity": "sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz", + "integrity": "sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -2724,12 +2730,13 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.3.tgz", - "integrity": "sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz", + "integrity": "sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -2739,12 +2746,13 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.3.tgz", - "integrity": "sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz", + "integrity": "sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -2754,12 +2762,13 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz", - "integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz", + "integrity": "sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -2769,12 +2778,13 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.3.tgz", - "integrity": "sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz", + "integrity": "sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -3363,8 +3373,7 @@ "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/lodash": { "version": "4.17.4", @@ -3374,8 +3383,7 @@ "node_modules/@types/node": { "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, "node_modules/@types/parse-json": { "version": "4.0.2", @@ -3458,6 +3466,181 @@ "react": "^16.8||^17||^18" } }, + "node_modules/@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "license": "Apache-2.0", + "peer": true + }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", @@ -3469,11 +3652,20 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3528,7 +3720,6 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -3904,7 +4095,6 @@ "version": "4.23.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -4104,6 +4294,16 @@ "fsevents": "~2.3.2" } }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -5531,8 +5731,7 @@ "node_modules/electron-to-chromium": { "version": "1.4.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.782.tgz", - "integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==", - "dev": true + "integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==" }, "node_modules/emoji-regex": { "version": "7.0.3", @@ -5548,6 +5747,20 @@ "node": ">= 4" } }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -5659,6 +5872,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "license": "MIT", + "peer": true + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -5703,7 +5923,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, "engines": { "node": ">=6" } @@ -5716,6 +5935,53 @@ "node": ">=0.8.0" } }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -5725,6 +5991,16 @@ "node": ">=0.10.0" } }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -5815,8 +6091,7 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fill-range": { "version": "7.1.1", @@ -6237,6 +6512,13 @@ "node": ">= 6" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "license": "BSD-2-Clause", + "peer": true + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -7150,8 +7432,7 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json5": { "version": "2.2.3", @@ -7256,6 +7537,16 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.11.5" + } + }, "node_modules/loader-utils": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", @@ -7488,8 +7779,7 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/micromatch": { "version": "3.1.0", @@ -7573,6 +7863,29 @@ "node": ">=4" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mini-css-extract-plugin": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz", @@ -7828,12 +8141,20 @@ "node": ">= 4.4.x" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "license": "MIT", + "peer": true + }, "node_modules/next": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.3.tgz", - "integrity": "sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.10.tgz", + "integrity": "sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww==", + "license": "MIT", "dependencies": { - "@next/env": "14.2.3", + "@next/env": "14.2.10", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -7848,15 +8169,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.3", - "@next/swc-darwin-x64": "14.2.3", - "@next/swc-linux-arm64-gnu": "14.2.3", - "@next/swc-linux-arm64-musl": "14.2.3", - "@next/swc-linux-x64-gnu": "14.2.3", - "@next/swc-linux-x64-musl": "14.2.3", - "@next/swc-win32-arm64-msvc": "14.2.3", - "@next/swc-win32-ia32-msvc": "14.2.3", - "@next/swc-win32-x64-msvc": "14.2.3" + "@next/swc-darwin-arm64": "14.2.10", + "@next/swc-darwin-x64": "14.2.10", + "@next/swc-linux-arm64-gnu": "14.2.10", + "@next/swc-linux-arm64-musl": "14.2.10", + "@next/swc-linux-x64-gnu": "14.2.10", + "@next/swc-linux-x64-musl": "14.2.10", + "@next/swc-win32-arm64-msvc": "14.2.10", + "@next/swc-win32-ia32-msvc": "14.2.10", + "@next/swc-win32-x64-msvc": "14.2.10" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -7922,8 +8243,7 @@ "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -8332,7 +8652,6 @@ "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, "funding": [ { "type": "opencollective", @@ -9279,7 +9598,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "engines": { "node": ">=6" } @@ -9300,7 +9618,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -9851,9 +10168,9 @@ } }, "node_modules/rsuite": { - "version": "5.70.1", - "resolved": "https://registry.npmjs.org/rsuite/-/rsuite-5.70.1.tgz", - "integrity": "sha512-a1rpRkkJnZ/eJnQqMoCgWsvTftwABCNYh4Pg+hC+FdwB0D9h4FO+l/f0ZKd7fH9ha5AzZp6QQ5P/sJs2e1wBLQ==", + "version": "5.70.2", + "resolved": "https://registry.npmjs.org/rsuite/-/rsuite-5.70.2.tgz", + "integrity": "sha512-0VZxc/kzeVIEd7PNobguqHUrf5VYYovKXkYg+GiE4yp+HADuWj/1JqugzTAcxk/uxSLIwO+VFgYISi4DJf3/fg==", "dependencies": { "@babel/runtime": "^7.20.1", "@juggle/resize-observer": "^3.4.0", @@ -10150,7 +10467,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -10164,6 +10480,13 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/search-insights": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.2.tgz", + "integrity": "sha512-zFNpOpUO+tY2D85KrxJ+aqwnIfdEGi06UH2+xEb+Bp9Mwznmauqc9djbnBibJO5mpfUPPa8st6Sx65+vbeO45g==", + "license": "MIT", + "peer": true + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -10177,7 +10500,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -11117,7 +11439,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -11139,6 +11460,82 @@ "node": ">=10" } }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -11422,6 +11819,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typescript": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/ua-parser-js": { "version": "1.0.37", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", @@ -11612,7 +12024,6 @@ "version": "1.0.16", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -11642,7 +12053,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -11697,6 +12107,77 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/watchpack": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "license": "MIT", + "peer": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/docs/package.json b/docs/package.json index e9b02a186..0bc266e55 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "5.70.1", + "version": "5.70.2", "license": "MIT", "private": true, "scripts": { @@ -36,7 +36,7 @@ "formik": "^2.4.5", "lunar-typescript": "^1.7.5", "lz-string": "^1.4.4", - "next": "^14.2.3", + "next": "^14.2.10", "nprogress": "^0.2.0", "react": "^18.2.0", "react-code-view": "^2.4.0", @@ -49,7 +49,7 @@ "react-icons": "^5.0.1", "react-json-tree": "^0.18.0", "react-select": "^5.5.9", - "rsuite": "^5.70.1", + "rsuite": "^5.70.2", "svg-sprite-loader": "^6.0.11", "svgo": "^2.3.1", "svgo-loader": "^3.0.3", diff --git a/docs/pages/components/check-tree-picker/fragments/extra-footer.md b/docs/pages/components/check-tree-picker/fragments/extra-footer.md index f326eb322..8c1075d80 100644 --- a/docs/pages/components/check-tree-picker/fragments/extra-footer.md +++ b/docs/pages/components/check-tree-picker/fragments/extra-footer.md @@ -12,26 +12,39 @@ const data = mockTreeData({ } }); -const App = () => ( - <> +const App = () => { + const [value, setValue] = React.useState([]); + + const handleCheckAll = (_v, checked) => { + if (checked) { + setValue(data.map(item => item.value)); + } else { + setValue([]); + } + }; + + return ( ( -
- Check all -
+ + + Check all + + )} /> - -); + ); +}; + +const ExtraFooter = ({ children }) => { + return
{children}
; +}; ReactDOM.render(, document.getElementById('root')); ``` diff --git a/package-lock.json b/package-lock.json index 223660a44..3712effd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rsuite", - "version": "5.70.2", + "version": "5.70.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rsuite", - "version": "5.70.2", + "version": "5.70.3", "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", diff --git a/package.json b/package.json index 913f36bcf..e34a2d26d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rsuite", - "version": "5.70.2", + "version": "5.70.3", "description": "A suite of react components", "main": "lib/cjs/index.js", "module": "lib/esm/index.js", diff --git a/src/CheckTree/test/CheckTreeSpec.tsx b/src/CheckTree/test/CheckTreeSpec.tsx index 64ee5d537..a636205cf 100644 --- a/src/CheckTree/test/CheckTreeSpec.tsx +++ b/src/CheckTree/test/CheckTreeSpec.tsx @@ -79,37 +79,6 @@ describe('CheckTree', () => { expect(onSelect).to.not.have.been.called; }); - it('Should async load children nodes', async () => { - const data = [{ label: 'async', value: 'async', children: [] }]; - - const fetchNodes = () => { - return new Promise(resolve => { - setTimeout(() => resolve([{ label: 'children', value: 'children' }]), 500); - }); - }; - - render( - - ); - - fireEvent.click(screen.getByRole('button', { name: 'Expand async' })); - - expect(screen.getByRole('button', { name: 'Collapse async' })).to.have.attribute('aria-busy'); - - await waitFor(() => { - expect(screen.getByRole('treeitem', { name: 'children' })).to.exist; - expect(screen.getByRole('button', { name: 'Collapse async' })).to.not.have.attribute( - 'aria-busy' - ); - }); - }); - it('Should all nodes be checked', () => { // Test data comes from: https://github.com/rsuite/rsuite/issues/3559 const data = [ @@ -390,4 +359,51 @@ describe('CheckTree', () => { ); }); }); + + describe('Async load children nodes', () => { + it('Should async load children nodes', async () => { + const data = [{ label: 'async', value: 'async', children: [] }]; + + const fetchNodes = () => { + return new Promise(resolve => { + setTimeout(() => resolve([{ label: 'children', value: 'children' }]), 500); + }); + }; + + render(); + + fireEvent.click(screen.getByRole('button', { name: 'Expand async' })); + + expect(screen.getByRole('button', { name: 'Collapse async' })).to.have.attribute('aria-busy'); + + await waitFor(() => { + expect(screen.getByRole('treeitem', { name: 'children' })).to.exist; + expect(screen.getByRole('button', { name: 'Collapse async' })).to.not.have.attribute( + 'aria-busy' + ); + }); + }); + + // fix: https://github.com/rsuite/rsuite/issues/3973 + it('Should load children nodes and check the state of the node', async () => { + const data = [{ label: 'async', value: 'async', children: [] }]; + + const fetchNodes = () => { + return new Promise(resolve => { + setTimeout(() => resolve([{ label: 'children', value: 'children' }]), 500); + }); + }; + + render(); + + fireEvent.click(screen.getByRole('button', { name: 'Expand async' })); + + expect(screen.getByRole('checkbox', { name: 'async' })).to.be.checked; + + await waitFor(() => { + expect(screen.getByRole('checkbox', { name: 'async' })).to.be.checked; + expect(screen.getByRole('checkbox', { name: 'children' })).to.be.checked; + }); + }); + }); }); diff --git a/src/Form/hooks/useFormValidate.ts b/src/Form/hooks/useFormValidate.ts index d458b99c7..4139aac7a 100644 --- a/src/Form/hooks/useFormValidate.ts +++ b/src/Form/hooks/useFormValidate.ts @@ -13,9 +13,9 @@ export interface FormErrorProps { nestedField?: boolean; } -export default function useFormValidate(formError: any, props: FormErrorProps) { +export default function useFormValidate(_formError: any, props: FormErrorProps) { const { formValue, getCombinedModel, onCheck, onError, nestedField } = props; - const [realFormError, setFormError] = useControlled(formError, {}); + const [realFormError, setFormError] = useControlled(_formError, {}); const checkOptions = { nestedObject: nestedField }; const realFormErrorRef = useRef(realFormError); @@ -73,7 +73,7 @@ export default function useFormValidate(formError: any, props: FormErrorProps) { const model = getCombinedModel(); const resultOfCurrentField = model.checkForField(fieldName, nextValue, checkOptions); let nextFormError = { - ...formError + ...realFormError }; /** * when using proxy of schema-typed, we need to use getCheckResult to get all errors, @@ -169,7 +169,7 @@ export default function useFormValidate(formError: any, props: FormErrorProps) { return model .checkForFieldAsync(fieldName, nextValue, checkOptions) .then(resultOfCurrentField => { - let nextFormError = { ...formError }; + let nextFormError = { ...realFormError }; /** * when using proxy of schema-typed, we need to use getCheckResult to get all errors, * but if nestedField is used, it is impossible to distinguish whether the nested object has an error here, @@ -244,7 +244,7 @@ export default function useFormValidate(formError: any, props: FormErrorProps) { }); const cleanErrorForField = useEventCallback((fieldName: string) => { - setFormError(omit(formError, [nestedField ? nameToPath(fieldName) : fieldName])); + setFormError(omit(realFormError, [nestedField ? nameToPath(fieldName) : fieldName])); }); return { diff --git a/src/Form/test/FormSpec.tsx b/src/Form/test/FormSpec.tsx index 2486a20fd..ca2dc35b9 100644 --- a/src/Form/test/FormSpec.tsx +++ b/src/Form/test/FormSpec.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useRef } from 'react'; import { render, fireEvent, act, waitFor, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import sinon from 'sinon'; @@ -725,4 +725,68 @@ describe('Form', () => { expect(onReset).to.be.not.called; }); }); + + describe('using uncontrolled formError correctly', () => { + const nameRule = Schema.Types.StringType().minLength(10, 'Name is too short'); + const emailRule = Schema.Types.StringType().isEmail('Please enter a valid email address'); + + function UsernameField(props) { + return ( + + Username + + + ); + } + + function EmailField(props) { + return ( + + Email + + + ); + } + + function RenderForm(props: { checkAsync?: boolean }) { + const { checkAsync = false } = props; + const formRef = useRef(null); + const handleClearEmailError = () => { + formRef.current?.cleanErrorForField('email'); + }; + return ( +
+ + + + + ); + } + + it('Should show name error and email error', () => { + render(); + userEvent.type(screen.getByRole('textbox', { name: 'Username' }), 'name'); + userEvent.type(screen.getByRole('textbox', { name: 'Email' }), 'email'); + expect(screen.getAllByRole('alert')).length(2); + }); + + it('Should show name error and email error when checkAsync is true', async () => { + render(); + userEvent.type(screen.getByRole('textbox', { name: 'Username' }), 'name'); + // Although this assertion is repeated, it is necessary to wait for the async check to finish + expect(await screen.findByText('Name is too short')).to.exist; + userEvent.type(screen.getByRole('textbox', { name: 'Email' }), 'email'); + expect(await screen.findByText('Name is too short')).to.exist; + expect(await screen.findByText('Please enter a valid email address')).to.exist; + }); + + it('Should clear error exactly', () => { + render(); + userEvent.type(screen.getByRole('textbox', { name: 'Username' }), 'name'); + userEvent.type(screen.getByRole('textbox', { name: 'Email' }), 'email'); + expect(screen.getAllByRole('alert')).length(2); + userEvent.click(screen.getByRole('button')); + expect(screen.getAllByRole('alert')).length(1); + }); + }); }); diff --git a/src/FormControl/test/FormControlSpec.tsx b/src/FormControl/test/FormControlSpec.tsx index 4f3ca1183..4077884e9 100644 --- a/src/FormControl/test/FormControlSpec.tsx +++ b/src/FormControl/test/FormControlSpec.tsx @@ -639,30 +639,16 @@ describe('FormControl', () => { fireEvent.change(screen.getByTestId('textbox1'), { target: { value: 'a' } }); - expect(screen.getByRole('alert')).to.have.text('obj.number1 must be a number'); - expect(onCheck).to.calledWithMatch({ - obj: { - object: { - number1: { hasError: true, errorMessage: 'obj.number1 must be a number' } - } - } - }); + expect(screen.getByText('obj.number1 must be a number')).to.exist; fireEvent.change(screen.getByTestId('textbox2'), { target: { value: 'a' } }); - expect(screen.getByRole('alert')).to.have.text('obj.number2 must be a number'); - expect(onCheck).to.calledWithMatch({ - obj: { - object: { - number2: { hasError: true, errorMessage: 'obj.number2 must be a number' } - } - } - }); + expect(screen.getByText('obj.number2 must be a number')).to.exist; fireEvent.change(screen.getByTestId('textbox2'), { target: { value: 1 } }); - expect(screen.queryByRole('alert')).to.not.exist; - expect(onCheck).to.calledWithMatch({ obj: { object: {} } }); + expect(screen.queryByText('obj.number2 must be a number')).to.not.exist; + expect(screen.queryByText('obj.number1 must be a number')).to.exist; }); it('Should render deeply nested error messages', async () => { diff --git a/src/RadioGroup/test/RadioGroupSpec.tsx b/src/RadioGroup/test/RadioGroupSpec.tsx index fe61c502f..997ac42c8 100644 --- a/src/RadioGroup/test/RadioGroupSpec.tsx +++ b/src/RadioGroup/test/RadioGroupSpec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; -import { getDOMNode, testStandardProps } from '@test/utils'; +import { testStandardProps } from '@test/utils'; import RadioGroup from '../RadioGroup'; import Radio from '../../Radio'; import Sinon from 'sinon'; @@ -172,9 +172,9 @@ describe('RadioGroup', () => { }); it('Should apply appearance', () => { - const instance = getDOMNode(); + const { container } = render(); - assert.include(instance.className, 'rs-radio-group-picker'); + expect(container.firstChild).to.have.class('rs-radio-group-picker'); }); describe('Plain text', () => { diff --git a/src/RangeSlider/test/RangeSliderSpec.tsx b/src/RangeSlider/test/RangeSliderSpec.tsx index 976d2e230..2d40d2239 100644 --- a/src/RangeSlider/test/RangeSliderSpec.tsx +++ b/src/RangeSlider/test/RangeSliderSpec.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { render, fireEvent, act, screen } from '@testing-library/react'; import { Simulate } from 'react-dom/test-utils'; import sinon from 'sinon'; -import { getDOMNode, testStandardProps } from '@test/utils'; +import { testStandardProps } from '@test/utils'; import RangeSlider from '../RangeSlider'; import { addStyle } from 'dom-lib'; @@ -12,21 +12,21 @@ describe('RangeSlider', () => { testStandardProps(); it('Should render a RangeSlider', () => { - const instance = getDOMNode(); - expect(instance).to.have.class('rs-slider'); + const { container } = render(); + expect(container.firstChild).to.have.class('rs-slider'); }); it('Should have a progress ', () => { - const instance = getDOMNode(); + const { container } = render(); expect( - // eslint-disable-next-line testing-library/no-node-access - (instance.querySelector('.rs-slider-progress-bar') as HTMLHtmlElement).style.width + // eslint-disable-next-line + (container.querySelector('.rs-slider-progress-bar') as HTMLHtmlElement).style.width ).to.equal('40%'); expect( - // eslint-disable-next-line testing-library/no-node-access - (instance.querySelector('.rs-slider-progress-bar') as HTMLElement).style.left + // eslint-disable-next-line + (container.querySelector('.rs-slider-progress-bar') as HTMLElement).style.left ).to.equal('10%'); }); @@ -36,18 +36,21 @@ describe('RangeSlider', () => { }); it('Should output the scale', () => { - const instance = getDOMNode(); - const instance2 = getDOMNode(); - // eslint-disable-next-line testing-library/no-node-access - expect(instance.querySelectorAll('li')).to.have.length(10); - // eslint-disable-next-line testing-library/no-node-access - expect(instance2.querySelectorAll('li')).to.have.length(9); + const { rerender, container } = render(); + + // eslint-disable-next-line + expect(container.querySelectorAll('li')).to.have.length(10); + + rerender(); + + // eslint-disable-next-line + expect(container.querySelectorAll('li')).to.have.length(9); }); it('Should be displayed vertically', () => { - const instance = getDOMNode(); + const { container } = render(); - expect(instance).to.have.class('rs-slider-vertical'); + expect(container.firstChild).to.have.class('rs-slider-vertical'); screen.getAllByRole('slider').forEach(slider => { expect(slider).to.have.attr('aria-orientation', 'vertical'); @@ -58,15 +61,15 @@ describe('RangeSlider', () => { const onChange = sinon.spy(); const onChangeCommitted = sinon.spy(); - const instance = getDOMNode( + const { container } = render( ); - expect(instance).to.have.class('rs-slider-disabled'); + expect(container.firstChild).to.have.class('rs-slider-disabled'); expect(screen.queryAllByRole('slider')[0]).to.have.attr('aria-disabled', 'true'); expect(screen.queryAllByRole('slider')[1]).to.have.attr('aria-disabled', 'true'); - // eslint-disable-next-line testing-library/no-node-access - fireEvent.click(instance.querySelector('.rs-slider-bar') as HTMLElement); + // eslint-disable-next-line + fireEvent.click(container.querySelector('.rs-slider-bar') as HTMLElement); expect(onChange).to.have.not.been.called; expect(onChangeCommitted).to.have.not.been.called; @@ -76,14 +79,14 @@ describe('RangeSlider', () => { const onChange = sinon.spy(); const onChangeCommitted = sinon.spy(); - const instance = getDOMNode( + const { container } = render( ); expect(screen.queryAllByRole('slider')[0]).to.have.attr('readonly'); expect(screen.queryAllByRole('slider')[1]).to.have.attr('readonly'); - // eslint-disable-next-line testing-library/no-node-access - fireEvent.click(instance.querySelector('.rs-slider-bar') as HTMLElement); + // eslint-disable-next-line + fireEvent.click(container.querySelector('.rs-slider-bar') as HTMLElement); expect(onChange).to.have.not.been.called; expect(onChangeCommitted).to.have.not.been.called; @@ -91,9 +94,9 @@ describe('RangeSlider', () => { it('Should call onChange callback', () => { const onChangeSpy = sinon.spy(); - const instance = getDOMNode(); - // eslint-disable-next-line testing-library/no-node-access - fireEvent.click(instance.querySelector('.rs-slider-progress-bar') as HTMLElement); + const { container } = render(); + // eslint-disable-next-line + fireEvent.click(container.querySelector('.rs-slider-progress-bar') as HTMLElement); expect(onChangeSpy).to.have.been.calledWith([0, 50]); }); @@ -134,15 +137,15 @@ describe('RangeSlider', () => { }); it('Should render custom title', () => { - const instance = getDOMNode(); - // eslint-disable-next-line testing-library/no-node-access - expect(instance.querySelector('.rs-slider-handle')).to.have.text('test'); + const { container } = render(); + // eslint-disable-next-line + expect(container.querySelector('.rs-slider-handle')).to.have.text('test'); }); it('Should handle keyboard operations', () => { - const instance = getDOMNode(); - // eslint-disable-next-line testing-library/no-node-access - const handle = instance.querySelector('.rs-slider-handle') as HTMLElement; + const { container } = render(); + // eslint-disable-next-line + const handle = container.querySelector('.rs-slider-handle') as HTMLElement; const input = screen.getAllByRole('slider')[0] as HTMLInputElement; expect(input).to.value('10'); @@ -177,10 +180,10 @@ describe('RangeSlider', () => { const onChangeCommitted = sinon.spy(); const mousemoveEvent = new MouseEvent('mousemove', { bubbles: true }); const mouseupEvent = new MouseEvent('mouseup', { bubbles: true }); - const instance = getDOMNode(); + const { container } = render(); - // eslint-disable-next-line testing-library/no-node-access - const handle = instance.querySelector('.rs-slider-handle') as HTMLElement; + // eslint-disable-next-line + const handle = container.querySelector('.rs-slider-handle') as HTMLElement; fireEvent.mouseDown(handle); handle.dispatchEvent(mousemoveEvent); @@ -192,20 +195,20 @@ describe('RangeSlider', () => { it('Should call `onChangeCommitted` callback when click bar', () => { const onChangeCommitted = sinon.spy(); - const instance = getDOMNode( + const { container } = render( ); - // eslint-disable-next-line testing-library/no-node-access - fireEvent.click(instance.querySelector('.rs-slider-bar') as HTMLElement); + // eslint-disable-next-line + fireEvent.click(container.querySelector('.rs-slider-bar') as HTMLElement); expect(onChangeCommitted).to.have.been.calledWith([0, 50]); }); it('Should output an `input` stored value', () => { - const instance = getDOMNode(); + const { container } = render(); - // eslint-disable-next-line testing-library/no-node-access - const input = instance.querySelectorAll('input[type="range"]') as NodeListOf; + // eslint-disable-next-line + const input = container.querySelectorAll('input[type="range"]') as NodeListOf; expect(input[0]).to.value('20'); expect(input[0]).to.have.attr('aria-valuenow', '20'); @@ -222,7 +225,7 @@ describe('RangeSlider', () => { it('Should be reversed start and end values', () => { const onChangeSpy = sinon.spy(); - const instance = getDOMNode( + const { container } = render( { /> ); - // eslint-disable-next-line testing-library/no-node-access - const sliderBar = instance.querySelector('.rs-slider-bar') as HTMLElement; + // eslint-disable-next-line + const sliderBar = container.querySelector('.rs-slider-bar') as HTMLElement; // `margin` will cause the values of `pageX` and `pageY` to be inaccurate in the test environment, so you need to set them manually here. addStyle(document.body, 'margin', '0'); diff --git a/src/SelectPicker/test/SelectPickerSpec.tsx b/src/SelectPicker/test/SelectPickerSpec.tsx index 03036edd8..416db5116 100644 --- a/src/SelectPicker/test/SelectPickerSpec.tsx +++ b/src/SelectPicker/test/SelectPickerSpec.tsx @@ -3,7 +3,6 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import sinon from 'sinon'; import { - getDOMNode, getInstance, testStandardProps, testControlledUnControlled, @@ -62,9 +61,9 @@ describe('SelectPicker', () => { }); it('Should have "default" appearance by default', () => { - const instance = getDOMNode(); + const { container } = render(); - expect(instance).to.have.class('rs-picker-default'); + expect(container.firstChild).to.have.class('rs-picker-default'); }); it('Should not clean selected value', () => { @@ -75,9 +74,9 @@ describe('SelectPicker', () => { }); it('Should output a dropdown', () => { - const instance = getDOMNode(); + const { container } = render(); - expect(instance).to.have.class('rs-picker-select'); + expect(container.firstChild).to.have.class('rs-picker-select'); }); it('Should render a hidden with given "name" attribute', () => { @@ -467,13 +466,13 @@ describe('SelectPicker', () => { // eslint-disable-next-line testing-library/no-node-access expect(document.activeElement).to.have.text('Eugenia'); }); + }); - it('Should focus on search input by key=character', () => { - render(); + it('Should focus on search input by key=character', () => { + render(); - fireEvent.keyDown(screen.getByRole('combobox'), { key: 't' }); + fireEvent.keyDown(screen.getByRole('combobox'), { key: 't' }); - expect(screen.getByRole('searchbox')).to.have.focus; - }); + expect(screen.getByRole('searchbox')).to.have.focus; }); }); diff --git a/src/Tree/hooks/useFlattenTree.ts b/src/Tree/hooks/useFlattenTree.ts index a5de7b005..1e5b45253 100644 --- a/src/Tree/hooks/useFlattenTree.ts +++ b/src/Tree/hooks/useFlattenTree.ts @@ -141,8 +141,14 @@ function useFlattenTree(data: TreeNode[], options: UseFlattenTreeOptions) { updateTreeNodeCheckState(value); forceUpdate(); } + + /** + * Add a dependency on data, because when loading data asynchronously through getChildren, + * data may change and the node status needs to be updated. + * @see https://github.com/rsuite/rsuite/issues/3973 + */ // eslint-disable-next-line react-hooks/exhaustive-deps - }, [value]); + }, [value, data]); return flattenedNodes.current; }