@dereekb/dbx-form 9.5.3 → 9.6.0
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.
- package/esm2020/mapbox/lib/field/index.mjs +2 -1
- package/esm2020/mapbox/lib/field/latlng/latlng.field.component.mjs +54 -26
- package/esm2020/mapbox/lib/field/latlng/latlng.field.mjs +8 -4
- package/esm2020/mapbox/lib/field/zoom/index.mjs +4 -0
- package/esm2020/mapbox/lib/field/zoom/zoom.field.component.mjs +126 -0
- package/esm2020/mapbox/lib/field/zoom/zoom.field.mjs +23 -0
- package/esm2020/mapbox/lib/field/zoom/zoom.module.mjs +57 -0
- package/esm2020/mapbox/lib/mapbox.module.mjs +5 -4
- package/fesm2015/dereekb-dbx-form-mapbox.mjs +243 -33
- package/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-mapbox.mjs +242 -33
- package/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/mapbox/esm2020/lib/field/index.mjs +2 -1
- package/mapbox/esm2020/lib/field/latlng/latlng.field.component.mjs +54 -26
- package/mapbox/esm2020/lib/field/latlng/latlng.field.mjs +8 -4
- package/mapbox/esm2020/lib/field/zoom/index.mjs +4 -0
- package/mapbox/esm2020/lib/field/zoom/zoom.field.component.mjs +126 -0
- package/mapbox/esm2020/lib/field/zoom/zoom.field.mjs +23 -0
- package/mapbox/esm2020/lib/field/zoom/zoom.module.mjs +57 -0
- package/mapbox/esm2020/lib/mapbox.module.mjs +5 -4
- package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs +243 -33
- package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/mapbox/fesm2020/dereekb-dbx-form-mapbox.mjs +242 -33
- package/mapbox/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/mapbox/lib/field/index.d.ts +1 -0
- package/mapbox/lib/field/latlng/latlng.field.component.d.ts +28 -8
- package/mapbox/lib/field/latlng/latlng.field.d.ts +2 -1
- package/mapbox/lib/field/zoom/index.d.ts +3 -0
- package/mapbox/lib/field/zoom/zoom.field.component.d.ts +63 -0
- package/mapbox/lib/field/zoom/zoom.field.d.ts +6 -0
- package/mapbox/lib/field/zoom/zoom.module.d.ts +16 -0
- package/mapbox/lib/mapbox.module.d.ts +2 -1
- package/mapbox/package.json +4 -4
- package/package.json +3 -3
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
2
2
|
import { CompactContextStore } from '@dereekb/dbx-web';
|
|
3
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
3
|
+
import { NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
4
4
|
import { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
5
5
|
import { FieldType } from '@ngx-formly/material';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { Maybe, LatLngPoint, LatLngPointFunctionConfig } from '@dereekb/util';
|
|
7
|
+
import { Maybe, LatLngPoint, LatLngPointFunctionConfig, Milliseconds } from '@dereekb/util';
|
|
8
8
|
import { GeolocationService } from '@ng-web-apis/geolocation';
|
|
9
9
|
import { Marker } from 'mapbox-gl';
|
|
10
|
-
import { DbxMapboxMapStore } from '@dereekb/dbx-web/mapbox';
|
|
10
|
+
import { DbxMapboxMapStore, MapboxZoomLevel } from '@dereekb/dbx-web/mapbox';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
export interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* (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.
|
|
15
|
+
*
|
|
16
|
+
* Defaults to true.
|
|
17
|
+
*
|
|
18
|
+
* Cases where this would be set false is if another map is being used.
|
|
19
|
+
*/
|
|
20
|
+
showMap?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* (Optional) Zoom to start the map at. Ignored if the showMap is false.
|
|
23
|
+
*/
|
|
24
|
+
zoom?: MapboxZoomLevel;
|
|
25
|
+
/**
|
|
26
|
+
* Time until recentering on the marker. If the time is 0 then the recentering is disabled.
|
|
27
|
+
*/
|
|
28
|
+
recenterTime?: Milliseconds;
|
|
14
29
|
latLngConfig?: LatLngPointFunctionConfig;
|
|
15
30
|
}
|
|
16
31
|
export declare class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
|
|
17
32
|
readonly compact: CompactContextStore;
|
|
18
33
|
private readonly geolocation$;
|
|
19
34
|
readonly dbxMapboxMapStore: DbxMapboxMapStore;
|
|
35
|
+
readonly ngZone: NgZone;
|
|
20
36
|
private _latLngStringFunction;
|
|
21
37
|
readonly compactClass$: Observable<Maybe<string>>;
|
|
22
38
|
private _sub;
|
|
39
|
+
private _geoSub;
|
|
40
|
+
private _centerSub;
|
|
23
41
|
private _zoom;
|
|
24
42
|
private _formControlObs;
|
|
25
43
|
readonly formControl$: Observable<AbstractControl<any, any>>;
|
|
@@ -27,18 +45,20 @@ export declare class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLa
|
|
|
27
45
|
readonly latLng$: Observable<LatLngPoint>;
|
|
28
46
|
readonly center$: Observable<LatLngPoint>;
|
|
29
47
|
readonly zoom$: Observable<number>;
|
|
30
|
-
constructor(compact: CompactContextStore, geolocation$: GeolocationService, dbxMapboxMapStore: DbxMapboxMapStore);
|
|
31
|
-
get zoom():
|
|
48
|
+
constructor(compact: CompactContextStore, geolocation$: GeolocationService, dbxMapboxMapStore: DbxMapboxMapStore, ngZone: NgZone);
|
|
49
|
+
get zoom(): MapboxZoomLevel;
|
|
32
50
|
get formGroupName(): string;
|
|
33
51
|
get formGroup(): FormGroup;
|
|
34
52
|
get label(): Maybe<string>;
|
|
35
53
|
get description(): Maybe<string>;
|
|
36
54
|
get isReadonlyOrDisabled(): boolean;
|
|
55
|
+
get showMap(): boolean;
|
|
56
|
+
get recenterTime(): Milliseconds;
|
|
37
57
|
ngOnInit(): void;
|
|
38
58
|
ngOnDestroy(): void;
|
|
39
59
|
useCurrentLocation(): void;
|
|
40
|
-
|
|
60
|
+
onMarkerDragEnd(marker: Marker): void;
|
|
41
61
|
setValue(latLng?: Maybe<LatLngPoint>): void;
|
|
42
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngFieldComponent<any>, [{ optional: true; }, null, null]>;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngFieldComponent<any>, [{ optional: true; }, null, null, null]>;
|
|
43
63
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxLatLngFieldComponent<any>, "ng-component", never, {}, {}, never, never, false>;
|
|
44
64
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DescriptionFieldConfig, FieldConfig, LabeledFieldConfig } from '@dereekb/dbx-form';
|
|
2
2
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
|
-
|
|
3
|
+
import { DbxFormMapboxLatLngComponentFieldProps } from './latlng.field.component';
|
|
4
|
+
export interface MapboxLatLngFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxLatLngComponentFieldProps, 'showMap' | 'zoom' | 'latLngConfig' | 'recenterTime'> {
|
|
4
5
|
}
|
|
5
6
|
export declare function mapboxLatLngField(config?: MapboxLatLngFieldConfig): FormlyFieldConfig;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
2
|
+
import { CompactContextStore } from '@dereekb/dbx-web';
|
|
3
|
+
import { NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
4
|
+
import { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
5
|
+
import { FieldType } from '@ngx-formly/material';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { ZoomLevel, Maybe, LatLngPoint } from '@dereekb/util';
|
|
8
|
+
import { DbxMapboxService, DbxMapboxMapStore, MapboxZoomLevel } from '@dereekb/dbx-web/mapbox';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export interface DbxFormMapboxZoomComponentFieldProps extends FormlyFieldProps {
|
|
11
|
+
/**
|
|
12
|
+
* (Optional) Whether or not the show the map. Cases where this would be set false is if another map is being used.
|
|
13
|
+
*
|
|
14
|
+
* Defaults to true.
|
|
15
|
+
*/
|
|
16
|
+
showMap?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Default center
|
|
19
|
+
*/
|
|
20
|
+
center?: LatLngPoint;
|
|
21
|
+
/**
|
|
22
|
+
* Min zoom level allowed
|
|
23
|
+
*/
|
|
24
|
+
minZoom?: MapboxZoomLevel;
|
|
25
|
+
/**
|
|
26
|
+
* Max zoom level allowed.
|
|
27
|
+
*/
|
|
28
|
+
maxZoom?: MapboxZoomLevel;
|
|
29
|
+
/**
|
|
30
|
+
* Step size when using arrow keys.
|
|
31
|
+
*/
|
|
32
|
+
zoomStep?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomComponentFieldProps = DbxFormMapboxZoomComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
|
|
35
|
+
readonly compact: CompactContextStore;
|
|
36
|
+
readonly dbxMapboxService: DbxMapboxService;
|
|
37
|
+
readonly dbxMapboxMapStore: DbxMapboxMapStore;
|
|
38
|
+
readonly ngZone: NgZone;
|
|
39
|
+
readonly compactClass$: Observable<Maybe<string>>;
|
|
40
|
+
private _sub;
|
|
41
|
+
private _center;
|
|
42
|
+
private _formControlObs;
|
|
43
|
+
readonly formControl$: Observable<AbstractControl<any, any>>;
|
|
44
|
+
readonly value$: Observable<any>;
|
|
45
|
+
readonly zoom$: Observable<MapboxZoomLevel>;
|
|
46
|
+
readonly center$: Observable<LatLngPoint>;
|
|
47
|
+
constructor(compact: CompactContextStore, dbxMapboxService: DbxMapboxService, dbxMapboxMapStore: DbxMapboxMapStore, ngZone: NgZone);
|
|
48
|
+
get center(): LatLngPoint;
|
|
49
|
+
get formGroupName(): string;
|
|
50
|
+
get formGroup(): FormGroup;
|
|
51
|
+
get label(): Maybe<string>;
|
|
52
|
+
get description(): Maybe<string>;
|
|
53
|
+
get isReadonlyOrDisabled(): boolean;
|
|
54
|
+
get showMap(): boolean;
|
|
55
|
+
get minZoom(): MapboxZoomLevel;
|
|
56
|
+
get maxZoom(): MapboxZoomLevel;
|
|
57
|
+
get zoomStep(): number;
|
|
58
|
+
ngOnInit(): void;
|
|
59
|
+
ngOnDestroy(): void;
|
|
60
|
+
setValue(zoom?: Maybe<ZoomLevel>): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxZoomFieldComponent<any>, [{ optional: true; }, null, null, null]>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxZoomFieldComponent<any>, "ng-component", never, {}, {}, never, never, false>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DescriptionFieldConfig, FieldConfig, LabeledFieldConfig } from '@dereekb/dbx-form';
|
|
2
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
|
+
import { DbxFormMapboxZoomComponentFieldProps } from './zoom.field.component';
|
|
4
|
+
export interface MapboxZoomFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxZoomComponentFieldProps, 'showMap' | 'center' | 'minZoom' | 'maxZoom' | 'zoomStep'> {
|
|
5
|
+
}
|
|
6
|
+
export declare function mapboxZoomField(config?: MapboxZoomFieldConfig): FormlyFieldConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./zoom.field.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/material/icon";
|
|
5
|
+
import * as i4 from "@angular/material/button";
|
|
6
|
+
import * as i5 from "@dereekb/dbx-web";
|
|
7
|
+
import * as i6 from "@dereekb/dbx-web/mapbox";
|
|
8
|
+
import * as i7 from "@angular/forms";
|
|
9
|
+
import * as i8 from "@angular/material/input";
|
|
10
|
+
import * as i9 from "@ngx-formly/core";
|
|
11
|
+
import * as i10 from "ngx-mapbox-gl";
|
|
12
|
+
export declare class DbxFormMapboxZoomModule {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxZoomModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxZoomModule, [typeof i1.DbxFormMapboxZoomFieldComponent], [typeof i2.CommonModule, typeof i3.MatIconModule, typeof i4.MatButtonModule, typeof i5.DbxTextModule, typeof i6.DbxMapboxModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.MatInputModule, typeof i9.FormlyModule, typeof i10.NgxMapboxGLModule], never>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxZoomModule>;
|
|
16
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./field/latlng/latlng.module";
|
|
3
|
+
import * as i2 from "./field/zoom/zoom.module";
|
|
3
4
|
export declare class DbxFormMapboxModule {
|
|
4
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxModule, never, never, [typeof i1.DbxFormMapboxLatLngModule]>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxModule, never, never, [typeof i1.DbxFormMapboxLatLngModule, typeof i2.DbxFormMapboxZoomModule]>;
|
|
6
7
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxModule>;
|
|
7
8
|
}
|
package/mapbox/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-form/mapbox",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^14.1.0",
|
|
6
6
|
"@angular/core": "^14.1.0",
|
|
7
7
|
"@angular/forms": "^14.0.0",
|
|
8
|
-
"@dereekb/dbx-web": "9.
|
|
8
|
+
"@dereekb/dbx-web": "9.6.0",
|
|
9
9
|
"@ngx-formly/core": "6.0.0-rc.2",
|
|
10
10
|
"@ngx-formly/material": "6.0.0-rc.2",
|
|
11
11
|
"@ng-web-apis/geolocation": "^2.0.0",
|
|
12
12
|
"mapbox-gl": "^2.9.2",
|
|
13
|
-
"@dereekb/dbx-web/mapbox": "9.
|
|
14
|
-
"@dereekb/dbx-form": "9.
|
|
13
|
+
"@dereekb/dbx-web/mapbox": "9.6.0",
|
|
14
|
+
"@dereekb/dbx-form": "9.6.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"tslib": "^2.3.0"
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-form",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^14.0.0",
|
|
6
6
|
"@angular/core": "^14.0.0",
|
|
7
7
|
"lodash.clonedeep": "^4.5.0",
|
|
8
|
-
"@dereekb/dbx-core": "9.
|
|
8
|
+
"@dereekb/dbx-core": "9.6.0",
|
|
9
9
|
"@angular/material": "^14.0.0",
|
|
10
|
-
"@dereekb/dbx-web": "9.
|
|
10
|
+
"@dereekb/dbx-web": "9.6.0",
|
|
11
11
|
"@angular/forms": "^14.0.0",
|
|
12
12
|
"@ngx-formly/core": "6.0.0-rc.2",
|
|
13
13
|
"@ngx-formly/material": "6.0.0-rc.2",
|