ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
1 lines • 56.4 kB
Source Map (JSON)
{"version":3,"file":"ng-zorro-antd-core-tree.mjs","sources":["../../components/core/tree/nz-tree-base-node.ts","../../components/core/tree/nz-tree-base-util.ts","../../components/core/tree/nz-tree-base.service.ts","../../components/core/tree/nz-tree-service.resolver.ts","../../components/core/tree/nz-tree-base.ts","../../components/core/tree/public-api.ts","../../components/core/tree/ng-zorro-antd-core-tree.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzTreeNodeBaseComponent } from './nz-tree-base.definitions';\nimport { NzTreeBaseService } from './nz-tree-base.service';\n\nexport type NzTreeNodeKey = string | number;\n\nexport interface FlattenNode {\n parent: FlattenNode | null;\n children: FlattenNode[];\n pos: string;\n data: NzTreeNode;\n isStart: boolean[];\n isEnd: boolean[];\n}\n\nexport interface NzTreeNodeOptions {\n title: string;\n key: string;\n icon?: string;\n isLeaf?: boolean;\n checked?: boolean;\n selected?: boolean;\n selectable?: boolean;\n disabled?: boolean;\n disableCheckbox?: boolean;\n expanded?: boolean;\n children?: NzTreeNodeOptions[];\n\n [key: string]: NzSafeAny;\n}\n\nexport class NzTreeNode {\n private _title: string = '';\n key!: string;\n level: number = 0;\n origin!: NzTreeNodeOptions;\n // Parent Node\n parentNode: NzTreeNode | null = null;\n private _icon: string = '';\n private _children: NzTreeNode[] = [];\n private _isLeaf: boolean = false;\n private _isChecked: boolean = false;\n private _isSelectable: boolean = false;\n private _isDisabled: boolean = false;\n private _isDisableCheckbox: boolean = false;\n private _isExpanded: boolean = false;\n private _isHalfChecked: boolean = false;\n private _isSelected: boolean = false;\n private _isLoading: boolean = false;\n canHide: boolean = false;\n isMatched: boolean = false;\n\n service: NzTreeBaseService | null = null;\n component!: NzTreeNodeBaseComponent;\n\n /** New added in Tree for easy data access */\n isStart?: boolean[];\n isEnd?: boolean[];\n\n get treeService(): NzTreeBaseService | null {\n return this.service || (this.parentNode && this.parentNode.treeService);\n }\n\n /**\n * Init nzTreeNode\n *\n * @param option: user's input\n * @param parent\n * @param service: base nzTreeService\n */\n constructor(\n option: NzTreeNodeOptions | NzTreeNode,\n parent: NzTreeNode | null = null,\n service: NzTreeBaseService | null = null\n ) {\n if (option instanceof NzTreeNode) {\n return option;\n }\n this.service = service || null;\n this.origin = option;\n this.key = option.key;\n this.parentNode = parent;\n this._title = option.title || '---';\n this._icon = option.icon || '';\n this._isLeaf = option.isLeaf || false;\n this._children = [];\n // option params\n this._isChecked = option.checked || false;\n this._isSelectable = option.disabled || option.selectable !== false;\n this._isDisabled = option.disabled || false;\n this._isDisableCheckbox = option.disableCheckbox || false;\n this._isExpanded = option.isLeaf ? false : option.expanded || false;\n this._isHalfChecked = false;\n this._isSelected = (!option.disabled && option.selected) || false;\n this._isLoading = false;\n this.isMatched = false;\n\n /**\n * parent's checked status will affect children while initializing\n */\n if (parent) {\n this.level = parent.level + 1;\n } else {\n this.level = 0;\n }\n if (typeof option.children !== 'undefined' && option.children !== null) {\n option.children.forEach(nodeOptions => {\n const s = this.treeService;\n if (\n s &&\n !s.isCheckStrictly &&\n option.checked &&\n !option.disabled &&\n !nodeOptions.disabled &&\n !nodeOptions.disableCheckbox\n ) {\n nodeOptions.checked = option.checked;\n }\n this._children.push(new NzTreeNode(nodeOptions, this));\n });\n }\n }\n\n /**\n * auto generate\n * get\n * set\n */\n get title(): string {\n return this._title;\n }\n\n set title(value: string) {\n this._title = value;\n this.update();\n }\n\n get icon(): string {\n return this._icon;\n }\n\n set icon(value: string) {\n this._icon = value;\n this.update();\n }\n\n get children(): NzTreeNode[] {\n return this._children;\n }\n\n set children(value: NzTreeNode[]) {\n this._children = value;\n this.update();\n }\n\n get isLeaf(): boolean {\n return this._isLeaf;\n }\n\n set isLeaf(value: boolean) {\n this._isLeaf = value;\n this.update();\n }\n\n get isChecked(): boolean {\n return this._isChecked;\n }\n\n set isChecked(value: boolean) {\n this._isChecked = value;\n this.origin.checked = value;\n this.afterValueChange('isChecked');\n }\n\n get isHalfChecked(): boolean {\n return this._isHalfChecked;\n }\n\n set isHalfChecked(value: boolean) {\n this._isHalfChecked = value;\n this.afterValueChange('isHalfChecked');\n }\n\n get isSelectable(): boolean {\n return this._isSelectable;\n }\n\n set isSelectable(value: boolean) {\n this._isSelectable = value;\n this.update();\n }\n\n get isDisabled(): boolean {\n return this._isDisabled;\n }\n\n set isDisabled(value: boolean) {\n this._isDisabled = value;\n this.update();\n }\n\n get isDisableCheckbox(): boolean {\n return this._isDisableCheckbox;\n }\n\n set isDisableCheckbox(value: boolean) {\n this._isDisableCheckbox = value;\n this.update();\n }\n\n get isExpanded(): boolean {\n return this._isExpanded;\n }\n\n set isExpanded(value: boolean) {\n this._isExpanded = value;\n this.origin.expanded = value;\n this.afterValueChange('isExpanded');\n this.afterValueChange('reRender');\n }\n\n get isSelected(): boolean {\n return this._isSelected;\n }\n\n set isSelected(value: boolean) {\n this._isSelected = value;\n this.origin.selected = value;\n this.afterValueChange('isSelected');\n }\n\n get isLoading(): boolean {\n return this._isLoading;\n }\n\n set isLoading(value: boolean) {\n this._isLoading = value;\n this.update();\n }\n\n public setSyncChecked(checked: boolean = false, halfChecked: boolean = false): void {\n this.setChecked(checked, halfChecked);\n if (this.treeService && !this.treeService.isCheckStrictly) {\n this.treeService.conduct(this);\n }\n }\n\n public setChecked(checked: boolean = false, halfChecked: boolean = false): void {\n this.origin.checked = checked;\n this.isChecked = checked;\n this.isHalfChecked = halfChecked;\n }\n\n public setExpanded(value: boolean): void {\n this._isExpanded = value;\n this.origin.expanded = value;\n this.afterValueChange('isExpanded');\n }\n\n public getParentNode(): NzTreeNode | null {\n return this.parentNode;\n }\n\n public getChildren(): NzTreeNode[] {\n return this.children;\n }\n\n /**\n * Support appending child nodes by position. Leaf node cannot be appended.\n */\n public addChildren(children: NzSafeAny[], childPos: number = -1): void {\n if (!this.isLeaf) {\n children.forEach(node => {\n const refreshLevel = (n: NzTreeNode): void => {\n n.getChildren().forEach(c => {\n c.level = c.getParentNode()!.level + 1;\n // flush origin\n c.origin.level = c.level;\n refreshLevel(c);\n });\n };\n let child = node;\n if (child instanceof NzTreeNode) {\n child.parentNode = this;\n } else {\n child = new NzTreeNode(node, this);\n }\n child.level = this.level + 1;\n child.origin.level = child.level;\n refreshLevel(child);\n try {\n childPos === -1 ? this.children.push(child) : this.children.splice(childPos, 0, child);\n // flush origin\n } catch (e) {}\n });\n this.origin.children = this.getChildren().map(v => v.origin);\n // remove loading state\n this.isLoading = false;\n }\n this.afterValueChange('addChildren');\n this.afterValueChange('reRender');\n }\n\n public clearChildren(): void {\n // refresh checked state\n this.afterValueChange('clearChildren');\n this.children = [];\n this.origin.children = [];\n this.afterValueChange('reRender');\n }\n\n public remove(): void {\n const parentNode = this.getParentNode();\n if (parentNode) {\n parentNode.children = parentNode.getChildren().filter(v => v.key !== this.key);\n parentNode.origin.children = parentNode.origin.children!.filter(v => v.key !== this.key);\n this.afterValueChange('remove');\n this.afterValueChange('reRender');\n }\n }\n\n public afterValueChange(key: string): void {\n if (this.treeService) {\n switch (key) {\n case 'isChecked':\n this.treeService.setCheckedNodeList(this);\n break;\n case 'isHalfChecked':\n this.treeService.setHalfCheckedNodeList(this);\n break;\n case 'isExpanded':\n this.treeService.setExpandedNodeList(this);\n break;\n case 'isSelected':\n this.treeService.setNodeActive(this);\n break;\n case 'clearChildren':\n this.treeService.afterRemove(this.getChildren());\n break;\n case 'remove':\n this.treeService.afterRemove([this]);\n break;\n case 'reRender':\n this.treeService.flattenTreeData(\n this.treeService.rootNodes,\n this.treeService.getExpandedNodeList().map(v => v.key!)\n );\n break;\n }\n }\n this.update();\n }\n\n public update(): void {\n if (this.component) {\n this.component.markForCheck();\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { FlattenNode, NzTreeNode, NzTreeNodeKey } from './nz-tree-base-node';\n\nexport function isCheckDisabled(node: NzTreeNode): boolean {\n const { isDisabled, isDisableCheckbox } = node;\n return !!(isDisabled || isDisableCheckbox);\n}\n\nexport function isInArray(needle: NzSafeAny, haystack: NzSafeAny[]): boolean {\n return haystack.length > 0 && haystack.indexOf(needle) > -1;\n}\n\nexport function getPosition(level: string | number, index: number): string {\n return `${level}-${index}`;\n}\n\nexport function getKey(key: NzTreeNodeKey, pos: string): NzTreeNodeKey {\n if (key !== null && key !== undefined) {\n return key;\n }\n return pos;\n}\n\n/**\n * Flat nest tree data into flatten list. This is used for virtual list render.\n *\n * @param treeNodeList Origin data node list\n * @param expandedKeys\n * need expanded keys, provides `true` means all expanded (used in `rc-tree-select`).\n */\nexport function flattenTreeData(\n treeNodeList: NzTreeNode[] = [],\n expandedKeys: NzTreeNodeKey[] | true = []\n): FlattenNode[] {\n const expandedKeySet = new Set(expandedKeys === true ? [] : expandedKeys);\n const flattenList: FlattenNode[] = [];\n\n function dig(list: NzTreeNode[], parent: FlattenNode | null = null): FlattenNode[] {\n return list.map((treeNode, index) => {\n const pos: string = getPosition(parent ? parent.pos : '0', index);\n const mergedKey = getKey(treeNode.key, pos);\n treeNode.isStart = [...(parent ? parent.isStart : []), index === 0];\n treeNode.isEnd = [...(parent ? parent.isEnd : []), index === list.length - 1];\n // Add FlattenDataNode into list\n // TODO: only need data here.\n const flattenNode: FlattenNode = {\n parent,\n pos,\n children: [],\n data: treeNode,\n isStart: [...(parent ? parent.isStart : []), index === 0],\n isEnd: [...(parent ? parent.isEnd : []), index === list.length - 1]\n };\n\n flattenList.push(flattenNode);\n\n // Loop treeNode children\n if (expandedKeys === true || expandedKeySet.has(mergedKey) || treeNode.isExpanded) {\n flattenNode.children = dig(treeNode.children || [], flattenNode);\n } else {\n flattenNode.children = [];\n }\n\n return flattenNode;\n });\n }\n\n dig(treeNodeList);\n return flattenList;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzTreeNode, NzTreeNodeKey } from './nz-tree-base-node';\nimport { flattenTreeData, isCheckDisabled, isInArray } from './nz-tree-base-util';\nimport { NzFormatEmitEvent } from './nz-tree-base.definitions';\n\n@Injectable()\nexport class NzTreeBaseService {\n DRAG_SIDE_RANGE = 0.25;\n DRAG_MIN_GAP = 2;\n\n isCheckStrictly: boolean = false;\n isMultiple: boolean = false;\n selectedNode!: NzTreeNode;\n rootNodes: NzTreeNode[] = [];\n flattenNodes$ = new BehaviorSubject<NzTreeNode[]>([]);\n selectedNodeList: NzTreeNode[] = [];\n expandedNodeList: NzTreeNode[] = [];\n checkedNodeList: NzTreeNode[] = [];\n halfCheckedNodeList: NzTreeNode[] = [];\n matchedNodeList: NzTreeNode[] = [];\n\n /**\n * reset tree nodes will clear default node list\n */\n initTree(nzNodes: NzTreeNode[]): void {\n this.rootNodes = nzNodes;\n this.expandedNodeList = [];\n this.selectedNodeList = [];\n this.halfCheckedNodeList = [];\n this.checkedNodeList = [];\n this.matchedNodeList = [];\n }\n\n flattenTreeData(nzNodes: NzTreeNode[], expandedKeys: NzTreeNodeKey[] | true = []): void {\n this.flattenNodes$.next(flattenTreeData(nzNodes, expandedKeys).map(item => item.data));\n }\n\n getSelectedNode(): NzTreeNode | null {\n return this.selectedNode;\n }\n\n /**\n * get some list\n */\n getSelectedNodeList(): NzTreeNode[] {\n return this.conductNodeState('select');\n }\n\n /**\n * return checked nodes\n */\n getCheckedNodeList(): NzTreeNode[] {\n return this.conductNodeState('check');\n }\n\n getHalfCheckedNodeList(): NzTreeNode[] {\n return this.conductNodeState('halfCheck');\n }\n\n /**\n * return expanded nodes\n */\n getExpandedNodeList(): NzTreeNode[] {\n return this.conductNodeState('expand');\n }\n\n /**\n * return search matched nodes\n */\n getMatchedNodeList(): NzTreeNode[] {\n return this.conductNodeState('match');\n }\n\n isArrayOfNzTreeNode(value: NzSafeAny[]): boolean {\n return value.every(item => item instanceof NzTreeNode);\n }\n\n /**\n * set drag node\n */\n setSelectedNode(node: NzTreeNode): void {\n this.selectedNode = node;\n }\n\n /**\n * set node selected status\n */\n setNodeActive(node: NzTreeNode): void {\n if (!this.isMultiple && node.isSelected) {\n this.selectedNodeList.forEach(n => {\n if (node.key !== n.key) {\n // reset other nodes\n n.isSelected = false;\n }\n });\n // single mode: remove pre node\n this.selectedNodeList = [];\n }\n this.setSelectedNodeList(node, this.isMultiple);\n }\n\n /**\n * add or remove node to selectedNodeList\n */\n setSelectedNodeList(node: NzTreeNode, isMultiple: boolean = false): void {\n const index = this.getIndexOfArray(this.selectedNodeList, node.key);\n if (isMultiple) {\n if (node.isSelected && index === -1) {\n this.selectedNodeList.push(node);\n }\n } else {\n if (node.isSelected && index === -1) {\n this.selectedNodeList = [node];\n }\n }\n if (!node.isSelected) {\n this.selectedNodeList = this.selectedNodeList.filter(n => n.key !== node.key);\n }\n }\n\n /**\n * merge checked nodes\n */\n setHalfCheckedNodeList(node: NzTreeNode): void {\n const index = this.getIndexOfArray(this.halfCheckedNodeList, node.key);\n if (node.isHalfChecked && index === -1) {\n this.halfCheckedNodeList.push(node);\n } else if (!node.isHalfChecked && index > -1) {\n this.halfCheckedNodeList = this.halfCheckedNodeList.filter(n => node.key !== n.key);\n }\n }\n\n setCheckedNodeList(node: NzTreeNode): void {\n const index = this.getIndexOfArray(this.checkedNodeList, node.key);\n if (node.isChecked && index === -1) {\n this.checkedNodeList.push(node);\n } else if (!node.isChecked && index > -1) {\n this.checkedNodeList = this.checkedNodeList.filter(n => node.key !== n.key);\n }\n }\n\n /**\n * conduct checked/selected/expanded keys\n */\n conductNodeState(type: string = 'check'): NzTreeNode[] {\n let resultNodesList: NzTreeNode[] = [];\n switch (type) {\n case 'select':\n resultNodesList = this.selectedNodeList;\n break;\n case 'expand':\n resultNodesList = this.expandedNodeList;\n break;\n case 'match':\n resultNodesList = this.matchedNodeList;\n break;\n case 'check':\n resultNodesList = this.checkedNodeList;\n const isIgnore = (node: NzTreeNode): boolean => {\n const parentNode = node.getParentNode();\n if (parentNode) {\n if (this.checkedNodeList.findIndex(n => n.key === parentNode.key) > -1) {\n return true;\n } else {\n return isIgnore(parentNode);\n }\n }\n return false;\n };\n // merge checked\n if (!this.isCheckStrictly) {\n resultNodesList = this.checkedNodeList.filter(n => !isIgnore(n));\n }\n break;\n case 'halfCheck':\n if (!this.isCheckStrictly) {\n resultNodesList = this.halfCheckedNodeList;\n }\n break;\n }\n return resultNodesList;\n }\n\n /**\n * set expanded nodes\n */\n setExpandedNodeList(node: NzTreeNode): void {\n if (node.isLeaf) {\n return;\n }\n const index = this.getIndexOfArray(this.expandedNodeList, node.key);\n if (node.isExpanded && index === -1) {\n this.expandedNodeList.push(node);\n } else if (!node.isExpanded && index > -1) {\n this.expandedNodeList.splice(index, 1);\n }\n }\n\n setMatchedNodeList(node: NzTreeNode): void {\n const index = this.getIndexOfArray(this.matchedNodeList, node.key);\n if (node.isMatched && index === -1) {\n this.matchedNodeList.push(node);\n } else if (!node.isMatched && index > -1) {\n this.matchedNodeList.splice(index, 1);\n }\n }\n\n /**\n * check state\n *\n * @param isCheckStrictly\n */\n refreshCheckState(isCheckStrictly: boolean = false): void {\n if (isCheckStrictly) {\n return;\n }\n this.checkedNodeList.forEach(node => {\n this.conduct(node, isCheckStrictly);\n });\n }\n\n // reset other node checked state based current node\n conduct(node: NzTreeNode, isCheckStrictly: boolean = false): void {\n const isChecked = node.isChecked;\n if (node && !isCheckStrictly) {\n this.conductUp(node);\n this.conductDown(node, isChecked);\n }\n }\n\n /**\n * 1、children half checked\n * 2、children all checked, parent checked\n * 3、no children checked\n */\n conductUp(node: NzTreeNode): void {\n const parentNode = node.getParentNode();\n if (parentNode) {\n if (!isCheckDisabled(parentNode)) {\n if (parentNode.children.every(child => isCheckDisabled(child) || (!child.isHalfChecked && child.isChecked))) {\n parentNode.isChecked = true;\n parentNode.isHalfChecked = false;\n } else if (parentNode.children.some(child => child.isHalfChecked || child.isChecked)) {\n parentNode.isChecked = false;\n parentNode.isHalfChecked = true;\n } else {\n parentNode.isChecked = false;\n parentNode.isHalfChecked = false;\n }\n }\n this.setCheckedNodeList(parentNode);\n this.setHalfCheckedNodeList(parentNode);\n this.conductUp(parentNode);\n }\n }\n\n /**\n * reset child check state\n */\n conductDown(node: NzTreeNode, value: boolean): void {\n if (!isCheckDisabled(node)) {\n node.isChecked = value;\n node.isHalfChecked = false;\n this.setCheckedNodeList(node);\n this.setHalfCheckedNodeList(node);\n node.children.forEach(n => {\n this.conductDown(n, value);\n });\n }\n }\n\n /**\n * flush after delete node\n */\n afterRemove(nodes: NzTreeNode[]): void {\n // to reset selectedNodeList & expandedNodeList\n const loopNode = (node: NzTreeNode): void => {\n // remove selected node\n this.selectedNodeList = this.selectedNodeList.filter(n => n.key !== node.key);\n // remove expanded node\n this.expandedNodeList = this.expandedNodeList.filter(n => n.key !== node.key);\n // remove checked node\n this.checkedNodeList = this.checkedNodeList.filter(n => n.key !== node.key);\n if (node.children) {\n node.children.forEach(child => {\n loopNode(child);\n });\n }\n };\n nodes.forEach(n => {\n loopNode(n);\n });\n this.refreshCheckState(this.isCheckStrictly);\n }\n\n /**\n * drag event\n */\n refreshDragNode(node: NzTreeNode): void {\n if (node.children.length === 0) {\n // until root\n this.conductUp(node);\n } else {\n node.children.forEach(child => {\n this.refreshDragNode(child);\n });\n }\n }\n\n // reset node level\n resetNodeLevel(node: NzTreeNode): void {\n const parentNode = node.getParentNode();\n if (parentNode) {\n node.level = parentNode.level + 1;\n } else {\n node.level = 0;\n }\n for (const child of node.children) {\n this.resetNodeLevel(child);\n }\n }\n\n calcDropPosition(event: DragEvent): number {\n const { clientY } = event;\n // to fix firefox undefined\n const { top, bottom, height } = (event.target as Element).getBoundingClientRect();\n const des = Math.max(height * this.DRAG_SIDE_RANGE, this.DRAG_MIN_GAP);\n\n if (clientY <= top + des) {\n return -1;\n } else if (clientY >= bottom - des) {\n return 1;\n }\n\n return 0;\n }\n\n /**\n * drop\n * 0: inner -1: pre 1: next\n */\n dropAndApply(targetNode: NzTreeNode, dragPos: number = -1): void {\n if (!targetNode || dragPos > 1) {\n return;\n }\n const treeService = targetNode.treeService;\n const targetParent = targetNode.getParentNode();\n const isSelectedRootNode = this.selectedNode.getParentNode();\n // remove the dragNode\n if (isSelectedRootNode) {\n isSelectedRootNode.children = isSelectedRootNode.children.filter(n => n.key !== this.selectedNode.key);\n } else {\n this.rootNodes = this.rootNodes.filter(n => n.key !== this.selectedNode.key);\n }\n switch (dragPos) {\n case 0:\n targetNode.addChildren([this.selectedNode]);\n this.resetNodeLevel(targetNode);\n break;\n case -1:\n case 1:\n const tIndex = dragPos === 1 ? 1 : 0;\n if (targetParent) {\n targetParent.addChildren([this.selectedNode], targetParent.children.indexOf(targetNode) + tIndex);\n const parentNode = this.selectedNode.getParentNode();\n if (parentNode) {\n this.resetNodeLevel(parentNode);\n }\n } else {\n const targetIndex = this.rootNodes.indexOf(targetNode) + tIndex;\n // Insert root node.\n this.rootNodes.splice(targetIndex, 0, this.selectedNode);\n this.rootNodes[targetIndex].parentNode = null;\n this.resetNodeLevel(this.rootNodes[targetIndex]);\n }\n break;\n }\n // flush all nodes\n this.rootNodes.forEach(child => {\n if (!child.treeService) {\n child.service = treeService;\n }\n this.refreshDragNode(child);\n });\n }\n\n /**\n * emit Structure\n * eventName\n * node\n * event: MouseEvent / DragEvent\n * dragNode\n */\n formatEvent(eventName: string, node: NzTreeNode | null, event: MouseEvent | DragEvent | null): NzFormatEmitEvent {\n const emitStructure: NzFormatEmitEvent = {\n eventName,\n node,\n event\n };\n switch (eventName) {\n case 'dragstart':\n case 'dragenter':\n case 'dragover':\n case 'dragleave':\n case 'drop':\n case 'dragend':\n Object.assign(emitStructure, { dragNode: this.getSelectedNode() });\n break;\n case 'click':\n case 'dblclick':\n Object.assign(emitStructure, { selectedKeys: this.selectedNodeList });\n Object.assign(emitStructure, { nodes: this.selectedNodeList });\n Object.assign(emitStructure, { keys: this.selectedNodeList.map(n => n.key) });\n break;\n case 'check':\n const checkedNodeList = this.getCheckedNodeList();\n Object.assign(emitStructure, { checkedKeys: checkedNodeList });\n Object.assign(emitStructure, { nodes: checkedNodeList });\n Object.assign(emitStructure, { keys: checkedNodeList.map(n => n.key) });\n break;\n case 'search':\n Object.assign(emitStructure, { matchedKeys: this.getMatchedNodeList() });\n Object.assign(emitStructure, { nodes: this.getMatchedNodeList() });\n Object.assign(emitStructure, { keys: this.getMatchedNodeList().map(n => n.key) });\n break;\n case 'expand':\n Object.assign(emitStructure, { nodes: this.expandedNodeList });\n Object.assign(emitStructure, { keys: this.expandedNodeList.map(n => n.key) });\n break;\n }\n return emitStructure;\n }\n\n /**\n * New functions for flatten nodes\n */\n\n getIndexOfArray(list: NzTreeNode[], key: string): number {\n return list.findIndex(v => v.key === key);\n }\n\n /**\n * Render by nzCheckedKeys\n * When keys equals null, just render with checkStrictly\n *\n * @param keys\n * @param checkStrictly\n */\n conductCheck(keys: NzTreeNodeKey[] | null, checkStrictly: boolean): void {\n this.checkedNodeList = [];\n this.halfCheckedNodeList = [];\n const calc = (nodes: NzTreeNode[]): void => {\n nodes.forEach(node => {\n if (keys === null) {\n // render tree if no default checked keys found\n node.isChecked = !!node.origin.checked;\n } else {\n if (isInArray(node.key, keys || [])) {\n node.isChecked = true;\n node.isHalfChecked = false;\n } else {\n node.isChecked = false;\n node.isHalfChecked = false;\n }\n }\n if (node.children.length > 0) {\n calc(node.children);\n }\n });\n };\n calc(this.rootNodes);\n this.refreshCheckState(checkStrictly);\n }\n\n conductExpandedKeys(keys: NzTreeNodeKey[] | true = []): void {\n const expandedKeySet = new Set(keys === true ? [] : keys);\n this.expandedNodeList = [];\n const calc = (nodes: NzTreeNode[]): void => {\n nodes.forEach(node => {\n node.setExpanded(keys === true || expandedKeySet.has(node.key) || node.isExpanded === true);\n if (node.isExpanded) {\n this.setExpandedNodeList(node);\n }\n if (node.children.length > 0) {\n calc(node.children);\n }\n });\n };\n calc(this.rootNodes);\n }\n\n conductSelectedKeys(keys: NzTreeNodeKey[], isMulti: boolean): void {\n this.selectedNodeList.forEach(node => (node.isSelected = false));\n this.selectedNodeList = [];\n const calc = (nodes: NzTreeNode[]): boolean =>\n nodes.every(node => {\n if (isInArray(node.key, keys)) {\n node.isSelected = true;\n this.setSelectedNodeList(node);\n if (!isMulti) {\n // if not support multi select\n return false;\n }\n } else {\n node.isSelected = false;\n }\n if (node.children.length > 0) {\n // Recursion\n return calc(node.children);\n }\n return true;\n });\n calc(this.rootNodes);\n }\n\n /**\n * Expand parent nodes by child node\n *\n * @param node\n */\n expandNodeAllParentBySearch(node: NzTreeNode): void {\n const calc = (n: NzTreeNode | null): void => {\n if (n) {\n n.canHide = false;\n n.setExpanded(true);\n this.setExpandedNodeList(n);\n if (n.getParentNode()) {\n return calc(n.getParentNode());\n }\n }\n };\n calc(node.getParentNode());\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { NzTreeBaseService } from './nz-tree-base.service';\n\nexport const NzTreeHigherOrderServiceToken = new InjectionToken<NzTreeBaseService>('NzTreeHigherOrder');\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzTreeNode } from './nz-tree-base-node';\nimport { NzTreeBaseService } from './nz-tree-base.service';\n\nexport class NzTreeBase {\n constructor(public nzTreeService: NzTreeBaseService) {}\n\n /**\n * Coerces a value({@link any[]}) to a TreeNodes({@link NzTreeNode[]})\n */\n coerceTreeNodes(value: NzSafeAny[]): NzTreeNode[] {\n let nodes: NzTreeNode[] = [];\n if (!this.nzTreeService.isArrayOfNzTreeNode(value)) {\n // has not been new NzTreeNode\n nodes = value.map(item => new NzTreeNode(item, null, this.nzTreeService));\n } else {\n nodes = value.map((item: NzTreeNode) => {\n item.service = this.nzTreeService;\n return item;\n });\n }\n return nodes;\n }\n\n /**\n * Get all nodes({@link NzTreeNode})\n */\n getTreeNodes(): NzTreeNode[] {\n return this.nzTreeService.rootNodes;\n }\n\n /**\n * Get {@link NzTreeNode} with key\n */\n getTreeNodeByKey(key: string): NzTreeNode | null {\n // flat tree nodes\n const nodes: NzTreeNode[] = [];\n const getNode = (node: NzTreeNode): void => {\n nodes.push(node);\n node.getChildren().forEach(n => {\n getNode(n);\n });\n };\n this.getTreeNodes().forEach(n => {\n getNode(n);\n });\n return nodes.find(n => n.key === key) || null;\n }\n\n /**\n * Get checked nodes(merged)\n */\n getCheckedNodeList(): NzTreeNode[] {\n return this.nzTreeService.getCheckedNodeList();\n }\n\n /**\n * Get selected nodes\n */\n getSelectedNodeList(): NzTreeNode[] {\n return this.nzTreeService.getSelectedNodeList();\n }\n\n /**\n * Get half checked nodes\n */\n getHalfCheckedNodeList(): NzTreeNode[] {\n return this.nzTreeService.getHalfCheckedNodeList();\n }\n\n /**\n * Get expanded nodes\n */\n getExpandedNodeList(): NzTreeNode[] {\n return this.nzTreeService.getExpandedNodeList();\n }\n\n /**\n * Get matched nodes(if nzSearchValue is not null)\n */\n getMatchedNodeList(): NzTreeNode[] {\n return this.nzTreeService.getMatchedNodeList();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nexport * from './nz-tree-base-node';\nexport * from './nz-tree-base.definitions';\nexport * from './nz-tree-base.service';\nexport * from './nz-tree-service.resolver';\nexport * from './nz-tree-base';\nexport * from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