html-reporter 9.5.1 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lib/static/components/controls/browser-list/index.js +239 -0
- package/lib/static/components/controls/browser-list/index.styl +52 -0
- package/lib/static/components/controls/browser-list/label.js +60 -0
- package/lib/static/components/controls/browser-list/label.styl +18 -0
- package/lib/static/components/controls/browser-list/utils.js +43 -0
- package/lib/static/components/controls/controls.less +0 -4
- package/lib/static/components/controls/strict-match-filter-input.js +26 -35
- package/lib/static/components/controls/test-name-filter-input.js +29 -41
- package/lib/static/components/gui.js +2 -2
- package/lib/static/components/header/header.css +1 -0
- package/lib/static/components/header/summary/dbSummary.js +15 -13
- package/lib/static/components/header/summary/summary.css +6 -3
- package/lib/static/components/popup/index.js +85 -0
- package/lib/static/components/popup/index.styl +37 -0
- package/lib/static/components/report.js +2 -4
- package/lib/static/components/sticky-header/gui.js +12 -0
- package/lib/static/components/sticky-header/index.js +36 -0
- package/lib/static/components/sticky-header/index.styl +37 -0
- package/lib/static/components/sticky-header/report.js +14 -0
- package/lib/static/containers/array/array.styl +32 -0
- package/lib/static/containers/array/index.js +61 -0
- package/lib/static/gui.html +1 -13
- package/lib/static/gui.min.css +1 -723
- package/lib/static/gui.min.js +61 -47
- package/lib/static/hooks/useElementSize.js +30 -0
- package/lib/static/hooks/useEventListener.js +25 -0
- package/lib/static/hooks/useWindowSize.js +25 -0
- package/lib/static/index.html +1 -13
- package/lib/static/report.min.css +1 -723
- package/lib/static/report.min.js +61 -47
- package/lib/static/styles.css +20 -103
- package/package.json +11 -9
- package/webpack.common.js +29 -18
- package/webpack.dev.js +4 -0
- package/webpack.prod.js +4 -9
- package/lib/static/2.min.js +0 -1925
- package/lib/static/components/controls/browser-list.js +0 -153
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {useState, useCallback, useLayoutEffect} from 'react';
|
|
2
|
+
|
|
3
|
+
import useEventListener from './useEventListener';
|
|
4
|
+
|
|
5
|
+
export default function useElementSize() {
|
|
6
|
+
const [ref, setRef] = useState(null);
|
|
7
|
+
const [size, setSize] = useState({
|
|
8
|
+
width: 0,
|
|
9
|
+
height: 0,
|
|
10
|
+
left: 0,
|
|
11
|
+
top: 0
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const handlePosition = useCallback(() => {
|
|
15
|
+
setSize({
|
|
16
|
+
width: ref && ref.offsetWidth || 0,
|
|
17
|
+
height: ref && ref.offsetHeight || 0,
|
|
18
|
+
left: ref && ref.offsetLeft || 0,
|
|
19
|
+
top: ref && ref.offsetTop || 0
|
|
20
|
+
});
|
|
21
|
+
}, [ref && ref.offsetHeight, ref && ref.offsetWidth, ref && ref.offsetLeft, ref && ref.offsetTop]);
|
|
22
|
+
|
|
23
|
+
useEventListener('resize', handlePosition);
|
|
24
|
+
|
|
25
|
+
useLayoutEffect(() => {
|
|
26
|
+
handlePosition();
|
|
27
|
+
}, [ref && ref.offsetHeight, ref && ref.offsetWidth, ref && ref.offsetLeft, ref && ref.offsetTop]);
|
|
28
|
+
|
|
29
|
+
return [setRef, size];
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {useRef, useEffect, useLayoutEffect} from 'react';
|
|
2
|
+
|
|
3
|
+
export default function useEventListener(eventName, handler, element, options) {
|
|
4
|
+
const savedHandler = useRef(handler);
|
|
5
|
+
|
|
6
|
+
useLayoutEffect(() => {
|
|
7
|
+
savedHandler.current = handler;
|
|
8
|
+
}, [handler]);
|
|
9
|
+
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const targetElement = element && element.current || window;
|
|
12
|
+
|
|
13
|
+
if (!targetElement || !targetElement.addEventListener) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const listener = event => savedHandler.current(event);
|
|
18
|
+
|
|
19
|
+
targetElement.addEventListener(eventName, listener, options);
|
|
20
|
+
|
|
21
|
+
return () => {
|
|
22
|
+
targetElement.removeEventListener(eventName, listener, options);
|
|
23
|
+
};
|
|
24
|
+
}, [eventName, element, options]);
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {useState, useLayoutEffect} from 'react';
|
|
2
|
+
|
|
3
|
+
import useEventListener from './useEventListener';
|
|
4
|
+
|
|
5
|
+
export default function useWindowSize() {
|
|
6
|
+
const [windowSize, setWindowSize] = useState({
|
|
7
|
+
width: 0,
|
|
8
|
+
height: 0
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const handleSize = () => {
|
|
12
|
+
setWindowSize({
|
|
13
|
+
width: window.innerWidth,
|
|
14
|
+
height: window.innerHeight
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
useEventListener('resize', handleSize);
|
|
19
|
+
|
|
20
|
+
useLayoutEffect(() => {
|
|
21
|
+
handleSize();
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
return windowSize;
|
|
25
|
+
}
|
package/lib/static/index.html
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>HTML report</title>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
7
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"/>
|
|
8
|
-
<link id="dynamic-favicon" rel="icon" type="image/png" href="icons/favicon.png" />
|
|
9
|
-
<link href="report.min.css" rel="stylesheet"></head>
|
|
10
|
-
<body class="report">
|
|
11
|
-
<div id="app"></div>
|
|
12
|
-
<script type="text/javascript" src="data.js"></script><script type="text/javascript" src="sql-wasm.js"></script><script type="text/javascript" src="report.min.js"></script></body>
|
|
13
|
-
</html>
|
|
1
|
+
<!doctype html><html><head><title>HTML report</title><meta charset="utf-8"><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"/><link id="dynamic-favicon" rel="icon" type="image/png" href="icons/favicon.png"/><link href="report.min.css" rel="stylesheet"></head><body class="report"><div id="app"></div><script src="data.js"></script><script src="sql-wasm.js"></script><script src="report.min.js"></script></body></html>
|