@dereekb/dbx-web 9.6.1 → 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 +4 -1
- package/esm2020/mapbox/lib/mapbox.layout.component.mjs +54 -25
- package/esm2020/mapbox/lib/mapbox.marker.component.mjs +99 -0
- 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 +20 -4
- package/esm2020/mapbox/lib/mapbox.service.mjs +2 -2
- package/esm2020/mapbox/lib/mapbox.store.mjs +46 -22
- package/fesm2015/dereekb-dbx-web-mapbox.mjs +281 -56
- package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-web-mapbox.mjs +282 -56
- package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/lib/layout/text/_text.scss +18 -0
- package/mapbox/esm2020/lib/index.mjs +4 -1
- package/mapbox/esm2020/lib/mapbox.layout.component.mjs +54 -25
- package/mapbox/esm2020/lib/mapbox.marker.component.mjs +99 -0
- 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 +20 -4
- package/mapbox/esm2020/lib/mapbox.service.mjs +2 -2
- package/mapbox/esm2020/lib/mapbox.store.mjs +46 -22
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +281 -56
- package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +282 -56
- package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/mapbox/lib/index.d.ts +3 -0
- package/mapbox/lib/mapbox.layout.component.d.ts +5 -1
- package/mapbox/lib/mapbox.marker.component.d.ts +22 -0
- 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 +12 -8
- package/mapbox/lib/mapbox.store.d.ts +13 -0
- package/mapbox/package.json +3 -3
- package/package.json +3 -3
|
@@ -1,14 +1,16 @@
|
|
|
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
|
-
import { latLngPointFunction, latLngBoundFunction, isSameLatLngPoint, isSameLatLngBound, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, diffLatLngBoundPoints, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject } from '@dereekb/util';
|
|
6
|
+
import { latLngPointFunction, latLngBoundFunction, isSameLatLngPoint, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, isSameLatLngBound, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, diffLatLngBoundPoints, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
|
|
7
7
|
import { ComponentStore } from '@ngrx/component-store';
|
|
8
|
-
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, BehaviorSubject, throttleTime
|
|
8
|
+
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, BehaviorSubject, throttleTime } from 'rxjs';
|
|
9
9
|
import * as MapboxGl from 'mapbox-gl';
|
|
10
10
|
import * as i1 from 'ngx-mapbox-gl';
|
|
11
|
-
import {
|
|
11
|
+
import { NgxMapboxGLModule } from 'ngx-mapbox-gl';
|
|
12
|
+
import * as i3$1 from '@dereekb/dbx-web';
|
|
13
|
+
import { dbxColorBackground, disableRightClickInCdkBackdrop, DbxRouterAnchorModule } from '@dereekb/dbx-web';
|
|
12
14
|
import * as i3 from '@angular/material/sidenav';
|
|
13
15
|
import { MatDrawerContainer, MatSidenavModule } from '@angular/material/sidenav';
|
|
14
16
|
import * as i4 from '@angular/material/button';
|
|
@@ -19,13 +21,13 @@ import * as i6 from 'angular-resize-event';
|
|
|
19
21
|
import { AngularResizeEventModule } from 'angular-resize-event';
|
|
20
22
|
import * as i2 from '@dereekb/dbx-core';
|
|
21
23
|
import { AbstractSubscriptionDirective, safeMarkForCheck, DbxInjectionComponentModule } from '@dereekb/dbx-core';
|
|
22
|
-
import * as i2$
|
|
24
|
+
import * as i2$1 from '@angular/material/menu';
|
|
23
25
|
|
|
24
26
|
class DbxMapboxConfig {
|
|
25
27
|
}
|
|
26
28
|
const DEFAULT_MAPBOX_STYLE = 'mapbox://styles/mapbox/streets-v11';
|
|
27
29
|
const DEFAULT_MAPBOX_CENTER = [30.2690138665, -97.7408297965];
|
|
28
|
-
const DEFAULT_MAPBOX_ZOOM =
|
|
30
|
+
const DEFAULT_MAPBOX_ZOOM = 8;
|
|
29
31
|
const DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD = 200;
|
|
30
32
|
class DbxMapboxService {
|
|
31
33
|
constructor(config) {
|
|
@@ -69,7 +71,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
69
71
|
});
|
|
70
72
|
this.dbxMapboxService = dbxMapboxService;
|
|
71
73
|
this.latLngPoint = latLngPointFunction();
|
|
72
|
-
this.latLngBound = latLngBoundFunction();
|
|
74
|
+
this.latLngBound = latLngBoundFunction({ pointFunction: latLngPointFunction({ wrap: false, validate: false }) });
|
|
73
75
|
// MARK: Effects
|
|
74
76
|
this.setMapService = this.effect((input) => {
|
|
75
77
|
return input.pipe(switchMap((service) => {
|
|
@@ -310,17 +312,41 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
310
312
|
this.isRotating$ = this.whenInitialized$.pipe(switchMap(() => this.rotateState$.pipe(map((x) => x === 'rotating'), distinctUntilChanged(), shareReplay())));
|
|
311
313
|
this._movingTimer = this.movingTimer();
|
|
312
314
|
this._renderingTimer = this.lifecycleRenderTimer();
|
|
313
|
-
this.centerNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => this.latLngPoint(x.getCenter())))), shareReplay(1))));
|
|
315
|
+
this.centerNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => this.latLngPoint(x.getCenter())))), shareReplay(1))), shareReplay(1));
|
|
314
316
|
this.center$ = this.whenInitialized$.pipe(switchMap(() => {
|
|
315
317
|
return this.isMoving$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.centerNow$.pipe(first())), distinctUntilChanged(isSameLatLngPoint), shareReplay(1));
|
|
318
|
+
}), shareReplay(1));
|
|
319
|
+
this.margin$ = this.state$.pipe(map((x) => x.margin), distinctUntilChanged((a, b) => a != null && b != null && a.fullWidth === b.fullWidth && a.leftMargin === b.leftMargin && a.rightMargin === b.rightMargin), shareReplay(1));
|
|
320
|
+
this.reverseMargin$ = this.margin$.pipe(map((x) => {
|
|
321
|
+
if (x) {
|
|
322
|
+
return { leftMargin: -x.leftMargin, rightMargin: -x.rightMargin, fullWidth: x.fullWidth };
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
return x;
|
|
326
|
+
}
|
|
316
327
|
}));
|
|
328
|
+
this.centerGivenMargin$ = this.whenInitialized$.pipe(switchMap(() => {
|
|
329
|
+
return this.reverseMargin$.pipe(switchMap((x) => {
|
|
330
|
+
if (x) {
|
|
331
|
+
return this.center$.pipe(switchMap((_) => this.calculateNextCenterOffsetWithScreenMarginChange(x)));
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
return this.isMoving$.pipe(filter((x) => !x), switchMap(() => this.center$));
|
|
335
|
+
}
|
|
336
|
+
}));
|
|
337
|
+
}), shareReplay(1));
|
|
317
338
|
this.boundNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => {
|
|
318
339
|
const bound = x.getBounds();
|
|
319
|
-
|
|
340
|
+
const boundSw = bound.getSouthWest();
|
|
341
|
+
const boundNe = bound.getNorthEast();
|
|
342
|
+
const sw = isDefaultLatLngPoint(boundSw) ? swMostLatLngPoint() : boundSw;
|
|
343
|
+
const ne = isDefaultLatLngPoint(boundNe) ? neMostLatLngPoint() : boundNe;
|
|
344
|
+
return this.latLngBound(sw, ne);
|
|
320
345
|
}))), shareReplay(1))));
|
|
321
346
|
this.bound$ = this.whenInitialized$.pipe(switchMap(() => {
|
|
322
347
|
return this.isRendering$.pipe(onTrueToFalse(), startWith(undefined), switchMap((x) => this.boundNow$.pipe(first())), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
|
|
323
348
|
}));
|
|
349
|
+
this.boundWrapsAroundWorld$ = this.bound$.pipe(map((x) => latLngBoundWrapsMap(x)), distinctUntilChanged(), shareReplay(1));
|
|
324
350
|
this.isWithinBoundFunction$ = this.bound$.pipe(map((x) => isWithinLatLngBoundFunction(x)), shareReplay(1));
|
|
325
351
|
this.overlapsBoundFunction$ = this.bound$.pipe(map((x) => overlapsLatLngBoundFunction(x)), shareReplay(1));
|
|
326
352
|
this.zoomNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => x.getZoom()))), shareReplay(1))));
|
|
@@ -341,6 +367,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
341
367
|
this.doubleClickEvent$ = this.state$.pipe(map((x) => x.doubleClickEvent), distinctUntilChanged(), shareReplay(1));
|
|
342
368
|
this.rightClickEvent$ = this.state$.pipe(map((x) => x.rightClickEvent), distinctUntilChanged(), shareReplay(1));
|
|
343
369
|
// MARK: State Changes
|
|
370
|
+
this.setMargin = this.updater((state, margin) => ({ ...state, margin: margin && (margin.rightMargin !== 0 || margin.leftMargin !== 0) ? margin : undefined }));
|
|
344
371
|
this._setMapService = this.updater((state, mapService) => ({ mapService, moveState: 'init', lifecycleState: 'init', zoomState: 'init', rotateState: 'init', retainContent: state.retainContent, content: state.retainContent ? state.content : undefined }));
|
|
345
372
|
this._setLifecycleState = this.updater((state, lifecycleState) => ({ ...state, lifecycleState }));
|
|
346
373
|
this._setMoveState = this.updater((state, moveState) => ({ ...state, moveState }));
|
|
@@ -391,23 +418,22 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
391
418
|
}))));
|
|
392
419
|
}
|
|
393
420
|
calculateNextCenterOffsetWithScreenMarginChange(sizing) {
|
|
394
|
-
return this.atNextIdle().pipe(switchMap(() => this.bound$.pipe(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
})))));
|
|
421
|
+
return this.atNextIdle().pipe(switchMap(() => this.bound$.pipe(first(), map((bounds) => {
|
|
422
|
+
const diff = diffLatLngBoundPoints(bounds);
|
|
423
|
+
const center = latLngBoundCenterPoint(bounds);
|
|
424
|
+
const offsetWidth = sizing.leftMargin + sizing.rightMargin; // 300 + 0
|
|
425
|
+
const newWidth = sizing.fullWidth - offsetWidth; // 1000 - 300 - 0
|
|
426
|
+
const newWidthRatio = newWidth / sizing.fullWidth; // 700 / 1000
|
|
427
|
+
const newCenterLongitudeWidth = diff.lng * newWidthRatio; // 70% offset
|
|
428
|
+
const effectiveOffset = {
|
|
429
|
+
lat: 0,
|
|
430
|
+
lng: newCenterLongitudeWidth / 2
|
|
431
|
+
};
|
|
432
|
+
const newCenter = addLatLngPoints(bounds.sw, effectiveOffset);
|
|
433
|
+
newCenter.lat = center.lat; // retain center position
|
|
434
|
+
// console.log({ sizing, bounds, effectiveOffset, newWidth, offsetWidth, diff, center, newCenter });
|
|
435
|
+
return newCenter;
|
|
436
|
+
}))));
|
|
411
437
|
}
|
|
412
438
|
}
|
|
413
439
|
DbxMapboxMapStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMapStore, deps: [{ token: DbxMapboxService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -466,7 +492,7 @@ class DbxMapboxLayoutDrawerComponent {
|
|
|
466
492
|
}
|
|
467
493
|
}
|
|
468
494
|
DbxMapboxLayoutDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
469
|
-
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" }] });
|
|
470
496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
471
497
|
type: Component,
|
|
472
498
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
@@ -488,11 +514,13 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
488
514
|
this._resized = new Subject();
|
|
489
515
|
this._updateMargins = new Subject();
|
|
490
516
|
this._forceHasContent = new BehaviorSubject(false);
|
|
517
|
+
this._mode = new BehaviorSubject('side');
|
|
491
518
|
this._side = new BehaviorSubject('right');
|
|
492
519
|
this._openToggle = new BehaviorSubject(true);
|
|
493
520
|
this._color = new BehaviorSubject(undefined);
|
|
494
521
|
this._toggleSub = new SubscriptionObject();
|
|
495
522
|
this.side$ = this._side.pipe(distinctUntilChanged(), shareReplay(1));
|
|
523
|
+
this.mode$ = this._mode.pipe(distinctUntilChanged(), shareReplay(1));
|
|
496
524
|
this.hasContent$ = combineLatest([this._forceHasContent, this.dbxMapboxMapStore.hasContent$]).pipe(map(([hasContent, forceHasContent]) => hasContent || forceHasContent), distinctUntilChanged(), shareReplay(1));
|
|
497
525
|
this.opened$ = combineLatest([this.hasContent$, this._openToggle]).pipe(map(([hasContent, open]) => hasContent && open), distinctUntilChanged(), shareReplay(1));
|
|
498
526
|
this.position$ = this.side$.pipe(map((x) => (x === 'right' ? 'end' : 'start')), distinctUntilChanged(), shareReplay(1));
|
|
@@ -522,27 +550,47 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
522
550
|
}
|
|
523
551
|
});
|
|
524
552
|
});
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
right = this.container._contentMargins
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
553
|
+
let init = false;
|
|
554
|
+
this._toggleSub.subscription = this.mode$
|
|
555
|
+
.pipe(switchMap((mode) => {
|
|
556
|
+
let obs;
|
|
557
|
+
if (mode === 'push') {
|
|
558
|
+
obs = combineLatest([this.opened$.pipe(distinctUntilChanged()), this._updateMargins]).pipe(tap(([opened]) => {
|
|
559
|
+
let { right } = this.container._contentMargins;
|
|
560
|
+
this.container.updateContentMargins();
|
|
561
|
+
setTimeout(() => {
|
|
562
|
+
const flip = opened ? 1 : -1;
|
|
563
|
+
if (opened) {
|
|
564
|
+
right = this.container._contentMargins.right;
|
|
565
|
+
}
|
|
566
|
+
right = (right || 0) * flip;
|
|
567
|
+
const element = this.content.nativeElement;
|
|
568
|
+
const width = element.clientWidth;
|
|
569
|
+
const margin = {
|
|
570
|
+
leftMargin: 0,
|
|
571
|
+
rightMargin: right,
|
|
572
|
+
fullWidth: width
|
|
573
|
+
};
|
|
574
|
+
const easeTo = this.dbxMapboxMapStore.calculateNextCenterOffsetWithScreenMarginChange(margin).pipe(first(), map((center) => ({ to: { center, duration: 3200, essential: false } })));
|
|
575
|
+
this.dbxMapboxMapStore.setMargin(opened ? margin : undefined);
|
|
576
|
+
if (!init) {
|
|
577
|
+
this.dbxMapboxMapStore.easeTo(easeTo);
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
init = true;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
}));
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
obs = combineLatest([this.opened$.pipe(distinctUntilChanged()), this._updateMargins]).pipe(switchMap((_) => this.dbxMapboxMapStore.mapInstance$), tap((x) => {
|
|
587
|
+
this.container.updateContentMargins();
|
|
588
|
+
x.triggerRepaint();
|
|
589
|
+
}));
|
|
590
|
+
}
|
|
591
|
+
return obs;
|
|
592
|
+
}))
|
|
593
|
+
.subscribe();
|
|
546
594
|
}
|
|
547
595
|
ngOnDestroy() {
|
|
548
596
|
this._resized.complete();
|
|
@@ -564,6 +612,11 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
564
612
|
this._side.next(side);
|
|
565
613
|
}
|
|
566
614
|
}
|
|
615
|
+
set mode(mode) {
|
|
616
|
+
if (mode != null) {
|
|
617
|
+
this._mode.next(mode);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
567
620
|
set opened(opened) {
|
|
568
621
|
if (opened != null) {
|
|
569
622
|
this._openToggle.next(opened);
|
|
@@ -582,10 +635,10 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
582
635
|
}
|
|
583
636
|
}
|
|
584
637
|
DbxMapboxLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
585
|
-
DbxMapboxLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", 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=\"
|
|
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" }] });
|
|
586
639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
587
640
|
type: Component,
|
|
588
|
-
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=\"
|
|
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"] }]
|
|
589
642
|
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; }, propDecorators: { container: [{
|
|
590
643
|
type: ViewChild,
|
|
591
644
|
args: [MatDrawerContainer]
|
|
@@ -594,6 +647,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
594
647
|
args: ['content', { read: ElementRef, static: true }]
|
|
595
648
|
}], side: [{
|
|
596
649
|
type: Input
|
|
650
|
+
}], mode: [{
|
|
651
|
+
type: Input
|
|
597
652
|
}], opened: [{
|
|
598
653
|
type: Input
|
|
599
654
|
}], hasContent: [{
|
|
@@ -669,7 +724,7 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
|
|
|
669
724
|
this._active.next(active ?? true);
|
|
670
725
|
}
|
|
671
726
|
}
|
|
672
|
-
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 });
|
|
673
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 });
|
|
674
729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
675
730
|
type: Component,
|
|
@@ -683,7 +738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
683
738
|
},
|
|
684
739
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
685
740
|
}]
|
|
686
|
-
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$
|
|
741
|
+
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$1.MatMenuTrigger, decorators: [{
|
|
687
742
|
type: Host
|
|
688
743
|
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { active: [{
|
|
689
744
|
type: Input,
|
|
@@ -738,12 +793,157 @@ function provideMapboxStoreIfParentIsUnavailable() {
|
|
|
738
793
|
};
|
|
739
794
|
}
|
|
740
795
|
|
|
796
|
+
class DbxMapboxMarkerComponent {
|
|
797
|
+
constructor() { }
|
|
798
|
+
get marker() {
|
|
799
|
+
return this._marker;
|
|
800
|
+
}
|
|
801
|
+
set marker(marker) {
|
|
802
|
+
this._marker = marker;
|
|
803
|
+
}
|
|
804
|
+
get latLng() {
|
|
805
|
+
const input = this._marker?.latLng;
|
|
806
|
+
return input ? DbxMapboxMarkerComponent._latLngPoint(input) : undefined;
|
|
807
|
+
}
|
|
808
|
+
get anchor() {
|
|
809
|
+
return this._marker?.anchor;
|
|
810
|
+
}
|
|
811
|
+
get label() {
|
|
812
|
+
return this._marker?.label;
|
|
813
|
+
}
|
|
814
|
+
get icon() {
|
|
815
|
+
return this._marker?.icon;
|
|
816
|
+
}
|
|
817
|
+
get style() {
|
|
818
|
+
let width = 0;
|
|
819
|
+
let height = 0;
|
|
820
|
+
const size = this._marker?.size || 'medium';
|
|
821
|
+
if (typeof size === 'number') {
|
|
822
|
+
width = size;
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
switch (size) {
|
|
826
|
+
case 'small':
|
|
827
|
+
width = 18;
|
|
828
|
+
break;
|
|
829
|
+
case 'medium':
|
|
830
|
+
width = 24;
|
|
831
|
+
break;
|
|
832
|
+
case 'large':
|
|
833
|
+
width = 32;
|
|
834
|
+
break;
|
|
835
|
+
case 'tall':
|
|
836
|
+
width = 24;
|
|
837
|
+
height = 32;
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
if (!height) {
|
|
842
|
+
height = width;
|
|
843
|
+
}
|
|
844
|
+
const imageInput = this._marker?.image;
|
|
845
|
+
const image = imageInput ? (typeof imageInput === 'string' ? imageInput : getValueFromGetter(imageInput, width)) : undefined;
|
|
846
|
+
const style = {
|
|
847
|
+
...this._marker?.style,
|
|
848
|
+
width: width + 'px',
|
|
849
|
+
height: height + 'px',
|
|
850
|
+
'font-size': width + 'px',
|
|
851
|
+
'background-image': image
|
|
852
|
+
};
|
|
853
|
+
return style;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
DbxMapboxMarkerComponent._latLngPoint = latLngPointFunction({ wrap: true });
|
|
857
|
+
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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: `
|
|
859
|
+
<mgl-marker *ngIf="marker" [lngLat]="latLng">
|
|
860
|
+
<dbx-anchor [anchor]="anchor">
|
|
861
|
+
<div class="dbx-mapbox-marker">
|
|
862
|
+
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
863
|
+
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
864
|
+
</div>
|
|
865
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
866
|
+
</div>
|
|
867
|
+
</dbx-anchor>
|
|
868
|
+
</mgl-marker>
|
|
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 });
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
871
|
+
type: Component,
|
|
872
|
+
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
873
|
+
<mgl-marker *ngIf="marker" [lngLat]="latLng">
|
|
874
|
+
<dbx-anchor [anchor]="anchor">
|
|
875
|
+
<div class="dbx-mapbox-marker">
|
|
876
|
+
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
877
|
+
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
878
|
+
</div>
|
|
879
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
880
|
+
</div>
|
|
881
|
+
</dbx-anchor>
|
|
882
|
+
</mgl-marker>
|
|
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"] }]
|
|
884
|
+
}], ctorParameters: function () { return []; }, propDecorators: { marker: [{
|
|
885
|
+
type: Input
|
|
886
|
+
}] } });
|
|
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
|
+
|
|
741
939
|
const declarations = [
|
|
742
940
|
//
|
|
743
941
|
DbxMapboxMapDirective,
|
|
744
942
|
DbxMapboxLayoutComponent,
|
|
745
943
|
DbxMapboxLayoutDrawerComponent,
|
|
746
944
|
DbxMapboxMenuComponent,
|
|
945
|
+
DbxMapboxMarkerComponent,
|
|
946
|
+
DbxMapboxMarkersComponent,
|
|
747
947
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
748
948
|
];
|
|
749
949
|
class DbxMapboxModule {
|
|
@@ -766,6 +966,8 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
766
966
|
DbxMapboxLayoutComponent,
|
|
767
967
|
DbxMapboxLayoutDrawerComponent,
|
|
768
968
|
DbxMapboxMenuComponent,
|
|
969
|
+
DbxMapboxMarkerComponent,
|
|
970
|
+
DbxMapboxMarkersComponent,
|
|
769
971
|
DbxMapboxMapStoreInjectionBlockDirective], imports: [
|
|
770
972
|
//
|
|
771
973
|
CommonModule,
|
|
@@ -773,12 +975,16 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
773
975
|
DbxInjectionComponentModule,
|
|
774
976
|
MatButtonModule,
|
|
775
977
|
MatIconModule,
|
|
776
|
-
AngularResizeEventModule
|
|
978
|
+
AngularResizeEventModule,
|
|
979
|
+
DbxRouterAnchorModule,
|
|
980
|
+
NgxMapboxGLModule], exports: [
|
|
777
981
|
//
|
|
778
982
|
DbxMapboxMapDirective,
|
|
779
983
|
DbxMapboxLayoutComponent,
|
|
780
984
|
DbxMapboxLayoutDrawerComponent,
|
|
781
985
|
DbxMapboxMenuComponent,
|
|
986
|
+
DbxMapboxMarkerComponent,
|
|
987
|
+
DbxMapboxMarkersComponent,
|
|
782
988
|
DbxMapboxMapStoreInjectionBlockDirective] });
|
|
783
989
|
DbxMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxModule, imports: [
|
|
784
990
|
//
|
|
@@ -787,7 +993,9 @@ DbxMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
|
|
|
787
993
|
DbxInjectionComponentModule,
|
|
788
994
|
MatButtonModule,
|
|
789
995
|
MatIconModule,
|
|
790
|
-
AngularResizeEventModule
|
|
996
|
+
AngularResizeEventModule,
|
|
997
|
+
DbxRouterAnchorModule,
|
|
998
|
+
NgxMapboxGLModule] });
|
|
791
999
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxModule, decorators: [{
|
|
792
1000
|
type: NgModule,
|
|
793
1001
|
args: [{
|
|
@@ -798,13 +1006,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
798
1006
|
DbxInjectionComponentModule,
|
|
799
1007
|
MatButtonModule,
|
|
800
1008
|
MatIconModule,
|
|
801
|
-
AngularResizeEventModule
|
|
1009
|
+
AngularResizeEventModule,
|
|
1010
|
+
DbxRouterAnchorModule,
|
|
1011
|
+
NgxMapboxGLModule
|
|
802
1012
|
],
|
|
803
1013
|
declarations,
|
|
804
1014
|
exports: declarations
|
|
805
1015
|
}]
|
|
806
1016
|
}] });
|
|
807
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
|
+
|
|
808
1034
|
const KNOWN_MAPBOX_STYLES = [
|
|
809
1035
|
//
|
|
810
1036
|
'mapbox://styles/mapbox/streets-v11',
|
|
@@ -826,5 +1052,5 @@ function mapboxZoomLevel(input) {
|
|
|
826
1052
|
* Generated bundle index. Do not edit.
|
|
827
1053
|
*/
|
|
828
1054
|
|
|
829
|
-
export { DEFAULT_MAPBOX_CENTER, DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD, DEFAULT_MAPBOX_STYLE, DEFAULT_MAPBOX_ZOOM, DbxMapboxConfig, DbxMapboxLayoutComponent, DbxMapboxLayoutDrawerComponent, DbxMapboxMapDirective, DbxMapboxMapStore, DbxMapboxMapStoreInjectionBlockDirective, DbxMapboxMapStoreProviderBlock, 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 };
|
|
830
1056
|
//# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map
|