UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

459 lines (457 loc) • 13.6 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 ContextMenu from "devextreme/ui/context_menu"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { accessKey: String, activeStateEnabled: Boolean, animation: Object, cssClass: String, dataSource: [Array, Object, String], disabled: Boolean, disabledExpr: [Function, String], displayExpr: [Function, String], elementAttr: Object, focusStateEnabled: Boolean, height: [Number, String], hideOnOutsideClick: [Boolean, Function], hint: String, hoverStateEnabled: Boolean, items: Array, itemsExpr: [Function, String], itemTemplate: {}, onContentReady: Function, onDisposing: Function, onHidden: Function, onHiding: Function, onInitialized: Function, onItemClick: Function, onItemContextMenu: Function, onItemRendered: Function, onOptionChanged: Function, onPositioning: Function, onSelectionChanged: Function, onShowing: Function, onShown: Function, position: Object, rtlEnabled: Boolean, selectByClick: Boolean, selectedExpr: [Function, String], selectedItem: {}, selectionMode: String, showEvent: [Object, String], showSubmenuMode: [Object, String], submenuDirection: String, tabIndex: Number, target: {}, visible: Boolean, width: [Number, String] }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:animation": null, "update:cssClass": null, "update:dataSource": null, "update:disabled": null, "update:disabledExpr": null, "update:displayExpr": null, "update:elementAttr": null, "update:focusStateEnabled": null, "update:height": null, "update:hideOnOutsideClick": null, "update:hint": null, "update:hoverStateEnabled": null, "update:items": null, "update:itemsExpr": null, "update:itemTemplate": null, "update:onContentReady": null, "update:onDisposing": null, "update:onHidden": null, "update:onHiding": null, "update:onInitialized": null, "update:onItemClick": null, "update:onItemContextMenu": null, "update:onItemRendered": null, "update:onOptionChanged": null, "update:onPositioning": null, "update:onSelectionChanged": null, "update:onShowing": null, "update:onShown": null, "update:position": null, "update:rtlEnabled": null, "update:selectByClick": null, "update:selectedExpr": null, "update:selectedItem": null, "update:selectionMode": null, "update:showEvent": null, "update:showSubmenuMode": null, "update:submenuDirection": null, "update:tabIndex": null, "update:target": null, "update:visible": null, "update:width": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = ContextMenu; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { animation: { isCollectionItem: false, optionName: "animation" }, item: { isCollectionItem: true, optionName: "items" }, position: { isCollectionItem: false, optionName: "position" }, showEvent: { isCollectionItem: false, optionName: "showEvent" }, showSubmenuMode: { isCollectionItem: false, optionName: "showSubmenuMode" } }; } }; prepareComponentConfig(componentConfig); const DxContextMenu = defineComponent(componentConfig); const DxAnimationConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:hide": null, "update:show": null, }, props: { hide: [Object, Number, String], show: [Object, Number, String] } }; prepareConfigurationComponentConfig(DxAnimationConfig); const DxAnimation = defineComponent(DxAnimationConfig); DxAnimation.$_optionName = "animation"; DxAnimation.$_expectedChildren = { hide: { isCollectionItem: false, optionName: "hide" }, show: { isCollectionItem: false, optionName: "show" } }; const DxAtConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: String, y: String } }; prepareConfigurationComponentConfig(DxAtConfig); const DxAt = defineComponent(DxAtConfig); DxAt.$_optionName = "at"; const DxBoundaryOffsetConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: Number, y: Number } }; prepareConfigurationComponentConfig(DxBoundaryOffsetConfig); const DxBoundaryOffset = defineComponent(DxBoundaryOffsetConfig); DxBoundaryOffset.$_optionName = "boundaryOffset"; const DxCollisionConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: String, y: String } }; prepareConfigurationComponentConfig(DxCollisionConfig); const DxCollision = defineComponent(DxCollisionConfig); DxCollision.$_optionName = "collision"; const DxDelayConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:hide": null, "update:show": null, }, props: { hide: Number, show: Number } }; prepareConfigurationComponentConfig(DxDelayConfig); const DxDelay = defineComponent(DxDelayConfig); DxDelay.$_optionName = "delay"; const DxFromConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:left": null, "update:opacity": null, "update:position": null, "update:scale": null, "update:top": null, }, props: { left: Number, opacity: Number, position: Object, scale: Number, top: Number } }; prepareConfigurationComponentConfig(DxFromConfig); const DxFrom = defineComponent(DxFromConfig); DxFrom.$_optionName = "from"; DxFrom.$_expectedChildren = { position: { isCollectionItem: false, optionName: "position" } }; const DxHideConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:complete": null, "update:delay": null, "update:direction": null, "update:duration": null, "update:easing": null, "update:from": null, "update:staggerDelay": null, "update:start": null, "update:to": null, "update:type": null, }, props: { complete: Function, delay: Number, direction: String, duration: Number, easing: String, from: Object, staggerDelay: Number, start: Function, to: Object, type: String } }; prepareConfigurationComponentConfig(DxHideConfig); const DxHide = defineComponent(DxHideConfig); DxHide.$_optionName = "hide"; DxHide.$_expectedChildren = { from: { isCollectionItem: false, optionName: "from" }, to: { isCollectionItem: false, optionName: "to" } }; const DxItemConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:beginGroup": null, "update:closeMenuOnClick": null, "update:disabled": null, "update:icon": null, "update:items": null, "update:selectable": null, "update:selected": null, "update:template": null, "update:text": null, "update:visible": null, }, props: { beginGroup: Boolean, closeMenuOnClick: Boolean, disabled: Boolean, icon: String, items: Array, selectable: Boolean, selected: Boolean, template: {}, text: String, visible: Boolean } }; prepareConfigurationComponentConfig(DxItemConfig); const DxItem = defineComponent(DxItemConfig); DxItem.$_optionName = "items"; DxItem.$_isCollectionItem = true; DxItem.$_expectedChildren = { item: { isCollectionItem: true, optionName: "items" } }; const DxMyConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: String, y: String } }; prepareConfigurationComponentConfig(DxMyConfig); const DxMy = defineComponent(DxMyConfig); DxMy.$_optionName = "my"; const DxOffsetConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: Number, y: Number } }; prepareConfigurationComponentConfig(DxOffsetConfig); const DxOffset = defineComponent(DxOffsetConfig); DxOffset.$_optionName = "offset"; const DxPositionConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:at": null, "update:boundary": null, "update:boundaryOffset": null, "update:collision": null, "update:my": null, "update:of": null, "update:offset": null, }, props: { at: [Object, String], boundary: {}, boundaryOffset: [Object, String], collision: [String, Object], my: [Object, String], of: {}, offset: [Object, String] } }; prepareConfigurationComponentConfig(DxPositionConfig); const DxPosition = defineComponent(DxPositionConfig); DxPosition.$_optionName = "position"; DxPosition.$_expectedChildren = { at: { isCollectionItem: false, optionName: "at" }, boundaryOffset: { isCollectionItem: false, optionName: "boundaryOffset" }, collision: { isCollectionItem: false, optionName: "collision" }, my: { isCollectionItem: false, optionName: "my" }, offset: { isCollectionItem: false, optionName: "offset" } }; const DxShowConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:complete": null, "update:delay": null, "update:direction": null, "update:duration": null, "update:easing": null, "update:from": null, "update:staggerDelay": null, "update:start": null, "update:to": null, "update:type": null, }, props: { complete: Function, delay: Number, direction: String, duration: Number, easing: String, from: Object, staggerDelay: Number, start: Function, to: Object, type: String } }; prepareConfigurationComponentConfig(DxShowConfig); const DxShow = defineComponent(DxShowConfig); DxShow.$_optionName = "show"; DxShow.$_expectedChildren = { from: { isCollectionItem: false, optionName: "from" }, to: { isCollectionItem: false, optionName: "to" } }; const DxShowEventConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:delay": null, "update:name": null, }, props: { delay: Number, name: String } }; prepareConfigurationComponentConfig(DxShowEventConfig); const DxShowEvent = defineComponent(DxShowEventConfig); DxShowEvent.$_optionName = "showEvent"; const DxShowSubmenuModeConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:delay": null, "update:name": null, }, props: { delay: [Number, Object], name: String } }; prepareConfigurationComponentConfig(DxShowSubmenuModeConfig); const DxShowSubmenuMode = defineComponent(DxShowSubmenuModeConfig); DxShowSubmenuMode.$_optionName = "showSubmenuMode"; DxShowSubmenuMode.$_expectedChildren = { delay: { isCollectionItem: false, optionName: "delay" } }; const DxToConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:left": null, "update:opacity": null, "update:position": null, "update:scale": null, "update:top": null, }, props: { left: Number, opacity: Number, position: Object, scale: Number, top: Number } }; prepareConfigurationComponentConfig(DxToConfig); const DxTo = defineComponent(DxToConfig); DxTo.$_optionName = "to"; DxTo.$_expectedChildren = { position: { isCollectionItem: false, optionName: "position" } }; export default DxContextMenu; export { DxContextMenu, DxAnimation, DxAt, DxBoundaryOffset, DxCollision, DxDelay, DxFrom, DxHide, DxItem, DxMy, DxOffset, DxPosition, DxShow, DxShowEvent, DxShowSubmenuMode, DxTo };