@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 { latLngPointFunction, latLngBoundFunction, isSameLatLngPoint, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, isSameLatLngBound, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, diffLatLngBoundPoints, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
|
|
6
6
|
import * as i1 from 'ngx-mapbox-gl';
|
|
@@ -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
|
}
|
|
@@ -505,7 +505,7 @@ class DbxMapboxLayoutDrawerComponent {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
DbxMapboxLayoutDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
508
|
-
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:
|
|
508
|
+
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" }] });
|
|
509
509
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
510
510
|
type: Component,
|
|
511
511
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
@@ -648,7 +648,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
DbxMapboxLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
651
|
-
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:
|
|
651
|
+
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" }] });
|
|
652
652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
653
653
|
type: Component,
|
|
654
654
|
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"] }]
|
|
@@ -737,7 +737,7 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
|
|
|
737
737
|
this._active.next(active !== null && active !== void 0 ? active : true);
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
DbxMapboxMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$
|
|
740
|
+
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 });
|
|
741
741
|
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 });
|
|
742
742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
743
743
|
type: Component,
|
|
@@ -752,7 +752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
752
752
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
753
753
|
}]
|
|
754
754
|
}], ctorParameters: function () {
|
|
755
|
-
return [{ type: DbxMapboxMapStore }, { type: i2$
|
|
755
|
+
return [{ type: DbxMapboxMapStore }, { type: i2$1.MatMenuTrigger, decorators: [{
|
|
756
756
|
type: Host
|
|
757
757
|
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }];
|
|
758
758
|
}, propDecorators: { active: [{
|
|
@@ -820,7 +820,8 @@ class DbxMapboxMarkerComponent {
|
|
|
820
820
|
}
|
|
821
821
|
get latLng() {
|
|
822
822
|
var _a;
|
|
823
|
-
|
|
823
|
+
const input = (_a = this._marker) === null || _a === void 0 ? void 0 : _a.latLng;
|
|
824
|
+
return input ? DbxMapboxMarkerComponent._latLngPoint(input) : undefined;
|
|
824
825
|
}
|
|
825
826
|
get anchor() {
|
|
826
827
|
var _a;
|
|
@@ -864,10 +865,11 @@ class DbxMapboxMarkerComponent {
|
|
|
864
865
|
}
|
|
865
866
|
const imageInput = (_b = this._marker) === null || _b === void 0 ? void 0 : _b.image;
|
|
866
867
|
const image = imageInput ? (typeof imageInput === 'string' ? imageInput : getValueFromGetter(imageInput, width)) : undefined;
|
|
867
|
-
|
|
868
|
+
const style = Object.assign(Object.assign({}, (_c = this._marker) === null || _c === void 0 ? void 0 : _c.style), { width: width + 'px', height: height + 'px', 'font-size': width + 'px', 'background-image': image });
|
|
868
869
|
return style;
|
|
869
870
|
}
|
|
870
871
|
}
|
|
872
|
+
DbxMapboxMarkerComponent._latLngPoint = latLngPointFunction({ wrap: true });
|
|
871
873
|
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
872
874
|
DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: { marker: "marker" }, ngImport: i0, template: `
|
|
873
875
|
<mgl-marker *ngIf="marker" [lngLat]="latLng">
|
|
@@ -876,11 +878,11 @@ DbxMapboxMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
876
878
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
877
879
|
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
878
880
|
</div>
|
|
879
|
-
<div class="dbx-mapbox-marker-label" *ngIf="label">{{ label }}</div>
|
|
881
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
880
882
|
</div>
|
|
881
883
|
</dbx-anchor>
|
|
882
884
|
</mgl-marker>
|
|
883
|
-
`, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column
|
|
885
|
+
`, 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 });
|
|
884
886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
885
887
|
type: Component,
|
|
886
888
|
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
@@ -890,15 +892,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
890
892
|
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
891
893
|
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
892
894
|
</div>
|
|
893
|
-
<div class="dbx-mapbox-marker-label" *ngIf="label">{{ label }}</div>
|
|
895
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
894
896
|
</div>
|
|
895
897
|
</dbx-anchor>
|
|
896
898
|
</mgl-marker>
|
|
897
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column
|
|
899
|
+
`, 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"] }]
|
|
898
900
|
}], ctorParameters: function () { return []; }, propDecorators: { marker: [{
|
|
899
901
|
type: Input
|
|
900
902
|
}] } });
|
|
901
903
|
|
|
904
|
+
/**
|
|
905
|
+
* Component used to render a set of DbxMapboxMarker values from the input data and marker factory.
|
|
906
|
+
*/
|
|
907
|
+
class DbxMapboxMarkersComponent {
|
|
908
|
+
constructor() {
|
|
909
|
+
this._data = new BehaviorSubject(undefined);
|
|
910
|
+
this._markerFactory = new BehaviorSubject(undefined);
|
|
911
|
+
this.markers$ = combineLatest([this._data.pipe(distinctUntilChanged()), this._markerFactory.pipe(distinctUntilChanged())]).pipe(map(([data, markerFactory]) => {
|
|
912
|
+
if ((data === null || data === void 0 ? void 0 : data.length) && markerFactory) {
|
|
913
|
+
return data.map(markerFactory);
|
|
914
|
+
}
|
|
915
|
+
else {
|
|
916
|
+
return [];
|
|
917
|
+
}
|
|
918
|
+
}), shareReplay(1));
|
|
919
|
+
}
|
|
920
|
+
get data() {
|
|
921
|
+
return this._data.value;
|
|
922
|
+
}
|
|
923
|
+
set data(data) {
|
|
924
|
+
this._data.next(data);
|
|
925
|
+
}
|
|
926
|
+
get markerFactory() {
|
|
927
|
+
return this._markerFactory.value;
|
|
928
|
+
}
|
|
929
|
+
set markerFactory(markerFactory) {
|
|
930
|
+
this._markerFactory.next(markerFactory);
|
|
931
|
+
}
|
|
932
|
+
ngOnDestroy() {
|
|
933
|
+
this._data.complete();
|
|
934
|
+
this._markerFactory.complete();
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
DbxMapboxMarkersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
938
|
+
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: `
|
|
939
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
940
|
+
`, 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" }] });
|
|
941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkersComponent, decorators: [{
|
|
942
|
+
type: Component,
|
|
943
|
+
args: [{
|
|
944
|
+
selector: 'dbx-mapbox-markers',
|
|
945
|
+
template: `
|
|
946
|
+
<dbx-mapbox-marker *ngFor="let marker of markers$ | async" [marker]="marker"></dbx-mapbox-marker>
|
|
947
|
+
`
|
|
948
|
+
}]
|
|
949
|
+
}], propDecorators: { data: [{
|
|
950
|
+
type: Input
|
|
951
|
+
}], markerFactory: [{
|
|
952
|
+
type: Input
|
|
953
|
+
}] } });
|
|
954
|
+
|
|
902
955
|
const declarations = [
|
|
903
956
|
//
|
|
904
957
|
DbxMapboxMapDirective,
|
|
@@ -906,6 +959,7 @@ const declarations = [
|
|
|
906
959
|
DbxMapboxLayoutDrawerComponent,
|
|
907
960
|
DbxMapboxMenuComponent,
|
|
908
961
|
DbxMapboxMarkerComponent,
|
|
962
|
+
DbxMapboxMarkersComponent,
|
|
909
963
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
910
964
|
];
|
|
911
965
|
class DbxMapboxModule {
|
|
@@ -929,6 +983,7 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
929
983
|
DbxMapboxLayoutDrawerComponent,
|
|
930
984
|
DbxMapboxMenuComponent,
|
|
931
985
|
DbxMapboxMarkerComponent,
|
|
986
|
+
DbxMapboxMarkersComponent,
|
|
932
987
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
933
988
|
], imports: [
|
|
934
989
|
//
|
|
@@ -947,6 +1002,7 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
947
1002
|
DbxMapboxLayoutDrawerComponent,
|
|
948
1003
|
DbxMapboxMenuComponent,
|
|
949
1004
|
DbxMapboxMarkerComponent,
|
|
1005
|
+
DbxMapboxMarkersComponent,
|
|
950
1006
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
951
1007
|
] });
|
|
952
1008
|
DbxMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxModule, imports: [
|
|
@@ -979,6 +1035,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
979
1035
|
}]
|
|
980
1036
|
}] });
|
|
981
1037
|
|
|
1038
|
+
/**
|
|
1039
|
+
* Creates the styling for rendering a dot.
|
|
1040
|
+
*
|
|
1041
|
+
* @param background
|
|
1042
|
+
* @param color
|
|
1043
|
+
* @returns
|
|
1044
|
+
*/
|
|
1045
|
+
function dbxMapboxColoredDotStyle(background, color) {
|
|
1046
|
+
return {
|
|
1047
|
+
background,
|
|
1048
|
+
padding: '2px',
|
|
1049
|
+
color: color || 'white',
|
|
1050
|
+
'border-radius': '50%'
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
|
|
982
1054
|
const KNOWN_MAPBOX_STYLES = [
|
|
983
1055
|
//
|
|
984
1056
|
'mapbox://styles/mapbox/streets-v11',
|
|
@@ -1000,5 +1072,5 @@ function mapboxZoomLevel(input) {
|
|
|
1000
1072
|
* Generated bundle index. Do not edit.
|
|
1001
1073
|
*/
|
|
1002
1074
|
|
|
1003
|
-
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 };
|
|
1075
|
+
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 };
|
|
1004
1076
|
//# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map
|