UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

408 lines (406 loc) • 13.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 TreeView from "devextreme/ui/tree_view"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { accessKey: String, activeStateEnabled: Boolean, animationEnabled: Boolean, collapseIcon: String, createChildren: Function, dataSource: [Array, Object, String], dataStructure: String, disabled: Boolean, disabledExpr: [Function, String], displayExpr: [Function, String], elementAttr: Object, expandAllEnabled: Boolean, expandedExpr: [Function, String], expandEvent: String, expandIcon: String, expandNodesRecursive: Boolean, focusStateEnabled: Boolean, hasItemsExpr: [Function, String], height: [Number, String], hint: String, hoverStateEnabled: Boolean, itemHoldTimeout: Number, items: Array, itemsExpr: [Function, String], itemTemplate: {}, keyExpr: [Function, String], noDataText: String, onContentReady: Function, onDisposing: Function, onInitialized: Function, onItemClick: Function, onItemCollapsed: Function, onItemContextMenu: Function, onItemExpanded: Function, onItemHold: Function, onItemRendered: Function, onItemSelectionChanged: Function, onOptionChanged: Function, onSelectAllValueChanged: Function, onSelectionChanged: Function, parentIdExpr: [Function, String], rootValue: {}, rtlEnabled: Boolean, scrollDirection: String, searchEditorOptions: Object, searchEnabled: Boolean, searchExpr: [Array, Function, String], searchMode: String, searchTimeout: Number, searchValue: String, selectAllText: String, selectByClick: Boolean, selectedExpr: [Function, String], selectionMode: String, selectNodesRecursive: Boolean, showCheckBoxesMode: String, tabIndex: Number, useNativeScrolling: Boolean, virtualModeEnabled: Boolean, visible: Boolean, width: [Number, String] }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:animationEnabled": null, "update:collapseIcon": null, "update:createChildren": null, "update:dataSource": null, "update:dataStructure": null, "update:disabled": null, "update:disabledExpr": null, "update:displayExpr": null, "update:elementAttr": null, "update:expandAllEnabled": null, "update:expandedExpr": null, "update:expandEvent": null, "update:expandIcon": null, "update:expandNodesRecursive": null, "update:focusStateEnabled": null, "update:hasItemsExpr": null, "update:height": null, "update:hint": null, "update:hoverStateEnabled": null, "update:itemHoldTimeout": null, "update:items": null, "update:itemsExpr": null, "update:itemTemplate": null, "update:keyExpr": null, "update:noDataText": null, "update:onContentReady": null, "update:onDisposing": null, "update:onInitialized": null, "update:onItemClick": null, "update:onItemCollapsed": null, "update:onItemContextMenu": null, "update:onItemExpanded": null, "update:onItemHold": null, "update:onItemRendered": null, "update:onItemSelectionChanged": null, "update:onOptionChanged": null, "update:onSelectAllValueChanged": null, "update:onSelectionChanged": null, "update:parentIdExpr": null, "update:rootValue": null, "update:rtlEnabled": null, "update:scrollDirection": null, "update:searchEditorOptions": null, "update:searchEnabled": null, "update:searchExpr": null, "update:searchMode": null, "update:searchTimeout": null, "update:searchValue": null, "update:selectAllText": null, "update:selectByClick": null, "update:selectedExpr": null, "update:selectionMode": null, "update:selectNodesRecursive": null, "update:showCheckBoxesMode": null, "update:tabIndex": null, "update:useNativeScrolling": null, "update:virtualModeEnabled": null, "update:visible": null, "update:width": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = TreeView; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { item: { isCollectionItem: true, optionName: "items" }, searchEditorOptions: { isCollectionItem: false, optionName: "searchEditorOptions" } }; } }; prepareComponentConfig(componentConfig); const DxTreeView = 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 DxItemConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:disabled": null, "update:expanded": null, "update:hasItems": null, "update:html": null, "update:icon": null, "update:id": null, "update:items": null, "update:parentId": null, "update:selected": null, "update:template": null, "update:text": null, "update:visible": null, }, props: { disabled: Boolean, expanded: Boolean, hasItems: Boolean, html: String, icon: String, id: [Number, String], items: Array, parentId: [Number, String], 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 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 DxTreeView; export { DxTreeView, DxButton, DxItem, DxOptions, DxSearchEditorOptions };