Comparing version 4.0.0-beta.2 to 4.0.0-beta.3
# Change Log | ||
## Swiper 4.0.0-beta.3 - Released on September 13, 2017 | ||
* Dom7 update to latest version | ||
* Small core refactoring to get better results within tree-shaking bundles | ||
## Swiper 4.0.0-beta.2 - Released on September 2, 2017 | ||
@@ -4,0 +8,0 @@ * Disable a11y by default |
{ | ||
"name": "swiper", | ||
"version": "4.0.0-beta.2", | ||
"version": "4.0.0-beta.3", | ||
"description": "Most modern mobile touch slider and framework with hardware accelerated transitions", | ||
@@ -49,8 +49,8 @@ "main": "dist/js/swiper.js", | ||
"devDependencies": { | ||
"eslint": "^4.5.0", | ||
"eslint-config-airbnb-base": "^11.3.1", | ||
"eslint": "^4.6.1", | ||
"eslint-config-airbnb-base": "^11.3.2", | ||
"eslint-plugin-import": "^2.7.0", | ||
"gulp": "^3.9.1", | ||
"gulp-autoprefixer": "^4.0.0", | ||
"gulp-clean-css": "^3.7.0", | ||
"gulp-clean-css": "^3.8.0", | ||
"gulp-connect": "^5.0.0", | ||
@@ -66,4 +66,4 @@ "gulp-header": "^1.8.9", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-replace": "^1.1.1", | ||
"rollup-stream": "^1.23.1", | ||
"rollup-plugin-replace": "^1.2.1", | ||
"rollup-stream": "^1.24.1", | ||
"vinyl-buffer": "^1.0.0", | ||
@@ -73,4 +73,4 @@ "vinyl-source-stream": "^1.1.0" | ||
"dependencies": { | ||
"dom7": "^1.7.1" | ||
"dom7": "^2.0.0" | ||
} | ||
} |
@@ -8,4 +8,2 @@ import window from '../../utils/window'; | ||
import touchEventsData from './events/touchEventsData'; | ||
import update from './update/index'; | ||
@@ -22,4 +20,19 @@ import translate from './translate/index'; | ||
import images from './images/index'; | ||
import defaults from './defaults'; | ||
const prototypes = { | ||
update, | ||
translate, | ||
transition, | ||
slide, | ||
loop, | ||
grabCursor, | ||
manipulation, | ||
events, | ||
breakpoints, | ||
classes, | ||
images, | ||
}; | ||
class Swiper extends SwiperClass { | ||
@@ -41,2 +54,10 @@ constructor(...args) { | ||
Object.keys(prototypes).forEach((prototypeGroup) => { | ||
Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => { | ||
if (!Swiper.prototype[protoMethod]) { | ||
Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; | ||
} | ||
}); | ||
}); | ||
// Swiper Instance | ||
@@ -138,3 +159,22 @@ const swiper = this; | ||
}()), | ||
touchEventsData: Utils.extend({}, touchEventsData), | ||
touchEventsData: { | ||
isTouched: undefined, | ||
isMoved: undefined, | ||
allowTouchCallbacks: undefined, | ||
touchStartTime: undefined, | ||
isScrolling: undefined, | ||
currentTranslate: undefined, | ||
startTranslate: undefined, | ||
allowThresholdMove: undefined, | ||
// Form elements to match | ||
formElements: 'input, select, textarea, button, video', | ||
// Last click time | ||
lastClickTime: Utils.now(), | ||
clickTimeout: undefined, | ||
// Velocities | ||
velocities: [], | ||
allowMomentumBounce: undefined, | ||
isTouchEvent: undefined, | ||
startMoving: undefined, | ||
}, | ||
@@ -335,25 +375,10 @@ // Clicks | ||
} | ||
static get Class() { | ||
return SwiperClass; | ||
} | ||
static get $() { | ||
return $; | ||
} | ||
} | ||
const prototypes = Utils.extend( | ||
{}, | ||
update, | ||
translate, | ||
transition, | ||
slide, | ||
loop, | ||
grabCursor, | ||
manipulation, | ||
events, | ||
breakpoints, | ||
classes, | ||
images | ||
); | ||
Object.keys(prototypes).forEach((protoMethod) => { | ||
Swiper.prototype[protoMethod] = prototypes[protoMethod]; | ||
}); | ||
Swiper.Class = SwiperClass; | ||
export default Swiper; |
@@ -9,4 +9,4 @@ import Browser from '../../utils/browser'; | ||
static: { | ||
Browser, | ||
browser: Browser, | ||
}, | ||
}; |
@@ -9,4 +9,4 @@ import Device from '../../utils/device'; | ||
static: { | ||
Device, | ||
device: Device, | ||
}, | ||
}; |
@@ -9,4 +9,4 @@ import Support from '../../utils/support'; | ||
static: { | ||
Support, | ||
support: Support, | ||
}, | ||
}; |
@@ -13,10 +13,10 @@ // Swiper Class | ||
Swiper | ||
.use(Device) | ||
.use(Support) | ||
.use(Browser) | ||
.use(Resize) | ||
.use(Observer) | ||
Swiper.components = [ | ||
Device, | ||
Support, | ||
Browser, | ||
Resize, | ||
Observer, | ||
//INSTALL_COMPONENTS | ||
]; | ||
//EXPORT |
import window from './window'; | ||
function Browser() { | ||
const Browser = (function Browser() { | ||
function isIE9() { | ||
@@ -24,4 +24,4 @@ // create temporary DIV | ||
}; | ||
} | ||
}()); | ||
export default Browser(); | ||
export default Browser; |
@@ -115,2 +115,7 @@ import Utils from './utils'; | ||
} | ||
static set components(components) { | ||
const Class = this; | ||
if (!Class.use) return; | ||
Class.use(components); | ||
} | ||
static installModule(module, ...params) { | ||
@@ -117,0 +122,0 @@ const Class = this; |
import window from './window'; | ||
function Device() { | ||
const Device = (function Device() { | ||
const ua = window.navigator.userAgent; | ||
@@ -85,4 +85,4 @@ | ||
return device; | ||
} | ||
}()); | ||
export default Device(); | ||
export default Device; |
import window from './window'; | ||
function Support() { | ||
const Support = (function Support() { | ||
return { | ||
@@ -46,3 +46,4 @@ touch: (window.Modernizr && window.Modernizr.touch === true) || (function checkTouch() { | ||
}; | ||
} | ||
export default Support(); | ||
}()); | ||
export default Support; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1355528
116
24257
+ Addeddom7@2.1.5(transitive)
+ Addedssr-window@2.0.0(transitive)
- Removeddom7@1.7.2(transitive)
Updateddom7@^2.0.0