✨ 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
63 lines
2.7 KiB
JavaScript
63 lines
2.7 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const codegen_1 = require("ajv/dist/compile/codegen");
|
|
const _util_1 = require("./_util");
|
|
const error = {
|
|
message: ({ params: { schemaProp } }) => schemaProp
|
|
? (0, codegen_1.str) `should match case "${schemaProp}" schema`
|
|
: (0, codegen_1.str) `should match default case schema`,
|
|
params: ({ params: { schemaProp } }) => schemaProp ? (0, codegen_1._) `{failingCase: ${schemaProp}}` : (0, codegen_1._) `{failingDefault: true}`,
|
|
};
|
|
function getDef(opts) {
|
|
const metaSchema = (0, _util_1.metaSchemaRef)(opts);
|
|
return [
|
|
{
|
|
keyword: "select",
|
|
schemaType: ["string", "number", "boolean", "null"],
|
|
$data: true,
|
|
error,
|
|
dependencies: ["selectCases"],
|
|
code(cxt) {
|
|
const { gen, schemaCode, parentSchema } = cxt;
|
|
cxt.block$data(codegen_1.nil, () => {
|
|
const valid = gen.let("valid", true);
|
|
const schValid = gen.name("_valid");
|
|
const value = gen.const("value", (0, codegen_1._) `${schemaCode} === null ? "null" : ${schemaCode}`);
|
|
gen.if(false); // optimizer should remove it from generated code
|
|
for (const schemaProp in parentSchema.selectCases) {
|
|
cxt.setParams({ schemaProp });
|
|
gen.elseIf((0, codegen_1._) `"" + ${value} == ${schemaProp}`); // intentional ==, to match numbers and booleans
|
|
const schCxt = cxt.subschema({ keyword: "selectCases", schemaProp }, schValid);
|
|
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
gen.assign(valid, schValid);
|
|
}
|
|
gen.else();
|
|
if (parentSchema.selectDefault !== undefined) {
|
|
cxt.setParams({ schemaProp: undefined });
|
|
const schCxt = cxt.subschema({ keyword: "selectDefault" }, schValid);
|
|
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
gen.assign(valid, schValid);
|
|
}
|
|
gen.endIf();
|
|
cxt.pass(valid);
|
|
});
|
|
},
|
|
},
|
|
{
|
|
keyword: "selectCases",
|
|
dependencies: ["select"],
|
|
metaSchema: {
|
|
type: "object",
|
|
additionalProperties: metaSchema,
|
|
},
|
|
},
|
|
{
|
|
keyword: "selectDefault",
|
|
dependencies: ["select", "selectCases"],
|
|
metaSchema,
|
|
},
|
|
];
|
|
}
|
|
exports.default = getDef;
|
|
module.exports = getDef;
|
|
//# sourceMappingURL=select.js.map
|