@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
|
-
import { latLngPointFunction, latLngBoundFunction, isSameLatLngPoint, isSameLatLngBound, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, diffLatLngBoundPoints, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject } from '@dereekb/util';
|
|
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';
|
|
7
|
+
import { NgxMapboxGLModule } from 'ngx-mapbox-gl';
|
|
7
8
|
import { cleanup, filterMaybe, onTrueToFalse, SubscriptionObject } from '@dereekb/rxjs';
|
|
8
9
|
import { ComponentStore } from '@ngrx/component-store';
|
|
9
|
-
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, BehaviorSubject, throttleTime
|
|
10
|
+
import { switchMap, NEVER, defaultIfEmpty, map, tap, distinctUntilChanged, shareReplay, of, combineLatest, filter, first, startWith, interval, Subject, BehaviorSubject, throttleTime } from 'rxjs';
|
|
10
11
|
import * as MapboxGl from 'mapbox-gl';
|
|
11
|
-
import
|
|
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) {
|
|
@@ -75,7 +77,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
75
77
|
});
|
|
76
78
|
this.dbxMapboxService = dbxMapboxService;
|
|
77
79
|
this.latLngPoint = latLngPointFunction();
|
|
78
|
-
this.latLngBound = latLngBoundFunction();
|
|
80
|
+
this.latLngBound = latLngBoundFunction({ pointFunction: latLngPointFunction({ wrap: false, validate: false }) });
|
|
79
81
|
// MARK: Effects
|
|
80
82
|
this.setMapService = this.effect((input) => {
|
|
81
83
|
return input.pipe(switchMap((service) => {
|
|
@@ -319,17 +321,41 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
319
321
|
this.isRotating$ = this.whenInitialized$.pipe(switchMap(() => this.rotateState$.pipe(map((x) => x === 'rotating'), distinctUntilChanged(), shareReplay())));
|
|
320
322
|
this._movingTimer = this.movingTimer();
|
|
321
323
|
this._renderingTimer = this.lifecycleRenderTimer();
|
|
322
|
-
this.centerNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => this.latLngPoint(x.getCenter())))), shareReplay(1))));
|
|
324
|
+
this.centerNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => this.latLngPoint(x.getCenter())))), shareReplay(1))), shareReplay(1));
|
|
323
325
|
this.center$ = this.whenInitialized$.pipe(switchMap(() => {
|
|
324
326
|
return this.isMoving$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.centerNow$.pipe(first())), distinctUntilChanged(isSameLatLngPoint), shareReplay(1));
|
|
327
|
+
}), shareReplay(1));
|
|
328
|
+
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));
|
|
329
|
+
this.reverseMargin$ = this.margin$.pipe(map((x) => {
|
|
330
|
+
if (x) {
|
|
331
|
+
return { leftMargin: -x.leftMargin, rightMargin: -x.rightMargin, fullWidth: x.fullWidth };
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
return x;
|
|
335
|
+
}
|
|
325
336
|
}));
|
|
337
|
+
this.centerGivenMargin$ = this.whenInitialized$.pipe(switchMap(() => {
|
|
338
|
+
return this.reverseMargin$.pipe(switchMap((x) => {
|
|
339
|
+
if (x) {
|
|
340
|
+
return this.center$.pipe(switchMap((_) => this.calculateNextCenterOffsetWithScreenMarginChange(x)));
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
return this.isMoving$.pipe(filter((x) => !x), switchMap(() => this.center$));
|
|
344
|
+
}
|
|
345
|
+
}));
|
|
346
|
+
}), shareReplay(1));
|
|
326
347
|
this.boundNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => {
|
|
327
348
|
const bound = x.getBounds();
|
|
328
|
-
|
|
349
|
+
const boundSw = bound.getSouthWest();
|
|
350
|
+
const boundNe = bound.getNorthEast();
|
|
351
|
+
const sw = isDefaultLatLngPoint(boundSw) ? swMostLatLngPoint() : boundSw;
|
|
352
|
+
const ne = isDefaultLatLngPoint(boundNe) ? neMostLatLngPoint() : boundNe;
|
|
353
|
+
return this.latLngBound(sw, ne);
|
|
329
354
|
}))), shareReplay(1))));
|
|
330
355
|
this.bound$ = this.whenInitialized$.pipe(switchMap(() => {
|
|
331
356
|
return this.isRendering$.pipe(onTrueToFalse(), startWith(undefined), switchMap((x) => this.boundNow$.pipe(first())), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
|
|
332
357
|
}));
|
|
358
|
+
this.boundWrapsAroundWorld$ = this.bound$.pipe(map((x) => latLngBoundWrapsMap(x)), distinctUntilChanged(), shareReplay(1));
|
|
333
359
|
this.isWithinBoundFunction$ = this.bound$.pipe(map((x) => isWithinLatLngBoundFunction(x)), shareReplay(1));
|
|
334
360
|
this.overlapsBoundFunction$ = this.bound$.pipe(map((x) => overlapsLatLngBoundFunction(x)), shareReplay(1));
|
|
335
361
|
this.zoomNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => x.getZoom()))), shareReplay(1))));
|
|
@@ -350,6 +376,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
350
376
|
this.doubleClickEvent$ = this.state$.pipe(map((x) => x.doubleClickEvent), distinctUntilChanged(), shareReplay(1));
|
|
351
377
|
this.rightClickEvent$ = this.state$.pipe(map((x) => x.rightClickEvent), distinctUntilChanged(), shareReplay(1));
|
|
352
378
|
// MARK: State Changes
|
|
379
|
+
this.setMargin = this.updater((state, margin) => (Object.assign(Object.assign({}, state), { margin: margin && (margin.rightMargin !== 0 || margin.leftMargin !== 0) ? margin : undefined })));
|
|
353
380
|
this._setMapService = this.updater((state, mapService) => ({ mapService, moveState: 'init', lifecycleState: 'init', zoomState: 'init', rotateState: 'init', retainContent: state.retainContent, content: state.retainContent ? state.content : undefined }));
|
|
354
381
|
this._setLifecycleState = this.updater((state, lifecycleState) => (Object.assign(Object.assign({}, state), { lifecycleState })));
|
|
355
382
|
this._setMoveState = this.updater((state, moveState) => (Object.assign(Object.assign({}, state), { moveState })));
|
|
@@ -400,23 +427,22 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
400
427
|
}))));
|
|
401
428
|
}
|
|
402
429
|
calculateNextCenterOffsetWithScreenMarginChange(sizing) {
|
|
403
|
-
return this.atNextIdle().pipe(switchMap(() => this.bound$.pipe(
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
})))));
|
|
430
|
+
return this.atNextIdle().pipe(switchMap(() => this.bound$.pipe(first(), map((bounds) => {
|
|
431
|
+
const diff = diffLatLngBoundPoints(bounds);
|
|
432
|
+
const center = latLngBoundCenterPoint(bounds);
|
|
433
|
+
const offsetWidth = sizing.leftMargin + sizing.rightMargin; // 300 + 0
|
|
434
|
+
const newWidth = sizing.fullWidth - offsetWidth; // 1000 - 300 - 0
|
|
435
|
+
const newWidthRatio = newWidth / sizing.fullWidth; // 700 / 1000
|
|
436
|
+
const newCenterLongitudeWidth = diff.lng * newWidthRatio; // 70% offset
|
|
437
|
+
const effectiveOffset = {
|
|
438
|
+
lat: 0,
|
|
439
|
+
lng: newCenterLongitudeWidth / 2
|
|
440
|
+
};
|
|
441
|
+
const newCenter = addLatLngPoints(bounds.sw, effectiveOffset);
|
|
442
|
+
newCenter.lat = center.lat; // retain center position
|
|
443
|
+
// console.log({ sizing, bounds, effectiveOffset, newWidth, offsetWidth, diff, center, newCenter });
|
|
444
|
+
return newCenter;
|
|
445
|
+
}))));
|
|
420
446
|
}
|
|
421
447
|
}
|
|
422
448
|
DbxMapboxMapStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMapStore, deps: [{ token: DbxMapboxService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -479,7 +505,7 @@ class DbxMapboxLayoutDrawerComponent {
|
|
|
479
505
|
}
|
|
480
506
|
}
|
|
481
507
|
DbxMapboxLayoutDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
482
|
-
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" }] });
|
|
483
509
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
484
510
|
type: Component,
|
|
485
511
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
@@ -501,11 +527,13 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
501
527
|
this._resized = new Subject();
|
|
502
528
|
this._updateMargins = new Subject();
|
|
503
529
|
this._forceHasContent = new BehaviorSubject(false);
|
|
530
|
+
this._mode = new BehaviorSubject('side');
|
|
504
531
|
this._side = new BehaviorSubject('right');
|
|
505
532
|
this._openToggle = new BehaviorSubject(true);
|
|
506
533
|
this._color = new BehaviorSubject(undefined);
|
|
507
534
|
this._toggleSub = new SubscriptionObject();
|
|
508
535
|
this.side$ = this._side.pipe(distinctUntilChanged(), shareReplay(1));
|
|
536
|
+
this.mode$ = this._mode.pipe(distinctUntilChanged(), shareReplay(1));
|
|
509
537
|
this.hasContent$ = combineLatest([this._forceHasContent, this.dbxMapboxMapStore.hasContent$]).pipe(map(([hasContent, forceHasContent]) => hasContent || forceHasContent), distinctUntilChanged(), shareReplay(1));
|
|
510
538
|
this.opened$ = combineLatest([this.hasContent$, this._openToggle]).pipe(map(([hasContent, open]) => hasContent && open), distinctUntilChanged(), shareReplay(1));
|
|
511
539
|
this.position$ = this.side$.pipe(map((x) => (x === 'right' ? 'end' : 'start')), distinctUntilChanged(), shareReplay(1));
|
|
@@ -535,27 +563,47 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
535
563
|
}
|
|
536
564
|
});
|
|
537
565
|
});
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
right = this.container._contentMargins
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
566
|
+
let init = false;
|
|
567
|
+
this._toggleSub.subscription = this.mode$
|
|
568
|
+
.pipe(switchMap((mode) => {
|
|
569
|
+
let obs;
|
|
570
|
+
if (mode === 'push') {
|
|
571
|
+
obs = combineLatest([this.opened$.pipe(distinctUntilChanged()), this._updateMargins]).pipe(tap(([opened]) => {
|
|
572
|
+
let { right } = this.container._contentMargins;
|
|
573
|
+
this.container.updateContentMargins();
|
|
574
|
+
setTimeout(() => {
|
|
575
|
+
const flip = opened ? 1 : -1;
|
|
576
|
+
if (opened) {
|
|
577
|
+
right = this.container._contentMargins.right;
|
|
578
|
+
}
|
|
579
|
+
right = (right || 0) * flip;
|
|
580
|
+
const element = this.content.nativeElement;
|
|
581
|
+
const width = element.clientWidth;
|
|
582
|
+
const margin = {
|
|
583
|
+
leftMargin: 0,
|
|
584
|
+
rightMargin: right,
|
|
585
|
+
fullWidth: width
|
|
586
|
+
};
|
|
587
|
+
const easeTo = this.dbxMapboxMapStore.calculateNextCenterOffsetWithScreenMarginChange(margin).pipe(first(), map((center) => ({ to: { center, duration: 3200, essential: false } })));
|
|
588
|
+
this.dbxMapboxMapStore.setMargin(opened ? margin : undefined);
|
|
589
|
+
if (!init) {
|
|
590
|
+
this.dbxMapboxMapStore.easeTo(easeTo);
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
init = true;
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
}));
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
obs = combineLatest([this.opened$.pipe(distinctUntilChanged()), this._updateMargins]).pipe(switchMap((_) => this.dbxMapboxMapStore.mapInstance$), tap((x) => {
|
|
600
|
+
this.container.updateContentMargins();
|
|
601
|
+
x.triggerRepaint();
|
|
602
|
+
}));
|
|
603
|
+
}
|
|
604
|
+
return obs;
|
|
605
|
+
}))
|
|
606
|
+
.subscribe();
|
|
559
607
|
}
|
|
560
608
|
ngOnDestroy() {
|
|
561
609
|
this._resized.complete();
|
|
@@ -577,6 +625,11 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
577
625
|
this._side.next(side);
|
|
578
626
|
}
|
|
579
627
|
}
|
|
628
|
+
set mode(mode) {
|
|
629
|
+
if (mode != null) {
|
|
630
|
+
this._mode.next(mode);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
580
633
|
set opened(opened) {
|
|
581
634
|
if (opened != null) {
|
|
582
635
|
this._openToggle.next(opened);
|
|
@@ -595,10 +648,10 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
|
|
|
595
648
|
}
|
|
596
649
|
}
|
|
597
650
|
DbxMapboxLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
598
|
-
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=\"
|
|
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" }] });
|
|
599
652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
600
653
|
type: Component,
|
|
601
|
-
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=\"
|
|
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"] }]
|
|
602
655
|
}], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; }, propDecorators: { container: [{
|
|
603
656
|
type: ViewChild,
|
|
604
657
|
args: [MatDrawerContainer]
|
|
@@ -607,6 +660,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
607
660
|
args: ['content', { read: ElementRef, static: true }]
|
|
608
661
|
}], side: [{
|
|
609
662
|
type: Input
|
|
663
|
+
}], mode: [{
|
|
664
|
+
type: Input
|
|
610
665
|
}], opened: [{
|
|
611
666
|
type: Input
|
|
612
667
|
}], hasContent: [{
|
|
@@ -682,7 +737,7 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
|
|
|
682
737
|
this._active.next(active !== null && active !== void 0 ? active : true);
|
|
683
738
|
}
|
|
684
739
|
}
|
|
685
|
-
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 });
|
|
686
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 });
|
|
687
742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
688
743
|
type: Component,
|
|
@@ -697,7 +752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
697
752
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
698
753
|
}]
|
|
699
754
|
}], ctorParameters: function () {
|
|
700
|
-
return [{ type: DbxMapboxMapStore }, { type: i2$
|
|
755
|
+
return [{ type: DbxMapboxMapStore }, { type: i2$1.MatMenuTrigger, decorators: [{
|
|
701
756
|
type: Host
|
|
702
757
|
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }];
|
|
703
758
|
}, propDecorators: { active: [{
|
|
@@ -755,12 +810,156 @@ function provideMapboxStoreIfParentIsUnavailable() {
|
|
|
755
810
|
};
|
|
756
811
|
}
|
|
757
812
|
|
|
813
|
+
class DbxMapboxMarkerComponent {
|
|
814
|
+
constructor() { }
|
|
815
|
+
get marker() {
|
|
816
|
+
return this._marker;
|
|
817
|
+
}
|
|
818
|
+
set marker(marker) {
|
|
819
|
+
this._marker = marker;
|
|
820
|
+
}
|
|
821
|
+
get latLng() {
|
|
822
|
+
var _a;
|
|
823
|
+
const input = (_a = this._marker) === null || _a === void 0 ? void 0 : _a.latLng;
|
|
824
|
+
return input ? DbxMapboxMarkerComponent._latLngPoint(input) : undefined;
|
|
825
|
+
}
|
|
826
|
+
get anchor() {
|
|
827
|
+
var _a;
|
|
828
|
+
return (_a = this._marker) === null || _a === void 0 ? void 0 : _a.anchor;
|
|
829
|
+
}
|
|
830
|
+
get label() {
|
|
831
|
+
var _a;
|
|
832
|
+
return (_a = this._marker) === null || _a === void 0 ? void 0 : _a.label;
|
|
833
|
+
}
|
|
834
|
+
get icon() {
|
|
835
|
+
var _a;
|
|
836
|
+
return (_a = this._marker) === null || _a === void 0 ? void 0 : _a.icon;
|
|
837
|
+
}
|
|
838
|
+
get style() {
|
|
839
|
+
var _a, _b, _c;
|
|
840
|
+
let width = 0;
|
|
841
|
+
let height = 0;
|
|
842
|
+
const size = ((_a = this._marker) === null || _a === void 0 ? void 0 : _a.size) || 'medium';
|
|
843
|
+
if (typeof size === 'number') {
|
|
844
|
+
width = size;
|
|
845
|
+
}
|
|
846
|
+
else {
|
|
847
|
+
switch (size) {
|
|
848
|
+
case 'small':
|
|
849
|
+
width = 18;
|
|
850
|
+
break;
|
|
851
|
+
case 'medium':
|
|
852
|
+
width = 24;
|
|
853
|
+
break;
|
|
854
|
+
case 'large':
|
|
855
|
+
width = 32;
|
|
856
|
+
break;
|
|
857
|
+
case 'tall':
|
|
858
|
+
width = 24;
|
|
859
|
+
height = 32;
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
if (!height) {
|
|
864
|
+
height = width;
|
|
865
|
+
}
|
|
866
|
+
const imageInput = (_b = this._marker) === null || _b === void 0 ? void 0 : _b.image;
|
|
867
|
+
const image = imageInput ? (typeof imageInput === 'string' ? imageInput : getValueFromGetter(imageInput, width)) : undefined;
|
|
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 });
|
|
869
|
+
return style;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
DbxMapboxMarkerComponent._latLngPoint = latLngPointFunction({ wrap: true });
|
|
873
|
+
DbxMapboxMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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: `
|
|
875
|
+
<mgl-marker *ngIf="marker" [lngLat]="latLng">
|
|
876
|
+
<dbx-anchor [anchor]="anchor">
|
|
877
|
+
<div class="dbx-mapbox-marker">
|
|
878
|
+
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
879
|
+
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
880
|
+
</div>
|
|
881
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
882
|
+
</div>
|
|
883
|
+
</dbx-anchor>
|
|
884
|
+
</mgl-marker>
|
|
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 });
|
|
886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
887
|
+
type: Component,
|
|
888
|
+
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
889
|
+
<mgl-marker *ngIf="marker" [lngLat]="latLng">
|
|
890
|
+
<dbx-anchor [anchor]="anchor">
|
|
891
|
+
<div class="dbx-mapbox-marker">
|
|
892
|
+
<div class="dbx-mapbox-marker-content" [ngStyle]="style">
|
|
893
|
+
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
894
|
+
</div>
|
|
895
|
+
<div class="dbx-mapbox-marker-label dbx-outlined-text" *ngIf="label">{{ label }}</div>
|
|
896
|
+
</div>
|
|
897
|
+
</dbx-anchor>
|
|
898
|
+
</mgl-marker>
|
|
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"] }]
|
|
900
|
+
}], ctorParameters: function () { return []; }, propDecorators: { marker: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}] } });
|
|
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
|
+
|
|
758
955
|
const declarations = [
|
|
759
956
|
//
|
|
760
957
|
DbxMapboxMapDirective,
|
|
761
958
|
DbxMapboxLayoutComponent,
|
|
762
959
|
DbxMapboxLayoutDrawerComponent,
|
|
763
960
|
DbxMapboxMenuComponent,
|
|
961
|
+
DbxMapboxMarkerComponent,
|
|
962
|
+
DbxMapboxMarkersComponent,
|
|
764
963
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
765
964
|
];
|
|
766
965
|
class DbxMapboxModule {
|
|
@@ -783,6 +982,8 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
783
982
|
DbxMapboxLayoutComponent,
|
|
784
983
|
DbxMapboxLayoutDrawerComponent,
|
|
785
984
|
DbxMapboxMenuComponent,
|
|
985
|
+
DbxMapboxMarkerComponent,
|
|
986
|
+
DbxMapboxMarkersComponent,
|
|
786
987
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
787
988
|
], imports: [
|
|
788
989
|
//
|
|
@@ -791,13 +992,17 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
791
992
|
DbxInjectionComponentModule,
|
|
792
993
|
MatButtonModule,
|
|
793
994
|
MatIconModule,
|
|
794
|
-
AngularResizeEventModule
|
|
995
|
+
AngularResizeEventModule,
|
|
996
|
+
DbxRouterAnchorModule,
|
|
997
|
+
NgxMapboxGLModule
|
|
795
998
|
], exports: [
|
|
796
999
|
//
|
|
797
1000
|
DbxMapboxMapDirective,
|
|
798
1001
|
DbxMapboxLayoutComponent,
|
|
799
1002
|
DbxMapboxLayoutDrawerComponent,
|
|
800
1003
|
DbxMapboxMenuComponent,
|
|
1004
|
+
DbxMapboxMarkerComponent,
|
|
1005
|
+
DbxMapboxMarkersComponent,
|
|
801
1006
|
DbxMapboxMapStoreInjectionBlockDirective
|
|
802
1007
|
] });
|
|
803
1008
|
DbxMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxModule, imports: [
|
|
@@ -807,7 +1012,9 @@ DbxMapboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
|
|
|
807
1012
|
DbxInjectionComponentModule,
|
|
808
1013
|
MatButtonModule,
|
|
809
1014
|
MatIconModule,
|
|
810
|
-
AngularResizeEventModule
|
|
1015
|
+
AngularResizeEventModule,
|
|
1016
|
+
DbxRouterAnchorModule,
|
|
1017
|
+
NgxMapboxGLModule
|
|
811
1018
|
] });
|
|
812
1019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxMapboxModule, decorators: [{
|
|
813
1020
|
type: NgModule,
|
|
@@ -819,13 +1026,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
819
1026
|
DbxInjectionComponentModule,
|
|
820
1027
|
MatButtonModule,
|
|
821
1028
|
MatIconModule,
|
|
822
|
-
AngularResizeEventModule
|
|
1029
|
+
AngularResizeEventModule,
|
|
1030
|
+
DbxRouterAnchorModule,
|
|
1031
|
+
NgxMapboxGLModule
|
|
823
1032
|
],
|
|
824
1033
|
declarations,
|
|
825
1034
|
exports: declarations
|
|
826
1035
|
}]
|
|
827
1036
|
}] });
|
|
828
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
|
+
|
|
829
1054
|
const KNOWN_MAPBOX_STYLES = [
|
|
830
1055
|
//
|
|
831
1056
|
'mapbox://styles/mapbox/streets-v11',
|
|
@@ -847,5 +1072,5 @@ function mapboxZoomLevel(input) {
|
|
|
847
1072
|
* Generated bundle index. Do not edit.
|
|
848
1073
|
*/
|
|
849
1074
|
|
|
850
|
-
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 };
|
|
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 };
|
|
851
1076
|
//# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map
|