mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
Improving the get restream credentials
This commit is contained in:
parent
654dda115a
commit
56cb1fd5cb
6058 changed files with 1166166 additions and 1430809 deletions
18
node_modules/chart.js/LICENSE.md
generated
vendored
18
node_modules/chart.js/LICENSE.md
generated
vendored
|
@ -1,9 +1,9 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2021 Chart.js Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2021 Chart.js Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
76
node_modules/chart.js/README.md
generated
vendored
76
node_modules/chart.js/README.md
generated
vendored
|
@ -1,38 +1,38 @@
|
|||
<p align="center">
|
||||
<a href="https://www.chartjs.org/" target="_blank">
|
||||
<img src="https://www.chartjs.org/media/logo-title.svg" alt="https://www.chartjs.org/"><br/>
|
||||
</a>
|
||||
Simple yet flexible JavaScript charting for designers & developers
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.chartjs.org/docs/latest/getting-started/installation.html"><img src="https://img.shields.io/github/release/chartjs/Chart.js.svg?style=flat-square&maxAge=600" alt="Downloads"></a>
|
||||
<a href="https://github.com/chartjs/Chart.js/actions?query=workflow%3ACI+branch%3Amaster"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/chartjs/Chart.js/CI"></a>
|
||||
<a href="https://coveralls.io/github/chartjs/Chart.js?branch=master"><img src="https://img.shields.io/coveralls/chartjs/Chart.js.svg?style=flat-square&maxAge=600" alt="Coverage"></a>
|
||||
<a href="https://github.com/chartjs/awesome"><img src="https://awesome.re/badge-flat2.svg" alt="Awesome"></a>
|
||||
<a href="https://chartjs-slack.herokuapp.com/"><img src="https://img.shields.io/badge/slack-chartjs-blue.svg?style=flat-square&maxAge=3600" alt="Slack"></a>
|
||||
</p>
|
||||
|
||||
## Documentation
|
||||
|
||||
All the links point to the new version 3 of the lib.
|
||||
|
||||
* [Introduction](https://www.chartjs.org/docs/latest/)
|
||||
* [Getting Started](https://www.chartjs.org/docs/latest/getting-started/index)
|
||||
* [General](https://www.chartjs.org/docs/latest/general/data-structures)
|
||||
* [Configuration](https://www.chartjs.org/docs/latest/configuration/index)
|
||||
* [Charts](https://www.chartjs.org/docs/latest/charts/line)
|
||||
* [Axes](https://www.chartjs.org/docs/latest/axes/index)
|
||||
* [Developers](https://www.chartjs.org/docs/latest/developers/index)
|
||||
* [Popular Extensions](https://github.com/chartjs/awesome)
|
||||
* [Samples](https://www.chartjs.org/samples/)
|
||||
|
||||
In case you are looking for the docs of version 2, you will have to specify the specific version in the url like this: [https://www.chartjs.org/docs/2.9.4/](https://www.chartjs.org/docs/2.9.4/)
|
||||
|
||||
## Contributing
|
||||
|
||||
Instructions on building and testing Chart.js can be found in [the documentation](https://www.chartjs.org/docs/master/developers/contributing.html#building-and-testing). Before submitting an issue or a pull request, please take a moment to look over the [contributing guidelines](https://www.chartjs.org/docs/master/developers/contributing) first. For support, please post questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/chartjs) with the `chartjs` tag.
|
||||
|
||||
## License
|
||||
|
||||
Chart.js is available under the [MIT license](LICENSE.md).
|
||||
<p align="center">
|
||||
<a href="https://www.chartjs.org/" target="_blank">
|
||||
<img src="https://www.chartjs.org/media/logo-title.svg" alt="https://www.chartjs.org/"><br/>
|
||||
</a>
|
||||
Simple yet flexible JavaScript charting for designers & developers
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.chartjs.org/docs/latest/getting-started/installation.html"><img src="https://img.shields.io/github/release/chartjs/Chart.js.svg?style=flat-square&maxAge=600" alt="Downloads"></a>
|
||||
<a href="https://github.com/chartjs/Chart.js/actions?query=workflow%3ACI+branch%3Amaster"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/chartjs/Chart.js/CI"></a>
|
||||
<a href="https://coveralls.io/github/chartjs/Chart.js?branch=master"><img src="https://img.shields.io/coveralls/chartjs/Chart.js.svg?style=flat-square&maxAge=600" alt="Coverage"></a>
|
||||
<a href="https://github.com/chartjs/awesome"><img src="https://awesome.re/badge-flat2.svg" alt="Awesome"></a>
|
||||
<a href="https://chartjs-slack.herokuapp.com/"><img src="https://img.shields.io/badge/slack-chartjs-blue.svg?style=flat-square&maxAge=3600" alt="Slack"></a>
|
||||
</p>
|
||||
|
||||
## Documentation
|
||||
|
||||
All the links point to the new version 3 of the lib.
|
||||
|
||||
* [Introduction](https://www.chartjs.org/docs/latest/)
|
||||
* [Getting Started](https://www.chartjs.org/docs/latest/getting-started/index)
|
||||
* [General](https://www.chartjs.org/docs/latest/general/data-structures)
|
||||
* [Configuration](https://www.chartjs.org/docs/latest/configuration/index)
|
||||
* [Charts](https://www.chartjs.org/docs/latest/charts/line)
|
||||
* [Axes](https://www.chartjs.org/docs/latest/axes/index)
|
||||
* [Developers](https://www.chartjs.org/docs/latest/developers/index)
|
||||
* [Popular Extensions](https://github.com/chartjs/awesome)
|
||||
* [Samples](https://www.chartjs.org/samples/)
|
||||
|
||||
In case you are looking for the docs of version 2, you will have to specify the specific version in the url like this: [https://www.chartjs.org/docs/2.9.4/](https://www.chartjs.org/docs/2.9.4/)
|
||||
|
||||
## Contributing
|
||||
|
||||
Instructions on building and testing Chart.js can be found in [the documentation](https://www.chartjs.org/docs/master/developers/contributing.html#building-and-testing). Before submitting an issue or a pull request, please take a moment to look over the [contributing guidelines](https://www.chartjs.org/docs/master/developers/contributing) first. For support, please post questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/chartjs) with the `chartjs` tag.
|
||||
|
||||
## License
|
||||
|
||||
Chart.js is available under the [MIT license](LICENSE.md).
|
||||
|
|
8
node_modules/chart.js/auto/auto.esm.d.ts
generated
vendored
8
node_modules/chart.js/auto/auto.esm.d.ts
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
import { Chart } from '../types/index.esm';
|
||||
|
||||
export * from '../types/index.esm';
|
||||
export default Chart;
|
||||
import { Chart } from '../types/index.esm';
|
||||
|
||||
export * from '../types/index.esm';
|
||||
export default Chart;
|
||||
|
|
10
node_modules/chart.js/auto/auto.esm.js
generated
vendored
10
node_modules/chart.js/auto/auto.esm.js
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
import {Chart, registerables} from '../dist/chart.esm';
|
||||
|
||||
Chart.register(...registerables);
|
||||
|
||||
export default Chart;
|
||||
import {Chart, registerables} from '../dist/chart.esm';
|
||||
|
||||
Chart.register(...registerables);
|
||||
|
||||
export default Chart;
|
||||
|
|
2
node_modules/chart.js/auto/auto.js
generated
vendored
2
node_modules/chart.js/auto/auto.js
generated
vendored
|
@ -1 +1 @@
|
|||
module.exports = require('../dist/chart');
|
||||
module.exports = require('../dist/chart');
|
||||
|
|
16
node_modules/chart.js/auto/package.json
generated
vendored
16
node_modules/chart.js/auto/package.json
generated
vendored
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "chart.js-auto",
|
||||
"private": true,
|
||||
"description": "auto registering package",
|
||||
"main": "auto.js",
|
||||
"module": "auto.esm.js",
|
||||
"types": "auto.esm.d.ts"
|
||||
}
|
||||
{
|
||||
"name": "chart.js-auto",
|
||||
"private": true,
|
||||
"description": "auto registering package",
|
||||
"main": "auto.js",
|
||||
"module": "auto.esm.js",
|
||||
"types": "auto.esm.d.ts"
|
||||
}
|
||||
|
|
21091
node_modules/chart.js/dist/chart.esm.js
generated
vendored
21091
node_modules/chart.js/dist/chart.esm.js
generated
vendored
File diff suppressed because it is too large
Load diff
26366
node_modules/chart.js/dist/chart.js
generated
vendored
26366
node_modules/chart.js/dist/chart.js
generated
vendored
File diff suppressed because it is too large
Load diff
26
node_modules/chart.js/dist/chart.min.js
generated
vendored
26
node_modules/chart.js/dist/chart.min.js
generated
vendored
File diff suppressed because one or more lines are too long
4999
node_modules/chart.js/dist/chunks/helpers.segment.js
generated
vendored
4999
node_modules/chart.js/dist/chunks/helpers.segment.js
generated
vendored
File diff suppressed because it is too large
Load diff
14
node_modules/chart.js/dist/helpers.esm.js
generated
vendored
14
node_modules/chart.js/dist/helpers.esm.js
generated
vendored
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
* Chart.js v3.6.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2021 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
export { H as HALF_PI, aV as INFINITY, P as PI, aU as PITAU, aX as QUARTER_PI, aW as RAD_PER_DEG, T as TAU, aY as TWO_THIRDS_PI, O as _addGrace, U as _alignPixel, $ as _alignStartEnd, p as _angleBetween, aZ as _angleDiff, _ as _arrayUnique, a5 as _attachContext, ao as _bezierCurveTo, al as _bezierInterpolation, at as _boundSegment, aj as _boundSegments, a2 as _capitalize, ai as _computeSegments, a6 as _createResolver, aF as _decimalPlaces, aN as _deprecated, a7 as _descriptors, ae as _elementsEqual, L as _factorize, aH as _filterBetween, E as _getParentNode, S as _int16Range, J as _isDomSupported, z as _isPointInArea, w as _limitValue, aG as _longestText, aI as _lookup, x as _lookupByKey, R as _measureText, aL as _merger, aM as _mergerIf, au as _normalizeAngle, am as _pointInLine, ag as _readValueToProps, A as _rlookupByKey, aB as _setMinAndMaxByKey, ak as _steppedInterpolation, an as _steppedLineTo, ax as _textX, Z as _toLeftRightCenter, ah as _updateBezierControlPoints, aq as addRoundedRectPath, aE as almostEquals, aD as almostWhole, N as callback, ac as clearCanvas, V as clipArea, aK as clone, c as color, h as createContext, aa as debounce, j as defined, aA as distanceBetweenPoints, ap as drawPoint, C as each, e as easingEffects, M as finiteOrDefault, aS as fontString, o as formatNumber, af as getAngleFromPoint, aJ as getHoverColor, D as getMaximumSize, y as getRelativePosition, av as getRtlAdapter, aR as getStyle, b as isArray, g as isFinite, a4 as isFunction, k as isNullOrUndef, q as isNumber, i as isObject, l as listenArrayEvents, K as log10, a1 as merge, a8 as mergeIf, aC as niceNum, az as noop, aw as overrideTextDirection, F as readUsedSize, W as renderText, r as requestAnimFrame, a as resolve, f as resolveObjectKey, ay as restoreTextDirection, ab as retinaScale, ad as setsEqual, s as sign, aP as splineCurve, aQ as splineCurveMonotone, I as supportsEventListenerOptions, G as throttled, Q as toDegrees, n as toDimension, Y as toFont, aO as toFontString, aT as toLineHeight, B as toPadding, m as toPercentage, t as toRadians, ar as toTRBL, as as toTRBLCorners, a9 as uid, X as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
|
||||
/*!
|
||||
* Chart.js v3.7.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
export { H as HALF_PI, aX as INFINITY, P as PI, aW as PITAU, aZ as QUARTER_PI, aY as RAD_PER_DEG, T as TAU, a_ as TWO_THIRDS_PI, Q as _addGrace, V as _alignPixel, a0 as _alignStartEnd, p as _angleBetween, a$ as _angleDiff, _ as _arrayUnique, a6 as _attachContext, aq as _bezierCurveTo, an as _bezierInterpolation, av as _boundSegment, al as _boundSegments, a3 as _capitalize, ak as _computeSegments, a7 as _createResolver, aH as _decimalPlaces, aP as _deprecated, a8 as _descriptors, af as _elementsEqual, M as _factorize, aJ as _filterBetween, F as _getParentNode, U as _int16Range, ah as _isBetween, ag as _isClickEvent, K as _isDomSupported, z as _isPointInArea, w as _limitValue, aI as _longestText, aK as _lookup, x as _lookupByKey, S as _measureText, aN as _merger, aO as _mergerIf, aw as _normalizeAngle, ao as _pointInLine, ai as _readValueToProps, A as _rlookupByKey, aD as _setMinAndMaxByKey, am as _steppedInterpolation, ap as _steppedLineTo, az as _textX, $ as _toLeftRightCenter, aj as _updateBezierControlPoints, as as addRoundedRectPath, aG as almostEquals, aF as almostWhole, O as callback, ad as clearCanvas, W as clipArea, aM as clone, c as color, h as createContext, ab as debounce, j as defined, aC as distanceBetweenPoints, ar as drawPoint, D as each, e as easingEffects, N as finiteOrDefault, aU as fontString, o as formatNumber, B as getAngleFromPoint, aL as getHoverColor, E as getMaximumSize, y as getRelativePosition, ax as getRtlAdapter, aT as getStyle, b as isArray, g as isFinite, a5 as isFunction, k as isNullOrUndef, q as isNumber, i as isObject, l as listenArrayEvents, L as log10, a2 as merge, a9 as mergeIf, aE as niceNum, aB as noop, ay as overrideTextDirection, G as readUsedSize, X as renderText, r as requestAnimFrame, a as resolve, f as resolveObjectKey, aA as restoreTextDirection, ac as retinaScale, ae as setsEqual, s as sign, aR as splineCurve, aS as splineCurveMonotone, J as supportsEventListenerOptions, I as throttled, R as toDegrees, n as toDimension, Z as toFont, aQ as toFontString, aV as toLineHeight, C as toPadding, m as toPercentage, t as toRadians, at as toTRBL, au as toTRBLCorners, aa as uid, Y as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
|
||||
|
|
2
node_modules/chart.js/helpers/helpers.esm.d.ts
generated
vendored
2
node_modules/chart.js/helpers/helpers.esm.d.ts
generated
vendored
|
@ -1 +1 @@
|
|||
export * from '../types/helpers';
|
||||
export * from '../types/helpers';
|
||||
|
|
2
node_modules/chart.js/helpers/helpers.esm.js
generated
vendored
2
node_modules/chart.js/helpers/helpers.esm.js
generated
vendored
|
@ -1 +1 @@
|
|||
export * from '../dist/helpers.esm';
|
||||
export * from '../dist/helpers.esm';
|
||||
|
|
2
node_modules/chart.js/helpers/helpers.js
generated
vendored
2
node_modules/chart.js/helpers/helpers.js
generated
vendored
|
@ -1 +1 @@
|
|||
module.exports = require('..').helpers;
|
||||
module.exports = require('..').helpers;
|
||||
|
|
14
node_modules/chart.js/helpers/package.json
generated
vendored
14
node_modules/chart.js/helpers/package.json
generated
vendored
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "chart.js-helpers",
|
||||
"private": true,
|
||||
"description": "helper package",
|
||||
"main": "helpers.js",
|
||||
"module": "helpers.esm.js",
|
||||
"types": "helpers.esm.d.ts"
|
||||
{
|
||||
"name": "chart.js-helpers",
|
||||
"private": true,
|
||||
"description": "helper package",
|
||||
"main": "helpers.js",
|
||||
"module": "helpers.esm.js",
|
||||
"types": "helpers.esm.d.ts"
|
||||
}
|
246
node_modules/chart.js/package.json
generated
vendored
246
node_modules/chart.js/package.json
generated
vendored
|
@ -1,135 +1,111 @@
|
|||
{
|
||||
"_from": "chart.js",
|
||||
"_id": "chart.js@3.6.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-iOzzDKePL+bj+ccIsVAgWQehCXv8xOKGbaU2fO/myivH736zcx535PGJzQGanvcSGVOqX6yuLZsN3ygcQ35UgQ==",
|
||||
"_location": "/chart.js",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "chart.js",
|
||||
"name": "chart.js",
|
||||
"escapedName": "chart.js",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.6.0.tgz",
|
||||
"_shasum": "a87fce8431d4e7c5523d721f487f53aada1e42fe",
|
||||
"_spec": "chart.js",
|
||||
"_where": "G:\\GDrive\\htdocs\\YouPHPTube",
|
||||
"bugs": {
|
||||
"url": "https://github.com/chartjs/Chart.js/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Simple HTML5 charts using the canvas element.",
|
||||
"devDependencies": {
|
||||
"@kurkle/color": "^0.1.9",
|
||||
"@rollup/plugin-commonjs": "^19.0.0",
|
||||
"@rollup/plugin-inject": "^4.0.2",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"@simonbrunel/vuepress-plugin-versions": "^0.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.21.0",
|
||||
"@typescript-eslint/parser": "^4.21.0",
|
||||
"@vuepress/plugin-google-analytics": "1.8.2",
|
||||
"@vuepress/plugin-html-redirect": "^0.1.2",
|
||||
"chartjs-adapter-luxon": "^1.0.0",
|
||||
"chartjs-adapter-moment": "^1.0.0",
|
||||
"chartjs-test-utils": "^0.3.1",
|
||||
"concurrently": "^6.0.1",
|
||||
"coveralls": "^3.1.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.23.0",
|
||||
"eslint-config-chartjs": "^0.3.0",
|
||||
"eslint-plugin-es": "^4.1.0",
|
||||
"eslint-plugin-html": "^6.1.2",
|
||||
"eslint-plugin-markdown": "^2.1.0",
|
||||
"esm": "^3.2.25",
|
||||
"glob": "^7.1.6",
|
||||
"jasmine": "^3.7.0",
|
||||
"jasmine-core": "^3.7.1",
|
||||
"karma": "^6.3.2",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-coverage": "^2.0.3",
|
||||
"karma-edge-launcher": "^0.4.2",
|
||||
"karma-firefox-launcher": "^2.1.0",
|
||||
"karma-jasmine": "^4.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.5.4",
|
||||
"karma-rollup-preprocessor": "^7.0.7",
|
||||
"karma-safari-private-launcher": "^1.0.0",
|
||||
"karma-spec-reporter": "0.0.32",
|
||||
"luxon": "^1.26.0",
|
||||
"markdown-it-include": "^2.0.0",
|
||||
"moment": "^2.29.1",
|
||||
"pixelmatch": "^5.2.1",
|
||||
"rollup": "^2.44.0",
|
||||
"rollup-plugin-analyzer": "^4.0.0",
|
||||
"rollup-plugin-cleanup": "^3.2.1",
|
||||
"rollup-plugin-istanbul": "^3.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"typedoc": "^0.21.2",
|
||||
"typedoc-plugin-markdown": "^3.6.1",
|
||||
"typescript": "^4.3.5",
|
||||
"vue-tabs-component": "^1.5.0",
|
||||
"vuepress": "^1.8.2",
|
||||
"vuepress-plugin-code-copy": "^1.0.6",
|
||||
"vuepress-plugin-flexsearch": "^0.2.0",
|
||||
"vuepress-plugin-redirect": "^1.2.5",
|
||||
"vuepress-plugin-tabs": "^0.3.0",
|
||||
"vuepress-plugin-typedoc": "^0.8.1",
|
||||
"vuepress-theme-chartjs": "^0.2.0",
|
||||
"yargs": "^17.0.1"
|
||||
},
|
||||
"files": [
|
||||
"auto/**/*.js",
|
||||
"auto/**/*.d.ts",
|
||||
"dist/*.js",
|
||||
"dist/chunks/*.js",
|
||||
"types/*.d.ts",
|
||||
"types/helpers/*.d.ts",
|
||||
"helpers/**/*.js",
|
||||
"helpers/**/*.d.ts"
|
||||
],
|
||||
"homepage": "https://www.chartjs.org",
|
||||
"jsdelivr": "dist/chart.min.js",
|
||||
"keywords": [
|
||||
"canvas",
|
||||
"charts",
|
||||
"data",
|
||||
"graphs",
|
||||
"html5",
|
||||
"responsive"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/chart.js",
|
||||
"module": "dist/chart.esm.js",
|
||||
"name": "chart.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chartjs/Chart.js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"autobuild": "rollup -c -w",
|
||||
"build": "rollup -c",
|
||||
"dev": "karma start --auto-watch --no-single-run --browsers chrome --grep",
|
||||
"dev:ff": "karma start --auto-watch --no-single-run --browsers firefox --grep",
|
||||
"docs": "npm run build && vuepress build docs --no-cache",
|
||||
"docs:dev": "npm run build && vuepress dev docs --no-cache",
|
||||
"lint": "concurrently \"npm:lint-*\"",
|
||||
"lint-js": "eslint \"src/**/*.js\" \"test/**/*.js\" \"docs/**/*.js\"",
|
||||
"lint-md": "eslint \"**/*.md\"",
|
||||
"lint-tsc": "tsc",
|
||||
"lint-types": "eslint \"types/**/*.ts\" && node -r esm types/tests/autogen.js && tsc -p types/tests/",
|
||||
"test": "npm run lint && cross-env NODE_ENV=test karma start --auto-watch --single-run --coverage --grep"
|
||||
},
|
||||
"types": "types/index.esm.d.ts",
|
||||
"unpkg": "dist/chart.min.js",
|
||||
"version": "3.6.0"
|
||||
}
|
||||
{
|
||||
"name": "chart.js",
|
||||
"homepage": "https://www.chartjs.org",
|
||||
"description": "Simple HTML5 charts using the canvas element.",
|
||||
"version": "3.7.1",
|
||||
"license": "MIT",
|
||||
"jsdelivr": "dist/chart.min.js",
|
||||
"unpkg": "dist/chart.min.js",
|
||||
"main": "dist/chart.js",
|
||||
"module": "dist/chart.esm.js",
|
||||
"types": "types/index.esm.d.ts",
|
||||
"keywords": [
|
||||
"canvas",
|
||||
"charts",
|
||||
"data",
|
||||
"graphs",
|
||||
"html5",
|
||||
"responsive"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/chartjs/Chart.js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chartjs/Chart.js/issues"
|
||||
},
|
||||
"files": [
|
||||
"auto/**/*.js",
|
||||
"auto/**/*.d.ts",
|
||||
"dist/*.js",
|
||||
"dist/chunks/*.js",
|
||||
"types/*.d.ts",
|
||||
"types/helpers/*.d.ts",
|
||||
"helpers/**/*.js",
|
||||
"helpers/**/*.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"autobuild": "rollup -c -w",
|
||||
"build": "rollup -c",
|
||||
"dev": "karma start --auto-watch --no-single-run --browsers chrome --grep",
|
||||
"dev:ff": "karma start --auto-watch --no-single-run --browsers firefox --grep",
|
||||
"docs": "npm run build && vuepress build docs --no-cache",
|
||||
"docs:dev": "npm run build && vuepress dev docs --no-cache",
|
||||
"lint-js": "eslint \"src/**/*.js\" \"test/**/*.js\" \"docs/**/*.js\"",
|
||||
"lint-md": "eslint \"**/*.md\"",
|
||||
"lint-tsc": "tsc",
|
||||
"lint-types": "eslint \"types/**/*.ts\" && node -r esm types/tests/autogen.js && tsc -p types/tests/",
|
||||
"lint": "concurrently \"npm:lint-*\"",
|
||||
"test": "npm run lint && cross-env NODE_ENV=test karma start --auto-watch --single-run --coverage --grep"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kurkle/color": "^0.1.9",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-inject": "^4.0.2",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"@simonbrunel/vuepress-plugin-versions": "^0.2.0",
|
||||
"@types/offscreencanvas": "^2019.6.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.0",
|
||||
"@typescript-eslint/parser": "^5.8.0",
|
||||
"@vuepress/plugin-google-analytics": "^1.8.3",
|
||||
"@vuepress/plugin-html-redirect": "^0.1.2",
|
||||
"chartjs-adapter-luxon": "^1.0.0",
|
||||
"chartjs-adapter-moment": "^1.0.0",
|
||||
"chartjs-test-utils": "^0.3.1",
|
||||
"concurrently": "^6.0.1",
|
||||
"coveralls": "^3.1.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.5.0",
|
||||
"eslint-config-chartjs": "^0.3.0",
|
||||
"eslint-plugin-es": "^4.1.0",
|
||||
"eslint-plugin-html": "^6.1.2",
|
||||
"eslint-plugin-markdown": "^2.2.1",
|
||||
"esm": "^3.2.25",
|
||||
"glob": "^7.1.6",
|
||||
"jasmine": "^3.7.0",
|
||||
"jasmine-core": "^3.7.1",
|
||||
"karma": "^6.3.2",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-coverage": "^2.0.3",
|
||||
"karma-edge-launcher": "^0.4.2",
|
||||
"karma-firefox-launcher": "^2.1.0",
|
||||
"karma-jasmine": "^4.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.5.4",
|
||||
"karma-rollup-preprocessor": "^7.0.7",
|
||||
"karma-safari-private-launcher": "^1.0.0",
|
||||
"karma-spec-reporter": "0.0.32",
|
||||
"luxon": "^2.2.0",
|
||||
"markdown-it-include": "^2.0.0",
|
||||
"moment": "^2.29.1",
|
||||
"moment-timezone": "^0.5.34",
|
||||
"pixelmatch": "^5.2.1",
|
||||
"rollup": "^2.44.0",
|
||||
"rollup-plugin-analyzer": "^4.0.0",
|
||||
"rollup-plugin-cleanup": "^3.2.1",
|
||||
"rollup-plugin-istanbul": "^3.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"typedoc": "^0.22.10",
|
||||
"typedoc-plugin-markdown": "^3.6.1",
|
||||
"typescript": "^4.3.5",
|
||||
"vue-tabs-component": "^1.5.0",
|
||||
"vuepress": "^1.8.2",
|
||||
"vuepress-plugin-code-copy": "^1.0.6",
|
||||
"vuepress-plugin-flexsearch": "^0.3.0",
|
||||
"vuepress-plugin-redirect": "^1.2.5",
|
||||
"vuepress-plugin-tabs": "^0.3.0",
|
||||
"vuepress-plugin-typedoc": "^0.10.0",
|
||||
"vuepress-theme-chartjs": "^0.2.0",
|
||||
"yargs": "^17.0.1"
|
||||
}
|
||||
}
|
||||
|
|
126
node_modules/chart.js/types/adapters.d.ts
generated
vendored
126
node_modules/chart.js/types/adapters.d.ts
generated
vendored
|
@ -1,63 +1,63 @@
|
|||
export type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
||||
|
||||
export interface DateAdapter {
|
||||
// Override one or multiple of the methods to adjust to the logic of the current date library.
|
||||
override(members: Partial<DateAdapter>): void;
|
||||
readonly options: unknown;
|
||||
|
||||
/**
|
||||
* Returns a map of time formats for the supported formatting units defined
|
||||
* in Unit as well as 'datetime' representing a detailed date/time string.
|
||||
* @returns {{string: string}}
|
||||
*/
|
||||
formats(): { [key: string]: string };
|
||||
/**
|
||||
* Parses the given `value` and return the associated timestamp.
|
||||
* @param {unknown} value - the value to parse (usually comes from the data)
|
||||
* @param {string} [format] - the expected data format
|
||||
*/
|
||||
parse(value: unknown, format?: TimeUnit): number | null;
|
||||
/**
|
||||
* Returns the formatted date in the specified `format` for a given `timestamp`.
|
||||
* @param {number} timestamp - the timestamp to format
|
||||
* @param {string} format - the date/time token
|
||||
* @return {string}
|
||||
*/
|
||||
format(timestamp: number, format: TimeUnit): string;
|
||||
/**
|
||||
* Adds the specified `amount` of `unit` to the given `timestamp`.
|
||||
* @param {number} timestamp - the input timestamp
|
||||
* @param {number} amount - the amount to add
|
||||
* @param {Unit} unit - the unit as string
|
||||
* @return {number}
|
||||
*/
|
||||
add(timestamp: number, amount: number, unit: TimeUnit): number;
|
||||
/**
|
||||
* Returns the number of `unit` between the given timestamps.
|
||||
* @param {number} a - the input timestamp (reference)
|
||||
* @param {number} b - the timestamp to subtract
|
||||
* @param {Unit} unit - the unit as string
|
||||
* @return {number}
|
||||
*/
|
||||
diff(a: number, b: number, unit: TimeUnit): number;
|
||||
/**
|
||||
* Returns start of `unit` for the given `timestamp`.
|
||||
* @param {number} timestamp - the input timestamp
|
||||
* @param {Unit|'isoWeek'} unit - the unit as string
|
||||
* @param {number} [weekday] - the ISO day of the week with 1 being Monday
|
||||
* and 7 being Sunday (only needed if param *unit* is `isoWeek`).
|
||||
* @return {number}
|
||||
*/
|
||||
startOf(timestamp: number, unit: TimeUnit | 'isoWeek', weekday?: number): number;
|
||||
/**
|
||||
* Returns end of `unit` for the given `timestamp`.
|
||||
* @param {number} timestamp - the input timestamp
|
||||
* @param {Unit|'isoWeek'} unit - the unit as string
|
||||
* @return {number}
|
||||
*/
|
||||
endOf(timestamp: number, unit: TimeUnit | 'isoWeek'): number;
|
||||
}
|
||||
|
||||
export const _adapters: {
|
||||
_date: DateAdapter;
|
||||
};
|
||||
export type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
||||
|
||||
export interface DateAdapter {
|
||||
// Override one or multiple of the methods to adjust to the logic of the current date library.
|
||||
override(members: Partial<DateAdapter>): void;
|
||||
readonly options: unknown;
|
||||
|
||||
/**
|
||||
* Returns a map of time formats for the supported formatting units defined
|
||||
* in Unit as well as 'datetime' representing a detailed date/time string.
|
||||
* @returns {{string: string}}
|
||||
*/
|
||||
formats(): { [key: string]: string };
|
||||
/**
|
||||
* Parses the given `value` and return the associated timestamp.
|
||||
* @param {unknown} value - the value to parse (usually comes from the data)
|
||||
* @param {string} [format] - the expected data format
|
||||
*/
|
||||
parse(value: unknown, format?: TimeUnit): number | null;
|
||||
/**
|
||||
* Returns the formatted date in the specified `format` for a given `timestamp`.
|
||||
* @param {number} timestamp - the timestamp to format
|
||||
* @param {string} format - the date/time token
|
||||
* @return {string}
|
||||
*/
|
||||
format(timestamp: number, format: TimeUnit): string;
|
||||
/**
|
||||
* Adds the specified `amount` of `unit` to the given `timestamp`.
|
||||
* @param {number} timestamp - the input timestamp
|
||||
* @param {number} amount - the amount to add
|
||||
* @param {Unit} unit - the unit as string
|
||||
* @return {number}
|
||||
*/
|
||||
add(timestamp: number, amount: number, unit: TimeUnit): number;
|
||||
/**
|
||||
* Returns the number of `unit` between the given timestamps.
|
||||
* @param {number} a - the input timestamp (reference)
|
||||
* @param {number} b - the timestamp to subtract
|
||||
* @param {Unit} unit - the unit as string
|
||||
* @return {number}
|
||||
*/
|
||||
diff(a: number, b: number, unit: TimeUnit): number;
|
||||
/**
|
||||
* Returns start of `unit` for the given `timestamp`.
|
||||
* @param {number} timestamp - the input timestamp
|
||||
* @param {Unit|'isoWeek'} unit - the unit as string
|
||||
* @param {number} [weekday] - the ISO day of the week with 1 being Monday
|
||||
* and 7 being Sunday (only needed if param *unit* is `isoWeek`).
|
||||
* @return {number}
|
||||
*/
|
||||
startOf(timestamp: number, unit: TimeUnit | 'isoWeek', weekday?: number): number;
|
||||
/**
|
||||
* Returns end of `unit` for the given `timestamp`.
|
||||
* @param {number} timestamp - the input timestamp
|
||||
* @param {Unit|'isoWeek'} unit - the unit as string
|
||||
* @return {number}
|
||||
*/
|
||||
endOf(timestamp: number, unit: TimeUnit | 'isoWeek'): number;
|
||||
}
|
||||
|
||||
export const _adapters: {
|
||||
_date: DateAdapter;
|
||||
};
|
||||
|
|
65
node_modules/chart.js/types/animation.d.ts
generated
vendored
65
node_modules/chart.js/types/animation.d.ts
generated
vendored
|
@ -1,32 +1,33 @@
|
|||
import { Chart } from './index.esm';
|
||||
import { AnyObject } from './basic';
|
||||
|
||||
export class Animation {
|
||||
constructor(cfg: AnyObject, target: AnyObject, prop: string, to?: unknown);
|
||||
active(): boolean;
|
||||
update(cfg: AnyObject, to: unknown, date: number): void;
|
||||
cancel(): void;
|
||||
tick(date: number): void;
|
||||
}
|
||||
|
||||
export interface AnimationEvent {
|
||||
chart: Chart;
|
||||
numSteps: number;
|
||||
currentState: number;
|
||||
}
|
||||
|
||||
export class Animator {
|
||||
listen(chart: Chart, event: 'complete' | 'progress', cb: (event: AnimationEvent) => void): void;
|
||||
add(chart: Chart, items: readonly Animation[]): void;
|
||||
has(chart: Chart): boolean;
|
||||
start(chart: Chart): void;
|
||||
running(chart: Chart): boolean;
|
||||
stop(chart: Chart): void;
|
||||
remove(chart: Chart): boolean;
|
||||
}
|
||||
|
||||
export class Animations {
|
||||
constructor(chart: Chart, animations: AnyObject);
|
||||
configure(animations: AnyObject): void;
|
||||
update(target: AnyObject, values: AnyObject): undefined | boolean;
|
||||
}
|
||||
import { Chart } from './index.esm';
|
||||
import { AnyObject } from './basic';
|
||||
|
||||
export class Animation {
|
||||
constructor(cfg: AnyObject, target: AnyObject, prop: string, to?: unknown);
|
||||
active(): boolean;
|
||||
update(cfg: AnyObject, to: unknown, date: number): void;
|
||||
cancel(): void;
|
||||
tick(date: number): void;
|
||||
}
|
||||
|
||||
export interface AnimationEvent {
|
||||
chart: Chart;
|
||||
numSteps: number;
|
||||
initial: boolean;
|
||||
currentStep: number;
|
||||
}
|
||||
|
||||
export class Animator {
|
||||
listen(chart: Chart, event: 'complete' | 'progress', cb: (event: AnimationEvent) => void): void;
|
||||
add(chart: Chart, items: readonly Animation[]): void;
|
||||
has(chart: Chart): boolean;
|
||||
start(chart: Chart): void;
|
||||
running(chart: Chart): boolean;
|
||||
stop(chart: Chart): void;
|
||||
remove(chart: Chart): boolean;
|
||||
}
|
||||
|
||||
export class Animations {
|
||||
constructor(chart: Chart, animations: AnyObject);
|
||||
configure(animations: AnyObject): void;
|
||||
update(target: AnyObject, values: AnyObject): undefined | boolean;
|
||||
}
|
||||
|
|
6
node_modules/chart.js/types/basic.d.ts
generated
vendored
6
node_modules/chart.js/types/basic.d.ts
generated
vendored
|
@ -1,3 +1,3 @@
|
|||
|
||||
export type AnyObject = Record<string, unknown>;
|
||||
export type EmptyObject = Record<string, never>;
|
||||
|
||||
export type AnyObject = Record<string, unknown>;
|
||||
export type EmptyObject = Record<string, never>;
|
||||
|
|
2
node_modules/chart.js/types/color.d.ts
generated
vendored
2
node_modules/chart.js/types/color.d.ts
generated
vendored
|
@ -1 +1 @@
|
|||
export type Color = string | CanvasGradient | CanvasPattern;
|
||||
export type Color = string | CanvasGradient | CanvasPattern;
|
||||
|
|
34
node_modules/chart.js/types/element.d.ts
generated
vendored
34
node_modules/chart.js/types/element.d.ts
generated
vendored
|
@ -1,17 +1,17 @@
|
|||
import { AnyObject } from './basic';
|
||||
import { Point } from './geometric';
|
||||
|
||||
export interface Element<T = AnyObject, O = AnyObject> {
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
readonly active: boolean;
|
||||
readonly options: O;
|
||||
|
||||
tooltipPosition(useFinalPosition?: boolean): Point;
|
||||
hasValue(): boolean;
|
||||
getProps<P extends (keyof T)[]>(props: P, final?: boolean): Pick<T, P[number]>;
|
||||
}
|
||||
export const Element: {
|
||||
prototype: Element;
|
||||
new <T = AnyObject, O = AnyObject>(): Element<T, O>;
|
||||
};
|
||||
import { AnyObject } from './basic';
|
||||
import { Point } from './geometric';
|
||||
|
||||
export interface Element<T = AnyObject, O = AnyObject> {
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
readonly active: boolean;
|
||||
readonly options: O;
|
||||
|
||||
tooltipPosition(useFinalPosition?: boolean): Point;
|
||||
hasValue(): boolean;
|
||||
getProps<P extends (keyof T)[]>(props: P, final?: boolean): Pick<T, P[number]>;
|
||||
}
|
||||
export const Element: {
|
||||
prototype: Element;
|
||||
new <T = AnyObject, O = AnyObject>(): Element<T, O>;
|
||||
};
|
||||
|
|
74
node_modules/chart.js/types/geometric.d.ts
generated
vendored
74
node_modules/chart.js/types/geometric.d.ts
generated
vendored
|
@ -1,37 +1,37 @@
|
|||
export interface ChartArea {
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export type TRBL = {
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
}
|
||||
|
||||
export type TRBLCorners = {
|
||||
topLeft: number;
|
||||
topRight: number;
|
||||
bottomLeft: number;
|
||||
bottomRight: number;
|
||||
};
|
||||
|
||||
export type CornerRadius = number | Partial<TRBLCorners>;
|
||||
|
||||
export type RoundedRect = {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
radius?: CornerRadius
|
||||
}
|
||||
export interface ChartArea {
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export type TRBL = {
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
}
|
||||
|
||||
export type TRBLCorners = {
|
||||
topLeft: number;
|
||||
topRight: number;
|
||||
bottomLeft: number;
|
||||
bottomRight: number;
|
||||
};
|
||||
|
||||
export type CornerRadius = number | Partial<TRBLCorners>;
|
||||
|
||||
export type RoundedRect = {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
radius?: CornerRadius
|
||||
}
|
||||
|
|
202
node_modules/chart.js/types/helpers/helpers.canvas.d.ts
generated
vendored
202
node_modules/chart.js/types/helpers/helpers.canvas.d.ts
generated
vendored
|
@ -1,101 +1,101 @@
|
|||
import { PointStyle } from '../index.esm';
|
||||
import { Color } from '../color';
|
||||
import { ChartArea, RoundedRect } from '../geometric';
|
||||
import { CanvasFontSpec } from './helpers.options';
|
||||
|
||||
export function clearCanvas(canvas: HTMLCanvasElement, ctx?: CanvasRenderingContext2D): void;
|
||||
|
||||
export function clipArea(ctx: CanvasRenderingContext2D, area: ChartArea): void;
|
||||
|
||||
export function unclipArea(ctx: CanvasRenderingContext2D): void;
|
||||
|
||||
export interface DrawPointOptions {
|
||||
pointStyle: PointStyle;
|
||||
rotation?: number;
|
||||
radius: number;
|
||||
borderWidth: number;
|
||||
}
|
||||
|
||||
export function drawPoint(ctx: CanvasRenderingContext2D, options: DrawPointOptions, x: number, y: number): void;
|
||||
|
||||
/**
|
||||
* Converts the given font object into a CSS font string.
|
||||
* @param font a font object
|
||||
* @return The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font
|
||||
*/
|
||||
export function toFontString(font: { size: number; family: string; style?: string; weight?: string }): string | null;
|
||||
|
||||
export interface RenderTextOpts {
|
||||
/**
|
||||
* The fill color of the text. If unset, the existing
|
||||
* fillStyle property of the canvas is unchanged.
|
||||
*/
|
||||
color?: Color;
|
||||
|
||||
/**
|
||||
* The width of the strikethrough / underline
|
||||
* @default 2
|
||||
*/
|
||||
decorationWidth?: number;
|
||||
|
||||
/**
|
||||
* The max width of the text in pixels
|
||||
*/
|
||||
maxWidth?: number;
|
||||
|
||||
/**
|
||||
* A rotation to be applied to the canvas
|
||||
* This is applied after the translation is applied
|
||||
*/
|
||||
rotation?: number;
|
||||
|
||||
/**
|
||||
* Apply a strikethrough effect to the text
|
||||
*/
|
||||
strikethrough?: boolean;
|
||||
|
||||
/**
|
||||
* The color of the text stroke. If unset, the existing
|
||||
* strokeStyle property of the context is unchanged
|
||||
*/
|
||||
strokeColor?: Color;
|
||||
|
||||
/**
|
||||
* The text stroke width. If unset, the existing
|
||||
* lineWidth property of the context is unchanged
|
||||
*/
|
||||
strokeWidth?: number;
|
||||
|
||||
/**
|
||||
* The text alignment to use. If unset, the existing
|
||||
* textAlign property of the context is unchanged
|
||||
*/
|
||||
textAlign: CanvasTextAlign;
|
||||
|
||||
/**
|
||||
* The text baseline to use. If unset, the existing
|
||||
* textBaseline property of the context is unchanged
|
||||
*/
|
||||
textBaseline: CanvasTextBaseline;
|
||||
|
||||
/**
|
||||
* If specified, a translation to apply to the context
|
||||
*/
|
||||
translation?: [number, number];
|
||||
|
||||
/**
|
||||
* Underline the text
|
||||
*/
|
||||
underline?: boolean;
|
||||
}
|
||||
|
||||
export function renderText(
|
||||
ctx: CanvasRenderingContext2D,
|
||||
text: string | string[],
|
||||
x: number,
|
||||
y: number,
|
||||
font: CanvasFontSpec,
|
||||
opts?: RenderTextOpts
|
||||
): void;
|
||||
|
||||
export function addRoundedRectPath(ctx: CanvasRenderingContext2D, rect: RoundedRect): void;
|
||||
import { PointStyle } from '../index.esm';
|
||||
import { Color } from '../color';
|
||||
import { ChartArea, RoundedRect } from '../geometric';
|
||||
import { CanvasFontSpec } from './helpers.options';
|
||||
|
||||
export function clearCanvas(canvas: HTMLCanvasElement, ctx?: CanvasRenderingContext2D): void;
|
||||
|
||||
export function clipArea(ctx: CanvasRenderingContext2D, area: ChartArea): void;
|
||||
|
||||
export function unclipArea(ctx: CanvasRenderingContext2D): void;
|
||||
|
||||
export interface DrawPointOptions {
|
||||
pointStyle: PointStyle;
|
||||
rotation?: number;
|
||||
radius: number;
|
||||
borderWidth: number;
|
||||
}
|
||||
|
||||
export function drawPoint(ctx: CanvasRenderingContext2D, options: DrawPointOptions, x: number, y: number): void;
|
||||
|
||||
/**
|
||||
* Converts the given font object into a CSS font string.
|
||||
* @param font a font object
|
||||
* @return The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font
|
||||
*/
|
||||
export function toFontString(font: { size: number; family: string; style?: string; weight?: string }): string | null;
|
||||
|
||||
export interface RenderTextOpts {
|
||||
/**
|
||||
* The fill color of the text. If unset, the existing
|
||||
* fillStyle property of the canvas is unchanged.
|
||||
*/
|
||||
color?: Color;
|
||||
|
||||
/**
|
||||
* The width of the strikethrough / underline
|
||||
* @default 2
|
||||
*/
|
||||
decorationWidth?: number;
|
||||
|
||||
/**
|
||||
* The max width of the text in pixels
|
||||
*/
|
||||
maxWidth?: number;
|
||||
|
||||
/**
|
||||
* A rotation to be applied to the canvas
|
||||
* This is applied after the translation is applied
|
||||
*/
|
||||
rotation?: number;
|
||||
|
||||
/**
|
||||
* Apply a strikethrough effect to the text
|
||||
*/
|
||||
strikethrough?: boolean;
|
||||
|
||||
/**
|
||||
* The color of the text stroke. If unset, the existing
|
||||
* strokeStyle property of the context is unchanged
|
||||
*/
|
||||
strokeColor?: Color;
|
||||
|
||||
/**
|
||||
* The text stroke width. If unset, the existing
|
||||
* lineWidth property of the context is unchanged
|
||||
*/
|
||||
strokeWidth?: number;
|
||||
|
||||
/**
|
||||
* The text alignment to use. If unset, the existing
|
||||
* textAlign property of the context is unchanged
|
||||
*/
|
||||
textAlign: CanvasTextAlign;
|
||||
|
||||
/**
|
||||
* The text baseline to use. If unset, the existing
|
||||
* textBaseline property of the context is unchanged
|
||||
*/
|
||||
textBaseline: CanvasTextBaseline;
|
||||
|
||||
/**
|
||||
* If specified, a translation to apply to the context
|
||||
*/
|
||||
translation?: [number, number];
|
||||
|
||||
/**
|
||||
* Underline the text
|
||||
*/
|
||||
underline?: boolean;
|
||||
}
|
||||
|
||||
export function renderText(
|
||||
ctx: CanvasRenderingContext2D,
|
||||
text: string | string[],
|
||||
x: number,
|
||||
y: number,
|
||||
font: CanvasFontSpec,
|
||||
opts?: RenderTextOpts
|
||||
): void;
|
||||
|
||||
export function addRoundedRectPath(ctx: CanvasRenderingContext2D, rect: RoundedRect): void;
|
||||
|
|
40
node_modules/chart.js/types/helpers/helpers.collection.d.ts
generated
vendored
40
node_modules/chart.js/types/helpers/helpers.collection.d.ts
generated
vendored
|
@ -1,20 +1,20 @@
|
|||
export interface ArrayListener<T> {
|
||||
_onDataPush?(...item: T[]): void;
|
||||
_onDataPop?(): void;
|
||||
_onDataShift?(): void;
|
||||
_onDataSplice?(index: number, deleteCount: number, ...items: T[]): void;
|
||||
_onDataUnshift?(...item: T[]): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',
|
||||
* 'unshift') and notify the listener AFTER the array has been altered. Listeners are
|
||||
* called on the '_onData*' callbacks (e.g. _onDataPush, etc.) with same arguments.
|
||||
*/
|
||||
export function listenArrayEvents<T>(array: T[], listener: ArrayListener<T>): void;
|
||||
|
||||
/**
|
||||
* Removes the given array event listener and cleanup extra attached properties (such as
|
||||
* the _chartjs stub and overridden methods) if array doesn't have any more listeners.
|
||||
*/
|
||||
export function unlistenArrayEvents<T>(array: T[], listener: ArrayListener<T>): void;
|
||||
export interface ArrayListener<T> {
|
||||
_onDataPush?(...item: T[]): void;
|
||||
_onDataPop?(): void;
|
||||
_onDataShift?(): void;
|
||||
_onDataSplice?(index: number, deleteCount: number, ...items: T[]): void;
|
||||
_onDataUnshift?(...item: T[]): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',
|
||||
* 'unshift') and notify the listener AFTER the array has been altered. Listeners are
|
||||
* called on the '_onData*' callbacks (e.g. _onDataPush, etc.) with same arguments.
|
||||
*/
|
||||
export function listenArrayEvents<T>(array: T[], listener: ArrayListener<T>): void;
|
||||
|
||||
/**
|
||||
* Removes the given array event listener and cleanup extra attached properties (such as
|
||||
* the _chartjs stub and overridden methods) if array doesn't have any more listeners.
|
||||
*/
|
||||
export function unlistenArrayEvents<T>(array: T[], listener: ArrayListener<T>): void;
|
||||
|
|
66
node_modules/chart.js/types/helpers/helpers.color.d.ts
generated
vendored
66
node_modules/chart.js/types/helpers/helpers.color.d.ts
generated
vendored
|
@ -1,33 +1,33 @@
|
|||
export function color(value: CanvasGradient): CanvasGradient;
|
||||
export function color(value: CanvasPattern): CanvasPattern;
|
||||
export function color(
|
||||
value:
|
||||
| string
|
||||
| { r: number; g: number; b: number; a: number }
|
||||
| [number, number, number]
|
||||
| [number, number, number, number]
|
||||
): ColorModel;
|
||||
|
||||
export interface ColorModel {
|
||||
rgbString(): string;
|
||||
hexString(): string;
|
||||
hslString(): string;
|
||||
rgb: { r: number; g: number; b: number; a: number };
|
||||
valid: boolean;
|
||||
mix(color: ColorModel, weight: number): this;
|
||||
clone(): ColorModel;
|
||||
alpha(a: number): ColorModel;
|
||||
clearer(ration: number): ColorModel;
|
||||
greyscale(): ColorModel;
|
||||
opaquer(ratio: number): ColorModel;
|
||||
negate(): ColorModel;
|
||||
lighten(ratio: number): ColorModel;
|
||||
darken(ratio: number): ColorModel;
|
||||
saturate(ratio: number): ColorModel;
|
||||
desaturate(ratio: number): ColorModel;
|
||||
rotate(deg: number): this;
|
||||
}
|
||||
|
||||
export function getHoverColor(value: CanvasGradient): CanvasGradient;
|
||||
export function getHoverColor(value: CanvasPattern): CanvasPattern;
|
||||
export function getHoverColor(value: string): string;
|
||||
export function color(value: CanvasGradient): CanvasGradient;
|
||||
export function color(value: CanvasPattern): CanvasPattern;
|
||||
export function color(
|
||||
value:
|
||||
| string
|
||||
| { r: number; g: number; b: number; a: number }
|
||||
| [number, number, number]
|
||||
| [number, number, number, number]
|
||||
): ColorModel;
|
||||
|
||||
export interface ColorModel {
|
||||
rgbString(): string;
|
||||
hexString(): string;
|
||||
hslString(): string;
|
||||
rgb: { r: number; g: number; b: number; a: number };
|
||||
valid: boolean;
|
||||
mix(color: ColorModel, weight: number): this;
|
||||
clone(): ColorModel;
|
||||
alpha(a: number): ColorModel;
|
||||
clearer(ration: number): ColorModel;
|
||||
greyscale(): ColorModel;
|
||||
opaquer(ratio: number): ColorModel;
|
||||
negate(): ColorModel;
|
||||
lighten(ratio: number): ColorModel;
|
||||
darken(ratio: number): ColorModel;
|
||||
saturate(ratio: number): ColorModel;
|
||||
desaturate(ratio: number): ColorModel;
|
||||
rotate(deg: number): this;
|
||||
}
|
||||
|
||||
export function getHoverColor(value: CanvasGradient): CanvasGradient;
|
||||
export function getHoverColor(value: CanvasPattern): CanvasPattern;
|
||||
export function getHoverColor(value: string): string;
|
||||
|
|
314
node_modules/chart.js/types/helpers/helpers.core.d.ts
generated
vendored
314
node_modules/chart.js/types/helpers/helpers.core.d.ts
generated
vendored
|
@ -1,157 +1,157 @@
|
|||
import { AnyObject } from '../basic';
|
||||
|
||||
/**
|
||||
* An empty function that can be used, for example, for optional callback.
|
||||
*/
|
||||
export function noop(): void;
|
||||
|
||||
/**
|
||||
* Returns a unique id, sequentially generated from a global variable.
|
||||
* @returns {number}
|
||||
* @function
|
||||
*/
|
||||
export function uid(): number;
|
||||
/**
|
||||
* Returns true if `value` is neither null nor undefined, else returns false.
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function isNullOrUndef(value: unknown): value is null | undefined;
|
||||
/**
|
||||
* Returns true if `value` is an array (including typed arrays), else returns false.
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
* @function
|
||||
*/
|
||||
export function isArray<T = unknown>(value: unknown): value is ArrayLike<T>;
|
||||
/**
|
||||
* Returns true if `value` is an object (excluding null), else returns false.
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function isObject(value: unknown): value is AnyObject;
|
||||
/**
|
||||
* Returns true if `value` is a finite number, else returns false
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isFinite(value: unknown): value is number;
|
||||
|
||||
/**
|
||||
* Returns `value` if finite, else returns `defaultValue`.
|
||||
* @param {*} value - The value to return if defined.
|
||||
* @param {*} defaultValue - The value to return if `value` is not finite.
|
||||
* @returns {*}
|
||||
*/
|
||||
export function finiteOrDefault(value: unknown, defaultValue: number): number;
|
||||
|
||||
/**
|
||||
* Returns `value` if defined, else returns `defaultValue`.
|
||||
* @param {*} value - The value to return if defined.
|
||||
* @param {*} defaultValue - The value to return if `value` is undefined.
|
||||
* @returns {*}
|
||||
*/
|
||||
export function valueOrDefault<T>(value: T | undefined, defaultValue: T): T;
|
||||
|
||||
export function toPercentage(value: number | string, dimesion: number): number;
|
||||
export function toDimension(value: number | string, dimension: number): number;
|
||||
|
||||
/**
|
||||
* Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the
|
||||
* value returned by `fn`. If `fn` is not a function, this method returns undefined.
|
||||
* @param fn - The function to call.
|
||||
* @param args - The arguments with which `fn` should be called.
|
||||
* @param [thisArg] - The value of `this` provided for the call to `fn`.
|
||||
* @returns {*}
|
||||
*/
|
||||
export function callback<T extends (this: TA, ...args: unknown[]) => R, TA, R>(
|
||||
fn: T | undefined,
|
||||
args: unknown[],
|
||||
thisArg?: TA
|
||||
): R | undefined;
|
||||
|
||||
/**
|
||||
* Note(SB) for performance sake, this method should only be used when loopable type
|
||||
* is unknown or in none intensive code (not called often and small loopable). Else
|
||||
* it's preferable to use a regular for() loop and save extra function calls.
|
||||
* @param loopable - The object or array to be iterated.
|
||||
* @param fn - The function to call for each item.
|
||||
* @param [thisArg] - The value of `this` provided for the call to `fn`.
|
||||
* @param [reverse] - If true, iterates backward on the loopable.
|
||||
*/
|
||||
export function each<T, TA>(
|
||||
loopable: T[],
|
||||
fn: (this: TA, v: T, i: number) => void,
|
||||
thisArg?: TA,
|
||||
reverse?: boolean
|
||||
): void;
|
||||
/**
|
||||
* Note(SB) for performance sake, this method should only be used when loopable type
|
||||
* is unknown or in none intensive code (not called often and small loopable). Else
|
||||
* it's preferable to use a regular for() loop and save extra function calls.
|
||||
* @param loopable - The object or array to be iterated.
|
||||
* @param fn - The function to call for each item.
|
||||
* @param [thisArg] - The value of `this` provided for the call to `fn`.
|
||||
* @param [reverse] - If true, iterates backward on the loopable.
|
||||
*/
|
||||
export function each<T, TA>(
|
||||
loopable: { [key: string]: T },
|
||||
fn: (this: TA, v: T, k: string) => void,
|
||||
thisArg?: TA,
|
||||
reverse?: boolean
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of `source` without keeping references on objects and arrays.
|
||||
* @param source - The value to clone.
|
||||
*/
|
||||
export function clone<T>(source: T): T;
|
||||
|
||||
export interface MergeOptions {
|
||||
merger?: (key: string, target: AnyObject, source: AnyObject, options: AnyObject) => AnyObject;
|
||||
}
|
||||
/**
|
||||
* Recursively deep copies `source` properties into `target` with the given `options`.
|
||||
* IMPORTANT: `target` is not cloned and will be updated with `source` properties.
|
||||
* @param target - The target object in which all sources are merged into.
|
||||
* @param source - Object(s) to merge into `target`.
|
||||
* @param {object} [options] - Merging options:
|
||||
* @param {function} [options.merger] - The merge method (key, target, source, options)
|
||||
* @returns {object} The `target` object.
|
||||
*/
|
||||
export function merge<T>(target: T, source: [], options?: MergeOptions): T;
|
||||
export function merge<T, S1>(target: T, source: S1, options?: MergeOptions): T & S1;
|
||||
export function merge<T, S1>(target: T, source: [S1], options?: MergeOptions): T & S1;
|
||||
export function merge<T, S1, S2>(target: T, source: [S1, S2], options?: MergeOptions): T & S1 & S2;
|
||||
export function merge<T, S1, S2, S3>(target: T, source: [S1, S2, S3], options?: MergeOptions): T & S1 & S2 & S3;
|
||||
export function merge<T, S1, S2, S3, S4>(
|
||||
target: T,
|
||||
source: [S1, S2, S3, S4],
|
||||
options?: MergeOptions
|
||||
): T & S1 & S2 & S3 & S4;
|
||||
export function merge<T>(target: T, source: AnyObject[], options?: MergeOptions): AnyObject;
|
||||
|
||||
/**
|
||||
* Recursively deep copies `source` properties into `target` *only* if not defined in target.
|
||||
* IMPORTANT: `target` is not cloned and will be updated with `source` properties.
|
||||
* @param target - The target object in which all sources are merged into.
|
||||
* @param source - Object(s) to merge into `target`.
|
||||
* @returns The `target` object.
|
||||
*/
|
||||
export function mergeIf<T>(target: T, source: []): T;
|
||||
export function mergeIf<T, S1>(target: T, source: S1): T & S1;
|
||||
export function mergeIf<T, S1>(target: T, source: [S1]): T & S1;
|
||||
export function mergeIf<T, S1, S2>(target: T, source: [S1, S2]): T & S1 & S2;
|
||||
export function mergeIf<T, S1, S2, S3>(target: T, source: [S1, S2, S3]): T & S1 & S2 & S3;
|
||||
export function mergeIf<T, S1, S2, S3, S4>(target: T, source: [S1, S2, S3, S4]): T & S1 & S2 & S3 & S4;
|
||||
export function mergeIf<T>(target: T, source: AnyObject[]): AnyObject;
|
||||
|
||||
export function resolveObjectKey(obj: AnyObject, key: string): AnyObject;
|
||||
|
||||
export function defined(value: unknown): boolean;
|
||||
|
||||
export function isFunction(value: unknown): boolean;
|
||||
|
||||
export function setsEqual(a: Set<unknown>, b: Set<unknown>): boolean;
|
||||
import { AnyObject } from '../basic';
|
||||
|
||||
/**
|
||||
* An empty function that can be used, for example, for optional callback.
|
||||
*/
|
||||
export function noop(): void;
|
||||
|
||||
/**
|
||||
* Returns a unique id, sequentially generated from a global variable.
|
||||
* @returns {number}
|
||||
* @function
|
||||
*/
|
||||
export function uid(): number;
|
||||
/**
|
||||
* Returns true if `value` is neither null nor undefined, else returns false.
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function isNullOrUndef(value: unknown): value is null | undefined;
|
||||
/**
|
||||
* Returns true if `value` is an array (including typed arrays), else returns false.
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
* @function
|
||||
*/
|
||||
export function isArray<T = unknown>(value: unknown): value is ArrayLike<T>;
|
||||
/**
|
||||
* Returns true if `value` is an object (excluding null), else returns false.
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function isObject(value: unknown): value is AnyObject;
|
||||
/**
|
||||
* Returns true if `value` is a finite number, else returns false
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isFinite(value: unknown): value is number;
|
||||
|
||||
/**
|
||||
* Returns `value` if finite, else returns `defaultValue`.
|
||||
* @param {*} value - The value to return if defined.
|
||||
* @param {*} defaultValue - The value to return if `value` is not finite.
|
||||
* @returns {*}
|
||||
*/
|
||||
export function finiteOrDefault(value: unknown, defaultValue: number): number;
|
||||
|
||||
/**
|
||||
* Returns `value` if defined, else returns `defaultValue`.
|
||||
* @param {*} value - The value to return if defined.
|
||||
* @param {*} defaultValue - The value to return if `value` is undefined.
|
||||
* @returns {*}
|
||||
*/
|
||||
export function valueOrDefault<T>(value: T | undefined, defaultValue: T): T;
|
||||
|
||||
export function toPercentage(value: number | string, dimesion: number): number;
|
||||
export function toDimension(value: number | string, dimension: number): number;
|
||||
|
||||
/**
|
||||
* Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the
|
||||
* value returned by `fn`. If `fn` is not a function, this method returns undefined.
|
||||
* @param fn - The function to call.
|
||||
* @param args - The arguments with which `fn` should be called.
|
||||
* @param [thisArg] - The value of `this` provided for the call to `fn`.
|
||||
* @returns {*}
|
||||
*/
|
||||
export function callback<T extends (this: TA, ...args: unknown[]) => R, TA, R>(
|
||||
fn: T | undefined,
|
||||
args: unknown[],
|
||||
thisArg?: TA
|
||||
): R | undefined;
|
||||
|
||||
/**
|
||||
* Note(SB) for performance sake, this method should only be used when loopable type
|
||||
* is unknown or in none intensive code (not called often and small loopable). Else
|
||||
* it's preferable to use a regular for() loop and save extra function calls.
|
||||
* @param loopable - The object or array to be iterated.
|
||||
* @param fn - The function to call for each item.
|
||||
* @param [thisArg] - The value of `this` provided for the call to `fn`.
|
||||
* @param [reverse] - If true, iterates backward on the loopable.
|
||||
*/
|
||||
export function each<T, TA>(
|
||||
loopable: T[],
|
||||
fn: (this: TA, v: T, i: number) => void,
|
||||
thisArg?: TA,
|
||||
reverse?: boolean
|
||||
): void;
|
||||
/**
|
||||
* Note(SB) for performance sake, this method should only be used when loopable type
|
||||
* is unknown or in none intensive code (not called often and small loopable). Else
|
||||
* it's preferable to use a regular for() loop and save extra function calls.
|
||||
* @param loopable - The object or array to be iterated.
|
||||
* @param fn - The function to call for each item.
|
||||
* @param [thisArg] - The value of `this` provided for the call to `fn`.
|
||||
* @param [reverse] - If true, iterates backward on the loopable.
|
||||
*/
|
||||
export function each<T, TA>(
|
||||
loopable: { [key: string]: T },
|
||||
fn: (this: TA, v: T, k: string) => void,
|
||||
thisArg?: TA,
|
||||
reverse?: boolean
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of `source` without keeping references on objects and arrays.
|
||||
* @param source - The value to clone.
|
||||
*/
|
||||
export function clone<T>(source: T): T;
|
||||
|
||||
export interface MergeOptions {
|
||||
merger?: (key: string, target: AnyObject, source: AnyObject, options: AnyObject) => AnyObject;
|
||||
}
|
||||
/**
|
||||
* Recursively deep copies `source` properties into `target` with the given `options`.
|
||||
* IMPORTANT: `target` is not cloned and will be updated with `source` properties.
|
||||
* @param target - The target object in which all sources are merged into.
|
||||
* @param source - Object(s) to merge into `target`.
|
||||
* @param {object} [options] - Merging options:
|
||||
* @param {function} [options.merger] - The merge method (key, target, source, options)
|
||||
* @returns {object} The `target` object.
|
||||
*/
|
||||
export function merge<T>(target: T, source: [], options?: MergeOptions): T;
|
||||
export function merge<T, S1>(target: T, source: S1, options?: MergeOptions): T & S1;
|
||||
export function merge<T, S1>(target: T, source: [S1], options?: MergeOptions): T & S1;
|
||||
export function merge<T, S1, S2>(target: T, source: [S1, S2], options?: MergeOptions): T & S1 & S2;
|
||||
export function merge<T, S1, S2, S3>(target: T, source: [S1, S2, S3], options?: MergeOptions): T & S1 & S2 & S3;
|
||||
export function merge<T, S1, S2, S3, S4>(
|
||||
target: T,
|
||||
source: [S1, S2, S3, S4],
|
||||
options?: MergeOptions
|
||||
): T & S1 & S2 & S3 & S4;
|
||||
export function merge<T>(target: T, source: AnyObject[], options?: MergeOptions): AnyObject;
|
||||
|
||||
/**
|
||||
* Recursively deep copies `source` properties into `target` *only* if not defined in target.
|
||||
* IMPORTANT: `target` is not cloned and will be updated with `source` properties.
|
||||
* @param target - The target object in which all sources are merged into.
|
||||
* @param source - Object(s) to merge into `target`.
|
||||
* @returns The `target` object.
|
||||
*/
|
||||
export function mergeIf<T>(target: T, source: []): T;
|
||||
export function mergeIf<T, S1>(target: T, source: S1): T & S1;
|
||||
export function mergeIf<T, S1>(target: T, source: [S1]): T & S1;
|
||||
export function mergeIf<T, S1, S2>(target: T, source: [S1, S2]): T & S1 & S2;
|
||||
export function mergeIf<T, S1, S2, S3>(target: T, source: [S1, S2, S3]): T & S1 & S2 & S3;
|
||||
export function mergeIf<T, S1, S2, S3, S4>(target: T, source: [S1, S2, S3, S4]): T & S1 & S2 & S3 & S4;
|
||||
export function mergeIf<T>(target: T, source: AnyObject[]): AnyObject;
|
||||
|
||||
export function resolveObjectKey(obj: AnyObject, key: string): AnyObject;
|
||||
|
||||
export function defined(value: unknown): boolean;
|
||||
|
||||
export function isFunction(value: unknown): boolean;
|
||||
|
||||
export function setsEqual(a: Set<unknown>, b: Set<unknown>): boolean;
|
||||
|
|
68
node_modules/chart.js/types/helpers/helpers.curve.d.ts
generated
vendored
68
node_modules/chart.js/types/helpers/helpers.curve.d.ts
generated
vendored
|
@ -1,34 +1,34 @@
|
|||
export interface SplinePoint {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Props to Rob Spencer at scaled innovation for his post on splining between points
|
||||
* http://scaledinnovation.com/analytics/splines/aboutSplines.html
|
||||
*/
|
||||
export function splineCurve(
|
||||
firstPoint: SplinePoint & { skip?: boolean },
|
||||
middlePoint: SplinePoint,
|
||||
afterPoint: SplinePoint,
|
||||
t: number
|
||||
): {
|
||||
previous: SplinePoint;
|
||||
next: SplinePoint;
|
||||
};
|
||||
|
||||
export interface MonotoneSplinePoint extends SplinePoint {
|
||||
skip: boolean;
|
||||
cp1x?: number;
|
||||
cp1y?: number;
|
||||
cp2x?: number;
|
||||
cp2y?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function calculates Bézier control points in a similar way than |splineCurve|,
|
||||
* but preserves monotonicity of the provided data and ensures no local extremums are added
|
||||
* between the dataset discrete points due to the interpolation.
|
||||
* @see https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
|
||||
*/
|
||||
export function splineCurveMonotone(points: readonly MonotoneSplinePoint[], indexAxis?: 'x' | 'y'): void;
|
||||
export interface SplinePoint {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Props to Rob Spencer at scaled innovation for his post on splining between points
|
||||
* http://scaledinnovation.com/analytics/splines/aboutSplines.html
|
||||
*/
|
||||
export function splineCurve(
|
||||
firstPoint: SplinePoint & { skip?: boolean },
|
||||
middlePoint: SplinePoint,
|
||||
afterPoint: SplinePoint,
|
||||
t: number
|
||||
): {
|
||||
previous: SplinePoint;
|
||||
next: SplinePoint;
|
||||
};
|
||||
|
||||
export interface MonotoneSplinePoint extends SplinePoint {
|
||||
skip: boolean;
|
||||
cp1x?: number;
|
||||
cp1y?: number;
|
||||
cp2x?: number;
|
||||
cp2y?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function calculates Bézier control points in a similar way than |splineCurve|,
|
||||
* but preserves monotonicity of the provided data and ensures no local extremums are added
|
||||
* between the dataset discrete points due to the interpolation.
|
||||
* @see https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
|
||||
*/
|
||||
export function splineCurveMonotone(points: readonly MonotoneSplinePoint[], indexAxis?: 'x' | 'y'): void;
|
||||
|
|
40
node_modules/chart.js/types/helpers/helpers.dom.d.ts
generated
vendored
40
node_modules/chart.js/types/helpers/helpers.dom.d.ts
generated
vendored
|
@ -1,20 +1,20 @@
|
|||
import { ChartEvent } from '../index.esm';
|
||||
|
||||
export function getMaximumSize(node: HTMLElement, width?: number, height?: number, aspectRatio?: number): { width: number, height: number };
|
||||
export function getRelativePosition(
|
||||
evt: MouseEvent | ChartEvent,
|
||||
chart: { readonly canvas: HTMLCanvasElement }
|
||||
): { x: number; y: number };
|
||||
export function getStyle(el: HTMLElement, property: string): string;
|
||||
export function retinaScale(
|
||||
chart: {
|
||||
currentDevicePixelRatio: number;
|
||||
readonly canvas: HTMLCanvasElement;
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
readonly ctx: CanvasRenderingContext2D;
|
||||
},
|
||||
forceRatio: number,
|
||||
forceStyle?: boolean
|
||||
): void;
|
||||
export function readUsedSize(element: HTMLElement, property: 'width' | 'height'): number | undefined;
|
||||
import { ChartEvent } from '../index.esm';
|
||||
|
||||
export function getMaximumSize(node: HTMLElement, width?: number, height?: number, aspectRatio?: number): { width: number, height: number };
|
||||
export function getRelativePosition(
|
||||
evt: MouseEvent | ChartEvent,
|
||||
chart: { readonly canvas: HTMLCanvasElement }
|
||||
): { x: number; y: number };
|
||||
export function getStyle(el: HTMLElement, property: string): string;
|
||||
export function retinaScale(
|
||||
chart: {
|
||||
currentDevicePixelRatio: number;
|
||||
readonly canvas: HTMLCanvasElement;
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
readonly ctx: CanvasRenderingContext2D;
|
||||
},
|
||||
forceRatio: number,
|
||||
forceStyle?: boolean
|
||||
): void;
|
||||
export function readUsedSize(element: HTMLElement, property: 'width' | 'height'): number | undefined;
|
||||
|
|
10
node_modules/chart.js/types/helpers/helpers.easing.d.ts
generated
vendored
10
node_modules/chart.js/types/helpers/helpers.easing.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
import { EasingFunction } from '../index.esm';
|
||||
|
||||
export type EasingFunctionSignature = (t: number) => number;
|
||||
|
||||
export const easingEffects: Record<EasingFunction, EasingFunctionSignature>;
|
||||
import { EasingFunction } from '../index.esm';
|
||||
|
||||
export type EasingFunctionSignature = (t: number) => number;
|
||||
|
||||
export const easingEffects: Record<EasingFunction, EasingFunctionSignature>;
|
||||
|
|
46
node_modules/chart.js/types/helpers/helpers.extras.d.ts
generated
vendored
46
node_modules/chart.js/types/helpers/helpers.extras.d.ts
generated
vendored
|
@ -1,23 +1,23 @@
|
|||
export function fontString(pixelSize: number, fontStyle: string, fontFamily: string): string;
|
||||
|
||||
/**
|
||||
* Request animation polyfill
|
||||
*/
|
||||
export function requestAnimFrame(cb: () => void): void;
|
||||
|
||||
/**
|
||||
* Throttles calling `fn` once per animation frame
|
||||
* Latest argments are used on the actual call
|
||||
* @param {function} fn
|
||||
* @param {*} thisArg
|
||||
* @param {function} [updateFn]
|
||||
*/
|
||||
export function throttled(fn: (...args: unknown[]) => void, thisArg: unknown, updateFn?: (...args: unknown[]) => unknown[]): (...args: unknown[]) => void;
|
||||
|
||||
/**
|
||||
* Debounces calling `fn` for `delay` ms
|
||||
* @param {function} fn - Function to call. No arguments are passed.
|
||||
* @param {number} delay - Delay in ms. 0 = immediate invocation.
|
||||
* @returns {function}
|
||||
*/
|
||||
export function debounce(fn: () => void, delay: number): () => number;
|
||||
export function fontString(pixelSize: number, fontStyle: string, fontFamily: string): string;
|
||||
|
||||
/**
|
||||
* Request animation polyfill
|
||||
*/
|
||||
export function requestAnimFrame(cb: () => void): void;
|
||||
|
||||
/**
|
||||
* Throttles calling `fn` once per animation frame
|
||||
* Latest arguments are used on the actual call
|
||||
* @param {function} fn
|
||||
* @param {*} thisArg
|
||||
* @param {function} [updateFn]
|
||||
*/
|
||||
export function throttled(fn: (...args: unknown[]) => void, thisArg: unknown, updateFn?: (...args: unknown[]) => unknown[]): (...args: unknown[]) => void;
|
||||
|
||||
/**
|
||||
* Debounces calling `fn` for `delay` ms
|
||||
* @param {function} fn - Function to call. No arguments are passed.
|
||||
* @param {number} delay - Delay in ms. 0 = immediate invocation.
|
||||
* @returns {function}
|
||||
*/
|
||||
export function debounce(fn: () => void, delay: number): () => number;
|
||||
|
|
2
node_modules/chart.js/types/helpers/helpers.interpolation.d.ts
generated
vendored
2
node_modules/chart.js/types/helpers/helpers.interpolation.d.ts
generated
vendored
|
@ -1 +1 @@
|
|||
export {};
|
||||
export {};
|
||||
|
|
14
node_modules/chart.js/types/helpers/helpers.intl.d.ts
generated
vendored
14
node_modules/chart.js/types/helpers/helpers.intl.d.ts
generated
vendored
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Format a number using a localized number formatter.
|
||||
* @param num The number to format
|
||||
* @param locale The locale to pass to the Intl.NumberFormat constructor
|
||||
* @param options Number format options
|
||||
*/
|
||||
export function formatNumber(num: number, locale: string, options: Intl.NumberFormatOptions): string;
|
||||
/**
|
||||
* Format a number using a localized number formatter.
|
||||
* @param num The number to format
|
||||
* @param locale The locale to pass to the Intl.NumberFormat constructor
|
||||
* @param options Number format options
|
||||
*/
|
||||
export function formatNumber(num: number, locale: string, options: Intl.NumberFormatOptions): string;
|
||||
|
|
34
node_modules/chart.js/types/helpers/helpers.math.d.ts
generated
vendored
34
node_modules/chart.js/types/helpers/helpers.math.d.ts
generated
vendored
|
@ -1,17 +1,17 @@
|
|||
export function log10(x: number): number;
|
||||
export function isNumber(v: unknown): boolean;
|
||||
export function almostEquals(x: number, y: number, epsilon: number): boolean;
|
||||
export function almostWhole(x: number, epsilon: number): number;
|
||||
export function sign(x: number): number;
|
||||
export function niceNum(range: number): number;
|
||||
export function toRadians(degrees: number): number;
|
||||
export function toDegrees(radians: number): number;
|
||||
/**
|
||||
* Gets the angle from vertical upright to the point about a centre.
|
||||
*/
|
||||
export function getAngleFromPoint(
|
||||
centrePoint: { x: number; y: number },
|
||||
anglePoint: { x: number; y: number }
|
||||
): { angle: number; distance: number };
|
||||
|
||||
export function distanceBetweenPoints(pt1: { x: number; y: number }, pt2: { x: number; y: number }): number;
|
||||
export function log10(x: number): number;
|
||||
export function isNumber(v: unknown): boolean;
|
||||
export function almostEquals(x: number, y: number, epsilon: number): boolean;
|
||||
export function almostWhole(x: number, epsilon: number): number;
|
||||
export function sign(x: number): number;
|
||||
export function niceNum(range: number): number;
|
||||
export function toRadians(degrees: number): number;
|
||||
export function toDegrees(radians: number): number;
|
||||
/**
|
||||
* Gets the angle from vertical upright to the point about a centre.
|
||||
*/
|
||||
export function getAngleFromPoint(
|
||||
centrePoint: { x: number; y: number },
|
||||
anglePoint: { x: number; y: number }
|
||||
): { angle: number; distance: number };
|
||||
|
||||
export function distanceBetweenPoints(pt1: { x: number; y: number }, pt2: { x: number; y: number }): number;
|
||||
|
|
122
node_modules/chart.js/types/helpers/helpers.options.d.ts
generated
vendored
122
node_modules/chart.js/types/helpers/helpers.options.d.ts
generated
vendored
|
@ -1,61 +1,61 @@
|
|||
import { TRBL, TRBLCorners } from '../geometric';
|
||||
import { FontSpec } from '../index.esm';
|
||||
|
||||
export interface CanvasFontSpec extends FontSpec {
|
||||
string: string;
|
||||
}
|
||||
/**
|
||||
* Parses font options and returns the font object.
|
||||
* @param {object} options - A object that contains font options to be parsed.
|
||||
* @return {object} The font object.
|
||||
*/
|
||||
export function toFont(options: Partial<FontSpec>): CanvasFontSpec;
|
||||
|
||||
/**
|
||||
* Converts the given line height `value` in pixels for a specific font `size`.
|
||||
* @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').
|
||||
* @param {number} size - The font size (in pixels) used to resolve relative `value`.
|
||||
* @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function toLineHeight(value: string, size: number): number;
|
||||
|
||||
export function toTRBL(value: number | Partial<TRBL>): TRBL;
|
||||
export function toTRBLCorners(value: number | Partial<TRBLCorners>): TRBLCorners;
|
||||
|
||||
/**
|
||||
* Converts the given value into a padding object with pre-computed width/height.
|
||||
* @param {number|object} value - If a number, set the value to all TRBL component;
|
||||
* else, if an object, use defined properties and sets undefined ones to 0.
|
||||
* @returns {object} The padding values (top, right, bottom, left, width, height)
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function toPadding(
|
||||
value?: number | { top?: number; left?: number; right?: number; bottom?: number; x?:number, y?: number }
|
||||
): { top: number; left: number; right: number; bottom: number; width: number; height: number };
|
||||
|
||||
/**
|
||||
* Evaluates the given `inputs` sequentially and returns the first defined value.
|
||||
* @param inputs - An array of values, falling back to the last value.
|
||||
* @param [context] - If defined and the current value is a function, the value
|
||||
* is called with `context` as first argument and the result becomes the new input.
|
||||
* @param [index] - If defined and the current value is an array, the value
|
||||
* at `index` become the new input.
|
||||
* @param [info] - object to return information about resolution in
|
||||
* @param [info.cacheable] - Will be set to `false` if option is not cacheable.
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function resolve<T, C>(
|
||||
inputs: undefined | T | ((c: C) => T) | readonly T[],
|
||||
context?: C,
|
||||
index?: number,
|
||||
info?: { cacheable?: boolean }
|
||||
): T | undefined;
|
||||
|
||||
|
||||
/**
|
||||
* Create a context inheriting parentContext
|
||||
* @since 3.6.0
|
||||
*/
|
||||
export function createContext<P, T>(parentContext: P, context: T): P extends null ? T : P & T;
|
||||
import { TRBL, TRBLCorners } from '../geometric';
|
||||
import { FontSpec } from '../index.esm';
|
||||
|
||||
export interface CanvasFontSpec extends FontSpec {
|
||||
string: string;
|
||||
}
|
||||
/**
|
||||
* Parses font options and returns the font object.
|
||||
* @param {object} options - A object that contains font options to be parsed.
|
||||
* @return {object} The font object.
|
||||
*/
|
||||
export function toFont(options: Partial<FontSpec>): CanvasFontSpec;
|
||||
|
||||
/**
|
||||
* Converts the given line height `value` in pixels for a specific font `size`.
|
||||
* @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').
|
||||
* @param {number} size - The font size (in pixels) used to resolve relative `value`.
|
||||
* @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function toLineHeight(value: string, size: number): number;
|
||||
|
||||
export function toTRBL(value: number | Partial<TRBL>): TRBL;
|
||||
export function toTRBLCorners(value: number | Partial<TRBLCorners>): TRBLCorners;
|
||||
|
||||
/**
|
||||
* Converts the given value into a padding object with pre-computed width/height.
|
||||
* @param {number|object} value - If a number, set the value to all TRBL component;
|
||||
* else, if an object, use defined properties and sets undefined ones to 0.
|
||||
* @returns {object} The padding values (top, right, bottom, left, width, height)
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function toPadding(
|
||||
value?: number | { top?: number; left?: number; right?: number; bottom?: number; x?:number, y?: number }
|
||||
): { top: number; left: number; right: number; bottom: number; width: number; height: number };
|
||||
|
||||
/**
|
||||
* Evaluates the given `inputs` sequentially and returns the first defined value.
|
||||
* @param inputs - An array of values, falling back to the last value.
|
||||
* @param [context] - If defined and the current value is a function, the value
|
||||
* is called with `context` as first argument and the result becomes the new input.
|
||||
* @param [index] - If defined and the current value is an array, the value
|
||||
* at `index` become the new input.
|
||||
* @param [info] - object to return information about resolution in
|
||||
* @param [info.cacheable] - Will be set to `false` if option is not cacheable.
|
||||
* @since 2.7.0
|
||||
*/
|
||||
export function resolve<T, C>(
|
||||
inputs: undefined | T | ((c: C) => T) | readonly T[],
|
||||
context?: C,
|
||||
index?: number,
|
||||
info?: { cacheable?: boolean }
|
||||
): T | undefined;
|
||||
|
||||
|
||||
/**
|
||||
* Create a context inheriting parentContext
|
||||
* @since 3.6.0
|
||||
*/
|
||||
export function createContext<P, T>(parentContext: P, context: T): P extends null ? T : P & T;
|
||||
|
|
24
node_modules/chart.js/types/helpers/helpers.rtl.d.ts
generated
vendored
24
node_modules/chart.js/types/helpers/helpers.rtl.d.ts
generated
vendored
|
@ -1,12 +1,12 @@
|
|||
export interface RTLAdapter {
|
||||
x(x: number): number;
|
||||
setWidth(w: number): void;
|
||||
textAlign(align: 'center' | 'left' | 'right'): 'center' | 'left' | 'right';
|
||||
xPlus(x: number, value: number): number;
|
||||
leftForLtr(x: number, itemWidth: number): number;
|
||||
}
|
||||
export function getRtlAdapter(rtl: boolean, rectX: number, width: number): RTLAdapter;
|
||||
|
||||
export function overrideTextDirection(ctx: CanvasRenderingContext2D, direction: 'ltr' | 'rtl'): void;
|
||||
|
||||
export function restoreTextDirection(ctx: CanvasRenderingContext2D, original?: [string, string]): void;
|
||||
export interface RTLAdapter {
|
||||
x(x: number): number;
|
||||
setWidth(w: number): void;
|
||||
textAlign(align: 'center' | 'left' | 'right'): 'center' | 'left' | 'right';
|
||||
xPlus(x: number, value: number): number;
|
||||
leftForLtr(x: number, itemWidth: number): number;
|
||||
}
|
||||
export function getRtlAdapter(rtl: boolean, rectX: number, width: number): RTLAdapter;
|
||||
|
||||
export function overrideTextDirection(ctx: CanvasRenderingContext2D, direction: 'ltr' | 'rtl'): void;
|
||||
|
||||
export function restoreTextDirection(ctx: CanvasRenderingContext2D, original?: [string, string]): void;
|
||||
|
|
2
node_modules/chart.js/types/helpers/helpers.segment.d.ts
generated
vendored
2
node_modules/chart.js/types/helpers/helpers.segment.d.ts
generated
vendored
|
@ -1 +1 @@
|
|||
export {};
|
||||
export {};
|
||||
|
|
30
node_modules/chart.js/types/helpers/index.d.ts
generated
vendored
30
node_modules/chart.js/types/helpers/index.d.ts
generated
vendored
|
@ -1,15 +1,15 @@
|
|||
export * from './helpers.canvas';
|
||||
export * from './helpers.collection';
|
||||
export * from './helpers.color';
|
||||
export * from './helpers.core';
|
||||
export * from './helpers.curve';
|
||||
export * from './helpers.dom';
|
||||
export * from './helpers.easing';
|
||||
export * from './helpers.extras';
|
||||
export * from './helpers.interpolation';
|
||||
export * from './helpers.intl';
|
||||
export * from './helpers.math';
|
||||
export * from './helpers.options';
|
||||
export * from './helpers.canvas';
|
||||
export * from './helpers.rtl';
|
||||
export * from './helpers.segment';
|
||||
export * from './helpers.canvas';
|
||||
export * from './helpers.collection';
|
||||
export * from './helpers.color';
|
||||
export * from './helpers.core';
|
||||
export * from './helpers.curve';
|
||||
export * from './helpers.dom';
|
||||
export * from './helpers.easing';
|
||||
export * from './helpers.extras';
|
||||
export * from './helpers.interpolation';
|
||||
export * from './helpers.intl';
|
||||
export * from './helpers.math';
|
||||
export * from './helpers.options';
|
||||
export * from './helpers.canvas';
|
||||
export * from './helpers.rtl';
|
||||
export * from './helpers.segment';
|
||||
|
|
7112
node_modules/chart.js/types/index.esm.d.ts
generated
vendored
7112
node_modules/chart.js/types/index.esm.d.ts
generated
vendored
File diff suppressed because it is too large
Load diff
130
node_modules/chart.js/types/layout.d.ts
generated
vendored
130
node_modules/chart.js/types/layout.d.ts
generated
vendored
|
@ -1,65 +1,65 @@
|
|||
import { ChartArea } from './geometric';
|
||||
|
||||
export type LayoutPosition = 'left' | 'top' | 'right' | 'bottom' | 'center' | 'chartArea' | {[scaleId: string]: number};
|
||||
|
||||
export interface LayoutItem {
|
||||
/**
|
||||
* The position of the item in the chart layout. Possible values are
|
||||
*/
|
||||
position: LayoutPosition;
|
||||
/**
|
||||
* The weight used to sort the item. Higher weights are further away from the chart area
|
||||
*/
|
||||
weight: number;
|
||||
/**
|
||||
* if true, and the item is horizontal, then push vertical boxes down
|
||||
*/
|
||||
fullSize: boolean;
|
||||
/**
|
||||
* Width of item. Must be valid after update()
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* Height of item. Must be valid after update()
|
||||
*/
|
||||
height: number;
|
||||
/**
|
||||
* Left edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
left: number;
|
||||
/**
|
||||
* Top edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
top: number;
|
||||
/**
|
||||
* Right edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
right: number;
|
||||
/**
|
||||
* Bottom edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
bottom: number;
|
||||
|
||||
/**
|
||||
* Called before the layout process starts
|
||||
*/
|
||||
beforeLayout?(): void;
|
||||
/**
|
||||
* Draws the element
|
||||
*/
|
||||
draw(chartArea: ChartArea): void;
|
||||
/**
|
||||
* Returns an object with padding on the edges
|
||||
*/
|
||||
getPadding?(): ChartArea;
|
||||
/**
|
||||
* returns true if the layout item is horizontal (ie. top or bottom)
|
||||
*/
|
||||
isHorizontal(): boolean;
|
||||
/**
|
||||
* Takes two parameters: width and height.
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
update(width: number, height: number, margins?: ChartArea): void;
|
||||
}
|
||||
import { ChartArea } from './geometric';
|
||||
|
||||
export type LayoutPosition = 'left' | 'top' | 'right' | 'bottom' | 'center' | 'chartArea' | {[scaleId: string]: number};
|
||||
|
||||
export interface LayoutItem {
|
||||
/**
|
||||
* The position of the item in the chart layout. Possible values are
|
||||
*/
|
||||
position: LayoutPosition;
|
||||
/**
|
||||
* The weight used to sort the item. Higher weights are further away from the chart area
|
||||
*/
|
||||
weight: number;
|
||||
/**
|
||||
* if true, and the item is horizontal, then push vertical boxes down
|
||||
*/
|
||||
fullSize: boolean;
|
||||
/**
|
||||
* Width of item. Must be valid after update()
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* Height of item. Must be valid after update()
|
||||
*/
|
||||
height: number;
|
||||
/**
|
||||
* Left edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
left: number;
|
||||
/**
|
||||
* Top edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
top: number;
|
||||
/**
|
||||
* Right edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
right: number;
|
||||
/**
|
||||
* Bottom edge of the item. Set by layout system and cannot be used in update
|
||||
*/
|
||||
bottom: number;
|
||||
|
||||
/**
|
||||
* Called before the layout process starts
|
||||
*/
|
||||
beforeLayout?(): void;
|
||||
/**
|
||||
* Draws the element
|
||||
*/
|
||||
draw(chartArea: ChartArea): void;
|
||||
/**
|
||||
* Returns an object with padding on the edges
|
||||
*/
|
||||
getPadding?(): ChartArea;
|
||||
/**
|
||||
* returns true if the layout item is horizontal (ie. top or bottom)
|
||||
*/
|
||||
isHorizontal(): boolean;
|
||||
/**
|
||||
* Takes two parameters: width and height.
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
update(width: number, height: number, margins?: ChartArea): void;
|
||||
}
|
||||
|
|
42
node_modules/chart.js/types/utils.d.ts
generated
vendored
42
node_modules/chart.js/types/utils.d.ts
generated
vendored
|
@ -1,21 +1,21 @@
|
|||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
|
||||
// DeepPartial implementation taken from the utility-types NPM package, which is
|
||||
// Copyright (c) 2016 Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io)
|
||||
// and used under the terms of the MIT license
|
||||
export type DeepPartial<T> = T extends Function
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
? _DeepPartialArray<U>
|
||||
: T extends object
|
||||
? _DeepPartialObject<T>
|
||||
: T | undefined;
|
||||
|
||||
type _DeepPartialArray<T> = Array<DeepPartial<T>>
|
||||
type _DeepPartialObject<T> = { [P in keyof T]?: DeepPartial<T[P]> };
|
||||
|
||||
export type DistributiveArray<T> = [T] extends [unknown] ? Array<T> : never
|
||||
|
||||
// https://stackoverflow.com/a/50375286
|
||||
export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
||||
|
||||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
|
||||
// DeepPartial implementation taken from the utility-types NPM package, which is
|
||||
// Copyright (c) 2016 Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io)
|
||||
// and used under the terms of the MIT license
|
||||
export type DeepPartial<T> = T extends Function
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
? _DeepPartialArray<U>
|
||||
: T extends object
|
||||
? _DeepPartialObject<T>
|
||||
: T | undefined;
|
||||
|
||||
type _DeepPartialArray<T> = Array<DeepPartial<T>>
|
||||
type _DeepPartialObject<T> = { [P in keyof T]?: DeepPartial<T[P]> };
|
||||
|
||||
export type DistributiveArray<T> = [T] extends [unknown] ? Array<T> : never
|
||||
|
||||
// https://stackoverflow.com/a/50375286
|
||||
export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue