├── .github └── workflows │ └── app_test.yml ├── .gitignore ├── AUTHORS ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SUMMARY.md ├── _labels └── default.html ├── contributing ├── code-of-conduct.md └── how-to-contribute.md ├── examples └── client │ └── Locomotion │ ├── .bundle │ └── config │ ├── .env.sample │ ├── .eslintrc.json │ ├── .gitignore │ ├── .npmignore │ ├── .nvmrc │ ├── .ruby-version │ ├── .watchmanconfig │ ├── App.tsx │ ├── Gemfile │ ├── Gemfile.lock │ ├── __tests__ │ └── App-test.tsx │ ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── locomotion │ │ │ │ └── ReactNativeFlipper.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ │ └── fonts │ │ │ │ │ ├── Inter-Black.ttf │ │ │ │ │ ├── Inter-Bold.ttf │ │ │ │ │ ├── Inter-ExtraBold.ttf │ │ │ │ │ ├── Inter-ExtraLight.ttf │ │ │ │ │ ├── Inter-Light.ttf │ │ │ │ │ ├── Inter-Medium.ttf │ │ │ │ │ ├── Inter-Regular.ttf │ │ │ │ │ ├── Inter-SemiBold.ttf │ │ │ │ │ └── Inter-Thin.ttf │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── locomotion │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ ├── rn_edit_text_material.xml │ │ │ │ └── splash_screen.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── logo.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── logo.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── logo.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── logo.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── logo.png │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── release │ │ │ └── java │ │ │ └── com │ │ │ └── locomotion │ │ │ └── ReactNativeFlipper.java │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── fastlane │ ├── Appfile │ ├── Fastfile │ ├── Pluginfile │ ├── README.md │ └── assets │ │ └── app-icon.png │ ├── firebase.json │ ├── index.js │ ├── ios │ ├── .xcode │ ├── .xcode.env │ ├── LaunchScreen.storyboard │ ├── Locomotion-Bridging-Header.h │ ├── Locomotion.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Locomotion.xcscheme │ ├── Locomotion.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Locomotion │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── 1024.png │ │ │ │ ├── 120.png │ │ │ │ ├── 180.png │ │ │ │ ├── 40.png │ │ │ │ ├── 58.png │ │ │ │ ├── 60.png │ │ │ │ ├── 80.png │ │ │ │ ├── 87.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── SplashLogo.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── logo-1.png │ │ │ │ ├── logo-2.png │ │ │ │ └── logo.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ ├── Locomotion.entitlements │ │ └── main.m │ ├── LocomotionTests │ │ ├── Info.plist │ │ └── LocomotionTests.m │ ├── Podfile │ ├── Podfile.lock │ └── patches │ │ └── Flipper.patch │ ├── jest.config.js │ ├── metro.config.js │ ├── package-lock.json │ ├── package.json │ ├── patches │ ├── react-native+0.71.0.patch │ ├── react-native-config+1.5.3.patch │ ├── react-native-geolocation-service+5.3.1.patch │ └── react-native-location+2.5.0.patch │ ├── react-native.config.js │ ├── src │ ├── Components │ │ ├── AvailabilityVehicle │ │ │ └── index.tsx │ │ ├── BaseText │ │ │ └── index.js │ │ ├── BlackOverlay │ │ │ └── index.tsx │ │ ├── BottomSheet │ │ │ └── index.tsx │ │ ├── BsPages │ │ │ ├── ActiveRide │ │ │ │ ├── call.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── share.tsx │ │ │ │ └── styled.ts │ │ │ └── index.tsx │ │ ├── Button │ │ │ └── index.js │ │ ├── CardDetails │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── CardRow │ │ │ └── index.tsx │ │ ├── CardsTitle │ │ │ └── index.tsx │ │ ├── CloseButton │ │ │ └── index.tsx │ │ ├── DriverCard │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── EmptyState │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Flex │ │ │ └── index.ts │ │ ├── FullPageLoader │ │ │ └── index.js │ │ ├── FutureRidesButton │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── GenericRideButton │ │ │ └── index.tsx │ │ ├── Header │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── InformationCard │ │ │ ├── Card.tsx │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── LinearGradient │ │ │ └── index.js │ │ ├── LinkText │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Loader │ │ │ └── index.js │ │ ├── Marker │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── Menu │ │ │ ├── bottom.js │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── NewCreditForm │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── NoTitleCard │ │ │ └── index.tsx │ │ ├── PageGenericMessage │ │ │ └── index.js │ │ ├── PageHeader │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── PhoneNumberInput │ │ │ ├── codes.json │ │ │ └── index.tsx │ │ ├── PinCode │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── PrecedingStopPointMarker │ │ │ └── index.tsx │ │ ├── PriceBreakdown │ │ │ ├── breakdownSkeleton.ts │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── PriceCard │ │ │ ├── NoTitlePriceCard.tsx │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── RideCard │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── RidePaymentDetails │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── RoundedButton │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── SafeView │ │ │ ├── index.android.js │ │ │ └── index.ios.js │ │ ├── SelectModal │ │ │ └── index.tsx │ │ ├── SelectableButton │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── ServiceTypeDetails │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── ShowMyLocationButton │ │ │ └── index.js │ │ ├── SlideButton │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── SquareSvgButton │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Stars │ │ │ ├── index.js │ │ │ └── star.svg │ │ ├── StopPointsVerticalView │ │ │ ├── VerticalTimeLine │ │ │ │ ├── index.js │ │ │ │ └── styled.js │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── StopPointsViewer │ │ │ ├── MultiSpConnector.tsx │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── SvgIcon │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── Switch │ │ │ └── index.js │ │ ├── TabSwitch │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Tag │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── TextArea │ │ │ └── index.ts │ │ ├── TextButton │ │ │ └── index.tsx │ │ ├── TextInput │ │ │ ├── BottomSheetInput.js │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── TextInputWithIcon │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── TextRowWithIcon │ │ │ └── index.tsx │ │ ├── Thumbnail │ │ │ ├── add.svg │ │ │ ├── default.png │ │ │ ├── edit.svg │ │ │ └── index.js │ │ ├── ThumbnailPicker │ │ │ └── index.js │ │ ├── Toast │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── VirtualStationComponent │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── VirtualStationMarker │ │ │ └── index.tsx │ │ ├── VirtualStationTooltipComponent │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ └── WhereTo │ │ │ └── InputWithHistoryCard.js │ ├── I18n │ │ ├── el.json │ │ ├── en.json │ │ ├── es.json │ │ ├── fr.json │ │ └── index.js │ ├── LocomotionRouter.js │ ├── assets │ │ ├── activitiy.png │ │ ├── add_comment.svg │ │ ├── arrow-back-learn-more.svg │ │ ├── arrow-back.png │ │ ├── arrow-back.svg │ │ ├── arrow-down.png │ │ ├── arrowright.png │ │ ├── bottomSheet │ │ │ ├── better_eta.svg │ │ │ ├── busy.svg │ │ │ ├── cancel.svg │ │ │ ├── clock.svg │ │ │ ├── credit_card_icon.svg │ │ │ ├── drag-icon.svg │ │ │ ├── edit_note.svg │ │ │ ├── out_of_territory.svg │ │ │ ├── phone.svg │ │ │ ├── plus.svg │ │ │ ├── share.svg │ │ │ └── trash.svg │ │ ├── business-payment.svg │ │ ├── calendar.png │ │ ├── calendar.svg │ │ ├── car-icon.png │ │ ├── cash.svg │ │ ├── center_btn.png │ │ ├── check.png │ │ ├── checkmark.svg │ │ ├── chevron.svg │ │ ├── clock.png │ │ ├── close-x.svg │ │ ├── connector.svg │ │ ├── contactUsLogo.png │ │ ├── copy.svg │ │ ├── credit-card.svg │ │ ├── delete.svg │ │ ├── distance.png │ │ ├── duration.png │ │ ├── edit-icon.svg │ │ ├── email.svg │ │ ├── error-icon.svg │ │ ├── fonts │ │ │ ├── Inter-Black.ttf │ │ │ ├── Inter-Bold.ttf │ │ │ ├── Inter-ExtraBold.ttf │ │ │ ├── Inter-ExtraLight.ttf │ │ │ ├── Inter-Light.ttf │ │ │ ├── Inter-Medium.ttf │ │ │ ├── Inter-Regular.ttf │ │ │ ├── Inter-SemiBold.ttf │ │ │ └── Inter-Thin.ttf │ │ ├── geo_location.svg │ │ ├── hamburger.svg │ │ ├── headset.svg │ │ ├── help.svg │ │ ├── history.png │ │ ├── history.svg │ │ ├── lightStar.png │ │ ├── loaders │ │ │ ├── dark-loader.json │ │ │ ├── light-loader.json │ │ │ └── slider-loader.json │ │ ├── location_pin.svg │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── map │ │ │ ├── Autofleet_Car_Icon.svg │ │ │ ├── car.svg │ │ │ └── markers │ │ │ │ ├── dropoffIcon-nocolor.svg │ │ │ │ ├── dropoffIcon.svg │ │ │ │ ├── pickupIcon-nocolor.svg │ │ │ │ ├── pickupIcon.svg │ │ │ │ └── stations │ │ │ │ ├── arrow.svg │ │ │ │ ├── bus.svg │ │ │ │ ├── dropoff.svg │ │ │ │ └── pickup.svg │ │ ├── mapDarkMode.json │ │ ├── marker-pulse.json │ │ ├── marker-tip.png │ │ ├── menu.png │ │ ├── menuItems │ │ │ ├── car.png │ │ │ ├── creditcard.png │ │ │ ├── help.png │ │ │ ├── home.png │ │ │ ├── logout.png │ │ │ └── person.png │ │ ├── minus.png │ │ ├── no_messages.svg │ │ ├── no_rides.svg │ │ ├── offline.svg │ │ ├── person.svg │ │ ├── personal-payment.svg │ │ ├── phone.svg │ │ ├── plus.png │ │ ├── ppl.png │ │ ├── price.png │ │ ├── recent_search.svg │ │ ├── seat.svg │ │ ├── selected-v.svg │ │ ├── slider-arrow.png │ │ ├── star.png │ │ ├── style-settings.js │ │ ├── target.svg │ │ ├── warning.png │ │ ├── warning.svg │ │ ├── warning_red.png │ │ ├── warning_yellow.png │ │ ├── welcomeLogo.png │ │ ├── white-chevron-right.png │ │ ├── x-white.png │ │ └── x.png │ ├── context │ │ ├── availability │ │ │ ├── api.ts │ │ │ └── index.tsx │ │ ├── bottomSheetContext │ │ │ └── index.js │ │ ├── cancellation-reasons │ │ │ ├── api.ts │ │ │ ├── index.tsx │ │ │ └── interface.ts │ │ ├── futureRides │ │ │ ├── api.ts │ │ │ └── index.tsx │ │ ├── index.js │ │ ├── main.js │ │ ├── messages │ │ │ ├── api.ts │ │ │ ├── index.tsx │ │ │ └── utils.ts │ │ ├── newRideContext │ │ │ ├── api.js │ │ │ ├── google-api.js │ │ │ ├── index.tsx │ │ │ └── utils.ts │ │ ├── onboarding │ │ │ └── index.tsx │ │ ├── payments │ │ │ ├── index.js │ │ │ └── interface.ts │ │ ├── places │ │ │ └── api.js │ │ ├── rideHistory │ │ │ └── index.tsx │ │ ├── ridePageStateContext │ │ │ ├── index.tsx │ │ │ ├── pointInPolygon.ts │ │ │ └── utils.ts │ │ ├── rides │ │ │ └── api.js │ │ ├── settings │ │ │ ├── api.ts │ │ │ ├── index.js │ │ │ └── keys.ts │ │ ├── state │ │ │ └── index.js │ │ ├── theme │ │ │ └── index.js │ │ ├── user │ │ │ ├── api.js │ │ │ └── index.tsx │ │ └── virtualStationsContext │ │ │ ├── api.ts │ │ │ └── index.tsx │ ├── index.js │ ├── lib │ │ ├── commonTypes │ │ │ └── index.ts │ │ ├── objDefault.ts │ │ ├── polyline │ │ │ └── utils.ts │ │ ├── ride │ │ │ └── utils.ts │ │ ├── text-direction.ts │ │ ├── useBackHandler.tsx │ │ ├── useBackgroundInterval.js │ │ └── useInterval.js │ ├── pages │ │ ├── Account │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── ActiveRide │ │ │ ├── NewRideDrawer │ │ │ │ ├── index.js │ │ │ │ └── style.js │ │ │ ├── RideDrawer │ │ │ │ ├── AddressSelector │ │ │ │ │ ├── AddressLine.js │ │ │ │ │ ├── SearchBar.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── styled.js │ │ │ │ ├── FutureRides │ │ │ │ │ ├── StopPointRow.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── styled.js │ │ │ │ ├── MessageCard │ │ │ │ │ ├── index.js │ │ │ │ │ └── styled.js │ │ │ │ ├── OfferCard │ │ │ │ │ ├── EtaText │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── NumberOfPassengerOffer.js │ │ │ │ │ ├── OfferButton │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── OfferRow.js │ │ │ │ │ └── index.js │ │ │ │ ├── RideCard.js │ │ │ │ ├── RideOptions │ │ │ │ │ ├── RideButtons │ │ │ │ │ │ ├── FutureBookingButton │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── NoteButton │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── PassengersCounter │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── PaymentButton │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── styled.tsx │ │ │ │ │ ├── RideDetails │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── ServiceOptions │ │ │ │ │ │ ├── ServiceCard │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── skeleton.ts │ │ │ │ │ │ │ └── styled.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── styles.ts │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── utils.ts │ │ │ │ ├── RideStatusHeader │ │ │ │ │ └── index.js │ │ │ │ ├── RideType.js │ │ │ │ ├── StopPointsCard │ │ │ │ │ ├── AddressView │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── styled.js │ │ │ │ │ ├── DateTimePicker │ │ │ │ │ │ ├── Picker.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── NumberOfPassenger.js │ │ │ │ │ ├── RideScheduler.js │ │ │ │ │ ├── StopPointRow.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── styled.js │ │ │ │ ├── StopPointsEtaCard │ │ │ │ │ ├── StopPointEtaRow.js │ │ │ │ │ └── index.js │ │ │ │ └── styled.js │ │ │ ├── TopMessage │ │ │ │ ├── index.tsx │ │ │ │ └── styled.ts │ │ │ ├── index.js │ │ │ ├── newMap.js │ │ │ └── styled.js │ │ ├── AddCard │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── AuthScreens │ │ │ ├── AuthLoadingScreen.js │ │ │ ├── Profile │ │ │ │ ├── OnboardingNavButtons │ │ │ │ │ └── styles.js │ │ │ │ └── SaveButton │ │ │ │ │ └── styles.js │ │ │ └── StartScreen │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ ├── ContactUs │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── DevPage │ │ │ ├── index.tsx │ │ │ └── styles.js │ │ ├── FutureRidesView │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Lock │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── Logout │ │ │ └── index.js │ │ ├── Main.js │ │ ├── MessageView │ │ │ └── index.tsx │ │ ├── MessagesList │ │ │ ├── MessageCard │ │ │ │ ├── index.tsx │ │ │ │ └── styled.ts │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── Payments │ │ │ ├── balance.js │ │ │ ├── cardDetailUtils.ts │ │ │ ├── cashPaymentMethod.ts │ │ │ ├── consts.ts │ │ │ ├── credit-cards.tsx │ │ │ ├── editNickename.tsx │ │ │ ├── index.js │ │ │ ├── offlinePaymentMethod.ts │ │ │ ├── paymentMethodSection.js │ │ │ └── styled.js │ │ ├── PostRide │ │ │ ├── Feedback │ │ │ │ ├── index.tsx │ │ │ │ └── styled.ts │ │ │ ├── StarRating.js │ │ │ ├── Tips │ │ │ │ ├── CustomTip.js │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── Profile │ │ │ ├── Avatar.js │ │ │ ├── Captcha │ │ │ │ └── index.tsx │ │ │ ├── Card.js │ │ │ ├── Code.js │ │ │ ├── Email.js │ │ │ ├── EmailCode.js │ │ │ ├── Header.js │ │ │ ├── Name.js │ │ │ ├── Phone.js │ │ │ ├── SaveButton │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ │ ├── ScreenText │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ │ ├── Welcome │ │ │ │ ├── index.js │ │ │ │ └── styles.js │ │ │ └── styles.js │ │ ├── PromoCode │ │ │ └── index.tsx │ │ ├── RideHistory │ │ │ ├── CompletedRideOverviewPage.js │ │ │ ├── FilterBar │ │ │ │ ├── index.js │ │ │ │ └── styled.js │ │ │ ├── RangeDateTimePicker.js │ │ │ ├── RideCard │ │ │ │ ├── Map.js │ │ │ │ ├── index.js │ │ │ │ └── styled.js │ │ │ ├── RidesList │ │ │ │ ├── index.js │ │ │ │ └── styled.js │ │ │ ├── consts.js │ │ │ ├── filters.js │ │ │ ├── index.js │ │ │ ├── marker.js │ │ │ └── styled.js │ │ ├── RidePriceBreakdown │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── WebView │ │ │ └── index.js │ │ ├── WebViewPage │ │ │ └── index.js │ │ ├── index.tsx │ │ ├── routeConsts.js │ │ ├── routes.js │ │ └── styles.js │ ├── popups │ │ ├── BasicPopup.js │ │ ├── CancellationReasonsPopup │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── ChoosePaymentMethod │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── ConfirmationPopup │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── DatePickerPoppup │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── FareBreakdownPopup │ │ │ ├── breakdownSkeleton.ts │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── FutureRideCanceled │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── GenericError │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── GenericPopup │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── RideCanceledPopup │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── RideNotes │ │ │ ├── index.js │ │ │ └── styled.js │ │ ├── RidePopups.js │ │ ├── Selector │ │ │ ├── index.tsx │ │ │ └── styled.js │ │ ├── TempraryHoldLearnMore │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── TwoButtonPopup │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ └── styled.js │ ├── services │ │ ├── MccMnc.js │ │ ├── Mixpanel.js │ │ ├── VersionCheck.ts │ │ ├── app-settings.js │ │ ├── appsflyer.ts │ │ ├── auth.js │ │ ├── device.js │ │ ├── firebase.js │ │ ├── geo.js │ │ ├── index.js │ │ ├── isAndroid.js │ │ ├── logout.js │ │ ├── navigation.ts │ │ ├── network-with-retry │ │ │ └── index.ts │ │ ├── network.d.ts │ │ ├── network.js │ │ ├── networkInfo │ │ │ └── index.ts │ │ ├── one-signal │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── showPriceBasedOnAccount.ts │ │ ├── storage.ts │ │ └── user.js │ ├── storybook │ │ ├── addons.js │ │ ├── index.js │ │ ├── rn-addons.js │ │ └── stories │ │ │ ├── CenterView.js │ │ │ ├── RideDrawer.js │ │ │ ├── Welcome │ │ │ └── index.js │ │ │ └── index.js │ └── svgLoader.d.ts │ ├── tsconfig.json │ └── yarn.lock ├── faq ├── contact-us.md └── faq.md └── getting-started ├── configuration.md ├── installation.md └── requirements.md /.github/workflows/app_test.yml: -------------------------------------------------------------------------------- 1 | name: App Test 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'examples/client/Locomotion/**' 7 | - '.github/workflows/app_test.yml' 8 | 9 | defaults: 10 | run: 11 | working-directory: examples/client/Locomotion 12 | 13 | jobs: 14 | lint: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | 19 | - name: Use Node.js 20 | uses: actions/setup-node@v1 21 | with: 22 | node-version: 20 23 | always-auth: true 24 | registry-url: https://registry.npmjs.org 25 | 26 | - name: Install NPM dependencies 27 | run: npm install --legacy-peer-deps 28 | 29 | - run: npm run linter 30 | 31 | - run: npm run ts || echo "Warning! npm run ts failed." -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | server/.env 2 | client/Locomotion/.env 3 | server/mod-germany.app.yaml 4 | server/dist 5 | server/web-ui/build 6 | **/.DS_STORE 7 | *.apk 8 | examples/client/Locomotion/android/app/*.json 9 | examples/client/Locomotion/fastlane/report.xml 10 | examples/client/Locomotion/fastlane/README.md 11 | examples/client/Locomotion/bucket 12 | .vscode/ -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Locomotion was created in 2019 at Autofleet, the first ever Vehicle as a Service platform for fleets. 2 | 3 | Here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS -- 4 | people who have submitted patches, reported bugs, added translations, helped 5 | answer newbie questions, and generally made Locomotion that much better: 6 | 7 | Dor Shay 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Locomotion 2 | Contribution guide coming soon 3 | 4 | ## Code of Conduct 5 | Code of Conduct guide coming soon 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 autofleet 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 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Table of contents 2 | 3 | * [Locomotion](README.md) 4 | 5 | ## Getting Started 6 | 7 | * [Requirements](getting-started/requirements.md) 8 | * [Installation](getting-started/installation.md) 9 | * [Configuration](getting-started/configuration.md) 10 | 11 | ## Contributing 12 | 13 | * [How to Contribute](contributing/how-to-contribute.md) 14 | * [Code of Conduct](contributing/code-of-conduct.md) 15 | 16 | ## Need Help? 17 | 18 | * [FAQ](faq/faq.md) 19 | * [Contact Us](faq/contact-us.md) 20 | 21 | -------------------------------------------------------------------------------- /contributing/code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | -------------------------------------------------------------------------------- /contributing/how-to-contribute.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | -------------------------------------------------------------------------------- /examples/client/Locomotion/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /examples/client/Locomotion/.env.sample: -------------------------------------------------------------------------------- 1 | SERVER_HOST= 2 | REACT_APP_NOT_SECRET_CODE= 3 | DEFAULT_COUNTRY_CODE= 4 | CONTACT_US_URL= 5 | ONESIGNAL_APP_ID= 6 | #MAP_PROVIDER=google 7 | STATIONS_REFRESH_RATE= 8 | DEFAULT_LATITUDE= 9 | DEFAULT_LONGITUDE= 10 | STRIPE_PUBLISHER_KEY= 11 | DONT_USE_STATIONS= 12 | OPERATION_ID= 13 | LANGUAGE_FILES_STORAGE= 14 | -------------------------------------------------------------------------------- /examples/client/Locomotion/.npmignore: -------------------------------------------------------------------------------- 1 | .dependabot 2 | node_modules -------------------------------------------------------------------------------- /examples/client/Locomotion/.nvmrc: -------------------------------------------------------------------------------- 1 | 20.15.1 -------------------------------------------------------------------------------- /examples/client/Locomotion/.ruby-version: -------------------------------------------------------------------------------- 1 | 3.2.2 2 | -------------------------------------------------------------------------------- /examples/client/Locomotion/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /examples/client/Locomotion/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import LocomotionRouter from './src/LocomotionRouter'; 3 | // import de from './src/I18n/en.json'; 4 | 5 | const App = () => ( 6 | 16 | ); 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /examples/client/Locomotion/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby File.read(File.join(__dir__, ".ruby-version")).strip 5 | 6 | gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1' 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import renderer from 'react-test-renderer'; 8 | import App from '../App'; 9 | 10 | // Note: test renderer must be required after react-native. 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/debug.keystore -------------------------------------------------------------------------------- /examples/client/Locomotion/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 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Black.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Bold.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-ExtraBold.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-ExtraLight.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Light.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Medium.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Regular.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-SemiBold.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Thin.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/drawable/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 12 | 20 | 21 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #f6f6f8 4 | #5c5c5c 5 | #5c5c5c 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Locomotion 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/app/src/release/java/com/locomotion/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.locomotion; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = '33.0.0' 6 | minSdkVersion = 24 7 | compileSdkVersion = 34 8 | targetSdkVersion = 34 9 | supportLibVersion = "34.0.0" 10 | kotlinVersion = '1.6.0' // ??? 11 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 12 | ndkVersion = "23.1.7779620" 13 | } 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | dependencies { 19 | classpath('com.android.tools.build:gradle:7.4.2') 20 | classpath("com.facebook.react:react-native-gradle-plugin") 21 | classpath ('com.google.gms:google-services:4.3.13') 22 | classpath ('com.google.firebase:firebase-crashlytics-gradle:2.9.1') 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/client/Locomotion/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /examples/client/Locomotion/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Locomotion", 3 | "displayName": "Locomotion" 4 | } -------------------------------------------------------------------------------- /examples/client/Locomotion/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | plugins: [ 4 | 'react-native-reanimated/plugin', 5 | ['jsx-property-alias', { 6 | properties: { 7 | testID: 'accessibilityLabel', 8 | }, 9 | }], 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one 2 | package_name("com.locomotion") 3 | -------------------------------------------------------------------------------- /examples/client/Locomotion/fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-appicon' 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ================ 3 | # Installation 4 | 5 | Make sure you have the latest version of the Xcode command line tools installed: 6 | 7 | ``` 8 | xcode-select --install 9 | ``` 10 | 11 | Install _fastlane_ using 12 | ``` 13 | [sudo] gem install fastlane -NV 14 | ``` 15 | or alternatively using `brew cask install fastlane` 16 | 17 | # Available Actions 18 | ### generate 19 | ``` 20 | fastlane generate 21 | ``` 22 | 23 | 24 | ---- 25 | 26 | ## iOS 27 | ### ios icons 28 | ``` 29 | fastlane ios icons 30 | ``` 31 | Generate new icons assets 32 | 33 | ---- 34 | 35 | ## Android 36 | ### android icons 37 | ``` 38 | fastlane android icons 39 | ``` 40 | Generate new icons assets 41 | 42 | ---- 43 | 44 | This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. 45 | More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). 46 | The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 47 | -------------------------------------------------------------------------------- /examples/client/Locomotion/fastlane/assets/app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/fastlane/assets/app-icon.png -------------------------------------------------------------------------------- /examples/client/Locomotion/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "react-native": { 3 | "crashlytics_auto_collection_enabled": true, 4 | "crashlytics_debug_enabled": true 5 | } 6 | } -------------------------------------------------------------------------------- /examples/client/Locomotion/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import { AppRegistry } from 'react-native'; 6 | import App from './App'; 7 | import { name as appName } from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/.xcode: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | export NODE_BINARY=$(command -v node) 2 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion-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 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | 6 | @implementation AppDelegate 7 | 8 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 9 | { 10 | [FIRApp configure]; 11 | self.moduleName = @"Locomotion"; 12 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 13 | } 14 | 15 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 16 | { 17 | #if DEBUG 18 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 19 | #else 20 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 21 | #endif 22 | } 23 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 24 | /// 25 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 26 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 27 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. 28 | - (BOOL)concurrentRootEnabled 29 | { 30 | return true; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "logo-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "logo-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo-1.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo-2.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/Locomotion.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/Locomotion/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/LocomotionTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/client/Locomotion/ios/patches/Flipper.patch: -------------------------------------------------------------------------------- 1 | --- FlipperTransportTypes.h.original 2024-09-11 15:26:34 2 | +++ Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h 2024-09-10 15:52:09 3 | @@ -6,7 +6,7 @@ 4 | */ 5 | 6 | #pragma once 7 | - 8 | +#include 9 | #include 10 | 11 | namespace facebook { -------------------------------------------------------------------------------- /examples/client/Locomotion/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], 4 | }; 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | const {getDefaultConfig} = require('metro-config'); 9 | 10 | module.exports = (async () => { 11 | const { 12 | resolver: {sourceExts, assetExts}, 13 | } = await getDefaultConfig(); 14 | return { 15 | transformer: { 16 | getTransformOptions: async () => ({ 17 | transform: { 18 | experimentalImportSupport: false, 19 | inlineRequires: false, 20 | }, 21 | }), 22 | babelTransformerPath: require.resolve('react-native-svg-transformer'), 23 | }, 24 | resolver: { 25 | assetExts: assetExts.filter(ext => ext !== 'svg'), 26 | sourceExts: [...sourceExts, 'svg'], 27 | }, 28 | }; 29 | })(); 30 | -------------------------------------------------------------------------------- /examples/client/Locomotion/patches/react-native-config+1.5.3.patch: -------------------------------------------------------------------------------- 1 | --- a/node_modules/react-native-config/react-native-config.podspec 2 | +++ b/node_modules/react-native-config/react-native-config.podspec 3 | @@ -16,7 +16,8 @@ Pod::Spec.new do |s| 4 | s.ios.deployment_target = '9.0' 5 | s.tvos.deployment_target = '9.0' 6 | s.macos.deployment_target = '10.15' 7 | - s.visionos.deployment_target = '1.0' 8 | + # can delete 9 | + #s.visionos.deployment_target = '1.0' 10 | 11 | s.source = { git: 'https://github.com/luggit/react-native-config.git', tag: "v#{s.version.to_s}" } 12 | s.script_phase = { 13 | -------------------------------------------------------------------------------- /examples/client/Locomotion/patches/react-native-geolocation-service+5.3.1.patch: -------------------------------------------------------------------------------- 1 | diff --git a/node_modules/react-native-geolocation-service/android/build.gradle b/node_modules/react-native-geolocation-service/android/build.gradle 2 | index cf167cf..6b359d5 100644 3 | --- a/node_modules/react-native-geolocation-service/android/build.gradle 4 | +++ b/node_modules/react-native-geolocation-service/android/build.gradle 5 | @@ -31,5 +31,5 @@ dependencies { 6 | 7 | implementation "com.facebook.react:react-native:+" 8 | implementation 'androidx.appcompat:appcompat:1.0.2' 9 | - implementation "com.google.android.gms:play-services-location:$googlePlayServicesVersion" 10 | + implementation "com.google.android.gms:play-services-location:21.3.0" 11 | } 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | project: { 3 | ios: {}, 4 | android: {}, // grouped into "project" 5 | }, 6 | assets: ['./src/assets/fonts'], // stays the same 7 | }; 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/BaseText/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const BaseText = styled.Text` 4 | color: ${({ theme }) => theme.textColor}; 5 | `; 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/BlackOverlay/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Dimensions, View } from 'react-native'; 3 | import styled from 'styled-components'; 4 | 5 | const Overlay = styled(View)` 6 | width: 100%; 7 | height: ${Dimensions.get('window').height}; 8 | background-color: #333; 9 | opacity: 0.7; 10 | z-index: 10; 11 | position: absolute; 12 | `; 13 | 14 | const BlackOverlay = () => ; 15 | 16 | export default BlackOverlay; 17 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/CardDetails/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import SvgIcon from '../SvgIcon'; 3 | 4 | export const DeleteText = styled.Text` 5 | display: flex; 6 | color: ${({ hasOutstansingBalance }) => (hasOutstansingBalance ? '#bcbcbc' : '#f35657')}; 7 | font-family: Inter-Regular; 8 | font-weight: 600; 9 | justify-content: flex-start; 10 | margin-top: 2px; 11 | `; 12 | 13 | export const DeleteIcon = styled(SvgIcon)` 14 | margin-right: 8px; 15 | `; 16 | 17 | export const DeleteContainer = styled.View` 18 | display: flex; 19 | flex-direction: row; 20 | justify-content: flex-start; 21 | width: 100%; 22 | `; 23 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/CardsTitle/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text } from 'react-native'; 3 | import styled from 'styled-components'; 4 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 5 | 6 | type StyledCardsTitleInterface = { 7 | noPaddingLeft: boolean | undefined; 8 | } 9 | 10 | const StyledCardsTitle = styled(Text)` 11 | width: 100%; 12 | ${FONT_SIZES.LARGE}; 13 | ${FONT_WEIGHTS.BOLD}; 14 | color: #333333; 15 | padding: ${({ noPaddingLeft }) => (noPaddingLeft ? '30px 0px 5px' : '30px 15px 5px')}; 16 | `; 17 | 18 | const CardsTitle = ({ 19 | title, 20 | noPaddingLeft, 21 | }: { 22 | title: string, 23 | noPaddingLeft?: boolean, 24 | }) => {title}; 25 | 26 | export default CardsTitle; 27 | 28 | CardsTitle.defaultProps = { 29 | noPaddingLeft: false, 30 | }; 31 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/CloseButton/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import Button from '../Button'; 4 | import SvgIcon from '../SvgIcon'; 5 | import closeXIcon from '../../assets/close-x.svg'; 6 | 7 | const StyledCloseButton = styled(Button)` 8 | height: 25; 9 | width: 25; 10 | align-items: center; 11 | justify-content: center; 12 | `; 13 | 14 | const CloseButton = ({ 15 | onPress, 16 | size, 17 | containerStyles, 18 | }: { 19 | onPress: any; 20 | size?: number; 21 | containerStyles?: any; 22 | }) => ( 23 | 24 | 25 | 26 | ); 27 | 28 | CloseButton.defaultProps = { 29 | size: 15, 30 | containerStyles: {}, 31 | }; 32 | export default CloseButton; 33 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/EmptyState/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Container, Description, Title, TitleWithoutDescription, 4 | } from './styled'; 5 | 6 | interface EmptyStateProps { 7 | title: string; 8 | description?: string; 9 | } 10 | const EmptyState = ({ 11 | title, 12 | description, 13 | }: EmptyStateProps) => ( 14 | 15 | {description 16 | ? {title} 17 | : {title} 18 | } 19 | 20 | {description ? {description} : null} 21 | 22 | ); 23 | EmptyState.defaultProps = { 24 | description: '', 25 | }; 26 | export default EmptyState; 27 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/EmptyState/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text, View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | 5 | export const Container = styled(View)` 6 | border-radius: 8px; 7 | border: 1px dashed rgba(125, 139, 172, 0.32); 8 | display: flex; 9 | padding: 16px; 10 | flex-direction: column; 11 | justify-content: center; 12 | align-items: center; 13 | margin: 4px; 14 | flex: 1 0 0; 15 | align-self: stretch; 16 | `; 17 | export const Title = styled(Text)` 18 | align-self: stretch; 19 | color: #212229; 20 | text-align: center; 21 | ${FONT_WEIGHTS.REGULAR}; 22 | ${FONT_SIZES.LARGE}; 23 | font-weight: 600; 24 | `; 25 | export const Description = styled(Text)` 26 | align-self: stretch; 27 | color: #666975; 28 | text-align: center; 29 | ${FONT_WEIGHTS.REGULAR}; 30 | ${FONT_SIZES.LARGE}; 31 | font-weight: 400; 32 | `; 33 | export const TitleWithoutDescription = styled(Text)` 34 | align-self: stretch; 35 | color: #666975; 36 | text-align: center; 37 | ${FONT_WEIGHTS.REGULAR}; 38 | ${FONT_SIZES.LARGE}; 39 | font-weight: 500; 40 | `; 41 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Flex/index.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import styled from 'styled-components'; 4 | 5 | export const FlexCont = styled(View)` 6 | flex-direction: row; 7 | width: 100%; 8 | justify-content: space-between; 9 | align-items: center; 10 | `; 11 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/FullPageLoader/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import LottieView from 'lottie-react-native'; 4 | import darkLoader from '../../assets/loaders/dark-loader.json'; 5 | 6 | const FullPageLoaderWrapper = styled.View` 7 | width: 100%; 8 | height: 100%; 9 | background-color: ${({ theme }) => theme.pageBackgroundColor}; 10 | position: absolute; 11 | z-index: 99999; 12 | `; 13 | const LoaderContainer = styled.View` 14 | align-self: center; 15 | position: absolute; 16 | top: 50%; 17 | margin-top: -8px; 18 | `; 19 | const FullPageLoader = props => ( 20 | 21 | 22 | 32 | 33 | 34 | ); 35 | export default FullPageLoader; 36 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/FutureRidesButton/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import Button from '../Button'; 4 | import { FONT_SIZES } from '../../context/theme'; 5 | 6 | 7 | export const Container = styled(Button)` 8 | max-width: 45%; 9 | display: flex; 10 | flex-direction: row; 11 | justify-content: flex-start; 12 | min-height: 40px; 13 | padding: 10px; 14 | background-color: #ffffff; 15 | border-radius: 8px; 16 | align-items: center; 17 | shadow-offset: 0px 0px; 18 | shadow-color: #04214f; 19 | shadow-opacity: 0.4; 20 | elevation: 3; 21 | `; 22 | 23 | export const UpcomingText = styled(Text)` 24 | ${FONT_SIZES.LARGE}; 25 | max-width: 80%; 26 | `; 27 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/GenericRideButton/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import { Text } from 'react-native'; 3 | import styled, { ThemeContext } from 'styled-components'; 4 | import SvgIcon from '../SvgIcon'; 5 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 6 | 7 | const TimeText = styled(Text)` 8 | ${FONT_SIZES.LARGE} 9 | ${FONT_WEIGHTS.MEDIUM} 10 | color: #333; 11 | margin: 5px; 12 | `; 13 | 14 | interface GenericRideButtonProps { 15 | icon: string; 16 | title: string; 17 | } 18 | 19 | const GenericRideButton = ({ 20 | icon, 21 | title, 22 | }: GenericRideButtonProps) => { 23 | const { primaryColor } = useContext(ThemeContext); 24 | return ( 25 | <> 26 | 27 | {title} 28 | 29 | ); 30 | }; 31 | 32 | export default GenericRideButton; 33 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Header/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Platform } from 'react-native'; 3 | import SquareSvgButton from '../SquareSvgButton'; 4 | import { Container } from './styled'; 5 | import SafeView from '../SafeView'; 6 | 7 | const Header = ({ 8 | children, onPressIcon, icon, testID, 9 | }) => ( 10 | 11 | 18 | {children} 19 | 20 | ); 21 | 22 | export default Header; 23 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Header/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import Button from '../Button'; 3 | 4 | export const Container = styled.View` 5 | padding: 15px 20px; 6 | display: flex; 7 | flex-direction: row; 8 | justify-content: space-between; 9 | align-items: center; 10 | `; 11 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/LinearGradient/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import LinearGradient from 'react-native-linear-gradient'; 3 | import { appPalette } from '../../assets/style-settings'; 4 | 5 | export default props => ( 6 | 7 | ); 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/LinkText/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import propsTypes from 'prop-types'; 3 | import { 4 | LinkText, Container, StyledIcon, TouchableContainer, 5 | } from './styled'; 6 | 7 | interface LinkTextProps { 8 | children: React.ReactNode; 9 | icon?: string; 10 | iconSide?: 'left' | 'right'; 11 | onPress: () => void; 12 | } 13 | 14 | 15 | const LinkTextComponent = ({ 16 | children, icon, iconSide = 'left', onPress = () => null, 17 | }: LinkTextProps) => ( 18 | 19 | 20 | {icon ? : null} 21 | 22 | {children} 23 | 24 | 25 | 26 | ); 27 | 28 | LinkTextComponent.defaultProps = { 29 | icon: null, 30 | iconSide: 'left', 31 | }; 32 | export default LinkTextComponent; 33 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Loader/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import LottieView from 'lottie-react-native'; 4 | import { View } from 'react-native'; 5 | import darkLoader from '../../assets/loaders/dark-loader.json'; 6 | import lightLoader from '../../assets/loaders/light-loader.json'; 7 | import sliderLoader from '../../assets/loaders/slider-loader.json'; 8 | 9 | const LoadingWrapper = styled.View` 10 | width: 100%; 11 | align-items: center; 12 | `; 13 | 14 | const Loader = ({ 15 | inSlider = false, 16 | dark = false, 17 | lottieViewStyle, 18 | sourceProp, 19 | }) => { 20 | const Wrapper = inSlider ? View : LoadingWrapper; 21 | let source; 22 | if (inSlider) { 23 | source = sliderLoader; 24 | } else { 25 | source = dark ? darkLoader : lightLoader; 26 | } 27 | 28 | return ( 29 | 30 | { 33 | if (animation) { 34 | animation.play(); 35 | } 36 | }} 37 | source={sourceProp || source} 38 | autoPlay 39 | loop 40 | /> 41 | 42 | ); 43 | }; 44 | 45 | export default Loader; 46 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/NewCreditForm/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const SkipSubmitContainer = styled.View` 4 | margin-bottom: 10px; 5 | `; 6 | 7 | export const SubmitContainer = styled.View` 8 | max-width: 100%; 9 | justify-content: flex-end; 10 | align-self: center; 11 | flex:1; 12 | margin-bottom: 30px; 13 | `; 14 | 15 | export const ErrorMessage = styled.Text` 16 | color: #f03a5f; 17 | margin-left: 16px; 18 | font-weight: 500; 19 | font-size: 16px; 20 | `; 21 | 22 | export const CreditForm = styled.View` 23 | flex: 1; 24 | `; 25 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/NoTitleCard/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import propsTypes from 'prop-types'; 3 | import { TouchableOpacity } from 'react-native'; 4 | import { 5 | ArrowContainer, CardContainer, CardText, Arrow, 6 | } from '../InformationCard/styled'; 7 | import Button from '../Button'; 8 | 9 | type NoTitleCardProps = { 10 | onPress: () => void | undefined, 11 | children: any, 12 | showArrow: boolean, 13 | } 14 | 15 | const NoTitleCard = ({ 16 | onPress, children, showArrow, ...props 17 | } : NoTitleCardProps) => ( 18 | 24 | ); 25 | 26 | NoTitleCard.defaultProps = { 27 | onPress: undefined, 28 | showArrow: false, 29 | }; 30 | 31 | NoTitleCard.propTypes = { 32 | onPress: propsTypes.func, 33 | showArrow: propsTypes.bool, 34 | }; 35 | 36 | export default NoTitleCard; 37 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PinCode/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const Container = styled.View` 4 | flex-direction: row; 5 | display: flex; 6 | justify-content: space-between; 7 | width: 100%; 8 | max-width: 300px; 9 | 10 | margin: 0 auto 50px auto; 11 | `; 12 | 13 | export const Box = styled.View` 14 | padding-right: 0px; 15 | align-items: center; 16 | width: 50px; 17 | background-color: ${({ first }) => (first ? 'red' : '#f6f6f8')}; 18 | margin-right: 8px; 19 | margin-left: 8px; 20 | margin-top: 15px; 21 | `; 22 | 23 | export const DigitInput = styled.TextInput` 24 | background-color: #ffffff; 25 | width: 50px; 26 | height: 50px; 27 | border-color: #dedede; 28 | text-align: center; 29 | border-width: 1px; 30 | border-radius: 2px; 31 | `; 32 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PrecedingStopPointMarker/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Platform } from 'react-native'; 3 | import Config from 'react-native-config'; 4 | import { Marker } from 'react-native-maps'; 5 | import SvgIcon from '../SvgIcon'; 6 | import pickupIcon from '../../assets/map/markers/pickupIcon.svg'; 7 | 8 | interface PrecedingStopPointMarkerProps { 9 | stopPoint: any; 10 | } 11 | 12 | const PrecedingStopPointMarker = ({ stopPoint }: PrecedingStopPointMarkerProps) => ( 13 | 18 | 19 | 20 | ); 21 | 22 | export default PrecedingStopPointMarker; 23 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PriceBreakdown/breakdownSkeleton.ts: -------------------------------------------------------------------------------- 1 | const breakdownSkeleton: any = { 2 | flexDirection: 'row', 3 | justifyContent: 'space-between', 4 | width: '100%', 5 | paddingLeft: 16, 6 | paddingRight: 16, 7 | paddingTop: 8, 8 | children: [ 9 | { 10 | width: '30%', 11 | height: 10, 12 | }, 13 | { 14 | width: 50, 15 | height: 10, 16 | }, 17 | ], 18 | }; 19 | 20 | export default breakdownSkeleton; 21 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PriceBreakdown/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text, View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | 5 | export const Title = styled(Text)` 6 | ${FONT_SIZES.MEDIUM}; 7 | ${FONT_WEIGHTS.SEMI_BOLD}; 8 | padding: 8px 0; 9 | `; 10 | 11 | export const Row = styled(View)` 12 | display: flex; 13 | flex-direction: row; 14 | justify-content: space-between; 15 | align-items: center; 16 | padding: 8px 16px; 17 | `; 18 | 19 | export const ItemText = styled(Text)` 20 | ${FONT_SIZES.MEDIUM}; 21 | ${FONT_WEIGHTS.LIGHT}; 22 | opacity: 0.7; 23 | text-transform: capitalize; 24 | `; 25 | 26 | export const PriceText = styled(Text)` 27 | ${FONT_SIZES.MEDIUM}; 28 | ${FONT_WEIGHTS.LIGHT}; 29 | opacity: 0.7; 30 | `; 31 | 32 | export const CenteredItemText = styled(ItemText)` 33 | text-align: center; 34 | margin: 10px; 35 | `; 36 | 37 | export const Line = styled(View)` 38 | border: 0.5px solid #e6e6e6; 39 | width: 100%; 40 | margin: 0 5px; 41 | `; 42 | 43 | export const InnerContainer = styled(View)` 44 | display: flex; 45 | flex-direction: column; 46 | justify-content: space-evenly; 47 | padding: 16px; 48 | `; 49 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PriceCard/NoTitlePriceCard.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PriceCard from '../PriceCard'; 3 | import { NoTitlePriceCardContainer } from './styled'; 4 | 5 | const NoTitlePriceCard = (props:any) => ( 6 | 7 | 8 | 9 | ); 10 | 11 | export default NoTitlePriceCard; 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PriceCard/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { PriceCardContainer, PriceNameText, PriceText } from './styled'; 3 | 4 | type PriceCardProps = { 5 | name: string, 6 | text: string 7 | } 8 | 9 | const PriceCard = ({ name, text } : PriceCardProps) => ( 10 | 11 | {name} 12 | 13 | {text} 14 | 15 | 16 | ); 17 | 18 | export default PriceCard; 19 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/PriceCard/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 3 | 4 | export const PriceCardContainer = styled.View` 5 | flex-direction: row; 6 | margin: 5px 0 5px 15px 7 | width: 300px; 8 | justify-content: space-between; 9 | `; 10 | 11 | export const PriceNameText = styled.Text` 12 | ${FONT_SIZES.LARGE}; 13 | ${FONT_WEIGHTS.REGULAR}; 14 | opacity: .8; 15 | `; 16 | 17 | export const PriceText = styled(PriceNameText)` 18 | text-align: right; 19 | `; 20 | 21 | export const NoTitlePriceCardContainer = styled.View` 22 | margin-left: 15px; 23 | `; 24 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/RideCard/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text, View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | 5 | export const CardContainer = styled(View)` 6 | padding: 20px; 7 | shadow-offset: 0px 10px; 8 | shadow-color: #ededed; 9 | shadow-opacity: 0.7; 10 | shadow-radius: 10; 11 | background-color: #ffffff; 12 | margin-bottom: 20px; 13 | `; 14 | 15 | export const RideDate = styled(Text)` 16 | ${FONT_SIZES.LARGE} 17 | ${FONT_WEIGHTS.MEDIUM} 18 | align-self: flex-end; 19 | `; 20 | 21 | export const ServiceType = styled(Text)` 22 | ${FONT_SIZES.MEDIUM} 23 | ${FONT_WEIGHTS.LIGHT} 24 | color: #707070; 25 | margin-top: 5px; 26 | `; 27 | 28 | export const DateContainer = styled(View)` 29 | display: flex; 30 | flex-direction: row; 31 | align-items: center; 32 | justify-content: space-between; 33 | `; 34 | 35 | export const EstimatedText = styled(Text)` 36 | margin-top: 5px; 37 | color: #707070; 38 | ${FONT_SIZES.MEDIUM}; 39 | ${FONT_WEIGHTS.LIGHT} 40 | `; 41 | 42 | export const TopTextsContainer = styled(View)` 43 | flex-direction: column; 44 | max-width: 75%; 45 | `; 46 | 47 | export const TopPriceContainer = styled(View)` 48 | flex-direction: column; 49 | max-width: 25%; 50 | `; 51 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/RidePaymentDetails/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text, View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | 5 | export const PaymentRow = styled(View)` 6 | flex-direction: row; 7 | `; 8 | 9 | export const ViewDetails = styled(Text)` 10 | ${FONT_SIZES.LARGE}; 11 | ${FONT_WEIGHTS.BOLD} 12 | color: #24aaf2; 13 | text-decoration: underline; 14 | text-decoration-color: #24aaf2; 15 | `; 16 | 17 | export const PriceText = styled(Text)` 18 | ${FONT_SIZES.LARGE}; 19 | ${FONT_WEIGHTS.MEDIUM} 20 | `; 21 | 22 | export const RidePriceDetails = styled(View)` 23 | flex: 1.5; 24 | justify-content: center; 25 | align-items: flex-end; 26 | `; 27 | 28 | export const CardRowContainer = styled(View)` 29 | flex: 3; 30 | `; 31 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SafeView/index.android.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Platform, SafeAreaView } from 'react-native'; 3 | import DeviceInfo from 'react-native-device-info'; 4 | 5 | export default ({ children, style, ...props }) => ( 6 | 7 | {children} 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SafeView/index.ios.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Platform, SafeAreaView } from 'react-native'; 3 | import DeviceInfo from 'react-native-device-info'; 4 | 5 | export default ({ children, style, ...props }) => { 6 | if (Platform.OS === 'android' && DeviceInfo.hasNotch()) { 7 | SafeAreaView.setStatusBarHeight(35); 8 | } 9 | return ( 10 | 11 | {children} 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SelectableButton/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import Button from '../Button'; 3 | 4 | 5 | const colors = theme => ({ 6 | text: theme.primaryButtonTextColor, 7 | selected: { 8 | background: theme.primaryColor, 9 | text: theme.primaryButtonTextColor, 10 | }, 11 | }); 12 | 13 | export const SubmitButtonText = styled.Text` 14 | font-size: 16px; 15 | text-align: center; 16 | width: 100%; 17 | line-height: 20px; 18 | ${({ theme, selected }) => `color: ${selected ? theme.primaryColor : theme.textColor}`}; 19 | ${({ selected }) => selected && 'font-weight: 700'}; 20 | `; 21 | 22 | export const StyledButton = styled(Button)` 23 | ${({ 24 | theme, 25 | }) => ` 26 | flex: 1; 27 | padding: 5px; 28 | height: 50px; 29 | `} 30 | `; 31 | 32 | export const ButtonTextContainer = styled.View` 33 | justify-content: space-between; 34 | flex: 1; 35 | align-items: center; 36 | flex-direction: row; 37 | background-color: #f1f2f6; 38 | border-radius: 8px; 39 | border-color: ${({ theme, selected }) => (selected ? theme.primaryColor : 'transparent')}; 40 | border-width: 2px; 41 | `; 42 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/ServiceTypeDetails/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text } from 'react-native'; 3 | import styled from 'styled-components'; 4 | import CardsTitle from '../CardsTitle'; 5 | import i18n from '../../I18n'; 6 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 7 | 8 | const ServiceName = styled(Text)` 9 | ${FONT_SIZES.H3}; 10 | ${FONT_WEIGHTS.MEDIUM}; 11 | `; 12 | 13 | const ServiceTypeDetails = ({ 14 | serviceType, 15 | }: { 16 | serviceType: any, 17 | }) => (serviceType ? ( 18 | <> 19 | 20 | {serviceType.displayName} 21 | 22 | ) : null 23 | ); 24 | 25 | 26 | export default ServiceTypeDetails; 27 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/ServiceTypeDetails/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text, View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | 5 | export const PaymentRow = styled(View)` 6 | flex-direction: row; 7 | `; 8 | 9 | export const ViewDetails = styled(Text)` 10 | ${FONT_SIZES.LARGE}; 11 | ${FONT_WEIGHTS.BOLD} 12 | color: #24aaf2; 13 | text-decoration: underline; 14 | text-decoration-color: #24aaf2; 15 | `; 16 | 17 | export const PriceText = styled(Text)` 18 | ${FONT_SIZES.LARGE}; 19 | ${FONT_WEIGHTS.MEDIUM} 20 | `; 21 | 22 | export const RidePriceDetails = styled(View)` 23 | flex: 1; 24 | justify-content: center; 25 | align-items: flex-end; 26 | `; 27 | 28 | export const CardRowContainer = styled(View)` 29 | flex: 3; 30 | `; 31 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/ShowMyLocationButton/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import Button from '../Button'; 4 | import icon from '../../assets/center_btn.png'; 5 | 6 | const Sight = styled.Image` 7 | height: 50px; 8 | width: 50px; 9 | `; 10 | 11 | const DisplayButton = styled(Button)` 12 | background-color: ${({ theme }) => theme.pageBackgroundColor}; 13 | border-radius: 8px; 14 | shadow-offset: 0px 0px; 15 | shadow-color: #04214f; 16 | shadow-opacity: 0.4; 17 | `; 18 | 19 | export default styled(({ displayButton, onPress }) => ( 20 | displayButton ? ( 21 | 22 | 23 | 24 | ) : null 25 | ))` 26 | `; 27 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SlideButton/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const SliderContainer = styled.View` 4 | border-radius: 24px; 5 | height: 50px; 6 | width: 100%; 7 | `; 8 | export const ButtonText = styled.Text` 9 | color: ${({ verified }) => (!verified ? '#08355c' : '#ffffff')}; 10 | ${({ verified }) => (verified ? 'margin-right: 20px' : '')}; 11 | `; 12 | export const DrawerButtonContainer = styled.View` 13 | padding-top: 10px; 14 | padding-bottom: 20px; 15 | margin: 0 auto; 16 | min-height: 40px; 17 | width: 70%; 18 | `; 19 | export const styleSchemed = theme => ({ 20 | default: { 21 | buttonSize: 50, 22 | backgroundColor: '#f0f0f0', 23 | textColor: '#08355c', 24 | buttonColor: theme.primaryColor, 25 | borderRadius: 30, 26 | }, 27 | verified: { 28 | backgroundColor: theme.secondaryColor, 29 | textColor: '#ffffff', 30 | buttonColor: '#08902d', 31 | }, 32 | }); 33 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SquareSvgButton/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import SvgIcon from '../SvgIcon'; 3 | import { ButtonContainer } from './styled'; 4 | 5 | interface ButtonProps { 6 | onPress: any, 7 | icon: any, 8 | style: Record, 9 | noLoader: boolean, 10 | testID: string; 11 | } 12 | const SquareSvgButton = ({ 13 | onPress, icon, style, noLoader, testID = 'headerButton', 14 | }: ButtonProps) => ( 15 | 21 | 26 | 27 | ); 28 | 29 | export default SquareSvgButton; 30 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SquareSvgButton/styled.ts: -------------------------------------------------------------------------------- 1 | import { View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import Button from '../Button'; 4 | 5 | export const ButtonContainer = styled(Button)` 6 | shadow-offset: 0px 0px; 7 | shadow-color: #000; 8 | shadow-opacity: 0.4; 9 | elevation: 6; 10 | background-color: ${({ theme }) => theme.pageBackgroundColor}; 11 | border-radius: 8px; 12 | width: 40px; 13 | height: 40px; 14 | align-items: center; 15 | display: flex; 16 | justify-content: center; 17 | `; 18 | 19 | export const ButtonHeaderView = styled(Button)` 20 | background-color: unset; 21 | `; 22 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Stars/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import { View } from 'react-native'; 4 | import Button from '../Button'; 5 | import StarSvg from './star.svg'; 6 | 7 | const SummaryStars = styled(View)` 8 | flex-direction: row; 9 | align-items: center; 10 | justify-content: center; 11 | `; 12 | 13 | export const StarIcon = styled(StarSvg).attrs((({ 14 | isOn, 15 | theme, 16 | size, 17 | }) => ({ 18 | height: size, 19 | width: size, 20 | stroke: theme.primaryColor, 21 | fill: isOn ? theme.primaryColor : '#f9f9f9', 22 | })))` 23 | margin: 3px; 24 | display: flex; 25 | height: 30px; 26 | width: 30px; 27 | opacity: .9; 28 | `; 29 | 30 | const NUM_OF_STARS = [1, 2, 3, 4, 5]; 31 | const Star = ({ 32 | onPress, isOn, size, 33 | }) => ( 34 | 41 | ); 42 | 43 | const StarRating = ({ rating, updateRating = newRating => null, size = 16 }) => ( 44 | 45 | {NUM_OF_STARS.map(num => = num} onPress={() => updateRating(num)} />)} 46 | 47 | ); 48 | 49 | export default StarRating; 50 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Stars/star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/StopPointsVerticalView/VerticalTimeLine/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { STOP_POINT_TYPES } from '../../../lib/commonTypes'; 3 | import { 4 | Content, 5 | EtaContent, 6 | IconContainer, 7 | Line, 8 | MainContainer, 9 | } from './styled'; 10 | import { 11 | PickupIconMarker, DropoffIconMarker, 12 | } from '../../../pages/RideHistory/marker'; 13 | 14 | const VerticalTimeLineCard = ({ 15 | sp: { type }, 16 | first = false, 17 | last = false, 18 | content, 19 | underContent, 20 | }) => ( 21 | 22 | 23 | {type === STOP_POINT_TYPES.STOP_POINT_PICKUP ? : } 24 | 25 | 26 | {content} 27 | 28 | 29 | {underContent} 30 | 31 | 32 | ); 33 | 34 | export default VerticalTimeLineCard; 35 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/StopPointsVerticalView/VerticalTimeLine/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const FlexContainer = styled.View` 4 | display: flex; 5 | flex-direction: row; 6 | `; 7 | 8 | export const MainContainer = styled.View` 9 | display: flex; 10 | flex-direction: row; 11 | align-items: center; 12 | width: 100%; 13 | padding: 5px 0; 14 | `; 15 | 16 | export const IconContainer = styled.View` 17 | width: 10%; 18 | align-items: center; 19 | `; 20 | 21 | export const Content = styled(FlexContainer)` 22 | flex-direction: column; 23 | width: 65%; 24 | `; 25 | 26 | export const EtaContent = styled(FlexContainer)` 27 | justify-content: flex-end; 28 | width: 25%; 29 | `; 30 | 31 | export const TimeLineContainer = styled(FlexContainer)` 32 | flex-direction: column; 33 | `; 34 | 35 | export const Line = styled.View` 36 | border: 1px solid #333333; 37 | width: 1px; 38 | height: 50%; 39 | position: absolute; 40 | left: 4.5%; 41 | top: 25%; 42 | `; 43 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/StopPointsVerticalView/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 3 | 4 | export const ContentTitle = styled.Text` 5 | ${FONT_SIZES.LARGE}; 6 | ${FONT_WEIGHTS.SEMI_BOLD}; 7 | `; 8 | 9 | 10 | export const ContentSubTitle = styled.Text` 11 | `; 12 | 13 | export const PanelContentContainer = styled.View` 14 | `; 15 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/StopPointsViewer/MultiSpConnector.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import { Text, View } from 'react-native'; 4 | import SvgIcon from '../SvgIcon'; 5 | import connectorIcon from '../../assets/connector.svg'; 6 | 7 | const ICON_SIZE = 12; 8 | 9 | const MultiSpConnectorContainer = styled(View)` 10 | flex-direction: row; 11 | `; 12 | 13 | const ConnectorText = styled(Text)` 14 | margin-right: 2px; 15 | margin-left: 2px; 16 | `; 17 | 18 | const ThreeDotsContainer = styled(View)` 19 | margin-top: 4px; 20 | `; 21 | 22 | interface MultiSpConnectorProps { 23 | amountOfStops: number; 24 | } 25 | 26 | const ConnectorThreeDots = props => ( 27 | 28 | 33 | 34 | ); 35 | 36 | const MultiSpConnector = ({ amountOfStops }: MultiSpConnectorProps) => ( 37 | 38 | 39 | 40 | {`+${amountOfStops}`} 41 | 42 | 43 | 44 | ); 45 | 46 | export default MultiSpConnector; 47 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/StopPointsViewer/styled.ts: -------------------------------------------------------------------------------- 1 | import { Text, View } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | import Button from '../Button'; 5 | 6 | export const Container = styled(View)` 7 | min-height: 40px; 8 | width: 85%; 9 | shadow-offset: 0px 0px; 10 | shadow-color: #04214f; 11 | shadow-opacity: 0.4; 12 | elevation: 3; 13 | background-color: ${({ theme }) => theme.pageBackgroundColor}; 14 | border-radius: 8px; 15 | padding: 10px; 16 | padding-right: 17px; 17 | display: flex; 18 | flex-direction: row; 19 | align-items: center; 20 | justify-content: space-between; 21 | `; 22 | 23 | export const StreetAddressContainer = styled(Button)` 24 | width: 40%; 25 | background-color: ${({ theme }) => theme.pageBackgroundColor}; 26 | `; 27 | 28 | export const StreetAddress = styled(Text).attrs({ 29 | numberOfLines: 1, 30 | })` 31 | ${FONT_SIZES.MEDIUM} 32 | ${FONT_WEIGHTS.REGULAR} 33 | `; 34 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SvgIcon/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import propTypes from 'prop-types'; 3 | import { IconContainer } from './styled'; 4 | 5 | const SvgIcon = ({ 6 | Svg, 7 | stroke, 8 | fill, 9 | width, 10 | height, 11 | style, 12 | }) => ( 13 | 20 | ); 21 | 22 | export default SvgIcon; 23 | 24 | SvgIcon.defaultProps = { 25 | svg: '', 26 | stroke: null, 27 | fill: null, 28 | width: 20, 29 | height: 20, 30 | style: {}, 31 | }; 32 | 33 | SvgIcon.propTypes = { 34 | svg: propTypes.string, 35 | stroke: propTypes.string, 36 | fill: propTypes.string, 37 | width: propTypes.number, 38 | height: propTypes.number, 39 | style: propTypes.object, 40 | }; 41 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/SvgIcon/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import Button from '../Button'; 3 | 4 | export const IconContainer = styled.TouchableOpacity` 5 | margin: ${({ margin }) => (margin ? `${margin}` : '0')}; 6 | vertical-align: middle; 7 | width: ${({ width }) => (width ? `${width}` : '16px')}; 8 | height: ${({ height }) => (height ? `${height}` : '16px')}; 9 | `; 10 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Switch/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import propsTypes from 'prop-types'; 4 | 5 | const Switch = styled.Switch` 6 | margin-left: auto; 7 | margin-top: -15px; 8 | `; 9 | 10 | const MyRow = ({ onChange, active }) => ( 11 | 12 | ); 13 | 14 | export default MyRow; 15 | 16 | MyRow.defaultProps = { 17 | text: '', 18 | active: false, 19 | onChange: () => null, 20 | }; 21 | 22 | MyRow.propTypes = { 23 | text: propsTypes.string, 24 | active: propsTypes.bool, 25 | onChange: propsTypes.func, 26 | }; 27 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Tag/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container, TagText } from './styled'; 3 | 4 | const Tag = ({ text, containerStyles, textColor }) => ( 5 | 6 | 7 | {text} 8 | 9 | 10 | ); 11 | 12 | export default Tag; 13 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Tag/styled.js: -------------------------------------------------------------------------------- 1 | import { Platform } from 'react-native'; 2 | import styled from 'styled-components'; 3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme'; 4 | 5 | export const Container = styled.View` 6 | border-radius: 8px; 7 | padding: 2px 8px; 8 | `; 9 | 10 | export const TagText = styled.Text` 11 | ${FONT_SIZES.MEDIUM}; 12 | ${FONT_WEIGHTS.REGULAR}; 13 | ${Platform.OS !== 'ios' && 'line-height: 16px'} 14 | color: ${({ color }) => color}; 15 | `; 16 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/TextArea/index.ts: -------------------------------------------------------------------------------- 1 | import { TextInput } from 'react-native'; 2 | import styled from 'styled-components'; 3 | 4 | export const TextArea = styled(TextInput)` 5 | width: 100%; 6 | min-height: 100px; 7 | background-color: #f1f2f6; 8 | border-radius: 8px; 9 | text-indent: 8px; 10 | `; 11 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/TextButton/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text } from 'react-native'; 3 | import styled from 'styled-components'; 4 | import { FONT_SIZES, FONT_WEIGHTS, LINK_BLUE_COLOR } from '../../context/theme'; 5 | import Button from '../Button'; 6 | 7 | export const Container = styled(Button)` 8 | `; 9 | 10 | export const ButtonText = styled(Text)` 11 | color: ${LINK_BLUE_COLOR}; 12 | ${FONT_SIZES.H3}; 13 | ${FONT_WEIGHTS.REGULAR}; 14 | `; 15 | 16 | interface Props { 17 | onPress: () => void; 18 | text: string; 19 | testID: string; 20 | } 21 | 22 | const TextButton = ({ onPress, text, testID }: Props) => ( 23 | 24 | 25 | {text} 26 | 27 | 28 | ); 29 | 30 | export default TextButton; 31 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/TextInput/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { 3 | Input, 4 | } from './styled'; 5 | 6 | const TextInput = (props) => { 7 | const [isFocused, setIsFocused] = useState(false); 8 | return ( 9 | setIsFocused(true)} 11 | onBlur={() => setIsFocused(false)} 12 | isFocused={isFocused} 13 | ref={props.inputRef} 14 | {...props} 15 | testID={props.testID || null} 16 | /> 17 | ); 18 | }; 19 | 20 | export default TextInput; 21 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/TextInputWithIcon/index.js: -------------------------------------------------------------------------------- 1 | import React, { forwardRef, useState } from 'react'; 2 | import { View } from 'react-native'; 3 | import { 4 | InputIconContainer, InputIcon, Icon, 5 | } from './styled'; 6 | import TextInput from '../TextInput'; 7 | 8 | const TextInputWithIcon = forwardRef((props, ref) => { 9 | const [isFocused, setIsFocused] = useState(false); 10 | 11 | const { 12 | inputIcon, 13 | onFocus = () => null, 14 | onBlur = () => null, 15 | fullBorder, 16 | error, 17 | } = props; 18 | 19 | return ( 20 | 21 | 22 | 23 | {inputIcon} 24 | 25 | 26 | 27 | { 31 | onFocus(); 32 | setIsFocused(true); 33 | }} 34 | onBlur={() => { 35 | onBlur(); 36 | setIsFocused(false); 37 | }} 38 | inputRef={ref} 39 | /> 40 | 41 | 42 | ); 43 | }); 44 | export default TextInputWithIcon; 45 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/TextInputWithIcon/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | import { ERROR_COLOR } from '../../context/theme'; 4 | 5 | 6 | export const IconContainer = styled.View` 7 | position: absolute; 8 | right: 15; 9 | top: 15; 10 | `; 11 | 12 | 13 | export const InputIconContainer = styled.View` 14 | flex-direction: row; 15 | flex: 1; 16 | border-width: 1px; 17 | border-color: ${({ error }) => (error && error !== null ? ERROR_COLOR : 'transparent')}; 18 | ${({ isFocused, error }) => (isFocused && !error) && 'border-color: #333333'}; 19 | border-radius: 8px; 20 | background: #f1f2f6; 21 | 22 | `; 23 | 24 | export const InputIcon = styled.View` 25 | width: 40px; 26 | height: 40px; 27 | background: #f1f2f6; 28 | border-bottom-start-radius: 8px; 29 | border-top-start-radius: 8px; 30 | text-align: center; 31 | font-size: 18px; 32 | font-weight: 600; 33 | justify-content: center; 34 | `; 35 | 36 | export const Icon = styled.Text` 37 | font-size: 18px; 38 | font-weight: 600; 39 | align-self: center; 40 | `; 41 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Thumbnail/add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Thumbnail/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/Components/Thumbnail/default.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Thumbnail/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/Toast/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useContext } from 'react'; 2 | import SvgIcon from '../SvgIcon'; 3 | import { 4 | ContentContainer, 5 | Header, SubText, TextContainer, ToastContainer, ToastImage, IconContainer, Footer, FooterButton, FooterButtonText, 6 | } from './styled'; 7 | import i18n from '../../I18n'; 8 | 9 | interface AFToastProps { 10 | text1: string; 11 | text2: string; 12 | props: any; 13 | onPress: () => void 14 | onHide: () => void 15 | } 16 | const AFToast = ({ 17 | text1, text2, props, onPress, 18 | }: AFToastProps) => ( 19 | 20 | 21 | {props.image && } 22 | 23 |

