diff --git a/package-lock.json b/package-lock.json index af041a863..111861af3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1221,7 +1221,7 @@ "babel-loader": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz", - "integrity": "sha1-9svhInEPGqKvTYgcbVtUNYyiQSY=", + "integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==", "dev": true, "requires": { "find-cache-dir": "1.0.0", @@ -3003,7 +3003,7 @@ }, "conventional-changelog-angular": { "version": "1.6.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", + "resolved": "http://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", "dev": true, "requires": { @@ -3013,7 +3013,7 @@ }, "conventional-commits-parser": { "version": "2.1.7", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", + "resolved": "http://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", "dev": true, "requires": { @@ -3253,17 +3253,6 @@ "sha.js": "2.4.9" } }, - "create-react-class": { - "version": "15.6.3", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.3.tgz", - "integrity": "sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg==", - "dev": true, - "requires": { - "fbjs": "0.8.16", - "loose-envify": "1.3.1", - "object-assign": "4.1.1" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -3613,6 +3602,33 @@ "es5-ext": "0.10.37" } }, + "d3-color": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.3.tgz", + "integrity": "sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw==", + "dev": true + }, + "d3-ease": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.5.tgz", + "integrity": "sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ==", + "dev": true + }, + "d3-interpolate": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.3.2.tgz", + "integrity": "sha512-NlNKGopqaz9qM1PXh9gBF1KSCVh+jSFErrSlD/4hybwoNX/gt1d8CDbDW+3i+5UOHhjC6s6nMvRxcuoMVNgL2w==", + "dev": true, + "requires": { + "d3-color": "1.2.3" + } + }, + "d3-timer": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.9.tgz", + "integrity": "sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg==", + "dev": true + }, "damerau-levenshtein": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz", @@ -4582,7 +4598,7 @@ "eslint-loader": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.9.0.tgz", - "integrity": "sha1-fhvp/t3KMo09z67xrUnVvv/oOhM=", + "integrity": "sha512-40aN976qSNPyb9ejTqjEthZITpls1SVKtwguahmH1dzGCwQU/vySE+xX33VZmD8csU0ahVNCtFlsPgKqRBiqgg==", "dev": true, "requires": { "loader-fs-cache": "1.0.1", @@ -6250,7 +6266,7 @@ }, "git-raw-commits": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", + "resolved": "http://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", "dev": true, "requires": { @@ -8019,7 +8035,7 @@ "json-loader": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha1-3KFKcCNf+C8KyaOr62DTN6NlGF0=", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", "dev": true }, "json-parse-better-errors": { @@ -10163,14 +10179,15 @@ } }, "nuka-carousel": { - "version": "github:Adslot/nuka-carousel#3c7154d9331b0d54eddfd00fe4ff18fd9432ede7", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/nuka-carousel/-/nuka-carousel-4.4.3.tgz", + "integrity": "sha512-MkPZm4Mx/OUAu0zUmDxJ36CGudOTd7x++bBxMB+/t1GffyUArUZYi+GICKkw2q2/owzqdVAtZs0pNfPOimtSwA==", "dev": true, "requires": { - "create-react-class": "15.6.3", + "d3-ease": "1.0.5", "exenv": "1.2.2", - "object-assign": "4.1.1", "prop-types": "15.6.1", - "react-tween-state": "0.1.5" + "react-move": "2.8.0" } }, "null-check": { @@ -13332,6 +13349,16 @@ "integrity": "sha512-hSl7E6l25GTjNEZATqZIuWOgSnpXb3kD0DVCujmg46K5zLxsbiKaaT6VO9slkSBDPZfYs30lwfJwbOFOnoEnKQ==", "dev": true }, + "react-move": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/react-move/-/react-move-2.8.0.tgz", + "integrity": "sha512-pqH9m6k0dOkEHRFQSJC7gK8sPABgY69h8BoriSxdv1SXYSWaOHWxUWgfeEaeQ76od32qKMFj+EztKGqtrcUGPg==", + "dev": true, + "requires": { + "d3-interpolate": "1.3.2", + "d3-timer": "1.0.9" + } + }, "react-onclickoutside": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.7.1.tgz", @@ -13428,16 +13455,6 @@ } } }, - "react-tween-state": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/react-tween-state/-/react-tween-state-0.1.5.tgz", - "integrity": "sha1-6YsGZVHvuTy5LdG+FJlcLj3q4zk=", - "dev": true, - "requires": { - "raf": "3.4.0", - "tween-functions": "1.2.0" - } - }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -14486,7 +14503,7 @@ "sass-loader": { "version": "6.0.6", "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", - "integrity": "sha1-6dXmwfFV+qMqSybXqbcQfCJeQPk=", + "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", "dev": true, "requires": { "async": "2.6.0", @@ -16049,12 +16066,6 @@ "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", "dev": true }, - "tween-functions": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz", - "integrity": "sha1-GuOlDnxguz3vd06scHrLynO7w/8=", - "dev": true - }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/package.json b/package.json index a34f819c4..952de492e 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "mocha": "^5.2.0", "moment": "^2.20.1", "node-sass": "^4.9.4", - "nuka-carousel": "github:Adslot/nuka-carousel#3c7154d9331b0d54eddfd00fe4ff18fd9432ede7", + "nuka-carousel": "^4.4.3", "null-loader": "^0.1.1", "object-assign": "^4.1.1", "postcss-loader": "^2.1.0", diff --git a/src/components/adslot-ui/Carousel/index.jsx b/src/components/adslot-ui/Carousel/index.jsx index 731219fde..fcc4ba67a 100644 --- a/src/components/adslot-ui/Carousel/index.jsx +++ b/src/components/adslot-ui/Carousel/index.jsx @@ -1,58 +1,25 @@ -import _ from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Carousel from 'nuka-carousel'; - -require('./styles.scss'); +import './styles.scss'; const baseClass = 'carousel-component'; -const navigationDelay = 600; -const decoratorStyles = { - bottom: 0, - width: '30px', -}; - -export const getPrevDecorator = () => { - let previousSlideThrottled; - const component = ({ previousSlide }) => { - if (!previousSlideThrottled) { - previousSlideThrottled = _.throttle(previousSlide, navigationDelay); - } - return