- 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
2.4 KiB
JavaScript
54 lines
2.4 KiB
JavaScript
'use strict';
|
|
|
|
import { shouldBeUseWeb } from './PlatformChecker';
|
|
import { configureLayoutAnimationBatch, makeShareableCloneRecursive } from './core';
|
|
function createUpdateManager() {
|
|
const animations = [];
|
|
// When a stack is rerendered we reconfigure all the shared elements.
|
|
// To do that we want them to appear in our batch in the correct order,
|
|
// so we defer some of the updates to appear at the end of the batch.
|
|
const deferredAnimations = [];
|
|
return {
|
|
update(batchItem, isUnmounting) {
|
|
if (isUnmounting) {
|
|
deferredAnimations.push(batchItem);
|
|
} else {
|
|
animations.push(batchItem);
|
|
}
|
|
if (animations.length + deferredAnimations.length === 1) {
|
|
setImmediate(this.flush);
|
|
}
|
|
},
|
|
flush() {
|
|
configureLayoutAnimationBatch(animations.concat(deferredAnimations));
|
|
animations.length = 0;
|
|
deferredAnimations.length = 0;
|
|
}
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Lets you update the current configuration of the layout animation or shared element transition for a given component.
|
|
* Configurations are batched and applied at the end of the current execution block, right before sending the response back to native.
|
|
*
|
|
* @param viewTag - The tag of the component you'd like to configure.
|
|
* @param type - The type of the animation you'd like to configure - {@link LayoutAnimationType}.
|
|
* @param config - The animation configuration - {@link LayoutAnimationFunction}, {@link SharedTransitionAnimationsFunction}, {@link ProgressAnimationCallback} or {@link Keyframe}. Passing `undefined` will remove the animation.
|
|
* @param sharedTransitionTag - The tag of the shared element transition you'd like to configure. Passing `undefined` will remove the transition.
|
|
* @param isUnmounting - Determines whether the configuration should be included at the end of the batch, after all the non-deferred configurations (even those that were updated later). This is used to retain the correct ordering of shared elements. Defaults to `false`.
|
|
*/
|
|
export let updateLayoutAnimations;
|
|
if (shouldBeUseWeb()) {
|
|
updateLayoutAnimations = () => {
|
|
// no-op
|
|
};
|
|
} else {
|
|
const updateLayoutAnimationsManager = createUpdateManager();
|
|
updateLayoutAnimations = (viewTag, type, config, sharedTransitionTag, isUnmounting) => updateLayoutAnimationsManager.update({
|
|
viewTag,
|
|
type,
|
|
config: config ? makeShareableCloneRecursive(config) : undefined,
|
|
sharedTransitionTag
|
|
}, isUnmounting);
|
|
}
|
|
//# sourceMappingURL=UpdateLayoutAnimations.js.map
|