@dereekb/dbx-form 13.4.0 → 13.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,12 @@ import { MapComponent, MarkerComponent } from 'ngx-mapbox-gl';
26
26
  import * as i1 from '@ngx-formly/core';
27
27
  import { FormlyModule } from '@ngx-formly/core';
28
28
 
29
+ /**
30
+ * Creates a Formly field configuration for a Mapbox-powered latitude/longitude picker with optional map display.
31
+ *
32
+ * @param config - Optional field configuration overrides
33
+ * @returns A validated Formly field configuration for the Mapbox lat/lng picker
34
+ */
29
35
  function mapboxLatLngField(config = {}) {
30
36
  const { key = 'latLng', latLngConfig, showMap, zoom, recenterTime, showCenterButton, setCenterOnLocationSet, selectLocationOnMapDrag, selectLocationOnMapClick, markerConfig } = config;
31
37
  const classGetter = 'dbx-mat-form-field-disable-underline';
@@ -346,6 +352,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
346
352
  }]
347
353
  }] });
348
354
 
355
+ /**
356
+ * Creates a Formly field configuration for a Mapbox-powered zoom level picker with optional map preview.
357
+ *
358
+ * @param config - Optional field configuration overrides
359
+ * @returns A validated Formly field configuration for the Mapbox zoom picker
360
+ */
349
361
  function mapboxZoomField(config = {}) {
350
362
  const { key = 'zoom', showMap, center, minZoom, maxZoom, zoomStep } = config;
351
363
  const classGetter = 'dbx-mat-form-field-disable-underline';
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-form-mapbox.mjs","sources":["../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.field.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.field.marker.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.field.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.module.ts","../../../../packages/dbx-form/mapbox/src/lib/field/zoom/zoom.field.ts","../../../../packages/dbx-form/mapbox/src/lib/field/zoom/zoom.field.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/zoom/zoom.module.ts","../../../../packages/dbx-form/mapbox/src/lib/mapbox.module.ts","../../../../packages/dbx-form/mapbox/src/dereekb-dbx-form-mapbox.ts"],"sourcesContent":["import { DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, type DescriptionFieldConfig, type FieldConfig, formlyField, type LabeledFieldConfig, propsAndConfigForFieldConfig, validatorsForFieldConfig } from '@dereekb/dbx-form';\nimport { LAT_LNG_PATTERN } from '@dereekb/util';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { type DbxFormMapboxLatLngComponentFieldProps } from './latlng.field.component';\n\nexport interface MapboxLatLngFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxLatLngComponentFieldProps, 'showMap' | 'zoom' | 'latLngConfig' | 'recenterTime' | 'setCenterOnLocationSet' | 'showCenterButton' | 'selectLocationOnMapDrag' | 'selectLocationOnMapClick' | 'markerConfig'> {}\n\nexport function mapboxLatLngField(config: MapboxLatLngFieldConfig = {}): FormlyFieldConfig {\n const { key = 'latLng', latLngConfig, showMap, zoom, recenterTime, showCenterButton, setCenterOnLocationSet, selectLocationOnMapDrag, selectLocationOnMapClick, markerConfig } = config;\n\n const classGetter = 'dbx-mat-form-field-disable-underline';\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-latlng-picker',\n ...propsAndConfigForFieldConfig(config, {\n classGetter,\n label: config.label ?? 'Location',\n placeholder: DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER,\n pattern: LAT_LNG_PATTERN,\n autocomplete: false,\n showMap,\n zoom,\n latLngConfig,\n recenterTime,\n selectLocationOnMapDrag,\n selectLocationOnMapClick,\n showCenterButton,\n setCenterOnLocationSet,\n markerConfig\n })\n }),\n ...validatorsForFieldConfig({\n messages: {\n pattern: DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE\n }\n })\n };\n\n return fieldConfig;\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { shareReplay, map, type Observable, combineLatest } from 'rxjs';\nimport { type DbxMapboxMarker, DbxMapboxMarkerComponent } from '@dereekb/dbx-web/mapbox';\nimport { DbxFormMapboxLatLngFieldComponent } from './latlng.field.component';\nimport { type Maybe } from '@dereekb/util';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n template: `\n <dbx-mapbox-marker [marker]=\"markerSignal()\"></dbx-mapbox-marker>\n `,\n imports: [DbxMapboxMarkerComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormMapboxLatLngFieldMarkerComponent {\n readonly fieldComponent = inject(DbxFormMapboxLatLngFieldComponent);\n\n readonly marker$: Observable<Maybe<DbxMapboxMarker>> = combineLatest([this.fieldComponent.latLng$, this.fieldComponent.markerConfig$]).pipe(\n map(([latLng, markerConfig]) => {\n if (markerConfig !== false) {\n return { latLng, ...markerConfig };\n } else {\n return undefined;\n }\n }),\n shareReplay(1)\n );\n\n readonly markerSignal = toSignal(this.marker$);\n}\n","import { type AbstractControl, type FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { ChangeDetectionStrategy, Component, Injector, type OnDestroy, type OnInit, inject } from '@angular/core';\nimport { type FieldTypeConfig, type FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { skip, first, BehaviorSubject, filter, shareReplay, startWith, switchMap, map, type Observable, throttleTime, skipWhile, of, distinctUntilChanged } from 'rxjs';\nimport { asObservableFromGetter, filterMaybe, type ObservableFactoryWithRequiredInput, SubscriptionObject } from '@dereekb/rxjs';\nimport { type Maybe, type LatLngPoint, type LatLngPointFunctionConfig, type LatLngStringFunction, latLngStringFunction, type Milliseconds, latLngPointFunction, isDefaultLatLngPoint, isValidLatLngPoint, type LatLngPointFunction, isSameLatLngPoint, defaultLatLngPoint } from '@dereekb/util';\nimport { WaGeolocationService } from '@ng-web-apis/geolocation';\nimport { type Marker } from 'mapbox-gl';\nimport { DbxMapboxInjectionStore, DbxMapboxMapStore, type DbxMapboxMarkerDisplayConfig, DbxMapboxModule, type MapboxEaseTo, type MapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable } from '@dereekb/dbx-web/mapbox';\nimport { DbxFormMapboxLatLngFieldMarkerComponent } from './latlng.field.marker.component';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NgClass } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MapComponent, MarkerComponent } from 'ngx-mapbox-gl';\n\nexport const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = 'DbxFormMapboxLatLngFieldComponent';\n\nexport const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig = {\n icon: 'pin_drop'\n};\n\nexport interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {\n /**\n * (Optional) Whether or not the show the map. If the map is not shown, relies on the center of the parent map to determine position.\n *\n * Defaults to true.\n *\n * Cases where this would be set false is if another map is being used.\n */\n readonly showMap?: boolean;\n /**\n * Whether or not to display the center button. Is set to false if selectLocationOnMapDrag is true.\n */\n readonly showCenterButton?: boolean;\n /**\n * Whether or not to set the center of the map on the location when set. Defaults to true.\n */\n readonly setCenterOnLocationSet?: boolean;\n /**\n * Whether or not to enable dragging the map to select the location. Defaults to true.\n *\n * Only applicable when showMap is false.\n */\n readonly selectLocationOnMapDrag?: boolean;\n /**\n * Whether or not to enable clicking the map to select the location. Defaults to false.\n *\n * Only applicable when showMap is false.\n */\n readonly selectLocationOnMapClick?: boolean;\n /**\n * (Optional) Zoom to start the map at. Ignored if the showMap is false.\n */\n readonly zoom?: MapboxZoomLevel;\n /**\n * Time until recentering on the marker. If the time is 0 then the recentering is disabled.\n */\n readonly recenterTime?: Milliseconds;\n readonly latLngConfig?: LatLngPointFunctionConfig;\n /**\n * Unique injection key.\n *\n * If not defined, the default key will be used.\n *\n * If false is passed, the marker will not be configured in the injection store.\n */\n readonly mapInjectionKey?: Maybe<string | false>;\n /**\n * Marker configuration or factory. If false is passed, the marker will not be displayed.\n */\n readonly markerConfig?: false | ObservableFactoryWithRequiredInput<DbxMapboxMarkerDisplayConfig | false, DbxFormMapboxLatLngFieldComponent>;\n}\n\n/*\n TODO: Re-add menu for picking a new location, including using the current location.\n <button mat-icon-button (click)=\"useCurrentLocation()\" [disabled]=\"isReadonlyOrDisabled || (useCurrentLocationDisabled$ | async)\">\n <mat-icon>my_location</mat-icon>\n </button>\n */\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-input-field\" [ngClass]=\"compactClassSignal()\" [formGroup]=\"formGroup\">\n @if (showMap) {\n <div class=\"dbx-mapbox-input-field-map\">\n <mgl-map dbxMapboxMap>\n <mgl-marker [lngLat]=\"latLngSignal()\" [draggable]=\"!isReadonlyOrDisabled\" (markerDragEnd)=\"onMarkerDragEnd($event)\"></mgl-marker>\n </mgl-map>\n </div>\n }\n <div class=\"dbx-mapbox-input-field-input\">\n @if (showCenterButton) {\n <button mat-icon-button (click)=\"flyToMarker()\">\n <mat-icon>my_location</mat-icon>\n </button>\n }\n <mat-form-field class=\"dbx-mapbox-input-field-input-field\">\n <mat-label>Coordinates</mat-label>\n <input type=\"text\" matInput [placeholder]=\"placeholder\" [formControl]=\"formControl\" />\n @if (useCurrentLocationDisabledSignal()) {\n <mat-hint class=\"dbx-hint dbx-warn\">Could not access your current location.</mat-hint>\n }\n </mat-form-field>\n </div>\n </div>\n `,\n providers: [provideMapboxStoreIfParentIsUnavailable()],\n styleUrls: ['../mapbox.field.component.scss'],\n imports: [NgClass, MapComponent, MarkerComponent, ReactiveFormsModule, MatIconModule, DbxMapboxModule, MatButtonModule, MatFormFieldModule, MatInputModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n private readonly _geolocationService = inject(WaGeolocationService);\n\n readonly compact = inject(CompactContextStore, { optional: true });\n readonly dbxMapboxInjectionStore = inject(DbxMapboxInjectionStore, { optional: true });\n readonly dbxMapboxMapStore = inject(DbxMapboxMapStore);\n readonly injector = inject(Injector);\n\n private readonly _sub = new SubscriptionObject();\n private readonly _geoSub = new SubscriptionObject();\n private readonly _centerSub = new SubscriptionObject();\n private readonly _flyToCenterSub = new SubscriptionObject();\n private readonly _clickSub = new SubscriptionObject();\n private readonly _zoom = new BehaviorSubject<MapboxZoomLevel>(12);\n private readonly _markerConfig = new BehaviorSubject<Observable<DbxMapboxMarkerDisplayConfig | false>>(of(DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG));\n\n private _latLngStringFunction!: LatLngStringFunction;\n private _latLngPointFunction!: LatLngPointFunction;\n\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-mapbox-input-field-compact'\n }).pipe(filterMaybe());\n\n private readonly _useCurrentLocationDisabled = new BehaviorSubject<boolean>(false);\n readonly useCurrentLocationDisabled$ = this._useCurrentLocationDisabled.asObservable();\n\n private readonly _formControlObs = new BehaviorSubject<Maybe<AbstractControl>>(undefined);\n readonly formControl$ = this._formControlObs.pipe(filterMaybe());\n\n readonly value$ = this.formControl$.pipe(\n switchMap((control) => control.valueChanges.pipe(startWith(control.value))),\n shareReplay(1)\n );\n\n readonly latLng$: Observable<LatLngPoint> = this.value$.pipe(\n filterMaybe(),\n map((x) => this._latLngPointFunction(x)),\n distinctUntilChanged<LatLngPoint>(isSameLatLngPoint),\n shareReplay(1)\n );\n\n readonly nonZeroLatLng$: Observable<LatLngPoint> = this.latLng$.pipe(\n /**\n * Center observable passed to the store. Do not pass invalid points.\n *\n * Also skip any initial 0,0 values so the center doesn't potentially \"whip\" from 0,0 to a final loaded value.\n */\n skipWhile<LatLngPoint>(isDefaultLatLngPoint),\n filter(isValidLatLngPoint)\n );\n\n readonly zoom$ = this._zoom.asObservable();\n readonly markerConfig$ = this._markerConfig.asObservable().pipe(\n switchMap((x) => x),\n shareReplay(1)\n );\n\n readonly useCurrentLocationDisabledSignal = toSignal(this._useCurrentLocationDisabled, { initialValue: false });\n readonly compactClassSignal = toSignal(this.compactClass$, { initialValue: '' });\n readonly latLngSignal = toSignal(this.latLng$, { initialValue: defaultLatLngPoint() });\n\n get zoom(): MapboxZoomLevel {\n return Math.min(this.field.props.zoom || 12, 18);\n }\n\n get formGroupName(): string {\n return this.field.key as string;\n }\n\n get formGroup(): FormGroup {\n return this.form as FormGroup;\n }\n\n get label(): Maybe<string> {\n return this.field.props?.label;\n }\n\n get description(): Maybe<string> {\n return this.props.description;\n }\n\n get isReadonlyOrDisabled() {\n return this.props.readonly || this.disabled;\n }\n\n get showMap(): boolean {\n return this.field.props.showMap ?? true;\n }\n\n get selectLocationOnMapDrag(): boolean {\n return this.field.props.selectLocationOnMapDrag ?? true;\n }\n\n get selectLocationOnMapClick(): boolean {\n return this.field.props.selectLocationOnMapClick ?? false;\n }\n\n get setCenterOnLocationSet() {\n return this.field.props.setCenterOnLocationSet ?? true;\n }\n\n get showCenterButton() {\n return !this.selectLocationOnMapDrag && this.props.showCenterButton !== false;\n }\n\n get recenterTime(): Milliseconds {\n return this.field.props.recenterTime || 10 * 1000;\n }\n\n get useCurrentLocationDisabled() {\n return this._useCurrentLocationDisabled;\n }\n\n get mapInjectionKey() {\n return this.field.props.mapInjectionKey;\n }\n\n get markerConfig() {\n return this.field.props.markerConfig;\n }\n\n ngOnInit(): void {\n const latLngPointConfig = { ...this.field.props.latLngConfig, wrap: this.field.props.latLngConfig?.wrap || false, validate: this.field.props.latLngConfig?.validate || false, precisionRounding: this.field.props.latLngConfig?.precisionRounding ?? 'round' };\n this._latLngStringFunction = latLngStringFunction(latLngPointConfig);\n this._latLngPointFunction = latLngPointFunction(latLngPointConfig);\n\n this._formControlObs.next(this.formControl);\n this._zoom.next(this.zoom);\n\n if (this.setCenterOnLocationSet) {\n this._centerSub.subscription = this.dbxMapboxMapStore.setCenter(this.nonZeroLatLng$);\n }\n\n if (this.showMap) {\n // Set zoom only if showMap is true\n this.dbxMapboxMapStore.setZoom(this.zoom$);\n\n // recenter periodically\n if (this.recenterTime > 0) {\n this._flyToCenterSub.subscription = this.dbxMapboxMapStore.center$.pipe(skip(1), throttleTime(this.recenterTime, undefined, { leading: false, trailing: true })).subscribe(() => {\n this.flyToMarker();\n });\n }\n } else {\n // use the center of the map to set locations\n if (this.selectLocationOnMapDrag) {\n this._sub.subscription = this.dbxMapboxMapStore.center$.subscribe((center) => {\n this.dbxMapboxMapStore.centerGivenMargin$.pipe(first()).subscribe(() => {\n if (!this.isReadonlyOrDisabled) {\n this.setValue(center);\n }\n });\n });\n }\n\n // enable selecting the location on a map click\n if (this.selectLocationOnMapClick) {\n this._clickSub.subscription = this.dbxMapboxMapStore.clickEvent$.subscribe((x) => {\n if (x?.type === 'click') {\n this.setValue(x.lngLat);\n }\n });\n }\n }\n\n if (this.props.readonly) {\n this.formControl.disable();\n }\n\n // Add the marker to the injection store for display\n if (this.dbxMapboxInjectionStore) {\n if (this.markerConfig != null) {\n this._markerConfig.next(this.markerConfig === false ? of(false) : asObservableFromGetter(this.markerConfig, this));\n }\n\n this.dbxMapboxInjectionStore.addInjectionConfig({\n key: this.mapInjectionKey || DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY,\n injectionConfig: {\n componentClass: DbxFormMapboxLatLngFieldMarkerComponent,\n providers: [{ provide: DbxFormMapboxLatLngFieldComponent, useValue: this }]\n }\n });\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._zoom.complete();\n this._markerConfig.complete();\n this._formControlObs.complete();\n this._sub.destroy();\n this._geoSub.destroy();\n this._centerSub.destroy();\n this._flyToCenterSub.destroy();\n this._clickSub.destroy();\n }\n\n flyToMarker() {\n this.dbxMapboxMapStore.easeTo(\n this.nonZeroLatLng$.pipe(\n first(),\n map((x) => ({ center: x }) as MapboxEaseTo)\n )\n );\n }\n\n useCurrentLocation() {\n this._geoSub.subscription = this._geolocationService.pipe(first()).subscribe({\n next: (position) => {\n if (position) {\n const { latitude: lat, longitude: lng } = position.coords;\n this.setValue({ lat, lng });\n }\n },\n error: () => {\n this._useCurrentLocationDisabled.next(true);\n }\n });\n }\n\n onMarkerDragEnd(marker: Marker) {\n this.setValue(marker.getLngLat());\n }\n\n setValue(latLng?: Maybe<LatLngPoint>) {\n this.formControl.setValue(latLng ? this._latLngStringFunction(latLng) : latLng);\n this.formControl.markAsTouched();\n this.formControl.markAsDirty();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxLatLngFieldComponent } from './latlng.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\n\nconst importsAndExports = [DbxFormMapboxLatLngFieldComponent];\n\n@NgModule({\n imports: [\n ...importsAndExports,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-latlng-picker', component: DbxFormMapboxLatLngFieldComponent, wrappers: ['style', 'form-field'] }]\n })\n ],\n exports: importsAndExports\n})\nexport class DbxFormMapboxLatLngModule {}\n","import { type DescriptionFieldConfig, type FieldConfig, formlyField, type LabeledFieldConfig, propsAndConfigForFieldConfig } from '@dereekb/dbx-form';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { type DbxFormMapboxZoomComponentFieldProps } from './zoom.field.component';\n\nexport interface MapboxZoomFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxZoomComponentFieldProps, 'showMap' | 'center' | 'minZoom' | 'maxZoom' | 'zoomStep'> {}\n\nexport function mapboxZoomField(config: MapboxZoomFieldConfig = {}): FormlyFieldConfig {\n const { key = 'zoom', showMap, center, minZoom, maxZoom, zoomStep } = config;\n\n const classGetter = 'dbx-mat-form-field-disable-underline';\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-zoom-picker',\n ...propsAndConfigForFieldConfig(config, {\n classGetter,\n label: config.label ?? 'Zoom',\n autocomplete: false,\n showMap,\n center,\n minZoom,\n maxZoom,\n zoomStep\n })\n })\n };\n\n return fieldConfig;\n}\n","import { type AbstractControl, type FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { ChangeDetectionStrategy, Component, type OnDestroy, type OnInit, inject } from '@angular/core';\nimport { type FieldTypeConfig, type FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { BehaviorSubject, shareReplay, startWith, switchMap, type Observable } from 'rxjs';\nimport { filterMaybe, SubscriptionObject } from '@dereekb/rxjs';\nimport { type ZoomLevel, type Maybe, type LatLngPoint, latLngPoint } from '@dereekb/util';\nimport { DbxMapboxService, DbxMapboxMapStore, type MapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable, mapboxZoomLevel, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, DbxMapboxModule } from '@dereekb/dbx-web/mapbox';\nimport { NgClass } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nexport interface DbxFormMapboxZoomComponentFieldProps extends Omit<FormlyFieldProps, 'min' | 'max'> {\n /**\n * (Optional) Whether or not the show the map. Cases where this would be set false is if another map is being used.\n *\n * Defaults to true.\n */\n readonly showMap?: boolean;\n /**\n * Default center\n */\n readonly center?: LatLngPoint;\n /**\n * Whether or not to lock the map itself to the min and max zoom levels.\n */\n readonly lockMapToZoomLevels?: boolean;\n /**\n * Min zoom level allowed\n */\n readonly minZoom?: MapboxZoomLevel;\n /**\n * Max zoom level allowed.\n */\n readonly maxZoom?: MapboxZoomLevel;\n /**\n * Step size when using arrow keys.\n */\n readonly zoomStep?: number;\n}\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-input-field\" [ngClass]=\"compactClassSignal()\" [formGroup]=\"formGroup\">\n @if (showMap) {\n <div class=\"dbx-mapbox-input-field-map\">\n <mgl-map dbxMapboxMap></mgl-map>\n </div>\n }\n <div class=\"dbx-mapbox-input-field-input\">\n <mat-form-field class=\"dbx-mapbox-input-field-input-field\">\n <mat-label>Zoom Level</mat-label>\n <input type=\"number\" matInput [min]=\"minZoom\" [max]=\"maxZoom\" [step]=\"zoomStep\" [placeholder]=\"placeholder\" [formControl]=\"formControl\" />\n </mat-form-field>\n </div>\n </div>\n `,\n providers: [provideMapboxStoreIfParentIsUnavailable()],\n styleUrls: ['../mapbox.field.component.scss'],\n imports: [NgClass, DbxMapboxModule, FormsModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomComponentFieldProps = DbxFormMapboxZoomComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n readonly compact = inject(CompactContextStore, { optional: true });\n\n readonly dbxMapboxService = inject(DbxMapboxService);\n readonly dbxMapboxMapStore = inject(DbxMapboxMapStore);\n\n private _undoZoomLimit = false;\n\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-mapbox-input-field-compact'\n }).pipe(filterMaybe());\n\n readonly compactClassSignal = toSignal(this.compactClass$, { initialValue: '' });\n\n private readonly _sub = new SubscriptionObject();\n private readonly _center = new BehaviorSubject<Maybe<LatLngPoint>>(undefined);\n\n private readonly _formControlObs = new BehaviorSubject<Maybe<AbstractControl>>(undefined);\n readonly formControl$ = this._formControlObs.pipe(filterMaybe());\n\n readonly value$ = this.formControl$.pipe(\n switchMap((control) => control.valueChanges.pipe(startWith(control.value))),\n shareReplay(1)\n );\n\n readonly zoom$: Observable<MapboxZoomLevel> = this.value$.pipe(filterMaybe(), shareReplay(1));\n readonly center$ = this._center.pipe(filterMaybe());\n\n get center(): LatLngPoint {\n return this.field.props.center || latLngPoint(this.dbxMapboxService.defaultCenter);\n }\n\n get formGroupName(): string {\n return this.field.key as string;\n }\n\n get formGroup(): FormGroup {\n return this.form as FormGroup;\n }\n\n get label(): Maybe<string> {\n return this.field.props?.label;\n }\n\n get description(): Maybe<string> {\n return this.props.description;\n }\n\n get isReadonlyOrDisabled() {\n return this.props.readonly || this.disabled;\n }\n\n get showMap(): boolean {\n return this.field.props.showMap ?? true;\n }\n\n get lockMapToZoomLevels(): boolean {\n return this.field.props.lockMapToZoomLevels ?? false;\n }\n\n get minZoom(): MapboxZoomLevel {\n return mapboxZoomLevel(this.field.props.minZoom || MAPBOX_MIN_ZOOM_LEVEL);\n }\n\n get maxZoom(): MapboxZoomLevel {\n return mapboxZoomLevel(this.field.props.maxZoom || MAPBOX_MAX_ZOOM_LEVEL);\n }\n\n get zoomStep(): number {\n return mapboxZoomLevel(this.field.props.zoomStep || 1);\n }\n\n ngOnInit(): void {\n this._formControlObs.next(this.formControl);\n this._center.next(this.center);\n\n // set/sync props for error messages\n (this.props as FormlyFieldProps).min = this.minZoom;\n (this.props as FormlyFieldProps).max = this.maxZoom;\n\n this.dbxMapboxMapStore.setZoom(this.zoom$);\n\n // Set center only if showMap is false.\n if (this.showMap) {\n this.dbxMapboxMapStore.setCenter(this.center$);\n }\n\n if (this.props.readonly) {\n this.formControl.disable();\n\n if (this.showMap) {\n this.dbxMapboxMapStore.setZoomDisabled();\n }\n } else if (this.lockMapToZoomLevels) {\n // set zoom limits on the map\n this.dbxMapboxMapStore.setZoomRange({ min: this.minZoom, max: this.maxZoom });\n\n // flat to undo them later if not using the same map\n this._undoZoomLimit = !this.showMap;\n }\n\n this._sub.subscription = this.dbxMapboxMapStore.zoom$.subscribe((zoom) => {\n if (!this.isReadonlyOrDisabled) {\n this.setValue(zoom);\n }\n });\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._formControlObs.complete();\n this._center.complete();\n this._sub.destroy();\n\n if (!this._undoZoomLimit) {\n this.dbxMapboxMapStore.setZoomRange({});\n }\n }\n\n setValue(zoom?: Maybe<ZoomLevel>) {\n this.formControl.setValue(zoom);\n this.formControl.markAsTouched();\n this.formControl.markAsDirty();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxZoomFieldComponent } from './zoom.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\n\nconst importsAndExports = [DbxFormMapboxZoomFieldComponent];\n\n@NgModule({\n imports: [\n ...importsAndExports,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]\n })\n ],\n exports: importsAndExports\n})\nexport class DbxFormMapboxZoomModule {}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxZoomModule } from './field';\nimport { DbxFormMapboxLatLngModule } from './field/latlng/latlng.module';\n\n@NgModule({\n exports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule]\n})\nexport class DbxFormMapboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3","importsAndExports","i2","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOM,SAAU,iBAAiB,CAAC,MAAA,GAAkC,EAAE,EAAA;IACpE,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,YAAY,EAAE,GAAG,MAAM;IAEvL,MAAM,WAAW,GAAG,sCAAsC;AAC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Y,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,+BAA+B,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE;yBACtH;AACF,qBAAA;AACD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;MCPY,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAFpB,yBAAyB,EAAE,uBAAuB,CAAA,EAAA,CAAA;wGAEjD,mBAAmB,EAAA,OAAA,EAAA,CAFpB,yBAAyB,EAAE,uBAAuB,CAAA,EAAA,CAAA;;2FAEjD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,uBAAuB;AAC7D,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-form-mapbox.mjs","sources":["../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.field.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.field.marker.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.field.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.module.ts","../../../../packages/dbx-form/mapbox/src/lib/field/zoom/zoom.field.ts","../../../../packages/dbx-form/mapbox/src/lib/field/zoom/zoom.field.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/zoom/zoom.module.ts","../../../../packages/dbx-form/mapbox/src/lib/mapbox.module.ts","../../../../packages/dbx-form/mapbox/src/dereekb-dbx-form-mapbox.ts"],"sourcesContent":["import { DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, type DescriptionFieldConfig, type FieldConfig, formlyField, type LabeledFieldConfig, propsAndConfigForFieldConfig, validatorsForFieldConfig } from '@dereekb/dbx-form';\nimport { LAT_LNG_PATTERN } from '@dereekb/util';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { type DbxFormMapboxLatLngComponentFieldProps } from './latlng.field.component';\n\nexport interface MapboxLatLngFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxLatLngComponentFieldProps, 'showMap' | 'zoom' | 'latLngConfig' | 'recenterTime' | 'setCenterOnLocationSet' | 'showCenterButton' | 'selectLocationOnMapDrag' | 'selectLocationOnMapClick' | 'markerConfig'> {}\n\n/**\n * Creates a Formly field configuration for a Mapbox-powered latitude/longitude picker with optional map display.\n *\n * @param config - Optional field configuration overrides\n * @returns A validated Formly field configuration for the Mapbox lat/lng picker\n */\nexport function mapboxLatLngField(config: MapboxLatLngFieldConfig = {}): FormlyFieldConfig {\n const { key = 'latLng', latLngConfig, showMap, zoom, recenterTime, showCenterButton, setCenterOnLocationSet, selectLocationOnMapDrag, selectLocationOnMapClick, markerConfig } = config;\n\n const classGetter = 'dbx-mat-form-field-disable-underline';\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-latlng-picker',\n ...propsAndConfigForFieldConfig(config, {\n classGetter,\n label: config.label ?? 'Location',\n placeholder: DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER,\n pattern: LAT_LNG_PATTERN,\n autocomplete: false,\n showMap,\n zoom,\n latLngConfig,\n recenterTime,\n selectLocationOnMapDrag,\n selectLocationOnMapClick,\n showCenterButton,\n setCenterOnLocationSet,\n markerConfig\n })\n }),\n ...validatorsForFieldConfig({\n messages: {\n pattern: DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE\n }\n })\n };\n\n return fieldConfig;\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { shareReplay, map, type Observable, combineLatest } from 'rxjs';\nimport { type DbxMapboxMarker, DbxMapboxMarkerComponent } from '@dereekb/dbx-web/mapbox';\nimport { DbxFormMapboxLatLngFieldComponent } from './latlng.field.component';\nimport { type Maybe } from '@dereekb/util';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n template: `\n <dbx-mapbox-marker [marker]=\"markerSignal()\"></dbx-mapbox-marker>\n `,\n imports: [DbxMapboxMarkerComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormMapboxLatLngFieldMarkerComponent {\n readonly fieldComponent = inject(DbxFormMapboxLatLngFieldComponent);\n\n readonly marker$: Observable<Maybe<DbxMapboxMarker>> = combineLatest([this.fieldComponent.latLng$, this.fieldComponent.markerConfig$]).pipe(\n map(([latLng, markerConfig]) => {\n if (markerConfig !== false) {\n return { latLng, ...markerConfig };\n } else {\n return undefined;\n }\n }),\n shareReplay(1)\n );\n\n readonly markerSignal = toSignal(this.marker$);\n}\n","import { type AbstractControl, type FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { ChangeDetectionStrategy, Component, Injector, type OnDestroy, type OnInit, inject } from '@angular/core';\nimport { type FieldTypeConfig, type FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { skip, first, BehaviorSubject, filter, shareReplay, startWith, switchMap, map, type Observable, throttleTime, skipWhile, of, distinctUntilChanged } from 'rxjs';\nimport { asObservableFromGetter, filterMaybe, type ObservableFactoryWithRequiredInput, SubscriptionObject } from '@dereekb/rxjs';\nimport { type Maybe, type LatLngPoint, type LatLngPointFunctionConfig, type LatLngStringFunction, latLngStringFunction, type Milliseconds, latLngPointFunction, isDefaultLatLngPoint, isValidLatLngPoint, type LatLngPointFunction, isSameLatLngPoint, defaultLatLngPoint } from '@dereekb/util';\nimport { WaGeolocationService } from '@ng-web-apis/geolocation';\nimport { type Marker } from 'mapbox-gl';\nimport { DbxMapboxInjectionStore, DbxMapboxMapStore, type DbxMapboxMarkerDisplayConfig, DbxMapboxModule, type MapboxEaseTo, type MapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable } from '@dereekb/dbx-web/mapbox';\nimport { DbxFormMapboxLatLngFieldMarkerComponent } from './latlng.field.marker.component';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NgClass } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MapComponent, MarkerComponent } from 'ngx-mapbox-gl';\n\nexport const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = 'DbxFormMapboxLatLngFieldComponent';\n\nexport const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig = {\n icon: 'pin_drop'\n};\n\nexport interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {\n /**\n * (Optional) Whether or not the show the map. If the map is not shown, relies on the center of the parent map to determine position.\n *\n * Defaults to true.\n *\n * Cases where this would be set false is if another map is being used.\n */\n readonly showMap?: boolean;\n /**\n * Whether or not to display the center button. Is set to false if selectLocationOnMapDrag is true.\n */\n readonly showCenterButton?: boolean;\n /**\n * Whether or not to set the center of the map on the location when set. Defaults to true.\n */\n readonly setCenterOnLocationSet?: boolean;\n /**\n * Whether or not to enable dragging the map to select the location. Defaults to true.\n *\n * Only applicable when showMap is false.\n */\n readonly selectLocationOnMapDrag?: boolean;\n /**\n * Whether or not to enable clicking the map to select the location. Defaults to false.\n *\n * Only applicable when showMap is false.\n */\n readonly selectLocationOnMapClick?: boolean;\n /**\n * (Optional) Zoom to start the map at. Ignored if the showMap is false.\n */\n readonly zoom?: MapboxZoomLevel;\n /**\n * Time until recentering on the marker. If the time is 0 then the recentering is disabled.\n */\n readonly recenterTime?: Milliseconds;\n readonly latLngConfig?: LatLngPointFunctionConfig;\n /**\n * Unique injection key.\n *\n * If not defined, the default key will be used.\n *\n * If false is passed, the marker will not be configured in the injection store.\n */\n readonly mapInjectionKey?: Maybe<string | false>;\n /**\n * Marker configuration or factory. If false is passed, the marker will not be displayed.\n */\n readonly markerConfig?: false | ObservableFactoryWithRequiredInput<DbxMapboxMarkerDisplayConfig | false, DbxFormMapboxLatLngFieldComponent>;\n}\n\n/*\n TODO: Re-add menu for picking a new location, including using the current location.\n <button mat-icon-button (click)=\"useCurrentLocation()\" [disabled]=\"isReadonlyOrDisabled || (useCurrentLocationDisabled$ | async)\">\n <mat-icon>my_location</mat-icon>\n </button>\n */\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-input-field\" [ngClass]=\"compactClassSignal()\" [formGroup]=\"formGroup\">\n @if (showMap) {\n <div class=\"dbx-mapbox-input-field-map\">\n <mgl-map dbxMapboxMap>\n <mgl-marker [lngLat]=\"latLngSignal()\" [draggable]=\"!isReadonlyOrDisabled\" (markerDragEnd)=\"onMarkerDragEnd($event)\"></mgl-marker>\n </mgl-map>\n </div>\n }\n <div class=\"dbx-mapbox-input-field-input\">\n @if (showCenterButton) {\n <button mat-icon-button (click)=\"flyToMarker()\">\n <mat-icon>my_location</mat-icon>\n </button>\n }\n <mat-form-field class=\"dbx-mapbox-input-field-input-field\">\n <mat-label>Coordinates</mat-label>\n <input type=\"text\" matInput [placeholder]=\"placeholder\" [formControl]=\"formControl\" />\n @if (useCurrentLocationDisabledSignal()) {\n <mat-hint class=\"dbx-hint dbx-warn\">Could not access your current location.</mat-hint>\n }\n </mat-form-field>\n </div>\n </div>\n `,\n providers: [provideMapboxStoreIfParentIsUnavailable()],\n styleUrls: ['../mapbox.field.component.scss'],\n imports: [NgClass, MapComponent, MarkerComponent, ReactiveFormsModule, MatIconModule, DbxMapboxModule, MatButtonModule, MatFormFieldModule, MatInputModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n private readonly _geolocationService = inject(WaGeolocationService);\n\n readonly compact = inject(CompactContextStore, { optional: true });\n readonly dbxMapboxInjectionStore = inject(DbxMapboxInjectionStore, { optional: true });\n readonly dbxMapboxMapStore = inject(DbxMapboxMapStore);\n readonly injector = inject(Injector);\n\n private readonly _sub = new SubscriptionObject();\n private readonly _geoSub = new SubscriptionObject();\n private readonly _centerSub = new SubscriptionObject();\n private readonly _flyToCenterSub = new SubscriptionObject();\n private readonly _clickSub = new SubscriptionObject();\n private readonly _zoom = new BehaviorSubject<MapboxZoomLevel>(12);\n private readonly _markerConfig = new BehaviorSubject<Observable<DbxMapboxMarkerDisplayConfig | false>>(of(DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG));\n\n private _latLngStringFunction!: LatLngStringFunction;\n private _latLngPointFunction!: LatLngPointFunction;\n\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-mapbox-input-field-compact'\n }).pipe(filterMaybe());\n\n private readonly _useCurrentLocationDisabled = new BehaviorSubject<boolean>(false);\n readonly useCurrentLocationDisabled$ = this._useCurrentLocationDisabled.asObservable();\n\n private readonly _formControlObs = new BehaviorSubject<Maybe<AbstractControl>>(undefined);\n readonly formControl$ = this._formControlObs.pipe(filterMaybe());\n\n readonly value$ = this.formControl$.pipe(\n switchMap((control) => control.valueChanges.pipe(startWith(control.value))),\n shareReplay(1)\n );\n\n readonly latLng$: Observable<LatLngPoint> = this.value$.pipe(\n filterMaybe(),\n map((x) => this._latLngPointFunction(x)),\n distinctUntilChanged<LatLngPoint>(isSameLatLngPoint),\n shareReplay(1)\n );\n\n readonly nonZeroLatLng$: Observable<LatLngPoint> = this.latLng$.pipe(\n /**\n * Center observable passed to the store. Do not pass invalid points.\n *\n * Also skip any initial 0,0 values so the center doesn't potentially \"whip\" from 0,0 to a final loaded value.\n */\n skipWhile<LatLngPoint>(isDefaultLatLngPoint),\n filter(isValidLatLngPoint)\n );\n\n readonly zoom$ = this._zoom.asObservable();\n readonly markerConfig$ = this._markerConfig.asObservable().pipe(\n switchMap((x) => x),\n shareReplay(1)\n );\n\n readonly useCurrentLocationDisabledSignal = toSignal(this._useCurrentLocationDisabled, { initialValue: false });\n readonly compactClassSignal = toSignal(this.compactClass$, { initialValue: '' });\n readonly latLngSignal = toSignal(this.latLng$, { initialValue: defaultLatLngPoint() });\n\n get zoom(): MapboxZoomLevel {\n return Math.min(this.field.props.zoom || 12, 18);\n }\n\n get formGroupName(): string {\n return this.field.key as string;\n }\n\n get formGroup(): FormGroup {\n return this.form as FormGroup;\n }\n\n get label(): Maybe<string> {\n return this.field.props?.label;\n }\n\n get description(): Maybe<string> {\n return this.props.description;\n }\n\n get isReadonlyOrDisabled() {\n return this.props.readonly || this.disabled;\n }\n\n get showMap(): boolean {\n return this.field.props.showMap ?? true;\n }\n\n get selectLocationOnMapDrag(): boolean {\n return this.field.props.selectLocationOnMapDrag ?? true;\n }\n\n get selectLocationOnMapClick(): boolean {\n return this.field.props.selectLocationOnMapClick ?? false;\n }\n\n get setCenterOnLocationSet() {\n return this.field.props.setCenterOnLocationSet ?? true;\n }\n\n get showCenterButton() {\n return !this.selectLocationOnMapDrag && this.props.showCenterButton !== false;\n }\n\n get recenterTime(): Milliseconds {\n return this.field.props.recenterTime || 10 * 1000;\n }\n\n get useCurrentLocationDisabled() {\n return this._useCurrentLocationDisabled;\n }\n\n get mapInjectionKey() {\n return this.field.props.mapInjectionKey;\n }\n\n get markerConfig() {\n return this.field.props.markerConfig;\n }\n\n ngOnInit(): void {\n const latLngPointConfig = { ...this.field.props.latLngConfig, wrap: this.field.props.latLngConfig?.wrap || false, validate: this.field.props.latLngConfig?.validate || false, precisionRounding: this.field.props.latLngConfig?.precisionRounding ?? 'round' };\n this._latLngStringFunction = latLngStringFunction(latLngPointConfig);\n this._latLngPointFunction = latLngPointFunction(latLngPointConfig);\n\n this._formControlObs.next(this.formControl);\n this._zoom.next(this.zoom);\n\n if (this.setCenterOnLocationSet) {\n this._centerSub.subscription = this.dbxMapboxMapStore.setCenter(this.nonZeroLatLng$);\n }\n\n if (this.showMap) {\n // Set zoom only if showMap is true\n this.dbxMapboxMapStore.setZoom(this.zoom$);\n\n // recenter periodically\n if (this.recenterTime > 0) {\n this._flyToCenterSub.subscription = this.dbxMapboxMapStore.center$.pipe(skip(1), throttleTime(this.recenterTime, undefined, { leading: false, trailing: true })).subscribe(() => {\n this.flyToMarker();\n });\n }\n } else {\n // use the center of the map to set locations\n if (this.selectLocationOnMapDrag) {\n this._sub.subscription = this.dbxMapboxMapStore.center$.subscribe((center) => {\n this.dbxMapboxMapStore.centerGivenMargin$.pipe(first()).subscribe(() => {\n if (!this.isReadonlyOrDisabled) {\n this.setValue(center);\n }\n });\n });\n }\n\n // enable selecting the location on a map click\n if (this.selectLocationOnMapClick) {\n this._clickSub.subscription = this.dbxMapboxMapStore.clickEvent$.subscribe((x) => {\n if (x?.type === 'click') {\n this.setValue(x.lngLat);\n }\n });\n }\n }\n\n if (this.props.readonly) {\n this.formControl.disable();\n }\n\n // Add the marker to the injection store for display\n if (this.dbxMapboxInjectionStore) {\n if (this.markerConfig != null) {\n this._markerConfig.next(this.markerConfig === false ? of(false) : asObservableFromGetter(this.markerConfig, this));\n }\n\n this.dbxMapboxInjectionStore.addInjectionConfig({\n key: this.mapInjectionKey || DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY,\n injectionConfig: {\n componentClass: DbxFormMapboxLatLngFieldMarkerComponent,\n providers: [{ provide: DbxFormMapboxLatLngFieldComponent, useValue: this }]\n }\n });\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._zoom.complete();\n this._markerConfig.complete();\n this._formControlObs.complete();\n this._sub.destroy();\n this._geoSub.destroy();\n this._centerSub.destroy();\n this._flyToCenterSub.destroy();\n this._clickSub.destroy();\n }\n\n flyToMarker() {\n this.dbxMapboxMapStore.easeTo(\n this.nonZeroLatLng$.pipe(\n first(),\n map((x) => ({ center: x }) as MapboxEaseTo)\n )\n );\n }\n\n useCurrentLocation() {\n this._geoSub.subscription = this._geolocationService.pipe(first()).subscribe({\n next: (position) => {\n if (position) {\n const { latitude: lat, longitude: lng } = position.coords;\n this.setValue({ lat, lng });\n }\n },\n error: () => {\n this._useCurrentLocationDisabled.next(true);\n }\n });\n }\n\n onMarkerDragEnd(marker: Marker) {\n this.setValue(marker.getLngLat());\n }\n\n setValue(latLng?: Maybe<LatLngPoint>) {\n this.formControl.setValue(latLng ? this._latLngStringFunction(latLng) : latLng);\n this.formControl.markAsTouched();\n this.formControl.markAsDirty();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxLatLngFieldComponent } from './latlng.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\n\nconst importsAndExports = [DbxFormMapboxLatLngFieldComponent];\n\n@NgModule({\n imports: [\n ...importsAndExports,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-latlng-picker', component: DbxFormMapboxLatLngFieldComponent, wrappers: ['style', 'form-field'] }]\n })\n ],\n exports: importsAndExports\n})\nexport class DbxFormMapboxLatLngModule {}\n","import { type DescriptionFieldConfig, type FieldConfig, formlyField, type LabeledFieldConfig, propsAndConfigForFieldConfig } from '@dereekb/dbx-form';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { type DbxFormMapboxZoomComponentFieldProps } from './zoom.field.component';\n\nexport interface MapboxZoomFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxZoomComponentFieldProps, 'showMap' | 'center' | 'minZoom' | 'maxZoom' | 'zoomStep'> {}\n\n/**\n * Creates a Formly field configuration for a Mapbox-powered zoom level picker with optional map preview.\n *\n * @param config - Optional field configuration overrides\n * @returns A validated Formly field configuration for the Mapbox zoom picker\n */\nexport function mapboxZoomField(config: MapboxZoomFieldConfig = {}): FormlyFieldConfig {\n const { key = 'zoom', showMap, center, minZoom, maxZoom, zoomStep } = config;\n\n const classGetter = 'dbx-mat-form-field-disable-underline';\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-zoom-picker',\n ...propsAndConfigForFieldConfig(config, {\n classGetter,\n label: config.label ?? 'Zoom',\n autocomplete: false,\n showMap,\n center,\n minZoom,\n maxZoom,\n zoomStep\n })\n })\n };\n\n return fieldConfig;\n}\n","import { type AbstractControl, type FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { ChangeDetectionStrategy, Component, type OnDestroy, type OnInit, inject } from '@angular/core';\nimport { type FieldTypeConfig, type FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { BehaviorSubject, shareReplay, startWith, switchMap, type Observable } from 'rxjs';\nimport { filterMaybe, SubscriptionObject } from '@dereekb/rxjs';\nimport { type ZoomLevel, type Maybe, type LatLngPoint, latLngPoint } from '@dereekb/util';\nimport { DbxMapboxService, DbxMapboxMapStore, type MapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable, mapboxZoomLevel, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, DbxMapboxModule } from '@dereekb/dbx-web/mapbox';\nimport { NgClass } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nexport interface DbxFormMapboxZoomComponentFieldProps extends Omit<FormlyFieldProps, 'min' | 'max'> {\n /**\n * (Optional) Whether or not the show the map. Cases where this would be set false is if another map is being used.\n *\n * Defaults to true.\n */\n readonly showMap?: boolean;\n /**\n * Default center\n */\n readonly center?: LatLngPoint;\n /**\n * Whether or not to lock the map itself to the min and max zoom levels.\n */\n readonly lockMapToZoomLevels?: boolean;\n /**\n * Min zoom level allowed\n */\n readonly minZoom?: MapboxZoomLevel;\n /**\n * Max zoom level allowed.\n */\n readonly maxZoom?: MapboxZoomLevel;\n /**\n * Step size when using arrow keys.\n */\n readonly zoomStep?: number;\n}\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-input-field\" [ngClass]=\"compactClassSignal()\" [formGroup]=\"formGroup\">\n @if (showMap) {\n <div class=\"dbx-mapbox-input-field-map\">\n <mgl-map dbxMapboxMap></mgl-map>\n </div>\n }\n <div class=\"dbx-mapbox-input-field-input\">\n <mat-form-field class=\"dbx-mapbox-input-field-input-field\">\n <mat-label>Zoom Level</mat-label>\n <input type=\"number\" matInput [min]=\"minZoom\" [max]=\"maxZoom\" [step]=\"zoomStep\" [placeholder]=\"placeholder\" [formControl]=\"formControl\" />\n </mat-form-field>\n </div>\n </div>\n `,\n providers: [provideMapboxStoreIfParentIsUnavailable()],\n styleUrls: ['../mapbox.field.component.scss'],\n imports: [NgClass, DbxMapboxModule, FormsModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomComponentFieldProps = DbxFormMapboxZoomComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n readonly compact = inject(CompactContextStore, { optional: true });\n\n readonly dbxMapboxService = inject(DbxMapboxService);\n readonly dbxMapboxMapStore = inject(DbxMapboxMapStore);\n\n private _undoZoomLimit = false;\n\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-mapbox-input-field-compact'\n }).pipe(filterMaybe());\n\n readonly compactClassSignal = toSignal(this.compactClass$, { initialValue: '' });\n\n private readonly _sub = new SubscriptionObject();\n private readonly _center = new BehaviorSubject<Maybe<LatLngPoint>>(undefined);\n\n private readonly _formControlObs = new BehaviorSubject<Maybe<AbstractControl>>(undefined);\n readonly formControl$ = this._formControlObs.pipe(filterMaybe());\n\n readonly value$ = this.formControl$.pipe(\n switchMap((control) => control.valueChanges.pipe(startWith(control.value))),\n shareReplay(1)\n );\n\n readonly zoom$: Observable<MapboxZoomLevel> = this.value$.pipe(filterMaybe(), shareReplay(1));\n readonly center$ = this._center.pipe(filterMaybe());\n\n get center(): LatLngPoint {\n return this.field.props.center || latLngPoint(this.dbxMapboxService.defaultCenter);\n }\n\n get formGroupName(): string {\n return this.field.key as string;\n }\n\n get formGroup(): FormGroup {\n return this.form as FormGroup;\n }\n\n get label(): Maybe<string> {\n return this.field.props?.label;\n }\n\n get description(): Maybe<string> {\n return this.props.description;\n }\n\n get isReadonlyOrDisabled() {\n return this.props.readonly || this.disabled;\n }\n\n get showMap(): boolean {\n return this.field.props.showMap ?? true;\n }\n\n get lockMapToZoomLevels(): boolean {\n return this.field.props.lockMapToZoomLevels ?? false;\n }\n\n get minZoom(): MapboxZoomLevel {\n return mapboxZoomLevel(this.field.props.minZoom || MAPBOX_MIN_ZOOM_LEVEL);\n }\n\n get maxZoom(): MapboxZoomLevel {\n return mapboxZoomLevel(this.field.props.maxZoom || MAPBOX_MAX_ZOOM_LEVEL);\n }\n\n get zoomStep(): number {\n return mapboxZoomLevel(this.field.props.zoomStep || 1);\n }\n\n ngOnInit(): void {\n this._formControlObs.next(this.formControl);\n this._center.next(this.center);\n\n // set/sync props for error messages\n (this.props as FormlyFieldProps).min = this.minZoom;\n (this.props as FormlyFieldProps).max = this.maxZoom;\n\n this.dbxMapboxMapStore.setZoom(this.zoom$);\n\n // Set center only if showMap is false.\n if (this.showMap) {\n this.dbxMapboxMapStore.setCenter(this.center$);\n }\n\n if (this.props.readonly) {\n this.formControl.disable();\n\n if (this.showMap) {\n this.dbxMapboxMapStore.setZoomDisabled();\n }\n } else if (this.lockMapToZoomLevels) {\n // set zoom limits on the map\n this.dbxMapboxMapStore.setZoomRange({ min: this.minZoom, max: this.maxZoom });\n\n // flat to undo them later if not using the same map\n this._undoZoomLimit = !this.showMap;\n }\n\n this._sub.subscription = this.dbxMapboxMapStore.zoom$.subscribe((zoom) => {\n if (!this.isReadonlyOrDisabled) {\n this.setValue(zoom);\n }\n });\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._formControlObs.complete();\n this._center.complete();\n this._sub.destroy();\n\n if (!this._undoZoomLimit) {\n this.dbxMapboxMapStore.setZoomRange({});\n }\n }\n\n setValue(zoom?: Maybe<ZoomLevel>) {\n this.formControl.setValue(zoom);\n this.formControl.markAsTouched();\n this.formControl.markAsDirty();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxZoomFieldComponent } from './zoom.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\n\nconst importsAndExports = [DbxFormMapboxZoomFieldComponent];\n\n@NgModule({\n imports: [\n ...importsAndExports,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]\n })\n ],\n exports: importsAndExports\n})\nexport class DbxFormMapboxZoomModule {}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxZoomModule } from './field';\nimport { DbxFormMapboxLatLngModule } from './field/latlng/latlng.module';\n\n@NgModule({\n exports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule]\n})\nexport class DbxFormMapboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3","importsAndExports","i2","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;AAKG;AACG,SAAU,iBAAiB,CAAC,MAAA,GAAkC,EAAE,EAAA;IACpE,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,YAAY,EAAE,GAAG,MAAM;IAEvL,MAAM,WAAW,GAAG,sC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,GAAG,iBAAiB;wBACpB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,+BAA+B,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE;yBACtH;AACF,qBAAA;AACD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;MCPY,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAFpB,yBAAyB,EAAE,uBAAuB,CAAA,EAAA,CAAA;wGAEjD,mBAAmB,EAAA,OAAA,EAAA,CAFpB,yBAAyB,EAAE,uBAAuB,CAAA,EAAA,CAAA;;2FAEjD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,uBAAuB;AAC7D,iBAAA;;;ACND;;AAEG;;;;"}
@@ -72,6 +72,9 @@ class QuizStore extends ComponentStore {
72
72
  /**
73
73
  * Returns a reactive observable of the answer for a given question, looked up by id, index, or the current question.
74
74
  *
75
+ * @param lookupInput - Lookup criteria specifying which question's answer to retrieve
76
+ * @returns An observable that emits the current answer for the specified question, or undefined if not answered
77
+ *
75
78
  * @example
76
79
  * ```ts
77
80
  * // By current question:
@@ -79,6 +82,8 @@ class QuizStore extends ComponentStore {
79
82
  * // By question id:
80
83
  * store.answerForQuestion({ id: 'q1' }).subscribe(answer => console.log(answer));
81
84
  * ```
85
+ *
86
+ * @param lookupInput - Lookup criteria specifying which question's answer to retrieve
82
87
  */
83
88
  answerForQuestion(lookupInput) {
84
89
  return asObservable(lookupInput).pipe(switchMap((lookup) => {
@@ -188,7 +193,7 @@ function restartQuizToFirstQuestionOnState(state) {
188
193
  }
189
194
  function setQuizOnState(state, quiz) {
190
195
  let questionMap = undefined;
191
- const currentAnswers = Array.from(state.answers.values());
196
+ const currentAnswers = [...state.answers.values()];
192
197
  if (quiz?.questions) {
193
198
  questionMap = new Map(quiz.questions.map((question) => [question.id, question]));
194
199
  }
@@ -250,6 +255,8 @@ class QuizQuestionAccessor {
250
255
  /**
251
256
  * Provides QuizQuestionAccessor bound to the current question in QuizStore.
252
257
  *
258
+ * @returns An Angular provider that binds QuizQuestionAccessor to the current quiz question
259
+ *
253
260
  * @usage
254
261
  * ```typescript
255
262
  * @Component({
@@ -735,11 +742,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
735
742
  /**
736
743
  * Creates a Likert scale question config with agreement prompt (Strongly Disagree to Strongly Agree).
737
744
  *
745
+ * @param text - The statement to rate agreement on
746
+ * @returns A quiz question config with an agreement-based prompt and guidance text
747
+ *
738
748
  * @example
739
749
  * ```ts
740
750
  * instance.config.set(quizAgreementPrompt('I feel confident leading under pressure.'));
741
751
  * // { prompt: 'Please rate how much you agree...', text: '...', guidance: '1 = Strongly Disagree, 5 = Strongly Agree' }
742
752
  * ```
753
+ *
754
+ * @param text - The statement to rate agreement on
743
755
  */
744
756
  function quizAgreementPrompt(text) {
745
757
  return {
@@ -751,11 +763,16 @@ function quizAgreementPrompt(text) {
751
763
  /**
752
764
  * Creates a Likert scale question config with frequency prompt (Never to Always).
753
765
  *
766
+ * @param text - The statement to rate frequency on
767
+ * @returns A quiz question config with a frequency-based prompt and guidance text
768
+ *
754
769
  * @example
755
770
  * ```ts
756
771
  * instance.config.set(quizFrequencyPrompt('I break vague direction into first steps.'));
757
772
  * // { prompt: 'Please rate how much you agree...', text: '...', guidance: '1 = Never, 5 = Always' }
758
773
  * ```
774
+ *
775
+ * @param text - The statement to rate frequency on
759
776
  */
760
777
  function quizFrequencyPrompt(text) {
761
778
  return {