@dereekb/dbx-form 9.5.4 → 9.6.1

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.
Files changed (34) hide show
  1. package/esm2020/mapbox/lib/field/index.mjs +2 -1
  2. package/esm2020/mapbox/lib/field/latlng/latlng.field.component.mjs +54 -26
  3. package/esm2020/mapbox/lib/field/latlng/latlng.field.mjs +8 -4
  4. package/esm2020/mapbox/lib/field/zoom/index.mjs +4 -0
  5. package/esm2020/mapbox/lib/field/zoom/zoom.field.component.mjs +126 -0
  6. package/esm2020/mapbox/lib/field/zoom/zoom.field.mjs +23 -0
  7. package/esm2020/mapbox/lib/field/zoom/zoom.module.mjs +57 -0
  8. package/esm2020/mapbox/lib/mapbox.module.mjs +5 -4
  9. package/fesm2015/dereekb-dbx-form-mapbox.mjs +243 -33
  10. package/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -1
  11. package/fesm2020/dereekb-dbx-form-mapbox.mjs +242 -33
  12. package/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -1
  13. package/mapbox/esm2020/lib/field/index.mjs +2 -1
  14. package/mapbox/esm2020/lib/field/latlng/latlng.field.component.mjs +54 -26
  15. package/mapbox/esm2020/lib/field/latlng/latlng.field.mjs +8 -4
  16. package/mapbox/esm2020/lib/field/zoom/index.mjs +4 -0
  17. package/mapbox/esm2020/lib/field/zoom/zoom.field.component.mjs +126 -0
  18. package/mapbox/esm2020/lib/field/zoom/zoom.field.mjs +23 -0
  19. package/mapbox/esm2020/lib/field/zoom/zoom.module.mjs +57 -0
  20. package/mapbox/esm2020/lib/mapbox.module.mjs +5 -4
  21. package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs +243 -33
  22. package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -1
  23. package/mapbox/fesm2020/dereekb-dbx-form-mapbox.mjs +242 -33
  24. package/mapbox/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -1
  25. package/mapbox/lib/field/index.d.ts +1 -0
  26. package/mapbox/lib/field/latlng/latlng.field.component.d.ts +28 -8
  27. package/mapbox/lib/field/latlng/latlng.field.d.ts +2 -1
  28. package/mapbox/lib/field/zoom/index.d.ts +3 -0
  29. package/mapbox/lib/field/zoom/zoom.field.component.d.ts +63 -0
  30. package/mapbox/lib/field/zoom/zoom.field.d.ts +6 -0
  31. package/mapbox/lib/field/zoom/zoom.module.d.ts +16 -0
  32. package/mapbox/lib/mapbox.module.d.ts +2 -1
  33. package/mapbox/package.json +4 -4
  34. package/package.json +3 -3
@@ -5,18 +5,18 @@ import { mapCompactModeObs, DbxTextModule } from '@dereekb/dbx-web';
5
5
  import * as i0 from '@angular/core';
6
6
  import { Component, Optional, NgModule } from '@angular/core';
7
7
  import { FieldType } from '@ngx-formly/material';
8
- import { BehaviorSubject, switchMap, startWith, shareReplay, map, filter, first } from 'rxjs';
8
+ import { BehaviorSubject, switchMap, startWith, shareReplay, map, filter, skip, throttleTime, first } from 'rxjs';
9
9
  import { SubscriptionObject, filterMaybe } from '@dereekb/rxjs';
10
10
  import * as i2 from '@ng-web-apis/geolocation';
11
- import * as i3 from '@dereekb/dbx-web/mapbox';
12
- import { DbxMapboxMapStore, DbxMapboxModule } from '@dereekb/dbx-web/mapbox';
11
+ import * as i2$1 from '@dereekb/dbx-web/mapbox';
12
+ import { provideMapboxStoreIfParentIsUnavailable, DbxMapboxModule, mapboxZoomLevel, MAPBOX_MIN_ZOOM_LEVEL, MAPBOX_MAX_ZOOM_LEVEL } from '@dereekb/dbx-web/mapbox';
13
13
  import * as i4 from '@angular/common';
14
14
  import { CommonModule } from '@angular/common';
15
15
  import * as i5 from '@angular/material/icon';
16
16
  import { MatIconModule } from '@angular/material/icon';
17
17
  import * as i6 from '@angular/material/button';
18
18
  import { MatButtonModule } from '@angular/material/button';
19
- import * as i7 from '@angular/forms';
19
+ import * as i4$1 from '@angular/forms';
20
20
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
21
21
  import * as i8 from '@angular/material/form-field';
22
22
  import * as i9 from '@angular/material/input';
@@ -27,16 +27,20 @@ import * as i1$1 from '@ngx-formly/core';
27
27
  import { FormlyModule } from '@ngx-formly/core';
28
28
 
