- 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
54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
#import <RNReanimated/NativeMethods.h>
|
|
#import <RNReanimated/REAUIKit.h>
|
|
#import <React/RCTEventDispatcher.h>
|
|
#import <React/RCTScrollView.h>
|
|
|
|
namespace reanimated {
|
|
|
|
std::vector<std::pair<std::string, double>> measure(int viewTag, RCTUIManager *uiManager)
|
|
{
|
|
REAUIView *view = [uiManager viewForReactTag:@(viewTag)];
|
|
|
|
REAUIView *rootView = view;
|
|
|
|
if (view == nil) {
|
|
return std::vector<std::pair<std::string, double>>(1, std::make_pair("x", -1234567.0));
|
|
}
|
|
|
|
while (rootView.superview && ![rootView isReactRootView]) {
|
|
rootView = rootView.superview;
|
|
}
|
|
|
|
if (rootView == nil) {
|
|
return std::vector<std::pair<std::string, double>>(1, std::make_pair("x", -1234567.0));
|
|
}
|
|
|
|
CGRect frame = view.frame;
|
|
CGRect globalBounds = [view convertRect:view.bounds toView:rootView];
|
|
|
|
return {
|
|
{"x", frame.origin.x},
|
|
{"y", frame.origin.y},
|
|
{"width", globalBounds.size.width},
|
|
{"height", globalBounds.size.height},
|
|
{"pageX", globalBounds.origin.x},
|
|
{"pageY", globalBounds.origin.y},
|
|
};
|
|
}
|
|
|
|
void scrollTo(int scrollViewTag, RCTUIManager *uiManager, double x, double y, bool animated)
|
|
{
|
|
REAUIView *view = [uiManager viewForReactTag:@(scrollViewTag)];
|
|
RCTScrollView *scrollView = (RCTScrollView *)view;
|
|
[scrollView scrollToOffset:(CGPoint){(CGFloat)x, (CGFloat)y} animated:animated];
|
|
}
|
|
|
|
void setGestureState(id<RNGestureHandlerStateManager> gestureHandlerStateManager, int handlerTag, int newState)
|
|
{
|
|
if (gestureHandlerStateManager != nil) {
|
|
[gestureHandlerStateManager setGestureState:newState forHandler:handlerTag];
|
|
}
|
|
}
|
|
|
|
} // namespace reanimated
|