├── src ├── __tests__ │ └── index.test.tsx ├── assets │ ├── image.png │ ├── seat.png │ ├── seat1.png │ ├── steer.png │ ├── seat_blocked.png │ └── seat_blockeda.png ├── component │ ├── sleeper.png │ ├── SeatContainer.tsx │ └── Seat.tsx ├── types │ └── index.tsx ├── styles.tsx └── index.tsx ├── tsconfig.build.json ├── babel.config.js ├── example ├── app.json ├── ios │ ├── File.swift │ ├── BookingTicketExample │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── Info.plist │ │ ├── AppDelegate.m │ │ └── LaunchScreen.storyboard │ ├── BookingTicketExample-Bridging-Header.h │ ├── BookingTicketExample.xcworkspace │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── contents.xcworkspacedata │ ├── Podfile │ └── BookingTicketExample.xcodeproj │ │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── BookingTicketExample.xcscheme │ │ └── project.pbxproj ├── assets │ ├── images │ │ ├── seat.png │ │ ├── driving.png │ │ ├── sleeper.png │ │ └── sleeper_1.png │ └── index.tsx ├── android │ ├── app │ │ ├── debug.keystore │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.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 │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── reactnativebookingticket │ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ │ └── MainApplication.java │ │ │ │ └── AndroidManifest.xml │ │ │ └── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── reactnativebookingticket │ │ │ │ └── ReactNativeFlipper.java │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── gradle.properties │ ├── build.gradle │ ├── gradlew.bat │ └── gradlew ├── index.tsx ├── babel.config.js ├── package.json ├── .gitignore ├── metro.config.js └── src │ └── App.tsx ├── tsconfig.json ├── scripts └── bootstrap.js ├── .gitignore ├── LICENSE ├── package.json ├── README.md └── CONTRIBUTING.md /src/__tests__/index.test.tsx: -------------------------------------------------------------------------------- 1 | it.todo('write a test'); 2 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "./tsconfig", 4 | "exclude": ["example"] 5 | } 6 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BookingTicketExample", 3 | "displayName": "BookingTicket Example" 4 | } 5 | -------------------------------------------------------------------------------- /example/ios/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // BookingTicketExample 4 | // 5 | 6 | import Foundation 7 | -------------------------------------------------------------------------------- /src/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/assets/image.png -------------------------------------------------------------------------------- /src/assets/seat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/assets/seat.png -------------------------------------------------------------------------------- /src/assets/seat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/assets/seat1.png -------------------------------------------------------------------------------- /src/assets/steer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/assets/steer.png -------------------------------------------------------------------------------- /src/component/sleeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/component/sleeper.png -------------------------------------------------------------------------------- /src/assets/seat_blocked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/assets/seat_blocked.png -------------------------------------------------------------------------------- /example/assets/images/seat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/assets/images/seat.png -------------------------------------------------------------------------------- /src/assets/seat_blockeda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/src/assets/seat_blockeda.png -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | BookingTicket Example 3 | 4 | -------------------------------------------------------------------------------- /example/assets/images/driving.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/assets/images/driving.png -------------------------------------------------------------------------------- /example/assets/images/sleeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/assets/images/sleeper.png -------------------------------------------------------------------------------- /example/assets/images/sleeper_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/assets/images/sleeper_1.png -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/index.tsx: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './src/App'; 3 | import { name as appName } from './app.json'; 4 | 5 | AppRegistry.registerComponent(appName, () => App); 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindinventory/react-native-bus-seat-layout/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'BookingTicketExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | 5 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/assets/index.tsx: -------------------------------------------------------------------------------- 1 | import type { ImageSourcePropType } from 'react-native'; 2 | 3 | export const DriverIcon: ImageSourcePropType = require('./images/driving.png'); 4 | export const SeatIcon: ImageSourcePropType = require('./images/seat.png'); 5 | export const SleeperSeatIcon: ImageSourcePropType = require('./images/sleeper.png'); 6 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | presets: ['module:metro-react-native-babel-preset'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | extensions: ['.tsx', '.ts', '.js', '.json'], 11 | alias: { 12 | [pak.name]: path.join(__dirname, '..', pak.source), 13 | }, 14 | }, 15 | ], 16 | ], 17 | }; 18 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /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/main/java/com/example/reactnativebookingticket/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.reactnativebookingticket; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "BookingTicketExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /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, '10.0' 5 | 6 | target 'BookingTicketExample' do 7 | config = use_native_modules! 8 | 9 | use_react_native!(:path => config["reactNativePath"]) 10 | 11 | # Enables Flipper. 12 | # 13 | # Note that if you have use_frameworks! enabled, Flipper will not work and 14 | # you should disable these next few lines. 15 | # use_flipper!({ 'Flipper' => '0.80.0' }) 16 | post_install do |installer| 17 | flipper_post_install(installer) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@mindinventory/react-native-bus-seat-layout": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": false, 8 | "allowUnusedLabels": false, 9 | "esModuleInterop": true, 10 | "importsNotUsedAsValues": "error", 11 | "forceConsistentCasingInFileNames": true, 12 | "jsx": "react", 13 | "lib": ["esnext"], 14 | "module": "esnext", 15 | "moduleResolution": "node", 16 | "noFallthroughCasesInSwitch": true, 17 | "noImplicitReturns": true, 18 | "noImplicitUseStrict": false, 19 | "noStrictGenericChecks": false, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "resolveJsonModule": true, 23 | "skipLibCheck": true, 24 | "strict": true, 25 | "target": "esnext" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /scripts/bootstrap.js: -------------------------------------------------------------------------------- 1 | const os = require('os'); 2 | const path = require('path'); 3 | const child_process = require('child_process'); 4 | 5 | const root = path.resolve(__dirname, '..'); 6 | const args = process.argv.slice(2); 7 | const options = { 8 | cwd: process.cwd(), 9 | env: process.env, 10 | stdio: 'inherit', 11 | encoding: 'utf-8', 12 | }; 13 | 14 | if (os.type() === 'Windows_NT') { 15 | options.shell = true 16 | } 17 | 18 | let result; 19 | 20 | if (process.cwd() !== root || args.length) { 21 | // We're not in the root of the project, or additional arguments were passed 22 | // In this case, forward the command to `yarn` 23 | result = child_process.spawnSync('yarn', args, options); 24 | } else { 25 | // If `yarn` is run without arguments, perform bootstrap 26 | result = child_process.spawnSync('yarn', ['bootstrap'], options); 27 | } 28 | 29 | process.exitCode = result.status; 30 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@mindinventory/react-native-bus-seat-layout-example", 3 | "description": "Example app for @mindinventory/react-native-bus-seat-layout", 4 | "version": "0.0.1", 5 | "private": true, 6 | "scripts": { 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start" 10 | }, 11 | "dependencies": { 12 | "react": "16.13.1", 13 | "react-native": "0.63.5" 14 | }, 15 | "devDependencies": { 16 | "@babel/core": "^7.12.10", 17 | "@babel/runtime": "^7.12.5", 18 | "@types/jest": "^27.4.1", 19 | "@types/react": "^18.0.5", 20 | "@types/react-native": "^0.67.4", 21 | "@types/react-test-renderer": "^18.0.0", 22 | "babel-plugin-module-resolver": "^4.0.0", 23 | "metro-react-native-babel-preset": "^0.64.0", 24 | "typescript": "^4.6.3" 25 | }, 26 | "resolutions": { 27 | "@types/react": "18.0.5", 28 | "react-native": "^0.67.4" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .classpath 35 | .cxx 36 | .gradle 37 | .idea 38 | .project 39 | .settings 40 | local.properties 41 | android.iml 42 | 43 | # Cocoapods 44 | # 45 | example/ios/Pods 46 | example/ios/Podfile.lock 47 | 48 | example/yarn.lock 49 | yarn.lock 50 | # node.js 51 | # 52 | node_modules/ 53 | npm-debug.log 54 | yarn-debug.log 55 | yarn-error.log 56 | 57 | # BUCK 58 | buck-out/ 59 | \.buckd/ 60 | android/app/libs 61 | android/keystores/debug.keystore 62 | 63 | # Expo 64 | .expo/* 65 | 66 | # generated by bob 67 | lib/ 68 | -------------------------------------------------------------------------------- /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: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 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 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | FLIPPER_VERSION=0.54.0 23 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | 5 | # OSX 6 | # 7 | .DS_Store 8 | 9 | # XDE 10 | .expo/ 11 | 12 | # VSCode 13 | .vscode/ 14 | jsconfig.json 15 | 16 | # Xcode 17 | # 18 | build/ 19 | *.pbxuser 20 | !default.pbxuser 21 | *.mode1v3 22 | !default.mode1v3 23 | *.mode2v3 24 | !default.mode2v3 25 | *.perspectivev3 26 | !default.perspectivev3 27 | xcuserdata 28 | *.xccheckout 29 | *.moved-aside 30 | DerivedData 31 | *.hmap 32 | *.ipa 33 | *.xcuserstate 34 | project.xcworkspace 35 | 36 | # Android/IJ 37 | # 38 | .classpath 39 | .cxx 40 | .gradle 41 | .idea 42 | .project 43 | .settings 44 | local.properties 45 | android.iml 46 | 47 | # Cocoapods 48 | # 49 | example/ios/Pods 50 | example/ios/Podfile.lock 51 | 52 | # node.js 53 | # 54 | node_modules/ 55 | yarn.lock 56 | 57 | example/node_modules/ 58 | example/yarn.lock 59 | 60 | npm-debug.log 61 | yarn-debug.log 62 | yarn-error.log 63 | 64 | # BUCK 65 | buck-out/ 66 | \.buckd/ 67 | android/app/libs 68 | android/keystores/debug.keystore 69 | 70 | # Expo 71 | .expo/* 72 | 73 | # generated by bob 74 | lib/ 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 MindInventory 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. 22 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /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 | minSdkVersion = 16 6 | compileSdkVersion = 29 7 | targetSdkVersion = 29 8 | } 9 | repositories { 10 | google() 11 | mavenCentral() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | mavenCentral() 36 | jcenter() 37 | maven { url 'https://www.jitpack.io' } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const blacklist = require('metro-config/src/defaults/blacklist'); 3 | const escape = require('escape-string-regexp'); 4 | const pak = require('../package.json'); 5 | 6 | const root = path.resolve(__dirname, '..'); 7 | 8 | const modules = Object.keys({ 9 | ...pak.peerDependencies, 10 | }); 11 | 12 | module.exports = { 13 | projectRoot: __dirname, 14 | watchFolders: [root], 15 | 16 | // We need to make sure that only one version is loaded for peerDependencies 17 | // So we blacklist them at the root, and alias them to the versions in example's node_modules 18 | resolver: { 19 | blacklistRE: blacklist( 20 | modules.map( 21 | (m) => 22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) 23 | ) 24 | ), 25 | 26 | extraNodeModules: modules.reduce((acc, name) => { 27 | acc[name] = path.join(__dirname, 'node_modules', name); 28 | return acc; 29 | }, {}), 30 | }, 31 | 32 | transformer: { 33 | getTransformOptions: async () => ({ 34 | transform: { 35 | experimentalImportSupport: false, 36 | inlineRequires: true, 37 | }, 38 | }), 39 | }, 40 | }; 41 | -------------------------------------------------------------------------------- /example/src/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SafeAreaView, StyleSheet } from 'react-native'; 3 | import SeatsLayout from '@mindinventory/react-native-bus-seat-layout'; 4 | import { SleeperSeatIcon } from '../assets'; 5 | 6 | export default function App() { 7 | return ( 8 | 9 | { 29 | console.log('getBookedSeats :: ', seats); 30 | }} 31 | /> 32 | 33 | ); 34 | } 35 | 36 | const styles = StyleSheet.create({ 37 | numberStyle: { fontSize: 12 }, 38 | }); 39 | -------------------------------------------------------------------------------- /src/types/index.tsx: -------------------------------------------------------------------------------- 1 | import type { ColorValue } from 'react-native'; 2 | import type { ImageSourcePropType } from 'react-native'; 3 | 4 | export type SeatType = 5 | | 'available' 6 | | 'blocked' 7 | | 'booked' 8 | | 'door' 9 | | 'driver' 10 | | 'emptySpace' 11 | | 'women' 12 | | 'door'; 13 | 14 | export type SelectedSeatType = 15 | | 'booked' 16 | | 'women' 17 | | 'blocked' 18 | | 'door' 19 | | 'emptySpace'; 20 | 21 | export type SeatImageAssetsType = 22 | | 'available' 23 | | 'blocked' 24 | | 'booked' 25 | | 'driver' 26 | | 'women' 27 | | 'door'; 28 | 29 | export interface SeatLayout { 30 | id: string; 31 | isSeatSeleced?: boolean; 32 | isStatusChange?: boolean; 33 | seatNo?: number; 34 | type: SeatType; 35 | } 36 | export interface Layout { 37 | columnOne: number; 38 | columnTwo: number; 39 | } 40 | export interface SelectedSeats { 41 | seatNumber: number; 42 | seatType: SelectedSeatType; 43 | } 44 | 45 | export type DriverPosition = 'left' | 'right'; 46 | 47 | export interface AvaiableSeat { 48 | image: string | ImageSourcePropType; 49 | tintColor: ColorValue | undefined; 50 | } 51 | export interface BlockedSeat { 52 | image: string | ImageSourcePropType; 53 | tintColor: ColorValue | undefined; 54 | } 55 | export interface DoorSeatImage { 56 | image: string | ImageSourcePropType; 57 | tintColor: ColorValue | undefined; 58 | } 59 | export interface DriverSeat { 60 | image: string | ImageSourcePropType; 61 | tintColor: ColorValue | undefined; 62 | } 63 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | BookingTicket Example 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 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/component/SeatContainer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View, TextStyle } from 'react-native'; 3 | import type { 4 | AvaiableSeat, 5 | BlockedSeat, 6 | DoorSeatImage, 7 | DriverSeat, 8 | SeatLayout, 9 | } from '../types'; 10 | import { disableButton, seatContainerStyle, viewBorderStyle } from '../styles'; 11 | import Seat from './Seat'; 12 | 13 | export interface SeatContainerProps { 14 | blockedSeatImage?: BlockedSeat; 15 | disableSeat: boolean; 16 | driverImage?: DriverSeat; 17 | doorSeatImage?: DoorSeatImage; 18 | index: number; 19 | isSleeperLayout?: boolean; 20 | item: Array; 21 | numberTextStyle?: TextStyle; 22 | onSeatSelected?: (seat: SeatLayout) => void; 23 | seatImage?: AvaiableSeat; 24 | } 25 | 26 | const SeatContainer = ({ 27 | blockedSeatImage = undefined, 28 | disableSeat, 29 | driverImage = undefined, 30 | doorSeatImage = undefined, 31 | index, 32 | isSleeperLayout, 33 | item, 34 | numberTextStyle, 35 | onSeatSelected, 36 | seatImage = undefined, 37 | }: SeatContainerProps) => { 38 | const renderItem = (seat: SeatLayout, itemIndex: number) => { 39 | const key = `${seat.id} + ${itemIndex} + ${seat.seatNo} + ${index}`; 40 | return ( 41 | { 54 | onSeatSelected && onSeatSelected(seat); 55 | }} 56 | /> 57 | ); 58 | }; 59 | 60 | return ( 61 | 65 | {item.map((seat, mapIndex) => { 66 | return renderItem(seat, mapIndex); 67 | })} 68 | 69 | ); 70 | }; 71 | 72 | export default React.memo(SeatContainer); 73 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | #ifdef FB_SONARKIT_ENABLED 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | static void InitializeFlipper(UIApplication *application) { 22 | FlipperClient *client = [FlipperClient sharedClient]; 23 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 24 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 25 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 26 | [client addPlugin:[FlipperKitReactPlugin new]]; 27 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 28 | [client start]; 29 | } 30 | #endif 31 | 32 | @implementation AppDelegate 33 | 34 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 35 | { 36 | #ifdef FB_SONARKIT_ENABLED 37 | InitializeFlipper(application); 38 | #endif 39 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 40 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 41 | moduleName:@"BookingTicketExample" 42 | initialProperties:nil]; 43 | 44 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 45 | 46 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 47 | UIViewController *rootViewController = [UIViewController new]; 48 | rootViewController.view = rootView; 49 | self.window.rootViewController = rootViewController; 50 | [self.window makeKeyAndVisible]; 51 | return YES; 52 | } 53 | 54 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 55 | { 56 | #if DEBUG 57 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 58 | #else 59 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 60 | #endif 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/reactnativebookingticket/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.reactnativebookingticket; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.ReactInstanceManager; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = 17 | new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | @SuppressWarnings("UnnecessaryLocalVariable") 26 | List packages = new PackageList(this).getPackages(); 27 | // Packages that cannot be autolinked yet can be added manually here, for BookingTicketExample: 28 | // packages.add(new MyReactNativePackage()); 29 | 30 | return packages; 31 | } 32 | 33 | @Override 34 | protected String getJSMainModuleName() { 35 | return "index"; 36 | } 37 | }; 38 | 39 | @Override 40 | public ReactNativeHost getReactNativeHost() { 41 | return mReactNativeHost; 42 | } 43 | 44 | @Override 45 | public void onCreate() { 46 | super.onCreate(); 47 | SoLoader.init(this, /* native exopackage */ false); 48 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled 49 | } 50 | 51 | /** 52 | * Loads Flipper in React Native templates. 53 | * 54 | * @param context 55 | */ 56 | private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 57 | if (BuildConfig.DEBUG) { 58 | try { 59 | /* 60 | We use reflection here to pick up the class that initializes Flipper, 61 | since Flipper library is not available in release mode 62 | */ 63 | Class aClass = Class.forName("com.example.reactnativebookingticket.ReactNativeFlipper"); 64 | aClass 65 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 66 | .invoke(null, context, reactInstanceManager); 67 | } catch (ClassNotFoundException e) { 68 | e.printStackTrace(); 69 | } catch (NoSuchMethodException e) { 70 | e.printStackTrace(); 71 | } catch (IllegalAccessException e) { 72 | e.printStackTrace(); 73 | } catch (InvocationTargetException e) { 74 | e.printStackTrace(); 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /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 http://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 init 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 init 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 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/example/reactnativebookingticket/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its 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.example.reactnativebookingticket; 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.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 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 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 32 | client.addPlugin(new ReactFlipperPlugin()); 33 | client.addPlugin(new DatabasesFlipperPlugin(context)); 34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 35 | client.addPlugin(CrashReporterPlugin.getInstance()); 36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 37 | NetworkingModule.setCustomClientBuilder( 38 | new NetworkingModule.CustomClientBuilder() { 39 | @Override 40 | public void apply(OkHttpClient.Builder builder) { 41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 42 | } 43 | }); 44 | client.addPlugin(networkFlipperPlugin); 45 | client.start(); 46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 47 | // Hence we run if after all native modules have been initialized 48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 49 | if (reactContext == null) { 50 | reactInstanceManager.addReactInstanceEventListener( 51 | new ReactInstanceManager.ReactInstanceEventListener() { 52 | @Override 53 | public void onReactContextInitialized(ReactContext reactContext) { 54 | reactInstanceManager.removeReactInstanceEventListener(this); 55 | reactContext.runOnNativeModulesQueueThread( 56 | new Runnable() { 57 | @Override 58 | public void run() { 59 | client.addPlugin(new FrescoFlipperPlugin()); 60 | } 61 | }); 62 | } 63 | }); 64 | } else { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/styles.tsx: -------------------------------------------------------------------------------- 1 | import type { ViewStyle, TextStyle, ImageStyle } from 'react-native'; 2 | import { seatHeightConst, seatSleeperHeightConst } from './component/Seat'; 3 | 4 | export const marginHorizontal = { 5 | booked: 2, 6 | available: 2, 7 | emptySpace: 2, 8 | door: 2, 9 | driver: 2, 10 | blocked: 2, 11 | women: 2, 12 | }; 13 | 14 | export const disableButton = { 15 | booked: false, 16 | available: false, 17 | emptySpace: true, 18 | door: true, 19 | driver: true, 20 | blocked: true, 21 | women: false, 22 | }; 23 | 24 | export const borderWidth = { 25 | booked: 0.5, 26 | available: 0.5, 27 | emptySpace: 0, 28 | door: 0.5, 29 | driver: 0.5, 30 | blocked: 0, 31 | women: 0.5, 32 | }; 33 | 34 | export const seatSize = { 35 | booked: '90%', 36 | available: '90%', 37 | emptySpace: '90%', 38 | door: '90%', 39 | driver: '75%', 40 | blocked: '95%', 41 | women: '95%', 42 | }; 43 | 44 | export const selectedSeatColor = { 45 | booked: '#5FBB80', 46 | available: '#B2B2B2', 47 | emptySpace: 'transparent', 48 | door: 'skyblue', 49 | driver: '#696969', 50 | blocked: '#DC143C', 51 | women: '#E8296A', 52 | }; 53 | 54 | export const seatheight = { 55 | booked: seatSleeperHeightConst, 56 | available: seatSleeperHeightConst, 57 | emptySpace: seatHeightConst, 58 | door: seatHeightConst, 59 | driver: seatHeightConst, 60 | blocked: seatSleeperHeightConst, 61 | women: seatSleeperHeightConst, 62 | }; 63 | 64 | export const layoutImage = { 65 | booked: require('./assets/seat.png'), 66 | available: require('./assets/seat.png'), 67 | emptySpace: require('./assets/seat.png'), 68 | door: require('./assets/image.png'), 69 | driver: require('./assets/steer.png'), 70 | blocked: require('./assets/seat_blocked.png'), 71 | women: require('./assets/seat.png'), 72 | }; 73 | 74 | export const seatContainerStyle: ViewStyle = { 75 | flexDirection: 'row', 76 | margin: 5, 77 | justifyContent: 'space-evenly', 78 | }; 79 | 80 | export const viewBorderStyle: ViewStyle = { 81 | borderColor: 'lightgray', 82 | borderBottomWidth: 1, 83 | }; 84 | 85 | export const mainContainerStyle: ViewStyle = { 86 | marginHorizontal: 5, 87 | borderWidth: 1, 88 | borderRadius: 20, 89 | borderColor: 'gray', 90 | backgroundColor: 'white', 91 | padding: 10, 92 | height: '100%', 93 | }; 94 | 95 | export const instructionSeatLayout: ViewStyle = { 96 | flexDirection: 'row', 97 | alignItems: 'center', 98 | justifyContent: 'space-evenly', 99 | marginHorizontal: 10, 100 | }; 101 | 102 | export const bgImageStyle: ViewStyle = { 103 | height: 40, 104 | width: 40, 105 | alignItems: 'center', 106 | justifyContent: 'center', 107 | marginRight: 5, 108 | }; 109 | 110 | export const imgHeaderStyle: ImageStyle = { 111 | height: '40%', 112 | width: '40%', 113 | }; 114 | export const seatImageStyle: ImageStyle = { 115 | height: 40, 116 | width: 40, 117 | marginRight: 5, 118 | }; 119 | 120 | export const seatNumberStyle: TextStyle = { 121 | textTransform: 'capitalize', 122 | marginRight: 5, 123 | }; 124 | 125 | export const imgBackgroundStyle: ImageStyle = { 126 | // height: seatSize[seatData.type], 127 | // width: seatSize[seatData.type], 128 | height: '100%', 129 | width: '100%', 130 | alignItems: 'center', 131 | justifyContent: 'center', 132 | }; 133 | 134 | export const bookinmgSeatNumberStyle: TextStyle = { 135 | marginTop: -5, 136 | fontWeight: '500', 137 | fontSize: 8, 138 | }; 139 | 140 | export const blokcedSeatStyle: ImageStyle = { 141 | height: '45%', 142 | width: '45%', 143 | }; 144 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample.xcodeproj/xcshareddata/xcschemes/BookingTicketExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 81 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@mindinventory/react-native-bus-seat-layout", 3 | "version": "1.0.3", 4 | "description": "This library provides seats layout for bus booking, you can give custom styles of seat numbers. also can give images for seat.\nyou have to provide number of rows that you need to draw layout, you will get selected seats from props.", 5 | "main": "lib/commonjs/index", 6 | "module": "lib/module/index", 7 | "types": "lib/typescript/index.d.ts", 8 | "react-native": "src/index", 9 | "source": "src/index", 10 | "files": [ 11 | "src", 12 | "lib", 13 | "android", 14 | "ios", 15 | "cpp", 16 | "*.podspec", 17 | "!lib/typescript/example", 18 | "!android/build", 19 | "!ios/build", 20 | "!**/__tests__", 21 | "!**/__fixtures__", 22 | "!**/__mocks__" 23 | ], 24 | "scripts": { 25 | "test": "jest", 26 | "typescript": "tsc --noEmit", 27 | "lint": "eslint \"**/*.{js,ts,tsx}\"", 28 | "prepare": "bob build", 29 | "release": "release-it", 30 | "example": "yarn --cwd example", 31 | "pods": "cd example && pod-install --quiet", 32 | "bootstrap": "yarn example && yarn && yarn pods" 33 | }, 34 | "keywords": [ 35 | "react-native", 36 | "ios", 37 | "android", 38 | "booking", 39 | "seat", 40 | "layout", 41 | "booking", 42 | "slots" 43 | ], 44 | "repository": "https://github.com/Mindinventory/react-native-bus-seat-layout", 45 | "author": "Mindinventory", 46 | "license": "MIT", 47 | "bugs": { 48 | "url": "https://github.com/Mindinventory/react-native-bus-seat-layout/issues" 49 | }, 50 | "homepage": "https://github.com/Mindinventory/react-native-bus-seat-layout#readme", 51 | "devDependencies": { 52 | "@commitlint/config-conventional": "^11.0.0", 53 | "@react-native-community/eslint-config": "^2.0.0", 54 | "@release-it/conventional-changelog": "^2.0.0", 55 | "@types/jest": "^27.4.1", 56 | "@types/react": "^18.0.5", 57 | "@types/react-native": "^0.67.4", 58 | "@types/react-test-renderer": "^18.0.0", 59 | "commitlint": "^11.0.0", 60 | "eslint": "^7.2.0", 61 | "eslint-config-prettier": "^7.0.0", 62 | "eslint-plugin-prettier": "^3.1.3", 63 | "husky": "^6.0.0", 64 | "jest": "^26.0.1", 65 | "pod-install": "^0.1.0", 66 | "prettier": "^2.0.5", 67 | "react": "16.13.1", 68 | "react-native": "0.63.5", 69 | "react-native-builder-bob": "^0.18.0", 70 | "release-it": "^14.2.2", 71 | "typescript": "^4.6.3" 72 | }, 73 | "peerDependencies": { 74 | "react": "*", 75 | "react-native": "*" 76 | }, 77 | "jest": { 78 | "preset": "react-native", 79 | "modulePathIgnorePatterns": [ 80 | "/example/node_modules", 81 | "/lib/" 82 | ] 83 | }, 84 | "commitlint": { 85 | "extends": [ 86 | "@commitlint/config-conventional" 87 | ] 88 | }, 89 | "release-it": { 90 | "git": { 91 | "commitMessage": "chore: release ${version}", 92 | "tagName": "v${version}" 93 | }, 94 | "npm": { 95 | "publish": true 96 | }, 97 | "github": { 98 | "release": true 99 | }, 100 | "plugins": { 101 | "@release-it/conventional-changelog": { 102 | "preset": "angular" 103 | } 104 | } 105 | }, 106 | "eslintConfig": { 107 | "root": true, 108 | "extends": [ 109 | "@react-native-community", 110 | "prettier" 111 | ], 112 | "rules": { 113 | "prettier/prettier": [ 114 | "error", 115 | { 116 | "quoteProps": "consistent", 117 | "singleQuote": true, 118 | "tabWidth": 2, 119 | "trailingComma": "es5", 120 | "useTabs": false 121 | } 122 | ] 123 | } 124 | }, 125 | "eslintIgnore": [ 126 | "node_modules/", 127 | "lib/" 128 | ], 129 | "prettier": { 130 | "quoteProps": "consistent", 131 | "singleQuote": true, 132 | "tabWidth": 2, 133 | "trailingComma": "es5", 134 | "useTabs": false 135 | }, 136 | "react-native-builder-bob": { 137 | "source": "src", 138 | "output": "lib", 139 | "targets": [ 140 | "commonjs", 141 | "module", 142 | [ 143 | "typescript", 144 | { 145 | "project": "tsconfig.build.json" 146 | } 147 | ] 148 | ] 149 | }, 150 | "dependencies": { 151 | "react-native-svg": "^12.3.0" 152 | }, 153 | "resolutions": { 154 | "@types/react": "18.0.5", 155 | "react-native": "^0.67.4" 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /src/component/Seat.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react-native/no-inline-styles */ 2 | import React from 'react'; 3 | import { 4 | Dimensions, 5 | ImageBackground, 6 | Text, 7 | TextStyle, 8 | TouchableOpacity, 9 | } from 'react-native'; 10 | import type { 11 | AvaiableSeat, 12 | BlockedSeat, 13 | DoorSeatImage, 14 | DriverSeat, 15 | SeatLayout, 16 | } from '../types/index'; 17 | import { 18 | bookinmgSeatNumberStyle, 19 | disableButton, 20 | imgBackgroundStyle, 21 | layoutImage, 22 | seatheight, 23 | selectedSeatColor, 24 | } from '../styles'; 25 | import { useMemo } from 'react'; 26 | 27 | export interface SeatProps { 28 | blockedSeatImage?: BlockedSeat; 29 | doorSeatImage?: DoorSeatImage; 30 | driverImage?: DriverSeat; 31 | isDisable: boolean; 32 | isSleeperLayout?: boolean; 33 | numberTextStyle?: TextStyle; 34 | onSeatSelect?: () => void; 35 | seatData: SeatLayout; 36 | seatImage?: AvaiableSeat; 37 | } 38 | 39 | export const seatHeightConst = 45; 40 | export const seatSleeperHeightConst = 85; 41 | export const seatWidthConst = Dimensions.get('screen').width / 6 - 20; 42 | 43 | const Seat: React.FC = ({ 44 | blockedSeatImage = undefined, 45 | driverImage = undefined, 46 | isDisable, 47 | doorSeatImage = undefined, 48 | isSleeperLayout, 49 | numberTextStyle, 50 | onSeatSelect, 51 | seatData, 52 | seatImage = undefined, 53 | }) => { 54 | const getSourceImage = useMemo(() => { 55 | if (seatData.type === 'driver' && driverImage !== undefined) { 56 | return driverImage.image; 57 | } else if ( 58 | (seatData.type === 'available' || 59 | seatData.type === 'women' || 60 | seatData.type === 'booked') && 61 | seatImage !== undefined 62 | ) { 63 | return seatImage.image; 64 | } else if (seatData.type === 'blocked' && blockedSeatImage !== undefined) { 65 | return blockedSeatImage.image; 66 | } else if (seatData.type === 'door' && doorSeatImage !== undefined) { 67 | return doorSeatImage?.image; 68 | } else { 69 | return layoutImage[seatData.type]; 70 | } 71 | }, [blockedSeatImage, doorSeatImage, driverImage, seatData.type, seatImage]); 72 | 73 | const getTintColorImage = useMemo(() => { 74 | if (seatData.type === 'driver' && driverImage !== undefined) { 75 | return driverImage.tintColor; 76 | } else if (seatData.type === 'available' && seatImage !== undefined) { 77 | return seatImage.tintColor; 78 | } else if (seatData.type === 'women') { 79 | return selectedSeatColor[seatData.type]; 80 | } else if (seatData.type === 'booked') { 81 | return selectedSeatColor[seatData.type]; 82 | } else if (seatData.type === 'blocked' && blockedSeatImage !== undefined) { 83 | return blockedSeatImage.tintColor; 84 | } else if (seatData.type === 'door' && doorSeatImage !== undefined) { 85 | return doorSeatImage.tintColor; 86 | } else { 87 | return selectedSeatColor[seatData.type]; 88 | } 89 | }, [blockedSeatImage, doorSeatImage, driverImage, seatData.type, seatImage]); 90 | 91 | return ( 92 | { 95 | if (!isDisable) { 96 | onSeatSelect && onSeatSelect(); 97 | } else if (seatData.isStatusChange) { 98 | onSeatSelect && onSeatSelect(); 99 | } 100 | }} 101 | style={{ 102 | height: 103 | seatData.type === 'driver' 104 | ? 35 105 | : isSleeperLayout 106 | ? seatheight[seatData.type] 107 | : seatHeightConst, 108 | width: seatData.type === 'driver' ? 35 : seatWidthConst, 109 | alignItems: 'center', 110 | justifyContent: 'center', 111 | alignSelf: 'center', 112 | }} 113 | > 114 | {seatData.type !== 'emptySpace' && ( 115 | 126 | {seatData.type !== 'driver' && 127 | seatData.type === 'booked' && 128 | seatData.isStatusChange && ( 129 | 130 | {seatData.seatNo} 131 | 132 | )} 133 | 134 | )} 135 | 136 | ); 137 | }; 138 | 139 | export default React.memo(Seat); 140 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @mindinventory/react-native-bus-seat-layout [![](https://img.shields.io/npm/v/@mindinventory/react-native-tab-bar-interaction.svg)](https://www.npmjs.com/package/@mindinventory/react-native-tab-bar-interaction) 2 | 3 | A @mindinventory/react-native-bus-seat-layout library provides seats layout for bus booking, you can give custom styles of seat numbers. also can give images for seat. you have to provide number of rows that you need to draw layout, you will get selected seats from props. 4 | 5 | Change node first: 6 | 7 | ```sh 8 | nvm alias default 16 9 | ``` 10 | 11 | ## Installation 12 | 13 | using npm: 14 | 15 | ```sh 16 | npm install @mindinventory/react-native-bus-seat-layout 17 | ``` 18 | 19 | using yarn: 20 | 21 | ```sh 22 | yarn add @mindinventory/react-native-bus-seat-layout 23 | ``` 24 | 25 | ## Preview 26 | 27 | ![Simulator Screen Recording - iPhone 11 - 2022-11-08 at 18 39 33](https://user-images.githubusercontent.com/82019401/200575512-eb7f94ed-43cf-4461-b209-836d3374fa6f.gif) 28 | ![Simulator Screen Recording - iPhone 11 - 2022-11-08 at 18 40 42](https://user-images.githubusercontent.com/82019401/200575530-1d4c6bf1-8d97-4cf6-8060-b640cc9486a7.gif) 29 | 30 | ### Supported platform 31 | 32 | - Android 33 | - Ios 34 | 35 | ## Usage 36 | 37 | ```js 38 | import SeatsLayout from '@mindinventory/react-native-bus-seat-layout'; 39 | ``` 40 | 41 | ```js 42 | { 62 | console.log('getBookedSeats :: ', seats); 63 | }} 64 | /> 65 | ``` 66 | 67 | # Props to use 68 | 69 | | Parameter | Type | Description | 70 | | --------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | 71 | | row | _number_ | Set number of rows to draw seat layout. | 72 | | layout | _Layout (Optional)_ | Default value `columnOne: 2` & `columnTwo: 2`. | 73 | | driverPosition | _string (Optional)_ | Accepts string args among `left` or `right`. Default is `right`. | 74 | | isSleeperLayout | _boolean (Optional)_ | Accepts boolean value either `true` or `false`. Default is `false`. | 75 | | maxSeatToSelect | _number (Optional)_ | Allow uset to select maximum number of seats to book in one go. Default value `7`. | 76 | | selectedSeats | _Array (Optional)_ | Accepts value seatNumber `number` and seatType `number` which accepts value from (`booked` or `women` or `blocked`). Default its set to blank array. | 77 | 78 | ## Contributing! 79 | 80 | See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. 81 | 82 | ## License! 83 | 84 | @mindinventory/react-native-bus-seat-layout [MIT-licensed](https://github.com/Mindinventory/react-native-bus-seat-layout/blob/main/LICENSE). 85 | 86 | # Let us know! 87 | 88 | If you use our open-source libraries in your project, please make sure to credit us and Give a star to www.mindinventory.com 89 | 90 |

