Skip to content

Commit

Permalink
Map - add Azure provider in declarations (#28126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedwag authored Oct 10, 2024
1 parent 4669954 commit 19dbffb
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/devextreme-angular/src/ui/map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
*/
@Input()
get apiKey(): string | { bing?: string, google?: string, googleStatic?: string } {
get apiKey(): string | { azure?: string, bing?: string, google?: string, googleStatic?: string } {
return this._getOption('apiKey');
}
set apiKey(value: string | { bing?: string, google?: string, googleStatic?: string }) {
set apiKey(value: string | { azure?: string, bing?: string, google?: string, googleStatic?: string }) {
this._setOption('apiKey', value);
}

Expand Down Expand Up @@ -468,7 +468,7 @@ export class DxMapComponent extends DxComponent implements OnDestroy, OnChanges,
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() apiKeyChange: EventEmitter<string | { bing?: string, google?: string, googleStatic?: string }>;
@Output() apiKeyChange: EventEmitter<string | { azure?: string, bing?: string, google?: string, googleStatic?: string }>;

/**
Expand Down
8 changes: 8 additions & 0 deletions packages/devextreme-angular/src/ui/map/nested/api-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ import { NestedOption } from 'devextreme-angular/core';
providers: [NestedOptionHost]
})
export class DxoMapApiKeyComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get azure(): string {
return this._getOption('azure');
}
set azure(value: string) {
this._setOption('azure', value);
}

@Input()
get bing(): string {
return this._getOption('bing');
Expand Down
8 changes: 8 additions & 0 deletions packages/devextreme-angular/src/ui/nested/api-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ import { NestedOption } from 'devextreme-angular/core';
providers: [NestedOptionHost]
})
export class DxoApiKeyComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get azure(): string {
return this._getOption('azure');
}
set azure(value: string) {
this._setOption('azure', value);
}

@Input()
get bing(): string {
return this._getOption('bing');
Expand Down
1 change: 1 addition & 0 deletions packages/devextreme-react/src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const Map = memo(
// owners:
// Map
type IApiKeyProps = React.PropsWithChildren<{
azure?: string;
bing?: string;
google?: string;
googleStatic?: string;
Expand Down
2 changes: 2 additions & 0 deletions packages/devextreme-vue/src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,13 @@ const DxApiKeyConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:azure": null,
"update:bing": null,
"update:google": null,
"update:googleStatic": null,
},
props: {
azure: String,
bing: String,
google: String,
googleStatic: String
Expand Down
10 changes: 8 additions & 2 deletions packages/devextreme/js/ui/map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Widget, {
} from './widget/ui.widget';

/** @public */
export type MapProvider = 'bing' | 'google' | 'googleStatic';
export type MapProvider = 'azure' | 'bing' | 'google' | 'googleStatic';
/** @public */
export type RouteMode = 'driving' | 'walking';
/** @public */
Expand Down Expand Up @@ -159,14 +159,20 @@ export interface MapLocation {
export interface dxMapOptions extends WidgetOptions<dxMap> {
/**
* @docid
* @default { bing: '', google: '', googleStatic: '' }
* @default { azure: '', bing: '', google: '', googleStatic: '' }
* @public
*/
apiKey?: string | {
/**
* @docid
* @default ""
*/
azure?: string;
/**
* @docid
* @deprecated
* @default ""
*/
bing?: string;
/**
* @docid
Expand Down
7 changes: 6 additions & 1 deletion packages/devextreme/ts/dx.all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20662,7 +20662,7 @@ declare module DevExpress.ui {
*/
export type InitializedEvent =
DevExpress.events.InitializedEventInfo<dxMap>;
export type MapProvider = 'bing' | 'google' | 'googleStatic';
export type MapProvider = 'azure' | 'bing' | 'google' | 'googleStatic';
export type MapType = 'hybrid' | 'roadmap' | 'satellite';
/**
* [descr:_ui_map_MarkerAddedEvent]
Expand Down Expand Up @@ -20737,8 +20737,13 @@ declare module DevExpress.ui {
apiKey?:
| string
| {
/**
* [descr:dxMapOptions.apiKey.azure]
*/
azure?: string;
/**
* [descr:dxMapOptions.apiKey.bing]
* @deprecated [depNote:dxMapOptions.apiKey.bing]
*/
bing?: string;
/**
Expand Down

0 comments on commit 19dbffb

Please sign in to comment.