diff --git a/package.json b/package.json index 15ac71c..a09fc44 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "classnames": "^2.5.1", "dom-renderer": "^2.1.8", "echarts": "^5.5.0", - "echarts-jsx": "^1.2.0", + "echarts-jsx": "^1.2.1", "github-web-widget": "^4.0.0-rc.2", "koajax": "^1.1.2", "mobx": "^6.12.4", @@ -47,6 +47,7 @@ "parcel-transformer-markdown": "^3.0.1", "prettier": "^3.3.2", "process": "^0.11.10", + "rimraf": "^6.0.1", "tsx": "^4.15.6", "typescript": "~5.4.5", "workbox-cli": "^7.1.0" @@ -73,7 +74,7 @@ "scripts": { "prepare": "husky", "test": "lint-staged && tsc --noEmit", - "clean": "rm -rf .parcel-cache/ dist/", + "clean": "rimraf .parcel-cache/ dist/", "start:local": "npm run clean && cross-env HTTP_ENV=local parcel source/index.html --open", "start:remote": "npm run clean && cross-env HTTP_ENV=remote parcel source/index.html --open", "start": "npm run clean && cross-env HTTP_ENV=test parcel source/index.html --open", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1218fc1..ccdeecc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^5.5.0 version: 5.5.0 echarts-jsx: - specifier: ^1.2.0 - version: 1.2.0(typescript@5.4.5) + specifier: ^1.2.1 + version: 1.2.1(typescript@5.4.5) github-web-widget: specifier: ^4.0.0-rc.2 version: 4.0.0-rc.2(element-internals-polyfill@1.3.11)(typescript@5.4.5) @@ -105,6 +105,9 @@ importers: process: specifier: ^0.11.10 version: 0.11.10 + rimraf: + specifier: ^6.0.1 + version: 6.0.1 tsx: specifier: ^4.15.6 version: 4.15.6 @@ -915,6 +918,10 @@ packages: '@humanwhocodes/object-schema@2.0.2': resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + '@jridgewell/gen-mapping@0.3.3': resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -1362,30 +1369,35 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-glibc@2.4.0': resolution: {integrity: sha512-QuJTAQdsd7PFW9jNGaV9Pw+ZMWV9wKThEzzlY3Lhnnwy7iW23qtQFPql8iEaSFMCVI5StNNmONUopk+MFKpiKg==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.4.0': resolution: {integrity: sha512-oyN+uA9xcTDo/45bwsd6TFHa7Lc7hKujyMlvwrCLvSckvWogndCEoVYFNfZ6JJ2KNL/6fFiGPcbjp8jJmEh5Ng==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.4.0': resolution: {integrity: sha512-KphV8awJmxU3q52JQvJot0QMu07CIyEjV+2Tb2ZtbucEgqyRcxOBDMsqp1JNq5nuDXtcCC0uHQICeiEz38dPBQ==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.4.0': resolution: {integrity: sha512-7jzcOonpXNWcSijPpKD5IbC6xC7yTibjJw9jviVzZostYLGxbz8LDJLUnLzLzhASPlPGgpeKLtFUMjAAzM+gSA==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.4.0': resolution: {integrity: sha512-NOej2lqlq8bQNYhUMnOD0nwvNql8ToQF+1Zhi9ULZoG+XTtJ9hNnCFfyICxoZLXor4bBPTOnzs/aVVoefYnjIg==} @@ -1421,6 +1433,10 @@ packages: peerDependencies: '@parcel/core': ^2.12.0 + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + '@rollup/plugin-babel@5.3.1': resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} @@ -1500,24 +1516,28 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.4.1': resolution: {integrity: sha512-b/vWGQo2n7lZVUnSQ7NBq3Qrj85GrAPPiRbpqaIGwOytiFSk8VULFihbEUwDe0rXgY4LDm8z8wkgADZcLnmdUA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.4.1': resolution: {integrity: sha512-AFMQlvkKEdNi1Vk2GFTxxJzbICttBsOQaXa98kFTeWTnFFIyiIj2w7Sk8XRTEJ/AjF8ia8JPKb1zddBWr9+bEQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.4.1': resolution: {integrity: sha512-QX2MxIECX1gfvUVZY+jk528/oFkS9MAl76e3ZRvG2KC/aKlCQL0KSzcTSm13mOxkDKS30EaGRDRQWNukGpMeRg==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.4.1': resolution: {integrity: sha512-OklkJYXXI/tntD2zaY8i3iZldpyDw5q+NAP3k9OlQ7wXXf37djRsHLV0NW4+ZNHBjE9xp2RsXJ0jlOJhfgGoFA==} @@ -2022,6 +2042,11 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} + declarative-shadow-dom-polyfill@0.4.0: + resolution: {integrity: sha512-a3c/x43EIo+gzc7ZPY1NuOowPOClqaaU+5G1wwOG7h5xQ8UhZPM6NYcSDsvhTn9Pyc275pmvSUPPY+r4pPTOVA==} + peerDependencies: + typescript: '>=5.5.3' + decompress-response@3.3.0: resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} engines: {node: '>=4'} @@ -2071,6 +2096,9 @@ packages: dom-renderer@2.1.8: resolution: {integrity: sha512-XciJAb8pAFAlpFOBO79njazvbfNzA16+045Uie5kZORSu+NY5X2cecjI4nyT4M4ji0nzRsF8P8KHH8xvKM1cdg==} + dom-renderer@2.3.0: + resolution: {integrity: sha512-HSYhONmJqFc/wsRmQIm+Lw2DGoVn3T99t0rh3A9/bZvlm82THWM+QYjSC7SyM8EIybvhjPt94LoXnxlyai3ncA==} + dom-serializer@1.4.1: resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} @@ -2098,8 +2126,11 @@ packages: duplexer3@0.1.5: resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} - echarts-jsx@1.2.0: - resolution: {integrity: sha512-ZMlNsj8KcQAr6pz1YErPYMkamPqjKMs8cq2dtWdiFHXERDuTgQrK1oulzYHB+iZuqxxkygqhLIjKwTrJNq1OIQ==} + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + echarts-jsx@1.2.1: + resolution: {integrity: sha512-epcIsL91qcVbd/3gzKPa1cxSqhBtcG5uphDwse6edzTd8m61WGg3O/Sr/DBI5/nZISuOCKBbT0INdMrw1IzCfQ==} peerDependencies: '@webcomponents/webcomponentsjs': ^2.8 @@ -2123,6 +2154,9 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} @@ -2294,6 +2328,10 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} @@ -2368,6 +2406,11 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} @@ -2710,6 +2753,10 @@ packages: iterable-observer@1.0.1: resolution: {integrity: sha512-qy2Kuf1drKVmWgWaRsqdM8EHanAW4xS37j1nFdVP07qiN0Mj4D5sl9dYA8mZJdX/d3De4bhZoFuVWXvcOM1usg==} + jackspeak@4.0.1: + resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} + engines: {node: 20 || >=22} + jake@10.8.7: resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==} engines: {node: '>=10'} @@ -2831,24 +2878,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.23.0: resolution: {integrity: sha512-cU00LGb6GUXCwof6ACgSMKo3q7XYbsyTj0WsKHLi1nw7pV0NCq8nFTn6ZRBYLoKiV8t+jWl0Hv8KkgymmK5L5g==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.23.0: resolution: {integrity: sha512-q4jdx5+5NfB0/qMbXbOmuC6oo7caPnFghJbIAV90cXZqgV8Am3miZhC4p+sQVdacqxfd+3nrle4C8icR3p1AYw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.23.0: resolution: {integrity: sha512-G9Ri3qpmF4qef2CV/80dADHKXRAQeQXpQTLx7AiQrBYQHqBjB75oxqj06FCIe5g4hNCqLPnM9fsO4CyiT1sFSQ==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-x64-msvc@1.23.0: resolution: {integrity: sha512-1rcBDJLU+obPPJM6qR5fgBUiCdZwZLafZM5f9kwjFLkb/UBNIzmae39uCSmh71nzPCTXZqHbvwu23OWnWEz+eg==} @@ -2916,6 +2967,10 @@ packages: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} + lru-cache@11.0.0: + resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==} + engines: {node: 20 || >=22} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -2995,6 +3050,10 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -3013,6 +3072,10 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + mobx-github@0.3.2: resolution: {integrity: sha512-Q0MugbQ8iTxaazzauBbyuqZAdS57s6DoROISh4ENbYG2dXyu72EV9Kb6k/8QjQDKgLBD/5dRW16znMExPWFWKw==} @@ -3159,6 +3222,9 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-json@6.5.0: resolution: {integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==} engines: {node: '>=8'} @@ -3205,6 +3271,10 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3395,6 +3465,12 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} hasBin: true rollup@2.79.1: @@ -3535,6 +3611,10 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + string-width@7.1.0: resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} engines: {node: '>=18'} @@ -3898,6 +3978,14 @@ packages: workbox-window@7.1.0: resolution: {integrity: sha512-ZHeROyqR+AS5UPzholQRDttLFqGMwP0Np8MKWAdyxsDETxq3qOAyXvqessc3GniohG6e0mAqSQyKOHmT8zPF7g==} + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrap-ansi@9.0.0: resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} engines: {node: '>=18'} @@ -4809,6 +4897,15 @@ snapshots: '@humanwhocodes/object-schema@2.0.2': {} + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + '@jridgewell/gen-mapping@0.3.3': dependencies: '@jridgewell/set-array': 1.1.2 @@ -4925,13 +5022,15 @@ snapshots: '@parcel/utils': 2.11.0 lmdb: 2.8.5 - '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': + '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/logger': 2.12.0 '@parcel/utils': 2.12.0 lmdb: 2.8.5 + transitivePeerDependencies: + - '@swc/helpers' '@parcel/codeframe@2.11.0': dependencies: @@ -4995,7 +5094,7 @@ snapshots: '@parcel/core@2.12.0(@swc/helpers@0.5.11)': dependencies: '@mischnic/json-sourcemap': 0.1.1 - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/diagnostic': 2.12.0 '@parcel/events': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) @@ -5008,7 +5107,7 @@ snapshots: '@parcel/source-map': 2.1.1 '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) abortcontroller-polyfill: 1.7.5 base-x: 3.0.9 browserslist: 4.23.0 @@ -5052,7 +5151,7 @@ snapshots: '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 '@parcel/watcher': 2.4.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) transitivePeerDependencies: - '@swc/helpers' @@ -5147,7 +5246,7 @@ snapshots: '@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/rust': 2.12.0 '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/optimizer-svgo@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': dependencies: @@ -5191,7 +5290,7 @@ snapshots: '@parcel/node-resolver-core': 3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@swc/core': 1.4.1(@swc/helpers@0.5.11) semver: 7.6.0 transitivePeerDependencies: @@ -5401,7 +5500,7 @@ snapshots: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) nullthrows: 1.1.1 '@parcel/transformer-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': @@ -5412,7 +5511,7 @@ snapshots: '@parcel/rust': 2.12.0 '@parcel/source-map': 2.1.1 '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@swc/helpers': 0.5.6 browserslist: 4.23.0 nullthrows: 1.1.1 @@ -5523,12 +5622,12 @@ snapshots: '@parcel/types@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': dependencies: - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/diagnostic': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/source-map': 2.1.1 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) utility-types: 3.11.0 transitivePeerDependencies: - '@parcel/core' @@ -5622,7 +5721,7 @@ snapshots: '@parcel/utils': 2.11.0 nullthrows: 1.1.1 - '@parcel/workers@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': + '@parcel/workers@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/diagnostic': 2.12.0 @@ -5631,8 +5730,9 @@ snapshots: '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 nullthrows: 1.1.1 - transitivePeerDependencies: - - '@swc/helpers' + + '@pkgjs/parseargs@0.11.0': + optional: true '@rollup/plugin-babel@5.3.1(@babel/core@7.24.5)(rollup@2.79.1)': dependencies: @@ -6262,6 +6362,10 @@ snapshots: decamelize@1.2.0: {} + declarative-shadow-dom-polyfill@0.4.0(typescript@5.4.5): + dependencies: + typescript: 5.4.5 + decompress-response@3.3.0: dependencies: mimic-response: 1.0.1 @@ -6309,6 +6413,15 @@ snapshots: transitivePeerDependencies: - typescript + dom-renderer@2.3.0(typescript@5.4.5): + dependencies: + declarative-shadow-dom-polyfill: 0.4.0(typescript@5.4.5) + tslib: 2.6.3 + web-streams-polyfill: 4.0.0 + web-utility: 4.4.0(typescript@5.4.5) + transitivePeerDependencies: + - typescript + dom-serializer@1.4.1: dependencies: domelementtype: 2.3.0 @@ -6337,9 +6450,11 @@ snapshots: duplexer3@0.1.5: {} - echarts-jsx@1.2.0(typescript@5.4.5): + eastasianwidth@0.2.0: {} + + echarts-jsx@1.2.1(typescript@5.4.5): dependencies: - dom-renderer: 2.1.8(typescript@5.4.5) + dom-renderer: 2.3.0(typescript@5.4.5) echarts: 5.5.0 iterable-observer: 1.0.1 lodash: 4.17.21 @@ -6365,6 +6480,8 @@ snapshots: emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + end-of-stream@1.4.4: dependencies: once: 1.4.0 @@ -6640,6 +6757,11 @@ snapshots: dependencies: is-callable: 1.2.7 + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + fs-extra@9.1.0: dependencies: at-least-node: 1.0.0 @@ -6722,6 +6844,15 @@ snapshots: dependencies: is-glob: 4.0.3 + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.1 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -7023,6 +7154,12 @@ snapshots: dependencies: '@swc/helpers': 0.5.11 + jackspeak@4.0.1: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + jake@10.8.7: dependencies: async: 3.2.5 @@ -7234,6 +7371,8 @@ snapshots: lowercase-keys@2.0.0: {} + lru-cache@11.0.0: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -7305,6 +7444,10 @@ snapshots: min-indent@1.0.1: {} + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -7325,6 +7468,8 @@ snapshots: minimist@1.2.8: {} + minipass@7.1.2: {} + mobx-github@0.3.2(typescript@5.4.5): dependencies: '@octokit/openapi-types': 22.2.0 @@ -7503,6 +7648,8 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.0: {} + package-json@6.5.0: dependencies: got: 9.6.0 @@ -7570,6 +7717,11 @@ snapshots: path-parse@1.0.7: {} + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.0 + minipass: 7.1.2 + path-type@4.0.0: {} picocolors@1.0.0: {} @@ -7749,6 +7901,11 @@ snapshots: dependencies: glob: 7.2.3 + rimraf@6.0.1: + dependencies: + glob: 11.0.0 + package-json-from-dist: 1.0.0 + rollup@2.79.1: optionalDependencies: fsevents: 2.3.3 @@ -7884,6 +8041,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + string-width@7.1.0: dependencies: emoji-regex: 10.3.0 @@ -8344,6 +8507,18 @@ snapshots: '@types/trusted-types': 2.0.7 workbox-core: 7.1.0 + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrap-ansi@9.0.0: dependencies: ansi-styles: 6.2.1 diff --git a/source/page/Map/adapter/isaaclin.ts b/source/page/Map/adapter/isaaclin.ts index 235a9b8..541bbe3 100644 --- a/source/page/Map/adapter/isaaclin.ts +++ b/source/page/Map/adapter/isaaclin.ts @@ -102,8 +102,7 @@ export function convertProvincesSeries( ); for (const item of source) { - const t = roundTime(+item.updateTime, resolution); - + const t = roundTime(+new Date(item.updateTime), resolution); if (res[t] === undefined) res[t] = {}; const prov = convertProvince(item); @@ -146,5 +145,8 @@ export const convertCountrySeries = ( resolution: number ): Series => Object.fromEntries( - source.map(item => [roundTime(+item.updateTime, resolution), item]) + source.map(item => [ + roundTime(+new Date(item.updateTime), resolution), + item + ]) ); diff --git a/source/page/Map/component/HierarchicalVirusMap.tsx b/source/page/Map/component/HierarchicalVirusMap.tsx index ec140f3..888f481 100644 --- a/source/page/Map/component/HierarchicalVirusMap.tsx +++ b/source/page/Map/component/HierarchicalVirusMap.tsx @@ -134,7 +134,7 @@ export class HierarchicalVirusMap ) ) ]; - + return ( <> {} +interface DataItem + extends Record<'confirmed' | 'suspected' | 'cured' | 'dead', number> { + updateTime: Date; +} /** * WebCell 疫情数据折线图可视化组件 * @@ -253,10 +258,20 @@ export class VirusChart } as EChartsOption; } + transformData(orderedCountryData: DataItem[]) { + return orderedCountryData.map( + ({ updateTime, confirmed, suspected, cured, dead }) => ({ + date: new Date(formatDate(updateTime, 'YYYY/MM')), + confirmed, + suspected, + cured, + dead + }) + ); + } mountedCallback() { this.classList.add('d-flex', 'flex-column'); } - render() { const { data, area, path } = this.props; @@ -265,6 +280,21 @@ export class VirusChart ), orderedCountryData = this.getOrderedTimeData(data.countrySeries); + const transformedCounts = this.transformData(orderedCountryData); + const confirmedCount = transformedCounts.map(item => [ + item.date, + item.confirmed + ]); + const suspectedCount = transformedCounts.map(item => [ + item.date, + item.suspected + ]); + const curedCount = transformedCounts.map(item => [ + item.date, + item.cured + ]); + const deadCount = transformedCounts.map(item => [item.date, item.dead]); + return ( <> @@ -306,8 +338,8 @@ export class VirusChart - - + + diff --git a/source/page/Map/component/VirusMap.tsx b/source/page/Map/component/VirusMap.tsx index 6b2fe3a..971347c 100644 --- a/source/page/Map/component/VirusMap.tsx +++ b/source/page/Map/component/VirusMap.tsx @@ -94,7 +94,7 @@ export class VirusMap extends HTMLElement implements WebCell { mapScale: 1, chartArea: this.name }; - + get basicVisualMap() { return { show: true, @@ -194,7 +194,7 @@ export class VirusMap extends HTMLElement implements WebCell { isAdjustLabel = true, domWidth = chart.getWidth(), domHeight = chart.getHeight(); - + let options = this.baseOptions(this.name, this.breaks); if (isForceRatio) @@ -222,11 +222,12 @@ export class VirusMap extends HTMLElement implements WebCell { options ) as any) : (this.getChartOptions(this.data as MapDataType, options) as any); - + chart.setOption(options); }; getChartOptions = (data: MapDataType, options?: any) => { + options ||= this.baseOptions(this.name, this.breaks); const extra = this.overrides(data); @@ -239,7 +240,6 @@ export class VirusMap extends HTMLElement implements WebCell { getSTChartOptions = (data: STMapDataType, options?: any) => { options ||= this.baseOptions(this.name, this.breaks); - options['timeline'] = { axisType: 'time', show: true, @@ -264,9 +264,11 @@ export class VirusMap extends HTMLElement implements WebCell { } } }; + const sortedTimeline = data.timeline.slice().sort(); + return { baseOption: options, - options: data.timeline.sort().map(t => this.overrides(data.data[t])) + options: sortedTimeline.map(t => this.overrides(data.data[t])) }; }; @@ -277,10 +279,10 @@ export class VirusMap extends HTMLElement implements WebCell { mountedCallback() { this.classList.add(style.box); } - + render() { const { name, data, currentChartArea, chartData, chartPath } = this; - + return ( <> import('./Hospital')), UserAdmin = lazy(() => import('./Admin/User')), CommunityPage = lazy(() => import('./Community')), MapsPage = lazy(() => import('./Map')); - const userMenu = [ { title: '管理', diff --git a/source/service/Epidemic.ts b/source/service/Epidemic.ts index e0009a7..b281bb5 100644 --- a/source/service/Epidemic.ts +++ b/source/service/Epidemic.ts @@ -74,6 +74,12 @@ export interface Province extends Base, StatisticData { cities?: City[]; } +export type Area = 'city' | 'continent' | 'country' | 'province'; +export type AreaData = Base & + Partial> & + Record<`${Area}EnglishName`, string> & + Record<`${Area}Name`, string> & + Record<`${'city' | 'province'}_zipCode`, string>; export async function getOverall() { const { body } = await epidemic.get('Overall', { Range: '0-9' }); @@ -81,9 +87,19 @@ export async function getOverall() { } export async function getHistory() { - const { body } = await epidemic.get('Area', { Range: '0-9' }); + const { body } = await epidemic.get('Area', { Range: '0-199' }); - return body; + const updatedBody = body.map(item => ({ + id: item.id, + updateTime: item.updateTime, + provinceShortName: item.provinceName, + confirmedCount: item.province_confirmedCount, + suspectedCount: item.province_suspectedCount, + curedCount: item.province_curedCount, + deadCount: item.province_deadCount + })); + + return updatedBody as Province[]; } export async function getCurrent() {