feat(smart-app): implement complete mobile app MVP

- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
This commit is contained in:
Eric FELIXINE
2026-06-01 18:00:35 -04:00
parent 08ca495bde
commit e30ae8ed09
35578 changed files with 3703534 additions and 43 deletions

View File

@@ -0,0 +1,31 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentDescriptorCpp.js
*/
#include "ComponentDescriptors.h"
#include <react/renderer/core/ConcreteComponentDescriptor.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
namespace facebook::react {
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
registry->add(concreteComponentDescriptorProvider<RNMapsCalloutComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsCircleComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsGoogleMapViewComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsGooglePolygonComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsMapViewComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsMarkerComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsOverlayComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsPolylineComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsUrlTileComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsWMSTileComponentDescriptor>());
}
} // namespace facebook::react

View File

@@ -0,0 +1,33 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentDescriptorH.js
*/
#pragma once
#include "ShadowNodes.h"
#include <react/renderer/core/ConcreteComponentDescriptor.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
namespace facebook::react {
using RNMapsCalloutComponentDescriptor = ConcreteComponentDescriptor<RNMapsCalloutShadowNode>;
using RNMapsCircleComponentDescriptor = ConcreteComponentDescriptor<RNMapsCircleShadowNode>;
using RNMapsGoogleMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsGoogleMapViewShadowNode>;
using RNMapsGooglePolygonComponentDescriptor = ConcreteComponentDescriptor<RNMapsGooglePolygonShadowNode>;
using RNMapsMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsMapViewShadowNode>;
using RNMapsMarkerComponentDescriptor = ConcreteComponentDescriptor<RNMapsMarkerShadowNode>;
using RNMapsOverlayComponentDescriptor = ConcreteComponentDescriptor<RNMapsOverlayShadowNode>;
using RNMapsPolylineComponentDescriptor = ConcreteComponentDescriptor<RNMapsPolylineShadowNode>;
using RNMapsUrlTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsUrlTileShadowNode>;
using RNMapsWMSTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsWMSTileShadowNode>;
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
} // namespace facebook::react

View File

