@dereekb/dbx-web 9.24.18 → 9.24.20

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.
Files changed (43) hide show
  1. package/calendar/package.json +2 -2
  2. package/esm2020/lib/dbx-web.module.mjs +1 -17
  3. package/esm2020/lib/extension/index.mjs +4 -1
  4. package/esm2020/lib/extension/structure/index.mjs +4 -0
  5. package/esm2020/lib/extension/structure/structure.body.directive.mjs +28 -0
  6. package/esm2020/lib/extension/structure/structure.module.mjs +27 -0
  7. package/esm2020/lib/extension/structure/structure.structure.directive.mjs +23 -0
  8. package/esm2020/mapbox/lib/index.mjs +2 -1
  9. package/esm2020/mapbox/lib/mapbox.layout.component.mjs +13 -9
  10. package/esm2020/mapbox/lib/mapbox.layout.resize.sync.directive.mjs +38 -0
  11. package/esm2020/mapbox/lib/mapbox.module.mjs +5 -1
  12. package/esm2020/mapbox/lib/mapbox.store.mjs +66 -11
  13. package/fesm2015/dereekb-dbx-web-mapbox.mjs +114 -19
  14. package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  15. package/fesm2015/dereekb-dbx-web.mjs +103 -47
  16. package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
  17. package/fesm2020/dereekb-dbx-web-mapbox.mjs +112 -19
  18. package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  19. package/fesm2020/dereekb-dbx-web.mjs +101 -47
  20. package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
  21. package/lib/dbx-web.module.d.ts +0 -10
  22. package/lib/extension/index.d.ts +1 -0
  23. package/lib/extension/structure/index.d.ts +3 -0
  24. package/lib/extension/structure/structure.body.directive.d.ts +9 -0
  25. package/lib/extension/structure/structure.module.d.ts +9 -0
  26. package/lib/extension/structure/structure.structure.directive.d.ts +15 -0
  27. package/mapbox/esm2020/lib/index.mjs +2 -1
  28. package/mapbox/esm2020/lib/mapbox.layout.component.mjs +13 -9
  29. package/mapbox/esm2020/lib/mapbox.layout.resize.sync.directive.mjs +38 -0
  30. package/mapbox/esm2020/lib/mapbox.module.mjs +5 -1
  31. package/mapbox/esm2020/lib/mapbox.store.mjs +66 -11
  32. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +114 -19
  33. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  34. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +112 -19
  35. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  36. package/mapbox/lib/index.d.ts +1 -0
  37. package/mapbox/lib/mapbox.layout.component.d.ts +3 -1
  38. package/mapbox/lib/mapbox.layout.resize.sync.directive.d.ts +15 -0
  39. package/mapbox/lib/mapbox.module.d.ts +18 -17
  40. package/mapbox/lib/mapbox.store.d.ts +36 -4
  41. package/mapbox/package.json +3 -3
  42. package/package.json +3 -3
  43. package/table/package.json +3 -3
@@ -4,7 +4,7 @@ import * as i2 from '@dereekb/dbx-core';
4
4
  import { safeMarkForCheck, safeDetectChanges, AbstractSubscriptionDirective, DbxInjectionComponentModule } from '@dereekb/dbx-core';
5
5
  import { asObservable, cleanup, filterMaybe, onTrueToFalse, SubscriptionObject, distinctUntilMapHasDifferentKeys } from '@dereekb/rxjs';
6
6
  import { distinctUntilChanged, switchMap, map, combineLatestWith, shareReplay, NEVER, defaultIfEmpty, tap, EMPTY, of, combineLatest, filter, first, startWith, interval, Subject, merge, throttleTime, BehaviorSubject } from 'rxjs';
