- 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
92 lines
2.9 KiB
JavaScript
92 lines
2.9 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.serializeAfterStaticPlugins = serializeAfterStaticPlugins;
|
|
exports.serializeAndEvaluate = serializeAndEvaluate;
|
|
exports.serializeSkippingMods = serializeSkippingMods;
|
|
function _Errors() {
|
|
const data = require("./Errors");
|
|
_Errors = function () {
|
|
return data;
|
|
};
|
|
return data;
|
|
}
|
|
function serializeAndEvaluate(val) {
|
|
if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {
|
|
return val;
|
|
} else if (typeof val === 'function') {
|
|
// TODO: Bacon: Should we support async methods?
|
|
return val();
|
|
} else if (Array.isArray(val)) {
|
|
return val.map(serializeAndEvaluate);
|
|
} else if (typeof val === 'object') {
|
|
const output = {};
|
|
for (const property in val) {
|
|
if (val.hasOwnProperty(property)) {
|
|
output[property] = serializeAndEvaluate(val[property]);
|
|
}
|
|
}
|
|
return output;
|
|
}
|
|
// symbol
|
|
throw new (_Errors().ConfigError)(`Expo config doesn't support \`Symbols\`: ${val}`, 'INVALID_CONFIG');
|
|
}
|
|
function serializeSkippingMods(val) {
|
|
if (typeof val === 'object' && !Array.isArray(val)) {
|
|
const output = {};
|
|
for (const property in val) {
|
|
if (val.hasOwnProperty(property)) {
|
|
if (property === 'mods' || property === 'plugins') {
|
|
// Don't serialize mods or plugins
|
|
output[property] = val[property];
|
|
} else {
|
|
output[property] = serializeAndEvaluate(val[property]);
|
|
}
|
|
}
|
|
}
|
|
return output;
|
|
}
|
|
return serializeAndEvaluate(val);
|
|
}
|
|
function serializeAndEvaluatePlugin(val) {
|
|
if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {
|
|
return val;
|
|
} else if (typeof val === 'function') {
|
|
return val.name || 'withAnonymous';
|
|
} else if (Array.isArray(val)) {
|
|
return val.map(serializeAndEvaluatePlugin);
|
|
} else if (typeof val === 'object') {
|
|
const output = {};
|
|
for (const property in val) {
|
|
if (val.hasOwnProperty(property)) {
|
|
output[property] = serializeAndEvaluatePlugin(val[property]);
|
|
}
|
|
}
|
|
return output;
|
|
}
|
|
// symbol
|
|
throw new (_Errors().ConfigError)(`Expo config doesn't support \`Symbols\`: ${val}`, 'INVALID_CONFIG');
|
|
}
|
|
function serializeAfterStaticPlugins(val) {
|
|
if (typeof val === 'object' && !Array.isArray(val)) {
|
|
const output = {};
|
|
for (const property in val) {
|
|
if (val.hasOwnProperty(property)) {
|
|
if (property === 'mods') {
|
|
// Don't serialize mods
|
|
output[property] = val[property];
|
|
} else if (property === 'plugins' && Array.isArray(val[property])) {
|
|
// Serialize the mods by removing any config plugins
|
|
output[property] = val[property].map(serializeAndEvaluatePlugin);
|
|
} else {
|
|
output[property] = serializeAndEvaluate(val[property]);
|
|
}
|
|
}
|
|
}
|
|
return output;
|
|
}
|
|
return serializeAndEvaluate(val);
|
|
}
|
|
//# sourceMappingURL=Serialize.js.map
|