Skip to content

Commit

Permalink
update angular types
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedwag committed Sep 11, 2024
1 parent a4ecd12 commit a640ee6
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 0 deletions.
27 changes: 27 additions & 0 deletions packages/devextreme-angular/src/ui/map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ import {

import { DxoApiKeyModule } from 'devextreme-angular/ui/nested';
import { DxiCenterModule } from 'devextreme-angular/ui/nested';
import { DxoGoogleMapConfigModule } from 'devextreme-angular/ui/nested';
import { DxiMarkerModule } from 'devextreme-angular/ui/nested';
import { DxiLocationModule } from 'devextreme-angular/ui/nested';
import { DxoTooltipModule } from 'devextreme-angular/ui/nested';
import { DxiRouteModule } from 'devextreme-angular/ui/nested';

import { DxoMapApiKeyModule } from 'devextreme-angular/ui/map/nested';
import { DxiMapCenterModule } from 'devextreme-angular/ui/map/nested';
import { DxoMapGoogleMapConfigModule } from 'devextreme-angular/ui/map/nested';
import { DxiMapMarkerModule } from 'devextreme-angular/ui/map/nested';
import { DxiMapLocationModule } from 'devextreme-angular/ui/map/nested';
import { DxoMapTooltipModule } from 'devextreme-angular/ui/map/nested';
Expand Down Expand Up @@ -194,6 +196,19 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
}


/**
* [descr:dxMapOptions.googleMapConfig]
*/
@Input()
get googleMapConfig(): { mapId?: string, useAdvancedMarkers?: boolean } {
return this._getOption('googleMapConfig');
}
set googleMapConfig(value: { mapId?: string, useAdvancedMarkers?: boolean }) {
this._setOption('googleMapConfig', value);
}


/**
* [descr:dxMapOptions.height]
Expand Down Expand Up @@ -497,6 +512,13 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
*/
@Output() focusStateEnabledChange: EventEmitter<boolean>;

/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() googleMapConfigChange: EventEmitter<{ mapId?: string, useAdvancedMarkers?: boolean }>;

/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
Expand Down Expand Up @@ -680,6 +702,7 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
{ emit: 'disabledChange' },
{ emit: 'elementAttrChange' },
{ emit: 'focusStateEnabledChange' },
{ emit: 'googleMapConfigChange' },
{ emit: 'heightChange' },
{ emit: 'hintChange' },
{ emit: 'hoverStateEnabledChange' },
Expand Down Expand Up @@ -745,12 +768,14 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
imports: [
DxoApiKeyModule,
DxiCenterModule,
DxoGoogleMapConfigModule,
DxiMarkerModule,
DxiLocationModule,
DxoTooltipModule,
DxiRouteModule,
DxoMapApiKeyModule,
DxiMapCenterModule,
DxoMapGoogleMapConfigModule,
DxiMapMarkerModule,
DxiMapLocationModule,
DxoMapTooltipModule,
Expand All @@ -765,12 +790,14 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
DxMapComponent,
DxoApiKeyModule,
DxiCenterModule,
DxoGoogleMapConfigModule,
DxiMarkerModule,
DxiLocationModule,
DxoTooltipModule,
DxiRouteModule,
DxoMapApiKeyModule,
DxiMapCenterModule,
DxoMapGoogleMapConfigModule,
DxiMapMarkerModule,
DxiMapLocationModule,
DxoMapTooltipModule,
Expand Down
80 changes: 80 additions & 0 deletions packages/devextreme-angular/src/ui/map/nested/google-map-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/* tslint:disable:max-line-length */


import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';





import {
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';


@Component({
selector: 'dxo-map-google-map-config',
template: '',
styles: [''],
providers: [NestedOptionHost]
})
export class DxoMapGoogleMapConfigComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get mapId(): string {
return this._getOption('mapId');
}
set mapId(value: string) {
this._setOption('mapId', value);
}

@Input()
get useAdvancedMarkers(): boolean {
return this._getOption('useAdvancedMarkers');
}
set useAdvancedMarkers(value: boolean) {
this._setOption('useAdvancedMarkers', value);
}


protected get _optionPath() {
return 'googleMapConfig';
}


constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}


ngOnInit() {
this._addRecreatedComponent();
}

ngOnDestroy() {
this._addRemovedOption(this._getOptionPath());
}


}

@NgModule({
declarations: [
DxoMapGoogleMapConfigComponent
],
exports: [
DxoMapGoogleMapConfigComponent
],
})
export class DxoMapGoogleMapConfigModule { }
1 change: 1 addition & 0 deletions packages/devextreme-angular/src/ui/map/nested/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './api-key';
export * from './center-dxi';
export * from './google-map-config';
export * from './location-dxi';
export * from './marker-dxi';
export * from './route-dxi';
Expand Down
80 changes: 80 additions & 0 deletions packages/devextreme-angular/src/ui/nested/google-map-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/* tslint:disable:max-line-length */


import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';





import {
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';


@Component({
selector: 'dxo-google-map-config',
template: '',
styles: [''],
providers: [NestedOptionHost]
})
export class DxoGoogleMapConfigComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get mapId(): string {
return this._getOption('mapId');
}
set mapId(value: string) {
this._setOption('mapId', value);
}

@Input()
get useAdvancedMarkers(): boolean {
return this._getOption('useAdvancedMarkers');
}
set useAdvancedMarkers(value: boolean) {
this._setOption('useAdvancedMarkers', value);
}


protected get _optionPath() {
return 'googleMapConfig';
}


constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}


ngOnInit() {
this._addRecreatedComponent();
}

ngOnDestroy() {
this._addRemovedOption(this._getOptionPath());
}


}

@NgModule({
declarations: [
DxoGoogleMapConfigComponent
],
exports: [
DxoGoogleMapConfigComponent
],
})
export class DxoGoogleMapConfigModule { }
1 change: 1 addition & 0 deletions packages/devextreme-angular/src/ui/nested/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export * from './fullstackedline';
export * from './fullstackedspline';
export * from './fullstackedsplinearea';
export * from './geometry';
export * from './google-map-config';
export * from './grid-size';
export * from './grid';
export * from './group-dxi';
Expand Down

0 comments on commit a640ee6

Please sign in to comment.