@dereekb/dbx-web 9.6.3 → 9.6.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/mapbox/lib/index.mjs +3 -1
- package/esm2020/mapbox/lib/mapbox.layout.component.mjs +1 -1
- package/esm2020/mapbox/lib/mapbox.marker.component.mjs +10 -8
- package/esm2020/mapbox/lib/mapbox.marker.mjs +16 -0
- package/esm2020/mapbox/lib/mapbox.markers.component.mjs +56 -0
- package/esm2020/mapbox/lib/mapbox.menu.component.mjs +1 -1
- package/esm2020/mapbox/lib/mapbox.module.mjs +5 -1
- package/fesm2015/dereekb-dbx-web-mapbox.mjs +85 -13
- package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-web-mapbox.mjs +85 -13
- package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/lib/layout/text/_text.scss +18 -0
- package/mapbox/esm2020/lib/index.mjs +3 -1
- package/mapbox/esm2020/lib/mapbox.layout.component.mjs +1 -1
- package/mapbox/esm2020/lib/mapbox.marker.component.mjs +10 -8
- package/mapbox/esm2020/lib/mapbox.marker.mjs +16 -0
- package/mapbox/esm2020/lib/mapbox.markers.component.mjs +56 -0
- package/mapbox/esm2020/lib/mapbox.menu.component.mjs +1 -1
- package/mapbox/esm2020/lib/mapbox.module.mjs +5 -1
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +85 -13
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +85 -13
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/lib/index.d.ts +2 -0
- package/mapbox/lib/mapbox.marker.component.d.ts +4 -33
- package/mapbox/lib/mapbox.marker.d.ts +49 -0
- package/mapbox/lib/mapbox.markers.component.d.ts +19 -0
- package/mapbox/lib/mapbox.module.d.ts +11 -10
- package/mapbox/package.json +3 -3
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Optional, Inject, Directive, Host, Component, ElementRef, ViewChild, Input, ChangeDetectionStrategy, SkipSelf, Injector, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { cleanup, filterMaybe, onTrueToFalse, SubscriptionObject } from '@dereekb/rxjs';
|
|
6
6
|
import { latLngPointFunction, latLngBoundFunction, isSameLatLngPoint, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, isSameLatLngBound, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, diffLatLngBoundPoints, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
|
|
@@ -21,7 +21,7 @@ import * as i6 from 'angular-resize-event';
|
|
|
21
21
|
import { AngularResizeEventModule } from 'angular-resize-event';
|
|
22
22
|
import * as i2 from '@dereekb/dbx-core';
|
|
23
23
|
import { AbstractSubscriptionDirective, safeMarkForCheck, DbxInjectionComponentModule } from '@dereekb/dbx-core';
|
|
24
|
-
import * as i2$
|
|
24
|
+
import * as i2$1 from '@angular/material/menu';
|
|
25
25
|
|
|
26
26
|
class DbxMapboxConfig {
|
|
27
27
|
}
|
|
@@ -492,7 +492,7 @@ class DbxMapboxLayoutDrawerComponent {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
DbxMapboxLayoutDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
495
|
-
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:
|
|
495
|
+
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: i1$1.AsyncPipe, name: "async" }] });
|
|
496
496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
497
497
|
type: Component,
|
|
498
498
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
@@ -635,7 +635,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
DbxMapboxLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
638
|
-
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:
|
|
638
|
+
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: i1$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: i1$1.AsyncPipe, name: "async" }] });
|
|
639
639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
640
640
|
type: Component,
|
|
641
641
|
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"] }]
|
|
@@ -724,7 +724,7 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
|
|
|
724
724
|
this._active.next(active ?? true);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
DbxMapboxMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$
|
|
727
|
+
DbxMapboxMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$1.MatMenuTrigger, host: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
728
728
|
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 });
|
|
729
729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
730
730
|
type: Component,
|
|
@@ -738,7 +738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
738
738
|
},
|
|
739
739
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
740
740
|
}]
|
|
741
|
-
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$
|
|
741
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$1.MatMenuTrigger, decorators: [{
|
|
742
742
|
type: Host
|
|
743
743
|
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { active: [{
|
|
744
744
|
type: Input,
|
|
@@ -802,7 +802,8 @@ class DbxMapboxMarkerComponent {
|
|
|
802
802
|
this._marker = marker;
|
|
803
803
|
}
|
|
804
804
|
get latLng() {
|
|
805
|
-
|
|
805
|
+
const input = this._marker?.latLng;
|
|
806
|
+
return input ? DbxMapboxMarkerComponent._latLngPoint(input) : undefined;
|
|
806
807
|
}
|
|
807
808
|
get anchor() {
|
|
808
809
|
return this._marker?.anchor;
|
|
@@ -842,7 +843,7 @@ class DbxMapboxMarkerComponent {
|
|
|
842
843
|
}
|
|
843
844
|
const imageInput = this._marker?.image;
|
|
844
845
|
const image = imageInput ? (typeof imageInput === 'string' ? imageInput : getValueFromGetter(imageInput, width)) : undefined;
|
|
845
|
-
|
|
846
|
+
const style = {
|
|
846
847
|
...this._marker?.style,
|
|
847
848
|
width: width + 'px',
|
|
848
849
|
height: height + 'px',
|
|
@@ -852,6 +853,7 @@ class DbxMapboxMarkerComponent {
|
|
|
852
853
|
return style;
|
|
853
854
|
}
|
|
854
855
|
}
|
|
856
|
+
DbxMapboxMarkerComponent._latLngPoint = latLngPointFunction({ wrap: true });
|
|
855
857
|
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
856
858
|
DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: { marker: "marker" }, ngImport: i0, template: `
|
|
857
859
|
<mgl-marker *ngIf="marker" [lngLat]="latLng">
|
|
@@ -860,11 +862,11 @@ DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
860
862
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
861
863
|
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
862
864
|
</div>
|
|
863
|
-
<div class="dbx-mapbox-marker-label" *ngIf="label">{{ label }}</div>
|
|
865
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
864
866
|
</div>
|
|
865
867
|
</dbx-anchor>
|
|
866
868
|
</mgl-marker>
|
|
867
|
-
`, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column
|
|
869
|
+
`, 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: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$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: i3$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 });
|
|
868
870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
869
871
|
type: Component,
|
|
870
872
|
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
@@ -874,15 +876,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
874
876
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
875
877
|
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
876
878
|
</div>
|
|
877
|
-
<div class="dbx-mapbox-marker-label" *ngIf="label">{{ label }}</div>
|
|
879
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
878
880
|
</div>
|
|
879
881
|
</dbx-anchor>
|
|
880
882
|
</mgl-marker>
|
|
881
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column
|
|
883
|
+
`, 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"] }]
|
|
882
884
|
}], ctorParameters: function () { return []; }, propDecorators: { marker: [{
|
|
883
885
|
type: Input
|
|
884
886
|
}] } });
|
|
885
887
|
|
|
888
|
+
/**
|
|
889
|
+
* Component used to render a set of DbxMapboxMarker values from the input data and marker factory.
|
|
890
|
+
*/
|
|
891
|
+
class DbxMapboxMarkersComponent {
|
|
892
|
+
constructor() {
|
|
893
|
+
this._data = new BehaviorSubject(undefined);
|
|
894
|
+
this._markerFactory = new BehaviorSubject(undefined);
|
|
895
|
+
this.markers$ = combineLatest([this._data.pipe(distinctUntilChanged()), this._markerFactory.pipe(distinctUntilChanged())]).pipe(map(([data, markerFactory]) => {
|
|
896
|
+
if (data?.length && markerFactory) {
|
|
897
|
+
return data.map(markerFactory);
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
return [];
|
|
901
|
+
}
|
|
902
|
+
}), shareReplay(1));
|
|
903
|
+
}
|
|
904
|
+
get data() {
|
|
905
|
+
return this._data.value;
|
|
906
|
+
}
|
|
907
|
+
set data(data) {
|
|
908
|
+
this._data.next(data);
|
|
909
|
+
}
|
|
910
|
+
get markerFactory() {
|
|
911
|
+
return this._markerFactory.value;
|
|
912
|
+
}
|
|
913
|
+
set markerFactory(markerFactory) {
|
|
914
|
+
this._markerFactory.next(markerFactory);
|
|
915
|
+
}
|
|
916
|
+
ngOnDestroy() {
|
|
917
|
+
this._data.complete();
|
|
918
|
+
this._markerFactory.complete();
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
DbxMapboxMarkersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
922
|
+
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: `
|
|
923
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
924
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: ["marker"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, decorators: [{
|
|
926
|
+
type: Component,
|
|
927
|
+
args: [{
|
|
928
|
+
selector: 'dbx-mapbox-markers',
|
|
929
|
+
template: `
|
|
930
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
931
|
+
`
|
|
932
|
+
}]
|
|
933
|
+
}], propDecorators: { data: [{
|
|
934
|
+
type: Input
|
|
935
|
+
}], markerFactory: [{
|
|
936
|
+
type: Input
|
|
937
|
+
}] } });
|
|
938
|
+
|
|
886
939
|
const declarations = [
|
|
887
940
|
//
|
|
888
941
|
DbxMapboxMapDirective,
|
|
@@ -890,6 +943,7 @@ const declarations = [
|
|
|
890
943
|
DbxMapboxLayoutDrawerComponent,
|
|
891
944
|
DbxMapboxMenuComponent,
|
|
892
945
|
DbxMapboxMarkerComponent,
|
|
946
|
+
DbxMapboxMarkersComponent,
|
|
893
947
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
894
948
|
];
|
|
895
949
|
class DbxMapboxModule {
|
|
@@ -913,6 +967,7 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
913
967
|
DbxMapboxLayoutDrawerComponent,
|
|
914
968
|
DbxMapboxMenuComponent,
|
|
915
969
|
DbxMapboxMarkerComponent,
|
|
970
|
+
DbxMapboxMarkersComponent,
|
|
916
971
|
DbxMapboxMapStoreInjectionBlockDirective], imports: [
|
|
917
972
|
//
|
|
918
973
|
CommonModule,
|
|
@@ -929,6 +984,7 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
929
984
|
DbxMapboxLayoutDrawerComponent,
|
|
930
985
|
DbxMapboxMenuComponent,
|
|
931
986
|
DbxMapboxMarkerComponent,
|
|
987
|
+
DbxMapboxMarkersComponent,
|
|
932
988
|
DbxMapboxMapStoreInjectionBlockDirective] });
|
|
933
989
|
DbxMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxModule, imports: [
|
|
934
990
|
//
|
|
@@ -959,6 +1015,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
959
1015
|
}]
|
|
960
1016
|
}] });
|
|
961
1017
|
|
|
1018
|
+
/**
|
|
1019
|
+
* Creates the styling for rendering a dot.
|
|
1020
|
+
*
|
|
1021
|
+
* @param background
|
|
1022
|
+
* @param color
|
|
1023
|
+
* @returns
|
|
1024
|
+
*/
|
|
1025
|
+
function dbxMapboxColoredDotStyle(background, color) {
|
|
1026
|
+
return {
|
|
1027
|
+
background,
|
|
1028
|
+
padding: '2px',
|
|
1029
|
+
color: color || 'white',
|
|
1030
|
+
'border-radius': '50%'
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
|
|
962
1034
|
const KNOWN_MAPBOX_STYLES = [
|
|
963
1035
|
//
|
|
964
1036
|
'mapbox://styles/mapbox/streets-v11',
|
|
@@ -980,5 +1052,5 @@ function mapboxZoomLevel(input) {
|
|
|
980
1052
|
* Generated bundle index. Do not edit.
|
|
981
1053
|
*/
|
|
982
1054
|
|
|
983
|
-
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, DbxMapboxMenuComponent, DbxMapboxModule, DbxMapboxService, KNOWN_MAPBOX_STYLES, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, mapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable };
|
|
1055
|
+
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, mapboxZoomLevel, provideMapboxStoreIfParentIsUnavailable };
|
|
984
1056
|
//# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map
|