- 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
49 lines
2.0 KiB
JavaScript
49 lines
2.0 KiB
JavaScript
'use strict';
|
|
|
|
const mockTargetValues = {
|
|
targetOriginX: 0,
|
|
targetOriginY: 0,
|
|
targetWidth: 0,
|
|
targetHeight: 0,
|
|
targetGlobalOriginX: 0,
|
|
targetGlobalOriginY: 0,
|
|
targetBorderRadius: 0,
|
|
windowWidth: 0,
|
|
windowHeight: 0,
|
|
currentOriginX: 0,
|
|
currentOriginY: 0,
|
|
currentWidth: 0,
|
|
currentHeight: 0,
|
|
currentGlobalOriginX: 0,
|
|
currentGlobalOriginY: 0,
|
|
currentBorderRadius: 0
|
|
};
|
|
function getCommonProperties(layoutStyle, componentStyle) {
|
|
let componentStyleFlat = Array.isArray(componentStyle) ? componentStyle.flat() : [componentStyle];
|
|
componentStyleFlat = componentStyleFlat.filter(Boolean);
|
|
componentStyleFlat = componentStyleFlat.map(style => 'initial' in style ? style.initial.value // Include properties of animated style
|
|
: style);
|
|
const componentStylesKeys = componentStyleFlat.flatMap(style => Object.keys(style));
|
|
const commonKeys = Object.keys(layoutStyle).filter(key => componentStylesKeys.includes(key));
|
|
return commonKeys;
|
|
}
|
|
function maybeReportOverwrittenProperties(layoutAnimationStyle, style, displayName) {
|
|
const commonProperties = getCommonProperties(layoutAnimationStyle, style);
|
|
if (commonProperties.length > 0) {
|
|
console.warn(`[Reanimated] ${commonProperties.length === 1 ? 'Property' : 'Properties'} "${commonProperties.join(', ')}" of ${displayName} may be overwritten by a layout animation. Please wrap your component with an animated view and apply the layout animation on the wrapper.`);
|
|
}
|
|
}
|
|
export function maybeBuild(layoutAnimationOrBuilder, style, displayName) {
|
|
const isAnimationBuilder = value => 'build' in layoutAnimationOrBuilder && typeof layoutAnimationOrBuilder.build === 'function';
|
|
if (isAnimationBuilder(layoutAnimationOrBuilder)) {
|
|
const animationFactory = layoutAnimationOrBuilder.build();
|
|
if (__DEV__ && style) {
|
|
const layoutAnimation = animationFactory(mockTargetValues);
|
|
maybeReportOverwrittenProperties(layoutAnimation.animations, style, displayName);
|
|
}
|
|
return animationFactory;
|
|
} else {
|
|
return layoutAnimationOrBuilder;
|
|
}
|
|
}
|
|
//# sourceMappingURL=animationBuilder.js.map
|