Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuka-carousel

Package Overview
Dependencies
Maintainers
29
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuka-carousel - npm Package Compare versions

Comparing version 4.7.4 to 4.7.5

6

CHANGELOG.md
# Nuka Changelog
## 4.7.4 (2020-11-30)
- [#745](https://github.com/FormidableLabs/nuka-carousel/pull/745) Add transition when heightMode is set to 'current'
- [#742](https://github.com/FormidableLabs/nuka-carousel/pull/742) ariaProps should not override child props values
- [#739](https://github.com/FormidableLabs/nuka-carousel/pull/739) Fix non-clickable slides and several bugs in paging dots display
## 4.7.3 (2020-11-24)

@@ -4,0 +10,0 @@

30

es/index.js
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -254,6 +266,9 @@

_this2.timers.push(setTimeout(function () {
// If slideHeight is greater than zero, then
// If slideHeight is greater than zero and matches calculated slideHeight,
// assume the app has been initialized. If not,
// keep trying to set dimensions until things work.
if (_this2.state.slideHeight > 0) {
var _this2$calcSlideHeigh = _this2.calcSlideHeightAndWidth(),
slideHeight = _this2$calcSlideHeigh.slideHeight;
if (_this2.state.slideHeight > 0 && _this2.state.slideHeight === slideHeight) {
return;

@@ -1121,2 +1136,9 @@ }

var validChildren = getValidChildren(this.props.children);
var _this$getOffsetDeltas2 = this.getOffsetDeltas(),
_this$getOffsetDeltas3 = _slicedToArray(_this$getOffsetDeltas2.tx, 1),
startTx = _this$getOffsetDeltas3[0],
_this$getOffsetDeltas4 = _slicedToArray(_this$getOffsetDeltas2.ty, 1),
startTy = _this$getOffsetDeltas4[0];
return /*#__PURE__*/React.createElement("div", {

@@ -1145,4 +1167,4 @@ className: ['slider', this.props.className || ''].join(' ').trim(),

start: {
tx: 0,
ty: 0
tx: startTx,
ty: startTy
},

@@ -1149,0 +1171,0 @@ update: function update() {

@@ -52,5 +52,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

value: function getSlideTargetPosition(currentSlideIndex, positionValue) {
var offset = 0;
var offset = 0; // Below lines help to display peeking slides when number of slides is less than 3.
if (this.props.animation === 'zoom' && (this.props.currentSlide === currentSlideIndex + 1 || this.props.currentSlide === 0 && currentSlideIndex === this.props.children.length - 1)) {
var peekSlide = true;
switch (this.props.cellAlign) {
case 'left':
peekSlide = this.props.children.length <= 2 && currentSlideIndex !== 0 ? false : true;
break;
case 'center':
peekSlide = this.props.children.length > 2 || this.props.currentSlide !== currentSlideIndex - 1 ? true : false;
break;
}
if (this.props.animation === 'zoom' && peekSlide && (this.props.currentSlide === currentSlideIndex + 1 || this.props.currentSlide === 0 && currentSlideIndex === this.props.children.length - 1)) {
offset = this.props.slideOffset;

@@ -57,0 +69,0 @@ } else if (this.props.animation === 'zoom' && (this.props.currentSlide === currentSlideIndex - 1 || this.props.currentSlide === this.props.children.length - 1 && currentSlideIndex === 0)) {

@@ -58,2 +58,14 @@ "use strict";

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -297,6 +309,9 @@

_this2.timers.push(setTimeout(function () {
// If slideHeight is greater than zero, then
// If slideHeight is greater than zero and matches calculated slideHeight,
// assume the app has been initialized. If not,
// keep trying to set dimensions until things work.
if (_this2.state.slideHeight > 0) {
var _this2$calcSlideHeigh = _this2.calcSlideHeightAndWidth(),
slideHeight = _this2$calcSlideHeigh.slideHeight;
if (_this2.state.slideHeight > 0 && _this2.state.slideHeight === slideHeight) {
return;

@@ -1164,2 +1179,9 @@ }

var validChildren = (0, _bootstrappingUtilities.getValidChildren)(this.props.children);
var _this$getOffsetDeltas2 = this.getOffsetDeltas(),
_this$getOffsetDeltas3 = _slicedToArray(_this$getOffsetDeltas2.tx, 1),
startTx = _this$getOffsetDeltas3[0],
_this$getOffsetDeltas4 = _slicedToArray(_this$getOffsetDeltas2.ty, 1),
startTy = _this$getOffsetDeltas4[0];
return /*#__PURE__*/_react["default"].createElement("div", {

@@ -1188,4 +1210,4 @@ className: ['slider', this.props.className || ''].join(' ').trim(),

start: {
tx: 0,
ty: 0
tx: startTx,
ty: startTy
},

@@ -1192,0 +1214,0 @@ update: function update() {

@@ -65,5 +65,17 @@ "use strict";

value: function getSlideTargetPosition(currentSlideIndex, positionValue) {
var offset = 0;
var offset = 0; // Below lines help to display peeking slides when number of slides is less than 3.
if (this.props.animation === 'zoom' && (this.props.currentSlide === currentSlideIndex + 1 || this.props.currentSlide === 0 && currentSlideIndex === this.props.children.length - 1)) {
var peekSlide = true;
switch (this.props.cellAlign) {
case 'left':
peekSlide = this.props.children.length <= 2 && currentSlideIndex !== 0 ? false : true;
break;
case 'center':
peekSlide = this.props.children.length > 2 || this.props.currentSlide !== currentSlideIndex - 1 ? true : false;
break;
}
if (this.props.animation === 'zoom' && peekSlide && (this.props.currentSlide === currentSlideIndex + 1 || this.props.currentSlide === 0 && currentSlideIndex === this.props.children.length - 1)) {
offset = this.props.slideOffset;

@@ -70,0 +82,0 @@ } else if (this.props.animation === 'zoom' && (this.props.currentSlide === currentSlideIndex - 1 || this.props.currentSlide === this.props.children.length - 1 && currentSlideIndex === 0)) {

2

package.json
{
"name": "nuka-carousel",
"version": "4.7.4",
"version": "4.7.5",
"description": "Pure React Carousel",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc