1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/js/dist/carousel.js.map
2015-05-07 22:26:40 -07:00

1 line
No EOL
20 KiB
Text

{"version":3,"sources":["js/src/carousel.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASvB,MAAM,IAAI,GAAkB,UAAU,CAAA;AACtC,MAAM,OAAO,GAAe,OAAO,CAAA;AACnC,MAAM,QAAQ,GAAc,aAAa,CAAA;AACzC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;AAE/B,MAAM,QAAQ,GAAG;AACf,cAAU,EAAG,IAAI;AACjB,cAAU,EAAG,IAAI;AACjB,WAAO,EAAM,KAAK;AAClB,WAAO,EAAM,OAAO;AACpB,UAAM,EAAO,IAAI;GAClB,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,QAAI,EAAO,MAAM;AACjB,YAAQ,EAAG,MAAM;GAClB,CAAA;;AAED,MAAM,KAAK,GAAG;AACZ,SAAK,EAAG,mBAAmB;AAC3B,QAAI,EAAI,kBAAkB;AAC1B,SAAK,EAAG,4BAA4B;AACpC,QAAI,EAAI,MAAM;GACf,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,YAAQ,EAAG,UAAU;AACrB,UAAM,EAAK,QAAQ;AACnB,SAAK,EAAM,OAAO;AAClB,SAAK,EAAM,OAAO;AAClB,QAAI,EAAO,MAAM;AACjB,QAAI,EAAO,eAAe;GAC3B,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,UAAM,EAAQ,SAAS;AACvB,eAAW,EAAG,uBAAuB;AACrC,QAAI,EAAU,gBAAgB;AAC9B,aAAS,EAAK,cAAc;AAC5B,cAAU,EAAI,sBAAsB;AACpC,cAAU,EAAI,+BAA+B;AAC7C,aAAS,EAAK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,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAA;SACxC;;AAED,aAAK,CAAC,cAAc,EAAE,CAAA;OACvB;;;WA3TG,QAAQ;;;;;;;;;AAsUd,GAAC,CAAC,QAAQ,CAAC,CACR,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;;AAEtE,GAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY;AACnC,KAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY;AACrC,UAAI,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACvB,cAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;KAC5D,CAAC,CAAA;GACH,CAAC,CAAA;;;;;;;;AASF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/carousel.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Carousel = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'carousel'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.carousel'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Defaults = {\n 'interval' : 5000,\n 'keyboard' : true,\n 'slide' : false,\n 'pause' : 'hover',\n 'wrap' : true\n }\n\n const Direction = {\n NEXT : 'next',\n PREVIOUS : 'prev'\n }\n\n const Event = {\n SLIDE : 'slide.bs.carousel',\n SLID : 'slid.bs.carousel',\n CLICK : 'click.bs.carousel.data-api',\n LOAD : 'load'\n }\n\n const ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'right',\n LEFT : 'left',\n ITEM : 'carousel-item'\n }\n \n const Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n NEXT_PREV : '.next, .prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel {\n\n constructor(element, config?) {\n\n this._items = null\n this._interval = null\n this._activeElement = null\n\n this._isPaused = false\n this._isSliding = false\n\n this._config = config\n this._element = $(element)[0]\n this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]\n\n this._addEventListeners()\n\n }\n\n\n // public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREVIOUS)\n }\n }\n\n pause(event?) {\n if (!event) {\n this._isPaused = true\n }\n\n if ($(this._element).find(Selector.NEXT_PREV)[0] && \n Util.supportsTransitionEnd()) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event?) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n this.next.bind(this), this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n\n let activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > (this._items.length - 1) || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex == index) {\n this.pause()\n this.cycle()\n return\n }\n\n var direction = index > activeIndex ?\n Direction.NEXT :\n Direction.PREVIOUS\n\n this._slide(direction, this._items[index])\n }\n\n\n // private\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on('keydown.bs.carousel', this._keydown.bind(this))\n }\n\n if (this._config.pause == 'hover' && \n !('ontouchstart' in document.documentElement)) {\n $(this._element)\n .on('mouseenter.bs.carousel', this.pause.bind(this))\n .on('mouseleave.bs.carousel', this.cycle.bind(this))\n }\n }\n\n _keydown(event) {\n event.preventDefault()\n\n if (/input|textarea/i.test(event.target.tagName)) return\n\n switch (event.which) {\n case 37: this.prev(); break\n case 39: this.next(); break\n default: return\n }\n }\n\n _getItemIndex(element) {\n this._items = $.makeArray($(element).parent().find(Selector.ITEM))\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n let isNextDirection = direction === Direction.NEXT\n let isPrevDirection = direction === Direction.PREVIOUS\n let activeIndex = this._getItemIndex(activeElement)\n let lastItemIndex = (this._items.length - 1)\n let isGoingToWrap = (isPrevDirection && activeIndex === 0) ||\n (isNextDirection && activeIndex == lastItemIndex)\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n let delta = direction == Direction.PREVIOUS ? -1 : 1\n let itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ? \n this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n\n _triggerSlideEvent(relatedTarget, directionalClassname) {\n let slideEvent = $.Event(Event.SLIDE, {\n relatedTarget: relatedTarget,\n direction: directionalClassname\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n $(this._indicatorsElement)\n .find(Selector.ACTIVE)\n .removeClass(ClassName.ACTIVE)\n\n let nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(ClassName.ACTIVE)\n }\n }\n }\n\n _slide(direction, element?) {\n let activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n let nextElement = element || activeElement && \n this._getItemByDirection(direction, activeElement)\n\n let isCycling = !!this._interval\n\n let directionalClassName = direction == Direction.NEXT ?\n ClassName.LEFT :\n ClassName.RIGHT\n\n if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false\n return\n }\n\n let slideEvent = this._triggerSlideEvent(nextElement, directionalClassName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // some weirdness is happening, so we bail \n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n\n var slidEvent = $.Event(Event.SLID, { \n relatedTarget: nextElement, \n direction: directionalClassName \n })\n\n if (Util.supportsTransitionEnd() && \n $(this._element).hasClass(ClassName.SLIDE)) {\n\n $(nextElement).addClass(direction)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(directionalClassName)\n .removeClass(direction)\n\n $(nextElement).addClass(ClassName.ACTIVE)\n\n $(activeElement)\n .removeClass(ClassName.ACTIVE)\n .removeClass(direction)\n .removeClass(directionalClassName)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n\n })\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n $(activeElement).removeClass(ClassName.ACTIVE)\n $(nextElement).addClass(ClassName.ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config?) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend({}, Defaults, $(this).data())\n\n if (typeof config === 'object') {\n $.extend(_config, config)\n }\n\n let action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config == 'number') {\n data.to(config)\n\n } else if (action) {\n data[action]()\n\n } else if (_config.interval) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n let selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n let target = $(selector)[0]\n\n if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n return\n }\n\n let config = $.extend({}, $(target).data(), $(this).data())\n\n let slideIndex = this.getAttribute('data-slide-to')\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)\n\n $(window).on(Event.LOAD, function () {\n $(Selector.DATA_RIDE).each(function () {\n let $carousel = $(this)\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n })\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Carousel._jQueryInterface\n $.fn[NAME].Constructor = Carousel\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n }\n\n return Carousel\n\n})(jQuery)\n\nexport default Carousel\n"]}