devextreme-vue
Version:
DevExtreme Vue UI and Visualization Components
687 lines (685 loc) • 21 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
*/
import { defineComponent } from "vue";
import { prepareComponentConfig } from "./core/index";
import Autocomplete from "devextreme/ui/autocomplete";
import { prepareConfigurationComponentConfig } from "./core/index";
const componentConfig = {
props: {
accessKey: String,
activeStateEnabled: Boolean,
buttons: Array,
dataSource: [Array, Object, String],
deferRendering: Boolean,
disabled: Boolean,
displayValue: String,
dropDownButtonTemplate: {},
dropDownOptions: Object,
elementAttr: Object,
focusStateEnabled: Boolean,
grouped: Boolean,
groupTemplate: {},
height: [Number, String],
hint: String,
hoverStateEnabled: Boolean,
inputAttr: {},
isDirty: Boolean,
isValid: Boolean,
items: Array,
itemTemplate: {},
label: String,
labelMode: String,
maxItemCount: Number,
maxLength: [Number, String],
minSearchLength: Number,
name: String,
onChange: Function,
onClosed: Function,
onContentReady: Function,
onCopy: Function,
onCut: Function,
onDisposing: Function,
onEnterKey: Function,
onFocusIn: Function,
onFocusOut: Function,
onInitialized: Function,
onInput: Function,
onItemClick: Function,
onKeyDown: Function,
onKeyUp: Function,
onOpened: Function,
onOptionChanged: Function,
onPaste: Function,
onSelectionChanged: Function,
onValueChanged: Function,
opened: Boolean,
openOnFieldClick: Boolean,
placeholder: String,
readOnly: Boolean,
rtlEnabled: Boolean,
searchExpr: [Array, Function, String],
searchMode: String,
searchTimeout: Number,
selectedItem: {},
showClearButton: Boolean,
showDropDownButton: Boolean,
spellcheck: Boolean,
stylingMode: String,
tabIndex: Number,
text: String,
useItemTextAsTitle: Boolean,
validationError: {},
validationErrors: Array,
validationMessageMode: String,
validationMessagePosition: String,
validationStatus: String,
value: String,
valueChangeEvent: String,
valueExpr: [Function, String],
visible: Boolean,
width: [Number, String],
wrapItemText: Boolean
},
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:accessKey": null,
"update:activeStateEnabled": null,
"update:buttons": null,
"update:dataSource": null,
"update:deferRendering": null,
"update:disabled": null,
"update:displayValue": null,
"update:dropDownButtonTemplate": null,
"update:dropDownOptions": null,
"update:elementAttr": null,
"update:focusStateEnabled": null,
"update:grouped": null,
"update:groupTemplate": null,
"update:height": null,
"update:hint": null,
"update:hoverStateEnabled": null,
"update:inputAttr": null,
"update:isDirty": null,
"update:isValid": null,
"update:items": null,
"update:itemTemplate": null,
"update:label": null,
"update:labelMode": null,
"update:maxItemCount": null,
"update:maxLength": null,
"update:minSearchLength": null,
"update:name": null,
"update:onChange": null,
"update:onClosed": null,
"update:onContentReady": null,
"update:onCopy": null,
"update:onCut": null,
"update:onDisposing": null,
"update:onEnterKey": null,
"update:onFocusIn": null,
"update:onFocusOut": null,
"update:onInitialized": null,
"update:onInput": null,
"update:onItemClick": null,
"update:onKeyDown": null,
"update:onKeyUp": null,
"update:onOpened": null,
"update:onOptionChanged": null,
"update:onPaste": null,
"update:onSelectionChanged": null,
"update:onValueChanged": null,
"update:opened": null,
"update:openOnFieldClick": null,
"update:placeholder": null,
"update:readOnly": null,
"update:rtlEnabled": null,
"update:searchExpr": null,
"update:searchMode": null,
"update:searchTimeout": null,
"update:selectedItem": null,
"update:showClearButton": null,
"update:showDropDownButton": null,
"update:spellcheck": null,
"update:stylingMode": null,
"update:tabIndex": null,
"update:text": null,
"update:useItemTextAsTitle": null,
"update:validationError": null,
"update:validationErrors": null,
"update:validationMessageMode": null,
"update:validationMessagePosition": null,
"update:validationStatus": null,
"update:value": null,
"update:valueChangeEvent": null,
"update:valueExpr": null,
"update:visible": null,
"update:width": null,
"update:wrapItemText": null,
},
model: { prop: "value", event: "update:value" },
computed: {
instance() {
return this.$_instance;
}
},
beforeCreate() {
this.$_WidgetClass = Autocomplete;
this.$_hasAsyncTemplate = true;
this.$_expectedChildren = {
button: { isCollectionItem: true, optionName: "buttons" },
dropDownOptions: { isCollectionItem: false, optionName: "dropDownOptions" },
item: { isCollectionItem: true, optionName: "items" }
};
}
};
prepareComponentConfig(componentConfig);
const DxAutocomplete = 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 DxButtonConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:location": null,
"update:name": null,
"update:options": null,
},
props: {
location: String,
name: String,
options: Object
}
};
prepareConfigurationComponentConfig(DxButtonConfig);
const DxButton = defineComponent(DxButtonConfig);
DxButton.$_optionName = "buttons";
DxButton.$_isCollectionItem = true;
DxButton.$_expectedChildren = {
options: { isCollectionItem: false, optionName: "options" }
};
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 DxDropDownOptionsConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:accessKey": null,
"update:animation": null,
"update:container": null,
"update:contentTemplate": null,
"update:deferRendering": null,
"update:disabled": null,
"update:dragAndResizeArea": null,
"update:dragEnabled": null,
"update:dragOutsideBoundary": null,
"update:enableBodyScroll": null,
"update:focusStateEnabled": null,
"update:fullScreen": null,
"update:height": null,
"update:hideOnOutsideClick": null,
"update:hideOnParentScroll": null,
"update:hint": null,
"update:hoverStateEnabled": null,
"update:maxHeight": null,
"update:maxWidth": null,
"update:minHeight": null,
"update:minWidth": null,
"update:onContentReady": null,
"update:onDisposing": null,
"update:onHidden": null,
"update:onHiding": null,
"update:onInitialized": null,
"update:onOptionChanged": null,
"update:onResize": null,
"update:onResizeEnd": null,
"update:onResizeStart": null,
"update:onShowing": null,
"update:onShown": null,
"update:onTitleRendered": null,
"update:position": null,
"update:resizeEnabled": null,
"update:restorePosition": null,
"update:rtlEnabled": null,
"update:shading": null,
"update:shadingColor": null,
"update:showCloseButton": null,
"update:showTitle": null,
"update:tabIndex": null,
"update:title": null,
"update:titleTemplate": null,
"update:toolbarItems": null,
"update:visible": null,
"update:width": null,
"update:wrapperAttr": null,
},
props: {
accessKey: String,
animation: Object,
container: {},
contentTemplate: {},
deferRendering: Boolean,
disabled: Boolean,
dragAndResizeArea: {},
dragEnabled: Boolean,
dragOutsideBoundary: Boolean,
enableBodyScroll: Boolean,
focusStateEnabled: Boolean,
fullScreen: Boolean,
height: [Number, String],
hideOnOutsideClick: [Boolean, Function],
hideOnParentScroll: Boolean,
hint: String,
hoverStateEnabled: Boolean,
maxHeight: [Number, String],
maxWidth: [Number, String],
minHeight: [Number, String],
minWidth: [Number, String],
onContentReady: Function,
onDisposing: Function,
onHidden: Function,
onHiding: Function,
onInitialized: Function,
onOptionChanged: Function,
onResize: Function,
onResizeEnd: Function,
onResizeStart: Function,
onShowing: Function,
onShown: Function,
onTitleRendered: Function,
position: [Function, String, Object],
resizeEnabled: Boolean,
restorePosition: Boolean,
rtlEnabled: Boolean,
shading: Boolean,
shadingColor: String,
showCloseButton: Boolean,
showTitle: Boolean,
tabIndex: Number,
title: String,
titleTemplate: {},
toolbarItems: Array,
visible: Boolean,
width: [Number, String],
wrapperAttr: {}
}
};
prepareConfigurationComponentConfig(DxDropDownOptionsConfig);
const DxDropDownOptions = defineComponent(DxDropDownOptionsConfig);
DxDropDownOptions.$_optionName = "dropDownOptions";
DxDropDownOptions.$_expectedChildren = {
animation: { isCollectionItem: false, optionName: "animation" },
position: { isCollectionItem: false, optionName: "position" },
toolbarItem: { isCollectionItem: true, optionName: "toolbarItems" }
};
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:disabled": null,
"update:html": null,
"update:template": null,
"update:text": null,
"update:visible": null,
},
props: {
disabled: Boolean,
html: String,
template: {},
text: String,
visible: Boolean
}
};
prepareConfigurationComponentConfig(DxItemConfig);
const DxItem = defineComponent(DxItemConfig);
DxItem.$_optionName = "items";
DxItem.$_isCollectionItem = true;
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 DxOptionsConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:accessKey": null,
"update:activeStateEnabled": null,
"update:disabled": null,
"update:elementAttr": null,
"update:focusStateEnabled": null,
"update:height": null,
"update:hint": null,
"update:hoverStateEnabled": null,
"update:icon": null,
"update:onClick": null,
"update:onContentReady": null,
"update:onDisposing": null,
"update:onInitialized": null,
"update:onOptionChanged": null,
"update:rtlEnabled": null,
"update:stylingMode": null,
"update:tabIndex": null,
"update:template": null,
"update:text": null,
"update:type": null,
"update:useSubmitBehavior": null,
"update:validationGroup": null,
"update:visible": null,
"update:width": null,
},
props: {
accessKey: String,
activeStateEnabled: Boolean,
disabled: Boolean,
elementAttr: Object,
focusStateEnabled: Boolean,
height: [Number, String],
hint: String,
hoverStateEnabled: Boolean,
icon: String,
onClick: Function,
onContentReady: Function,
onDisposing: Function,
onInitialized: Function,
onOptionChanged: Function,
rtlEnabled: Boolean,
stylingMode: String,
tabIndex: Number,
template: {},
text: String,
type: String,
useSubmitBehavior: Boolean,
validationGroup: String,
visible: Boolean,
width: [Number, String]
}
};
prepareConfigurationComponentConfig(DxOptionsConfig);
const DxOptions = defineComponent(DxOptionsConfig);
DxOptions.$_optionName = "options";
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 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" }
};
const DxToolbarItemConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:cssClass": null,
"update:disabled": null,
"update:html": null,
"update:locateInMenu": null,
"update:location": null,
"update:menuItemTemplate": null,
"update:options": null,
"update:showText": null,
"update:template": null,
"update:text": null,
"update:toolbar": null,
"update:visible": null,
"update:widget": null,
},
props: {
cssClass: String,
disabled: Boolean,
html: String,
locateInMenu: String,
location: String,
menuItemTemplate: {},
options: {},
showText: String,
template: {},
text: String,
toolbar: String,
visible: Boolean,
widget: String
}
};
prepareConfigurationComponentConfig(DxToolbarItemConfig);
const DxToolbarItem = defineComponent(DxToolbarItemConfig);
DxToolbarItem.$_optionName = "toolbarItems";
DxToolbarItem.$_isCollectionItem = true;
export default DxAutocomplete;
export { DxAutocomplete, DxAnimation, DxAt, DxBoundaryOffset, DxButton, DxCollision, DxDropDownOptions, DxFrom, DxHide, DxItem, DxMy, DxOffset, DxOptions, DxPosition, DxShow, DxTo, DxToolbarItem };