Socket
Socket
Sign inDemoInstall

react-swipeable-list

Package Overview
Dependencies
8
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

95

dist/react-swipeable-list.cjs.js

@@ -35,2 +35,43 @@ 'use strict';

function toVal(mix) {
var k, y, str='';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
} else if (typeof mix === 'object') {
if (Array.isArray(mix)) {
for (k=0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += ' ');
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += ' ');
str += k;
}
}
}
}
return str;
}
function clsx () {
var i=0, tmp, x, str='';
while (i < arguments.length) {
if (tmp = arguments[i++]) {
if (x = toVal(tmp)) {
str && (str += ' ');
str += x;
}
}
}
return str;
}
var Type = {

@@ -44,2 +85,4 @@ ANDROID: Symbol('ANDROID'),

var children = _ref.children,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className,
_ref$fullSwipe = _ref.fullSwipe,

@@ -59,3 +102,3 @@ fullSwipe = _ref$fullSwipe === void 0 ? false : _ref$fullSwipe,

return /*#__PURE__*/React__default['default'].createElement(Tag, {
className: "swipeable-list",
className: clsx('swipeable-list', className),
style: style

@@ -76,2 +119,3 @@ }, React__default['default'].Children.map(children, function (child) {

children: PropTypes__default['default'].node,
className: PropTypes__default['default'].string,
fullSwipe: PropTypes__default['default'].bool,

@@ -203,43 +247,2 @@ destructiveCallbackDelay: PropTypes__default['default'].number,

function toVal(mix) {
var k, y, str='';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
} else if (typeof mix === 'object') {
if (Array.isArray(mix)) {
for (k=0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += ' ');
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += ' ');
str += k;
}
}
}
}
return str;
}
function clsx () {
var i=0, tmp, x, str='';
while (i < arguments.length) {
if (tmp = arguments[i++]) {
if (x = toVal(tmp)) {
str && (str += ' ');
str += x;
}
}
}
return str;
}
var ItemContext = /*#__PURE__*/React__default['default'].createContext();

@@ -974,6 +977,7 @@ var ActionAnimation = {

children = _this$props4.children,
className = _this$props4.className,
leadingActions = _this$props4.leadingActions,
trailingActions = _this$props4.trailingActions;
return /*#__PURE__*/React__default['default'].createElement("div", {
className: "swipeable-list-item",
className: clsx('swipeable-list-item', className),
ref: this.bindWrapperElement

@@ -994,2 +998,3 @@ }, leadingActions && this.renderActions(leadingActions, 'leading', this.bindLeadingActionsElement), /*#__PURE__*/React__default['default'].createElement("div", {

children: PropTypes__default['default'].node,
className: PropTypes__default['default'].string,
destructiveCallbackDelay: PropTypes__default['default'].number,

@@ -1010,2 +1015,3 @@ fullSwipe: PropTypes__default['default'].bool,

var children = _ref.children,
className = _ref.className,
_ref$destructive = _ref.destructive,

@@ -1062,3 +1068,3 @@ destructive = _ref$destructive === void 0 ? false : _ref$destructive,

'swipe-action__grayed': listType === Type.MS && !(scaleLeading || scaleTrailing)
}),
}, className),
onClick: onHandleClick

@@ -1070,2 +1076,3 @@ }, children);

children: PropTypes__default['default'].node.isRequired,
className: PropTypes__default['default'].string,
destructive: PropTypes__default['default'].bool,

@@ -1072,0 +1079,0 @@ main: PropTypes__default['default'].bool,

@@ -26,2 +26,43 @@ import React, { PureComponent } from 'react';

function toVal(mix) {
var k, y, str='';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
} else if (typeof mix === 'object') {
if (Array.isArray(mix)) {
for (k=0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += ' ');
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += ' ');
str += k;
}
}
}
}
return str;
}
function clsx () {
var i=0, tmp, x, str='';
while (i < arguments.length) {
if (tmp = arguments[i++]) {
if (x = toVal(tmp)) {
str && (str += ' ');
str += x;
}
}
}
return str;
}
var Type = {

@@ -35,2 +76,4 @@ ANDROID: Symbol('ANDROID'),

var children = _ref.children,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className,
_ref$fullSwipe = _ref.fullSwipe,

@@ -50,3 +93,3 @@ fullSwipe = _ref$fullSwipe === void 0 ? false : _ref$fullSwipe,

return /*#__PURE__*/React.createElement(Tag, {
className: "swipeable-list",
className: clsx('swipeable-list', className),
style: style

@@ -67,2 +110,3 @@ }, React.Children.map(children, function (child) {

children: PropTypes.node,
className: PropTypes.string,
fullSwipe: PropTypes.bool,

@@ -194,43 +238,2 @@ destructiveCallbackDelay: PropTypes.number,

function toVal(mix) {
var k, y, str='';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
} else if (typeof mix === 'object') {
if (Array.isArray(mix)) {
for (k=0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += ' ');
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += ' ');
str += k;
}
}
}
}
return str;
}
function clsx () {
var i=0, tmp, x, str='';
while (i < arguments.length) {
if (tmp = arguments[i++]) {
if (x = toVal(tmp)) {
str && (str += ' ');
str += x;
}
}
}
return str;
}
var ItemContext = /*#__PURE__*/React.createContext();

