hooper 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Hopper 0.3.3
2
+ * Hopper 0.3.4
3
3
  * (c) 2019
4
4
  * @license MIT
5
5
  */
@@ -282,6 +282,7 @@ var Carousel = {
282
282
  isTouch: false,
283
283
  isHover: false,
284
284
  isFocus: false,
285
+ initialized: false,
285
286
  slideWidth: 0,
286
287
  slideHeight: 0,
287
288
  slidesCount: 0,
@@ -299,6 +300,19 @@ var Carousel = {
299
300
  };
300
301
  },
301
302
  computed: {
303
+ slideBounds: function slideBounds() {
304
+ var config = this.config,
305
+ currentSlide = this.currentSlide; // Because the "isActive" depends on the slides shown, not the number of slidable ones.
306
+ // but upper and lower bounds for Next,Prev depend on whatever is smaller.
307
+
308
+ var siblings = config.itemsToShow;
309
+ var lower = config.centerMode ? Math.ceil(currentSlide - siblings / 2) : currentSlide;
310
+ var upper = config.centerMode ? Math.floor(currentSlide + siblings / 2) : Math.floor(currentSlide + siblings - 1);
311
+ return {
312
+ lower: lower,
313
+ upper: upper
314
+ };
315
+ },
302
316
  trackTransform: function trackTransform() {
303
317
  var _this$config = this.config,
304
318
  infiniteScroll = _this$config.infiniteScroll,
@@ -321,7 +335,7 @@ var Carousel = {
321
335
  return "transform: translate(".concat(translate, "px, 0);");
322
336
  },
323
337
  trackTransition: function trackTransition() {
324
- if (this.isSliding) {
338
+ if (this.initialized && this.isSliding) {
325
339
  return "transition: ".concat(this.config.transition, "ms");
326
340
  }
327
341
 
@@ -681,7 +695,11 @@ var Carousel = {
681
695
 
682
696
  _this6.slideTo(_this6.config.initialSlide || 0);
683
697
 
684
- _this6.$emit('loaded');
698
+ setTimeout(function () {
699
+ _this6.$emit('loaded');
700
+
701
+ _this6.initialized = true;
702
+ }, _this6.transition);
685
703
  });
686
704
  },
687
705
  beforeDestroy: function beforeDestroy() {
@@ -739,18 +757,22 @@ function renderBufferSlides(h, slides) {
739
757
  for (var i = 0; i < slidesCount; i++) {
740
758
  var slide = slides[i];
741
759
  var clonedBefore = cloneNode(h, slide);
742
- clonedBefore.data.key = "index-".concat(i - slidesCount);
760
+ var slideIndex = i - slidesCount;
761
+ clonedBefore.data.key = "before_".concat(i);
743
762
  clonedBefore.key = clonedBefore.data.key;
763
+ clonedBefore.componentOptions.propsData.index = slideIndex;
744
764
  clonedBefore.data.props = {
745
- index: i - slidesCount,
765
+ index: slideIndex,
746
766
  isClone: true
747
767
  };
748
768
  before.push(clonedBefore);
749
769
  var clonedAfter = cloneNode(h, slide);
750
- clonedAfter.data.key = "index-".concat(i + slidesCount);
770
+ slideIndex = i + slidesCount;
771
+ clonedAfter.data.key = "after_".concat(slideIndex);
772
+ clonedAfter.componentOptions.propsData.index = slideIndex;
751
773
  clonedAfter.key = clonedAfter.data.key;
752
774
  clonedAfter.data.props = {
753
- index: i + slidesCount,
775
+ index: slideIndex,
754
776
  isClone: true
755
777
  };
756
778
  after.push(clonedAfter);
@@ -844,7 +866,6 @@ var Slide = {
844
866
  },
845
867
  index: {
846
868
  type: Number,
847
- default: 0,
848
869
  required: true
849
870
  }
850
871
  },
@@ -861,30 +882,21 @@ var Slide = {
861
882
 
862
883
  return "width: ".concat(slideWidth, "px");
863
884
  },
864
- lower: function lower() {
865
- var _ref2 = this.$hooper || {},
866
- config = _ref2.config,
867
- currentSlide = _ref2.currentSlide;
868
-
869
- var siblings = config.itemsToShow;
870
- return config.centerMode ? Math.ceil(currentSlide - siblings / 2) : currentSlide;
871
- },
872
- upper: function upper() {
873
- var _ref3 = this.$hooper || {},
874
- config = _ref3.config,
875
- currentSlide = _ref3.currentSlide;
876
-
877
- var siblings = config.itemsToShow;
878
- return config.centerMode ? Math.floor(currentSlide + siblings / 2) : Math.floor(currentSlide + siblings - 1);
879
- },
880
885
  isActive: function isActive() {
881
- return this.index >= this.lower && this.index <= this.upper;
886
+ var _this$$hooper$slideBo = this.$hooper.slideBounds,
887
+ upper = _this$$hooper$slideBo.upper,
888
+ lower = _this$$hooper$slideBo.lower;
889
+ return this.index >= lower && this.index <= upper;
882
890
  },
883
891
  isPrev: function isPrev() {
884
- return this.index <= this.lower - 1;
892
+ var lower = this.$hooper.slideBounds.lower;
893
+ var itemsToSlide = this.$hooper.config.itemsToSlide;
894
+ return this.index < lower && this.index >= lower - itemsToSlide;
885
895
  },
886
896
  isNext: function isNext() {
887
- return this.index >= this.upper + 1;
897
+ var upper = this.$hooper.slideBounds.upper;
898
+ var itemsToSlide = this.$hooper.config.itemsToSlide;
899
+ return this.index > upper && this.index <= upper + itemsToSlide;
888
900
  },
889
901
  isCurrent: function isCurrent() {
890
902
  return this.index === this.$hooper.currentSlide;
package/dist/hooper.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Hopper 0.3.3
2
+ * Hopper 0.3.4
3
3
  * (c) 2019
4
4
  * @license MIT
5
5
  */
@@ -288,6 +288,7 @@
288
288
  isTouch: false,
289
289
  isHover: false,
290
290
  isFocus: false,
291
+ initialized: false,
291
292
  slideWidth: 0,
292
293
  slideHeight: 0,
293
294
  slidesCount: 0,
@@ -305,6 +306,19 @@
305
306
  };
306
307
  },
307
308
  computed: {
309
+ slideBounds: function slideBounds() {
310
+ var config = this.config,
311
+ currentSlide = this.currentSlide; // Because the "isActive" depends on the slides shown, not the number of slidable ones.
312
+ // but upper and lower bounds for Next,Prev depend on whatever is smaller.
313
+
314
+ var siblings = config.itemsToShow;
315
+ var lower = config.centerMode ? Math.ceil(currentSlide - siblings / 2) : currentSlide;
316
+ var upper = config.centerMode ? Math.floor(currentSlide + siblings / 2) : Math.floor(currentSlide + siblings - 1);
317
+ return {
318
+ lower: lower,
319
+ upper: upper
320
+ };
321
+ },
308
322
  trackTransform: function trackTransform() {
309
323
  var _this$config = this.config,
310
324
  infiniteScroll = _this$config.infiniteScroll,
@@ -327,7 +341,7 @@
327
341
  return "transform: translate(".concat(translate, "px, 0);");
328
342
  },
329
343
  trackTransition: function trackTransition() {
330
- if (this.isSliding) {
344
+ if (this.initialized && this.isSliding) {
331
345
  return "transition: ".concat(this.config.transition, "ms");
332
346
  }
333
347
 
@@ -687,7 +701,11 @@
687
701
 
688
702
  _this6.slideTo(_this6.config.initialSlide || 0);
689
703
 
690
- _this6.$emit('loaded');
704
+ setTimeout(function () {
705
+ _this6.$emit('loaded');
706
+
707
+ _this6.initialized = true;
708
+ }, _this6.transition);
691
709
  });
692
710
  },
693
711
  beforeDestroy: function beforeDestroy() {
@@ -745,18 +763,22 @@
745
763
  for (var i = 0; i < slidesCount; i++) {
746
764
  var slide = slides[i];
747
765
  var clonedBefore = cloneNode(h, slide);
748
- clonedBefore.data.key = "index-".concat(i - slidesCount);
766
+ var slideIndex = i - slidesCount;
767
+ clonedBefore.data.key = "before_".concat(i);
749
768
  clonedBefore.key = clonedBefore.data.key;
769
+ clonedBefore.componentOptions.propsData.index = slideIndex;
750
770
  clonedBefore.data.props = {
751
- index: i - slidesCount,
771
+ index: slideIndex,
752
772
  isClone: true
753
773
  };
754
774
  before.push(clonedBefore);
755
775
  var clonedAfter = cloneNode(h, slide);
756
- clonedAfter.data.key = "index-".concat(i + slidesCount);
776
+ slideIndex = i + slidesCount;
777
+ clonedAfter.data.key = "after_".concat(slideIndex);
778
+ clonedAfter.componentOptions.propsData.index = slideIndex;
757
779
  clonedAfter.key = clonedAfter.data.key;
758
780
  clonedAfter.data.props = {
759
- index: i + slidesCount,
781
+ index: slideIndex,
760
782
  isClone: true
761
783
  };
762
784
  after.push(clonedAfter);
@@ -850,7 +872,6 @@
850
872
  },
851
873
  index: {
852
874
  type: Number,
853
- default: 0,
854
875
  required: true
855
876
  }
856
877
  },
@@ -867,30 +888,21 @@
867
888
 
868
889
  return "width: ".concat(slideWidth, "px");
869
890
  },
870
- lower: function lower() {
871
- var _ref2 = this.$hooper || {},
872
- config = _ref2.config,
873
- currentSlide = _ref2.currentSlide;
874
-
875
- var siblings = config.itemsToShow;
876
- return config.centerMode ? Math.ceil(currentSlide - siblings / 2) : currentSlide;
877
- },
878
- upper: function upper() {
879
- var _ref3 = this.$hooper || {},
880
- config = _ref3.config,
881
- currentSlide = _ref3.currentSlide;
882
-
883
- var siblings = config.itemsToShow;
884
- return config.centerMode ? Math.floor(currentSlide + siblings / 2) : Math.floor(currentSlide + siblings - 1);
885
- },
886
891
  isActive: function isActive() {
887
- return this.index >= this.lower && this.index <= this.upper;
892
+ var _this$$hooper$slideBo = this.$hooper.slideBounds,
893
+ upper = _this$$hooper$slideBo.upper,
894
+ lower = _this$$hooper$slideBo.lower;
895
+ return this.index >= lower && this.index <= upper;
888
896
  },
889
897
  isPrev: function isPrev() {
890
- return this.index <= this.lower - 1;
898
+ var lower = this.$hooper.slideBounds.lower;
899
+ var itemsToSlide = this.$hooper.config.itemsToSlide;
900
+ return this.index < lower && this.index >= lower - itemsToSlide;
891
901
  },
892
902
  isNext: function isNext() {
893
- return this.index >= this.upper + 1;
903
+ var upper = this.$hooper.slideBounds.upper;
904
+ var itemsToSlide = this.$hooper.config.itemsToSlide;
905
+ return this.index > upper && this.index <= upper + itemsToSlide;
894
906
  },
895
907
  isCurrent: function isCurrent() {
896
908
  return this.index === this.$hooper.currentSlide;
@@ -1 +1 @@
1
- var t,i;t=this,i=function(t,i){"use strict";function l(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function a(i){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{},n=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.forEach(function(t){l(i,t,e[t])})}return i}function c(t){return function(t){if(Array.isArray(t)){for(var i=0,e=new Array(t.length);i<t.length;i++)e[i]=t[i];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function n(){return Date.now()}function e(t,i){this.create=function(){return window.setInterval(t,i)},this.stop=function(){this.timer&&(window.clearInterval(this.timer),this.timer=null)},this.start=function(){this.timer||(this.timer=this.create())},this.restart=function(t){i=t||i,this.stop(),this.start()},this.timer=this.create()}function u(t,i){var e;return(e=t<0?(t+i)%i:t%i)!=e?0:e}function d(t,i){var e=i.children||i.componentOptions.children||i.text;return t(i.componentOptions.Ctor,i.data,e)}i=i&&i.hasOwnProperty("default")?i.default:i;var r=Object.assign||function(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var i=Object(t),e=1;e<arguments.length;e++){var n=arguments[e];if(null!=n){n=Object(n);for(var r=Object.keys(Object(n)),o=0,s=r.length;o<s;o++){var h=r[o],a=Object.getOwnPropertyDescriptor(n,h);void 0!==a&&a.enumerable&&(i[h]=n[h])}}}return i};var o=Math.sign||function(t){return t<0?-1:0<t?1:0};function f(t,i){var e=1<arguments.length&&void 0!==i?i:{};return t.$scopedSlots.default?t.$scopedSlots.default(e)||[]:t.$slots.default||[]}var p=new i,s={name:"Hooper",provide:function(){return{$hooper:this}},props:{itemsToShow:{default:1,type:Number},itemsToSlide:{default:1,type:Number},initialSlide:{default:0,type:Number},infiniteScroll:{default:!1,type:Boolean},centerMode:{default:!1,type:Boolean},vertical:{default:!1,type:Boolean},rtl:{default:null,type:Boolean},autoPlay:{default:!1,type:Boolean},playSpeed:{default:2e3,type:Number},mouseDrag:{default:!0,type:Boolean},touchDrag:{default:!0,type:Boolean},wheelControl:{default:!0,type:Boolean},keysControl:{default:!0,type:Boolean},shortDrag:{default:!0,type:Boolean},transition:{default:300,type:Number},hoverPause:{default:!0,type:Boolean},trimWhiteSpace:{default:!1,type:Boolean},settings:{default:function(){return{}},type:Object},group:{type:String,default:null}},data:function(){return{isDragging:!1,isSliding:!1,isTouch:!1,isHover:!1,isFocus:!1,slideWidth:0,slideHeight:0,slidesCount:0,trimStart:0,trimEnd:1,currentSlide:null,timer:null,defaults:{},breakpoints:{},delta:{x:0,y:0},config:{}}},computed:{trackTransform:function(){var t=this.config,i=t.infiniteScroll,e=t.vertical,n=t.rtl,r=t.centerMode,o=n?-1:1,s=e?this.slideHeight:this.slideWidth,h=e?this.containerHeight:this.containerWidth,a=(e?this.delta.y:this.delta.x)+o*((r?(h-s)/2:0)-(i?s*this.slidesCount:0)-this.currentSlide*s);return e?"transform: translate(0, ".concat(a,"px);"):"transform: translate(".concat(a,"px, 0);")},trackTransition:function(){return this.isSliding?"transition: ".concat(this.config.transition,"ms"):""}},watch:{group:function(t,i){t!==i&&(p.$off("slideGroup:".concat(i),this._groupSlideHandler),this.addGroupListeners())}},methods:{slideTo:function(t,i){var e=this,n=!(1<arguments.length&&void 0!==i)||i;if(!this.isSliding&&t!==this.currentSlide){this.$emit("beforeSlide",{currentSlide:this.currentSlide,slideTo:a});var r=this.config,o=r.infiniteScroll,s=r.transition,h=this.currentSlide,a=o?t:function(t,i,e){return Math.max(Math.min(t,e),i)}(t,this.trimStart,this.slidesCount-this.trimEnd);this.group&&n&&p.$emit("slideGroup:".concat(this.group),t),this.currentSlide=a,this.isSliding=!0,window.setTimeout(function(){e.isSliding=!1,e.currentSlide=u(a,e.slidesCount)},s),this.$emit("slide",{currentSlide:this.currentSlide,slideFrom:h})}},slideNext:function(){this.slideTo(this.currentSlide+this.config.itemsToSlide)},slidePrev:function(){this.slideTo(this.currentSlide-this.config.itemsToSlide)},initEvents:function(){null===this.defaults.rtl&&(this.defaults.rtl="rtl"===getComputedStyle(this.$el).direction),this.config.autoPlay&&this.initAutoPlay(),this.config.mouseDrag&&this.$refs.list.addEventListener("mousedown",this.onDragStart),this.config.touchDrag&&this.$refs.list.addEventListener("touchstart",this.onDragStart,{passive:!0}),this.config.keysControl&&this.$el.addEventListener("keydown",this.onKeypress),this.config.wheelControl&&(this.lastScrollTime=n(),this.$el.addEventListener("wheel",this.onWheel,{passive:!1})),window.addEventListener("resize",this.update)},initAutoPlay:function(){var t=this;this.timer=new e(function(){t.isSliding||t.isDragging||t.isHover&&t.config.hoverPause||t.isFocus||(t.currentSlide!==t.slidesCount-1||t.config.infiniteScroll?t.slideNext():t.slideTo(0))},this.config.playSpeed)},initDefaults:function(){this.breakpoints=this.settings.breakpoints,this.defaults=r({},this.$props,this.settings),this.config=r({},this.defaults)},update:function(){this.breakpoints&&this.updateConfig(),this.updateWidth(),this.updateTrim(),this.$emit("updated",{containerWidth:this.containerWidth,containerHeight:this.containerHeight,slideWidth:this.slideWidth,slideHeight:this.slideHeight,settings:this.config})},updateTrim:function(){var t=this.config,i=t.trimWhiteSpace,e=t.itemsToShow,n=t.centerMode,r=t.infiniteScroll;if(!i||r)return this.trimStart=0,void(this.trimEnd=1);this.trimStart=n?Math.floor((e-1)/2):0,this.trimEnd=n?Math.ceil(e/2):e},updateWidth:function(){var t=this.$el.getBoundingClientRect();this.containerWidth=t.width,this.containerHeight=t.height,this.config.vertical?this.slideHeight=this.containerHeight/this.config.itemsToShow:this.slideWidth=this.containerWidth/this.config.itemsToShow},updateConfig:function(){var i,e=this;Object.keys(this.breakpoints).sort(function(t,i){return i-t}).some(function(t){if(i=window.matchMedia("(min-width: ".concat(t,"px)")).matches)return e.config=r({},e.config,e.defaults,e.breakpoints[t]),!0}),i||(this.config=r(this.config,this.defaults))},restartTimer:function(){this.timer&&this.timer.restart()},restart:function(){var t=this;this.$nextTick(function(){t.update()})},onDragStart:function(t){this.isTouch="touchstart"===t.type,!this.isTouch&&0!==t.button||(this.startPosition={x:0,y:0},this.endPosition={x:0,y:0},this.isDragging=!0,this.startPosition.x=this.isTouch?t.touches[0].clientX:t.clientX,this.startPosition.y=this.isTouch?t.touches[0].clientY:t.clientY,document.addEventListener(this.isTouch?"touchmove":"mousemove",this.onDrag),document.addEventListener(this.isTouch?"touchend":"mouseup",this.onDragEnd))},isInvalidDirection:function(t,i){return this.config.vertical?!!this.config.vertical&&Math.abs(i)<=Math.abs(t):Math.abs(t)<=Math.abs(i)},onDrag:function(t){if(!this.isSliding){this.endPosition.x=this.isTouch?t.touches[0].clientX:t.clientX,this.endPosition.y=this.isTouch?t.touches[0].clientY:t.clientY;var i=this.endPosition.x-this.startPosition.x,e=this.endPosition.y-this.startPosition.y;this.isInvalidDirection(i,e)||(this.delta.y=e,this.delta.x=i,this.isTouch||t.preventDefault())}},onDragEnd:function(){var t=this.config.shortDrag?.5:.15;if(this.isDragging=!1,this.config.vertical){var i=Math.round(Math.abs(this.delta.y/this.slideHeight)+t);this.slideTo(this.currentSlide-o(this.delta.y)*i)}if(!this.config.vertical){var e=(this.config.rtl?-1:1)*o(this.delta.x),n=Math.round(Math.abs(this.delta.x/this.slideWidth)+t);this.slideTo(this.currentSlide-e*n)}this.delta.x=0,this.delta.y=0,document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.onDrag),document.removeEventListener(this.isTouch?"touchend":"mouseup",this.onDragEnd),this.restartTimer()},onTransitionend:function(){this.isSliding=!1,this.$emit("afterSlide",{currentSlide:this.currentSlide})},onKeypress:function(t){var i=t.key;return i.startsWith("Arrow")&&t.preventDefault(),this.config.vertical?("ArrowUp"===i&&this.slidePrev(),void("ArrowDown"===i&&this.slideNext())):this.config.rtl?("ArrowRight"===i&&this.slidePrev(),void("ArrowLeft"===i&&this.slideNext())):("ArrowRight"===i&&this.slideNext(),void("ArrowLeft"===i&&this.slidePrev()))},onWheel:function(t){if(t.preventDefault(),!(n()-this.lastScrollTime<200)){this.lastScrollTime=n();var i=t.wheelDelta||-t.deltaY,e=o(i);-1===e&&this.slideNext(),1===e&&this.slidePrev()}},addGroupListeners:function(){var i=this;this.group&&(this._groupSlideHandler=function(t){i.slideTo(t,!1)},p.$on("slideGroup:".concat(this.group),this._groupSlideHandler))}},created:function(){this.initDefaults()},mounted:function(){var t=this;this.initEvents(),this.addGroupListeners(),this.$nextTick(function(){t.update(),t.slideTo(t.config.initialSlide||0),t.$emit("loaded")})},beforeDestroy:function(){window.removeEventListener("resize",this.update),this.group&&p.$off("slideGroup:".concat(this.group),this._groupSlideHandler),this.timer&&this.timer.stop()},render:function(t){var i=this,e=function(t){var i=function(t){for(var i=f(this),e=i.length,n=0,r=[],o=0;o<e;o++){var s=i[o],h=s.componentOptions&&s.componentOptions.Ctor;h&&"HooperSlide"===h.options.name&&(s.componentOptions.propsData.index=n,s.data.key=n,s.key=n,s.data.props=a({},s.data.props||{},{isClone:!1,index:n++}),r.push(s))}this.slidesCount=r.length,this.config.infiniteScroll&&(r=function(t,i){for(var e=[],n=[],r=i.length,o=0;o<r;o++){var s=i[o],h=d(t,s);h.data.key="index-".concat(o-r),h.key=h.data.key,h.data.props={index:o-r,isClone:!0},e.push(h);var a=d(t,s);a.data.key="index-".concat(o+r),a.key=a.data.key,a.data.props={index:o+r,isClone:!0},n.push(a)}return[].concat(e,c(i),n)}(t,r));return t("ul",{class:{"hooper-track":!0,"is-dragging":this.isDragging},style:this.trackTransform+this.trackTransition,ref:"track",on:{transitionend:this.onTransitionend}},r)}.call(this,t),e=this.$slots["hooper-addons"]||[],n=t("div",{class:"hooper-liveregion hooper-sr-only",attrs:{"aria-live":"polite","aria-atomic":"true"}},"Item ".concat(this.currentSlide+1," of ").concat(this.slidesCount)),r=[i].concat(c(e),[n]);return[t("div",{class:"hooper-list",ref:"list"},r)]}.call(this,t);return t("section",{class:{hooper:!0,"is-vertical":this.config.vertical,"is-rtl":this.config.rtl},attrs:{tabindex:"0"},on:{focusin:function(){return i.isFocus=!0},focusout:function(){return i.isFocus=!1},mouseover:function(){return i.isHover=!0},mouseleave:function(){return i.isHover=!1}}},e)}};var h={name:"HooperSlide",inject:["$hooper"],props:{isClone:{type:Boolean,default:!1},index:{type:Number,default:0,required:!0}},computed:{style:function(){var t=this.$hooper||{},i=t.config,e=t.slideHeight,n=t.slideWidth;return i.vertical?"height: ".concat(e,"px"):"width: ".concat(n,"px")},lower:function(){var t=this.$hooper||{},i=t.config,e=t.currentSlide,n=i.itemsToShow;return i.centerMode?Math.ceil(e-n/2):e},upper:function(){var t=this.$hooper||{},i=t.config,e=t.currentSlide,n=i.itemsToShow;return i.centerMode?Math.floor(e+n/2):Math.floor(e+n-1)},isActive:function(){return this.index>=this.lower&&this.index<=this.upper},isPrev:function(){return this.index<=this.lower-1},isNext:function(){return this.index>=this.upper+1},isCurrent:function(){return this.index===this.$hooper.currentSlide}},render:function(t){var i={"hooper-slide":!0,"is-clone":this.isClone,"is-active":this.isActive,"is-prev":this.isPrev,"is-next":this.isNext,"is-current":this.isCurrent},e=f(this);return t("li",{class:i,style:this.style,attrs:{"aria-hidden":!this.isActive}},e)}},g={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},v={name:"HooperIcon",functional:!0,inheritAttrs:!0,props:{name:{type:String,required:!0,validator:function(t){return t in g}}},render:function(t,i){var e=i.props,n=g[e.name],r=[];return r.push(t("title",function(t){return(t=t.replace(/([A-Z]+)/g," $1")).charAt(0).toUpperCase()+t.slice(1)}(e.name))),r.push(t("path",{attrs:{d:"M0 0h24v24H0z",fill:"none"}})),r.push(t("path",{attrs:{d:n}})),t("svg",{attrs:{class:"icon icon-".concat(e.name),viewBox:"0 0 24 24",width:"24px",height:"24px"}},r)}},m={inject:["$hooper"],name:"HooperProgress",computed:{currentSlide:function(){return u(this.$hooper.currentSlide,this.$hooper.slidesCount)},progress:function(){var t=this.$hooper.slidesCount-this.$hooper.trimStart-this.$hooper.trimEnd;return 100*(this.currentSlide-this.$hooper.trimStart)/t}},render:function(t){return t("div",{class:"hooper-progress"},[t("div",{class:"hooper-progress-inner",style:"width: ".concat(this.progress,"%")})])}};var S={inject:["$hooper"],name:"HooperPagination",props:{mode:{default:"indicator",type:String}},computed:{currentSlide:function(){return u(this.$hooper.currentSlide,this.$hooper.slidesCount)},slides:function(){var t=this.$hooper.slides.map(function(t,i){return i});return t.slice(this.$hooper.trimStart,this.$hooper.slidesCount-this.$hooper.trimEnd+1)}},render:function(t){var i=this,e=this.$hooper.slidesCount,n="indicator"===this.mode?function(i,e,t,n){for(var r=[],o=function(t){r.push(function(t,i,e,n){return t("li",[t("button",{class:{"hooper-indicator":!0,"is-active":e},on:{click:n},attrs:{type:"button"}},[t("span",{class:"hooper-sr-only"},"item ".concat(i))])])}(i,t,t===e,function(){return n(t)}))},s=0;s<t;s++)o(s);return[i("ol",{class:"hooper-indicators"},r)]}(t,this.currentSlide,e,function(t){return i.$hooper.slideTo(t)}):function(t,i,e){return[t("span",i+1),t("span","/"),t("span",e)]}(t,this.currentSlide,e);return t("div",{class:{"hooper-pagination":!0,"is-vertical":this.$hooper.config.vertical}},n)}};function y(t,i,e,n,r,o){var s,h=r.isVertical,a=r.isRTL,c=e&&e.length?e:[t(v,{props:{name:function(t,i,e){return e?t?"arrowUp":i?"arrowRight":"arrowLeft":t?"arrowDown":i?"arrowLeft":"arrowRight"}(h,a,n)}})];return t("button",{class:(s={},l(s,"hooper-".concat(n?"prev":"next"),!0),l(s,"is-disabled",i),s),attrs:{type:"button"},on:{click:o}},c)}var w={inject:["$hooper"],name:"HooperNavigation",computed:{isPrevDisabled:function(){return!this.$hooper.config.infiniteScroll&&0===this.$hooper.currentSlide},isNextDisabled:function(){return!this.$hooper.config.infiniteScroll&&(this.$hooper.config.trimWhiteSpace?this.$hooper.currentSlide===this.$hooper.slidesCount-Math.min(this.$hooper.config.itemsToShow,this.$hooper.slidesCount):this.$hooper.currentSlide===this.$hooper.slidesCount-1)}},methods:{slideNext:function(){this.$hooper.slideNext(),this.$hooper.restartTimer()},slidePrev:function(){this.$hooper.slidePrev(),this.$hooper.restartTimer()}},render:function(t){var i=this,e={isRTL:this.$hooper.config.rtl,isVertical:this.$hooper.config.vertical},n=[y(t,this.isPrevDisabled,this.$slots["hooper-prev"],!0,e,function(){return i.slidePrev()}),y(t,this.isNextDisabled,this.$slots["hooper-next"],!1,e,function(){return i.slideNext()})];return t("div",{class:{"hooper-navigation":!0,"is-vertical":this.$hooper.config.vertical,"is-rtl":this.$hooper.config.rtl}},n)}};t.Hooper=s,t.Icon=v,t.Navigation=w,t.Pagination=S,t.Progress=m,t.Slide=h,t.addonMixin={inject:["$hooper"]},t.default=s,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],i):i((t=t||self).Hooper={},t.Vue);
1
+ var t,i;t=this,i=function(t,i){"use strict";function l(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function h(i){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{},n=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.forEach(function(t){l(i,t,e[t])})}return i}function u(t){return function(t){if(Array.isArray(t)){for(var i=0,e=new Array(t.length);i<t.length;i++)e[i]=t[i];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function n(){return Date.now()}function e(t,i){this.create=function(){return window.setInterval(t,i)},this.stop=function(){this.timer&&(window.clearInterval(this.timer),this.timer=null)},this.start=function(){this.timer||(this.timer=this.create())},this.restart=function(t){i=t||i,this.stop(),this.start()},this.timer=this.create()}function c(t,i){var e;return(e=t<0?(t+i)%i:t%i)!=e?0:e}function d(t,i){var e=i.children||i.componentOptions.children||i.text;return t(i.componentOptions.Ctor,i.data,e)}i=i&&i.hasOwnProperty("default")?i.default:i;var o=Object.assign||function(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var i=Object(t),e=1;e<arguments.length;e++){var n=arguments[e];if(null!=n){n=Object(n);for(var o=Object.keys(Object(n)),r=0,s=o.length;r<s;r++){var a=o[r],h=Object.getOwnPropertyDescriptor(n,a);void 0!==h&&h.enumerable&&(i[a]=n[a])}}}return i};var r=Math.sign||function(t){return t<0?-1:0<t?1:0};function p(t,i){var e=1<arguments.length&&void 0!==i?i:{};return t.$scopedSlots.default?t.$scopedSlots.default(e)||[]:t.$slots.default||[]}var f=new i,s={name:"Hooper",provide:function(){return{$hooper:this}},props:{itemsToShow:{default:1,type:Number},itemsToSlide:{default:1,type:Number},initialSlide:{default:0,type:Number},infiniteScroll:{default:!1,type:Boolean},centerMode:{default:!1,type:Boolean},vertical:{default:!1,type:Boolean},rtl:{default:null,type:Boolean},autoPlay:{default:!1,type:Boolean},playSpeed:{default:2e3,type:Number},mouseDrag:{default:!0,type:Boolean},touchDrag:{default:!0,type:Boolean},wheelControl:{default:!0,type:Boolean},keysControl:{default:!0,type:Boolean},shortDrag:{default:!0,type:Boolean},transition:{default:300,type:Number},hoverPause:{default:!0,type:Boolean},trimWhiteSpace:{default:!1,type:Boolean},settings:{default:function(){return{}},type:Object},group:{type:String,default:null}},data:function(){return{isDragging:!1,isSliding:!1,isTouch:!1,isHover:!1,isFocus:!1,initialized:!1,slideWidth:0,slideHeight:0,slidesCount:0,trimStart:0,trimEnd:1,currentSlide:null,timer:null,defaults:{},breakpoints:{},delta:{x:0,y:0},config:{}}},computed:{slideBounds:function(){var t=this.config,i=this.currentSlide,e=t.itemsToShow;return{lower:t.centerMode?Math.ceil(i-e/2):i,upper:t.centerMode?Math.floor(i+e/2):Math.floor(i+e-1)}},trackTransform:function(){var t=this.config,i=t.infiniteScroll,e=t.vertical,n=t.rtl,o=t.centerMode,r=n?-1:1,s=e?this.slideHeight:this.slideWidth,a=e?this.containerHeight:this.containerWidth,h=(e?this.delta.y:this.delta.x)+r*((o?(a-s)/2:0)-(i?s*this.slidesCount:0)-this.currentSlide*s);return e?"transform: translate(0, ".concat(h,"px);"):"transform: translate(".concat(h,"px, 0);")},trackTransition:function(){return this.initialized&&this.isSliding?"transition: ".concat(this.config.transition,"ms"):""}},watch:{group:function(t,i){t!==i&&(f.$off("slideGroup:".concat(i),this._groupSlideHandler),this.addGroupListeners())}},methods:{slideTo:function(t,i){var e=this,n=!(1<arguments.length&&void 0!==i)||i;if(!this.isSliding&&t!==this.currentSlide){this.$emit("beforeSlide",{currentSlide:this.currentSlide,slideTo:h});var o=this.config,r=o.infiniteScroll,s=o.transition,a=this.currentSlide,h=r?t:function(t,i,e){return Math.max(Math.min(t,e),i)}(t,this.trimStart,this.slidesCount-this.trimEnd);this.group&&n&&f.$emit("slideGroup:".concat(this.group),t),this.currentSlide=h,this.isSliding=!0,window.setTimeout(function(){e.isSliding=!1,e.currentSlide=c(h,e.slidesCount)},s),this.$emit("slide",{currentSlide:this.currentSlide,slideFrom:a})}},slideNext:function(){this.slideTo(this.currentSlide+this.config.itemsToSlide)},slidePrev:function(){this.slideTo(this.currentSlide-this.config.itemsToSlide)},initEvents:function(){null===this.defaults.rtl&&(this.defaults.rtl="rtl"===getComputedStyle(this.$el).direction),this.config.autoPlay&&this.initAutoPlay(),this.config.mouseDrag&&this.$refs.list.addEventListener("mousedown",this.onDragStart),this.config.touchDrag&&this.$refs.list.addEventListener("touchstart",this.onDragStart,{passive:!0}),this.config.keysControl&&this.$el.addEventListener("keydown",this.onKeypress),this.config.wheelControl&&(this.lastScrollTime=n(),this.$el.addEventListener("wheel",this.onWheel,{passive:!1})),window.addEventListener("resize",this.update)},initAutoPlay:function(){var t=this;this.timer=new e(function(){t.isSliding||t.isDragging||t.isHover&&t.config.hoverPause||t.isFocus||(t.currentSlide!==t.slidesCount-1||t.config.infiniteScroll?t.slideNext():t.slideTo(0))},this.config.playSpeed)},initDefaults:function(){this.breakpoints=this.settings.breakpoints,this.defaults=o({},this.$props,this.settings),this.config=o({},this.defaults)},update:function(){this.breakpoints&&this.updateConfig(),this.updateWidth(),this.updateTrim(),this.$emit("updated",{containerWidth:this.containerWidth,containerHeight:this.containerHeight,slideWidth:this.slideWidth,slideHeight:this.slideHeight,settings:this.config})},updateTrim:function(){var t=this.config,i=t.trimWhiteSpace,e=t.itemsToShow,n=t.centerMode,o=t.infiniteScroll;if(!i||o)return this.trimStart=0,void(this.trimEnd=1);this.trimStart=n?Math.floor((e-1)/2):0,this.trimEnd=n?Math.ceil(e/2):e},updateWidth:function(){var t=this.$el.getBoundingClientRect();this.containerWidth=t.width,this.containerHeight=t.height,this.config.vertical?this.slideHeight=this.containerHeight/this.config.itemsToShow:this.slideWidth=this.containerWidth/this.config.itemsToShow},updateConfig:function(){var i,e=this;Object.keys(this.breakpoints).sort(function(t,i){return i-t}).some(function(t){if(i=window.matchMedia("(min-width: ".concat(t,"px)")).matches)return e.config=o({},e.config,e.defaults,e.breakpoints[t]),!0}),i||(this.config=o(this.config,this.defaults))},restartTimer:function(){this.timer&&this.timer.restart()},restart:function(){var t=this;this.$nextTick(function(){t.update()})},onDragStart:function(t){this.isTouch="touchstart"===t.type,!this.isTouch&&0!==t.button||(this.startPosition={x:0,y:0},this.endPosition={x:0,y:0},this.isDragging=!0,this.startPosition.x=this.isTouch?t.touches[0].clientX:t.clientX,this.startPosition.y=this.isTouch?t.touches[0].clientY:t.clientY,document.addEventListener(this.isTouch?"touchmove":"mousemove",this.onDrag),document.addEventListener(this.isTouch?"touchend":"mouseup",this.onDragEnd))},isInvalidDirection:function(t,i){return this.config.vertical?!!this.config.vertical&&Math.abs(i)<=Math.abs(t):Math.abs(t)<=Math.abs(i)},onDrag:function(t){if(!this.isSliding){this.endPosition.x=this.isTouch?t.touches[0].clientX:t.clientX,this.endPosition.y=this.isTouch?t.touches[0].clientY:t.clientY;var i=this.endPosition.x-this.startPosition.x,e=this.endPosition.y-this.startPosition.y;this.isInvalidDirection(i,e)||(this.delta.y=e,this.delta.x=i,this.isTouch||t.preventDefault())}},onDragEnd:function(){var t=this.config.shortDrag?.5:.15;if(this.isDragging=!1,this.config.vertical){var i=Math.round(Math.abs(this.delta.y/this.slideHeight)+t);this.slideTo(this.currentSlide-r(this.delta.y)*i)}if(!this.config.vertical){var e=(this.config.rtl?-1:1)*r(this.delta.x),n=Math.round(Math.abs(this.delta.x/this.slideWidth)+t);this.slideTo(this.currentSlide-e*n)}this.delta.x=0,this.delta.y=0,document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.onDrag),document.removeEventListener(this.isTouch?"touchend":"mouseup",this.onDragEnd),this.restartTimer()},onTransitionend:function(){this.isSliding=!1,this.$emit("afterSlide",{currentSlide:this.currentSlide})},onKeypress:function(t){var i=t.key;return i.startsWith("Arrow")&&t.preventDefault(),this.config.vertical?("ArrowUp"===i&&this.slidePrev(),void("ArrowDown"===i&&this.slideNext())):this.config.rtl?("ArrowRight"===i&&this.slidePrev(),void("ArrowLeft"===i&&this.slideNext())):("ArrowRight"===i&&this.slideNext(),void("ArrowLeft"===i&&this.slidePrev()))},onWheel:function(t){if(t.preventDefault(),!(n()-this.lastScrollTime<200)){this.lastScrollTime=n();var i=t.wheelDelta||-t.deltaY,e=r(i);-1===e&&this.slideNext(),1===e&&this.slidePrev()}},addGroupListeners:function(){var i=this;this.group&&(this._groupSlideHandler=function(t){i.slideTo(t,!1)},f.$on("slideGroup:".concat(this.group),this._groupSlideHandler))}},created:function(){this.initDefaults()},mounted:function(){var t=this;this.initEvents(),this.addGroupListeners(),this.$nextTick(function(){t.update(),t.slideTo(t.config.initialSlide||0),setTimeout(function(){t.$emit("loaded"),t.initialized=!0},t.transition)})},beforeDestroy:function(){window.removeEventListener("resize",this.update),this.group&&f.$off("slideGroup:".concat(this.group),this._groupSlideHandler),this.timer&&this.timer.stop()},render:function(t){var i=this,e=function(t){var i=function(t){for(var i=p(this),e=i.length,n=0,o=[],r=0;r<e;r++){var s=i[r],a=s.componentOptions&&s.componentOptions.Ctor;a&&"HooperSlide"===a.options.name&&(s.componentOptions.propsData.index=n,s.data.key=n,s.key=n,s.data.props=h({},s.data.props||{},{isClone:!1,index:n++}),o.push(s))}this.slidesCount=o.length,this.config.infiniteScroll&&(o=function(t,i){for(var e=[],n=[],o=i.length,r=0;r<o;r++){var s=i[r],a=d(t,s),h=r-o;a.data.key="before_".concat(r),a.key=a.data.key,a.componentOptions.propsData.index=h,a.data.props={index:h,isClone:!0},e.push(a);var c=d(t,s);h=r+o,c.data.key="after_".concat(h),c.componentOptions.propsData.index=h,c.key=c.data.key,c.data.props={index:h,isClone:!0},n.push(c)}return[].concat(e,u(i),n)}(t,o));return t("ul",{class:{"hooper-track":!0,"is-dragging":this.isDragging},style:this.trackTransform+this.trackTransition,ref:"track",on:{transitionend:this.onTransitionend}},o)}.call(this,t),e=this.$slots["hooper-addons"]||[],n=t("div",{class:"hooper-liveregion hooper-sr-only",attrs:{"aria-live":"polite","aria-atomic":"true"}},"Item ".concat(this.currentSlide+1," of ").concat(this.slidesCount)),o=[i].concat(u(e),[n]);return[t("div",{class:"hooper-list",ref:"list"},o)]}.call(this,t);return t("section",{class:{hooper:!0,"is-vertical":this.config.vertical,"is-rtl":this.config.rtl},attrs:{tabindex:"0"},on:{focusin:function(){return i.isFocus=!0},focusout:function(){return i.isFocus=!1},mouseover:function(){return i.isHover=!0},mouseleave:function(){return i.isHover=!1}}},e)}};var a={name:"HooperSlide",inject:["$hooper"],props:{isClone:{type:Boolean,default:!1},index:{type:Number,required:!0}},computed:{style:function(){var t=this.$hooper||{},i=t.config,e=t.slideHeight,n=t.slideWidth;return i.vertical?"height: ".concat(e,"px"):"width: ".concat(n,"px")},isActive:function(){var t=this.$hooper.slideBounds,i=t.upper,e=t.lower;return this.index>=e&&this.index<=i},isPrev:function(){var t=this.$hooper.slideBounds.lower,i=this.$hooper.config.itemsToSlide;return this.index<t&&this.index>=t-i},isNext:function(){var t=this.$hooper.slideBounds.upper,i=this.$hooper.config.itemsToSlide;return this.index>t&&this.index<=t+i},isCurrent:function(){return this.index===this.$hooper.currentSlide}},render:function(t){var i={"hooper-slide":!0,"is-clone":this.isClone,"is-active":this.isActive,"is-prev":this.isPrev,"is-next":this.isNext,"is-current":this.isCurrent},e=p(this);return t("li",{class:i,style:this.style,attrs:{"aria-hidden":!this.isActive}},e)}},g={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},v={name:"HooperIcon",functional:!0,inheritAttrs:!0,props:{name:{type:String,required:!0,validator:function(t){return t in g}}},render:function(t,i){var e=i.props,n=g[e.name],o=[];return o.push(t("title",function(t){return(t=t.replace(/([A-Z]+)/g," $1")).charAt(0).toUpperCase()+t.slice(1)}(e.name))),o.push(t("path",{attrs:{d:"M0 0h24v24H0z",fill:"none"}})),o.push(t("path",{attrs:{d:n}})),t("svg",{attrs:{class:"icon icon-".concat(e.name),viewBox:"0 0 24 24",width:"24px",height:"24px"}},o)}},m={inject:["$hooper"],name:"HooperProgress",computed:{currentSlide:function(){return c(this.$hooper.currentSlide,this.$hooper.slidesCount)},progress:function(){var t=this.$hooper.slidesCount-this.$hooper.trimStart-this.$hooper.trimEnd;return 100*(this.currentSlide-this.$hooper.trimStart)/t}},render:function(t){return t("div",{class:"hooper-progress"},[t("div",{class:"hooper-progress-inner",style:"width: ".concat(this.progress,"%")})])}};var S={inject:["$hooper"],name:"HooperPagination",props:{mode:{default:"indicator",type:String}},computed:{currentSlide:function(){return c(this.$hooper.currentSlide,this.$hooper.slidesCount)},slides:function(){var t=this.$hooper.slides.map(function(t,i){return i});return t.slice(this.$hooper.trimStart,this.$hooper.slidesCount-this.$hooper.trimEnd+1)}},render:function(t){var i=this,e=this.$hooper.slidesCount,n="indicator"===this.mode?function(i,e,t,n){for(var o=[],r=function(t){o.push(function(t,i,e,n){return t("li",[t("button",{class:{"hooper-indicator":!0,"is-active":e},on:{click:n},attrs:{type:"button"}},[t("span",{class:"hooper-sr-only"},"item ".concat(i))])])}(i,t,t===e,function(){return n(t)}))},s=0;s<t;s++)r(s);return[i("ol",{class:"hooper-indicators"},o)]}(t,this.currentSlide,e,function(t){return i.$hooper.slideTo(t)}):function(t,i,e){return[t("span",i+1),t("span","/"),t("span",e)]}(t,this.currentSlide,e);return t("div",{class:{"hooper-pagination":!0,"is-vertical":this.$hooper.config.vertical}},n)}};function y(t,i,e,n,o,r){var s,a=o.isVertical,h=o.isRTL,c=e&&e.length?e:[t(v,{props:{name:function(t,i,e){return e?t?"arrowUp":i?"arrowRight":"arrowLeft":t?"arrowDown":i?"arrowLeft":"arrowRight"}(a,h,n)}})];return t("button",{class:(s={},l(s,"hooper-".concat(n?"prev":"next"),!0),l(s,"is-disabled",i),s),attrs:{type:"button"},on:{click:r}},c)}var $={inject:["$hooper"],name:"HooperNavigation",computed:{isPrevDisabled:function(){return!this.$hooper.config.infiniteScroll&&0===this.$hooper.currentSlide},isNextDisabled:function(){return!this.$hooper.config.infiniteScroll&&(this.$hooper.config.trimWhiteSpace?this.$hooper.currentSlide===this.$hooper.slidesCount-Math.min(this.$hooper.config.itemsToShow,this.$hooper.slidesCount):this.$hooper.currentSlide===this.$hooper.slidesCount-1)}},methods:{slideNext:function(){this.$hooper.slideNext(),this.$hooper.restartTimer()},slidePrev:function(){this.$hooper.slidePrev(),this.$hooper.restartTimer()}},render:function(t){var i=this,e={isRTL:this.$hooper.config.rtl,isVertical:this.$hooper.config.vertical},n=[y(t,this.isPrevDisabled,this.$slots["hooper-prev"],!0,e,function(){return i.slidePrev()}),y(t,this.isNextDisabled,this.$slots["hooper-next"],!1,e,function(){return i.slideNext()})];return t("div",{class:{"hooper-navigation":!0,"is-vertical":this.$hooper.config.vertical,"is-rtl":this.$hooper.config.rtl}},n)}};t.Hooper=s,t.Icon=v,t.Navigation=$,t.Pagination=S,t.Progress=m,t.Slide=a,t.addonMixin={inject:["$hooper"]},t.default=s,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],i):i((t=t||self).Hooper={},t.Vue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hooper",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "A customizable accessible carousel slider optimized for Vue",
5
5
  "module": "dist/hooper.esm.js",
6
6
  "unpkg": "dist/hooper.js",
@@ -17,14 +17,14 @@
17
17
  "test": "jest --config jest.config.json"
18
18
  },
19
19
  "devDependencies": {
20
- "@babel/core": "^7.5.4",
20
+ "@babel/core": "^7.5.5",
21
21
  "@commitlint/cli": "^8.1.0",
22
22
  "@vue/test-utils": "^1.0.0-beta.29",
23
23
  "babel-core": "^7.0.0-bridge.0",
24
24
  "babel-eslint": "^10.0.2",
25
25
  "babel-jest": "^24.8.0",
26
26
  "chalk": "^2.4.2",
27
- "eslint": "^6.0.1",
27
+ "eslint": "^6.1.0",
28
28
  "eslint-config-prettier": "^6.0.0",
29
29
  "eslint-plugin-prettier": "^3.1.0",
30
30
  "eslint-plugin-vue": "^5.2.3",
@@ -32,16 +32,16 @@
32
32
  "friendly-errors-webpack-plugin": "^1.7.0",
33
33
  "gzip-size": "^5.1.1",
34
34
  "html-webpack-plugin": "^3.2.0",
35
- "husky": "^3.0.0",
35
+ "husky": "^3.0.3",
36
36
  "jest": "24.8.0",
37
- "lint-staged": "^9.2.0",
37
+ "lint-staged": "^9.2.1",
38
38
  "mkdirp": "^0.5.1",
39
39
  "prettier": "^1.18.2",
40
40
  "pretty-quick": "^1.11.1",
41
41
  "progress-bar-webpack-plugin": "^1.12.1",
42
- "rollup": "^1.17.0",
42
+ "rollup": "^1.19.4",
43
43
  "rollup-plugin-babel": "^4.3.3",
44
- "rollup-plugin-commonjs": "^10.0.1",
44
+ "rollup-plugin-commonjs": "^10.0.2",
45
45
  "rollup-plugin-css-only": "^1.0.0",
46
46
  "rollup-plugin-node-resolve": "^5.2.0",
47
47
  "rollup-plugin-replace": "^2.2.0",
@@ -51,8 +51,7 @@
51
51
  "vue-jest": "^3.0.4",
52
52
  "vue-server-renderer": "^2.6.10",
53
53
  "vue-template-compiler": "^2.6.10",
54
- "vuepress": "^1.0.2",
55
- "webpack-dev-server": "^3.7.2"
54
+ "vuepress": "^1.0.3"
56
55
  },
57
56
  "license": "MIT",
58
57
  "keywords": [],