├── faq
├── faq.md
└── contact-us.md
├── examples
└── client
│ └── Locomotion
│ ├── .nvmrc
│ ├── .watchmanconfig
│ ├── .ruby-version
│ ├── src
│ ├── storybook
│ │ ├── rn-addons.js
│ │ ├── addons.js
│ │ ├── stories
│ │ │ ├── index.js
│ │ │ └── CenterView.js
│ │ └── index.js
│ ├── assets
│ │ ├── x.png
│ │ ├── logo.png
│ │ ├── menu.png
│ │ ├── plus.png
│ │ ├── ppl.png
│ │ ├── star.png
│ │ ├── check.png
│ │ ├── clock.png
│ │ ├── minus.png
│ │ ├── price.png
│ │ ├── activitiy.png
│ │ ├── calendar.png
│ │ ├── car-icon.png
│ │ ├── distance.png
│ │ ├── duration.png
│ │ ├── history.png
│ │ ├── lightStar.png
│ │ ├── warning.png
│ │ ├── x-white.png
│ │ ├── arrow-back.png
│ │ ├── arrow-down.png
│ │ ├── arrowright.png
│ │ ├── center_btn.png
│ │ ├── marker-tip.png
│ │ ├── warning_red.png
│ │ ├── welcomeLogo.png
│ │ ├── contactUsLogo.png
│ │ ├── menuItems
│ │ │ ├── car.png
│ │ │ ├── help.png
│ │ │ ├── home.png
│ │ │ ├── logout.png
│ │ │ ├── person.png
│ │ │ └── creditcard.png
│ │ ├── slider-arrow.png
│ │ ├── warning_yellow.png
│ │ ├── fonts
│ │ │ ├── Inter-Bold.ttf
│ │ │ ├── Inter-Thin.ttf
│ │ │ ├── Inter-Black.ttf
│ │ │ ├── Inter-Light.ttf
│ │ │ ├── Inter-Medium.ttf
│ │ │ ├── Inter-Regular.ttf
│ │ │ ├── Inter-ExtraBold.ttf
│ │ │ ├── Inter-SemiBold.ttf
│ │ │ └── Inter-ExtraLight.ttf
│ │ ├── white-chevron-right.png
│ │ ├── map
│ │ │ └── markers
│ │ │ │ ├── stations
│ │ │ │ ├── pickup.svg
│ │ │ │ ├── dropoff.svg
│ │ │ │ ├── arrow.svg
│ │ │ │ └── bus.svg
│ │ │ │ ├── pickupIcon-nocolor.svg
│ │ │ │ ├── pickupIcon.svg
│ │ │ │ ├── dropoffIcon-nocolor.svg
│ │ │ │ └── dropoffIcon.svg
│ │ ├── connector.svg
│ │ ├── location_pin.svg
│ │ ├── chevron.svg
│ │ ├── bottomSheet
│ │ │ ├── phone.svg
│ │ │ ├── cancel.svg
│ │ │ ├── plus.svg
│ │ │ ├── clock.svg
│ │ │ ├── credit_card_icon.svg
│ │ │ ├── share.svg
│ │ │ ├── edit_note.svg
│ │ │ ├── trash.svg
│ │ │ └── drag-icon.svg
│ │ ├── person.svg
│ │ ├── arrow-back-learn-more.svg
│ │ ├── arrow-back.svg
│ │ ├── phone.svg
│ │ ├── email.svg
│ │ ├── close-x.svg
│ │ ├── checkmark.svg
│ │ ├── help.svg
│ │ ├── error-icon.svg
│ │ ├── warning.svg
│ │ ├── edit-icon.svg
│ │ ├── copy.svg
│ │ ├── credit-card.svg
│ │ ├── hamburger.svg
│ │ ├── selected-v.svg
│ │ ├── headset.svg
│ │ ├── default-payment.svg
│ │ ├── style-settings.js
│ │ ├── calendar.svg
│ │ ├── seat.svg
│ │ ├── delete.svg
│ │ ├── history.svg
│ │ ├── personal-payment.svg
│ │ ├── geo_location.svg
│ │ ├── target.svg
│ │ └── recent_search.svg
│ ├── pages
│ │ ├── ActiveRide
│ │ │ ├── RideDrawer
│ │ │ │ ├── RideOptions
│ │ │ │ │ ├── utils.ts
│ │ │ │ │ ├── ServiceOptions
│ │ │ │ │ │ ├── styles.ts
│ │ │ │ │ │ └── Skeleton
│ │ │ │ │ │ │ └── ServiceOptionsSkeleton.tsx
│ │ │ │ │ ├── RideButtons
│ │ │ │ │ │ ├── PaymentButton
│ │ │ │ │ │ │ └── Skeleton
│ │ │ │ │ │ │ │ └── PromoButtonSkeleton.tsx
│ │ │ │ │ │ ├── NoteButton
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ └── PassengersCounter
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── RideDetails
│ │ │ │ │ │ └── index.tsx
│ │ │ │ ├── AddressSelector
│ │ │ │ │ ├── styled.js
│ │ │ │ │ └── Skeleton
│ │ │ │ │ │ └── AddressLineSkeleton.tsx
│ │ │ │ ├── RideType.js
│ │ │ │ └── MessageCard
│ │ │ │ │ └── styled.js
│ │ │ ├── NewRideDrawer
│ │ │ │ ├── style.js
│ │ │ │ └── index.js
│ │ │ └── TopMessage
│ │ │ │ └── styled.ts
│ │ ├── FutureRidesView
│ │ │ └── styled.ts
│ │ ├── DevPage
│ │ │ └── styles.js
│ │ ├── AddCard
│ │ │ ├── index.js
│ │ │ └── styled.js
│ │ ├── styles.js
│ │ ├── RideHistory
│ │ │ ├── consts.js
│ │ │ ├── RideCard
│ │ │ │ └── Skeleton
│ │ │ │ │ └── TipButtonSkeleton.tsx
│ │ │ ├── marker.js
│ │ │ └── styled.js
│ │ ├── Profile
│ │ │ ├── ScreenText
│ │ │ │ ├── styles.js
│ │ │ │ └── index.js
│ │ │ ├── SaveButton
│ │ │ │ ├── styles.js
│ │ │ │ └── index.js
│ │ │ ├── Welcome
│ │ │ │ └── styles.js
│ │ │ └── Card.js
│ │ ├── Logout
│ │ │ └── index.js
│ │ ├── Payments
│ │ │ ├── balance.js
│ │ │ ├── externalPaymentMethod.ts
│ │ │ ├── cardDetailUtils.ts
│ │ │ ├── cashPaymentMethod.ts
│ │ │ ├── offlinePaymentMethod.ts
│ │ │ └── consts.ts
│ │ ├── AuthScreens
│ │ │ └── Profile
│ │ │ │ ├── SaveButton
│ │ │ │ └── styles.js
│ │ │ │ └── OnboardingNavButtons
│ │ │ │ └── styles.js
│ │ ├── PostRide
│ │ │ ├── StarRating.js
│ │ │ └── Feedback
│ │ │ │ └── styled.ts
│ │ ├── WebView
│ │ │ └── index.js
│ │ ├── WebViewPage
│ │ │ └── index.js
│ │ ├── RidePriceBreakdown
│ │ │ └── styled.js
│ │ ├── Lock
│ │ │ └── styled.js
│ │ └── routes.js
│ ├── Components
│ │ ├── PriceBreakdown
│ │ │ ├── Skeleton
│ │ │ │ ├── index.ts
│ │ │ │ ├── PriceBreakdownSkeleton.tsx
│ │ │ │ └── NoBreakdownSkeleton.tsx
│ │ │ └── styled.ts
│ │ ├── Thumbnail
│ │ │ ├── default.png
│ │ │ ├── add.svg
│ │ │ └── edit.svg
│ │ ├── BaseText
│ │ │ └── index.js
│ │ ├── Header
│ │ │ ├── styled.js
│ │ │ └── index.js
│ │ ├── Flex
│ │ │ └── index.ts
│ │ ├── TextArea
│ │ │ └── index.ts
│ │ ├── LinearGradient
│ │ │ └── index.js
│ │ ├── SafeView
│ │ │ ├── index.android.js
│ │ │ └── index.ios.js
│ │ ├── Tag
│ │ │ ├── index.js
│ │ │ └── styled.js
│ │ ├── PriceCard
│ │ │ ├── NoTitlePriceCard.tsx
│ │ │ ├── index.tsx
│ │ │ └── styled.js
│ │ ├── SvgIcon
│ │ │ ├── styled.js
│ │ │ └── index.js
│ │ ├── StopPointsVerticalView
│ │ │ ├── styled.js
│ │ │ └── VerticalTimeLine
│ │ │ │ ├── index.js
│ │ │ │ └── styled.js
│ │ ├── RideCard
│ │ │ ├── Skeleton
│ │ │ │ └── RideDateSkeleton.tsx
│ │ │ └── styled.ts
│ │ ├── NewCreditForm
│ │ │ └── styled.js
│ │ ├── BlackOverlay
│ │ │ └── index.tsx
│ │ ├── Stars
│ │ │ ├── star.svg
│ │ │ └── index.js
│ │ ├── WhereTo
│ │ │ └── InputWithHistoryCard.js
│ │ ├── TextInput
│ │ │ └── index.js
│ │ ├── Skeleton
│ │ │ └── Skeleton.tsx
│ │ ├── VirtualStationComponent
│ │ │ └── index.tsx
│ │ ├── CardDetails
│ │ │ └── styled.js
│ │ ├── SquareSvgButton
│ │ │ ├── styled.ts
│ │ │ └── index.tsx
│ │ ├── BsPages
│ │ │ └── Skeleton
│ │ │ │ └── ConfirmPickupSkeleton.tsx
│ │ ├── Switch
│ │ │ └── index.js
│ │ ├── EmptyState
│ │ │ ├── index.tsx
│ │ │ └── styled.ts
│ │ ├── FutureRidesButton
│ │ │ └── styled.ts
│ │ ├── ServiceTypeDetails
│ │ │ ├── index.tsx
│ │ │ └── styled.ts
│ │ ├── ShowMyLocationButton
│ │ │ └── index.js
│ │ ├── PrecedingStopPointMarker
│ │ │ └── index.tsx
│ │ ├── TextButton
│ │ │ └── index.tsx
│ │ ├── RidePaymentDetails
│ │ │ └── styled.ts
│ │ ├── CloseButton
│ │ │ └── index.tsx
│ │ ├── CardsTitle
│ │ │ └── index.tsx
│ │ ├── LinkText
│ │ │ └── index.tsx
│ │ ├── SlideButton
│ │ │ └── styled.js
│ │ ├── GenericRideButton
│ │ │ └── index.tsx
│ │ ├── PinCode
│ │ │ └── style.ts
│ │ ├── StopPointsViewer
│ │ │ ├── styled.ts
│ │ │ └── MultiSpConnector.tsx
│ │ ├── FullPageLoader
│ │ │ └── index.js
│ │ ├── NoTitleCard
│ │ │ └── index.tsx
│ │ ├── TextInputWithIcon
│ │ │ ├── styled.js
│ │ │ └── index.js
│ │ ├── SelectableButton
│ │ │ └── styled.js
│ │ ├── VirtualStationTooltipComponent
│ │ │ └── index.tsx
│ │ ├── Loader
│ │ │ └── index.js
│ │ ├── VirtualStationMarker
│ │ │ └── index.tsx
│ │ └── Toast
│ │ │ └── index.tsx
│ ├── services
│ │ ├── network.d.ts
│ │ ├── firebase.js
│ │ ├── index.js
│ │ ├── isAndroid.js
│ │ ├── logout.js
│ │ ├── showPriceBasedOnAccount.ts
│ │ ├── one-signal
│ │ │ └── types.ts
│ │ ├── user.js
│ │ └── appsflyer.ts
│ ├── svgLoader.d.ts
│ ├── context
│ │ ├── virtualStationsContext
│ │ │ └── api.ts
│ │ ├── index.js
│ │ ├── availability
│ │ │ └── api.ts
│ │ ├── cancellation-reasons
│ │ │ ├── api.ts
│ │ │ └── interface.ts
│ │ ├── futureRides
│ │ │ └── api.ts
│ │ ├── messages
│ │ │ ├── utils.ts
│ │ │ └── api.ts
│ │ ├── places
│ │ │ └── api.js
│ │ ├── newRideContext
│ │ │ └── google-api.js
│ │ ├── payments
│ │ │ └── interface.ts
│ │ ├── state
│ │ │ └── index.js
│ │ ├── settings
│ │ │ ├── api.ts
│ │ │ └── keys.ts
│ │ ├── ridePageStateContext
│ │ │ └── pointInPolygon.ts
│ │ └── rides
│ │ │ └── api.js
│ ├── index.js
│ ├── lib
│ │ ├── objDefault.ts
│ │ ├── text-direction.ts
│ │ ├── useBackHandler.tsx
│ │ ├── useInterval.js
│ │ └── useBackgroundInterval.js
│ └── popups
│ │ ├── RideCanceledPopup
│ │ ├── styled.ts
│ │ └── index.tsx
│ │ ├── TwoButtonPopup
│ │ └── styled.ts
│ │ ├── DatePickerPoppup
│ │ └── styled.ts
│ │ ├── RidePopups.js
│ │ ├── RideNotes
│ │ └── styled.js
│ │ ├── GenericPopup
│ │ └── styles.ts
│ │ ├── TempraryHoldLearnMore
│ │ ├── styles.ts
│ │ └── index.tsx
│ │ ├── FareBreakdownPopup
│ │ └── styled.ts
│ │ ├── FutureRideCanceled
│ │ └── styled.js
│ │ └── BasicPopup.js
│ ├── .npmignore
│ ├── .bundle
│ └── config
│ ├── app.json
│ ├── android
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ ├── colors.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ └── drawable
│ │ │ │ │ │ └── splash_screen.xml
│ │ │ │ └── assets
│ │ │ │ │ └── fonts
│ │ │ │ │ ├── Inter-Black.ttf
│ │ │ │ │ ├── Inter-Bold.ttf
│ │ │ │ │ ├── Inter-Light.ttf
│ │ │ │ │ ├── Inter-Thin.ttf
│ │ │ │ │ ├── Inter-Medium.ttf
│ │ │ │ │ ├── Inter-Regular.ttf
│ │ │ │ │ ├── Inter-ExtraBold.ttf
│ │ │ │ │ ├── Inter-ExtraLight.ttf
│ │ │ │ │ └── Inter-SemiBold.ttf
│ │ │ └── debug
│ │ │ │ └── AndroidManifest.xml
│ │ ├── debug.keystore
│ │ └── proguard-rules.pro
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── build.gradle
│ └── settings.gradle
│ ├── ios
│ ├── Locomotion
│ │ ├── Images.xcassets
│ │ │ ├── Contents.json
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── 40.png
│ │ │ │ ├── 58.png
│ │ │ │ ├── 60.png
│ │ │ │ ├── 80.png
│ │ │ │ ├── 87.png
│ │ │ │ ├── 1024.png
│ │ │ │ ├── 120.png
│ │ │ │ └── 180.png
│ │ │ └── SplashLogo.imageset
│ │ │ │ ├── logo.png
│ │ │ │ ├── logo-1.png
│ │ │ │ ├── logo-2.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── Locomotion.entitlements
│ │ └── AppDelegate.mm
│ ├── Locomotion-Bridging-Header.h
│ ├── Locomotion.xcworkspace
│ │ ├── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── contents.xcworkspacedata
│ ├── .xcode
│ └── LocomotionTests
│ │ └── Info.plist
│ ├── fastlane
│ ├── assets
│ │ └── app-icon.png
│ ├── Pluginfile
│ ├── Appfile
│ └── README.md
│ ├── jest.config.js
│ ├── firebase.json
│ ├── react-native.config.js
│ ├── index.js
│ ├── babel.config.js
│ ├── .env.sample
│ ├── __tests__
│ └── App-test.tsx
│ ├── types.d.ts
│ ├── Gemfile
│ ├── patches
│ ├── react-native-config+1.5.3.patch
│ └── react-native-geolocation-service+5.3.1.patch
│ ├── App.tsx
│ ├── metro.config.js
│ └── tsconfig.json
├── contributing
├── code-of-conduct.md
└── how-to-contribute.md
├── getting-started
├── configuration.md
├── installation.md
└── requirements.md
├── CONTRIBUTING.md
├── .gitignore
├── AUTHORS
├── SUMMARY.md
├── .github
└── workflows
│ └── app_test.yml
└── LICENSE
/faq/faq.md:
--------------------------------------------------------------------------------
1 | # FAQ
2 |
3 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/.nvmrc:
--------------------------------------------------------------------------------
1 | 20.15.1
--------------------------------------------------------------------------------
/examples/client/Locomotion/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/examples/client/Locomotion/.ruby-version:
--------------------------------------------------------------------------------
1 | 3.2.2
2 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/storybook/rn-addons.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/contributing/code-of-conduct.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 |
--------------------------------------------------------------------------------
/getting-started/configuration.md:
--------------------------------------------------------------------------------
1 | # Configuration
2 |
3 |
--------------------------------------------------------------------------------
/getting-started/installation.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 |
--------------------------------------------------------------------------------
/getting-started/requirements.md:
--------------------------------------------------------------------------------
1 | # Requirements
2 |
3 |
--------------------------------------------------------------------------------
/contributing/how-to-contribute.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/.npmignore:
--------------------------------------------------------------------------------
1 | .dependabot
2 | node_modules
--------------------------------------------------------------------------------
/examples/client/Locomotion/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Locomotion",
3 | "displayName": "Locomotion"
4 | }
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/x.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/RideOptions/utils.ts:
--------------------------------------------------------------------------------
1 | export type popupNames = 'notes' | 'payment' | 'passenger';
2 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/logo.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menu.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/plus.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/ppl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/ppl.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/star.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/storybook/addons.js:
--------------------------------------------------------------------------------
1 | import '@storybook/addon-actions/register';
2 | import '@storybook/addon-links/register';
3 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Locomotion
2 | Contribution guide coming soon
3 |
4 | ## Code of Conduct
5 | Code of Conduct guide coming soon
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/check.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/clock.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/minus.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/price.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/price.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Locomotion
3 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/activitiy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/activitiy.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/calendar.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/car-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/car-icon.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/distance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/distance.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/duration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/duration.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/history.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/lightStar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/lightStar.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/warning.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/x-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/x-white.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/debug.keystore
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/PriceBreakdown/Skeleton/index.ts:
--------------------------------------------------------------------------------
1 | export * from './PriceBreakdownSkeleton';
2 | export * from './NoBreakdownSkeleton';
3 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/arrow-back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/arrow-back.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/arrow-down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/arrow-down.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/arrowright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/arrowright.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/center_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/center_btn.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/marker-tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/marker-tip.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/warning_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/warning_red.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/welcomeLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/welcomeLogo.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/services/network.d.ts:
--------------------------------------------------------------------------------
1 | import { Axios } from 'axios';
2 |
3 | declare const network: Axios;
4 |
5 | export default network;
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/fastlane/assets/app-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/fastlane/assets/app-icon.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/contactUsLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/contactUsLogo.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menuItems/car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menuItems/car.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menuItems/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menuItems/help.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menuItems/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menuItems/home.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/slider-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/slider-arrow.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/warning_yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/warning_yellow.png
--------------------------------------------------------------------------------
/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/src/assets/fonts/Inter-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-Bold.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-Thin.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menuItems/logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menuItems/logout.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menuItems/person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menuItems/person.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-Black.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-Light.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-Medium.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-Regular.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/white-chevron-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/white-chevron-right.png
--------------------------------------------------------------------------------
/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/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/src/Components/Thumbnail/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/Components/Thumbnail/default.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-ExtraBold.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/fonts/Inter-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-SemiBold.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/menuItems/creditcard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/menuItems/creditcard.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/src/assets/fonts/Inter-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/src/assets/fonts/Inter-ExtraLight.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/logo.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/logo.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/logo.png
--------------------------------------------------------------------------------
/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/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/android/app/src/main/assets/fonts/Inter-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/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/HEAD/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Bold.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Light.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Thin.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/logo.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/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/android/app/src/main/assets/fonts/Inter-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/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/HEAD/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-Regular.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/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/HEAD/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-ExtraLight.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/assets/fonts/Inter-SemiBold.ttf
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/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/HEAD/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/HEAD/examples/client/Locomotion/ios/Locomotion/Images.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo.png
--------------------------------------------------------------------------------
/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/assets/map/markers/stations/pickup.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/examples/client/Locomotion/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Autofleet/locomotion/HEAD/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/HEAD/examples/client/Locomotion/ios/Locomotion/Images.xcassets/SplashLogo.imageset/logo-2.png
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/map/markers/stations/dropoff.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/FutureRidesView/styled.ts:
--------------------------------------------------------------------------------
1 | import { ScrollView } from 'react-native';
2 | import styled from 'styled-components';
3 |
4 | export const ContentContainer = styled(ScrollView)`
5 | flex: 1;
6 | `;
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/svgLoader.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.svg" {
2 | const content: any;
3 | export default content;
4 | }
5 |
6 | declare module "*.png" {
7 | const content: any;
8 | export default content;
9 | }
--------------------------------------------------------------------------------
/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/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/services/firebase.js:
--------------------------------------------------------------------------------
1 | import crashlytics from '@react-native-firebase/crashlytics';
2 |
3 | class Firebase {
4 | constructor(enable = false) {
5 | this.crashlytics = crashlytics();
6 | }
7 | }
8 |
9 | export default new Firebase();
10 |
--------------------------------------------------------------------------------
/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-8.9-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/storybook/stories/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { storiesOf } from '@storybook/react-native';
3 | import Welcome from './Welcome';
4 |
5 | require('./RideDrawer');
6 |
7 | storiesOf('Welcome', module).add('to Storybook', () => );
8 |
--------------------------------------------------------------------------------
/faq/contact-us.md:
--------------------------------------------------------------------------------
1 | # Contact Us
2 |
3 | ### Email [hey@autofleet.io](mailto:hey@autofleet.io) for any questions or inquires!
4 |
5 | Visit [autofleet.io](https://www.autofleet.io/) for more information on autofleet's mission to serve as the first ever Vehicle as a Service platform for fleets
6 |
7 |
--------------------------------------------------------------------------------
/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/src/assets/connector.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #f6f6f8
4 | #5c5c5c
5 | #5c5c5c
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:@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/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/assets/location_pin.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion/Locomotion.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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/services/index.js:
--------------------------------------------------------------------------------
1 | export { AppSettings as AppSettingsService } from './app-settings';
2 | export { default as authService } from './auth';
3 | // export FirebaseService from './firebase';
4 | export { default as NetworkService } from './network';
5 | export { default as StorageService } from './storage';
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/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/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/pages/ActiveRide/RideDrawer/RideOptions/ServiceOptions/styles.ts:
--------------------------------------------------------------------------------
1 | import { BottomSheetScrollView } from '@gorhom/bottom-sheet';
2 | import styled from 'styled-components';
3 |
4 | export const ServiceOptionsContainer = styled(BottomSheetScrollView)`
5 | width: 100%;
6 | padding: 0 8px;
7 | margin-bottom: 200px;
8 | `;
9 |
--------------------------------------------------------------------------------
/.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/
--------------------------------------------------------------------------------
/examples/client/Locomotion/ios/Locomotion.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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/assets/chevron.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/context/index.js:
--------------------------------------------------------------------------------
1 | export * from './main';
2 | export { RideStateContextContext, default as RideStateContextContextProvider } from './ridePageStateContext';
3 | export { RidePageContext as NewRidePageContext, default as NewRidePageContextProvider } from './newRideContext';
4 | export { default as MainContext } from './main';
5 |
--------------------------------------------------------------------------------
/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/storybook/stories/CenterView.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export default styled.View`
4 | flex: 1;
5 | justify-content: center;
6 | align-items: center;
7 | background-color: #F5FCFF;
8 | /* position: absolute; */
9 | /* top: 0; */
10 | margin-bottom: 50px;
11 | `;
12 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/DevPage/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 |
4 | export const Label = styled.Text`
5 | color: #666666;
6 | font-weight: 500;
7 | font-size: 18px;
8 | line-height: 20px;
9 | `;
10 | export const InputContainer = styled.View`
11 | margin: 10px auto;
12 | width: 100%
13 | `;
14 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/bottomSheet/phone.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/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/assets/person.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/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/.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 | GOOGLE_MAPS_API_KEY=
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/arrow-back-learn-more.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/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/src/assets/arrow-back.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/phone.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/AddCard/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { PageContent } from './styled';
3 | import NewCreditForm from '../../Components/NewCreditForm';
4 |
5 | export default ({ onDone, canSkip = true, PageText }) => (
6 |
11 | );
12 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/RideOptions/ServiceOptions/Skeleton/ServiceOptionsSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { ServiceCardSkeleton } from '../ServiceCard/Skeleton/ServiceCardSkeleton';
2 |
3 | export const ServiceOptionsSkeleton = () => (
4 | <>
5 |
6 |
7 |
8 | >
9 | );
10 |
--------------------------------------------------------------------------------
/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/assets/bottomSheet/cancel.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/pages/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import SafeView from '../Components/SafeView';
3 |
4 | export const PageContainer = styled(SafeView)`
5 | width: 100%;
6 | height: 100%;
7 | background-color: ${({ theme }) => theme.pageBackgroundColor};
8 | `;
9 |
10 | export const ContentContainer = styled.View`
11 | padding: 35px 30px;
12 | `;
13 |
--------------------------------------------------------------------------------
/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/assets/close-x.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/services/isAndroid.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Platform } from 'react-native';
3 |
4 | export const isAndroid = Platform.OS === 'android';
5 |
6 | export const OsContainer = ({ forAndroid, forIos, children }) => {
7 | const Container = isAndroid ? forAndroid : forIos;
8 | return (
9 |
10 | {children}
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/types.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.svg" {
2 | const content: any;
3 | export default content;
4 | }
5 |
6 | declare module "*.png" {
7 | const content: any;
8 | export default content;
9 | }
10 |
11 | declare module "*.jpg" {
12 | const content: any;
13 | export default content;
14 | }
15 |
16 | declare module "*.json" {
17 | const content: any;
18 | export default content;
19 | }
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/map/markers/stations/arrow.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/bottomSheet/plus.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/RideHistory/consts.js:
--------------------------------------------------------------------------------
1 | import moment from 'moment';
2 |
3 | export const startOfDayTime = '00:00:00';
4 |
5 | export const endOfDayTime = '23:59:59';
6 |
7 | export const YYYY_MM_DD = 'yyyy-MM-DD';
8 |
9 | export const DD_MMMM_YYYY = 'DD MMMM yyyy';
10 |
11 | export const MMMM_DD_YYYY = 'MMMM DD, yyyy';
12 |
13 | export const toDate = `${moment().format(YYYY_MM_DD)} ${endOfDayTime}`;
14 |
--------------------------------------------------------------------------------
/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/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/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/RideCard/Skeleton/RideDateSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../Skeleton/Skeleton';
3 |
4 | export const RideDateSkeleton = () => (
5 |
6 |
7 |
8 | );
9 |
10 | const styles = StyleSheet.create({
11 | content: {
12 | width: 150,
13 | height: 17,
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/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 | `;
10 |
11 | export const ErrorMessage = styled.Text`
12 | color: #f03a5f;
13 | margin-left: 16px;
14 | font-weight: 500;
15 | font-size: 16px;
16 | `;
17 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/PriceBreakdown/Skeleton/PriceBreakdownSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../Skeleton/Skeleton';
3 |
4 | export const PriceBreakdownSkeleton = () => (
5 |
6 |
7 |
8 | );
9 |
10 | const styles = StyleSheet.create({
11 | content: {
12 | width: 50,
13 | height: 10,
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/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/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/assets/checkmark.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/help.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/map/markers/pickupIcon-nocolor.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/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/assets/map/markers/pickupIcon.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/RideHistory/RideCard/Skeleton/TipButtonSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../../../Components/Skeleton/Skeleton';
3 |
4 | export const TipButtonSkeleton = () => (
5 |
6 |
7 |
8 | );
9 |
10 | const styles = StyleSheet.create({
11 | content: {
12 | width: 40,
13 | height: 10,
14 | marginTop: 10,
15 | },
16 | });
17 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/Stars/star.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/error-icon.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/warning.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/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/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/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/assets/bottomSheet/clock.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/RideOptions/RideButtons/PaymentButton/Skeleton/PromoButtonSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../../../../../../Components/Skeleton/Skeleton';
3 |
4 | export const PromoButtonSkeleton = () => (
5 |
6 |
7 |
8 | );
9 |
10 | const styles = StyleSheet.create({
11 | content: {
12 | width: 40,
13 | height: 10,
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/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/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/src/assets/edit-icon.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/Thumbnail/add.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/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/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 | # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7 | # bound in the template on Cocoapods with next React Native release.
8 | gem 'cocoapods', '>= 1.13', '< 1.15'
9 | gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
10 | gem 'xcodeproj', '< 1.26.0'
11 | gem 'concurrent-ruby', '<= 1.3.4'
12 |
--------------------------------------------------------------------------------
/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/src/assets/bottomSheet/credit_card_icon.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/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/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 |
10 |
11 | );
12 | };
13 |
14 | export default RideDetails;
15 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/RideCanceledPopup/styled.ts:
--------------------------------------------------------------------------------
1 | import { View } from 'react-native';
2 | import styled from 'styled-components';
3 |
4 | export const Container = styled(View)`
5 | display: flex;
6 | flex-direction: column;
7 | justify-content: space-evenly;
8 | background-color: #ffffff;
9 | border-radius: 8px;
10 | padding: 20px;
11 | align-items: center;
12 | `;
13 |
14 | export const ButtonContainer = styled(View)`
15 | `;
16 |
17 | export const TextContainer = styled(View)`
18 | align-items: center;
19 | padding: 30px 0;
20 | `;
21 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/TwoButtonPopup/styled.ts:
--------------------------------------------------------------------------------
1 | import { View } from 'react-native';
2 | import styled from 'styled-components';
3 |
4 | export const Container = styled(View)`
5 | display: flex;
6 | flex-direction: column;
7 | justify-content: space-evenly;
8 | background-color: #ffffff;
9 | border-radius: 8px;
10 | padding: 20px;
11 | align-items: center;
12 | `;
13 |
14 | export const ButtonContainer = styled(View)`
15 | `;
16 |
17 | export const TextContainer = styled(View)`
18 | padding-top: 15px;
19 | padding-bottom: 30px;
20 | `;
21 |
--------------------------------------------------------------------------------
/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/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/assets/copy.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/credit-card.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/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/services/logout.js:
--------------------------------------------------------------------------------
1 | import Auth from './auth';
2 | import network from './network';
3 | import OneSignal from './one-signal';
4 |
5 | export const logoutUserApi = async () => {
6 | const { data } = await network.post('api/v1/me/logout');
7 | return data;
8 | };
9 |
10 | export const logout = async (navigation = null) => {
11 | try {
12 | await logoutUserApi();
13 | OneSignal.logoutUser();
14 | await Auth.logout();
15 | } catch (e) {
16 | console.error('error when try to logout', e);
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/Skeleton/Skeleton.tsx:
--------------------------------------------------------------------------------
1 | import { ReactElement, useContext } from 'react';
2 | import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
3 | import { ThemeContext } from 'styled-components';
4 |
5 | interface SkeletonProps {
6 | children: ReactElement;
7 | }
8 |
9 | export const Skeleton = ({ children }: SkeletonProps) => {
10 | const theme = useContext(ThemeContext);
11 |
12 | return (
13 |
14 | {children}
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/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/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/pages/Profile/ScreenText/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../context/theme';
3 |
4 | export const TextContainer = styled.View`
5 | display: flex;
6 | flex-direction: column;
7 | margin-bottom: ${({ hasSubText }) => (hasSubText ? '40px' : '0px')};
8 | `;
9 |
10 | export const Text = styled.Text`
11 | ${FONT_SIZES.H3};
12 | ${FONT_WEIGHTS.SEMI_BOLD};
13 | margin: 5px 0;
14 | `;
15 |
16 | export const SubText = styled.Text`
17 | ${FONT_SIZES.LARGE};
18 | ${FONT_WEIGHTS.REGULAR};
19 | opacity: .8;
20 | `;
21 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/hamburger.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Logout/index.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from 'react';
2 | import propTypes from 'prop-types';
3 | import { logout } from '../../services/logout';
4 | import FullPageLoader from '../../Components/FullPageLoader';
5 |
6 | const Logout = ({ navigation }) => {
7 | useEffect(() => {
8 | logout(navigation);
9 | }, []);
10 |
11 | return (
12 |
13 | );
14 | };
15 |
16 | export default Logout;
17 |
18 | Logout.defaultProps = {
19 | navigation: undefined,
20 | };
21 |
22 | Logout.propTypes = {
23 | navigation: propTypes.shape({}),
24 | };
25 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/bottomSheet/share.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/DatePickerPoppup/styled.ts:
--------------------------------------------------------------------------------
1 | import { View } from 'react-native';
2 | import styled from 'styled-components';
3 |
4 | import Button from '../../Components/RoundedButton';
5 |
6 | export const ModalContainer = styled(View)`
7 | flex-direction: column;
8 | background-color: white;
9 | justify-content: flex-end;
10 | align-items: center;
11 | overflow: hidden;
12 | padding: 22px;
13 | padding-bottom: 34px;
14 | `;
15 |
16 | export const ConfirmButton = styled(Button)`
17 | margin-bottom: 15px;
18 | `;
19 |
20 | export const CancelButton = styled(Button)`
21 | `;
22 |
--------------------------------------------------------------------------------
/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/src/pages/Payments/balance.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import i18n from '../../I18n';
4 | import {
5 | BalanceTitle,
6 | BalanceText,
7 | BalanceTextContainer,
8 | } from './styled';
9 |
10 |
11 | export default ({ customer }) => (
12 |
13 |
14 | {i18n.t('payments.balance')}
15 | :
16 |
17 |
18 | {customer ? customer.balance : null}
19 | {' '}
20 | {customer && customer.currency ? customer.currency : null}
21 |
22 |
23 | );
24 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/services/showPriceBasedOnAccount.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | type GetBusinessAccountByIdFunction = (id: string) => any | null;
4 |
5 | type LoadShowPriceFunction = (showPriceToMembers?: boolean) => void;
6 |
7 | export default (
8 | loadShowPrice: LoadShowPriceFunction,
9 | getBusinessAccountById: GetBusinessAccountByIdFunction,
10 | businessAccountId: string | null | undefined,
11 | ) => {
12 | if (businessAccountId) {
13 | const { showPriceToMembers } = getBusinessAccountById(businessAccountId);
14 | loadShowPrice(showPriceToMembers ?? false);
15 | } else {
16 | loadShowPrice();
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/Thumbnail/edit.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/selected-v.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/ActiveRide/RideDrawer/AddressSelector/Skeleton/AddressLineSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../../../../Components/Skeleton/Skeleton';
3 |
4 | export const AddressLineSkeleton = () => (
5 |
6 |
7 |
8 |
9 |
10 |
11 | );
12 |
13 | const styles = StyleSheet.create({
14 | label: {
15 | width: 180,
16 | height: 20,
17 | marginBottom: 6,
18 | },
19 | text: {
20 | width: 220,
21 | height: 20,
22 | },
23 | });
24 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/services/one-signal/types.ts:
--------------------------------------------------------------------------------
1 | export interface NotificationAdditionalData {
2 | type?: string;
3 | [key: string]: any;
4 | }
5 |
6 | export type NotificationHandler = (data: NotificationAdditionalData) => void;
7 | export type NotificationHandlers = Record;
8 |
9 | export interface PushUserData {
10 | pushUserId: string | null;
11 | pushTokenId: string | null;
12 | isPushEnabled: boolean;
13 | deviceType: string;
14 | }
15 |
16 | export interface PushSettings {
17 | isPushEnabled: boolean;
18 | pushToken: string | null;
19 | pushSubscriptionId: string | null;
20 | }
21 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Profile/SaveButton/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../context/theme';
3 | import Button from '../../../Components/Button';
4 |
5 | export const NavButton = styled(Button)`
6 | width: 100%;
7 | height: 50px;
8 | background-color: ${({ disabled, theme }) => (disabled ? '#bcbcbc' : theme.primaryColor)};
9 | border-radius: 8px;
10 | margin-top: 40px;
11 | `;
12 |
13 | export const ButtonText = styled.Text`
14 | margin: auto;
15 | color: ${({ theme }) => theme.primaryButtonTextColor};
16 | ${FONT_SIZES.H2};
17 | ${FONT_WEIGHTS.REGULAR};
18 | `;
19 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/services/user.js:
--------------------------------------------------------------------------------
1 | import { MAIN_ROUTES } from '../pages/routes';
2 | import { getUserDetails } from '../context/user/api';
3 | import { logout } from './logout';
4 |
5 | const UserService = {
6 | getUser: async (navigation) => {
7 | const userData = await getUserDetails();
8 |
9 | if (!navigation) {
10 | return userData;
11 | }
12 |
13 | if (userData === null) {
14 | logout(navigation);
15 | }
16 |
17 | if (userData.active === false) {
18 | navigation.navigate(MAIN_ROUTES.LOCK);
19 | }
20 |
21 | return userData;
22 | },
23 | };
24 |
25 | module.exports = UserService;
26 |
--------------------------------------------------------------------------------
/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/assets/bottomSheet/edit_note.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/headset.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/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/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/pages/AuthScreens/Profile/SaveButton/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../context/theme';
3 | import Button from '../../../Components/Button';
4 |
5 | export const NavButton = styled(Button)`
6 | width: 100%;
7 | height: 50px;
8 | background-color: ${({ disabled, theme }) => (disabled ? '#bcbcbc' : theme.primaryColor)};
9 | border-radius: 8px;
10 | margin-top: 40px;
11 | `;
12 |
13 | export const ButtonText = styled.Text`
14 | margin: auto;
15 | color: ${({ theme }) => theme.primaryButtonTextColor};
16 | ${FONT_SIZES.H3};
17 | ${FONT_WEIGHTS.REGULAR};
18 | `;
19 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/Components/BsPages/Skeleton/ConfirmPickupSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../Skeleton/Skeleton';
3 |
4 | export const ConfirmPickupSkeleton = () => (
5 |
6 |
7 |
8 |
9 |
10 | );
11 |
12 | const styles = StyleSheet.create({
13 | container: {
14 | flexDirection: 'row',
15 | width: '100%',
16 | paddingLeft: 5,
17 | paddingRight: 10,
18 | alignItems: 'center',
19 | },
20 | input: {
21 | width: '100%',
22 | height: 13,
23 | },
24 | });
25 |
--------------------------------------------------------------------------------
/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/pages/AuthScreens/Profile/OnboardingNavButtons/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../context/theme';
3 | import Button from '../../../Components/Button';
4 |
5 | export const NavButton = styled(Button)`
6 | width: 100%;
7 | height: 50px;
8 | background-color: ${({ disabled, theme }) => (disabled ? '#bcbcbc' : theme.primaryColor)};
9 | border-radius: 8px;
10 | margin-top: 40px;
11 | `;
12 |
13 | export const ButtonText = styled.Text`
14 | margin: auto;
15 | color: ${({ theme }) => theme.primaryButtonTextColor};
16 | ${FONT_SIZES.H3};
17 | ${FONT_WEIGHTS.REGULAR};
18 | `;
19 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/PostRide/StarRating.js:
--------------------------------------------------------------------------------
1 |
2 | import React, { useEffect, useState } from 'react';
3 | import { SummaryStars } from './styled';
4 | import Stars from '../../Components/Stars';
5 |
6 | const StarRating = ({ onUpdate }) => {
7 | const [rating, setRating] = useState(null);
8 |
9 | const updateRating = async (rate) => {
10 | setRating(rate);
11 | };
12 |
13 | useEffect(() => {
14 | onUpdate(rating);
15 | }, [rating]);
16 |
17 | return (
18 |
19 |
20 |
21 | );
22 | };
23 |
24 |
25 | export default StarRating;
26 |
--------------------------------------------------------------------------------
/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/assets/default-payment.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/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/pages/Profile/ScreenText/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import propsTypes from 'prop-types';
3 | import { SubText, Text, TextContainer } from './styles';
4 |
5 | const ScreenText = ({ text, subText }) => (
6 |
7 |
8 | {text}
9 |
10 | {subText && (
11 |
12 | {subText}
13 |
14 | )}
15 |
16 | );
17 |
18 | ScreenText.propTypes = {
19 | text: propsTypes.string.isRequired,
20 | subText: propsTypes.string,
21 | };
22 |
23 | ScreenText.defaultProps = {
24 | subText: null,
25 | };
26 |
27 | export default ScreenText;
28 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Profile/Welcome/styles.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../context/theme';
3 |
4 | export const WelcomeText = styled.Text`
5 | font-size: 35px;
6 | font-weight: 600;
7 | margin: 10px 0;
8 | text-align: center;
9 | `;
10 | export const WelcomeSubText = styled.Text`
11 | ${FONT_SIZES.H3};
12 | ${FONT_WEIGHTS.REGULAR};
13 | margin: 10px 0;
14 | text-align: center;
15 | opacity: .6;
16 | `;
17 |
18 | export const PageContainer = styled.View`
19 | flex: 1;
20 | padding: 30px;
21 | align-items: center;
22 | `;
23 |
24 | export const TextContainer = styled.View`
25 | align-items: center;
26 | `;
27 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/bottomSheet/trash.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/RidePopups.js:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from 'react';
2 | import i18n from '../I18n';
3 | import BasicPopup from './BasicPopup';
4 |
5 | export default () => (
6 |
7 | {/* */}
8 |
9 | {/* */}
10 | {/* */}
11 |
12 | );
13 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/calendar.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/seat.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/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/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/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/pages/Payments/externalPaymentMethod.ts:
--------------------------------------------------------------------------------
1 | import { PaymentMethodInterface } from 'context/payments/interface';
2 | import i18n from 'i18next';
3 | import { PAYMENT_METHODS } from './consts';
4 |
5 | export const externalPaymentMethod : PaymentMethodInterface = {
6 | brand: 'generic',
7 | createdAt: new Date(),
8 | customerId: '',
9 | expiresAt: new Date(2100, 9, 9),
10 | hasOutstandingBalance: false,
11 | id: PAYMENT_METHODS.EXTERNAL,
12 | isDefault: false,
13 | isExpired: false,
14 | lastFour: '',
15 | name: i18n.t('payments.external'),
16 | stripeId: '',
17 | updatedAt: new Date(),
18 | deletedAt: null,
19 | outstandingBalance: { amount: 0, currency: 'USD' },
20 | };
21 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Payments/cardDetailUtils.ts:
--------------------------------------------------------------------------------
1 | import { isCardPaymentMethod } from '../../lib/ride/utils';
2 | import { PAYMENT_METHODS } from '../../lib/commonTypes';
3 |
4 | export const capitalizeFirstLetter = (string: string) => string?.charAt(0).toUpperCase() + string?.slice(1);
5 | export const getLastFourForamttedShort = (lastFour: string) => `**** ${capitalizeFirstLetter(lastFour)}`;
6 | export const getLastFourForamttedLong = (lastFour: string) => `**** **** **** ${capitalizeFirstLetter(lastFour)}`;
7 |
8 | export const getPaymentMethod = (paymentMethodId: string) => {
9 | if (!isCardPaymentMethod({ id: paymentMethodId })) {
10 | return paymentMethodId;
11 | }
12 | return PAYMENT_METHODS.CARD;
13 | };
14 |
--------------------------------------------------------------------------------
/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/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/src/pages/ActiveRide/RideDrawer/RideType.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | RowContainer, RideTypeButton, RideTypeButtonText,
4 | } from './styled';
5 |
6 | const values = [
7 | { value: 'private', label: 'Private' },
8 | { value: 'pool', label: 'Shared' },
9 | ];
10 |
11 | export default ({ rideType, setRideType }) => (
12 |
13 | {values.map(v => (
14 | setRideType(v.value)} testID={`${v.label}-RideTypeButton`}>
15 |
16 | {' '}
17 | {v.label}
18 | {' '}
19 |
20 |
21 | ))}
22 |
23 | );
24 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/delete.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Payments/cashPaymentMethod.ts:
--------------------------------------------------------------------------------
1 | import i18n from '../../I18n';
2 | import { PaymentMethodInterface } from '../../context/payments/interface';
3 | import { PAYMENT_METHODS } from './consts';
4 |
5 | const cashPaymentMethod : PaymentMethodInterface = {
6 | brand: 'generic',
7 | createdAt: new Date(),
8 | customerId: '',
9 | expiresAt: new Date(2100, 9, 9),
10 | hasOutstandingBalance: false,
11 | id: PAYMENT_METHODS.CASH,
12 | isDefault: false,
13 | isExpired: false,
14 | lastFour: '',
15 | name: i18n.t('payments.payWithCash'),
16 | stripeId: '',
17 | updatedAt: new Date(),
18 | deletedAt: null,
19 | outstandingBalance: { amount: 0, currency: 'USD' },
20 | };
21 |
22 | export default cashPaymentMethod;
23 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/history.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Payments/offlinePaymentMethod.ts:
--------------------------------------------------------------------------------
1 | import i18n from '../../I18n';
2 | import { PaymentMethodInterface } from '../../context/payments/interface';
3 | import { PAYMENT_METHODS } from './consts';
4 |
5 | const offlinePaymentMethod : PaymentMethodInterface = {
6 | brand: 'generic',
7 | createdAt: new Date(),
8 | customerId: '',
9 | expiresAt: new Date(2100, 9, 9),
10 | hasOutstandingBalance: false,
11 | id: PAYMENT_METHODS.OFFLINE,
12 | isDefault: false,
13 | isExpired: false,
14 | lastFour: '',
15 | name: i18n.t('payments.offline'),
16 | stripeId: '',
17 | updatedAt: new Date(),
18 | deletedAt: null,
19 | outstandingBalance: { amount: 0, currency: 'USD' },
20 | };
21 |
22 | export default offlinePaymentMethod;
23 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/WebView/index.js:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from 'react';
2 | import { WebView } from 'react-native-webview';
3 | import PageHeader from '../../Components/PageHeader';
4 |
5 | import closeIconSource from '../../assets/x.png';
6 |
7 | export default ({
8 | navigation, uri, title, onIconPress, menuSide = 'right',
9 | }) => (
10 | <>
11 |
17 | { uri ? (
18 |
25 | ) : null}
26 | >
27 | );
28 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/.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."
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/personal-payment.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/storybook/index.js:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import { getStorybookUI, configure } from '@storybook/react-native';
3 |
4 | import './rn-addons';
5 |
6 | // import stories
7 | configure(() => {
8 | require('./stories');
9 | }, module);
10 |
11 | // Refer to https://github.com/storybookjs/storybook/tree/master/app/react-native#start-command-parameters
12 | // To find allowed options for getStorybookUI
13 | const StorybookUIRoot = getStorybookUI({});
14 |
15 | // If you are using React Native vanilla and after installation you don't see your app name here, write it manually.
16 | // If you use Expo you can safely remove this line.
17 | AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);
18 |
19 | export default StorybookUIRoot;
20 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/WebViewPage/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useRoute } from '@react-navigation/native';
3 | import { MAIN_ROUTES } from '../routes';
4 | import WebView from '../WebView';
5 | import SafeView from '../../Components/SafeView';
6 | import * as navigationService from '../../services/navigation';
7 |
8 | export default () => {
9 | const route = useRoute();
10 | const {
11 | url,
12 | title,
13 | } = (route.params || {
14 | url: '',
15 | title: '',
16 | });
17 | return (
18 |
19 | navigationService.navigate(MAIN_ROUTES.HOME)}
23 | />
24 |
25 | );
26 | };
27 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/App.tsx:
--------------------------------------------------------------------------------
1 | import { StatusBar } from 'react-native';
2 | import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
3 | import LocomotionRouter from './src/LocomotionRouter';
4 | import customLogo from './src/assets/logo.png';
5 | import customI18n from './src/I18n/en.json';
6 |
7 | const App = () => (
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 | );
20 |
21 | export default App;
22 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/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/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/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://reactnative.dev/docs/metro
4 | *
5 | * @format
6 | */
7 |
8 | const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
9 |
10 | const config = {
11 | transformer: {
12 | getTransformOptions: async () => ({
13 | transform: {
14 | experimentalImportSupport: false,
15 | inlineRequires: false,
16 | },
17 | }),
18 | babelTransformerPath: require.resolve('react-native-svg-transformer'),
19 | },
20 | resolver: {
21 | assetExts: ['bin', 'txt', 'jpg', 'png', 'json', 'gif', 'webp', 'ttf', 'woff', 'woff2', 'otf'],
22 | sourceExts: ['js', 'jsx', 'ts', 'tsx', 'json', 'svg'],
23 | },
24 | };
25 |
26 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
27 |
--------------------------------------------------------------------------------
/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/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 = "35.0.0"
6 | minSdkVersion = 24
7 | compileSdkVersion = 35
8 | targetSdkVersion = 35
9 | supportLibVersion = "35.0.0"
10 | kotlinVersion = "1.9.22"
11 | ndkVersion = "26.1.10909125"
12 | }
13 | repositories {
14 | google()
15 | mavenCentral()
16 | }
17 | dependencies {
18 | classpath('com.android.tools.build:gradle:8.7.0')
19 | classpath("com.facebook.react:react-native-gradle-plugin")
20 | classpath ('com.google.gms:google-services:4.3.13')
21 | classpath ('com.google.firebase:firebase-crashlytics-gradle:2.9.1')
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/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/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/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/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/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/assets/map/markers/stations/bus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/src/pages/RidePriceBreakdown/styled.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme';
3 |
4 | export const CreditCardRowContainer = styled.View`
5 | width: 300px;
6 | margin-top: 20px;
7 | margin-bottom: 10px;
8 | padding: 10px;
9 | border-color: #f1f2f6;
10 | border-style: solid;
11 | border-width: 1px;
12 | `;
13 |
14 | export const PriceItemsContainer = styled.View`
15 | width: 90%;
16 | margin-left: 15px;
17 | margin-right: 5px;
18 | `;
19 |
20 | export const EstimationContainer = styled.View`
21 | padding: 10px;
22 | background-color: #f8f8f8;
23 | width: 300px;
24 | `;
25 |
26 | export const EstimationText = styled.Text`
27 | ${FONT_SIZES.MEDIUM};
28 | ${FONT_WEIGHTS.LIGHT}
29 | `;
30 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/geo_location.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/app/src/main/res/drawable/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 | -
6 |
9 |
12 |
20 |
21 |
--------------------------------------------------------------------------------
/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/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/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/pages/RideHistory/marker.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import DropoffIcon from '../../assets/map/markers/dropoffIcon-nocolor.svg';
3 | import PickupIcon from '../../assets/map/markers/pickupIcon-nocolor.svg';
4 |
5 | export const PickupIconMarker = styled(PickupIcon).attrs(({ theme, disableMarkers }) => ({
6 | height: '15px',
7 | fill: disableMarkers ? '#bcbcbc' : theme.primaryColor,
8 | width: '15px',
9 | }))`
10 | ${({ theme, onMap }) => (onMap ? '' : `background-color: ${theme.pageBackgroundColor};`)}
11 | `;
12 |
13 | export const DropoffIconMarker = styled(DropoffIcon).attrs(({ theme, disableMarkers }) => ({
14 | height: '24px',
15 | fill: disableMarkers ? '#bcbcbc' : theme.primaryColor,
16 | stroke: theme.primaryColor,
17 | width: '18px',
18 | }))`
19 | ${({ theme, onMap }) => (onMap ? '' : `background-color: ${theme.pageBackgroundColor};`)}
20 | `;
21 |
--------------------------------------------------------------------------------
/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/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/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/pages/Profile/SaveButton/index.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import i18n from '../../../I18n';
3 | import { ButtonText, NavButton } from './styles';
4 |
5 |
6 | const SaveButton = ({
7 | isInvalid, onFail, onNext, buttonText, isLoading,
8 | }) => {
9 | const [loading, setLoading] = useState(false);
10 | const nextScreen = async () => {
11 | setLoading(true);
12 | if (isInvalid) {
13 | onFail();
14 | } else if (onNext) {
15 | await onNext();
16 | }
17 | setLoading(false);
18 | };
19 |
20 | useEffect(() => {
21 | setLoading(!!isLoading);
22 | }, [isLoading]);
23 |
24 | return (
25 |
26 | {buttonText || i18n.t('general.next')}
27 |
28 | );
29 | };
30 |
31 | export default SaveButton;
32 |
--------------------------------------------------------------------------------
/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/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/PriceBreakdown/Skeleton/NoBreakdownSkeleton.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, View } from 'react-native';
2 | import { Skeleton } from '../../Skeleton/Skeleton';
3 |
4 | const SkeletonItem = () => (
5 |
6 |
7 |
8 |
9 |
10 |
11 | );
12 |
13 | export const NoBreakdownSkeleton = () => (
14 | <>
15 |
16 |
17 |
18 | >
19 | );
20 |
21 | const styles = StyleSheet.create({
22 | container: {
23 | flexDirection: 'row',
24 | justifyContent: 'space-between',
25 | width: '100%',
26 | paddingLeft: 16,
27 | paddingRight: 16,
28 | paddingTop: 8,
29 | },
30 | itemText: {
31 | width: '30%',
32 | height: 10,
33 | },
34 | itemButton: {
35 | width: 50,
36 | height: 10,
37 | },
38 | });
39 |
--------------------------------------------------------------------------------
/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/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/PinCode/style.ts:
--------------------------------------------------------------------------------
1 | import { StyleSheet } from 'react-native';
2 |
3 | interface StylingProps {
4 | theme: any;
5 | }
6 |
7 | export const styling = ({ theme }: StylingProps) => StyleSheet.create({
8 | root: {
9 | display: 'flex',
10 | flexDirection: 'row',
11 | alignItems: 'center',
12 | justifyContent: 'center',
13 | gap: 10,
14 | },
15 | codeFieldRoot: {
16 | marginTop: 20,
17 | width: 280,
18 | marginLeft: 'auto',
19 | marginRight: 'auto',
20 | },
21 | cellContainer: {
22 | borderBottomWidth: 2,
23 | borderColor: '#333333',
24 | },
25 | focusCell: {
26 | borderColor: theme.primaryColor,
27 | },
28 | errorCell: {
29 | borderColor: theme.errorColor,
30 | },
31 | cell: {
32 | width: 55,
33 | height: 55,
34 | lineHeight: 55,
35 | fontSize: 30,
36 | fontWeight: '600',
37 | textAlign: 'center',
38 | color: theme.textColor,
39 | },
40 | });
41 |
--------------------------------------------------------------------------------
/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/assets/target.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/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/pages/AddCard/styled.js:
--------------------------------------------------------------------------------
1 |
2 | import { View, Text, Dimensions } from 'react-native';
3 | import styled from 'styled-components';
4 |
5 | export const PageContent = styled(View)`
6 | width: 100%;
7 | height: 100%;
8 | padding: 30px;
9 | background-color: #fff;
10 | `;
11 |
12 | export const NoRidesMessageContainer = styled(View)`
13 | flex: 1;
14 | flex-direction: column;
15 | justify-content: center;
16 | align-items: center;
17 | width: 100%;
18 | height: 100%;
19 | background-color: #fff;
20 | `;
21 |
22 | export const NoRidesTitle = styled(View)`
23 | width: 100%;
24 | height: 100%;
25 | justify-content: center;
26 | align-items: center;
27 | `;
28 |
29 | export const NoRidesTitleText = styled(Text)`
30 | text-align: center;
31 | font-size: 20px;
32 | font-weight: 700;
33 | `;
34 |
35 | export const NoRidesTitleSubText = styled(Text)`
36 | color: grey;
37 | font-size: 16px;
38 | font-weight: 400;
39 | `;
40 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Lock/styled.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { padding } from '../../assets/style-settings';
3 |
4 | const loginTextColor = '#7c8799';
5 |
6 | export const Container = styled.View`
7 | background-color: white;
8 | height: 100%;
9 | color: ${loginTextColor};
10 | text-align: center;
11 | align-items: center;
12 | padding: ${padding};
13 | `;
14 |
15 | export const LockTextContainer = styled.View`
16 | width: 100%;
17 | padding: 0px 15px;
18 | max-height: 400px;
19 | height: 230px;
20 | margin-top: 150px;
21 | `;
22 |
23 | export const Text = styled.Text`
24 | color: ${loginTextColor};
25 | text-align: center;
26 | `;
27 |
28 | export const SubText = styled(Text)`
29 | margin-top: 25px;
30 |
31 | `;
32 |
33 | export const ButtonContainer = styled.View`
34 | position: absolute;
35 | bottom: 15px;
36 | width: 100%;
37 | `;
38 |
39 | export const HeaderText = styled(Text)`
40 | font-weight: 700;
41 | margin-top: 25px;
42 | `;
43 |
--------------------------------------------------------------------------------
/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/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@react-native/typescript-config/tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "allowSyntheticDefaultImports": true,
6 | "esModuleInterop": true,
7 | "isolatedModules": true,
8 | "jsx": "react-native",
9 | "lib": ["es2017"],
10 | "moduleResolution": "bundler",
11 | "noEmit": true,
12 | "strict": true,
13 | "target": "esnext",
14 | "baseUrl": ".",
15 | "paths": {
16 | "*": ["src/*"],
17 | "tests": ["tests/*"],
18 | },
19 | "skipLibCheck": true,
20 | "incremental": true,
21 | "module": "esnext",
22 | "sourceMap": false,
23 | "experimentalDecorators": true,
24 | "emitDecoratorMetadata": true,
25 | "resolveJsonModule": true,
26 | },
27 | "exclude": [
28 | "node_modules",
29 | "babel.config.js",
30 | "metro.config.js",
31 | "jest.config.js"
32 | ],
33 | "include": [
34 | "src/**/*",
35 | "*.tsx",
36 | "*.ts"
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/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/pages/routes.js:
--------------------------------------------------------------------------------
1 |
2 | export const APP_ROUTES = {
3 | MAIN_APP: 'MainApp',
4 | AUTH_LOADING: 'AuthLoading',
5 | };
6 |
7 | export const MAIN_ROUTES = {
8 | HOME: 'Home',
9 | RIDE_HISTORY: 'RideHistory',
10 | PAYMENT: 'Payment',
11 | ACCOUNT: 'Account',
12 | COMPLETED_RIDE_OVERVIEW_PAGE: 'CompletedRideOverviewPage',
13 | CONTACT_US: 'ContactUs',
14 | LOGOUT: 'Logout',
15 | WEBVIEW: 'webview',
16 | START: 'Start',
17 | PHONE: 'Phone',
18 | CODE: 'Code',
19 | EMAIL_CODE: 'EmailCode',
20 | NAME: 'Name',
21 | ADD_CARD: 'AddCard',
22 | CARD: 'AddCard',
23 | AVATAR: 'Avatar',
24 | EMAIL: 'Email',
25 | WELCOME: 'Welcome',
26 | LOCK: 'Lock',
27 | POST_RIDE: 'PostRide',
28 | CARD_DETAILS: 'CardDetails',
29 | EDIT_NICKNAME: 'EditNickname',
30 | FUTURE_RIDES: 'FutureRides',
31 | RIDE_PRICE_BREAKDOWN: 'RidePriceBreakdown',
32 | PROMO_CODE: 'PromoCode',
33 | MESSAGES: 'messages',
34 | MESSAGE_VIEW: 'messageView',
35 | DEV_SETTINGS_PAGE: 'DevSettingPage',
36 | };
37 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Profile/Card.js:
--------------------------------------------------------------------------------
1 | import React, { useContext } from 'react';
2 | import i18n from '../../I18n';
3 | import AddCard from '../AddCard';
4 | import Header from './Header';
5 | import ScreenText from './ScreenText';
6 | import { OnboardingContext } from '../../context/onboarding';
7 | import { MAIN_ROUTES } from '../routes';
8 | import { PageContainer, ContentContainer } from '../styles';
9 |
10 | const Card = () => {
11 | const { nextScreen } = useContext(OnboardingContext);
12 |
13 | const onDone = async () => {
14 | nextScreen(MAIN_ROUTES.CARD);
15 | };
16 | return (
17 |
18 |
19 |
20 | }
24 | />
25 |
26 |
27 | );
28 | };
29 |
30 | export default Card;
31 |
--------------------------------------------------------------------------------
/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/src/popups/RideNotes/styled.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | View, Text, Image, TouchableOpacity,
4 | } from 'react-native';
5 | import styled from 'styled-components';
6 | import { TextArea } from '../../Components/TextArea';
7 | import { End } from '../../lib/text-direction';
8 |
9 | export const SummaryContainer = styled.View`
10 | padding: 20px;
11 | background-color: white;
12 | justify-content: center;
13 | align-items: center;
14 | border-radius: 2;
15 | border-color: rgba(0, 0, 0, 0.1);
16 | `;
17 |
18 | export const Title = styled.Text`
19 | font-size: 20px;
20 | color: black;
21 | font-weight: 500;
22 | margin-bottom: 15px;
23 | flex: 1;
24 | `;
25 |
26 | export const Counter = styled.Text`
27 | font-size: 16px;
28 | line-hight: 20px;
29 | margin-top: 4px;
30 | color: #1a303b56;
31 | margin-bottom: 15px;
32 | text-align: ${End};
33 | width: 55;
34 | `;
35 |
36 | export const StyledTextArea = styled(TextArea)`
37 | margin-bottom: 20px;
38 | padding: 8px;
39 | color: #333333;
40 | `;
41 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/GenericPopup/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { Text, View } from 'react-native';
3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme';
4 | import Button from '../../Components/Button';
5 |
6 | export const Container = styled(View)`
7 | background-color: #ffffff;
8 | border-radius: 8px;
9 | padding: 20px;
10 | `;
11 |
12 | export const TitleContainer = styled(View)`
13 | display: flex;
14 | flex-direction: row;
15 | align-items: center;
16 | justify-content: flex-start;
17 | `;
18 |
19 | export const ButtonText = styled(Text)`
20 | ${FONT_SIZES.H3}
21 | ${FONT_WEIGHTS.REGULAR}
22 | color: ${({ theme }) => theme.primaryButtonTextColor}
23 | `;
24 |
25 | export const TextContainer = styled(View)`
26 | width: 90%;
27 | opacity: .8;
28 | padding: 15px 0;
29 | `;
30 |
31 | export const CloseButton = styled(Button)`
32 | width: 135px;
33 | height: 45px;
34 | display: flex;
35 | justify-content: center;
36 | align-items: center;
37 | border-radius: 8px;
38 | align-self: center;
39 | margin-top: 10px;
40 | `;
41 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/TempraryHoldLearnMore/styles.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { Text, View } from 'react-native';
3 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme';
4 | import Button from '../../Components/Button';
5 |
6 | export const Container = styled(View)`
7 | background-color: #ffffff;
8 | border-radius: 8px;
9 | padding: 20px;
10 | `;
11 |
12 | export const TitleContainer = styled(View)`
13 | display: flex;
14 | flex-direction: row;
15 | align-items: center;
16 | justify-content: flex-start;
17 | `;
18 |
19 | export const ButtonText = styled(Text)`
20 | ${FONT_SIZES.H3}
21 | ${FONT_WEIGHTS.REGULAR}
22 | color: ${({ theme }) => theme.primaryButtonTextColor}
23 | `;
24 |
25 | export const TextContainer = styled(View)`
26 | width: 90%;
27 | opacity: .8;
28 | padding: 15px 0;
29 | `;
30 |
31 | export const CloseButton = styled(Button)`
32 | width: 135px;
33 | height: 45px;
34 | display: flex;
35 | justify-content: center;
36 | align-items: center;
37 | border-radius: 8px;
38 | align-self: center;
39 | margin-top: 10px;
40 | `;
41 |
--------------------------------------------------------------------------------
/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/popups/FareBreakdownPopup/styled.ts:
--------------------------------------------------------------------------------
1 | import { Text, View } from 'react-native';
2 | import styled from 'styled-components';
3 | import CloseButton from '../../Components/CloseButton';
4 | import { FONT_SIZES, FONT_WEIGHTS } from '../../context/theme';
5 |
6 | export const StyledCloseButton = styled(CloseButton)`
7 | align-self: flex-end;
8 | margin-bottom: 5;
9 | `;
10 |
11 | export const OuterContainer = styled(View)`
12 | display: flex;
13 | flex-direction: column;
14 | justify-content: space-evenly;
15 | background-color: #ffffff;
16 | border-radius: 8px;
17 | `;
18 |
19 | export const InnerContainer = styled(View)`
20 | display: flex;
21 | flex-direction: column;
22 | justify-content: space-evenly;
23 | padding: 16px;
24 | `;
25 |
26 | export const EstimatedTextContainer = styled(View)`
27 | background-color: #f8f8f8;
28 | align-items: center;
29 | padding: 8px;
30 | border-radius: 4px;
31 | margin: 10px 0;
32 | `;
33 |
34 | export const EstimatedText = styled(Text)`
35 | text-align: center;
36 | ${FONT_SIZES.SMALL}
37 | ${FONT_WEIGHTS.LIGHT}
38 | opacity: .7;
39 | `;
40 |
--------------------------------------------------------------------------------
/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/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/services/appsflyer.ts:
--------------------------------------------------------------------------------
1 | import { Platform } from 'react-native';
2 | import appsFlyer from 'react-native-appsflyer';
3 | import Config from 'react-native-config';
4 |
5 | const LOG_PREFIX = 'APPSFLYER INTEG';
6 | const { ANDROID_APPSFLYER_DEV_KEY, IOS_APPSFLYER_DEV_KEY, IOS_APP_ID } = Config;
7 | const PLATFORM_CONFIG: any = {
8 | android: {
9 | devKey: ANDROID_APPSFLYER_DEV_KEY,
10 | },
11 | ios: {
12 | devKey: IOS_APPSFLYER_DEV_KEY,
13 | appId: IOS_APP_ID,
14 | timeToWaitForATTUserAuthorization: 10, // for iOS 14.5
15 | },
16 | };
17 |
18 | export default () => {
19 | const config = PLATFORM_CONFIG[Platform.OS];
20 | if (config?.devKey) {
21 | appsFlyer.initSdk(
22 | {
23 | ...config,
24 | isDebug: false,
25 | onInstallConversionDataListener: true, // Optional
26 | onDeepLinkListener: true, // Optional
27 | },
28 | (result) => {
29 | console.log(`${LOG_PREFIX} SUCCESS`, result);
30 | },
31 | (error) => {
32 | console.error(`${LOG_PREFIX} ERROR`, error);
33 | },
34 | );
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/bottomSheet/drag-icon.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/pages/Payments/consts.ts:
--------------------------------------------------------------------------------
1 | import cashIcon from '../../assets/cash.svg';
2 | import offlineIcon from '../../assets/offline.svg';
3 | import defaultPaymentIcon from '../../assets/default-payment.svg';
4 | import personalPaymentIcon from '../../assets/personal-payment.svg';
5 | import businessPaymentIcon from '../../assets/business-payment.svg';
6 |
7 | export const PAYMENT_METHODS = {
8 | CASH: 'cash',
9 | OFFLINE: 'offline',
10 | CARD: 'card',
11 | EXTERNAL: 'external',
12 | };
13 | export const PAYMENT_MODES = {
14 | PERSONAL: 'personal',
15 | BUSINESS: 'business',
16 | };
17 | export const PAYMENT_TABS = [
18 | {
19 | textKey: 'popups.choosePaymentMethod.tabs.personal',
20 | id: PAYMENT_MODES.PERSONAL,
21 | Svg: personalPaymentIcon,
22 | },
23 | {
24 | textKey: 'popups.choosePaymentMethod.tabs.business',
25 | id: PAYMENT_MODES.BUSINESS,
26 | Svg: businessPaymentIcon,
27 | },
28 | ];
29 | export const paymentMethodToIconMap = {
30 | [PAYMENT_METHODS.CASH]: cashIcon,
31 | [PAYMENT_METHODS.OFFLINE]: offlineIcon,
32 | [PAYMENT_METHODS.EXTERNAL]: defaultPaymentIcon,
33 | };
34 |
--------------------------------------------------------------------------------
/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/pages/RideHistory/styled.js:
--------------------------------------------------------------------------------
1 | import { View, Text, Dimensions } from 'react-native';
2 | import styled from 'styled-components';
3 | import CalendarSvg from '../../assets/calendar.svg';
4 |
5 | export const PageContent = styled(View)`
6 | width: 100%;
7 | height: 100%;
8 | `;
9 |
10 | export const NoRidesMessageContainer = styled(View)`
11 | flex: 1;
12 | flex-direction: column;
13 | justify-content: center;
14 | align-items: center;
15 | width: 100%;
16 | height: 100%;
17 | background-color: #fff;
18 | `;
19 |
20 | export const NoRidesTitle = styled(View)`
21 | width: 100%;
22 | height: 100%;
23 | justify-content: center;
24 | align-items: center;
25 | `;
26 |
27 | export const NoRidesTitleText = styled(Text)`
28 | text-align: center;
29 | font-size: 20px;
30 | font-weight: 700;
31 | `;
32 |
33 | export const NoRidesTitleSubText = styled(Text)`
34 | color: grey;
35 | font-size: 16px;
36 | font-weight: 400;
37 | `;
38 |
39 | export const CalendarSvgIcon = styled(CalendarSvg).attrs(({ theme }) => ({
40 | width: '20px',
41 | height: '20px',
42 | fill: theme.primaryColor,
43 | }))``;
44 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Locomotion'
2 | include ':react-native-exit-app'
3 | project(':react-native-exit-app').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-exit-app/android')
4 | include ':react-native-restart'
5 | project(':react-native-restart').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-restart/android')
6 | include ':react-native-background-timer'
7 | project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
8 | include ':react-native-version-check'
9 | project(':react-native-version-check').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-check/android')
10 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
11 | include ':app'
12 | includeBuild('../node_modules/@react-native/gradle-plugin')
13 |
14 | include ':react-native-linear-gradient'
15 | project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
16 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/FutureRideCanceled/styled.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styled from 'styled-components';
3 | import xIcon from '../../assets/x.png';
4 | import Button from '../../Components/Button';
5 |
6 | export const Container = styled.View`
7 | padding: 20px 0;
8 | min-height: 200;
9 | background-color: white;
10 | justify-content: center;
11 | align-items: center;
12 | border-radius: 2;
13 | border-color: rgba(0, 0, 0, 0.1);
14 | overflow: hidden;
15 | `;
16 |
17 | export const Title = styled.Text`
18 | font-size: 20px;
19 | color: black;
20 | font-weight: 500;
21 | margin-bottom: 15px;
22 | text-align: center;
23 | `;
24 |
25 | export const SubTitle = styled.Text`
26 | text-align: center;
27 | color: #727272;
28 | font-size: 12;
29 | font-weight: 500;
30 | padding-top: 20px;
31 | padding-bottom: 15px;
32 | `;
33 |
34 | export const CloseContainer = styled(Button)`
35 | position: absolute;
36 | right: 15px;
37 | top: 15px;
38 | width: 13px;
39 | height: 13px;
40 | `;
41 |
42 | export const ResetInputIcon = styled.Image.attrs({ source: xIcon })`
43 | display: flex;
44 | height: 13px;
45 | width: 13px;
46 | `;
47 |
--------------------------------------------------------------------------------
/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/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/TopMessage/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 | margin: 0 20px;
7 | padding: 10px;
8 | shadow-offset: 0px 0px;
9 | shadow-color: #04214f;
10 | shadow-opacity: 0.4;
11 | elevation: 3;
12 | background-color: ${({ theme }) => theme.pageBackgroundColor};
13 | border-radius: 8px;
14 | `;
15 |
16 | export const BodyText = styled(Text)`
17 | ${FONT_SIZES.MEDIUM};
18 | ${FONT_WEIGHTS.REGULAR};
19 | `;
20 |
21 | export const Title = styled(View)`
22 | flex-direction: row;
23 | padding-bottom: 5px;
24 | align-items: center;
25 | `;
26 |
27 | export const TitleText = styled(Text)`
28 | ${FONT_SIZES.LARGE};
29 | ${FONT_WEIGHTS.BOLD};
30 | `;
31 |
32 | export const ButtonContainer = styled(View)`
33 | align-items: flex-end;
34 | margin-top: 10px;
35 | height: 15px;
36 | `;
37 |
38 | export const ButtonText = styled(Text)`
39 | color: #24aaf2
40 | ${FONT_SIZES.LARGE};
41 | ${FONT_WEIGHTS.SEMI_BOLD};
42 | margin-bottom: -10px;
43 | `;
44 |
--------------------------------------------------------------------------------
/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/assets/recent_search.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/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/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/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 | return [self bundleURL];
18 | }
19 |
20 | - (NSURL *)bundleURL
21 | {
22 | #if DEBUG
23 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
24 | #else
25 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
26 | #endif
27 | }
28 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
29 | ///
30 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
31 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
32 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
33 | - (BOOL)concurrentRootEnabled
34 | {
35 | return true;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/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/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/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/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/popups/TempraryHoldLearnMore/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { SetStateAction } from 'react';
2 | import Modal from 'react-native-modal';
3 | import Config from 'react-native-config';
4 | import { SubTitle, Title } from '../styled';
5 | import i18n from '../../I18n';
6 | import {
7 | ButtonText, CloseButton, Container, TextContainer, TitleContainer,
8 | } from './styles';
9 |
10 | interface TempraryHoldLearnMoreProps {
11 | isVisible: boolean;
12 | closePopup: any | SetStateAction;
13 | }
14 |
15 | const TempraryHoldLearnMorePopup = ({
16 | isVisible,
17 | closePopup,
18 |
19 | }: TempraryHoldLearnMoreProps) => (
20 |
21 |
22 |
23 | {i18n.t('temporaryHoldPopup.title')}
24 |
25 |
26 |
27 | {i18n.t('temporaryHoldPopup.text', { appName: Config.OPERATION_NAME })}
28 |
29 |
30 |
31 |
32 | {`${i18n.t('temporaryHoldPopup.buttonText')}`}
33 |
34 |
35 |
36 |
37 | );
38 | export default TempraryHoldLearnMorePopup;
39 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/popups/RideCanceledPopup/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Modal from 'react-native-modal';
3 | import RoundedButton from '../../Components/RoundedButton';
4 | import { SubTitle, Title } from '../styled';
5 | import i18n from '../../I18n';
6 | import {
7 | Container, ButtonContainer, TextContainer,
8 | } from './styled';
9 |
10 | interface RideCanceledProps {
11 | isVisible: boolean;
12 | onCancel: any;
13 | onSubmit: any;
14 | }
15 |
16 | const RideCanceledPopup = ({
17 | isVisible,
18 | onCancel,
19 | onSubmit,
20 | }: RideCanceledProps) => (
21 |
22 |
23 |
24 | {i18n.t('popups.rideCanceled.title')}
25 | {i18n.t('popups.rideCanceled.text')}
26 |
27 |
28 |
29 | {i18n.t('popups.rideCanceled.buttonText')}
30 |
31 |
32 | {i18n.t('popups.rideCanceled.closeButtonText')}
33 |
34 |
35 |
36 |
37 | );
38 |
39 | export default RideCanceledPopup;
40 |
--------------------------------------------------------------------------------
/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/popups/BasicPopup.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from 'react';
2 | import { KeyboardAvoidingView } from 'react-native';
3 | import Modal from 'react-native-modal';
4 | import {
5 | ModalContainer, Content, FooterButton, Title, SubTitle,
6 | } from './styled';
7 | import { getTogglePopupsState } from '../context/state';
8 |
9 | export default ({
10 | id, title, subTitle, closeAfter, content, onClose,
11 | }) => {
12 | const [isPopupOpen, togglePopup] = getTogglePopupsState();
13 | const closePopup = () => {
14 | if (onClose) {
15 | onClose();
16 | }
17 | togglePopup(id, false);
18 | };
19 | useEffect(() => {
20 | if (closeAfter) {
21 | setTimeout(closePopup, closeAfter);
22 | }
23 | }, []);
24 |
25 | return (
26 |
27 |
28 |
29 |
30 | {title}
31 | {subTitle}
32 | {content || undefined}
33 |
34 |
35 |
36 |
37 |
38 | );
39 | };
40 |
--------------------------------------------------------------------------------
/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 |
26 |
27 | {text2}
28 |
29 |
30 |
31 |
38 |
39 | );
40 | export default AFToast;
41 |
--------------------------------------------------------------------------------
/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/pages/PostRide/Feedback/styled.ts:
--------------------------------------------------------------------------------
1 | import { Text, View } from 'react-native';
2 | import styled from 'styled-components';
3 | import { TextArea } from '../../../Components/TextArea';
4 | import { FONT_SIZES, FONT_WEIGHTS } from '../../../context/theme';
5 | import { End } from '../../../lib/text-direction';
6 |
7 | export const ActiveLabelContainer = styled(View)`
8 | flex-direction: row;
9 | align-items: center;
10 | `;
11 | export const ActiveWriteCommentLabel = styled(Text)`
12 | color: ${({ theme }) => theme.primaryColor};
13 | margin-left: 6px;
14 | ${FONT_SIZES.H3};
15 | ${FONT_WEIGHTS.REGULAR};
16 | `;
17 | export const WriteCommentContainer = styled(View)``;
18 | export const LabelComment = styled(Text)`
19 | color: #989A9B;
20 | ${FONT_SIZES.LARGE};
21 | ${FONT_WEIGHTS.REGULAR};
22 | `;
23 | export const StyledTextArea = styled(TextArea)`
24 | padding: 8px;
25 | color: #333333;
26 | `;
27 | export const Container = styled(View)`
28 | padding: 0px 30px;
29 | `;
30 |
31 | export const Counter = styled(Text)`
32 | font-size: 16px;
33 | color: #1a303b56;
34 | text-align: ${End};
35 | flex: 1;
36 | `;
37 |
38 | export const TextAreaTopBar = styled(View)`
39 | flex-direction: row;
40 | margin-bottom: 5px;
41 | margin-top: 10px;
42 | `;
43 |
--------------------------------------------------------------------------------
/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/assets/map/markers/dropoffIcon-nocolor.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/examples/client/Locomotion/src/assets/map/markers/dropoffIcon.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------