Skip to content

Commit

Permalink
Update changelog, rename app to dev, remove static values from getState
Browse files Browse the repository at this point in the history
  • Loading branch information
YIZHUANG committed Dec 18, 2019
1 parent 7249956 commit 726a19b
Show file tree
Hide file tree
Showing 27 changed files with 209 additions and 14 deletions.
137 changes: 137 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,143 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v2.5.0](https://github.com/YIZHUANG/react-multi-carousel/compare/2.4.2...v2.5.0)

> 18 December 2019

- [Snyk] Fix for 1 vulnerabilities [`#116`](https://github.com/YIZHUANG/react-multi-carousel/pull/116)
- [Snyk] Fix for 1 vulnerabilities [`#117`](https://github.com/YIZHUANG/react-multi-carousel/pull/117)
- Remove partialVisibilityGutter when there is not enough children [`#111`](https://github.com/YIZHUANG/react-multi-carousel/pull/111)
- added :active psuedo class to botton along with hover [`#118`](https://github.com/YIZHUANG/react-multi-carousel/pull/118)
- [Snyk] Fix for 1 vulnerabilities [`#113`](https://github.com/YIZHUANG/react-multi-carousel/pull/113)
- fix: app/package.json & app/package-lock.json to reduce vulnerabilities [`e2dcb07`](https://github.com/YIZHUANG/react-multi-carousel/commit/e2dcb0706a636bcf3ce9fa1a942f6164b1d546dc)
- fix: app/package.json, app/package-lock.json & app/.snyk to reduce vulnerabilities [`e6fb07b`](https://github.com/YIZHUANG/react-multi-carousel/commit/e6fb07babedbda3464994a5c0fbe155f84a56bf1)
- fix: examples/ssr/package.json, examples/ssr/package-lock.json & examples/ssr/.snyk to reduce vulnerabilities [`efbc527`](https://github.com/YIZHUANG/react-multi-carousel/commit/efbc52727321dba1ffa674a8aa45ad33fb6b62b7)

#### [2.4.2](https://github.com/YIZHUANG/react-multi-carousel/compare/2.4.1...2.4.2)

> 18 November 2019

- Fixed last pr has incorrect call order to disable dot when there is n… [`#107`](https://github.com/YIZHUANG/react-multi-carousel/pull/107)
- docs: add benhodgson87 as a contributor [`#105`](https://github.com/YIZHUANG/react-multi-carousel/pull/105)
- Fixed last pr has incorrect call order to disable dot when there is not enough children [`0ad75c5`](https://github.com/YIZHUANG/react-multi-carousel/commit/0ad75c53265c849d3971497c8bf9bf6b09e1284e)
- docs: update .all-contributorsrc [`a129c0a`](https://github.com/YIZHUANG/react-multi-carousel/commit/a129c0a53d0590c0e5e98e837f155a19356120c1)
- docs: update README.md [`ea5e882`](https://github.com/YIZHUANG/react-multi-carousel/commit/ea5e8827a19497873b39807660e9f7578829b5e4)

#### [2.4.1](https://github.com/YIZHUANG/react-multi-carousel/compare/2.4.0...2.4.1)

> 18 November 2019

- [#103] Do not render default dots if only one slide [`#104`](https://github.com/YIZHUANG/react-multi-carousel/pull/104)
- resetTotalItems on children changes [`#102`](https://github.com/YIZHUANG/react-multi-carousel/pull/102)
- reverted to old changes from PR#71 [`#101`](https://github.com/YIZHUANG/react-multi-carousel/pull/101)
- Add prop + logic to allow removing dots if only one slide [`f63263c`](https://github.com/YIZHUANG/react-multi-carousel/commit/f63263ce43212c5dafd05ad70670b7f8fc03c922)
- Remove prop, make hiding dots default behaviour [`4ed3f77`](https://github.com/YIZHUANG/react-multi-carousel/commit/4ed3f779894988d5c8a9fa91c638464b908ce959)
- Use notEnoughChildren helper for dot count check [`f1ecc55`](https://github.com/YIZHUANG/react-multi-carousel/commit/f1ecc5568a9e8e4aa749ae82cd68b050a94b7e8b)

#### [2.4.0](https://github.com/YIZHUANG/react-multi-carousel/compare/2.3.0...2.4.0)

> 30 October 2019

- fixed typo keeping backward compatibility [`#93`](https://github.com/YIZHUANG/react-multi-carousel/pull/93)
- Improve performance for mouse/touch moving the Carousel. [`#89`](https://github.com/YIZHUANG/react-multi-carousel/pull/89)
- configure husky [`#76`](https://github.com/YIZHUANG/react-multi-carousel/pull/76)
- Improve performance by manipulating dom directly [`4ca7029`](https://github.com/YIZHUANG/react-multi-carousel/commit/4ca70294f80d28cc9d646fcf0f618bcd8da1fb89)
- Fixed test [`6ecd08c`](https://github.com/YIZHUANG/react-multi-carousel/commit/6ecd08c6aff11ac0a02cf52243a68e1cb86fa653)
- Update .eslintrc.js [`8629961`](https://github.com/YIZHUANG/react-multi-carousel/commit/862996198497b9d5381aab16452f3ca8888fc9c6)

#### [2.3.0](https://github.com/YIZHUANG/react-multi-carousel/compare/2.2.7...2.3.0)

> 16 October 2019

- docs: add Martinretrou as a contributor [`#86`](https://github.com/YIZHUANG/react-multi-carousel/pull/86)
- Add aria-label to arrows buttons [`#85`](https://github.com/YIZHUANG/react-multi-carousel/pull/85)
- docs: add neamatmim as a contributor [`#84`](https://github.com/YIZHUANG/react-multi-carousel/pull/84)
- docs: add OscarBarrett as a contributor [`#83`](https://github.com/YIZHUANG/react-multi-carousel/pull/83)
- docs: add abhinavdalal-iconnect as a contributor [`#82`](https://github.com/YIZHUANG/react-multi-carousel/pull/82)
- docs: add raajnadar as a contributor [`#81`](https://github.com/YIZHUANG/react-multi-carousel/pull/81)
- docs: add tpinne as a contributor [`#79`](https://github.com/YIZHUANG/react-multi-carousel/pull/79)
- docs: add revskill10 as a contributor [`#78`](https://github.com/YIZHUANG/react-multi-carousel/pull/78)
- Added option to skip callbacks [`#75`](https://github.com/YIZHUANG/react-multi-carousel/pull/75)
- Migrate to eslint [`#69`](https://github.com/YIZHUANG/react-multi-carousel/pull/69)
- clean up code [`#68`](https://github.com/YIZHUANG/react-multi-carousel/pull/68)
- [Snyk] Fix for 1 vulnerabilities [`#67`](https://github.com/YIZHUANG/react-multi-carousel/pull/67)
- [Snyk] Fix for 1 vulnerabilities [`#66`](https://github.com/YIZHUANG/react-multi-carousel/pull/66)
- setup eslint [`0f7c34c`](https://github.com/YIZHUANG/react-multi-carousel/commit/0f7c34c435180d95eda0873087f2c651d15b3a12)
- fix: examples/ssr/package.json, examples/ssr/package-lock.json & examples/ssr/.snyk to reduce vulnerabilities [`fa5bcfc`](https://github.com/YIZHUANG/react-multi-carousel/commit/fa5bcfcbb496ab0a88c5b74fcaf911f896010c6c)
- fix: app/package.json, app/package-lock.json & app/.snyk to reduce vulnerabilities [`b8c36a3`](https://github.com/YIZHUANG/react-multi-carousel/commit/b8c36a312f5575ec5ba952327829eb41d7d02c3f)

#### [2.2.7](https://github.com/YIZHUANG/react-multi-carousel/compare/2.2.4...2.2.7)

> 2 October 2019

- clones = children if children.length < slidesToShow [`#64`](https://github.com/YIZHUANG/react-multi-carousel/pull/64)
- Fixed className undefined and Doc improvement [`302d216`](https://github.com/YIZHUANG/react-multi-carousel/commit/302d216d4ace05b5d7e057d9a28e628f9a19a755)
- Improve unit test and allow button group to be render outside [`4014721`](https://github.com/YIZHUANG/react-multi-carousel/commit/4014721b75fd3071cb05f48686b83b80f31496ef)
- Changed type namings [`3d0e0a9`](https://github.com/YIZHUANG/react-multi-carousel/commit/3d0e0a94f353c04e9f8115155558c95b129e264d)

#### [2.2.4](https://github.com/YIZHUANG/react-multi-carousel/compare/2.2.2...2.2.4)

> 18 August 2019

- Fixed typo for paritialVisibilityGutter [`#55`](https://github.com/YIZHUANG/react-multi-carousel/pull/55)
- remove useless next config [`#52`](https://github.com/YIZHUANG/react-multi-carousel/pull/52)
- Update package-lock.json [`9995c82`](https://github.com/YIZHUANG/react-multi-carousel/commit/9995c82c5f00436ad52ce6e2e5b44caee894e0e0)
- Update dependencies [`9804b29`](https://github.com/YIZHUANG/react-multi-carousel/commit/9804b29a884a08a58205a08d13b4be8e1b3997dc)
- Fixed typings and turn mangle to false for code transformation [`6453f87`](https://github.com/YIZHUANG/react-multi-carousel/commit/6453f87c80418b6dc9f97626d9c60eaa6fbf9abc)

#### [2.2.2](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.1.4...2.2.2)

> 28 July 2019

- Fixed deployment gets run in PR [`#51`](https://github.com/YIZHUANG/react-multi-carousel/pull/51)
- Feature/move clones to render method [`#50`](https://github.com/YIZHUANG/react-multi-carousel/pull/50)
- Fixed test [`3737028`](https://github.com/YIZHUANG/react-multi-carousel/commit/37370289cf5ece853ae31c2f6b270ced3d81c012)
- Move clones to render method [`e865fab`](https://github.com/YIZHUANG/react-multi-carousel/commit/e865fab932e874b2dc1b292a1c46e7c54ae8acec)
- Update documentation [`896a343`](https://github.com/YIZHUANG/react-multi-carousel/commit/896a3436312e07c17cabde7f7337cff7739d839d)

#### [v2.1.4](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.1.3...v2.1.4)

> 26 July 2019

#### [v2.1.3](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.1.2...v2.1.3)

> 26 July 2019

- Fixed deployment pipeline [`#47`](https://github.com/YIZHUANG/react-multi-carousel/pull/47)

#### [v2.1.2](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.1.1...v2.1.2)

> 20 July 2019

- Updates types.ts to provide typings for ref usage [`#45`](https://github.com/YIZHUANG/react-multi-carousel/pull/45)
- Fixed CI [`#46`](https://github.com/YIZHUANG/react-multi-carousel/pull/46)
- Bump lodash from 4.17.11 to 4.17.14 [`#43`](https://github.com/YIZHUANG/react-multi-carousel/pull/43)
- Added more typings [`2b2f9dc`](https://github.com/YIZHUANG/react-multi-carousel/commit/2b2f9dcb8cbc622b5fa7fc1044748fd4f258f7a0)

#### [v2.1.1](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.1.0...v2.1.1)

> 12 July 2019

- [Feature] Basic styled components support [`#42`](https://github.com/YIZHUANG/react-multi-carousel/pull/42)
- Fetch upstream [`#1`](https://github.com/YIZHUANG/react-multi-carousel/pull/1)
- Add basic support for styled-components [`b3cfeba`](https://github.com/YIZHUANG/react-multi-carousel/commit/b3cfeba92833b651c0d3e9f80e3dc23a1c7fa425)

#### [v2.1.0](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.0.1...v2.1.0)

> 8 July 2019

- Update documentation of for the renderDotsOutside props [`#41`](https://github.com/YIZHUANG/react-multi-carousel/pull/41)
- Adds new option renderDotsOutside [`#40`](https://github.com/YIZHUANG/react-multi-carousel/pull/40)

#### [v2.0.1](https://github.com/YIZHUANG/react-multi-carousel/compare/v2.0.0...v2.0.1)

> 7 July 2019

- Update documentation [`efdd223`](https://github.com/YIZHUANG/react-multi-carousel/commit/efdd22336824b1c01812fc517a435cfb7c61e21e)
- Update ssr demo [`d8f3b6c`](https://github.com/YIZHUANG/react-multi-carousel/commit/d8f3b6c5a2789c8e024ac7f2d62fc9bb3384d7cf)
- Update documentation [`97758f5`](https://github.com/YIZHUANG/react-multi-carousel/commit/97758f54654f3865c57b5c119b3f61109649cddf)

### [v2.0.0](https://github.com/YIZHUANG/react-multi-carousel/compare/1.4.5...v2.0.0)

> 6 July 2019
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ You custom dots will receive a list of props/state that's passed back by the car
```js
const CustomDot = ({ onClick, ...rest }) => {
const { onMove, index, active, carouselState: { currentSlide, deviceType } } = rest;
const carouselItems = [<CarouselItem1, CaourselItem2, CarouselItem3];
const carouselItems = [CarouselItem1, CaourselItem2, CarouselItem3];
// onMove means if dragging or swiping in progress.
// active is provided by this lib for checking if the item is active or not.
return (
Expand Down
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Send a PR or raise an issue to:

Pull requests are welcome. To start up your local development:

- cd app
- cd dev
- npm install -- package.json
- npm run dev
- Navigate to http://localhost:3000
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Index extends React.Component {
infinite={true}
beforeChange={() => this.setState({ isMoving: true })}
afterChange={() => this.setState({ isMoving: false })}
containerClass="first-carousel-container container"
containerClass="container"
slidesToSlide={1}
deviceType={this.props.deviceType}
>
Expand Down
2 changes: 1 addition & 1 deletion app/pages/_app.tsx → dev/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CssBaseline from '@material-ui/core/CssBaseline';
import JssProvider from 'react-jss/lib/JssProvider';
import Typography from '@material-ui/core/Typography';
import "react-multi-carousel/lib/styles.css";
import '../styles/main.css';

import Menu from '../components/menu';
import getPageContext from '../src/getPageContext';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
"storybook": "start-storybook -p 6006",
"export": "build-storybook -c .storybook -o .out",
"build-storybook": "build-storybook",
"dev": "cd dev && npm run dev",
"after-build": "cd src && copyfiles -f assets/* ../lib && npm run minify",
"publish-ssr": "cd examples/ssr && now && now alias react-multi-carousel.now.sh",
"prettier": "prettier --write {examples,src,stories,test}/**/*.{js,ts,tsx}",
"lint-staged": "lint-staged",
"lint": "eslint src/**/*{.ts,.tsx}",
"lint:fix": "eslint --fix src/**/*{.ts,.tsx}",
"minify": "node minify.js"
"minify": "node minify.js",
"auto-changelog": "auto-changelog"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -102,6 +104,7 @@
"@types/react-dom": "^16.8.2",
"@typescript-eslint/eslint-plugin": "^2.3.2",
"@typescript-eslint/parser": "^2.3.2",
"auto-changelog": "^1.16.2",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.0.5",
"classnames": "^2.2.6",
Expand Down
6 changes: 1 addition & 5 deletions src/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,7 @@ class Carousel extends React.Component<CarouselProps, CarouselInternalState> {
);
}
public getState(): StateCallBack {
return {
...this.state,
onMove: this.onMove,
direction: this.direction
};
return this.state;
}
public renderLeftArrow(): React.ReactNode {
const { customLeftArrow } = this.props;
Expand Down
7 changes: 3 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ export interface CarouselProps {
additionalTransfrom?: number; // this is only used if you want to add additional transfrom to the current transform
}

export interface StateCallBack extends CarouselInternalState {
onMove: boolean;
direction: Direction;
}

export type StateCallBack = CarouselInternalState;

export type Direction = "left" | "right" | "" | undefined;
export type SkipCallbackOptions =
| boolean
Expand Down

0 comments on commit 726a19b

Please sign in to comment.