@luminati-io/uikit 3.0.23 → 3.0.24
Sign up to get free protection for your applications and to get access to all the features.
@@ -24438,7 +24438,7 @@ var buildComponents = function buildComponents(props) {
|
|
24438
24438
|
formatOptionLabel: props.formatOptionLabel
|
24439
24439
|
});
|
24440
24440
|
}
|
24441
|
-
if (props.autosize === false) components.ValueContainer = _value_container__WEBPACK_IMPORTED_MODULE_5__.ValueContainer;
|
24441
|
+
if (props.autosize === false && props.multiselect) components.ValueContainer = _value_container__WEBPACK_IMPORTED_MODULE_5__.ValueContainer;
|
24442
24442
|
return components;
|
24443
24443
|
};
|
24444
24444
|
|
@@ -25158,10 +25158,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
25158
25158
|
/*jslint react:true*/
|
25159
25159
|
var _excluded = ["children", "getValue"];
|
25160
25160
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
25161
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
25162
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
25163
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
25164
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
25165
25161
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
25166
25162
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
25167
25163
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -25184,7 +25180,7 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25184
25180
|
var optsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
25185
25181
|
var moreOptRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
25186
25182
|
var opts = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
25187
|
-
return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);
|
25183
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(isValueChild);
|
25188
25184
|
}, [length]);
|
25189
25185
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(opts),
|
25190
25186
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -25208,16 +25204,14 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25208
25204
|
}, 0);
|
25209
25205
|
var moreOptWidth = ((_moreOptRef$current = moreOptRef.current) === null || _moreOptRef$current === void 0 ? void 0 : _moreOptRef$current.offsetWidth) || 0 + _constants__WEBPACK_IMPORTED_MODULE_3__.offset * 2;
|
25210
25206
|
if (inputWidth - moreOptWidth < inputChildrenWidth) {
|
25211
|
-
var _tempOpts;
|
25212
25207
|
var stopWidth = 0;
|
25213
25208
|
inputElements.forEach(function (tag, index) {
|
25214
25209
|
stopWidth += tag.offsetWidth + _constants__WEBPACK_IMPORTED_MODULE_3__.offset * 2;
|
25215
25210
|
if (inputWidth - moreOptWidth >= stopWidth) tempOpts.push(opts[index]);
|
25216
25211
|
});
|
25217
|
-
(_tempOpts = tempOpts).push.apply(_tempOpts, _toConsumableArray(opts.slice(length)));
|
25218
25212
|
} else tempOpts = opts;
|
25219
25213
|
return tempOpts;
|
25220
|
-
}, [optsRef, opts]);
|
25214
|
+
}, [optsRef, opts, length]);
|
25221
25215
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(function () {
|
25222
25216
|
if (recalculationRender && optsRef.current) {
|
25223
25217
|
var visible = calculateVisibleTags();
|
@@ -25235,7 +25229,11 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25235
25229
|
setRecalculationRender(true);
|
25236
25230
|
}, [opts]);
|
25237
25231
|
(0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useResize)(handleResize);
|
25238
|
-
|
25232
|
+
|
25233
|
+
// Keep standard placeholder and input from react-select
|
25234
|
+
var childsToRender = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(function (child) {
|
25235
|
+
return !isValueChild(child);
|
25236
|
+
});
|
25239
25237
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(OptsWrapper, {
|
25240
25238
|
ref: optsRef
|
25241
25239
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_5__.c.ValueContainer, rest, visibleOpts, (recalculationRender || hiddenCount > 0) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MoreOpt, {
|
@@ -25243,7 +25241,7 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25243
25241
|
ref: moreOptRef,
|
25244
25242
|
inputProps: props,
|
25245
25243
|
count: hiddenCount
|
25246
|
-
})));
|
25244
|
+
}), childsToRender));
|
25247
25245
|
};
|
25248
25246
|
var ValueContainer = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(ValueContainerComponent);
|
25249
25247
|
var MoreOpt = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
@@ -25271,6 +25269,10 @@ var Generic = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withC
|
|
25271
25269
|
})(["", ""], function (prop) {
|
25272
25270
|
return prop.$css;
|
25273
25271
|
});
|
25272
|
+
var isValueChild = function isValueChild(child) {
|
25273
|
+
var _child$type;
|
25274
|
+
return ['MultiValue', 'SingleValue'].includes((child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) || '');
|
25275
|
+
};
|
25274
25276
|
|
25275
25277
|
/***/ }),
|
25276
25278
|
|