UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

119 lines (117 loc) 3.62 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 Sortable from "devextreme/ui/sortable"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { 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] }, 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, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = Sortable; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { cursorOffset: { isCollectionItem: false, optionName: "cursorOffset" } }; } }; prepareComponentConfig(componentConfig); const DxSortable = defineComponent(componentConfig); 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"; export default DxSortable; export { DxSortable, DxCursorOffset };