PromoCursed/node_modules/.cache/babel-loader/7764d7b737a4bbfe021abbe19d4057c7d7a9c3d3aab01e3056f8da3a5ba5414d.json
2024-08-20 23:25:37 +04:00

1 line
67 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\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\", \"prefixCls\", \"value\", \"defaultValue\", \"onChange\", \"onSelect\", \"onDeselect\", \"searchValue\", \"inputValue\", \"onSearch\", \"autoClearSearchValue\", \"filterTreeNode\", \"treeNodeFilterProp\", \"showCheckedStrategy\", \"treeNodeLabelProp\", \"multiple\", \"treeCheckable\", \"treeCheckStrictly\", \"labelInValue\", \"fieldNames\", \"treeDataSimpleMode\", \"treeData\", \"children\", \"loadData\", \"treeLoadedKeys\", \"onTreeLoad\", \"treeDefaultExpandAll\", \"treeExpandedKeys\", \"treeDefaultExpandedKeys\", \"onTreeExpand\", \"treeExpandAction\", \"virtual\", \"listHeight\", \"listItemHeight\", \"listItemScrollOffset\", \"onDropdownVisibleChange\", \"dropdownMatchSelectWidth\", \"treeLine\", \"treeIcon\", \"showTreeIcon\", \"switcherIcon\", \"treeMotion\", \"treeTitleRender\", \"onPopupScroll\"];\nimport { BaseSelect } from 'rc-select';\nimport useId from \"rc-select/es/hooks/useId\";\nimport { conductCheck } from \"rc-tree/es/utils/conductUtil\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport useCache from \"./hooks/useCache\";\nimport useCheckedKeys from \"./hooks/useCheckedKeys\";\nimport useDataEntities from \"./hooks/useDataEntities\";\nimport useFilterTreeData from \"./hooks/useFilterTreeData\";\nimport useRefFunc from \"./hooks/useRefFunc\";\nimport useTreeData from \"./hooks/useTreeData\";\nimport LegacyContext from \"./LegacyContext\";\nimport OptionList from \"./OptionList\";\nimport TreeNode from \"./TreeNode\";\nimport TreeSelectContext from \"./TreeSelectContext\";\nimport { fillAdditionalInfo, fillLegacyProps } from \"./utils/legacyUtil\";\nimport { formatStrategyValues, SHOW_ALL, SHOW_CHILD, SHOW_PARENT } from \"./utils/strategyUtil\";\nimport { fillFieldNames, isNil, toArray } from \"./utils/valueUtil\";\nimport warningProps from \"./utils/warningPropsUtil\";\n\n/** @deprecated This is only used for legacy compatible. Not works on new code. */\n\nfunction isRawValue(value) {\n return !value || _typeof(value) !== 'object';\n}\nvar TreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-tree-select' : _props$prefixCls,\n value = props.value,\n defaultValue = props.defaultValue,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n searchValue = props.searchValue,\n inputValue = props.inputValue,\n onSearch = props.onSearch,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n filterTreeNode = props.filterTreeNode,\n _props$treeNodeFilter = props.treeNodeFilterProp,\n treeNodeFilterProp = _props$treeNodeFilter === void 0 ? 'value' : _props$treeNodeFilter,\n showCheckedStrategy = props.showCheckedStrategy,\n treeNodeLabelProp = props.treeNodeLabelProp,\n multiple = props.multiple,\n treeCheckable = props.treeCheckable,\n treeCheckStrictly = props.treeCheckStrictly,\n labelInValue = props.labelInValue,\n fieldNames = props.fieldNames,\n treeDataSimpleMode = props.treeDataSimpleMode,\n treeData = props.treeData,\n children = props.children,\n loadData = props.loadData,\n treeLoadedKeys = props.treeLoadedKeys,\n onTreeLoad = props.onTreeLoad,\n treeDefaultExpandAll = props.treeDefaultExpandAll,\n treeExpandedKeys = props.treeExpandedKeys,\n treeDefaultExpandedKeys = props.treeDefaultExpandedKeys,\n onTreeExpand = props.onTreeExpand,\n treeExpandAction = props.treeExpandAction,\n virtual = props.virtual,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n _props$listItemScroll = props.listItemScrollOffset,\n listItemScrollOffset = _props$listItemScroll === void 0 ? 0 : _props$listItemScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,\n treeLine = props.treeLine,\n treeIcon = props.treeIcon,\n showTreeIcon = props.showTreeIcon,\n switcherIcon = props.switcherIcon,\n treeMotion = props.treeMotion,\n treeTitleRender = props.treeTitleRender,\n onPopupScroll = props.onPopupScroll,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedId = useId(id);\n var treeConduction = treeCheckable && !treeCheckStrictly;\n var mergedCheckable = treeCheckable || treeCheckStrictly;\n var mergedLabelInValue = treeCheckStrictly || labelInValue;\n var mergedMultiple = mergedCheckable || multiple;\n var _useMergedState = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n internalValue = _useMergedState2[0],\n setInternalValue = _useMergedState2[1];\n\n // `multiple` && `!treeCheckable` should be show all\n var mergedShowCheckedStrategy = React.useMemo(function () {\n if (!treeCheckable) {\n return SHOW_ALL;\n }\n return showCheckedStrategy || SHOW_CHILD;\n }, [showCheckedStrategy, treeCheckable]);\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n }\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 // =========================== Search ===========================\n var _useMergedState3 = useMergedState('', {\n value: searchValue !== undefined ? searchValue : inputValue,\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) {\n setSearchValue(searchText);\n onSearch === null || onSearch === void 0 || onSearch(searchText);\n };\n\n // ============================ Data ============================\n // `useTreeData` only do convert of `children` or `simpleMode`.\n // Else will return origin `treeData` for perf consideration.\n // Do not do anything to loop the data.\n var mergedTreeData = useTreeData(treeData, children, treeDataSimpleMode);\n var _useDataEntities = useDataEntities(mergedTreeData, mergedFieldNames),\n keyEntities = _useDataEntities.keyEntities,\n valueEntities = _useDataEntities.valueEntities;\n\n /** Get `missingRawValues` which not exist in the tree yet */\n var splitRawValues = React.useCallback(function (newRawValues) {\n var missingRawValues = [];\n var existRawValues = [];\n\n // Keep missing value in the cache\n newRawValues.forEach(function (val) {\n if (valueEntities.has(val)) {\n existRawValues.push(val);\n } else {\n missingRawValues.push(val);\n }\n });\n return {\n missingRawValues: missingRawValues,\n existRawValues: existRawValues\n };\n }, [valueEntities]);\n\n // Filtered Tree\n var filteredTreeData = useFilterTreeData(mergedTreeData, mergedSearchValue, {\n fieldNames: mergedFieldNames,\n treeNodeFilterProp: treeNodeFilterProp,\n filterTreeNode: filterTreeNode\n });\n\n // =========================== Label ============================\n var getLabel = React.useCallback(function (item) {\n if (item) {\n if (treeNodeLabelProp) {\n return item[treeNodeLabelProp];\n }\n\n // Loop from fieldNames\n var titleList = mergedFieldNames._title;\n for (var i = 0; i < titleList.length; i += 1) {\n var title = item[titleList[i]];\n if (title !== undefined) {\n return title;\n }\n }\n }\n }, [mergedFieldNames, treeNodeLabelProp]);\n\n // ========================= Wrap Value =========================\n var toLabeledValues = React.useCallback(function (draftValues) {\n var values = toArray(draftValues);\n return values.map(function (val) {\n if (isRawValue(val)) {\n return {\n value: val\n };\n }\n return val;\n });\n }, []);\n var convert2LabelValues = React.useCallback(function (draftValues) {\n var values = toLabeledValues(draftValues);\n return values.map(function (item) {\n var rawLabel = item.label;\n var rawValue = item.value,\n rawHalfChecked = item.halfChecked;\n var rawDisabled;\n var entity = valueEntities.get(rawValue);\n\n // Fill missing label & status\n if (entity) {\n var _rawLabel;\n rawLabel = treeTitleRender ? treeTitleRender(entity.node) : (_rawLabel = rawLabel) !== null && _rawLabel !== void 0 ? _rawLabel : getLabel(entity.node);\n rawDisabled = entity.node.disabled;\n } else if (rawLabel === undefined) {\n // We try to find in current `labelInValue` value\n var labelInValueItem = toLabeledValues(internalValue).find(function (labeledItem) {\n return labeledItem.value === rawValue;\n });\n rawLabel = labelInValueItem.label;\n }\n return {\n label: rawLabel,\n value: rawValue,\n halfChecked: rawHalfChecked,\n disabled: rawDisabled\n };\n });\n }, [valueEntities, getLabel, toLabeledValues, internalValue]);\n\n // =========================== Values ===========================\n var rawMixedLabeledValues = React.useMemo(function () {\n return toLabeledValues(internalValue);\n }, [toLabeledValues, internalValue]);\n\n // Split value into full check and half check\n var _React$useMemo = React.useMemo(function () {\n var fullCheckValues = [];\n var halfCheckValues = [];\n rawMixedLabeledValues.forEach(function (item) {\n if (item.halfChecked) {\n halfCheckValues.push(item);\n } else {\n fullCheckValues.push(item);\n }\n });\n return [fullCheckValues, halfCheckValues];\n }, [rawMixedLabeledValues]),\n _React$useMemo2 = _slicedToArray(_React$useMemo, 2),\n rawLabeledValues = _React$useMemo2[0],\n rawHalfLabeledValues = _React$useMemo2[1];\n\n // const [mergedValues] = useCache(rawLabeledValues);\n var rawValues = React.useMemo(function () {\n return rawLabeledValues.map(function (item) {\n return item.value;\n });\n }, [rawLabeledValues]);\n\n // Convert value to key. Will fill missed keys for conduct check.\n var _useCheckedKeys = useCheckedKeys(rawLabeledValues, rawHalfLabeledValues, treeConduction, keyEntities),\n _useCheckedKeys2 = _slicedToArray(_useCheckedKeys, 2),\n rawCheckedValues = _useCheckedKeys2[0],\n rawHalfCheckedValues = _useCheckedKeys2[1];\n\n // Convert rawCheckedKeys to check strategy related values\n var displayValues = React.useMemo(function () {\n // Collect keys which need to show\n var displayKeys = formatStrategyValues(rawCheckedValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);\n\n // Convert to value and filled with label\n var values = displayKeys.map(function (key) {\n var _keyEntities$key$node, _keyEntities$key;\n return (_keyEntities$key$node = (_keyEntities$key = keyEntities[key]) === null || _keyEntities$key === void 0 || (_keyEntities$key = _keyEntities$key.node) === null || _keyEntities$key === void 0 ? void 0 : _keyEntities$key[mergedFieldNames.value]) !== null && _keyEntities$key$node !== void 0 ? _keyEntities$key$node : key;\n });\n\n // Back fill with origin label\n var labeledValues = values.map(function (val) {\n var targetItem = rawLabeledValues.find(function (item) {\n return item.value === val;\n });\n var label;\n // Ensure that when labelInValue is true, if label is undefined, it remains undefined.\n if (labelInValue && targetItem.label !== undefined) {\n label = targetItem.label;\n } else if (!labelInValue && treeTitleRender) {\n label = treeTitleRender(targetItem);\n }\n return {\n value: val,\n label: label\n };\n });\n var rawDisplayValues = convert2LabelValues(labeledValues);\n var firstVal = rawDisplayValues[0];\n if (!mergedMultiple && firstVal && isNil(firstVal.value) && isNil(firstVal.label)) {\n return [];\n }\n return rawDisplayValues.map(function (item) {\n var _item$label;\n return _objectSpread(_objectSpread({}, item), {}, {\n label: (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : item.value\n });\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [mergedFieldNames, mergedMultiple, rawCheckedValues, rawLabeledValues, convert2LabelValues, mergedShowCheckedStrategy, keyEntities]);\n var _useCache = useCache(displayValues),\n _useCache2 = _slicedToArray(_useCache, 1),\n cachedDisplayValues = _useCache2[0];\n\n // =========================== Change ===========================\n var triggerChange = useRefFunc(function (newRawValues, extra, source) {\n var labeledValues = convert2LabelValues(newRawValues);\n setInternalValue(labeledValues);\n\n // Clean up if needed\n if (autoClearSearchValue) {\n setSearchValue('');\n }\n\n // Generate rest parameters is costly, so only do it when necessary\n if (onChange) {\n var eventValues = newRawValues;\n if (treeConduction) {\n var formattedKeyList = formatStrategyValues(newRawValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);\n eventValues = formattedKeyList.map(function (key) {\n var entity = valueEntities.get(key);\n return entity ? entity.node[mergedFieldNames.value] : key;\n });\n }\n var _ref = extra || {\n triggerValue: undefined,\n selected: undefined\n },\n triggerValue = _ref.triggerValue,\n selected = _ref.selected;\n var returnRawValues = eventValues;\n\n // We need fill half check back\n if (treeCheckStrictly) {\n var halfValues = rawHalfLabeledValues.filter(function (item) {\n return !eventValues.includes(item.value);\n });\n returnRawValues = [].concat(_toConsumableArray(returnRawValues), _toConsumableArray(halfValues));\n }\n var returnLabeledValues = convert2LabelValues(returnRawValues);\n var additionalInfo = {\n // [Legacy] Always return as array contains label & value\n preValue: rawLabeledValues,\n triggerValue: triggerValue\n };\n\n // [Legacy] Fill legacy data if user query.\n // This is expansive that we only fill when user query\n // https://github.com/react-component/tree-select/blob/fe33eb7c27830c9ac70cd1fdb1ebbe7bc679c16a/src/Select.jsx\n var showPosition = true;\n if (treeCheckStrictly || source === 'selection' && !selected) {\n showPosition = false;\n }\n fillAdditionalInfo(additionalInfo, triggerValue, newRawValues, mergedTreeData, showPosition, mergedFieldNames);\n if (mergedCheckable) {\n additionalInfo.checked = selected;\n } else {\n additionalInfo.selected = selected;\n }\n var returnValues = mergedLabelInValue ? returnLabeledValues : returnLabeledValues.map(function (item) {\n return item.value;\n });\n onChange(mergedMultiple ? returnValues : returnValues[0], mergedLabelInValue ? null : returnLabeledValues.map(function (item) {\n return item.label;\n }), additionalInfo);\n }\n });\n\n // ========================== Options ===========================\n /** Trigger by option list */\n var onOptionSelect = React.useCallback(function (selectedKey, _ref2) {\n var _node$mergedFieldName;\n var selected = _ref2.selected,\n source = _ref2.source;\n var entity = keyEntities[selectedKey];\n var node = entity === null || entity === void 0 ? void 0 : entity.node;\n var selectedValue = (_node$mergedFieldName = node === null || node === void 0 ? void 0 : node[mergedFieldNames.value]) !== null && _node$mergedFieldName !== void 0 ? _node$mergedFieldName : selectedKey;\n\n // Never be falsy but keep it safe\n if (!mergedMultiple) {\n // Single mode always set value\n triggerChange([selectedValue], {\n selected: true,\n triggerValue: selectedValue\n }, 'option');\n } else {\n var newRawValues = selected ? [].concat(_toConsumableArray(rawValues), [selectedValue]) : rawCheckedValues.filter(function (v) {\n return v !== selectedValue;\n });\n\n // Add keys if tree conduction\n if (treeConduction) {\n // Should keep missing values\n var _splitRawValues = splitRawValues(newRawValues),\n missingRawValues = _splitRawValues.missingRawValues,\n existRawValues = _splitRawValues.existRawValues;\n var keyList = existRawValues.map(function (val) {\n return valueEntities.get(val).key;\n });\n\n // Conduction by selected or not\n var checkedKeys;\n if (selected) {\n var _conductCheck = conductCheck(keyList, true, keyEntities);\n checkedKeys = _conductCheck.checkedKeys;\n } else {\n var _conductCheck2 = conductCheck(keyList, {\n checked: false,\n halfCheckedKeys: rawHalfCheckedValues\n }, keyEntities);\n checkedKeys = _conductCheck2.checkedKeys;\n }\n\n // Fill back of keys\n newRawValues = [].concat(_toConsumableArray(missingRawValues), _toConsumableArray(checkedKeys.map(function (key) {\n return keyEntities[key].node[mergedFieldNames.value];\n })));\n }\n triggerChange(newRawValues, {\n selected: selected,\n triggerValue: selectedValue\n }, source || 'option');\n }\n\n // Trigger select event\n if (selected || !mergedMultiple) {\n onSelect === null || onSelect === void 0 || onSelect(selectedValue, fillLegacyProps(node));\n } else {\n onDeselect === null || onDeselect === void 0 || onDeselect(selectedValue, fillLegacyProps(node));\n }\n }, [splitRawValues, valueEntities, keyEntities, mergedFieldNames, mergedMultiple, rawValues, triggerChange, treeConduction, onSelect, onDeselect, rawCheckedValues, rawHalfCheckedValues]);\n\n // ========================== Dropdown ==========================\n var onInternalDropdownVisibleChange = React.useCallback(function (open) {\n if (onDropdownVisibleChange) {\n var legacyParam = {};\n Object.defineProperty(legacyParam, 'documentClickClose', {\n get: function get() {\n warning(false, 'Second param of `onDropdownVisibleChange` has been removed.');\n return false;\n }\n });\n onDropdownVisibleChange(open, legacyParam);\n }\n }, [onDropdownVisibleChange]);\n\n // ====================== Display Change ========================\n var onDisplayValuesChange = useRefFunc(function (newValues, info) {\n var newRawValues = newValues.map(function (item) {\n return item.value;\n });\n if (info.type === 'clear') {\n triggerChange(newRawValues, {}, 'selection');\n return;\n }\n\n // TreeSelect only have multiple mode which means display change only has remove\n if (info.values.length) {\n onOptionSelect(info.values[0].value, {\n selected: false,\n source: 'selection'\n });\n }\n });\n\n // ========================== Context ===========================\n var treeSelectContext = React.useMemo(function () {\n return {\n virtual: virtual,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n listHeight: listHeight,\n listItemHeight: listItemHeight,\n listItemScrollOffset: listItemScrollOffset,\n treeData: filteredTreeData,\n fieldNames: mergedFieldNames,\n onSelect: onOptionSelect,\n treeExpandAction: treeExpandAction,\n treeTitleRender: treeTitleRender,\n onPopupScroll: onPopupScroll\n };\n }, [virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, listItemScrollOffset, filteredTreeData, mergedFieldNames, onOptionSelect, treeExpandAction, treeTitleRender, onPopupScroll]);\n\n // ======================= Legacy Context =======================\n var legacyContext = React.useMemo(function () {\n return {\n checkable: mergedCheckable,\n loadData: loadData,\n treeLoadedKeys: treeLoadedKeys,\n onTreeLoad: onTreeLoad,\n checkedKeys: rawCheckedValues,\n halfCheckedKeys: rawHalfCheckedValues,\n treeDefaultExpandAll: treeDefaultExpandAll,\n treeExpandedKeys: treeExpandedKeys,\n treeDefaultExpandedKeys: treeDefaultExpandedKeys,\n onTreeExpand: onTreeExpand,\n treeIcon: treeIcon,\n treeMotion: treeMotion,\n showTreeIcon: showTreeIcon,\n switcherIcon: switcherIcon,\n treeLine: treeLine,\n treeNodeFilterProp: treeNodeFilterProp,\n keyEntities: keyEntities\n };\n }, [mergedCheckable, loadData, treeLoadedKeys, onTreeLoad, rawCheckedValues, rawHalfCheckedValues, treeDefaultExpandAll, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, treeIcon, treeMotion, showTreeIcon, switcherIcon, treeLine, treeNodeFilterProp, keyEntities]);\n\n // =========================== Render ===========================\n return /*#__PURE__*/React.createElement(TreeSelectContext.Provider, {\n value: treeSelectContext\n }, /*#__PURE__*/React.createElement(LegacyContext.Provider, {\n value: legacyContext\n }, /*#__PURE__*/React.createElement(BaseSelect, _extends({\n ref: ref\n }, restProps, {\n // >>> MISC\n id: mergedId,\n prefixCls: prefixCls,\n mode: mergedMultiple ? 'multiple' : undefined\n // >>> Display Value\n ,\n\n displayValues: cachedDisplayValues,\n onDisplayValuesChange: onDisplayValuesChange\n // >>> Search\n ,\n\n searchValue: mergedSearchValue,\n onSearch: onInternalSearch\n // >>> Options\n ,\n\n OptionList: OptionList,\n emptyOptions: !mergedTreeData.length,\n onDropdownVisibleChange: onInternalDropdownVisibleChange,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth\n }))));\n});\n\n// Assign name for Debug\nif (process.env.NODE_ENV !== 'production') {\n TreeSelect.displayName = 'TreeSelect';\n}\nvar GenericTreeSelect = TreeSelect;\nGenericTreeSelect.TreeNode = TreeNode;\nGenericTreeSelect.SHOW_ALL = SHOW_ALL;\nGenericTreeSelect.SHOW_PARENT = SHOW_PARENT;\nGenericTreeSelect.SHOW_CHILD = SHOW_CHILD;\nexport default GenericTreeSelect;","map":{"version":3,"names":["_extends","_toConsumableArray","_objectSpread","_slicedToArray","_objectWithoutProperties","_typeof","_excluded","BaseSelect","useId","conductCheck","useMergedState","warning","React","useCache","useCheckedKeys","useDataEntities","useFilterTreeData","useRefFunc","useTreeData","LegacyContext","OptionList","TreeNode","TreeSelectContext","fillAdditionalInfo","fillLegacyProps","formatStrategyValues","SHOW_ALL","SHOW_CHILD","SHOW_PARENT","fillFieldNames","isNil","toArray","warningProps","isRawValue","value","TreeSelect","forwardRef","props","ref","id","_props$prefixCls","prefixCls","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","_props$autoClearSearc","autoClearSearchValue","filterTreeNode","_props$treeNodeFilter","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","_props$listHeight","listHeight","_props$listItemHeight","listItemHeight","_props$listItemScroll","listItemScrollOffset","onDropdownVisibleChange","_props$dropdownMatchS","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender","onPopupScroll","restProps","mergedId","treeConduction","mergedCheckable","mergedLabelInValue","mergedMultiple","_useMergedState","_useMergedState2","internalValue","setInternalValue","mergedShowCheckedStrategy","useMemo","process","env","NODE_ENV","mergedFieldNames","JSON","stringify","_useMergedState3","undefined","postState","search","_useMergedState4","mergedSearchValue","setSearchValue","onInternalSearch","searchText","mergedTreeData","_useDataEntities","keyEntities","valueEntities","splitRawValues","useCallback","newRawValues","missingRawValues","existRawValues","forEach","val","has","push","filteredTreeData","getLabel","item","titleList","_title","i","length","title","toLabeledValues","draftValues","values","map","convert2LabelValues","rawLabel","label","rawValue","rawHalfChecked","halfChecked","rawDisabled","entity","get","_rawLabel","node","disabled","labelInValueItem","find","labeledItem","rawMixedLabeledValues","_React$useMemo","fullCheckValues","halfCheckValues","_React$useMemo2","rawLabeledValues","rawHalfLabeledValues","rawValues","_useCheckedKeys","_useCheckedKeys2","rawCheckedValues","rawHalfCheckedValues","displayValues","displayKeys","key","_keyEntities$key$node","_keyEntities$key","labeledValues","targetItem","rawDisplayValues","firstVal","_item$label","_useCache","_useCache2","cachedDisplayValues","triggerChange","extra","source","eventValues","formattedKeyList","_ref","triggerValue","selected","returnRawValues","halfValues","filter","includes","concat","returnLabeledValues","additionalInfo","preValue","showPosition","checked","returnValues","onOptionSelect","selectedKey","_ref2","_node$mergedFieldName","selectedValue","v","_splitRawValues","keyList","checkedKeys","_conductCheck","_conductCheck2","halfCheckedKeys","onInternalDropdownVisibleChange","open","legacyParam","Object","defineProperty","onDisplayValuesChange","newValues","info","type","treeSelectContext","legacyContext","checkable","createElement","Provider","mode","emptyOptions","displayName","GenericTreeSelect"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-tree-select/es/TreeSelect.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\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\", \"prefixCls\", \"value\", \"defaultValue\", \"onChange\", \"onSelect\", \"onDeselect\", \"searchValue\", \"inputValue\", \"onSearch\", \"autoClearSearchValue\", \"filterTreeNode\", \"treeNodeFilterProp\", \"showCheckedStrategy\", \"treeNodeLabelProp\", \"multiple\", \"treeCheckable\", \"treeCheckStrictly\", \"labelInValue\", \"fieldNames\", \"treeDataSimpleMode\", \"treeData\", \"children\", \"loadData\", \"treeLoadedKeys\", \"onTreeLoad\", \"treeDefaultExpandAll\", \"treeExpandedKeys\", \"treeDefaultExpandedKeys\", \"onTreeExpand\", \"treeExpandAction\", \"virtual\", \"listHeight\", \"listItemHeight\", \"listItemScrollOffset\", \"onDropdownVisibleChange\", \"dropdownMatchSelectWidth\", \"treeLine\", \"treeIcon\", \"showTreeIcon\", \"switcherIcon\", \"treeMotion\", \"treeTitleRender\", \"onPopupScroll\"];\nimport { BaseSelect } from 'rc-select';\nimport useId from \"rc-select/es/hooks/useId\";\nimport { conductCheck } from \"rc-tree/es/utils/conductUtil\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport useCache from \"./hooks/useCache\";\nimport useCheckedKeys from \"./hooks/useCheckedKeys\";\nimport useDataEntities from \"./hooks/useDataEntities\";\nimport useFilterTreeData from \"./hooks/useFilterTreeData\";\nimport useRefFunc from \"./hooks/useRefFunc\";\nimport useTreeData from \"./hooks/useTreeData\";\nimport LegacyContext from \"./LegacyContext\";\nimport OptionList from \"./OptionList\";\nimport TreeNode from \"./TreeNode\";\nimport TreeSelectContext from \"./TreeSelectContext\";\nimport { fillAdditionalInfo, fillLegacyProps } from \"./utils/legacyUtil\";\nimport { formatStrategyValues, SHOW_ALL, SHOW_CHILD, SHOW_PARENT } from \"./utils/strategyUtil\";\nimport { fillFieldNames, isNil, toArray } from \"./utils/valueUtil\";\nimport warningProps from \"./utils/warningPropsUtil\";\n\n/** @deprecated This is only used for legacy compatible. Not works on new code. */\n\nfunction isRawValue(value) {\n return !value || _typeof(value) !== 'object';\n}\nvar TreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-tree-select' : _props$prefixCls,\n value = props.value,\n defaultValue = props.defaultValue,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n searchValue = props.searchValue,\n inputValue = props.inputValue,\n onSearch = props.onSearch,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n filterTreeNode = props.filterTreeNode,\n _props$treeNodeFilter = props.treeNodeFilterProp,\n treeNodeFilterProp = _props$treeNodeFilter === void 0 ? 'value' : _props$treeNodeFilter,\n showCheckedStrategy = props.showCheckedStrategy,\n treeNodeLabelProp = props.treeNodeLabelProp,\n multiple = props.multiple,\n treeCheckable = props.treeCheckable,\n treeCheckStrictly = props.treeCheckStrictly,\n labelInValue = props.labelInValue,\n fieldNames = props.fieldNames,\n treeDataSimpleMode = props.treeDataSimpleMode,\n treeData = props.treeData,\n children = props.children,\n loadData = props.loadData,\n treeLoadedKeys = props.treeLoadedKeys,\n onTreeLoad = props.onTreeLoad,\n treeDefaultExpandAll = props.treeDefaultExpandAll,\n treeExpandedKeys = props.treeExpandedKeys,\n treeDefaultExpandedKeys = props.treeDefaultExpandedKeys,\n onTreeExpand = props.onTreeExpand,\n treeExpandAction = props.treeExpandAction,\n virtual = props.virtual,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n _props$listItemScroll = props.listItemScrollOffset,\n listItemScrollOffset = _props$listItemScroll === void 0 ? 0 : _props$listItemScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,\n treeLine = props.treeLine,\n treeIcon = props.treeIcon,\n showTreeIcon = props.showTreeIcon,\n switcherIcon = props.switcherIcon,\n treeMotion = props.treeMotion,\n treeTitleRender = props.treeTitleRender,\n onPopupScroll = props.onPopupScroll,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedId = useId(id);\n var treeConduction = treeCheckable && !treeCheckStrictly;\n var mergedCheckable = treeCheckable || treeCheckStrictly;\n var mergedLabelInValue = treeCheckStrictly || labelInValue;\n var mergedMultiple = mergedCheckable || multiple;\n var _useMergedState = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n internalValue = _useMergedState2[0],\n setInternalValue = _useMergedState2[1];\n\n // `multiple` && `!treeCheckable` should be show all\n var mergedShowCheckedStrategy = React.useMemo(function () {\n if (!treeCheckable) {\n return SHOW_ALL;\n }\n return showCheckedStrategy || SHOW_CHILD;\n }, [showCheckedStrategy, treeCheckable]);\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n }\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 // =========================== Search ===========================\n var _useMergedState3 = useMergedState('', {\n value: searchValue !== undefined ? searchValue : inputValue,\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) {\n setSearchValue(searchText);\n onSearch === null || onSearch === void 0 || onSearch(searchText);\n };\n\n // ============================ Data ============================\n // `useTreeData` only do convert of `children` or `simpleMode`.\n // Else will return origin `treeData` for perf consideration.\n // Do not do anything to loop the data.\n var mergedTreeData = useTreeData(treeData, children, treeDataSimpleMode);\n var _useDataEntities = useDataEntities(mergedTreeData, mergedFieldNames),\n keyEntities = _useDataEntities.keyEntities,\n valueEntities = _useDataEntities.valueEntities;\n\n /** Get `missingRawValues` which not exist in the tree yet */\n var splitRawValues = React.useCallback(function (newRawValues) {\n var missingRawValues = [];\n var existRawValues = [];\n\n // Keep missing value in the cache\n newRawValues.forEach(function (val) {\n if (valueEntities.has(val)) {\n existRawValues.push(val);\n } else {\n missingRawValues.push(val);\n }\n });\n return {\n missingRawValues: missingRawValues,\n existRawValues: existRawValues\n };\n }, [valueEntities]);\n\n // Filtered Tree\n var filteredTreeData = useFilterTreeData(mergedTreeData, mergedSearchValue, {\n fieldNames: mergedFieldNames,\n treeNodeFilterProp: treeNodeFilterProp,\n filterTreeNode: filterTreeNode\n });\n\n // =========================== Label ============================\n var getLabel = React.useCallback(function (item) {\n if (item) {\n if (treeNodeLabelProp) {\n return item[treeNodeLabelProp];\n }\n\n // Loop from fieldNames\n var titleList = mergedFieldNames._title;\n for (var i = 0; i < titleList.length; i += 1) {\n var title = item[titleList[i]];\n if (title !== undefined) {\n return title;\n }\n }\n }\n }, [mergedFieldNames, treeNodeLabelProp]);\n\n // ========================= Wrap Value =========================\n var toLabeledValues = React.useCallback(function (draftValues) {\n var values = toArray(draftValues);\n return values.map(function (val) {\n if (isRawValue(val)) {\n return {\n value: val\n };\n }\n return val;\n });\n }, []);\n var convert2LabelValues = React.useCallback(function (draftValues) {\n var values = toLabeledValues(draftValues);\n return values.map(function (item) {\n var rawLabel = item.label;\n var rawValue = item.value,\n rawHalfChecked = item.halfChecked;\n var rawDisabled;\n var entity = valueEntities.get(rawValue);\n\n // Fill missing label & status\n if (entity) {\n var _rawLabel;\n rawLabel = treeTitleRender ? treeTitleRender(entity.node) : (_rawLabel = rawLabel) !== null && _rawLabel !== void 0 ? _rawLabel : getLabel(entity.node);\n rawDisabled = entity.node.disabled;\n } else if (rawLabel === undefined) {\n // We try to find in current `labelInValue` value\n var labelInValueItem = toLabeledValues(internalValue).find(function (labeledItem) {\n return labeledItem.value === rawValue;\n });\n rawLabel = labelInValueItem.label;\n }\n return {\n label: rawLabel,\n value: rawValue,\n halfChecked: rawHalfChecked,\n disabled: rawDisabled\n };\n });\n }, [valueEntities, getLabel, toLabeledValues, internalValue]);\n\n // =========================== Values ===========================\n var rawMixedLabeledValues = React.useMemo(function () {\n return toLabeledValues(internalValue);\n }, [toLabeledValues, internalValue]);\n\n // Split value into full check and half check\n var _React$useMemo = React.useMemo(function () {\n var fullCheckValues = [];\n var halfCheckValues = [];\n rawMixedLabeledValues.forEach(function (item) {\n if (item.halfChecked) {\n halfCheckValues.push(item);\n } else {\n fullCheckValues.push(item);\n }\n });\n return [fullCheckValues, halfCheckValues];\n }, [rawMixedLabeledValues]),\n _React$useMemo2 = _slicedToArray(_React$useMemo, 2),\n rawLabeledValues = _React$useMemo2[0],\n rawHalfLabeledValues = _React$useMemo2[1];\n\n // const [mergedValues] = useCache(rawLabeledValues);\n var rawValues = React.useMemo(function () {\n return rawLabeledValues.map(function (item) {\n return item.value;\n });\n }, [rawLabeledValues]);\n\n // Convert value to key. Will fill missed keys for conduct check.\n var _useCheckedKeys = useCheckedKeys(rawLabeledValues, rawHalfLabeledValues, treeConduction, keyEntities),\n _useCheckedKeys2 = _slicedToArray(_useCheckedKeys, 2),\n rawCheckedValues = _useCheckedKeys2[0],\n rawHalfCheckedValues = _useCheckedKeys2[1];\n\n // Convert rawCheckedKeys to check strategy related values\n var displayValues = React.useMemo(function () {\n // Collect keys which need to show\n var displayKeys = formatStrategyValues(rawCheckedValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);\n\n // Convert to value and filled with label\n var values = displayKeys.map(function (key) {\n var _keyEntities$key$node, _keyEntities$key;\n return (_keyEntities$key$node = (_keyEntities$key = keyEntities[key]) === null || _keyEntities$key === void 0 || (_keyEntities$key = _keyEntities$key.node) === null || _keyEntities$key === void 0 ? void 0 : _keyEntities$key[mergedFieldNames.value]) !== null && _keyEntities$key$node !== void 0 ? _keyEntities$key$node : key;\n });\n\n // Back fill with origin label\n var labeledValues = values.map(function (val) {\n var targetItem = rawLabeledValues.find(function (item) {\n return item.value === val;\n });\n var label;\n // Ensure that when labelInValue is true, if label is undefined, it remains undefined.\n if (labelInValue && targetItem.label !== undefined) {\n label = targetItem.label;\n } else if (!labelInValue && treeTitleRender) {\n label = treeTitleRender(targetItem);\n }\n return {\n value: val,\n label: label\n };\n });\n var rawDisplayValues = convert2LabelValues(labeledValues);\n var firstVal = rawDisplayValues[0];\n if (!mergedMultiple && firstVal && isNil(firstVal.value) && isNil(firstVal.label)) {\n return [];\n }\n return rawDisplayValues.map(function (item) {\n var _item$label;\n return _objectSpread(_objectSpread({}, item), {}, {\n label: (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : item.value\n });\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [mergedFieldNames, mergedMultiple, rawCheckedValues, rawLabeledValues, convert2LabelValues, mergedShowCheckedStrategy, keyEntities]);\n var _useCache = useCache(displayValues),\n _useCache2 = _slicedToArray(_useCache, 1),\n cachedDisplayValues = _useCache2[0];\n\n // =========================== Change ===========================\n var triggerChange = useRefFunc(function (newRawValues, extra, source) {\n var labeledValues = convert2LabelValues(newRawValues);\n setInternalValue(labeledValues);\n\n // Clean up if needed\n if (autoClearSearchValue) {\n setSearchValue('');\n }\n\n // Generate rest parameters is costly, so only do it when necessary\n if (onChange) {\n var eventValues = newRawValues;\n if (treeConduction) {\n var formattedKeyList = formatStrategyValues(newRawValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);\n eventValues = formattedKeyList.map(function (key) {\n var entity = valueEntities.get(key);\n return entity ? entity.node[mergedFieldNames.value] : key;\n });\n }\n var _ref = extra || {\n triggerValue: undefined,\n selected: undefined\n },\n triggerValue = _ref.triggerValue,\n selected = _ref.selected;\n var returnRawValues = eventValues;\n\n // We need fill half check back\n if (treeCheckStrictly) {\n var halfValues = rawHalfLabeledValues.filter(function (item) {\n return !eventValues.includes(item.value);\n });\n returnRawValues = [].concat(_toConsumableArray(returnRawValues), _toConsumableArray(halfValues));\n }\n var returnLabeledValues = convert2LabelValues(returnRawValues);\n var additionalInfo = {\n // [Legacy] Always return as array contains label & value\n preValue: rawLabeledValues,\n triggerValue: triggerValue\n };\n\n // [Legacy] Fill legacy data if user query.\n // This is expansive that we only fill when user query\n // https://github.com/react-component/tree-select/blob/fe33eb7c27830c9ac70cd1fdb1ebbe7bc679c16a/src/Select.jsx\n var showPosition = true;\n if (treeCheckStrictly || source === 'selection' && !selected) {\n showPosition = false;\n }\n fillAdditionalInfo(additionalInfo, triggerValue, newRawValues, mergedTreeData, showPosition, mergedFieldNames);\n if (mergedCheckable) {\n additionalInfo.checked = selected;\n } else {\n additionalInfo.selected = selected;\n }\n var returnValues = mergedLabelInValue ? returnLabeledValues : returnLabeledValues.map(function (item) {\n return item.value;\n });\n onChange(mergedMultiple ? returnValues : returnValues[0], mergedLabelInValue ? null : returnLabeledValues.map(function (item) {\n return item.label;\n }), additionalInfo);\n }\n });\n\n // ========================== Options ===========================\n /** Trigger by option list */\n var onOptionSelect = React.useCallback(function (selectedKey, _ref2) {\n var _node$mergedFieldName;\n var selected = _ref2.selected,\n source = _ref2.source;\n var entity = keyEntities[selectedKey];\n var node = entity === null || entity === void 0 ? void 0 : entity.node;\n var selectedValue = (_node$mergedFieldName = node === null || node === void 0 ? void 0 : node[mergedFieldNames.value]) !== null && _node$mergedFieldName !== void 0 ? _node$mergedFieldName : selectedKey;\n\n // Never be falsy but keep it safe\n if (!mergedMultiple) {\n // Single mode always set value\n triggerChange([selectedValue], {\n selected: true,\n triggerValue: selectedValue\n }, 'option');\n } else {\n var newRawValues = selected ? [].concat(_toConsumableArray(rawValues), [selectedValue]) : rawCheckedValues.filter(function (v) {\n return v !== selectedValue;\n });\n\n // Add keys if tree conduction\n if (treeConduction) {\n // Should keep missing values\n var _splitRawValues = splitRawValues(newRawValues),\n missingRawValues = _splitRawValues.missingRawValues,\n existRawValues = _splitRawValues.existRawValues;\n var keyList = existRawValues.map(function (val) {\n return valueEntities.get(val).key;\n });\n\n // Conduction by selected or not\n var checkedKeys;\n if (selected) {\n var _conductCheck = conductCheck(keyList, true, keyEntities);\n checkedKeys = _conductCheck.checkedKeys;\n } else {\n var _conductCheck2 = conductCheck(keyList, {\n checked: false,\n halfCheckedKeys: rawHalfCheckedValues\n }, keyEntities);\n checkedKeys = _conductCheck2.checkedKeys;\n }\n\n // Fill back of keys\n newRawValues = [].concat(_toConsumableArray(missingRawValues), _toConsumableArray(checkedKeys.map(function (key) {\n return keyEntities[key].node[mergedFieldNames.value];\n })));\n }\n triggerChange(newRawValues, {\n selected: selected,\n triggerValue: selectedValue\n }, source || 'option');\n }\n\n // Trigger select event\n if (selected || !mergedMultiple) {\n onSelect === null || onSelect === void 0 || onSelect(selectedValue, fillLegacyProps(node));\n } else {\n onDeselect === null || onDeselect === void 0 || onDeselect(selectedValue, fillLegacyProps(node));\n }\n }, [splitRawValues, valueEntities, keyEntities, mergedFieldNames, mergedMultiple, rawValues, triggerChange, treeConduction, onSelect, onDeselect, rawCheckedValues, rawHalfCheckedValues]);\n\n // ========================== Dropdown ==========================\n var onInternalDropdownVisibleChange = React.useCallback(function (open) {\n if (onDropdownVisibleChange) {\n var legacyParam = {};\n Object.defineProperty(legacyParam, 'documentClickClose', {\n get: function get() {\n warning(false, 'Second param of `onDropdownVisibleChange` has been removed.');\n return false;\n }\n });\n onDropdownVisibleChange(open, legacyParam);\n }\n }, [onDropdownVisibleChange]);\n\n // ====================== Display Change ========================\n var onDisplayValuesChange = useRefFunc(function (newValues, info) {\n var newRawValues = newValues.map(function (item) {\n return item.value;\n });\n if (info.type === 'clear') {\n triggerChange(newRawValues, {}, 'selection');\n return;\n }\n\n // TreeSelect only have multiple mode which means display change only has remove\n if (info.values.length) {\n onOptionSelect(info.values[0].value, {\n selected: false,\n source: 'selection'\n });\n }\n });\n\n // ========================== Context ===========================\n var treeSelectContext = React.useMemo(function () {\n return {\n virtual: virtual,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n listHeight: listHeight,\n listItemHeight: listItemHeight,\n listItemScrollOffset: listItemScrollOffset,\n treeData: filteredTreeData,\n fieldNames: mergedFieldNames,\n onSelect: onOptionSelect,\n treeExpandAction: treeExpandAction,\n treeTitleRender: treeTitleRender,\n onPopupScroll: onPopupScroll\n };\n }, [virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, listItemScrollOffset, filteredTreeData, mergedFieldNames, onOptionSelect, treeExpandAction, treeTitleRender, onPopupScroll]);\n\n // ======================= Legacy Context =======================\n var legacyContext = React.useMemo(function () {\n return {\n checkable: mergedCheckable,\n loadData: loadData,\n treeLoadedKeys: treeLoadedKeys,\n onTreeLoad: onTreeLoad,\n checkedKeys: rawCheckedValues,\n halfCheckedKeys: rawHalfCheckedValues,\n treeDefaultExpandAll: treeDefaultExpandAll,\n treeExpandedKeys: treeExpandedKeys,\n treeDefaultExpandedKeys: treeDefaultExpandedKeys,\n onTreeExpand: onTreeExpand,\n treeIcon: treeIcon,\n treeMotion: treeMotion,\n showTreeIcon: showTreeIcon,\n switcherIcon: switcherIcon,\n treeLine: treeLine,\n treeNodeFilterProp: treeNodeFilterProp,\n keyEntities: keyEntities\n };\n }, [mergedCheckable, loadData, treeLoadedKeys, onTreeLoad, rawCheckedValues, rawHalfCheckedValues, treeDefaultExpandAll, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, treeIcon, treeMotion, showTreeIcon, switcherIcon, treeLine, treeNodeFilterProp, keyEntities]);\n\n // =========================== Render ===========================\n return /*#__PURE__*/React.createElement(TreeSelectContext.Provider, {\n value: treeSelectContext\n }, /*#__PURE__*/React.createElement(LegacyContext.Provider, {\n value: legacyContext\n }, /*#__PURE__*/React.createElement(BaseSelect, _extends({\n ref: ref\n }, restProps, {\n // >>> MISC\n id: mergedId,\n prefixCls: prefixCls,\n mode: mergedMultiple ? 'multiple' : undefined\n // >>> Display Value\n ,\n displayValues: cachedDisplayValues,\n onDisplayValuesChange: onDisplayValuesChange\n // >>> Search\n ,\n searchValue: mergedSearchValue,\n onSearch: onInternalSearch\n // >>> Options\n ,\n OptionList: OptionList,\n emptyOptions: !mergedTreeData.length,\n onDropdownVisibleChange: onInternalDropdownVisibleChange,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth\n }))));\n});\n\n// Assign name for Debug\nif (process.env.NODE_ENV !== 'production') {\n TreeSelect.displayName = 'TreeSelect';\n}\nvar GenericTreeSelect = TreeSelect;\nGenericTreeSelect.TreeNode = TreeNode;\nGenericTreeSelect.SHOW_ALL = SHOW_ALL;\nGenericTreeSelect.SHOW_PARENT = SHOW_PARENT;\nGenericTreeSelect.SHOW_CHILD = SHOW_CHILD;\nexport default GenericTreeSelect;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,O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