devextreme-vue
Version:
DevExtreme Vue UI and Visualization Components
484 lines (482 loc) • 15 kB
JavaScript
/*!
* devextreme-vue
* Version: 25.1.5
* Build date: Wed Sep 03 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
*/
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DxTo = exports.DxShowSubmenuMode = exports.DxShowFirstSubmenuMode = exports.DxShow = exports.DxPosition = exports.DxOffset = exports.DxMy = exports.DxItem = exports.DxHide = exports.DxFrom = exports.DxDelay = exports.DxCollision = exports.DxBoundaryOffset = exports.DxAt = exports.DxAnimation = exports.DxMenu = void 0;
const vue_1 = require("vue");
const index_1 = require("./core/index");
const menu_1 = __importDefault(require("devextreme/ui/menu"));
const index_2 = require("./core/index");
const componentConfig = {
props: {
accessKey: String,
activeStateEnabled: Boolean,
adaptivityEnabled: Boolean,
animation: Object,
cssClass: String,
dataSource: [Array, Object, String],
disabled: Boolean,
disabledExpr: [Function, String],
displayExpr: [Function, String],
elementAttr: Object,
focusStateEnabled: Boolean,
height: [Number, String],
hideSubmenuOnMouseLeave: Boolean,
hint: String,
hoverStateEnabled: Boolean,
items: Array,
itemsExpr: [Function, String],
itemTemplate: {},
onContentReady: Function,
onDisposing: Function,
onInitialized: Function,
onItemClick: Function,
onItemContextMenu: Function,
onItemRendered: Function,
onOptionChanged: Function,
onSelectionChanged: Function,
onSubmenuHidden: Function,
onSubmenuHiding: Function,
onSubmenuShowing: Function,
onSubmenuShown: Function,
orientation: String,
rtlEnabled: Boolean,
selectByClick: Boolean,
selectedExpr: [Function, String],
selectedItem: {},
selectionMode: String,
showFirstSubmenuMode: [Object, String],
showSubmenuMode: [Object, String],
submenuDirection: String,
tabIndex: Number,
visible: Boolean,
width: [Number, String]
},
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:accessKey": null,
"update:activeStateEnabled": null,
"update:adaptivityEnabled": 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:hideSubmenuOnMouseLeave": null,
"update:hint": null,
"update:hoverStateEnabled": null,
"update:items": null,
"update:itemsExpr": null,
"update:itemTemplate": null,
"update:onContentReady": null,
"update:onDisposing": null,
"update:onInitialized": null,
"update:onItemClick": null,
"update:onItemContextMenu": null,
"update:onItemRendered": null,
"update:onOptionChanged": null,
"update:onSelectionChanged": null,
"update:onSubmenuHidden": null,
"update:onSubmenuHiding": null,
"update:onSubmenuShowing": null,
"update:onSubmenuShown": null,
"update:orientation": null,
"update:rtlEnabled": null,
"update:selectByClick": null,
"update:selectedExpr": null,
"update:selectedItem": null,
"update:selectionMode": null,
"update:showFirstSubmenuMode": null,
"update:showSubmenuMode": null,
"update:submenuDirection": null,
"update:tabIndex": null,
"update:visible": null,
"update:width": null,
},
computed: {
instance() {
return this.$_instance;
}
},
beforeCreate() {
this.$_WidgetClass = menu_1.default;
this.$_hasAsyncTemplate = true;
this.$_expectedChildren = {
animation: { isCollectionItem: false, optionName: "animation" },
item: { isCollectionItem: true, optionName: "items" },
showFirstSubmenuMode: { isCollectionItem: false, optionName: "showFirstSubmenuMode" },
showSubmenuMode: { isCollectionItem: false, optionName: "showSubmenuMode" }
};
}
};
(0, index_1.prepareComponentConfig)(componentConfig);
const DxMenu = (0, vue_1.defineComponent)(componentConfig);
exports.DxMenu = DxMenu;
const DxAnimationConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:hide": null,
"update:show": null,
},
props: {
hide: [Object, Number, String],
show: [Object, Number, String]
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxAnimationConfig);
const DxAnimation = (0, vue_1.defineComponent)(DxAnimationConfig);
exports.DxAnimation = DxAnimation;
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
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxAtConfig);
const DxAt = (0, vue_1.defineComponent)(DxAtConfig);
exports.DxAt = DxAt;
DxAt.$_optionName = "at";
const DxBoundaryOffsetConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:x": null,
"update:y": null,
},
props: {
x: Number,
y: Number
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxBoundaryOffsetConfig);
const DxBoundaryOffset = (0, vue_1.defineComponent)(DxBoundaryOffsetConfig);
exports.DxBoundaryOffset = DxBoundaryOffset;
DxBoundaryOffset.$_optionName = "boundaryOffset";
const DxCollisionConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:x": null,
"update:y": null,
},
props: {
x: String,
y: String
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxCollisionConfig);
const DxCollision = (0, vue_1.defineComponent)(DxCollisionConfig);
exports.DxCollision = DxCollision;
DxCollision.$_optionName = "collision";
const DxDelayConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:hide": null,
"update:show": null,
},
props: {
hide: Number,
show: Number
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxDelayConfig);
const DxDelay = (0, vue_1.defineComponent)(DxDelayConfig);
exports.DxDelay = DxDelay;
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
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxFromConfig);
const DxFrom = (0, vue_1.defineComponent)(DxFromConfig);
exports.DxFrom = DxFrom;
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
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxHideConfig);
const DxHide = (0, vue_1.defineComponent)(DxHideConfig);
exports.DxHide = DxHide;
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:linkAttr": null,
"update:selectable": null,
"update:selected": null,
"update:template": null,
"update:text": null,
"update:url": null,
"update:visible": null,
},
props: {
beginGroup: Boolean,
closeMenuOnClick: Boolean,
disabled: Boolean,
icon: String,
items: Array,
linkAttr: Object,
selectable: Boolean,
selected: Boolean,
template: {},
text: String,
url: String,
visible: Boolean
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxItemConfig);
const DxItem = (0, vue_1.defineComponent)(DxItemConfig);
exports.DxItem = DxItem;
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
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxMyConfig);
const DxMy = (0, vue_1.defineComponent)(DxMyConfig);
exports.DxMy = DxMy;
DxMy.$_optionName = "my";
const DxOffsetConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:x": null,
"update:y": null,
},
props: {
x: Number,
y: Number
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxOffsetConfig);
const DxOffset = (0, vue_1.defineComponent)(DxOffsetConfig);
exports.DxOffset = DxOffset;
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]
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxPositionConfig);
const DxPosition = (0, vue_1.defineComponent)(DxPositionConfig);
exports.DxPosition = DxPosition;
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
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxShowConfig);
const DxShow = (0, vue_1.defineComponent)(DxShowConfig);
exports.DxShow = DxShow;
DxShow.$_optionName = "show";
DxShow.$_expectedChildren = {
from: { isCollectionItem: false, optionName: "from" },
to: { isCollectionItem: false, optionName: "to" }
};
const DxShowFirstSubmenuModeConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:delay": null,
"update:name": null,
},
props: {
delay: [Number, Object],
name: String
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxShowFirstSubmenuModeConfig);
const DxShowFirstSubmenuMode = (0, vue_1.defineComponent)(DxShowFirstSubmenuModeConfig);
exports.DxShowFirstSubmenuMode = DxShowFirstSubmenuMode;
DxShowFirstSubmenuMode.$_optionName = "showFirstSubmenuMode";
DxShowFirstSubmenuMode.$_expectedChildren = {
delay: { isCollectionItem: false, optionName: "delay" }
};
const DxShowSubmenuModeConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:delay": null,
"update:name": null,
},
props: {
delay: [Number, Object],
name: String
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxShowSubmenuModeConfig);
const DxShowSubmenuMode = (0, vue_1.defineComponent)(DxShowSubmenuModeConfig);
exports.DxShowSubmenuMode = DxShowSubmenuMode;
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
}
};
(0, index_2.prepareConfigurationComponentConfig)(DxToConfig);
const DxTo = (0, vue_1.defineComponent)(DxToConfig);
exports.DxTo = DxTo;
DxTo.$_optionName = "to";
DxTo.$_expectedChildren = {
position: { isCollectionItem: false, optionName: "position" }
};
exports.default = DxMenu;