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AAe,IAAf;AACD,KANM;;AAOP,IAAA,cAAc,CAAE,EAAF,EAAmC;AAC/C,WAAK,MAAL,GAAc,EAAd;AACA,MAAA,EAAE,CAAC,GAAH,CAAO,OAAP,EAAgB,KAAK,OAArB;AACD,KAVM;;AAWP,IAAA,gBAAgB,GAAA;AACd,WAAK,MAAL,GAAc,IAAd;AACD,KAbM;;AAcP,IAAA,OAAO,CAAE,CAAF,EAAe;AACpB,UAAI,CAAC,CAAC,MAAN,EAAc,KAAK,MAAL,CAAa,GAAb,CAAiB,IAAjB;AAEd,WAAK,KAAL,CAAW,OAAX,EAAoB,CAApB;AAEA,WAAK,UAAL,IAAmB,KAAK,UAAxB,IAAsC,KAAK,MAAL,EAAtC;AACD,KApBM;;AAqBP,IAAA,MAAM,GAAA;AACJ;AACA,UAAI,KAAK,OAAT,EAAkB,KAAK,OAAL,CAAa,QAAb,GAAwB,IAAxB;AAClB,WAAK,SAAL,CAAe,MAAM,KAAK,KAAL,CAAW,QAAX,CAArB;AACD;;AAzBM,GAjCF;;AA6DP,EAAA,MAAM,CAAE,CAAF,EAAG;AACP,WAAO,CAAC,CAAC,KAAD,EAAQ;AACd,MAAA,WAAW,EAAE,mBADC;AAEd,MAAA,KAAK,EAAE,KAAK,OAFE;AAGd,MAAA,KAAK,EAAE;AACL,yBAAiB,MAAM,CAAC,KAAK,QAAN;AADlB;AAHO,KAAR,EAML,OAAO,CAAC,IAAD,CANF,CAAR;AAOD;;AArEM,CAJM,CAAf","sourcesContent":["// Components\nimport VExpansionPanels from './VExpansionPanels'\nimport VExpansionPanelHeader from './VExpansionPanelHeader'\nimport VExpansionPanelContent from './VExpansionPanelContent'\n\n// Mixins\nimport { factory as GroupableFactory } from '../../mixins/groupable'\nimport { provide as RegistrableProvide } from '../../mixins/registrable'\n\n// Utilities\nimport { getSlot } from '../../util/helpers'\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\n\ntype VExpansionPanelHeaderInstance = InstanceType<typeof VExpansionPanelHeader>\ntype VExpansionPanelContentInstance = InstanceType<typeof VExpansionPanelContent>\n\nexport default mixins(\n GroupableFactory<'expansionPanels', typeof VExpansionPanels>('expansionPanels', 'v-expansion-panel', 'v-expansion-panels'),\n RegistrableProvide('expansionPanel', true)\n /* @vue/component */\n).extend({\n name: 'v-expansion-panel',\n\n props: {\n disabled: Boolean,\n readonly: Boolean,\n },\n\n data () {\n return {\n content: null as VExpansionPanelContentInstance | null,\n header: null as VExpansionPanelHeaderInstance | null,\n nextIsActive: false,\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-expansion-panel--active': this.isActive,\n 'v-expansion-panel--next-active': this.nextIsActive,\n 'v-expansion-panel--disabled': this.isDisabled,\n ...this.groupClasses,\n }\n },\n isDisabled (): boolean {\n return this.expansionPanels.disabled || this.disabled\n },\n isReadonly (): boolean {\n return this.expansionPanels.readonly || this.readonly\n },\n },\n\n methods: {\n registerContent (vm: VExpansionPanelContentInstance) {\n this.content = vm\n },\n unregisterContent () {\n this.content = null\n },\n registerHeader (vm: VExpansionPanelHeaderInstance) {\n this.header = vm\n vm.$on('click', this.onClick)\n },\n unregisterHeader () {\n this.header = null\n },\n onClick (e: MouseEvent) {\n if (e.detail) this.header!.$el.blur()\n\n this.$emit('click', e)\n\n this.isReadonly || this.isDisabled || this.toggle()\n },\n toggle () {\n /* istanbul ignore else */\n if (this.content) this.content.isBooted = true\n this.$nextTick(() => this.$emit('change'))\n },\n },\n\n render (h): VNode {\n return h('div', {\n staticClass: 'v-expansion-panel',\n class: this.classes,\n attrs: {\n 'aria-expanded': String(this.isActive),\n },\n }, getSlot(this))\n },\n})\n"],"sourceRoot":"","file":"VExpansionPanel.js"} |