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ue/types/options'\n\n// Components\nimport VTreeviewNode, { VTreeviewNodeProps } from './VTreeviewNode'\n\n// Mixins\nimport Themeable from '../../mixins/themeable'\nimport { provide as RegistrableProvide } from '../../mixins/registrable'\n\n// Utils\nimport {\n arrayDiff,\n deepEqual,\n getObjectValueByPath,\n} from '../../util/helpers'\nimport mixins from '../../util/mixins'\nimport { consoleWarn } from '../../util/console'\nimport {\n filterTreeItems,\n FilterTreeItemFunction,\n filterTreeItem,\n} from './util/filterTreeItems'\n\ntype VTreeviewNodeInstance = InstanceType<typeof VTreeviewNode>\n\ntype NodeCache = Set<string | number>\ntype NodeArray = (string | number)[]\n\ntype NodeState = {\n parent: number | string | null\n children: (number | string)[]\n vnode: VTreeviewNodeInstance | null\n isActive: boolean\n isSelected: boolean\n isIndeterminate: boolean\n isOpen: boolean\n item: any\n}\n\nexport default mixins(\n RegistrableProvide('treeview'),\n Themeable\n /* @vue/component */\n).extend({\n name: 'v-treeview',\n\n provide (): object {\n return { treeview: this }\n },\n\n props: {\n active: {\n type: Array,\n default: () => ([]),\n } as PropValidator<NodeArray>,\n dense: Boolean,\n filter: Function as PropValidator<FilterTreeItemFunction>,\n hoverable: Boolean,\n items: {\n type: Array,\n default: () => ([]),\n } as PropValidator<any[]>,\n multipleActive: Boolean,\n open: {\n type: Array,\n default: () => ([]),\n } as PropValidator<NodeArray>,\n openAll: Boolean,\n returnObject: {\n type: Boolean,\n default: false, // TODO: Should be true in next major\n },\n search: String,\n selectionType: {\n type: String,\n default: 'leaf',\n validator: (v: string) => ['leaf', 'independent'].includes(v),\n } as PropValidator<'leaf' | 'independent'>,\n value: {\n type: Array,\n default: () => ([]),\n } as PropValidator<NodeArray>,\n ...VTreeviewNodeProps,\n },\n\n data: () => ({\n activeCache: new Set() as NodeCache,\n nodes: {} as Record<string | number, NodeState>,\n openCache: new Set() as NodeCache,\n selectedCache: new Set() as NodeCache,\n }),\n\n computed: {\n excludedItems (): Set<string | number> {\n const excluded = new Set<string|number>()\n\n if (!this.search) return excluded\n\n for (let i = 0; i < this.items.length; i++) {\n filterTreeItems(\n this.filter || filterTreeItem,\n this.items[i],\n this.search,\n this.itemKey,\n this.itemText,\n this.itemChildren,\n excluded\n )\n }\n\n return excluded\n },\n },\n\n watch: {\n items: {\n handler () {\n const oldKeys = Object.keys(this.nodes).map(k => getObjectValueByPath(this.nodes[k].item, this.itemKey))\n const newKeys = this.getKeys(this.items)\n const diff = arrayDiff(newKeys, oldKeys)\n\n // We only want to do stuff if items have changed\n if (!diff.length && newKeys.length < oldKeys.length) return\n\n // If nodes are removed we need to clear them from this.nodes\n diff.forEach(k => delete this.nodes[k])\n\n const oldSelectedCache = [...this.selectedCache]\n this.selectedCache = new Set()\n this.activeCache = new Set()\n this.openCache = new Set()\n this.buildTree(this.items)\n\n // Only emit selected if selection has changed\n // as a result of items changing. This fixes a\n // potential double emit when selecting a node\n // with dynamic children\n if (!deepEqual(oldSelectedCache, [...this.selectedCache])) this.emitSelected()\n },\n deep: true,\n },\n active (value: (string | number | any)[]) {\n this.handleNodeCacheWatcher(value, this.activeCache, this.updateActive, this.emitActive)\n },\n value (value: (string | number | any)[]) {\n this.handleNodeCacheWatcher(value, this.selectedCache, this.updateSelected, this.emitSelected)\n },\n open (value: (string | number | any)[]) {\n this.handleNodeCacheWatcher(value, this.openCache, this.updateOpen, this.emitOpen)\n },\n },\n\n created () {\n this.buildTree(this.items)\n this.value.forEach(key => this.updateSelected(key, true))\n this.active.forEach(key => this.updateActive(key, true))\n },\n\n mounted () {\n // Save the developer from themselves\n if (this.$slots.prepend || this.$slots.append) {\n consoleWarn('The prepend and append slots require a slot-scope attribute', this)\n }\n\n if (this.openAll) {\n this.updateAll(true)\n } else {\n this.open.forEach(key => this.updateOpen(key, true))\n this.emitOpen()\n }\n },\n\n methods: {\n /** @public */\n updateAll (value: boolean) {\n Object.keys(this.nodes).forEach(key => this.updateOpen(getObjectValueByPath(this.nodes[key].item, this.itemKey), value))\n this.emitOpen()\n },\n getKeys (items: any[], keys: any[] = []) {\n for (let i = 0; i < items.length; i++) {\n const key = getObjectValueByPath(items[i], this.itemKey)\n keys.push(key)\n const children = getObjectValueByPath(items[i], this.itemChildren)\n if (children) {\n keys.push(...this.getKeys(children))\n }\n }\n\n return keys\n },\n buildTree (items: any[], parent: (string | number | null) = null) {\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n const key = getObjectValueByPath(item, this.itemKey)\n const children = getObjectValueByPath(item, this.itemChildren, [])\n const oldNode = this.nodes.hasOwnProperty(key) ? this.nodes[key] : {\n isSelected: false, isIndeterminate: false, isActive: false, isOpen: false, vnode: null,\n } as NodeState\n\n const node: any = {\n vnode: oldNode.vnode,\n parent,\n children: children.map((c: any) => getObjectValueByPath(c, this.itemKey)),\n item,\n }\n\n this.buildTree(children, key)\n\n // This fixed bug with dynamic children resetting selected parent state\n if (!this.nodes.hasOwnProperty(key) && parent !== null && this.nodes.hasOwnProperty(parent)) {\n node.isSelected = this.nodes[parent].isSelected\n node.isIndeterminate = this.nodes[parent].isIndeterminate\n } else {\n node.isSelected = oldNode.isSelected\n node.isIndeterminate = oldNode.isIndeterminate\n }\n\n node.isActive = oldNode.isActive\n node.isOpen = oldNode.isOpen\n\n this.nodes[key] = !children.length ? node : this.calculateState(node, this.nodes)\n\n // Don't forget to rebuild cache\n if (this.nodes[key].isSelected) this.selectedCache.add(key)\n if (this.nodes[key].isActive) this.activeCache.add(key)\n if (this.nodes[key].isOpen) this.openCache.add(key)\n\n this.updateVnodeState(key)\n }\n },\n calculateState (node: NodeState, state: Record<string | number, NodeState>) {\n const counts = node.children.reduce((counts: number[], child: string | number) => {\n counts[0] += +Boolean(state[child].isSelected)\n counts[1] += +Boolean(state[child].isIndeterminate)\n return counts\n }, [0, 0])\n\n node.isSelected = !!node.children.length && counts[0] === node.children.length\n node.isIndeterminate = !node.isSelected && (counts[0] > 0 || counts[1] > 0)\n\n return node\n },\n emitOpen () {\n this.emitNodeCache('update:open', this.openCache)\n },\n emitSelected () {\n this.emitNodeCache('input', this.selectedCache)\n },\n emitActive () {\n this.emitNodeCache('update:active', this.activeCache)\n },\n emitNodeCache (event: string, cache: NodeCache) {\n this.$emit(event, this.returnObject ? [...cache].map(key => this.nodes[key].item) : [...cache])\n },\n handleNodeCacheWatcher (value: any[], cache: NodeCache, updateFn: Function, emitFn: Function) {\n value = this.returnObject ? value.map(v => getObjectValueByPath(v, this.itemKey)) : value\n const old = [...cache]\n if (deepEqual(old, value)) return\n\n old.forEach(key => updateFn(key, false))\n value.forEach(key => updateFn(key, true))\n\n emitFn()\n },\n getDescendants (key: string | number, descendants: NodeArray = []) {\n const children = this.nodes[key].children\n\n descendants.push(...children)\n\n for (let i = 0; i < children.length; i++) {\n descendants = this.getDescendants(children[i], descendants)\n }\n\n return descendants\n },\n getParents (key: string | number) {\n let parent = this.nodes[key].parent\n\n const parents = []\n while (parent !== null) {\n parents.push(parent)\n parent = this.nodes[parent].parent\n }\n\n return parents\n },\n register (node: VTreeviewNodeInstance) {\n const key = getObjectValueByPath(node.item, this.itemKey)\n this.nodes[key].vnode = node\n\n this.updateVnodeState(key)\n },\n unregister (node: VTreeviewNodeInstance) {\n const key = getObjectValueByPath(node.item, this.itemKey)\n if (this.nodes[key]) this.nodes[key].vnode = null\n },\n isParent (key: string | number) {\n return this.nodes[key].children && this.nodes[key].children.length\n },\n updateActive (key: string | number, isActive: boolean) {\n if (!this.nodes.hasOwnProperty(key)) return\n\n if (!this.multipleActive) {\n this.activeCache.forEach(active => {\n this.nodes[active].isActive = false\n this.updateVnodeState(active)\n this.activeCache.delete(active)\n })\n }\n\n const node = this.nodes[key]\n if (!node) return\n\n if (isActive) this.activeCache.add(key)\n else this.activeCache.delete(key)\n\n node.isActive = isActive\n\n this.updateVnodeState(key)\n },\n updateSelected (key: string | number, isSelected: boolean) {\n if (!this.nodes.hasOwnProperty(key)) return\n\n const changed = new Map()\n\n if (this.selectionType !== 'independent') {\n const descendants = [key, ...this.getDescendants(key)]\n descendants.forEach(descendant => {\n this.nodes[descendant].isSelected = isSelected\n this.nodes[descendant].isIndeterminate = false\n changed.set(descendant, isSelected)\n })\n\n const parents = this.getParents(key)\n parents.forEach(parent => {\n this.nodes[parent] = this.calculateState(this.nodes[parent], this.nodes)\n changed.set(parent, this.nodes[parent].isSelected)\n })\n } else {\n this.nodes[key].isSelected = isSelected\n this.nodes[key].isIndeterminate = false\n changed.set(key, isSelected)\n }\n\n for (const [key, value] of changed.entries()) {\n this.updateVnodeState(key)\n\n if (this.selectionType === 'leaf' && this.isParent(key)) continue\n\n value === true ? this.selectedCache.add(key) : this.selectedCache.delete(key)\n }\n },\n updateOpen (key: string | number, isOpen: boolean) {\n if (!this.nodes.hasOwnProperty(key)) return\n\n const node = this.nodes[key]\n const children = getObjectValueByPath(node.item, this.itemChildren)\n\n if (children && !children.length && node.vnode && !node.vnode.hasLoaded) {\n node.vnode.checkChildren().then(() => this.updateOpen(key, isOpen))\n } else if (children && children.length) {\n node.isOpen = isOpen\n\n node.isOpen ? this.openCache.add(key) : this.openCache.delete(key)\n\n this.updateVnodeState(key)\n }\n },\n updateVnodeState (key: string | number) {\n const node = this.nodes[key]\n\n if (node && node.vnode) {\n node.vnode.isSelected = node.isSelected\n node.vnode.isIndeterminate = node.isIndeterminate\n node.vnode.isActive = node.isActive\n node.vnode.isOpen = node.isOpen\n }\n },\n isExcluded (key: string | number) {\n return !!this.search && this.excludedItems.has(key)\n },\n },\n\n render (h): VNode {\n const children: VNodeChildrenArrayContents = this.items.length\n ? this.items.map(VTreeviewNode.options.methods.genChild.bind(this))\n /* istanbul ignore next */\n : this.$slots.default! // TODO: remove type annotation with TS 3.2\n\n return h('div', {\n staticClass: 'v-treeview',\n class: {\n 'v-treeview--hoverable': this.hoverable,\n 'v-treeview--dense': this.dense,\n ...this.themeClasses,\n },\n }, children)\n },\n})\n"],"sourceRoot":"","file":"VTreeview.js"} |