UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

532 lines (530 loc) • 17.2 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 */ import { defineComponent } from "vue"; import { prepareComponentConfig } from "./core/index"; import List from "devextreme/ui/list"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { accessKey: String, activeStateEnabled: Boolean, allowItemDeleting: Boolean, bounceEnabled: Boolean, collapsibleGroups: Boolean, dataSource: [Array, Object, String], disabled: Boolean, displayExpr: [Function, String], elementAttr: Object, focusStateEnabled: Boolean, grouped: Boolean, groupTemplate: {}, height: [Number, String], hint: String, hoverStateEnabled: Boolean, indicateLoading: Boolean, itemDeleteMode: String, itemDragging: Object, itemHoldTimeout: Number, items: Array, itemTemplate: {}, keyExpr: [Function, String], menuItems: Array, menuMode: String, nextButtonText: String, noDataText: String, onContentReady: Function, onDisposing: Function, onGroupRendered: Function, onInitialized: Function, onItemClick: Function, onItemContextMenu: Function, onItemDeleted: Function, onItemDeleting: Function, onItemHold: Function, onItemRendered: Function, onItemReordered: Function, onItemSwipe: Function, onOptionChanged: Function, onPageLoading: Function, onPullRefresh: Function, onScroll: Function, onSelectAllValueChanged: Function, onSelectionChanged: Function, onSelectionChanging: Function, pageLoadingText: String, pageLoadMode: String, pulledDownText: String, pullingDownText: String, pullRefreshEnabled: Boolean, refreshingText: String, repaintChangesOnly: Boolean, rtlEnabled: Boolean, scrollByContent: Boolean, scrollByThumb: Boolean, scrollingEnabled: Boolean, searchEditorOptions: Object, searchEnabled: Boolean, searchExpr: [Array, Function, String], searchMode: String, searchTimeout: Number, searchValue: String, selectAllMode: String, selectAllText: String, selectByClick: Boolean, selectedItemKeys: Array, selectedItems: Array, selectionMode: String, showScrollbar: String, showSelectionControls: Boolean, tabIndex: Number, useNativeScrolling: Boolean, visible: Boolean, width: [Number, String] }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:allowItemDeleting": null, "update:bounceEnabled": null, "update:collapsibleGroups": null, "update:dataSource": null, "update:disabled": null, "update:displayExpr": null, "update:elementAttr": null, "update:focusStateEnabled": null, "update:grouped": null, "update:groupTemplate": null, "update:height": null, "update:hint": null, "update:hoverStateEnabled": null, "update:indicateLoading": null, "update:itemDeleteMode": null, "update:itemDragging": null, "update:itemHoldTimeout": null, "update:items": null, "update:itemTemplate": null, "update:keyExpr": null, "update:menuItems": null, "update:menuMode": null, "update:nextButtonText": null, "update:noDataText": null, "update:onContentReady": null, "update:onDisposing": null, "update:onGroupRendered": null, "update:onInitialized": null, "update:onItemClick": null, "update:onItemContextMenu": null, "update:onItemDeleted": null, "update:onItemDeleting": null, "update:onItemHold": null, "update:onItemRendered": null, "update:onItemReordered": null, "update:onItemSwipe": null, "update:onOptionChanged": null, "update:onPageLoading": null, "update:onPullRefresh": null, "update:onScroll": null, "update:onSelectAllValueChanged": null, "update:onSelectionChanged": null, "update:onSelectionChanging": null, "update:pageLoadingText": null, "update:pageLoadMode": null, "update:pulledDownText": null, "update:pullingDownText": null, "update:pullRefreshEnabled": null, "update:refreshingText": null, "update:repaintChangesOnly": null, "update:rtlEnabled": null, "update:scrollByContent": null, "update:scrollByThumb": null, "update:scrollingEnabled": null, "update:searchEditorOptions": null, "update:searchEnabled": null, "update:searchExpr": null, "update:searchMode": null, "update:searchTimeout": null, "update:searchValue": null, "update:selectAllMode": null, "update:selectAllText": null, "update:selectByClick": null, "update:selectedItemKeys": null, "update:selectedItems": null, "update:selectionMode": null, "update:showScrollbar": null, "update:showSelectionControls": null, "update:tabIndex": null, "update:useNativeScrolling": null, "update:visible": null, "update:width": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = List; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { item: { isCollectionItem: true, optionName: "items" }, itemDragging: { isCollectionItem: false, optionName: "itemDragging" }, menuItem: { isCollectionItem: true, optionName: "menuItems" }, searchEditorOptions: { isCollectionItem: false, optionName: "searchEditorOptions" } }; } }; prepareComponentConfig(componentConfig); const DxList = defineComponent(componentConfig); 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 DxCursorOffsetConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: Number, y: Number } }; prepareConfigurationComponentConfig(DxCursorOffsetConfig); const DxCursorOffset = defineComponent(DxCursorOffsetConfig); DxCursorOffset.$_optionName = "cursorOffset"; const DxItemConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:badge": null, "update:disabled": null, "update:html": null, "update:icon": null, "update:showChevron": null, "update:template": null, "update:text": null, "update:visible": null, }, props: { badge: String, disabled: Boolean, html: String, icon: String, showChevron: Boolean, template: {}, text: String, visible: Boolean } }; prepareConfigurationComponentConfig(DxItemConfig); const DxItem = defineComponent(DxItemConfig); DxItem.$_optionName = "items"; DxItem.$_isCollectionItem = true; const DxItemDraggingConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:allowDropInsideItem": null, "update:allowReordering": null, "update:autoScroll": null, "update:boundary": null, "update:container": null, "update:cursorOffset": null, "update:data": null, "update:dragDirection": null, "update:dragTemplate": null, "update:dropFeedbackMode": null, "update:elementAttr": null, "update:filter": null, "update:group": null, "update:handle": null, "update:height": null, "update:itemOrientation": null, "update:moveItemOnDrop": null, "update:onAdd": null, "update:onDisposing": null, "update:onDragChange": null, "update:onDragEnd": null, "update:onDragMove": null, "update:onDragStart": null, "update:onInitialized": null, "update:onOptionChanged": null, "update:onRemove": null, "update:onReorder": null, "update:rtlEnabled": null, "update:scrollSensitivity": null, "update:scrollSpeed": null, "update:width": null, }, props: { allowDropInsideItem: Boolean, allowReordering: Boolean, autoScroll: Boolean, boundary: {}, container: {}, cursorOffset: [Object, String], data: {}, dragDirection: String, dragTemplate: {}, dropFeedbackMode: String, elementAttr: Object, filter: String, group: String, handle: String, height: [Number, String], itemOrientation: String, moveItemOnDrop: Boolean, onAdd: Function, onDisposing: Function, onDragChange: Function, onDragEnd: Function, onDragMove: Function, onDragStart: Function, onInitialized: Function, onOptionChanged: Function, onRemove: Function, onReorder: Function, rtlEnabled: Boolean, scrollSensitivity: Number, scrollSpeed: Number, width: [Number, String] } }; prepareConfigurationComponentConfig(DxItemDraggingConfig); const DxItemDragging = defineComponent(DxItemDraggingConfig); DxItemDragging.$_optionName = "itemDragging"; DxItemDragging.$_expectedChildren = { cursorOffset: { isCollectionItem: false, optionName: "cursorOffset" } }; const DxMenuItemConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:action": null, "update:text": null, }, props: { action: Function, text: String } }; prepareConfigurationComponentConfig(DxMenuItemConfig); const DxMenuItem = defineComponent(DxMenuItemConfig); DxMenuItem.$_optionName = "menuItems"; DxMenuItem.$_isCollectionItem = true; 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 DxSearchEditorOptionsConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:buttons": null, "update:disabled": null, "update:elementAttr": null, "update:focusStateEnabled": null, "update:height": null, "update:hint": null, "update:hoverStateEnabled": null, "update:inputAttr": null, "update:isDirty": null, "update:isValid": null, "update:label": null, "update:labelMode": null, "update:mask": null, "update:maskChar": null, "update:maskInvalidMessage": null, "update:maskRules": null, "update:maxLength": null, "update:mode": null, "update:name": null, "update:onChange": 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:onKeyDown": null, "update:onKeyUp": null, "update:onOptionChanged": null, "update:onPaste": null, "update:onValueChanged": null, "update:placeholder": null, "update:readOnly": null, "update:rtlEnabled": null, "update:showClearButton": null, "update:showMaskMode": null, "update:spellcheck": null, "update:stylingMode": null, "update:tabIndex": null, "update:text": null, "update:useMaskedValue": null, "update:validationError": null, "update:validationErrors": null, "update:validationMessageMode": null, "update:validationMessagePosition": null, "update:validationStatus": null, "update:value": null, "update:valueChangeEvent": null, "update:visible": null, "update:width": null, }, props: { accessKey: String, activeStateEnabled: Boolean, buttons: Array, disabled: Boolean, elementAttr: Object, focusStateEnabled: Boolean, height: [Number, String], hint: String, hoverStateEnabled: Boolean, inputAttr: {}, isDirty: Boolean, isValid: Boolean, label: String, labelMode: String, mask: String, maskChar: String, maskInvalidMessage: String, maskRules: {}, maxLength: [Number, String], mode: String, name: String, onChange: Function, onContentReady: Function, onCopy: Function, onCut: Function, onDisposing: Function, onEnterKey: Function, onFocusIn: Function, onFocusOut: Function, onInitialized: Function, onInput: Function, onKeyDown: Function, onKeyUp: Function, onOptionChanged: Function, onPaste: Function, onValueChanged: Function, placeholder: String, readOnly: Boolean, rtlEnabled: Boolean, showClearButton: Boolean, showMaskMode: String, spellcheck: Boolean, stylingMode: String, tabIndex: Number, text: String, useMaskedValue: Boolean, validationError: {}, validationErrors: Array, validationMessageMode: String, validationMessagePosition: String, validationStatus: String, value: String, valueChangeEvent: String, visible: Boolean, width: [Number, String] } }; prepareConfigurationComponentConfig(DxSearchEditorOptionsConfig); const DxSearchEditorOptions = defineComponent(DxSearchEditorOptionsConfig); DxSearchEditorOptions.$_optionName = "searchEditorOptions"; DxSearchEditorOptions.$_expectedChildren = { button: { isCollectionItem: true, optionName: "buttons" } }; export default DxList; export { DxList, DxButton, DxCursorOffset, DxItem, DxItemDragging, DxMenuItem, DxOptions, DxSearchEditorOptions };