intelicoreact 1.4.46 → 1.4.48

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.
@@ -17,7 +17,7 @@ require("./RangeSlider.scss");
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  let timer;
20
- const DEBOUNCE_TIME = 300;
20
+ const DEBOUNCE_TIME = 800;
21
21
  function debounce(func) {
22
22
  var _this = this;
23
23
  let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEBOUNCE_TIME;
@@ -44,7 +44,7 @@ const TagList = _ref => {
44
44
  const getStaticTagsCount = () => {
45
45
  var _window$getComputedSt;
46
46
  if (typeof shownItemsCount === "number") return shownItemsCount;
47
- const computedWidth = wrapperWidth || parseInt((_window$getComputedSt = window.getComputedStyle(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.width);
47
+ const computedWidth = wrapperWidth || parseInt(wrapperRef !== null && wrapperRef !== void 0 && wrapperRef.current ? (_window$getComputedSt = window.getComputedStyle(wrapperRef.current)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.width : 0);
48
48
  const delta = typeof onEditClick === "function" ? 60 : 32;
49
49
  if (isNaN(computedWidth)) return -1;
50
50
  const result = tagList.map(_ref2 => {
@@ -53,7 +53,7 @@ const TagList = _ref => {
53
53
  } = _ref2;
54
54
  return itemRef;
55
55
  }).reduce((result, itemRef) => {
56
- const itemStyle = window.getComputedStyle(itemRef === null || itemRef === void 0 ? void 0 : itemRef.current);
56
+ const itemStyle = (itemRef === null || itemRef === void 0 ? void 0 : itemRef.current) && window.getComputedStyle(itemRef.current);
57
57
  const itemWidth = [parseInt(itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.width, 10), parseInt(itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginLeft, 10), parseInt(itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.marginRight, 10)].reduce((result, item) => {
58
58
  if (!isNaN(item)) result += item;
59
59
  return result;
@@ -149,7 +149,7 @@ const TagList = _ref => {
149
149
  let computedWidth = wrapperWidth;
150
150
  if (computedWidth === 0) {
151
151
  var _window$getComputedSt2;
152
- computedWidth = parseInt((_window$getComputedSt2 = window.getComputedStyle(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current)) === null || _window$getComputedSt2 === void 0 ? void 0 : _window$getComputedSt2.width);
152
+ computedWidth = parseInt(wrapperRef !== null && wrapperRef !== void 0 && wrapperRef.current ? (_window$getComputedSt2 = window.getComputedStyle(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current)) === null || _window$getComputedSt2 === void 0 ? void 0 : _window$getComputedSt2.width : 0);
153
153
  }
154
154
  if (!isNaN(computedWidth)) {
155
155
  setStaticTagsCount(getStaticTagsCount());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.4.46",
3
+ "version": "1.4.48",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [