Files
Laca-City/backend/node_modules/ajv/dist/compile/validate/subschema.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 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
2025-07-20 19:52:16 +07:00

81 lines
3.8 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
const codegen_1 = require("../codegen");
const util_1 = require("../util");
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
if (keyword !== undefined && schema !== undefined) {
throw new Error('both "keyword" and "schema" passed, only one allowed');
}
if (keyword !== undefined) {
const sch = it.schema[keyword];
return schemaProp === undefined
? {
schema: sch,
schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
errSchemaPath: `${it.errSchemaPath}/${keyword}`,
}
: {
schema: sch[schemaProp],
schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,
};
}
if (schema !== undefined) {
if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {
throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
}
return {
schema,
schemaPath,
topSchemaRef,
errSchemaPath,
};
}
throw new Error('either "keyword" or "schema" must be passed');
}
exports.getSubschema = getSubschema;
function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
if (data !== undefined && dataProp !== undefined) {
throw new Error('both "data" and "dataProp" passed, only one allowed');
}
const { gen } = it;
if (dataProp !== undefined) {
const { errorPath, dataPathArr, opts } = it;
const nextData = gen.let("data", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
dataContextProps(nextData);
subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;
subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];
}
if (data !== undefined) {
const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); // replaceable if used once?
dataContextProps(nextData);
if (propertyName !== undefined)
subschema.propertyName = propertyName;
// TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr
}
if (dataTypes)
subschema.dataTypes = dataTypes;
function dataContextProps(_nextData) {
subschema.data = _nextData;
subschema.dataLevel = it.dataLevel + 1;
subschema.dataTypes = [];
it.definedProperties = new Set();
subschema.parentData = it.data;
subschema.dataNames = [...it.dataNames, _nextData];
}
}
exports.extendSubschemaData = extendSubschemaData;
function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
if (compositeRule !== undefined)
subschema.compositeRule = compositeRule;
if (createErrors !== undefined)
subschema.createErrors = createErrors;
if (allErrors !== undefined)
subschema.allErrors = allErrors;
subschema.jtdDiscriminator = jtdDiscriminator; // not inherited
subschema.jtdMetadata = jtdMetadata; // not inherited
}
exports.extendSubschemaMode = extendSubschemaMode;
//# sourceMappingURL=subschema.js.map