Please feel free to use this component and Let us know if you are interested to building Apps or Designing Products.

91 | 92 | app development 93 | 94 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or 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 UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=`expr $i + 1` 158 | done 159 | case $i in 160 | 0) set -- ;; 161 | 1) set -- "$args0" ;; 162 | 2) set -- "$args0" "$args1" ;; 163 | 3) set -- "$args0" "$args1" "$args2" ;; 164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=`save "$@"` 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | exec "$JAVACMD" "$@" 184 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useCallback } from 'react'; 2 | import { View, FlatList, SafeAreaView, TextStyle } from 'react-native'; 3 | import type { 4 | AvaiableSeat, 5 | BlockedSeat, 6 | DoorSeatImage, 7 | DriverPosition, 8 | DriverSeat, 9 | Layout, 10 | SeatLayout, 11 | SelectedSeats, 12 | } from './types'; 13 | import { mainContainerStyle } from './styles'; 14 | import SeatContainer from './component/SeatContainer'; 15 | import { useLayoutEffect } from 'react'; 16 | import { useRef } from 'react'; 17 | 18 | /* 19 | This are props that require to pass in order to get seat layout 20 | */ 21 | export interface SeatsLayoutProps { 22 | blockedSeatImage?: BlockedSeat; 23 | doorSeatImage?: DoorSeatImage; 24 | driverImage?: DriverSeat; 25 | driverPosition?: DriverPosition; 26 | getBookedSeats?: (seats: Array) => void; 27 | isSleeperLayout?: boolean; 28 | layout: Layout; 29 | maxSeatToSelect?: number; 30 | numberTextStyle?: TextStyle; 31 | row: number; 32 | seatImage?: AvaiableSeat; 33 | selectedSeats?: Array; 34 | } 35 | const SeatsLayout: React.FC = ({ 36 | blockedSeatImage = undefined, 37 | driverImage = undefined, 38 | doorSeatImage = undefined, 39 | driverPosition = 'right', 40 | getBookedSeats, 41 | isSleeperLayout = false, 42 | layout = { columnOne: 2, columnTwo: 2 }, 43 | maxSeatToSelect = 7, 44 | numberTextStyle, 45 | row = 10, 46 | seatImage = undefined, 47 | selectedSeats = [], 48 | }) => { 49 | const [bookingSeat, setBookingSeat] = useState>>([]); 50 | 51 | const isEntryDoorAtFront = true; 52 | const userSelectedSeats = useRef>([]); 53 | 54 | useLayoutEffect(() => { 55 | let allArray: Array> = []; 56 | let i = 0; 57 | let seatNumber = 1; 58 | 59 | while (i < row) { 60 | let j = 0; 61 | let seatArray: Array = []; 62 | let seatLayout: SeatLayout = { 63 | id: '-1', 64 | type: 'blocked', 65 | }; 66 | if (i === 0 && j === 0) { 67 | // Add Bus layout has at front door 68 | if (isEntryDoorAtFront) { 69 | seatLayout = { 70 | id: `${i},${j}`, 71 | type: driverPosition === 'left' ? 'driver' : 'emptySpace', 72 | }; 73 | seatArray.push(seatLayout); 74 | } 75 | 76 | /* 77 | * Render empty space to show driver seat at last row and 78 | */ 79 | while (j < layout.columnOne + layout.columnTwo) { 80 | let iTotalColumn = layout.columnOne + layout.columnTwo; 81 | seatLayout = { 82 | id: '-1', 83 | type: 'blocked', 84 | }; 85 | if (j === iTotalColumn - 1) { 86 | seatLayout = { 87 | id: `${i},${j}`, 88 | type: driverPosition === 'left' ? 'emptySpace' : 'driver', 89 | }; 90 | seatArray.push(seatLayout); 91 | } else { 92 | seatLayout = { 93 | id: `${i},${j}`, 94 | type: 'emptySpace', 95 | }; 96 | seatArray.push(seatLayout); 97 | } 98 | if (!isEntryDoorAtFront && j === layout.columnOne - 1) { 99 | seatLayout = { 100 | id: `${i},${j}`, 101 | type: 'emptySpace', 102 | }; 103 | seatArray.push(seatLayout); 104 | } 105 | j += 1; 106 | } 107 | } else { 108 | //Set Index value in id to all seat type for to make them selectable. 109 | let bSpaceAdded = false; 110 | let revCounter = i * (layout.columnOne + layout.columnTwo); 111 | 112 | if (row % 2 !== 0 && i === row - 1) { 113 | revCounter += 1; 114 | } 115 | 116 | while (j < layout.columnOne + layout.columnTwo) { 117 | let preSelectedSeatItem = selectedSeats.filter((item) => { 118 | return item.seatNumber === (i % 2 === 0 ? revCounter : seatNumber); 119 | }); 120 | 121 | seatLayout = { 122 | id: `${i},${bSpaceAdded ? j + 1 : j}`, 123 | type: 124 | preSelectedSeatItem.length > 0 125 | ? preSelectedSeatItem[0].seatType 126 | : 'available', 127 | seatNo: i % 2 === 0 ? revCounter : seatNumber, 128 | isSeatSeleced: preSelectedSeatItem.length > 0, 129 | }; 130 | seatArray.push(seatLayout); 131 | /* 132 | * Add space between rows of seat and add seat for last row. 133 | */ 134 | if (j === layout.columnOne - 1) { 135 | let seatNo = 0; 136 | if (i === row - 1) { 137 | if (row % 2 !== 0) { 138 | revCounter -= 1; 139 | seatNo = revCounter; 140 | } else { 141 | seatNo = seatNumber += 1; 142 | } 143 | } 144 | 145 | seatLayout = { 146 | id: `${i},${j + 1}`, 147 | type: 148 | i === row - 1 149 | ? preSelectedSeatItem.length > 0 150 | ? preSelectedSeatItem[0].seatType 151 | : 'available' 152 | : 'emptySpace', 153 | seatNo: seatNo, 154 | isSeatSeleced: 155 | i === row - 1 ? preSelectedSeatItem.length > 0 : false, 156 | }; 157 | seatArray.push(seatLayout); 158 | bSpaceAdded = true; 159 | } 160 | j += 1; 161 | 162 | revCounter -= 1; 163 | seatNumber += 1; 164 | } 165 | } 166 | allArray.push(seatArray); 167 | i += 1; 168 | } 169 | setBookingSeat(allArray); 170 | // eslint-disable-next-line react-hooks/exhaustive-deps 171 | }, []); 172 | 173 | useLayoutEffect(() => { 174 | getBookedSeats && getBookedSeats(userSelectedSeats.current); 175 | // eslint-disable-next-line react-hooks/exhaustive-deps 176 | }, [userSelectedSeats.current]); 177 | 178 | const onSeatSelected = useCallback( 179 | (seat: SeatLayout) => { 180 | let allChangedItem: Array> = [...bookingSeat]; 181 | const { id } = seat; 182 | const arrindexs: Array = id 183 | .split(',') 184 | .map((item) => Number(item)); 185 | let changeItem = seat; 186 | changeItem.type = 187 | changeItem.type === 'available' ? 'booked' : 'available'; 188 | changeItem.isStatusChange = true; 189 | allChangedItem[arrindexs[0]][arrindexs[1]] = changeItem; 190 | 191 | setBookingSeat([...allChangedItem]); 192 | getSelectedSeats([...allChangedItem]); 193 | }, 194 | [bookingSeat] 195 | ); 196 | 197 | const getSelectedSeats = (bookingSeatArg: Array>) => { 198 | let filterSelectedSeats = bookingSeatArg.flatMap((rowSeatArr) => { 199 | return rowSeatArr.filter((rowSeat) => { 200 | return rowSeat.type === 'booked' && rowSeat.isStatusChange; 201 | }); 202 | }); 203 | userSelectedSeats.current = filterSelectedSeats; 204 | // setUserSelectedSeat(filterSelectedSeats); 205 | }; 206 | 207 | const renderSeatlayout = (item: Array, index: number) => { 208 | return ( 209 | { 220 | onSeatSelected(seat); 221 | }} 222 | /> 223 | ); 224 | }; 225 | 226 | return ( 227 | 228 | 229 | { 234 | return renderSeatlayout(item, index); 235 | }} 236 | keyExtractor={(item: SeatLayout[]) => item[0].id} 237 | /> 238 | 239 | 240 | ); 241 | }; 242 | 243 | export default React.memo(SeatsLayout); 244 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 22 | * bundleCommand: "ram-bundle", 23 | * 24 | * // whether to bundle JS and assets in debug mode 25 | * bundleInDebug: false, 26 | * 27 | * // whether to bundle JS and assets in release mode 28 | * bundleInRelease: true, 29 | * 30 | * // whether to bundle JS and assets in another build variant (if configured). 31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 32 | * // The configuration property can be in the following formats 33 | * // 'bundleIn${productFlavor}${buildType}' 34 | * // 'bundleIn${buildType}' 35 | * // bundleInFreeDebug: true, 36 | * // bundleInPaidRelease: true, 37 | * // bundleInBeta: true, 38 | * 39 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 40 | * // for BookingTicketExample: to disable dev mode in the staging build type (if configured) 41 | * devDisabledInStaging: true, 42 | * // The configuration property can be in the following formats 43 | * // 'devDisabledIn${productFlavor}${buildType}' 44 | * // 'devDisabledIn${buildType}' 45 | * 46 | * // the root of your project, i.e. where "package.json" lives 47 | * root: "../../", 48 | * 49 | * // where to put the JS bundle asset in debug mode 50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 51 | * 52 | * // where to put the JS bundle asset in release mode 53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 54 | * 55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 56 | * // require('./image.png')), in debug mode 57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 58 | * 59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 60 | * // require('./image.png')), in release mode 61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 62 | * 63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 67 | * // for BookingTicketExample, you might want to remove it from here. 68 | * inputExcludes: ["android/**", "ios/**"], 69 | * 70 | * // override which node gets called and with what additional arguments 71 | * nodeExecutableAndArgs: ["node"], 72 | * 73 | * // supply additional arguments to the packager 74 | * extraPackagerArgs: [] 75 | * ] 76 | */ 77 | 78 | project.ext.react = [ 79 | enableHermes: false, // clean and rebuild if changing 80 | entryFile: "index.tsx", 81 | ] 82 | 83 | apply from: "../../node_modules/react-native/react.gradle" 84 | 85 | /** 86 | * Set this to true to create two separate APKs instead of one: 87 | * - An APK that only works on ARM devices 88 | * - An APK that only works on x86 devices 89 | * The advantage is the size of the APK is reduced by about 4MB. 90 | * Upload all the APKs to the Play Store and people will download 91 | * the correct one based on the CPU architecture of their device. 92 | */ 93 | def enableSeparateBuildPerCPUArchitecture = false 94 | 95 | /** 96 | * Run Proguard to shrink the Java bytecode in release builds. 97 | */ 98 | def enableProguardInReleaseBuilds = false 99 | 100 | /** 101 | * The preferred build flavor of JavaScriptCore. 102 | * 103 | * For BookingTicketExample, to use the international variant, you can use: 104 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 105 | * 106 | * The international variant includes ICU i18n library and necessary data 107 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 108 | * give correct results when using with locales other than en-US. Note that 109 | * this variant is about 6MiB larger per architecture than default. 110 | */ 111 | def jscFlavor = 'org.webkit:android-jsc:+' 112 | 113 | /** 114 | * Whether to enable the Hermes VM. 115 | * 116 | * This should be set on project.ext.react and mirrored here. If it is not set 117 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 118 | * and the benefits of using Hermes will therefore be sharply reduced. 119 | */ 120 | def enableHermes = project.ext.react.get("enableHermes", false); 121 | 122 | android { 123 | compileSdkVersion rootProject.ext.compileSdkVersion 124 | 125 | compileOptions { 126 | sourceCompatibility JavaVersion.VERSION_1_8 127 | targetCompatibility JavaVersion.VERSION_1_8 128 | } 129 | 130 | defaultConfig { 131 | applicationId "com.example.reactnativebookingticket" 132 | minSdkVersion rootProject.ext.minSdkVersion 133 | targetSdkVersion rootProject.ext.targetSdkVersion 134 | versionCode 1 135 | versionName "1.0" 136 | } 137 | splits { 138 | abi { 139 | reset() 140 | enable enableSeparateBuildPerCPUArchitecture 141 | universalApk false // If true, also generate a universal APK 142 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 143 | } 144 | } 145 | signingConfigs { 146 | debug { 147 | storeFile file('debug.keystore') 148 | storePassword 'android' 149 | keyAlias 'androiddebugkey' 150 | keyPassword 'android' 151 | } 152 | } 153 | buildTypes { 154 | debug { 155 | signingConfig signingConfigs.debug 156 | } 157 | release { 158 | // Caution! In production, you need to generate your own keystore file. 159 | // see https://reactnative.dev/docs/signed-apk-android. 160 | signingConfig signingConfigs.debug 161 | minifyEnabled enableProguardInReleaseBuilds 162 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 163 | } 164 | } 165 | // applicationVariants are e.g. debug, release 166 | applicationVariants.all { variant -> 167 | variant.outputs.each { output -> 168 | // For each separate APK per architecture, set a unique version code as described here: 169 | // https://developer.android.com/studio/build/configure-apk-splits.html 170 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 171 | def abi = output.getFilter(OutputFile.ABI) 172 | if (abi != null) { // null for the universal-debug, universal-release variants 173 | output.versionCodeOverride = 174 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 175 | } 176 | 177 | } 178 | } 179 | } 180 | 181 | dependencies { 182 | implementation fileTree(dir: "libs", include: ["*.jar"]) 183 | //noinspection GradleDynamicVersion 184 | implementation "com.facebook.react:react-native:+" // From node_modules 185 | 186 | 187 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 188 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 189 | exclude group:'com.facebook.fbjni' 190 | } 191 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 192 | exclude group:'com.facebook.flipper' 193 | exclude group:'com.squareup.okhttp3', module:'okhttp' 194 | } 195 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 196 | exclude group:'com.facebook.flipper' 197 | } 198 | 199 | if (enableHermes) { 200 | def hermesPath = "../../node_modules/hermes-engine/android/"; 201 | debugImplementation files(hermesPath + "hermes-debug.aar") 202 | releaseImplementation files(hermesPath + "hermes-release.aar") 203 | } else { 204 | implementation jscFlavor 205 | } 206 | 207 | } 208 | 209 | // Run this once to be able to run the application with BUCK 210 | // puts all compile dependencies into folder libs for BUCK to use 211 | task copyDownloadableDepsToLibs(type: Copy) { 212 | from configurations.compile 213 | into 'libs' 214 | } 215 | 216 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 217 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. 4 | 5 | ## Development workflow 6 | 7 | To get started with the project, run `yarn` in the root directory to install the required dependencies for each package: 8 | 9 | ```sh 10 | yarn 11 | ``` 12 | 13 | > While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development. 14 | 15 | While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app. 16 | 17 | To start the packager: 18 | 19 | ```sh 20 | yarn example start 21 | ``` 22 | 23 | To run the example app on Android: 24 | 25 | ```sh 26 | yarn example android 27 | ``` 28 | 29 | To run the example app on iOS: 30 | 31 | ```sh 32 | yarn example ios 33 | ``` 34 | 35 | To run the example app on Web: 36 | 37 | ```sh 38 | yarn example web 39 | ``` 40 | 41 | Make sure your code passes TypeScript and ESLint. Run the following to verify: 42 | 43 | ```sh 44 | yarn typescript 45 | yarn lint 46 | ``` 47 | 48 | To fix formatting errors, run the following: 49 | 50 | ```sh 51 | yarn lint --fix 52 | ``` 53 | 54 | Remember to add tests for your change if possible. Run the unit tests by: 55 | 56 | ```sh 57 | yarn test 58 | ``` 59 | 60 | ### Commit message convention 61 | 62 | We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages: 63 | 64 | - `fix`: bug fixes, e.g. fix crash due to deprecated method. 65 | - `feat`: new features, e.g. add new method to the module. 66 | - `refactor`: code refactor, e.g. migrate from class components to hooks. 67 | - `docs`: changes into documentation, e.g. add usage example for the module.. 68 | - `test`: adding or updating tests, e.g. add integration tests using detox. 69 | - `chore`: tooling changes, e.g. change CI config. 70 | 71 | Our pre-commit hooks verify that your commit message matches this format when committing. 72 | 73 | ### Linting and tests 74 | 75 | [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/) 76 | 77 | We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing. 78 | 79 | Our pre-commit hooks verify that the linter and tests pass when committing. 80 | 81 | ### Publishing to npm 82 | 83 | We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc. 84 | 85 | To publish new versions, run the following: 86 | 87 | ```sh 88 | yarn release 89 | ``` 90 | 91 | ### Scripts 92 | 93 | The `package.json` file contains various scripts for common tasks: 94 | 95 | - `yarn bootstrap`: setup project by installing all dependencies and pods. 96 | - `yarn typescript`: type-check files with TypeScript. 97 | - `yarn lint`: lint files with ESLint. 98 | - `yarn test`: run unit tests with Jest. 99 | - `yarn example start`: start the Metro server for the example app. 100 | - `yarn example android`: run the example app on Android. 101 | - `yarn example ios`: run the example app on iOS. 102 | 103 | ### Sending a pull request 104 | 105 | > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github). 106 | 107 | When you're sending a pull request: 108 | 109 | - Prefer small pull requests focused on one change. 110 | - Verify that linters and tests are passing. 111 | - Review the documentation to make sure it looks good. 112 | - Follow the pull request template when opening a pull request. 113 | - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue. 114 | 115 | ## Code of Conduct 116 | 117 | ### Our Pledge 118 | 119 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 120 | 121 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. 122 | 123 | ### Our Standards 124 | 125 | Examples of behavior that contributes to a positive environment for our community include: 126 | 127 | - Demonstrating empathy and kindness toward other people 128 | - Being respectful of differing opinions, viewpoints, and experiences 129 | - Giving and gracefully accepting constructive feedback 130 | - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience 131 | - Focusing on what is best not just for us as individuals, but for the overall community 132 | 133 | Examples of unacceptable behavior include: 134 | 135 | - The use of sexualized language or imagery, and sexual attention or 136 | advances of any kind 137 | - Trolling, insulting or derogatory comments, and personal or political attacks 138 | - Public or private harassment 139 | - Publishing others' private information, such as a physical or email 140 | address, without their explicit permission 141 | - Other conduct which could reasonably be considered inappropriate in a 142 | professional setting 143 | 144 | ### Enforcement Responsibilities 145 | 146 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. 147 | 148 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. 149 | 150 | ### Scope 151 | 152 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 153 | 154 | ### Enforcement 155 | 156 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly. 157 | 158 | All community leaders are obligated to respect the privacy and security of the reporter of any incident. 159 | 160 | ### Enforcement Guidelines 161 | 162 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: 163 | 164 | #### 1. Correction 165 | 166 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. 167 | 168 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. 169 | 170 | #### 2. Warning 171 | 172 | **Community Impact**: A violation through a single incident or series of actions. 173 | 174 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. 175 | 176 | #### 3. Temporary Ban 177 | 178 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. 179 | 180 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. 181 | 182 | #### 4. Permanent Ban 183 | 184 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. 185 | 186 | **Consequence**: A permanent ban from any sort of public interaction within the community. 187 | 188 | ### Attribution 189 | 190 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, 191 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 192 | 193 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). 194 | 195 | [homepage]: https://www.contributor-covenant.org 196 | 197 | For answers to common questions about this code of conduct, see the FAQ at 198 | https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. 199 | -------------------------------------------------------------------------------- /example/ios/BookingTicketExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* BookingTicketExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BookingTicketExampleTests.m */; }; 11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 14 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 15 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 16 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 17 | 2DCD954D1E0B4F2C00145EB5 /* BookingTicketExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BookingTicketExampleTests.m */; }; 18 | 4C39C56BAD484C67AA576FFA /* libPods-BookingTicketExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA3E69C5B9553B26FBA2DF04 /* libPods-BookingTicketExample.a */; }; 19 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 28 | remoteInfo = BookingTicketExample; 29 | }; 30 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 35 | remoteInfo = "BookingTicketExample-tvOS"; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 41 | 00E356EE1AD99517003FC87E /* BookingTicketExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BookingTicketExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 00E356F21AD99517003FC87E /* BookingTicketExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BookingTicketExampleTests.m; sourceTree = ""; }; 44 | 13B07F961A680F5B00A75B9A /* BookingTicketExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BookingTicketExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = BookingTicketExample/AppDelegate.h; sourceTree = ""; }; 46 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = BookingTicketExample/AppDelegate.m; sourceTree = ""; }; 47 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = BookingTicketExample/Images.xcassets; sourceTree = ""; }; 48 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = BookingTicketExample/Info.plist; sourceTree = ""; }; 49 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = BookingTicketExample/main.m; sourceTree = ""; }; 50 | 2D02E47B1E0B4A5D006451C7 /* BookingTicketExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BookingTicketExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 2D02E4901E0B4A5D006451C7 /* BookingTicketExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BookingTicketExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 47F7ED3B7971BE374F7B8635 /* Pods-BookingTicketExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BookingTicketExample.debug.xcconfig"; path = "Target Support Files/Pods-BookingTicketExample/Pods-BookingTicketExample.debug.xcconfig"; sourceTree = ""; }; 53 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = BookingTicketExample/LaunchScreen.storyboard; sourceTree = ""; }; 54 | CA3E69C5B9553B26FBA2DF04 /* libPods-BookingTicketExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BookingTicketExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | E00ACF0FDA8BF921659E2F9A /* Pods-BookingTicketExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BookingTicketExample.release.xcconfig"; path = "Target Support Files/Pods-BookingTicketExample/Pods-BookingTicketExample.release.xcconfig"; sourceTree = ""; }; 56 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 57 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | 4C39C56BAD484C67AA576FFA /* libPods-BookingTicketExample.a in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | /* End PBXFrameworksBuildPhase section */ 91 | 92 | /* Begin PBXGroup section */ 93 | 00E356EF1AD99517003FC87E /* BookingTicketExampleTests */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 00E356F21AD99517003FC87E /* BookingTicketExampleTests.m */, 97 | 00E356F01AD99517003FC87E /* Supporting Files */, 98 | ); 99 | path = BookingTicketExampleTests; 100 | sourceTree = ""; 101 | }; 102 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 00E356F11AD99517003FC87E /* Info.plist */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | 13B07FAE1A68108700A75B9A /* BookingTicketExample */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 114 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 115 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 116 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 117 | 13B07FB61A68108700A75B9A /* Info.plist */, 118 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 119 | 13B07FB71A68108700A75B9A /* main.m */, 120 | ); 121 | name = BookingTicketExample; 122 | sourceTree = ""; 123 | }; 124 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 128 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 129 | CA3E69C5B9553B26FBA2DF04 /* libPods-BookingTicketExample.a */, 130 | ); 131 | name = Frameworks; 132 | sourceTree = ""; 133 | }; 134 | 6B9684456A2045ADE5A6E47E /* Pods */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 47F7ED3B7971BE374F7B8635 /* Pods-BookingTicketExample.debug.xcconfig */, 138 | E00ACF0FDA8BF921659E2F9A /* Pods-BookingTicketExample.release.xcconfig */, 139 | ); 140 | path = Pods; 141 | sourceTree = ""; 142 | }; 143 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | ); 147 | name = Libraries; 148 | sourceTree = ""; 149 | }; 150 | 83CBB9F61A601CBA00E9B192 = { 151 | isa = PBXGroup; 152 | children = ( 153 | 13B07FAE1A68108700A75B9A /* BookingTicketExample */, 154 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 155 | 00E356EF1AD99517003FC87E /* BookingTicketExampleTests */, 156 | 83CBBA001A601CBA00E9B192 /* Products */, 157 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 158 | 6B9684456A2045ADE5A6E47E /* Pods */, 159 | ); 160 | indentWidth = 2; 161 | sourceTree = ""; 162 | tabWidth = 2; 163 | usesTabs = 0; 164 | }; 165 | 83CBBA001A601CBA00E9B192 /* Products */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 13B07F961A680F5B00A75B9A /* BookingTicketExample.app */, 169 | 00E356EE1AD99517003FC87E /* BookingTicketExampleTests.xctest */, 170 | 2D02E47B1E0B4A5D006451C7 /* BookingTicketExample-tvOS.app */, 171 | 2D02E4901E0B4A5D006451C7 /* BookingTicketExample-tvOSTests.xctest */, 172 | ); 173 | name = Products; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXNativeTarget section */ 179 | 00E356ED1AD99517003FC87E /* BookingTicketExampleTests */ = { 180 | isa = PBXNativeTarget; 181 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BookingTicketExampleTests" */; 182 | buildPhases = ( 183 | 00E356EA1AD99517003FC87E /* Sources */, 184 | 00E356EB1AD99517003FC87E /* Frameworks */, 185 | 00E356EC1AD99517003FC87E /* Resources */, 186 | ); 187 | buildRules = ( 188 | ); 189 | dependencies = ( 190 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 191 | ); 192 | name = BookingTicketExampleTests; 193 | productName = BookingTicketExampleTests; 194 | productReference = 00E356EE1AD99517003FC87E /* BookingTicketExampleTests.xctest */; 195 | productType = "com.apple.product-type.bundle.unit-test"; 196 | }; 197 | 13B07F861A680F5B00A75B9A /* BookingTicketExample */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BookingTicketExample" */; 200 | buildPhases = ( 201 | 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */, 202 | FD10A7F022414F080027D42C /* Start Packager */, 203 | 13B07F871A680F5B00A75B9A /* Sources */, 204 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 205 | 13B07F8E1A680F5B00A75B9A /* Resources */, 206 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 207 | C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */, 208 | ); 209 | buildRules = ( 210 | ); 211 | dependencies = ( 212 | ); 213 | name = BookingTicketExample; 214 | productName = BookingTicketExample; 215 | productReference = 13B07F961A680F5B00A75B9A /* BookingTicketExample.app */; 216 | productType = "com.apple.product-type.application"; 217 | }; 218 | 2D02E47A1E0B4A5D006451C7 /* BookingTicketExample-tvOS */ = { 219 | isa = PBXNativeTarget; 220 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BookingTicketExample-tvOS" */; 221 | buildPhases = ( 222 | FD10A7F122414F3F0027D42C /* Start Packager */, 223 | 2D02E4771E0B4A5D006451C7 /* Sources */, 224 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 225 | 2D02E4791E0B4A5D006451C7 /* Resources */, 226 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 227 | ); 228 | buildRules = ( 229 | ); 230 | dependencies = ( 231 | ); 232 | name = "BookingTicketExample-tvOS"; 233 | productName = "BookingTicketExample-tvOS"; 234 | productReference = 2D02E47B1E0B4A5D006451C7 /* BookingTicketExample-tvOS.app */; 235 | productType = "com.apple.product-type.application"; 236 | }; 237 | 2D02E48F1E0B4A5D006451C7 /* BookingTicketExample-tvOSTests */ = { 238 | isa = PBXNativeTarget; 239 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BookingTicketExample-tvOSTests" */; 240 | buildPhases = ( 241 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 242 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 243 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 244 | ); 245 | buildRules = ( 246 | ); 247 | dependencies = ( 248 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 249 | ); 250 | name = "BookingTicketExample-tvOSTests"; 251 | productName = "BookingTicketExample-tvOSTests"; 252 | productReference = 2D02E4901E0B4A5D006451C7 /* BookingTicketExample-tvOSTests.xctest */; 253 | productType = "com.apple.product-type.bundle.unit-test"; 254 | }; 255 | /* End PBXNativeTarget section */ 256 | 257 | /* Begin PBXProject section */ 258 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 259 | isa = PBXProject; 260 | attributes = { 261 | LastUpgradeCheck = 1130; 262 | TargetAttributes = { 263 | 00E356ED1AD99517003FC87E = { 264 | CreatedOnToolsVersion = 6.2; 265 | TestTargetID = 13B07F861A680F5B00A75B9A; 266 | }; 267 | 13B07F861A680F5B00A75B9A = { 268 | LastSwiftMigration = 1120; 269 | }; 270 | 2D02E47A1E0B4A5D006451C7 = { 271 | CreatedOnToolsVersion = 8.2.1; 272 | ProvisioningStyle = Automatic; 273 | }; 274 | 2D02E48F1E0B4A5D006451C7 = { 275 | CreatedOnToolsVersion = 8.2.1; 276 | ProvisioningStyle = Automatic; 277 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 278 | }; 279 | }; 280 | }; 281 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BookingTicketExample" */; 282 | compatibilityVersion = "Xcode 3.2"; 283 | developmentRegion = en; 284 | hasScannedForEncodings = 0; 285 | knownRegions = ( 286 | en, 287 | Base, 288 | ); 289 | mainGroup = 83CBB9F61A601CBA00E9B192; 290 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 291 | projectDirPath = ""; 292 | projectRoot = ""; 293 | targets = ( 294 | 13B07F861A680F5B00A75B9A /* BookingTicketExample */, 295 | 00E356ED1AD99517003FC87E /* BookingTicketExampleTests */, 296 | 2D02E47A1E0B4A5D006451C7 /* BookingTicketExample-tvOS */, 297 | 2D02E48F1E0B4A5D006451C7 /* BookingTicketExample-tvOSTests */, 298 | ); 299 | }; 300 | /* End PBXProject section */ 301 | 302 | /* Begin PBXResourcesBuildPhase section */ 303 | 00E356EC1AD99517003FC87E /* Resources */ = { 304 | isa = PBXResourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 311 | isa = PBXResourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 315 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 316 | ); 317 | runOnlyForDeploymentPostprocessing = 0; 318 | }; 319 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 320 | isa = PBXResourcesBuildPhase; 321 | buildActionMask = 2147483647; 322 | files = ( 323 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 328 | isa = PBXResourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | /* End PBXResourcesBuildPhase section */ 335 | 336 | /* Begin PBXShellScriptBuildPhase section */ 337 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 338 | isa = PBXShellScriptBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | ); 342 | inputPaths = ( 343 | ); 344 | name = "Bundle React Native code and images"; 345 | outputPaths = ( 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | shellPath = /bin/sh; 349 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; 350 | }; 351 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 352 | isa = PBXShellScriptBuildPhase; 353 | buildActionMask = 2147483647; 354 | files = ( 355 | ); 356 | inputPaths = ( 357 | ); 358 | name = "Bundle React Native Code And Images"; 359 | outputPaths = ( 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | shellPath = /bin/sh; 363 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 364 | }; 365 | 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */ = { 366 | isa = PBXShellScriptBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | ); 370 | inputFileListPaths = ( 371 | ); 372 | inputPaths = ( 373 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 374 | "${PODS_ROOT}/Manifest.lock", 375 | ); 376 | name = "[CP] Check Pods Manifest.lock"; 377 | outputFileListPaths = ( 378 | ); 379 | outputPaths = ( 380 | "$(DERIVED_FILE_DIR)/Pods-BookingTicketExample-checkManifestLockResult.txt", 381 | ); 382 | runOnlyForDeploymentPostprocessing = 0; 383 | shellPath = /bin/sh; 384 | 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"; 385 | showEnvVarsInLog = 0; 386 | }; 387 | C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */ = { 388 | isa = PBXShellScriptBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | ); 392 | inputPaths = ( 393 | "${PODS_ROOT}/Target Support Files/Pods-BookingTicketExample/Pods-BookingTicketExample-resources.sh", 394 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", 395 | ); 396 | name = "[CP] Copy Pods Resources"; 397 | outputPaths = ( 398 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | shellPath = /bin/sh; 402 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BookingTicketExample/Pods-BookingTicketExample-resources.sh\"\n"; 403 | showEnvVarsInLog = 0; 404 | }; 405 | FD10A7F022414F080027D42C /* Start Packager */ = { 406 | isa = PBXShellScriptBuildPhase; 407 | buildActionMask = 2147483647; 408 | files = ( 409 | ); 410 | inputFileListPaths = ( 411 | ); 412 | inputPaths = ( 413 | ); 414 | name = "Start Packager"; 415 | outputFileListPaths = ( 416 | ); 417 | outputPaths = ( 418 | ); 419 | runOnlyForDeploymentPostprocessing = 0; 420 | shellPath = /bin/sh; 421 | 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"; 422 | showEnvVarsInLog = 0; 423 | }; 424 | FD10A7F122414F3F0027D42C /* Start Packager */ = { 425 | isa = PBXShellScriptBuildPhase; 426 | buildActionMask = 2147483647; 427 | files = ( 428 | ); 429 | inputFileListPaths = ( 430 | ); 431 | inputPaths = ( 432 | ); 433 | name = "Start Packager"; 434 | outputFileListPaths = ( 435 | ); 436 | outputPaths = ( 437 | ); 438 | runOnlyForDeploymentPostprocessing = 0; 439 | shellPath = /bin/sh; 440 | 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"; 441 | showEnvVarsInLog = 0; 442 | }; 443 | /* End PBXShellScriptBuildPhase section */ 444 | 445 | /* Begin PBXSourcesBuildPhase section */ 446 | 00E356EA1AD99517003FC87E /* Sources */ = { 447 | isa = PBXSourcesBuildPhase; 448 | buildActionMask = 2147483647; 449 | files = ( 450 | 00E356F31AD99517003FC87E /* BookingTicketExampleTests.m in Sources */, 451 | ); 452 | runOnlyForDeploymentPostprocessing = 0; 453 | }; 454 | 13B07F871A680F5B00A75B9A /* Sources */ = { 455 | isa = PBXSourcesBuildPhase; 456 | buildActionMask = 2147483647; 457 | files = ( 458 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 459 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 460 | ); 461 | runOnlyForDeploymentPostprocessing = 0; 462 | }; 463 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 464 | isa = PBXSourcesBuildPhase; 465 | buildActionMask = 2147483647; 466 | files = ( 467 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 468 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 469 | ); 470 | runOnlyForDeploymentPostprocessing = 0; 471 | }; 472 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 473 | isa = PBXSourcesBuildPhase; 474 | buildActionMask = 2147483647; 475 | files = ( 476 | 2DCD954D1E0B4F2C00145EB5 /* BookingTicketExampleTests.m in Sources */, 477 | ); 478 | runOnlyForDeploymentPostprocessing = 0; 479 | }; 480 | /* End PBXSourcesBuildPhase section */ 481 | 482 | /* Begin PBXTargetDependency section */ 483 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 484 | isa = PBXTargetDependency; 485 | target = 13B07F861A680F5B00A75B9A /* BookingTicketExample */; 486 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 487 | }; 488 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 489 | isa = PBXTargetDependency; 490 | target = 2D02E47A1E0B4A5D006451C7 /* BookingTicketExample-tvOS */; 491 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 492 | }; 493 | /* End PBXTargetDependency section */ 494 | 495 | /* Begin XCBuildConfiguration section */ 496 | 00E356F61AD99517003FC87E /* Debug */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | BUNDLE_LOADER = "$(TEST_HOST)"; 500 | GCC_PREPROCESSOR_DEFINITIONS = ( 501 | "DEBUG=1", 502 | "$(inherited)", 503 | ); 504 | INFOPLIST_FILE = BookingTicketExampleTests/Info.plist; 505 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 507 | OTHER_LDFLAGS = ( 508 | "-ObjC", 509 | "-lc++", 510 | "$(inherited)", 511 | ); 512 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativebookingticket; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BookingTicketExample.app/BookingTicketExample"; 515 | }; 516 | name = Debug; 517 | }; 518 | 00E356F71AD99517003FC87E /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | BUNDLE_LOADER = "$(TEST_HOST)"; 522 | COPY_PHASE_STRIP = NO; 523 | INFOPLIST_FILE = BookingTicketExampleTests/Info.plist; 524 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 525 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 526 | OTHER_LDFLAGS = ( 527 | "-ObjC", 528 | "-lc++", 529 | "$(inherited)", 530 | ); 531 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativebookingticket; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BookingTicketExample.app/BookingTicketExample"; 534 | }; 535 | name = Release; 536 | }; 537 | 13B07F941A680F5B00A75B9A /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | baseConfigurationReference = 47F7ED3B7971BE374F7B8635 /* Pods-BookingTicketExample.debug.xcconfig */; 540 | buildSettings = { 541 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 542 | CLANG_ENABLE_MODULES = YES; 543 | CURRENT_PROJECT_VERSION = 1; 544 | ENABLE_BITCODE = NO; 545 | INFOPLIST_FILE = BookingTicketExample/Info.plist; 546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 547 | OTHER_LDFLAGS = ( 548 | "$(inherited)", 549 | "-ObjC", 550 | "-lc++", 551 | ); 552 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativebookingticket; 553 | PRODUCT_NAME = BookingTicketExample; 554 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 555 | SWIFT_VERSION = 5.0; 556 | VERSIONING_SYSTEM = "apple-generic"; 557 | }; 558 | name = Debug; 559 | }; 560 | 13B07F951A680F5B00A75B9A /* Release */ = { 561 | isa = XCBuildConfiguration; 562 | baseConfigurationReference = E00ACF0FDA8BF921659E2F9A /* Pods-BookingTicketExample.release.xcconfig */; 563 | buildSettings = { 564 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 565 | CLANG_ENABLE_MODULES = YES; 566 | CURRENT_PROJECT_VERSION = 1; 567 | INFOPLIST_FILE = BookingTicketExample/Info.plist; 568 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 569 | OTHER_LDFLAGS = ( 570 | "$(inherited)", 571 | "-ObjC", 572 | "-lc++", 573 | ); 574 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativebookingticket; 575 | PRODUCT_NAME = BookingTicketExample; 576 | SWIFT_VERSION = 5.0; 577 | VERSIONING_SYSTEM = "apple-generic"; 578 | }; 579 | name = Release; 580 | }; 581 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 582 | isa = XCBuildConfiguration; 583 | buildSettings = { 584 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 585 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 586 | CLANG_ANALYZER_NONNULL = YES; 587 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 588 | CLANG_WARN_INFINITE_RECURSION = YES; 589 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 590 | DEBUG_INFORMATION_FORMAT = dwarf; 591 | ENABLE_TESTABILITY = YES; 592 | GCC_NO_COMMON_BLOCKS = YES; 593 | INFOPLIST_FILE = "BookingTicketExample-tvOS/Info.plist"; 594 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 595 | OTHER_LDFLAGS = ( 596 | "$(inherited)", 597 | "-ObjC", 598 | "-lc++", 599 | ); 600 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.BookingTicketExample-tvOS"; 601 | PRODUCT_NAME = "$(TARGET_NAME)"; 602 | SDKROOT = appletvos; 603 | TARGETED_DEVICE_FAMILY = 3; 604 | TVOS_DEPLOYMENT_TARGET = 10.0; 605 | }; 606 | name = Debug; 607 | }; 608 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 609 | isa = XCBuildConfiguration; 610 | buildSettings = { 611 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 612 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 613 | CLANG_ANALYZER_NONNULL = YES; 614 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 615 | CLANG_WARN_INFINITE_RECURSION = YES; 616 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 617 | COPY_PHASE_STRIP = NO; 618 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 619 | GCC_NO_COMMON_BLOCKS = YES; 620 | INFOPLIST_FILE = "BookingTicketExample-tvOS/Info.plist"; 621 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 622 | OTHER_LDFLAGS = ( 623 | "$(inherited)", 624 | "-ObjC", 625 | "-lc++", 626 | ); 627 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.BookingTicketExample-tvOS"; 628 | PRODUCT_NAME = "$(TARGET_NAME)"; 629 | SDKROOT = appletvos; 630 | TARGETED_DEVICE_FAMILY = 3; 631 | TVOS_DEPLOYMENT_TARGET = 10.0; 632 | }; 633 | name = Release; 634 | }; 635 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 636 | isa = XCBuildConfiguration; 637 | buildSettings = { 638 | BUNDLE_LOADER = "$(TEST_HOST)"; 639 | CLANG_ANALYZER_NONNULL = YES; 640 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 641 | CLANG_WARN_INFINITE_RECURSION = YES; 642 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 643 | DEBUG_INFORMATION_FORMAT = dwarf; 644 | ENABLE_TESTABILITY = YES; 645 | GCC_NO_COMMON_BLOCKS = YES; 646 | INFOPLIST_FILE = "BookingTicketExample-tvOSTests/Info.plist"; 647 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 648 | OTHER_LDFLAGS = ( 649 | "$(inherited)", 650 | "-ObjC", 651 | "-lc++", 652 | ); 653 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.BookingTicketExample-tvOSTests"; 654 | PRODUCT_NAME = "$(TARGET_NAME)"; 655 | SDKROOT = appletvos; 656 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BookingTicketExample-tvOS.app/BookingTicketExample-tvOS"; 657 | TVOS_DEPLOYMENT_TARGET = 10.1; 658 | }; 659 | name = Debug; 660 | }; 661 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 662 | isa = XCBuildConfiguration; 663 | buildSettings = { 664 | BUNDLE_LOADER = "$(TEST_HOST)"; 665 | CLANG_ANALYZER_NONNULL = YES; 666 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 667 | CLANG_WARN_INFINITE_RECURSION = YES; 668 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 669 | COPY_PHASE_STRIP = NO; 670 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 671 | GCC_NO_COMMON_BLOCKS = YES; 672 | INFOPLIST_FILE = "BookingTicketExample-tvOSTests/Info.plist"; 673 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 674 | OTHER_LDFLAGS = ( 675 | "$(inherited)", 676 | "-ObjC", 677 | "-lc++", 678 | ); 679 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.BookingTicketExample-tvOSTests"; 680 | PRODUCT_NAME = "$(TARGET_NAME)"; 681 | SDKROOT = appletvos; 682 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BookingTicketExample-tvOS.app/BookingTicketExample-tvOS"; 683 | TVOS_DEPLOYMENT_TARGET = 10.1; 684 | }; 685 | name = Release; 686 | }; 687 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 688 | isa = XCBuildConfiguration; 689 | buildSettings = { 690 | ALWAYS_SEARCH_USER_PATHS = NO; 691 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 692 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 693 | CLANG_CXX_LIBRARY = "libc++"; 694 | CLANG_ENABLE_MODULES = YES; 695 | CLANG_ENABLE_OBJC_ARC = YES; 696 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 697 | CLANG_WARN_BOOL_CONVERSION = YES; 698 | CLANG_WARN_COMMA = YES; 699 | CLANG_WARN_CONSTANT_CONVERSION = YES; 700 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 701 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 702 | CLANG_WARN_EMPTY_BODY = YES; 703 | CLANG_WARN_ENUM_CONVERSION = YES; 704 | CLANG_WARN_INFINITE_RECURSION = YES; 705 | CLANG_WARN_INT_CONVERSION = YES; 706 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 707 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 708 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 709 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 710 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 711 | CLANG_WARN_STRICT_PROTOTYPES = YES; 712 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 713 | CLANG_WARN_UNREACHABLE_CODE = YES; 714 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 715 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 716 | COPY_PHASE_STRIP = NO; 717 | ENABLE_STRICT_OBJC_MSGSEND = YES; 718 | ENABLE_TESTABILITY = YES; 719 | GCC_C_LANGUAGE_STANDARD = gnu99; 720 | GCC_DYNAMIC_NO_PIC = NO; 721 | GCC_NO_COMMON_BLOCKS = YES; 722 | GCC_OPTIMIZATION_LEVEL = 0; 723 | GCC_PREPROCESSOR_DEFINITIONS = ( 724 | "DEBUG=1", 725 | "$(inherited)", 726 | ); 727 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 728 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 729 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 730 | GCC_WARN_UNDECLARED_SELECTOR = YES; 731 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 732 | GCC_WARN_UNUSED_FUNCTION = YES; 733 | GCC_WARN_UNUSED_VARIABLE = YES; 734 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 735 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 736 | LIBRARY_SEARCH_PATHS = ( 737 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 738 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 739 | "\"$(inherited)\"", 740 | ); 741 | MTL_ENABLE_DEBUG_INFO = YES; 742 | ONLY_ACTIVE_ARCH = YES; 743 | SDKROOT = iphoneos; 744 | }; 745 | name = Debug; 746 | }; 747 | 83CBBA211A601CBA00E9B192 /* Release */ = { 748 | isa = XCBuildConfiguration; 749 | buildSettings = { 750 | ALWAYS_SEARCH_USER_PATHS = NO; 751 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 752 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 753 | CLANG_CXX_LIBRARY = "libc++"; 754 | CLANG_ENABLE_MODULES = YES; 755 | CLANG_ENABLE_OBJC_ARC = YES; 756 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 757 | CLANG_WARN_BOOL_CONVERSION = YES; 758 | CLANG_WARN_COMMA = YES; 759 | CLANG_WARN_CONSTANT_CONVERSION = YES; 760 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 761 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 762 | CLANG_WARN_EMPTY_BODY = YES; 763 | CLANG_WARN_ENUM_CONVERSION = YES; 764 | CLANG_WARN_INFINITE_RECURSION = YES; 765 | CLANG_WARN_INT_CONVERSION = YES; 766 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 767 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 768 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 769 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 770 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 771 | CLANG_WARN_STRICT_PROTOTYPES = YES; 772 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 773 | CLANG_WARN_UNREACHABLE_CODE = YES; 774 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 775 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 776 | COPY_PHASE_STRIP = YES; 777 | ENABLE_NS_ASSERTIONS = NO; 778 | ENABLE_STRICT_OBJC_MSGSEND = YES; 779 | GCC_C_LANGUAGE_STANDARD = gnu99; 780 | GCC_NO_COMMON_BLOCKS = YES; 781 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 782 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 783 | GCC_WARN_UNDECLARED_SELECTOR = YES; 784 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 785 | GCC_WARN_UNUSED_FUNCTION = YES; 786 | GCC_WARN_UNUSED_VARIABLE = YES; 787 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 788 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 789 | LIBRARY_SEARCH_PATHS = ( 790 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 791 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 792 | "\"$(inherited)\"", 793 | ); 794 | MTL_ENABLE_DEBUG_INFO = NO; 795 | SDKROOT = iphoneos; 796 | VALIDATE_PRODUCT = YES; 797 | }; 798 | name = Release; 799 | }; 800 | /* End XCBuildConfiguration section */ 801 | 802 | /* Begin XCConfigurationList section */ 803 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BookingTicketExampleTests" */ = { 804 | isa = XCConfigurationList; 805 | buildConfigurations = ( 806 | 00E356F61AD99517003FC87E /* Debug */, 807 | 00E356F71AD99517003FC87E /* Release */, 808 | ); 809 | defaultConfigurationIsVisible = 0; 810 | defaultConfigurationName = Release; 811 | }; 812 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BookingTicketExample" */ = { 813 | isa = XCConfigurationList; 814 | buildConfigurations = ( 815 | 13B07F941A680F5B00A75B9A /* Debug */, 816 | 13B07F951A680F5B00A75B9A /* Release */, 817 | ); 818 | defaultConfigurationIsVisible = 0; 819 | defaultConfigurationName = Release; 820 | }; 821 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BookingTicketExample-tvOS" */ = { 822 | isa = XCConfigurationList; 823 | buildConfigurations = ( 824 | 2D02E4971E0B4A5E006451C7 /* Debug */, 825 | 2D02E4981E0B4A5E006451C7 /* Release */, 826 | ); 827 | defaultConfigurationIsVisible = 0; 828 | defaultConfigurationName = Release; 829 | }; 830 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BookingTicketExample-tvOSTests" */ = { 831 | isa = XCConfigurationList; 832 | buildConfigurations = ( 833 | 2D02E4991E0B4A5E006451C7 /* Debug */, 834 | 2D02E49A1E0B4A5E006451C7 /* Release */, 835 | ); 836 | defaultConfigurationIsVisible = 0; 837 | defaultConfigurationName = Release; 838 | }; 839 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BookingTicketExample" */ = { 840 | isa = XCConfigurationList; 841 | buildConfigurations = ( 842 | 83CBBA201A601CBA00E9B192 /* Debug */, 843 | 83CBBA211A601CBA00E9B192 /* Release */, 844 | ); 845 | defaultConfigurationIsVisible = 0; 846 | defaultConfigurationName = Release; 847 | }; 848 | /* End XCConfigurationList section */ 849 | }; 850 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 851 | } 852 | --------------------------------------------------------------------------------