✨ 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
60 lines
2.4 KiB
JavaScript
60 lines
2.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.isEnumMetadata = exports.isEnumDefined = exports.isEnumArray = exports.addEnumSchema = exports.addEnumArraySchema = exports.getEnumType = exports.getEnumValues = void 0;
|
|
const lodash_1 = require("lodash");
|
|
function getEnumValues(enumType) {
|
|
if (typeof enumType === 'function') {
|
|
return getEnumValues(enumType());
|
|
}
|
|
if (Array.isArray(enumType)) {
|
|
return enumType;
|
|
}
|
|
if (typeof enumType !== 'object') {
|
|
return [];
|
|
}
|
|
const numericValues = Object.values(enumType)
|
|
.filter((value) => typeof value === 'number')
|
|
.map((value) => value.toString());
|
|
return Object.keys(enumType)
|
|
.filter((key) => !numericValues.includes(key))
|
|
.map((key) => enumType[key]);
|
|
}
|
|
exports.getEnumValues = getEnumValues;
|
|
function getEnumType(values) {
|
|
const hasString = values.filter(lodash_1.isString).length > 0;
|
|
return hasString ? 'string' : 'number';
|
|
}
|
|
exports.getEnumType = getEnumType;
|
|
function addEnumArraySchema(paramDefinition, decoratorOptions) {
|
|
const paramSchema = paramDefinition.schema || {};
|
|
paramDefinition.schema = paramSchema;
|
|
paramSchema.type = 'array';
|
|
delete paramDefinition.isArray;
|
|
const enumValues = getEnumValues(decoratorOptions.enum);
|
|
paramSchema.items = {
|
|
type: getEnumType(enumValues),
|
|
enum: enumValues
|
|
};
|
|
if (decoratorOptions.enumName) {
|
|
paramDefinition.enumName = decoratorOptions.enumName;
|
|
}
|
|
}
|
|
exports.addEnumArraySchema = addEnumArraySchema;
|
|
function addEnumSchema(paramDefinition, decoratorOptions) {
|
|
const paramSchema = paramDefinition.schema || {};
|
|
const enumValues = getEnumValues(decoratorOptions.enum);
|
|
paramDefinition.schema = paramSchema;
|
|
paramSchema.enum = enumValues;
|
|
paramSchema.type = getEnumType(enumValues);
|
|
if (decoratorOptions.enumName) {
|
|
paramDefinition.enumName = decoratorOptions.enumName;
|
|
}
|
|
}
|
|
exports.addEnumSchema = addEnumSchema;
|
|
const isEnumArray = (obj) => obj.isArray && obj.enum;
|
|
exports.isEnumArray = isEnumArray;
|
|
const isEnumDefined = (obj) => obj.enum;
|
|
exports.isEnumDefined = isEnumDefined;
|
|
const isEnumMetadata = (metadata) => { var _a; return metadata.enum || (metadata.isArray && ((_a = metadata.items) === null || _a === void 0 ? void 0 : _a['enum'])); };
|
|
exports.isEnumMetadata = isEnumMetadata;
|