7
- import { LAT_LONG_10M_PRECISION, latLngPointFunction, roundNumberToStepFunction, latLngBoundFunction, latLngBoundFromInput, filterUndefinedValues, isSameLatLngPoint, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, isSameLatLngBound, diffLatLngBoundPoints, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, vectorsAreEqual, latLngBoundCenterPoint, addLatLngPoints, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
7
+ import { LAT_LONG_10M_PRECISION, latLngPointFunction, roundNumberToStepFunction, latLngBoundFunction, latLngBoundFromInput, filterUndefinedValues, isSameLatLngPoint, isSameVector, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, isSameLatLngBound, diffLatLngBoundPoints, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, latLngBoundCenterPoint, addLatLngPoints, vectorMinimumSizeResizeFunction, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
8
8
  import { ComponentStore } from '@ngrx/component-store';
9
9
  import * as MapboxGl from 'mapbox-gl';
10
10
  import { bounds } from '@mapbox/geo-viewport';
@@ -159,7 +159,8 @@ class DbxMapboxMapStore extends ComponentStore {
159
159
  moveState: 'init',
160
160
  zoomState: 'init',
161
161
  rotateState: 'init',
162
- retainContent: true
162
+ retainContent: true,
163
+ useVirtualBound: true
163
164
  });
164
165
  this.dbxMapboxService = dbxMapboxService;
165
166
  this.safeLatLngPoint = latLngPointFunction({ wrap: true });
@@ -435,6 +436,38 @@ class DbxMapboxMapStore extends ComponentStore {
435
436
  this.center$ = this.whenInitialized$.pipe(switchMap(() => {
436
437
  return this.isMoving$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.centerNow$.pipe(first())), distinctUntilChanged(isSameLatLngPoint), shareReplay(1));
437
438
  }), shareReplay(1));
439
+ this.minimumVirtualViewportSize$ = this.state$.pipe(map((x) => x.minimumVirtualViewportSize), distinctUntilChanged(isSameVector), shareReplay(1));
440
+ this.currentMapCanvasSize$ = this.state$.pipe(map((x) => x.mapCanvasSize), distinctUntilChanged(isSameVector), shareReplay(1));
441
+ /**
442
+ * The map canvas size with consideration to the virtual viewport size.
443
+ */
444
+ this.mapCanvasSize$ = this.currentMapCanvasSize$.pipe(filterMaybe());
445
+ /**
446
+ * The map canvas size with consideration to the virtual viewport size.
447
+ */
448
+ this.virtualMapCanvasSize$ = this.minimumVirtualViewportSize$.pipe(switchMap((minimumVirtualViewportSize) => {
449
+ if (minimumVirtualViewportSize) {
450
+ return this.minimumMapCanvasSize(minimumVirtualViewportSize);
451
+ }
452
+ else {
453
+ return this.mapCanvasSize$;
454
+ }
455
+ }), distinctUntilChanged(isSameVector), shareReplay(1));
456
+ this.rawViewportBoundFunction$ = this.mapCanvasSize$.pipe(map((mapCanvasSize) => mapboxViewportBoundFunction({ mapCanvasSize })), shareReplay(1));
457
+ this.viewportBoundFunction$ = this.minimumVirtualViewportSize$.pipe(switchMap((minimumVirtualViewportSize) => {
458
+ if (minimumVirtualViewportSize) {
459
+ return this.viewportBoundFunctionWithMinimumSize(minimumVirtualViewportSize);
460
+ }
461
+ else {
462
+ return this.rawViewportBoundFunction$;
463
+ }
464
+ }), shareReplay(1));
465
+ this.virtualBound$ = this.viewportBoundFunction$.pipe(switchMap((fn) => {
466
+ return combineLatest([this.center$, this.zoom$]).pipe(map(([center, zoom]) => fn({
467
+ center,
468
+ zoom
469
+ })));
470
+ }), shareReplay(1));
438
471
  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));
439
472
  this.reverseMargin$ = this.margin$.pipe(map((x) => {
440
473
  if (x) {
@@ -454,7 +487,7 @@ class DbxMapboxMapStore extends ComponentStore {
454
487
  }
455
488
  }));
456
489
  }), shareReplay(1));
457
- this.boundNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => {
490
+ this.rawBoundNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => {
458
491
  const bound = x.getBounds();
459
492
  const boundSw = bound.getSouthWest();
460
493
  const boundNe = bound.getNorthEast();
@@ -462,13 +495,22 @@ class DbxMapboxMapStore extends ComponentStore {
462
495
  const ne = isDefaultLatLngPoint(boundNe) ? neMostLatLngPoint() : { lat: boundNe.lat, lng: boundNe.lng };
463
496
  return this.latLngBound(sw, ne);
464
497
  }))), shareReplay(1))));
465
- this.bound$ = this.whenInitialized$.pipe(switchMap(() => {
466
- return this.isRendering$.pipe(onTrueToFalse(), startWith(undefined), switchMap((x) => this.boundNow$.pipe(first())), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
498
+ this.rawBound$ = this.whenInitialized$.pipe(switchMap(() => {
499
+ return this.isRendering$.pipe(onTrueToFalse(), startWith(undefined), switchMap((x) => this.rawBoundNow$.pipe(first())), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
467
500
  }));
501
+ this.useVirtualBound$ = this.state$.pipe(map((x) => x.useVirtualBound), distinctUntilChanged(), shareReplay(1));
502
+ this.bound$ = this.useVirtualBound$.pipe(switchMap((useVirtualBound) => {
503
+ if (useVirtualBound) {
504
+ return this.virtualBound$;
505
+ }
506
+ else {
507
+ return this.bound$;
508
+ }
509
+ }), shareReplay(1));
468
510
  this.boundSizing$ = this.bound$.pipe(map((x) => diffLatLngBoundPoints(x)), shareReplay(1));
469
511
  this.boundWrapsAroundWorld$ = this.bound$.pipe(map((x) => latLngBoundWrapsMap(x)), distinctUntilChanged(), shareReplay(1));
470
512
  this.isWithinBoundFunction$ = this.bound$.pipe(map((x) => isWithinLatLngBoundFunction(x)), shareReplay(1));
471
- this.overlapsBoundFunction$ = this.bound$.pipe(map((x) => overlapsLatLngBoundFunction(x)), shareReplay(1));
513
+ this.overlapsBoundFunction$ = this.virtualBound$.pipe(map((x) => overlapsLatLngBoundFunction(x)), shareReplay(1));
472
514
  this.zoomNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => x.getZoom()))), shareReplay(1))));
473
515
  this.zoom$ = this.whenInitialized$.pipe(switchMap(() => {
474
516
  return this.isZooming$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.zoomNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
@@ -483,15 +525,14 @@ class DbxMapboxMapStore extends ComponentStore {
483
525
  }));
484
526
  this.content$ = this.state$.pipe(map((x) => x.content), distinctUntilChanged(), shareReplay(1));
485
527
  this.hasContent$ = this.content$.pipe(map(Boolean));
486
- this.currentMapCanvasSize$ = this.state$.pipe(map((x) => x.mapCanvasSize), distinctUntilChanged((a, b) => a != null && b != null && vectorsAreEqual(a, b)), shareReplay(1));
487
- this.mapCanvasSize$ = this.currentMapCanvasSize$.pipe(filterMaybe());
488
- this.viewportBoundFunction$ = this.mapCanvasSize$.pipe(map((x) => mapboxViewportBoundFunction({ mapCanvasSize: x })), shareReplay(1));
489
528
  this.clickEvent$ = this.state$.pipe(map((x) => x.clickEvent), distinctUntilChanged(), shareReplay(1));
490
529
  this.doubleClickEvent$ = this.state$.pipe(map((x) => x.doubleClickEvent), distinctUntilChanged(), shareReplay(1));
491
530
  this.rightClickEvent$ = this.state$.pipe(map((x) => x.rightClickEvent), distinctUntilChanged(), shareReplay(1));
492
531
  // MARK: State Changes
493
532
  this.setMargin = this.updater((state, margin) => ({ ...state, margin: margin && (margin.rightMargin !== 0 || margin.leftMargin !== 0) ? margin : undefined }));
494
- this._setMapService = this.updater((state, mapService) => ({ mapService, moveState: 'init', lifecycleState: 'init', zoomState: 'init', rotateState: 'init', retainContent: state.retainContent, content: state.retainContent ? state.content : undefined }));
533
+ this.setMinimumVirtualViewportSize = this.updater((state, minimumVirtualViewportSize) => ({ ...state, minimumVirtualViewportSize }));
534
+ this.setUseVirtualBound = this.updater((state, useVirtualBound) => ({ ...state, useVirtualBound }));
535
+ this._setMapService = this.updater((state, mapService) => ({ mapService, moveState: 'init', lifecycleState: 'init', zoomState: 'init', rotateState: 'init', retainContent: state.retainContent, content: state.retainContent ? state.content : undefined, useVirtualBound: state.useVirtualBound }));
495
536
  this._setLifecycleState = this.updater((state, lifecycleState) => ({ ...state, lifecycleState }));
496
537
  this._setMoveState = this.updater((state, moveState) => ({ ...state, moveState }));
497
538
  this._setZoomState = this.updater((state, zoomState) => ({ ...state, zoomState }));
@@ -568,6 +609,20 @@ class DbxMapboxMapStore extends ComponentStore {
568
609
  boundDecisionObs: this.overlapsBoundFunction$
569
610
  });
570
611
  }
612
+ minimumMapCanvasSize(minVector) {
613
+ const resizeFn = vectorMinimumSizeResizeFunction(minVector);
614
+ return this.mapCanvasSize$.pipe(map((x) => resizeFn(x)), distinctUntilChanged(isSameVector), shareReplay(1));
615
+ }
616
+ /**
617
+ * Creates a MapboxViewportBoundFunction observable that returns the minimum viewport size.
618
+ *
619
+ * @param minVector
620
+ * @returns
621
+ */
622
+ viewportBoundFunctionWithMinimumSize(minVector) {
623
+ const resizeFn = vectorMinimumSizeResizeFunction(minVector);
624
+ return this.mapCanvasSize$.pipe(map((x) => resizeFn(x)), distinctUntilChanged(isSameVector), map((mapCanvasSize) => mapboxViewportBoundFunction({ mapCanvasSize })), shareReplay(1));
625
+ }
571
626
  }
572
627
  DbxMapboxMapStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxMapStore, deps: [{ token: DbxMapboxService }], target: i0.ɵɵFactoryTarget.Injectable });
573
628
  DbxMapboxMapStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxMapStore });
@@ -796,6 +851,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
796
851
  this._openToggle = new BehaviorSubject(true);
797
852
  this._color = new BehaviorSubject(undefined);
798
853
  this._toggleSub = new SubscriptionObject();
854
+ this.resized$ = this._resized.asObservable();
799
855
  this.side$ = this._side.pipe(distinctUntilChanged(), shareReplay(1));
800
856
  this.mode$ = this._mode.pipe(distinctUntilChanged(), shareReplay(1));
801
857
  this.hasContent$ = combineLatest([this._forceHasContent, this.dbxMapboxMapStore.hasContent$]).pipe(map(([hasContent, forceHasContent]) => hasContent || forceHasContent), distinctUntilChanged(), shareReplay(1));
@@ -833,12 +889,12 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
833
889
  let obs;
