react-swipeable-list
Advanced tools
Comparing version 1.9.3 to 1.10.0
@@ -125,2 +125,8 @@ import { | ||
threshold?: number; | ||
/** | ||
* default: `false` | ||
* | ||
* Disables mouse events for swiping. | ||
*/ | ||
optOutMouseEvents?: boolean; | ||
} | ||
@@ -229,4 +235,10 @@ | ||
className?: string; | ||
/** | ||
* default: `false` | ||
* | ||
* Disables mouse events for swiping. | ||
*/ | ||
optOutMouseEvents?: boolean; | ||
} | ||
export class SwipeableListItem extends PureComponent<SwipeableListItemProps> {} |
@@ -252,2 +252,4 @@ 'use strict'; | ||
destructiveCallbackDelay = _this$props$destructi === void 0 ? 1000 : _this$props$destructi, | ||
_this$props$optOutMou = _this$props.optOutMouseEvents, | ||
optOutMouseEvents = _this$props$optOutMou === void 0 ? false : _this$props$optOutMou, | ||
style = _this$props.style, | ||
@@ -271,2 +273,3 @@ _this$props$type = _this$props.type, | ||
listType: type, | ||
optOutMouseEvents: optOutMouseEvents, | ||
scrollStartThreshold: scrollStartThreshold, | ||
@@ -294,2 +297,3 @@ swipeStartThreshold: swipeStartThreshold, | ||
destructiveCallbackDelay: PropTypes__default["default"].number, | ||
optOutMouseEvents: PropTypes__default["default"].bool, | ||
style: PropTypes__default["default"].object, | ||
@@ -1021,3 +1025,6 @@ type: PropTypes__default["default"].oneOf(Object.values(Type)), | ||
value: function componentDidMount() { | ||
this.listElement.addEventListener('mousedown', this.handleDragStartMouse); | ||
if (!this.props.optOutMouseEvents) { | ||
this.listElement.addEventListener('mousedown', this.handleDragStartMouse); | ||
} | ||
this.listElement.addEventListener('touchstart', this.handleDragStartTouch, { | ||
@@ -1062,3 +1069,6 @@ passive: true | ||
this.listElement.removeEventListener('mousedown', this.handleDragStartMouse); | ||
if (!this.props.optOutMouseEvents) { | ||
this.listElement.removeEventListener('mousedown', this.handleDragStartMouse); | ||
} | ||
this.listElement.removeEventListener('touchstart', this.handleDragStartTouch); | ||
@@ -1119,2 +1129,3 @@ this.listElement.removeEventListener('touchend', this.handleDragEndTouch); | ||
onSwipeStart: PropTypes__default["default"].func, | ||
optOutMouseEvents: PropTypes__default["default"].bool, | ||
scrollStartThreshold: PropTypes__default["default"].number, | ||
@@ -1121,0 +1132,0 @@ swipeStartThreshold: PropTypes__default["default"].number, |
@@ -243,2 +243,4 @@ import React, { PureComponent } from 'react'; | ||
destructiveCallbackDelay = _this$props$destructi === void 0 ? 1000 : _this$props$destructi, | ||
_this$props$optOutMou = _this$props.optOutMouseEvents, | ||
optOutMouseEvents = _this$props$optOutMou === void 0 ? false : _this$props$optOutMou, | ||
style = _this$props.style, | ||
@@ -262,2 +264,3 @@ _this$props$type = _this$props.type, | ||
listType: type, | ||
optOutMouseEvents: optOutMouseEvents, | ||
scrollStartThreshold: scrollStartThreshold, | ||
@@ -285,2 +288,3 @@ swipeStartThreshold: swipeStartThreshold, | ||
destructiveCallbackDelay: PropTypes.number, | ||
optOutMouseEvents: PropTypes.bool, | ||
style: PropTypes.object, | ||
@@ -1012,3 +1016,6 @@ type: PropTypes.oneOf(Object.values(Type)), | ||
value: function componentDidMount() { | ||
this.listElement.addEventListener('mousedown', this.handleDragStartMouse); | ||
if (!this.props.optOutMouseEvents) { | ||
this.listElement.addEventListener('mousedown', this.handleDragStartMouse); | ||
} | ||
this.listElement.addEventListener('touchstart', this.handleDragStartTouch, { | ||
@@ -1053,3 +1060,6 @@ passive: true | ||
this.listElement.removeEventListener('mousedown', this.handleDragStartMouse); | ||
if (!this.props.optOutMouseEvents) { | ||
this.listElement.removeEventListener('mousedown', this.handleDragStartMouse); | ||
} | ||
this.listElement.removeEventListener('touchstart', this.handleDragStartTouch); | ||
@@ -1110,2 +1120,3 @@ this.listElement.removeEventListener('touchend', this.handleDragEndTouch); | ||
onSwipeStart: PropTypes.func, | ||
optOutMouseEvents: PropTypes.bool, | ||
scrollStartThreshold: PropTypes.number, | ||
@@ -1112,0 +1123,0 @@ swipeStartThreshold: PropTypes.number, |
@@ -251,2 +251,4 @@ (function (global, factory) { | ||
destructiveCallbackDelay = _this$props$destructi === void 0 ? 1000 : _this$props$destructi, | ||
_this$props$optOutMou = _this$props.optOutMouseEvents, | ||
optOutMouseEvents = _this$props$optOutMou === void 0 ? false : _this$props$optOutMou, | ||
style = _this$props.style, | ||
@@ -270,2 +272,3 @@ _this$props$type = _this$props.type, | ||
listType: type, | ||
optOutMouseEvents: optOutMouseEvents, | ||
scrollStartThreshold: scrollStartThreshold, | ||
@@ -293,2 +296,3 @@ swipeStartThreshold: swipeStartThreshold, | ||
destructiveCallbackDelay: PropTypes__default["default"].number, | ||
optOutMouseEvents: PropTypes__default["default"].bool, | ||
style: PropTypes__default["default"].object, | ||
@@ -1020,3 +1024,6 @@ type: PropTypes__default["default"].oneOf(Object.values(Type)), | ||
value: function componentDidMount() { | ||
this.listElement.addEventListener('mousedown', this.handleDragStartMouse); | ||
if (!this.props.optOutMouseEvents) { | ||
this.listElement.addEventListener('mousedown', this.handleDragStartMouse); | ||
} | ||
this.listElement.addEventListener('touchstart', this.handleDragStartTouch, { | ||
@@ -1061,3 +1068,6 @@ passive: true | ||
this.listElement.removeEventListener('mousedown', this.handleDragStartMouse); | ||
if (!this.props.optOutMouseEvents) { | ||
this.listElement.removeEventListener('mousedown', this.handleDragStartMouse); | ||
} | ||
this.listElement.removeEventListener('touchstart', this.handleDragStartTouch); | ||
@@ -1118,2 +1128,3 @@ this.listElement.removeEventListener('touchend', this.handleDragEndTouch); | ||
onSwipeStart: PropTypes__default["default"].func, | ||
optOutMouseEvents: PropTypes__default["default"].bool, | ||
scrollStartThreshold: PropTypes__default["default"].number, | ||
@@ -1120,0 +1131,0 @@ swipeStartThreshold: PropTypes__default["default"].number, |
{ | ||
"name": "react-swipeable-list", | ||
"description": "Swipeable list component for React", | ||
"version": "1.9.3", | ||
"version": "1.10.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Marek Rozmus", |
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
154925
3474