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/export/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/x-internals/export/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { loadStyleSheets } from "./loadStyleSheets.js";
|
||||
12
node_modules/@mui/x-internals/export/index.js
generated
vendored
Normal file
12
node_modules/@mui/x-internals/export/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "loadStyleSheets", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _loadStyleSheets.loadStyleSheets;
|
||||
}
|
||||
});
|
||||
var _loadStyleSheets = require("./loadStyleSheets");
|
||||
7
node_modules/@mui/x-internals/export/loadStyleSheets.d.ts
generated
vendored
Normal file
7
node_modules/@mui/x-internals/export/loadStyleSheets.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* Loads all stylesheets from the given root element into the document.
|
||||
* @returns an array of promises that resolve when each stylesheet is loaded
|
||||
* @param document Document to load stylesheets into
|
||||
* @param root Document or ShadowRoot to load stylesheets from
|
||||
*/
|
||||
export declare function loadStyleSheets(document: Document, root: Document | ShadowRoot): Promise<void>[];
|
||||
48
node_modules/@mui/x-internals/export/loadStyleSheets.js
generated
vendored
Normal file
48
node_modules/@mui/x-internals/export/loadStyleSheets.js
generated
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.loadStyleSheets = loadStyleSheets;
|
||||
/**
|
||||
* Loads all stylesheets from the given root element into the document.
|
||||
* @returns an array of promises that resolve when each stylesheet is loaded
|
||||
* @param document Document to load stylesheets into
|
||||
* @param root Document or ShadowRoot to load stylesheets from
|
||||
*/
|
||||
function loadStyleSheets(document, root) {
|
||||
const stylesheetLoadPromises = [];
|
||||
const headStyleElements = root.querySelectorAll("style, link[rel='stylesheet']");
|
||||
for (let i = 0; i < headStyleElements.length; i += 1) {
|
||||
const node = headStyleElements[i];
|
||||
if (node.tagName === 'STYLE') {
|
||||
const newHeadStyleElements = document.createElement(node.tagName);
|
||||
const sheet = node.sheet;
|
||||
if (sheet) {
|
||||
let styleCSS = '';
|
||||
for (let j = 0; j < sheet.cssRules.length; j += 1) {
|
||||
if (typeof sheet.cssRules[j].cssText === 'string') {
|
||||
styleCSS += `${sheet.cssRules[j].cssText}\r\n`;
|
||||
}
|
||||
}
|
||||
newHeadStyleElements.appendChild(document.createTextNode(styleCSS));
|
||||
document.head.appendChild(newHeadStyleElements);
|
||||
}
|
||||
} else if (node.getAttribute('href')) {
|
||||
// If `href` tag is empty, avoid loading these links
|
||||
|
||||
const newHeadStyleElements = document.createElement(node.tagName);
|
||||
for (let j = 0; j < node.attributes.length; j += 1) {
|
||||
const attr = node.attributes[j];
|
||||
if (attr) {
|
||||
newHeadStyleElements.setAttribute(attr.nodeName, attr.nodeValue || '');
|
||||
}
|
||||
}
|
||||
stylesheetLoadPromises.push(new Promise(resolve => {
|
||||
newHeadStyleElements.addEventListener('load', () => resolve());
|
||||
}));
|
||||
document.head.appendChild(newHeadStyleElements);
|
||||
}
|
||||
}
|
||||
return stylesheetLoadPromises;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue