846cc3c8c61269d173ac9478457fda99.json
71 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nimport * as React from 'react';\nimport RcCascader from 'rc-cascader';\nimport arrayTreeFilter from 'array-tree-filter';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';\nimport DownOutlined from '@ant-design/icons/DownOutlined';\nimport RightOutlined from '@ant-design/icons/RightOutlined';\nimport RedoOutlined from '@ant-design/icons/RedoOutlined';\nimport LeftOutlined from '@ant-design/icons/LeftOutlined';\nimport Input from '../input';\nimport { ConfigConsumer } from '../config-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport devWarning from '../_util/devWarning';\nimport SizeContext from '../config-provider/SizeContext';\nimport { replaceElement } from '../_util/reactNode'; // We limit the filtered item count by default\n\nvar defaultLimit = 50; // keep value when filtering\n\nvar keepFilteredValueField = '__KEEP_FILTERED_OPTION_VALUE';\n\nfunction highlightKeyword(str, keyword, prefixCls) {\n return str.split(keyword).map(function (node, index) {\n return index === 0 ? node : [/*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-menu-item-keyword\"),\n key: \"seperator\"\n }, keyword), node];\n });\n}\n\nfunction defaultFilterOption(inputValue, path, names) {\n return path.some(function (option) {\n return option[names.label].indexOf(inputValue) > -1;\n });\n}\n\nfunction defaultRenderFilteredOption(inputValue, path, prefixCls, names) {\n return path.map(function (option, index) {\n var label = option[names.label];\n var node = label.indexOf(inputValue) > -1 ? highlightKeyword(label, inputValue, prefixCls) : label;\n return index === 0 ? node : [' / ', node];\n });\n}\n\nfunction defaultSortFilteredOption(a, b, inputValue, names) {\n function callback(elem) {\n return elem[names.label].indexOf(inputValue) > -1;\n }\n\n return a.findIndex(callback) - b.findIndex(callback);\n}\n\nfunction getFieldNames(_ref) {\n var fieldNames = _ref.fieldNames;\n return fieldNames;\n}\n\nfunction getFilledFieldNames(props) {\n var fieldNames = getFieldNames(props) || {};\n var names = {\n children: fieldNames.children || 'children',\n label: fieldNames.label || 'label',\n value: fieldNames.value || 'value'\n };\n return names;\n}\n\nfunction flattenTree(options, props) {\n var ancestor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var names = getFilledFieldNames(props);\n var flattenOptions = [];\n var childrenName = names.children;\n options.forEach(function (option) {\n var path = ancestor.concat(option);\n\n if (props.changeOnSelect || !option[childrenName] || !option[childrenName].length) {\n flattenOptions.push(path);\n }\n\n if (option[childrenName]) {\n flattenOptions = flattenOptions.concat(flattenTree(option[childrenName], props, path));\n }\n });\n return flattenOptions;\n}\n\nvar defaultDisplayRender = function defaultDisplayRender(label) {\n return label.join(' / ');\n};\n\nfunction warningValueNotExist(list) {\n var fieldNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (list || []).forEach(function (item) {\n var valueFieldName = fieldNames.value || 'value';\n devWarning(valueFieldName in item, 'Cascader', 'Not found `value` in `options`.');\n warningValueNotExist(item[fieldNames.children || 'children'], fieldNames);\n });\n}\n\nfunction getEmptyNode(renderEmpty, names, notFoundContent) {\n var _ref2;\n\n return _ref2 = {}, _defineProperty(_ref2, names.value, 'ANT_CASCADER_NOT_FOUND'), _defineProperty(_ref2, names.label, notFoundContent || renderEmpty('Cascader')), _defineProperty(_ref2, \"disabled\", true), _defineProperty(_ref2, \"isEmptyNode\", true), _ref2;\n}\n\nvar Cascader = /*#__PURE__*/function (_React$Component) {\n _inherits(Cascader, _React$Component);\n\n var _super = _createSuper(Cascader);\n\n function Cascader(props) {\n var _this;\n\n _classCallCheck(this, Cascader);\n\n _this = _super.call(this, props);\n _this.cachedOptions = [];\n\n _this.setValue = function (value) {\n var selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n var onChange = _this.props.onChange;\n\n if (onChange) {\n onChange(value, selectedOptions);\n }\n };\n\n _this.saveInput = function (node) {\n _this.input = node;\n };\n\n _this.handleChange = function (value, selectedOptions) {\n _this.setState({\n inputValue: ''\n });\n\n if (selectedOptions[0].__IS_FILTERED_OPTION) {\n var unwrappedValue = selectedOptions[0][keepFilteredValueField] === undefined ? value[0] : selectedOptions[0][keepFilteredValueField];\n var unwrappedSelectedOptions = selectedOptions[0].path;\n\n _this.setValue(unwrappedValue, unwrappedSelectedOptions);\n\n return;\n }\n\n _this.setValue(value, selectedOptions);\n };\n\n _this.handlePopupVisibleChange = function (popupVisible) {\n if (!('popupVisible' in _this.props)) {\n _this.setState(function (state) {\n return {\n popupVisible: popupVisible,\n inputFocused: popupVisible,\n inputValue: popupVisible ? state.inputValue : ''\n };\n });\n }\n\n var onPopupVisibleChange = _this.props.onPopupVisibleChange;\n\n if (onPopupVisibleChange) {\n onPopupVisibleChange(popupVisible);\n }\n };\n\n _this.handleInputBlur = function () {\n _this.setState({\n inputFocused: false\n });\n };\n\n _this.handleInputClick = function (e) {\n var _this$state = _this.state,\n inputFocused = _this$state.inputFocused,\n popupVisible = _this$state.popupVisible; // Prevent `Trigger` behaviour.\n\n if (inputFocused || popupVisible) {\n e.stopPropagation();\n }\n };\n\n _this.handleKeyDown = function (e) {\n // SPACE => https://github.com/ant-design/ant-design/issues/16871\n if (e.keyCode === KeyCode.BACKSPACE || e.keyCode === KeyCode.SPACE) {\n e.stopPropagation();\n }\n };\n\n _this.handleInputChange = function (e) {\n var popupVisible = _this.state.popupVisible;\n var inputValue = e.target.value;\n\n if (!popupVisible) {\n _this.handlePopupVisibleChange(true);\n }\n\n _this.setState({\n inputValue: inputValue\n });\n };\n\n _this.clearSelection = function (e) {\n var inputValue = _this.state.inputValue;\n e.preventDefault();\n e.stopPropagation();\n\n if (!inputValue) {\n _this.handlePopupVisibleChange(false);\n\n _this.clearSelectionTimeout = setTimeout(function () {\n _this.setValue([]);\n }, 200);\n } else {\n _this.setState({\n inputValue: ''\n });\n }\n };\n\n _this.renderCascader = function (_ref3, locale) {\n var getContextPopupContainer = _ref3.getPopupContainer,\n getPrefixCls = _ref3.getPrefixCls,\n renderEmpty = _ref3.renderEmpty,\n direction = _ref3.direction;\n return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (size) {\n var _classNames, _classNames2, _classNames3, _classNames5;\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n props = _assertThisInitialize.props,\n state = _assertThisInitialize.state;\n\n var customizePrefixCls = props.prefixCls,\n customizeInputPrefixCls = props.inputPrefixCls,\n children = props.children,\n _props$placeholder = props.placeholder,\n placeholder = _props$placeholder === void 0 ? locale.placeholder || 'Please select' : _props$placeholder,\n customizeSize = props.size,\n disabled = props.disabled,\n className = props.className,\n style = props.style,\n allowClear = props.allowClear,\n _props$showSearch = props.showSearch,\n showSearch = _props$showSearch === void 0 ? false : _props$showSearch,\n suffixIcon = props.suffixIcon,\n expandIcon = props.expandIcon,\n notFoundContent = props.notFoundContent,\n popupClassName = props.popupClassName,\n bordered = props.bordered,\n dropdownRender = props.dropdownRender,\n otherProps = __rest(props, [\"prefixCls\", \"inputPrefixCls\", \"children\", \"placeholder\", \"size\", \"disabled\", \"className\", \"style\", \"allowClear\", \"showSearch\", \"suffixIcon\", \"expandIcon\", \"notFoundContent\", \"popupClassName\", \"bordered\", \"dropdownRender\"]);\n\n var mergedSize = customizeSize || size;\n var value = state.value,\n inputFocused = state.inputFocused;\n var isRtlLayout = direction === 'rtl';\n var prefixCls = getPrefixCls('cascader', customizePrefixCls);\n var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n var sizeCls = classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(inputPrefixCls, \"-lg\"), mergedSize === 'large'), _defineProperty(_classNames, \"\".concat(inputPrefixCls, \"-sm\"), mergedSize === 'small'), _classNames));\n var clearIcon = allowClear && !disabled && value.length > 0 || state.inputValue ? /*#__PURE__*/React.createElement(CloseCircleFilled, {\n className: \"\".concat(prefixCls, \"-picker-clear\"),\n onClick: _this.clearSelection\n }) : null;\n var arrowCls = classNames((_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-picker-arrow\"), true), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-picker-arrow-expand\"), state.popupVisible), _classNames2));\n var pickerCls = classNames(\"\".concat(prefixCls, \"-picker\"), (_classNames3 = {}, _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-rtl\"), isRtlLayout), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-with-value\"), state.inputValue), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-disabled\"), disabled), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-\").concat(mergedSize), !!mergedSize), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-show-search\"), !!showSearch), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-focused\"), inputFocused), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-borderless\"), !bordered), _classNames3), className); // Fix bug of https://github.com/facebook/react/pull/5004\n // and https://fb.me/react-unknown-prop\n\n var inputProps = omit(otherProps, ['onChange', 'options', 'popupPlacement', 'transitionName', 'displayRender', 'onPopupVisibleChange', 'changeOnSelect', 'expandTrigger', 'popupVisible', 'getPopupContainer', 'loadData', 'popupClassName', 'filterOption', 'renderFilteredOption', 'sortFilteredOption', 'notFoundContent', 'fieldNames', 'bordered']);\n var options = props.options;\n var names = getFilledFieldNames(_this.props);\n\n if (options && options.length > 0) {\n if (state.inputValue) {\n options = _this.generateFilteredOptions(prefixCls, renderEmpty);\n }\n } else {\n options = [getEmptyNode(renderEmpty, names, notFoundContent)];\n } // Dropdown menu should keep previous status until it is fully closed.\n\n\n if (!state.popupVisible) {\n options = _this.cachedOptions;\n } else {\n _this.cachedOptions = options;\n }\n\n var dropdownMenuColumnStyle = {};\n var isNotFound = (options || []).length === 1 && options[0].isEmptyNode;\n\n if (isNotFound) {\n dropdownMenuColumnStyle.height = 'auto'; // Height of one row.\n } // The default value of `matchInputWidth` is `true`\n\n\n var resultListMatchInputWidth = showSearch.matchInputWidth !== false;\n\n if (resultListMatchInputWidth && (state.inputValue || isNotFound) && _this.input) {\n dropdownMenuColumnStyle.width = _this.input.input.offsetWidth;\n }\n\n var inputIcon;\n\n if (suffixIcon) {\n inputIcon = replaceElement(suffixIcon, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-picker-arrow\")\n }, suffixIcon), function () {\n var _classNames4;\n\n return {\n className: classNames((_classNames4 = {}, _defineProperty(_classNames4, suffixIcon.props.className, suffixIcon.props.className), _defineProperty(_classNames4, \"\".concat(prefixCls, \"-picker-arrow\"), true), _classNames4))\n };\n });\n } else {\n inputIcon = /*#__PURE__*/React.createElement(DownOutlined, {\n className: arrowCls\n });\n }\n\n var input = children || /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n className: pickerCls\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-picker-label\")\n }, _this.getLabel()), /*#__PURE__*/React.createElement(Input, _extends({}, inputProps, {\n tabIndex: \"-1\",\n ref: _this.saveInput,\n prefixCls: inputPrefixCls,\n placeholder: value && value.length > 0 ? undefined : placeholder,\n className: \"\".concat(prefixCls, \"-input \").concat(sizeCls),\n value: state.inputValue,\n disabled: disabled,\n readOnly: !showSearch,\n autoComplete: inputProps.autoComplete || 'off',\n onClick: showSearch ? _this.handleInputClick : undefined,\n onBlur: showSearch ? _this.handleInputBlur : undefined,\n onKeyDown: _this.handleKeyDown,\n onChange: showSearch ? _this.handleInputChange : undefined\n })), clearIcon, inputIcon);\n var expandIconNode;\n\n if (expandIcon) {\n expandIconNode = expandIcon;\n } else {\n expandIconNode = isRtlLayout ? /*#__PURE__*/React.createElement(LeftOutlined, null) : /*#__PURE__*/React.createElement(RightOutlined, null);\n }\n\n var loadingIcon = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-menu-item-loading-icon\")\n }, /*#__PURE__*/React.createElement(RedoOutlined, {\n spin: true\n }));\n var getPopupContainer = props.getPopupContainer || getContextPopupContainer;\n var rest = omit(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered', 'className']);\n var rcCascaderPopupClassName = classNames(popupClassName, (_classNames5 = {}, _defineProperty(_classNames5, \"\".concat(prefixCls, \"-menu-\").concat(direction), direction === 'rtl'), _defineProperty(_classNames5, \"\".concat(prefixCls, \"-menu-empty\"), options.length === 1 && options[0].value === 'ANT_CASCADER_NOT_FOUND'), _classNames5));\n return /*#__PURE__*/React.createElement(RcCascader, _extends({}, rest, {\n prefixCls: prefixCls,\n getPopupContainer: getPopupContainer,\n options: options,\n value: value,\n popupVisible: state.popupVisible,\n onPopupVisibleChange: _this.handlePopupVisibleChange,\n onChange: _this.handleChange,\n dropdownMenuColumnStyle: dropdownMenuColumnStyle,\n expandIcon: expandIconNode,\n loadingIcon: loadingIcon,\n popupClassName: rcCascaderPopupClassName,\n popupPlacement: _this.getPopupPlacement(direction),\n dropdownRender: dropdownRender\n }), input);\n });\n };\n\n _this.state = {\n value: props.value || props.defaultValue || [],\n inputValue: '',\n inputFocused: false,\n popupVisible: props.popupVisible,\n flattenOptions: props.showSearch ? flattenTree(props.options, props) : undefined,\n prevProps: props\n };\n return _this;\n }\n\n _createClass(Cascader, [{\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.clearSelectionTimeout) {\n clearTimeout(this.clearSelectionTimeout);\n }\n }\n }, {\n key: \"getLabel\",\n value: function getLabel() {\n var _this$props = this.props,\n options = _this$props.options,\n _this$props$displayRe = _this$props.displayRender,\n displayRender = _this$props$displayRe === void 0 ? defaultDisplayRender : _this$props$displayRe;\n var names = getFilledFieldNames(this.props);\n var value = this.state.value;\n var unwrappedValue = Array.isArray(value[0]) ? value[0] : value;\n var selectedOptions = arrayTreeFilter(options, function (o, level) {\n return o[names.value] === unwrappedValue[level];\n }, {\n childrenKeyName: names.children\n });\n var label = selectedOptions.length ? selectedOptions.map(function (o) {\n return o[names.label];\n }) : value;\n return displayRender(label, selectedOptions);\n }\n }, {\n key: \"generateFilteredOptions\",\n value: function generateFilteredOptions(prefixCls, renderEmpty) {\n var _this2 = this;\n\n var _this$props2 = this.props,\n showSearch = _this$props2.showSearch,\n notFoundContent = _this$props2.notFoundContent;\n var names = getFilledFieldNames(this.props);\n var _showSearch$filter = showSearch.filter,\n filter = _showSearch$filter === void 0 ? defaultFilterOption : _showSearch$filter,\n _showSearch$render = showSearch.render,\n render = _showSearch$render === void 0 ? defaultRenderFilteredOption : _showSearch$render,\n _showSearch$sort = showSearch.sort,\n sort = _showSearch$sort === void 0 ? defaultSortFilteredOption : _showSearch$sort,\n _showSearch$limit = showSearch.limit,\n limit = _showSearch$limit === void 0 ? defaultLimit : _showSearch$limit;\n var _this$state2 = this.state,\n _this$state2$flattenO = _this$state2.flattenOptions,\n flattenOptions = _this$state2$flattenO === void 0 ? [] : _this$state2$flattenO,\n inputValue = _this$state2.inputValue; // Limit the filter if needed\n\n var filtered;\n\n if (limit > 0) {\n filtered = [];\n var matchCount = 0; // Perf optimization to filter items only below the limit\n\n flattenOptions.some(function (path) {\n var match = filter(_this2.state.inputValue, path, names);\n\n if (match) {\n filtered.push(path);\n matchCount += 1;\n }\n\n return matchCount >= limit;\n });\n } else {\n devWarning(typeof limit !== 'number', 'Cascader', \"'limit' of showSearch should be positive number or false.\");\n filtered = flattenOptions.filter(function (path) {\n return filter(_this2.state.inputValue, path, names);\n });\n }\n\n filtered = filtered.sort(function (a, b) {\n return sort(a, b, inputValue, names);\n });\n\n if (filtered.length > 0) {\n // Fix issue: https://github.com/ant-design/ant-design/issues/26554\n var field = names.value === names.label ? keepFilteredValueField : names.value;\n return filtered.map(function (path) {\n var _ref4;\n\n return _ref4 = {\n __IS_FILTERED_OPTION: true,\n path: path\n }, _defineProperty(_ref4, field, path.map(function (o) {\n return o[names.value];\n })), _defineProperty(_ref4, names.label, render(inputValue, path, prefixCls, names)), _defineProperty(_ref4, \"disabled\", path.some(function (o) {\n return !!o.disabled;\n })), _defineProperty(_ref4, \"isEmptyNode\", true), _ref4;\n });\n }\n\n return [getEmptyNode(renderEmpty, names, notFoundContent)];\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.input.focus();\n }\n }, {\n key: \"blur\",\n value: function blur() {\n this.input.blur();\n }\n }, {\n key: \"getPopupPlacement\",\n value: function getPopupPlacement() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ltr';\n var popupPlacement = this.props.popupPlacement;\n\n if (popupPlacement !== undefined) {\n return popupPlacement;\n }\n\n return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (configArgument) {\n return /*#__PURE__*/React.createElement(LocaleReceiver, null, function (locale) {\n return _this3.renderCascader(configArgument, locale);\n });\n });\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, _ref5) {\n var prevProps = _ref5.prevProps;\n var newState = {\n prevProps: nextProps\n };\n\n if ('value' in nextProps) {\n newState.value = nextProps.value || [];\n }\n\n if ('popupVisible' in nextProps) {\n newState.popupVisible = nextProps.popupVisible;\n }\n\n if (nextProps.showSearch && prevProps.options !== nextProps.options) {\n newState.flattenOptions = flattenTree(nextProps.options, nextProps);\n }\n\n if (process.env.NODE_ENV !== 'production' && nextProps.options) {\n warningValueNotExist(nextProps.options, getFieldNames(nextProps));\n }\n\n return newState;\n }\n }]);\n\n return Cascader;\n}(React.Component);\n\nCascader.defaultProps = {\n transitionName: 'slide-up',\n options: [],\n disabled: false,\n allowClear: true,\n bordered: true\n};\nexport default Cascader;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/cascader/index.js"],"names":["_extends","_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","_defineProperty","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","RcCascader","arrayTreeFilter","classNames","omit","KeyCode","CloseCircleFilled","DownOutlined","RightOutlined","RedoOutlined","LeftOutlined","Input","ConfigConsumer","LocaleReceiver","devWarning","SizeContext","replaceElement","defaultLimit","keepFilteredValueField","highlightKeyword","str","keyword","prefixCls","split","map","node","index","createElement","className","concat","key","defaultFilterOption","inputValue","path","names","some","option","label","defaultRenderFilteredOption","defaultSortFilteredOption","a","b","callback","elem","findIndex","getFieldNames","_ref","fieldNames","getFilledFieldNames","props","children","value","flattenTree","options","ancestor","arguments","undefined","flattenOptions","childrenName","forEach","changeOnSelect","push","defaultDisplayRender","join","warningValueNotExist","list","item","valueFieldName","getEmptyNode","renderEmpty","notFoundContent","_ref2","Cascader","_React$Component","_super","_this","cachedOptions","setValue","selectedOptions","setState","onChange","saveInput","input","handleChange","__IS_FILTERED_OPTION","unwrappedValue","unwrappedSelectedOptions","handlePopupVisibleChange","popupVisible","state","inputFocused","onPopupVisibleChange","handleInputBlur","handleInputClick","_this$state","stopPropagation","handleKeyDown","keyCode","BACKSPACE","SPACE","handleInputChange","target","clearSelection","preventDefault","clearSelectionTimeout","setTimeout","renderCascader","_ref3","locale","getContextPopupContainer","getPopupContainer","getPrefixCls","direction","Consumer","size","_classNames","_classNames2","_classNames3","_classNames5","_assertThisInitialize","customizePrefixCls","customizeInputPrefixCls","inputPrefixCls","_props$placeholder","placeholder","customizeSize","disabled","style","allowClear","_props$showSearch","showSearch","suffixIcon","expandIcon","popupClassName","bordered","dropdownRender","otherProps","mergedSize","isRtlLayout","sizeCls","clearIcon","onClick","arrowCls","pickerCls","inputProps","generateFilteredOptions","dropdownMenuColumnStyle","isNotFound","isEmptyNode","height","resultListMatchInputWidth","matchInputWidth","width","offsetWidth","inputIcon","_classNames4","getLabel","tabIndex","ref","readOnly","autoComplete","onBlur","onKeyDown","expandIconNode","loadingIcon","spin","rest","rcCascaderPopupClassName","popupPlacement","getPopupPlacement","defaultValue","prevProps","componentWillUnmount","clearTimeout","_this$props","_this$props$displayRe","displayRender","Array","isArray","o","level","childrenKeyName","_this2","_this$props2","_showSearch$filter","filter","_showSearch$render","render","_showSearch$sort","sort","_showSearch$limit","limit","_this$state2","_this$state2$flattenO","filtered","matchCount","match","field","_ref4","focus","blur","_this3","configArgument","getDerivedStateFromProps","nextProps","_ref5","newState","process","env","NODE_ENV","Component","defaultProps","transitionName"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;AACA,OAAOC,YAAP,MAAyB,oCAAzB;AACA,OAAOC,sBAAP,MAAmC,8CAAnC;AACA,OAAOC,SAAP,MAAsB,iCAAtB;AACA,OAAOC,YAAP,MAAyB,oCAAzB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC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C;AACD;;AAED,UAAIG,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,IAAyCL,SAAS,CAACvJ,OAAvD,EAAgE;AAC9DW,QAAAA,oBAAoB,CAAC4I,SAAS,CAACvJ,OAAX,EAAoBR,aAAa,CAAC+J,SAAD,CAAjC,CAApB;AACD;;AAED,aAAOE,QAAP;AACD;AAzBE,GAAD,CAhIQ,CAAZ;;AA4JA,SAAOtI,QAAP;AACD,CA1b2B,CA0b1BxE,KAAK,CAACkN,SA1boB,CAA5B;;AA4bA1I,QAAQ,CAAC2I,YAAT,GAAwB;AACtBC,EAAAA,cAAc,EAAE,UADM;AAEtB/J,EAAAA,OAAO,EAAE,EAFa;AAGtByE,EAAAA,QAAQ,EAAE,KAHY;AAItBE,EAAAA,UAAU,EAAE,IAJU;AAKtBM,EAAAA,QAAQ,EAAE;AALY,CAAxB;AAOA,eAAe9D,QAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nimport * as React from 'react';\nimport RcCascader from 'rc-cascader';\nimport arrayTreeFilter from 'array-tree-filter';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';\nimport DownOutlined from '@ant-design/icons/DownOutlined';\nimport RightOutlined from '@ant-design/icons/RightOutlined';\nimport RedoOutlined from '@ant-design/icons/RedoOutlined';\nimport LeftOutlined from '@ant-design/icons/LeftOutlined';\nimport Input from '../input';\nimport { ConfigConsumer } from '../config-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport devWarning from '../_util/devWarning';\nimport SizeContext from '../config-provider/SizeContext';\nimport { replaceElement } from '../_util/reactNode'; // We limit the filtered item count by default\n\nvar defaultLimit = 50; // keep value when filtering\n\nvar keepFilteredValueField = '__KEEP_FILTERED_OPTION_VALUE';\n\nfunction highlightKeyword(str, keyword, prefixCls) {\n return str.split(keyword).map(function (node, index) {\n return index === 0 ? node : [/*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-menu-item-keyword\"),\n key: \"seperator\"\n }, keyword), node];\n });\n}\n\nfunction defaultFilterOption(inputValue, path, names) {\n return path.some(function (option) {\n return option[names.label].indexOf(inputValue) > -1;\n });\n}\n\nfunction defaultRenderFilteredOption(inputValue, path, prefixCls, names) {\n return path.map(function (option, index) {\n var label = option[names.label];\n var node = label.indexOf(inputValue) > -1 ? highlightKeyword(label, inputValue, prefixCls) : label;\n return index === 0 ? node : [' / ', node];\n });\n}\n\nfunction defaultSortFilteredOption(a, b, inputValue, names) {\n function callback(elem) {\n return elem[names.label].indexOf(inputValue) > -1;\n }\n\n return a.findIndex(callback) - b.findIndex(callback);\n}\n\nfunction getFieldNames(_ref) {\n var fieldNames = _ref.fieldNames;\n return fieldNames;\n}\n\nfunction getFilledFieldNames(props) {\n var fieldNames = getFieldNames(props) || {};\n var names = {\n children: fieldNames.children || 'children',\n label: fieldNames.label || 'label',\n value: fieldNames.value || 'value'\n };\n return names;\n}\n\nfunction flattenTree(options, props) {\n var ancestor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var names = getFilledFieldNames(props);\n var flattenOptions = [];\n var childrenName = names.children;\n options.forEach(function (option) {\n var path = ancestor.concat(option);\n\n if (props.changeOnSelect || !option[childrenName] || !option[childrenName].length) {\n flattenOptions.push(path);\n }\n\n if (option[childrenName]) {\n flattenOptions = flattenOptions.concat(flattenTree(option[childrenName], props, path));\n }\n });\n return flattenOptions;\n}\n\nvar defaultDisplayRender = function defaultDisplayRender(label) {\n return label.join(' / ');\n};\n\nfunction warningValueNotExist(list) {\n var fieldNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (list || []).forEach(function (item) {\n var valueFieldName = fieldNames.value || 'value';\n devWarning(valueFieldName in item, 'Cascader', 'Not found `value` in `options`.');\n warningValueNotExist(item[fieldNames.children || 'children'], fieldNames);\n });\n}\n\nfunction getEmptyNode(renderEmpty, names, notFoundContent) {\n var _ref2;\n\n return _ref2 = {}, _defineProperty(_ref2, names.value, 'ANT_CASCADER_NOT_FOUND'), _defineProperty(_ref2, names.label, notFoundContent || renderEmpty('Cascader')), _defineProperty(_ref2, \"disabled\", true), _defineProperty(_ref2, \"isEmptyNode\", true), _ref2;\n}\n\nvar Cascader = /*#__PURE__*/function (_React$Component) {\n _inherits(Cascader, _React$Component);\n\n var _super = _createSuper(Cascader);\n\n function Cascader(props) {\n var _this;\n\n _classCallCheck(this, Cascader);\n\n _this = _super.call(this, props);\n _this.cachedOptions = [];\n\n _this.setValue = function (value) {\n var selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n var onChange = _this.props.onChange;\n\n if (onChange) {\n onChange(value, selectedOptions);\n }\n };\n\n _this.saveInput = function (node) {\n _this.input = node;\n };\n\n _this.handleChange = function (value, selectedOptions) {\n _this.setState({\n inputValue: ''\n });\n\n if (selectedOptions[0].__IS_FILTERED_OPTION) {\n var unwrappedValue = selectedOptions[0][keepFilteredValueField] === undefined ? value[0] : selectedOptions[0][keepFilteredValueField];\n var unwrappedSelectedOptions = selectedOptions[0].path;\n\n _this.setValue(unwrappedValue, unwrappedSelectedOptions);\n\n return;\n }\n\n _this.setValue(value, selectedOptions);\n };\n\n _this.handlePopupVisibleChange = function (popupVisible) {\n if (!('popupVisible' in _this.props)) {\n _this.setState(function (state) {\n return {\n popupVisible: popupVisible,\n inputFocused: popupVisible,\n inputValue: popupVisible ? state.inputValue : ''\n };\n });\n }\n\n var onPopupVisibleChange = _this.props.onPopupVisibleChange;\n\n if (onPopupVisibleChange) {\n onPopupVisibleChange(popupVisible);\n }\n };\n\n _this.handleInputBlur = function () {\n _this.setState({\n inputFocused: false\n });\n };\n\n _this.handleInputClick = function (e) {\n var _this$state = _this.state,\n inputFocused = _this$state.inputFocused,\n popupVisible = _this$state.popupVisible; // Prevent `Trigger` behaviour.\n\n if (inputFocused || popupVisible) {\n e.stopPropagation();\n }\n };\n\n _this.handleKeyDown = function (e) {\n // SPACE => https://github.com/ant-design/ant-design/issues/16871\n if (e.keyCode === KeyCode.BACKSPACE || e.keyCode === KeyCode.SPACE) {\n e.stopPropagation();\n }\n };\n\n _this.handleInputChange = function (e) {\n var popupVisible = _this.state.popupVisible;\n var inputValue = e.target.value;\n\n if (!popupVisible) {\n _this.handlePopupVisibleChange(true);\n }\n\n _this.setState({\n inputValue: inputValue\n });\n };\n\n _this.clearSelection = function (e) {\n var inputValue = _this.state.inputValue;\n e.preventDefault();\n e.stopPropagation();\n\n if (!inputValue) {\n _this.handlePopupVisibleChange(false);\n\n _this.clearSelectionTimeout = setTimeout(function () {\n _this.setValue([]);\n }, 200);\n } else {\n _this.setState({\n inputValue: ''\n });\n }\n };\n\n _this.renderCascader = function (_ref3, locale) {\n var getContextPopupContainer = _ref3.getPopupContainer,\n getPrefixCls = _ref3.getPrefixCls,\n renderEmpty = _ref3.renderEmpty,\n direction = _ref3.direction;\n return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (size) {\n var _classNames, _classNames2, _classNames3, _classNames5;\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n props = _assertThisInitialize.props,\n state = _assertThisInitialize.state;\n\n var customizePrefixCls = props.prefixCls,\n customizeInputPrefixCls = props.inputPrefixCls,\n children = props.children,\n _props$placeholder = props.placeholder,\n placeholder = _props$placeholder === void 0 ? locale.placeholder || 'Please select' : _props$placeholder,\n customizeSize = props.size,\n disabled = props.disabled,\n className = props.className,\n style = props.style,\n allowClear = props.allowClear,\n _props$showSearch = props.showSearch,\n showSearch = _props$showSearch === void 0 ? false : _props$showSearch,\n suffixIcon = props.suffixIcon,\n expandIcon = props.expandIcon,\n notFoundContent = props.notFoundContent,\n popupClassName = props.popupClassName,\n bordered = props.bordered,\n dropdownRender = props.dropdownRender,\n otherProps = __rest(props, [\"prefixCls\", \"inputPrefixCls\", \"children\", \"placeholder\", \"size\", \"disabled\", \"className\", \"style\", \"allowClear\", \"showSearch\", \"suffixIcon\", \"expandIcon\", \"notFoundContent\", \"popupClassName\", \"bordered\", \"dropdownRender\"]);\n\n var mergedSize = customizeSize || size;\n var value = state.value,\n inputFocused = state.inputFocused;\n var isRtlLayout = direction === 'rtl';\n var prefixCls = getPrefixCls('cascader', customizePrefixCls);\n var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n var sizeCls = classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(inputPrefixCls, \"-lg\"), mergedSize === 'large'), _defineProperty(_classNames, \"\".concat(inputPrefixCls, \"-sm\"), mergedSize === 'small'), _classNames));\n var clearIcon = allowClear && !disabled && value.length > 0 || state.inputValue ? /*#__PURE__*/React.createElement(CloseCircleFilled, {\n className: \"\".concat(prefixCls, \"-picker-clear\"),\n onClick: _this.clearSelection\n }) : null;\n var arrowCls = classNames((_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-picker-arrow\"), true), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-picker-arrow-expand\"), state.popupVisible), _classNames2));\n var pickerCls = classNames(\"\".concat(prefixCls, \"-picker\"), (_classNames3 = {}, _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-rtl\"), isRtlLayout), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-with-value\"), state.inputValue), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-disabled\"), disabled), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-\").concat(mergedSize), !!mergedSize), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-show-search\"), !!showSearch), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-focused\"), inputFocused), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-picker-borderless\"), !bordered), _classNames3), className); // Fix bug of https://github.com/facebook/react/pull/5004\n // and https://fb.me/react-unknown-prop\n\n var inputProps = omit(otherProps, ['onChange', 'options', 'popupPlacement', 'transitionName', 'displayRender', 'onPopupVisibleChange', 'changeOnSelect', 'expandTrigger', 'popupVisible', 'getPopupContainer', 'loadData', 'popupClassName', 'filterOption', 'renderFilteredOption', 'sortFilteredOption', 'notFoundContent', 'fieldNames', 'bordered']);\n var options = props.options;\n var names = getFilledFieldNames(_this.props);\n\n if (options && options.length > 0) {\n if (state.inputValue) {\n options = _this.generateFilteredOptions(prefixCls, renderEmpty);\n }\n } else {\n options = [getEmptyNode(renderEmpty, names, notFoundContent)];\n } // Dropdown menu should keep previous status until it is fully closed.\n\n\n if (!state.popupVisible) {\n options = _this.cachedOptions;\n } else {\n _this.cachedOptions = options;\n }\n\n var dropdownMenuColumnStyle = {};\n var isNotFound = (options || []).length === 1 && options[0].isEmptyNode;\n\n if (isNotFound) {\n dropdownMenuColumnStyle.height = 'auto'; // Height of one row.\n } // The default value of `matchInputWidth` is `true`\n\n\n var resultListMatchInputWidth = showSearch.matchInputWidth !== false;\n\n if (resultListMatchInputWidth && (state.inputValue || isNotFound) && _this.input) {\n dropdownMenuColumnStyle.width = _this.input.input.offsetWidth;\n }\n\n var inputIcon;\n\n if (suffixIcon) {\n inputIcon = replaceElement(suffixIcon, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-picker-arrow\")\n }, suffixIcon), function () {\n var _classNames4;\n\n return {\n className: classNames((_classNames4 = {}, _defineProperty(_classNames4, suffixIcon.props.className, suffixIcon.props.className), _defineProperty(_classNames4, \"\".concat(prefixCls, \"-picker-arrow\"), true), _classNames4))\n };\n });\n } else {\n inputIcon = /*#__PURE__*/React.createElement(DownOutlined, {\n className: arrowCls\n });\n }\n\n var input = children || /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n className: pickerCls\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-picker-label\")\n }, _this.getLabel()), /*#__PURE__*/React.createElement(Input, _extends({}, inputProps, {\n tabIndex: \"-1\",\n ref: _this.saveInput,\n prefixCls: inputPrefixCls,\n placeholder: value && value.length > 0 ? undefined : placeholder,\n className: \"\".concat(prefixCls, \"-input \").concat(sizeCls),\n value: state.inputValue,\n disabled: disabled,\n readOnly: !showSearch,\n autoComplete: inputProps.autoComplete || 'off',\n onClick: showSearch ? _this.handleInputClick : undefined,\n onBlur: showSearch ? _this.handleInputBlur : undefined,\n onKeyDown: _this.handleKeyDown,\n onChange: showSearch ? _this.handleInputChange : undefined\n })), clearIcon, inputIcon);\n var expandIconNode;\n\n if (expandIcon) {\n expandIconNode = expandIcon;\n } else {\n expandIconNode = isRtlLayout ? /*#__PURE__*/React.createElement(LeftOutlined, null) : /*#__PURE__*/React.createElement(RightOutlined, null);\n }\n\n var loadingIcon = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-menu-item-loading-icon\")\n }, /*#__PURE__*/React.createElement(RedoOutlined, {\n spin: true\n }));\n var getPopupContainer = props.getPopupContainer || getContextPopupContainer;\n var rest = omit(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered', 'className']);\n var rcCascaderPopupClassName = classNames(popupClassName, (_classNames5 = {}, _defineProperty(_classNames5, \"\".concat(prefixCls, \"-menu-\").concat(direction), direction === 'rtl'), _defineProperty(_classNames5, \"\".concat(prefixCls, \"-menu-empty\"), options.length === 1 && options[0].value === 'ANT_CASCADER_NOT_FOUND'), _classNames5));\n return /*#__PURE__*/React.createElement(RcCascader, _extends({}, rest, {\n prefixCls: prefixCls,\n getPopupContainer: getPopupContainer,\n options: options,\n value: value,\n popupVisible: state.popupVisible,\n onPopupVisibleChange: _this.handlePopupVisibleChange,\n onChange: _this.handleChange,\n dropdownMenuColumnStyle: dropdownMenuColumnStyle,\n expandIcon: expandIconNode,\n loadingIcon: loadingIcon,\n popupClassName: rcCascaderPopupClassName,\n popupPlacement: _this.getPopupPlacement(direction),\n dropdownRender: dropdownRender\n }), input);\n });\n };\n\n _this.state = {\n value: props.value || props.defaultValue || [],\n inputValue: '',\n inputFocused: false,\n popupVisible: props.popupVisible,\n flattenOptions: props.showSearch ? flattenTree(props.options, props) : undefined,\n prevProps: props\n };\n return _this;\n }\n\n _createClass(Cascader, [{\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.clearSelectionTimeout) {\n clearTimeout(this.clearSelectionTimeout);\n }\n }\n }, {\n key: \"getLabel\",\n value: function getLabel() {\n var _this$props = this.props,\n options = _this$props.options,\n _this$props$displayRe = _this$props.displayRender,\n displayRender = _this$props$displayRe === void 0 ? defaultDisplayRender : _this$props$displayRe;\n var names = getFilledFieldNames(this.props);\n var value = this.state.value;\n var unwrappedValue = Array.isArray(value[0]) ? value[0] : value;\n var selectedOptions = arrayTreeFilter(options, function (o, level) {\n return o[names.value] === unwrappedValue[level];\n }, {\n childrenKeyName: names.children\n });\n var label = selectedOptions.length ? selectedOptions.map(function (o) {\n return o[names.label];\n }) : value;\n return displayRender(label, selectedOptions);\n }\n }, {\n key: \"generateFilteredOptions\",\n value: function generateFilteredOptions(prefixCls, renderEmpty) {\n var _this2 = this;\n\n var _this$props2 = this.props,\n showSearch = _this$props2.showSearch,\n notFoundContent = _this$props2.notFoundContent;\n var names = getFilledFieldNames(this.props);\n var _showSearch$filter = showSearch.filter,\n filter = _showSearch$filter === void 0 ? defaultFilterOption : _showSearch$filter,\n _showSearch$render = showSearch.render,\n render = _showSearch$render === void 0 ? defaultRenderFilteredOption : _showSearch$render,\n _showSearch$sort = showSearch.sort,\n sort = _showSearch$sort === void 0 ? defaultSortFilteredOption : _showSearch$sort,\n _showSearch$limit = showSearch.limit,\n limit = _showSearch$limit === void 0 ? defaultLimit : _showSearch$limit;\n var _this$state2 = this.state,\n _this$state2$flattenO = _this$state2.flattenOptions,\n flattenOptions = _this$state2$flattenO === void 0 ? [] : _this$state2$flattenO,\n inputValue = _this$state2.inputValue; // Limit the filter if needed\n\n var filtered;\n\n if (limit > 0) {\n filtered = [];\n var matchCount = 0; // Perf optimization to filter items only below the limit\n\n flattenOptions.some(function (path) {\n var match = filter(_this2.state.inputValue, path, names);\n\n if (match) {\n filtered.push(path);\n matchCount += 1;\n }\n\n return matchCount >= limit;\n });\n } else {\n devWarning(typeof limit !== 'number', 'Cascader', \"'limit' of showSearch should be positive number or false.\");\n filtered = flattenOptions.filter(function (path) {\n return filter(_this2.state.inputValue, path, names);\n });\n }\n\n filtered = filtered.sort(function (a, b) {\n return sort(a, b, inputValue, names);\n });\n\n if (filtered.length > 0) {\n // Fix issue: https://github.com/ant-design/ant-design/issues/26554\n var field = names.value === names.label ? keepFilteredValueField : names.value;\n return filtered.map(function (path) {\n var _ref4;\n\n return _ref4 = {\n __IS_FILTERED_OPTION: true,\n path: path\n }, _defineProperty(_ref4, field, path.map(function (o) {\n return o[names.value];\n })), _defineProperty(_ref4, names.label, render(inputValue, path, prefixCls, names)), _defineProperty(_ref4, \"disabled\", path.some(function (o) {\n return !!o.disabled;\n })), _defineProperty(_ref4, \"isEmptyNode\", true), _ref4;\n });\n }\n\n return [getEmptyNode(renderEmpty, names, notFoundContent)];\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.input.focus();\n }\n }, {\n key: \"blur\",\n value: function blur() {\n this.input.blur();\n }\n }, {\n key: \"getPopupPlacement\",\n value: function getPopupPlacement() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ltr';\n var popupPlacement = this.props.popupPlacement;\n\n if (popupPlacement !== undefined) {\n return popupPlacement;\n }\n\n return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (configArgument) {\n return /*#__PURE__*/React.createElement(LocaleReceiver, null, function (locale) {\n return _this3.renderCascader(configArgument, locale);\n });\n });\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, _ref5) {\n var prevProps = _ref5.prevProps;\n var newState = {\n prevProps: nextProps\n };\n\n if ('value' in nextProps) {\n newState.value = nextProps.value || [];\n }\n\n if ('popupVisible' in nextProps) {\n newState.popupVisible = nextProps.popupVisible;\n }\n\n if (nextProps.showSearch && prevProps.options !== nextProps.options) {\n newState.flattenOptions = flattenTree(nextProps.options, nextProps);\n }\n\n if (process.env.NODE_ENV !== 'production' && nextProps.options) {\n warningValueNotExist(nextProps.options, getFieldNames(nextProps));\n }\n\n return newState;\n }\n }]);\n\n return Cascader;\n}(React.Component);\n\nCascader.defaultProps = {\n transitionName: 'slide-up',\n options: [],\n disabled: false,\n allowClear: true,\n bordered: true\n};\nexport default Cascader;"]},"metadata":{},"sourceType":"module"}