✨ 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
157 lines
4.3 KiB
TypeScript
157 lines
4.3 KiB
TypeScript
import { Scope } from '../scope-options.interface';
|
|
import { Type } from '../type.interface';
|
|
import { InjectionToken } from './injection-token.interface';
|
|
import { OptionalFactoryDependency } from './optional-factory-dependency.interface';
|
|
/**
|
|
*
|
|
* @publicApi
|
|
*/
|
|
export type Provider<T = any> = Type<any> | ClassProvider<T> | ValueProvider<T> | FactoryProvider<T> | ExistingProvider<T>;
|
|
/**
|
|
* Interface defining a *Class* type provider.
|
|
*
|
|
* For example:
|
|
* ```typescript
|
|
* const configServiceProvider = {
|
|
* provide: ConfigService,
|
|
* useClass:
|
|
* process.env.NODE_ENV === 'development'
|
|
* ? DevelopmentConfigService
|
|
* : ProductionConfigService,
|
|
* };
|
|
* ```
|
|
*
|
|
* @see [Class providers](https://docs.nestjs.com/fundamentals/custom-providers#class-providers-useclass)
|
|
* @see [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
|
|
*
|
|
* @publicApi
|
|
*/
|
|
export interface ClassProvider<T = any> {
|
|
/**
|
|
* Injection token
|
|
*/
|
|
provide: InjectionToken;
|
|
/**
|
|
* Type (class name) of provider (instance to be injected).
|
|
*/
|
|
useClass: Type<T>;
|
|
/**
|
|
* Optional enum defining lifetime of the provider that is injected.
|
|
*/
|
|
scope?: Scope;
|
|
/**
|
|
* This option is only available on factory providers!
|
|
*
|
|
* @see [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)
|
|
*/
|
|
inject?: never;
|
|
/**
|
|
* Flags provider as durable. This flag can be used in combination with custom context id
|
|
* factory strategy to construct lazy DI subtrees.
|
|
*
|
|
* This flag can be used only in conjunction with scope = Scope.REQUEST.
|
|
*/
|
|
durable?: boolean;
|
|
}
|
|
/**
|
|
* Interface defining a *Value* type provider.
|
|
*
|
|
* For example:
|
|
* ```typescript
|
|
* const connectionProvider = {
|
|
* provide: 'CONNECTION',
|
|
* useValue: connection,
|
|
* };
|
|
* ```
|
|
*
|
|
* @see [Value providers](https://docs.nestjs.com/fundamentals/custom-providers#value-providers-usevalue)
|
|
*
|
|
* @publicApi
|
|
*/
|
|
export interface ValueProvider<T = any> {
|
|
/**
|
|
* Injection token
|
|
*/
|
|
provide: InjectionToken;
|
|
/**
|
|
* Instance of a provider to be injected.
|
|
*/
|
|
useValue: T;
|
|
/**
|
|
* This option is only available on factory providers!
|
|
*
|
|
* @see [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)
|
|
*/
|
|
inject?: never;
|
|
}
|
|
/**
|
|
* Interface defining a *Factory* type provider.
|
|
*
|
|
* For example:
|
|
* ```typescript
|
|
* const connectionFactory = {
|
|
* provide: 'CONNECTION',
|
|
* useFactory: (optionsProvider: OptionsProvider) => {
|
|
* const options = optionsProvider.get();
|
|
* return new DatabaseConnection(options);
|
|
* },
|
|
* inject: [OptionsProvider],
|
|
* };
|
|
* ```
|
|
*
|
|
* @see [Factory providers](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)
|
|
* @see [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
|
|
*
|
|
* @publicApi
|
|
*/
|
|
export interface FactoryProvider<T = any> {
|
|
/**
|
|
* Injection token
|
|
*/
|
|
provide: InjectionToken;
|
|
/**
|
|
* Factory function that returns an instance of the provider to be injected.
|
|
*/
|
|
useFactory: (...args: any[]) => T | Promise<T>;
|
|
/**
|
|
* Optional list of providers to be injected into the context of the Factory function.
|
|
*/
|
|
inject?: Array<InjectionToken | OptionalFactoryDependency>;
|
|
/**
|
|
* Optional enum defining lifetime of the provider that is returned by the Factory function.
|
|
*/
|
|
scope?: Scope;
|
|
/**
|
|
* Flags provider as durable. This flag can be used in combination with custom context id
|
|
* factory strategy to construct lazy DI subtrees.
|
|
*
|
|
* This flag can be used only in conjunction with scope = Scope.REQUEST.
|
|
*/
|
|
durable?: boolean;
|
|
}
|
|
/**
|
|
* Interface defining an *Existing* (aliased) type provider.
|
|
*
|
|
* For example:
|
|
* ```typescript
|
|
* const loggerAliasProvider = {
|
|
* provide: 'AliasedLoggerService',
|
|
* useExisting: LoggerService
|
|
* };
|
|
* ```
|
|
*
|
|
* @see [Alias providers](https://docs.nestjs.com/fundamentals/custom-providers#alias-providers-useexisting)
|
|
*
|
|
* @publicApi
|
|
*/
|
|
export interface ExistingProvider<T = any> {
|
|
/**
|
|
* Injection token
|
|
*/
|
|
provide: InjectionToken;
|
|
/**
|
|
* Provider to be aliased by the Injection token.
|
|
*/
|
|
useExisting: any;
|
|
}
|