UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

238 lines (236 loc) • 7.11 kB
/*! * devextreme-vue * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-vue */ import { defineComponent } from "vue"; import { prepareComponentConfig } from "./core/index"; import Map from "devextreme/ui/map"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { accessKey: String, activeStateEnabled: Boolean, apiKey: [Object, String], autoAdjust: Boolean, center: [Array, Object, String], controls: Boolean, disabled: Boolean, elementAttr: Object, focusStateEnabled: Boolean, height: [Number, String], hint: String, hoverStateEnabled: Boolean, markerIconSrc: String, markers: Array, onClick: Function, onDisposing: Function, onInitialized: Function, onMarkerAdded: Function, onMarkerRemoved: Function, onOptionChanged: Function, onReady: Function, onRouteAdded: Function, onRouteRemoved: Function, provider: String, providerConfig: Object, routes: Array, rtlEnabled: Boolean, tabIndex: Number, type: String, visible: Boolean, width: [Number, String], zoom: Number }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:apiKey": null, "update:autoAdjust": null, "update:center": null, "update:controls": null, "update:disabled": null, "update:elementAttr": null, "update:focusStateEnabled": null, "update:height": null, "update:hint": null, "update:hoverStateEnabled": null, "update:markerIconSrc": null, "update:markers": null, "update:onClick": null, "update:onDisposing": null, "update:onInitialized": null, "update:onMarkerAdded": null, "update:onMarkerRemoved": null, "update:onOptionChanged": null, "update:onReady": null, "update:onRouteAdded": null, "update:onRouteRemoved": null, "update:provider": null, "update:providerConfig": null, "update:routes": null, "update:rtlEnabled": null, "update:tabIndex": null, "update:type": null, "update:visible": null, "update:width": null, "update:zoom": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = Map; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { apiKey: { isCollectionItem: false, optionName: "apiKey" }, center: { isCollectionItem: false, optionName: "center" }, marker: { isCollectionItem: true, optionName: "markers" }, providerConfig: { isCollectionItem: false, optionName: "providerConfig" }, route: { isCollectionItem: true, optionName: "routes" } }; } }; prepareComponentConfig(componentConfig); const DxMap = defineComponent(componentConfig); 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 } }; prepareConfigurationComponentConfig(DxApiKeyConfig); const DxApiKey = defineComponent(DxApiKeyConfig); DxApiKey.$_optionName = "apiKey"; const DxCenterConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:lat": null, "update:lng": null, }, props: { lat: Number, lng: Number } }; prepareConfigurationComponentConfig(DxCenterConfig); const DxCenter = defineComponent(DxCenterConfig); DxCenter.$_optionName = "center"; const DxLocationConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:lat": null, "update:lng": null, }, props: { lat: Number, lng: Number } }; prepareConfigurationComponentConfig(DxLocationConfig); const DxLocation = defineComponent(DxLocationConfig); DxLocation.$_optionName = "location"; const DxMarkerConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:iconSrc": null, "update:location": null, "update:onClick": null, "update:tooltip": null, }, props: { iconSrc: String, location: [Array, Object, String], onClick: Function, tooltip: [Object, String] } }; prepareConfigurationComponentConfig(DxMarkerConfig); const DxMarker = defineComponent(DxMarkerConfig); DxMarker.$_optionName = "markers"; DxMarker.$_isCollectionItem = true; DxMarker.$_expectedChildren = { location: { isCollectionItem: false, optionName: "location" }, tooltip: { isCollectionItem: false, optionName: "tooltip" } }; const DxProviderConfigConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:mapId": null, "update:useAdvancedMarkers": null, }, props: { mapId: String, useAdvancedMarkers: Boolean } }; prepareConfigurationComponentConfig(DxProviderConfigConfig); const DxProviderConfig = defineComponent(DxProviderConfigConfig); DxProviderConfig.$_optionName = "providerConfig"; const DxRouteConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:color": null, "update:locations": null, "update:mode": null, "update:opacity": null, "update:weight": null, }, props: { color: String, locations: Array, mode: String, opacity: Number, weight: Number } }; prepareConfigurationComponentConfig(DxRouteConfig); const DxRoute = defineComponent(DxRouteConfig); DxRoute.$_optionName = "routes"; DxRoute.$_isCollectionItem = true; DxRoute.$_expectedChildren = { location: { isCollectionItem: true, optionName: "locations" } }; const DxTooltipConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:isShown": null, "update:text": null, }, props: { isShown: Boolean, text: String } }; prepareConfigurationComponentConfig(DxTooltipConfig); const DxTooltip = defineComponent(DxTooltipConfig); DxTooltip.$_optionName = "tooltip"; export default DxMap; export { DxMap, DxApiKey, DxCenter, DxLocation, DxMarker, DxProviderConfig, DxRoute, DxTooltip };