intelicoreact 1.0.6 → 1.0.8

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.
@@ -21,7 +21,7 @@ var CheckboxInput = function CheckboxInput(_ref) {
21
21
  var _cn2;
22
22
 
23
23
  var label = _ref.label,
24
- key = _ref.key,
24
+ fieldKey = _ref.fieldKey,
25
25
  id = _ref.id,
26
26
  value = _ref.value,
27
27
  _onChange = _ref.onChange,
@@ -31,7 +31,7 @@ var CheckboxInput = function CheckboxInput(_ref) {
31
31
  _ref$testId = _ref.testId,
32
32
  testId = _ref$testId === void 0 ? '' : _ref$testId;
33
33
  return /*#__PURE__*/_react.default.createElement("label", {
34
- "data-testid": "checkbox--label--".concat(testId || id || key),
34
+ "data-testid": "checkbox--label--".concat(testId || id || fieldKey || ''),
35
35
  className: (0, _classnames.default)('checkbox-input', className, (0, _defineProperty2.default)({}, "checkbox-input_disabled", disabled)),
36
36
  htmlFor: id
37
37
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -49,7 +49,7 @@ var CheckboxInput = function CheckboxInput(_ref) {
49
49
  ref: function ref(elem) {
50
50
  if (elem) elem.indeterminate = isStark;
51
51
  },
52
- "data-testid": "checkbox--input--".concat(testId || key)
52
+ "data-testid": "checkbox--input--".concat(testId || id || fieldKey || '')
53
53
  })), /*#__PURE__*/_react.default.createElement("span", {
54
54
  className: "checkbox-input__mark"
55
55
  })), label && /*#__PURE__*/_react.default.createElement("div", {
@@ -200,7 +200,7 @@ var Dropdown = function Dropdown(_ref) {
200
200
  var depend = getDepends(modalBtnTrigger);
201
201
 
202
202
  var getMarkupForElement = function getMarkupForElement(item, index, optTestId) {
203
- var _item$label2, _item$label2$toLowerC, _item$label2$toLowerC2, _item$label2$toLowerC3, _searchValue$toLowerC, _item$value, _item$value$toString, _item$value2, _item$value2$toString;
203
+ var _item$label2, _item$label2$toLowerC, _item$label2$toLowerC2, _item$label2$toLowerC3, _searchValue$toLowerC, _item$value, _item$value$toString, _item$value2, _item$value2$toString, _cn;
204
204
 
205
205
  return item !== null && item !== void 0 && (_item$label2 = item.label) !== null && _item$label2 !== void 0 && (_item$label2$toLowerC = _item$label2.toLowerCase) !== null && _item$label2$toLowerC !== void 0 && (_item$label2$toLowerC2 = _item$label2$toLowerC.call(_item$label2)) !== null && _item$label2$toLowerC2 !== void 0 && (_item$label2$toLowerC3 = _item$label2$toLowerC2.includes) !== null && _item$label2$toLowerC3 !== void 0 && _item$label2$toLowerC3.call(_item$label2$toLowerC2, (searchValue === null || searchValue === void 0 ? void 0 : (_searchValue$toLowerC = searchValue.toLowerCase) === null || _searchValue$toLowerC === void 0 ? void 0 : _searchValue$toLowerC.call(searchValue)) || '') ? /*#__PURE__*/_react.default.createElement("button", {
206
206
  "data-testid": "dropdown--button--key-".concat(optTestId || (item === null || item === void 0 ? void 0 : (_item$value = item.value) === null || _item$value === void 0 ? void 0 : (_item$value$toString = _item$value.toString()) === null || _item$value$toString === void 0 ? void 0 : _item$value$toString.replace(/\s/, '-')) || (item === null || item === void 0 ? void 0 : item.key) || 'item', "--option"),
@@ -208,11 +208,11 @@ var Dropdown = function Dropdown(_ref) {
208
208
  onClick: function onClick() {
209
209
  return depend.onChange(item);
210
210
  },
211
- className: (0, _classnames.default)("".concat(RC, "__list-item"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-item_active"), item.value === value), (0, _defineProperty2.default)({}, "".concat(RC, "__list-item_disabled"), item.disabled))
211
+ className: (0, _classnames.default)("".concat(RC, "__list-item"), (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_active"), item.value === value), (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_disabled"), item.disabled), _cn), item.className)
212
212
  }, /*#__PURE__*/_react.default.createElement("span", {
213
213
  className: (0, _classnames.default)("".concat(RC, "__active-icon"), (0, _defineProperty2.default)({}, "".concat(RC, "__active-icon_active"), item.value === value))
214
214
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
215
- className: item.className || '',
215
+ className: item.labelClassName || '',
216
216
  dangerouslySetInnerHTML: {
217
217
  __html: hightlightedText(item.label, item.postfix)
218
218
  }
@@ -224,7 +224,7 @@ var Dropdown = function Dropdown(_ref) {
224
224
 
225
225
  return ((_filteredOption$items = filteredOption.items) === null || _filteredOption$items === void 0 ? void 0 : _filteredOption$items.length) > 0 ? /*#__PURE__*/_react.default.createElement("div", {
226
226
  key: (_filteredOption$label = filteredOption.label) === null || _filteredOption$label === void 0 ? void 0 : (_filteredOption$label2 = _filteredOption$label.toString()) === null || _filteredOption$label2 === void 0 ? void 0 : _filteredOption$label2.replace(/ /g, '_').concat(Date.now()),
227
- className: "".concat(RC, "-group")
227
+ className: (0, _classnames.default)("".concat(RC, "-group"), filteredOption.className)
228
228
  }, /*#__PURE__*/_react.default.createElement("div", {
229
229
  className: "".concat(RC, "-group__name")
230
230
  }, filteredOption.label), filteredOption.items.map(function (el, index) {
@@ -323,7 +323,7 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
323
323
  if (uniProps.onFocus) uniProps.onFocus.apply(uniProps, arguments);
324
324
  }
325
325
  }));
326
- }, [formatedValue]);
326
+ }, [formatedValue, type]);
327
327
  return /*#__PURE__*/_react.default.createElement("div", {
328
328
  className: (0, _classnames.default)("input__wrap", (0, _defineProperty2.default)({}, "input__wrap_focus", isFocused), (0, _defineProperty2.default)({}, "input__wrap_error", error || isToHighlightError), (0, _defineProperty2.default)({}, "input__wrap_disabled", disabled)),
329
329
  onMouseEnter: function onMouseEnter() {
@@ -38,7 +38,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
38
38
  var RC = 'user-contacts';
39
39
 
40
40
  var UserContacts = function UserContacts(props) {
41
- var _otherContacts$map, _mainRef$current, _otherContacts$map2;
41
+ var _otherContacts$map, _otherContacts$map2;
42
42
 
43
43
  var _ref = props || {},
44
44
  className = _ref.className,
@@ -169,7 +169,7 @@ var UserContacts = function UserContacts(props) {
169
169
  return function () {
170
170
  return setIconMode(false);
171
171
  };
172
- }, [email, phone, JSON.stringify(mainContactsStructure), +maxWidth, mainRef === null || mainRef === void 0 ? void 0 : (_mainRef$current = mainRef.current) === null || _mainRef$current === void 0 ? void 0 : _mainRef$current.clientWidth]);
172
+ }, [email, phone, JSON.stringify(mainContactsStructure), +maxWidth]);
173
173
  return /*#__PURE__*/_react.default.createElement("div", {
174
174
  ref: mainRef,
175
175
  className: (0, _classnames.default)('j4', RC, className)
@@ -75,9 +75,9 @@ var DefaultPhoneIcon = function DefaultPhoneIcon() {
75
75
  }), /*#__PURE__*/_react.default.createElement("path", {
76
76
  d: "M8 12H8.0075",
77
77
  stroke: "black",
78
- 'stroke-width': '1.07',
79
- 'stroke-linecap': 'round',
80
- 'stroke-linejoin': 'round'
78
+ width: "1.07",
79
+ linecap: "round",
80
+ linejoin: "round"
81
81
  })), /*#__PURE__*/_react.default.createElement("g", {
82
82
  mask: "url(#mask0_18590_7803)"
83
83
  }, /*#__PURE__*/_react.default.createElement("rect", {
@@ -160,7 +160,7 @@ var TagList = function TagList(_ref) {
160
160
 
161
161
  (0, _react.useLayoutEffect)(function () {
162
162
  if (withToggle) {
163
- if (!isTagsRefSet()) {
163
+ if (!isTagsRefSet() && lastCheckTime === -1) {
164
164
  setLastCheckTime(Date.now());
165
165
  return;
166
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [