Files
Eric FELIXINE e30ae8ed09 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
2026-06-01 18:00:35 -04:00

93 lines
2.8 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _path = require("path");
var _core = require("@babel/core");
var _default = exports.default = (0, _helperPluginUtils.declare)(api => {
api.assertVersion(7);
function addDisplayName(id, call) {
const props = call.arguments[0].properties;
let safe = true;
for (let i = 0; i < props.length; i++) {
const prop = props[i];
if (_core.types.isSpreadElement(prop)) {
continue;
}
const key = _core.types.toComputedKey(prop);
if (_core.types.isStringLiteral(key, {
value: "displayName"
})) {
safe = false;
break;
}
}
if (safe) {
props.unshift(_core.types.objectProperty(_core.types.identifier("displayName"), _core.types.stringLiteral(id)));
}
}
const isCreateClassCallExpression = _core.types.buildMatchMemberExpression("React.createClass");
const isCreateClassAddon = callee => _core.types.isIdentifier(callee, {
name: "createReactClass"
});
function isCreateClass(node) {
if (!node || !_core.types.isCallExpression(node)) return false;
if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) {
return false;
}
const args = node.arguments;
if (args.length !== 1) return false;
const first = args[0];
if (!_core.types.isObjectExpression(first)) return false;
return true;
}
return {
name: "transform-react-display-name",
visitor: {
ExportDefaultDeclaration({
node
}, state) {
if (isCreateClass(node.declaration)) {
const filename = state.filename || "unknown";
let displayName = _path.basename(filename, _path.extname(filename));
if (displayName === "index") {
displayName = _path.basename(_path.dirname(filename));
}
addDisplayName(displayName, node.declaration);
}
},
CallExpression(path) {
const {
node
} = path;
if (!isCreateClass(node)) return;
let id;
path.find(function (path) {
if (path.isAssignmentExpression()) {
id = path.node.left;
} else if (path.isObjectProperty()) {
id = path.node.key;
} else if (path.isVariableDeclarator()) {
id = path.node.id;
} else if (path.isStatement()) {
return true;
}
if (id) return true;
});
if (!id) return;
if (_core.types.isMemberExpression(id)) {
id = id.property;
}
if (_core.types.isIdentifier(id)) {
addDisplayName(id.name, node);
}
}
}
};
});
//# sourceMappingURL=index.js.map