intelicoreact 0.2.96 → 0.2.99
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.
|
@@ -180,10 +180,10 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
180
180
|
var depend = getDepends(modalBtnTrigger);
|
|
181
181
|
|
|
182
182
|
var getMarkupForElement = function getMarkupForElement(item, index, optTestId) {
|
|
183
|
-
var _item$label2, _item$label2$toLowerC, _item$label2$toLowerC2, _item$label2$toLowerC3, _searchValue$toLowerC;
|
|
183
|
+
var _item$label2, _item$label2$toLowerC, _item$label2$toLowerC2, _item$label2$toLowerC3, _searchValue$toLowerC, _item$value, _item$value$toString;
|
|
184
184
|
|
|
185
185
|
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", {
|
|
186
|
-
"data-testid": "dropdown--button--key-".concat(optTestId || (item === null || item === void 0 ? void 0 : item.value.replace(/\s/, '-')) || (item === null || item === void 0 ? void 0 : item.key) || 'item', "--option"),
|
|
186
|
+
"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"),
|
|
187
187
|
key: item.value,
|
|
188
188
|
onClick: function onClick() {
|
|
189
189
|
return depend.onChange(item);
|
|
@@ -88,18 +88,18 @@ var RangeInputs = function RangeInputs(_ref) {
|
|
|
88
88
|
var rangeValidation = function rangeValidation(e, key) {
|
|
89
89
|
var oppositeKey = key === 'from' ? 'to' : 'from';
|
|
90
90
|
|
|
91
|
-
if (!(valueObj !== null && valueObj !== void 0 && valueObj.from) && !(valueObj !== null && valueObj !== void 0 && valueObj.to)) {
|
|
91
|
+
if (!(valueObj !== null && valueObj !== void 0 && valueObj.from) && !(valueObj !== null && valueObj !== void 0 && valueObj.to) && typeof (valueObj === null || valueObj === void 0 ? void 0 : valueObj.from) !== 'string' && typeof (valueObj === null || valueObj === void 0 ? void 0 : valueObj.to) !== 'string') {
|
|
92
92
|
setError({
|
|
93
93
|
from: '',
|
|
94
94
|
to: ''
|
|
95
95
|
});
|
|
96
96
|
setInnerError === null || setInnerError === void 0 ? void 0 : setInnerError('');
|
|
97
97
|
return e;
|
|
98
|
-
} else if (!valueObj[oppositeKey]) {
|
|
98
|
+
} else if (!valueObj[oppositeKey] && typeof valueObj[oppositeKey] !== 'string') {
|
|
99
99
|
var mustToFocus = key === 'from' ? inputToRef.current : inputFromRef.current;
|
|
100
100
|
mustToFocus.focus();
|
|
101
101
|
} else if (!isValidRange(valueObj === null || valueObj === void 0 ? void 0 : valueObj.from, valueObj === null || valueObj === void 0 ? void 0 : valueObj.to)) {
|
|
102
|
-
if (!(valueObj !== null && valueObj !== void 0 && valueObj.from)) setError(_objectSpread(_objectSpread({}, error), {}, {
|
|
102
|
+
if (!(valueObj !== null && valueObj !== void 0 && valueObj.from) && typeof (valueObj === null || valueObj === void 0 ? void 0 : valueObj.from) !== 'string') setError(_objectSpread(_objectSpread({}, error), {}, {
|
|
103
103
|
from: 'Invalid range'
|
|
104
104
|
}));else setError(_objectSpread(_objectSpread({}, error), {}, {
|
|
105
105
|
to: 'Invalid range'
|