From 779a28a364eeefadbde460b29dc5c0bc8b1243b2 Mon Sep 17 00:00:00 2001 From: 1708-huayu <57060237+1708-huayu@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:24:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=A0=91=E4=BB=BB=E5=8A=A1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 629 +++++++++++++------------------ package.json | 2 +- src/pages/DetailLogTask/index.js | 64 +++- src/pages/TaskCount/index.js | 102 +++-- src/pages/ToDoCal/index.jsx | 72 +++- src/pages/ToDoTree/index.js | 85 +---- src/utils/commonConstant.js | 5 + src/utils/copyToClipBoard.js | 39 ++ src/utils/timeFormatUtil.js | 21 +- 9 files changed, 512 insertions(+), 507 deletions(-) create mode 100644 src/utils/commonConstant.js create mode 100644 src/utils/copyToClipBoard.js diff --git a/package-lock.json b/package-lock.json index 14568cf..6473283 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "antd-mobile": "^5.27.0", + "antd-mobile": "^5.28.0", "antd-mobile-icons": "^0.3.0", "axios": "^1.2.2", "dayjs": "^1.11.13", @@ -18,7 +18,6 @@ "js-cookie": "^2.2.1", "node-gyp": "^9.3.1", "react": "^18.2.0", - "react-beautiful-dnd": "^13.1.1", "react-dom": "^18.2.0", "react-router-dom": "^6.6.2", "react-scripts": "5.0.1", @@ -1797,16 +1796,21 @@ } }, "node_modules/@babel/runtime": { - "version": "7.20.7", - "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz", - "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "version": "7.26.0", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/runtime/node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.20.7.tgz", @@ -2128,18 +2132,27 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.1.0.tgz", - "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==" + "version": "1.6.9", + "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.9.tgz", + "integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==", + "dependencies": { + "@floating-ui/utils": "^0.2.9" + } }, "node_modules/@floating-ui/dom": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.1.0.tgz", - "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==", + "version": "1.6.13", + "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.13.tgz", + "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==", "dependencies": { - "@floating-ui/core": "^1.0.5" + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.9" } }, + "node_modules/@floating-ui/utils": { + "version": "0.2.9", + "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.9.tgz", + "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" + }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmmirror.com/@gar/promisify/-/promisify-1.1.3.tgz", @@ -3035,9 +3048,9 @@ } }, "node_modules/@rc-component/mini-decimal": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/@rc-component/mini-decimal/-/mini-decimal-1.0.1.tgz", - "integrity": "sha512-9N8nRk0oKj1qJzANKl+n9eNSMUGsZtjwNuDCiZ/KA+dt1fE3zq5x2XxclRcAbOIXnZcJ53ozP2Pa60gyELXagA==", + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@rc-component/mini-decimal/-/mini-decimal-1.1.0.tgz", + "integrity": "sha512-jS4E7T9Li2GuYwI6PyiVXmxTiM6b07rlD9Ge8uGZSCz3WlzcG5ZK7g5bbuKNeZ9pgUuPK/5guV781ujdVpm4HQ==", "dependencies": { "@babel/runtime": "^7.18.0" }, @@ -3709,15 +3722,6 @@ "@types/node": "*" } }, - "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.6", - "resolved": "https://registry.npmmirror.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.6.tgz", - "integrity": "sha512-lPByRJUer/iN/xa4qpyL0qmL11DqNW81iU/IG1S3uvRUq4oKagz8VCxZjiWkumgt66YT3vOdDgZ0o32sGKtCEw==", - "dependencies": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, "node_modules/@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmmirror.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -3974,11 +3978,6 @@ "node": ">=8" } }, - "node_modules/@types/js-cookie": { - "version": "2.2.7", - "resolved": "https://registry.npmmirror.com/@types/js-cookie/-/js-cookie-2.2.7.tgz", - "integrity": "sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==" - }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -4047,17 +4046,6 @@ "@types/react": "*" } }, - "node_modules/@types/react-redux": { - "version": "7.1.34", - "resolved": "https://registry.npmmirror.com/@types/react-redux/-/react-redux-7.1.34.tgz", - "integrity": "sha512-GdFaVjEbYv4Fthm2ZLvj1VSCedV7TqE5y1kNwnjSdBOTXuRSgowux6J8TAct15T3CKBr63UMk+2CO7ilRhyrAQ==", - "dependencies": { - "@types/hoist-non-react-statics": "^3.3.0", - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0", - "redux": "^4.0.0" - } - }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmmirror.com/@types/resolve/-/resolve-1.17.1.tgz", @@ -4327,16 +4315,16 @@ } }, "node_modules/@use-gesture/core": { - "version": "10.2.20", - "resolved": "https://registry.npmmirror.com/@use-gesture/core/-/core-10.2.20.tgz", - "integrity": "sha512-4lFhHc8so4yIHkBEs641DnEsBxPyhJ5GEjB4PURFDH4p/FcZriH6w99knZgI63zN/MBFfylMyb8+PDuj6RIXKQ==" + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/@use-gesture/core/-/core-10.3.0.tgz", + "integrity": "sha512-rh+6MND31zfHcy9VU3dOZCqGY511lvGcfyJenN4cWZe0u1BH6brBpBddLVXhF2r4BMqWbvxfsbL7D287thJU2A==" }, "node_modules/@use-gesture/react": { - "version": "10.2.20", - "resolved": "https://registry.npmmirror.com/@use-gesture/react/-/react-10.2.20.tgz", - "integrity": "sha512-KnJq9ZSqprWA6uNhWTUHZqTCh+rfa0j8ehTzqeBhktUPrmTj7yVOBvEQ/vSFU/7d72cGgWSsJ0f5T6GQCHXnvg==", + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/@use-gesture/react/-/react-10.3.0.tgz", + "integrity": "sha512-3zc+Ve99z4usVP6l9knYVbVnZgfqhKah7sIG+PS2w+vpig2v2OLct05vs+ZXMzwxdNCMka8B+8WlOo0z6Pn6DA==", "dependencies": { - "@use-gesture/core": "10.2.20" + "@use-gesture/core": "10.3.0" }, "peerDependencies": { "react": ">= 16.8.0" @@ -4646,16 +4634,16 @@ } }, "node_modules/ahooks": { - "version": "3.7.4", - "resolved": "https://registry.npmmirror.com/ahooks/-/ahooks-3.7.4.tgz", - "integrity": "sha512-hvgdqzPUKXn95mK3cGlDCi/ZZqv+FRibCUCFT8zW3hCwLGvixVfnHrIW2/2lgzPdLo8mLjp/XOdIJvcPvE2lgQ==", + "version": "3.8.4", + "resolved": "https://registry.npmmirror.com/ahooks/-/ahooks-3.8.4.tgz", + "integrity": "sha512-39wDEw2ZHvypaT14EpMMk4AzosHWt0z9bulY0BeDsvc9PqJEV+Kjh/4TZfftSsotBMq52iYIOFPd3PR56e0ZJg==", "dependencies": { - "@types/js-cookie": "^2.x.x", - "ahooks-v3-count": "^1.0.0", + "@babel/runtime": "^7.21.0", "dayjs": "^1.9.1", "intersection-observer": "^0.12.0", - "js-cookie": "^2.x.x", + "js-cookie": "^3.0.5", "lodash": "^4.17.21", + "react-fast-compare": "^3.2.2", "resize-observer-polyfill": "^1.5.1", "screenfull": "^5.0.0", "tslib": "^2.4.1" @@ -4667,10 +4655,13 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/ahooks-v3-count": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/ahooks-v3-count/-/ahooks-v3-count-1.0.0.tgz", - "integrity": "sha512-V7uUvAwnimu6eh/PED4mCDjE7tokeZQLKlxg9lCTMPhN+NjsSbtdacByVlR1oluXQzD3MOw55wylDmQo4+S9ZQ==" + "node_modules/ahooks/node_modules/js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "engines": { + "node": ">=14" + } }, "node_modules/ajv": { "version": "6.12.6", @@ -4769,30 +4760,34 @@ } }, "node_modules/antd-mobile": { - "version": "5.27.0", - "resolved": "https://registry.npmmirror.com/antd-mobile/-/antd-mobile-5.27.0.tgz", - "integrity": "sha512-rnRqgn5GDh5K1dNzK7vxguZP5YcruMeL2BcgFJNpGfSw6Tj7U+NQkVybrVd7BeQAWCi8nCLKuunPUhCRrn4q7g==", + "version": "5.38.1", + "resolved": "https://registry.npmmirror.com/antd-mobile/-/antd-mobile-5.38.1.tgz", + "integrity": "sha512-1szLVnmu6hz4iJfKFAsCImJkiLe8FV9IoFChXpnLRBz41wrSfjh7FwPuo0AfFfEuTmV2GYS6BNixiuGscHj+iQ==", "dependencies": { - "@floating-ui/dom": "^1.0.6", - "@rc-component/mini-decimal": "^1.0.1", - "@react-spring/web": "^9.5.5", - "@use-gesture/react": "10.2.20", - "ahooks": "^3.7.2", + "@floating-ui/dom": "^1.4.2", + "@rc-component/mini-decimal": "^1.1.0", + "@react-spring/web": "~9.6.1", + "@use-gesture/react": "10.3.0", + "ahooks": "^3.7.6", "antd-mobile-icons": "^0.3.0", "antd-mobile-v5-count": "^1.0.1", "classnames": "^2.3.2", - "dayjs": "^1.11.6", - "lodash": "^4.17.21", - "rc-field-form": "~1.27.3", - "rc-util": "^5.24.8", - "react-is": "^17.0.2", - "runes": "^0.4.3", + "dayjs": "^1.11.7", + "deepmerge": "^4.3.1", + "nano-memoize": "^3.0.16", + "rc-field-form": "^1.34.2", + "rc-segmented": "~2.4.1", + "rc-util": "^5.38.1", + "react-fast-compare": "^3.2.2", + "react-is": "^18.2.0", + "runes2": "^1.1.2", "staged-components": "^1.1.3", - "tslib": "^2.4.1", + "tslib": "^2.5.0", "use-sync-external-store": "^1.2.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, "node_modules/antd-mobile-icons": { @@ -4805,6 +4800,11 @@ "resolved": "https://registry.npmmirror.com/antd-mobile-v5-count/-/antd-mobile-v5-count-1.0.1.tgz", "integrity": "sha512-YGsiEDCPUDz3SzfXi6gLZn/HpeSMW+jgPc4qiYUr1fSopg3hkUie2TnooJdExgfiETHefH3Ggs58He0OVfegLA==" }, + "node_modules/antd-mobile/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", @@ -6059,14 +6059,6 @@ "postcss": "^8.4" } }, - "node_modules/css-box-model": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/css-box-model/-/css-box-model-1.2.1.tgz", - "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==", - "dependencies": { - "tiny-invariant": "^1.0.6" - } - }, "node_modules/css-declaration-sorter": { "version": "6.3.1", "resolved": "https://registry.npmmirror.com/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", @@ -6493,9 +6485,9 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "engines": { "node": ">=0.10.0" } @@ -8626,19 +8618,6 @@ "he": "bin/he" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmmirror.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmmirror.com/hoopy/-/hoopy-0.1.4.tgz", @@ -11717,11 +11696,6 @@ "node": ">= 4.0.0" } }, - "node_modules/memoize-one": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" - }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -12003,6 +11977,11 @@ "multicast-dns": "cli.js" } }, + "node_modules/nano-memoize": { + "version": "3.0.16", + "resolved": "https://registry.npmmirror.com/nano-memoize/-/nano-memoize-3.0.16.tgz", + "integrity": "sha512-JyK96AKVGAwVeMj3MoMhaSXaUNqgMbCRSQB3trUV8tYZfWEzqUBKdK1qJpfuNXgKeHOx1jv/IEYTM659ly7zUA==" + }, "node_modules/nanoid": { "version": "3.3.4", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz", @@ -13911,11 +13890,6 @@ "performance-now": "^2.1.0" } }, - "node_modules/raf-schd": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/raf-schd/-/raf-schd-4.0.3.tgz", - "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==" - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", @@ -13966,13 +13940,13 @@ } }, "node_modules/rc-field-form": { - "version": "1.27.3", - "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-1.27.3.tgz", - "integrity": "sha512-HGqxHnmGQgkPApEcikV4qTg3BLPC82uB/cwBDftDt1pYaqitJfSl5TFTTUMKVEJVT5RqJ2Zi68ME1HmIMX2HAw==", + "version": "1.44.0", + "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-1.44.0.tgz", + "integrity": "sha512-el7w87fyDUsca63Y/s8qJcq9kNkf/J5h+iTdqG5WsSHLH0e6Usl7QuYSmSVzJMgtp40mOVZIY/W/QP9zwrp1FA==", "dependencies": { "@babel/runtime": "^7.18.0", "async-validator": "^4.1.0", - "rc-util": "^5.8.0" + "rc-util": "^5.32.2" }, "engines": { "node": ">=8.x" @@ -13982,13 +13956,42 @@ "react-dom": ">=16.9.0" } }, + "node_modules/rc-motion": { + "version": "2.9.5", + "resolved": "https://registry.npmmirror.com/rc-motion/-/rc-motion-2.9.5.tgz", + "integrity": "sha512-w+XTUrfh7ArbYEd2582uDrEhmBHwK1ZENJiSJVb7uRxdE7qJSYjbO2eksRXmndqyKqKoYPc9ClpPh5242mV1vA==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.44.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-segmented": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.4.1.tgz", + "integrity": "sha512-KUi+JJFdKnumV9iXlm+BJ00O4NdVBp2TEexLCk6bK1x/RH83TvYKQMzIz/7m3UTRPD08RM/8VG/JNjWgWbd4cw==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-motion": "^2.4.4", + "rc-util": "^5.17.0" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, "node_modules/rc-util": { - "version": "5.27.1", - "resolved": "https://registry.npmmirror.com/rc-util/-/rc-util-5.27.1.tgz", - "integrity": "sha512-PsjHA+f+KBCz+YTZxrl3ukJU5RoNKoe3KSNMh0xGiISbR67NaM9E9BiMjCwxa3AcCUOg/rZ+V0ZKLSimAA+e3w==", + "version": "5.44.3", + "resolved": "https://registry.npmmirror.com/rc-util/-/rc-util-5.44.3.tgz", + "integrity": "sha512-q6KCcOFk3rv/zD3MckhJteZxb0VjAIFuf622B7ElK4vfrZdAzs16XR5p3VTdy3+U5jfJU5ACz4QnhLSuAGe5dA==", "dependencies": { "@babel/runtime": "^7.18.3", - "react-is": "^16.12.0" + "react-is": "^18.2.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -13996,9 +13999,9 @@ } }, "node_modules/rc-util/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/react": { "version": "18.2.0", @@ -14027,25 +14030,6 @@ "node": ">=14" } }, - "node_modules/react-beautiful-dnd": { - "version": "13.1.1", - "resolved": "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz", - "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==", - "deprecated": "react-beautiful-dnd is now deprecated. Context and options: https://github.com/atlassian/react-beautiful-dnd/issues/2672", - "dependencies": { - "@babel/runtime": "^7.9.2", - "css-box-model": "^1.2.0", - "memoize-one": "^5.1.1", - "raf-schd": "^4.0.2", - "react-redux": "^7.2.0", - "redux": "^4.0.4", - "use-memo-one": "^1.1.1" - }, - "peerDependencies": { - "react": "^16.8.5 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-dev-utils": { "version": "12.0.1", "resolved": "https://registry.npmmirror.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz", @@ -14171,6 +14155,11 @@ "resolved": "https://registry.npmmirror.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz", @@ -14181,30 +14170,6 @@ "resolved": "https://registry.npmmirror.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, - "node_modules/react-redux": { - "version": "7.2.9", - "resolved": "https://registry.npmmirror.com/react-redux/-/react-redux-7.2.9.tgz", - "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", - "dependencies": { - "@babel/runtime": "^7.15.4", - "@types/react-redux": "^7.1.20", - "hoist-non-react-statics": "^3.3.2", - "loose-envify": "^1.4.0", - "prop-types": "^15.7.2", - "react-is": "^17.0.2" - }, - "peerDependencies": { - "react": "^16.8.3 || ^17 || ^18" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.11.0.tgz", @@ -14387,14 +14352,6 @@ "node": ">=8" } }, - "node_modules/redux": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", - "dependencies": { - "@babel/runtime": "^7.9.2" - } - }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz", @@ -14733,13 +14690,10 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/runes": { - "version": "0.4.3", - "resolved": "https://registry.npmmirror.com/runes/-/runes-0.4.3.tgz", - "integrity": "sha512-K6p9y4ZyL9wPzA+PMDloNQPfoDGTiFYDvdlXznyGKgD10BJpcAosvATKrExRKOrNLgD8E7Um7WGW0lxsnOuNLg==", - "engines": { - "node": ">=4.0.0" - } + "node_modules/runes2": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/runes2/-/runes2-1.1.4.tgz", + "integrity": "sha512-LNPnEDPOOU4ehF71m5JoQyzT2yxwD6ZreFJ7MxZUAoMKNMY1XrAo60H1CUoX5ncSm0rIuKlqn9JZNRrRkNou2g==" }, "node_modules/safe-buffer": { "version": "5.2.1", @@ -14842,6 +14796,9 @@ "integrity": "sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==", "engines": { "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/select-hose": { @@ -15805,11 +15762,6 @@ "resolved": "https://registry.npmmirror.com/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, - "node_modules/tiny-invariant": { - "version": "1.3.3", - "resolved": "https://registry.npmmirror.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz", - "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmmirror.com/tmpl/-/tmpl-1.0.5.tgz", @@ -15911,9 +15863,9 @@ } }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.8.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -16146,14 +16098,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/use-memo-one": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/use-memo-one/-/use-memo-one-1.1.3.tgz", - "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", @@ -18319,11 +18263,18 @@ } }, "@babel/runtime": { - "version": "7.20.7", - "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz", - "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "version": "7.26.0", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "requires": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + } } }, "@babel/template": { @@ -18539,18 +18490,27 @@ } }, "@floating-ui/core": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.1.0.tgz", - "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==" + "version": "1.6.9", + "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.9.tgz", + "integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==", + "requires": { + "@floating-ui/utils": "^0.2.9" + } }, "@floating-ui/dom": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.1.0.tgz", - "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==", + "version": "1.6.13", + "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.13.tgz", + "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==", "requires": { - "@floating-ui/core": "^1.0.5" + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.9" } }, + "@floating-ui/utils": { + "version": "0.2.9", + "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.9.tgz", + "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" + }, "@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmmirror.com/@gar/promisify/-/promisify-1.1.3.tgz", @@ -19226,9 +19186,9 @@ } }, "@rc-component/mini-decimal": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/@rc-component/mini-decimal/-/mini-decimal-1.0.1.tgz", - "integrity": "sha512-9N8nRk0oKj1qJzANKl+n9eNSMUGsZtjwNuDCiZ/KA+dt1fE3zq5x2XxclRcAbOIXnZcJ53ozP2Pa60gyELXagA==", + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@rc-component/mini-decimal/-/mini-decimal-1.1.0.tgz", + "integrity": "sha512-jS4E7T9Li2GuYwI6PyiVXmxTiM6b07rlD9Ge8uGZSCz3WlzcG5ZK7g5bbuKNeZ9pgUuPK/5guV781ujdVpm4HQ==", "requires": { "@babel/runtime": "^7.18.0" } @@ -19759,15 +19719,6 @@ "@types/node": "*" } }, - "@types/hoist-non-react-statics": { - "version": "3.3.6", - "resolved": "https://registry.npmmirror.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.6.tgz", - "integrity": "sha512-lPByRJUer/iN/xa4qpyL0qmL11DqNW81iU/IG1S3uvRUq4oKagz8VCxZjiWkumgt66YT3vOdDgZ0o32sGKtCEw==", - "requires": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, "@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmmirror.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -19980,11 +19931,6 @@ } } }, - "@types/js-cookie": { - "version": "2.2.7", - "resolved": "https://registry.npmmirror.com/@types/js-cookie/-/js-cookie-2.2.7.tgz", - "integrity": "sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==" - }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -20053,17 +19999,6 @@ "@types/react": "*" } }, - "@types/react-redux": { - "version": "7.1.34", - "resolved": "https://registry.npmmirror.com/@types/react-redux/-/react-redux-7.1.34.tgz", - "integrity": "sha512-GdFaVjEbYv4Fthm2ZLvj1VSCedV7TqE5y1kNwnjSdBOTXuRSgowux6J8TAct15T3CKBr63UMk+2CO7ilRhyrAQ==", - "requires": { - "@types/hoist-non-react-statics": "^3.3.0", - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0", - "redux": "^4.0.0" - } - }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmmirror.com/@types/resolve/-/resolve-1.17.1.tgz", @@ -20266,16 +20201,16 @@ } }, "@use-gesture/core": { - "version": "10.2.20", - "resolved": "https://registry.npmmirror.com/@use-gesture/core/-/core-10.2.20.tgz", - "integrity": "sha512-4lFhHc8so4yIHkBEs641DnEsBxPyhJ5GEjB4PURFDH4p/FcZriH6w99knZgI63zN/MBFfylMyb8+PDuj6RIXKQ==" + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/@use-gesture/core/-/core-10.3.0.tgz", + "integrity": "sha512-rh+6MND31zfHcy9VU3dOZCqGY511lvGcfyJenN4cWZe0u1BH6brBpBddLVXhF2r4BMqWbvxfsbL7D287thJU2A==" }, "@use-gesture/react": { - "version": "10.2.20", - "resolved": "https://registry.npmmirror.com/@use-gesture/react/-/react-10.2.20.tgz", - "integrity": "sha512-KnJq9ZSqprWA6uNhWTUHZqTCh+rfa0j8ehTzqeBhktUPrmTj7yVOBvEQ/vSFU/7d72cGgWSsJ0f5T6GQCHXnvg==", + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/@use-gesture/react/-/react-10.3.0.tgz", + "integrity": "sha512-3zc+Ve99z4usVP6l9knYVbVnZgfqhKah7sIG+PS2w+vpig2v2OLct05vs+ZXMzwxdNCMka8B+8WlOo0z6Pn6DA==", "requires": { - "@use-gesture/core": "10.2.20" + "@use-gesture/core": "10.3.0" } }, "@webassemblyjs/ast": { @@ -20542,26 +20477,28 @@ } }, "ahooks": { - "version": "3.7.4", - "resolved": "https://registry.npmmirror.com/ahooks/-/ahooks-3.7.4.tgz", - "integrity": "sha512-hvgdqzPUKXn95mK3cGlDCi/ZZqv+FRibCUCFT8zW3hCwLGvixVfnHrIW2/2lgzPdLo8mLjp/XOdIJvcPvE2lgQ==", + "version": "3.8.4", + "resolved": "https://registry.npmmirror.com/ahooks/-/ahooks-3.8.4.tgz", + "integrity": "sha512-39wDEw2ZHvypaT14EpMMk4AzosHWt0z9bulY0BeDsvc9PqJEV+Kjh/4TZfftSsotBMq52iYIOFPd3PR56e0ZJg==", "requires": { - "@types/js-cookie": "^2.x.x", - "ahooks-v3-count": "^1.0.0", + "@babel/runtime": "^7.21.0", "dayjs": "^1.9.1", "intersection-observer": "^0.12.0", - "js-cookie": "^2.x.x", + "js-cookie": "^3.0.5", "lodash": "^4.17.21", + "react-fast-compare": "^3.2.2", "resize-observer-polyfill": "^1.5.1", "screenfull": "^5.0.0", "tslib": "^2.4.1" + }, + "dependencies": { + "js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==" + } } }, - "ahooks-v3-count": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/ahooks-v3-count/-/ahooks-v3-count-1.0.0.tgz", - "integrity": "sha512-V7uUvAwnimu6eh/PED4mCDjE7tokeZQLKlxg9lCTMPhN+NjsSbtdacByVlR1oluXQzD3MOw55wylDmQo4+S9ZQ==" - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", @@ -20633,27 +20570,37 @@ } }, "antd-mobile": { - "version": "5.27.0", - "resolved": "https://registry.npmmirror.com/antd-mobile/-/antd-mobile-5.27.0.tgz", - "integrity": "sha512-rnRqgn5GDh5K1dNzK7vxguZP5YcruMeL2BcgFJNpGfSw6Tj7U+NQkVybrVd7BeQAWCi8nCLKuunPUhCRrn4q7g==", + "version": "5.38.1", + "resolved": "https://registry.npmmirror.com/antd-mobile/-/antd-mobile-5.38.1.tgz", + "integrity": "sha512-1szLVnmu6hz4iJfKFAsCImJkiLe8FV9IoFChXpnLRBz41wrSfjh7FwPuo0AfFfEuTmV2GYS6BNixiuGscHj+iQ==", "requires": { - "@floating-ui/dom": "^1.0.6", - "@rc-component/mini-decimal": "^1.0.1", - "@react-spring/web": "^9.5.5", - "@use-gesture/react": "10.2.20", - "ahooks": "^3.7.2", + "@floating-ui/dom": "^1.4.2", + "@rc-component/mini-decimal": "^1.1.0", + "@react-spring/web": "~9.6.1", + "@use-gesture/react": "10.3.0", + "ahooks": "^3.7.6", "antd-mobile-icons": "^0.3.0", "antd-mobile-v5-count": "^1.0.1", "classnames": "^2.3.2", - "dayjs": "^1.11.6", - "lodash": "^4.17.21", - "rc-field-form": "~1.27.3", - "rc-util": "^5.24.8", - "react-is": "^17.0.2", - "runes": "^0.4.3", + "dayjs": "^1.11.7", + "deepmerge": "^4.3.1", + "nano-memoize": "^3.0.16", + "rc-field-form": "^1.34.2", + "rc-segmented": "~2.4.1", + "rc-util": "^5.38.1", + "react-fast-compare": "^3.2.2", + "react-is": "^18.2.0", + "runes2": "^1.1.2", "staged-components": "^1.1.3", - "tslib": "^2.4.1", + "tslib": "^2.5.0", "use-sync-external-store": "^1.2.0" + }, + "dependencies": { + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + } } }, "antd-mobile-icons": { @@ -21676,14 +21623,6 @@ "postcss-selector-parser": "^6.0.9" } }, - "css-box-model": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/css-box-model/-/css-box-model-1.2.1.tgz", - "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==", - "requires": { - "tiny-invariant": "^1.0.6" - } - }, "css-declaration-sorter": { "version": "6.3.1", "resolved": "https://registry.npmmirror.com/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", @@ -22006,9 +21945,9 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==" }, "default-gateway": { "version": "6.0.3", @@ -23676,21 +23615,6 @@ "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, - "hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmmirror.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "requires": { - "react-is": "^16.7.0" - }, - "dependencies": { - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - } - } - }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmmirror.com/hoopy/-/hoopy-0.1.4.tgz", @@ -26100,11 +26024,6 @@ "fs-monkey": "^1.0.3" } }, - "memoize-one": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -26321,6 +26240,11 @@ "thunky": "^1.0.2" } }, + "nano-memoize": { + "version": "3.0.16", + "resolved": "https://registry.npmmirror.com/nano-memoize/-/nano-memoize-3.0.16.tgz", + "integrity": "sha512-JyK96AKVGAwVeMj3MoMhaSXaUNqgMbCRSQB3trUV8tYZfWEzqUBKdK1qJpfuNXgKeHOx1jv/IEYTM659ly7zUA==" + }, "nanoid": { "version": "3.3.4", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz", @@ -27637,11 +27561,6 @@ "performance-now": "^2.1.0" } }, - "raf-schd": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/raf-schd/-/raf-schd-4.0.3.tgz", - "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==" - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", @@ -27682,28 +27601,49 @@ } }, "rc-field-form": { - "version": "1.27.3", - "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-1.27.3.tgz", - "integrity": "sha512-HGqxHnmGQgkPApEcikV4qTg3BLPC82uB/cwBDftDt1pYaqitJfSl5TFTTUMKVEJVT5RqJ2Zi68ME1HmIMX2HAw==", + "version": "1.44.0", + "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-1.44.0.tgz", + "integrity": "sha512-el7w87fyDUsca63Y/s8qJcq9kNkf/J5h+iTdqG5WsSHLH0e6Usl7QuYSmSVzJMgtp40mOVZIY/W/QP9zwrp1FA==", "requires": { "@babel/runtime": "^7.18.0", "async-validator": "^4.1.0", - "rc-util": "^5.8.0" + "rc-util": "^5.32.2" + } + }, + "rc-motion": { + "version": "2.9.5", + "resolved": "https://registry.npmmirror.com/rc-motion/-/rc-motion-2.9.5.tgz", + "integrity": "sha512-w+XTUrfh7ArbYEd2582uDrEhmBHwK1ZENJiSJVb7uRxdE7qJSYjbO2eksRXmndqyKqKoYPc9ClpPh5242mV1vA==", + "requires": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.44.0" + } + }, + "rc-segmented": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.4.1.tgz", + "integrity": "sha512-KUi+JJFdKnumV9iXlm+BJ00O4NdVBp2TEexLCk6bK1x/RH83TvYKQMzIz/7m3UTRPD08RM/8VG/JNjWgWbd4cw==", + "requires": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-motion": "^2.4.4", + "rc-util": "^5.17.0" } }, "rc-util": { - "version": "5.27.1", - "resolved": "https://registry.npmmirror.com/rc-util/-/rc-util-5.27.1.tgz", - "integrity": "sha512-PsjHA+f+KBCz+YTZxrl3ukJU5RoNKoe3KSNMh0xGiISbR67NaM9E9BiMjCwxa3AcCUOg/rZ+V0ZKLSimAA+e3w==", + "version": "5.44.3", + "resolved": "https://registry.npmmirror.com/rc-util/-/rc-util-5.44.3.tgz", + "integrity": "sha512-q6KCcOFk3rv/zD3MckhJteZxb0VjAIFuf622B7ElK4vfrZdAzs16XR5p3VTdy3+U5jfJU5ACz4QnhLSuAGe5dA==", "requires": { "@babel/runtime": "^7.18.3", - "react-is": "^16.12.0" + "react-is": "^18.2.0" }, "dependencies": { "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" } } }, @@ -27728,20 +27668,6 @@ "whatwg-fetch": "^3.6.2" } }, - "react-beautiful-dnd": { - "version": "13.1.1", - "resolved": "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz", - "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==", - "requires": { - "@babel/runtime": "^7.9.2", - "css-box-model": "^1.2.0", - "memoize-one": "^5.1.1", - "raf-schd": "^4.0.2", - "react-redux": "^7.2.0", - "redux": "^4.0.4", - "use-memo-one": "^1.1.1" - } - }, "react-dev-utils": { "version": "12.0.1", "resolved": "https://registry.npmmirror.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz", @@ -27842,6 +27768,11 @@ "resolved": "https://registry.npmmirror.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz", @@ -27852,19 +27783,6 @@ "resolved": "https://registry.npmmirror.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, - "react-redux": { - "version": "7.2.9", - "resolved": "https://registry.npmmirror.com/react-redux/-/react-redux-7.2.9.tgz", - "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", - "requires": { - "@babel/runtime": "^7.15.4", - "@types/react-redux": "^7.1.20", - "hoist-non-react-statics": "^3.3.2", - "loose-envify": "^1.4.0", - "prop-types": "^15.7.2", - "react-is": "^17.0.2" - } - }, "react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.11.0.tgz", @@ -27998,14 +27916,6 @@ "strip-indent": "^3.0.0" } }, - "redux": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", - "requires": { - "@babel/runtime": "^7.9.2" - } - }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz", @@ -28261,10 +28171,10 @@ "queue-microtask": "^1.2.2" } }, - "runes": { - "version": "0.4.3", - "resolved": "https://registry.npmmirror.com/runes/-/runes-0.4.3.tgz", - "integrity": "sha512-K6p9y4ZyL9wPzA+PMDloNQPfoDGTiFYDvdlXznyGKgD10BJpcAosvATKrExRKOrNLgD8E7Um7WGW0lxsnOuNLg==" + "runes2": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/runes2/-/runes2-1.1.4.tgz", + "integrity": "sha512-LNPnEDPOOU4ehF71m5JoQyzT2yxwD6ZreFJ7MxZUAoMKNMY1XrAo60H1CUoX5ncSm0rIuKlqn9JZNRrRkNou2g==" }, "safe-buffer": { "version": "5.2.1", @@ -29114,11 +29024,6 @@ "resolved": "https://registry.npmmirror.com/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, - "tiny-invariant": { - "version": "1.3.3", - "resolved": "https://registry.npmmirror.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz", - "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" - }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmmirror.com/tmpl/-/tmpl-1.0.5.tgz", @@ -29200,9 +29105,9 @@ } }, "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.8.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "tsutils": { "version": "3.21.0", @@ -29375,12 +29280,6 @@ "requires-port": "^1.0.0" } }, - "use-memo-one": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/use-memo-one/-/use-memo-one-1.1.3.tgz", - "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", - "requires": {} - }, "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", diff --git a/package.json b/package.json index 1b61d72..e8ac67c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "antd-mobile": "^5.27.0", + "antd-mobile": "^5.28.0", "antd-mobile-icons": "^0.3.0", "axios": "^1.2.2", "dayjs": "^1.11.13", diff --git a/src/pages/DetailLogTask/index.js b/src/pages/DetailLogTask/index.js index f2f077d..d1fe29c 100644 --- a/src/pages/DetailLogTask/index.js +++ b/src/pages/DetailLogTask/index.js @@ -1,9 +1,10 @@ -import {Button, Divider, TextArea} from "antd-mobile"; +import {ActionSheet, Button, Dialog, Divider, Tabs, TextArea, Toast} from "antd-mobile"; import {Fragment, useEffect, useMemo, useRef, useState} from "react"; import "./index.css" import {useOutletContext, useSearchParams} from "react-router-dom"; import {addTaskLog, listTaskLog} from "../../api/detailLogTaskApi"; import dayjs from "dayjs"; +import {copyTextToClipboard} from "../../utils/copyToClipBoard"; export function DetailLogTask() { // 设置标题栏 @@ -13,11 +14,32 @@ export function DetailLogTask() { setRightDesc(); }, []) let [params] = useSearchParams(); + + // 发送展示日记 + const [currentShow, setCurrentShow] = useState('need'); const textAreaRef = useRef(null); - const [taskLogMap, setTaskLogMap] = useState([]); const [taskLogList, setTaskLogList] = useState([]); const [sendValue, setSendValue] = useState([]); + // 点击操作面板 + const [actionSheetVisible, setActionSheetVisible] = useState(false) + const [currentTask, setCurrentTask] = useState({}); + const [actions,setActions] = useState([ + { text: '复制', key: 'copy' }, + { text: '有效', key: 'edit' }, + { text: '创建任务', key: 'addTask'}, + { + text: '删除', + key: 'delete', + onClick: async () => { + const result = await Dialog.confirm({ content: '确定要删除吗?' }) + if (result) { + Toast.show('执行了删除操作') + } + }, + }, + ]); + const taskLogMapMemory = useMemo(() => { return taskLogList.reduce((map, taskLog) => { if (!map.has(dayjs(taskLog.createdDate).format("YYYY-MM-DD"))) { @@ -42,7 +64,14 @@ export function DetailLogTask() { textAreaRef.current.focus(); // 获取之前的日志信息,根据日期分组排序,遍历map listTaskLog(`{ - "sortList":[{"direction":"DESC","property":"createdDate"}] + "sortList":[{"direction":"DESC","property":"createdDate"}], + "data": { + "andList":[{ + "name":"taskId", + "operateType":"=", + "value":"${params.get('id')}" + }] + } }`).then(res => { console.log({res}) if (res.content.length > 0) { @@ -57,9 +86,17 @@ export function DetailLogTask() { } }) }, []) + function NoNeed(){ + return 失效 + } return
+ setCurrentShow(key)}> + + + /> + { Array.from(taskLogMapMemory.keys()).map(key => { return ( @@ -72,7 +109,13 @@ export function DetailLogTask() {
} {taskLogMapMemory.get(key).map(taskLog => { return
- {taskLog.description} + { + actions[1]={ text: '失效', key: 'edit' } + // setActions([...actions]) + setCurrentTask(taskLog) + setActionSheetVisible(true) + }}> + {taskLog.description}
})}) }) @@ -96,6 +139,19 @@ export function DetailLogTask() { onClick={handleSend} >发送 + setActionSheetVisible(false)} + onAction={action => { + if (action.key === 'copy') { + copyTextToClipboard(currentTask.description) + } + setActionSheetVisible(false) + }} + />
diff --git a/src/pages/TaskCount/index.js b/src/pages/TaskCount/index.js index ffbaa8e..5bf2523 100644 --- a/src/pages/TaskCount/index.js +++ b/src/pages/TaskCount/index.js @@ -3,40 +3,19 @@ import {getTaskCount} from "../../utils"; import dayjs from "dayjs"; import {DATE_FORMAT, dayStartUtcFormat, nextDayStartUtcFormat} from "../../utils/timeFormatUtil"; import {getDictionary} from "../../utils/dictUtil"; -import {Tag} from "antd-mobile"; +import {Divider, Tag} from "antd-mobile"; import {useNavigate} from "react-router-dom"; import {MyRootContext, UPDATE_SEARCH} from "../../components/MyRootContext"; const TaskCount = (props) => { - let currentDay = props.currentDay; + const {currentDay, taskCount, today, backToToday} = props; const navigate = useNavigate(); - const [taskCount, setTaskCount] = React.useState([]); const [stateMap, setStateMap] = React.useState(new Map); const [priorityMap, setPriorityMap] = React.useState(new Map); - const {dispatch } = useContext(MyRootContext); - useEffect(() => { - console.log("useEffect"); - if (currentDay) { - getTaskCount(dayStartUtcFormat(currentDay), - nextDayStartUtcFormat(currentDay)) - .then(taskCount => { - setTaskCount(taskCount) - }) - getDictionary("2").then(state => { - setStateMap(state) - }) - getDictionary("1").then(priority => { - console.log(priority) - setPriorityMap(priority) - }) - }else { - setTaskCount([]) - } + const {dispatch} = useContext(MyRootContext); - }, [currentDay]) - - const todoDayDetail = ()=>{ + const todoDayDetail = () => { let andSearchModel = {} let orSearchModel = {andSearchModel} if (currentDay) { @@ -82,49 +61,56 @@ const TaskCount = (props) => { } } console.log({orSearchModel}) - dispatch({type:UPDATE_SEARCH,search:{ + dispatch({ + type: UPDATE_SEARCH, search: { "pageSize": 12, "pageNumber": 1, "data": { orSearchModel } - }}) + } + }) navigate("/home/listTask") } + useEffect(() => { + console.log("useEffect"); + getDictionary("2").then(state => { + setStateMap(state) + }) + getDictionary("1").then(priority => { + console.log(priority) + setPriorityMap(priority) + }) + }, []) return ( -
+

TODO日{currentDay && dayjs(currentDay).format(DATE_FORMAT)}代办: - {currentDay&&详情}

-

任务状态

- { - // taskCount.map(task => { - // // if (dayjs(task.todoDay).isSame(dayjs(currentDay))){ - // // console.log(dict); - // // return {task.todoDay} - // return Array.from(stateMap.entries()).map(([item,value]) => { - // console.log("key",item,"value",value,task.state) - // return value.itemName + task.state[item] - // }) - // - // // return task.priority.map((key,value)=>getDictionary(2).get(key)+value) - // // } - // }) - taskCount[0] && Object.keys(taskCount[0].state).map(ob => { - return
{stateMap.get(ob).itemName} 共 - {taskCount[0].state[ob]} 项代办;
; - }) - } -

优先级

- { - taskCount[0] && Object.keys(taskCount[0].priority).map(ob => { - console.log("stateMap.get(ob).jsonValue?.color", priorityMap.get(ob)) - return
{priorityMap.get(ob).itemName} 共 - {taskCount[0].priority[ob]} 项代办;
; - }) + {currentDay && 详情} + {!dayjs(currentDay).isSame(today, 'date') && + backToToday()}>回到今天} + + {taskCount.filter(taskC => dayjs(taskC.todoDay).isSame(dayjs(currentDay), 'date'))?.map(taskC => { + return +

任务状态

+ { + Object.keys(taskC.state).map(ob => { + return
{stateMap.get(ob).itemName} 共 + {taskC.state[ob]} 项代办;
; + })} +

优先级

+ { + Object.keys(taskC.priority).map(ob => { + console.log("stateMap.get(ob).jsonValue?.color", priorityMap.get(ob)) + return
{priorityMap.get(ob).itemName} 共 + {taskC.priority[ob]} 项代办;
; + }) + } +
+ }) }
) diff --git a/src/pages/ToDoCal/index.jsx b/src/pages/ToDoCal/index.jsx index 62e2f12..f69e0b9 100644 --- a/src/pages/ToDoCal/index.jsx +++ b/src/pages/ToDoCal/index.jsx @@ -1,26 +1,82 @@ -import {Calendar} from "antd-mobile"; +import {Calendar, Tag} from "antd-mobile"; import dayjs from "dayjs"; import {TaskCount} from "../TaskCount"; -import React,{Fragment} from "react"; +import React, {Fragment, useEffect, useLayoutEffect, useRef} from "react"; + +import { + dateStartUtcFormat, + nextDateStartUtcFormat, +} from "../../utils/timeFormatUtil"; +import {getTaskCount} from "../../utils"; +import {FrownFill, SmileFill} from "antd-mobile-icons"; +import {NEW, OVERDUE, UNDER_WAY} from "../../utils/commonConstant"; const ToDoCal = (props) => { + const calRef = useRef(null); const [currentDay, setCurrentDay] = React.useState(new Date()) - const today = dayjs() + const today = new Date() + const [allDay,setAllDay] = React.useState([]) + const [taskCount,setTaskCount] = React.useState([]) + function listTaskCount(){ + if (allDay.length === 0){ + return + } + getTaskCount(dateStartUtcFormat(allDay[0]), + nextDateStartUtcFormat(allDay[allDay.length-1])) + .then(res => { + setTaskCount(res) + }) + } + useLayoutEffect(()=>{ + console.log("useLayoutEffect",allDay) + + listTaskCount(); + },[]) + function backToToday(){ + calRef.current.jumpToToday(); + setCurrentDay(today) + } return ( { - if (dayjs(date).isSame(today, 'day')) return '今天' - if (date.getDay() === 0 || date.getDay() === 6) { - return '周末' - } + allDay.push(date) + + // 没有任务不显示 + return taskCount.filter(taskC => dayjs(taskC.todoDay).isSame(dayjs(date), 'date'))?.map(taskC => { + // 如果有逾期的 红色 + // Object.keys() 返回一个包含对象自身所有可枚举属性的数组 + // Object.entries() 返回一个包含对象所有可枚举属性的键值对数组。 + if (Object.keys(taskC.state).length>0){ + console.log("taskC.state",taskC.state) + if (taskC.state[OVERDUE]){ + return ; + } + // 如果有未完成的任务 warn + if (taskC.state[NEW]||taskC.state[UNDER_WAY]){ + return ; + } + // 任务全部完成 绿色 + return ; + } + }) + + // if (dayjs(date).isSame(today, 'day')) return '今天' + // if (date.getDay() === 0 || date.getDay() === 6) { + // return '周末' + // } }} + // renderDate={date=>{ + // return {dayjs(date).date()} + // }} defaultValue={currentDay} onChange={val => { setCurrentDay(val) }} + /> - + ) } diff --git a/src/pages/ToDoTree/index.js b/src/pages/ToDoTree/index.js index f6d15c8..b6cec44 100644 --- a/src/pages/ToDoTree/index.js +++ b/src/pages/ToDoTree/index.js @@ -1,79 +1,24 @@ -import {Fragment, useEffect, useMemo, useState} from "react"; -import {Card, Cascader, CascaderView} from "antd-mobile"; -import {getTaskByPid} from "../../utils"; -import dayjs from "dayjs"; -import {DATE_TIME_FORMAT} from "../../utils/timeFormatUtil"; +import {Fragment} from "react"; +import {Card, CascaderView, Dialog, Toast} from "antd-mobile"; + import {useChildList} from "../../hooks/useChildList"; +import {useNavigate} from "react-router-dom"; export default () => { - // const [valueToOptions, setValueToOptions] = useState([]) - // const [currentTask, setCurrentTask] = useState({ - // name:"想做的事情", - // description:"想做的事情描述", - // expectedStartTime:dayjs().format(DATE_TIME_FORMAT), - // expectedEndTime:"", - // state:"", - // priority:"", - // }) - // const options = useMemo(() => { - // function generate(v) { - // const options = valueToOptions[v] - // if (options === null || options === undefined) { - // return undefined - // } - // // if (options === undefined) { - // // return Cascader.optionSkeleton - // // } - // return options.map(option => ({ - // ...option, - // children: generate(option.value), - // })) - // } - // - // return generate('0') ?? [] - // }, [valueToOptions]) - // - // async function fetchOptionsForValue(v, level) { - // if (v in valueToOptions) return - // // if (level >= 3) { - // // setValueToOptions(prev => ({ - // // ...prev, - // // [v]: null, - // // })) - // // return - // // } - // const data = await getTaskByPid(v) - // console.log("await getTaskByPid(v)", data.content) - // const options = - // data.content.length === 0 - // ? null - // : data.content.map(task => ({ - // value: task.id, - // label: task.name, - // })) - // console.log("await getTaskByPid(v) options", options) - // if (options){ - // setValueToOptions(prev => ({ - // ...prev, - // [v]: options, - // })) - // }else { - // setValueToOptions(prev => ({ - // ...prev, - // [v]: undefined, - // })) - // } - // } - - // useEffect(() => { - // fetchOptionsForValue('0', 0) - // }, []) - const {task, options, changeTaskId,} = useChildList(); + const navigate = useNavigate(); return - + { + if (task&&task.id) { + const result = await Dialog.confirm({ content: '确定要进入详情页吗?' }) + if (result) { + navigate(`/detail/selectTask?id=${task.id}`) + } + } + }} + >

{task?.description}

-

预计开始时间:{task?.expectedStartTime}

预计结束时间:{task?.expectedEndTime}

diff --git a/src/utils/commonConstant.js b/src/utils/commonConstant.js new file mode 100644 index 0000000..251a0b3 --- /dev/null +++ b/src/utils/commonConstant.js @@ -0,0 +1,5 @@ +const OVERDUE= '10'; +const COMPLETE = '7'; +const NEW = '8'; +const UNDER_WAY = '9'; +export { OVERDUE, COMPLETE, NEW, UNDER_WAY }; \ No newline at end of file diff --git a/src/utils/copyToClipBoard.js b/src/utils/copyToClipBoard.js new file mode 100644 index 0000000..273f13b --- /dev/null +++ b/src/utils/copyToClipBoard.js @@ -0,0 +1,39 @@ +export function copyTextToClipboard(text) { + return new Promise((resolve, reject) => { + if (navigator.clipboard && window.isSecureContext) { + // 尝试使用现代剪贴板 API + navigator.clipboard.writeText(text) + .then(() => resolve('文本已成功复制到剪贴板')) + .catch((err) => reject(`无法复制文本:${err.message}`)); + } else { + // 回退到旧方法 + fallbackCopyTextToClipboard(text) + .then(message => resolve(message)) + .catch(err => reject(err)); + } + }); +} + +function fallbackCopyTextToClipboard(text) { + return new Promise((resolve, reject) => { + const textArea = document.createElement("textarea"); + textArea.value = text; + + // 避免 CSS 样式影响滚动条 + textArea.style.position = 'fixed'; + textArea.style.left = '-9999px'; + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + + try { + const successful = document.execCommand('copy'); + const msg = successful ? '文本已成功复制到剪贴板' : '无法复制文本'; + resolve(msg); + } catch (err) { + reject(`无法复制文本:${err.message}`); + } + + document.body.removeChild(textArea); + }); +} \ No newline at end of file diff --git a/src/utils/timeFormatUtil.js b/src/utils/timeFormatUtil.js index 6470191..2884992 100644 --- a/src/utils/timeFormatUtil.js +++ b/src/utils/timeFormatUtil.js @@ -21,6 +21,22 @@ function dayStartUtcFormat(dayjsString) { return dayJsObj.set('h', 0).set('m', 0).set('s', 0).set('ms', 0).utc().format() } +function dateStartUtcFormat(dateObject) { + if (!dateObject) { + return + } + let dayJsObj= dayjs(dateObject); + return dayJsObj.set('h', 0).set('m', 0).set('s', 0).set('ms', 0).utc().format() +} + +function nextDateStartUtcFormat(dateObject) { + if (!dateObject) { + return + } + let dayJsObj= dayjs(dateObject); + return dayJsObj.add(1, "d").set('h', 0).set('m', 0).set('s', 0).set('ms', 0).utc().format() +} + function nextDayStartUtcFormat(dayjsString) { if (!dayjsString) { return @@ -34,4 +50,7 @@ function nextDayStartUtcFormat(dayjsString) { return dayJsObj.add(1, "d").set('h', 0).set('m', 0).set('s', 0).set('ms', 0).utc().format() } -export {DATE_TIME_FORMAT, DATE_FORMAT,DATE_TIME_FORMAT_SIMPLE,dayStartUtcFormat,nextDayStartUtcFormat} \ No newline at end of file +export {DATE_TIME_FORMAT, DATE_FORMAT,DATE_TIME_FORMAT_SIMPLE, + dayStartUtcFormat,nextDayStartUtcFormat, + dateStartUtcFormat,nextDateStartUtcFormat, +} \ No newline at end of file