@desynova-digital/components 8.19.56 → 8.19.57
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.
|
@@ -116,6 +116,7 @@ var CircleDonut = function (_Component) {
|
|
|
116
116
|
var pathD = _this.props.data.graph_type && _this.props.data.graph_type != '' ? circleList[_this.props.data.graph_type].d : circleList['donutDefault'].d;
|
|
117
117
|
var circleCircumference = _this.props.data.graph_type && _this.props.data.graph_type != '' ? circleList[_this.props.data.graph_type].c : circleList['donutDefault'].c;
|
|
118
118
|
var graphTitleName = _this.props.data && _this.props.data.data && _this.props.data.data.name ? _this.props.data.data.name : new Date().getTime() + '';
|
|
119
|
+
graphTitleName = graphTitleName.replaceAll(" ", '');
|
|
119
120
|
|
|
120
121
|
return _react2.default.createElement(
|
|
121
122
|
StyledCircleDonut,
|
package/molecules/tabs/tabs.js
CHANGED
|
@@ -151,6 +151,15 @@ var Tabs = function (_React$Component) {
|
|
|
151
151
|
return selectedIndex;
|
|
152
152
|
}
|
|
153
153
|
}, {
|
|
154
|
+
key: 'getNestedTabFromPropsOrState',
|
|
155
|
+
value: function getNestedTabFromPropsOrState() {
|
|
156
|
+
var stateSelectedIndex = this.state.selectedNestedTabIndex;
|
|
157
|
+
var propsSelectedIndex = this.props.selectedNestedTabIndex;
|
|
158
|
+
var selectedIndex = typeof propsSelectedIndex !== 'undefined' ? propsSelectedIndex : stateSelectedIndex;
|
|
159
|
+
|
|
160
|
+
return selectedIndex;
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
154
163
|
key: 'changeNestedTab',
|
|
155
164
|
value: function changeNestedTab(nextIndex, parentTabIndex) {
|
|
156
165
|
// Deselect main tab when changing the nested tab
|
|
@@ -168,7 +177,7 @@ var Tabs = function (_React$Component) {
|
|
|
168
177
|
return null;
|
|
169
178
|
}
|
|
170
179
|
|
|
171
|
-
var
|
|
180
|
+
var nestedIdx = this.getNestedTabFromPropsOrState();
|
|
172
181
|
|
|
173
182
|
return _react2.default.createElement(
|
|
174
183
|
_react2.default.Fragment,
|
|
@@ -176,7 +185,6 @@ var Tabs = function (_React$Component) {
|
|
|
176
185
|
_react2.default.createElement(
|
|
177
186
|
TabLink,
|
|
178
187
|
{
|
|
179
|
-
ref: parentTabRef,
|
|
180
188
|
selected: this.state.selectedIndex === index,
|
|
181
189
|
allowPointerEvents: true,
|
|
182
190
|
key: tab.props.label,
|
|
@@ -191,7 +199,7 @@ var Tabs = function (_React$Component) {
|
|
|
191
199
|
'div',
|
|
192
200
|
{
|
|
193
201
|
key: nestedTab.props.label,
|
|
194
|
-
className:
|
|
202
|
+
className: nestedIdx === nestedIndex ? 'option active' : 'option',
|
|
195
203
|
theme: _this2.props.theme,
|
|
196
204
|
onClick: function onClick() {
|
|
197
205
|
return _this2.changeNestedTab(nestedIndex, index);
|
|
@@ -255,7 +263,9 @@ Tabs.propTypes = {
|
|
|
255
263
|
/** onSelect will be called with the new index when a new tab is selected by the user */
|
|
256
264
|
onSelect: _propTypes2.default.func,
|
|
257
265
|
|
|
258
|
-
index: _propTypes2.default.number
|
|
266
|
+
index: _propTypes2.default.number,
|
|
267
|
+
|
|
268
|
+
selectedNestedTabIndex: _propTypes2.default.number
|
|
259
269
|
};
|
|
260
270
|
|
|
261
271
|
Tabs.defaultProps = {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.57",
|
|
4
4
|
"description": "Components for Desynova Digital",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "desynova-digital",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": "desynova-digital",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@desynova-digital/tokens": "8.19.
|
|
10
|
+
"@desynova-digital/tokens": "8.19.57",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|