24 | {text1} 25 |
26 | 27 | {text2} 28 | 29 | 30 | 31 |
32 | 33 | 34 | {props.buttonText} 35 | 36 | 37 |
38 | 39 | ); 40 | export default AFToast; 41 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/VirtualStationComponent/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | MarkerContainer, StyledIcon, IconContainer, Contrainer, 4 | } from './styled'; 5 | 6 | const VirtualStationComponent = ({ type = 'default', isActive = false, style = {} }) => ( 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | 16 | export default VirtualStationComponent; 17 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/VirtualStationMarker/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { forwardRef, useCallback } from 'react'; 2 | import { 3 | Marker, Callout, 4 | } from 'react-native-maps'; 5 | import { Platform } from 'react-native'; 6 | import Config from 'react-native-config'; 7 | 8 | import VirtualStationComponent from '../VirtualStationComponent'; 9 | import VirtualStationTooltip from '../VirtualStationTooltipComponent'; 10 | 11 | const VirtualStationMarker = forwardRef(({ 12 | station, onCalloutPress, type, 13 | }, ref) => { 14 | const isActive = useCallback(() => type !== 'default', [type]); 15 | return ( 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ); 31 | }); 32 | export default VirtualStationMarker; 33 | 34 | VirtualStationMarker.defaultProps = { 35 | station: {}, 36 | onCalloutPress: () => null, 37 | type: 'default', 38 | }; 39 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/VirtualStationTooltipComponent/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import i18n from '../../I18n'; 3 | import { 4 | Tooltip, 5 | StationDetails, 6 | Row, 7 | StationName, 8 | DistanceText, 9 | AddressText, 10 | BottomActions, 11 | } from './styled'; 12 | import LinkText from '../../Components/LinkText'; 13 | import stationIcon from '../../assets/map/markers/stations/arrow.svg'; 14 | 15 | 16 | const VirtualStationTooltip = ({ station, onPress }) => ( 17 | 18 | 19 | 20 | {station.label} 21 | {/* {station.distance ? {`${station.distance}m`} : null} */} 22 | 23 | 24 | {station.address} 25 | 26 | 27 | {/* 28 | onPress(station)} 32 | > 33 | {i18n.t('virtualStations.tooltip.setDropoff')} 34 | 35 | 36 | */} 37 | 38 | ); 39 | 40 | export default VirtualStationTooltip; 41 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/Components/WhereTo/InputWithHistoryCard.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { MapButtonsContainer } from '../../pages/ActiveRide/NewRideDrawer/style'; 3 | import MyLocationButton from '../ShowMyLocationButton'; 4 | 5 | const InputWithHistoryCard = () => ( 6 | <> 7 | 8 | 9 | ({})} 11 | displayButton 12 | /> 13 | 14 | 15 | ); 16 | 17 | export default InputWithHistoryCard; 18 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/activitiy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/activitiy.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/arrow-back-learn-more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/arrow-back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/arrow-back.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/arrow-back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/arrow-down.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/arrowright.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/credit_card_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/drag-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/edit_note.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/phone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/bottomSheet/trash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/calendar.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/car-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/car-icon.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/center_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/center_btn.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/check.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/chevron.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/clock.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/close-x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/connector.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/contactUsLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/contactUsLogo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/credit-card.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/distance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/distance.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/duration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/duration.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/edit-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/error-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-Black.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-Bold.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-ExtraBold.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-ExtraLight.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-Light.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-Medium.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-Regular.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-SemiBold.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/fonts/Inter-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/fonts/Inter-Thin.ttf -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/geo_location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/hamburger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/headset.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/help.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ? 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/history.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/history.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/lightStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/lightStar.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/location_pin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/logo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/dropoffIcon-nocolor.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/dropoffIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/pickupIcon-nocolor.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/pickupIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/stations/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/stations/bus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/stations/dropoff.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/map/markers/stations/pickup.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/marker-tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/marker-tip.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menu.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menuItems/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menuItems/car.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menuItems/creditcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menuItems/creditcard.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menuItems/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menuItems/help.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menuItems/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menuItems/home.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menuItems/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menuItems/logout.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/menuItems/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/menuItems/person.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/minus.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/person.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/personal-payment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/phone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/plus.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/ppl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/ppl.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/price.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/price.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/recent_search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/seat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/selected-v.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/slider-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/slider-arrow.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/star.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/style-settings.js: -------------------------------------------------------------------------------- 1 | export const padding = '20px'; 2 | export const inputHeight = '40px'; 3 | 4 | export const commonInputStyle = ` 5 | background-color: white; 6 | width: 100%; 7 | height: ${inputHeight}; 8 | 9 | padding: 0px 8px; 10 | font-size: 17px; 11 | `; 12 | 13 | export const commonInputStyleWithTheme = theme => ` 14 | ${commonInputStyle} 15 | background-color: ${theme.pageBackgroundColor}; 16 | `; 17 | 18 | export const linkColor = '#00aeef'; 19 | 20 | export const appPalette = ['#00aeef', '#4c83ca', '#452f92']; 21 | 22 | export default { 23 | inputHeight, 24 | commonInputStyle, 25 | linkColor, 26 | appPalette, 27 | }; 28 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/target.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/warning.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/warning_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/warning_red.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/warning_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/warning_yellow.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/welcomeLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/welcomeLogo.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/white-chevron-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/white-chevron-right.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/x-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/x-white.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/assets/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Autofleet/locomotion/03e6918c65a8f22b22633d5412a1b1e4550cb7ca/examples/client/Locomotion/src/assets/x.png -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/availability/api.ts: -------------------------------------------------------------------------------- 1 | import network from '../../services/network'; 2 | 3 | export const getVehicles = async (lat: string, lng: string) => { 4 | const { data: vehicles } = await network.get('/api/v1/availability', { 5 | params: { 6 | lat, 7 | lng, 8 | }, 9 | }); 10 | 11 | return vehicles; 12 | }; 13 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/cancellation-reasons/api.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/prefer-default-export */ 2 | import network from '../../services/network'; 3 | import { CancellationReason } from './interface'; 4 | 5 | export const getCancellationReasons = async (rideId: string): Promise => { 6 | const { data } = await network.get(`/api/v1/rides/${rideId}/cancellation-reasons`); 7 | return data; 8 | }; 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/cancellation-reasons/interface.ts: -------------------------------------------------------------------------------- 1 | export interface CancellationReason { 2 | id: string; 3 | value: string; 4 | businessModelId: string; 5 | rideType: string; 6 | rideState: string; 7 | category: string; 8 | } 9 | 10 | export interface CancellationReasonsContextInterface { 11 | cancellationReasons: CancellationReason[]; 12 | getCancellationReasons: (rideId?: string) => Promise; 13 | clearCancellationReasons: () => void; 14 | } 15 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/futureRides/api.ts: -------------------------------------------------------------------------------- 1 | import network from '../../services/network'; 2 | 3 | export const getFutureRides = async () => { 4 | const { data } = await network.get('api/v1/rides/future'); 5 | return data; 6 | }; 7 | 8 | export const getPriceCalculation = async (pricingCalculationId: string) => { 9 | const { data } = await network.get(`api/v1/price-calculation/${pricingCalculationId}`); 10 | return data; 11 | }; 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/index.js: -------------------------------------------------------------------------------- 1 | export * from './main'; 2 | export { RideStateContextContext, default as RideStateContextContextProvider } from './ridePageStateContext'; 3 | export { RidePageContext as MewRidePageContext, default as NewRidePageContextProvider } from './newRideContext'; 4 | export { default as MainContext } from './main'; 5 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/messages/api.ts: -------------------------------------------------------------------------------- 1 | import networkService from '../../services/network'; 2 | 3 | export const getUserMessages = async (userId: string) => { 4 | const { data } = await networkService.get('api/v1/me/user-messages', { params: { userId } }); 5 | return data; 6 | }; 7 | 8 | export const getMessage = async (messageId: string, userId: string | null) => { 9 | const { data } = await networkService.get(`api/v1/me/messages/${messageId}`, { params: { userId } }); 10 | return data; 11 | }; 12 | 13 | export const markReadMessage = async (userMessageIds: string[] = []) => { 14 | const { data } = await networkService.post('api/v1/me/user-messages/read', { ids: userMessageIds }); 15 | return data; 16 | }; 17 | 18 | export const dismissMessage = async (userMessageIds: string[] = []) => { 19 | const { data } = await networkService.post('api/v1/me/user-messages/dismiss', { ids: userMessageIds }); 20 | return data; 21 | }; 22 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/messages/utils.ts: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | import { messageProps } from '.'; 3 | import i18n from '../../I18n'; 4 | 5 | export const getFormattedMessageDate = (message: messageProps) => { 6 | if (moment().diff(moment(message.sentAt), 'minutes') <= 5) { 7 | return i18n.t('messages.now'); 8 | } 9 | if (moment().diff(moment(message.sentAt), 'weeks') < 1) { 10 | return moment(message.sentAt).format('dddd, h:mm A'); 11 | } 12 | return moment(message.sentAt).format('MMMM DD, YYYY'); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/newRideContext/google-api.js: -------------------------------------------------------------------------------- 1 | import network from '../../services/network'; 2 | 3 | export const getPlaces = async (params) => { 4 | const { data } = await network.get('/api/v1/maps/place/autocomplete', { params }); 5 | return data.result; 6 | }; 7 | 8 | export const getGeocode = async (params) => { 9 | const { data } = await network.post('/api/v1/maps/reverse-geocode', 10 | { params: { ...params, includePlaceId: true } }); 11 | return data.result; 12 | }; 13 | 14 | export const getPlaceDetails = async (placeId) => { 15 | const { data } = await network.get(`/api/v1/maps/place/${placeId}`); 16 | return data.result; 17 | }; 18 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/payments/interface.ts: -------------------------------------------------------------------------------- 1 | export type Brand = 'code' | 'alipay' | 'amex' | 'american-express' | 'cvv' | 'diners-club' | 'diners' | 'discover' | 'elo' | 'generic' | 'hiper' | 'hipercard' | 'jcb' | 'maestro' | 'mastercard' | 'visa'; 2 | export type Balance = { 3 | amount: number, 4 | currency: string 5 | }; 6 | export interface PaymentMethodInterface { 7 | brand: Brand; 8 | createdAt: Date; 9 | customerId: string; 10 | deletedAt: Date | null; 11 | expiresAt: Date; 12 | hasOutstandingBalance: boolean; 13 | id: string; 14 | isDefault: boolean; 15 | isExpired: boolean; 16 | lastFour: string; 17 | name: string; 18 | stripeId: string; 19 | updatedAt: Date; 20 | outstandingBalance: Balance 21 | } 22 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/places/api.js: -------------------------------------------------------------------------------- 1 | import network from '../../services/network'; 2 | 3 | export const getStationsApi = async (params) => { 4 | const { data } = await network.get('api/v1/me/places', { params }); 5 | return data; 6 | }; 7 | 8 | export const getLocation = async (params) => { 9 | const { data } = await network.get('api/v1/me/places/get-location', { params }); 10 | return data; 11 | }; 12 | 13 | export const getPlacesByLocation = async (params) => { 14 | const { data } = await network.get('api/v1/me/places', { params }); 15 | return data; 16 | }; 17 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/ridePageStateContext/pointInPolygon.ts: -------------------------------------------------------------------------------- 1 | import { point, polygon, booleanPointInPolygon } from '@turf/turf'; 2 | import Mixpanel from '../../services/Mixpanel'; 3 | 4 | const ERROR_MSG = 'unable to calc pointInPolygon'; 5 | 6 | const pointInPolygon = (polys: any, position: any) => { 7 | console.debug('pointInPolygon', { position }); 8 | if (position && polys) { 9 | try { 10 | const { coords: { latitude, longitude } } = position; 11 | if (latitude && longitude) { 12 | const territoryPolygons = polys.map((p: { polygon: any; }) => polygon(p.polygon.coordinates)); 13 | const pt = point([longitude, latitude]); 14 | return territoryPolygons.some((poly: any) => booleanPointInPolygon(pt, poly)); 15 | } 16 | } catch (e) { 17 | console.error(ERROR_MSG, e); 18 | Mixpanel.trackWithProperties(ERROR_MSG, { e }); 19 | } 20 | } 21 | return undefined; 22 | }; 23 | export default pointInPolygon; 24 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/ridePageStateContext/utils.ts: -------------------------------------------------------------------------------- 1 | export type BsPages = 'ADDRESS_SELECTOR' | 'SET_LOCATION_ON_MAP' | 'SERVICE_ESTIMATIONS' | 'GENERIC_ERROR' | 2 | 'CONFIRM_PICKUP' | 'NO_PAYMENT' | 'NOT_IN_TERRITORY' | 'CONFIRMING_RIDE' | 'ACTIVE_RIDE' | 'LOADING' | 3 | 'NO_AVAILABLE_VEHICLES' | 'CUSTOM_TIP' | 'LOCATION_REQUEST' | 'CANCEL_RIDE' | 'CONFIRM_PICKUP_TIME' | 'CONFIRM_FUTURE_RIDE' | 4 | 'NO_AVAILABLE_SERVICES' | 'PICKUP_NOT_IN_TERRITORY'; 5 | 6 | interface BsPageObject { 7 | [key: string]: BsPages 8 | } 9 | 10 | export const BS_PAGES: BsPageObject = { 11 | ADDRESS_SELECTOR: 'ADDRESS_SELECTOR', 12 | SET_LOCATION_ON_MAP: 'SET_LOCATION_ON_MAP', 13 | CONFIRM_PICKUP: 'CONFIRM_PICKUP', 14 | NO_PAYMENT: 'NO_PAYMENT', 15 | SERVICE_ESTIMATIONS: 'SERVICE_ESTIMATIONS', 16 | NOT_IN_TERRITORY: 'NOT_IN_TERRITORY', 17 | CONFIRMING_RIDE: 'CONFIRMING_RIDE', 18 | ACTIVE_RIDE: 'ACTIVE_RIDE', 19 | NO_AVAILABLE_VEHICLES: 'NO_AVAILABLE_VEHICLES', 20 | CONFIRM_PICKUP_TIME: 'CONFIRM_PICKUP_TIME', 21 | CUSTOM_TIP: 'CUSTOM_TIP', 22 | LOCATION_REQUEST: 'LOCATION_REQUEST', 23 | CANCEL_RIDE: 'CANCEL_RIDE', 24 | CONFIRM_FUTURE_RIDE: 'CONFIRM_FUTURE_RIDE', 25 | GENERIC_ERROR: 'GENERIC_ERROR', 26 | LOADING: 'LOADING', 27 | NO_AVAILABLE_SERVICES: 'NO_AVAILABLE_SERVICES', 28 | PICKUP_NOT_IN_TERRITORY: 'PICKUP_NOT_IN_TERRITORY', 29 | }; 30 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/rides/api.js: -------------------------------------------------------------------------------- 1 | import network from '../../services/network'; 2 | 3 | export const getActiveRides = async (params) => { 4 | const { data } = await network.get('api/v1/rides/active', { params }); 5 | return data; 6 | }; 7 | 8 | export const getRideSummary = async (params) => { 9 | const { data } = await network.get('api/v1/me/rides/ride-summary', { params }); 10 | return data; 11 | }; 12 | 13 | export const getPreRideDetails = async (params) => { 14 | const { data } = await network.get('api/v1/me/rides/pre', { params }); 15 | return data; 16 | }; 17 | 18 | export const createRideApi = async (body) => { 19 | const { data } = await network.post('api/v1/me/rides', body); 20 | return data; 21 | }; 22 | 23 | export const createOfferApi = async (body) => { 24 | const { data } = await network.post('api/v1/me/rides/offer', body); 25 | return data; 26 | }; 27 | 28 | export const patchRide = async (rideId, data) => { 29 | await network.patch(`api/v1/rides/${rideId}`, data); 30 | }; 31 | 32 | export const cancelFutureRideApi = async (rideId) => { 33 | await network.post('api/v1/me/rides/cancel-future-ride', { rideId }); 34 | }; 35 | 36 | export const getRidesHistory = async () => { 37 | const { data } = await network.get('api/v1/me/rides/history'); 38 | return data; 39 | }; 40 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/settings/api.ts: -------------------------------------------------------------------------------- 1 | import NetworkWithRetry from '../../services/network-with-retry'; 2 | import network from '../../services/network'; 3 | 4 | export const getByKey = async (key: string) => { 5 | const { data } = await network.get(`/api/v1/settings/${key}`); 6 | return data; 7 | }; 8 | 9 | export const getMultipleByKeys = async (keys: string[]) => { 10 | const { data } = await network.get('/api/v1/settings/', { 11 | params: { 12 | keys, 13 | }, 14 | }); 15 | return data; 16 | }; 17 | 18 | export const getAppSettings = async () => { 19 | const { data } = await NetworkWithRetry.networkWithRetry(() => network.get('/api/v1/app-settings')); 20 | return data; 21 | }; 22 | 23 | export const getWorkingHoursData = async () => { 24 | const { data } = await network.get('/api/v1/me/app-settings/working-hours'); 25 | return data; 26 | }; 27 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/settings/keys.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | SERVICE_ESTIMATIONS_INTERVAL_IN_SECONDS: 'riderApp.preRide.estimationsInterval', 3 | POST_RIDE_TIP_SETTINGS: 'riderApp.postRide.showTipPresetsAsPercentageThreshold', 4 | CARD_PAGE_SETTINGS: 'riderApp.onboarding.cardPageSettings', 5 | ENFORCE_PROFILE_PICTURE: 'riderApp.enforceProfilePicture', 6 | MIN_APP_VERSION: 'riderApp.minAppVersion', 7 | CONTACT_US_URL: 'riderApp.contactUsUrl', 8 | CONTACT_US_TEXT: 'riderApp.contactUsText', 9 | TERMS_OF_USE_URL: 'riderApp.termsOfUseUrl', 10 | PRIVACY_POLICY_URL: 'riderApp.privacyPolicyUrl', 11 | CONTACT_EMAIL: 'riderApp.contactEmail', 12 | CONTACT_PHONE: 'riderApp.contactPhone', 13 | FUTURE_RIDES_ENABLED: 'riderApp.futureRidesEnabled', 14 | MIN_MINUTES_BEFORE_FUTURE_RIDE: 'riderApp.minMinutesBeforeFutureRide', 15 | SHOW_POST_RIDE_FEEDBACK: 'riderApp.showPostRideFeedback', 16 | VEHICLE_COLOR: 'riderApp.vehicleIconColor', 17 | MEASURE_SYSTEM: 'riderApp.measureSystem', 18 | MULTI_SP: 'riderApp.showMultiStopPoint', 19 | DISABLE_CAPTCHA_UI: 'riderApp.disableCaptchaUi', 20 | MAX_DAYS_FOR_FUTURE_RIDE: 'riderApp.daysForFutureRideBooking', 21 | OFFLINE_PAYMENT_TEXT: 'riderApp.offlinePaymentText', 22 | HIDE_PRICE: 'riderApp.hidePrice', 23 | }; 24 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/state/index.js: -------------------------------------------------------------------------------- 1 | import React, { createContext, useContext, useReducer } from 'react'; 2 | 3 | export const StateContext = createContext(); 4 | export const StateProvider = ({ reducer, initialState, children }) => ( 5 | 6 | {children} 7 | 8 | ); 9 | export const useStateValue = () => useContext(StateContext); 10 | 11 | const getPopupKey = key => `popup_${key}`; 12 | 13 | export const getTogglePopupsState = () => { 14 | const [state, dispatch] = useContext(StateContext); 15 | 16 | return [id => state && (state[getPopupKey(id)] || false), (id, open) => dispatch({ 17 | type: 'changeState', 18 | payload: { 19 | [getPopupKey('ridePopupsStatus')]: open, 20 | [getPopupKey(id)]: open, 21 | }, 22 | })]; 23 | }; 24 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/context/virtualStationsContext/api.ts: -------------------------------------------------------------------------------- 1 | import networkService from '../../services/network'; 2 | 3 | export const getStations = async () => { 4 | const { data } = await networkService.get('api/v1/me/places/stations'); 5 | return data; 6 | }; 7 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/index.js: -------------------------------------------------------------------------------- 1 | import { LogBox } from 'react-native'; 2 | 3 | export { default as LocomotionRouter } from './LocomotionRouter'; 4 | export * from './context'; 5 | export * from './services'; 6 | export { default as BasicPopup } from './popups/BasicPopup'; 7 | // eslint-disable-next-line no-console 8 | LogBox.ignoreAllLogs(); 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/lib/objDefault.ts: -------------------------------------------------------------------------------- 1 | const defaultValueHandler = { 2 | get(target: any, name: string) { 3 | // eslint-disable-next-line no-prototype-builtins 4 | return target.hasOwnProperty(name) ? target[name] : target.defaultValue; 5 | }, 6 | }; 7 | 8 | export default (baseObj: any) => new Proxy(baseObj, defaultValueHandler); 9 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/lib/text-direction.ts: -------------------------------------------------------------------------------- 1 | import { I18nManager } from 'react-native'; 2 | 3 | export const Start = () => (I18nManager.isRTL ? 'right' : 'left'); 4 | export const StartCapital = () => (I18nManager.isRTL ? 'right' : 'left'); 5 | 6 | export const End = () => (I18nManager.isRTL ? 'left' : 'right'); 7 | export const EndCapital = () => (I18nManager.isRTL ? 'left' : 'right'); 8 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/lib/useBackHandler.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | import { BackHandler } from 'react-native'; 3 | 4 | const EVENT_NAME = 'hardwareBackPress'; 5 | 6 | export default (handleBackButtonClick: () => boolean | null | undefined) => useEffect(() => { 7 | const eventListener = BackHandler.addEventListener(EVENT_NAME, handleBackButtonClick); 8 | return () => { 9 | eventListener.remove(); 10 | }; 11 | }, []); 12 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/lib/useBackgroundInterval.js: -------------------------------------------------------------------------------- 1 | import { useRef, useEffect } from 'react'; 2 | import { InteractionManager } from 'react-native'; 3 | import reactNativeBackgroundTimer from 'react-native-background-timer'; 4 | 5 | const useInterval = (callback, delay) => { 6 | const savedCallback = useRef(); 7 | 8 | useEffect(() => { 9 | savedCallback.current = callback; 10 | }); 11 | 12 | useEffect(() => { 13 | const tick = () => { 14 | if (savedCallback && typeof savedCallback.current !== 'undefined') { 15 | InteractionManager.runAfterInteractions(() => { 16 | savedCallback.current(); 17 | }); 18 | } 19 | }; 20 | if (delay !== null) { 21 | const id = reactNativeBackgroundTimer.setInterval(tick, delay); 22 | return () => reactNativeBackgroundTimer.clearInterval(id); 23 | } 24 | 25 | return null; 26 | }, [delay]); 27 | }; 28 | export default useInterval; 29 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/lib/useInterval.js: -------------------------------------------------------------------------------- 1 | import { useRef, useEffect } from 'react'; 2 | import { InteractionManager, AppState } from 'react-native'; 3 | 4 | const useInterval = (callback, delay) => { 5 | const savedCallback = useRef(); 6 | 7 | useEffect(() => { 8 | savedCallback.current = callback; 9 | }); 10 | 11 | useEffect(() => { 12 | const tick = () => { 13 | if (AppState.currentState === 'active') { 14 | if (savedCallback && typeof savedCallback.current !== 'undefined') { 15 | InteractionManager.runAfterInteractions(() => { 16 | savedCallback.current(); 17 | }); 18 | } 19 | } 20 | }; 21 | if (delay !== null) { 22 | const id = setInterval(tick, delay); 23 | return () => clearInterval(id); 24 | } 25 | 26 | return null; 27 | }, [delay]); 28 | }; 29 | export default useInterval; 30 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/NewRideDrawer/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import MyLocationButton from '../../../Components/ShowMyLocationButton'; 3 | import { DrawerContainer, MapButtonsContainer, DrawerContentContainer } from './style'; 4 | import InputWithHistoryCard from '../../../Components/WhereTo/InputWithHistoryCard'; 5 | 6 | const NewRideDrawer = ({ 7 | focusCurrentLocation, 8 | }) => ( 9 | <> 10 | 11 | 12 | focusCurrentLocation()} 14 | displayButton 15 | /> 16 | 17 | 18 | 19 | ); 20 | 21 | export default NewRideDrawer; 22 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/NewRideDrawer/style.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const MapButtonsContainer = styled.View` 4 | margin: 8px; 5 | flex-direction: row-reverse; 6 | `; 7 | 8 | export const DrawerContainer = styled.View` 9 | flex-direction: column; 10 | position: absolute; 11 | bottom: 0; 12 | width: 100%; 13 | `; 14 | 15 | export const DrawerContentContainer = styled.SafeAreaView` 16 | flex-direction: column; 17 | background-color: ${({ theme }) => theme.pageBackgroundColor}; 18 | `; 19 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/AddressSelector/styled.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import styled from 'styled-components'; 4 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/MessageCard/index.js: -------------------------------------------------------------------------------- 1 | import React, { Fragment, useEffect } from 'react'; 2 | import { 3 | View, 4 | Image, 5 | } from 'react-native'; 6 | 7 | import { 8 | MessageContainer, MessageText, MessageTitle, CloseContainer, ResetInputIcon, 9 | } from './styled'; 10 | import { getTogglePopupsState } from '../../../../context/state'; 11 | 12 | export default ({ 13 | id, title, subTitle, closeAfter, onClose, 14 | }) => { 15 | const [isPopupOpen, togglePopup] = getTogglePopupsState(); 16 | const closePopup = () => { 17 | if (onClose) { 18 | onClose(); 19 | } 20 | togglePopup(id, false); 21 | }; 22 | useEffect(() => { 23 | if (closeAfter) { 24 | setTimeout(closePopup, closeAfter); 25 | } 26 | }, []); 27 | 28 | return ( 29 | 30 | {isPopupOpen(id) 31 | ? ( 32 | 33 | closePopup()} testID="CloseMessageCardButton"> 34 | 35 | 36 | 37 | {title} 38 | {subTitle} 39 | 40 | 41 | ) : null} 42 | 43 | ); 44 | }; 45 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/MessageCard/styled.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View, Text, TouchableOpacity } from 'react-native'; 3 | import styled from 'styled-components'; 4 | import xIcon from '../../../../assets/x.png'; 5 | import Button from '../../../../Components/Button'; 6 | 7 | export const MessageContainer = styled.View` 8 | min-height: 20px; 9 | padding-top: 20px; 10 | padding-bottom: 20px; 11 | align-items: center; 12 | flex-direction: row; 13 | flex-direction: column; 14 | `; 15 | 16 | 17 | export const MessageTitle = styled.Text` 18 | font-size: 14px; 19 | color: #727272; 20 | font-weight: 500; 21 | margin-bottom: 15px; 22 | text-align: center; 23 | `; 24 | 25 | export const MessageText = styled.Text` 26 | font-size: 12; 27 | color: #727272; 28 | text-align: center; 29 | font-weight: 500; 30 | `; 31 | 32 | export const CloseContainer = styled(Button)` 33 | position: absolute; 34 | right: 15px; 35 | top: 15px; 36 | width: 13px; 37 | height: 13px; 38 | `; 39 | 40 | 41 | export const ResetInputIcon = styled.Image.attrs({ source: xIcon })` 42 | display: flex; 43 | height: 13px; 44 | width: 13px; 45 | 46 | `; 47 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/RideOptions/RideButtons/NoteButton/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text } from 'react-native'; 3 | import styled from 'styled-components'; 4 | import SvgIcon from '../../../../../../Components/SvgIcon'; 5 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../../../../context/theme'; 6 | 7 | const TimeText = styled(Text)` 8 | ${FONT_SIZES.LARGE} 9 | ${FONT_WEIGHTS.MEDIUM} 10 | color: #333; 11 | margin: 5px; 12 | `; 13 | 14 | interface NoteButtonProps { 15 | icon: string; 16 | title: string; 17 | } 18 | 19 | const NoteButton = ({ 20 | icon, 21 | title, 22 | }: NoteButtonProps) => ( 23 | <> 24 | 25 | {title} 26 | 27 | ); 28 | 29 | export default NoteButton; 30 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/RideOptions/RideButtons/PassengersCounter/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | 3 | 4 | import SelectModal from '../../../../../../Components/SelectModal'; 5 | 6 | interface Item { 7 | value: number; 8 | label: string; 9 | } 10 | 11 | const PassengersCounter = ({ 12 | service, onSelect, onError = () => null, selectedValue, 13 | }) => { 14 | const [passengersOptions, setPassengersOptions] = useState([]); 15 | 16 | useEffect(() => { 17 | if (service?.availableSeats) { 18 | const array = []; 19 | for (let i = 1; i <= service.availableSeats; i += 1) { 20 | array.push({ label: i.toString(), value: i }); 21 | } 22 | setPassengersOptions(array); 23 | } 24 | }, [service]); 25 | 26 | 27 | const onItemSelect = (item: Item) => { 28 | onSelect(item?.value); 29 | }; 30 | return ( 31 | 37 | ); 38 | }; 39 | PassengersCounter.defaultProps = { 40 | selectedValue: null, 41 | }; 42 | export default PassengersCounter; 43 | -------------------------------------------------------------------------------- /examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/RideOptions/RideDetails/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import { Text, Button } from 'react-native'; 3 | import { RidePageContext } from '../../../../../context/newRideContext'; 4 | 5 | const RideDetails = () => { 6 | const { requestStopPoints, chosenService, requestRide } = useContext(RidePageContext) as any; 7 | return ( 8 | 9 |