Added Statistics calculation
Statistics now show calculated values
This commit is contained in:
parent
fe87374e47
commit
fc0f69dacb
2147 changed files with 141321 additions and 39 deletions
1
node_modules/@mui/x-internals/rafThrottle/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/x-internals/rafThrottle/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./rafThrottle.js";
|
||||
16
node_modules/@mui/x-internals/rafThrottle/index.js
generated
vendored
Normal file
16
node_modules/@mui/x-internals/rafThrottle/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _rafThrottle = require("./rafThrottle");
|
||||
Object.keys(_rafThrottle).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _rafThrottle[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _rafThrottle[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
16
node_modules/@mui/x-internals/rafThrottle/rafThrottle.d.ts
generated
vendored
Normal file
16
node_modules/@mui/x-internals/rafThrottle/rafThrottle.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
export interface Cancelable {
|
||||
clear(): void;
|
||||
}
|
||||
/**
|
||||
* Creates a throttled function that only invokes `fn` at most once per animation frame.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const throttled = rafThrottle((value: number) => console.log(value));
|
||||
* window.addEventListener('scroll', (e) => throttled(e.target.scrollTop));
|
||||
* ```
|
||||
*
|
||||
* @param fn Callback function
|
||||
* @return The `requestAnimationFrame` throttled function
|
||||
*/
|
||||
export declare function rafThrottle<T extends (...args: any[]) => any>(fn: T): T & Cancelable;
|
||||
39
node_modules/@mui/x-internals/rafThrottle/rafThrottle.js
generated
vendored
Normal file
39
node_modules/@mui/x-internals/rafThrottle/rafThrottle.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.rafThrottle = rafThrottle;
|
||||
/**
|
||||
* Creates a throttled function that only invokes `fn` at most once per animation frame.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const throttled = rafThrottle((value: number) => console.log(value));
|
||||
* window.addEventListener('scroll', (e) => throttled(e.target.scrollTop));
|
||||
* ```
|
||||
*
|
||||
* @param fn Callback function
|
||||
* @return The `requestAnimationFrame` throttled function
|
||||
*/
|
||||
function rafThrottle(fn) {
|
||||
let lastArgs;
|
||||
let rafRef;
|
||||
const later = () => {
|
||||
rafRef = null;
|
||||
fn(...lastArgs);
|
||||
};
|
||||
function throttled(...args) {
|
||||
lastArgs = args;
|
||||
if (!rafRef) {
|
||||
rafRef = requestAnimationFrame(later);
|
||||
}
|
||||
}
|
||||
throttled.clear = () => {
|
||||
if (rafRef) {
|
||||
cancelAnimationFrame(rafRef);
|
||||
rafRef = null;
|
||||
}
|
||||
};
|
||||
return throttled;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue