@dereekb/dbx-web 13.4.1 → 13.5.0
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/_index.scss +6 -1
- package/fesm2022/dereekb-dbx-web-calendar.mjs +58 -25
- package/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-mapbox.mjs +120 -88
- package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-table.mjs +148 -110
- package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +2069 -1704
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/lib/action/_action.scss +0 -1
- package/lib/action/snackbar/_snackbar.scss +0 -19
- package/lib/button/_button.scss +0 -18
- package/lib/button/progress/bar.button.component.scss +6 -0
- package/lib/error/_error.scss +0 -18
- package/lib/extension/_extension.scss +0 -31
- package/lib/extension/calendar/_calendar.scss +25 -74
- package/lib/extension/calendar/style/month/calendar-month-view.scss +1 -1
- package/lib/extension/help/_help.scss +0 -20
- package/lib/extension/table/_table.scss +0 -19
- package/lib/extension/zip/_zip.scss +5 -20
- package/lib/interaction/_interaction.scss +0 -8
- package/lib/interaction/dialog/_dialog.scss +4 -19
- package/lib/interaction/filter/_filter.scss +0 -19
- package/lib/interaction/iframe/_iframe.scss +0 -19
- package/lib/interaction/popover/_popover.scss +7 -17
- package/lib/interaction/popup/_popup.scss +2 -26
- package/lib/interaction/prompt/_prompt.scss +0 -19
- package/lib/interaction/style/_style.scss +4 -35
- package/lib/interaction/upload/_upload.scss +4 -45
- package/lib/layout/_layout.scss +0 -14
- package/lib/layout/avatar/_avatar.scss +2 -29
- package/lib/layout/bar/_bar.scss +10 -43
- package/lib/layout/block/_block.scss +0 -19
- package/lib/layout/card/_card.scss +0 -19
- package/lib/layout/column/_column.scss +2 -17
- package/lib/layout/content/_content.scss +7 -55
- package/lib/layout/flag/_flag.scss +0 -19
- package/lib/layout/flex/_flex.scss +0 -19
- package/lib/layout/item/_item.scss +0 -19
- package/lib/layout/list/_list.scss +3 -26
- package/lib/layout/section/_section.scss +7 -17
- package/lib/layout/step/_step.scss +0 -19
- package/lib/layout/style/_style.scss +1 -18
- package/lib/layout/text/_text.scss +8 -46
- package/lib/loading/_loading.scss +0 -19
- package/lib/router/_router.scss +0 -4
- package/lib/router/layout/anchor/_anchor.scss +0 -19
- package/lib/router/layout/anchorlist/_anchorlist.scss +4 -32
- package/lib/router/layout/navbar/_navbar.scss +0 -18
- package/lib/router/layout/sidenav/_sidenav.scss +22 -102
- package/lib/style/_all-typography.scss +0 -16
- package/lib/style/_m2-visual-compat.scss +120 -0
- package/lib/style/_root-variables.scss +37 -47
- package/lib/style/_theming.scss +1 -202
- package/lib/style/_variables.scss +35 -2
- package/package.json +13 -13
- package/types/dereekb-dbx-web-calendar.d.ts +40 -2
- package/types/dereekb-dbx-web-mapbox.d.ts +27 -1
- package/types/dereekb-dbx-web-table.d.ts +41 -0
- package/types/dereekb-dbx-web.d.ts +554 -110
|
@@ -48,24 +48,29 @@ class DbxMapboxService {
|
|
|
48
48
|
center: latLngPoint(this.defaultCenter)
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
52
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
52
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxService });
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxService, decorators: [{
|
|
55
55
|
type: Injectable
|
|
56
56
|
}] });
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Creates a function that calculates the geographic bounds of a Mapbox viewport given a center point and zoom level.
|
|
60
|
+
*
|
|
61
|
+
* @param config - Configuration specifying the map canvas size and optional tile size.
|
|
62
|
+
* @returns A function that accepts a center point and zoom level and returns the corresponding {@link LatLngBound}.
|
|
63
|
+
*/
|
|
58
64
|
function mapboxViewportBoundFunction(config) {
|
|
59
65
|
const { mapCanvasSize, tileSize = 512 } = config;
|
|
60
66
|
const dimensions = [mapCanvasSize.x, mapCanvasSize.y];
|
|
61
67
|
return ({ center, zoom }) => {
|
|
62
68
|
const boundingBox = bounds([center.lng, center.lat], zoom, dimensions, tileSize);
|
|
63
69
|
const [swLng, swLat, neLng, neLat] = boundingBox;
|
|
64
|
-
|
|
70
|
+
return {
|
|
65
71
|
sw: { lat: swLat, lng: swLng },
|
|
66
72
|
ne: { lat: neLat, lng: neLng }
|
|
67
73
|
};
|
|
68
|
-
return result;
|
|
69
74
|
};
|
|
70
75
|
}
|
|
71
76
|
|
|
@@ -407,11 +412,10 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
407
412
|
calculateNextCenterWithOffset(inputOffset) {
|
|
408
413
|
const offset = this.latLngPoint(inputOffset);
|
|
409
414
|
return this.atNextIdle().pipe(switchMap(() => this.center$.pipe(first(), map((center) => {
|
|
410
|
-
|
|
415
|
+
return {
|
|
411
416
|
lat: offset.lat + center.lat,
|
|
412
417
|
lng: offset.lng + center.lng
|
|
413
418
|
};
|
|
414
|
-
return newCenter;
|
|
415
419
|
}))));
|
|
416
420
|
}
|
|
417
421
|
calculateNextCenterOffsetWithScreenMarginChange(sizing) {
|
|
@@ -465,7 +469,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
465
469
|
return combineLatest([this.moveState$.pipe(map((x) => x === 'idle')), this.lifecycleState$.pipe(map((x) => x === 'idle'))]).pipe(filter(([m, l]) => m && l), first(), map(() => true));
|
|
466
470
|
}
|
|
467
471
|
}), shareReplay(1));
|
|
468
|
-
whenInitialized$ = this.isInitialized$.pipe(filter((
|
|
472
|
+
whenInitialized$ = this.isInitialized$.pipe(filter(() => true), shareReplay(1));
|
|
469
473
|
isRendering$ = this.whenInitialized$.pipe(switchMap(() => this.lifecycleState$.pipe(map((x) => x === 'render'), distinctUntilChanged(), shareReplay(1))));
|
|
470
474
|
isMoving$ = this.whenInitialized$.pipe(switchMap(() => this.moveState$.pipe(map((x) => x === 'moving'), distinctUntilChanged(), shareReplay(1))));
|
|
471
475
|
isZooming$ = this.whenInitialized$.pipe(switchMap(() => this.zoomState$.pipe(map((x) => x === 'zooming'), distinctUntilChanged(), shareReplay(1))));
|
|
@@ -535,7 +539,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
535
539
|
})));
|
|
536
540
|
}));
|
|
537
541
|
}), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
|
|
538
|
-
margin$ = this.state$.pipe(map((x) => x.margin), distinctUntilChanged((a, b) => a != null &&
|
|
542
|
+
margin$ = this.state$.pipe(map((x) => x.margin), distinctUntilChanged((a, b) => a != null && a.fullWidth === b?.fullWidth && a.leftMargin === b.leftMargin && a.rightMargin === b.rightMargin), shareReplay(1));
|
|
539
543
|
reverseMargin$ = this.margin$.pipe(map((x) => {
|
|
540
544
|
if (x) {
|
|
541
545
|
return { leftMargin: -x.leftMargin, rightMargin: -x.rightMargin, fullWidth: x.fullWidth };
|
|
@@ -578,7 +582,7 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
578
582
|
obs = this.isRendering$.pipe(switchMap((x) => (x ? EMPTY : this.rawBoundNow$)));
|
|
579
583
|
break;
|
|
580
584
|
case 'only_after_render_finishes':
|
|
581
|
-
obs = this.isRendering$.pipe(onTrueToFalse(), switchMap((
|
|
585
|
+
obs = this.isRendering$.pipe(onTrueToFalse(), switchMap(() => this.rawBoundNow$.pipe(first())));
|
|
582
586
|
break;
|
|
583
587
|
}
|
|
584
588
|
return obs.pipe(throttleTime(throttleMs, undefined, { leading: true, trailing: true }));
|
|
@@ -631,10 +635,10 @@ class DbxMapboxMapStore extends ComponentStore {
|
|
|
631
635
|
_setError = this.updater((state, error) => ({ ...state, error }));
|
|
632
636
|
clearDrawerContent = this.updater((state) => setDrawerContent(state, undefined));
|
|
633
637
|
setDrawerContent = this.updater(setDrawerContent);
|
|
634
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
635
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
638
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
639
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStore });
|
|
636
640
|
}
|
|
637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStore, decorators: [{
|
|
638
642
|
type: Injectable
|
|
639
643
|
}], ctorParameters: () => [] });
|
|
640
644
|
function setDrawerContent(state, drawerContent) {
|
|
@@ -666,10 +670,10 @@ class DbxMapboxChangeService {
|
|
|
666
670
|
this._applyChanges.complete();
|
|
667
671
|
this._applyChangesSub.destroy();
|
|
668
672
|
}
|
|
669
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
670
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxChangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
674
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxChangeService, providedIn: null });
|
|
671
675
|
}
|
|
672
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxChangeService, decorators: [{
|
|
673
677
|
type: Injectable,
|
|
674
678
|
args: [{
|
|
675
679
|
providedIn: null
|
|
@@ -686,20 +690,34 @@ class DbxMapboxInjectionStore extends ComponentStore {
|
|
|
686
690
|
});
|
|
687
691
|
}
|
|
688
692
|
map$ = this.state$.pipe(map((x) => x.map), distinctUntilMapHasDifferentKeys(), shareReplay(1));
|
|
689
|
-
allInjectionConfigs$ = this.map$.pipe(map((x) =>
|
|
693
|
+
allInjectionConfigs$ = this.map$.pipe(map((x) => [...x.values()]), shareReplay(1));
|
|
690
694
|
// MARK: State Changes
|
|
691
695
|
addInjectionConfig = this.updater(updateDbxMapboxMapInjectionStoreStateWithInjectionConfig);
|
|
692
696
|
removeInjectionConfigWithKey = this.updater(updateDbxMapboxMapInjectionStoreStateWithRemovedKey);
|
|
693
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
694
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
697
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
698
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStore });
|
|
695
699
|
}
|
|
696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStore, decorators: [{
|
|
697
701
|
type: Injectable
|
|
698
702
|
}], ctorParameters: () => [] });
|
|
703
|
+
/**
|
|
704
|
+
* Returns an updated store state with the given injection config added or replaced in the map, keyed by its unique key.
|
|
705
|
+
*
|
|
706
|
+
* @param state - The current mapbox injection store state.
|
|
707
|
+
* @param config - The injection configuration to add or update.
|
|
708
|
+
* @returns The updated store state containing the new or replaced config.
|
|
709
|
+
*/
|
|
699
710
|
function updateDbxMapboxMapInjectionStoreStateWithInjectionConfig(state, config) {
|
|
700
711
|
const map = new Map(state.map).set(config.key, config);
|
|
701
712
|
return { ...state, map };
|
|
702
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* Returns an updated store state with the injection config for the given key removed. If the key does not exist, returns the state unchanged.
|
|
716
|
+
*
|
|
717
|
+
* @param state - The current mapbox injection store state.
|
|
718
|
+
* @param key - The injection key to remove from the map.
|
|
719
|
+
* @returns The updated store state with the key removed, or the original state if the key was not present.
|
|
720
|
+
*/
|
|
703
721
|
function updateDbxMapboxMapInjectionStoreStateWithRemovedKey(state, key) {
|
|
704
722
|
// only create a new state if the key is going to get removed
|
|
705
723
|
if (state.map.has(key)) {
|
|
@@ -716,12 +734,12 @@ function updateDbxMapboxMapInjectionStoreStateWithRemovedKey(state, key) {
|
|
|
716
734
|
class DbxMapboxInjectionComponent {
|
|
717
735
|
dbxMapboxMapKeyInjectionStore = inject(DbxMapboxInjectionStore);
|
|
718
736
|
entriesSignal = toSignal(this.dbxMapboxMapKeyInjectionStore.allInjectionConfigs$);
|
|
719
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
720
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
737
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
738
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxMapboxInjectionComponent, isStandalone: true, selector: "dbx-mapbox-injection", ngImport: i0, template: `
|
|
721
739
|
<dbx-injection-array [entries]="entriesSignal()"></dbx-injection-array>
|
|
722
740
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionArrayComponent, selector: "dbx-injection-array", inputs: ["entries"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
723
741
|
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionComponent, decorators: [{
|
|
725
743
|
type: Component,
|
|
726
744
|
args: [{
|
|
727
745
|
selector: 'dbx-mapbox-injection',
|
|
@@ -739,17 +757,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
739
757
|
*/
|
|
740
758
|
class DbxMapboxInjectionStoreProviderBlock {
|
|
741
759
|
dbxMapboxInjectionStore = inject(DbxMapboxInjectionStore, { skipSelf: true });
|
|
742
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
743
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
760
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
761
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock });
|
|
744
762
|
}
|
|
745
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock, decorators: [{
|
|
746
764
|
type: Injectable
|
|
747
765
|
}] });
|
|
748
766
|
class DbxMapboxInjectionStoreInjectionBlockDirective {
|
|
749
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
750
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
767
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
768
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.3", type: DbxMapboxInjectionStoreInjectionBlockDirective, isStandalone: true, selector: "[dbxMapboxInjectionStoreParentBlocker]", providers: [DbxMapboxInjectionStoreProviderBlock], ngImport: i0 });
|
|
751
769
|
}
|
|
752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxInjectionStoreInjectionBlockDirective, decorators: [{
|
|
753
771
|
type: Directive,
|
|
754
772
|
args: [{
|
|
755
773
|
selector: '[dbxMapboxInjectionStoreParentBlocker]',
|
|
@@ -768,7 +786,7 @@ function provideMapboxInjectionStoreIfParentIsUnavailable() {
|
|
|
768
786
|
return {
|
|
769
787
|
provide: DbxMapboxInjectionStore,
|
|
770
788
|
useFactory: (parentInjector, dbxMapboxInjectionStoreInjectionBlock, dbxMapboxInjectionStore) => {
|
|
771
|
-
if (!dbxMapboxInjectionStore || (dbxMapboxInjectionStore && dbxMapboxInjectionStoreInjectionBlock
|
|
789
|
+
if (!dbxMapboxInjectionStore || (dbxMapboxInjectionStore && dbxMapboxInjectionStoreInjectionBlock?.dbxMapboxInjectionStore === dbxMapboxInjectionStore)) {
|
|
772
790
|
// create a new dbxMapboxInjectionStore to use
|
|
773
791
|
const injector = Injector.create({ providers: [{ provide: DbxMapboxInjectionStore }], parent: parentInjector });
|
|
774
792
|
dbxMapboxInjectionStore = injector.get(DbxMapboxInjectionStore);
|
|
@@ -792,8 +810,8 @@ class DbxMapboxMapDirective {
|
|
|
792
810
|
this.dbxMapboxMapStore.setMapService(this.mapService);
|
|
793
811
|
}
|
|
794
812
|
}
|
|
795
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
796
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
813
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
814
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.3", type: DbxMapboxMapDirective, isStandalone: true, selector: "[dbxMapboxMap]", providers: [
|
|
797
815
|
{
|
|
798
816
|
provide: MAP_COMPONENT_INITIALIZATION_OPTIONS,
|
|
799
817
|
useFactory: (dbxMapboxService) => dbxMapboxService.initializationOptions(),
|
|
@@ -801,7 +819,7 @@ class DbxMapboxMapDirective {
|
|
|
801
819
|
}
|
|
802
820
|
], ngImport: i0 });
|
|
803
821
|
}
|
|
804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapDirective, decorators: [{
|
|
805
823
|
type: Directive,
|
|
806
824
|
args: [{
|
|
807
825
|
selector: '[dbxMapboxMap]',
|
|
@@ -822,10 +840,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
822
840
|
class DbxMapboxLayoutDrawerComponent {
|
|
823
841
|
dbxMapboxMapStore = inject(DbxMapboxMapStore);
|
|
824
842
|
drawerConfigSignal = toSignal(this.dbxMapboxMapStore.drawerContent$);
|
|
825
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
826
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
843
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
844
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.3", type: DbxMapboxLayoutDrawerComponent, isStandalone: true, selector: "dbx-mapbox-layout-drawer", host: { classAttribute: "dbx-mapbox-layout-drawer" }, ngImport: i0, template: "<div>\n <dbx-injection [config]=\"drawerConfigSignal()\"></dbx-injection>\n</div>\n", dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
|
|
827
845
|
}
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
846
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
|
|
829
847
|
type: Component,
|
|
830
848
|
args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
|
|
831
849
|
class: 'dbx-mapbox-layout-drawer'
|
|
@@ -847,24 +865,24 @@ class DbxMapboxLayoutComponent {
|
|
|
847
865
|
drawerContainer = viewChild.required(MatDrawerContainer);
|
|
848
866
|
drawerContainerElement = viewChild.required(MatDrawerContainer, { read: (ElementRef) });
|
|
849
867
|
drawerContent = viewChild.required('drawerContent');
|
|
850
|
-
side = input('right', { ...(ngDevMode ? { debugName: "side" } : {}), transform: (x) => x || 'right' });
|
|
851
|
-
mode = input('side', { ...(ngDevMode ? { debugName: "mode" } : {}), transform: (x) => x || 'side' });
|
|
868
|
+
side = input('right', { ...(ngDevMode ? { debugName: "side" } : /* istanbul ignore next */ {}), transform: (x) => x || 'right' });
|
|
869
|
+
mode = input('side', { ...(ngDevMode ? { debugName: "mode" } : /* istanbul ignore next */ {}), transform: (x) => x || 'side' });
|
|
852
870
|
/**
|
|
853
871
|
* Forces the drawer to assume the drawer has content if true, or assume it has no content if false.
|
|
854
872
|
*/
|
|
855
|
-
forceHasDrawerContent = input(undefined, ...(ngDevMode ? [{ debugName: "forceHasDrawerContent" }] : []));
|
|
856
|
-
drawerButtonColor = input('default', { ...(ngDevMode ? { debugName: "drawerButtonColor" } : {}), transform: (x) => x ?? 'default' });
|
|
857
|
-
openDrawer = input(undefined, ...(ngDevMode ? [{ debugName: "openDrawer" }] : [])); // input open/close drawer config
|
|
858
|
-
isDrawerOpenSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "isDrawerOpenSignal" }] : [])); // Signal to toggle the drawer
|
|
873
|
+
forceHasDrawerContent = input(undefined, ...(ngDevMode ? [{ debugName: "forceHasDrawerContent" }] : /* istanbul ignore next */ []));
|
|
874
|
+
drawerButtonColor = input('default', { ...(ngDevMode ? { debugName: "drawerButtonColor" } : /* istanbul ignore next */ {}), transform: (x) => x ?? 'default' });
|
|
875
|
+
openDrawer = input(undefined, ...(ngDevMode ? [{ debugName: "openDrawer" }] : /* istanbul ignore next */ [])); // input open/close drawer config
|
|
876
|
+
isDrawerOpenSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "isDrawerOpenSignal" }] : /* istanbul ignore next */ [])); // Signal to toggle the drawer
|
|
859
877
|
_openDrawerEffect = effect(() => {
|
|
860
878
|
this.isDrawerOpenSignal.set(this.openDrawer());
|
|
861
|
-
}, ...(ngDevMode ? [{ debugName: "_openDrawerEffect" }] : []));
|
|
879
|
+
}, ...(ngDevMode ? [{ debugName: "_openDrawerEffect" }] : /* istanbul ignore next */ []));
|
|
862
880
|
storeHasDrawerContent = toSignal(this.dbxMapboxMapStore.hasDrawerContent$);
|
|
863
|
-
drawerHasContentSignal = computed(() => this.forceHasDrawerContent() ?? this.storeHasDrawerContent(), ...(ngDevMode ? [{ debugName: "drawerHasContentSignal" }] : []));
|
|
881
|
+
drawerHasContentSignal = computed(() => this.forceHasDrawerContent() ?? this.storeHasDrawerContent(), ...(ngDevMode ? [{ debugName: "drawerHasContentSignal" }] : /* istanbul ignore next */ []));
|
|
864
882
|
refreshContentMargins$ = this._refreshContentMargins;
|
|
865
883
|
isOpenAndHasContentSignal = computed(() => {
|
|
866
884
|
return this.drawerHasContentSignal() && this.isDrawerOpenSignal();
|
|
867
|
-
}, ...(ngDevMode ? [{ debugName: "isOpenAndHasContentSignal" }] : []));
|
|
885
|
+
}, ...(ngDevMode ? [{ debugName: "isOpenAndHasContentSignal" }] : /* istanbul ignore next */ []));
|
|
868
886
|
viewResized$ = this._viewResized.asObservable();
|
|
869
887
|
side$ = toObservable(this.side);
|
|
870
888
|
mode$ = toObservable(this.mode);
|
|
@@ -872,13 +890,13 @@ class DbxMapboxLayoutComponent {
|
|
|
872
890
|
isOpenAndHasContent$ = toObservable(this.isOpenAndHasContentSignal);
|
|
873
891
|
positionSignal = computed(() => {
|
|
874
892
|
return this.side() === 'right' ? 'end' : 'start';
|
|
875
|
-
}, ...(ngDevMode ? [{ debugName: "positionSignal" }] : []));
|
|
893
|
+
}, ...(ngDevMode ? [{ debugName: "positionSignal" }] : /* istanbul ignore next */ []));
|
|
876
894
|
drawerClassesSignal = computed(() => {
|
|
877
895
|
const side = this.side();
|
|
878
896
|
const hasContent = this.drawerHasContentSignal();
|
|
879
897
|
const isOpen = this.isDrawerOpenSignal(); // NOTE: isOpenAndHasContentSignal is not used here
|
|
880
898
|
return (hasContent ? 'has-drawer-content' : 'no-drawer-content') + ` ${side}-drawer ` + (isOpen ? 'open-drawer' : '');
|
|
881
|
-
}, ...(ngDevMode ? [{ debugName: "drawerClassesSignal" }] : []));
|
|
899
|
+
}, ...(ngDevMode ? [{ debugName: "drawerClassesSignal" }] : /* istanbul ignore next */ []));
|
|
882
900
|
buttonIconSignal = computed(() => {
|
|
883
901
|
const side = this.side();
|
|
884
902
|
const opened = this.isDrawerOpenSignal(); // NOTE: isOpenAndHasContentSignal is not used here
|
|
@@ -887,7 +905,7 @@ class DbxMapboxLayoutComponent {
|
|
|
887
905
|
icons = icons.reverse();
|
|
888
906
|
}
|
|
889
907
|
return opened ? icons[0] : icons[1];
|
|
890
|
-
}, ...(ngDevMode ? [{ debugName: "buttonIconSignal" }] : []));
|
|
908
|
+
}, ...(ngDevMode ? [{ debugName: "buttonIconSignal" }] : /* istanbul ignore next */ []));
|
|
891
909
|
_reszieSyncSub = new SubscriptionObject();
|
|
892
910
|
_toggleSyncSub = new SubscriptionObject();
|
|
893
911
|
ngOnInit() {
|
|
@@ -965,10 +983,10 @@ class DbxMapboxLayoutComponent {
|
|
|
965
983
|
}
|
|
966
984
|
this.isDrawerOpenSignal.set(open);
|
|
967
985
|
}
|
|
968
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
969
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
986
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
987
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.3", type: DbxMapboxLayoutComponent, isStandalone: true, selector: "dbx-mapbox-layout", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, forceHasDrawerContent: { classPropertyName: "forceHasDrawerContent", publicName: "forceHasDrawerContent", isSignal: true, isRequired: false, transformFunction: null }, drawerButtonColor: { classPropertyName: "drawerButtonColor", publicName: "drawerButtonColor", isSignal: true, isRequired: false, transformFunction: null }, openDrawer: { classPropertyName: "openDrawer", publicName: "openDrawer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { drawerOpenedChange: "drawerOpenedChange" }, viewQueries: [{ propertyName: "drawerContainer", first: true, predicate: MatDrawerContainer, descendants: true, isSignal: true }, { propertyName: "drawerContainerElement", first: true, predicate: MatDrawerContainer, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "drawerContent", first: true, predicate: ["drawerContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"drawerClassesSignal()\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"drawerOpened($event)\" [opened]=\"isOpenAndHasContentSignal()\" [mode]=\"mode()\" [position]=\"positionSignal()\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"drawerClassesSignal()\">\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\" (dbxResized)=\"viewResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor()\">\n <mat-icon>{{ buttonIconSignal() }}</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, 33px))}.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}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.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: DbxResizedDirective, selector: "[dbxResized]", outputs: ["dbxResized"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
970
988
|
}
|
|
971
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
972
990
|
type: Component,
|
|
973
991
|
args: [{ selector: 'dbx-mapbox-layout', imports: [DbxResizedDirective, NgClass, DbxMapboxLayoutDrawerComponent, MatDrawer, MatDrawerContainer, MatDrawerContent, MatIconModule, MatIconButton, DbxColorDirective], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"drawerClassesSignal()\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"drawerOpened($event)\" [opened]=\"isOpenAndHasContentSignal()\" [mode]=\"mode()\" [position]=\"positionSignal()\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"drawerClassesSignal()\">\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\" (dbxResized)=\"viewResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor()\">\n <mat-icon>{{ buttonIconSignal() }}</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, 33px))}.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}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.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"] }]
|
|
974
992
|
}], propDecorators: { drawerOpenedChange: [{ type: i0.Output, args: ["drawerOpenedChange"] }], drawerContainer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDrawerContainer), { isSignal: true }] }], drawerContainerElement: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDrawerContainer), { ...{ read: (ElementRef) }, isSignal: true }] }], drawerContent: [{ type: i0.ViewChild, args: ['drawerContent', { isSignal: true }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], forceHasDrawerContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceHasDrawerContent", required: false }] }], drawerButtonColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerButtonColor", required: false }] }], openDrawer: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDrawer", required: false }] }] } });
|
|
@@ -981,9 +999,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
981
999
|
class DbxMapboxMenuComponent {
|
|
982
1000
|
dbxMapboxMapStore = inject(DbxMapboxMapStore);
|
|
983
1001
|
matMenuTrigger = inject(MatMenuTrigger, { host: true });
|
|
984
|
-
active = input(true, { ...(ngDevMode ? { debugName: "active" } : {}), transform: isNotFalse });
|
|
985
|
-
openCloseSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "openCloseSignal" }] : []));
|
|
986
|
-
posSignal = signal({ x: `0`, y: `0` }, ...(ngDevMode ? [{ debugName: "posSignal" }] : []));
|
|
1002
|
+
active = input(true, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), transform: isNotFalse });
|
|
1003
|
+
openCloseSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "openCloseSignal" }] : /* istanbul ignore next */ []));
|
|
1004
|
+
posSignal = signal({ x: `0`, y: `0` }, ...(ngDevMode ? [{ debugName: "posSignal" }] : /* istanbul ignore next */ []));
|
|
987
1005
|
_openCloseEffect = effect(() => {
|
|
988
1006
|
const openOrClose = this.openCloseSignal();
|
|
989
1007
|
switch (openOrClose) {
|
|
@@ -993,8 +1011,10 @@ class DbxMapboxMenuComponent {
|
|
|
993
1011
|
case false:
|
|
994
1012
|
this.matMenuTrigger.closeMenu();
|
|
995
1013
|
break;
|
|
1014
|
+
default:
|
|
1015
|
+
break;
|
|
996
1016
|
}
|
|
997
|
-
}, ...(ngDevMode ? [{ debugName: "_openCloseEffect" }] : []));
|
|
1017
|
+
}, ...(ngDevMode ? [{ debugName: "_openCloseEffect" }] : /* istanbul ignore next */ []));
|
|
998
1018
|
active$ = toObservable(this.active);
|
|
999
1019
|
_sub = cleanSubscription();
|
|
1000
1020
|
_menuCloseSub = new SubscriptionObject();
|
|
@@ -1037,10 +1057,10 @@ class DbxMapboxMenuComponent {
|
|
|
1037
1057
|
}
|
|
1038
1058
|
});
|
|
1039
1059
|
}
|
|
1040
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1041
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
1060
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.3", type: DbxMapboxMenuComponent, isStandalone: true, selector: "dbx-mapbox-menu", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.top": "posSignal().y", "style.left": "posSignal().x" }, styleAttribute: "visibility: hidden; position: fixed" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1042
1062
|
}
|
|
1043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
|
|
1044
1064
|
type: Component,
|
|
1045
1065
|
args: [{
|
|
1046
1066
|
selector: 'dbx-mapbox-menu',
|
|
@@ -1060,17 +1080,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1060
1080
|
*/
|
|
1061
1081
|
class DbxMapboxMapStoreProviderBlock {
|
|
1062
1082
|
dbxMapboxMapStore = inject(DbxMapboxMapStore, { skipSelf: true });
|
|
1063
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1064
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1083
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStoreProviderBlock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1084
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStoreProviderBlock });
|
|
1065
1085
|
}
|
|
1066
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStoreProviderBlock, decorators: [{
|
|
1067
1087
|
type: Injectable
|
|
1068
1088
|
}] });
|
|
1069
1089
|
class DbxMapboxMapStoreInjectionBlockDirective {
|
|
1070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1071
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
1090
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1091
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.3", type: DbxMapboxMapStoreInjectionBlockDirective, isStandalone: true, selector: "[dbxMapboxStoreParentBlocker]", providers: [DbxMapboxMapStoreProviderBlock], ngImport: i0 });
|
|
1072
1092
|
}
|
|
1073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMapStoreInjectionBlockDirective, decorators: [{
|
|
1074
1094
|
type: Directive,
|
|
1075
1095
|
args: [{
|
|
1076
1096
|
selector: '[dbxMapboxStoreParentBlocker]',
|
|
@@ -1089,7 +1109,7 @@ function provideMapboxStoreIfParentIsUnavailable() {
|
|
|
1089
1109
|
return {
|
|
1090
1110
|
provide: DbxMapboxMapStore,
|
|
1091
1111
|
useFactory: (parentInjector, dbxMapboxMapStoreInjectionBlock, dbxMapboxMapStore) => {
|
|
1092
|
-
if (!dbxMapboxMapStore || (dbxMapboxMapStore && dbxMapboxMapStoreInjectionBlock
|
|
1112
|
+
if (!dbxMapboxMapStore || (dbxMapboxMapStore && dbxMapboxMapStoreInjectionBlock?.dbxMapboxMapStore === dbxMapboxMapStore)) {
|
|
1093
1113
|
// create a new dbxMapboxMapStore to use
|
|
1094
1114
|
const injector = Injector.create({ providers: [{ provide: DbxMapboxMapStore }], parent: parentInjector });
|
|
1095
1115
|
dbxMapboxMapStore = injector.get(DbxMapboxMapStore);
|
|
@@ -1103,12 +1123,12 @@ function provideMapboxStoreIfParentIsUnavailable() {
|
|
|
1103
1123
|
class DbxMapboxMarkerComponent {
|
|
1104
1124
|
_dbxMapboxChangeService = inject(DbxMapboxChangeService, { optional: true });
|
|
1105
1125
|
static _latLngPoint = latLngPointFunction({ wrap: true });
|
|
1106
|
-
marker = input.required(...(ngDevMode ? [{ debugName: "marker" }] : []));
|
|
1126
|
+
marker = input.required(...(ngDevMode ? [{ debugName: "marker" }] : /* istanbul ignore next */ []));
|
|
1107
1127
|
latLngSignal = computed(() => {
|
|
1108
1128
|
const marker = this.marker();
|
|
1109
1129
|
return marker?.latLng ? DbxMapboxMarkerComponent._latLngPoint(marker.latLng) : undefined;
|
|
1110
|
-
}, ...(ngDevMode ? [{ debugName: "latLngSignal" }] : []));
|
|
1111
|
-
presentationSignal = computed(() => this.marker()?.presentation ?? 'normal', ...(ngDevMode ? [{ debugName: "presentationSignal" }] : []));
|
|
1130
|
+
}, ...(ngDevMode ? [{ debugName: "latLngSignal" }] : /* istanbul ignore next */ []));
|
|
1131
|
+
presentationSignal = computed(() => this.marker()?.presentation ?? 'normal', ...(ngDevMode ? [{ debugName: "presentationSignal" }] : /* istanbul ignore next */ []));
|
|
1112
1132
|
styleSignal = computed(() => {
|
|
1113
1133
|
const marker = this.marker();
|
|
1114
1134
|
let width = 0;
|
|
@@ -1134,10 +1154,14 @@ class DbxMapboxMarkerComponent {
|
|
|
1134
1154
|
width = 24;
|
|
1135
1155
|
height = 32;
|
|
1136
1156
|
break;
|
|
1157
|
+
default:
|
|
1158
|
+
break;
|
|
1137
1159
|
}
|
|
1138
1160
|
break;
|
|
1139
1161
|
}
|
|
1140
1162
|
break;
|
|
1163
|
+
default:
|
|
1164
|
+
break;
|
|
1141
1165
|
}
|
|
1142
1166
|
if (!height) {
|
|
1143
1167
|
height = width;
|
|
@@ -1149,12 +1173,12 @@ class DbxMapboxMarkerComponent {
|
|
|
1149
1173
|
'background-image': image
|
|
1150
1174
|
};
|
|
1151
1175
|
if (width && height) {
|
|
1152
|
-
style
|
|
1153
|
-
style
|
|
1176
|
+
style['width'] = width + 'px';
|
|
1177
|
+
style['height'] = height + 'px';
|
|
1154
1178
|
style['font-size'] = width + 'px';
|
|
1155
1179
|
}
|
|
1156
1180
|
return style;
|
|
1157
|
-
}, ...(ngDevMode ? [{ debugName: "styleSignal" }] : []));
|
|
1181
|
+
}, ...(ngDevMode ? [{ debugName: "styleSignal" }] : /* istanbul ignore next */ []));
|
|
1158
1182
|
presentationCssClassSignal = computed(() => {
|
|
1159
1183
|
const marker = this.marker();
|
|
1160
1184
|
const presentation = this.presentationSignal();
|
|
@@ -1168,6 +1192,8 @@ class DbxMapboxMarkerComponent {
|
|
|
1168
1192
|
cssClasses.push('dbx-chip-small');
|
|
1169
1193
|
}
|
|
1170
1194
|
break;
|
|
1195
|
+
default:
|
|
1196
|
+
break;
|
|
1171
1197
|
}
|
|
1172
1198
|
if (!marker?.icon) {
|
|
1173
1199
|
cssClasses.push('dbx-mapbox-marker-no-icon');
|
|
@@ -1176,12 +1202,12 @@ class DbxMapboxMarkerComponent {
|
|
|
1176
1202
|
pushItemOrArrayItemsIntoArray(cssClasses, markerClasses);
|
|
1177
1203
|
}
|
|
1178
1204
|
return spaceSeparatedCssClasses(cssClasses);
|
|
1179
|
-
}, ...(ngDevMode ? [{ debugName: "presentationCssClassSignal" }] : []));
|
|
1205
|
+
}, ...(ngDevMode ? [{ debugName: "presentationCssClassSignal" }] : /* istanbul ignore next */ []));
|
|
1180
1206
|
ngOnDestroy() {
|
|
1181
1207
|
this._dbxMapboxChangeService?.emitMarkerDestroyed();
|
|
1182
1208
|
}
|
|
1183
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1184
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1209
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1210
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxMapboxMarkerComponent, isStandalone: true, selector: "dbx-mapbox-marker", inputs: { marker: { classPropertyName: "marker", publicName: "marker", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1185
1211
|
<mgl-marker [lngLat]="latLngSignal()">
|
|
1186
1212
|
<dbx-anchor [anchor]="marker()?.anchor">
|
|
1187
1213
|
<div class="dbx-mapbox-marker" [ngClass]="presentationCssClassSignal()">
|
|
@@ -1198,7 +1224,7 @@ class DbxMapboxMarkerComponent {
|
|
|
1198
1224
|
</mgl-marker>
|
|
1199
1225
|
`, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip{flex-direction:row;font-size:1em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-icon-content{width:18px;height:18px;font-size:18px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-label{padding-left:3px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-icon-content{padding:0!important;width:16px;height:16px;font-size:16px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content{display:none}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content .dbx-mapbox-marker-label{padding-left:0}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-label{padding-left:4px}\n"], dependencies: [{ kind: "component", type: MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "zIndex", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag"] }, { kind: "component", type: DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1200
1226
|
}
|
|
1201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
|
|
1202
1228
|
type: Component,
|
|
1203
1229
|
args: [{ selector: 'dbx-mapbox-marker', template: `
|
|
1204
1230
|
<mgl-marker [lngLat]="latLngSignal()">
|
|
@@ -1222,8 +1248,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1222
1248
|
* Component used to render a set of DbxMapboxMarker values from the input data and marker factory.
|
|
1223
1249
|
*/
|
|
1224
1250
|
class DbxMapboxMarkersComponent {
|
|
1225
|
-
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
1226
|
-
markerFactory = input.required(...(ngDevMode ? [{ debugName: "markerFactory" }] : []));
|
|
1251
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1252
|
+
markerFactory = input.required(...(ngDevMode ? [{ debugName: "markerFactory" }] : /* istanbul ignore next */ []));
|
|
1227
1253
|
markersSignal = computed(() => {
|
|
1228
1254
|
const data = this.data();
|
|
1229
1255
|
const markerFactory = this.markerFactory();
|
|
@@ -1233,18 +1259,18 @@ class DbxMapboxMarkersComponent {
|
|
|
1233
1259
|
else {
|
|
1234
1260
|
return [];
|
|
1235
1261
|
}
|
|
1236
|
-
}, ...(ngDevMode ? [{ debugName: "markersSignal" }] : []));
|
|
1262
|
+
}, ...(ngDevMode ? [{ debugName: "markersSignal" }] : /* istanbul ignore next */ []));
|
|
1237
1263
|
trackMarkerById(index, marker) {
|
|
1238
1264
|
return marker.id ?? `__MID__${index}_`;
|
|
1239
1265
|
}
|
|
1240
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1241
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1266
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxMapboxMarkersComponent, isStandalone: true, selector: "dbx-mapbox-markers", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, markerFactory: { classPropertyName: "markerFactory", publicName: "markerFactory", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1242
1268
|
@for (marker of markersSignal(); track trackMarkerById($index, marker)) {
|
|
1243
1269
|
<dbx-mapbox-marker [marker]="marker"></dbx-mapbox-marker>
|
|
1244
1270
|
}
|
|
1245
1271
|
`, isInline: true, dependencies: [{ kind: "component", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: ["marker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1246
1272
|
}
|
|
1247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxMarkersComponent, decorators: [{
|
|
1248
1274
|
type: Component,
|
|
1249
1275
|
args: [{
|
|
1250
1276
|
selector: 'dbx-mapbox-markers',
|
|
@@ -1275,10 +1301,10 @@ class DbxMapboxLayoutVirtualResizeSyncComponent {
|
|
|
1275
1301
|
constructor() {
|
|
1276
1302
|
cleanSubscription(this.dbxMapboxLayoutComponent.dbxMapboxMapStore.setMinimumVirtualViewportSize(this.resizedVector$));
|
|
1277
1303
|
}
|
|
1278
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1279
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
1304
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1305
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.3", type: DbxMapboxLayoutVirtualResizeSyncComponent, isStandalone: true, selector: "[dbxMapboxLayoutVirtualResizeSync]", ngImport: i0 });
|
|
1280
1306
|
}
|
|
1281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, decorators: [{
|
|
1282
1308
|
type: Directive,
|
|
1283
1309
|
args: [{
|
|
1284
1310
|
selector: '[dbxMapboxLayoutVirtualResizeSync]',
|
|
@@ -1302,8 +1328,8 @@ const importsAndExports = [
|
|
|
1302
1328
|
MarkerComponent
|
|
1303
1329
|
];
|
|
1304
1330
|
class DbxMapboxModule {
|
|
1305
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1306
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
1331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1332
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxModule, imports: [
|
|
1307
1333
|
//
|
|
1308
1334
|
DbxMapboxLayoutVirtualResizeSyncComponent,
|
|
1309
1335
|
DbxMapboxMapDirective,
|
|
@@ -1330,7 +1356,7 @@ class DbxMapboxModule {
|
|
|
1330
1356
|
// ngx-mapbox-gl
|
|
1331
1357
|
MapComponent,
|
|
1332
1358
|
MarkerComponent] });
|
|
1333
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
1359
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxModule, imports: [DbxMapboxLayoutComponent,
|
|
1334
1360
|
DbxMapboxLayoutDrawerComponent,
|
|
1335
1361
|
DbxMapboxInjectionComponent,
|
|
1336
1362
|
DbxMapboxMarkerComponent,
|
|
@@ -1339,7 +1365,7 @@ class DbxMapboxModule {
|
|
|
1339
1365
|
MapComponent,
|
|
1340
1366
|
MarkerComponent] });
|
|
1341
1367
|
}
|
|
1342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxModule, decorators: [{
|
|
1343
1369
|
type: NgModule,
|
|
1344
1370
|
args: [{
|
|
1345
1371
|
imports: importsAndExports,
|
|
@@ -1400,6 +1426,12 @@ const KNOWN_MAPBOX_STYLES = [
|
|
|
1400
1426
|
];
|
|
1401
1427
|
const MAPBOX_MIN_ZOOM_LEVEL = 0;
|
|
1402
1428
|
const MAPBOX_MAX_ZOOM_LEVEL = 22;
|
|
1429
|
+
/**
|
|
1430
|
+
* Clamps a numeric value to the valid Mapbox zoom level range (0 to 22).
|
|
1431
|
+
*
|
|
1432
|
+
* @param input - The raw zoom level number to clamp.
|
|
1433
|
+
* @returns The zoom level clamped between {@link MAPBOX_MIN_ZOOM_LEVEL} and {@link MAPBOX_MAX_ZOOM_LEVEL}.
|
|
1434
|
+
*/
|
|
1403
1435
|
function mapboxZoomLevel(input) {
|
|
1404
1436
|
return Math.min(Math.max(input, MAPBOX_MIN_ZOOM_LEVEL), MAPBOX_MAX_ZOOM_LEVEL);
|
|
1405
1437
|
}
|