1 |
- {"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useBaseProps } from 'rc-select';\nimport Tree from 'rc-tree';\nimport { UnstableContext } from 'rc-tree';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport * as React from 'react';\nimport LegacyContext from \"./LegacyContext\";\nimport TreeSelectContext from \"./TreeSelectContext\";\nimport { getAllKeys, isCheckDisabled } from \"./utils/valueUtil\";\nimport { useEvent } from 'rc-util';\nvar HIDDEN_STYLE = {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0,\n border: 0,\n padding: 0,\n margin: 0\n};\nvar OptionList = function OptionList(_, ref) {\n var _useBaseProps = useBaseProps(),\n prefixCls = _useBaseProps.prefixCls,\n multiple = _useBaseProps.multiple,\n searchValue = _useBaseProps.searchValue,\n toggleOpen = _useBaseProps.toggleOpen,\n open = _useBaseProps.open,\n notFoundContent = _useBaseProps.notFoundContent;\n var _React$useContext = React.useContext(TreeSelectContext),\n virtual = _React$useContext.virtual,\n listHeight = _React$useContext.listHeight,\n listItemHeight = _React$useContext.listItemHeight,\n listItemScrollOffset = _React$useContext.listItemScrollOffset,\n treeData = _React$useContext.treeData,\n fieldNames = _React$useContext.fieldNames,\n onSelect = _React$useContext.onSelect,\n dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth,\n treeExpandAction = _React$useContext.treeExpandAction,\n treeTitleRender = _React$useContext.treeTitleRender,\n onPopupScroll = _React$useContext.onPopupScroll,\n leftMaxCount = _React$useContext.leftMaxCount,\n leafCountOnly = _React$useContext.leafCountOnly,\n valueEntities = _React$useContext.valueEntities;\n var _React$useContext2 = React.useContext(LegacyContext),\n checkable = _React$useContext2.checkable,\n checkedKeys = _React$useContext2.checkedKeys,\n halfCheckedKeys = _React$useContext2.halfCheckedKeys,\n treeExpandedKeys = _React$useContext2.treeExpandedKeys,\n treeDefaultExpandAll = _React$useContext2.treeDefaultExpandAll,\n treeDefaultExpandedKeys = _React$useContext2.treeDefaultExpandedKeys,\n onTreeExpand = _React$useContext2.onTreeExpand,\n treeIcon = _React$useContext2.treeIcon,\n showTreeIcon = _React$useContext2.showTreeIcon,\n switcherIcon = _React$useContext2.switcherIcon,\n treeLine = _React$useContext2.treeLine,\n treeNodeFilterProp = _React$useContext2.treeNodeFilterProp,\n loadData = _React$useContext2.loadData,\n treeLoadedKeys = _React$useContext2.treeLoadedKeys,\n treeMotion = _React$useContext2.treeMotion,\n onTreeLoad = _React$useContext2.onTreeLoad,\n keyEntities = _React$useContext2.keyEntities;\n var treeRef = React.useRef();\n var memoTreeData = useMemo(function () {\n return treeData;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [open, treeData], function (prev, next) {\n return next[0] && prev[1] !== next[1];\n });\n\n // ========================== Values ==========================\n var mergedCheckedKeys = React.useMemo(function () {\n if (!checkable) {\n return null;\n }\n return {\n checked: checkedKeys,\n halfChecked: halfCheckedKeys\n };\n }, [checkable, checkedKeys, halfCheckedKeys]);\n\n // ========================== Scroll ==========================\n React.useEffect(function () {\n // Single mode should scroll to current key\n if (open && !multiple && checkedKeys.length) {\n var _treeRef$current;\n (_treeRef$current = treeRef.current) === null || _treeRef$current === void 0 || _treeRef$current.scrollTo({\n key: checkedKeys[0]\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n // ========================== Events ==========================\n var onListMouseDown = function onListMouseDown(event) {\n event.preventDefault();\n };\n var onInternalSelect = function onInternalSelect(__, info) {\n var node = info.node;\n if (checkable && isCheckDisabled(node)) {\n return;\n }\n onSelect(node.key, {\n selected: !checkedKeys.includes(node.key)\n });\n if (!multiple) {\n toggleOpen(false);\n }\n };\n\n // =========================== Keys ===========================\n var _React$useState = React.useState(treeDefaultExpandedKeys),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n expandedKeys = _React$useState2[0],\n setExpandedKeys = _React$useState2[1];\n var _React$useState3 = React.useState(null),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n searchExpandedKeys = _React$useState4[0],\n setSearchExpandedKeys = _React$useState4[1];\n var mergedExpandedKeys = React.useMemo(function () {\n if (treeExpandedKeys) {\n return _toConsumableArray(treeExpandedKeys);\n }\n return searchValue ? searchExpandedKeys : expandedKeys;\n }, [expandedKeys, searchExpandedKeys, treeExpandedKeys, searchValue]);\n var onInternalExpand = function onInternalExpand(keys) {\n setExpandedKeys(keys);\n setSearchExpandedKeys(keys);\n if (onTreeExpand) {\n onTreeExpand(keys);\n }\n };\n\n // ========================== Search ==========================\n var lowerSearchValue = String(searchValue).toLowerCase();\n var filterTreeNode = function filterTreeNode(treeNode) {\n if (!lowerSearchValue) {\n return false;\n }\n return String(treeNode[treeNodeFilterProp]).toLowerCase().includes(lowerSearchValue);\n };\n React.useEffect(function () {\n if (searchValue) {\n setSearchExpandedKeys(getAllKeys(treeData, fieldNames));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchValue]);\n\n // ========================= Disabled =========================\n // Cache disabled states in React state to ensure re-render when cache updates\n var _React$useState5 = React.useState(function () {\n return new Map();\n }),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n disabledCache = _React$useState6[0],\n setDisabledCache = _React$useState6[1];\n React.useEffect(function () {\n if (leftMaxCount) {\n setDisabledCache(new Map());\n }\n }, [leftMaxCount]);\n function getDisabledWithCache(node) {\n var value = node[fieldNames.value];\n if (!disabledCache.has(value)) {\n var entity = valueEntities.get(value);\n var isLeaf = (entity.children || []).length === 0;\n if (!isLeaf) {\n var checkableChildren = entity.children.filter(function (childTreeNode) {\n return !childTreeNode.node.disabled && !childTreeNode.node.disableCheckbox && !checkedKeys.includes(childTreeNode.node[fieldNames.value]);\n });\n var checkableChildrenCount = checkableChildren.length;\n disabledCache.set(value, checkableChildrenCount > leftMaxCount);\n } else {\n disabledCache.set(value, false);\n }\n }\n return disabledCache.get(value);\n }\n var nodeDisabled = useEvent(function (node) {\n var nodeValue = node[fieldNames.value];\n if (checkedKeys.includes(nodeValue)) {\n return false;\n }\n if (leftMaxCount === null) {\n return false;\n }\n if (leftMaxCount <= 0) {\n return true;\n }\n\n // This is a low performance calculation\n if (leafCountOnly && leftMaxCount) {\n return getDisabledWithCache(node);\n }\n return false;\n });\n\n // ========================== Get First Selectable Node ==========================\n var getFirstMatchingNode = function getFirstMatchingNode(nodes) {\n var _iterator = _createForOfIteratorHelper(nodes),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var node = _step.value;\n if (node.disabled || node.selectable === false) {\n continue;\n }\n if (searchValue) {\n if (filterTreeNode(node)) {\n return node;\n }\n } else {\n return node;\n }\n if (node[fieldNames.children]) {\n var matchInChildren = getFirstMatchingNode(node[fieldNames.children]);\n if (matchInChildren) {\n return matchInChildren;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return null;\n };\n\n // ========================== Active ==========================\n var _React$useState7 = React.useState(null),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n activeKey = _React$useState8[0],\n setActiveKey = _React$useState8[1];\n var activeEntity = keyEntities[activeKey];\n React.useEffect(function () {\n if (!open) {\n return;\n }\n var nextActiveKey = null;\n var getFirstNode = function getFirstNode() {\n var firstNode = getFirstMatchingNode(memoTreeData);\n return firstNode ? firstNode[fieldNames.value] : null;\n };\n\n // single mode active first checked node\n if (!multiple && checkedKeys.length && !searchValue) {\n nextActiveKey = checkedKeys[0];\n } else {\n nextActiveKey = getFirstNode();\n }\n setActiveKey(nextActiveKey);\n }, [open, searchValue]);\n\n // ========================= Keyboard =========================\n React.useImperativeHandle(ref, function () {\n var _treeRef$current2;\n return {\n scrollTo: (_treeRef$current2 = treeRef.current) === null || _treeRef$current2 === void 0 ? void 0 : _treeRef$current2.scrollTo,\n onKeyDown: function onKeyDown(event) {\n var _treeRef$current3;\n var which = event.which;\n switch (which) {\n // >>> Arrow keys\n case KeyCode.UP:\n case KeyCode.DOWN:\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n (_treeRef$current3 = treeRef.current) === null || _treeRef$current3 === void 0 || _treeRef$current3.onKeyDown(event);\n break;\n\n // >>> Select item\n case KeyCode.ENTER:\n {\n if (activeEntity) {\n var isNodeDisabled = nodeDisabled(activeEntity.node);\n var _ref = (activeEntity === null || activeEntity === void 0 ? void 0 : activeEntity.node) || {},\n selectable = _ref.selectable,\n value = _ref.value,\n disabled = _ref.disabled;\n if (selectable !== false && !disabled && !isNodeDisabled) {\n onInternalSelect(null, {\n node: {\n key: activeKey\n },\n selected: !checkedKeys.includes(value)\n });\n }\n }\n break;\n }\n\n // >>> Close\n case KeyCode.ESC:\n {\n toggleOpen(false);\n }\n }\n },\n onKeyUp: function onKeyUp() {}\n };\n });\n var hasLoadDataFn = useMemo(function () {\n return searchValue ? false : true;\n }, [searchValue, treeExpandedKeys || expandedKeys], function (_ref2, _ref3) {\n var _ref4 = _slicedToArray(_ref2, 1),\n preSearchValue = _ref4[0];\n var _ref5 = _slicedToArray(_ref3, 2),\n nextSearchValue = _ref5[0],\n nextExcludeSearchExpandedKeys = _ref5[1];\n return preSearchValue !== nextSearchValue && !!(nextSearchValue || nextExcludeSearchExpandedKeys);\n });\n var syncLoadData = hasLoadDataFn ? loadData : null;\n\n // ========================== Render ==========================\n if (memoTreeData.length === 0) {\n return /*#__PURE__*/React.createElement(\"div\", {\n role: \"listbox\",\n className: \"\".concat(prefixCls, \"-empty\"),\n onMouseDown: onListMouseDown\n }, notFoundContent);\n }\n var treeProps = {\n fieldNames: fieldNames\n };\n if (treeLoadedKeys) {\n treeProps.loadedKeys = treeLoadedKeys;\n }\n if (mergedExpandedKeys) {\n treeProps.expandedKeys = mergedExpandedKeys;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n onMouseDown: onListMouseDown\n }, activeEntity && open && /*#__PURE__*/React.createElement(\"span\", {\n style: HIDDEN_STYLE,\n \"aria-live\": \"assertive\"\n }, activeEntity.node.value), /*#__PURE__*/React.createElement(UnstableContext.Provider, {\n value: {\n nodeDisabled: nodeDisabled\n }\n }, /*#__PURE__*/React.createElement(Tree, _extends({\n ref: treeRef,\n focusable: false,\n prefixCls: \"\".concat(prefixCls, \"-tree\"),\n treeData: memoTreeData,\n height: listHeight,\n itemHeight: listItemHeight,\n itemScrollOffset: listItemScrollOffset,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false,\n multiple: multiple,\n icon: treeIcon,\n showIcon: showTreeIcon,\n switcherIcon: switcherIcon,\n showLine: treeLine,\n loadData: syncLoadData,\n motion: treeMotion,\n activeKey: activeKey\n // We handle keys by out instead tree self\n ,\n\n checkable: checkable,\n checkStrictly: true,\n checkedKeys: mergedCheckedKeys,\n selectedKeys: !checkable ? checkedKeys : [],\n defaultExpandAll: treeDefaultExpandAll,\n titleRender: treeTitleRender\n }, treeProps, {\n // Proxy event out\n onActiveChange: setActiveKey,\n onSelect: onInternalSelect,\n onCheck: onInternalSelect,\n onExpand: onInternalExpand,\n onLoad: onTreeLoad,\n filterTreeNode: filterTreeNode,\n expandAction: treeExpandAction,\n onScroll: onPopupScroll\n }))));\n};\nvar RefOptionList = /*#__PURE__*/React.forwardRef(OptionList);\nif (process.env.NODE_ENV !== 'production') {\n RefOptionList.displayName = 'OptionList';\n}\nexport default RefOptionList;","map":{"version":3,"names":["_extends","_createForOfIteratorHelper","_toConsumableArray","_slicedToArray","useBaseProps","Tree","UnstableContext","KeyCode","useMemo","React","LegacyContext","TreeSelectContext","getAllKeys","isCheckDisabled","useEvent","HIDDEN_STYLE","width","height","display","overflow","opacity","border","padding","margin","OptionList","_","ref","_useBaseProps","prefixCls","multiple","searchValue","toggleOpen","open","notFoundContent","_React$useContext","useContext","virtual","listHeight","listItemHeight","listItemScrollOffset","treeData","fieldNames","onSelect","dropdownMatchSelectWidth","treeExpandAction","treeTitleRender","onPopupScroll","leftMaxCount","leafCountOnly","valueEntities","_React$useContext2","checkable","checkedKeys","halfCheckedKeys","treeExpandedKeys","treeDefaultExpandAll","treeDefaultExpandedKeys","onTreeExpand","treeIcon","showTreeIcon","switcherIcon","treeLine","treeNodeFilterProp","loadData","treeLoadedKeys","treeMotion","onTreeLoad","keyEntities","treeRef","useRef","memoTreeData","prev","next","mergedCheckedKeys","checked","halfChecked","useEffect","length","_treeRef$current","current","scrollTo","key","onListMouseDown","event","preventDefault","onInternalSelect","__","info","node","selected","includes","_React$useState","useState","_React$useState2","expandedKeys","setExpandedKeys","_React$useState3","_React$useState4","searchExpandedKeys","setSearchExpandedKeys","mergedExpandedKeys","onInternalExpand","keys","lowerSearchValue","String","toLowerCase","filterTreeNode","treeNode","_React$useState5","Map","_React$useState6","disabledCache","setDisabledCache","getDisabledWithCache","value","has","entity","get","isLeaf","children","checkableChildren","filter","childTreeNode","disabled","disableCheckbox","checkableChildrenCount","set","nodeDisabled","nodeValue","getFirstMatchingNode","nodes","_iterator","_step","s","n","done","selectable","matchInChildren","err","e","f","_React$useState7","_React$useState8","activeKey","setActiveKey","activeEntity","nextActiveKey","getFirstNode","firstNode","useImperativeHandle","_treeRef$current2","onKeyDown","_treeRef$current3","which","UP","DOWN","LEFT","RIGHT","ENTER","isNodeDisabled","_ref","ESC","onKeyUp","hasLoadDataFn","_ref2","_ref3","_ref4","preSearchValue","_ref5","nextSearchValue","nextExcludeSearchExpandedKeys","syncLoadData","createElement","role","className","concat","onMouseDown","treeProps","loadedKeys","style","Provider","focusable","itemHeight","itemScrollOffset","icon","showIcon","showLine","motion","checkStrictly","selectedKeys","defaultExpandAll","titleRender","onActiveChange","onCheck","onExpand","onLoad","expandAction","onScroll","RefOptionList","forwardRef","process","env","NODE_ENV","displayName"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/node_modules/rc-tree-select/es/OptionList.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useBaseProps } from 'rc-select';\nimport Tree from 'rc-tree';\nimport { UnstableContext } from 'rc-tree';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport * as React from 'react';\nimport LegacyContext from \"./LegacyContext\";\nimport TreeSelectContext from \"./TreeSelectContext\";\nimport { getAllKeys, isCheckDisabled } from \"./utils/valueUtil\";\nimport { useEvent } from 'rc-util';\nvar HIDDEN_STYLE = {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0,\n border: 0,\n padding: 0,\n margin: 0\n};\nvar OptionList = function OptionList(_, ref) {\n var _useBaseProps = useBaseProps(),\n prefixCls = _useBaseProps.prefixCls,\n multiple = _useBaseProps.multiple,\n searchValue = _useBaseProps.searchValue,\n toggleOpen = _useBaseProps.toggleOpen,\n open = _useBaseProps.open,\n notFoundContent = _useBaseProps.notFoundContent;\n var _React$useContext = React.useContext(TreeSelectContext),\n virtual = _React$useContext.virtual,\n listHeight = _React$useContext.listHeight,\n listItemHeight = _React$useContext.listItemHeight,\n listItemScrollOffset = _React$useContext.listItemScrollOffset,\n treeData = _React$useContext.treeData,\n fieldNames = _React$useContext.fieldNames,\n onSelect = _React$useContext.onSelect,\n dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth,\n treeExpandAction = _React$useContext.treeExpandAction,\n treeTitleRender = _React$useContext.treeTitleRender,\n onPopupScroll = _React$useContext.onPopupScroll,\n leftMaxCount = _React$useContext.leftMaxCount,\n leafCountOnly = _React$useContext.leafCountOnly,\n valueEntities = _React$useContext.valueEntities;\n var _React$useContext2 = React.useContext(LegacyContext),\n checkable = _React$useContext2.checkable,\n checkedKeys = _React$useContext2.checkedKeys,\n halfCheckedKeys = _React$useContext2.halfCheckedKeys,\n treeExpandedKeys = _React$useContext2.treeExpandedKeys,\n treeDefaultExpandAll = _React$useContext2.treeDefaultExpandAll,\n treeDefaultExpandedKeys = _React$useContext2.treeDefaultExpandedKeys,\n onTreeExpand = _React$useContext2.onTreeExpand,\n treeIcon = _React$useContext2.treeIcon,\n showTreeIcon = _React$useContext2.showTreeIcon,\n switcherIcon = _React$useContext2.switcherIcon,\n treeLine = _React$useContext2.treeLine,\n treeNodeFilterProp = _React$useContext2.treeNodeFilterProp,\n loadData = _React$useContext2.loadData,\n treeLoadedKeys = _React$useContext2.treeLoadedKeys,\n treeMotion = _React$useContext2.treeMotion,\n onTreeLoad = _React$useContext2.onTreeLoad,\n keyEntities = _React$useContext2.keyEntities;\n var treeRef = React.useRef();\n var memoTreeData = useMemo(function () {\n return treeData;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [open, treeData], function (prev, next) {\n return next[0] && prev[1] !== next[1];\n });\n\n // ========================== Values ==========================\n var mergedCheckedKeys = React.useMemo(function () {\n if (!checkable) {\n return null;\n }\n return {\n checked: checkedKeys,\n halfChecked: halfCheckedKeys\n };\n }, [checkable, checkedKeys, halfCheckedKeys]);\n\n // ========================== Scroll ==========================\n React.useEffect(function () {\n // Single mode should scroll to current key\n if (open && !multiple && checkedKeys.length) {\n var _treeRef$current;\n (_treeRef$current = treeRef.current) === null || _treeRef$current === void 0 || _treeRef$current.scrollTo({\n key: checkedKeys[0]\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n // ========================== Events ==========================\n var onListMouseDown = function onListMouseDown(event) {\n event.preventDefault();\n };\n var onInternalSelect = function onInternalSelect(__, info) {\n var node = info.node;\n if (checkable && isCheckDisabled(node)) {\n return;\n }\n onSelect(node.key, {\n selected: !checkedKeys.includes(node.key)\n });\n if (!multiple) {\n toggleOpen(false);\n }\n };\n\n // =========================== Keys ===========================\n var _React$useState = React.useState(treeDefaultExpandedKeys),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n expandedKeys = _React$useState2[0],\n setExpandedKeys = _React$useState2[1];\n var _React$useState3 = React.useState(null),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n searchExpandedKeys = _React$useState4[0],\n setSearchExpandedKeys = _React$useState4[1];\n var mergedExpandedKeys = React.useMemo(function () {\n if (treeExpandedKeys) {\n return _toConsumableArray(treeExpandedKeys);\n }\n return searchValue ? searchExpandedKeys : expandedKeys;\n }, [expandedKeys, searchExpandedKeys, treeExpandedKeys, searchValue]);\n var onInternalExpand = function onInternalExpand(keys) {\n setExpandedKeys(keys);\n setSearchExpandedKeys(keys);\n if (onTreeExpand) {\n onTreeExpand(keys);\n }\n };\n\n // ========================== Search ==========================\n var lowerSearchValue = String(searchValue).toLowerCase();\n var filterTreeNode = function filterTreeNode(treeNode) {\n if (!lowerSearchValue) {\n return false;\n }\n return String(treeNode[treeNodeFilterProp]).toLowerCase().includes(lowerSearchValue);\n };\n React.useEffect(function () {\n if (searchValue) {\n setSearchExpandedKeys(getAllKeys(treeData, fieldNames));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchValue]);\n\n // ========================= Disabled =========================\n // Cache disabled states in React state to ensure re-render when cache updates\n var _React$useState5 = React.useState(function () {\n return new Map();\n }),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n disabledCache = _React$useState6[0],\n setDisabledCache = _React$useState6[1];\n React.useEffect(function () {\n if (leftMaxCount) {\n setDisabledCache(new Map());\n }\n }, [leftMaxCount]);\n function getDisabledWithCache(node) {\n var value = node[fieldNames.value];\n if (!disabledCache.has(value)) {\n var entity = valueEntities.get(value);\n var isLeaf = (entity.children || []).length === 0;\n if (!isLeaf) {\n var checkableChildren = entity.children.filter(function (childTreeNode) {\n return !childTreeNode.node.disabled && !childTreeNode.node.disableCheckbox && !checkedKeys.includes(childTreeNode.node[fieldNames.value]);\n });\n var checkableChildrenCount = checkableChildren.length;\n disabledCache.set(value, checkableChildrenCount > leftMaxCount);\n } else {\n disabledCache.set(value, false);\n }\n }\n return disabledCache.get(value);\n }\n var nodeDisabled = useEvent(function (node) {\n var nodeValue = node[fieldNames.value];\n if (checkedKeys.includes(nodeValue)) {\n return false;\n }\n if (leftMaxCount === null) {\n return false;\n }\n if (leftMaxCount <= 0) {\n return true;\n }\n\n // This is a low performance calculation\n if (leafCountOnly && leftMaxCount) {\n return getDisabledWithCache(node);\n }\n return false;\n });\n\n // ========================== Get First Selectable Node ==========================\n var getFirstMatchingNode = function getFirstMatchingNode(nodes) {\n var _iterator = _createForOfIteratorHelper(nodes),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var node = _step.value;\n if (node.disabled || node.selectable === false) {\n continue;\n }\n if (searchValue) {\n if (filterTreeNode(node)) {\n return node;\n }\n } else {\n return node;\n }\n if (node[fieldNames.children]) {\n var matchInChildren = getFirstMatchingNode(node[fieldNames.children]);\n if (matchInChildren) {\n return matchInChildren;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return null;\n };\n\n // ========================== Active ==========================\n var _React$useState7 = React.useState(null),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n activeKey = _React$useState8[0],\n setActiveKey = _React$useState8[1];\n var activeEntity = keyEntities[activeKey];\n React.useEffect(function () {\n if (!open) {\n return;\n }\n var nextActiveKey = null;\n var getFirstNode = function getFirstNode() {\n var firstNode = getFirstMatchingNode(memoTreeData);\n return firstNode ? firstNode[fieldNames.value] : null;\n };\n\n // single mode active first checked node\n if (!multiple && checkedKeys.length && !searchValue) {\n nextActiveKey = checkedKeys[0];\n } else {\n nextActiveKey = getFirstNode();\n }\n setActiveKey(nextActiveKey);\n }, [open, searchValue]);\n\n // ========================= Keyboard =========================\n React.useImperativeHandle(ref, function () {\n var _treeRef$current2;\n return {\n scrollTo: (_treeRef$current2 = treeRef.current) === null || _treeRef$current2 === void 0 ? void 0 : _treeRef$current2.scrollTo,\n onKeyDown: function onKeyDown(event) {\n var _treeRef$current3;\n var which = event.which;\n switch (which) {\n // >>> Arrow keys\n case KeyCode.UP:\n case KeyCode.DOWN:\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n (_treeRef$current3 = treeRef.current) === null || _treeRef$current3 === void 0 || _treeRef$current3.onKeyDown(event);\n break;\n\n // >>> Select item\n case KeyCode.ENTER:\n {\n if (activeEntity) {\n var isNodeDisabled = nodeDisabled(activeEntity.node);\n var _ref = (activeEntity === null || activeEntity === void 0 ? void 0 : activeEntity.node) || {},\n selectable = _ref.selectable,\n value = _ref.value,\n disabled = _ref.disabled;\n if (selectable !== false && !disabled && !isNodeDisabled) {\n onInternalSelect(null, {\n node: {\n key: activeKey\n },\n selected: !checkedKeys.includes(value)\n });\n }\n }\n break;\n }\n\n // >>> Close\n case KeyCode.ESC:\n {\n toggleOpen(false);\n }\n }\n },\n onKeyUp: function onKeyUp() {}\n };\n });\n var hasLoadDataFn = useMemo(function () {\n return searchValue ? false : true;\n }, [searchValue, treeExpandedKeys || expandedKeys], function (_ref2, _ref3) {\n var _ref4 = _slicedToArray(_ref2, 1),\n preSearchValue = _ref4[0];\n var _ref5 = _slicedToArray(_ref3, 2),\n nextSearchValue = _ref5[0],\n nextExcludeSearchExpandedKeys = _ref5[1];\n return preSearchValue !== nextSearchValue && !!(nextSearchValue || nextExcludeSearchExpandedKeys);\n });\n var syncLoadData = hasLoadDataFn ? loadData : null;\n\n // ========================== Render ==========================\n if (memoTreeData.length === 0) {\n return /*#__PURE__*/React.createElement(\"div\", {\n role: \"listbox\",\n className: \"\".concat(prefixCls, \"-empty\"),\n onMouseDown: onListMouseDown\n }, notFoundContent);\n }\n var treeProps = {\n fieldNames: fieldNames\n };\n if (treeLoadedKeys) {\n treeProps.loadedKeys = treeLoadedKeys;\n }\n if (mergedExpandedKeys) {\n treeProps.expandedKeys = mergedExpandedKeys;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n onMouseDown: onListMouseDown\n }, activeEntity && open && /*#__PURE__*/React.createElement(\"span\", {\n style: HIDDEN_STYLE,\n \"aria-live\": \"assertive\"\n }, activeEntity.node.value), /*#__PURE__*/React.createElement(UnstableContext.Provider, {\n value: {\n nodeDisabled: nodeDisabled\n }\n }, /*#__PURE__*/React.createElement(Tree, _extends({\n ref: treeRef,\n focusable: false,\n prefixCls: \"\".concat(prefixCls, \"-tree\"),\n treeData: memoTreeData,\n height: listHeight,\n itemHeight: listItemHeight,\n itemScrollOffset: listItemScrollOffset,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false,\n multiple: multiple,\n icon: treeIcon,\n showIcon: showTreeIcon,\n switcherIcon: switcherIcon,\n showLine: treeLine,\n loadData: syncLoadData,\n motion: treeMotion,\n activeKey: activeKey\n // We handle keys by out instead tree self\n ,\n checkable: checkable,\n checkStrictly: true,\n checkedKeys: mergedCheckedKeys,\n selectedKeys: !checkable ? checkedKeys : [],\n defaultExpandAll: treeDefaultExpandAll,\n titleRender: treeTitleRender\n }, treeProps, {\n // Proxy event out\n onActiveChange: setActiveKey,\n onSelect: onInternalSelect,\n onCheck: onInternalSelect,\n onExpand: onInternalExpand,\n onLoad: onTreeLoad,\n filterTreeNode: filterTreeNode,\n expandAction: treeExpandAction,\n onScroll: onPopupScroll\n }))));\n};\nvar RefOptionList = /*#__PURE__*/React.forwardRef(OptionList);\nif (process.env.NODE_ENV !== 'production') {\n RefOptionList.displayName = 'OptionList';\n}\nexport default RefOptionList;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,0BAA0B,MAAM,sDAAsD;AAC7F,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,cAAc,MAAM,0CAA0C;AACrE,SAASC,YAAY,QAAQ,WAAW;AACxC,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,eAAe,QAAQ,SAAS;AACzC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,OAAO,MAAM,0BAA0B;AAC9C,OAAO,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