rc-select
Advanced tools
Comparing version 14.0.0-alpha.8 to 14.0.0-alpha.9
@@ -34,2 +34,3 @@ import * as React from 'react'; | ||
prefixCls: string; | ||
omitProps?: string[]; | ||
displayValues: DisplayValueType[]; | ||
@@ -36,0 +37,0 @@ onDisplayValuesChange: (values: DisplayValueType[], info: { |
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var _excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "showArrow", "inputIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]; | ||
var _excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "showArrow", "inputIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]; | ||
import * as React from 'react'; | ||
@@ -14,3 +14,2 @@ import classNames from 'classnames'; | ||
import { useComposeRef } from "rc-util/es/ref"; | ||
import pickAttrs from "rc-util/es/pickAttrs"; | ||
import useMergedState from "rc-util/es/hooks/useMergedState"; | ||
@@ -26,3 +25,3 @@ import useLayoutEffect from "rc-util/es/hooks/useLayoutEffect"; | ||
import { BaseSelectContext } from './hooks/useBaseProps'; | ||
var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'onSelect', 'placeholder', 'autoFocus', 'onInputKeyDown', 'tabIndex']; | ||
var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex']; | ||
export function isMultiple(mode) { | ||
@@ -40,2 +39,3 @@ return mode === 'tags' || mode === 'multiple'; | ||
direction = props.direction, | ||
omitProps = props.omitProps, | ||
displayValues = props.displayValues, | ||
@@ -88,9 +88,10 @@ onDisplayValuesChange = props.onDisplayValuesChange, | ||
var mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox'; | ||
var domProps = pickAttrs(restProps, { | ||
aria: true, | ||
attr: true, | ||
data: true | ||
var domProps = _objectSpread({}, restProps); | ||
DEFAULT_OMIT_PROPS.forEach(function (propName) { | ||
delete domProps[propName]; | ||
}); | ||
DEFAULT_OMIT_PROPS.forEach(function (prop) { | ||
delete domProps[prop]; | ||
omitProps === null || omitProps === void 0 ? void 0 : omitProps.forEach(function (propName) { | ||
delete domProps[propName]; | ||
}); // ============================= Mobile ============================= | ||
@@ -97,0 +98,0 @@ |
@@ -54,2 +54,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import useCache from './hooks/useCache'; | ||
var OMIT_PROPS = ['inputValue']; | ||
@@ -480,3 +481,4 @@ function isRawValue(value) { | ||
prefixCls: prefixCls, | ||
ref: ref // >>> Values | ||
ref: ref, | ||
omitProps: OMIT_PROPS // >>> Values | ||
, | ||
@@ -483,0 +485,0 @@ displayValues: displayValues, |
@@ -34,2 +34,3 @@ import * as React from 'react'; | ||
prefixCls: string; | ||
omitProps?: string[]; | ||
displayValues: DisplayValueType[]; | ||
@@ -36,0 +37,0 @@ onDisplayValuesChange: (values: DisplayValueType[], info: { |
@@ -19,4 +19,2 @@ "use strict"; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
@@ -26,2 +24,4 @@ | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
@@ -39,4 +39,2 @@ | ||
var _pickAttrs = _interopRequireDefault(require("rc-util/lib/pickAttrs")); | ||
var _useMergedState3 = _interopRequireDefault(require("rc-util/lib/hooks/useMergedState")); | ||
@@ -62,4 +60,4 @@ | ||
var _excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "showArrow", "inputIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]; | ||
var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'onSelect', 'placeholder', 'autoFocus', 'onInputKeyDown', 'tabIndex']; | ||
var _excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "showArrow", "inputIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]; | ||
var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex']; | ||
@@ -79,2 +77,3 @@ function isMultiple(mode) { | ||
direction = props.direction, | ||
omitProps = props.omitProps, | ||
displayValues = props.displayValues, | ||
@@ -126,9 +125,8 @@ onDisplayValuesChange = props.onDisplayValuesChange, | ||
var mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox'; | ||
var domProps = (0, _pickAttrs.default)(restProps, { | ||
aria: true, | ||
attr: true, | ||
data: true | ||
var domProps = (0, _objectSpread2.default)({}, restProps); | ||
DEFAULT_OMIT_PROPS.forEach(function (propName) { | ||
delete domProps[propName]; | ||
}); | ||
DEFAULT_OMIT_PROPS.forEach(function (prop) { | ||
delete domProps[prop]; | ||
omitProps === null || omitProps === void 0 ? void 0 : omitProps.forEach(function (propName) { | ||
delete domProps[propName]; | ||
}); // ============================= Mobile ============================= | ||
@@ -135,0 +133,0 @@ |
@@ -86,2 +86,4 @@ "use strict"; | ||
*/ | ||
var OMIT_PROPS = ['inputValue']; | ||
function isRawValue(value) { | ||
@@ -509,3 +511,4 @@ return !value || (0, _typeof2.default)(value) !== 'object'; | ||
prefixCls: prefixCls, | ||
ref: ref // >>> Values | ||
ref: ref, | ||
omitProps: OMIT_PROPS // >>> Values | ||
, | ||
@@ -512,0 +515,0 @@ displayValues: displayValues, |
{ | ||
"name": "rc-select", | ||
"version": "14.0.0-alpha.8", | ||
"version": "14.0.0-alpha.9", | ||
"description": "React Select", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285323
6257