29
29
  function mapboxLatLngField(config = {}) {
30
- const { key = 'latLng' } = config;
30
+ const { key = 'latLng', latLngConfig, showMap, zoom, recenterTime } = config;
31
31
  const fieldConfig = {
32
32
  ...formlyField({
33
33
  key,
34
34
  type: 'mapbox-latlng-picker',
35
35
  ...propsForFieldConfig(config, {
36
- label: config.label ?? 'Location Picker',
36
+ label: config.label ?? 'Location',
37
37
  placeholder: DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER,
38
38
  pattern: LAT_LNG_PATTERN,
39
- autocomplete: false
39
+ autocomplete: false,
40
+ showMap,
41
+ zoom,
42
+ latLngConfig,
43
+ recenterTime
40
44
  })
41
45
  }),
42
46
  ...validatorsForFieldConfig({
@@ -51,15 +55,18 @@ function mapboxLatLngField(config = {}) {
51
55
  }
52
56
 
53
57
  class DbxFormMapboxLatLngFieldComponent extends FieldType {
54
- constructor(compact, geolocation$, dbxMapboxMapStore) {
58
+ constructor(compact, geolocation$, dbxMapboxMapStore, ngZone) {
55
59
  super();
56
60
  this.compact = compact;
57
61
  this.geolocation$ = geolocation$;
58
62
  this.dbxMapboxMapStore = dbxMapboxMapStore;
63
+ this.ngZone = ngZone;
59
64
  this.compactClass$ = mapCompactModeObs(this.compact?.mode$, {
60
- compact: 'dbx-texteditor-field-compact'
65
+ compact: 'dbx-mapbox-input-field-compact'
61
66
  });
62
67
  this._sub = new SubscriptionObject();
68
+ this._geoSub = new SubscriptionObject();
69
+ this._centerSub = new SubscriptionObject();
63
70
  this._zoom = new BehaviorSubject(12);
64
71
  this._formControlObs = new BehaviorSubject(undefined);
65
72
  this.formControl$ = this._formControlObs.pipe(filterMaybe());
@@ -86,79 +93,104 @@ class DbxFormMapboxLatLngFieldComponent extends FieldType {
86
93
  get isReadonlyOrDisabled() {
87
94
  return this.props.readonly || this.disabled;
88
95
  }
96
+ get showMap() {
97
+ return this.field.props.showMap ?? true;
98
+ }
99
+ get recenterTime() {
100
+ return this.field.props.recenterTime || 10 * 1000;
101
+ }
89
102
  ngOnInit() {
90
103
  this._latLngStringFunction = latLngStringFunction(this.field.props.latLngConfig);
91
104
  this._formControlObs.next(this.formControl);
92
105
  this._zoom.next(this.zoom);
93
106
  this.dbxMapboxMapStore.setCenter(this.center$);
94
- this.dbxMapboxMapStore.setZoom(this.zoom$);
107
+ if (this.showMap) {
108
+ // Set zoom only if showMap is true
109
+ this.dbxMapboxMapStore.setZoom(this.zoom$);
110
+ // recenter periodically
111
+ if (this.recenterTime > 0) {
112
+ this._centerSub.subscription = this.dbxMapboxMapStore.center$.pipe(skip(1), throttleTime(this.recenterTime, undefined, { leading: false, trailing: true })).subscribe(() => {
113
+ this.dbxMapboxMapStore.easeTo(this.center$.pipe(first(), map((x) => ({ center: x }))));
114
+ });
115
+ }
116
+ }
117
+ else {
118
+ // use the center of the map to set locations
119
+ this._sub.subscription = this.dbxMapboxMapStore.center$.subscribe((center) => {
120
+ if (!this.isReadonlyOrDisabled) {
121
+ this.ngZone.run(() => this.setValue(center));
122
+ }
123
+ });
124
+ }
95
125
  if (this.props.readonly) {
96
126
  this.formControl.disable();
97
127
  }
98
128
  }
99
129
  ngOnDestroy() {
100
130
  super.ngOnDestroy();
101
- this._formControlObs.complete();
102
- this._zoom.complete();
103
131
  this._sub.destroy();
132
+ this._geoSub.destroy();
133
+ this._zoom.complete();
134
+ this._formControlObs.complete();
135
+ this._centerSub.destroy();
104
136
  }
105
137
  useCurrentLocation() {
106
- this._sub.subscription = this.geolocation$.pipe(first()).subscribe((position) => {
138
+ this._geoSub.subscription = this.geolocation$.pipe(first()).subscribe((position) => {
107
139
  if (position) {
108
140
  const { latitude: lat, longitude: lng } = position.coords;
109
141
  this.setValue({ lat, lng });
110
142
  }
111
143
  });
112
144
  }
113
- onDragEnd(marker) {
145
+ onMarkerDragEnd(marker) {
114
146
  this.setValue(marker.getLngLat());
115
147
  }
116
148
  setValue(latLng) {
117
149
  this.formControl.setValue(latLng ? this._latLngStringFunction(latLng) : latLng);
118
150
  }
119
151
  }
120
- DbxFormMapboxLatLngFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxLatLngFieldComponent, deps: [{ token: i1.CompactContextStore, optional: true }, { token: i2.GeolocationService }, { token: i3.DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
121
- DbxFormMapboxLatLngFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxFormMapboxLatLngFieldComponent, selector: "ng-component", providers: [DbxMapboxMapStore], usesInheritance: true, ngImport: i0, template: `
122
- <div class="dbx-mapbox-latlng-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
123
- <div class="dbx-mapbox-latlng-field-map">
152
+ DbxFormMapboxLatLngFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxLatLngFieldComponent, deps: [{ token: i1.CompactContextStore, optional: true }, { token: i2.GeolocationService }, { token: i2$1.DbxMapboxMapStore }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
153
+ DbxFormMapboxLatLngFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxFormMapboxLatLngFieldComponent, selector: "ng-component", providers: [provideMapboxStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
154
+ <div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
155
+ <div *ngIf="showMap" class="dbx-mapbox-input-field-map">
124
156
  <mgl-map dbxMapboxMap>
125
- <mgl-marker [lngLat]="(latLng$ | async) || [0, 0]" [draggable]="!isReadonlyOrDisabled" (markerDragEnd)="onDragEnd($event)"></mgl-marker>
157
+ <mgl-marker [lngLat]="(latLng$ | async) || [0, 0]" [draggable]="!isReadonlyOrDisabled" (markerDragEnd)="onMarkerDragEnd($event)"></mgl-marker>
126
158
  </mgl-map>
127
159
  </div>
128
- <div class="dbx-mapbox-latlng-field-input">
160
+ <div class="dbx-mapbox-input-field-input">
129
161
  <button mat-icon-button (click)="useCurrentLocation()" [disabled]="isReadonlyOrDisabled">
130
162
  <mat-icon>my_location</mat-icon>
131
163
  </button>
132
- <mat-form-field class="dbx-mapbox-latlng-field-input-field">
164
+ <mat-form-field class="dbx-mapbox-input-field-input-field">
133
165
  <mat-label>Coordinates</mat-label>
134
166
  <input type="text" matInput [placeholder]="placeholder" [formControl]="formControl" />
135
167
  </mat-form-field>
136
168
  </div>
137
169
  </div>
138
- `, isInline: true, styles: [".dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-map{height:220px;width:100%}.dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-input{display:flex;align-items:center}.dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-input .dbx-mapbox-latlng-field-input-field{width:calc(100% - 40px)}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i3.DbxMapboxMapDirective, selector: "[dbxMapboxMap]" }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MapComponent, selector: "mgl-map", inputs: ["accessToken", "collectResourceTiming", "crossSourceCollisions", "customMapboxApiUrl", "fadeDuration", "hash", "refreshExpiredTiles", "failIfMajorPerformanceCaveat", "bearingSnap", "interactive", "pitchWithRotate", "clickTolerance", "attributionControl", "logoPosition", "maxTileCacheSize", "localIdeographFontFamily", "preserveDrawingBuffer", "trackResize", "transformRequest", "bounds", "antialias", "locale", "minZoom", "maxZoom", "minPitch", "maxPitch", "scrollZoom", "dragRotate", "touchPitch", "touchZoomRotate", "doubleClickZoom", "keyboard", "dragPan", "boxZoom", "style", "center", "maxBounds", "zoom", "bearing", "pitch", "fitBoundsOptions", "renderWorldCopies", "projection", "movingMethod", "movingOptions", "fitBounds", "fitScreenCoordinates", "centerWithPanTo", "panToOptions", "cursorStyle"], outputs: ["mapResize", "mapRemove", "mapMouseDown", "mapMouseUp", "mapMouseMove", "mapClick", "mapDblClick", "mapMouseOver", "mapMouseOut", "mapContextMenu", "mapTouchStart", "mapTouchEnd", "mapTouchMove", "mapTouchCancel", "mapWheel", "moveStart", "move", "moveEnd", "mapDragStart", "mapDrag", "mapDragEnd", "zoomStart", "zoomEvt", "zoomEnd", "rotateStart", "rotate", "rotateEnd", "pitchStart", "pitchEvt", "pitchEnd", "boxZoomStart", "boxZoomEnd", "boxZoomCancel", "webGlContextLost", "webGlContextRestored", "mapLoad", "idle", "render", "mapError", "data", "styleData", "sourceData", "dataLoading", "styleDataLoading", "sourceDataLoading", "styleImageMissing", "resize", "remove", "mouseDown", "mouseUp", "mouseMove", "click", "dblClick", "mouseOver", "mouseOut", "contextMenu", "touchStart", "touchEnd", "touchMove", "touchCancel", "wheel", "dragStart", "drag", "dragEnd", "load", "error"] }, { kind: "component", type: i10.MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag", "dragStart", "dragEnd", "drag"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
170
+ `, isInline: true, styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2$1.DbxMapboxMapDirective, selector: "[dbxMapboxMap]" }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MapComponent, selector: "mgl-map", inputs: ["accessToken", "collectResourceTiming", "crossSourceCollisions", "customMapboxApiUrl", "fadeDuration", "hash", "refreshExpiredTiles", "failIfMajorPerformanceCaveat", "bearingSnap", "interactive", "pitchWithRotate", "clickTolerance", "attributionControl", "logoPosition", "maxTileCacheSize", "localIdeographFontFamily", "preserveDrawingBuffer", "trackResize", "transformRequest", "bounds", "antialias", "locale", "minZoom", "maxZoom", "minPitch", "maxPitch", "scrollZoom", "dragRotate", "touchPitch", "touchZoomRotate", "doubleClickZoom", "keyboard", "dragPan", "boxZoom", "style", "center", "maxBounds", "zoom", "bearing", "pitch", "fitBoundsOptions", "renderWorldCopies", "projection", "movingMethod", "movingOptions", "fitBounds", "fitScreenCoordinates", "centerWithPanTo", "panToOptions", "cursorStyle"], outputs: ["mapResize", "mapRemove", "mapMouseDown", "mapMouseUp", "mapMouseMove", "mapClick", "mapDblClick", "mapMouseOver", "mapMouseOut", "mapContextMenu", "mapTouchStart", "mapTouchEnd", "mapTouchMove", "mapTouchCancel", "mapWheel", "moveStart", "move", "moveEnd", "mapDragStart", "mapDrag", "mapDragEnd", "zoomStart", "zoomEvt", "zoomEnd", "rotateStart", "rotate", "rotateEnd", "pitchStart", "pitchEvt", "pitchEnd", "boxZoomStart", "boxZoomEnd", "boxZoomCancel", "webGlContextLost", "webGlContextRestored", "mapLoad", "idle", "render", "mapError", "data", "styleData", "sourceData", "dataLoading", "styleDataLoading", "sourceDataLoading", "styleImageMissing", "resize", "remove", "mouseDown", "mouseUp", "mouseMove", "click", "dblClick", "mouseOver", "mouseOut", "contextMenu", "touchStart", "touchEnd", "touchMove", "touchCancel", "wheel", "dragStart", "drag", "dragEnd", "load", "error"] }, { kind: "component", type: i10.MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag", "dragStart", "dragEnd", "drag"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
139
171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxLatLngFieldComponent, decorators: [{
140
172
  type: Component,
141
173
  args: [{ template: `
142
- <div class="dbx-mapbox-latlng-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
143
- <div class="dbx-mapbox-latlng-field-map">
174
+ <div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
175
+ <div *ngIf="showMap" class="dbx-mapbox-input-field-map">
144
176
  <mgl-map dbxMapboxMap>
145
- <mgl-marker [lngLat]="(latLng$ | async) || [0, 0]" [draggable]="!isReadonlyOrDisabled" (markerDragEnd)="onDragEnd($event)"></mgl-marker>
177
+ <mgl-marker [lngLat]="(latLng$ | async) || [0, 0]" [draggable]="!isReadonlyOrDisabled" (markerDragEnd)="onMarkerDragEnd($event)"></mgl-marker>
146
178
  </mgl-map>
147
179
  </div>
148
- <div class="dbx-mapbox-latlng-field-input">
180
+ <div class="dbx-mapbox-input-field-input">
149
181
  <button mat-icon-button (click)="useCurrentLocation()" [disabled]="isReadonlyOrDisabled">
150
182
  <mat-icon>my_location</mat-icon>
151
183
  </button>
152
- <mat-form-field class="dbx-mapbox-latlng-field-input-field">
184
+ <mat-form-field class="dbx-mapbox-input-field-input-field">
153
185
  <mat-label>Coordinates</mat-label>
154
186
  <input type="text" matInput [placeholder]="placeholder" [formControl]="formControl" />
155
187
  </mat-form-field>
156
188
  </div>
157
189
  </div>
158
- `, providers: [DbxMapboxMapStore], styles: [".dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-map{height:220px;width:100%}.dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-input{display:flex;align-items:center}.dbx-mapbox-latlng-field .dbx-mapbox-latlng-field-input .dbx-mapbox-latlng-field-input-field{width:calc(100% - 40px)}\n"] }]
190
+ `, providers: [provideMapboxStoreIfParentIsUnavailable()], styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"] }]
159
191
  }], ctorParameters: function () { return [{ type: i1.CompactContextStore, decorators: [{
160
192
  type: Optional
161
- }] }, { type: i2.GeolocationService }, { type: i3.DbxMapboxMapStore }]; } });
193
+ }] }, { type: i2.GeolocationService }, { type: i2$1.DbxMapboxMapStore }, { type: i0.NgZone }]; } });
162
194
 
163
195
  class DbxFormMapboxLatLngModule {
164
196
  }
@@ -204,15 +236,192 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
204
236
  }]