834
890
  if (mode === 'push') {
835
891
  obs = combineLatest([this.opened$.pipe(distinctUntilChanged()), this._updateMargins]).pipe(tap(([opened]) => {
836
- let { right } = this.container._contentMargins;
837
- this.container.updateContentMargins();
892
+ let { right } = this.drawerContainer._contentMargins;
893
+ this.drawerContainer.updateContentMargins();
838
894
  setTimeout(() => {
839
895
  const flip = opened ? 1 : -1;
840
896
  if (opened) {
841
- right = this.container._contentMargins.right;
897
+ right = this.drawerContainer._contentMargins.right;
842
898
  }
843
899
  right = (right || 0) * flip;
844
900
  const element = this.content.nativeElement;
@@ -861,7 +917,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
861
917
  }
862
918
  else {
863
919
  obs = combineLatest([this.opened$.pipe(distinctUntilChanged()), this._updateMargins]).pipe(switchMap((_) => this.dbxMapboxMapStore.mapInstance$), tap((x) => {
864
- this.container.updateContentMargins();
920
+ this.drawerContainer.updateContentMargins();
865
921
  x.triggerRepaint();
866
922
  }));
867
923
  }
@@ -908,15 +964,18 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
908
964
  this._color.next(color);
909
965
  }
910
966
  onResized(event) {
911
- this._resized.next();
967
+ this._resized.next(event);
912
968
  }
913
969
  }
914
970
  DbxMapboxLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component });
915
- DbxMapboxLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", mode: "mode", opened: "opened", hasContent: "hasContent", drawerColor: "drawerColor" }, viewQueries: [{ propertyName: "container", first: true, predicate: MatDrawerContainer, descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-drawer-container class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer [opened]=\"opened$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 60px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i3.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i3.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] });
971
+ DbxMapboxLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", mode: "mode", opened: "opened", hasContent: "hasContent", drawerColor: "drawerColor" }, viewQueries: [{ propertyName: "containerElement", first: true, predicate: MatDrawerContainer, descendants: true, read: ElementRef }, { propertyName: "drawerContainer", 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 #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer [opened]=\"opened$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [ngClass]=\"(drawerButtonClasses$ | async) || ''\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 60px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i3.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i3.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] });
916
972
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
917
973
  type: Component,
918
- 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"] }]
919
- }], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; }, propDecorators: { container: [{
974
+ args: [{ selector: 'dbx-mapbox-layout', template: "<mat-drawer-container #containerElement 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"] }]
975
+ }], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; }, propDecorators: { containerElement: [{
976
+ type: ViewChild,
977
+ args: [MatDrawerContainer, { read: ElementRef }]
978
+ }], drawerContainer: [{
920
979
  type: ViewChild,
921
980
  args: [MatDrawerContainer]
922
981
  }], content: [{
@@ -1254,8 +1313,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1254
1313
  type: Input
1255
1314
  }] } });
1256
1315
 
