@laerdal/analytics-react-components
Advanced tools
Comparing version 1.0.32 to 1.0.33
@@ -262,3 +262,3 @@ import _pt from "prop-types"; | ||
width: width + "px", | ||
height: "48px", | ||
height: "auto", | ||
color: sortable ? COLORS.primary_600 : COLORS.black, | ||
@@ -271,2 +271,3 @@ cursor: sortable ? "pointer" : "normal", | ||
backgroundColor: color, | ||
wordBreak: "break-word", | ||
"&:hover": { | ||
@@ -273,0 +274,0 @@ backgroundColor: sortable ? COLORS.primary_20 : color |
@@ -141,3 +141,4 @@ import _pt from "prop-types"; | ||
index: graphData.referenceLine.index, | ||
value: graphData.referenceLine.value | ||
value: graphData.referenceLine.value, | ||
graphData: graphData | ||
}) | ||
@@ -144,0 +145,0 @@ }), /*#__PURE__*/React.createElement(XAxis, { |
@@ -80,2 +80,3 @@ import React from 'react'; | ||
let labely = props.viewBox.y - 30; | ||
let textMarginX = props.graphData?.yAxis?.textMargin?.x || '0'; | ||
let label = props.label; | ||
@@ -97,3 +98,3 @@ let labelStyle = { | ||
textAnchor: "middle", | ||
x: "0" | ||
x: textMarginX | ||
}, label))); | ||
@@ -191,9 +192,9 @@ } | ||
const y = viewBox.y - 6; | ||
const width = 60; | ||
const width = props?.graphData?.ReferenceLabel?.width || 60; | ||
const height = 25; | ||
let dx = -53.5; | ||
let dx = props?.graphData?.ReferenceLabel?.dx || -26.5; | ||
let dy = -50; | ||
if (props.index === 0) { | ||
dx = -0.5; | ||
dx = 26.5; | ||
} | ||
@@ -222,3 +223,3 @@ | ||
}), /*#__PURE__*/React.createElement("text", { | ||
x: dx + 27, | ||
x: dx, | ||
y: dy + 16, | ||
@@ -225,0 +226,0 @@ fill: "white", |
@@ -148,3 +148,4 @@ import _pt from "prop-types"; | ||
content: /*#__PURE__*/React.createElement(CustomizedYAxisLabel, { | ||
label: yAxisLabel | ||
label: yAxisLabel, | ||
graphData: graphData | ||
}) | ||
@@ -151,0 +152,0 @@ })), /*#__PURE__*/React.createElement(Tooltip, { |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -283,3 +283,3 @@ "use strict"; | ||
width: width + "px", | ||
height: "48px", | ||
height: "auto", | ||
color: sortable ? _lifeReactComponents.COLORS.primary_600 : _lifeReactComponents.COLORS.black, | ||
@@ -292,2 +292,3 @@ cursor: sortable ? "pointer" : "normal", | ||
backgroundColor: color, | ||
wordBreak: "break-word", | ||
"&:hover": { | ||
@@ -294,0 +295,0 @@ backgroundColor: sortable ? _lifeReactComponents.COLORS.primary_20 : color |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -154,3 +154,4 @@ "use strict"; | ||
index: graphData.referenceLine.index, | ||
value: graphData.referenceLine.value | ||
value: graphData.referenceLine.value, | ||
graphData: graphData | ||
}) | ||
@@ -157,0 +158,0 @@ }), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, { |
@@ -0,0 +0,0 @@ import React from 'react'; |
@@ -102,4 +102,7 @@ "use strict"; | ||
function CustomizedYAxisLabel(props) { | ||
var _props$graphData2, _props$graphData2$yAx, _props$graphData2$yAx2; | ||
var labelx = props.viewBox.width + 10; | ||
var labely = props.viewBox.y - 30; | ||
var textMarginX = ((_props$graphData2 = props.graphData) === null || _props$graphData2 === void 0 ? void 0 : (_props$graphData2$yAx = _props$graphData2.yAxis) === null || _props$graphData2$yAx === void 0 ? void 0 : (_props$graphData2$yAx2 = _props$graphData2$yAx.textMargin) === null || _props$graphData2$yAx2 === void 0 ? void 0 : _props$graphData2$yAx2.x) || '0'; | ||
var label = props.label; | ||
@@ -121,3 +124,3 @@ var labelStyle = { | ||
textAnchor: "middle", | ||
x: "0" | ||
x: textMarginX | ||
}, label))); | ||
@@ -142,6 +145,6 @@ } | ||
if (payload && payload.index === 0 && props.graphData.xAxis && props.graphData.xAxis.startText) { | ||
var _props$graphData2, _props$graphData2$xAx, _props$graphData2$xAx2, _props$graphData3, _props$graphData3$xAx, _props$graphData3$xAx2; | ||
var _props$graphData3, _props$graphData3$xAx, _props$graphData3$xAx2, _props$graphData4, _props$graphData4$xAx, _props$graphData4$xAx2; | ||
var endTextMarginX = ((_props$graphData2 = props.graphData) === null || _props$graphData2 === void 0 ? void 0 : (_props$graphData2$xAx = _props$graphData2.xAxis) === null || _props$graphData2$xAx === void 0 ? void 0 : (_props$graphData2$xAx2 = _props$graphData2$xAx.beginTextMargin) === null || _props$graphData2$xAx2 === void 0 ? void 0 : _props$graphData2$xAx2.x) || '-30'; | ||
var endTextMarginDy = ((_props$graphData3 = props.graphData) === null || _props$graphData3 === void 0 ? void 0 : (_props$graphData3$xAx = _props$graphData3.xAxis) === null || _props$graphData3$xAx === void 0 ? void 0 : (_props$graphData3$xAx2 = _props$graphData3$xAx.beginTextMargin) === null || _props$graphData3$xAx2 === void 0 ? void 0 : _props$graphData3$xAx2.dy) || '30'; | ||
var endTextMarginX = ((_props$graphData3 = props.graphData) === null || _props$graphData3 === void 0 ? void 0 : (_props$graphData3$xAx = _props$graphData3.xAxis) === null || _props$graphData3$xAx === void 0 ? void 0 : (_props$graphData3$xAx2 = _props$graphData3$xAx.beginTextMargin) === null || _props$graphData3$xAx2 === void 0 ? void 0 : _props$graphData3$xAx2.x) || '-30'; | ||
var endTextMarginDy = ((_props$graphData4 = props.graphData) === null || _props$graphData4 === void 0 ? void 0 : (_props$graphData4$xAx = _props$graphData4.xAxis) === null || _props$graphData4$xAx === void 0 ? void 0 : (_props$graphData4$xAx2 = _props$graphData4$xAx.beginTextMargin) === null || _props$graphData4$xAx2 === void 0 ? void 0 : _props$graphData4$xAx2.dy) || '30'; | ||
beginQuarterText = /*#__PURE__*/_react.default.createElement("tspan", { | ||
@@ -156,7 +159,7 @@ style: beginEndTextStyle, | ||
if (props.graphData && props.graphData.dataPoints && payload && payload.index === props.graphData.dataPoints.length - 1 && props.graphData.xAxis && props.graphData.xAxis.endText) { | ||
var _props$graphData4, _props$graphData4$xAx, _props$graphData4$xAx2, _props$graphData5, _props$graphData5$xAx, _props$graphData5$xAx2; | ||
var _props$graphData5, _props$graphData5$xAx, _props$graphData5$xAx2, _props$graphData6, _props$graphData6$xAx, _props$graphData6$xAx2; | ||
var _endTextMarginX = ((_props$graphData4 = props.graphData) === null || _props$graphData4 === void 0 ? void 0 : (_props$graphData4$xAx = _props$graphData4.xAxis) === null || _props$graphData4$xAx === void 0 ? void 0 : (_props$graphData4$xAx2 = _props$graphData4$xAx.endTextMargin) === null || _props$graphData4$xAx2 === void 0 ? void 0 : _props$graphData4$xAx2.x) || '30'; | ||
var _endTextMarginX = ((_props$graphData5 = props.graphData) === null || _props$graphData5 === void 0 ? void 0 : (_props$graphData5$xAx = _props$graphData5.xAxis) === null || _props$graphData5$xAx === void 0 ? void 0 : (_props$graphData5$xAx2 = _props$graphData5$xAx.endTextMargin) === null || _props$graphData5$xAx2 === void 0 ? void 0 : _props$graphData5$xAx2.x) || '30'; | ||
var _endTextMarginDy = ((_props$graphData5 = props.graphData) === null || _props$graphData5 === void 0 ? void 0 : (_props$graphData5$xAx = _props$graphData5.xAxis) === null || _props$graphData5$xAx === void 0 ? void 0 : (_props$graphData5$xAx2 = _props$graphData5$xAx.endTextMargin) === null || _props$graphData5$xAx2 === void 0 ? void 0 : _props$graphData5$xAx2.dy) || '30'; | ||
var _endTextMarginDy = ((_props$graphData6 = props.graphData) === null || _props$graphData6 === void 0 ? void 0 : (_props$graphData6$xAx = _props$graphData6.xAxis) === null || _props$graphData6$xAx === void 0 ? void 0 : (_props$graphData6$xAx2 = _props$graphData6$xAx.endTextMargin) === null || _props$graphData6$xAx2 === void 0 ? void 0 : _props$graphData6$xAx2.dy) || '30'; | ||
@@ -215,2 +218,4 @@ endQuarterText = /*#__PURE__*/_react.default.createElement("tspan", { | ||
function ReferenceLabel(props) { | ||
var _props$graphData7, _props$graphData7$Ref, _props$graphData8, _props$graphData8$Ref; | ||
var value = props.value, | ||
@@ -222,9 +227,9 @@ viewBox = props.viewBox; | ||
var y = viewBox.y - 6; | ||
var width = 60; | ||
var width = (props === null || props === void 0 ? void 0 : (_props$graphData7 = props.graphData) === null || _props$graphData7 === void 0 ? void 0 : (_props$graphData7$Ref = _props$graphData7.ReferenceLabel) === null || _props$graphData7$Ref === void 0 ? void 0 : _props$graphData7$Ref.width) || 60; | ||
var height = 25; | ||
var dx = -53.5; | ||
var dx = (props === null || props === void 0 ? void 0 : (_props$graphData8 = props.graphData) === null || _props$graphData8 === void 0 ? void 0 : (_props$graphData8$Ref = _props$graphData8.ReferenceLabel) === null || _props$graphData8$Ref === void 0 ? void 0 : _props$graphData8$Ref.dx) || -26.5; | ||
var dy = -50; | ||
if (props.index === 0) { | ||
dx = -0.5; | ||
dx = 26.5; | ||
} | ||
@@ -253,3 +258,3 @@ | ||
}), /*#__PURE__*/_react.default.createElement("text", { | ||
x: dx + 27, | ||
x: dx, | ||
y: dy + 16, | ||
@@ -256,0 +261,0 @@ fill: "white", |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -167,3 +167,4 @@ "use strict"; | ||
content: /*#__PURE__*/_react.default.createElement(_chartUtils.CustomizedYAxisLabel, { | ||
label: yAxisLabel | ||
label: yAxisLabel, | ||
graphData: graphData | ||
}) | ||
@@ -170,0 +171,0 @@ })), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, { |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -0,0 +0,0 @@ declare module "*.svg" { |
declare module '*.svg'; |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -0,0 +0,0 @@ interface ImageProps { |
@@ -0,0 +0,0 @@ export * from './types'; |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -0,0 +0,0 @@ import { FunctionComponent } from 'react'; |
@@ -0,0 +0,0 @@ import { Nav as NavRB, Navbar as NavbarRB, NavDropdown as NavDropdownRB } from 'react-bootstrap'; |
@@ -0,0 +0,0 @@ export declare const Normal: import("styled-components").StyledComponent<"div", any, {}, never>; |
@@ -0,0 +0,0 @@ export interface Product { |
@@ -292,3 +292,3 @@ (function (global, factory) { | ||
width: width + "px", | ||
height: "48px", | ||
height: "auto", | ||
color: sortable ? _lifeReactComponents.COLORS.primary_600 : _lifeReactComponents.COLORS.black, | ||
@@ -301,2 +301,3 @@ cursor: sortable ? "pointer" : "normal", | ||
backgroundColor: color, | ||
wordBreak: "break-word", | ||
"&:hover": { | ||
@@ -303,0 +304,0 @@ backgroundColor: sortable ? _lifeReactComponents.COLORS.primary_20 : color |
@@ -168,3 +168,4 @@ (function (global, factory) { | ||
index: graphData.referenceLine.index, | ||
value: graphData.referenceLine.value | ||
value: graphData.referenceLine.value, | ||
graphData: graphData | ||
}) | ||
@@ -171,0 +172,0 @@ }), /*#__PURE__*/_react2.default.createElement(_recharts.XAxis, { |
@@ -115,2 +115,3 @@ (function (global, factory) { | ||
let labely = props.viewBox.y - 30; | ||
let textMarginX = props.graphData?.yAxis?.textMargin?.x || '0'; | ||
let label = props.label; | ||
@@ -132,3 +133,3 @@ let labelStyle = { | ||
textAnchor: "middle", | ||
x: "0" | ||
x: textMarginX | ||
}, label))); | ||
@@ -228,9 +229,9 @@ } | ||
const y = viewBox.y - 6; | ||
const width = 60; | ||
const width = props?.graphData?.ReferenceLabel?.width || 60; | ||
const height = 25; | ||
let dx = -53.5; | ||
let dx = props?.graphData?.ReferenceLabel?.dx || -26.5; | ||
let dy = -50; | ||
if (props.index === 0) { | ||
dx = -0.5; | ||
dx = 26.5; | ||
} | ||
@@ -259,3 +260,3 @@ | ||
}), /*#__PURE__*/_react2.default.createElement("text", { | ||
x: dx + 27, | ||
x: dx, | ||
y: dy + 16, | ||
@@ -262,0 +263,0 @@ fill: "white", |
@@ -175,3 +175,4 @@ (function (global, factory) { | ||
content: /*#__PURE__*/_react2.default.createElement(_chartUtils.CustomizedYAxisLabel, { | ||
label: yAxisLabel | ||
label: yAxisLabel, | ||
graphData: graphData | ||
}) | ||
@@ -178,0 +179,0 @@ })), /*#__PURE__*/_react2.default.createElement(_recharts.Tooltip, { |
{ | ||
"name": "@laerdal/analytics-react-components", | ||
"version": "1.0.32", | ||
"version": "1.0.33", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "Hans-Henrik Jensen <hans-henrik.jensen@laerdal.com>", |
@@ -0,0 +0,0 @@ # Laerdal React component library for Analytics |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
750732
150
8514
1