{"version":3,"file":"useTree.js","sources":["../../../../../../../packages/components/tree-v2/src/composables/useTree.ts"],"sourcesContent":["import { computed, nextTick, ref, shallowRef, watch } from 'vue'\nimport { isObject } from '@element-plus/utils'\nimport {\n CURRENT_CHANGE,\n NODE_CLICK,\n NODE_COLLAPSE,\n NODE_DROP,\n NODE_EXPAND,\n TreeOptionsEnum,\n} from '../virtual-tree'\nimport { useCheck } from './useCheck'\nimport { useFilter } from './useFilter'\nimport type {\n FixedSizeList,\n Alignment as ScrollStrategy,\n} from '@element-plus/components/virtual-list'\nimport type { SetupContext } from 'vue'\nimport type { treeEmits } from '../virtual-tree'\nimport type { CheckboxValueType } from '@element-plus/components/checkbox'\nimport type {\n Tree,\n TreeData,\n TreeKey,\n TreeNode,\n TreeNodeData,\n TreeProps,\n} from '../types'\n\nexport function useTree(\n props: TreeProps,\n emit: SetupContext['emit']\n) {\n const expandedKeySet = ref>(new Set(props.defaultExpandedKeys))\n const currentKey = ref()\n const tree = shallowRef()\n const listRef = ref()\n\n watch(\n () => props.currentNodeKey,\n (key) => {\n currentKey.value = key\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.data,\n (data: TreeData) => {\n setData(data)\n },\n {\n immediate: true,\n }\n )\n\n const {\n isIndeterminate,\n isChecked,\n toggleCheckbox,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n } = useCheck(props, tree)\n\n const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(\n props,\n tree\n )\n\n const valueKey = computed(() => {\n return props.props?.value || TreeOptionsEnum.KEY\n })\n const childrenKey = computed(() => {\n return props.props?.children || TreeOptionsEnum.CHILDREN\n })\n const disabledKey = computed(() => {\n return props.props?.disabled || TreeOptionsEnum.DISABLED\n })\n const labelKey = computed(() => {\n return props.props?.label || TreeOptionsEnum.LABEL\n })\n\n const flattenTree = computed(() => {\n const expandedKeys = expandedKeySet.value\n const hiddenKeys = hiddenNodeKeySet.value\n const flattenNodes: TreeNode[] = []\n const nodes = tree.value?.treeNodes || []\n\n const stack: TreeNode[] = []\n for (let i = nodes.length - 1; i >= 0; --i) {\n stack.push(nodes[i])\n }\n while (stack.length) {\n const node = stack.pop()!\n if (hiddenKeys.has(node.key)) continue\n\n flattenNodes.push(node)\n if (node.children && expandedKeys.has(node.key)) {\n for (let i = node.children.length - 1; i >= 0; --i) {\n stack.push(node.children[i])\n }\n }\n }\n\n return flattenNodes\n })\n\n const isNotEmpty = computed(() => {\n return flattenTree.value.length > 0\n })\n\n function createTree(data: TreeData): Tree {\n const treeNodeMap: Map = new Map()\n const levelTreeNodeMap: Map = new Map()\n let maxLevel = 1\n function traverse(\n nodes: TreeData,\n level = 1,\n parent: TreeNode | undefined = undefined\n ) {\n const siblings: TreeNode[] = []\n for (const rawNode of nodes) {\n const value = getKey(rawNode)\n const node: TreeNode = {\n level,\n key: value,\n data: rawNode,\n }\n node.label = getLabel(rawNode)\n node.parent = parent\n const children = getChildren(rawNode)\n node.disabled = getDisabled(rawNode)\n node.isLeaf = !children || children.length === 0\n if (children && children.length) {\n node.children = traverse(children, level + 1, node)\n }\n siblings.push(node)\n treeNodeMap.set(value, node)\n if (!levelTreeNodeMap.has(level)) {\n levelTreeNodeMap.set(level, [])\n }\n levelTreeNodeMap.get(level)?.push(node)\n }\n if (level > maxLevel) {\n maxLevel = level\n }\n return siblings\n }\n const treeNodes: TreeNode[] = traverse(data)\n return {\n treeNodeMap,\n levelTreeNodeMap,\n maxLevel,\n treeNodes,\n }\n }\n\n function filter(query: string) {\n const keys = doFilter(query)\n if (keys) {\n expandedKeySet.value = keys\n }\n }\n\n function getChildren(node: TreeNodeData): TreeNodeData[] {\n return node[childrenKey.value]\n }\n\n function getKey(node: TreeNodeData): TreeKey {\n if (!node) {\n return ''\n }\n return node[valueKey.value]\n }\n\n function getDisabled(node: TreeNodeData): boolean {\n return node[disabledKey.value]\n }\n\n function getLabel(node: TreeNodeData): string {\n return node[labelKey.value]\n }\n\n function toggleExpand(node: TreeNode) {\n const expandedKeys = expandedKeySet.value\n if (expandedKeys.has(node.key)) {\n collapseNode(node)\n } else {\n expandNode(node)\n }\n }\n\n function setExpandedKeys(keys: TreeKey[]) {\n const expandedKeys = new Set()\n const nodeMap = tree.value!.treeNodeMap\n\n keys.forEach((k) => {\n let node = nodeMap.get(k)\n while (node && !expandedKeys.has(node.key)) {\n expandedKeys.add(node.key)\n node = node.parent\n }\n })\n\n expandedKeySet.value = expandedKeys\n }\n\n function handleNodeClick(node: TreeNode, e: MouseEvent) {\n emit(NODE_CLICK, node.data, node, e)\n handleCurrentChange(node)\n if (props.expandOnClickNode) {\n toggleExpand(node)\n }\n if (props.showCheckbox && props.checkOnClickNode && !node.disabled) {\n toggleCheckbox(node, !isChecked(node), true)\n }\n }\n\n function handleNodeDrop(node: TreeNode, e: DragEvent) {\n emit(NODE_DROP, node.data, node, e)\n }\n\n function handleCurrentChange(node: TreeNode) {\n if (!isCurrent(node)) {\n currentKey.value = node.key\n emit(CURRENT_CHANGE, node.data, node)\n }\n }\n\n function handleNodeCheck(node: TreeNode, checked: CheckboxValueType) {\n toggleCheckbox(node, checked)\n }\n\n function expandNode(node: TreeNode) {\n const keySet = expandedKeySet.value\n if (tree.value && props.accordion) {\n // whether only one node among the same level can be expanded at one time\n const { treeNodeMap } = tree.value\n keySet.forEach((key) => {\n const treeNode = treeNodeMap.get(key)\n if (node && node.level === treeNode?.level) {\n keySet.delete(key)\n }\n })\n }\n keySet.add(node.key)\n emit(NODE_EXPAND, node.data, node)\n }\n\n function collapseNode(node: TreeNode) {\n expandedKeySet.value.delete(node.key)\n emit(NODE_COLLAPSE, node.data, node)\n }\n\n function isExpanded(node: TreeNode): boolean {\n return expandedKeySet.value.has(node.key)\n }\n\n function isDisabled(node: TreeNode): boolean {\n return !!node.disabled\n }\n\n function isCurrent(node: TreeNode): boolean {\n const current = currentKey.value\n return current !== undefined && current === node.key\n }\n\n function getCurrentNode(): TreeNodeData | undefined {\n if (!currentKey.value) return undefined\n return tree.value?.treeNodeMap.get(currentKey.value)?.data\n }\n\n function getCurrentKey(): TreeKey | undefined {\n return currentKey.value\n }\n\n function setCurrentKey(key: TreeKey): void {\n currentKey.value = key\n }\n\n function setData(data: TreeData) {\n nextTick(() => (tree.value = createTree(data)))\n }\n\n function getNode(data: TreeKey | TreeNodeData) {\n const key = isObject(data) ? getKey(data) : data\n return tree.value?.treeNodeMap.get(key)\n }\n\n function scrollToNode(key: TreeKey, strategy: ScrollStrategy = 'auto') {\n const node = getNode(key)\n if (node && listRef.value) {\n listRef.value.scrollToItem(flattenTree.value.indexOf(node), strategy)\n }\n }\n\n function scrollTo(offset: number) {\n listRef.value?.scrollTo(offset)\n }\n\n return {\n tree,\n flattenTree,\n isNotEmpty,\n listRef,\n getKey,\n getChildren,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isChecked,\n isIndeterminate,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeDrop,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n setExpandedKeys,\n scrollToNode,\n scrollTo,\n }\n}\n"],"names":["ref","shallowRef","watch","useCheck","useFilter","computed","TreeOptionsEnum","NODE_CLICK","NODE_DROP","CURRENT_CHANGE","NODE_EXPAND","NODE_COLLAPSE","nextTick","isObject"],"mappings":";;;;;;;;;;;AAYO,SAAS,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;AACrC,EAAE,MAAM,cAAc,GAAGA,OAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC;AACjE,EAAE,MAAM,UAAU,GAAGA,OAAG,EAAE,CAAC;AAC3B,EAAE,MAAM,IAAI,GAAGC,cAAU,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