@zohodesk/components 1.0.0-temp-82 → 1.0.0-temp-83
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/README.md +4 -0
- package/es/Tab/Tabs.js +2 -2
- package/es/Tooltip/Tooltip.js +4 -1
- package/lib/Tab/Tabs.js +2 -2
- package/lib/Tooltip/Tooltip.js +4 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,6 +32,10 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.0.0-alpha-253
|
|
36
|
+
|
|
37
|
+
- Tabs, Tooltip => if condition check added to reduce murphy error logs
|
|
38
|
+
|
|
35
39
|
# 1.0.0-alpha-252
|
|
36
40
|
|
|
37
41
|
- **Select,GroupSelect,SelectWithAvatar,SelectWithIcon,MultiSelect,MultiSelectWithAvatar** - Initial Loader and Scroll End Loader added.
|
package/es/Tab/Tabs.js
CHANGED
|
@@ -223,7 +223,7 @@ class Tabs extends React.Component {
|
|
|
223
223
|
let {
|
|
224
224
|
align
|
|
225
225
|
} = this.props;
|
|
226
|
-
let totalDimension = getTotalDimension(this.tabsEle, align);
|
|
226
|
+
let totalDimension = this.tabsEle && getTotalDimension(this.tabsEle, align);
|
|
227
227
|
return totalDimension;
|
|
228
228
|
}
|
|
229
229
|
getTabDimensions() {
|
|
@@ -234,7 +234,7 @@ class Tabs extends React.Component {
|
|
|
234
234
|
} = this.props;
|
|
235
235
|
let tabDimensions = {};
|
|
236
236
|
React.Children.forEach(children, child => /*#__PURE__*/React.isValidElement(child) && child.type === childType && this[child.props.id] && Object.assign(tabDimensions, {
|
|
237
|
-
[child.props.id]: getTotalDimension(this[child.props.id], align)
|
|
237
|
+
[child.props.id]: this[child.props.id] && getTotalDimension(this[child.props.id], align)
|
|
238
238
|
}));
|
|
239
239
|
return tabDimensions;
|
|
240
240
|
}
|
package/es/Tooltip/Tooltip.js
CHANGED
|
@@ -4,6 +4,7 @@ import { propTypes } from './props/propTypes';
|
|
|
4
4
|
import { getLibraryConfig } from '../Provider/Config';
|
|
5
5
|
import style from './Tooltip.module.css';
|
|
6
6
|
import ResizeObserver from '../Responsive/ResizeObserver';
|
|
7
|
+
import selectn from 'selectn';
|
|
7
8
|
export default class Tooltip extends React.Component {
|
|
8
9
|
constructor(props) {
|
|
9
10
|
super(props);
|
|
@@ -146,7 +147,9 @@ export default class Tooltip extends React.Component {
|
|
|
146
147
|
// isContentDotted = element.offsetHeight < element.scrollHeight;
|
|
147
148
|
// }
|
|
148
149
|
} else {
|
|
149
|
-
|
|
150
|
+
const offWidth = selectn('parentElement.offsetWidth', element) || 0;
|
|
151
|
+
const scrollWidth = selectn('parentElement.scrollWidth', element) || 0;
|
|
152
|
+
isContentDotted = offWidth < scrollWidth;
|
|
150
153
|
}
|
|
151
154
|
let originText = element.innerText.replace(/\s/g, '').toLowerCase();
|
|
152
155
|
let tooltipText = title.replace(/\s/g, '').toLowerCase();
|
package/lib/Tab/Tabs.js
CHANGED
|
@@ -252,7 +252,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
252
252
|
key: "getTotalDimension",
|
|
253
253
|
value: function getTotalDimension() {
|
|
254
254
|
var align = this.props.align;
|
|
255
|
-
var totalDimension = (0, _Common.getTotalDimension)(this.tabsEle, align);
|
|
255
|
+
var totalDimension = this.tabsEle && (0, _Common.getTotalDimension)(this.tabsEle, align);
|
|
256
256
|
return totalDimension;
|
|
257
257
|
}
|
|
258
258
|
}, {
|
|
@@ -265,7 +265,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
265
265
|
childType = _this$props4.childType;
|
|
266
266
|
var tabDimensions = {};
|
|
267
267
|
_react["default"].Children.forEach(children, function (child) {
|
|
268
|
-
return /*#__PURE__*/_react["default"].isValidElement(child) && child.type === childType && _this7[child.props.id] && Object.assign(tabDimensions, _defineProperty({}, child.props.id, (0, _Common.getTotalDimension)(_this7[child.props.id], align)));
|
|
268
|
+
return /*#__PURE__*/_react["default"].isValidElement(child) && child.type === childType && _this7[child.props.id] && Object.assign(tabDimensions, _defineProperty({}, child.props.id, _this7[child.props.id] && (0, _Common.getTotalDimension)(_this7[child.props.id], align)));
|
|
269
269
|
});
|
|
270
270
|
return tabDimensions;
|
|
271
271
|
}
|
package/lib/Tooltip/Tooltip.js
CHANGED
|
@@ -11,6 +11,7 @@ var _propTypes = require("./props/propTypes");
|
|
|
11
11
|
var _Config = require("../Provider/Config");
|
|
12
12
|
var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.css"));
|
|
13
13
|
var _ResizeObserver = _interopRequireDefault(require("../Responsive/ResizeObserver"));
|
|
14
|
+
var _selectn = _interopRequireDefault(require("selectn"));
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
17
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -190,7 +191,9 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
190
191
|
// isContentDotted = element.offsetHeight < element.scrollHeight;
|
|
191
192
|
// }
|
|
192
193
|
} else {
|
|
193
|
-
|
|
194
|
+
var offWidth = (0, _selectn["default"])('parentElement.offsetWidth', element) || 0;
|
|
195
|
+
var scrollWidth = (0, _selectn["default"])('parentElement.scrollWidth', element) || 0;
|
|
196
|
+
isContentDotted = offWidth < scrollWidth;
|
|
194
197
|
}
|
|
195
198
|
var originText = element.innerText.replace(/\s/g, '').toLowerCase();
|
|
196
199
|
var tooltipText = title.replace(/\s/g, '').toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-83",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"velocity-react": "1.4.3",
|
|
49
49
|
"react-sortable-hoc": "^0.8.3",
|
|
50
50
|
"@zohodesk/svg": "1.0.0-beta.48",
|
|
51
|
-
"@zohodesk/a11y": "1.3.
|
|
51
|
+
"@zohodesk/a11y": "1.3.4"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"hoist-non-react-statics": "3.0.1",
|