✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
86 lines
3.8 KiB
JavaScript
86 lines
3.8 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.shouldAskForProject = shouldAskForProject;
|
|
exports.shouldGenerateSpec = shouldGenerateSpec;
|
|
exports.shouldGenerateFlat = shouldGenerateFlat;
|
|
exports.getSpecFileSuffix = getSpecFileSuffix;
|
|
exports.askForProjectName = askForProjectName;
|
|
exports.moveDefaultProjectToStart = moveDefaultProjectToStart;
|
|
exports.hasValidOptionFlag = hasValidOptionFlag;
|
|
const inquirer = require("inquirer");
|
|
const get_value_or_default_1 = require("../compiler/helpers/get-value-or-default");
|
|
const questions_1 = require("../questions/questions");
|
|
function shouldAskForProject(schematic, configurationProjects, appName) {
|
|
return (['app', 'sub-app', 'library', 'lib'].includes(schematic) === false &&
|
|
configurationProjects &&
|
|
Object.entries(configurationProjects).length !== 0 &&
|
|
!appName);
|
|
}
|
|
function shouldGenerateSpec(configuration, schematic, appName, specValue, specPassedAsInput) {
|
|
if (specPassedAsInput === true || specPassedAsInput === undefined) {
|
|
// CLI parameters has the highest priority
|
|
return specValue;
|
|
}
|
|
let specConfiguration = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'generateOptions.spec', appName || '');
|
|
if (typeof specConfiguration === 'boolean') {
|
|
return specConfiguration;
|
|
}
|
|
if (typeof specConfiguration === 'object' &&
|
|
specConfiguration[schematic] !== undefined) {
|
|
return specConfiguration[schematic];
|
|
}
|
|
if (typeof specConfiguration === 'object' && appName) {
|
|
// The appName has a generateOption spec, but not for the schematic trying to generate
|
|
// Check if the global generateOptions has a spec to use instead
|
|
specConfiguration = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'generateOptions.spec', '');
|
|
if (typeof specConfiguration === 'boolean') {
|
|
return specConfiguration;
|
|
}
|
|
if (typeof specConfiguration === 'object' &&
|
|
specConfiguration[schematic] !== undefined) {
|
|
return specConfiguration[schematic];
|
|
}
|
|
}
|
|
return specValue;
|
|
}
|
|
function shouldGenerateFlat(configuration, appName, flatValue) {
|
|
// CLI parameters have the highest priority
|
|
if (flatValue === true) {
|
|
return flatValue;
|
|
}
|
|
const flatConfiguration = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'generateOptions.flat', appName || '');
|
|
if (typeof flatConfiguration === 'boolean') {
|
|
return flatConfiguration;
|
|
}
|
|
return flatValue;
|
|
}
|
|
function getSpecFileSuffix(configuration, appName, specFileSuffixValue) {
|
|
// CLI parameters have the highest priority
|
|
if (specFileSuffixValue) {
|
|
return specFileSuffixValue;
|
|
}
|
|
const specFileSuffixConfiguration = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'generateOptions.specFileSuffix', appName || '', undefined, undefined, 'spec');
|
|
if (typeof specFileSuffixConfiguration === 'string') {
|
|
return specFileSuffixConfiguration;
|
|
}
|
|
return specFileSuffixValue;
|
|
}
|
|
async function askForProjectName(promptQuestion, projects) {
|
|
const questions = [
|
|
(0, questions_1.generateSelect)('appName')(promptQuestion)(projects),
|
|
];
|
|
const prompt = inquirer.createPromptModule();
|
|
return prompt(questions);
|
|
}
|
|
function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLabel) {
|
|
let projects = configuration.projects != null ? Object.keys(configuration.projects) : [];
|
|
if (configuration.sourceRoot !== 'src') {
|
|
projects = projects.filter((p) => p !== defaultProjectName.replace(defaultLabel, ''));
|
|
}
|
|
projects.unshift(defaultProjectName);
|
|
return projects;
|
|
}
|
|
function hasValidOptionFlag(queriedOptionName, options, queriedValue = true) {
|
|
return options.some((option) => option.name === queriedOptionName && option.value === queriedValue);
|
|
}
|