1316
+ /**
1317
+ * Directive that synchronizes a map's virtual size with the size of the element.
1318
+ */
1319
+ class DbxMapboxLayoutVirtualResizeSyncComponent extends SubscriptionObject {
1320
+ constructor(dbxMapboxLayoutComponent) {
1321
+ super();
1322
+ this.dbxMapboxLayoutComponent = dbxMapboxLayoutComponent;
1323
+ this.resizedVector$ = this.dbxMapboxLayoutComponent.resized$.pipe(map(() => {
1324
+ const element = this.dbxMapboxLayoutComponent.containerElement.nativeElement;
1325
+ const { clientWidth, clientHeight } = element;
1326
+ return {
1327
+ x: clientWidth,
1328
+ y: clientHeight
1329
+ };
1330
+ }), distinctUntilChanged(isSameVector), shareReplay(1));
1331
+ }
1332
+ ngOnInit() {
1333
+ this.dbxMapboxLayoutComponent.dbxMapboxMapStore.setMinimumVirtualViewportSize(this.resizedVector$);
1334
+ }
1335
+ }
1336
+ DbxMapboxLayoutVirtualResizeSyncComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, deps: [{ token: DbxMapboxLayoutComponent, host: true }], target: i0.ɵɵFactoryTarget.Directive });
1337
+ DbxMapboxLayoutVirtualResizeSyncComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxMapboxLayoutVirtualResizeSyncComponent, selector: "[dbxMapboxLayoutVirtualResizeSync]", usesInheritance: true, ngImport: i0 });
1338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, decorators: [{
1339
+ type: Directive,
1340
+ args: [{
1341
+ selector: '[dbxMapboxLayoutVirtualResizeSync]'
1342
+ }]
1343
+ }], ctorParameters: function () { return [{ type: DbxMapboxLayoutComponent, decorators: [{
1344
+ type: Host
1345
+ }] }]; } });
1346
+
1257
1347
  const declarations = [
1258
1348
  //
1349
+ DbxMapboxLayoutVirtualResizeSyncComponent,
1259
1350
  DbxMapboxMapDirective,
1260
1351
  DbxMapboxLayoutComponent,
1261
1352
  DbxMapboxLayoutDrawerComponent,
@@ -1281,6 +1372,7 @@ class DbxMapboxModule {
1281
1372
  DbxMapboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1282
1373
  DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxMapboxModule, declarations: [
1283
1374
  //
1375
+ DbxMapboxLayoutVirtualResizeSyncComponent,
1284
1376
  DbxMapboxMapDirective,
1285
1377
  DbxMapboxLayoutComponent,
1286
1378
  DbxMapboxLayoutDrawerComponent,
@@ -1299,6 +1391,7 @@ DbxMapboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
1299
1391
  DbxRouterAnchorModule,
1300
1392
  NgxMapboxGLModule], exports: [
1301
1393
  //
1394
+ DbxMapboxLayoutVirtualResizeSyncComponent,
1302
1395
  DbxMapboxMapDirective,
1303
1396
  DbxMapboxLayoutComponent,
1304
1397
  DbxMapboxLayoutDrawerComponent,
@@ -1373,5 +1466,5 @@ function mapboxZoomLevel(input) {
1373
1466
  * Generated bundle index. Do not edit.
1374
1467
  */
1375
1468
 
1376
- export { DEFAULT_MAPBOX_CENTER, DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD, DEFAULT_MAPBOX_STYLE, DEFAULT_MAPBOX_ZOOM, DbxMapboxChangeDetectorRefService, DbxMapboxChangeService, DbxMapboxConfig, DbxMapboxInjectionComponent, DbxMapboxInjectionStore, DbxMapboxInjectionStoreInjectionBlockDirective, DbxMapboxInjectionStoreProviderBlock, DbxMapboxLayoutComponent, DbxMapboxLayoutDrawerComponent, DbxMapboxMapDirective, DbxMapboxMapStore, DbxMapboxMapStoreInjectionBlockDirective, DbxMapboxMapStoreProviderBlock, DbxMapboxMarkerComponent, DbxMapboxMarkersComponent, DbxMapboxMenuComponent, DbxMapboxModule, DbxMapboxService, KNOWN_MAPBOX_STYLES, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, dbxMapboxColoredDotStyle, filterByMapboxViewportBound, mapboxViewportBoundFunction, mapboxZoomLevel, provideMapboxInjectionStoreIfParentIsUnavailable, provideMapboxStoreIfParentIsUnavailable, updateDbxMapboxMapInjectionStoreStateWithInjectionConfig, updateDbxMapboxMapInjectionStoreStateWithRemovedKey };
1469
+ export { DEFAULT_MAPBOX_CENTER, DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD, DEFAULT_MAPBOX_STYLE, DEFAULT_MAPBOX_ZOOM, DbxMapboxChangeDetectorRefService, DbxMapboxChangeService, DbxMapboxConfig, DbxMapboxInjectionComponent, DbxMapboxInjectionStore, DbxMapboxInjectionStoreInjectionBlockDirective, DbxMapboxInjectionStoreProviderBlock, DbxMapboxLayoutComponent, DbxMapboxLayoutDrawerComponent, DbxMapboxLayoutVirtualResizeSyncComponent, DbxMapboxMapDirective, DbxMapboxMapStore, DbxMapboxMapStoreInjectionBlockDirective, DbxMapboxMapStoreProviderBlock, DbxMapboxMarkerComponent, DbxMapboxMarkersComponent, DbxMapboxMenuComponent, DbxMapboxModule, DbxMapboxService, KNOWN_MAPBOX_STYLES, MAPBOX_MAX_ZOOM_LEVEL, MAPBOX_MIN_ZOOM_LEVEL, dbxMapboxColoredDotStyle, filterByMapboxViewportBound, mapboxViewportBoundFunction, mapboxZoomLevel, provideMapboxInjectionStoreIfParentIsUnavailable, provideMapboxStoreIfParentIsUnavailable, updateDbxMapboxMapInjectionStoreStateWithInjectionConfig, updateDbxMapboxMapInjectionStoreStateWithRemovedKey };
1377
1470
  //# sourceMappingURL=dereekb-dbx-web-mapbox.mjs.map