@spider-analyzer/timeline 5.0.0 → 5.0.2
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 +20 -0
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
- package/src/TimeLine.tsx +7 -1
- /package/dist/{timeline-EX2XZ6IP.css → timeline.css} +0 -0
- /package/dist/{tipDark-BQEJ43KY.css → tipDark.css} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spider-analyzer/timeline",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "React graphical component to display metric over time with a time selection feature.",
|
|
5
5
|
"author": "Thibaut Raballand <spider.analyzer@gmail.com> (https://spider-analyzer.io)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"import": "./dist/index.mjs",
|
|
33
33
|
"require": "./dist/index.js"
|
|
34
34
|
},
|
|
35
|
+
"./timeline.css": "./dist/timeline.css",
|
|
36
|
+
"./tipDark.css": "./dist/tipDark.css",
|
|
37
|
+
"./dist/timeline.css": "./dist/timeline.css",
|
|
38
|
+
"./dist/tipDark.css": "./dist/tipDark.css",
|
|
35
39
|
"./package.json": "./package.json"
|
|
36
40
|
},
|
|
37
41
|
"sideEffects": [
|
package/src/TimeLine.tsx
CHANGED
|
@@ -886,9 +886,15 @@ const TimeLine = forwardRef<TimeLineHandle, any>(function TimeLineWrapper(props,
|
|
|
886
886
|
else if (ret) apply(ret);
|
|
887
887
|
}, [props.onLoadDefaultDomain, props.onDomainChange, zone]);
|
|
888
888
|
|
|
889
|
-
// Build the moment-typed props the inner expects.
|
|
889
|
+
// Build the moment-typed props the inner expects. Apply the same
|
|
890
|
+
// defaults the inner destructures locally so that ref-path accesses
|
|
891
|
+
// (propsRef.current.xAxis.spaceBetweenTicks etc.) never trip on an
|
|
892
|
+
// undefined consumer prop.
|
|
890
893
|
const innerProps: any = {
|
|
891
894
|
...props,
|
|
895
|
+
xAxis: { ...xAxisDefault, ...(props.xAxis ?? {}) },
|
|
896
|
+
yAxis: props.yAxis ?? {},
|
|
897
|
+
margin: { ...marginDefault, ...(props.margin ?? {}) },
|
|
892
898
|
domains: stack,
|
|
893
899
|
timeSpan: props.timeSpan ? timeSpanToMoments(props.timeSpan, zone) : undefined,
|
|
894
900
|
maxDomain: props.maxDomain ? domainToMoments(props.maxDomain, zone) : undefined,
|
|
File without changes
|
|
File without changes
|