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/scrollable/index.js.map

1 line
4 KiB
Text
Raw Normal View History

2019-08-11 18:48:02 +00:00
{"version":3,"sources":["../../../src/mixins/scrollable/index.ts"],"names":[],"mappings":";;;;;;;AACA;;AAGA;;AAGA;;;;AAPA;AAGA;AAGA;;AAGA;;;;;;;;;AAQA;eACe,aAAI,MAAJ,CAAW;AACxB,EAAA,IAAI,EAAE,YADkB;AAGxB,EAAA,UAAU,EAAE;AAAE,IAAA,MAAM,EAAN;AAAF,GAHY;AAKxB,EAAA,KAAK,EAAE;AACL,IAAA,YAAY,EAAE,MADT;AAEL,IAAA,eAAe,EAAE,CAAC,MAAD,EAAS,MAAT;AAFZ,GALiB;AAUxB,EAAA,IAAI,EAAE;AAAA,WAAO;AACX,MAAA,aAAa,EAAE,CADJ;AAEX,MAAA,gBAAgB,EAAE,CAFP;AAGX,MAAA,QAAQ,EAAE,KAHC;AAIX,MAAA,aAAa,EAAE,KAJJ;AAKX,MAAA,cAAc,EAAE,CALL;AAMX,MAAA,WAAW,EAAE,CANF;AAOX,MAAA,MAAM,EAAE;AAPG,KAAP;AAAA,GAVkB;AAoBxB,EAAA,QAAQ,EAAE;AACR;;;;;AAKA,IAAA,SANQ,uBAMC;AACP,aAAO,OAAO,MAAP,KAAkB,WAAzB;AACD,KARO;;AASR;;;;AAIA,IAAA,uBAbQ,qCAae;AACrB,aAAO,KAAK,eAAL,GACH,MAAM,CAAC,KAAK,eAAN,CADH,GAEH,GAFJ;AAGD;AAjBO,GApBc;AAwCxB,EAAA,KAAK,EAAE;AACL,IAAA,aADK,2BACQ;AACX,WAAK,WAAL,GAAmB,KAAK,WAAL,IAAoB,KAAK,aAA5C;AACD,KAHI;AAIL,IAAA,QAJK,sBAIG;AACN,WAAK,WAAL,GAAmB,CAAnB;AACD;AANI,GAxCiB;AAiDxB,EAAA,OAjDwB,qBAiDjB;AACL,QAAI,KAAK,YAAT,EAAuB;AACrB,WAAK,MAAL,GAAc,QAAQ,CAAC,aAAT,CAAuB,KAAK,YAA5B,CAAd;;AAEA,UAAI,CAAC,KAAK,MAAV,EAAkB;AAChB,qFAAwD,KAAK,YAA7D,GAA6E,IAA7E;AACD;AACF;AACF,GAzDuB;AA2DxB,EAAA,OAAO,EAAE;AACP,IAAA,QADO,sBACC;AAAA;;AACN,UAAI,CAAC,KAAK,SAAV,EAAqB;AAErB,WAAK,cAAL,GAAsB,KAAK,aAA3B;AACA,WAAK,aAAL,GAAqB,KAAK,MAAL,GACjB,KAAK,MAAL,CAAY,SADK,GAEjB,MAAM,CAAC,WAFX;AAIA,WAAK,aAAL,GAAqB,KAAK,aAAL,GAAqB,KAAK,cAA/C;AACA,WAAK,gBAAL,GAAwB,IAAI,CAAC,GAAL,CAAS,KAAK,aAAL,GAAqB,KAAK,uBAAnC,CAAxB;AAEA,WAAK,SAAL,CAAe,YAAK;AAClB,YACE,IAAI,CAAC,GAAL,CAAS,KAAI,CAAC,aAAL,GAAqB,KAAI,CAAC,WAAnC,IACA,KAAI,CAAC,uBAFP,EAGE,KAAI,CAAC,YAAL;AACH,OALD;AAMD,KAlBM;;AAmBP;;;;;AAKA,IAAA,YAxBO,0BAwBK,CAAkB;AAxBvB;AA3De,CAAX,C","sourcesContent":["// Directives\nimport { Scroll } from '../../directives'\n\n// Utilities\nimport { consoleWarn } from '../../util/console'\n\n// Types\nimport Vue from 'vue'\n\n/**\n * Scrollable\n *\n * Used for monitoring scrolling and\n * invoking functions based upon\n * scrolling thresholds being\n * met.\n */\n/* @vue/component */\nexport default Vue.extend({\n name: 'scrollable',\n\n directives: { Scroll },\n\n props: {\n scrollTarget: String,\n scrollThreshold: [String, Number],\n },\n\n data: () => ({\n currentScroll: 0,\n currentThreshold: 0,\n isActive: false,\n isScrollingUp: false,\n previousScroll: 0,\n savedScroll: 0,\n target: null as Element | null,\n }),\n\n computed: {\n /**\n * A computed property that returns\n * whether scrolling features are\n * enabled or disabled\n */\n canScroll (): boolean {\n return typeof window !== 'undefined'\n },\n /**\n * The threshold that must be met before\n * thresholdMet function is invoked\n */\n computedScrollThreshold (): number {\n return this.scrollThreshold\n ? Number(this.scrollThreshold)\n : 300\n },\n },\n\n watch: {\n isScrollingUp () {\n this.savedScroll = this.savedScroll || this.currentScroll\n },\n isActive () {\n this.savedScroll = 0\n },\n },\n\n mounted () {\n if (this.scrollTarget) {\n this.target = document.querySelector(this.scrollTarget)\n\n if (!this.target) {\n consoleWarn(`Unable to locate element with identifier ${this.scrollTarget}`, this)\n }\n }\n },\n\n methods: {\n onScroll () {\n if (!this.canScroll) return\n\n this.previousScroll = this.currentScroll\n this.currentScroll = this.target\n ? this.target.scrollTop\n : window.pageYOffset\n\n this.isScrollingUp = this.currentScroll < this.previousScroll\n this.currentThreshold = Math.abs(this.currentScroll - this.computedScrollThreshold)\n\n this.$nextTick(() => {\n if (\n Math.abs(this.currentScroll - this.savedScroll) >\n this.computedScrollThreshold\n ) this.thresholdMet()\n })\n },\n /**\n * The method invoked when\n * scrolling in any direction\n * has exceeded the threshold\n */\n thresholdMet () { /* noop */ },\n },\n})\n"],"sourceRoot":"","file":"index.js"}