{"version":3,"sources":["webpack:///../../../src/components/VTreeview/VTreeviewNode.ts","webpack:///../../../../src/components/VTreeview/util/filterTreeItems.ts","webpack:///../../../src/components/VTreeview/VTreeview.ts"],"names":["baseMixins","mixins","VTreeviewNodeProps","activatable","activeClass","type","default","color","expandIcon","indeterminateIcon","itemChildren","itemDisabled","itemKey","itemText","loadChildren","loadingIcon","offIcon","onIcon","openOnClick","rounded","selectable","selectedColor","shaped","transition","selectionType","validator","v","includes","VTreeviewNode","name","inject","treeview","props","level","item","parentIsDisabled","data","hasLoaded","isActive","isIndeterminate","isLoading","isOpen","isSelected","computed","disabled","this","key","children","child","text","scopedProps","leaf","selected","indeterminate","active","open","computedIcon","hasChildren","created","beforeDestroy","methods","checkChildren","Promise","resolve","genLabel","$scopedSlots","label","$createElement","slot","staticClass","genPrependSlot","prepend","genAppendSlot","append","genContent","genToggle","VIcon","class","on","click","e","genCheckbox","genLevel","genNode","setTextColor","genChild","scopedSlots","genChildrenWrapper","map","c","genTransition","render","h","attrs","String","search","filter","match","i","filterTreeItems","excluded","provide","dense","hoverable","items","multipleActive","openAll","returnObject","value","activeCache","nodes","openCache","selectedCache","Set","excludedItems","watch","handler","oldKeys","Object","k","newKeys","getKeys","diff","oldSelectedCache","emitSelected","deep","getValue","mounted","$slots","console","updateAll","keys","buildTree","parent","oldNode","hasOwnProperty","vnode","node","calculateState","add","state","counts","Boolean","emitOpen","emitActive","emitNodeCache","handleNodeCacheWatcher","old","updateFn","emitFn","getDescendants","descendants","getParents","parents","register","unregister","isParent","updateActive","delete","updateSelected","isForced","changed","descendant","calculated","updateOpen","updateVnodeState","isExcluded","has","length","themeClasses"],"mappings":"0ZAmBMA,EAAa,OAAAC,EAAA,MAAO,EAAD,KAEvB,eAFF,aASaC,EAAqB,CAChCC,YADgC,QAEhCC,YAAa,CACXC,KADW,OAEXC,QAAS,2BAEXC,MAAO,CACLF,KADK,OAELC,QAAS,WAEXE,WAAY,CACVH,KADU,OAEVC,QAAS,aAEXG,k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S,GACd,IAAM5B,EAAO5F,KAAKiE,MAAlB,GAEI2B,GAAQA,EAAZ,QACEA,EAAA,iBAAwBA,EAAxB,WACAA,EAAA,sBAA6BA,EAA7B,gBACAA,EAAA,eAAsBA,EAAtB,SACAA,EAAA,aAAoBA,EAApB,SAGJ6B,WAhOO,SAgOG,GACR,QAASzH,KAAF,QAAiBA,KAAKqE,cAAcqD,IAA3C,KAIJ5E,OA1WO,SA0WD,GAAG,WACD5C,EAAuCF,KAAK2D,MAAMgE,OACpD3H,KAAK2D,MAAMR,QAAO,SAAA9D,GAClB,OAAQ,aAAgB,eAAqBA,EAAM,EAAnD,aADA,KAEK,SAAAA,GACL,IAAMmD,EAAW,gCAAjB,GAEA,OAAOA,EAASnD,EAAM,eAAqBA,EAAM,EAAjD,kBAGAW,KAAKmF,OAVF,QAYP,OAAOpC,EAAE,MAAO,CACdvB,YADc,aAEdQ,MAAO,gBACL,wBAAyBhC,KADpB,UAEL,oBAAqBA,KAFhB,OAGFA,KAAK4H,eALZ,O","file":"js/chunk-4542a23b.4c4b566c.js","sourcesContent":["// Components\nimport { VExpandTransition } from '../transitions'\nimport { VIcon } from '../VIcon'\nimport VTreeview from './VTreeview'\n\n// Mixins\nimport { inject as RegistrableInject } from '../../mixins/registrable'\nimport Colorable from '../../mixins/colorable'\n\n// Utils\nimport mixins, { ExtractVue } from '../../util/mixins'\nimport { getObjectValueByPath, createRange } from '../../util/helpers'\n\n// Types\nimport { VNode, VNodeChildren, PropType } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\ntype VTreeViewInstance = InstanceType\n\nconst baseMixins = mixins(\n Colorable,\n RegistrableInject('treeview')\n)\n\ninterface options extends ExtractVue {\n treeview: VTreeViewInstance\n}\n\nexport const VTreeviewNodeProps = {\n activatable: Boolean,\n activeClass: {\n type: String,\n default: 'v-treeview-node--active',\n },\n color: {\n type: String,\n default: 'primary',\n },\n expandIcon: {\n type: String,\n default: '$subgroup',\n },\n indeterminateIcon: {\n type: String,\n default: '$checkboxIndeterminate',\n },\n itemChildren: {\n type: String,\n default: 'children',\n },\n itemDisabled: {\n type: String,\n default: 'disabled',\n },\n itemKey: {\n type: String,\n default: 'id',\n },\n itemText: {\n type: String,\n default: 'name',\n },\n loadChildren: Function as PropType<(item: any) => Promise>,\n loadingIcon: {\n type: String,\n default: '$loading',\n },\n offIcon: {\n type: String,\n default: '$checkboxOff',\n },\n onIcon: {\n type: String,\n default: '$checkboxOn',\n },\n openOnClick: Boolean,\n rounded: Boolean,\n selectable: Boolean,\n selectedColor: {\n type: String,\n default: 'accent',\n },\n shaped: Boolean,\n transition: Boolean,\n selectionType: {\n type: String as PropType<'leaf' | 'independent'>,\n default: 'leaf',\n validator: (v: string) => ['leaf', 'independent'].includes(v),\n },\n}\n\n/* @vue/component */\nconst VTreeviewNode = baseMixins.extend().extend({\n name: 'v-treeview-node',\n\n inject: {\n treeview: {\n default: null,\n },\n },\n\n props: {\n level: Number,\n item: {\n type: Object,\n default: () => null,\n } as PropValidator | null>,\n parentIsDisabled: Boolean,\n ...VTreeviewNodeProps,\n },\n\n data: () => ({\n hasLoaded: false,\n isActive: false, // Node is selected (row)\n isIndeterminate: false, // Node has at least one selected child\n isLoading: false,\n isOpen: false, // Node is open/expanded\n isSelected: false, // Node is selected (checkbox)\n }),\n\n computed: {\n disabled (): boolean {\n return (\n getObjectValueByPath(this.item, this.itemDisabled) ||\n (this.parentIsDisabled && this.selectionType === 'leaf')\n )\n },\n key (): string {\n return getObjectValueByPath(this.item, this.itemKey)\n },\n children (): any[] | null {\n const children = getObjectValueByPath(this.item, this.itemChildren)\n return children && children.filter((child: any) => !this.treeview.isExcluded(getObjectValueByPath(child, this.itemKey)))\n },\n text (): string {\n return getObjectValueByPath(this.item, this.itemText)\n },\n scopedProps (): object {\n return {\n item: this.item,\n leaf: !this.children,\n selected: this.isSelected,\n indeterminate: this.isIndeterminate,\n active: this.isActive,\n open: this.isOpen,\n }\n },\n computedIcon (): string {\n if (this.isIndeterminate) return this.indeterminateIcon\n else if (this.isSelected) return this.onIcon\n else return this.offIcon\n },\n hasChildren (): boolean {\n return !!this.children && (!!this.children.length || !!this.loadChildren)\n },\n },\n\n created () {\n this.treeview.register(this)\n },\n\n beforeDestroy () {\n this.treeview.unregister(this)\n },\n\n methods: {\n checkChildren (): Promise {\n return new Promise(resolve => {\n // TODO: Potential issue with always trying\n // to load children if response is empty?\n if (!this.children || this.children.length || !this.loadChildren || this.hasLoaded) return resolve()\n\n this.isLoading = true\n resolve(this.loadChildren(this.item))\n }).then(() => {\n this.isLoading = false\n this.hasLoaded = true\n })\n },\n open () {\n this.isOpen = !this.isOpen\n this.treeview.updateOpen(this.key, this.isOpen)\n this.treeview.emitOpen()\n },\n genLabel () {\n const children = []\n\n if (this.$scopedSlots.label) children.push(this.$scopedSlots.label(this.scopedProps))\n else children.push(this.text)\n\n return this.$createElement('div', {\n slot: 'label',\n staticClass: 'v-treeview-node__label',\n }, children)\n },\n genPrependSlot () {\n if (!this.$scopedSlots.prepend) return null\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__prepend',\n }, this.$scopedSlots.prepend(this.scopedProps))\n },\n genAppendSlot () {\n if (!this.$scopedSlots.append) return null\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__append',\n }, this.$scopedSlots.append(this.scopedProps))\n },\n genContent () {\n const children = [\n this.genPrependSlot(),\n this.genLabel(),\n this.genAppendSlot(),\n ]\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__content',\n }, children)\n },\n genToggle () {\n return this.$createElement(VIcon, {\n staticClass: 'v-treeview-node__toggle',\n class: {\n 'v-treeview-node__toggle--open': this.isOpen,\n 'v-treeview-node__toggle--loading': this.isLoading,\n },\n slot: 'prepend',\n on: {\n click: (e: MouseEvent) => {\n e.stopPropagation()\n\n if (this.isLoading) return\n\n this.checkChildren().then(() => this.open())\n },\n },\n }, [this.isLoading ? this.loadingIcon : this.expandIcon])\n },\n genCheckbox () {\n return this.$createElement(VIcon, {\n staticClass: 'v-treeview-node__checkbox',\n props: {\n color: this.isSelected || this.isIndeterminate ? this.selectedColor : undefined,\n disabled: this.disabled,\n },\n on: {\n click: (e: MouseEvent) => {\n e.stopPropagation()\n\n if (this.isLoading) return\n\n this.checkChildren().then(() => {\n // We nextTick here so that items watch in VTreeview has a chance to run first\n this.$nextTick(() => {\n this.isSelected = !this.isSelected\n this.isIndeterminate = false\n\n this.treeview.updateSelected(this.key, this.isSelected)\n this.treeview.emitSelected()\n })\n })\n },\n },\n }, [this.computedIcon])\n },\n genLevel (level: number) {\n return createRange(level).map(() => this.$createElement('div', {\n staticClass: 'v-treeview-node__level',\n }))\n },\n genNode () {\n const children = [this.genContent()]\n\n if (this.selectable) children.unshift(this.genCheckbox())\n\n if (this.hasChildren) {\n children.unshift(this.genToggle())\n } else {\n children.unshift(...this.genLevel(1))\n }\n\n children.unshift(...this.genLevel(this.level))\n\n return this.$createElement('div', this.setTextColor(this.isActive && this.color, {\n staticClass: 'v-treeview-node__root',\n class: {\n [this.activeClass]: this.isActive,\n },\n on: {\n click: () => {\n if (this.openOnClick && this.hasChildren) {\n this.checkChildren().then(this.open)\n } else if (this.activatable && !this.disabled) {\n this.isActive = !this.isActive\n this.treeview.updateActive(this.key, this.isActive)\n this.treeview.emitActive()\n }\n },\n },\n }), children)\n },\n genChild (item: any, parentIsDisabled: boolean) {\n return this.$createElement(VTreeviewNode, {\n key: getObjectValueByPath(item, this.itemKey),\n props: {\n activatable: this.activatable,\n activeClass: this.activeClass,\n item,\n selectable: this.selectable,\n selectedColor: this.selectedColor,\n color: this.color,\n expandIcon: this.expandIcon,\n indeterminateIcon: this.indeterminateIcon,\n offIcon: this.offIcon,\n onIcon: this.onIcon,\n loadingIcon: this.loadingIcon,\n itemKey: this.itemKey,\n itemText: this.itemText,\n itemDisabled: this.itemDisabled,\n itemChildren: this.itemChildren,\n loadChildren: this.loadChildren,\n transition: this.transition,\n openOnClick: this.openOnClick,\n rounded: this.rounded,\n shaped: this.shaped,\n level: this.level + 1,\n selectionType: this.selectionType,\n parentIsDisabled,\n },\n scopedSlots: this.$scopedSlots,\n })\n },\n genChildrenWrapper () {\n if (!this.isOpen || !this.children) return null\n\n const children = [this.children.map(c => this.genChild(c, this.disabled))]\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__children',\n }, children)\n },\n genTransition () {\n return this.$createElement(VExpandTransition, [this.genChildrenWrapper()])\n },\n },\n\n render (h): VNode {\n const children: VNodeChildren = [this.genNode()]\n\n if (this.transition) children.push(this.genTransition())\n else children.push(this.genChildrenWrapper())\n\n return h('div', {\n staticClass: 'v-treeview-node',\n class: {\n 'v-treeview-node--leaf': !this.hasChildren,\n 'v-treeview-node--click': this.openOnClick,\n 'v-treeview-node--disabled': this.disabled,\n 'v-treeview-node--rounded': this.rounded,\n 'v-treeview-node--shaped': this.shaped,\n 'v-treeview-node--selected': this.isSelected,\n },\n attrs: {\n 'aria-expanded': String(this.isOpen),\n },\n }, children)\n },\n})\n\nexport default VTreeviewNode\n","import { getObjectValueByPath } from '../../../util/helpers'\nimport { TreeviewItemFunction } from 'vuetify/types'\n\nexport function filterTreeItem (item: object, search: string, textKey: string): boolean {\n const text = getObjectValueByPath(item, textKey)\n\n return text.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n}\n\nexport function filterTreeItems (\n filter: TreeviewItemFunction,\n item: any,\n search: string,\n idKey: string,\n textKey: string,\n childrenKey: string,\n excluded: Set\n): boolean {\n if (filter(item, search, textKey)) {\n return true\n }\n\n const children = getObjectValueByPath(item, childrenKey)\n\n if (children) {\n let match = false\n for (let i = 0; i < children.length; i++) {\n if (filterTreeItems(filter, children[i], search, idKey, textKey, childrenKey, excluded)) {\n match = true\n }\n }\n\n if (match) return true\n }\n\n excluded.add(getObjectValueByPath(item, idKey))\n\n return false\n}\n","// Styles\nimport './VTreeview.sass'\n\n// Types\nimport { VNode, VNodeChildrenArrayContents, PropType } from 'vue'\nimport { PropValidator } from 'vue/types/options'\nimport { TreeviewItemFunction } from 'vuetify/types'\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 filterTreeItem,\n} from './util/filterTreeItems'\n\ntype VTreeviewNodeInstance = InstanceType\n\ntype NodeCache = Set\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,\n dense: Boolean,\n filter: Function as PropType,\n hoverable: Boolean,\n items: {\n type: Array,\n default: () => ([]),\n } as PropValidator,\n multipleActive: Boolean,\n open: {\n type: Array,\n default: () => ([]),\n } as PropValidator,\n openAll: Boolean,\n returnObject: {\n type: Boolean,\n default: false, // TODO: Should be true in next major\n },\n search: String,\n value: {\n type: Array,\n default: () => ([]),\n } as PropValidator,\n ...VTreeviewNodeProps,\n },\n\n data: () => ({\n level: -1,\n activeCache: new Set() as NodeCache,\n nodes: {} as Record,\n openCache: new Set() as NodeCache,\n selectedCache: new Set() as NodeCache,\n }),\n\n computed: {\n excludedItems (): Set {\n const excluded = new Set()\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 const getValue = (key: string | number) => this.returnObject ? getObjectValueByPath(key, this.itemKey) : key\n\n this.buildTree(this.items)\n\n for (const value of this.value.map(getValue)) {\n this.updateSelected(value, true, true)\n }\n\n for (const active of this.active.map(getValue)) {\n this.updateActive(active, true)\n }\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(this.returnObject ? getObjectValueByPath(key, this.itemKey) : 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 } 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] = node\n\n if (children.length) {\n const { isSelected, isIndeterminate } = this.calculateState(key, this.nodes)\n\n node.isSelected = isSelected\n node.isIndeterminate = isIndeterminate\n }\n\n // Don't forget to rebuild cache\n if (this.nodes[key].isSelected && (this.selectionType === 'independent' || node.children.length === 0)) 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: string | number, state: Record) {\n const children = state[node].children\n const counts = children.reduce((counts: number[], child: string | number) => {\n counts[0] += +Boolean(state[child].isSelected)\n counts[1] += +Boolean(state[child].isIndeterminate)\n\n return counts\n }, [0, 0])\n\n const isSelected = !!children.length && counts[0] === children.length\n const isIndeterminate = !isSelected && (counts[0] > 0 || counts[1] > 0)\n\n return {\n isSelected,\n isIndeterminate,\n }\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, isForced = false) {\n if (!this.nodes.hasOwnProperty(key)) return\n\n const changed = new Map()\n\n if (this.selectionType !== 'independent') {\n for (const descendant of this.getDescendants(key)) {\n if (!getObjectValueByPath(this.nodes[descendant].item, this.itemDisabled) || isForced) {\n this.nodes[descendant].isSelected = isSelected\n this.nodes[descendant].isIndeterminate = false\n changed.set(descendant, isSelected)\n }\n }\n\n const calculated = this.calculateState(key, this.nodes)\n this.nodes[key].isSelected = isSelected\n this.nodes[key].isIndeterminate = calculated.isIndeterminate\n changed.set(key, isSelected)\n\n for (const parent of this.getParents(key)) {\n const calculated = this.calculateState(parent, this.nodes)\n this.nodes[parent].isSelected = calculated.isSelected\n this.nodes[parent].isIndeterminate = calculated.isIndeterminate\n changed.set(parent, calculated.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.filter(item => {\n return !this.isExcluded(getObjectValueByPath(item, this.itemKey))\n }).map(item => {\n const genChild = VTreeviewNode.options.methods.genChild.bind(this)\n\n return genChild(item, getObjectValueByPath(item, this.itemDisabled))\n })\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":""}