✨ 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
65 lines
2.5 KiB
JavaScript
65 lines
2.5 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const equal = require("fast-deep-equal");
|
|
const SCALAR_TYPES = ["number", "integer", "string", "boolean", "null"];
|
|
function getDef() {
|
|
return {
|
|
keyword: "uniqueItemProperties",
|
|
type: "array",
|
|
schemaType: "array",
|
|
compile(keys, parentSchema) {
|
|
const scalar = getScalarKeys(keys, parentSchema);
|
|
return (data) => {
|
|
if (data.length <= 1)
|
|
return true;
|
|
for (let k = 0; k < keys.length; k++) {
|
|
const key = keys[k];
|
|
if (scalar[k]) {
|
|
const hash = {};
|
|
for (const x of data) {
|
|
if (!x || typeof x != "object")
|
|
continue;
|
|
let p = x[key];
|
|
if (p && typeof p == "object")
|
|
continue;
|
|
if (typeof p == "string")
|
|
p = '"' + p;
|
|
if (hash[p])
|
|
return false;
|
|
hash[p] = true;
|
|
}
|
|
}
|
|
else {
|
|
for (let i = data.length; i--;) {
|
|
const x = data[i];
|
|
if (!x || typeof x != "object")
|
|
continue;
|
|
for (let j = i; j--;) {
|
|
const y = data[j];
|
|
if (y && typeof y == "object" && equal(x[key], y[key]))
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
};
|
|
},
|
|
metaSchema: {
|
|
type: "array",
|
|
items: { type: "string" },
|
|
},
|
|
};
|
|
}
|
|
exports.default = getDef;
|
|
function getScalarKeys(keys, schema) {
|
|
return keys.map((key) => {
|
|
var _a, _b, _c;
|
|
const t = (_c = (_b = (_a = schema.items) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[key]) === null || _c === void 0 ? void 0 : _c.type;
|
|
return Array.isArray(t)
|
|
? !t.includes("object") && !t.includes("array")
|
|
: SCALAR_TYPES.includes(t);
|
|
});
|
|
}
|
|
module.exports = getDef;
|
|
//# sourceMappingURL=uniqueItemProperties.js.map
|