UNPKG

ng-zorro-antd-yj

Version:

An enterprise-class UI components based on Ant Design and Angular

837 lines 65.8 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; import { isNotNil } from '../core/util/check'; import { NzTreeNode } from './nz-tree-node'; import { isCheckDisabled, isInArray } from './nz-tree-util'; export class NzTreeBaseService { constructor() { this.DRAG_SIDE_RANGE = 0.25; this.DRAG_MIN_GAP = 2; this.isCheckStrictly = false; this.isMultiple = false; this.rootNodes = []; this.selectedNodeList = []; this.expandedNodeList = []; this.checkedNodeList = []; this.halfCheckedNodeList = []; this.matchedNodeList = []; this.triggerEventChange$ = new Subject(); } /** * trigger event * @return {?} */ eventTriggerChanged() { return this.triggerEventChange$.asObservable(); } /** * reset tree nodes will clear default node list * @param {?} nzNodes * @return {?} */ initTree(nzNodes) { this.rootNodes = nzNodes; this.expandedNodeList = []; this.selectedNodeList = []; this.halfCheckedNodeList = []; this.checkedNodeList = []; this.matchedNodeList = []; // refresh node checked state setTimeout((/** * @return {?} */ () => { this.refreshCheckState(this.isCheckStrictly); })); } /** * @return {?} */ getSelectedNode() { return this.selectedNode; } /** * get some list * @return {?} */ getSelectedNodeList() { return this.conductNodeState('select'); } /** * return checked nodes * @return {?} */ getCheckedNodeList() { return this.conductNodeState('check'); } /** * @return {?} */ getHalfCheckedNodeList() { return this.conductNodeState('halfCheck'); } /** * return expanded nodes * @return {?} */ getExpandedNodeList() { return this.conductNodeState('expand'); } /** * return search matched nodes * @return {?} */ getMatchedNodeList() { return this.conductNodeState('match'); } // tslint:disable-next-line:no-any /** * @param {?} value * @return {?} */ isArrayOfNzTreeNode(value) { return value.every((/** * @param {?} item * @return {?} */ item => item instanceof NzTreeNode)); } /** * reset selectedNodeList * @param {?} selectedKeys * @param {?} nzNodes * @param {?=} isMulti * @return {?} */ calcSelectedKeys(selectedKeys, nzNodes, isMulti = false) { /** @type {?} */ const calc = (/** * @param {?} nodes * @return {?} */ (nodes) => { return nodes.every((/** * @param {?} node * @return {?} */ node => { if (isInArray(node.key, selectedKeys)) { node.isSelected = true; if (!isMulti) { // if not support multi select return false; } } else { node.isSelected = false; } if (node.children.length > 0) { // Recursion return calc(node.children); } return true; })); }); calc(nzNodes); } /** * reset expandedNodeList * @param {?} expandedKeys * @param {?} nzNodes * @return {?} */ calcExpandedKeys(expandedKeys, nzNodes) { this.expandedNodeList = []; /** @type {?} */ const calc = (/** * @param {?} nodes * @return {?} */ (nodes) => { nodes.forEach((/** * @param {?} node * @return {?} */ node => { if (isInArray(node.key, expandedKeys)) { node.isExpanded = true; } else { node.isExpanded = false; } if (node.children.length > 0) { calc(node.children); } })); }); calc(nzNodes); } /** * reset checkedNodeList * @param {?} checkedKeys * @param {?} nzNodes * @param {?=} isCheckStrictly * @return {?} */ calcCheckedKeys(checkedKeys, nzNodes, isCheckStrictly = false) { this.checkedNodeList = []; this.halfCheckedNodeList = []; /** @type {?} */ const calc = (/** * @param {?} nodes * @return {?} */ (nodes) => { nodes.forEach((/** * @param {?} node * @return {?} */ node => { if (isInArray(node.key, checkedKeys)) { node.isChecked = true; node.isHalfChecked = false; } else { node.isChecked = false; node.isHalfChecked = false; } if (node.children.length > 0) { calc(node.children); } })); }); calc(nzNodes); // controlled state this.refreshCheckState(isCheckStrictly); } /** * set drag node * @param {?} node * @return {?} */ setSelectedNode(node) { this.selectedNode = node; } /** * set node selected status * @param {?} node * @return {?} */ setNodeActive(node) { if (!this.isMultiple && node.isSelected) { this.selectedNodeList.forEach((/** * @param {?} n * @return {?} */ n => { if (node.key !== n.key) { // reset other nodes n.isSelected = false; } })); // single mode: remove pre node this.selectedNodeList = []; } this.setSelectedNodeList(node, this.isMultiple); } /** * add or remove node to selectedNodeList * @param {?} node * @param {?=} isMultiple * @return {?} */ setSelectedNodeList(node, isMultiple = false) { /** @type {?} */ const index = this.selectedNodeList.findIndex((/** * @param {?} n * @return {?} */ n => node.key === n.key)); if (isMultiple) { if (node.isSelected && index === -1) { this.selectedNodeList.push(node); } } else { if (node.isSelected && index === -1) { this.selectedNodeList = [node]; } } if (!node.isSelected) { this.selectedNodeList = this.selectedNodeList.filter((/** * @param {?} n * @return {?} */ n => n.key !== node.key)); } } /** * merge checked nodes * @param {?} node * @return {?} */ setHalfCheckedNodeList(node) { /** @type {?} */ const index = this.halfCheckedNodeList.findIndex((/** * @param {?} n * @return {?} */ n => node.key === n.key)); if (node.isHalfChecked && index === -1) { this.halfCheckedNodeList.push(node); } else if (!node.isHalfChecked && index > -1) { this.halfCheckedNodeList = this.halfCheckedNodeList.filter((/** * @param {?} n * @return {?} */ n => node.key !== n.key)); } } /** * @param {?} node * @return {?} */ setCheckedNodeList(node) { /** @type {?} */ const index = this.checkedNodeList.findIndex((/** * @param {?} n * @return {?} */ n => node.key === n.key)); if (node.isChecked && index === -1) { this.checkedNodeList.push(node); } else if (!node.isChecked && index > -1) { this.checkedNodeList = this.checkedNodeList.filter((/** * @param {?} n * @return {?} */ n => node.key !== n.key)); } } /** * conduct checked/selected/expanded keys * @param {?=} type * @return {?} */ conductNodeState(type = 'check') { /** @type {?} */ let resultNodesList = []; switch (type) { case 'select': resultNodesList = this.selectedNodeList; break; case 'expand': resultNodesList = this.expandedNodeList; break; case 'match': resultNodesList = this.matchedNodeList; break; case 'check': resultNodesList = this.checkedNodeList; /** @type {?} */ const isIgnore = (/** * @param {?} node * @return {?} */ (node) => { /** @type {?} */ const parentNode = node.getParentNode(); if (parentNode) { if (this.checkedNodeList.findIndex((/** * @param {?} n * @return {?} */ n => n.key === parentNode.key)) > -1) { return true; } else { return isIgnore(parentNode); } } return false; }); // merge checked if (!this.isCheckStrictly) { resultNodesList = this.checkedNodeList.filter((/** * @param {?} n * @return {?} */ n => !isIgnore(n))); } break; case 'halfCheck': if (!this.isCheckStrictly) { resultNodesList = this.halfCheckedNodeList; } break; } return resultNodesList; } /** * set expanded nodes * @param {?} node * @return {?} */ setExpandedNodeList(node) { if (node.isLeaf) { return; } /** @type {?} */ const index = this.expandedNodeList.findIndex((/** * @param {?} n * @return {?} */ n => node.key === n.key)); if (node.isExpanded && index === -1) { this.expandedNodeList.push(node); } else if (!node.isExpanded && index > -1) { this.expandedNodeList = this.expandedNodeList.filter((/** * @param {?} n * @return {?} */ n => node.key !== n.key)); } } /** * check state * @param {?=} isCheckStrictly * @return {?} */ refreshCheckState(isCheckStrictly = false) { if (isCheckStrictly) { return; } this.checkedNodeList.forEach((/** * @param {?} node * @return {?} */ node => { this.conduct(node); })); } // reset other node checked state based current node /** * @param {?} node * @return {?} */ conduct(node) { /** @type {?} */ const isChecked = node.isChecked; if (node) { this.conductUp(node); this.conductDown(node, isChecked); } } /** * 1、children half checked * 2、children all checked, parent checked * 3、no children checked * @param {?} node * @return {?} */ conductUp(node) { /** @type {?} */ const parentNode = node.getParentNode(); // 全禁用节点不选中 if (parentNode) { if (!isCheckDisabled(parentNode)) { if (parentNode.children.every((/** * @param {?} child * @return {?} */ child => isCheckDisabled(child) || (!child.isHalfChecked && child.isChecked)))) { parentNode.isChecked = true; parentNode.isHalfChecked = false; } else if (parentNode.children.some((/** * @param {?} child * @return {?} */ child => child.isHalfChecked || child.isChecked))) { parentNode.isChecked = false; parentNode.isHalfChecked = true; } else { parentNode.isChecked = false; parentNode.isHalfChecked = false; } } this.setCheckedNodeList(parentNode); this.setHalfCheckedNodeList(parentNode); this.conductUp(parentNode); } } /** * reset child check state * @param {?} node * @param {?} value * @return {?} */ conductDown(node, value) { if (!isCheckDisabled(node)) { node.isChecked = value; node.isHalfChecked = false; this.setCheckedNodeList(node); this.setHalfCheckedNodeList(node); node.children.forEach((/** * @param {?} n * @return {?} */ n => { this.conductDown(n, value); })); } } /** * search value & expand node * should add expandlist * @param {?} value * @return {?} */ searchExpand(value) { this.matchedNodeList = []; /** @type {?} */ const expandedKeys = []; if (!isNotNil(value)) { return; } // to reset expandedNodeList /** @type {?} */ const expandParent = (/** * @param {?} n * @return {?} */ (n) => { // expand parent node /** @type {?} */ const parentNode = n.getParentNode(); if (parentNode) { expandedKeys.push(parentNode.key); expandParent(parentNode); } }); /** @type {?} */ const searchChild = (/** * @param {?} n * @return {?} */ (n) => { if (value && n.title.includes(value)) { // match the node n.isMatched = true; this.matchedNodeList.push(n); // expand parentNode expandParent(n); } else { n.isMatched = false; } n.children.forEach((/** * @param {?} child * @return {?} */ child => { searchChild(child); })); }); this.rootNodes.forEach((/** * @param {?} child * @return {?} */ child => { searchChild(child); })); // expand matched keys this.calcExpandedKeys(expandedKeys, this.rootNodes); } /** * flush after delete node * @param {?} nodes * @return {?} */ afterRemove(nodes) { // to reset selectedNodeList & expandedNodeList /** @type {?} */ const loopNode = (/** * @param {?} node * @return {?} */ (node) => { // remove selected node this.selectedNodeList = this.selectedNodeList.filter((/** * @param {?} n * @return {?} */ n => n.key !== node.key)); // remove expanded node this.expandedNodeList = this.expandedNodeList.filter((/** * @param {?} n * @return {?} */ n => n.key !== node.key)); // remove checked node this.checkedNodeList = this.checkedNodeList.filter((/** * @param {?} n * @return {?} */ n => n.key !== node.key)); if (node.children) { node.children.forEach((/** * @param {?} child * @return {?} */ child => { loopNode(child); })); } }); nodes.forEach((/** * @param {?} n * @return {?} */ n => { loopNode(n); })); this.refreshCheckState(this.isCheckStrictly); } /** * drag event * @param {?} node * @return {?} */ refreshDragNode(node) { if (node.children.length === 0) { // until root this.conductUp(node); } else { node.children.forEach((/** * @param {?} child * @return {?} */ child => { this.refreshDragNode(child); })); } } // reset node level /** * @param {?} node * @return {?} */ resetNodeLevel(node) { /** @type {?} */ const parentNode = node.getParentNode(); if (parentNode) { node.level = parentNode.level + 1; } else { node.level = 0; } for (const child of node.children) { this.resetNodeLevel(child); } } /** * @param {?} event * @return {?} */ calcDropPosition(event) { const { clientY } = event; // to fix firefox undefined const { top, bottom, height } = event.srcElement ? event.srcElement.getBoundingClientRect() : ((/** @type {?} */ (event.target))).getBoundingClientRect(); /** @type {?} */ const des = Math.max(height * this.DRAG_SIDE_RANGE, this.DRAG_MIN_GAP); if (clientY <= top + des) { return -1; } else if (clientY >= bottom - des) { return 1; } return 0; } /** * drop * 0: inner -1: pre 1: next * @param {?} targetNode * @param {?=} dragPos * @return {?} */ dropAndApply(targetNode, dragPos = -1) { if (!targetNode || dragPos > 1) { return; } /** @type {?} */ const treeService = targetNode.treeService; /** @type {?} */ const targetParent = targetNode.getParentNode(); /** @type {?} */ const isSelectedRootNode = this.selectedNode.getParentNode(); // remove the dragNode if (isSelectedRootNode) { isSelectedRootNode.children = isSelectedRootNode.children.filter((/** * @param {?} n * @return {?} */ n => n.key !== this.selectedNode.key)); } else { this.rootNodes = this.rootNodes.filter((/** * @param {?} n * @return {?} */ n => n.key !== this.selectedNode.key)); } switch (dragPos) { case 0: targetNode.addChildren([this.selectedNode]); this.resetNodeLevel(targetNode); break; case -1: case 1: /** @type {?} */ const tIndex = dragPos === 1 ? 1 : 0; if (targetParent) { targetParent.addChildren([this.selectedNode], targetParent.children.indexOf(targetNode) + tIndex); /** @type {?} */ const parentNode = this.selectedNode.getParentNode(); if (parentNode) { this.resetNodeLevel(parentNode); } } else { /** @type {?} */ const targetIndex = this.rootNodes.indexOf(targetNode) + tIndex; // 根节点插入 this.rootNodes.splice(targetIndex, 0, this.selectedNode); this.rootNodes[targetIndex].parentNode = null; this.rootNodes[targetIndex].level = 0; } break; } // flush all nodes this.rootNodes.forEach((/** * @param {?} child * @return {?} */ child => { if (!child.treeService) { child.service = treeService; } this.refreshDragNode(child); })); } /** * emit Structure * eventName * node * event: MouseEvent / DragEvent * dragNode * @param {?} eventName * @param {?} node * @param {?} event * @return {?} */ formatEvent(eventName, node, event) { /** @type {?} */ const emitStructure = { eventName: eventName, node: node, event: event }; switch (eventName) { case 'dragstart': case 'dragenter': case 'dragover': case 'dragleave': case 'drop': case 'dragend': Object.assign(emitStructure, { dragNode: this.getSelectedNode() }); break; case 'click': case 'dblclick': Object.assign(emitStructure, { selectedKeys: this.selectedNodeList }); Object.assign(emitStructure, { nodes: this.selectedNodeList }); Object.assign(emitStructure, { keys: this.selectedNodeList.map((/** * @param {?} n * @return {?} */ n => n.key)) }); break; case 'check': /** @type {?} */ const checkedNodeList = this.getCheckedNodeList(); Object.assign(emitStructure, { checkedKeys: checkedNodeList }); Object.assign(emitStructure, { nodes: checkedNodeList }); Object.assign(emitStructure, { keys: checkedNodeList.map((/** * @param {?} n * @return {?} */ n => n.key)) }); break; case 'search': Object.assign(emitStructure, { matchedKeys: this.getMatchedNodeList() }); Object.assign(emitStructure, { nodes: this.getMatchedNodeList() }); Object.assign(emitStructure, { keys: this.getMatchedNodeList().map((/** * @param {?} n * @return {?} */ n => n.key)) }); break; case 'expand': Object.assign(emitStructure, { nodes: this.expandedNodeList }); Object.assign(emitStructure, { keys: this.expandedNodeList.map((/** * @param {?} n * @return {?} */ n => n.key)) }); break; } return emitStructure; } /** * @return {?} */ ngOnDestroy() { this.triggerEventChange$.complete(); } } NzTreeBaseService.decorators = [ { type: Injectable } ]; if (false) { /** @type {?} */ NzTreeBaseService.prototype.DRAG_SIDE_RANGE; /** @type {?} */ NzTreeBaseService.prototype.DRAG_MIN_GAP; /** @type {?} */ NzTreeBaseService.prototype.isCheckStrictly; /** @type {?} */ NzTreeBaseService.prototype.isMultiple; /** @type {?} */ NzTreeBaseService.prototype.selectedNode; /** @type {?} */ NzTreeBaseService.prototype.rootNodes; /** @type {?} */ NzTreeBaseService.prototype.selectedNodeList; /** @type {?} */ NzTreeBaseService.prototype.expandedNodeList; /** @type {?} */ NzTreeBaseService.prototype.checkedNodeList; /** @type {?} */ NzTreeBaseService.prototype.halfCheckedNodeList; /** @type {?} */ NzTreeBaseService.prototype.matchedNodeList; /** @type {?} */ NzTreeBaseService.prototype.triggerEventChange$; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotdHJlZS1iYXNlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy16b3Jyby1h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