Socket
Socket
Sign inDemoInstall

nuka-carousel

Package Overview
Dependencies
Maintainers
28
Versions
143
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.2 to 4.7.3

7

CHANGELOG.md
# Nuka Changelog
## 4.7.2 (2020-10-30)
- [#733](https://github.com/FormidableLabs/nuka-carousel/pull/733) Fix package vulnerability
- [#731](https://github.com/FormidableLabs/nuka-carousel/pull/731) Update onDragStart type
- [#729](https://github.com/FormidableLabs/nuka-carousel/pull/729) Type def updates
- [#728](https://github.com/FormidableLabs/nuka-carousel/pull/728) Add opacityScale to type defs
## 4.7.1 (2020-09-08)

@@ -4,0 +11,0 @@

22

es/default-controls.js

@@ -116,2 +116,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

var lastDotIndex = slideCount - slidesToShow;
var slidesToShowIsDecimal = slidesToShow % 1 !== 0;

@@ -123,2 +124,7 @@ switch (cellAlign) {

break;
} // the below condition includes the last index if slidesToShow is decimal
if (cellAlign === 'left' && slidesToShowIsDecimal) {
lastDotIndex += slidesToShow - 1;
}

@@ -132,6 +138,7 @@

dotIndexes.push(i);
}
} // the below condition includes the last index if slidesToShow is not decimal and cellAlign = left and mode = page
if (cellAlign === 'left' && scrollMode === 'page') {
lastDotIndex = Math.floor(slideCount - (slideCount % slidesToShow || slidesToShow));
if (cellAlign === 'left' && scrollMode === 'page' && !slidesToShowIsDecimal) {
lastDotIndex = slideCount - (slideCount % slidesToShow || slidesToShow);
}

@@ -173,4 +180,9 @@

style: getListStyles()
}, indexes.map(function (index) {
var isActive = props.currentSlide === index;
}, indexes.map(function (index, i) {
var isActive = props.currentSlide === index; // the below condition checks and sets navigation dots active if the current slide falls in the current index range
if (props.currentSlide < index && props.currentSlide > indexes[i - 1]) {
isActive = true;
}
return /*#__PURE__*/React.createElement("li", {

@@ -177,0 +189,0 @@ key: index,

@@ -503,17 +503,8 @@ // Definitions by: Roman Charugin <https://github.com/Romic>

export interface PreviousButtonProps extends CarouselSlideRenderControlProps {}
export class PreviousButton extends React.FunctionalComponent<PreviousButtonProps> {}
export const PreviousButton: React.FC<PreviousButtonProps>;
export interface NextButtonProps extends CarouselSlideRenderControlProps {}
export class NextButton extends React.FunctionalComponent<NextButtonProps> {}
export const NextButton: React.FC<NextButtonProps>;
export interface PagingDotsProps extends CarouselSlideRenderControlProps {}
export class PagingDots extends React.FunctionalComponent<PagingDotsProps> {
public getButtonStyles(active: boolean): React.CSSProperties;
public getListStyles(): React.CSSProperties;
public getDotIndexes(
slideCount: number,
slidesToScroll: CarouselSlidesToScrollProp,
slidesToShow: number,
cellAlign: CarouselCellAlignProp
): number[];
}
export const PagingDots: React.FC<PagingDotsProps>;

@@ -135,2 +135,3 @@ "use strict";

var lastDotIndex = slideCount - slidesToShow;
var slidesToShowIsDecimal = slidesToShow % 1 !== 0;

@@ -142,2 +143,7 @@ switch (cellAlign) {

break;
} // the below condition includes the last index if slidesToShow is decimal
if (cellAlign === 'left' && slidesToShowIsDecimal) {
lastDotIndex += slidesToShow - 1;
}

@@ -151,6 +157,7 @@

dotIndexes.push(i);
}
} // the below condition includes the last index if slidesToShow is not decimal and cellAlign = left and mode = page
if (cellAlign === 'left' && scrollMode === 'page') {
lastDotIndex = Math.floor(slideCount - (slideCount % slidesToShow || slidesToShow));
if (cellAlign === 'left' && scrollMode === 'page' && !slidesToShowIsDecimal) {
lastDotIndex = slideCount - (slideCount % slidesToShow || slidesToShow);
}

@@ -195,4 +202,9 @@

style: getListStyles()
}, indexes.map(function (index) {
var isActive = props.currentSlide === index;
}, indexes.map(function (index, i) {
var isActive = props.currentSlide === index; // the below condition checks and sets navigation dots active if the current slide falls in the current index range
if (props.currentSlide < index && props.currentSlide > indexes[i - 1]) {
isActive = true;
}
return /*#__PURE__*/_react["default"].createElement("li", {

@@ -199,0 +211,0 @@ key: index,

{
"name": "nuka-carousel",
"version": "4.7.2",
"version": "4.7.3",
"description": "Pure React Carousel",

@@ -15,3 +15,3 @@ "main": "index.js",

"react-move": "^6.1.0",
"wicg-inert": "^3.0.3"
"wicg-inert": "^3.1.0"
},

@@ -44,3 +44,3 @@ "devDependencies": {

"prettier": "2.1.2",
"puppeteer": "^5.2.1",
"puppeteer": "^5.5.0",
"react": "^16.9.0",

@@ -47,0 +47,0 @@ "react-dom": "^16.0.0",

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