@@ -0,0 +1,979 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateEventEmitterCpp.js
*/
#include "EventEmitters.h"
namespace facebook::react {
void RNMapsCalloutEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsCircleEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused event) const {
dispatchEvent("indoorBuildingFocused", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "underground", event.underground);
payload.setProperty(runtime, "activeLevelIndex", event.activeLevelIndex);
payload.setProperty(runtime, "levels", event.levels);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated event) const {
dispatchEvent("indoorLevelActivated", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "activeLevelIndex", event.activeLevelIndex);
payload.setProperty(runtime, "name", event.name);
payload.setProperty(runtime, "shortName", event.shortName);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onKmlReady(OnKmlReady event) const {
dispatchEvent("kmlReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onLongPress(OnLongPress event) const {
dispatchEvent("longPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMapLoaded(OnMapLoaded event) const {
dispatchEvent("mapLoaded", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMapReady(OnMapReady event) const {
dispatchEvent("mapReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect event) const {
dispatchEvent("markerDeselect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDrag(OnMarkerDrag event) const {
dispatchEvent("markerDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "id", event.id);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd event) const {
dispatchEvent("markerDragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart event) const {
dispatchEvent("markerDragStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerPress(OnMarkerPress event) const {
dispatchEvent("markerPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerSelect(OnMarkerSelect event) const {
dispatchEvent("markerSelect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onPanDrag(OnPanDrag event) const {
dispatchEvent("panDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onPoiClick(OnPoiClick event) const {
dispatchEvent("poiClick", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "placeId", event.placeId);
payload.setProperty(runtime, "name", event.name);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart event) const {
dispatchEvent("regionChangeStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onRegionChange(OnRegionChange event) const {
dispatchEvent("regionChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete event) const {
dispatchEvent("regionChangeComplete", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onUserLocationChange(OnUserLocationChange event) const {
dispatchEvent("userLocationChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
coordinate.setProperty(runtime, "altitude", event.coordinate.altitude);
coordinate.setProperty(runtime, "timestamp", event.coordinate.timestamp);
coordinate.setProperty(runtime, "accuracy", event.coordinate.accuracy);
coordinate.setProperty(runtime, "speed", event.coordinate.speed);
coordinate.setProperty(runtime, "heading", event.coordinate.heading);
coordinate.setProperty(runtime, "altitudeAccuracy", event.coordinate.altitudeAccuracy);
coordinate.setProperty(runtime, "isFromMockProvider", event.coordinate.isFromMockProvider);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto error = jsi::Object(runtime);
error.setProperty(runtime, "message", event.error.message);
payload.setProperty(runtime, "error", error);
}
return payload;
});
}
void RNMapsGooglePolygonEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onCalloutPress(OnCalloutPress event) const {
dispatchEvent("calloutPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
{
auto frame = jsi::Object(runtime);
frame.setProperty(runtime, "x", event.frame.x);
frame.setProperty(runtime, "y", event.frame.y);
frame.setProperty(runtime, "width", event.frame.width);
frame.setProperty(runtime, "height", event.frame.height);
payload.setProperty(runtime, "frame", frame);
}
payload.setProperty(runtime, "id", event.id);
{
auto point = jsi::Object(runtime);
point.setProperty(runtime, "x", event.point.x);
point.setProperty(runtime, "y", event.point.y);
payload.setProperty(runtime, "point", point);
}
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onDoublePress(OnDoublePress event) const {
dispatchEvent("doublePress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused event) const {
dispatchEvent("indoorBuildingFocused", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto IndoorBuilding = jsi::Object(runtime);
IndoorBuilding.setProperty(runtime, "underground", event.IndoorBuilding.underground);
IndoorBuilding.setProperty(runtime, "activeLevelIndex", event.IndoorBuilding.activeLevelIndex);
payload.setProperty(runtime, "IndoorBuilding", IndoorBuilding);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated event) const {
dispatchEvent("indoorLevelActivated", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto IndoorLevel = jsi::Object(runtime);
IndoorLevel.setProperty(runtime, "activeLevelIndex", event.IndoorLevel.activeLevelIndex);
IndoorLevel.setProperty(runtime, "name", event.IndoorLevel.name);
IndoorLevel.setProperty(runtime, "shortName", event.IndoorLevel.shortName);
payload.setProperty(runtime, "IndoorLevel", IndoorLevel);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onKmlReady(OnKmlReady event) const {
dispatchEvent("kmlReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsMapViewEventEmitter::onLongPress(OnLongPress event) const {
dispatchEvent("longPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMapLoaded(OnMapLoaded event) const {
dispatchEvent("mapLoaded", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMapReady(OnMapReady event) const {
dispatchEvent("mapReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect event) const {
dispatchEvent("markerDeselect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDrag(OnMarkerDrag event) const {
dispatchEvent("markerDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "id", event.id);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd event) const {
dispatchEvent("markerDragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart event) const {
dispatchEvent("markerDragStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerPress(OnMarkerPress event) const {
dispatchEvent("markerPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerSelect(OnMarkerSelect event) const {
dispatchEvent("markerSelect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onPanDrag(OnPanDrag event) const {
dispatchEvent("panDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onPoiClick(OnPoiClick event) const {
dispatchEvent("poiClick", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "placeId", event.placeId);
payload.setProperty(runtime, "name", event.name);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart event) const {
dispatchEvent("regionChangeStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsMapViewEventEmitter::onRegionChange(OnRegionChange event) const {
dispatchEvent("regionChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete event) const {
dispatchEvent("regionChangeComplete", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsMapViewEventEmitter::onUserLocationChange(OnUserLocationChange event) const {
dispatchEvent("userLocationChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
coordinate.setProperty(runtime, "altitude", event.coordinate.altitude);
coordinate.setProperty(runtime, "timestamp", event.coordinate.timestamp);
coordinate.setProperty(runtime, "accuracy", event.coordinate.accuracy);
coordinate.setProperty(runtime, "speed", event.coordinate.speed);
coordinate.setProperty(runtime, "heading", event.coordinate.heading);
coordinate.setProperty(runtime, "altitudeAccuracy", event.coordinate.altitudeAccuracy);
coordinate.setProperty(runtime, "isFromMockProvider", event.coordinate.isFromMockProvider);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto error = jsi::Object(runtime);
error.setProperty(runtime, "message", event.error.message);
payload.setProperty(runtime, "error", error);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onCalloutPress(OnCalloutPress event) const {
dispatchEvent("calloutPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto frame = jsi::Object(runtime);
frame.setProperty(runtime, "x", event.frame.x);
frame.setProperty(runtime, "y", event.frame.y);
frame.setProperty(runtime, "width", event.frame.width);
frame.setProperty(runtime, "height", event.frame.height);
payload.setProperty(runtime, "frame", frame);
}
{
auto point = jsi::Object(runtime);
point.setProperty(runtime, "x", event.point.x);
point.setProperty(runtime, "y", event.point.y);
payload.setProperty(runtime, "point", point);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDeselect(OnDeselect event) const {
dispatchEvent("deselect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDrag(OnDrag event) const {
dispatchEvent("drag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDragEnd(OnDragEnd event) const {
dispatchEvent("dragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDragStart(OnDragStart event) const {
dispatchEvent("dragStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onSelect(OnSelect event) const {
dispatchEvent("select", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsOverlayEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsPolylineEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
} // namespace facebook::react

View File

@@ -0,0 +1,860 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateEventEmitterH.js
*/
#pragma once
#include <react/renderer/components/view/ViewEventEmitter.h>
namespace facebook::react {
class RNMapsCalloutEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsCircleEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsGoogleMapViewEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnIndoorBuildingFocused {
bool underground;
int activeLevelIndex;
std::string levels;
};
struct OnIndoorLevelActivated {
int activeLevelIndex;
std::string name;
std::string shortName;
};
struct OnKmlReady {
};
struct OnLongPressCoordinate {
double latitude;
double longitude;
};
struct OnLongPressPosition {
double x;
double y;
};
struct OnLongPress {
OnLongPressCoordinate coordinate;
OnLongPressPosition position;
std::string action;
};
struct OnMapLoaded {
};
struct OnMapReady {
};
struct OnMarkerDeselectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDeselect {
std::string action;
std::string id;
OnMarkerDeselectCoordinate coordinate;
};
struct OnMarkerDragCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragPosition {
double x;
double y;
};
struct OnMarkerDrag {
OnMarkerDragCoordinate coordinate;
OnMarkerDragPosition position;
std::string id;
};
struct OnMarkerDragEndCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragEndPosition {
double x;
double y;
};
struct OnMarkerDragEnd {
OnMarkerDragEndCoordinate coordinate;
std::string id;
OnMarkerDragEndPosition position;
};
struct OnMarkerDragStartCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragStartPosition {
double x;
double y;
};
struct OnMarkerDragStart {
OnMarkerDragStartCoordinate coordinate;
std::string id;
OnMarkerDragStartPosition position;
};
struct OnMarkerPressCoordinate {
double latitude;
double longitude;
};
struct OnMarkerPressPosition {
double x;
double y;
};
struct OnMarkerPress {
std::string action;
std::string id;
OnMarkerPressCoordinate coordinate;
OnMarkerPressPosition position;
};
struct OnMarkerSelectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerSelect {
std::string action;
std::string id;
OnMarkerSelectCoordinate coordinate;
};
struct OnPanDragCoordinate {
double latitude;
double longitude;
};
struct OnPanDragPosition {
double x;
double y;
};
struct OnPanDrag {
OnPanDragCoordinate coordinate;
OnPanDragPosition position;
};
struct OnPoiClickCoordinate {
double latitude;
double longitude;
};
struct OnPoiClickPosition {
double x;
double y;
};
struct OnPoiClick {
std::string placeId;
std::string name;
OnPoiClickCoordinate coordinate;
OnPoiClickPosition position;
};
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
OnPressCoordinate coordinate;
OnPressPosition position;
std::string action;
};
struct OnRegionChangeStartRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeStart {
OnRegionChangeStartRegion region;
bool isGesture;
};
struct OnRegionChangeRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChange {
OnRegionChangeRegion region;
bool isGesture;
};
struct OnRegionChangeCompleteRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeComplete {
OnRegionChangeCompleteRegion region;
bool isGesture;
};
struct OnUserLocationChangeCoordinate {
double latitude;
double longitude;
double altitude;
double timestamp;
Float accuracy;
Float speed;
Float heading;
Float altitudeAccuracy;
bool isFromMockProvider;
};
struct OnUserLocationChangeError {
std::string message;
};
struct OnUserLocationChange {
OnUserLocationChangeCoordinate coordinate;
OnUserLocationChangeError error;
};
void onIndoorBuildingFocused(OnIndoorBuildingFocused value) const;
void onIndoorLevelActivated(OnIndoorLevelActivated value) const;
void onKmlReady(OnKmlReady value) const;
void onLongPress(OnLongPress value) const;
void onMapLoaded(OnMapLoaded value) const;
void onMapReady(OnMapReady value) const;
void onMarkerDeselect(OnMarkerDeselect value) const;
void onMarkerDrag(OnMarkerDrag value) const;
void onMarkerDragEnd(OnMarkerDragEnd value) const;
void onMarkerDragStart(OnMarkerDragStart value) const;
void onMarkerPress(OnMarkerPress value) const;
void onMarkerSelect(OnMarkerSelect value) const;
void onPanDrag(OnPanDrag value) const;
void onPoiClick(OnPoiClick value) const;
void onPress(OnPress value) const;
void onRegionChangeStart(OnRegionChangeStart value) const;
void onRegionChange(OnRegionChange value) const;
void onRegionChangeComplete(OnRegionChangeComplete value) const;
void onUserLocationChange(OnUserLocationChange value) const;
};
class RNMapsGooglePolygonEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsMapViewEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnCalloutPressFrame {
double x;
double y;
double width;
double height;
};
struct OnCalloutPressPoint {
double x;
double y;
};
struct OnCalloutPressCoordinate {
double latitude;
double longitude;
};
struct OnCalloutPressPosition {
double x;
double y;
};
struct OnCalloutPress {
std::string action;
OnCalloutPressFrame frame;
std::string id;
OnCalloutPressPoint point;
OnCalloutPressCoordinate coordinate;
OnCalloutPressPosition position;
};
struct OnDoublePressCoordinate {
double latitude;
double longitude;
};
struct OnDoublePressPosition {
double x;
double y;
};
struct OnDoublePress {
OnDoublePressCoordinate coordinate;
OnDoublePressPosition position;
};
struct OnIndoorBuildingFocusedIndoorBuilding {
bool underground;
int activeLevelIndex;
};
struct OnIndoorBuildingFocused {
OnIndoorBuildingFocusedIndoorBuilding IndoorBuilding;
};
struct OnIndoorLevelActivatedIndoorLevel {
int activeLevelIndex;
std::string name;
std::string shortName;
};
struct OnIndoorLevelActivated {
OnIndoorLevelActivatedIndoorLevel IndoorLevel;
};
struct OnKmlReady {
};
struct OnLongPressCoordinate {
double latitude;
double longitude;
};
struct OnLongPressPosition {
double x;
double y;
};
struct OnLongPress {
OnLongPressCoordinate coordinate;
OnLongPressPosition position;
std::string action;
};
struct OnMapLoaded {
};
struct OnMapReady {
};
struct OnMarkerDeselectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDeselect {
std::string action;
std::string id;
OnMarkerDeselectCoordinate coordinate;
};
struct OnMarkerDragCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragPosition {
double x;
double y;
};
struct OnMarkerDrag {
OnMarkerDragCoordinate coordinate;
OnMarkerDragPosition position;
std::string id;
};
struct OnMarkerDragEndCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragEndPosition {
double x;
double y;
};
struct OnMarkerDragEnd {
OnMarkerDragEndCoordinate coordinate;
std::string id;
OnMarkerDragEndPosition position;
};
struct OnMarkerDragStartCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragStartPosition {
double x;
double y;
};
struct OnMarkerDragStart {
OnMarkerDragStartCoordinate coordinate;
std::string id;
OnMarkerDragStartPosition position;
};
struct OnMarkerPressCoordinate {
double latitude;
double longitude;
};
struct OnMarkerPressPosition {
double x;
double y;
};
struct OnMarkerPress {
std::string action;
std::string id;
OnMarkerPressCoordinate coordinate;
OnMarkerPressPosition position;
};
struct OnMarkerSelectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerSelect {
std::string action;
std::string id;
OnMarkerSelectCoordinate coordinate;
};
struct OnPanDragCoordinate {
double latitude;
double longitude;
};
struct OnPanDragPosition {
double x;
double y;
};
struct OnPanDrag {
OnPanDragCoordinate coordinate;
OnPanDragPosition position;
};
struct OnPoiClickCoordinate {
double latitude;
double longitude;
};
struct OnPoiClickPosition {
double x;
double y;
};
struct OnPoiClick {
std::string placeId;
std::string name;
OnPoiClickCoordinate coordinate;
OnPoiClickPosition position;
};
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
OnPressCoordinate coordinate;
OnPressPosition position;
std::string action;
};
struct OnRegionChangeStartRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeStart {
OnRegionChangeStartRegion region;
bool isGesture;
};
struct OnRegionChangeRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChange {
OnRegionChangeRegion region;
bool isGesture;
};
struct OnRegionChangeCompleteRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeComplete {
OnRegionChangeCompleteRegion region;
bool isGesture;
};
struct OnUserLocationChangeCoordinate {
double latitude;
double longitude;
double altitude;
double timestamp;
Float accuracy;
Float speed;
Float heading;
Float altitudeAccuracy;
bool isFromMockProvider;
};
struct OnUserLocationChangeError {
std::string message;
};
struct OnUserLocationChange {
OnUserLocationChangeCoordinate coordinate;
OnUserLocationChangeError error;
};
void onCalloutPress(OnCalloutPress value) const;
void onDoublePress(OnDoublePress value) const;
void onIndoorBuildingFocused(OnIndoorBuildingFocused value) const;
void onIndoorLevelActivated(OnIndoorLevelActivated value) const;
void onKmlReady(OnKmlReady value) const;
void onLongPress(OnLongPress value) const;
void onMapLoaded(OnMapLoaded value) const;
void onMapReady(OnMapReady value) const;
void onMarkerDeselect(OnMarkerDeselect value) const;
void onMarkerDrag(OnMarkerDrag value) const;
void onMarkerDragEnd(OnMarkerDragEnd value) const;
void onMarkerDragStart(OnMarkerDragStart value) const;
void onMarkerPress(OnMarkerPress value) const;
void onMarkerSelect(OnMarkerSelect value) const;
void onPanDrag(OnPanDrag value) const;
void onPoiClick(OnPoiClick value) const;
void onPress(OnPress value) const;
void onRegionChangeStart(OnRegionChangeStart value) const;
void onRegionChange(OnRegionChange value) const;
void onRegionChangeComplete(OnRegionChangeComplete value) const;
void onUserLocationChange(OnUserLocationChange value) const;
};
class RNMapsMarkerEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnCalloutPressFrame {
double x;
double y;
double width;
double height;
};
struct OnCalloutPressPoint {
double x;
double y;
};
struct OnCalloutPress {
std::string action;
std::string id;
OnCalloutPressFrame frame;
OnCalloutPressPoint point;
};
struct OnDeselectCoordinate {
double latitude;
double longitude;
};
struct OnDeselectPosition {
double x;
double y;
};
struct OnDeselect {
std::string action;
std::string id;
OnDeselectCoordinate coordinate;
OnDeselectPosition position;
};
struct OnDragCoordinate {
double latitude;
double longitude;
};
struct OnDrag {
std::string id;
OnDragCoordinate coordinate;
};
struct OnDragEndCoordinate {
double latitude;
double longitude;
};
struct OnDragEnd {
std::string id;
OnDragEndCoordinate coordinate;
};
struct OnDragStartCoordinate {
double latitude;
double longitude;
};
struct OnDragStart {
std::string id;
OnDragStartCoordinate coordinate;
};
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
struct OnSelectCoordinate {
double latitude;
double longitude;
};
struct OnSelectPosition {
double x;
double y;
};
struct OnSelect {
std::string action;
std::string id;
OnSelectCoordinate coordinate;
OnSelectPosition position;
};
void onCalloutPress(OnCalloutPress value) const;
void onDeselect(OnDeselect value) const;
void onDrag(OnDrag value) const;
void onDragEnd(OnDragEnd value) const;
void onDragStart(OnDragStart value) const;
void onPress(OnPress value) const;
void onSelect(OnSelect value) const;
};
class RNMapsOverlayEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsPolylineEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsUrlTileEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
};
class RNMapsWMSTileEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
};
} // namespace facebook::react

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,591 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentHObjCpp.js
*/
#import <Foundation/Foundation.h>
#import <React/RCTDefines.h>
#import <React/RCTLog.h>
NS_ASSUME_NONNULL_BEGIN
@protocol RCTRNMapsGoogleMapViewViewProtocol <NSObject>
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration;
- (void)setCamera:(NSString *)cameraJSON;
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration;
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex;
@end
RCT_EXTERN inline void RCTRNMapsGoogleMapViewHandleCommand(
id<RCTRNMapsGoogleMapViewViewProtocol> componentView,
NSString const *commandName,
NSArray const *args)
{
if ([commandName isEqualToString:@"animateToRegion"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * regionJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateToRegion:regionJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"setCamera"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
[componentView setCamera:cameraJSON];
return;
}
if ([commandName isEqualToString:@"animateCamera"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateCamera:cameraJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"fitToElements"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg1 boolValue];
[componentView fitToElements:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToSuppliedMarkers"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * markersJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToSuppliedMarkers:markersJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * coordinatesJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToCoordinates:coordinatesJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"setIndoorActiveLevelIndex"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSInteger activeLevelIndex = [(NSNumber *)arg0 intValue];
[componentView setIndoorActiveLevelIndex:activeLevelIndex];
return;
}
#if RCT_DEBUG
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsGoogleMapView", commandName);
#endif
}
@protocol RCTRNMapsGooglePolygonViewProtocol <NSObject>
@end
@protocol RCTRNMapsMapViewViewProtocol <NSObject>
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration;
- (void)setCamera:(NSString *)cameraJSON;
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration;
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex;
@end
RCT_EXTERN inline void RCTRNMapsMapViewHandleCommand(
id<RCTRNMapsMapViewViewProtocol> componentView,
NSString const *commandName,
NSArray const *args)
{
if ([commandName isEqualToString:@"animateToRegion"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * regionJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateToRegion:regionJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"setCamera"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
[componentView setCamera:cameraJSON];
return;
}
if ([commandName isEqualToString:@"animateCamera"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateCamera:cameraJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"fitToElements"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg1 boolValue];
[componentView fitToElements:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToSuppliedMarkers"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * markersJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToSuppliedMarkers:markersJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * coordinatesJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToCoordinates:coordinatesJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"setIndoorActiveLevelIndex"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSInteger activeLevelIndex = [(NSNumber *)arg0 intValue];
[componentView setIndoorActiveLevelIndex:activeLevelIndex];
return;
}
#if RCT_DEBUG
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsMapView", commandName);
#endif
}
@protocol RCTRNMapsMarkerViewProtocol <NSObject>
- (void)animateToCoordinates:(double)latitude longitude:(double)longitude duration:(NSInteger)duration;
- (void)setCoordinates:(double)latitude longitude:(double)longitude;
- (void)showCallout;
- (void)hideCallout;
- (void)redrawCallout;
- (void)redraw;
@end
RCT_EXTERN inline void RCTRNMapsMarkerHandleCommand(
id<RCTRNMapsMarkerViewProtocol> componentView,
NSString const *commandName,
NSArray const *args)
{
if ([commandName isEqualToString:@"animateToCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"1st")) {
return;
}
#endif
double latitude = [(NSNumber *)arg0 doubleValue];
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"2nd")) {
return;
}
#endif
double longitude = [(NSNumber *)arg1 doubleValue];
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"number", @"RNMapsMarker", commandName, @"3rd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg2 intValue];
[componentView animateToCoordinates:latitude longitude:longitude duration:duration];
return;
}
if ([commandName isEqualToString:@"setCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"1st")) {
return;
}
#endif
double latitude = [(NSNumber *)arg0 doubleValue];
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"2nd")) {
return;
}
#endif
double longitude = [(NSNumber *)arg1 doubleValue];
[componentView setCoordinates:latitude longitude:longitude];
return;
}
if ([commandName isEqualToString:@"showCallout"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView showCallout];
return;
}
if ([commandName isEqualToString:@"hideCallout"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView hideCallout];
return;
}
if ([commandName isEqualToString:@"redrawCallout"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView redrawCallout];
return;
}
if ([commandName isEqualToString:@"redraw"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView redraw];
return;
}
#if RCT_DEBUG
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsMarker", commandName);
#endif
}
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,92 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleObjCpp
*
* We create an umbrella header (and corresponding implementation) here since
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
* must have a single output. More files => more genrule()s => slower builds.
*/
#import "RNMapsSpecs.h"
@implementation NativeAirMapsModuleSpecBase
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
{
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
}
@end
@implementation RCTCxxConvert (NativeAirMapsModule_LatLng)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_LatLng:(id)json
{
return facebook::react::managedPointer<JS::NativeAirMapsModule::LatLng>(json);
}
@end
@implementation RCTCxxConvert (NativeAirMapsModule_Point)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_Point:(id)json
{
return facebook::react::managedPointer<JS::NativeAirMapsModule::Point>(json);
}
@end
namespace facebook::react {
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCamera(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getCamera", @selector(getCamera:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMarkersFrames", @selector(getMarkersFrames:onlyVisible:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMapBoundaries", @selector(getMapBoundaries:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "takeSnapshot", @selector(takeSnapshot:config:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getAddressFromCoordinates", @selector(getAddressFromCoordinates:coordinate:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getPointForCoordinate", @selector(getPointForCoordinate:coordinate:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getCoordinateForPoint", @selector(getCoordinateForPoint:point:resolve:reject:), args, count);
}
NativeAirMapsModuleSpecJSI::NativeAirMapsModuleSpecJSI(const ObjCTurboModule::InitParams &params)
: ObjCTurboModule(params) {
methodMap_["getCamera"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getCamera};
methodMap_["getMarkersFrames"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames};
methodMap_["getMapBoundaries"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries};
methodMap_["takeSnapshot"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot};
methodMap_["getAddressFromCoordinates"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates};
setMethodArgConversionSelector(@"getAddressFromCoordinates", 1, @"JS_NativeAirMapsModule_LatLng:");
methodMap_["getPointForCoordinate"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate};
setMethodArgConversionSelector(@"getPointForCoordinate", 1, @"JS_NativeAirMapsModule_LatLng:");
methodMap_["getCoordinateForPoint"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint};
setMethodArgConversionSelector(@"getCoordinateForPoint", 1, @"JS_NativeAirMapsModule_Point:");
}
} // namespace facebook::react

View File

@@ -0,0 +1,137 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleObjCpp
*
* We create an umbrella header (and corresponding implementation) here since
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
* must have a single output. More files => more genrule()s => slower builds.
*/
#ifndef __cplusplus
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
#endif
// Avoid multiple includes of RNMapsSpecs symbols
#ifndef RNMapsSpecs_H
#define RNMapsSpecs_H
#import <Foundation/Foundation.h>
#import <RCTRequired/RCTRequired.h>
#import <RCTTypeSafety/RCTConvertHelpers.h>
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTCxxConvert.h>
#import <React/RCTManagedPointer.h>
#import <ReactCommon/RCTTurboModule.h>
#import <optional>
#import <vector>
NS_ASSUME_NONNULL_BEGIN
namespace JS {
namespace NativeAirMapsModule {
struct LatLng {
double latitude() const;
double longitude() const;
LatLng(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}
@interface RCTCxxConvert (NativeAirMapsModule_LatLng)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_LatLng:(id)json;
@end
namespace JS {
namespace NativeAirMapsModule {
struct Point {
double x() const;
double y() const;
Point(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}
@interface RCTCxxConvert (NativeAirMapsModule_Point)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_Point:(id)json;
@end
@protocol NativeAirMapsModuleSpec <RCTBridgeModule, RCTTurboModule>
- (void)getCamera:(double)tag
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getMarkersFrames:(double)tag
onlyVisible:(BOOL)onlyVisible
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getMapBoundaries:(double)tag
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)takeSnapshot:(double)tag
config:(NSString *)config
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getAddressFromCoordinates:(double)tag
coordinate:(JS::NativeAirMapsModule::LatLng &)coordinate
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getPointForCoordinate:(double)tag
coordinate:(JS::NativeAirMapsModule::LatLng &)coordinate
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getCoordinateForPoint:(double)tag
point:(JS::NativeAirMapsModule::Point &)point
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
@end
@interface NativeAirMapsModuleSpecBase : NSObject {
@protected
facebook::react::EventEmitterCallback _eventEmitterCallback;
}
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
@end
namespace facebook::react {
/**
* ObjC++ class for module 'NativeAirMapsModule'
*/
class JSI_EXPORT NativeAirMapsModuleSpecJSI : public ObjCTurboModule {
public:
NativeAirMapsModuleSpecJSI(const ObjCTurboModule::InitParams &params);
};
} // namespace facebook::react
inline double JS::NativeAirMapsModule::LatLng::latitude() const
{
id const p = _v[@"latitude"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeAirMapsModule::LatLng::longitude() const
{
id const p = _v[@"longitude"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeAirMapsModule::Point::x() const
{
id const p = _v[@"x"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeAirMapsModule::Point::y() const
{
id const p = _v[@"y"];
return RCTBridgingToDouble(p);
}
NS_ASSUME_NONNULL_END
#endif // RNMapsSpecs_H

View File

@@ -0,0 +1,26 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateShadowNodeCpp.js
*/
#include "ShadowNodes.h"
namespace facebook::react {
extern const char RNMapsCalloutComponentName[] = "RNMapsCallout";
extern const char RNMapsCircleComponentName[] = "RNMapsCircle";
extern const char RNMapsGoogleMapViewComponentName[] = "RNMapsGoogleMapView";
extern const char RNMapsGooglePolygonComponentName[] = "RNMapsGooglePolygon";
extern const char RNMapsMapViewComponentName[] = "RNMapsMapView";
extern const char RNMapsMarkerComponentName[] = "RNMapsMarker";
extern const char RNMapsOverlayComponentName[] = "RNMapsOverlay";
extern const char RNMapsPolylineComponentName[] = "RNMapsPolyline";
extern const char RNMapsUrlTileComponentName[] = "RNMapsUrlTile";
extern const char RNMapsWMSTileComponentName[] = "RNMapsWMSTile";
} // namespace facebook::react

View File

@@ -0,0 +1,131 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateShadowNodeH.js
*/
#pragma once
#include "EventEmitters.h"
#include "Props.h"
#include "States.h"
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
#include <jsi/jsi.h>
namespace facebook::react {
JSI_EXPORT extern const char RNMapsCalloutComponentName[];
/*
* `ShadowNode` for <RNMapsCallout> component.
*/
using RNMapsCalloutShadowNode = ConcreteViewShadowNode<
RNMapsCalloutComponentName,
RNMapsCalloutProps,
RNMapsCalloutEventEmitter,
RNMapsCalloutState>;
JSI_EXPORT extern const char RNMapsCircleComponentName[];
/*
* `ShadowNode` for <RNMapsCircle> component.
*/
using RNMapsCircleShadowNode = ConcreteViewShadowNode<
RNMapsCircleComponentName,
RNMapsCircleProps,
RNMapsCircleEventEmitter,
RNMapsCircleState>;
JSI_EXPORT extern const char RNMapsGoogleMapViewComponentName[];
/*
* `ShadowNode` for <RNMapsGoogleMapView> component.
*/
using RNMapsGoogleMapViewShadowNode = ConcreteViewShadowNode<
RNMapsGoogleMapViewComponentName,
RNMapsGoogleMapViewProps,
RNMapsGoogleMapViewEventEmitter,
RNMapsGoogleMapViewState>;
JSI_EXPORT extern const char RNMapsGooglePolygonComponentName[];
/*
* `ShadowNode` for <RNMapsGooglePolygon> component.
*/
using RNMapsGooglePolygonShadowNode = ConcreteViewShadowNode<
RNMapsGooglePolygonComponentName,
RNMapsGooglePolygonProps,
RNMapsGooglePolygonEventEmitter,
RNMapsGooglePolygonState>;
JSI_EXPORT extern const char RNMapsMapViewComponentName[];
/*
* `ShadowNode` for <RNMapsMapView> component.
*/
using RNMapsMapViewShadowNode = ConcreteViewShadowNode<
RNMapsMapViewComponentName,
RNMapsMapViewProps,
RNMapsMapViewEventEmitter,
RNMapsMapViewState>;
JSI_EXPORT extern const char RNMapsMarkerComponentName[];
/*
* `ShadowNode` for <RNMapsMarker> component.
*/
using RNMapsMarkerShadowNode = ConcreteViewShadowNode<
RNMapsMarkerComponentName,
RNMapsMarkerProps,
RNMapsMarkerEventEmitter,
RNMapsMarkerState>;
JSI_EXPORT extern const char RNMapsOverlayComponentName[];
/*
* `ShadowNode` for <RNMapsOverlay> component.
*/
using RNMapsOverlayShadowNode = ConcreteViewShadowNode<
RNMapsOverlayComponentName,
RNMapsOverlayProps,
RNMapsOverlayEventEmitter,
RNMapsOverlayState>;
JSI_EXPORT extern const char RNMapsPolylineComponentName[];
/*
* `ShadowNode` for <RNMapsPolyline> component.
*/
using RNMapsPolylineShadowNode = ConcreteViewShadowNode<
RNMapsPolylineComponentName,
RNMapsPolylineProps,
RNMapsPolylineEventEmitter,
RNMapsPolylineState>;
JSI_EXPORT extern const char RNMapsUrlTileComponentName[];
/*
* `ShadowNode` for <RNMapsUrlTile> component.
*/
using RNMapsUrlTileShadowNode = ConcreteViewShadowNode<
RNMapsUrlTileComponentName,
RNMapsUrlTileProps,
RNMapsUrlTileEventEmitter,
RNMapsUrlTileState>;
JSI_EXPORT extern const char RNMapsWMSTileComponentName[];
/*
* `ShadowNode` for <RNMapsWMSTile> component.
*/
using RNMapsWMSTileShadowNode = ConcreteViewShadowNode<
RNMapsWMSTileComponentName,
RNMapsWMSTileProps,
RNMapsWMSTileEventEmitter,
RNMapsWMSTileState>;
} // namespace facebook::react

View File

@@ -0,0 +1,16 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateStateCpp.js
*/
#include "States.h"
namespace facebook::react {
} // namespace facebook::react

View File

@@ -0,0 +1,38 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateStateH.js
*/
#pragma once
#include <react/renderer/core/StateData.h>
#ifdef RN_SERIALIZABLE_STATE
#include <folly/dynamic.h>
#endif
namespace facebook::react {
using RNMapsCalloutState = StateData;
using RNMapsCircleState = StateData;
using RNMapsGoogleMapViewState = StateData;
using RNMapsGooglePolygonState = StateData;
using RNMapsMapViewState = StateData;
using RNMapsMarkerState = StateData;
using RNMapsOverlayState = StateData;
using RNMapsPolylineState = StateData;
using RNMapsUrlTileState = StateData;
using RNMapsWMSTileState = StateData;
} // namespace facebook::react