- 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
39 lines
983 B
JavaScript
39 lines
983 B
JavaScript
export default (function (o, c, d) {
|
|
var sortBy = function sortBy(method, dates) {
|
|
if (!dates || !dates.length || dates.length === 1 && !dates[0] || dates.length === 1 && Array.isArray(dates[0]) && !dates[0].length) {
|
|
return null;
|
|
}
|
|
|
|
if (dates.length === 1 && dates[0].length > 0) {
|
|
var _dates = dates;
|
|
dates = _dates[0];
|
|
}
|
|
|
|
dates = dates.filter(function (date) {
|
|
return date;
|
|
});
|
|
var result;
|
|
var _dates2 = dates;
|
|
result = _dates2[0];
|
|
|
|
for (var i = 1; i < dates.length; i += 1) {
|
|
if (!dates[i].isValid() || dates[i][method](result)) {
|
|
result = dates[i];
|
|
}
|
|
}
|
|
|
|
return result;
|
|
};
|
|
|
|
d.max = function () {
|
|
var args = [].slice.call(arguments, 0); // eslint-disable-line prefer-rest-params
|
|
|
|
return sortBy('isAfter', args);
|
|
};
|
|
|
|
d.min = function () {
|
|
var args = [].slice.call(arguments, 0); // eslint-disable-line prefer-rest-params
|
|
|
|
return sortBy('isBefore', args);
|
|
};
|
|
}); |