From c983d61cf7f3052587ed8bb64c8dda85f28e718d Mon Sep 17 00:00:00 2001 From: Kelvin Chu Date: Thu, 2 Jan 2020 17:59:10 +0800 Subject: [PATCH] v1.5.0: added scrollToEndIndicator. --- build/dist/Triangle.d.ts | 11 ++++++++ build/dist/Triangle.js | 41 +++++++++++++++++++++++++++++ build/dist/Triangle.js.map | 1 + build/dist/index.d.ts | 12 ++++++--- build/dist/index.js | 54 ++++++++++++++++++++++++++++---------- build/dist/index.js.map | 2 +- build/dist/package.json | 2 +- example/package.json | 2 +- example/yarn.lock | 8 +++--- package.json | 2 +- 10 files changed, 109 insertions(+), 26 deletions(-) create mode 100644 build/dist/Triangle.d.ts create mode 100644 build/dist/Triangle.js create mode 100644 build/dist/Triangle.js.map diff --git a/build/dist/Triangle.d.ts b/build/dist/Triangle.d.ts new file mode 100644 index 0000000..fc4004d --- /dev/null +++ b/build/dist/Triangle.d.ts @@ -0,0 +1,11 @@ +import React from "react"; +interface Props { + size: number; + color: string; + direction: "up" | "down" | "left" | "right"; +} +export default class Triangle extends React.PureComponent { + static defaultProps: Pick; + render(): JSX.Element; +} +export {}; diff --git a/build/dist/Triangle.js b/build/dist/Triangle.js new file mode 100644 index 0000000..cc2048f --- /dev/null +++ b/build/dist/Triangle.js @@ -0,0 +1,41 @@ +import React from "react"; +import { StyleSheet, View } from "react-native"; +export default class Triangle extends React.PureComponent { + render() { + const { size, color, direction } = this.props; + const directionMapper = { + up: "0", + down: "180deg", + left: "270deg", + right: "90deg", + }; + const borderStyle = { + borderLeftWidth: size, + borderRightWidth: size, + borderBottomWidth: size * 1.5, + borderBottomColor: color, + transform: [ + { + rotate: directionMapper[direction], + }, + ], + }; + return ; + } +} +Triangle.defaultProps = { + size: 8, + color: "#000000", + direction: "down", +}; +const styles = StyleSheet.create({ + triangle: { + width: 0, + height: 0, + backgroundColor: "transparent", + borderStyle: "solid", + borderLeftColor: "transparent", + borderRightColor: "transparent", + }, +}); +//# sourceMappingURL=Triangle.js.map \ No newline at end of file diff --git a/build/dist/Triangle.js.map b/build/dist/Triangle.js.map new file mode 100644 index 0000000..8c1a587 --- /dev/null +++ b/build/dist/Triangle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Triangle.js","sourceRoot":"","sources":["../../src/Triangle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAQ9C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,aAAoB;IAO5D,MAAM;QACF,MAAM,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5C,MAAM,eAAe,GAAG;YACpB,EAAE,EAAE,GAAG;YACP,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;SACjB,CAAC;QACF,MAAM,WAAW,GAAG;YAChB,eAAe,EAAE,IAAI;YACrB,gBAAgB,EAAE,IAAI;YACtB,iBAAiB,EAAE,IAAI,GAAG,GAAG;YAC7B,iBAAiB,EAAE,KAAK;YACxB,SAAS,EAAE;gBACP;oBACI,MAAM,EAAE,eAAe,CAAC,SAAU,CAAC;iBACtC;aACJ;SACJ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,EAAG,CAAC;IAC3D,CAAC;;AA1BM,qBAAY,GAAgD;IAC/D,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,MAAM;CACpB,CAAC;AAyBN,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC7B,QAAQ,EAAE;QACN,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE,OAAO;QACpB,eAAe,EAAE,aAAa;QAC9B,gBAAgB,EAAE,aAAa;KAClC;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/build/dist/index.d.ts b/build/dist/index.d.ts index 02a8dc4..8c89fb9 100644 --- a/build/dist/index.d.ts +++ b/build/dist/index.d.ts @@ -1,5 +1,5 @@ import React from "react"; -import { FlatListProps, StyleProp, TextStyle, ViewStyle } from "react-native"; +import { FlatListProps, StyleProp, ViewStyle } from "react-native"; /** * An enhanced React Native component to provide auto-scrolling functionality. * Auto-scrolling will only be enabled if: @@ -12,14 +12,17 @@ interface Props extends FlatListProps { showScrollToEndIndicator: boolean; newMessageAlertRenderer?: (newMessageCount: number) => string; indicatorContainerStyle?: StyleProp; - indicatorTextStyle?: StyleProp; + indicatorComponent?: React.ComponentType | React.ReactElement | null; } -export default class AutoScrollFlatList extends React.PureComponent> { +interface State { + enabledAutoScrollToEnd: boolean; +} +export default class AutoScrollFlatList extends React.PureComponent, State> { static defaultProps: Pick, "threshold" | "showScrollToEndIndicator">; + constructor(props: Props); private readonly listRef; private flatListHeight; private contentHeight; - private enabledAutoScrollToEnd; /** * Exposing FlatList Methods To AutoScrollFlatList's Ref */ @@ -55,6 +58,7 @@ export default class AutoScrollFlatList extends React.PureComponent> private onLayout; private onContentSizeChange; private onScroll; + private renderDefaultIndicatorComponent; render(): JSX.Element; } export {}; diff --git a/build/dist/index.js b/build/dist/index.js index 57e75c4..67772ab 100644 --- a/build/dist/index.js +++ b/build/dist/index.js @@ -1,12 +1,12 @@ import React from "react"; -import { FlatList, StyleSheet } from "react-native"; +import { FlatList, StyleSheet, TouchableWithoutFeedback, View } from "react-native"; +import Triangle from "./Triangle"; export default class AutoScrollFlatList extends React.PureComponent { - constructor() { - super(...arguments); + constructor(props) { + super(props); this.listRef = React.createRef(); this.flatListHeight = 0; this.contentHeight = 0; - this.enabledAutoScrollToEnd = true; // TODO: use componentDidUpdate, then compare data.length < prevData.length to trigger scroll or show newMessageAlert, to replace onContentSizeChange? // TODO: I think it's better because onContentSizeChange not necessarily means should scroll. discuss. /** @@ -50,7 +50,7 @@ export default class AutoScrollFlatList extends React.PureComponent { */ this.onLayout = (event) => { this.flatListHeight = event.nativeEvent.layout.height; - if (this.listRef.current && this.enabledAutoScrollToEnd) { + if (this.listRef.current && this.state.enabledAutoScrollToEnd) { this.scrollToEnd(); } // User-defined onLayout event @@ -61,7 +61,7 @@ export default class AutoScrollFlatList extends React.PureComponent { }; this.onContentSizeChange = (width, height) => { this.contentHeight = height; - if (this.enabledAutoScrollToEnd) { + if (this.state.enabledAutoScrollToEnd) { this.scrollToEnd(); } // User-defined onContentSizeChange event @@ -75,17 +75,28 @@ export default class AutoScrollFlatList extends React.PureComponent { * Default behavior: if scrollTop is at the end of , autoscroll will be enabled. * CAVEAT: Android has precision error here from 4 decimal places, therefore we need to use Math.floor() to make sure the calculation is correct on Android. */ - this.enabledAutoScrollToEnd = event.nativeEvent.contentOffset.y + this.props.threshold >= Math.floor(this.contentHeight - this.flatListHeight); - // User-defined onScroll event - const { onScroll } = this.props; - if (onScroll) { - onScroll(event); - } + this.setState({ enabledAutoScrollToEnd: event.nativeEvent.contentOffset.y + this.props.threshold >= Math.floor(this.contentHeight - this.flatListHeight) }, () => { + // User-defined onScroll event + const { onScroll } = this.props; + if (onScroll) { + onScroll(event); + } + }); + }; + this.renderDefaultIndicatorComponent = () => ( + + ); + this.state = { + enabledAutoScrollToEnd: true, }; } render() { - const { contentContainerStyle, threshold, ...restProps } = this.props; - return ; + const { contentContainerStyle, threshold, showScrollToEndIndicator, newMessageAlertRenderer, indicatorContainerStyle, indicatorComponent, ...restProps } = this.props; + const { enabledAutoScrollToEnd } = this.state; + return ( + + {showScrollToEndIndicator && !enabledAutoScrollToEnd && this.scrollToEnd()}>{indicatorComponent === undefined ? this.renderDefaultIndicatorComponent() : indicatorComponent}} + ); } } AutoScrollFlatList.defaultProps = { @@ -93,10 +104,25 @@ AutoScrollFlatList.defaultProps = { showScrollToEndIndicator: true, }; const styles = StyleSheet.create({ + container: { + flex: 1, + }, contentContainer: { alignItems: "stretch", paddingVertical: 8, paddingHorizontal: 8, }, + scrollToEndIndicator: { + position: "absolute", + bottom: 20, + right: 20, + width: 30, + height: 30, + justifyContent: "center", + alignItems: "center", + borderWidth: 1, + borderColor: "#000000", + borderRadius: 5, + }, }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/dist/index.js.map b/build/dist/index.js.map index 39f2c13..9b89ec4 100644 --- a/build/dist/index.js.map +++ b/build/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,QAAQ,EAAwF,UAAU,EAAuB,MAAM,cAAc,CAAC;AAmB9J,MAAM,CAAC,OAAO,OAAO,kBAAsB,SAAQ,KAAK,CAAC,aAAuB;IAAhF;;QAMqB,YAAO,GAAiC,KAAK,CAAC,SAAS,EAAE,CAAC;QACnE,mBAAc,GAAW,CAAC,CAAC;QAC3B,kBAAa,GAAW,CAAC,CAAC;QAC1B,2BAAsB,GAAY,IAAI,CAAC;QAE/C,sJAAsJ;QACtJ,sGAAsG;QAEtG;;WAEG;QAEH,gBAAW,GAAG,CAAC,SAA8B,EAAC,QAAQ,EAAE,IAAI,EAAC,EAAE,EAAE;YAC7D,IAAI,CAAC,cAAc,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAC,CAAC,CAAC;QACvG,CAAC,CAAC;QAEF,kBAAa,GAAG,CAAC,MAAuF,EAAE,EAAE;YACxG,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;gBACtB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;aAC9C;QACL,CAAC,CAAC;QAEF,iBAAY,GAAG,CAAC,MAA2D,EAAE,EAAE;YAC3E,IAAI,IA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AiB,EAAE,CAAC;KACvB;IACD,oBAAoB,EAAE;QAClB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,CAAC;KAClB;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/build/dist/package.json b/build/dist/package.json index 97c0897..06f6c39 100644 --- a/build/dist/package.json +++ b/build/dist/package.json @@ -1,6 +1,6 @@ { "name": "react-native-autoscroll-flatlist", - "version": "1.4.1", + "version": "1.5.0", "description": "An enhanced React Native FlatList component to provide auto-scrolling functionality", "author": "Kelvin Chu (github.com/RageBill)", "license": "MIT", diff --git a/example/package.json b/example/package.json index e68c1c5..eec19d1 100644 --- a/example/package.json +++ b/example/package.json @@ -13,7 +13,7 @@ "dependencies": { "react": "16.11.0", "react-native": "0.61.2", - "react-native-autoscroll-flatlist": "1.4.1" + "react-native-autoscroll-flatlist": "1.5.0" }, "devDependencies": { "@types/react": "*", diff --git a/example/yarn.lock b/example/yarn.lock index bfd1d7f..66ea590 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -5360,10 +5360,10 @@ react-lifecycles-compat@^3.0.0: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-native-autoscroll-flatlist@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/react-native-autoscroll-flatlist/-/react-native-autoscroll-flatlist-1.4.1.tgz#28f7c2428e5d185f937278663af43addb613ae07" - integrity sha512-pE7g/du/kbcRXFxyR2g6t7dbUAc4Tvc0k1I7z6kG4CgJGqJv/Op8J1txLvm2UhVTbbBpEL4bAGQ0Zd9d9nq18Q== +react-native-autoscroll-flatlist@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/react-native-autoscroll-flatlist/-/react-native-autoscroll-flatlist-1.5.0.tgz#aac1b5fc8ae9caa1aeb6125433283df9a966cebd" + integrity sha512-A2kXdCX/SU1jZXntKCzIkkDiywTOuY/CdGmIYspSvbsHbJBQGW2aUHA7l53yPsNGYXpeFAmKHpAZeiYD3VzPeg== react-native-scripts-ts@1.7.0: version "1.7.0" diff --git a/package.json b/package.json index 97c0897..06f6c39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-autoscroll-flatlist", - "version": "1.4.1", + "version": "1.5.0", "description": "An enhanced React Native FlatList component to provide auto-scrolling functionality", "author": "Kelvin Chu (github.com/RageBill)", "license": "MIT",