UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

737 lines (735 loc) • 23.4 kB
/*! * 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.DxToolbarItem = exports.DxTo = exports.DxShow = exports.DxPosition = exports.DxOptions = exports.DxOffset = exports.DxMy = exports.DxItem = exports.DxHide = exports.DxFrom = exports.DxDropDownOptions = exports.DxCollision = exports.DxButton = exports.DxBoundaryOffset = exports.DxAt = exports.DxAnimation = exports.DxTagBox = void 0; const vue_1 = require("vue"); const index_1 = require("./core/index"); const tag_box_1 = __importDefault(require("devextreme/ui/tag_box")); const index_2 = require("./core/index"); const componentConfig = { props: { acceptCustomValue: Boolean, accessKey: String, activeStateEnabled: Boolean, applyValueMode: String, buttons: Array, customItemCreateEvent: String, dataSource: [Array, Object, String], deferRendering: Boolean, disabled: Boolean, displayExpr: [Function, String], dropDownButtonTemplate: {}, dropDownOptions: Object, elementAttr: Object, fieldTemplate: {}, focusStateEnabled: Boolean, grouped: Boolean, groupTemplate: {}, height: [Number, String], hideSelectedItems: Boolean, hint: String, hoverStateEnabled: Boolean, inputAttr: {}, isDirty: Boolean, isValid: Boolean, items: Array, itemTemplate: {}, label: String, labelMode: String, maxDisplayedTags: Number, maxFilterQueryLength: Number, maxLength: [Number, String], minSearchLength: Number, multiline: Boolean, name: String, noDataText: String, onChange: Function, onClosed: Function, onContentReady: Function, onCustomItemCreating: Function, onDisposing: Function, onEnterKey: Function, onFocusIn: Function, onFocusOut: Function, onInitialized: Function, onInput: Function, onItemClick: Function, onKeyDown: Function, onKeyUp: Function, onMultiTagPreparing: Function, onOpened: Function, onOptionChanged: Function, onSelectAllValueChanged: Function, onSelectionChanged: Function, onValueChanged: Function, opened: Boolean, openOnFieldClick: Boolean, placeholder: String, readOnly: Boolean, rtlEnabled: Boolean, searchEnabled: Boolean, searchExpr: [Array, Function, String], searchMode: String, searchTimeout: Number, selectAllMode: String, selectAllText: String, selectedItems: Array, showClearButton: Boolean, showDataBeforeSearch: Boolean, showDropDownButton: Boolean, showMultiTagOnly: Boolean, showSelectionControls: Boolean, stylingMode: String, tabIndex: Number, tagTemplate: {}, text: String, useItemTextAsTitle: Boolean, validationError: {}, validationErrors: Array, validationMessageMode: String, validationMessagePosition: String, validationStatus: String, value: Array, valueChangeEvent: String, valueExpr: [Function, String], visible: Boolean, width: [Number, String], wrapItemText: Boolean }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:acceptCustomValue": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:applyValueMode": null, "update:buttons": null, "update:customItemCreateEvent": null, "update:dataSource": null, "update:deferRendering": null, "update:disabled": null, "update:displayExpr": null, "update:dropDownButtonTemplate": null, "update:dropDownOptions": null, "update:elementAttr": null, "update:fieldTemplate": null, "update:focusStateEnabled": null, "update:grouped": null, "update:groupTemplate": null, "update:height": null, "update:hideSelectedItems": 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:maxDisplayedTags": null, "update:maxFilterQueryLength": null, "update:maxLength": null, "update:minSearchLength": null, "update:multiline": null, "update:name": null, "update:noDataText": null, "update:onChange": null, "update:onClosed": null, "update:onContentReady": null, "update:onCustomItemCreating": 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:onMultiTagPreparing": null, "update:onOpened": null, "update:onOptionChanged": null, "update:onSelectAllValueChanged": null, "update:onSelectionChanged": null, "update:onValueChanged": null, "update:opened": null, "update:openOnFieldClick": null, "update:placeholder": null, "update:readOnly": null, "update:rtlEnabled": null, "update:searchEnabled": null, "update:searchExpr": null, "update:searchMode": null, "update:searchTimeout": null, "update:selectAllMode": null, "update:selectAllText": null, "update:selectedItems": null, "update:showClearButton": null, "update:showDataBeforeSearch": null, "update:showDropDownButton": null, "update:showMultiTagOnly": null, "update:showSelectionControls": null, "update:stylingMode": null, "update:tabIndex": null, "update:tagTemplate": 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 = tag_box_1.default; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { button: { isCollectionItem: true, optionName: "buttons" }, dropDownOptions: { isCollectionItem: false, optionName: "dropDownOptions" }, item: { isCollectionItem: true, optionName: "items" } }; } }; (0, index_1.prepareComponentConfig)(componentConfig); const DxTagBox = (0, vue_1.defineComponent)(componentConfig); exports.DxTagBox = DxTagBox; 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 DxButtonConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:location": null, "update:name": null, "update:options": null, }, props: { location: String, name: String, options: Object } }; (0, index_2.prepareConfigurationComponentConfig)(DxButtonConfig); const DxButton = (0, vue_1.defineComponent)(DxButtonConfig); exports.DxButton = DxButton; 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 } }; (0, index_2.prepareConfigurationComponentConfig)(DxCollisionConfig); const DxCollision = (0, vue_1.defineComponent)(DxCollisionConfig); exports.DxCollision = DxCollision; 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: {} } }; (0, index_2.prepareConfigurationComponentConfig)(DxDropDownOptionsConfig); const DxDropDownOptions = (0, vue_1.defineComponent)(DxDropDownOptionsConfig); exports.DxDropDownOptions = DxDropDownOptions; 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 } }; (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:disabled": null, "update:html": null, "update:template": null, "update:text": null, "update:visible": null, }, props: { disabled: Boolean, html: String, template: {}, text: String, visible: Boolean } }; (0, index_2.prepareConfigurationComponentConfig)(DxItemConfig); const DxItem = (0, vue_1.defineComponent)(DxItemConfig); exports.DxItem = DxItem; 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 } }; (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 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] } }; (0, index_2.prepareConfigurationComponentConfig)(DxOptionsConfig); const DxOptions = (0, vue_1.defineComponent)(DxOptionsConfig); exports.DxOptions = DxOptions; 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] } }; (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 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" } }; 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 } }; (0, index_2.prepareConfigurationComponentConfig)(DxToolbarItemConfig); const DxToolbarItem = (0, vue_1.defineComponent)(DxToolbarItemConfig); exports.DxToolbarItem = DxToolbarItem; DxToolbarItem.$_optionName = "toolbarItems"; DxToolbarItem.$_isCollectionItem = true; exports.default = DxTagBox;