This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/mixins/dependent/index.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
3.5 KiB
Text

{"version":3,"sources":["../../../src/mixins/dependent/index.ts"],"names":[],"mappings":"AAEA,OAAO,MAAP,MAAmB,mBAAnB;;AAeA,SAAS,cAAT,CAAyB,QAAzB,EAAwC;AACtC,QAAM,OAAO,GAAG,EAAhB;;AACA,OAAK,IAAI,KAAK,GAAG,CAAjB,EAAoB,KAAK,GAAG,QAAQ,CAAC,MAArC,EAA6C,KAAK,EAAlD,EAAsD;AACpD,UAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,CAAtB;;AACA,QAAI,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,WAA5B,EAAyC;AACvC,MAAA,OAAO,CAAC,IAAR,CAAa,KAAb;AACD,KAFD,MAEO;AACL,MAAA,OAAO,CAAC,IAAR,CAAa,GAAG,cAAc,CAAC,KAAK,CAAC,SAAP,CAA9B;AACD;AACF;;AAED,SAAO,OAAP;AACD;AAED;;;AACA,eAAe,MAAM,GAAY,MAAlB,CAAyB;AACtC,EAAA,IAAI,EAAE,WADgC;;AAGtC,EAAA,IAAI,GAAA;AACF,WAAO;AACL,MAAA,eAAe,EAAE,IADZ;AAEL,MAAA,QAAQ,EAAE,KAFL;AAGL,MAAA,WAAW,EAAE;AAHR,KAAP;AAKD,GATqC;;AAWtC,EAAA,KAAK,EAAE;AACL,IAAA,QAAQ,CAAE,GAAF,EAAK;AACX,UAAI,GAAJ,EAAS;AAET,YAAM,cAAc,GAAG,KAAK,iBAAL,EAAvB;;AACA,WAAK,IAAI,KAAK,GAAG,CAAjB,EAAoB,KAAK,GAAG,cAAc,CAAC,MAA3C,EAAmD,KAAK,EAAxD,EAA4D;AAC1D,QAAA,cAAc,CAAC,KAAD,CAAd,CAAsB,QAAtB,GAAiC,KAAjC;AACD;AACF;;AARI,GAX+B;AAsBtC,EAAA,OAAO,EAAE;AACP,IAAA,iBAAiB,GAAA;AACf,UAAI,KAAK,eAAT,EAA0B,OAAO,cAAc,CAAC,KAAK,SAAN,CAArB;AAE1B,aAAO,EAAP;AACD,KALM;;AAMP,IAAA,wBAAwB,GAAA;AACtB,YAAM,MAAM,GAAG,EAAf;AACA,YAAM,cAAc,GAAG,KAAK,iBAAL,EAAvB;;AAEA,WAAK,IAAI,KAAK,GAAG,CAAjB,EAAoB,KAAK,GAAG,cAAc,CAAC,MAA3C,EAAmD,KAAK,EAAxD,EAA4D;AAC1D,QAAA,MAAM,CAAC,IAAP,CAAY,GAAG,cAAc,CAAC,KAAD,CAAd,CAAsB,6BAAtB,EAAf;AACD;;AAED,aAAO,MAAP;AACD,KAfM;;AAgBP,IAAA,6BAA6B,GAAA;AAC3B,YAAM,MAAM,GAAG,CAAC,KAAK,GAAN,CAAf;AACA,UAAI,KAAK,KAAL,CAAW,OAAf,EAAwB,MAAM,CAAC,IAAP,CAAY,KAAK,KAAL,CAAW,OAAvB;AACxB,UAAI,KAAK,OAAT,EAAkB,MAAM,CAAC,IAAP,CAAY,KAAK,OAAjB;AAClB,MAAA,MAAM,CAAC,IAAP,CAAY,GAAG,KAAK,wBAAL,EAAf;AAEA,aAAO,MAAP;AACD;;AAvBM;AAtB6B,CAAzB,CAAf","sourcesContent":["import Vue from 'vue'\n\nimport mixins from '../../util/mixins'\n\ninterface options extends Vue {\n $el: HTMLElement\n $refs: {\n content: HTMLElement\n }\n overlay?: HTMLElement\n}\n\ninterface DependentInstance extends Vue {\n isActive?: boolean\n isDependent?: boolean\n}\n\nfunction searchChildren (children: Vue[]): DependentInstance[] {\n const results = []\n for (let index = 0; index < children.length; index++) {\n const child = children[index] as DependentInstance\n if (child.isActive && child.isDependent) {\n results.push(child)\n } else {\n results.push(...searchChildren(child.$children))\n }\n }\n\n return results\n}\n\n/* @vue/component */\nexport default mixins<options>().extend({\n name: 'dependent',\n\n data () {\n return {\n closeDependents: true,\n isActive: false,\n isDependent: true,\n }\n },\n\n watch: {\n isActive (val) {\n if (val) return\n\n const openDependents = this.getOpenDependents()\n for (let index = 0; index < openDependents.length; index++) {\n openDependents[index].isActive = false\n }\n },\n },\n\n methods: {\n getOpenDependents (): any[] {\n if (this.closeDependents) return searchChildren(this.$children)\n\n return []\n },\n getOpenDependentElements (): HTMLElement[] {\n const result = []\n const openDependents = this.getOpenDependents()\n\n for (let index = 0; index < openDependents.length; index++) {\n result.push(...openDependents[index].getClickableDependentElements())\n }\n\n return result\n },\n getClickableDependentElements (): HTMLElement[] {\n const result = [this.$el]\n if (this.$refs.content) result.push(this.$refs.content)\n if (this.overlay) result.push(this.overlay)\n result.push(...this.getOpenDependentElements())\n\n return result\n },\n },\n})\n"],"sourceRoot":"","file":"index.js"}