205
237
  }] });
206
238
 
239
+ function mapboxZoomField(config = {}) {
240
+ const { key = 'zoom', showMap, center, minZoom, maxZoom, zoomStep } = config;
241
+ const fieldConfig = {
242
+ ...formlyField({
243
+ key,
244
+ type: 'mapbox-zoom-picker',
245
+ ...propsForFieldConfig(config, {
246
+ label: config.label ?? 'Zoom',
247
+ autocomplete: false,
248
+ showMap,
249
+ center,
250
+ minZoom,
251
+ maxZoom,
252
+ zoomStep
253
+ })
254
+ })
255
+ };
256
+ return styleWrapper(fieldConfig, {
257
+ classGetter: 'dbx-mat-form-field-disable-underline'
258
+ });
259
+ }
260
+
261
+ class DbxFormMapboxZoomFieldComponent extends FieldType {
262
+ constructor(compact, dbxMapboxService, dbxMapboxMapStore, ngZone) {
263
+ super();
264
+ this.compact = compact;
265
+ this.dbxMapboxService = dbxMapboxService;
266
+ this.dbxMapboxMapStore = dbxMapboxMapStore;
267
+ this.ngZone = ngZone;
268
+ this.compactClass$ = mapCompactModeObs(this.compact?.mode$, {
269
+ compact: 'dbx-mapbox-input-field-compact'
270
+ });
271
+ this._sub = new SubscriptionObject();
272
+ this._center = new BehaviorSubject(undefined);
273
+ this._formControlObs = new BehaviorSubject(undefined);
274
+ this.formControl$ = this._formControlObs.pipe(filterMaybe());
275
+ this.value$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
276
+ this.zoom$ = this.value$.pipe(filterMaybe(), shareReplay(1));
277
+ this.center$ = this._center.pipe(filterMaybe());
278
+ }
279
+ get center() {
280
+ return this.field.props.center || latLngPoint(this.dbxMapboxService.defaultCenter);
281
+ }
282
+ get formGroupName() {
283
+ return this.field.key;
284
+ }
285
+ get formGroup() {
286
+ return this.form;
287
+ }
288
+ get label() {
289
+ return this.field.props?.label;
290
+ }
291
+ get description() {
292
+ return this.props.description;
293
+ }
294
+ get isReadonlyOrDisabled() {
295
+ return this.props.readonly || this.disabled;
296
+ }
297
+ get showMap() {
298
+ return this.field.props.showMap ?? true;
299
+ }
300
+ get minZoom() {
301
+ return mapboxZoomLevel(this.field.props.minZoom || MAPBOX_MIN_ZOOM_LEVEL);
302
+ }
303
+ get maxZoom() {
304
+ return mapboxZoomLevel(this.field.props.maxZoom || MAPBOX_MAX_ZOOM_LEVEL);
305
+ }
306
+ get zoomStep() {
307
+ return mapboxZoomLevel(this.field.props.zoomStep || 1);
308
+ }
309
+ ngOnInit() {
310
+ this._formControlObs.next(this.formControl);
311
+ this._center.next(this.center);
312
+ this.dbxMapboxMapStore.setZoom(this.zoom$);
313
+ // Set center only if showMap is false.
314
+ if (this.showMap) {
315
+ this.dbxMapboxMapStore.setCenter(this.center$);
316
+ }
317
+ if (this.props.readonly) {
318
+ this.formControl.disable();
319
+ if (this.showMap) {
320
+ this.dbxMapboxMapStore.setZoomDisabled();
321
+ }
322
+ }
323
+ this._sub.subscription = this.dbxMapboxMapStore.zoom$.subscribe((zoom) => {
324
+ if (!this.isReadonlyOrDisabled) {
325
+ this.ngZone.run(() => this.setValue(zoom));
326
+ }
327
+ });
328
+ }
329
+ ngOnDestroy() {
330
+ super.ngOnDestroy();
331
+ this._formControlObs.complete();
332
+ this._center.complete();
333
+ this._sub.destroy();
334
+ }
335
+ setValue(zoom) {
336
+ this.formControl.setValue(zoom);
337
+ }
338
+ }
339
+ DbxFormMapboxZoomFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxZoomFieldComponent, deps: [{ token: i1.CompactContextStore, optional: true }, { token: i2$1.DbxMapboxService }, { token: i2$1.DbxMapboxMapStore }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
340
+ DbxFormMapboxZoomFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxFormMapboxZoomFieldComponent, selector: "ng-component", providers: [provideMapboxStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
341
+ <div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
342
+ <div *ngIf="showMap" class="dbx-mapbox-input-field-map">
343
+ <mgl-map dbxMapboxMap></mgl-map>
344
+ </div>
345
+ <div class="dbx-mapbox-input-field-input">
346
+ <mat-form-field class="dbx-mapbox-input-field-input-field">
347
+ <mat-label>Zoom Level</mat-label>
348
+ <input type="number" matInput [min]="minZoom" [max]="maxZoom" [step]="zoomStep" [placeholder]="placeholder" [formControl]="formControl" />
349
+ </mat-form-field>
350
+ </div>
351
+ </div>
352
+ `, isInline: true, styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DbxMapboxMapDirective, selector: "[dbxMapboxMap]" }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MapComponent, selector: "mgl-map", inputs: ["accessToken", "collectResourceTiming", "crossSourceCollisions", "customMapboxApiUrl", "fadeDuration", "hash", "refreshExpiredTiles", "failIfMajorPerformanceCaveat", "bearingSnap", "interactive", "pitchWithRotate", "clickTolerance", "attributionControl", "logoPosition", "maxTileCacheSize", "localIdeographFontFamily", "preserveDrawingBuffer", "trackResize", "transformRequest", "bounds", "antialias", "locale", "minZoom", "maxZoom", "minPitch", "maxPitch", "scrollZoom", "dragRotate", "touchPitch", "touchZoomRotate", "doubleClickZoom", "keyboard", "dragPan", "boxZoom", "style", "center", "maxBounds", "zoom", "bearing", "pitch", "fitBoundsOptions", "renderWorldCopies", "projection", "movingMethod", "movingOptions", "fitBounds", "fitScreenCoordinates", "centerWithPanTo", "panToOptions", "cursorStyle"], outputs: ["mapResize", "mapRemove", "mapMouseDown", "mapMouseUp", "mapMouseMove", "mapClick", "mapDblClick", "mapMouseOver", "mapMouseOut", "mapContextMenu", "mapTouchStart", "mapTouchEnd", "mapTouchMove", "mapTouchCancel", "mapWheel", "moveStart", "move", "moveEnd", "mapDragStart", "mapDrag", "mapDragEnd", "zoomStart", "zoomEvt", "zoomEnd", "rotateStart", "rotate", "rotateEnd", "pitchStart", "pitchEvt", "pitchEnd", "boxZoomStart", "boxZoomEnd", "boxZoomCancel", "webGlContextLost", "webGlContextRestored", "mapLoad", "idle", "render", "mapError", "data", "styleData", "sourceData", "dataLoading", "styleDataLoading", "sourceDataLoading", "styleImageMissing", "resize", "remove", "mouseDown", "mouseUp", "mouseMove", "click", "dblClick", "mouseOver", "mouseOut", "contextMenu", "touchStart", "touchEnd", "touchMove", "touchCancel", "wheel", "dragStart", "drag", "dragEnd", "load", "error"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxZoomFieldComponent, decorators: [{
354
+ type: Component,
355
+ args: [{ template: `
356
+ <div class="dbx-mapbox-input-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
357
+ <div *ngIf="showMap" class="dbx-mapbox-input-field-map">
358
+ <mgl-map dbxMapboxMap></mgl-map>
359
+ </div>
360
+ <div class="dbx-mapbox-input-field-input">
361
+ <mat-form-field class="dbx-mapbox-input-field-input-field">
362
+ <mat-label>Zoom Level</mat-label>
363
+ <input type="number" matInput [min]="minZoom" [max]="maxZoom" [step]="zoomStep" [placeholder]="placeholder" [formControl]="formControl" />
364
+ </mat-form-field>
365
+ </div>
366
+ </div>
367
+ `, providers: [provideMapboxStoreIfParentIsUnavailable()], styles: [".dbx-mapbox-input-field .dbx-mapbox-input-field-map{height:220px;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-map mgl-map{height:100%;width:100%}.dbx-mapbox-input-field .dbx-mapbox-input-field-input{display:flex;align-items:center}.dbx-mapbox-input-field .dbx-mapbox-input-field-input .dbx-mapbox-input-field-input-field{width:calc(100% - 40px)}.dbx-mapbox-input-field-compact .dbx-latlng-field-input{min-height:120px;height:300px;max-height:calc(var(--vh100) * .5)}\n"] }]
368
+ }], ctorParameters: function () { return [{ type: i1.CompactContextStore, decorators: [{
369
+ type: Optional
370
+ }] }, { type: i2$1.DbxMapboxService }, { type: i2$1.DbxMapboxMapStore }, { type: i0.NgZone }]; } });
371
+
372
+ class DbxFormMapboxZoomModule {
373
+ }
374
+ DbxFormMapboxZoomModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxZoomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
375
+ DbxFormMapboxZoomModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxZoomModule, declarations: [DbxFormMapboxZoomFieldComponent], imports: [CommonModule,
376
+ MatIconModule,
377
+ MatButtonModule,
378
+ DbxTextModule,
379
+ DbxMapboxModule,
380
+ FormsModule,
381
+ ReactiveFormsModule,
382
+ MatInputModule, i1$1.FormlyModule, NgxMapboxGLModule] });
383
+ DbxFormMapboxZoomModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxZoomModule, imports: [CommonModule,
384
+ MatIconModule,
385
+ MatButtonModule,
386
+ DbxTextModule,
387
+ DbxMapboxModule,
388
+ FormsModule,
389
+ ReactiveFormsModule,
390
+ MatInputModule,
391
+ FormlyModule.forChild({
392
+ types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]
393
+ }),
394
+ NgxMapboxGLModule] });
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxZoomModule, decorators: [{
396
+ type: NgModule,
397
+ args: [{
398
+ imports: [
399
+ CommonModule,
400
+ MatIconModule,
401
+ MatButtonModule,
402
+ DbxTextModule,
403
+ DbxMapboxModule,
404
+ FormsModule,
405
+ ReactiveFormsModule,
406
+ MatInputModule,
407
+ FormlyModule.forChild({
408
+ types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]
409
+ }),
410
+ NgxMapboxGLModule
411
+ ],
412
+ declarations: [DbxFormMapboxZoomFieldComponent]
413
+ }]
414
+ }] });
415
+
207
416
  class DbxFormMapboxModule {
208
417
  }
209
418
  DbxFormMapboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
210
- DbxFormMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxModule, exports: [DbxFormMapboxLatLngModule] });
211
- DbxFormMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxModule, imports: [DbxFormMapboxLatLngModule] });
419
+ DbxFormMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxModule, exports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule] });
420
+ DbxFormMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxModule, imports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule] });
212
421
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormMapboxModule, decorators: [{
213
422
  type: NgModule,
214
423
  args: [{
215
- exports: [DbxFormMapboxLatLngModule]
424
+ exports: [DbxFormMapboxLatLngModule, DbxFormMapboxZoomModule]
216
425
  }]
217
426
  }] });
218
427
 
@@ -220,5 +429,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
220
429
  * Generated bundle index. Do not edit.
221
430
  */
222
431
 
223
- export { DbxFormMapboxLatLngFieldComponent, DbxFormMapboxLatLngModule, DbxFormMapboxModule, mapboxLatLngField };
432
+ export { DbxFormMapboxLatLngFieldComponent, DbxFormMapboxLatLngModule, DbxFormMapboxModule, DbxFormMapboxZoomFieldComponent, DbxFormMapboxZoomModule, mapboxLatLngField, mapboxZoomField };
224
433
  //# sourceMappingURL=dereekb-dbx-form-mapbox.mjs.map
@@ -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.component.ts","../../../../packages/dbx-form/mapbox/src/lib/field/latlng/latlng.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, DescriptionFieldConfig, FieldConfig, formlyField, LabeledFieldConfig, propsForFieldConfig, styleWrapper, validatorsForFieldConfig } from '@dereekb/dbx-form';\nimport { LAT_LNG_PATTERN } from '@dereekb/util';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport interface MapboxLatLngFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig> {}\n\nexport function mapboxLatLngField(config: MapboxLatLngFieldConfig = {}): FormlyFieldConfig {\n const { key = 'latLng' } = config;\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-latlng-picker',\n ...propsForFieldConfig(config, {\n label: config.label ?? 'Location Picker',\n placeholder: DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER,\n pattern: LAT_LNG_PATTERN,\n autocomplete: false\n })\n }),\n ...validatorsForFieldConfig({\n messages: {\n pattern: DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE\n }\n })\n };\n\n return styleWrapper(fieldConfig, {\n classGetter: 'dbx-mat-form-field-disable-underline'\n });\n}\n","import { AbstractControl, FormGroup } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { Component, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { first, BehaviorSubject, filter, shareReplay, startWith, switchMap, map, Observable } from 'rxjs';\nimport { filterMaybe, SubscriptionObject } from '@dereekb/rxjs';\nimport { Maybe, LatLngPoint, LatLngPointFunctionConfig, latLngPoint, LatLngStringFunction, latLngStringFunction } from '@dereekb/util';\nimport { GeolocationService } from '@ng-web-apis/geolocation';\nimport { Marker } from 'mapbox-gl';\nimport { DbxMapboxMapStore } from '@dereekb/dbx-web/mapbox';\n\nexport interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {\n zoom?: number;\n latLngConfig?: LatLngPointFunctionConfig;\n}\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-latlng-field\" [ngClass]=\"(compactClass$ | async) ?? ''\" [formGroup]=\"formGroup\">\n <div class=\"dbx-mapbox-latlng-field-map\">\n <mgl-map dbxMapboxMap>\n <mgl-marker [lngLat]=\"(latLng$ | async) || [0, 0]\" [draggable]=\"!isReadonlyOrDisabled\" (markerDragEnd)=\"onDragEnd($event)\"></mgl-marker>\n </mgl-map>\n </div>\n <div class=\"dbx-mapbox-latlng-field-input\">\n <button mat-icon-button (click)=\"useCurrentLocation()\" [disabled]=\"isReadonlyOrDisabled\">\n <mat-icon>my_location</mat-icon>\n </button>\n <mat-form-field class=\"dbx-mapbox-latlng-field-input-field\">\n <mat-label>Coordinates</mat-label>\n <input type=\"text\" matInput [placeholder]=\"placeholder\" [formControl]=\"formControl\" />\n </mat-form-field>\n </div>\n </div>\n `,\n providers: [DbxMapboxMapStore],\n styleUrls: ['./latlng.field.component.scss']\n})\nexport class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n private _latLngStringFunction!: LatLngStringFunction;\n\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-texteditor-field-compact'\n });\n\n private _sub = new SubscriptionObject();\n private _zoom = new BehaviorSubject<number>(12);\n\n private _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) => latLngPoint(x)),\n filter((x) => x.lat !== 0 && x.lng !== 0),\n shareReplay(1)\n );\n\n readonly center$ = this.latLng$;\n readonly zoom$ = this._zoom.asObservable();\n\n constructor(@Optional() readonly compact: CompactContextStore, private readonly geolocation$: GeolocationService, readonly dbxMapboxMapStore: DbxMapboxMapStore) {\n super();\n }\n\n get zoom(): number {\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 ngOnInit(): void {\n this._latLngStringFunction = latLngStringFunction(this.field.props.latLngConfig);\n this._formControlObs.next(this.formControl);\n this._zoom.next(this.zoom);\n\n this.dbxMapboxMapStore.setCenter(this.center$);\n this.dbxMapboxMapStore.setZoom(this.zoom$);\n\n if (this.props.readonly) {\n this.formControl.disable();\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._formControlObs.complete();\n this._zoom.complete();\n this._sub.destroy();\n }\n\n useCurrentLocation() {\n this._sub.subscription = this.geolocation$.pipe(first()).subscribe((position) => {\n if (position) {\n const { latitude: lat, longitude: lng } = position.coords;\n this.setValue({ lat, lng });\n }\n });\n }\n\n onDragEnd(marker: Marker) {\n this.setValue(marker.getLngLat());\n }\n\n setValue(latLng?: Maybe<LatLngPoint>) {\n this.formControl.setValue(latLng ? this._latLngStringFunction(latLng) : latLng);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DbxFormMapboxLatLngFieldComponent } from './latlng.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { DbxTextModule } from '@dereekb/dbx-web';\nimport { NgxMapboxGLModule } from 'ngx-mapbox-gl';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxMapboxModule } from '@dereekb/dbx-web/mapbox';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n DbxTextModule,\n DbxMapboxModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-latlng-picker', component: DbxFormMapboxLatLngFieldComponent, wrappers: ['style', 'form-field'] }]\n }),\n NgxMapboxGLModule\n ],\n declarations: [DbxFormMapboxLatLngFieldComponent]\n})\nexport class DbxFormMapboxLatLngModule {}\n","import { NgModule } from '@angular/core';\nimport { DbxFormMapboxLatLngModule } from './field/latlng/latlng.module';\n\n@NgModule({\n exports: [DbxFormMapboxLatLngModule]\n})\nexport class DbxFormMapboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMgB,SAAA,iBAAiB,CAAC,MAAA,GAAkC,EAAE,EAAA;AACpE,IAAA,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,GAAG,MAAM,CAAC;AAClC,IAAA,MAAM,WAAW,GAAsB;AACrC,QAAA,GAAG,WAAW,CAAC;YACb,GAAG;AACH,YAAA,IAAI,EAAE,sBAAsB;YAC5B,GAAG,mBAAmB,CAAC,MAAM,EAAE;AAC7B,gBAAA,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,iBAAiB;AACxC,gBAAA,WAAW,EAAE,sCAAsC;AACnD,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,YAAY,EAAE,KAAK;aACpB,CAAC;SACH,CAAC;AACF,QAAA,GAAG,wBAAwB,CAAC;AAC1B,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,0CAA0C;AACpD,aAAA;SACF,CAAC;KACH,CAAC;IAEF,OAAO,YAAY,CAAC,WAAW,EAAE;AAC/B,QAAA,WAAW,EAAE,sCAAsC;AACpD,KAAA,CAAC,CAAC;AACL;;ACUM,MAAO,iCAA6H,SAAQ,SAA6B,CAAA;AA4B7K,IAAA,WAAA,CAAiC,OAA4B,EAAm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,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAFpB,yBAAyB,CAAA,EAAA,CAAA,CAAA;AAExB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAFpB,yBAAyB,CAAA,EAAA,CAAA,CAAA;2FAExB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACrC,iBAAA,CAAA;;;ACLD;;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.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, DescriptionFieldConfig, FieldConfig, formlyField, LabeledFieldConfig, propsForFieldConfig, styleWrapper, validatorsForFieldConfig } from '@dereekb/dbx-form';\nimport { LAT_LNG_PATTERN } from '@dereekb/util';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { DbxFormMapboxLatLngComponentFieldProps } from './latlng.field.component';\n\nexport interface MapboxLatLngFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxLatLngComponentFieldProps, 'showMap' | 'zoom' | 'latLngConfig' | 'recenterTime'> {}\n\nexport function mapboxLatLngField(config: MapboxLatLngFieldConfig = {}): FormlyFieldConfig {\n const { key = 'latLng', latLngConfig, showMap, zoom, recenterTime } = config;\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-latlng-picker',\n ...propsForFieldConfig(config, {\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 })\n }),\n ...validatorsForFieldConfig({\n messages: {\n pattern: DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE\n }\n })\n };\n\n return styleWrapper(fieldConfig, {\n classGetter: 'dbx-mat-form-field-disable-underline'\n });\n}\n","import { AbstractControl, FormGroup } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { Component, NgZone, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { skip, first, BehaviorSubject, filter, shareReplay, startWith, switchMap, map, Observable, throttleTime } from 'rxjs';\nimport { filterMaybe, SubscriptionObject } from '@dereekb/rxjs';\nimport { Maybe, LatLngPoint, LatLngPointFunctionConfig, latLngPoint, LatLngStringFunction, latLngStringFunction, Milliseconds } from '@dereekb/util';\nimport { GeolocationService } from '@ng-web-apis/geolocation';\nimport { Marker } from 'mapbox-gl';\nimport { DbxMapboxMapStore, MapboxEaseTo, MapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable } from '@dereekb/dbx-web/mapbox';\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 showMap?: boolean;\n /**\n * (Optional) Zoom to start the map at. Ignored if the showMap is false.\n */\n zoom?: MapboxZoomLevel;\n /**\n * Time until recentering on the marker. If the time is 0 then the recentering is disabled.\n */\n recenterTime?: Milliseconds;\n latLngConfig?: LatLngPointFunctionConfig;\n}\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-input-field\" [ngClass]=\"(compactClass$ | async) ?? ''\" [formGroup]=\"formGroup\">\n <div *ngIf=\"showMap\" class=\"dbx-mapbox-input-field-map\">\n <mgl-map dbxMapboxMap>\n <mgl-marker [lngLat]=\"(latLng$ | async) || [0, 0]\" [draggable]=\"!isReadonlyOrDisabled\" (markerDragEnd)=\"onMarkerDragEnd($event)\"></mgl-marker>\n </mgl-map>\n </div>\n <div class=\"dbx-mapbox-input-field-input\">\n <button mat-icon-button (click)=\"useCurrentLocation()\" [disabled]=\"isReadonlyOrDisabled\">\n <mat-icon>my_location</mat-icon>\n </button>\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 </mat-form-field>\n </div>\n </div>\n `,\n providers: [provideMapboxStoreIfParentIsUnavailable()],\n styleUrls: ['../mapbox.field.component.scss']\n})\nexport class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n private _latLngStringFunction!: LatLngStringFunction;\n\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-mapbox-input-field-compact'\n });\n\n private _sub = new SubscriptionObject();\n private _geoSub = new SubscriptionObject();\n private _centerSub = new SubscriptionObject();\n private _zoom = new BehaviorSubject<MapboxZoomLevel>(12);\n\n private _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) => latLngPoint(x)),\n filter((x) => x.lat !== 0 && x.lng !== 0),\n shareReplay(1)\n );\n\n readonly center$ = this.latLng$;\n readonly zoom$ = this._zoom.asObservable();\n\n constructor(@Optional() readonly compact: CompactContextStore, private readonly geolocation$: GeolocationService, readonly dbxMapboxMapStore: DbxMapboxMapStore, readonly ngZone: NgZone) {\n super();\n }\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 recenterTime(): Milliseconds {\n return this.field.props.recenterTime || 10 * 1000;\n }\n\n ngOnInit(): void {\n this._latLngStringFunction = latLngStringFunction(this.field.props.latLngConfig);\n this._formControlObs.next(this.formControl);\n this._zoom.next(this.zoom);\n\n this.dbxMapboxMapStore.setCenter(this.center$);\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._centerSub.subscription = this.dbxMapboxMapStore.center$.pipe(skip(1), throttleTime(this.recenterTime, undefined, { leading: false, trailing: true })).subscribe(() => {\n this.dbxMapboxMapStore.easeTo(\n this.center$.pipe(\n first(),\n map((x) => ({ center: x } as MapboxEaseTo))\n )\n );\n });\n }\n } else {\n // use the center of the map to set locations\n this._sub.subscription = this.dbxMapboxMapStore.center$.subscribe((center) => {\n if (!this.isReadonlyOrDisabled) {\n this.ngZone.run(() => this.setValue(center));\n }\n });\n }\n\n if (this.props.readonly) {\n this.formControl.disable();\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._sub.destroy();\n this._geoSub.destroy();\n this._zoom.complete();\n this._formControlObs.complete();\n this._centerSub.destroy();\n }\n\n useCurrentLocation() {\n this._geoSub.subscription = this.geolocation$.pipe(first()).subscribe((position) => {\n if (position) {\n const { latitude: lat, longitude: lng } = position.coords;\n this.setValue({ lat, lng });\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 }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DbxFormMapboxLatLngFieldComponent } from './latlng.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { DbxTextModule } from '@dereekb/dbx-web';\nimport { NgxMapboxGLModule } from 'ngx-mapbox-gl';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxMapboxModule } from '@dereekb/dbx-web/mapbox';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n DbxTextModule,\n DbxMapboxModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-latlng-picker', component: DbxFormMapboxLatLngFieldComponent, wrappers: ['style', 'form-field'] }]\n }),\n NgxMapboxGLModule\n ],\n declarations: [DbxFormMapboxLatLngFieldComponent]\n})\nexport class DbxFormMapboxLatLngModule {}\n","import { DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DescriptionFieldConfig, FieldConfig, formlyField, LabeledFieldConfig, propsForFieldConfig, styleWrapper, validatorsForFieldConfig } from '@dereekb/dbx-form';\nimport { MAPBOX_MAX_ZOOM_LEVEL } from '@dereekb/dbx-web/mapbox';\nimport { LAT_LNG_PATTERN } from '@dereekb/util';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { 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 const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'mapbox-zoom-picker',\n ...propsForFieldConfig(config, {\n label: config.label ?? 'Zoom',\n autocomplete: false,\n showMap,\n center,\n minZoom,\n maxZoom,\n zoomStep\n })\n })\n };\n\n return styleWrapper(fieldConfig, {\n classGetter: 'dbx-mat-form-field-disable-underline'\n });\n}\n","import { AbstractControl, FormGroup } from '@angular/forms';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { Component, NgZone, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material';\nimport { first, BehaviorSubject, filter, shareReplay, startWith, switchMap, map, Observable } from 'rxjs';\nimport { filterMaybe, SubscriptionObject } from '@dereekb/rxjs';\nimport { ZoomLevel, Maybe, LatLngPoint, LatLngPointFunctionConfig, latLngPoint, LatLngStringFunction, latLngStringFunction } from '@dereekb/util';\nimport { GeolocationService } from '@ng-web-apis/geolocation';\nimport { Marker } from 'mapbox-gl';\nimport { DbxMapboxService, DbxMapboxMapStore, MapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable, mapboxZoomLevel, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL } from '@dereekb/dbx-web/mapbox';\n\nexport interface DbxFormMapboxZoomComponentFieldProps extends FormlyFieldProps {\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 showMap?: boolean;\n /**\n * Default center\n */\n center?: LatLngPoint;\n /**\n * Min zoom level allowed\n */\n minZoom?: MapboxZoomLevel;\n /**\n * Max zoom level allowed.\n */\n maxZoom?: MapboxZoomLevel;\n /**\n * Step size when using arrow keys.\n */\n zoomStep?: number;\n}\n\n@Component({\n template: `\n <div class=\"dbx-mapbox-input-field\" [ngClass]=\"(compactClass$ | async) ?? ''\" [formGroup]=\"formGroup\">\n <div *ngIf=\"showMap\" class=\"dbx-mapbox-input-field-map\">\n <mgl-map dbxMapboxMap></mgl-map>\n </div>\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})\nexport class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomComponentFieldProps = DbxFormMapboxZoomComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n readonly compactClass$ = mapCompactModeObs(this.compact?.mode$, {\n compact: 'dbx-mapbox-input-field-compact'\n });\n\n private _sub = new SubscriptionObject();\n private _center = new BehaviorSubject<Maybe<LatLngPoint>>(undefined);\n\n private _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 constructor(@Optional() readonly compact: CompactContextStore, readonly dbxMapboxService: DbxMapboxService, readonly dbxMapboxMapStore: DbxMapboxMapStore, readonly ngZone: NgZone) {\n super();\n }\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 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 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 }\n\n this._sub.subscription = this.dbxMapboxMapStore.zoom$.subscribe((zoom) => {\n if (!this.isReadonlyOrDisabled) {\n this.ngZone.run(() => 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\n setValue(zoom?: Maybe<ZoomLevel>) {\n this.formControl.setValue(zoom);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DbxFormMapboxZoomFieldComponent } from './zoom.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { DbxTextModule } from '@dereekb/dbx-web';\nimport { NgxMapboxGLModule } from 'ngx-mapbox-gl';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxMapboxModule } from '@dereekb/dbx-web/mapbox';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n DbxTextModule,\n DbxMapboxModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n FormlyModule.forChild({\n types: [{ name: 'mapbox-zoom-picker', component: DbxFormMapboxZoomFieldComponent, wrappers: ['style', 'form-field'] }]\n }),\n NgxMapboxGLModule\n ],\n declarations: [DbxFormMapboxZoomFieldComponent]\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":["i3","i7","i2","i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOgB,SAAA,iBAAiB,CAAC,MAAA,GAAkC,EAAE,EAAA;AACpE,IAAA,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;AAC7E,IAAA,MAAM,WAAW,GAAsB;AACrC,QAAA,GAAG,WAAW,CAAC;YACb,GAAG;AACH,YAAA,IAAI,EAAE,sBAAsB;YAC5B,GAAG,mBAAmB,CAAC,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AA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,OAAA,EAAA,CAFpB,yBAAyB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;iHAEjD,mBAAmB,EAAA,OAAA,EAAA,CAFpB,yBAAyB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;2FAEjD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;AAC9D,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
@@ -1,2 +1,3 @@
1
1
  export * from './latlng';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtZm9ybS9tYXBib3gvc3JjL2xpYi9maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFVBQVUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGF0bG5nJztcbiJdfQ==
2
+ export * from './zoom';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtZm9ybS9tYXBib3gvc3JjL2xpYi9maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFVBQVUsQ0FBQztBQUN6QixjQUFjLFFBQVEsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGF0bG5nJztcbmV4cG9ydCAqIGZyb20gJy4vem9vbSc7XG4iXX0=