From 8663e63e871b364a795696a96f752b5901dd62a5 Mon Sep 17 00:00:00 2001 From: Vadym Shymko Date: Mon, 28 May 2018 23:00:53 +0300 Subject: [PATCH] Fix bug with empty item style prop --- dist/Carousel.js | 2 +- dist/Carousel.js.map | 2 +- dist/index.js | 2 +- dist/index.js.map | 2 +- example/src/App.js | 3 --- package.json | 2 +- src/components/Carousel/index.jsx | 20 ++++++-------------- 7 files changed, 11 insertions(+), 22 deletions(-) diff --git a/dist/Carousel.js b/dist/Carousel.js index d82b66e..c129ba5 100644 --- a/dist/Carousel.js +++ b/dist/Carousel.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("prop-types"),require("react")):"function"==typeof define&&define.amd?define(["prop-types","react"],n):"object"==typeof exports?exports["reactjs-simple-carousel"]=n(require("prop-types"),require("react")):t["reactjs-simple-carousel"]=n(t.PropTypes,t.React)}(window,function(t,n){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s=335)}([function(t,n,e){var r=e(2),i=e(26),o=e(13),u=e(12),a=e(20),c=function(t,n,e){var s,f,l,h,v=t&c.F,p=t&c.G,d=t&c.S,y=t&c.P,g=t&c.B,m=p?r:d?r[n]||(r[n]={}):(r[n]||{}).prototype,b=p?i:i[n]||(i[n]={}),S=b.prototype||(b.prototype={});for(s in p&&(e=n),e)l=((f=!v&&m&&void 0!==m[s])?m:e)[s],h=g&&f?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,m&&u(m,s,l,t&c.U),b[s]!=l&&o(b,s,h),y&&S[s]!=l&&(S[s]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(62)("wks"),i=e(40),o=e(2).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){var r=e(23),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){var r=e(1),i=e(123),o=e(25),u=Object.defineProperty;n.f=e(8)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){t.exports=!e(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(24);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(0),i=e(3),o=e(24),u=/"/g,a=function(t,n,e,r){var i=String(o(t)),a="<"+n;return""!==e&&(a+=" "+e+'="'+String(r).replace(u,""")+'"'),a+">"+i+""};t.exports=function(t,n){var e={};e[t]=n(a),r(r.P+r.F*i(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",e)}},function(t,n,e){var r=e(2),i=e(13),o=e(14),u=e(40)("src"),a=Function.toString,c=(""+a).split("toString");e(26).inspectSource=function(t){return a.call(t)},(t.exports=function(t,n,e,a){var s="function"==typeof e;s&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(s&&(o(e,u)||i(e,u,t[n]?""+t[n]:c.join(String(n)))),t===r?t[n]=e:a?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||a.call(this)})},function(t,n,e){var r=e(7),i=e(41);t.exports=e(8)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(14),i=e(9),o=e(87)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(47),i=e(41),o=e(17),u=e(25),a=e(14),c=e(123),s=Object.getOwnPropertyDescriptor;n.f=e(8)?s:function(t,n){if(t=o(t),n=u(n,!0),c)try{return s(t,n)}catch(t){}if(a(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(48),i=e(24);t.exports=function(t){return r(i(t))}},function(t,n,e){"use strict";var r=e(3);t.exports=function(t,n){return!!t&&r(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(10);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(20),i=e(48),o=e(9),u=e(6),a=e(70);t.exports=function(t,n){var e=1==t,c=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,v=n||a;return function(n,a,p){for(var d,y,g=o(n),m=i(g),b=r(a,p,3),S=u(m.length),x=0,w=e?v(n,S):c?v(n,0):void 0;S>x;x++)if((h||x in m)&&(y=b(d=m[x],x,g),t))if(e)w[x]=y;else if(y)switch(t){case 3:return!0;case 5:return d;case 6:return x;case 2:w.push(d)}else if(f)return!1;return l?-1:s||f?f:w}}},function(t,n,e){var r=e(0),i=e(26),o=e(3);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o(function(){e(1)}),"Object",u)}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){var e=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(102),i=e(0),o=e(62)("metadata"),u=o.store||(o.store=new(e(99))),a=function(t,n,e){var i=u.get(t);if(!i){if(!e)return;u.set(t,i=new r)}var o=i.get(n);if(!o){if(!e)return;i.set(n,o=new r)}return o};t.exports={store:u,map:a,has:function(t,n,e){var r=a(n,e,!1);return void 0!==r&&r.has(t)},get:function(t,n,e){var r=a(n,e,!1);return void 0===r?void 0:r.get(t)},set:function(t,n,e,r){a(e,r,!0).set(t,n)},keys:function(t,n){var e=a(t,n,!1),r=[];return e&&e.forEach(function(t,n){r.push(n)}),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,n,e){"use strict";if(e(8)){var r=e(39),i=e(2),o=e(3),u=e(0),a=e(52),c=e(64),s=e(20),f=e(33),l=e(41),h=e(13),v=e(31),p=e(23),d=e(6),y=e(97),g=e(37),m=e(25),b=e(14),S=e(46),x=e(4),w=e(9),_=e(73),M=e(36),E=e(15),O=e(35).f,I=e(71),L=e(40),P=e(5),N=e(21),T=e(61),A=e(54),F=e(68),j=e(43),R=e(57),k=e(34),C=e(69),D=e(107),B=e(7),U=e(16),W=B.f,V=U.f,G=i.RangeError,J=i.TypeError,z=i.Uint8Array,X=Array.prototype,Y=c.ArrayBuffer,q=c.DataView,K=N(0),H=N(2),$=N(3),Q=N(4),Z=N(5),tt=N(6),nt=T(!0),et=T(!1),rt=F.values,it=F.keys,ot=F.entries,ut=X.lastIndexOf,at=X.reduce,ct=X.reduceRight,st=X.join,ft=X.sort,lt=X.slice,ht=X.toString,vt=X.toLocaleString,pt=P("iterator"),dt=P("toStringTag"),yt=L("typed_constructor"),gt=L("def_constructor"),mt=a.CONSTR,bt=a.TYPED,St=a.VIEW,xt=N(1,function(t,n){return Ot(A(t,t[gt]),n)}),wt=o(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),_t=!!z&&!!z.prototype.set&&o(function(){new z(1).set({})}),Mt=function(t,n){var e=p(t);if(e<0||e%n)throw G("Wrong offset!");return e},Et=function(t){if(x(t)&&bt in t)return t;throw J(t+" is not a typed array!")},Ot=function(t,n){if(!(x(t)&&yt in t))throw J("It is not a typed array constructor!");return new t(n)},It=function(t,n){return Lt(A(t,t[gt]),n)},Lt=function(t,n){for(var e=0,r=n.length,i=Ot(t,r);r>e;)i[e]=n[e++];return i},Pt=function(t,n,e){W(t,n,{get:function(){return this._d[e]}})},Nt=function(t){var n,e,r,i,o,u,a=w(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,h=I(a);if(void 0!=h&&!_(h)){for(u=h.call(a),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);a=r}for(l&&c>2&&(f=s(f,arguments[2],2)),n=0,e=d(a.length),i=Ot(this,e);e>n;n++)i[n]=l?f(a[n],n):a[n];return i},Tt=function(){for(var t=0,n=arguments.length,e=Ot(this,n);n>t;)e[t]=arguments[t++];return e},At=!!z&&o(function(){vt.call(new z(1))}),Ft=function(){return vt.apply(At?lt.call(Et(this)):Et(this),arguments)},jt={copyWithin:function(t,n){return D.call(Et(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Q(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Et(this),arguments)},filter:function(t){return It(this,H(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Z(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){K(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(Et(this),arguments)},lastIndexOf:function(t){return ut.apply(Et(this),arguments)},map:function(t){return xt(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Et(this),arguments)},reduceRight:function(t){return ct.apply(Et(this),arguments)},reverse:function(){for(var t,n=Et(this).length,e=Math.floor(n/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Et(this),t)},subarray:function(t,n){var e=Et(this),r=e.length,i=g(t,r);return new(A(e,e[gt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,d((void 0===n?r:g(n,r))-i))}},Rt=function(t,n){return It(this,lt.call(Et(this),t,n))},kt=function(t){Et(this);var n=Mt(arguments[1],1),e=this.length,r=w(t),i=d(r.length),o=0;if(i+n>e)throw G("Wrong length!");for(;o255?255:255&r),i.v[v](e*n+i.o,r,wt)}(this,e,t)},enumerable:!0})};b?(p=e(function(t,e,r,i){f(t,p,s,"_d");var o,u,a,c,l=0,v=0;if(x(e)){if(!(e instanceof Y||"ArrayBuffer"==(c=S(e))||"SharedArrayBuffer"==c))return bt in e?Lt(p,e):Nt.call(p,e);o=e,v=Mt(r,n);var g=e.byteLength;if(void 0===i){if(g%n)throw G("Wrong length!");if((u=g-v)<0)throw G("Wrong length!")}else if((u=d(i)*n)+v>g)throw G("Wrong length!");a=u/n}else a=y(e),o=new Y(u=a*n);for(h(t,"_d",{b:o,o:v,l:u,e:a,v:new q(o)});lb;b++)if((y=n?m(u(p=t[b])[0],p[1]):m(t[b]))===s||y===f)return y}else for(d=g.call(t);!(p=d.next()).done;)if((y=i(d,m,p.value,n))===s||y===f)return y}).BREAK=s,n.RETURN=f},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){"use strict";var r=e(2),i=e(7),o=e(8),u=e(5)("species");t.exports=function(t){var n=r[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r=e(121),i=e(86).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){var r=e(1),i=e(120),o=e(86),u=e(87)("IE_PROTO"),a=function(){},c=function(){var t,n=e(89)("iframe"),r=o.length;for(n.style.display="none",e(85).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("