@@ -965,6 +968,7 @@ var ActionAnimation = {

children = _this$props4.children,
className = _this$props4.className,
leadingActions = _this$props4.leadingActions,
trailingActions = _this$props4.trailingActions;
return /*#__PURE__*/React.createElement("div", {
className: "swipeable-list-item",
className: clsx('swipeable-list-item', className),
ref: this.bindWrapperElement

@@ -985,2 +989,3 @@ }, leadingActions && this.renderActions(leadingActions, 'leading', this.bindLeadingActionsElement), /*#__PURE__*/React.createElement("div", {

children: PropTypes.node,
className: PropTypes.string,
destructiveCallbackDelay: PropTypes.number,

@@ -1001,2 +1006,3 @@ fullSwipe: PropTypes.bool,

var children = _ref.children,
className = _ref.className,
_ref$destructive = _ref.destructive,

@@ -1053,3 +1059,3 @@ destructive = _ref$destructive === void 0 ? false : _ref$destructive,

'swipe-action__grayed': listType === Type.MS && !(scaleLeading || scaleTrailing)
}),
}, className),
onClick: onHandleClick

@@ -1061,2 +1067,3 @@ }, children);

children: PropTypes.node.isRequired,
className: PropTypes.string,
destructive: PropTypes.bool,

@@ -1063,0 +1070,0 @@ main: PropTypes.bool,

@@ -34,2 +34,43 @@ (function (global, factory) {

function toVal(mix) {
var k, y, str='';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
} else if (typeof mix === 'object') {
if (Array.isArray(mix)) {
for (k=0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += ' ');
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += ' ');
str += k;
}
}
}
}
return str;
}
function clsx () {
var i=0, tmp, x, str='';
while (i < arguments.length) {
if (tmp = arguments[i++]) {
if (x = toVal(tmp)) {
str && (str += ' ');
str += x;
}
}
}
return str;
}
var Type = {

@@ -43,2 +84,4 @@ ANDROID: Symbol('ANDROID'),

var children = _ref.children,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className,
_ref$fullSwipe = _ref.fullSwipe,

@@ -58,3 +101,3 @@ fullSwipe = _ref$fullSwipe === void 0 ? false : _ref$fullSwipe,

return /*#__PURE__*/React__default['default'].createElement(Tag, {
className: "swipeable-list",
className: clsx('swipeable-list', className),
style: style

@@ -75,2 +118,3 @@ }, React__default['default'].Children.map(children, function (child) {

children: PropTypes__default['default'].node,
className: PropTypes__default['default'].string,
fullSwipe: PropTypes__default['default'].bool,

@@ -202,43 +246,2 @@ destructiveCallbackDelay: PropTypes__default['default'].number,

function toVal(mix) {
var k, y, str='';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
} else if (typeof mix === 'object') {
if (Array.isArray(mix)) {
for (k=0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += ' ');
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += ' ');
str += k;
}
}
}
}
return str;
}
function clsx () {
var i=0, tmp, x, str='';
while (i < arguments.length) {
if (tmp = arguments[i++]) {
if (x = toVal(tmp)) {
str && (str += ' ');
str += x;
}
}
}
return str;
}
var ItemContext = /*#__PURE__*/React__default['default'].createContext();

@@ -973,6 +976,7 @@ var ActionAnimation = {

children = _this$props4.children,
className = _this$props4.className,
leadingActions = _this$props4.leadingActions,
trailingActions = _this$props4.trailingActions;
return /*#__PURE__*/React__default['default'].createElement("div", {
className: "swipeable-list-item",
className: clsx('swipeable-list-item', className),
ref: this.bindWrapperElement

@@ -993,2 +997,3 @@ }, leadingActions && this.renderActions(leadingActions, 'leading', this.bindLeadingActionsElement), /*#__PURE__*/React__default['default'].createElement("div", {

children: PropTypes__default['default'].node,
className: PropTypes__default['default'].string,
destructiveCallbackDelay: PropTypes__default['default'].number,

@@ -1009,2 +1014,3 @@ fullSwipe: PropTypes__default['default'].bool,

var children = _ref.children,
className = _ref.className,
_ref$destructive = _ref.destructive,

@@ -1061,3 +1067,3 @@ destructive = _ref$destructive === void 0 ? false : _ref$destructive,

'swipe-action__grayed': listType === Type.MS && !(scaleLeading || scaleTrailing)
}),
}, className),
onClick: onHandleClick

@@ -1069,2 +1075,3 @@ }, children);

children: PropTypes__default['default'].node.isRequired,
className: PropTypes__default['default'].string,
destructive: PropTypes__default['default'].bool,

@@ -1071,0 +1078,0 @@ main: PropTypes__default['default'].bool,

{
"name": "react-swipeable-list",
"description": "Swipeable list component for React",
"version": "1.2.0",
"version": "1.3.0",
"author": {

@@ -52,2 +52,3 @@ "name": "Marek Rozmus",

"clsx": "^1.1.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "7.8.1",

@@ -99,3 +100,8 @@ "eslint-config-prettier": "6.11.0",

]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}

@@ -22,3 +22,3 @@ <h1 align="center">react-swipeable-list</h1>

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

@@ -266,2 +266,3 @@ <!-- prettier-ignore-end -->

<td align="center"><a href="https://adamlaycock.ca"><img src="https://avatars.githubusercontent.com/u/894797?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adam Laycock</b></sub></a><br /><a href="https://github.com/marekrozmus/react-swipeable-list/issues?q=author%3Aalaycock" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://www.rathes.me"><img src="https://avatars.githubusercontent.com/u/6367520?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rathes Sachchithananthan</b></sub></a><br /><a href="#ideas-rathesDot" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>

@@ -268,0 +269,0 @@ </table>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc