1 line
34 KiB
JSON
1 line
34 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"id\", \"prefixCls\", \"fieldNames\", \"defaultValue\", \"value\", \"changeOnSelect\", \"onChange\", \"displayRender\", \"checkable\", \"autoClearSearchValue\", \"searchValue\", \"onSearch\", \"showSearch\", \"expandTrigger\", \"options\", \"dropdownPrefixCls\", \"loadData\", \"popupVisible\", \"open\", \"popupClassName\", \"dropdownClassName\", \"dropdownMenuColumnStyle\", \"dropdownStyle\", \"popupPlacement\", \"placement\", \"onDropdownVisibleChange\", \"onPopupVisibleChange\", \"expandIcon\", \"loadingIcon\", \"children\", \"dropdownMatchSelectWidth\", \"showCheckedStrategy\", \"optionRender\"];\nimport { BaseSelect } from 'rc-select';\nimport useId from \"rc-select/es/hooks/useId\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport * as React from 'react';\nimport CascaderContext from \"./context\";\nimport useDisplayValues from \"./hooks/useDisplayValues\";\nimport useMissingValues from \"./hooks/useMissingValues\";\nimport useOptions from \"./hooks/useOptions\";\nimport useSearchConfig from \"./hooks/useSearchConfig\";\nimport useSearchOptions from \"./hooks/useSearchOptions\";\nimport useSelect from \"./hooks/useSelect\";\nimport useValues from \"./hooks/useValues\";\nimport OptionList from \"./OptionList\";\nimport Panel from \"./Panel\";\nimport { fillFieldNames, SHOW_CHILD, SHOW_PARENT, toPathKeys, toRawValues } from \"./utils/commonUtil\";\nimport { formatStrategyValues, toPathOptions } from \"./utils/treeUtil\";\nimport warningProps, { warningNullOptions } from \"./utils/warningPropsUtil\";\nvar Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-cascader' : _props$prefixCls,\n fieldNames = props.fieldNames,\n defaultValue = props.defaultValue,\n value = props.value,\n changeOnSelect = props.changeOnSelect,\n onChange = props.onChange,\n displayRender = props.displayRender,\n checkable = props.checkable,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n searchValue = props.searchValue,\n onSearch = props.onSearch,\n showSearch = props.showSearch,\n expandTrigger = props.expandTrigger,\n options = props.options,\n dropdownPrefixCls = props.dropdownPrefixCls,\n loadData = props.loadData,\n popupVisible = props.popupVisible,\n open = props.open,\n popupClassName = props.popupClassName,\n dropdownClassName = props.dropdownClassName,\n dropdownMenuColumnStyle = props.dropdownMenuColumnStyle,\n customDropdownStyle = props.dropdownStyle,\n popupPlacement = props.popupPlacement,\n placement = props.placement,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onPopupVisibleChange = props.onPopupVisibleChange,\n _props$expandIcon = props.expandIcon,\n expandIcon = _props$expandIcon === void 0 ? '>' : _props$expandIcon,\n loadingIcon = props.loadingIcon,\n children = props.children,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? false : _props$dropdownMatchS,\n _props$showCheckedStr = props.showCheckedStrategy,\n showCheckedStrategy = _props$showCheckedStr === void 0 ? SHOW_PARENT : _props$showCheckedStr,\n optionRender = props.optionRender,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedId = useId(id);\n var multiple = !!checkable;\n\n // =========================== Values ===========================\n var _useMergedState = useMergedState(defaultValue, {\n value: value,\n postState: toRawValues\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n rawValues = _useMergedState2[0],\n setRawValues = _useMergedState2[1];\n\n // ========================= FieldNames =========================\n var mergedFieldNames = React.useMemo(function () {\n return fillFieldNames(fieldNames);\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [JSON.stringify(fieldNames)]\n /* eslint-enable react-hooks/exhaustive-deps */);\n\n // =========================== Option ===========================\n var _useOptions = useOptions(mergedFieldNames, options),\n _useOptions2 = _slicedToArray(_useOptions, 3),\n mergedOptions = _useOptions2[0],\n getPathKeyEntities = _useOptions2[1],\n getValueByKeyPath = _useOptions2[2];\n\n // =========================== Search ===========================\n var _useMergedState3 = useMergedState('', {\n value: searchValue,\n postState: function postState(search) {\n return search || '';\n }\n }),\n _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n mergedSearchValue = _useMergedState4[0],\n setSearchValue = _useMergedState4[1];\n var onInternalSearch = function onInternalSearch(searchText, info) {\n setSearchValue(searchText);\n if (info.source !== 'blur' && onSearch) {\n onSearch(searchText);\n }\n };\n var _useSearchConfig = useSearchConfig(showSearch),\n _useSearchConfig2 = _slicedToArray(_useSearchConfig, 2),\n mergedShowSearch = _useSearchConfig2[0],\n searchConfig = _useSearchConfig2[1];\n var searchOptions = useSearchOptions(mergedSearchValue, mergedOptions, mergedFieldNames, dropdownPrefixCls || prefixCls, searchConfig, changeOnSelect);\n\n // =========================== Values ===========================\n var getMissingValues = useMissingValues(mergedOptions, mergedFieldNames);\n\n // Fill `rawValues` with checked conduction values\n var _useValues = useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues),\n _useValues2 = _slicedToArray(_useValues, 3),\n checkedValues = _useValues2[0],\n halfCheckedValues = _useValues2[1],\n missingCheckedValues = _useValues2[2];\n var deDuplicatedValues = React.useMemo(function () {\n var checkedKeys = toPathKeys(checkedValues);\n var deduplicateKeys = formatStrategyValues(checkedKeys, getPathKeyEntities, showCheckedStrategy);\n return [].concat(_toConsumableArray(missingCheckedValues), _toConsumableArray(getValueByKeyPath(deduplicateKeys)));\n }, [checkedValues, getPathKeyEntities, getValueByKeyPath, missingCheckedValues, showCheckedStrategy]);\n var displayValues = useDisplayValues(deDuplicatedValues, mergedOptions, mergedFieldNames, multiple, displayRender);\n\n // =========================== Change ===========================\n var triggerChange = useEvent(function (nextValues) {\n setRawValues(nextValues);\n\n // Save perf if no need trigger event\n if (onChange) {\n var nextRawValues = toRawValues(nextValues);\n var valueOptions = nextRawValues.map(function (valueCells) {\n return toPathOptions(valueCells, mergedOptions, mergedFieldNames).map(function (valueOpt) {\n return valueOpt.option;\n });\n });\n var triggerValues = multiple ? nextRawValues : nextRawValues[0];\n var triggerOptions = multiple ? valueOptions : valueOptions[0];\n onChange(triggerValues, triggerOptions);\n }\n });\n\n // =========================== Select ===========================\n var handleSelection = useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy);\n var onInternalSelect = useEvent(function (valuePath) {\n if (!multiple || autoClearSearchValue) {\n setSearchValue('');\n }\n handleSelection(valuePath);\n });\n\n // Display Value change logic\n var onDisplayValuesChange = function onDisplayValuesChange(_, info) {\n if (info.type === 'clear') {\n triggerChange([]);\n return;\n }\n\n // Cascader do not support `add` type. Only support `remove`\n var _ref = info.values[0],\n valueCells = _ref.valueCells;\n onInternalSelect(valueCells);\n };\n\n // ============================ Open ============================\n var mergedOpen = open !== undefined ? open : popupVisible;\n var mergedDropdownClassName = dropdownClassName || popupClassName;\n var mergedPlacement = placement || popupPlacement;\n var onInternalDropdownVisibleChange = function onInternalDropdownVisibleChange(nextVisible) {\n onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(nextVisible);\n onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextVisible);\n };\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n warningNullOptions(mergedOptions, mergedFieldNames);\n }\n\n // ========================== Context ===========================\n var cascaderContext = React.useMemo(function () {\n return {\n options: mergedOptions,\n fieldNames: mergedFieldNames,\n values: checkedValues,\n halfValues: halfCheckedValues,\n changeOnSelect: changeOnSelect,\n onSelect: onInternalSelect,\n checkable: checkable,\n searchOptions: searchOptions,\n dropdownPrefixCls: dropdownPrefixCls,\n loadData: loadData,\n expandTrigger: expandTrigger,\n expandIcon: expandIcon,\n loadingIcon: loadingIcon,\n dropdownMenuColumnStyle: dropdownMenuColumnStyle,\n optionRender: optionRender\n };\n }, [mergedOptions, mergedFieldNames, checkedValues, halfCheckedValues, changeOnSelect, onInternalSelect, checkable, searchOptions, dropdownPrefixCls, loadData, expandTrigger, expandIcon, loadingIcon, dropdownMenuColumnStyle, optionRender]);\n\n // ==============================================================\n // == Render ==\n // ==============================================================\n var emptyOptions = !(mergedSearchValue ? searchOptions : mergedOptions).length;\n var dropdownStyle =\n // Search to match width\n mergedSearchValue && searchConfig.matchInputWidth ||\n // Empty keep the width\n emptyOptions ? {} : {\n minWidth: 'auto'\n };\n return /*#__PURE__*/React.createElement(CascaderContext.Provider, {\n value: cascaderContext\n }, /*#__PURE__*/React.createElement(BaseSelect, _extends({}, restProps, {\n // MISC\n ref: ref,\n id: mergedId,\n prefixCls: prefixCls,\n autoClearSearchValue: autoClearSearchValue,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownStyle: _objectSpread(_objectSpread({}, dropdownStyle), customDropdownStyle)\n // Value\n ,\n\n displayValues: displayValues,\n onDisplayValuesChange: onDisplayValuesChange,\n mode: multiple ? 'multiple' : undefined\n // Search\n ,\n\n searchValue: mergedSearchValue,\n onSearch: onInternalSearch,\n showSearch: mergedShowSearch\n // Options\n ,\n\n OptionList: OptionList,\n emptyOptions: emptyOptions\n // Open\n ,\n\n open: mergedOpen,\n dropdownClassName: mergedDropdownClassName,\n placement: mergedPlacement,\n onDropdownVisibleChange: onInternalDropdownVisibleChange\n // Children\n ,\n\n getRawInputElement: function getRawInputElement() {\n return children;\n }\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Cascader.displayName = 'Cascader';\n}\nCascader.SHOW_PARENT = SHOW_PARENT;\nCascader.SHOW_CHILD = SHOW_CHILD;\nCascader.Panel = Panel;\nexport default Cascader;","map":{"version":3,"names":["_extends","_objectSpread","_toConsumableArray","_slicedToArray","_objectWithoutProperties","_excluded","BaseSelect","useId","useEvent","useMergedState","React","CascaderContext","useDisplayValues","useMissingValues","useOptions","useSearchConfig","useSearchOptions","useSelect","useValues","OptionList","Panel","fillFieldNames","SHOW_CHILD","SHOW_PARENT","toPathKeys","toRawValues","formatStrategyValues","toPathOptions","warningProps","warningNullOptions","Cascader","forwardRef","props","ref","id","_props$prefixCls","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","_props$autoClearSearc","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","customDropdownStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","_props$expandIcon","expandIcon","loadingIcon","children","_props$dropdownMatchS","dropdownMatchSelectWidth","_props$showCheckedStr","showCheckedStrategy","optionRender","restProps","mergedId","multiple","_useMergedState","postState","_useMergedState2","rawValues","setRawValues","mergedFieldNames","useMemo","JSON","stringify","_useOptions","_useOptions2","mergedOptions","getPathKeyEntities","getValueByKeyPath","_useMergedState3","search","_useMergedState4","mergedSearchValue","setSearchValue","onInternalSearch","searchText","info","source","_useSearchConfig","_useSearchConfig2","mergedShowSearch","searchConfig","searchOptions","getMissingValues","_useValues","_useValues2","checkedValues","halfCheckedValues","missingCheckedValues","deDuplicatedValues","checkedKeys","deduplicateKeys","concat","displayValues","triggerChange","nextValues","nextRawValues","valueOptions","map","valueCells","valueOpt","option","triggerValues","triggerOptions","handleSelection","onInternalSelect","valuePath","onDisplayValuesChange","_","type","_ref","values","mergedOpen","undefined","mergedDropdownClassName","mergedPlacement","onInternalDropdownVisibleChange","nextVisible","process","env","NODE_ENV","cascaderContext","halfValues","onSelect","emptyOptions","length","matchInputWidth","minWidth","createElement","Provider","mode","getRawInputElement","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-cascader/es/Cascader.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"id\", \"prefixCls\", \"fieldNames\", \"defaultValue\", \"value\", \"changeOnSelect\", \"onChange\", \"displayRender\", \"checkable\", \"autoClearSearchValue\", \"searchValue\", \"onSearch\", \"showSearch\", \"expandTrigger\", \"options\", \"dropdownPrefixCls\", \"loadData\", \"popupVisible\", \"open\", \"popupClassName\", \"dropdownClassName\", \"dropdownMenuColumnStyle\", \"dropdownStyle\", \"popupPlacement\", \"placement\", \"onDropdownVisibleChange\", \"onPopupVisibleChange\", \"expandIcon\", \"loadingIcon\", \"children\", \"dropdownMatchSelectWidth\", \"showCheckedStrategy\", \"optionRender\"];\nimport { BaseSelect } from 'rc-select';\nimport useId from \"rc-select/es/hooks/useId\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport * as React from 'react';\nimport CascaderContext from \"./context\";\nimport useDisplayValues from \"./hooks/useDisplayValues\";\nimport useMissingValues from \"./hooks/useMissingValues\";\nimport useOptions from \"./hooks/useOptions\";\nimport useSearchConfig from \"./hooks/useSearchConfig\";\nimport useSearchOptions from \"./hooks/useSearchOptions\";\nimport useSelect from \"./hooks/useSelect\";\nimport useValues from \"./hooks/useValues\";\nimport OptionList from \"./OptionList\";\nimport Panel from \"./Panel\";\nimport { fillFieldNames, SHOW_CHILD, SHOW_PARENT, toPathKeys, toRawValues } from \"./utils/commonUtil\";\nimport { formatStrategyValues, toPathOptions } from \"./utils/treeUtil\";\nimport warningProps, { warningNullOptions } from \"./utils/warningPropsUtil\";\nvar Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-cascader' : _props$prefixCls,\n fieldNames = props.fieldNames,\n defaultValue = props.defaultValue,\n value = props.value,\n changeOnSelect = props.changeOnSelect,\n onChange = props.onChange,\n displayRender = props.displayRender,\n checkable = props.checkable,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n searchValue = props.searchValue,\n onSearch = props.onSearch,\n showSearch = props.showSearch,\n expandTrigger = props.expandTrigger,\n options = props.options,\n dropdownPrefixCls = props.dropdownPrefixCls,\n loadData = props.loadData,\n popupVisible = props.popupVisible,\n open = props.open,\n popupClassName = props.popupClassName,\n dropdownClassName = props.dropdownClassName,\n dropdownMenuColumnStyle = props.dropdownMenuColumnStyle,\n customDropdownStyle = props.dropdownStyle,\n popupPlacement = props.popupPlacement,\n placement = props.placement,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onPopupVisibleChange = props.onPopupVisibleChange,\n _props$expandIcon = props.expandIcon,\n expandIcon = _props$expandIcon === void 0 ? '>' : _props$expandIcon,\n loadingIcon = props.loadingIcon,\n children = props.children,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? false : _props$dropdownMatchS,\n _props$showCheckedStr = props.showCheckedStrategy,\n showCheckedStrategy = _props$showCheckedStr === void 0 ? SHOW_PARENT : _props$showCheckedStr,\n optionRender = props.optionRender,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedId = useId(id);\n var multiple = !!checkable;\n\n // =========================== Values ===========================\n var _useMergedState = useMergedState(defaultValue, {\n value: value,\n postState: toRawValues\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n rawValues = _useMergedState2[0],\n setRawValues = _useMergedState2[1];\n\n // ========================= FieldNames =========================\n var mergedFieldNames = React.useMemo(function () {\n return fillFieldNames(fieldNames);\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [JSON.stringify(fieldNames)]\n /* eslint-enable react-hooks/exhaustive-deps */);\n\n // =========================== Option ===========================\n var _useOptions = useOptions(mergedFieldNames, options),\n _useOptions2 = _slicedToArray(_useOptions, 3),\n mergedOptions = _useOptions2[0],\n getPathKeyEntities = _useOptions2[1],\n getValueByKeyPath = _useOptions2[2];\n\n // =========================== Search ===========================\n var _useMergedState3 = useMergedState('', {\n value: searchValue,\n postState: function postState(search) {\n return search || '';\n }\n }),\n _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n mergedSearchValue = _useMergedState4[0],\n setSearchValue = _useMergedState4[1];\n var onInternalSearch = function onInternalSearch(searchText, info) {\n setSearchValue(searchText);\n if (info.source !== 'blur' && onSearch) {\n onSearch(searchText);\n }\n };\n var _useSearchConfig = useSearchConfig(showSearch),\n _useSearchConfig2 = _slicedToArray(_useSearchConfig, 2),\n mergedShowSearch = _useSearchConfig2[0],\n searchConfig = _useSearchConfig2[1];\n var searchOptions = useSearchOptions(mergedSearchValue, mergedOptions, mergedFieldNames, dropdownPrefixCls || prefixCls, searchConfig, changeOnSelect);\n\n // =========================== Values ===========================\n var getMissingValues = useMissingValues(mergedOptions, mergedFieldNames);\n\n // Fill `rawValues` with checked conduction values\n var _useValues = useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues),\n _useValues2 = _slicedToArray(_useValues, 3),\n checkedValues = _useValues2[0],\n halfCheckedValues = _useValues2[1],\n missingCheckedValues = _useValues2[2];\n var deDuplicatedValues = React.useMemo(function () {\n var checkedKeys = toPathKeys(checkedValues);\n var deduplicateKeys = formatStrategyValues(checkedKeys, getPathKeyEntities, showCheckedStrategy);\n return [].concat(_toConsumableArray(missingCheckedValues), _toConsumableArray(getValueByKeyPath(deduplicateKeys)));\n }, [checkedValues, getPathKeyEntities, getValueByKeyPath, missingCheckedValues, showCheckedStrategy]);\n var displayValues = useDisplayValues(deDuplicatedValues, mergedOptions, mergedFieldNames, multiple, displayRender);\n\n // =========================== Change ===========================\n var triggerChange = useEvent(function (nextValues) {\n setRawValues(nextValues);\n\n // Save perf if no need trigger event\n if (onChange) {\n var nextRawValues = toRawValues(nextValues);\n var valueOptions = nextRawValues.map(function (valueCells) {\n return toPathOptions(valueCells, mergedOptions, mergedFieldNames).map(function (valueOpt) {\n return valueOpt.option;\n });\n });\n var triggerValues = multiple ? nextRawValues : nextRawValues[0];\n var triggerOptions = multiple ? valueOptions : valueOptions[0];\n onChange(triggerValues, triggerOptions);\n }\n });\n\n // =========================== Select ===========================\n var handleSelection = useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy);\n var onInternalSelect = useEvent(function (valuePath) {\n if (!multiple || autoClearSearchValue) {\n setSearchValue('');\n }\n handleSelection(valuePath);\n });\n\n // Display Value change logic\n var onDisplayValuesChange = function onDisplayValuesChange(_, info) {\n if (info.type === 'clear') {\n triggerChange([]);\n return;\n }\n\n // Cascader do not support `add` type. Only support `remove`\n var _ref = info.values[0],\n valueCells = _ref.valueCells;\n onInternalSelect(valueCells);\n };\n\n // ============================ Open ============================\n var mergedOpen = open !== undefined ? open : popupVisible;\n var mergedDropdownClassName = dropdownClassName || popupClassName;\n var mergedPlacement = placement || popupPlacement;\n var onInternalDropdownVisibleChange = function onInternalDropdownVisibleChange(nextVisible) {\n onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(nextVisible);\n onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextVisible);\n };\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n warningNullOptions(mergedOptions, mergedFieldNames);\n }\n\n // ========================== Context ===========================\n var cascaderContext = React.useMemo(function () {\n return {\n options: mergedOptions,\n fieldNames: mergedFieldNames,\n values: checkedValues,\n halfValues: halfCheckedValues,\n changeOnSelect: changeOnSelect,\n onSelect: onInternalSelect,\n checkable: checkable,\n searchOptions: searchOptions,\n dropdownPrefixCls: dropdownPrefixCls,\n loadData: loadData,\n expandTrigger: expandTrigger,\n expandIcon: expandIcon,\n loadingIcon: loadingIcon,\n dropdownMenuColumnStyle: dropdownMenuColumnStyle,\n optionRender: optionRender\n };\n }, [mergedOptions, mergedFieldNames, checkedValues, halfCheckedValues, changeOnSelect, onInternalSelect, checkable, searchOptions, dropdownPrefixCls, loadData, expandTrigger, expandIcon, loadingIcon, dropdownMenuColumnStyle, optionRender]);\n\n // ==============================================================\n // == Render ==\n // ==============================================================\n var emptyOptions = !(mergedSearchValue ? searchOptions : mergedOptions).length;\n var dropdownStyle =\n // Search to match width\n mergedSearchValue && searchConfig.matchInputWidth ||\n // Empty keep the width\n emptyOptions ? {} : {\n minWidth: 'auto'\n };\n return /*#__PURE__*/React.createElement(CascaderContext.Provider, {\n value: cascaderContext\n }, /*#__PURE__*/React.createElement(BaseSelect, _extends({}, restProps, {\n // MISC\n ref: ref,\n id: mergedId,\n prefixCls: prefixCls,\n autoClearSearchValue: autoClearSearchValue,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownStyle: _objectSpread(_objectSpread({}, dropdownStyle), customDropdownStyle)\n // Value\n ,\n displayValues: displayValues,\n onDisplayValuesChange: onDisplayValuesChange,\n mode: multiple ? 'multiple' : undefined\n // Search\n ,\n searchValue: mergedSearchValue,\n onSearch: onInternalSearch,\n showSearch: mergedShowSearch\n // Options\n ,\n OptionList: OptionList,\n emptyOptions: emptyOptions\n // Open\n ,\n open: mergedOpen,\n dropdownClassName: mergedDropdownClassName,\n placement: mergedPlacement,\n onDropdownVisibleChange: onInternalDropdownVisibleChange\n // Children\n ,\n getRawInputElement: function getRawInputElement() {\n return children;\n }\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Cascader.displayName = 'Cascader';\n}\nCascader.SHOW_PARENT = SHOW_PARENT;\nCascader.SHOW_CHILD = SHOW_CHILD;\nCascader.Pan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