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/components/VDialog/VDialog.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
14 KiB
Text

{"version":3,"sources":["../../../src/components/VDialog/VDialog.ts"],"names":[],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AAGA;;AACA;;AACA;;;;;;;;;;AAKA,IAAM,UAAU,GAAG,qBACjB,oBADiB,EAEjB,kBAFiB,EAGjB,mBAHiB,EAIjB,oBAJiB,EAKjB,mBALiB,EAMjB,kBANiB,EAOjB,mBAPiB,CAAnB;AAUA;;eACe,UAAU,CAAC,MAAX,CAAkB;AAC/B,EAAA,IAAI,EAAE,UADyB;AAG/B,EAAA,UAAU,EAAE;AACV,IAAA,YAAY,EAAZ;AADU,GAHmB;AAO/B,EAAA,KAAK,EAAE;AACL,IAAA,IAAI,EAAE,OADD;AAEL,IAAA,QAAQ,EAAE,OAFL;AAGL,IAAA,UAAU,EAAE,OAHP;AAIL,IAAA,SAAS,EAAE,OAJN;AAKL,IAAA,KAAK,EAAE,OALF;AAML,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADE;AAER,MAAA,OAAO,EAAE;AAFD,KANL;AAUL,IAAA,gBAAgB,EAAE,OAVb;AAWL,IAAA,MAAM,EAAE;AACN,MAAA,IAAI,EAAE,MADA;AAEN,MAAA,OAAO,EAAE;AAFH,KAXH;AAeL,IAAA,UAAU,EAAE,OAfP;AAgBL,IAAA,WAAW,EAAE;AACX,MAAA,IAAI,EAAE,OADK;AAEX,MAAA,OAAO,EAAE;AAFE,KAhBR;AAoBL,IAAA,UAAU,EAAE,OApBP;AAqBL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,OAAT,CADI;AAEV,MAAA,OAAO,EAAE;AAFC,KArBP;AAyBL,I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,QAAA,IAAI,EAAE,IADD;AAEL,QAAA,KAAK,EAAE,KAAK,KAFP;AAGL,QAAA,IAAI,EAAE,KAAK;AAHN;AAD0B,KAAnC,EAMG,CAAC,MAAD,CANH,CADC,CAZY,CAAf;AAsBA,WAAO,CAAC,CAAC,KAAD,EAAQ;AACd,MAAA,WAAW,EAAE,qBADC;AAEd,MAAA,KAAK,EAAE;AAAE,QAAA,IAAI,EAAE;AAAR,OAFO;AAGd,MAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAG,CAAC,KAAK,YAAN,IAAsB,KAAK,SAA5B,GAAyC,OAAzC,GAAmD;AADvD;AAHO,KAAR,EAML,QANK,CAAR;AAOD;AA1Q8B,CAAlB,C","sourcesContent":["import './VDialog.sass'\n\n// Mixins\nimport Activatable from '../../mixins/activatable'\nimport Dependent from '../../mixins/dependent'\nimport Detachable from '../../mixins/detachable'\nimport Overlayable from '../../mixins/overlayable'\nimport Returnable from '../../mixins/returnable'\nimport Stackable from '../../mixins/stackable'\nimport Toggleable from '../../mixins/toggleable'\n\n// Directives\nimport ClickOutside from '../../directives/click-outside'\n\n// Helpers\nimport { convertToUnit, keyCodes } from '../../util/helpers'\nimport ThemeProvider from '../../util/ThemeProvider'\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\n\nconst baseMixins = mixins(\n Activatable,\n Dependent,\n Detachable,\n Overlayable,\n Returnable,\n Stackable,\n Toggleable\n)\n\n/* @vue/component */\nexport default baseMixins.extend({\n name: 'v-dialog',\n\n directives: {\n ClickOutside,\n },\n\n props: {\n dark: Boolean,\n disabled: Boolean,\n fullscreen: Boolean,\n fullWidth: Boolean,\n light: Boolean,\n maxWidth: {\n type: [String, Number],\n default: 'none',\n },\n noClickAnimation: Boolean,\n origin: {\n type: String,\n default: 'center center',\n },\n persistent: Boolean,\n retainFocus: {\n type: Boolean,\n default: true,\n },\n scrollable: Boolean,\n transition: {\n type: [String, Boolean],\n default: 'dialog-transition',\n },\n width: {\n type: [String, Number],\n default: 'auto',\n },\n },\n\n data () {\n return {\n activatedBy: null as EventTarget | null,\n animate: false,\n animateTimeout: -1,\n isActive: !!this.value,\n stackMinZIndex: 200,\n }\n },\n\n computed: {\n classes (): object {\n return {\n [(`v-dialog ${this.contentClass}`).trim()]: true,\n 'v-dialog--active': this.isActive,\n 'v-dialog--persistent': this.persistent,\n 'v-dialog--fullscreen': this.fullscreen,\n 'v-dialog--scrollable': this.scrollable,\n 'v-dialog--animated': this.animate,\n }\n },\n contentClasses (): object {\n return {\n 'v-dialog__content': true,\n 'v-dialog__content--active': this.isActive,\n }\n },\n hasActivator (): boolean {\n return Boolean(\n !!this.$slots.activator ||\n !!this.$scopedSlots.activator\n )\n },\n },\n\n watch: {\n isActive (val) {\n if (val) {\n this.show()\n this.hideScroll()\n } else {\n this.removeOverlay()\n this.unbind()\n }\n },\n fullscreen (val) {\n if (!this.isActive) return\n\n if (val) {\n this.hideScroll()\n this.removeOverlay(false)\n } else {\n this.showScroll()\n this.genOverlay()\n }\n },\n },\n\n beforeMount () {\n this.$nextTick(() => {\n this.isBooted = this.isActive\n this.isActive && this.show()\n })\n },\n\n beforeDestroy () {\n if (typeof window !== 'undefined') this.unbind()\n },\n\n methods: {\n animateClick () {\n this.animate = false\n // Needed for when clicking very fast\n // outside of the dialog\n this.$nextTick(() => {\n this.animate = true\n window.clearTimeout(this.animateTimeout)\n this.animateTimeout = window.setTimeout(() => (this.animate = false), 150)\n })\n },\n closeConditional (e: Event) {\n const target = e.target as HTMLElement\n // If the dialog content contains\n // the click event, or if the\n // dialog is not active\n if (!this.isActive || this.$refs.content.contains(target)) return false\n\n // If we made it here, the click is outside\n // and is active. If persistent, and the\n // click is on the overlay, animate\n this.$emit('click:outside')\n\n if (this.persistent) {\n if (!this.noClickAnimation &&\n this.overlay === target\n ) this.animateClick()\n\n return false\n }\n\n // close dialog if !persistent, clicked outside and we're the topmost dialog.\n // Since this should only be called in a capture event (bottom up), we shouldn't need to stop propagation\n return this.activeZIndex >= this.getMaxZIndex()\n },\n hideScroll () {\n if (this.fullscreen) {\n document.documentElement.classList.add('overflow-y-hidden')\n } else {\n Overlayable.options.methods.hideScroll.call(this)\n }\n },\n show () {\n !this.fullscreen && !this.hideOverlay && this.genOverlay()\n this.$refs.content.focus()\n this.bind()\n },\n bind () {\n window.addEventListener('focusin', this.onFocusin)\n },\n unbind () {\n window.removeEventListener('focusin', this.onFocusin)\n },\n onKeydown (e: KeyboardEvent) {\n if (e.keyCode === keyCodes.esc && !this.getOpenDependents().length) {\n if (!this.persistent) {\n this.isActive = false\n const activator = this.getActivator()\n this.$nextTick(() => activator && (activator as HTMLElement).focus())\n } else if (!this.noClickAnimation) {\n this.animateClick()\n }\n }\n this.$emit('keydown', e)\n },\n onFocusin (e: Event) {\n if (!e || !this.retainFocus) return\n\n const target = e.target as HTMLElement\n\n if (\n !!target &&\n // It isn't the document or the dialog body\n ![document, this.$refs.content].includes(target) &&\n // It isn't inside the dialog body\n !this.$refs.content.contains(target) &&\n // We're the topmost dialog\n this.activeZIndex >= this.getMaxZIndex() &&\n // It isn't inside a dependent element (like a menu)\n !this.getOpenDependentElements().some(el => el.contains(target))\n // So we must have focused something outside the dialog and its children\n ) {\n // Find and focus the first available element inside the dialog\n const focusable = this.$refs.content.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])')\n focusable.length && (focusable[0] as HTMLElement).focus()\n }\n },\n },\n\n render (h): VNode {\n const children = []\n const data = {\n class: this.classes,\n ref: 'dialog',\n directives: [\n {\n name: 'click-outside',\n value: () => { this.isActive = false },\n args: {\n closeConditional: this.closeConditional,\n include: this.getOpenDependentElements,\n },\n },\n { name: 'show', value: this.isActive },\n ],\n on: {\n click: (e: Event) => { e.stopPropagation() },\n },\n style: {},\n }\n\n if (!this.fullscreen) {\n data.style = {\n maxWidth: this.maxWidth === 'none' ? undefined : convertToUnit(this.maxWidth),\n width: this.width === 'auto' ? undefined : convertToUnit(this.width),\n }\n }\n\n children.push(this.genActivator())\n\n let dialog = h('div', data, this.showLazyContent(this.getContentSlot()))\n if (this.transition) {\n dialog = h('transition', {\n props: {\n name: this.transition,\n origin: this.origin,\n },\n }, [dialog])\n }\n\n children.push(h('div', {\n class: this.contentClasses,\n attrs: {\n role: 'document',\n tabindex: 0,\n ...this.getScopeIdAttrs(),\n },\n on: {\n keydown: this.onKeydown,\n },\n style: { zIndex: this.activeZIndex },\n ref: 'content',\n }, [\n this.$createElement(ThemeProvider, {\n props: {\n root: true,\n light: this.light,\n dark: this.dark,\n },\n }, [dialog]),\n ]))\n\n return h('div', {\n staticClass: 'v-dialog__container',\n attrs: { role: 'dialog' },\n style: {\n display: (!this.hasActivator || this.fullWidth) ? 'block' : 'inline-block',\n },\n }, children)\n },\n})\n"],"sourceRoot":"","file":"VDialog.js"}