├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── publish.yml ├── .gitignore ├── .husky ├── commit-msg ├── pre-commit └── pre-push ├── .npmignore ├── .prettierrc.js ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── assets ├── exampleInfiniteScroll.gif ├── exampleSimpleScroll.gif ├── preview1.gif ├── preview2.gif ├── preview3.gif └── react-native-infinite-wheel-picker.png ├── babel.config.js ├── example ├── .bundle │ └── config ├── .gitignore ├── .node-version ├── .prettierrc.js ├── .ruby-version ├── .watchmanconfig ├── Gemfile ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── infinitewheelpickerexample │ │ │ │ └── ReactNativeFlipper.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── infinitewheelpickerexample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── release │ │ │ └── java │ │ │ └── com │ │ │ └── infinitewheelpickerexample │ │ │ └── ReactNativeFlipper.java │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── .xcode.env │ ├── InfiniteWheelPickerExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── InfiniteWheelPickerExample.xcscheme │ ├── InfiniteWheelPickerExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── InfiniteWheelPickerExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── main.m │ ├── InfiniteWheelPickerExampleTests │ │ ├── InfiniteWheelPickerExampleTests.m │ │ └── Info.plist │ ├── Podfile │ └── Podfile.lock ├── metro.config.js ├── package.json ├── src │ ├── App.tsx │ ├── assets │ │ └── index.ts │ ├── components │ │ ├── GlobalTimePicker │ │ │ ├── GlobalTimePicker.tsx │ │ │ └── GlobalTimePickerStyles.ts │ │ ├── SetBirthDate │ │ │ ├── SetBirthDate.tsx │ │ │ └── SetBirthDateStyles.ts │ │ ├── TimePicker │ │ │ ├── TimePicker.tsx │ │ │ └── TimePickerStyles.ts │ │ └── index.ts │ ├── constants │ │ ├── StaticData.ts │ │ └── index.ts │ └── theme │ │ ├── Metrics.ts │ │ └── index.ts └── tsconfig.json ├── package.json ├── src ├── components │ ├── WheelPicker │ │ ├── WheelPicker.tsx │ │ ├── WheelPickerElement.tsx │ │ ├── WheelPickerStyles.ts │ │ ├── WheelPickerTypes.ts │ │ └── index.ts │ └── index.ts ├── constants │ ├── index.ts │ └── types.ts ├── hooks │ ├── index.ts │ ├── types.ts │ ├── useThrowPropsError.ts │ ├── useWheelPicker.ts │ └── useWheelPickerElement.ts ├── index.ts ├── theme │ ├── Colors.ts │ ├── Metrics.ts │ └── index.ts └── utils │ └── index.ts └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | example/ 3 | lib/ 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const OFF = 0; 2 | const WARN = 1; 3 | const ERROR = 2; 4 | 5 | module.exports = { 6 | extends: ['@react-native-community', 'prettier'], 7 | plugins: ['prettier'], 8 | root: true, 9 | ignorePatterns: ['.eslintrc.js'], 10 | rules: { 11 | 'prettier/prettier': [ 12 | 'error', 13 | {}, 14 | { 15 | usePrettierrc: true, 16 | }, 17 | ], 18 | 'prefer-const': 'warn', 19 | 'no-console': ['error', { allow: ['warn', 'error'] }], 20 | // General 21 | indent: [ 22 | OFF, 23 | 2, 24 | { 25 | SwitchCase: 1, 26 | VariableDeclarator: 1, 27 | outerIIFEBody: 1, 28 | FunctionDeclaration: { 29 | parameters: 1, 30 | body: 1, 31 | }, 32 | FunctionExpression: { 33 | parameters: 1, 34 | body: 1, 35 | }, 36 | flatTernaryExpressions: true, 37 | offsetTernaryExpressions: true, 38 | }, 39 | ], 40 | 'global-require': OFF, 41 | 'no-plusplus': OFF, 42 | 'no-cond-assign': OFF, 43 | 'max-classes-per-file': [ERROR, 10], 44 | 'no-shadow': OFF, 45 | 'no-undef': OFF, 46 | 'no-bitwise': OFF, 47 | 'no-param-reassign': OFF, 48 | 'no-use-before-define': OFF, 49 | 'linebreak-style': [ERROR, 'unix'], 50 | semi: [ERROR, 'always'], 51 | 'object-curly-spacing': [ERROR, 'always'], 52 | 'eol-last': [ERROR, 'always'], 53 | 'no-console': OFF, 54 | 'no-restricted-syntax': [ 55 | WARN, 56 | { 57 | selector: 58 | "CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|error|info|trace|disableYellowBox|tron)$/]", 59 | message: 'Unexpected property on console object was called', 60 | }, 61 | ], 62 | eqeqeq: [WARN, 'always'], 63 | quotes: [ 64 | ERROR, 65 | 'single', 66 | { avoidEscape: true, allowTemplateLiterals: false }, 67 | ], 68 | // typescript 69 | '@typescript-eslint/no-shadow': [ERROR], 70 | '@typescript-eslint/no-use-before-define': [ERROR], 71 | '@typescript-eslint/no-unused-vars': ERROR, 72 | '@typescript-eslint/consistent-type-definitions': [ERROR, 'interface'], 73 | '@typescript-eslint/indent': [ 74 | OFF, 75 | 2, 76 | { 77 | SwitchCase: 1, 78 | VariableDeclarator: 1, 79 | outerIIFEBody: 1, 80 | FunctionDeclaration: { 81 | parameters: 1, 82 | body: 1, 83 | }, 84 | FunctionExpression: { 85 | parameters: 1, 86 | body: 1, 87 | }, 88 | flatTernaryExpressions: true, 89 | offsetTernaryExpressions: true, 90 | }, 91 | ], 92 | // react 93 | 'react/jsx-props-no-spreading': OFF, 94 | 'react/jsx-filename-extension': [ 95 | ERROR, 96 | { extensions: ['.js', '.jsx', '.ts', '.tsx'] }, 97 | ], 98 | 'react/no-unescaped-entities': [ERROR, { forbid: ['>', '"', '}'] }], 99 | 'react/prop-types': [ 100 | ERROR, 101 | { ignore: ['action', 'dispatch', 'nav', 'navigation'] }, 102 | ], 103 | 'react/display-name': OFF, 104 | 'react/jsx-boolean-value': ERROR, 105 | 'react/jsx-no-undef': ERROR, 106 | 'react/jsx-uses-react': ERROR, 107 | 'react/jsx-sort-props': [ 108 | ERROR, 109 | { 110 | callbacksLast: true, 111 | shorthandFirst: true, 112 | ignoreCase: true, 113 | noSortAlphabetically: true, 114 | }, 115 | ], 116 | 'react/jsx-pascal-case': ERROR, 117 | 'react/no-children-prop': OFF, 118 | // react-native specific rules 119 | 'react-native/no-unused-styles': ERROR, 120 | 'react-native/no-inline-styles': ERROR, 121 | 'react-native/no-color-literals': ERROR, 122 | 'react-native/no-raw-text': ERROR, 123 | }, 124 | globals: { 125 | JSX: 'readonly', 126 | }, 127 | env: { 128 | jest: true, 129 | }, 130 | }; 131 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: "🚀 Publish" 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | release: 10 | name: 🚀 Publish 11 | runs-on: macos-13 12 | steps: 13 | - name: 📚 checkout 14 | uses: actions/checkout@v2.4.2 15 | - name: 🟢 node 16 | uses: actions/setup-node@v3.3.0 17 | with: 18 | node-version: 18 19 | registry-url: https://registry.npmjs.org 20 | - name: 🚀 Build & Publish 21 | run: yarn install && yarn build && yarn publish --access public 22 | env: 23 | NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log* 37 | yarn.lock 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | !debug.keystore 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://docs.fastlane.tools/best-practices/source-control/ 51 | 52 | */fastlane/report.xml 53 | */fastlane/Preview.html 54 | */fastlane/screenshots 55 | 56 | # Bundle artifact 57 | *.jsbundle 58 | 59 | # Ruby / CocoaPods 60 | /ios/Pods/ 61 | /vendor/bundle/ 62 | 63 | # generated 64 | lib 65 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn commitlint --edit $1 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn lint-staged 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn build -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github/ 2 | example/ 3 | assets/ 4 | .eslintignore 5 | .eslintrc 6 | CONTRIBUTING.md 7 | babel.config.js 8 | .buckconfig 9 | jest-setup.js 10 | .husky/ -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: true, 5 | singleQuote: true, 6 | trailingComma: 'es5' 7 | }; 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We welcome code changes that improve this library or fix a problem, and please make sure to follow all best practices and test all the changes/fixes before committing and creating a pull request. 🚀 🚀 4 | 5 | ### Committing and Pushing Changes 6 | 7 | Commit messages should be formatted as: 8 | 9 | ``` 10 | [optional scope]: 11 | 12 | [optional body] 13 | 14 | [optional footer] 15 | ``` 16 | 17 | Where type can be one of the following: 18 | 19 | - feat 20 | - fix 21 | - docs 22 | - chore 23 | - style 24 | - refactor 25 | - test 26 | 27 | and an optional scope can be a component 28 | 29 | ``` 30 | docs: update contributing guide 31 | ``` 32 | 33 | ``` 34 | fix(TicketId/Component): layout flicker issue 35 | ``` 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Simform Solutions 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Infinite Wheel Picker - Simform](./assets/react-native-infinite-wheel-picker.png) 2 | 3 | # react-native-infinite-wheel-picker 4 | 5 | [![react-native-infinite-wheel-picker on npm](https://img.shields.io/npm/v/react-native-infinite-wheel-picker.svg?style=flat)](https://www.npmjs.com/package/react-native-infinite-wheel-picker) [![react-native-infinite-wheel-picker downloads](https://img.shields.io/npm/dm/react-native-infinite-wheel-picker)](https://www.npmtrends.com/react-native-infinite-wheel-picker) [![react-native-infinite-wheel-picker install size](https://packagephobia.com/badge?p=react-native-infinite-wheel-picker)](https://packagephobia.com/result?p=react-native-infinite-wheel-picker) [![Android](https://img.shields.io/badge/Platform-Android-green?logo=android)](https://www.android.com) [![iOS](https://img.shields.io/badge/Platform-iOS-green?logo=apple)](https://developer.apple.com/ios) [![MIT](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT) 6 | 7 | --- 8 | 9 | The React Native Infinite Wheel Picker package offers a highly customizable, versatile, and seamless wheel picker component, enhancing the user experience with smooth scrolling and intuitive selection. It's dynamic design allows for endless scrolling, providing a natural and interactive interface for selecting values. 10 | 11 | The library is compatible with both Android and iOS platforms, offering a versatile solution to elevate your app's user interface with ease. 12 | 13 | ## 🎬 Preview 14 | 15 | 16 | 17 | 18 | 20 | 22 | 23 |
SimformSolutionsSimformSolutions 19 | SimformSolutions 21 |
24 | 25 | 26 | ## Quick Access 27 | 28 | [Installation](#installation) | [Usage and Examples](#usage) | [Properties](#properties) | [Example Code](#example) | [License](#license) 29 | 30 | ## Getting Started 31 | 32 | Here's how to get started with `react-native-infinite-wheel-picker` in your React Native project: 33 | 34 | ### Installation 35 | 36 | #### Install the package 37 | 38 | ```sh 39 | npm install react-native-infinite-wheel-picker 40 | ``` 41 | 42 | Using `Yarn`: 43 | 44 | ```sh 45 | yarn add react-native-infinite-wheel-picker 46 | ``` 47 | 48 | ## Usage 49 | 50 | ```jsx 51 | import React from 'react'; 52 | import { StyleSheet, View } from 'react-native'; 53 | import { WheelPicker } from 'react-native-infinite-wheel-picker'; 54 | 55 | const App: React.FC = () => { 56 | const initialData = [1, 2, 3, 4, 5, 6, 7, 8]; 57 | const [selectedIndex, setSelectedIndex] = React.useState(3); 58 | 59 | return ( 60 | 61 | { 67 | console.log(value); 68 | setSelectedIndex(index); 69 | }} 70 | selectedIndex={selectedIndex} 71 | containerStyle={styles.containerStyle} 72 | selectedLayoutStyle={styles.selectedLayoutStyle} 73 | elementTextStyle={styles.elementTextStyle} 74 | /> 75 | 76 | ); 77 | }; 78 | 79 | export default App; 80 | 81 | const styles = StyleSheet.create({ 82 | container: { 83 | flex: 1, 84 | justifyContent: 'center', 85 | backgroundColor: '#fff', 86 | alignItems: 'center', 87 | }, 88 | selectedLayoutStyle: { 89 | backgroundColor: '#00000026', 90 | borderRadius: 2, 91 | }, 92 | containerStyle: { 93 | backgroundColor: '#0000001a', 94 | width: 150 95 | }, 96 | elementTextStyle: { 97 | fontSize: 18 98 | }, 99 | }); 100 | ``` 101 | 102 | ## 🎬 Preview 103 | 104 | 105 | 106 | 107 | 108 |
SimformSolutions
109 | 110 | For, a simple scroll use `infiniteScroll={false}` that disable infinite scrolling of the items. 111 | 112 | ```js 113 | { 119 | console.log(value); 120 | }} 121 | infiniteScroll={false} 122 | selectedIndex={selectedIndex} 123 | containerStyle={styles.containerStyle} 124 | selectedLayoutStyle={styles.selectedLayoutStyle} 125 | elementTextStyle={styles.elementTextStyle} 126 | />; 127 | ``` 128 | 129 | ## 🎬 Preview 130 | 131 | 132 | 133 | 134 | 135 |
SimformSolutions
136 | 137 | ## Properties 138 | 139 | | Props | Default | Type | Description | 140 | | :-------------------- | :-----: | :---------------------: | :---------- | 141 | | **data** | - | `Array` or `Array` | An array of strings or numbers representing the items to be displayed. eg [1, 2, 3, 4, 5, 6, 7, 8] | 142 | | **onChangeValue** | - | function | A callback function invoked when the selected item changes, receiving the new value | 143 | | **selectedIndex** | - | number | The item that should be selected in the picker | 144 | | initialSelectedIndex | 0 | number or string | The item that should be pre-selected in the picker | 145 | | infiniteScroll | true | boolean | A boolean that enables or disables infinite scrolling of the items | 146 | | restElements | 2 | number | The number of items to show above and below the selected item in the picker | 147 | | loopCount | 100 | number | The number of times data array is repeated in picker | 148 | | decelerationRate | `'fast'` | `'normal', 'fast', 'number` | Determines how quickly the scroll decelerates after the user lifts their finger in the picker | 149 | | elementHeight | 40 | number | The height of each item in the picker, in pixels | 150 | | elementTextStyle | - | `StyleProp` | Style applied to the text of each item in the picker | 151 | | elementContainerStyle | - | `StyleProp` | Style applied to the container of each item in the picker | 152 | | selectedLayoutStyle | - | `StyleProp` | Style applied to the container of the selected item | 153 | | containerStyle | - | `StyleProp` | Style applied to the container of the wheel picker | 154 | | containerProps | - | `ViewProps` | Props applied to the container of the wheel picker | 155 | | flatListProps | - | `FlatListProps` | Props applied to the flatlist of the wheel picker | 156 | 157 | ##### Know more about [ViewProps](https://reactnative.dev/docs/view#props), [ViewStyle](https://reactnative.dev/docs/view-style-props), [FlatListProps](https://reactnative.dev/docs/flatlist#props), [TextStyle](https://reactnative.dev/docs/text-style-props#props), [decelerationRate](https://reactnative.dev/docs/scrollview#decelerationrate) 158 | 159 | > Note: In case of a manual prop change, make sure to reload the application to see the changes in the component. 160 | 161 | #### WheelPickerRef Methods 162 | 163 | #### scrollToIndex() 164 | 165 | ```ts 166 | scrollToIndex(index: number): void 167 | ``` 168 | 169 | `scrollToIndex` function that scroll to particular index. 170 | 171 | ## Example 172 | A full working example project is here [Example](./example/src/App.tsx) 173 | 174 | ```sh 175 | yarn 176 | yarn example ios // For ios 177 | yarn example android // For Android 178 | ``` 179 | 180 | ## Find this library useful? ❤️ 181 | 182 | Support it by joining [stargazers](https://github.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/stargazers) for this repository.⭐ 183 | 184 | ## Bugs / Feature requests / Feedbacks 185 | 186 | For bugs, feature requests, and discussion please use [GitHub Issues](https://github.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/issues/new?labels=bug&late=BUG_REPORT.md&title=%5BBUG%5D%3A), [GitHub New Feature](https://github.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/issues/new?labels=enhancement&late=FEATURE_REQUEST.md&title=%5BFEATURE%5D%3A), [GitHub Feedback](https://github.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/issues/new?labels=enhancement&late=FEATURE_REQUEST.md&title=%5BFEEDBACK%5D%3A) 187 | 188 | 189 | ## 🤝 How to Contribute 190 | 191 | We'd love to have you improve this library or fix a problem 💪 192 | Check out our [Contributing Guide](CONTRIBUTING.md) for ideas on contributing. 193 | 194 | ## Awesome Mobile Libraries 195 | 196 | - Check out our other [available awesome mobile libraries](https://github.com/SimformSolutionsPvtLtd/Awesome-Mobile-Libraries) 197 | 198 | ## License 199 | 200 | - [MIT License](./LICENSE) 201 | -------------------------------------------------------------------------------- /assets/exampleInfiniteScroll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/assets/exampleInfiniteScroll.gif -------------------------------------------------------------------------------- /assets/exampleSimpleScroll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/assets/exampleSimpleScroll.gif -------------------------------------------------------------------------------- /assets/preview1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/assets/preview1.gif -------------------------------------------------------------------------------- /assets/preview2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/assets/preview2.gif -------------------------------------------------------------------------------- /assets/preview3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/assets/preview3.gif -------------------------------------------------------------------------------- /assets/react-native-infinite-wheel-picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/assets/react-native-infinite-wheel-picker.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | 35 | # node.js 36 | # 37 | node_modules/ 38 | npm-debug.log 39 | yarn-error.log 40 | yarn.lock 41 | 42 | # BUCK 43 | buck-out/ 44 | \.buckd/ 45 | *.keystore 46 | !debug.keystore 47 | 48 | # fastlane 49 | # 50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 51 | # screenshots whenever they are needed. 52 | # For more information about the recommended setup visit: 53 | # https://docs.fastlane.tools/best-practices/source-control/ 54 | 55 | **/fastlane/report.xml 56 | **/fastlane/Preview.html 57 | **/fastlane/screenshots 58 | **/fastlane/test_output 59 | 60 | # Bundle artifact 61 | *.jsbundle 62 | 63 | # Ruby / CocoaPods 64 | /ios/Pods/ 65 | /vendor/bundle/ 66 | -------------------------------------------------------------------------------- /example/.node-version: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: true, 5 | singleQuote: true, 6 | trailingComma: 'es5', 7 | }; 8 | -------------------------------------------------------------------------------- /example/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.5 2 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '>= 2.6.10' 5 | 6 | # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper 7 | # bound in the template on Cocoapods with next React Native release. 8 | gem 'cocoapods', '>= 1.13', '< 1.15' 9 | gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' 10 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "com.facebook.react" 3 | 4 | import com.android.build.OutputFile 5 | 6 | /** 7 | * This is the configuration block to customize your React Native Android app. 8 | * By default you don't need to apply any configuration, just uncomment the lines you need. 9 | */ 10 | react { 11 | /* Folders */ 12 | // The root of your project, i.e. where "package.json" lives. Default is '..' 13 | // root = file("../") 14 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native 15 | // reactNativeDir = file("../node_modules/react-native") 16 | // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen 17 | // codegenDir = file("../node_modules/react-native-codegen") 18 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js 19 | // cliFile = file("../node_modules/react-native/cli.js") 20 | 21 | /* Variants */ 22 | // The list of variants to that are debuggable. For those we're going to 23 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'. 24 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. 25 | // debuggableVariants = ["liteDebug", "prodDebug"] 26 | 27 | /* Bundling */ 28 | // A list containing the node command and its flags. Default is just 'node'. 29 | // nodeExecutableAndArgs = ["node"] 30 | // 31 | // The command to run when bundling. By default is 'bundle' 32 | // bundleCommand = "ram-bundle" 33 | // 34 | // The path to the CLI configuration file. Default is empty. 35 | // bundleConfig = file(../rn-cli.config.js) 36 | // 37 | // The name of the generated asset file containing your JS bundle 38 | // bundleAssetName = "MyApplication.android.bundle" 39 | // 40 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' 41 | // entryFile = file("../js/MyApplication.android.js") 42 | // 43 | // A list of extra flags to pass to the 'bundle' commands. 44 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle 45 | // extraPackagerArgs = [] 46 | 47 | /* Hermes Commands */ 48 | // The hermes compiler command to run. By default it is 'hermesc' 49 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" 50 | // 51 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" 52 | // hermesFlags = ["-O", "-output-source-map"] 53 | } 54 | 55 | /** 56 | * Set this to true to create four separate APKs instead of one, 57 | * one for each native architecture. This is useful if you don't 58 | * use App Bundles (https://developer.android.com/guide/app-bundle/) 59 | * and want to have separate APKs to upload to the Play Store. 60 | */ 61 | def enableSeparateBuildPerCPUArchitecture = false 62 | 63 | /** 64 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode. 65 | */ 66 | def enableProguardInReleaseBuilds = false 67 | 68 | /** 69 | * The preferred build flavor of JavaScriptCore (JSC) 70 | * 71 | * For example, to use the international variant, you can use: 72 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 73 | * 74 | * The international variant includes ICU i18n library and necessary data 75 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 76 | * give correct results when using with locales other than en-US. Note that 77 | * this variant is about 6MiB larger per architecture than default. 78 | */ 79 | def jscFlavor = 'org.webkit:android-jsc:+' 80 | 81 | /** 82 | * Private function to get the list of Native Architectures you want to build. 83 | * This reads the value from reactNativeArchitectures in your gradle.properties 84 | * file and works together with the --active-arch-only flag of react-native run-android. 85 | */ 86 | def reactNativeArchitectures() { 87 | def value = project.getProperties().get("reactNativeArchitectures") 88 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] 89 | } 90 | 91 | android { 92 | ndkVersion rootProject.ext.ndkVersion 93 | 94 | compileSdkVersion rootProject.ext.compileSdkVersion 95 | 96 | namespace "com.infinitewheelpickerexample" 97 | defaultConfig { 98 | applicationId "com.infinitewheelpickerexample" 99 | minSdkVersion rootProject.ext.minSdkVersion 100 | targetSdkVersion rootProject.ext.targetSdkVersion 101 | versionCode 1 102 | versionName "1.0" 103 | } 104 | 105 | splits { 106 | abi { 107 | reset() 108 | enable enableSeparateBuildPerCPUArchitecture 109 | universalApk false // If true, also generate a universal APK 110 | include (*reactNativeArchitectures()) 111 | } 112 | } 113 | signingConfigs { 114 | debug { 115 | storeFile file('debug.keystore') 116 | storePassword 'android' 117 | keyAlias 'androiddebugkey' 118 | keyPassword 'android' 119 | } 120 | } 121 | buildTypes { 122 | debug { 123 | signingConfig signingConfigs.debug 124 | } 125 | release { 126 | // Caution! In production, you need to generate your own keystore file. 127 | // see https://reactnative.dev/docs/signed-apk-android. 128 | signingConfig signingConfigs.debug 129 | minifyEnabled enableProguardInReleaseBuilds 130 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 131 | } 132 | } 133 | 134 | // applicationVariants are e.g. debug, release 135 | applicationVariants.all { variant -> 136 | variant.outputs.each { output -> 137 | // For each separate APK per architecture, set a unique version code as described here: 138 | // https://developer.android.com/studio/build/configure-apk-splits.html 139 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. 140 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 141 | def abi = output.getFilter(OutputFile.ABI) 142 | if (abi != null) { // null for the universal-debug, universal-release variants 143 | output.versionCodeOverride = 144 | defaultConfig.versionCode * 1000 + versionCodes.get(abi) 145 | } 146 | 147 | } 148 | } 149 | } 150 | 151 | dependencies { 152 | // The version of react-native is set by the React Native Gradle Plugin 153 | implementation("com.facebook.react:react-android") 154 | 155 | implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") 156 | 157 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") 158 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 159 | exclude group:'com.squareup.okhttp3', module:'okhttp' 160 | } 161 | 162 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") 163 | if (hermesEnabled.toBoolean()) { 164 | implementation("com.facebook.react:hermes-android") 165 | } else { 166 | implementation jscFlavor 167 | } 168 | } 169 | 170 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 171 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/infinitewheelpickerexample/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.infinitewheelpickerexample; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 21 | import com.facebook.react.ReactInstanceEventListener; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | /** 28 | * Class responsible of loading Flipper inside your React Native application. This is the debug 29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup. 30 | */ 31 | public class ReactNativeFlipper { 32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 33 | if (FlipperUtils.shouldEnableFlipper(context)) { 34 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 35 | 36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 37 | client.addPlugin(new DatabasesFlipperPlugin(context)); 38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 39 | client.addPlugin(CrashReporterPlugin.getInstance()); 40 | 41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 42 | NetworkingModule.setCustomClientBuilder( 43 | new NetworkingModule.CustomClientBuilder() { 44 | @Override 45 | public void apply(OkHttpClient.Builder builder) { 46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 47 | } 48 | }); 49 | client.addPlugin(networkFlipperPlugin); 50 | client.start(); 51 | 52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 53 | // Hence we run if after all native modules have been initialized 54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 55 | if (reactContext == null) { 56 | reactInstanceManager.addReactInstanceEventListener( 57 | new ReactInstanceEventListener() { 58 | @Override 59 | public void onReactContextInitialized(ReactContext reactContext) { 60 | reactInstanceManager.removeReactInstanceEventListener(this); 61 | reactContext.runOnNativeModulesQueueThread( 62 | new Runnable() { 63 | @Override 64 | public void run() { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | }); 68 | } 69 | }); 70 | } else { 71 | client.addPlugin(new FrescoFlipperPlugin()); 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/infinitewheelpickerexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.infinitewheelpickerexample; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactActivityDelegate; 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate; 7 | 8 | public class MainActivity extends ReactActivity { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | @Override 15 | protected String getMainComponentName() { 16 | return "InfiniteWheelPickerExample"; 17 | } 18 | 19 | /** 20 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link 21 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React 22 | * (aka React 18) with two boolean flags. 23 | */ 24 | @Override 25 | protected ReactActivityDelegate createReactActivityDelegate() { 26 | return new DefaultReactActivityDelegate( 27 | this, 28 | getMainComponentName(), 29 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 30 | DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled 31 | // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). 32 | DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/infinitewheelpickerexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.infinitewheelpickerexample; 2 | 3 | import android.app.Application; 4 | import com.facebook.react.PackageList; 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 9 | import com.facebook.react.defaults.DefaultReactNativeHost; 10 | import com.facebook.soloader.SoLoader; 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = 16 | new DefaultReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | @SuppressWarnings("UnnecessaryLocalVariable") 25 | List packages = new PackageList(this).getPackages(); 26 | // Packages that cannot be autolinked yet can be added manually here, for example: 27 | // packages.add(new MyReactNativePackage()); 28 | return packages; 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | 36 | @Override 37 | protected boolean isNewArchEnabled() { 38 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 39 | } 40 | 41 | @Override 42 | protected Boolean isHermesEnabled() { 43 | return BuildConfig.IS_HERMES_ENABLED; 44 | } 45 | }; 46 | 47 | @Override 48 | public ReactNativeHost getReactNativeHost() { 49 | return mReactNativeHost; 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | SoLoader.init(this, /* native exopackage */ false); 56 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 57 | // If you opted-in for the New Architecture, we load the native entry point for this app. 58 | DefaultNewArchitectureEntryPoint.load(); 59 | } 60 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | InfiniteWheelPickerExample 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/app/src/release/java/com/infinitewheelpickerexample/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.infinitewheelpickerexample; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "33.0.0" 6 | minSdkVersion = 24 7 | compileSdkVersion = 33 8 | targetSdkVersion = 33 9 | 10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 11 | ndkVersion = "23.1.7779620" 12 | } 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | dependencies { 18 | classpath("com.android.tools.build:gradle:7.3.1") 19 | classpath("com.facebook.react:react-native-gradle-plugin") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.125.0 29 | 30 | # Use this property to specify which architecture you want to build. 31 | # You can also override it from the CLI using 32 | # ./gradlew -PreactNativeArchitectures=x86_64 33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 34 | 35 | # Use this property to enable support to the new architecture. 36 | # This will allow you to use TurboModules and the Fabric render in 37 | # your application. You should enable this flag either if you want 38 | # to write custom TurboModules/Fabric components OR use libraries that 39 | # are providing them. 40 | newArchEnabled=false 41 | 42 | # Use this property to enable or disable the Hermes JS engine. 43 | # If set to false, you will be using JSC instead. 44 | hermesEnabled=true 45 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'InfiniteWheelPickerExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "InfiniteWheelPickerExample", 3 | "displayName": "InfiniteWheelPickerExample" 4 | } -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import { AppRegistry } from 'react-native'; 6 | 7 | import { name as appName } from './app.json'; 8 | import App from './src/App'; 9 | 10 | AppRegistry.registerComponent(appName, () => App); 11 | -------------------------------------------------------------------------------- /example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* InfiniteWheelPickerExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InfiniteWheelPickerExampleTests.m */; }; 11 | 0C80B921A6F3F58F76C31292 /* libPods-InfiniteWheelPickerExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-InfiniteWheelPickerExample.a */; }; 12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 7699B88040F8A987B510C191 /* libPods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.a */; }; 16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 25 | remoteInfo = InfiniteWheelPickerExample; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 00E356EE1AD99517003FC87E /* InfiniteWheelPickerExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InfiniteWheelPickerExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 00E356F21AD99517003FC87E /* InfiniteWheelPickerExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InfiniteWheelPickerExampleTests.m; sourceTree = ""; }; 33 | 13B07F961A680F5B00A75B9A /* InfiniteWheelPickerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InfiniteWheelPickerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = InfiniteWheelPickerExample/AppDelegate.h; sourceTree = ""; }; 35 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = InfiniteWheelPickerExample/AppDelegate.mm; sourceTree = ""; }; 36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = InfiniteWheelPickerExample/Images.xcassets; sourceTree = ""; }; 37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = InfiniteWheelPickerExample/Info.plist; sourceTree = ""; }; 38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = InfiniteWheelPickerExample/main.m; sourceTree = ""; }; 39 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 3B4392A12AC88292D35C810B /* Pods-InfiniteWheelPickerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniteWheelPickerExample.debug.xcconfig"; path = "Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample.debug.xcconfig"; sourceTree = ""; }; 41 | 5709B34CF0A7D63546082F79 /* Pods-InfiniteWheelPickerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniteWheelPickerExample.release.xcconfig"; path = "Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample.release.xcconfig"; sourceTree = ""; }; 42 | 5B7EB9410499542E8C5724F5 /* Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.debug.xcconfig"; sourceTree = ""; }; 43 | 5DCACB8F33CDC322A6C60F78 /* libPods-InfiniteWheelPickerExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniteWheelPickerExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = InfiniteWheelPickerExample/LaunchScreen.storyboard; sourceTree = ""; }; 45 | 89C6BE57DB24E9ADA2F236DE /* Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.release.xcconfig"; path = "Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.release.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 7699B88040F8A987B510C191 /* libPods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.a in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 0C80B921A6F3F58F76C31292 /* libPods-InfiniteWheelPickerExample.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 00E356EF1AD99517003FC87E /* InfiniteWheelPickerExampleTests */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 00E356F21AD99517003FC87E /* InfiniteWheelPickerExampleTests.m */, 73 | 00E356F01AD99517003FC87E /* Supporting Files */, 74 | ); 75 | path = InfiniteWheelPickerExampleTests; 76 | sourceTree = ""; 77 | }; 78 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 00E356F11AD99517003FC87E /* Info.plist */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | 13B07FAE1A68108700A75B9A /* InfiniteWheelPickerExample */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 90 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 91 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 92 | 13B07FB61A68108700A75B9A /* Info.plist */, 93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 94 | 13B07FB71A68108700A75B9A /* main.m */, 95 | ); 96 | name = InfiniteWheelPickerExample; 97 | sourceTree = ""; 98 | }; 99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 103 | 5DCACB8F33CDC322A6C60F78 /* libPods-InfiniteWheelPickerExample.a */, 104 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.a */, 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | ); 113 | name = Libraries; 114 | sourceTree = ""; 115 | }; 116 | 83CBB9F61A601CBA00E9B192 = { 117 | isa = PBXGroup; 118 | children = ( 119 | 13B07FAE1A68108700A75B9A /* InfiniteWheelPickerExample */, 120 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 121 | 00E356EF1AD99517003FC87E /* InfiniteWheelPickerExampleTests */, 122 | 83CBBA001A601CBA00E9B192 /* Products */, 123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 124 | BBD78D7AC51CEA395F1C20DB /* Pods */, 125 | ); 126 | indentWidth = 2; 127 | sourceTree = ""; 128 | tabWidth = 2; 129 | usesTabs = 0; 130 | }; 131 | 83CBBA001A601CBA00E9B192 /* Products */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 13B07F961A680F5B00A75B9A /* InfiniteWheelPickerExample.app */, 135 | 00E356EE1AD99517003FC87E /* InfiniteWheelPickerExampleTests.xctest */, 136 | ); 137 | name = Products; 138 | sourceTree = ""; 139 | }; 140 | BBD78D7AC51CEA395F1C20DB /* Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 3B4392A12AC88292D35C810B /* Pods-InfiniteWheelPickerExample.debug.xcconfig */, 144 | 5709B34CF0A7D63546082F79 /* Pods-InfiniteWheelPickerExample.release.xcconfig */, 145 | 5B7EB9410499542E8C5724F5 /* Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.debug.xcconfig */, 146 | 89C6BE57DB24E9ADA2F236DE /* Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.release.xcconfig */, 147 | ); 148 | path = Pods; 149 | sourceTree = ""; 150 | }; 151 | /* End PBXGroup section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 00E356ED1AD99517003FC87E /* InfiniteWheelPickerExampleTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "InfiniteWheelPickerExampleTests" */; 157 | buildPhases = ( 158 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, 159 | 00E356EA1AD99517003FC87E /* Sources */, 160 | 00E356EB1AD99517003FC87E /* Frameworks */, 161 | 00E356EC1AD99517003FC87E /* Resources */, 162 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, 163 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 169 | ); 170 | name = InfiniteWheelPickerExampleTests; 171 | productName = InfiniteWheelPickerExampleTests; 172 | productReference = 00E356EE1AD99517003FC87E /* InfiniteWheelPickerExampleTests.xctest */; 173 | productType = "com.apple.product-type.bundle.unit-test"; 174 | }; 175 | 13B07F861A680F5B00A75B9A /* InfiniteWheelPickerExample */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "InfiniteWheelPickerExample" */; 178 | buildPhases = ( 179 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, 180 | FD10A7F022414F080027D42C /* Start Packager */, 181 | 13B07F871A680F5B00A75B9A /* Sources */, 182 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 183 | 13B07F8E1A680F5B00A75B9A /* Resources */, 184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 185 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, 186 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = InfiniteWheelPickerExample; 193 | productName = InfiniteWheelPickerExample; 194 | productReference = 13B07F961A680F5B00A75B9A /* InfiniteWheelPickerExample.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastUpgradeCheck = 1210; 204 | TargetAttributes = { 205 | 00E356ED1AD99517003FC87E = { 206 | CreatedOnToolsVersion = 6.2; 207 | TestTargetID = 13B07F861A680F5B00A75B9A; 208 | }; 209 | 13B07F861A680F5B00A75B9A = { 210 | LastSwiftMigration = 1120; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "InfiniteWheelPickerExample" */; 215 | compatibilityVersion = "Xcode 12.0"; 216 | developmentRegion = en; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 83CBB9F61A601CBA00E9B192; 223 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 13B07F861A680F5B00A75B9A /* InfiniteWheelPickerExample */, 228 | 00E356ED1AD99517003FC87E /* InfiniteWheelPickerExampleTests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 00E356EC1AD99517003FC87E /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 246 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXResourcesBuildPhase section */ 251 | 252 | /* Begin PBXShellScriptBuildPhase section */ 253 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | "$(SRCROOT)/.xcode.env.local", 260 | "$(SRCROOT)/.xcode.env", 261 | ); 262 | name = "Bundle React Native code and images"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; 268 | }; 269 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputFileListPaths = ( 275 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", 276 | ); 277 | name = "[CP] Embed Pods Frameworks"; 278 | outputFileListPaths = ( 279 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | shellPath = /bin/sh; 283 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample-frameworks.sh\"\n"; 284 | showEnvVarsInLog = 0; 285 | }; 286 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { 287 | isa = PBXShellScriptBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ); 291 | inputFileListPaths = ( 292 | ); 293 | inputPaths = ( 294 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 295 | "${PODS_ROOT}/Manifest.lock", 296 | ); 297 | name = "[CP] Check Pods Manifest.lock"; 298 | outputFileListPaths = ( 299 | ); 300 | outputPaths = ( 301 | "$(DERIVED_FILE_DIR)/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-checkManifestLockResult.txt", 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | shellPath = /bin/sh; 305 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 306 | showEnvVarsInLog = 0; 307 | }; 308 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { 309 | isa = PBXShellScriptBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | inputFileListPaths = ( 314 | ); 315 | inputPaths = ( 316 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 317 | "${PODS_ROOT}/Manifest.lock", 318 | ); 319 | name = "[CP] Check Pods Manifest.lock"; 320 | outputFileListPaths = ( 321 | ); 322 | outputPaths = ( 323 | "$(DERIVED_FILE_DIR)/Pods-InfiniteWheelPickerExample-checkManifestLockResult.txt", 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | shellPath = /bin/sh; 327 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 328 | showEnvVarsInLog = 0; 329 | }; 330 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { 331 | isa = PBXShellScriptBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | inputFileListPaths = ( 336 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 337 | ); 338 | name = "[CP] Embed Pods Frameworks"; 339 | outputFileListPaths = ( 340 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | shellPath = /bin/sh; 344 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-frameworks.sh\"\n"; 345 | showEnvVarsInLog = 0; 346 | }; 347 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { 348 | isa = PBXShellScriptBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | inputFileListPaths = ( 353 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample-resources-${CONFIGURATION}-input-files.xcfilelist", 354 | ); 355 | name = "[CP] Copy Pods Resources"; 356 | outputFileListPaths = ( 357 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample-resources-${CONFIGURATION}-output-files.xcfilelist", 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | shellPath = /bin/sh; 361 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample/Pods-InfiniteWheelPickerExample-resources.sh\"\n"; 362 | showEnvVarsInLog = 0; 363 | }; 364 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { 365 | isa = PBXShellScriptBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | ); 369 | inputFileListPaths = ( 370 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", 371 | ); 372 | name = "[CP] Copy Pods Resources"; 373 | outputFileListPaths = ( 374 | "${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | shellPath = /bin/sh; 378 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests/Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests-resources.sh\"\n"; 379 | showEnvVarsInLog = 0; 380 | }; 381 | FD10A7F022414F080027D42C /* Start Packager */ = { 382 | isa = PBXShellScriptBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | ); 386 | inputFileListPaths = ( 387 | ); 388 | inputPaths = ( 389 | ); 390 | name = "Start Packager"; 391 | outputFileListPaths = ( 392 | ); 393 | outputPaths = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | shellPath = /bin/sh; 397 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 398 | showEnvVarsInLog = 0; 399 | }; 400 | /* End PBXShellScriptBuildPhase section */ 401 | 402 | /* Begin PBXSourcesBuildPhase section */ 403 | 00E356EA1AD99517003FC87E /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 00E356F31AD99517003FC87E /* InfiniteWheelPickerExampleTests.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | 13B07F871A680F5B00A75B9A /* Sources */ = { 412 | isa = PBXSourcesBuildPhase; 413 | buildActionMask = 2147483647; 414 | files = ( 415 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 416 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXSourcesBuildPhase section */ 421 | 422 | /* Begin PBXTargetDependency section */ 423 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 424 | isa = PBXTargetDependency; 425 | target = 13B07F861A680F5B00A75B9A /* InfiniteWheelPickerExample */; 426 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 427 | }; 428 | /* End PBXTargetDependency section */ 429 | 430 | /* Begin XCBuildConfiguration section */ 431 | 00E356F61AD99517003FC87E /* Debug */ = { 432 | isa = XCBuildConfiguration; 433 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.debug.xcconfig */; 434 | buildSettings = { 435 | BUNDLE_LOADER = "$(TEST_HOST)"; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | INFOPLIST_FILE = InfiniteWheelPickerExampleTests/Info.plist; 441 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 442 | LD_RUNPATH_SEARCH_PATHS = ( 443 | "$(inherited)", 444 | "@executable_path/Frameworks", 445 | "@loader_path/Frameworks", 446 | ); 447 | OTHER_LDFLAGS = ( 448 | "-ObjC", 449 | "-lc++", 450 | "$(inherited)", 451 | ); 452 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InfiniteWheelPickerExample.app/InfiniteWheelPickerExample"; 455 | }; 456 | name = Debug; 457 | }; 458 | 00E356F71AD99517003FC87E /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-InfiniteWheelPickerExample-InfiniteWheelPickerExampleTests.release.xcconfig */; 461 | buildSettings = { 462 | BUNDLE_LOADER = "$(TEST_HOST)"; 463 | COPY_PHASE_STRIP = NO; 464 | INFOPLIST_FILE = InfiniteWheelPickerExampleTests/Info.plist; 465 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 466 | LD_RUNPATH_SEARCH_PATHS = ( 467 | "$(inherited)", 468 | "@executable_path/Frameworks", 469 | "@loader_path/Frameworks", 470 | ); 471 | OTHER_LDFLAGS = ( 472 | "-ObjC", 473 | "-lc++", 474 | "$(inherited)", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InfiniteWheelPickerExample.app/InfiniteWheelPickerExample"; 479 | }; 480 | name = Release; 481 | }; 482 | 13B07F941A680F5B00A75B9A /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-InfiniteWheelPickerExample.debug.xcconfig */; 485 | buildSettings = { 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | CLANG_ENABLE_MODULES = YES; 488 | CURRENT_PROJECT_VERSION = 1; 489 | ENABLE_BITCODE = NO; 490 | INFOPLIST_FILE = InfiniteWheelPickerExample/Info.plist; 491 | LD_RUNPATH_SEARCH_PATHS = ( 492 | "$(inherited)", 493 | "@executable_path/Frameworks", 494 | ); 495 | MARKETING_VERSION = 1.0; 496 | OTHER_LDFLAGS = ( 497 | "$(inherited)", 498 | "-ObjC", 499 | "-lc++", 500 | ); 501 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 502 | PRODUCT_NAME = InfiniteWheelPickerExample; 503 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 504 | SWIFT_VERSION = 5.0; 505 | VERSIONING_SYSTEM = "apple-generic"; 506 | }; 507 | name = Debug; 508 | }; 509 | 13B07F951A680F5B00A75B9A /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-InfiniteWheelPickerExample.release.xcconfig */; 512 | buildSettings = { 513 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 514 | CLANG_ENABLE_MODULES = YES; 515 | CURRENT_PROJECT_VERSION = 1; 516 | INFOPLIST_FILE = InfiniteWheelPickerExample/Info.plist; 517 | LD_RUNPATH_SEARCH_PATHS = ( 518 | "$(inherited)", 519 | "@executable_path/Frameworks", 520 | ); 521 | MARKETING_VERSION = 1.0; 522 | OTHER_LDFLAGS = ( 523 | "$(inherited)", 524 | "-ObjC", 525 | "-lc++", 526 | ); 527 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 528 | PRODUCT_NAME = InfiniteWheelPickerExample; 529 | SWIFT_VERSION = 5.0; 530 | VERSIONING_SYSTEM = "apple-generic"; 531 | }; 532 | name = Release; 533 | }; 534 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ALWAYS_SEARCH_USER_PATHS = NO; 538 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 539 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 540 | CLANG_CXX_LIBRARY = "libc++"; 541 | CLANG_ENABLE_MODULES = YES; 542 | CLANG_ENABLE_OBJC_ARC = YES; 543 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 544 | CLANG_WARN_BOOL_CONVERSION = YES; 545 | CLANG_WARN_COMMA = YES; 546 | CLANG_WARN_CONSTANT_CONVERSION = YES; 547 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 548 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 549 | CLANG_WARN_EMPTY_BODY = YES; 550 | CLANG_WARN_ENUM_CONVERSION = YES; 551 | CLANG_WARN_INFINITE_RECURSION = YES; 552 | CLANG_WARN_INT_CONVERSION = YES; 553 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 554 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 555 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 556 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 557 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 558 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 559 | CLANG_WARN_STRICT_PROTOTYPES = YES; 560 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 561 | CLANG_WARN_UNREACHABLE_CODE = YES; 562 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 563 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 564 | COPY_PHASE_STRIP = NO; 565 | ENABLE_STRICT_OBJC_MSGSEND = YES; 566 | ENABLE_TESTABILITY = YES; 567 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 568 | GCC_C_LANGUAGE_STANDARD = gnu99; 569 | GCC_DYNAMIC_NO_PIC = NO; 570 | GCC_NO_COMMON_BLOCKS = YES; 571 | GCC_OPTIMIZATION_LEVEL = 0; 572 | GCC_PREPROCESSOR_DEFINITIONS = ( 573 | "DEBUG=1", 574 | "$(inherited)", 575 | _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION, 576 | ); 577 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 578 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 579 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 580 | GCC_WARN_UNDECLARED_SELECTOR = YES; 581 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 582 | GCC_WARN_UNUSED_FUNCTION = YES; 583 | GCC_WARN_UNUSED_VARIABLE = YES; 584 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 585 | LD_RUNPATH_SEARCH_PATHS = ( 586 | /usr/lib/swift, 587 | "$(inherited)", 588 | ); 589 | LIBRARY_SEARCH_PATHS = ( 590 | "\"$(SDKROOT)/usr/lib/swift\"", 591 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 592 | "\"$(inherited)\"", 593 | ); 594 | MTL_ENABLE_DEBUG_INFO = YES; 595 | ONLY_ACTIVE_ARCH = YES; 596 | OTHER_CPLUSPLUSFLAGS = ( 597 | "$(OTHER_CFLAGS)", 598 | "-DFOLLY_NO_CONFIG", 599 | "-DFOLLY_MOBILE=1", 600 | "-DFOLLY_USE_LIBCPP=1", 601 | ); 602 | OTHER_LDFLAGS = ( 603 | "$(inherited)", 604 | " ", 605 | ); 606 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 607 | SDKROOT = iphoneos; 608 | }; 609 | name = Debug; 610 | }; 611 | 83CBBA211A601CBA00E9B192 /* Release */ = { 612 | isa = XCBuildConfiguration; 613 | buildSettings = { 614 | ALWAYS_SEARCH_USER_PATHS = NO; 615 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 616 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 617 | CLANG_CXX_LIBRARY = "libc++"; 618 | CLANG_ENABLE_MODULES = YES; 619 | CLANG_ENABLE_OBJC_ARC = YES; 620 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 621 | CLANG_WARN_BOOL_CONVERSION = YES; 622 | CLANG_WARN_COMMA = YES; 623 | CLANG_WARN_CONSTANT_CONVERSION = YES; 624 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 625 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 626 | CLANG_WARN_EMPTY_BODY = YES; 627 | CLANG_WARN_ENUM_CONVERSION = YES; 628 | CLANG_WARN_INFINITE_RECURSION = YES; 629 | CLANG_WARN_INT_CONVERSION = YES; 630 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 631 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 632 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 633 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 634 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 635 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 636 | CLANG_WARN_STRICT_PROTOTYPES = YES; 637 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 638 | CLANG_WARN_UNREACHABLE_CODE = YES; 639 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 640 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 641 | COPY_PHASE_STRIP = YES; 642 | ENABLE_NS_ASSERTIONS = NO; 643 | ENABLE_STRICT_OBJC_MSGSEND = YES; 644 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 645 | GCC_C_LANGUAGE_STANDARD = gnu99; 646 | GCC_NO_COMMON_BLOCKS = YES; 647 | GCC_PREPROCESSOR_DEFINITIONS = ( 648 | "$(inherited)", 649 | _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION, 650 | ); 651 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 652 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 653 | GCC_WARN_UNDECLARED_SELECTOR = YES; 654 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 655 | GCC_WARN_UNUSED_FUNCTION = YES; 656 | GCC_WARN_UNUSED_VARIABLE = YES; 657 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 658 | LD_RUNPATH_SEARCH_PATHS = ( 659 | /usr/lib/swift, 660 | "$(inherited)", 661 | ); 662 | LIBRARY_SEARCH_PATHS = ( 663 | "\"$(SDKROOT)/usr/lib/swift\"", 664 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 665 | "\"$(inherited)\"", 666 | ); 667 | MTL_ENABLE_DEBUG_INFO = NO; 668 | OTHER_CPLUSPLUSFLAGS = ( 669 | "$(OTHER_CFLAGS)", 670 | "-DFOLLY_NO_CONFIG", 671 | "-DFOLLY_MOBILE=1", 672 | "-DFOLLY_USE_LIBCPP=1", 673 | ); 674 | OTHER_LDFLAGS = ( 675 | "$(inherited)", 676 | " ", 677 | ); 678 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 679 | SDKROOT = iphoneos; 680 | VALIDATE_PRODUCT = YES; 681 | }; 682 | name = Release; 683 | }; 684 | /* End XCBuildConfiguration section */ 685 | 686 | /* Begin XCConfigurationList section */ 687 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "InfiniteWheelPickerExampleTests" */ = { 688 | isa = XCConfigurationList; 689 | buildConfigurations = ( 690 | 00E356F61AD99517003FC87E /* Debug */, 691 | 00E356F71AD99517003FC87E /* Release */, 692 | ); 693 | defaultConfigurationIsVisible = 0; 694 | defaultConfigurationName = Release; 695 | }; 696 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "InfiniteWheelPickerExample" */ = { 697 | isa = XCConfigurationList; 698 | buildConfigurations = ( 699 | 13B07F941A680F5B00A75B9A /* Debug */, 700 | 13B07F951A680F5B00A75B9A /* Release */, 701 | ); 702 | defaultConfigurationIsVisible = 0; 703 | defaultConfigurationName = Release; 704 | }; 705 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "InfiniteWheelPickerExample" */ = { 706 | isa = XCConfigurationList; 707 | buildConfigurations = ( 708 | 83CBBA201A601CBA00E9B192 /* Debug */, 709 | 83CBBA211A601CBA00E9B192 /* Release */, 710 | ); 711 | defaultConfigurationIsVisible = 0; 712 | defaultConfigurationName = Release; 713 | }; 714 | /* End XCConfigurationList section */ 715 | }; 716 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 717 | } 718 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample.xcodeproj/xcshareddata/xcschemes/InfiniteWheelPickerExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | 5 | @implementation AppDelegate 6 | 7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 8 | { 9 | self.moduleName = @"InfiniteWheelPickerExample"; 10 | // You can add your custom initial props in the dictionary below. 11 | // They will be passed down to the ViewController used by React Native. 12 | self.initialProps = @{}; 13 | 14 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 15 | } 16 | 17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 18 | { 19 | #if DEBUG 20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 21 | #else 22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 23 | #endif 24 | } 25 | 26 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 27 | /// 28 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 29 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 30 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. 31 | - (BOOL)concurrentRootEnabled 32 | { 33 | return true; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | InfiniteWheelPickerExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExampleTests/InfiniteWheelPickerExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface InfiniteWheelPickerExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation InfiniteWheelPickerExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /example/ios/InfiniteWheelPickerExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, min_ios_version_supported 5 | prepare_react_native_project! 6 | 7 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 8 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 9 | # 10 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` 11 | # ```js 12 | # module.exports = { 13 | # dependencies: { 14 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 15 | # ``` 16 | # flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled 17 | 18 | linkage = ENV['USE_FRAMEWORKS'] 19 | if linkage != nil 20 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 21 | use_frameworks! :linkage => linkage.to_sym 22 | end 23 | 24 | target 'InfiniteWheelPickerExample' do 25 | config = use_native_modules! 26 | 27 | # Flags change depending on the env values. 28 | flags = get_default_flags() 29 | 30 | use_react_native!( 31 | :path => config[:reactNativePath], 32 | # Hermes is now enabled by default. Disable by setting this flag to false. 33 | # Upcoming versions of React Native may rely on get_default_flags(), but 34 | # we make it explicit here to aid in the React Native upgrade process. 35 | :hermes_enabled => flags[:hermes_enabled], 36 | :fabric_enabled => flags[:fabric_enabled], 37 | # Enables Flipper. 38 | # 39 | # Note that if you have use_frameworks! enabled, Flipper will not work and 40 | # you should disable the next line. 41 | # :flipper_configuration => flipper_config, 42 | # An absolute path to your application root. 43 | :app_path => "#{Pod::Config.instance.installation_root}/.." 44 | ) 45 | 46 | target 'InfiniteWheelPickerExampleTests' do 47 | inherit! :complete 48 | # Pods for testing 49 | end 50 | 51 | post_install do |installer| 52 | react_native_post_install( 53 | installer, 54 | # Set `mac_catalyst_enabled` to `true` in order to apply patches 55 | # necessary for Mac Catalyst builds 56 | :mac_catalyst_enabled => false 57 | ) 58 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost (1.76.0) 3 | - DoubleConversion (1.1.6) 4 | - FBLazyVector (0.71.16) 5 | - FBReactNativeSpec (0.71.16): 6 | - RCT-Folly (= 2021.07.22.00) 7 | - RCTRequired (= 0.71.16) 8 | - RCTTypeSafety (= 0.71.16) 9 | - React-Core (= 0.71.16) 10 | - React-jsi (= 0.71.16) 11 | - ReactCommon/turbomodule/core (= 0.71.16) 12 | - fmt (6.2.1) 13 | - glog (0.3.5) 14 | - hermes-engine (0.71.16): 15 | - hermes-engine/Pre-built (= 0.71.16) 16 | - hermes-engine/Pre-built (0.71.16) 17 | - libevent (2.1.12) 18 | - RCT-Folly (2021.07.22.00): 19 | - boost 20 | - DoubleConversion 21 | - fmt (~> 6.2.1) 22 | - glog 23 | - RCT-Folly/Default (= 2021.07.22.00) 24 | - RCT-Folly/Default (2021.07.22.00): 25 | - boost 26 | - DoubleConversion 27 | - fmt (~> 6.2.1) 28 | - glog 29 | - RCT-Folly/Futures (2021.07.22.00): 30 | - boost 31 | - DoubleConversion 32 | - fmt (~> 6.2.1) 33 | - glog 34 | - libevent 35 | - RCTRequired (0.71.16) 36 | - RCTTypeSafety (0.71.16): 37 | - FBLazyVector (= 0.71.16) 38 | - RCTRequired (= 0.71.16) 39 | - React-Core (= 0.71.16) 40 | - React (0.71.16): 41 | - React-Core (= 0.71.16) 42 | - React-Core/DevSupport (= 0.71.16) 43 | - React-Core/RCTWebSocket (= 0.71.16) 44 | - React-RCTActionSheet (= 0.71.16) 45 | - React-RCTAnimation (= 0.71.16) 46 | - React-RCTBlob (= 0.71.16) 47 | - React-RCTImage (= 0.71.16) 48 | - React-RCTLinking (= 0.71.16) 49 | - React-RCTNetwork (= 0.71.16) 50 | - React-RCTSettings (= 0.71.16) 51 | - React-RCTText (= 0.71.16) 52 | - React-RCTVibration (= 0.71.16) 53 | - React-callinvoker (0.71.16) 54 | - React-Codegen (0.71.16): 55 | - FBReactNativeSpec 56 | - hermes-engine 57 | - RCT-Folly 58 | - RCTRequired 59 | - RCTTypeSafety 60 | - React-Core 61 | - React-jsi 62 | - React-jsiexecutor 63 | - ReactCommon/turbomodule/bridging 64 | - ReactCommon/turbomodule/core 65 | - React-Core (0.71.16): 66 | - glog 67 | - hermes-engine 68 | - RCT-Folly (= 2021.07.22.00) 69 | - React-Core/Default (= 0.71.16) 70 | - React-cxxreact (= 0.71.16) 71 | - React-hermes 72 | - React-jsi (= 0.71.16) 73 | - React-jsiexecutor (= 0.71.16) 74 | - React-perflogger (= 0.71.16) 75 | - Yoga 76 | - React-Core/CoreModulesHeaders (0.71.16): 77 | - glog 78 | - hermes-engine 79 | - RCT-Folly (= 2021.07.22.00) 80 | - React-Core/Default 81 | - React-cxxreact (= 0.71.16) 82 | - React-hermes 83 | - React-jsi (= 0.71.16) 84 | - React-jsiexecutor (= 0.71.16) 85 | - React-perflogger (= 0.71.16) 86 | - Yoga 87 | - React-Core/Default (0.71.16): 88 | - glog 89 | - hermes-engine 90 | - RCT-Folly (= 2021.07.22.00) 91 | - React-cxxreact (= 0.71.16) 92 | - React-hermes 93 | - React-jsi (= 0.71.16) 94 | - React-jsiexecutor (= 0.71.16) 95 | - React-perflogger (= 0.71.16) 96 | - Yoga 97 | - React-Core/DevSupport (0.71.16): 98 | - glog 99 | - hermes-engine 100 | - RCT-Folly (= 2021.07.22.00) 101 | - React-Core/Default (= 0.71.16) 102 | - React-Core/RCTWebSocket (= 0.71.16) 103 | - React-cxxreact (= 0.71.16) 104 | - React-hermes 105 | - React-jsi (= 0.71.16) 106 | - React-jsiexecutor (= 0.71.16) 107 | - React-jsinspector (= 0.71.16) 108 | - React-perflogger (= 0.71.16) 109 | - Yoga 110 | - React-Core/RCTActionSheetHeaders (0.71.16): 111 | - glog 112 | - hermes-engine 113 | - RCT-Folly (= 2021.07.22.00) 114 | - React-Core/Default 115 | - React-cxxreact (= 0.71.16) 116 | - React-hermes 117 | - React-jsi (= 0.71.16) 118 | - React-jsiexecutor (= 0.71.16) 119 | - React-perflogger (= 0.71.16) 120 | - Yoga 121 | - React-Core/RCTAnimationHeaders (0.71.16): 122 | - glog 123 | - hermes-engine 124 | - RCT-Folly (= 2021.07.22.00) 125 | - React-Core/Default 126 | - React-cxxreact (= 0.71.16) 127 | - React-hermes 128 | - React-jsi (= 0.71.16) 129 | - React-jsiexecutor (= 0.71.16) 130 | - React-perflogger (= 0.71.16) 131 | - Yoga 132 | - React-Core/RCTBlobHeaders (0.71.16): 133 | - glog 134 | - hermes-engine 135 | - RCT-Folly (= 2021.07.22.00) 136 | - React-Core/Default 137 | - React-cxxreact (= 0.71.16) 138 | - React-hermes 139 | - React-jsi (= 0.71.16) 140 | - React-jsiexecutor (= 0.71.16) 141 | - React-perflogger (= 0.71.16) 142 | - Yoga 143 | - React-Core/RCTImageHeaders (0.71.16): 144 | - glog 145 | - hermes-engine 146 | - RCT-Folly (= 2021.07.22.00) 147 | - React-Core/Default 148 | - React-cxxreact (= 0.71.16) 149 | - React-hermes 150 | - React-jsi (= 0.71.16) 151 | - React-jsiexecutor (= 0.71.16) 152 | - React-perflogger (= 0.71.16) 153 | - Yoga 154 | - React-Core/RCTLinkingHeaders (0.71.16): 155 | - glog 156 | - hermes-engine 157 | - RCT-Folly (= 2021.07.22.00) 158 | - React-Core/Default 159 | - React-cxxreact (= 0.71.16) 160 | - React-hermes 161 | - React-jsi (= 0.71.16) 162 | - React-jsiexecutor (= 0.71.16) 163 | - React-perflogger (= 0.71.16) 164 | - Yoga 165 | - React-Core/RCTNetworkHeaders (0.71.16): 166 | - glog 167 | - hermes-engine 168 | - RCT-Folly (= 2021.07.22.00) 169 | - React-Core/Default 170 | - React-cxxreact (= 0.71.16) 171 | - React-hermes 172 | - React-jsi (= 0.71.16) 173 | - React-jsiexecutor (= 0.71.16) 174 | - React-perflogger (= 0.71.16) 175 | - Yoga 176 | - React-Core/RCTSettingsHeaders (0.71.16): 177 | - glog 178 | - hermes-engine 179 | - RCT-Folly (= 2021.07.22.00) 180 | - React-Core/Default 181 | - React-cxxreact (= 0.71.16) 182 | - React-hermes 183 | - React-jsi (= 0.71.16) 184 | - React-jsiexecutor (= 0.71.16) 185 | - React-perflogger (= 0.71.16) 186 | - Yoga 187 | - React-Core/RCTTextHeaders (0.71.16): 188 | - glog 189 | - hermes-engine 190 | - RCT-Folly (= 2021.07.22.00) 191 | - React-Core/Default 192 | - React-cxxreact (= 0.71.16) 193 | - React-hermes 194 | - React-jsi (= 0.71.16) 195 | - React-jsiexecutor (= 0.71.16) 196 | - React-perflogger (= 0.71.16) 197 | - Yoga 198 | - React-Core/RCTVibrationHeaders (0.71.16): 199 | - glog 200 | - hermes-engine 201 | - RCT-Folly (= 2021.07.22.00) 202 | - React-Core/Default 203 | - React-cxxreact (= 0.71.16) 204 | - React-hermes 205 | - React-jsi (= 0.71.16) 206 | - React-jsiexecutor (= 0.71.16) 207 | - React-perflogger (= 0.71.16) 208 | - Yoga 209 | - React-Core/RCTWebSocket (0.71.16): 210 | - glog 211 | - hermes-engine 212 | - RCT-Folly (= 2021.07.22.00) 213 | - React-Core/Default (= 0.71.16) 214 | - React-cxxreact (= 0.71.16) 215 | - React-hermes 216 | - React-jsi (= 0.71.16) 217 | - React-jsiexecutor (= 0.71.16) 218 | - React-perflogger (= 0.71.16) 219 | - Yoga 220 | - React-CoreModules (0.71.16): 221 | - RCT-Folly (= 2021.07.22.00) 222 | - RCTTypeSafety (= 0.71.16) 223 | - React-Codegen (= 0.71.16) 224 | - React-Core/CoreModulesHeaders (= 0.71.16) 225 | - React-jsi (= 0.71.16) 226 | - React-RCTBlob 227 | - React-RCTImage (= 0.71.16) 228 | - ReactCommon/turbomodule/core (= 0.71.16) 229 | - React-cxxreact (0.71.16): 230 | - boost (= 1.76.0) 231 | - DoubleConversion 232 | - glog 233 | - hermes-engine 234 | - RCT-Folly (= 2021.07.22.00) 235 | - React-callinvoker (= 0.71.16) 236 | - React-jsi (= 0.71.16) 237 | - React-jsinspector (= 0.71.16) 238 | - React-logger (= 0.71.16) 239 | - React-perflogger (= 0.71.16) 240 | - React-runtimeexecutor (= 0.71.16) 241 | - React-hermes (0.71.16): 242 | - DoubleConversion 243 | - glog 244 | - hermes-engine 245 | - RCT-Folly (= 2021.07.22.00) 246 | - RCT-Folly/Futures (= 2021.07.22.00) 247 | - React-cxxreact (= 0.71.16) 248 | - React-jsi 249 | - React-jsiexecutor (= 0.71.16) 250 | - React-jsinspector (= 0.71.16) 251 | - React-perflogger (= 0.71.16) 252 | - React-jsi (0.71.16): 253 | - boost (= 1.76.0) 254 | - DoubleConversion 255 | - glog 256 | - hermes-engine 257 | - RCT-Folly (= 2021.07.22.00) 258 | - React-jsiexecutor (0.71.16): 259 | - DoubleConversion 260 | - glog 261 | - hermes-engine 262 | - RCT-Folly (= 2021.07.22.00) 263 | - React-cxxreact (= 0.71.16) 264 | - React-jsi (= 0.71.16) 265 | - React-perflogger (= 0.71.16) 266 | - React-jsinspector (0.71.16) 267 | - React-logger (0.71.16): 268 | - glog 269 | - React-perflogger (0.71.16) 270 | - React-RCTActionSheet (0.71.16): 271 | - React-Core/RCTActionSheetHeaders (= 0.71.16) 272 | - React-RCTAnimation (0.71.16): 273 | - RCT-Folly (= 2021.07.22.00) 274 | - RCTTypeSafety (= 0.71.16) 275 | - React-Codegen (= 0.71.16) 276 | - React-Core/RCTAnimationHeaders (= 0.71.16) 277 | - React-jsi (= 0.71.16) 278 | - ReactCommon/turbomodule/core (= 0.71.16) 279 | - React-RCTAppDelegate (0.71.16): 280 | - RCT-Folly 281 | - RCTRequired 282 | - RCTTypeSafety 283 | - React-Core 284 | - ReactCommon/turbomodule/core 285 | - React-RCTBlob (0.71.16): 286 | - hermes-engine 287 | - RCT-Folly (= 2021.07.22.00) 288 | - React-Codegen (= 0.71.16) 289 | - React-Core/RCTBlobHeaders (= 0.71.16) 290 | - React-Core/RCTWebSocket (= 0.71.16) 291 | - React-jsi (= 0.71.16) 292 | - React-RCTNetwork (= 0.71.16) 293 | - ReactCommon/turbomodule/core (= 0.71.16) 294 | - React-RCTImage (0.71.16): 295 | - RCT-Folly (= 2021.07.22.00) 296 | - RCTTypeSafety (= 0.71.16) 297 | - React-Codegen (= 0.71.16) 298 | - React-Core/RCTImageHeaders (= 0.71.16) 299 | - React-jsi (= 0.71.16) 300 | - React-RCTNetwork (= 0.71.16) 301 | - ReactCommon/turbomodule/core (= 0.71.16) 302 | - React-RCTLinking (0.71.16): 303 | - React-Codegen (= 0.71.16) 304 | - React-Core/RCTLinkingHeaders (= 0.71.16) 305 | - React-jsi (= 0.71.16) 306 | - ReactCommon/turbomodule/core (= 0.71.16) 307 | - React-RCTNetwork (0.71.16): 308 | - RCT-Folly (= 2021.07.22.00) 309 | - RCTTypeSafety (= 0.71.16) 310 | - React-Codegen (= 0.71.16) 311 | - React-Core/RCTNetworkHeaders (= 0.71.16) 312 | - React-jsi (= 0.71.16) 313 | - ReactCommon/turbomodule/core (= 0.71.16) 314 | - React-RCTSettings (0.71.16): 315 | - RCT-Folly (= 2021.07.22.00) 316 | - RCTTypeSafety (= 0.71.16) 317 | - React-Codegen (= 0.71.16) 318 | - React-Core/RCTSettingsHeaders (= 0.71.16) 319 | - React-jsi (= 0.71.16) 320 | - ReactCommon/turbomodule/core (= 0.71.16) 321 | - React-RCTText (0.71.16): 322 | - React-Core/RCTTextHeaders (= 0.71.16) 323 | - React-RCTVibration (0.71.16): 324 | - RCT-Folly (= 2021.07.22.00) 325 | - React-Codegen (= 0.71.16) 326 | - React-Core/RCTVibrationHeaders (= 0.71.16) 327 | - React-jsi (= 0.71.16) 328 | - ReactCommon/turbomodule/core (= 0.71.16) 329 | - React-runtimeexecutor (0.71.16): 330 | - React-jsi (= 0.71.16) 331 | - ReactCommon/turbomodule/bridging (0.71.16): 332 | - DoubleConversion 333 | - glog 334 | - hermes-engine 335 | - RCT-Folly (= 2021.07.22.00) 336 | - React-callinvoker (= 0.71.16) 337 | - React-Core (= 0.71.16) 338 | - React-cxxreact (= 0.71.16) 339 | - React-jsi (= 0.71.16) 340 | - React-logger (= 0.71.16) 341 | - React-perflogger (= 0.71.16) 342 | - ReactCommon/turbomodule/core (0.71.16): 343 | - DoubleConversion 344 | - glog 345 | - hermes-engine 346 | - RCT-Folly (= 2021.07.22.00) 347 | - React-callinvoker (= 0.71.16) 348 | - React-Core (= 0.71.16) 349 | - React-cxxreact (= 0.71.16) 350 | - React-jsi (= 0.71.16) 351 | - React-logger (= 0.71.16) 352 | - React-perflogger (= 0.71.16) 353 | - Yoga (1.14.0) 354 | 355 | DEPENDENCIES: 356 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) 357 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 358 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 359 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 360 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 361 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) 362 | - libevent (~> 2.1.12) 363 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 364 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 365 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 366 | - React (from `../node_modules/react-native/`) 367 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 368 | - React-Codegen (from `build/generated/ios`) 369 | - React-Core (from `../node_modules/react-native/`) 370 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 371 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 372 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 373 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) 374 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 375 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 376 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 377 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`) 378 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 379 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 380 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 381 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) 382 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 383 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 384 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 385 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 386 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 387 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 388 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 389 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 390 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 391 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 392 | 393 | SPEC REPOS: 394 | trunk: 395 | - fmt 396 | - libevent 397 | 398 | EXTERNAL SOURCES: 399 | boost: 400 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" 401 | DoubleConversion: 402 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 403 | FBLazyVector: 404 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 405 | FBReactNativeSpec: 406 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 407 | glog: 408 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 409 | hermes-engine: 410 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" 411 | RCT-Folly: 412 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 413 | RCTRequired: 414 | :path: "../node_modules/react-native/Libraries/RCTRequired" 415 | RCTTypeSafety: 416 | :path: "../node_modules/react-native/Libraries/TypeSafety" 417 | React: 418 | :path: "../node_modules/react-native/" 419 | React-callinvoker: 420 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 421 | React-Codegen: 422 | :path: build/generated/ios 423 | React-Core: 424 | :path: "../node_modules/react-native/" 425 | React-CoreModules: 426 | :path: "../node_modules/react-native/React/CoreModules" 427 | React-cxxreact: 428 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 429 | React-hermes: 430 | :path: "../node_modules/react-native/ReactCommon/hermes" 431 | React-jsi: 432 | :path: "../node_modules/react-native/ReactCommon/jsi" 433 | React-jsiexecutor: 434 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 435 | React-jsinspector: 436 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 437 | React-logger: 438 | :path: "../node_modules/react-native/ReactCommon/logger" 439 | React-perflogger: 440 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 441 | React-RCTActionSheet: 442 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 443 | React-RCTAnimation: 444 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 445 | React-RCTAppDelegate: 446 | :path: "../node_modules/react-native/Libraries/AppDelegate" 447 | React-RCTBlob: 448 | :path: "../node_modules/react-native/Libraries/Blob" 449 | React-RCTImage: 450 | :path: "../node_modules/react-native/Libraries/Image" 451 | React-RCTLinking: 452 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 453 | React-RCTNetwork: 454 | :path: "../node_modules/react-native/Libraries/Network" 455 | React-RCTSettings: 456 | :path: "../node_modules/react-native/Libraries/Settings" 457 | React-RCTText: 458 | :path: "../node_modules/react-native/Libraries/Text" 459 | React-RCTVibration: 460 | :path: "../node_modules/react-native/Libraries/Vibration" 461 | React-runtimeexecutor: 462 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 463 | ReactCommon: 464 | :path: "../node_modules/react-native/ReactCommon" 465 | Yoga: 466 | :path: "../node_modules/react-native/ReactCommon/yoga" 467 | 468 | SPEC CHECKSUMS: 469 | boost: 7dcd2de282d72e344012f7d6564d024930a6a440 470 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 471 | FBLazyVector: 9840513ec2766e31fb9e34c2dabb2c4671400fcd 472 | FBReactNativeSpec: 76141e46f67b395d7d4e94925dfeba0dbd680ba1 473 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 474 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b 475 | hermes-engine: 2382506846564caf4152c45390dc24f08fce7057 476 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 477 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 478 | RCTRequired: 44a3cda52ccac0be738fbf43fef90f3546a48c52 479 | RCTTypeSafety: da7fbf9826fc898ca8b10dc840f2685562039a64 480 | React: defd955b6d6ffb9791bb66dee08d90b87a8e2c0c 481 | React-callinvoker: 39ea57213d56ec9c527d51bd0dfb45cbb12ef447 482 | React-Codegen: 71cbc1bc384f9d19a41e4d00dfd0e7762ec5ef4a 483 | React-Core: 898cb2f7785640e21d381b23fc64a2904628b368 484 | React-CoreModules: 7f71e7054395d61585048061a66d67b58d3d27b7 485 | React-cxxreact: 57fca29dd6995de0ee360980709c4be82d40cda1 486 | React-hermes: 33229fc1867df496665b36b222a82a0f850bcae1 487 | React-jsi: 3a55652789df6ddd777cce9601bf000e18d6b9df 488 | React-jsiexecutor: 9b2a87f674f30da4706af52520e4860974cec149 489 | React-jsinspector: b3b341764ccda14f3659c00a9bc5b098b334db2b 490 | React-logger: dc96fadd2f7f6bc38efc3cfb5fef876d4e6290a2 491 | React-perflogger: c944b06edad34f5ecded0f29a6e66290a005d365 492 | React-RCTActionSheet: fa467f37777dacba2c72da4be7ae065da4482d7d 493 | React-RCTAnimation: 0591ee5f9e3d8c864a0937edea2165fe968e7099 494 | React-RCTAppDelegate: 8b7f60103a83ad1670bda690571e73efddba29a0 495 | React-RCTBlob: 082e8612f48b0ec12ca6dc949fb7c310593eff83 496 | React-RCTImage: 6300660ef04d0e8a710ad9ea5d2fb4d9521c200d 497 | React-RCTLinking: 7703ee1b10d3568c143a489ae74adc419c3f3ef3 498 | React-RCTNetwork: 5748c647e09c66b918f81ae15ed7474327f653be 499 | React-RCTSettings: 8c8a84ee363db9cbc287c8b8f2fb782acf7ba414 500 | React-RCTText: d5e53c0741e3e2df91317781e993b5e42bd70448 501 | React-RCTVibration: 052dd488ba95f461a37c992b9e01bd4bcc59a7b6 502 | React-runtimeexecutor: b5abe02558421897cd9f73d4f4b6adb4bc297083 503 | ReactCommon: a1a263d94f02a0dc8442f341d5a11b3d7a9cd44d 504 | Yoga: e29645ec5a66fb00934fad85338742d1c247d4cb 505 | 506 | PODFILE CHECKSUM: 478d70d8227ed30518a515aaf9c379b3990251b2 507 | 508 | COCOAPODS: 1.14.3 509 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | const path = require('path'); 8 | const rootPackage = require('../package.json'); 9 | const blacklist = require('metro-config/src/defaults/exclusionList'); 10 | const rootModules = Object.keys({ 11 | ...rootPackage.peerDependencies, 12 | }); 13 | const moduleRoot = path.resolve(__dirname, '..'); 14 | /** 15 | * Only load one version for peerDependencies and alias them to the versions in example's node_modules" 16 | */ 17 | module.exports = { 18 | watchFolders: [moduleRoot], 19 | resolver: { 20 | blacklistRE: blacklist([ 21 | ...rootModules.map( 22 | m => 23 | new RegExp( 24 | `^${escape(path.join(moduleRoot, 'node_modules', m))}\\/.*$` 25 | ) 26 | ), 27 | /^((?!example).)+[\/\\]node_modules[/\\]react[/\\].*/, 28 | /^((?!example).)+[\/\\]node_modules[/\\]react-native[/\\].*/, 29 | ]), 30 | extraNodeModules: { 31 | ...rootModules.reduce((acc, name) => { 32 | acc[name] = path.join(__dirname, 'node_modules', name); 33 | return acc; 34 | }, {}), 35 | }, 36 | }, 37 | transformer: { 38 | getTransformOptions: async () => ({ 39 | transform: { 40 | experimentalImportSupport: false, 41 | inlineRequires: true, 42 | }, 43 | }), 44 | }, 45 | }; 46 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-infinite-wheel-picker-example", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "lint": "eslint .", 9 | "start": "react-native start", 10 | "test": "jest" 11 | }, 12 | "dependencies": { 13 | "moment": "^2.30.1", 14 | "react": "18.2.0", 15 | "react-native": "0.71.16" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.20.0", 19 | "@babel/preset-env": "^7.20.0", 20 | "@babel/runtime": "^7.20.0", 21 | "@react-native-community/eslint-config": "^3.2.0", 22 | "@tsconfig/react-native": "^2.0.2", 23 | "@types/jest": "^29.2.1", 24 | "@types/react": "^18.0.24", 25 | "@types/react-test-renderer": "^18.0.0", 26 | "babel-jest": "^29.2.1", 27 | "eslint": "^8.19.0", 28 | "jest": "^29.2.1", 29 | "metro-react-native-babel-preset": "0.73.10", 30 | "prettier": "^2.4.1", 31 | "react-test-renderer": "18.2.0", 32 | "typescript": "4.8.4" 33 | }, 34 | "jest": { 35 | "preset": "react-native" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'; 3 | import { Colors } from '../../src/theme'; 4 | import { GlobalTimePicker, SetBirthDate, TimePicker } from './components'; 5 | import { globalMetrics } from './theme'; 6 | 7 | const App: React.FC = () => { 8 | return ( 9 | 10 | 11 | 12 | infinite-wheel-picker 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | ); 24 | }; 25 | 26 | const styles = StyleSheet.create({ 27 | container: { 28 | flex: 1, 29 | backgroundColor: '#EE5366', 30 | }, 31 | scrollView: { 32 | padding: 5, 33 | }, 34 | contentContainerStyle: { 35 | paddingVertical: 5, 36 | paddingHorizontal: 20, 37 | paddingBottom: 50, 38 | }, 39 | headerContainer: { 40 | backgroundColor: Colors.white, 41 | padding: 10, 42 | alignItems: 'center', 43 | borderBottomLeftRadius: 12, 44 | borderBottomRightRadius: 12, 45 | paddingTop: globalMetrics.isAndroid ? 0 : 56, 46 | }, 47 | headerText: { fontSize: 16, fontWeight: '700', color: Colors.black }, 48 | }); 49 | 50 | export default App; 51 | -------------------------------------------------------------------------------- /example/src/assets/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker/27c7d44ea4ed94b20a25a482b5f6fb456592c701/example/src/assets/index.ts -------------------------------------------------------------------------------- /example/src/components/GlobalTimePicker/GlobalTimePicker.tsx: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | import React from 'react'; 3 | import { Text, View } from 'react-native'; 4 | import { WheelPicker } from 'react-native-infinite-wheel-picker'; 5 | import { StaticData } from '../../constants'; 6 | import styles from './GlobalTimePickerStyles'; 7 | 8 | const GlobalTimePicker = () => { 9 | return ( 10 | 11 | Time (24 Hours) 12 | 13 | { 19 | console.log('Hours onChange: ', index, value); 20 | }} 21 | elementHeight={60} 22 | containerStyle={styles.wheelPickerContainer} 23 | selectedLayoutStyle={styles.wheelPickerSelectedLayoutStyle} 24 | elementTextStyle={styles.wheelPickerElementTextStyle} 25 | /> 26 | 27 | 28 | 29 | 30 | { 40 | console.log('Minutes onChange: ', index, value); 41 | }} 42 | elementHeight={60} 43 | containerStyle={styles.wheelPickerContainer} 44 | selectedLayoutStyle={styles.wheelPickerSelectedLayoutStyle} 45 | elementTextStyle={styles.wheelPickerElementTextStyle} 46 | /> 47 | 48 | 49 | ); 50 | }; 51 | 52 | export default GlobalTimePicker; 53 | -------------------------------------------------------------------------------- /example/src/components/GlobalTimePicker/GlobalTimePickerStyles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | container: { 5 | alignItems: 'center', 6 | backgroundColor: '#FFFFFF', 7 | padding: 8, 8 | borderRadius: 8, 9 | marginTop: 20, 10 | elevation: 10, 11 | shadowColor: '#000000', 12 | shadowOffset: { 13 | width: 0, 14 | height: 2, 15 | }, 16 | shadowOpacity: 0.5, 17 | shadowRadius: 10, 18 | }, 19 | headingText: { fontSize: 16, fontWeight: '700', color: '#000000' }, 20 | wheelContainer: { 21 | flexDirection: 'row', 22 | justifyContent: 'center', 23 | marginTop: 10, 24 | }, 25 | wheelPickerContainer: { flex: 0.3 }, 26 | wheelPickerSelectedLayoutStyle: { 27 | borderWidth: 1, 28 | borderColor: '#D3D3D3', 29 | backgroundColor: '#FAFAFA', 30 | borderRadius: 4, 31 | }, 32 | wheelPickerElementTextStyle: { fontSize: 20 }, 33 | separatorContainerStyle: { justifyContent: 'center', marginHorizontal: 20 }, 34 | separatorViewStyle: { 35 | height: 10, 36 | width: 10, 37 | backgroundColor: '#000000', 38 | borderRadius: 99, 39 | }, 40 | separatorBottomViewStyle: { 41 | height: 10, 42 | width: 10, 43 | backgroundColor: '#000000', 44 | borderRadius: 99, 45 | marginTop: 10, 46 | }, 47 | }); 48 | -------------------------------------------------------------------------------- /example/src/components/SetBirthDate/SetBirthDate.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, View } from 'react-native'; 3 | import { WheelPicker } from 'react-native-infinite-wheel-picker'; 4 | import { StaticData } from '../../constants'; 5 | import styles from './SetBirthDateStyles'; 6 | 7 | const SetBirthDate: React.FC = () => { 8 | const [month, setMonth] = React.useState({ 9 | index: 0, 10 | value: StaticData.monthsArray[0], 11 | }); 12 | const [date, setDate] = React.useState({ 13 | index: 0, 14 | value: StaticData.datesArray[0], 15 | }); 16 | const [year, setYear] = React.useState({ 17 | index: 0, 18 | value: StaticData.yearsArray[0], 19 | }); 20 | 21 | return ( 22 | 23 | Birthday 24 | 25 | { 31 | console.log('Month onChange: ', index, value); 32 | setMonth({ index, value: value }); 33 | }} 34 | elementHeight={30} 35 | containerStyle={styles.containerStyle} 36 | selectedLayoutStyle={styles.monthSelectedLayoutStyle} 37 | elementTextStyle={styles.elementTextStyle} 38 | /> 39 | { 45 | console.log('Date onChange: ', index, value); 46 | setDate({ index, value: parseInt(value) }); 47 | }} 48 | selectedLayoutStyle={styles.minutesSelectedLayoutStyle} 49 | elementHeight={30} 50 | elementTextStyle={styles.elementTextStyle} 51 | /> 52 | { 58 | console.log('onChange: ', index, value); 59 | setYear({ index, value: parseInt(value) }); 60 | }} 61 | containerStyle={styles.containerStyle} 62 | selectedLayoutStyle={styles.yearSelectedLayoutPicker} 63 | elementHeight={30} 64 | elementTextStyle={styles.elementTextStyle} 65 | /> 66 | 67 | {`Date: ${date.value}, ${month.value} ${year.value}`} 71 | 72 | ); 73 | }; 74 | 75 | export default SetBirthDate; 76 | -------------------------------------------------------------------------------- /example/src/components/SetBirthDate/SetBirthDateStyles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | container: { 5 | alignItems: 'center', 6 | backgroundColor: '#FFFFFF', 7 | padding: 8, 8 | borderRadius: 8, 9 | elevation: 10, 10 | shadowColor: 'black', 11 | shadowOffset: { 12 | width: 0, 13 | height: 2, 14 | }, 15 | shadowOpacity: 0.5, 16 | shadowRadius: 10, 17 | }, 18 | headerText: { 19 | fontSize: 16, 20 | fontWeight: '700', 21 | color: 'black', 22 | }, 23 | wheelPickerContainer: { 24 | flexDirection: 'row', 25 | justifyContent: 'center', 26 | marginHorizontal: 15, 27 | marginTop: 10, 28 | }, 29 | monthSelectedLayoutStyle: { 30 | backgroundColor: '#D3D3D366', 31 | borderRadius: 0, 32 | borderTopLeftRadius: 5, 33 | borderBottomLeftRadius: 5, 34 | }, 35 | elementTextStyle: { fontSize: 14 }, 36 | containerStyle: { flex: 1 }, 37 | minutesSelectedLayoutStyle: { 38 | backgroundColor: '#D3D3D366', 39 | borderRadius: 0, 40 | }, 41 | yearSelectedLayoutPicker: { 42 | backgroundColor: '#D3D3D366', 43 | borderRadius: 0, 44 | borderBottomRightRadius: 5, 45 | borderTopRightRadius: 5, 46 | }, 47 | selectedDateText: { 48 | fontSize: 16, 49 | fontWeight: '700', 50 | color: 'black', 51 | marginVertical: 5, 52 | } 53 | }); 54 | -------------------------------------------------------------------------------- /example/src/components/TimePicker/TimePicker.tsx: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | import React from 'react'; 3 | import { Text, View } from 'react-native'; 4 | import { WheelPicker } from 'react-native-infinite-wheel-picker'; 5 | import { StaticData } from '../../constants'; 6 | import styles from './TimePickerStyles'; 7 | 8 | const TimePicker: React.FC = () => { 9 | const [hour, setHour] = React.useState({ 10 | index: StaticData.hourArray.indexOf(moment().format('hh')), 11 | value: 12 | StaticData.hourArray[ 13 | StaticData.hourArray.indexOf(moment().format('hh')) 14 | ] ?? '01', 15 | }); 16 | const [minute, setMinute] = React.useState({ 17 | index: StaticData.minutesArray.indexOf(moment().format('mm')), 18 | value: 19 | StaticData.minutesArray[ 20 | StaticData.minutesArray.indexOf(moment().format('mm')) 21 | ] ?? '00', 22 | }); 23 | const [meridiem, setMeridiem] = React.useState({ 24 | index: StaticData.meridiemArray.indexOf(moment().format('A')), 25 | value: 26 | StaticData.meridiemArray[ 27 | StaticData.meridiemArray.indexOf(moment().format('A')) 28 | ] ?? 'AM', 29 | }); 30 | 31 | return ( 32 | 33 | Time (AM/PM) 34 | 35 | { 41 | console.log('Hours onChange: ', index, value); 42 | setHour({ index, value: value }); 43 | }} 44 | elementHeight={30} 45 | containerStyle={styles.wheelContainerStyle} 46 | selectedLayoutStyle={styles.wheelHoursSelectedLayoutStyle} 47 | elementTextStyle={styles.wheelPickerText} 48 | /> 49 | { 55 | console.log('Minutes onChange: ', index, value); 56 | setMinute({ index, value: value }); 57 | }} 58 | selectedLayoutStyle={styles.wheelPickerMinutesSelectedLayoutStyle} 59 | containerStyle={styles.wheelPickerMinutesContainerStyle} 60 | elementHeight={30} 61 | elementTextStyle={styles.wheelPickerText} 62 | /> 63 | { 69 | console.log('Meridiem onChange: ', index, value); 70 | setMeridiem({ index, value: value }); 71 | }} 72 | containerStyle={styles.wheelContainerStyle} 73 | selectedLayoutStyle={styles.wheelPickerMeridiemSelectedLayoutStyle} 74 | elementHeight={30} 75 | infiniteScroll={false} 76 | elementTextStyle={styles.wheelPickerText} 77 | /> 78 | 79 | 80 | ); 81 | }; 82 | 83 | export default TimePicker; 84 | -------------------------------------------------------------------------------- /example/src/components/TimePicker/TimePickerStyles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | container: { 5 | alignItems: 'center', 6 | backgroundColor: '#FFF', 7 | padding: 8, 8 | borderRadius: 8, 9 | marginTop: 20, 10 | elevation: 10, 11 | shadowColor: 'black', 12 | shadowOffset: { 13 | width: 0, 14 | height: 2, 15 | }, 16 | shadowOpacity: 0.5, 17 | shadowRadius: 10, 18 | }, 19 | headerText: { 20 | fontSize: 16, 21 | fontWeight: '700', 22 | color: 'black', 23 | }, 24 | wheelMainContainer: { flexDirection: 'row', marginTop: 10 }, 25 | wheelContainerStyle: { flex: 1 }, 26 | wheelHoursSelectedLayoutStyle: { 27 | borderColor: '#D3D3D3', 28 | borderLeftWidth: 1, 29 | borderTopWidth: 1, 30 | borderBottomWidth: 1, 31 | backgroundColor: '#FAFAFA', 32 | borderRadius: 0, 33 | borderTopLeftRadius: 5, 34 | borderBottomLeftRadius: 5, 35 | elevation: 1, 36 | }, 37 | wheelPickerText: { fontSize: 14 }, 38 | wheelPickerMinutesContainerStyle: { flex: 0.5 }, 39 | wheelPickerMinutesSelectedLayoutStyle: { 40 | backgroundColor: '#FAFAFA', 41 | borderRadius: 0, 42 | borderColor: '#D3D3D3', 43 | borderBottomWidth: 1, 44 | borderTopWidth: 1, 45 | elevation: 1, 46 | }, 47 | wheelPickerMeridiemSelectedLayoutStyle: { 48 | borderColor: '#D3D3D3', 49 | borderRightWidth: 1, 50 | borderTopWidth: 1, 51 | borderBottomWidth: 1, 52 | backgroundColor: '#FAFAFA', 53 | borderRadius: 0, 54 | borderBottomRightRadius: 5, 55 | borderTopRightRadius: 5, 56 | elevation: 1, 57 | } 58 | }); 59 | -------------------------------------------------------------------------------- /example/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as GlobalTimePicker } from './GlobalTimePicker/GlobalTimePicker'; 2 | export { default as SetBirthDate } from './SetBirthDate/SetBirthDate'; 3 | export { default as TimePicker } from './TimePicker/TimePicker'; 4 | 5 | -------------------------------------------------------------------------------- /example/src/constants/StaticData.ts: -------------------------------------------------------------------------------- 1 | const minutesArray = [ 2 | '00', 3 | '01', 4 | '02', 5 | '03', 6 | '04', 7 | '05', 8 | '06', 9 | '07', 10 | '08', 11 | '09', 12 | '10', 13 | '11', 14 | '12', 15 | '13', 16 | '14', 17 | '15', 18 | '16', 19 | '17', 20 | '18', 21 | '19', 22 | '20', 23 | '21', 24 | '22', 25 | '23', 26 | '24', 27 | '25', 28 | '26', 29 | '27', 30 | '28', 31 | '29', 32 | '30', 33 | '31', 34 | '32', 35 | '33', 36 | '34', 37 | '35', 38 | '36', 39 | '37', 40 | '38', 41 | '39', 42 | '40', 43 | '41', 44 | '42', 45 | '43', 46 | '44', 47 | '45', 48 | '46', 49 | '47', 50 | '48', 51 | '49', 52 | '50', 53 | '51', 54 | '52', 55 | '53', 56 | '54', 57 | '55', 58 | '56', 59 | '57', 60 | '58', 61 | '59', 62 | ]; 63 | 64 | const hourArray = [ 65 | '01', 66 | '02', 67 | '03', 68 | '04', 69 | '05', 70 | '06', 71 | '07', 72 | '08', 73 | '09', 74 | '10', 75 | '11', 76 | '12', 77 | ]; 78 | 79 | const hour24Array = [ 80 | '00', 81 | '01', 82 | '02', 83 | '03', 84 | '04', 85 | '05', 86 | '06', 87 | '07', 88 | '08', 89 | '09', 90 | '10', 91 | '11', 92 | '12', 93 | '13', 94 | '14', 95 | '15', 96 | '16', 97 | '17', 98 | '18', 99 | '19', 100 | '20', 101 | '21', 102 | '22', 103 | '23', 104 | ]; 105 | 106 | const monthsArray = [ 107 | 'January', 108 | 'February', 109 | 'March', 110 | 'April', 111 | 'May', 112 | 'June', 113 | 'July', 114 | 'August', 115 | 'September', 116 | 'October', 117 | 'November', 118 | 'December', 119 | ]; 120 | 121 | const datesArray = [ 122 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 123 | 23, 24, 25, 26, 27, 28, 29, 30, 31, 124 | ]; 125 | 126 | const yearsArray = [ 127 | 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 128 | 1983, 1984, 1985, 129 | ]; 130 | 131 | const meridiemArray = ['AM', 'PM']; 132 | 133 | export default { 134 | minutesArray, 135 | hourArray, 136 | monthsArray, 137 | datesArray, 138 | yearsArray, 139 | meridiemArray, 140 | hour24Array 141 | }; 142 | -------------------------------------------------------------------------------- /example/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export { default as StaticData } from './StaticData'; 2 | -------------------------------------------------------------------------------- /example/src/theme/Metrics.ts: -------------------------------------------------------------------------------- 1 | import { Dimensions, Platform, type ScaledSize } from 'react-native'; 2 | 3 | /** 4 | * Get the width and height of the device screen. 5 | * @returns {ScaledSize} - the width and height of the device screen. 6 | */ 7 | let { width, height }: ScaledSize = Dimensions.get('window'); 8 | 9 | if (width > height) { 10 | [width, height] = [height, width]; 11 | } 12 | 13 | /** 14 | * A type that contains the global metrics for the current device. 15 | * @typedef {Object} GlobalMetricsType - A type that contains the global metrics for the current device. 16 | * @property {boolean} isAndroid - Whether the current device is an Android device. 17 | */ 18 | interface GlobalMetricsType { 19 | isAndroid: boolean; 20 | isIos: boolean; 21 | isPad: boolean; 22 | isTV: boolean; 23 | isWeb: boolean; 24 | } 25 | 26 | /** 27 | * A type that contains the global metrics for the app. 28 | * @type {GlobalMetricsType} 29 | */ 30 | const globalMetrics: GlobalMetricsType = { 31 | isAndroid: Platform.OS === 'android', 32 | isIos: Platform.OS === 'ios', 33 | isPad: Platform.OS === 'ios' && Platform.isPad, 34 | isTV: Platform.isTV, 35 | isWeb: Platform.OS === 'web', 36 | }; 37 | 38 | export { globalMetrics, width, height }; 39 | -------------------------------------------------------------------------------- /example/src/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Metrics'; 2 | -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "esModuleInterop": true, 5 | "jsx": "react-native", 6 | "lib": ["ESNext"], 7 | "module": "CommonJS", 8 | "noEmit": true, 9 | "paths": { 10 | "react-native-infinite-wheel-picker": ["../src"] 11 | }, 12 | "declaration": true, 13 | "allowUnreachableCode": false, 14 | "allowUnusedLabels": false, 15 | "forceConsistentCasingInFileNames": true, 16 | "moduleResolution": "Node", 17 | "noFallthroughCasesInSwitch": true, 18 | "noImplicitReturns": true, 19 | "noImplicitUseStrict": false, 20 | "noStrictGenericChecks": false, 21 | "noUnusedLocals": true, 22 | "noUnusedParameters": true, 23 | "resolveJsonModule": true, 24 | "noEmitOnError": true, 25 | "skipLibCheck": true, 26 | "sourceMap": true, 27 | "strict": true, 28 | "target": "ESNext", 29 | "noUncheckedIndexedAccess": true, 30 | "verbatimModuleSyntax": false 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-infinite-wheel-picker", 3 | "version": "1.0.0", 4 | "description": "React Native component to provide infinite wheel picker selection", 5 | "main": "lib/index", 6 | "types": "lib/index.d.ts", 7 | "contributors": [], 8 | "author": "Simform Solutions", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker" 12 | }, 13 | "homepage": "https://github.com/SimformSolutionsPvtLtd/react-native-infinite-wheel-picker#readme", 14 | "keywords": [ 15 | "react", 16 | "react-native", 17 | "typescript", 18 | "rn", 19 | "react-native-infinite-picker", 20 | "infinite-picker", 21 | "infinite-wheel-picker", 22 | "wheel-picker", 23 | "infinite-wheel", 24 | "infinite", 25 | "wheel", 26 | "picker", 27 | "react-native-picker", 28 | "react-native-infinite-wheel-picker", 29 | "scroll-picker", 30 | "scroll", 31 | "infinite-scroll", 32 | "infinite-scroll-picker", 33 | "infinite-scroll-wheel-picker", 34 | "component", 35 | "react-native-component", 36 | "android", 37 | "ios", 38 | "react-component" 39 | ], 40 | "license": "MIT", 41 | "files": [ 42 | "/lib" 43 | ], 44 | "scripts": { 45 | "prepare": "husky install && yarn build", 46 | "clean": "rm -rf node_modules", 47 | "build": "rm -rf lib && tsc -p .", 48 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx", 49 | "lint:fix": "eslint 'src/**/*.{js,jsx,ts,tsx}' -c .eslintrc --fix ", 50 | "build:local": "yarn build && yarn pack", 51 | "test": "jest", 52 | "example": "yarn --cwd example" 53 | }, 54 | "peerDependencies": { 55 | "react": "*", 56 | "react-native": "*" 57 | }, 58 | "devDependencies": { 59 | "@babel/core": "^7.12.9", 60 | "@babel/runtime": "^7.12.5", 61 | "@commitlint/cli": "^16.1.0", 62 | "@commitlint/config-conventional": "^16.0.0", 63 | "@react-native-community/eslint-config": "^3.0.1", 64 | "@testing-library/react-native": "^9.0.0", 65 | "@tsconfig/react-native": "^2.0.2", 66 | "@types/jest": "^27.4.0", 67 | "@types/react-native": "^0.69.5", 68 | "@types/react-test-renderer": "^18.0.0", 69 | "@typescript-eslint/eslint-plugin": "^5.29.0", 70 | "@typescript-eslint/parser": "^5.29.0", 71 | "babel-jest": "^27.4.6", 72 | "eslint": "^7.32.0", 73 | "eslint-plugin-simple-import-sort": "^7.0.0", 74 | "husky": "^8.0.1", 75 | "jest": "^27.4.7", 76 | "lint-staged": "^11.1.2", 77 | "metro-react-native-babel-preset": "^0.70.3", 78 | "prettier": "^2.7.1", 79 | "react": "18.2.0", 80 | "react-native": "0.71.16", 81 | "react-test-renderer": "18.0.0", 82 | "typescript": "^5.1.6" 83 | }, 84 | "husky": { 85 | "hooks": { 86 | "pre-commit": "lint-staged", 87 | "pre-push": "yarn build" 88 | } 89 | }, 90 | "lint-staged": { 91 | "src/**/*.{js,ts,tsx}": [ 92 | "eslint" 93 | ] 94 | }, 95 | "resolutions": { 96 | "@types/react": "*" 97 | }, 98 | "jest": { 99 | "preset": "react-native", 100 | "moduleFileExtensions": [ 101 | "ts", 102 | "tsx", 103 | "js", 104 | "jsx", 105 | "json", 106 | "node" 107 | ], 108 | "setupFilesAfterEnv": [], 109 | "modulePathIgnorePatterns": [] 110 | }, 111 | "eslintIgnore": [ 112 | "node_modules/", 113 | "lib/" 114 | ], 115 | "commitlint": { 116 | "extends": [ 117 | "@commitlint/config-conventional" 118 | ] 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /src/components/WheelPicker/WheelPicker.tsx: -------------------------------------------------------------------------------- 1 | import React, { forwardRef, useCallback, useImperativeHandle } from 'react'; 2 | import { Animated, View } from 'react-native'; 3 | import Constants from '../../constants'; 4 | import { useWheelPicker } from '../../hooks'; 5 | import WheelPickerElement from './WheelPickerElement'; 6 | import styles from './WheelPickerStyles'; 7 | import type { WheelPickerProps, WheelPickerRef } from './WheelPickerTypes'; 8 | 9 | export const wheelPickerRef = React.createRef(); 10 | 11 | /** 12 | * The wheel picker component 13 | * @param selectedIndex - The index of the selected value 14 | * @param data - The data to be displayed in the wheel picker 15 | * @param onChangeValue - Function to handle the value change 16 | * @param elementHeight - The height of each element in the wheel picker 17 | * @param restElements - The number of elements to be displayed above and below the selected element 18 | * @param decelerationRate - The deceleration rate of the scroll view 19 | * @param loopCount - The number of times the data should be looped 20 | * @param selectedLayoutStyle - The style of the selected layout 21 | * @param containerStyle - The style of the container 22 | * @param elementContainerStyle - The style of the element container 23 | * @param elementTextStyle - The style of the element text 24 | * @param containerProps - The props for the container 25 | * @param flatListProps - The props for the flat list 26 | */ 27 | const WheelPicker = forwardRef( 28 | ( 29 | { 30 | selectedIndex, 31 | data, 32 | onChangeValue, 33 | elementHeight = Constants.elementHeight, 34 | restElements = Constants.restElements, 35 | decelerationRate = Constants.decelerationRate, 36 | loopCount = Constants.loopCount, 37 | selectedLayoutStyle = {}, 38 | containerStyle = {}, 39 | elementContainerStyle = {}, 40 | elementTextStyle = {}, 41 | containerProps = {}, 42 | flatListProps = {}, 43 | infiniteScroll = true, 44 | initialSelectedIndex = 0, 45 | }, 46 | ref 47 | ) => { 48 | const { 49 | currentScrollIndex, 50 | containerHeight, 51 | flatListRef, 52 | arrayElements, 53 | scrollY, 54 | onScrollListener, 55 | handleMomentumScrollEnd, 56 | offsets, 57 | initialScrollIndex, 58 | } = useWheelPicker({ 59 | loopCount, 60 | onChangeValue, 61 | selectedIndex, 62 | data, 63 | restElements, 64 | decelerationRate, 65 | elementHeight, 66 | infiniteScroll, 67 | initialSelectedIndex, 68 | }); 69 | 70 | useImperativeHandle(ref ?? wheelPickerRef, () => ({ 71 | scrollToIndex: (index: number) => { 72 | flatListRef.current?.scrollToIndex({ 73 | index, 74 | animated: true, 75 | }); 76 | const originalValue = data[index]; 77 | onChangeValue(index ?? 0, originalValue?.toString() ?? ''); 78 | }, 79 | })); 80 | 81 | const renderItem = useCallback( 82 | ({ item, index }: { item: string | null; index: number }) => ( 83 | 93 | ), 94 | [ 95 | currentScrollIndex, 96 | restElements, 97 | elementContainerStyle, 98 | elementTextStyle, 99 | elementHeight, 100 | ] 101 | ); 102 | 103 | return ( 104 | 107 | 117 | 118 | {...flatListProps} 119 | nestedScrollEnabled 120 | ref={flatListRef} 121 | style={styles.flatListStyle} 122 | maxToRenderPerBatch={arrayElements?.length * 2} 123 | updateCellsBatchingPeriod={200} 124 | showsVerticalScrollIndicator={false} 125 | data={arrayElements as Array} 126 | keyExtractor={(_item, index) => index.toString()} 127 | renderItem={renderItem} 128 | snapToOffsets={offsets} 129 | decelerationRate={decelerationRate} 130 | initialScrollIndex={initialScrollIndex} 131 | getItemLayout={(_data, index) => ({ 132 | length: elementHeight, 133 | offset: elementHeight * index, 134 | index, 135 | })} 136 | onScroll={Animated.event( 137 | [{ nativeEvent: { contentOffset: { y: scrollY } } }], 138 | { 139 | useNativeDriver: true, 140 | listener: onScrollListener, 141 | } 142 | )} 143 | onMomentumScrollEnd={handleMomentumScrollEnd} 144 | /> 145 | 146 | ); 147 | } 148 | ); 149 | 150 | export default WheelPicker; 151 | -------------------------------------------------------------------------------- /src/components/WheelPicker/WheelPickerElement.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Animated, Text } from 'react-native'; 3 | import Constants from '../../constants'; 4 | import { useWheelPickerElement } from '../../hooks'; 5 | import styles from './WheelPickerStyles'; 6 | import type { WheelPickerElementProps } from './WheelPickerTypes'; 7 | 8 | /** 9 | * The wheel picker element component 10 | * @property {StyleProp} elementTextStyle - The style of the element text 11 | * @property {StyleProp} elementContainerStyle - The style of the element container 12 | * @property {number} elementHeight - The height of each element in the wheel picker 13 | * @property {string | null} item - The item to be displayed in the wheel picker element 14 | * @property {number} index - The index of the current element 15 | * @property {number} restElements - The number of elements to be displayed above and below the selected element 16 | * @property {Animated.AnimatedAddition} currentScrollIndex - The current scroll index 17 | * @property {number} defaultActiveScale - The default scale of the active element 18 | * @property {number} defaultActiveOpacity - The default opacity of the active element 19 | */ 20 | const WheelPickerElement = ({ 21 | elementTextStyle, 22 | elementContainerStyle, 23 | elementHeight, 24 | item, 25 | index, 26 | restElements, 27 | currentScrollIndex, 28 | defaultActiveScale = Constants.defaultActiveScale, 29 | defaultActiveOpacity = Constants.defaultActiveOpacity, 30 | }: WheelPickerElementProps) => { 31 | const { translateY, opacity, scale, rotateX } = useWheelPickerElement({ 32 | index, 33 | restElements, 34 | currentScrollIndex, 35 | defaultActiveOpacity, 36 | defaultActiveScale, 37 | elementHeight, 38 | }); 39 | 40 | return ( 41 | 56 | 57 | {item} 58 | 59 | 60 | ); 61 | }; 62 | 63 | /** 64 | * After the first render, we enforce that this component won't re-render. 65 | */ 66 | export default React.memo(WheelPickerElement, () => true); 67 | -------------------------------------------------------------------------------- /src/components/WheelPicker/WheelPickerStyles.ts: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | import { Colors } from '../../theme'; 3 | 4 | const styles = StyleSheet.create({ 5 | selectedLayoutViewStyle: { 6 | position: 'absolute', 7 | width: '100%', 8 | backgroundColor: Colors?.lightGray, 9 | borderRadius: 4, 10 | top: '50%', 11 | }, 12 | flatListStyle: { 13 | overflow: 'hidden', 14 | flex: 1, 15 | }, 16 | wheelPickerElementContainerStyle: { 17 | alignItems: 'center', 18 | justifyContent: 'center', 19 | paddingHorizontal: 16, 20 | zIndex: 100, 21 | }, 22 | wheelPickerElementTextStyle: { fontWeight: '700', color: Colors.black }, 23 | }); 24 | 25 | export default styles; 26 | -------------------------------------------------------------------------------- /src/components/WheelPicker/WheelPickerTypes.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | Animated, 3 | FlatListProps, 4 | StyleProp, 5 | TextStyle, 6 | ViewProps, 7 | ViewStyle, 8 | } from 'react-native'; 9 | 10 | /** 11 | * this type is written for range between 1-6 for size 12 | */ 13 | type Enumerate< 14 | N extends number, 15 | Acc extends number[] = [] 16 | > = Acc['length'] extends N 17 | ? Acc[number] 18 | : Enumerate; 19 | 20 | export type Range = Exclude< 21 | Enumerate, 22 | Enumerate 23 | >; 24 | 25 | /** 26 | * @property {number} selectedIndex - The index of the selected value 27 | * @property {Array} data - The data to be displayed in the wheel picker 28 | * @property {number} elementHeight - The height of each element in the wheel picker 29 | * @property {number} restElements - The number of elements to be displayed above and below the selected element 30 | * @property {string | number} decelerationRate - The deceleration rate of the scroll view 31 | * @property {number} loopCount - The number of times the data should be looped 32 | * @property {StyleProp} selectedLayoutStyle - The style of the selected element 33 | * @property {StyleProp} containerStyle - The style of the container 34 | * @property {ViewProps} containerProps - The props of the container 35 | * @property {FlatListProps} flatListProps - The props of the flat list 36 | * @property {StyleProp} elementTextStyle - The style of the element text 37 | * @property {StyleProp} elementContainerStyle - The style of the element container 38 | * @property {Animated.AnimatedAddition} currentScrollIndex - The current scroll index 39 | * @property {number} initialSelectedIndex - The initial selected index 40 | */ 41 | export interface WheelPickerProps 42 | extends Pick< 43 | Partial, 44 | | 'elementHeight' 45 | | 'elementContainerStyle' 46 | | 'restElements' 47 | | 'elementTextStyle' 48 | > { 49 | selectedIndex: number; 50 | data: Array; 51 | onChangeValue: (index: number, value: string) => void; 52 | selectedLayoutStyle?: StyleProp; 53 | containerStyle?: StyleProp; 54 | containerProps?: Omit; 55 | decelerationRate?: 'normal' | 'fast' | number; 56 | flatListProps?: Omit, 'data' | 'renderItem'>; 57 | loopCount?: number; 58 | infiniteScroll?: boolean; 59 | initialSelectedIndex?: number; 60 | } 61 | 62 | /** 63 | * @property {string | null} item - The item to be displayed in the wheel picker element 64 | * @property {number} elementHeight - The height of the element 65 | * @property {number} index - The index of the element 66 | * @property {Animated.AnimatedAddition} currentScrollIndex - The current scroll index 67 | * @property {Range<1, 6>} restElements - The number of elements to be displayed above and below the selected element 68 | * @property {number} defaultActiveScale - The default scale of the active element 69 | * @property {number} defaultActiveOpacity - The default opacity of the active element 70 | * @property {StyleProp} elementTextStyle - The style of the element text 71 | * @property {StyleProp} elementContainerStyle - The style of the element container 72 | */ 73 | export interface WheelPickerElementProps { 74 | item: string | null; 75 | elementHeight: number; 76 | index: number; 77 | currentScrollIndex: Animated.AnimatedAddition; 78 | restElements: Range<1, 6>; 79 | defaultActiveScale?: number; 80 | defaultActiveOpacity?: number; 81 | elementTextStyle: StyleProp; 82 | elementContainerStyle: StyleProp; 83 | } 84 | 85 | /** 86 | * @property {(index: number) => void} scrollToIndex - The function to scroll to a specific index 87 | */ 88 | export interface WheelPickerRef { 89 | scrollToIndex: (index: number) => void; 90 | } 91 | -------------------------------------------------------------------------------- /src/components/WheelPicker/index.ts: -------------------------------------------------------------------------------- 1 | import WheelPicker, { wheelPickerRef } from './WheelPicker'; 2 | export { 3 | type WheelPickerElementProps, 4 | type WheelPickerProps, 5 | } from './WheelPickerTypes'; 6 | export { WheelPicker, wheelPickerRef }; 7 | -------------------------------------------------------------------------------- /src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './WheelPicker'; 2 | -------------------------------------------------------------------------------- /src/constants/index.ts: -------------------------------------------------------------------------------- 1 | import type { ConstantsType } from './types'; 2 | 3 | const Constants: ConstantsType = { 4 | defaultActiveScale: 1.2, 5 | defaultActiveOpacity: 1, 6 | perspective: 1000, 7 | elementHeight: 40, 8 | restElements: 2, 9 | decelerationRate: 'fast', 10 | loopCount: 100, 11 | defaultRotation: '0deg', 12 | }; 13 | 14 | export default Constants; 15 | -------------------------------------------------------------------------------- /src/constants/types.ts: -------------------------------------------------------------------------------- 1 | import type { WheelPickerElementProps, WheelPickerProps } from '../components'; 2 | 3 | /** 4 | * The constants type 5 | * @property {number} perspective - The perspective of the wheel picker 6 | * @property {number} elementHeight - The height of each element in the wheel picker 7 | * @property {number} restElements - The number of elements to be displayed above and below the selected element 8 | * @property {string} decelerationRate - The deceleration rate of the scroll view 9 | * @property {number} loopCount - The number of times the data should be looped 10 | * @property {number} defaultActiveOpacity - The default opacity of the active element 11 | * @property {number} defaultActiveScale - The default scale of the active element 12 | * @property {number} perspective - The perspective of the wheel picker 13 | */ 14 | export interface ConstantsType 15 | extends Required< 16 | Pick< 17 | WheelPickerProps, 18 | 'loopCount' | 'restElements' | 'decelerationRate' | 'elementHeight' 19 | > 20 | >, 21 | Required< 22 | Pick< 23 | WheelPickerElementProps, 24 | 'defaultActiveOpacity' | 'defaultActiveScale' 25 | > 26 | > { 27 | perspective: number; 28 | defaultRotation: string; 29 | } 30 | -------------------------------------------------------------------------------- /src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useThrowPropsError } from './useThrowPropsError'; 2 | export { default as useWheelPicker } from './useWheelPicker'; 3 | export { default as useWheelPickerElement } from './useWheelPickerElement'; 4 | -------------------------------------------------------------------------------- /src/hooks/types.ts: -------------------------------------------------------------------------------- 1 | import type { WheelPickerProps } from '../components'; 2 | 3 | /** 4 | * @property {number} selectedIndex - The index of the selected value 5 | * @property {Array} arrayData - The data to be displayed in the wheel picker 6 | * @property {number} restElements - The number of elements to be displayed above and below the selected element 7 | * @property {number} loopCount - The number of times the data should be looped 8 | * @property {string | number} decelerationRate - The deceleration rate of the scroll view 9 | * @property {Array} data - The data to be displayed in the wheel picker 10 | * @property {number} elementHeight - The height of each element in the wheel picker 11 | */ 12 | export interface ThrowPropsError 13 | extends Pick< 14 | WheelPickerProps, 15 | | 'selectedIndex' 16 | | 'restElements' 17 | | 'loopCount' 18 | | 'decelerationRate' 19 | | 'elementHeight' 20 | | 'data' 21 | | 'initialSelectedIndex' 22 | > { 23 | arrayData: Array; 24 | } 25 | -------------------------------------------------------------------------------- /src/hooks/useThrowPropsError.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | import type { ThrowPropsError } from './types'; 3 | 4 | /** 5 | * Verify if the props are valid or not 6 | * If not, throw an error 7 | * @param selectedIndex - The index of the selected value 8 | * @param arrayData - The data to be displayed in the wheel picker 9 | * @param restElements - The number of elements to be displayed above and below the selected element 10 | * @param loopCount - The number of times the data should be looped 11 | * @param decelerationRate - The deceleration rate of the scroll view 12 | * @param data - The data to be displayed in the wheel picker 13 | * @param elementHeight - The height of each element in the wheel picker 14 | */ 15 | const useThrowPropsError = ({ 16 | selectedIndex, 17 | arrayData, 18 | restElements, 19 | loopCount, 20 | decelerationRate, 21 | data, 22 | elementHeight, 23 | initialSelectedIndex, 24 | }: ThrowPropsError) => { 25 | /** 26 | * Check if the selected index is out of bounds 27 | * If it is, throw an error 28 | */ 29 | useEffect(() => { 30 | if (selectedIndex < 0 || selectedIndex >= arrayData.length) { 31 | throw new Error( 32 | `Selected index ${selectedIndex} is out of bounds. Index should be in between [0, ${ 33 | arrayData.length - 1 34 | }]` 35 | ); 36 | } 37 | if ( 38 | initialSelectedIndex && 39 | (initialSelectedIndex < 0 || initialSelectedIndex >= data.length) 40 | ) { 41 | throw new Error( 42 | `Initial selected index ${initialSelectedIndex} is out of bounds. Index should be in between [0, ${ 43 | data.length - 1 44 | }]` 45 | ); 46 | } 47 | if (restElements && (restElements < 1 || restElements > 6)) { 48 | throw new Error( 49 | `Rest elements ${restElements} is out of bounds. Rest elements should be in between [1, 6]` 50 | ); 51 | } 52 | if ( 53 | decelerationRate !== 'normal' && 54 | decelerationRate !== 'fast' && 55 | typeof decelerationRate !== 'number' 56 | ) { 57 | throw new Error( 58 | `Deceleration rate ${decelerationRate} is invalid. Deceleration rate should be either 'normal', 'fast' or a number` 59 | ); 60 | } 61 | if (loopCount && loopCount < 30) { 62 | throw new Error( 63 | `Loop count ${loopCount} is invalid. Loop count must be greater than 30.` 64 | ); 65 | } 66 | if (!Array.isArray(data)) { 67 | throw new Error(`Data ${data} is invalid. Data must be an array.`); 68 | } 69 | if (Array.isArray(data)) { 70 | data.map(item => { 71 | if (typeof item !== 'string' && typeof item !== 'number') { 72 | throw new Error( 73 | `Data ${data} is invalid. Data must be an array of strings or numbers.` 74 | ); 75 | } 76 | }); 77 | } 78 | if (typeof elementHeight !== 'number') { 79 | throw new Error( 80 | `Element height ${elementHeight} is invalid. Element height must be a number.` 81 | ); 82 | } 83 | }, [ 84 | selectedIndex, 85 | arrayData, 86 | restElements, 87 | loopCount, 88 | decelerationRate, 89 | data, 90 | elementHeight, 91 | initialSelectedIndex, 92 | ]); 93 | }; 94 | 95 | export default useThrowPropsError; 96 | -------------------------------------------------------------------------------- /src/hooks/useWheelPicker.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; 2 | import { 3 | Animated, 4 | type FlatList, 5 | type NativeScrollEvent, 6 | type NativeSyntheticEvent, 7 | } from 'react-native'; 8 | import type { WheelPickerProps } from '../components'; 9 | import useThrowPropsError from './useThrowPropsError'; 10 | 11 | /** 12 | * Custom hook to handle the wheel picker logic 13 | * @param onChangeValue - Function to handle the value change 14 | * @param selectedIndex - The index of the selected value 15 | * @param data - The data to be displayed in the wheel picker 16 | * @param elementHeight - The height of each element in the wheel picker 17 | * @param restElements - The number of elements to be displayed above and below the selected element 18 | * @param decelerationRate - The deceleration rate of the scroll view 19 | * @param loopCount - The number of times the data should be looped 20 | * @returns - The necessary props for the wheel picker 21 | */ 22 | const useWheelPicker = ({ 23 | onChangeValue, 24 | selectedIndex, 25 | data, 26 | elementHeight, 27 | restElements, 28 | decelerationRate, 29 | loopCount, 30 | infiniteScroll, 31 | initialSelectedIndex, 32 | }: Required< 33 | Pick< 34 | WheelPickerProps, 35 | | 'loopCount' 36 | | 'onChangeValue' 37 | | 'selectedIndex' 38 | | 'data' 39 | | 'restElements' 40 | | 'decelerationRate' 41 | | 'elementHeight' 42 | | 'infiniteScroll' 43 | | 'initialSelectedIndex' 44 | > 45 | >) => { 46 | /** 47 | * Loop the data to make it infinite 48 | * The loopCount is multiplied by 2 to ensure that the data is enough to be looped 49 | * The loopedData is memoized to prevent re-rendering 50 | */ 51 | let loopCountMax = !infiniteScroll ? 1 : loopCount * 2; 52 | const loopedData = useMemo(() => { 53 | let looped: Array = []; 54 | for (let i = 0; i < loopCountMax; i++) { 55 | looped = [...looped, ...data]; 56 | } 57 | return looped; 58 | }, [loopCountMax, data]); 59 | 60 | const [arrayData, setArrayData] = useState>([ 61 | ...loopedData, 62 | ]); 63 | const flatListRef = useRef>(null); 64 | const [scrollY] = useState(new Animated.Value(0)); 65 | 66 | /** 67 | * Verify if the props are valid or not 68 | * If not, throw an error 69 | */ 70 | useThrowPropsError({ 71 | selectedIndex, 72 | arrayData, 73 | restElements, 74 | loopCount, 75 | decelerationRate, 76 | data, 77 | elementHeight, 78 | initialSelectedIndex, 79 | }); 80 | 81 | /** 82 | * Calculate the height of the container 83 | */ 84 | const containerHeight = (1 + restElements * 2) * elementHeight; 85 | /** 86 | * Adding null values to the beginning and end of the data to make the list circular 87 | */ 88 | const arrayElements = useMemo(() => { 89 | const array: (string | null | number)[] = [...arrayData]; 90 | for (let i = 0; i < restElements; i++) { 91 | array.unshift(null); 92 | array.push(null); 93 | } 94 | return array; 95 | }, [restElements, arrayData]); 96 | 97 | /** 98 | * Calculate the offsets for each item in the list 99 | * The offsets are memoized to prevent re-rendering 100 | */ 101 | const offsets = useMemo( 102 | () => [...Array(arrayElements.length)].map((_x, i) => i * elementHeight), 103 | [arrayElements, elementHeight] 104 | ); 105 | 106 | /** 107 | * Calculate the current scroll index 108 | */ 109 | const currentScrollIndex = useMemo(() => { 110 | const scrollIndex = Animated.add( 111 | Animated.divide(scrollY, elementHeight), 112 | restElements 113 | ); 114 | return scrollIndex; 115 | }, [restElements, scrollY, elementHeight]); 116 | 117 | let timer: NodeJS.Timeout | null = null; 118 | /** 119 | * Handle the momentum scroll end event 120 | * This function is called when the user stops scrolling 121 | * It calculates the selected index based on the current scroll position 122 | * and calls the onChangeValue function to update the selected value 123 | * @param event - NativeSyntheticEvent 124 | */ 125 | const handleMomentumScrollEnd = ( 126 | event: NativeSyntheticEvent 127 | ) => { 128 | const offsetY = Math.min( 129 | elementHeight * (arrayData.length - 1), 130 | Math.max(event.nativeEvent.contentOffset.y, 0) 131 | ); 132 | 133 | let index = Math.floor(Math.floor(offsetY) / elementHeight); 134 | const last = Math.floor(offsetY % elementHeight); 135 | if (last > elementHeight / 2) index++; 136 | 137 | if (index !== selectedIndex) { 138 | const value = arrayData[index]; 139 | if (value) { 140 | if (timer) clearTimeout(timer); 141 | timer = setTimeout(() => { 142 | const originalIndex = data.findIndex( 143 | item => item === arrayData[index] 144 | ); 145 | onChangeValue(originalIndex, value.toString()); 146 | }, 100); 147 | } 148 | } 149 | }; 150 | 151 | /** 152 | * Handle the scroll event 153 | * This function is called when the user scrolls the wheel picker 154 | * It checks if the user is near the end of the list 155 | * If so, it adds more data to the list 156 | */ 157 | const onScrollListener = useCallback( 158 | (event: NativeSyntheticEvent) => { 159 | const { contentOffset, contentSize, layoutMeasurement } = 160 | event.nativeEvent; 161 | const detectFromItem = (data.length + 2) * elementHeight; // 2 is the number of extra elements 162 | const isNearToEnd = 163 | layoutMeasurement.height + contentOffset.y + elementHeight >= 164 | contentSize.height - detectFromItem; 165 | if (isNearToEnd && infiniteScroll) { 166 | setArrayData([...arrayData, 1]); 167 | } 168 | }, 169 | [arrayData, data, elementHeight, infiniteScroll] 170 | ); 171 | 172 | /** 173 | * Calculate the initial scroll index 174 | * The initial scroll index is the index of the selected value 175 | * Here 0 is initially selected 0 index if infiniteScroll is false 176 | */ 177 | const initialScrollIndex = useMemo(() => { 178 | return !infiniteScroll 179 | ? initialSelectedIndex ?? 0 180 | : arrayData?.length / 2 + initialSelectedIndex; 181 | }, [arrayData, initialSelectedIndex, infiniteScroll]); 182 | 183 | /** 184 | * Set the initial selected value 185 | */ 186 | useEffect(() => { 187 | let count = 0; 188 | if (count === 0) { 189 | const infiniteDataIndex = data.findIndex( 190 | item => item === arrayData[initialScrollIndex] 191 | ); 192 | const originalIndex = !infiniteScroll 193 | ? selectedIndex ?? 0 194 | : infiniteDataIndex; 195 | const originalValue = !infiniteScroll 196 | ? data[initialSelectedIndex ?? 0]?.toString() 197 | : arrayData[initialScrollIndex]?.toString(); 198 | onChangeValue(originalIndex ?? 0, originalValue ?? ''); 199 | count++; 200 | } 201 | // eslint-disable-next-line react-hooks/exhaustive-deps 202 | }, [initialScrollIndex, infiniteScroll, initialSelectedIndex]); 203 | 204 | return { 205 | currentScrollIndex, 206 | containerHeight, 207 | flatListRef, 208 | arrayElements, 209 | scrollY, 210 | setArrayData, 211 | arrayData, 212 | handleMomentumScrollEnd, 213 | offsets, 214 | initialScrollIndex, 215 | onScrollListener, 216 | }; 217 | }; 218 | 219 | export default useWheelPicker; 220 | -------------------------------------------------------------------------------- /src/hooks/useWheelPickerElement.ts: -------------------------------------------------------------------------------- 1 | import { Animated } from 'react-native'; 2 | import type { WheelPickerElementProps } from '../components'; 3 | import { 4 | generateInputRange, 5 | generateOutputRange, 6 | generateTranslateYOutputRange, 7 | opacityFunction, 8 | rotationFunction, 9 | scaleFunction, 10 | } from '../utils'; 11 | import Constants from '../constants'; 12 | 13 | /** 14 | * Custom hook to handle the wheel picker element logic 15 | * @param index - The index of the current element 16 | * @param restElements - The number of elements to be displayed above and below the selected element 17 | * @param currentScrollIndex - The current scroll index of the wheel picker 18 | * @param defaultActiveScale - The default scale of the active element 19 | * @param defaultActiveOpacity - The default opacity of the active element 20 | * @param elementHeight - The height of each element in the wheel picker 21 | */ 22 | const useWheelPickerElement = ({ 23 | index, 24 | restElements, 25 | currentScrollIndex, 26 | defaultActiveScale, 27 | defaultActiveOpacity, 28 | elementHeight, 29 | }: Required< 30 | Pick< 31 | WheelPickerElementProps, 32 | | 'index' 33 | | 'restElements' 34 | | 'currentScrollIndex' 35 | | 'defaultActiveOpacity' 36 | | 'defaultActiveScale' 37 | | 'elementHeight' 38 | > 39 | >) => { 40 | /** 41 | * Generate the input range for the interpolation 42 | */ 43 | const inputRange = generateInputRange(restElements); 44 | 45 | /** 46 | * Calculate the relative scroll index 47 | */ 48 | const scrollIndex = Animated.subtract(index, currentScrollIndex); 49 | 50 | /** 51 | * Interpolate the translateY value 52 | * based on the scroll index 53 | * @returns {Animated.AnimatedAddition} 54 | */ 55 | const translateY = scrollIndex.interpolate({ 56 | inputRange: inputRange, 57 | outputRange: generateTranslateYOutputRange( 58 | restElements, 59 | elementHeight, 60 | rotationFunction 61 | ), 62 | }); 63 | 64 | /** 65 | * Interpolate the Opacity value 66 | * based on the scroll index 67 | * @returns {Animated.AnimatedAddition} 68 | */ 69 | const opacity = scrollIndex.interpolate({ 70 | inputRange: inputRange, 71 | outputRange: generateOutputRange( 72 | restElements, 73 | opacityFunction, 74 | defaultActiveOpacity, 75 | false, 76 | true 77 | ), 78 | }); 79 | 80 | /** 81 | * Interpolate the Scale value 82 | * based on the scroll index 83 | * @returns {Animated.AnimatedAddition} 84 | */ 85 | const scale = scrollIndex.interpolate({ 86 | inputRange: inputRange, 87 | outputRange: generateOutputRange( 88 | restElements, 89 | scaleFunction, 90 | defaultActiveScale 91 | ), 92 | }); 93 | 94 | /** 95 | * Interpolate the RotateX value 96 | * based on the scroll index 97 | * @returns {Animated.AnimatedAddition} 98 | */ 99 | const rotateX = scrollIndex.interpolate({ 100 | inputRange: inputRange, 101 | outputRange: generateOutputRange( 102 | restElements, 103 | rotationFunction, 104 | Constants.defaultRotation, 105 | true 106 | ), 107 | }); 108 | 109 | return { 110 | translateY, 111 | opacity, 112 | scale, 113 | rotateX, 114 | }; 115 | }; 116 | 117 | export default useWheelPickerElement; 118 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | -------------------------------------------------------------------------------- /src/theme/Colors.ts: -------------------------------------------------------------------------------- 1 | const colors = { 2 | white: '#ffffff', 3 | black: '#000000', 4 | blue: '#05259b', 5 | gray: '#00000026', 6 | lightGray: '#D3D3D366', 7 | }; 8 | 9 | export default colors; 10 | -------------------------------------------------------------------------------- /src/theme/Metrics.ts: -------------------------------------------------------------------------------- 1 | import { Dimensions, Platform, type ScaledSize } from 'react-native'; 2 | 3 | /** 4 | * Get the width and height of the device screen. 5 | * @returns {ScaledSize} - the width and height of the device screen. 6 | */ 7 | let { width, height }: ScaledSize = Dimensions.get('window'); 8 | 9 | if (width > height) { 10 | [width, height] = [height, width]; 11 | } 12 | 13 | /** 14 | * A type that contains the global metrics for the current device. 15 | * @typedef {Object} GlobalMetricsType - A type that contains the global metrics for the current device. 16 | * @property {boolean} isAndroid - Whether the current device is an Android device. 17 | */ 18 | interface GlobalMetricsType { 19 | isAndroid: boolean; 20 | isIos: boolean; 21 | isPad: boolean; 22 | isTV: boolean; 23 | isWeb: boolean; 24 | } 25 | 26 | /** 27 | * A type that contains the global metrics for the app. 28 | * @type {GlobalMetricsType} 29 | */ 30 | const globalMetrics: GlobalMetricsType = { 31 | isAndroid: Platform.OS === 'android', 32 | isIos: Platform.OS === 'ios', 33 | isPad: Platform.OS === 'ios' && Platform.isPad, 34 | isTV: Platform.isTV, 35 | isWeb: Platform.OS === 'web', 36 | }; 37 | 38 | export { globalMetrics, width, height }; 39 | -------------------------------------------------------------------------------- /src/theme/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Colors } from './Colors'; 2 | export * from './Metrics'; 3 | -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @param x - index 3 | * @returns scale value 4 | */ 5 | export const scaleFunction = (x: number) => 1.0 ** x; 6 | 7 | /** 8 | * Here 2 is the maximum number of visible items 9 | * @param x - index 10 | * @returns rotation value 11 | */ 12 | export const rotationFunction = (x: number, visible: number = 2) => { 13 | if (visible > 2) { 14 | return 1 - Math.pow(1 / 1.3, x); 15 | } 16 | return 1 - Math.pow(1 / 2, x); 17 | }; 18 | 19 | /** 20 | * Here 2 is the maximum number of visible items 21 | * @param x - index 22 | * @returns opacity value 23 | */ 24 | export const opacityFunction = (x: number, visible: number = 2) => { 25 | if (visible > 2) { 26 | return Math.pow(1 / 1.3, x); 27 | } 28 | return Math.pow(1 / 2, x); 29 | }; 30 | 31 | /** 32 | * Generates an input range for translating elements along the Y-axis. 33 | * Function computes the input values for a list of elements, considering a given number of visible elements outside the central element. 34 | * The input values are symmetrically added to the beginning and end of the range to maintain the balance. 35 | * @param {number} restElements - The number of visible elements outside the central element. 36 | * @returns {Array} - An array representing the input range for each item. 37 | */ 38 | export const generateInputRange = (restElements: number): Array => { 39 | const range = [0]; 40 | for (let i = 1; i <= restElements + 1; i++) { 41 | range.unshift(-i); 42 | range.push(i); 43 | } 44 | return range; 45 | }; 46 | 47 | /** 48 | * Generates an output range for translating elements along the Y-axis based on a rotation function. 49 | * Function computes the Y-axis translation for a list of elements, considering a given rotation function. Central element is at index 0, with an initial translation of 0. 50 | * For each subsequent element, the translation is calculated based on the elementHeight and the provided rotation function. 51 | * The translation values are symmetrically added to the beginning and end of the range to maintain the balance. 52 | * @param {number} restElements - The number of visible elements outside the central element. 53 | * @param {number} elementHeight - The elementHeight of each item in the list. 54 | * @param {function} rotateFunction - A function that takes an index and returns a rotation value (in radians). 55 | * @returns {Array} - An array representing the translateY output range for each item. 56 | */ 57 | export const generateTranslateYOutputRange = ( 58 | restElements: number, 59 | elementHeight: number, 60 | rotateFunction: (x: number) => number 61 | ): Array => { 62 | const range = [0]; 63 | for (let i = 1; i <= restElements + 1; i++) { 64 | let y = 65 | (elementHeight / 2) * (1 - Math.sin(Math.PI / 2 - rotateFunction(i))); 66 | for (let j = 1; j < i; j++) { 67 | y += elementHeight * (1 - Math.sin(Math.PI / 2 - rotateFunction(j))); 68 | } 69 | range.unshift(y); 70 | range.push(-y); 71 | } 72 | return range; 73 | }; 74 | 75 | /** 76 | * Generates an output range for a given function. 77 | * Function computes the output values for a list of elements, considering a given value function. 78 | * The output values are symmetrically added to the beginning and end of the range to maintain the balance. 79 | * @param {number} restElements - The number of visible elements outside the central element. 80 | * @param {function} valueFunction - A function that takes an index and returns a value. 81 | * @param {number} initialValue - The initial value for the central element. 82 | * @param {boolean} isRotation - A flag indicating whether the output values are for rotation. 83 | * @param {boolean} isOpacity - A flag indicating whether the output values are for opacity. 84 | * @returns {Array | Array} - An array representing the output range for each item. 85 | */ 86 | export const generateOutputRange = ( 87 | restElements: number, 88 | valueFunction: (x: number, restElements?: number) => number, 89 | initialValue: number | string, 90 | isRotation = false, 91 | isOpacity = false 92 | ): Array | Array => { 93 | const range = [initialValue]; 94 | for (let x = 1; x <= restElements + 1; x++) { 95 | let y: string | number = valueFunction(x, restElements); 96 | if (isOpacity && !isRotation && typeof y === 'number') { 97 | y = Math.min(Math.max(y, 0.2), 0.5); // minimum opacity value is 0.2 and maximum is 0.5 98 | } 99 | if (isRotation) { 100 | y = Math.min(y, 0.7); // minimum rotation value is 0.75 * 100 = 75deg 101 | range.unshift(`${y * 100}deg`); 102 | range.push(`${y * 100}deg`); 103 | } else { 104 | range.unshift(y); 105 | range.push(y); 106 | } 107 | } 108 | return range as Array | Array; 109 | }; 110 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "declaration": true, 5 | "esModuleInterop": true, 6 | "allowUnreachableCode": false, 7 | "allowUnusedLabels": false, 8 | "jsx": "react", 9 | "lib": ["ESNext"], 10 | "module": "ESNext", 11 | "forceConsistentCasingInFileNames": true, 12 | "moduleResolution": "Node", 13 | "noFallthroughCasesInSwitch": true, 14 | "noImplicitReturns": true, 15 | "noImplicitUseStrict": false, 16 | "noStrictGenericChecks": false, 17 | "noUnusedLocals": true, 18 | "noUnusedParameters": true, 19 | "resolveJsonModule": true, 20 | "noEmitOnError": true, 21 | "outDir": "./lib", 22 | "skipLibCheck": true, 23 | "sourceMap": true, 24 | "strict": true, 25 | "target": "ESNext", 26 | "noUncheckedIndexedAccess": true, 27 | "verbatimModuleSyntax": true 28 | }, 29 | "exclude": ["example/node_modules/**", "node_modules/**", "**/__tests__/*"], 30 | "include": ["src"] 31 | } 32 | --------------------------------------------------------------------------------