PromoCursed/node_modules/.cache/babel-loader/703ee2da08fe71cd1ba0f3e157737f96276e3acaa0390a635fb9cef7ce610d15.json

1 line
64 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar _excluded = [\"id\", \"mode\", \"prefixCls\", \"backfill\", \"fieldNames\", \"inputValue\", \"searchValue\", \"onSearch\", \"autoClearSearchValue\", \"onSelect\", \"onDeselect\", \"dropdownMatchSelectWidth\", \"filterOption\", \"filterSort\", \"optionFilterProp\", \"optionLabelProp\", \"options\", \"optionRender\", \"children\", \"defaultActiveFirstOption\", \"menuItemSelectedIcon\", \"virtual\", \"direction\", \"listHeight\", \"listItemHeight\", \"labelRender\", \"value\", \"defaultValue\", \"labelInValue\", \"onChange\", \"maxCount\"];\n/**\n * To match accessibility requirement, we always provide an input in the component.\n * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.\n * For focused select, we set `aria-live=\"polite\"` to update the accessibility content.\n *\n * ref:\n * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions\n *\n * New api:\n * - listHeight\n * - listItemHeight\n * - component\n *\n * Remove deprecated api:\n * - multiple\n * - tags\n * - combobox\n * - firstActiveValue\n * - dropdownMenuStyle\n * - openClassName (Not list in api)\n *\n * Update:\n * - `backfill` only support `combobox` mode\n * - `combobox` mode not support `labelInValue` since it's meaningless\n * - `getInputElement` only support `combobox` mode\n * - `onChange` return OptionData instead of ReactNode\n * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode\n * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option\n * - `combobox` mode not support `optionLabelProp`\n */\n\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport BaseSelect, { isMultiple } from \"./BaseSelect\";\nimport OptGroup from \"./OptGroup\";\nimport Option from \"./Option\";\nimport OptionList from \"./OptionList\";\nimport SelectContext from \"./SelectContext\";\nimport useCache from \"./hooks/useCache\";\nimport useFilterOptions from \"./hooks/useFilterOptions\";\nimport useId from \"./hooks/useId\";\nimport useOptions from \"./hooks/useOptions\";\nimport useRefFunc from \"./hooks/useRefFunc\";\nimport { hasValue, isComboNoValue, toArray } from \"./utils/commonUtil\";\nimport { fillFieldNames, flattenOptions, injectPropsWithOption } from \"./utils/valueUtil\";\nimport warningProps, { warningNullOptions } from \"./utils/warningPropsUtil\";\nvar OMIT_DOM_PROPS = ['inputValue'];\nfunction isRawValue(value) {\n return !value || _typeof(value) !== 'object';\n}\nvar Select = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n mode = props.mode,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,\n backfill = props.backfill,\n fieldNames = props.fieldNames,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n onSearch = props.onSearch,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,\n filterOption = props.filterOption,\n filterSort = props.filterSort,\n optionFilterProp = props.optionFilterProp,\n optionLabelProp = props.op