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/directives/click-outside/index.js.map

1 line
4.8 KiB
Plaintext

{"version":3,"sources":["../../../src/directives/click-outside/index.ts"],"names":[],"mappings":";;;;;;;AAYA,SAAS,gBAAT,GAAyB;AACvB,SAAO,KAAP;AACD;;AAED,SAAS,SAAT,CAAoB,CAApB,EAAqC,EAArC,EAAsD,OAAtD,EAAoF;AAClF;AACA,EAAA,OAAO,CAAC,IAAR,GAAe,OAAO,CAAC,IAAR,IAAgB,EAA/B,CAFkF,CAIlF;;AACA,MAAM,QAAQ,GAAI,OAAO,CAAC,IAAR,CAAa,gBAAb,IAAiC,gBAAnD,CALkF,CAOlF;AACA;AACA;AACA;;AACA,MAAI,CAAC,CAAD,IAAM,QAAQ,CAAC,CAAD,CAAR,KAAgB,KAA1B,EAAiC,OAXiD,CAalF;AACA;AACA;AACA;AACA;;AACA,MAAK,eAAe,CAAf,IAAoB,CAAC,CAAC,CAAC,SAAxB,IACD,iBAAiB,CAAjB,IAAsB,CAAC,CAAC,CAAC,WAD5B,EAEE,OApBgF,CAsBlF;AACA;;AACA,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,IAAR,CAAa,OAAb,IAAyB;AAAA,WAAM,EAAN;AAAA,GAA1B,GAAjB,CAxBkF,CAyBlF;;;AACA,EAAA,QAAQ,CAAC,IAAT,CAAc,EAAd,EA1BkF,CA4BlF;AACA;AACA;AACA;AACA;;AACA,GAAC,QAAQ,CAAC,IAAT,CAAc,UAAA,EAAE;AAAA,WAAI,EAAE,CAAC,QAAH,CAAY,CAAC,CAAC,MAAd,CAAJ;AAAA,GAAhB,CAAD,IAAuD,UAAU,CAAC,YAAK;AACrE,IAAA,QAAQ,CAAC,CAAD,CAAR,IAAe,OAAO,CAAC,KAAvB,IAAgC,OAAO,CAAC,KAAR,CAAc,CAAd,CAAhC;AACD,GAFgE,EAE9D,CAF8D,CAAjE;AAGD;;AAEM,IAAM,YAAY,GAAG;AAC1B;AACA;AACA;AACA;AACA;AACA,EAAA,QAN0B,oBAMhB,EANgB,EAMC,OAND,EAM+B;AACvD,QAAM,OAAO,GAAG,SAAV,OAAU,CAAC,CAAD;AAAA,aAAc,SAAS,CAAC,CAAD,EAAoB,EAApB,EAAwB,OAAxB,CAAvB;AAAA,KAAhB,CADuD,CAEvD;AACA;AACA;;;AACA,QAAM,GAAG,GAAG,QAAQ,CAAC,aAAT,CAAuB,YAAvB,KACV,QAAQ,CAAC,IADX,CALuD,CAMvC;;AAChB,IAAA,GAAG,CAAC,gBAAJ,CAAqB,OAArB,EAA8B,OAA9B,EAAuC,IAAvC;AACA,IAAA,EAAE,CAAC,aAAH,GAAmB,OAAnB;AACD,GAfyB;AAiB1B,EAAA,MAjB0B,kBAiBlB,EAjBkB,EAiBH;AACrB,QAAI,CAAC,EAAE,CAAC,aAAR,EAAuB;AAEvB,QAAM,GAAG,GAAG,QAAQ,CAAC,aAAT,CAAuB,YAAvB,KACV,QAAQ,CAAC,IADX,CAHqB,CAIL;;AAChB,IAAA,GAAG,IAAI,GAAG,CAAC,mBAAJ,CAAwB,OAAxB,EAAiC,EAAE,CAAC,aAApC,EAAmD,IAAnD,CAAP;AACA,WAAO,EAAE,CAAC,aAAV;AACD;AAxByB,CAArB;;eA2BQ,Y","sourcesContent":["import { VNodeDirective } from 'vue/types/vnode'\n\ninterface ClickOutsideBindingArgs {\n closeConditional?: (e: Event) => boolean\n include?: () => HTMLElement[]\n}\n\ninterface ClickOutsideDirective extends VNodeDirective {\n value?: (e: Event) => void\n args?: ClickOutsideBindingArgs\n}\n\nfunction closeConditional () {\n return false\n}\n\nfunction directive (e: PointerEvent, el: HTMLElement, binding: ClickOutsideDirective): void {\n // Args may not always be supplied\n binding.args = binding.args || {}\n\n // If no closeConditional was supplied assign a default\n const isActive = (binding.args.closeConditional || closeConditional)\n\n // The include element callbacks below can be expensive\n // so we should avoid calling them when we're not active.\n // Explicitly check for false to allow fallback compatibility\n // with non-toggleable components\n if (!e || isActive(e) === false) return\n\n // If click was triggered programmaticaly (domEl.click()) then\n // it shouldn't be treated as click-outside\n // Chrome/Firefox support isTrusted property\n // IE/Edge support pointerType property (empty if not triggered\n // by pointing device)\n if (('isTrusted' in e && !e.isTrusted) ||\n ('pointerType' in e && !e.pointerType)\n ) return\n\n // Check if additional elements were passed to be included in check\n // (click must be outside all included elements, if any)\n const elements = (binding.args.include || (() => []))()\n // Add the root element for the component this directive was defined on\n elements.push(el)\n\n // Check if it's a click outside our elements, and then if our callback returns true.\n // Non-toggleable components should take action in their callback and return falsy.\n // Toggleable can return true if it wants to deactivate.\n // Note that, because we're in the capture phase, this callback will occur before\n // the bubbling click event on any outside elements.\n !elements.some(el => el.contains(e.target as Node)) && setTimeout(() => {\n isActive(e) && binding.value && binding.value(e)\n }, 0)\n}\n\nexport const ClickOutside = {\n // [data-app] may not be found\n // if using bind, inserted makes\n // sure that the root element is\n // available, iOS does not support\n // clicks on body\n inserted (el: HTMLElement, binding: ClickOutsideDirective) {\n const onClick = (e: Event) => directive(e as PointerEvent, el, binding)\n // iOS does not recognize click events on document\n // or body, this is the entire purpose of the v-app\n // component and [data-app], stop removing this\n const app = document.querySelector('[data-app]') ||\n document.body // This is only for unit tests\n app.addEventListener('click', onClick, true)\n el._clickOutside = onClick\n },\n\n unbind (el: HTMLElement) {\n if (!el._clickOutside) return\n\n const app = document.querySelector('[data-app]') ||\n document.body // This is only for unit tests\n app && app.removeEventListener('click', el._clickOutside, true)\n delete el._clickOutside\n },\n}\n\nexport default ClickOutside\n"],"sourceRoot":"","file":"index.js"}