@dereekb/dbx-web 9.7.1 → 9.7.4
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/lib/layout/list/index.mjs +2 -1
- package/esm2020/lib/layout/list/list.grid.view.component.mjs +3 -3
- package/esm2020/lib/layout/list/list.track.mjs +9 -0
- package/esm2020/lib/layout/list/list.view.directive.mjs +1 -1
- package/esm2020/lib/layout/list/list.view.mjs +1 -1
- package/esm2020/lib/layout/list/list.view.value.component.mjs +5 -3
- package/esm2020/lib/layout/text/text.chips.component.mjs +6 -3
- package/esm2020/mapbox/lib/index.mjs +3 -1
- package/esm2020/mapbox/lib/mapbox.cdref.service.mjs +30 -0
- package/esm2020/mapbox/lib/mapbox.change.service.mjs +44 -0
- package/esm2020/mapbox/lib/mapbox.marker.component.mjs +21 -11
- package/esm2020/mapbox/lib/mapbox.marker.mjs +1 -1
- package/esm2020/mapbox/lib/mapbox.markers.component.mjs +7 -4
- package/esm2020/mapbox/lib/mapbox.mjs +1 -1
- package/esm2020/mapbox/lib/mapbox.rxjs.mjs +2 -2
- package/esm2020/mapbox/lib/mapbox.store.mjs +15 -6
- package/fesm2015/dereekb-dbx-web-mapbox.mjs +120 -30
- package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2015/dereekb-dbx-web.mjs +21 -7
- package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-web-mapbox.mjs +113 -28
- package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-web.mjs +21 -7
- package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
- package/lib/layout/list/index.d.ts +1 -0
- package/lib/layout/list/list.track.d.ts +6 -0
- package/lib/layout/list/list.view.d.ts +5 -1
- package/lib/layout/list/list.view.directive.d.ts +2 -1
- package/lib/layout/list/list.view.value.component.d.ts +2 -0
- package/lib/layout/text/text.chips.component.d.ts +1 -0
- package/mapbox/esm2020/lib/index.mjs +3 -1
- package/mapbox/esm2020/lib/mapbox.cdref.service.mjs +30 -0
- package/mapbox/esm2020/lib/mapbox.change.service.mjs +44 -0
- package/mapbox/esm2020/lib/mapbox.marker.component.mjs +21 -11
- package/mapbox/esm2020/lib/mapbox.marker.mjs +1 -1
- package/mapbox/esm2020/lib/mapbox.markers.component.mjs +7 -4
- package/mapbox/esm2020/lib/mapbox.mjs +1 -1
- package/mapbox/esm2020/lib/mapbox.rxjs.mjs +2 -2
- package/mapbox/esm2020/lib/mapbox.store.mjs +15 -6
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +120 -30
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +113 -28
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/lib/index.d.ts +2 -0
- package/mapbox/lib/mapbox.cdref.service.d.ts +15 -0
- package/mapbox/lib/mapbox.change.service.d.ts +21 -0
- package/mapbox/lib/mapbox.d.ts +2 -1
- package/mapbox/lib/mapbox.marker.component.d.ts +9 -5
- package/mapbox/lib/mapbox.marker.d.ts +3 -3
- package/mapbox/lib/mapbox.markers.component.d.ts +3 -2
- package/mapbox/lib/mapbox.store.d.ts +1 -0
- package/mapbox/package.json +3 -4
- package/package.json +3 -3
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Optional, Inject, Directive,
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
2
|
+
import { Injectable, Host, Optional, Inject, Directive, Component, ElementRef, ViewChild, Input, ChangeDetectionStrategy, SkipSelf, Injector, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@dereekb/dbx-core';
|
|
4
|
+
import { safeMarkForCheck, safeDetectChanges, AbstractSubscriptionDirective, DbxInjectionComponentModule } from '@dereekb/dbx-core';
|
|
5
|
+
import { switchMap as switchMap$1 } from 'rxjs/operators';
|
|
5
6
|
import { cleanup, filterMaybe, onTrueToFalse, SubscriptionObject, asObservable } from '@dereekb/rxjs';
|
|
6
|
-
import {
|
|
7
|
+
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, merge, throttleTime, BehaviorSubject, combineLatestWith } from 'rxjs';
|
|
8
|
+
import { latLngPointFunction, latLngBoundFunction, filterUndefinedValues, isSameLatLngPoint, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, isSameLatLngBound, diffLatLngBoundPoints, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, vectorsAreEqual, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject, getValueFromGetter, LAT_LONG_10M_PRECISION, roundNumberToStepFunction } from '@dereekb/util';
|
|
7
9
|
import { ComponentStore } from '@ngrx/component-store';
|
|
8
|
-
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, BehaviorSubject, throttleTime, combineLatestWith } from 'rxjs';
|
|
9
10
|
import * as MapboxGl from 'mapbox-gl';
|
|
10
11
|
import { bounds } from '@mapbox/geo-viewport';
|
|
12
|
+
import * as i2$1 from '@angular/common';
|
|
13
|
+
import { CommonModule } from '@angular/common';
|
|
11
14
|
import * as i1 from 'ngx-mapbox-gl';
|
|
12
15
|
import { NgxMapboxGLModule } from 'ngx-mapbox-gl';
|
|
13
|
-
import * as
|
|
16
|
+
import * as i4$1 from '@dereekb/dbx-web';
|
|
14
17
|
import { dbxColorBackground, disableRightClickInCdkBackdrop, DbxRouterAnchorModule } from '@dereekb/dbx-web';
|
|
15
18
|
import * as i3 from '@angular/material/sidenav';
|
|
16
19
|
import { MatDrawerContainer, MatSidenavModule } from '@angular/material/sidenav';
|
|
@@ -20,9 +23,34 @@ import * as i5 from '@angular/material/icon';
|
|
|
20
23
|
import { MatIconModule } from '@angular/material/icon';
|
|
21
24
|
import * as i6 from 'angular-resize-event';
|
|
22
25
|
import { AngularResizeEventModule } from 'angular-resize-event';
|
|
23
|
-
import * as i2 from '@
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
import * as i2$2 from '@angular/material/menu';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Provided in the parent component that allows children to import the parent's cdRef for use.
|
|
30
|
+
*
|
|
31
|
+
* @Deprecated consider using DbxMapboxChangeService instead.
|
|
32
|
+
*/
|
|
33
|
+
class DbxMapboxChangeDetectorRefService {
|
|
34
|
+
constructor(cdRef) {
|
|
35
|
+
this.cdRef = cdRef;
|
|
36
|
+
}
|
|
37
|
+
markForCheck() {
|
|
38
|
+
safeMarkForCheck(this.cdRef);
|
|
39
|
+
}
|
|
40
|
+
detectChanges() {
|
|
41
|
+
safeDetectChanges(this.cdRef);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
DbxMapboxChangeDetectorRefService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeDetectorRefService, deps: [{ token: i0.ChangeDetectorRef, host: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
DbxMapboxChangeDetectorRefService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeDetectorRefService, providedIn: null });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeDetectorRefService, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{
|
|
49
|
+
providedIn: null
|
|
50
|
+
}]
|
|
51
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
52
|
+
type: Host
|
|
53
|
+
}] }]; } });
|
|
26
54
|
|
|
27
55
|
class DbxMapboxConfig {
|
|
28
56
|
}
|
|
@@ -85,7 +113,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
85
113
|
retainContent: true
|
|
86
114
|
});
|
|
87
115
|
this.dbxMapboxService = dbxMapboxService;
|
|
88
|
-
this.safeLatLngPoint = latLngPointFunction();
|
|
116
|
+
this.safeLatLngPoint = latLngPointFunction({ wrap: true });
|
|
89
117
|
this.latLngPoint = latLngPointFunction({ wrap: false, validate: false });
|
|
90
118
|
this.latLngBound = latLngBoundFunction({ pointFunction: this.latLngPoint });
|
|
91
119
|
// MARK: Effects
|
|
@@ -168,6 +196,14 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
168
196
|
return this.mapInstance$.pipe(tap((map) => map.setZoom(zoom)));
|
|
169
197
|
}));
|
|
170
198
|
});
|
|
199
|
+
this.setZoomRange = this.effect((input) => {
|
|
200
|
+
return input.pipe(switchMap((zoomRange) => {
|
|
201
|
+
return this.mapInstance$.pipe(tap((map) => {
|
|
202
|
+
map.setMinZoom(zoomRange.min || null);
|
|
203
|
+
map.setMaxZoom(zoomRange.max || null);
|
|
204
|
+
}));
|
|
205
|
+
}));
|
|
206
|
+
});
|
|
171
207
|
this.setMinZoom = this.effect((input) => {
|
|
172
208
|
return input.pipe(switchMap((zoom) => {
|
|
173
209
|
return this.mapInstance$.pipe(tap((map) => map.setMinZoom(zoom)));
|
|
@@ -279,21 +315,21 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
279
315
|
return input.pipe(switchMap((x) => {
|
|
280
316
|
const inputCenter = x.center ?? x.to?.center;
|
|
281
317
|
const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
|
|
282
|
-
return this.mapInstance$.pipe(tap((map) => map.jumpTo({ ...x.to, center }, x.eventData)));
|
|
318
|
+
return this.mapInstance$.pipe(tap((map) => map.jumpTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
|
|
283
319
|
}));
|
|
284
320
|
});
|
|
285
321
|
this.easeTo = this.effect((input) => {
|
|
286
322
|
return input.pipe(switchMap((x) => {
|
|
287
323
|
const inputCenter = x.center ?? x.to?.center;
|
|
288
324
|
const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
|
|
289
|
-
return this.mapInstance$.pipe(tap((map) => map.easeTo({ ...x.to, center }, x.eventData)));
|
|
325
|
+
return this.mapInstance$.pipe(tap((map) => map.easeTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
|
|
290
326
|
}));
|
|
291
327
|
});
|
|
292
328
|
this.flyTo = this.effect((input) => {
|
|
293
329
|
return input.pipe(switchMap((x) => {
|
|
294
330
|
const inputCenter = x.center ?? x.to?.center;
|
|
295
331
|
const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
|
|
296
|
-
return this.mapInstance$.pipe(tap((map) => map.flyTo({ ...x.to, center }, x.eventData)));
|
|
332
|
+
return this.mapInstance$.pipe(tap((map) => map.flyTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
|
|
297
333
|
}));
|
|
298
334
|
});
|
|
299
335
|
this.resetPitchAndBearing = this.effect((input) => {
|
|
@@ -445,6 +481,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
445
481
|
}))));
|
|
446
482
|
}
|
|
447
483
|
calculateNextCenterOffsetWithScreenMarginChange(sizing) {
|
|
484
|
+
// TODO: Consider calculating this using the viewport() function from @mapbox/geo-viewport
|
|
448
485
|
return this.atNextIdle().pipe(switchMap(() => this.bound$.pipe(first(), map((bounds) => {
|
|
449
486
|
const diff = diffLatLngBoundPoints(bounds, true);
|
|
450
487
|
const center = latLngBoundCenterPoint(bounds);
|
|
@@ -472,6 +509,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
472
509
|
args: [DbxMapboxService]
|
|
473
510
|
}] }]; } });
|
|
474
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Provided in the parent component that allows children to emit events related to their lifecycles.
|
|
514
|
+
*/
|
|
515
|
+
class DbxMapboxChangeService {
|
|
516
|
+
constructor(dbxMapboxMapStore) {
|
|
517
|
+
this.dbxMapboxMapStore = dbxMapboxMapStore;
|
|
518
|
+
this._markerDestroyed = new Subject();
|
|
519
|
+
this._applyChanges = new Subject();
|
|
520
|
+
this.markerDestroyed$ = this._markerDestroyed;
|
|
521
|
+
this.applyChanges$ = merge(this._applyChanges, this.markerDestroyed$).pipe(throttleTime(100, undefined, { leading: false, trailing: true }));
|
|
522
|
+
this._applyChangesSub = new SubscriptionObject(this.dbxMapboxMapStore.mapService$
|
|
523
|
+
.pipe(switchMap$1((mapService) => this.applyChanges$.pipe(tap(() => {
|
|
524
|
+
mapService.applyChanges();
|
|
525
|
+
}))))
|
|
526
|
+
.subscribe());
|
|
527
|
+
}
|
|
528
|
+
applyChanges() {
|
|
529
|
+
this._applyChanges.next();
|
|
530
|
+
}
|
|
531
|
+
emitMarkerDestroyed() {
|
|
532
|
+
this._markerDestroyed.next();
|
|
533
|
+
}
|
|
534
|
+
ngOnDestroy() {
|
|
535
|
+
this._markerDestroyed.complete();
|
|
536
|
+
this._applyChanges.complete();
|
|
537
|
+
this._applyChangesSub.destroy();
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
DbxMapboxChangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeService, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
541
|
+
DbxMapboxChangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeService, providedIn: null });
|
|
542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeService, decorators: [{
|
|
543
|
+
type: Injectable,
|
|
544
|
+
args: [{
|
|
545
|
+
providedIn: null
|
|
546
|
+
}]
|
|
547
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; } });
|
|
548
|
+
|
|
475
549
|
/**
|
|
476
550
|
* Directive that configures a MapComponent with content from DbxMapboxService. Connects a host MapService to a parent DbxMapboxMapStore if available.
|
|
477
551
|
*/
|
|
@@ -519,7 +593,7 @@ class DbxMapboxLayoutDrawerComponent {
|
|
|
519
593
|
}
|
|
520
594
|
}
|
|
521
595
|
DbxMapboxLayoutDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
522
|
-
DbxMapboxLayoutDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer", host: { classAttribute: "dbx-mapbox-layout-drawer" }, ngImport: i0, template: "<div>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n</div>\n", dependencies: [{ kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type:
|
|
596
|
+
DbxMapboxLayoutDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer", host: { classAttribute: "dbx-mapbox-layout-drawer" }, ngImport: i0, template: "<div>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n</div>\n", dependencies: [{ kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] });
|
|
523
597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
524
598
|
type: Component,
|
|
525
599
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
@@ -662,7 +736,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
662
736
|
}
|
|
663
737
|
}
|
|
664
738
|
DbxMapboxLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
665
|
-
DbxMapboxLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", mode: "mode", opened: "opened", hasContent: "hasContent", drawerColor: "drawerColor" }, viewQueries: [{ propertyName: "container", first: true, predicate: MatDrawerContainer, descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-drawer-container class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer [opened]=\"opened$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 60px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type:
|
|
739
|
+
DbxMapboxLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", mode: "mode", opened: "opened", hasContent: "hasContent", drawerColor: "drawerColor" }, viewQueries: [{ propertyName: "container", first: true, predicate: MatDrawerContainer, descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-drawer-container class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer [opened]=\"opened$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 60px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i3.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i3.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i4.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: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] });
|
|
666
740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
667
741
|
type: Component,
|
|
668
742
|
args: [{ selector: 'dbx-mapbox-layout', template: "<mat-drawer-container class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer [opened]=\"opened$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 60px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"] }]
|
|
@@ -751,7 +825,7 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
|
|
|
751
825
|
this._active.next(active ?? true);
|
|
752
826
|
}
|
|
753
827
|
}
|
|
754
|
-
DbxMapboxMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$
|
|
828
|
+
DbxMapboxMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$2.MatMenuTrigger, host: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
755
829
|
DbxMapboxMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxMenuComponent, selector: "dbx-mapbox-menu", inputs: { active: ["dbxMapboxMenu", "active"] }, host: { properties: { "style.top": "pos.y", "style.left": "pos.x" }, styleAttribute: "visibility: hidden; position: fixed" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
756
830
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
757
831
|
type: Component,
|
|
@@ -765,7 +839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
765
839
|
},
|
|
766
840
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
767
841
|
}]
|
|
768
|
-
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$
|
|
842
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$2.MatMenuTrigger, decorators: [{
|
|
769
843
|
type: Host
|
|
770
844
|
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { active: [{
|
|
771
845
|
type: Input,
|
|
@@ -821,6 +895,9 @@ function provideMapboxStoreIfParentIsUnavailable() {
|
|
|
821
895
|
}
|
|
822
896
|
|
|
823
897
|
class DbxMapboxMarkerComponent {
|
|
898
|
+
constructor(_dbxMapboxChangeService) {
|
|
899
|
+
this._dbxMapboxChangeService = _dbxMapboxChangeService;
|
|
900
|
+
}
|
|
824
901
|
get marker() {
|
|
825
902
|
return this._marker;
|
|
826
903
|
}
|
|
@@ -878,11 +955,14 @@ class DbxMapboxMarkerComponent {
|
|
|
878
955
|
};
|
|
879
956
|
return style;
|
|
880
957
|
}
|
|
958
|
+
ngOnDestroy() {
|
|
959
|
+
this._dbxMapboxChangeService?.emitMarkerDestroyed();
|
|
960
|
+
}
|
|
881
961
|
}
|
|
882
962
|
DbxMapboxMarkerComponent._latLngPoint = latLngPointFunction({ wrap: true });
|
|
883
|
-
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
963
|
+
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [{ token: DbxMapboxChangeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
884
964
|
DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: { marker: "marker" }, ngImport: i0, template: `
|
|
885
|
-
<mgl-marker
|
|
965
|
+
<mgl-marker [lngLat]="latLng">
|
|
886
966
|
<dbx-anchor [anchor]="anchor">
|
|
887
967
|
<div class="dbx-mapbox-marker">
|
|
888
968
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
@@ -892,11 +972,11 @@ DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
892
972
|
</div>
|
|
893
973
|
</dbx-anchor>
|
|
894
974
|
</mgl-marker>
|
|
895
|
-
`, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}\n"], dependencies: [{ kind: "directive", type:
|
|
975
|
+
`, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i1.MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag", "dragStart", "dragEnd", "drag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
896
976
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
897
977
|
type: Component,
|
|
898
978
|
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
899
|
-
<mgl-marker
|
|
979
|
+
<mgl-marker [lngLat]="latLng">
|
|
900
980
|
<dbx-anchor [anchor]="anchor">
|
|
901
981
|
<div class="dbx-mapbox-marker">
|
|
902
982
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
@@ -907,7 +987,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
907
987
|
</dbx-anchor>
|
|
908
988
|
</mgl-marker>
|
|
909
989
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}\n"] }]
|
|
910
|
-
}],
|
|
990
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxChangeService, decorators: [{
|
|
991
|
+
type: Optional
|
|
992
|
+
}] }]; }, propDecorators: { marker: [{
|
|
911
993
|
type: Input
|
|
912
994
|
}] } });
|
|
913
995
|
|
|
@@ -927,11 +1009,14 @@ class DbxMapboxMarkersComponent {
|
|
|
927
1009
|
}
|
|
928
1010
|
}), shareReplay(1));
|
|
929
1011
|
}
|
|
1012
|
+
trackMarkerById(index, marker) {
|
|
1013
|
+
return marker.id;
|
|
1014
|
+
}
|
|
930
1015
|
get data() {
|
|
931
1016
|
return this._data.value;
|
|
932
1017
|
}
|
|
933
1018
|
set data(data) {
|
|
934
|
-
this._data.next(data);
|
|
1019
|
+
this._data.next(data || []);
|
|
935
1020
|
}
|
|
936
1021
|
get markerFactory() {
|
|
937
1022
|
return this._markerFactory.value;
|
|
@@ -946,14 +1031,14 @@ class DbxMapboxMarkersComponent {
|
|
|
946
1031
|
}
|
|
947
1032
|
DbxMapboxMarkersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
948
1033
|
DbxMapboxMarkersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxMarkersComponent, selector: "dbx-mapbox-markers", inputs: { data: "data", markerFactory: "markerFactory" }, ngImport: i0, template: `
|
|
949
|
-
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
950
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
1034
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async; trackBy: trackMarkerById" [marker]="marker"></dbx-mapbox-marker>
|
|
1035
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: ["marker"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
951
1036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, decorators: [{
|
|
952
1037
|
type: Component,
|
|
953
1038
|
args: [{
|
|
954
1039
|
selector: 'dbx-mapbox-markers',
|
|
955
1040
|
template: `
|
|
956
|
-
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
1041
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async; trackBy: trackMarkerById" [marker]="marker"></dbx-mapbox-marker>
|
|
957
1042
|
`,
|
|
958
1043
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
959
1044
|
}]
|
|
@@ -1096,7 +1181,7 @@ function filterByMapboxViewportBound(config) {
|
|
|
1096
1181
|
};
|
|
1097
1182
|
});
|
|
1098
1183
|
}), combineLatestWith(boundDecisionObs), map(([items, boundFunction]) => {
|
|
1099
|
-
|
|
1184
|
+
const valuesInBounds = [];
|
|
1100
1185
|
items.forEach((item) => {
|
|
1101
1186
|
if (boundFunction(item.bound)) {
|
|
1102
1187
|
valuesInBounds.push(item.value);
|
|
@@ -1129,5 +1214,5 @@ function mapboxZoomLevel(input) {
|
|
|
1129
1214
|
* Generated bundle index. Do not edit.
|
|
1130
1215
|
*/
|
|
1131
1216
|
|
|
1132
|
-
export { DEFAULT_MAPBOX_CENTER, DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD, DEFAULT_MAPBOX_STYLE, DEFAULT_MAPBOX_ZOOM, DbxMapboxConfig, DbxMapboxLayoutComponent, DbxMapboxLayoutDrawerComponent, DbxMapboxMapDirective, DbxMapboxMapStore, DbxMapboxMapStoreInjectionBlockDirective, DbxMapboxMapStoreProviderBlock, DbxMapboxMarkerComponent, DbxMapboxMarkersComponent, DbxMapboxMenuComponent, DbxMapboxModule, DbxMapboxService, KNOWN_MAPBOX_STYLES, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, dbxMapboxColoredDotStyle, filterByMapboxViewportBound, mapboxViewportBoundFunction, mapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable };
|
|
1217
|
+
export { DEFAULT_MAPBOX_CENTER, DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD, DEFAULT_MAPBOX_STYLE, DEFAULT_MAPBOX_ZOOM, DbxMapboxChangeDetectorRefService, DbxMapboxChangeService, DbxMapboxConfig, DbxMapboxLayoutComponent, DbxMapboxLayoutDrawerComponent, DbxMapboxMapDirective, DbxMapboxMapStore, DbxMapboxMapStoreInjectionBlockDirective, DbxMapboxMapStoreProviderBlock, DbxMapboxMarkerComponent, DbxMapboxMarkersComponent, DbxMapboxMenuComponent, DbxMapboxModule, DbxMapboxService, KNOWN_MAPBOX_STYLES, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, dbxMapboxColoredDotStyle, filterByMapboxViewportBound, mapboxViewportBoundFunction, mapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable };
|
|
1133
1218
|
//# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map
|