From 24edbe36b41406fcfb5e70def576e1f348aae8f1 Mon Sep 17 00:00:00 2001 From: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com> Date: Fri, 16 Jan 2026 03:43:16 +0300 Subject: [PATCH 1/2] feat: enhance StatChart with text mode options and refactor display logic - Introduced a new property in the StatChart schema to control how values and names are displayed. - Updated the migration logic to map from panel options and handle various display scenarios. - Refactored the StatChartBase component to utilize for determining what to display (value, name, both, or none). - Adjusted tests and expected outputs to reflect changes in text mode handling. - Enhanced the StatChartOptionsEditorSettings to allow users to select the desired text mode. Signed-off-by: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com> --- package-lock.json | 167 ++++++++++-------- statchart/schemas/migrate/migrate.cue | 21 ++- .../schemas/migrate/tests/basic/expected.json | 1 + .../label-display-from-legend/expected.json | 2 +- .../label-display-from-options/expected.json | 1 + .../migrate/tests/mappings/expected.json | 1 + .../tests/overrides_to_mappings/expected.json | 1 + statchart/schemas/stat.cue | 1 + statchart/src/StatChartBase.test.tsx | 3 +- statchart/src/StatChartBase.tsx | 40 +++-- .../src/StatChartOptionsEditorSettings.tsx | 32 ++++ statchart/src/StatChartPanel.tsx | 94 ++++++++-- statchart/src/stat-chart-model.ts | 18 ++ 13 files changed, 275 insertions(+), 107 deletions(-) diff --git a/package-lock.json b/package-lock.json index 82c24166..10f1b713 100644 --- a/package-lock.json +++ b/package-lock.json @@ -528,7 +528,6 @@ "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", @@ -1022,7 +1021,6 @@ "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.0.tgz", "integrity": "sha512-bOwvTOIJcG5FVo5gUUupiwYh8MioPLQ4UcqbcRf7UQ98X90tCa9E1kZ3Z7tqwpZxYyOvh1YTYbmZE9RTfTp5hg==", "license": "MIT", - "peer": true, "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", @@ -1057,7 +1055,6 @@ "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.11.0.tgz", "integrity": "sha512-A7+f++LodNNc1wGgoRDTt78cOwWm9KVezApgjOMp1W4hM0898nsqBXwF+sbePE7ZRcjN7Sa1Z5m2oN27XkmEjQ==", "license": "MIT", - "peer": true, "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", @@ -1072,7 +1069,6 @@ "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.4.tgz", "integrity": "sha512-u4q7PnZlJUojeRe8FJa/njJcMctISGgPQ4PnWsd9268R4ZTtU+tfFYmwkBvgcrK2+QQ8tYFVALVb5fVJykKc5A==", "license": "MIT", - "peer": true, "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.35.0", @@ -1095,7 +1091,6 @@ "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.2.tgz", "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", "license": "MIT", - "peer": true, "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } @@ -1117,7 +1112,6 @@ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.36.4.tgz", "integrity": "sha512-ZQ0V5ovw/miKEXTvjgzRyjnrk9TwriUB1k4R5p7uNnHR9Hus+D1SXHGdJshijEzPFjU25xea/7nhIeSqYFKdbA==", "license": "MIT", - "peer": true, "dependencies": { "@codemirror/state": "^6.5.0", "style-mod": "^4.1.0", @@ -1184,6 +1178,7 @@ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", "license": "MIT", + "peer": true, "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", @@ -1202,13 +1197,15 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@emotion/babel-plugin/node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "license": "BSD-3-Clause", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -1218,6 +1215,7 @@ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/memoize": "^0.9.0", "@emotion/sheet": "^1.4.0", @@ -1230,13 +1228,15 @@ "version": "0.9.2", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@emotion/is-prop-valid": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/memoize": "^0.9.0" } @@ -1245,7 +1245,8 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@emotion/react": { "version": "11.14.0", @@ -1277,6 +1278,7 @@ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/hash": "^0.9.2", "@emotion/memoize": "^0.9.0", @@ -1289,7 +1291,8 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@emotion/styled": { "version": "11.14.0", @@ -1319,13 +1322,15 @@ "version": "0.10.0", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@emotion/use-insertion-effect-with-fallbacks": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", "license": "MIT", + "peer": true, "peerDependencies": { "react": ">=16.8.0" } @@ -1334,13 +1339,15 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@emotion/weak-memoize": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", @@ -2508,6 +2515,7 @@ "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -2539,15 +2547,13 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.4.0.tgz", "integrity": "sha512-DVeMRoGrgn/k45oQNu189BoW4SZwgZFzJ1+1TV5j2NJ/KFC83oa/enRqZSGshyeMk5cPWMhsKs9nx+8o0unwGg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@lezer/highlight": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", "license": "MIT", - "peer": true, "dependencies": { "@lezer/common": "^1.3.0" } @@ -2568,7 +2574,6 @@ "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", "license": "MIT", - "peer": true, "dependencies": { "@lezer/common": "^1.0.0" } @@ -2953,7 +2958,6 @@ "resolved": "https://registry.npmjs.org/@module-federation/runtime-tools/-/runtime-tools-0.21.6.tgz", "integrity": "sha512-fnP+ZOZTFeBGiTAnxve+axGmiYn2D60h86nUISXjXClK3LUY1krUfPgf6MaD4YDJ4i51OGXZWPekeMe16pkd8Q==", "license": "MIT", - "peer": true, "dependencies": { "@module-federation/runtime": "0.21.6", "@module-federation/webpack-bundler-runtime": "0.21.6" @@ -3008,6 +3012,7 @@ "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.4.8.tgz", "integrity": "sha512-vjP4+A1ybyCRhDZC7r5EPWu/gLseFZxaGyPdDl94vzVvk6Yj6gahdaqcjbhkaCrJjdZj90m3VioltWPAnWF/zw==", "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" @@ -3067,13 +3072,15 @@ "version": "19.0.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@mui/private-theming": { "version": "6.4.8", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.4.8.tgz", "integrity": "sha512-sWwQoNSn6elsPTAtSqCf+w5aaGoh7AASURNmpy+QTTD/zwJ0Jgwt0ZaaP6mXq2IcgHxYnYloM/+vJgHPMkRKTQ==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0", "@mui/utils": "^6.4.8", @@ -3101,6 +3108,7 @@ "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.4.8.tgz", "integrity": "sha512-oyjx1b1FvUCI85ZMO4trrjNxGm90eLN3Ohy0AP/SqK5gWvRQg1677UjNf7t6iETOKAleHctJjuq0B3aXO2gtmw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0", "@emotion/cache": "^11.13.5", @@ -3702,7 +3710,6 @@ "resolved": "https://registry.npmjs.org/@perses-dev/components/-/components-0.53.0-rc.1.tgz", "integrity": "sha512-yp8pzcPe2XyE21qBLAujk+gMIl07InIaY/hq19YGAeu9ycxi2hRKily0S89qEmhjS525KJHka+f6wjEztJFnlg==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.4.0", "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3", @@ -3737,7 +3744,6 @@ "resolved": "https://registry.npmjs.org/@perses-dev/core/-/core-0.53.0-beta.4.tgz", "integrity": "sha512-f31l/80YHuU172BvhVLzuMShBNcv0ehMLX1K2xRIuXQ886ULwihB6Q1K6pm1duxP7KtQFFQHAgE5flKJ5gKboA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "date-fns": "^4.1.0", "lodash": "^4.17.21", @@ -3751,7 +3757,6 @@ "resolved": "https://registry.npmjs.org/@perses-dev/dashboards/-/dashboards-0.53.0-rc.1.tgz", "integrity": "sha512-ndpz6I+fQiHEtQyvmD/hBjinj8Hk3pdwsBCoWFuUsCgNEt+uuukL/dT1nK5F3P3QEGwIb0eMtSQ1cGl1jtKtiA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@perses-dev/components": "0.53.0-rc.1", "@perses-dev/core": "0.53.0-beta.4", @@ -3785,7 +3790,6 @@ "resolved": "https://registry.npmjs.org/@perses-dev/explore/-/explore-0.53.0-rc.1.tgz", "integrity": "sha512-mPk4jq+yOveZ+GcmNsJuiaql9/KI5YiLINl6fSq+cajBBZMviRomidFccbQcoVFXSgtssZeY4cXLkdQFyNgT4A==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@nexucis/fuzzy": "^0.5.1", "@perses-dev/components": "0.53.0-rc.1", @@ -3851,7 +3855,6 @@ "resolved": "https://registry.npmjs.org/@perses-dev/plugin-system/-/plugin-system-0.53.0-rc.1.tgz", "integrity": "sha512-RECE2Yms5fBU8+OjVNm4nu3RbPOl9eelKwrsBJpcg+iWG8cARK/IQGlICRVVuo4vv50pqaK6fijMt2TYppFtYA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@module-federation/enhanced": "^0.21.4", "@perses-dev/components": "0.53.0-rc.1", @@ -3942,6 +3945,7 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -4002,7 +4006,6 @@ "integrity": "sha512-V0INbMrT/LwyhzKmvpupe2oSvPFWaivz7sdriFRp381BJvD0d2pYcq9iRW91bxgMRX78MgTzFYAu868hMAzoSw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rspack/core": "1.6.4", "@rspack/lite-tapable": "~1.1.0", @@ -4184,7 +4187,6 @@ "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.6.4.tgz", "integrity": "sha512-5F1+MQD8rfbFbUHnaiZe4jqOu9pnSb+PliqQvi0lj+uvpMpcS3sJDIs/mz6P1u87lfkfBXChIT4zSLAzeOgMWw==", "license": "MIT", - "peer": true, "dependencies": { "@module-federation/runtime-tools": "0.21.4", "@rspack/binding": "1.6.4", @@ -4393,7 +4395,6 @@ "dev": true, "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.25" @@ -4608,7 +4609,6 @@ "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", "devOptional": true, - "peer": true, "dependencies": { "tslib": "^2.8.0" } @@ -4657,6 +4657,7 @@ "version": "4.39.1", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.39.1.tgz", "license": "MIT", + "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -4717,7 +4718,6 @@ "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -4966,6 +4966,7 @@ "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -4977,6 +4978,7 @@ "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -4987,7 +4989,8 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/express": { "version": "5.0.1", @@ -5155,7 +5158,6 @@ "integrity": "sha512-ClsL5nMwKaBRwPcCvH8E7+nU4GxHVx1axNvMZTFHMEfNI7oahimt26P5zjVCRrjiIWj6YFXfE1v3dEp94wLcGQ==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~6.20.0" } @@ -5164,7 +5166,8 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/prop-types": { "version": "15.7.14", @@ -5191,7 +5194,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz", "integrity": "sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==", "license": "MIT", - "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -5518,7 +5520,6 @@ "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.25.3.tgz", "integrity": "sha512-1wtBZTXPIp8u6F/xjHvsUAYlEeF5Dic4xZBnqJyLzv7o7GjGYEUfSz9Z7bo9aK9GAx2uojG/AuBMfhA4uhvIVQ==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.18.6", "@codemirror/commands": "^6.1.0", @@ -5553,6 +5554,7 @@ "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.13.2", "@webassemblyjs/helper-wasm-bytecode": "1.13.2" @@ -5563,21 +5565,24 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.13.2", @@ -5585,6 +5590,7 @@ "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.13.2", "@webassemblyjs/helper-api-error": "1.13.2", @@ -5596,7 +5602,8 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.14.1", @@ -5604,6 +5611,7 @@ "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", @@ -5617,6 +5625,7 @@ "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -5627,6 +5636,7 @@ "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "devOptional": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -5636,7 +5646,8 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.14.1", @@ -5644,6 +5655,7 @@ "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", @@ -5661,6 +5673,7 @@ "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-wasm-bytecode": "1.13.2", @@ -5675,6 +5688,7 @@ "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", @@ -5688,6 +5702,7 @@ "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-api-error": "1.13.2", @@ -5703,6 +5718,7 @@ "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" @@ -5861,14 +5877,16 @@ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "devOptional": true, - "license": "BSD-3-Clause" + "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==", "devOptional": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "peer": true }, "node_modules/abab": { "version": "2.0.6", @@ -5897,7 +5915,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "devOptional": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5922,6 +5939,7 @@ "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", "devOptional": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10.13.0" }, @@ -6488,6 +6506,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.5", "cosmiconfig": "^7.0.0", @@ -6737,7 +6756,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -6976,6 +6994,7 @@ "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "devOptional": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6.0" } @@ -7240,6 +7259,7 @@ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", "license": "MIT", + "peer": true, "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", @@ -7256,6 +7276,7 @@ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "license": "ISC", + "peer": true, "engines": { "node": ">= 6" } @@ -7379,8 +7400,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -7463,7 +7483,6 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -7474,7 +7493,6 @@ "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-3.2.0.tgz", "integrity": "sha512-sg8HqoTEulcbbbVXeg84u5UnlsQa8GS5QXMqjjYIhS4abEVVKIUwe0/l/UhrZdKaL/W5eWZNlbTeEIiOXTcsBQ==", "license": "MIT", - "peer": true, "peerDependencies": { "date-fns": "^3.0.0 || ^4.0.0" } @@ -7779,7 +7797,6 @@ "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz", "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", "license": "Apache-2.0", - "peer": true, "dependencies": { "tslib": "2.3.0", "zrender": "5.5.0" @@ -7862,6 +7879,7 @@ "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -8019,7 +8037,8 @@ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/es-object-atoms": { "version": "1.1.1", @@ -8183,7 +8202,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -8240,7 +8258,6 @@ "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -8743,6 +8760,7 @@ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "devOptional": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.8.x" } @@ -9165,7 +9183,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/find-up": { "version": "5.0.0", @@ -9550,7 +9569,8 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "devOptional": true, - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "peer": true }, "node_modules/glob/node_modules/brace-expansion": { "version": "1.1.12", @@ -9805,6 +9825,7 @@ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", "license": "BSD-3-Clause", + "peer": true, "dependencies": { "react-is": "^16.7.0" } @@ -9813,7 +9834,8 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/homedir-polyfill": { "version": "1.0.3", @@ -10032,7 +10054,6 @@ "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==", "license": "MIT", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/immer" @@ -11998,6 +12019,7 @@ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "devOptional": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6.11.5" } @@ -12022,8 +12044,7 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash.clonedeepwith": { "version": "4.5.0", @@ -12380,7 +12401,8 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/node-fetch": { "version": "2.7.0", @@ -12896,6 +12918,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -13267,6 +13290,7 @@ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -13424,7 +13448,6 @@ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.54.2.tgz", "integrity": "sha512-eHpAUgUjWbZocoQYUHposymRb4ZP6d0uwUnooL2uOybA9/3tPUvoAKqEWK1WaSiTxxOfTpffNZP7QwlnM3/gEg==", "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, @@ -13464,7 +13487,6 @@ "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -13502,7 +13524,6 @@ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.0.tgz", "integrity": "sha512-x30B78HV5tFk8ex0ITwzC9TTZMua4jGyA9IUlH1JLQYQTFyxr/ZxwOJq7evg1JX1qGVUcvhsmQSKdPncQrjTgA==", "license": "MIT", - "peer": true, "dependencies": { "@remix-run/router": "1.23.0", "react-router": "6.30.0" @@ -13946,6 +13967,7 @@ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" } @@ -13974,7 +13996,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -14130,6 +14151,7 @@ "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "devOptional": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "randombytes": "^2.1.0" } @@ -14743,7 +14765,8 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/supports-color": { "version": "7.2.0", @@ -14799,6 +14822,7 @@ "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", "devOptional": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -14820,6 +14844,7 @@ "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", "devOptional": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.14.0", @@ -14839,6 +14864,7 @@ "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", @@ -14874,6 +14900,7 @@ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -14889,6 +14916,7 @@ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -14904,7 +14932,8 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "devOptional": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/terser/node_modules/source-map-support": { "version": "0.5.21", @@ -14912,6 +14941,7 @@ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -15025,7 +15055,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -15136,7 +15165,6 @@ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -15490,7 +15518,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -15667,7 +15694,6 @@ "resolved": "https://registry.npmjs.org/use-resize-observer/-/use-resize-observer-9.1.0.tgz", "integrity": "sha512-R25VqO9Wb3asSD4eqtcxk8sJalvIOYBqS8MNZlpDSQ4l4xMQxC/J7Id9HoTqPq8FwULIn0PVW+OAqF2dyYbjow==", "license": "MIT", - "peer": true, "dependencies": { "@juggle/resize-observer": "^3.3.1" }, @@ -15761,6 +15787,7 @@ "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -15835,6 +15862,7 @@ "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", "devOptional": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10.13.0" } @@ -15845,6 +15873,7 @@ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "devOptional": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -15859,6 +15888,7 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "devOptional": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": ">=4.0" } @@ -16072,7 +16102,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", "license": "MIT", - "peer": true, "engines": { "node": ">=10.0.0" }, diff --git a/statchart/schemas/migrate/migrate.cue b/statchart/schemas/migrate/migrate.cue index d55936e7..e8823f83 100644 --- a/statchart/schemas/migrate/migrate.cue +++ b/statchart/schemas/migrate/migrate.cue @@ -36,17 +36,16 @@ kind: "StatChart" spec: { calculation: *commonMigrate.#mapping.calc[#panel.options.reduceOptions.calcs[0]] | commonMigrate.#defaultCalc // only consider [0] here as Perses's GaugeChart doesn't support individual calcs - // metricLabel - #textMode: *#panel.options.textMode | null - if #textMode == "name" && (*#panel.targets[0].legendFormat | null) != null { - // /!\ best effort logic - // - if legendFormat contains a more complex expression than {{label}}, the result will be broken (but manually fixable afterwards still) - // - Perses's metricLabel is a single setting at panel level, hence the [0], so the result wont fit in case of multiple queries using different legendFormat - metricLabel: strings.Trim(#panel.targets[0].legendFormat, "{}") - } - // /!\ here too using [0] thus not perfect, even though the field getting remapped is unique to the whole panel in that case - if #textMode == "auto" && (*#panel.targets[0].format | null) == "table" && (*#panel.options.reduceOptions.fields | null) != null { - metricLabel: strings.Trim(#panel.options.reduceOptions.fields, "/^$") + // textMode - map directly from Grafana's BigValueTextMode enum + #grafanaTextMode: *#panel.options.textMode | "auto" + if #grafanaTextMode != null { + textMode: #grafanaTextMode + } + + // metricLabel - map from reduceOptions.fields for field selection + #fields: *#panel.options.reduceOptions.fields | null + if #fields != null && #fields != "" { + metricLabel: strings.Trim(#fields, "/^$") } // format diff --git a/statchart/schemas/migrate/tests/basic/expected.json b/statchart/schemas/migrate/tests/basic/expected.json index f76d3311..7b620753 100644 --- a/statchart/schemas/migrate/tests/basic/expected.json +++ b/statchart/schemas/migrate/tests/basic/expected.json @@ -2,6 +2,7 @@ "kind": "StatChart", "spec": { "calculation": "last-number", + "textMode": "auto", "format": { "decimalPlaces": 2, "unit": "bytes/sec" diff --git a/statchart/schemas/migrate/tests/label-display-from-legend/expected.json b/statchart/schemas/migrate/tests/label-display-from-legend/expected.json index 581ef4ff..42c209b5 100644 --- a/statchart/schemas/migrate/tests/label-display-from-legend/expected.json +++ b/statchart/schemas/migrate/tests/label-display-from-legend/expected.json @@ -1,7 +1,7 @@ { "kind": "StatChart", "spec": { - "metricLabel": "version", + "textMode": "name", "format": { "unit": "decimal" }, diff --git a/statchart/schemas/migrate/tests/label-display-from-options/expected.json b/statchart/schemas/migrate/tests/label-display-from-options/expected.json index e00ad170..b9314baa 100644 --- a/statchart/schemas/migrate/tests/label-display-from-options/expected.json +++ b/statchart/schemas/migrate/tests/label-display-from-options/expected.json @@ -1,6 +1,7 @@ { "kind": "StatChart", "spec": { + "textMode": "auto", "metricLabel": "version", "format": { "unit": "decimal" diff --git a/statchart/schemas/migrate/tests/mappings/expected.json b/statchart/schemas/migrate/tests/mappings/expected.json index 069e6ade..61b7d7c6 100644 --- a/statchart/schemas/migrate/tests/mappings/expected.json +++ b/statchart/schemas/migrate/tests/mappings/expected.json @@ -2,6 +2,7 @@ "kind": "StatChart", "spec": { "calculation": "last", + "textMode": "auto", "mappings": [ { "kind": "Value", diff --git a/statchart/schemas/migrate/tests/overrides_to_mappings/expected.json b/statchart/schemas/migrate/tests/overrides_to_mappings/expected.json index 0eb0cec4..e9db6aec 100644 --- a/statchart/schemas/migrate/tests/overrides_to_mappings/expected.json +++ b/statchart/schemas/migrate/tests/overrides_to_mappings/expected.json @@ -2,6 +2,7 @@ "kind": "StatChart", "spec": { "calculation": "mean", + "textMode": "auto", "format": { "unit": "decimal" }, diff --git a/statchart/schemas/stat.cue b/statchart/schemas/stat.cue index 4b3e2f1b..43f3505f 100644 --- a/statchart/schemas/stat.cue +++ b/statchart/schemas/stat.cue @@ -20,6 +20,7 @@ import ( kind: "StatChart" spec: close({ calculation: common.#calculation + textMode?: "auto" | "value" | "name" | "none" | "value_and_name" metricLabel?: common.#metricLabel format?: common.#format thresholds?: common.#thresholds diff --git a/statchart/src/StatChartBase.test.tsx b/statchart/src/StatChartBase.test.tsx index 1ce8a13c..7c3edfbb 100644 --- a/statchart/src/StatChartBase.test.tsx +++ b/statchart/src/StatChartBase.test.tsx @@ -39,7 +39,8 @@ describe('StatChart', () => { }; const mockStatData: StatChartData = { - calculatedValue: 7.72931659687181, + numericValue: 7.72931659687181, + displayValue: 7.72931659687181, color: '#1976d2', seriesData: { name: '(((count(count(node_cpu_seconds_total{job="example"}) by (cpu))', diff --git a/statchart/src/StatChartBase.tsx b/statchart/src/StatChartBase.tsx index 57efc90f..56176eb9 100644 --- a/statchart/src/StatChartBase.tsx +++ b/statchart/src/StatChartBase.tsx @@ -23,7 +23,7 @@ import { EChart, FontSizeOption, GraphSeries, useChartsTheme } from '@perses-dev import chroma from 'chroma-js'; import { useOptimalFontSize } from './utils/calculate-font-size'; import { formatStatChartValue } from './utils/format-stat-chart-value'; -import { ColorMode } from './stat-chart-model'; +import { ColorMode, TextMode } from './stat-chart-model'; use([EChartsLineChart, GridComponent, DatasetComponent, TitleComponent, TooltipComponent, CanvasRenderer]); @@ -36,7 +36,9 @@ const BLACK_COLOR_CODE = '#000000'; export interface StatChartData { color: string; - calculatedValue?: string | number | null; + numericValue?: number | null; + displayValue?: string | number | null; + displayName?: string; seriesData?: GraphSeries; } @@ -46,9 +48,11 @@ export interface StatChartProps { data: StatChartData; format?: FormatOptions; sparkline?: LineSeriesOption; - showSeriesName?: boolean; valueFontSize?: FontSizeOption; colorMode?: ColorMode; + textMode?: TextMode; + isMultiSeries?: boolean; + legendMode?: 'auto' | 'on' | 'off'; } export const StatChartBase: FC = (props) => { @@ -58,10 +62,12 @@ export const StatChartBase: FC = (props) => { data, data: { color }, sparkline, - showSeriesName, format, valueFontSize, colorMode, + textMode = 'auto', + isMultiSeries = false, + legendMode = 'auto', } = props; const { @@ -71,12 +77,22 @@ export const StatChartBase: FC = (props) => { }, } = useTheme(); const chartsTheme = useChartsTheme(); - const formattedValue = formatStatChartValue(data.calculatedValue, format); + const formattedValue = formatStatChartValue(data.displayValue, format); const containerPadding = chartsTheme.container.padding.default; - // calculate series name font size and height + // Determine if top text should be shown + // Respect explicit legendMode choice, otherwise let textMode decide + const shouldShowTopText = (() => { + if (legendMode === 'off') return false; + if (legendMode === 'on') return true; + + // legendMode='auto': let textMode decide + return textMode === 'value_and_name' || (textMode === 'auto' && isMultiSeries); + })(); + + // calculate top text font size and height let seriesNameFontSize = useOptimalFontSize({ - text: data?.seriesData?.name ?? '', + text: data.displayName ?? '', fontWeight: SERIES_NAME_FONT_WEIGHT, width, height: height * 0.125, // assume series name will take 12.5% of available height @@ -84,7 +100,7 @@ export const StatChartBase: FC = (props) => { maxSize: SERIES_NAME_MAX_FONT_SIZE, }); - const seriesNameHeight = showSeriesName ? seriesNameFontSize * LINE_HEIGHT + containerPadding : 0; + const seriesNameHeight = shouldShowTopText ? seriesNameFontSize * LINE_HEIGHT + containerPadding : 0; // calculate value font size and height const availableWidth = width - containerPadding * 2; @@ -199,7 +215,7 @@ export const StatChartBase: FC = (props) => { }, [colorMode, containerPadding, optimalValueFontSize, formattedValue, color, paletteMode]); const seriesName = useMemo((): ReactNode | null => { - if (!showSeriesName) return null; + if (!shouldShowTopText || !data.displayName) return null; let textColor = ''; @@ -219,10 +235,10 @@ export const StatChartBase: FC = (props) => { return ( - {data.seriesData?.name} + {data.displayName} ); - }, [colorMode, showSeriesName, secondary, color, containerPadding, seriesNameFontSize, data?.seriesData?.name]); + }, [colorMode, shouldShowTopText, secondary, color, containerPadding, seriesNameFontSize, data.displayName]); return ( = (props) => { }} > {seriesName} - {styledFormattedValue} + {data.displayValue !== undefined && textMode !== 'none' && styledFormattedValue} {sparkline && ( { + onChange( + produce(value, (draft: StatChartOptions) => { + draft.textMode = newTextMode.id; + }) + ); + }, + [onChange, value] + ); + const handleUnitChange: FormatControlsProps['onChange'] = (newFormat) => { onChange( produce(value, (draft: StatChartOptions) => { @@ -164,6 +177,24 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp ); }, [value.colorMode, handleColorModeChange]); + const selectTextMode = useMemo((): ReactElement => { + return ( + i.id === value.textMode) ?? TEXT_MODE_LABELS.find((i) => i.id === 'auto')! + } + /> + } + /> + ); + }, [value.textMode, handleTextModeChange]); + return ( @@ -175,6 +206,7 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp /> + {selectTextMode} {selectColorMode} diff --git a/statchart/src/StatChartPanel.tsx b/statchart/src/StatChartPanel.tsx index 359137d7..2cb4c79d 100644 --- a/statchart/src/StatChartPanel.tsx +++ b/statchart/src/StatChartPanel.tsx @@ -31,15 +31,12 @@ export type StatChartPanelProps = PanelProps; export const StatChartPanel: FC = (props) => { const { spec, contentDimensions, queryResults } = props; - const { format, sparkline, valueFontSize: valueFontSize, colorMode } = spec; + const { format, sparkline, valueFontSize: valueFontSize, colorMode, textMode, legendMode } = spec; const chartsTheme = useChartsTheme(); const statChartData = useStatChartData(queryResults, spec, chartsTheme); const isMultiSeries = statChartData.length > 1; - // Handle three-state showLegend: 'on' | 'off' | 'auto' (or undefined for backward compatibility) - const shouldShowLegend = spec.legendMode === 'on' ? true : spec.legendMode === 'off' ? false : isMultiSeries; - if (!contentDimensions) return null; // Calculates chart width @@ -75,9 +72,11 @@ export const StatChartPanel: FC = (props) => { data={series} format={format} sparkline={sparklineConfig} - showSeriesName={shouldShowLegend} valueFontSize={valueFontSize} colorMode={colorMode} + textMode={textMode} + isMultiSeries={isMultiSeries} + legendMode={legendMode} /> ); }) @@ -94,33 +93,102 @@ const useStatChartData = ( chartsTheme: PersesChartsTheme ): StatChartData[] => { return useMemo(() => { - const { calculation, mappings, metricLabel } = spec; + const { calculation, mappings, metricLabel, textMode } = spec; const statChartData: StatChartData[] = []; + + // Count total series to determine if multi-series + const totalSeries = queryResults.reduce((sum, result) => sum + result.data.series.length, 0); + const isMultiSeries = totalSeries > 1; + for (const result of queryResults) { for (const seriesData of result.data.series) { - const calculatedValue = calculateValue(calculation, seriesData); + const numericValue = calculateValue(calculation, seriesData); - // get label metric value + // Get label if metricLabel is set const labelValue = getLabelValue(metricLabel, seriesData.labels); - // get actual value to display - const displayValue = getValueOrLabel(calculatedValue, mappings, labelValue); + // Use formattedName (with legend format applied) or fallback to raw name + const formattedSeriesName = seriesData.formattedName ?? seriesData.name; + + // Determine what to display based on textMode + const { displayValue, displayName } = getDisplayContent({ + textMode: textMode ?? 'auto', + numericValue, + labelValue, + seriesName: formattedSeriesName, + isMultiSeries, + mappings, + }); - const color = getStatChartColor(chartsTheme, spec, calculatedValue); + // Color based on numeric value (always) + const color = getStatChartColor(chartsTheme, spec, numericValue); const series: GraphSeries = { - name: seriesData.formattedName ?? '', + name: formattedSeriesName, values: seriesData.values, }; - statChartData.push({ calculatedValue: displayValue, seriesData: series, color }); + statChartData.push({ + numericValue, + displayValue, + displayName, + seriesData: series, + color, + }); } } return statChartData; }, [queryResults, spec, chartsTheme]); }; +const getDisplayContent = ({ + textMode, + numericValue, + labelValue, + seriesName, + mappings, + isMultiSeries, +}: { + textMode: string; + numericValue?: number | null; + labelValue?: string; + seriesName: string; + mappings?: ValueMapping[]; + isMultiSeries: boolean; +}): { displayValue?: string | number | null; displayName?: string } => { + const formattedValue = getValueOrLabel(numericValue, mappings, labelValue); + + switch (textMode) { + case 'value': + return { + displayValue: formattedValue, + displayName: undefined, + }; + case 'name': + return { + displayValue: seriesName, + displayName: undefined, + }; + case 'value_and_name': + return { + displayValue: formattedValue, + displayName: seriesName, + }; + case 'none': + return { + displayValue: undefined, + displayName: undefined, + }; + case 'auto': + default: + return { + displayValue: formattedValue, + displayName: isMultiSeries ? seriesName : undefined, + }; + } +}; + const getValueOrLabel = ( value?: number | null, mappings?: ValueMapping[], diff --git a/statchart/src/stat-chart-model.ts b/statchart/src/stat-chart-model.ts index a44d20bd..e6187425 100644 --- a/statchart/src/stat-chart-model.ts +++ b/statchart/src/stat-chart-model.ts @@ -49,8 +49,25 @@ export const SHOW_LEGEND_LABELS: ShowLegendLabelItem[] = [ { id: 'off', label: 'Off', description: 'Always hide legend' }, ]; +export type TextMode = 'auto' | 'value' | 'name' | 'none' | 'value_and_name'; + +export type TextModeLabelItem = { + id: TextMode; + label: string; + description?: string; +}; + +export const TEXT_MODE_LABELS: TextModeLabelItem[] = [ + { id: 'auto', label: 'Auto', description: 'Show value by default, or value and name when label is present' }, + { id: 'value', label: 'Value', description: 'Show only the calculated value' }, + { id: 'name', label: 'Name', description: 'Show only the series name' }, + { id: 'value_and_name', label: 'Value and name', description: 'Show both value and name' }, + { id: 'none', label: 'None', description: 'Show nothing (empty)' }, +]; + export interface StatChartOptions { calculation: CalculationType; + textMode?: TextMode; format: FormatOptions; metricLabel?: string; thresholds?: ThresholdOptions; @@ -76,5 +93,6 @@ export function createInitialStatChartOptions(): StatChartOptions { }, sparkline: {}, legendMode: 'auto', + textMode: 'auto', }; } From 6d7fd23c9610a46148a06dc18c4b5c402245ce97 Mon Sep 17 00:00:00 2001 From: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com> Date: Wed, 28 Jan 2026 11:27:25 +0300 Subject: [PATCH 2/2] Update statchart/schemas/migrate/migrate.cue Co-authored-by: Antoine THEBAUD Signed-off-by: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com> --- statchart/schemas/migrate/migrate.cue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/statchart/schemas/migrate/migrate.cue b/statchart/schemas/migrate/migrate.cue index 5d8df472..87be6d01 100644 --- a/statchart/schemas/migrate/migrate.cue +++ b/statchart/schemas/migrate/migrate.cue @@ -37,10 +37,7 @@ spec: { calculation: *commonMigrate.#mapping.calc[#panel.options.reduceOptions.calcs[0]] | commonMigrate.#defaultCalc // only consider [0] here as Perses's GaugeChart doesn't support individual calcs // textMode - map directly from Grafana's BigValueTextMode enum - #grafanaTextMode: *#panel.options.textMode | "auto" - if #grafanaTextMode != null { - textMode: #grafanaTextMode - } + textMode: *#panel.options.textMode | "auto" // metricLabel - map from reduceOptions.fields for field selection #fields: *#panel.options.reduceOptions.fields | null