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/es5/mixins/dependent/index.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
3.6 KiB
Text

{"version":3,"sources":["../../../src/mixins/dependent/index.ts"],"names":[],"mappings":";;;;;;;AAEA;;;;;;;;;;;;AAeA,SAAS,cAAT,CAAyB,QAAzB,EAAwC;AACtC,MAAM,OAAO,GAAG,EAAhB;;AACA,OAAK,IAAI,KAAK,GAAG,CAAjB,EAAoB,KAAK,GAAG,QAAQ,CAAC,MAArC,EAA6C,KAAK,EAAlD,EAAsD;AACpD,QAAM,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,OAAA,OAAO,qBAAS,cAAc,CAAC,KAAK,CAAC,SAAP,CAAvB,EAAP;AACD;AACF;;AAED,SAAO,OAAP;AACD;AAED;;;eACe,uBAAkB,MAAlB,CAAyB;AACtC,EAAA,IAAI,EAAE,WADgC;AAGtC,EAAA,IAHsC,kBAGlC;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,QADK,oBACK,GADL,EACQ;AACX,UAAI,GAAJ,EAAS;AAET,UAAM,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,iBADO,+BACU;AACf,UAAI,KAAK,eAAT,EAA0B,OAAO,cAAc,CAAC,KAAK,SAAN,CAArB;AAE1B,aAAO,EAAP;AACD,KALM;AAMP,IAAA,wBANO,sCAMiB;AACtB,UAAM,MAAM,GAAG,EAAf;AACA,UAAM,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,OAAA,MAAM,qBAAS,cAAc,CAAC,KAAD,CAAd,CAAsB,6BAAtB,EAAT,EAAN;AACD;;AAED,aAAO,MAAP;AACD,KAfM;AAgBP,IAAA,6BAhBO,2CAgBsB;AAC3B,UAAM,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,OAAA,MAAM,qBAAS,KAAK,wBAAL,EAAT,EAAN;AAEA,aAAO,MAAP;AACD;AAvBM;AAtB6B,CAAzB,C","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"}