import { DynamicText, FieldMeta, ValidationMessages, BaseValueField } from '@ng-forge/dynamic-forms'; import { Milliseconds, LatLngPointFunctionConfig, Maybe, LatLngPointFunction, LatLngStringFunction, LatLngPoint, ZoomLevel } from '@dereekb/util'; import { CompactContextStore } from '@dereekb/dbx-web'; import * as i0 from '@angular/core'; import { InputSignal, Signal, OnDestroy } from '@angular/core'; import { Observable } from 'rxjs'; import { ObservableFactoryWithRequiredInput } from '@dereekb/rxjs'; import { Marker } from 'mapbox-gl'; import { DbxMapboxMarkerDisplayConfig, DbxMapboxInjectionStore, DbxMapboxMapStore, MapboxZoomLevel, DbxMapboxMarker, DbxMapboxService } from '@dereekb/dbx-web/mapbox'; import { FieldTree } from '@angular/forms/signals'; import { FormControl } from '@angular/forms'; import { FieldTypeDefinition } from '@ng-forge/dynamic-forms/integration'; declare const DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = "DbxForgeMapboxLatLngFieldComponent"; declare const DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig; /** * Custom props for the forge mapbox lat/lng field. */ interface DbxForgeMapboxLatLngFieldComponentProps { readonly label?: string; readonly description?: string; readonly placeholder?: string; readonly pattern?: RegExp; readonly patternMessage?: string; readonly showMap?: boolean; readonly showCenterButton?: boolean; readonly setCenterOnLocationSet?: boolean; readonly selectLocationOnMapDrag?: boolean; readonly selectLocationOnMapClick?: boolean; readonly zoom?: MapboxZoomLevel; readonly recenterTime?: Milliseconds; readonly latLngConfig?: LatLngPointFunctionConfig; readonly mapInjectionKey?: Maybe; readonly markerConfig?: false | ObservableFactoryWithRequiredInput; } /** * Forge custom field component for Mapbox latitude/longitude picking. * * This is the forge equivalent of {@link DbxFormMapboxLatLngFieldComponent}. * It bridges ng-forge Signal Forms with the Mapbox map store. * * Registered as ng-forge type 'dbx-forge-mapbox-latlng'. */ declare class DbxForgeMapboxLatLngFieldComponent { private readonly _geolocationService; readonly compact: CompactContextStore | null; readonly dbxMapboxInjectionStore: DbxMapboxInjectionStore | null; readonly dbxMapboxMapStore: DbxMapboxMapStore; private readonly elementRef; readonly field: InputSignal>; readonly key: InputSignal; readonly label: InputSignal; readonly placeholder: InputSignal; readonly className: InputSignal; readonly tabIndex: InputSignal; readonly props: InputSignal; readonly meta: InputSignal; readonly validationMessages: InputSignal; readonly defaultValidationMessages: InputSignal; readonly textCtrl: FormControl; private readonly _sub; private readonly _geoSub; private readonly _centerSub; private readonly _flyToCenterSub; private readonly _clickSub; private readonly _zoom; private readonly _markerConfig; readonly latLngPointConfigSignal: Signal; readonly latLngPointFunctionSignal: Signal; readonly latLngStringFunctionSignal: Signal; readonly compactClass$: Observable; private readonly _useCurrentLocationDisabled; readonly useCurrentLocationDisabled$: Observable; readonly fieldValueSignal: Signal; readonly isDisabledSignal: Signal; readonly isReadonlyOrDisabledSignal: Signal; readonly showMapSignal: Signal; readonly selectLocationOnMapDragSignal: Signal; readonly selectLocationOnMapClickSignal: Signal; readonly setCenterOnLocationSetSignal: Signal; readonly showCenterButtonSignal: Signal; readonly recenterTimeSignal: Signal; readonly placeholderTextSignal: Signal; readonly latLngValueSignal: Signal; readonly latLng$: Observable; readonly nonZeroLatLng$: Observable; readonly zoom$: Observable; readonly markerConfig$: Observable; readonly useCurrentLocationDisabledSignal: Signal; readonly compactClassSignal: Signal; readonly latLngSignal: Signal; private _syncing; private _setFieldValue; constructor(); flyToMarker(): void; useCurrentLocation(): void; onMarkerDragEnd(marker: Marker): void; setValue(latLng?: Maybe): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Custom mapper for the forge mapbox lat/lng field. * * @param fieldDef - Field definition configuration. * @param fieldDef.key - Form model key for the field. * @returns Signal containing a Record of input names to values for ngComponentOutlet. */ declare function mapboxLatLngFieldMapper(fieldDef: { key: string; }): Signal>; /** * The custom forge field type name for the mapbox lat/lng field. */ declare const FORGE_MAPBOX_LATLNG_FIELD_TYPE: "dbx-forge-mapbox-latlng"; /** * Field definition type for a forge mapbox lat/lng picker field. */ type DbxForgeMapboxLatLngFieldDef = BaseValueField & { readonly type: typeof FORGE_MAPBOX_LATLNG_FIELD_TYPE; }; /** * Configuration for a forge mapbox lat/lng picker field. */ interface DbxForgeMapboxLatLngFieldConfig { readonly key?: string; readonly label?: string; readonly description?: string; readonly required?: boolean; readonly readonly?: boolean; readonly showMap?: boolean; readonly showCenterButton?: boolean; readonly setCenterOnLocationSet?: boolean; readonly selectLocationOnMapDrag?: boolean; readonly selectLocationOnMapClick?: boolean; readonly zoom?: number; readonly recenterTime?: number; readonly latLngConfig?: LatLngPointFunctionConfig; readonly markerConfig?: DbxForgeMapboxLatLngFieldComponentProps['markerConfig']; } /** * Creates a forge field definition for a Mapbox-powered latitude/longitude picker. * * This is the forge equivalent of {@link mapboxLatLngField}. * * @param config - Optional field configuration overrides. * @returns A validated forge field definition for the Mapbox lat/lng picker. */ declare function dbxForgeMapboxLatLngField(config?: DbxForgeMapboxLatLngFieldConfig): DbxForgeMapboxLatLngFieldDef; declare class DbxForgeMapboxLatLngFieldMarkerComponent { readonly fieldComponent: DbxForgeMapboxLatLngFieldComponent; readonly marker$: Observable>; readonly markerSignal: i0.Signal>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Custom props for the forge mapbox zoom field. */ interface DbxForgeMapboxZoomFieldComponentProps { readonly label?: string; readonly description?: string; readonly showMap?: boolean; readonly center?: LatLngPoint; readonly lockMapToZoomLevels?: boolean; readonly minZoom?: MapboxZoomLevel; readonly maxZoom?: MapboxZoomLevel; readonly zoomStep?: number; } /** * Forge custom field component for Mapbox zoom level picking. * * This is the forge equivalent of {@link DbxFormMapboxZoomFieldComponent}. * It bridges ng-forge Signal Forms with the Mapbox map store. * * Registered as ng-forge type 'dbx-forge-mapbox-zoom'. */ declare class DbxForgeMapboxZoomFieldComponent implements OnDestroy { readonly compact: CompactContextStore | null; readonly dbxMapboxService: DbxMapboxService; readonly dbxMapboxMapStore: DbxMapboxMapStore; private readonly elementRef; readonly field: InputSignal>; readonly key: InputSignal; readonly label: InputSignal; readonly placeholder: InputSignal; readonly className: InputSignal; readonly tabIndex: InputSignal; readonly props: InputSignal; readonly meta: InputSignal; readonly validationMessages: InputSignal; readonly defaultValidationMessages: InputSignal; readonly numberCtrl: FormControl>; readonly placeholderText = ""; private _undoZoomLimit; readonly compactClass$: Observable; readonly compactClassSignal: Signal; private readonly _sub; private readonly _center; readonly fieldValueSignal: Signal; readonly isDisabledSignal: Signal; readonly isReadonlyOrDisabledSignal: Signal; readonly showMapSignal: Signal; readonly lockMapToZoomLevelsSignal: Signal; readonly minZoomSignal: Signal; readonly maxZoomSignal: Signal; readonly zoomStepSignal: Signal; readonly fieldValue$: Observable; readonly zoom$: Observable; readonly center$: Observable; private _syncing; private _setFieldValue; constructor(); ngOnDestroy(): void; setZoomValue(zoom?: Maybe): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Custom mapper for the forge mapbox zoom field. * * @param fieldDef - Field definition configuration. * @param fieldDef.key - Form model key for the field. * @returns Signal containing a Record of input names to values for ngComponentOutlet. */ declare function mapboxZoomFieldMapper(fieldDef: { key: string; }): Signal>; /** * The custom forge field type name for the mapbox zoom field. */ declare const FORGE_MAPBOX_ZOOM_FIELD_TYPE: "dbx-forge-mapbox-zoom"; /** * Field definition type for a forge mapbox zoom picker field. */ type DbxForgeMapboxZoomFieldDef = BaseValueField & { readonly type: typeof FORGE_MAPBOX_ZOOM_FIELD_TYPE; }; /** * Configuration for a forge mapbox zoom picker field. */ interface DbxForgeMapboxZoomFieldConfig { readonly key?: string; readonly label?: string; readonly description?: string; readonly required?: boolean; readonly readonly?: boolean; readonly showMap?: boolean; readonly center?: LatLngPoint; readonly minZoom?: MapboxZoomLevel; readonly maxZoom?: MapboxZoomLevel; readonly zoomStep?: number; } /** * Creates a forge field definition for a Mapbox-powered zoom level picker. * * This is the forge equivalent of {@link mapboxZoomField}. * * @param config - Optional field configuration overrides. * @returns A validated forge field definition for the Mapbox zoom picker. */ declare function dbxForgeMapboxZoomField(config?: DbxForgeMapboxZoomFieldConfig): DbxForgeMapboxZoomFieldDef; /** * All custom dbx-form/mapbox forge field type definitions. */ declare const DBX_FORGE_MAPBOX_FIELD_TYPES: FieldTypeDefinition[]; /** * Registers ng-forge dynamic form field declarations for the mapbox package. * * Add this to your app's providers alongside provideDbxForgeFormFieldDeclarations(). * * @returns The providers that register the mapbox forge field types with ng-forge. */ declare function provideDbxForgeMapboxFieldDeclarations(): i0.EnvironmentProviders & { __fieldDefs?: any; __formValue?: unknown; }; export { DBX_FORGE_MAPBOX_FIELD_TYPES, DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY, DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_MARKER_CONFIG, DbxForgeMapboxLatLngFieldComponent, DbxForgeMapboxLatLngFieldMarkerComponent, DbxForgeMapboxZoomFieldComponent, FORGE_MAPBOX_LATLNG_FIELD_TYPE, FORGE_MAPBOX_ZOOM_FIELD_TYPE, dbxForgeMapboxLatLngField, dbxForgeMapboxZoomField, mapboxLatLngFieldMapper, mapboxZoomFieldMapper, provideDbxForgeMapboxFieldDeclarations }; export type { DbxForgeMapboxLatLngFieldComponentProps, DbxForgeMapboxLatLngFieldConfig, DbxForgeMapboxLatLngFieldDef, DbxForgeMapboxZoomFieldComponentProps, DbxForgeMapboxZoomFieldConfig, DbxForgeMapboxZoomFieldDef };