@dereekb/dbx-web 9.7.0 → 9.7.3
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 -12
- package/esm2020/mapbox/lib/mapbox.marker.mjs +1 -1
- package/esm2020/mapbox/lib/mapbox.markers.component.mjs +12 -11
- package/esm2020/mapbox/lib/mapbox.store.mjs +2 -1
- package/fesm2015/dereekb-dbx-web-mapbox.mjs +111 -31
- 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 +103 -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 -12
- package/mapbox/esm2020/lib/mapbox.marker.mjs +1 -1
- package/mapbox/esm2020/lib/mapbox.markers.component.mjs +12 -11
- package/mapbox/esm2020/lib/mapbox.store.mjs +2 -1
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +111 -31
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +103 -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.marker.component.d.ts +9 -6
- package/mapbox/lib/mapbox.marker.d.ts +3 -3
- package/mapbox/lib/mapbox.markers.component.d.ts +4 -5
- 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';
|
|
7
|
+
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, merge, throttleTime, BehaviorSubject, combineLatestWith } from 'rxjs';
|
|
6
8
|
import { latLngPointFunction, latLngBoundFunction, 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
|
}
|
|
@@ -445,6 +473,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
445
473
|
}))));
|
|
446
474
|
}
|
|
447
475
|
calculateNextCenterOffsetWithScreenMarginChange(sizing) {
|
|
476
|
+
// TODO: Consider calculating this using the viewport() function from @mapbox/geo-viewport
|
|
448
477
|
return this.atNextIdle().pipe(switchMap(() => this.bound$.pipe(first(), map((bounds) => {
|
|
449
478
|
const diff = diffLatLngBoundPoints(bounds, true);
|
|
450
479
|
const center = latLngBoundCenterPoint(bounds);
|
|
@@ -472,6 +501,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
472
501
|
args: [DbxMapboxService]
|
|
473
502
|
}] }]; } });
|
|
474
503
|
|
|
504
|
+
/**
|
|
505
|
+
* Provided in the parent component that allows children to emit events related to their lifecycles.
|
|
506
|
+
*/
|
|
507
|
+
class DbxMapboxChangeService {
|
|
508
|
+
constructor(dbxMapboxMapStore) {
|
|
509
|
+
this.dbxMapboxMapStore = dbxMapboxMapStore;
|
|
510
|
+
this._markerDestroyed = new Subject();
|
|
511
|
+
this._applyChanges = new Subject();
|
|
512
|
+
this.markerDestroyed$ = this._markerDestroyed;
|
|
513
|
+
this.applyChanges$ = merge(this._applyChanges, this.markerDestroyed$).pipe(throttleTime(100, undefined, { leading: false, trailing: true }));
|
|
514
|
+
this._applyChangesSub = new SubscriptionObject(this.dbxMapboxMapStore.mapService$
|
|
515
|
+
.pipe(switchMap$1((mapService) => this.applyChanges$.pipe(tap(() => {
|
|
516
|
+
mapService.applyChanges();
|
|
517
|
+
}))))
|
|
518
|
+
.subscribe());
|
|
519
|
+
}
|
|
520
|
+
applyChanges() {
|
|
521
|
+
this._applyChanges.next();
|
|
522
|
+
}
|
|
523
|
+
emitMarkerDestroyed() {
|
|
524
|
+
this._markerDestroyed.next();
|
|
525
|
+
}
|
|
526
|
+
ngOnDestroy() {
|
|
527
|
+
this._markerDestroyed.complete();
|
|
528
|
+
this._applyChanges.complete();
|
|
529
|
+
this._applyChangesSub.destroy();
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
DbxMapboxChangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeService, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
533
|
+
DbxMapboxChangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeService, providedIn: null });
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxChangeService, decorators: [{
|
|
535
|
+
type: Injectable,
|
|
536
|
+
args: [{
|
|
537
|
+
providedIn: null
|
|
538
|
+
}]
|
|
539
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; } });
|
|
540
|
+
|
|
475
541
|
/**
|
|
476
542
|
* Directive that configures a MapComponent with content from DbxMapboxService. Connects a host MapService to a parent DbxMapboxMapStore if available.
|
|
477
543
|
*/
|
|
@@ -519,7 +585,7 @@ class DbxMapboxLayoutDrawerComponent {
|
|
|
519
585
|
}
|
|
520
586
|
}
|
|
521
587
|
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:
|
|
588
|
+
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
589
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
524
590
|
type: Component,
|
|
525
591
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
@@ -662,7 +728,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
662
728
|
}
|
|
663
729
|
}
|
|
664
730
|
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:
|
|
731
|
+
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
732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
667
733
|
type: Component,
|
|
668
734
|
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 +817,7 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
|
|
|
751
817
|
this._active.next(active ?? true);
|
|
752
818
|
}
|
|
753
819
|
}
|
|
754
|
-
DbxMapboxMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$
|
|
820
|
+
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
821
|
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
822
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
757
823
|
type: Component,
|
|
@@ -765,7 +831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
765
831
|
},
|
|
766
832
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
767
833
|
}]
|
|
768
|
-
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$
|
|
834
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$2.MatMenuTrigger, decorators: [{
|
|
769
835
|
type: Host
|
|
770
836
|
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { active: [{
|
|
771
837
|
type: Input,
|
|
@@ -821,7 +887,9 @@ function provideMapboxStoreIfParentIsUnavailable() {
|
|
|
821
887
|
}
|
|
822
888
|
|
|
823
889
|
class DbxMapboxMarkerComponent {
|
|
824
|
-
constructor() {
|
|
890
|
+
constructor(_dbxMapboxChangeService) {
|
|
891
|
+
this._dbxMapboxChangeService = _dbxMapboxChangeService;
|
|
892
|
+
}
|
|
825
893
|
get marker() {
|
|
826
894
|
return this._marker;
|
|
827
895
|
}
|
|
@@ -879,11 +947,14 @@ class DbxMapboxMarkerComponent {
|
|
|
879
947
|
};
|
|
880
948
|
return style;
|
|
881
949
|
}
|
|
950
|
+
ngOnDestroy() {
|
|
951
|
+
this._dbxMapboxChangeService?.emitMarkerDestroyed();
|
|
952
|
+
}
|
|
882
953
|
}
|
|
883
954
|
DbxMapboxMarkerComponent._latLngPoint = latLngPointFunction({ wrap: true });
|
|
884
|
-
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
955
|
+
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 });
|
|
885
956
|
DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: { marker: "marker" }, ngImport: i0, template: `
|
|
886
|
-
<mgl-marker
|
|
957
|
+
<mgl-marker [lngLat]="latLng">
|
|
887
958
|
<dbx-anchor [anchor]="anchor">
|
|
888
959
|
<div class="dbx-mapbox-marker">
|
|
889
960
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
@@ -893,11 +964,11 @@ DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
893
964
|
</div>
|
|
894
965
|
</dbx-anchor>
|
|
895
966
|
</mgl-marker>
|
|
896
|
-
`, 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:
|
|
967
|
+
`, 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 });
|
|
897
968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
898
969
|
type: Component,
|
|
899
970
|
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
900
|
-
<mgl-marker
|
|
971
|
+
<mgl-marker [lngLat]="latLng">
|
|
901
972
|
<dbx-anchor [anchor]="anchor">
|
|
902
973
|
<div class="dbx-mapbox-marker">
|
|
903
974
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
@@ -908,7 +979,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
908
979
|
</dbx-anchor>
|
|
909
980
|
</mgl-marker>
|
|
910
981
|
`, 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"] }]
|
|
911
|
-
}], ctorParameters: function () { return [
|
|
982
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxChangeService, decorators: [{
|
|
983
|
+
type: Optional
|
|
984
|
+
}] }]; }, propDecorators: { marker: [{
|
|
912
985
|
type: Input
|
|
913
986
|
}] } });
|
|
914
987
|
|
|
@@ -916,8 +989,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
916
989
|
* Component used to render a set of DbxMapboxMarker values from the input data and marker factory.
|
|
917
990
|
*/
|
|
918
991
|
class DbxMapboxMarkersComponent {
|
|
919
|
-
constructor(
|
|
920
|
-
this.cdRef = cdRef;
|
|
992
|
+
constructor() {
|
|
921
993
|
this._data = new BehaviorSubject(undefined);
|
|
922
994
|
this._markerFactory = new BehaviorSubject(undefined);
|
|
923
995
|
this.markers$ = combineLatest([this._data.pipe(distinctUntilChanged()), this._markerFactory.pipe(distinctUntilChanged())]).pipe(map(([data, markerFactory]) => {
|
|
@@ -927,13 +999,16 @@ class DbxMapboxMarkersComponent {
|
|
|
927
999
|
else {
|
|
928
1000
|
return [];
|
|
929
1001
|
}
|
|
930
|
-
}),
|
|
1002
|
+
}), shareReplay(1));
|
|
1003
|
+
}
|
|
1004
|
+
trackMarkerById(index, marker) {
|
|
1005
|
+
return marker.id;
|
|
931
1006
|
}
|
|
932
1007
|
get data() {
|
|
933
1008
|
return this._data.value;
|
|
934
1009
|
}
|
|
935
1010
|
set data(data) {
|
|
936
|
-
this._data.next(data);
|
|
1011
|
+
this._data.next(data || []);
|
|
937
1012
|
}
|
|
938
1013
|
get markerFactory() {
|
|
939
1014
|
return this._markerFactory.value;
|
|
@@ -946,20 +1021,20 @@ class DbxMapboxMarkersComponent {
|
|
|
946
1021
|
this._markerFactory.complete();
|
|
947
1022
|
}
|
|
948
1023
|
}
|
|
949
|
-
DbxMapboxMarkersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [
|
|
1024
|
+
DbxMapboxMarkersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
950
1025
|
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: `
|
|
951
|
-
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
952
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
1026
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async; trackBy: trackMarkerById" [marker]="marker"></dbx-mapbox-marker>
|
|
1027
|
+
`, 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 });
|
|
953
1028
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, decorators: [{
|
|
954
1029
|
type: Component,
|
|
955
1030
|
args: [{
|
|
956
1031
|
selector: 'dbx-mapbox-markers',
|
|
957
1032
|
template: `
|
|
958
|
-
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
1033
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async; trackBy: trackMarkerById" [marker]="marker"></dbx-mapbox-marker>
|
|
959
1034
|
`,
|
|
960
1035
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
961
1036
|
}]
|
|
962
|
-
}],
|
|
1037
|
+
}], propDecorators: { data: [{
|
|
963
1038
|
type: Input
|
|
964
1039
|
}], markerFactory: [{
|
|
965
1040
|
type: Input
|
|
@@ -1131,5 +1206,5 @@ function mapboxZoomLevel(input) {
|
|
|
1131
1206
|
* Generated bundle index. Do not edit.
|
|
1132
1207
|
*/
|
|
1133
1208
|
|
|
1134
|
-
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 };
|
|
1209
|
+
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 };
|
|
1135
1210
|
//# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map
|