UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

569 lines (567 loc) • 18.7 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 Scheduler from "devextreme/ui/scheduler"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { accessKey: String, adaptivityEnabled: Boolean, allDayExpr: String, allDayPanelMode: String, appointmentCollectorTemplate: {}, appointmentDragging: Object, appointmentTemplate: {}, appointmentTooltipTemplate: {}, cellDuration: Number, crossScrollingEnabled: Boolean, currentDate: [Date, Number, String], currentView: String, customizeDateNavigatorText: Function, dataCellTemplate: {}, dataSource: [Array, Object, String], dateCellTemplate: {}, dateSerializationFormat: String, descriptionExpr: String, disabled: Boolean, dropDownAppointmentTemplate: {}, editing: [Boolean, Object], elementAttr: Object, endDateExpr: String, endDateTimeZoneExpr: String, endDayHour: Number, firstDayOfWeek: Number, focusStateEnabled: Boolean, groupByDate: Boolean, groups: Array, height: [Number, String], hint: String, indicatorUpdateInterval: Number, max: [Date, Number, String], maxAppointmentsPerCell: [String, Number], min: [Date, Number, String], noDataText: String, offset: Number, onAppointmentAdded: Function, onAppointmentAdding: Function, onAppointmentClick: Function, onAppointmentContextMenu: Function, onAppointmentDblClick: Function, onAppointmentDeleted: Function, onAppointmentDeleting: Function, onAppointmentFormOpening: Function, onAppointmentRendered: Function, onAppointmentTooltipShowing: Function, onAppointmentUpdated: Function, onAppointmentUpdating: Function, onCellClick: Function, onCellContextMenu: Function, onContentReady: Function, onDisposing: Function, onInitialized: Function, onOptionChanged: Function, recurrenceEditMode: String, recurrenceExceptionExpr: String, recurrenceRuleExpr: String, remoteFiltering: Boolean, resourceCellTemplate: {}, resources: Array, rtlEnabled: Boolean, scrolling: Object, selectedCellData: Array, shadeUntilCurrentTime: Boolean, showAllDayPanel: Boolean, showCurrentTimeIndicator: Boolean, startDateExpr: String, startDateTimeZoneExpr: String, startDayHour: Number, tabIndex: Number, textExpr: String, timeCellTemplate: {}, timeZone: String, toolbar: Object, useDropDownViewSwitcher: Boolean, views: Array, visible: Boolean, width: [Number, String] }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:adaptivityEnabled": null, "update:allDayExpr": null, "update:allDayPanelMode": null, "update:appointmentCollectorTemplate": null, "update:appointmentDragging": null, "update:appointmentTemplate": null, "update:appointmentTooltipTemplate": null, "update:cellDuration": null, "update:crossScrollingEnabled": null, "update:currentDate": null, "update:currentView": null, "update:customizeDateNavigatorText": null, "update:dataCellTemplate": null, "update:dataSource": null, "update:dateCellTemplate": null, "update:dateSerializationFormat": null, "update:descriptionExpr": null, "update:disabled": null, "update:dropDownAppointmentTemplate": null, "update:editing": null, "update:elementAttr": null, "update:endDateExpr": null, "update:endDateTimeZoneExpr": null, "update:endDayHour": null, "update:firstDayOfWeek": null, "update:focusStateEnabled": null, "update:groupByDate": null, "update:groups": null, "update:height": null, "update:hint": null, "update:indicatorUpdateInterval": null, "update:max": null, "update:maxAppointmentsPerCell": null, "update:min": null, "update:noDataText": null, "update:offset": null, "update:onAppointmentAdded": null, "update:onAppointmentAdding": null, "update:onAppointmentClick": null, "update:onAppointmentContextMenu": null, "update:onAppointmentDblClick": null, "update:onAppointmentDeleted": null, "update:onAppointmentDeleting": null, "update:onAppointmentFormOpening": null, "update:onAppointmentRendered": null, "update:onAppointmentTooltipShowing": null, "update:onAppointmentUpdated": null, "update:onAppointmentUpdating": null, "update:onCellClick": null, "update:onCellContextMenu": null, "update:onContentReady": null, "update:onDisposing": null, "update:onInitialized": null, "update:onOptionChanged": null, "update:recurrenceEditMode": null, "update:recurrenceExceptionExpr": null, "update:recurrenceRuleExpr": null, "update:remoteFiltering": null, "update:resourceCellTemplate": null, "update:resources": null, "update:rtlEnabled": null, "update:scrolling": null, "update:selectedCellData": null, "update:shadeUntilCurrentTime": null, "update:showAllDayPanel": null, "update:showCurrentTimeIndicator": null, "update:startDateExpr": null, "update:startDateTimeZoneExpr": null, "update:startDayHour": null, "update:tabIndex": null, "update:textExpr": null, "update:timeCellTemplate": null, "update:timeZone": null, "update:toolbar": null, "update:useDropDownViewSwitcher": null, "update:views": null, "update:visible": null, "update:width": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = Scheduler; this.$_hasAsyncTemplate = false; this.$_expectedChildren = { appointmentDragging: { isCollectionItem: false, optionName: "appointmentDragging" }, editing: { isCollectionItem: false, optionName: "editing" }, resource: { isCollectionItem: true, optionName: "resources" }, scrolling: { isCollectionItem: false, optionName: "scrolling" }, toolbar: { isCollectionItem: false, optionName: "toolbar" }, view: { isCollectionItem: true, optionName: "views" } }; } }; prepareComponentConfig(componentConfig); const DxScheduler = defineComponent(componentConfig); const DxAppointmentDraggingConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:autoScroll": null, "update:data": null, "update:group": null, "update:onAdd": null, "update:onDragEnd": null, "update:onDragMove": null, "update:onDragStart": null, "update:onRemove": null, "update:scrollSensitivity": null, "update:scrollSpeed": null, }, props: { autoScroll: Boolean, data: {}, group: String, onAdd: Function, onDragEnd: Function, onDragMove: Function, onDragStart: Function, onRemove: Function, scrollSensitivity: Number, scrollSpeed: Number } }; prepareConfigurationComponentConfig(DxAppointmentDraggingConfig); const DxAppointmentDragging = defineComponent(DxAppointmentDraggingConfig); DxAppointmentDragging.$_optionName = "appointmentDragging"; const DxEditingConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:allowAdding": null, "update:allowDeleting": null, "update:allowDragging": null, "update:allowResizing": null, "update:allowTimeZoneEditing": null, "update:allowUpdating": null, }, props: { allowAdding: Boolean, allowDeleting: Boolean, allowDragging: Boolean, allowResizing: Boolean, allowTimeZoneEditing: Boolean, allowUpdating: Boolean } }; prepareConfigurationComponentConfig(DxEditingConfig); const DxEditing = defineComponent(DxEditingConfig); DxEditing.$_optionName = "editing"; const DxItemConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:cssClass": null, "update:disabled": null, "update:elementAttr": null, "update:hint": null, "update:html": null, "update:icon": null, "update:locateInMenu": null, "update:location": null, "update:menuItemTemplate": null, "update:name": null, "update:options": null, "update:showText": null, "update:template": null, "update:text": null, "update:type": null, "update:visible": null, "update:widget": null, }, props: { cssClass: String, disabled: Boolean, elementAttr: Object, hint: String, html: String, icon: String, locateInMenu: String, location: String, menuItemTemplate: {}, name: String, options: Object, showText: String, template: {}, text: String, type: String, visible: Boolean, widget: String } }; prepareConfigurationComponentConfig(DxItemConfig); const DxItem = defineComponent(DxItemConfig); DxItem.$_optionName = "items"; DxItem.$_isCollectionItem = true; DxItem.$_expectedChildren = { options: { isCollectionItem: false, optionName: "options" } }; const DxOptionsConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:buttonTemplate": null, "update:disabled": null, "update:elementAttr": null, "update:focusStateEnabled": null, "update:height": null, "update:hint": null, "update:hoverStateEnabled": null, "update:items": null, "update:keyExpr": null, "update:onContentReady": null, "update:onDisposing": null, "update:onInitialized": null, "update:onItemClick": null, "update:onOptionChanged": null, "update:onSelectionChanged": null, "update:rtlEnabled": null, "update:selectedItemKeys": null, "update:selectedItems": null, "update:selectionMode": null, "update:stylingMode": null, "update:tabIndex": null, "update:visible": null, "update:width": null, }, props: { accessKey: String, activeStateEnabled: Boolean, buttonTemplate: {}, disabled: Boolean, elementAttr: Object, focusStateEnabled: Boolean, height: [Number, String], hint: String, hoverStateEnabled: Boolean, items: Array, keyExpr: [Function, String], onContentReady: Function, onDisposing: Function, onInitialized: Function, onItemClick: Function, onOptionChanged: Function, onSelectionChanged: Function, rtlEnabled: Boolean, selectedItemKeys: Array, selectedItems: Array, selectionMode: String, stylingMode: String, tabIndex: Number, visible: Boolean, width: [Number, String] } }; prepareConfigurationComponentConfig(DxOptionsConfig); const DxOptions = defineComponent(DxOptionsConfig); DxOptions.$_optionName = "options"; DxOptions.$_expectedChildren = { item: { isCollectionItem: true, optionName: "items" }, optionsItem: { isCollectionItem: true, optionName: "items" } }; const DxOptionsItemConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:disabled": null, "update:elementAttr": null, "update:hint": null, "update:icon": null, "update:template": null, "update:text": null, "update:type": null, "update:visible": null, }, props: { disabled: Boolean, elementAttr: Object, hint: String, icon: String, template: {}, text: String, type: String, visible: Boolean } }; prepareConfigurationComponentConfig(DxOptionsItemConfig); const DxOptionsItem = defineComponent(DxOptionsItemConfig); DxOptionsItem.$_optionName = "items"; DxOptionsItem.$_isCollectionItem = true; const DxResourceConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:allowMultiple": null, "update:colorExpr": null, "update:dataSource": null, "update:displayExpr": null, "update:fieldExpr": null, "update:label": null, "update:useColorAsDefault": null, "update:valueExpr": null, }, props: { allowMultiple: Boolean, colorExpr: String, dataSource: [Array, Object, String], displayExpr: [Function, String], fieldExpr: String, label: String, useColorAsDefault: Boolean, valueExpr: [Function, String] } }; prepareConfigurationComponentConfig(DxResourceConfig); const DxResource = defineComponent(DxResourceConfig); DxResource.$_optionName = "resources"; DxResource.$_isCollectionItem = true; const DxScrollingConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:mode": null, }, props: { mode: String } }; prepareConfigurationComponentConfig(DxScrollingConfig); const DxScrolling = defineComponent(DxScrollingConfig); DxScrolling.$_optionName = "scrolling"; const DxToolbarConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:disabled": null, "update:items": null, "update:multiline": null, "update:visible": null, }, props: { disabled: Boolean, items: Array, multiline: Boolean, visible: Boolean } }; prepareConfigurationComponentConfig(DxToolbarConfig); const DxToolbar = defineComponent(DxToolbarConfig); DxToolbar.$_optionName = "toolbar"; DxToolbar.$_expectedChildren = { item: { isCollectionItem: true, optionName: "items" }, toolbarItem: { isCollectionItem: true, optionName: "items" } }; 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:name": null, "update:options": null, "update:showText": null, "update:template": null, "update:text": null, "update:visible": null, "update:widget": null, }, props: { cssClass: String, disabled: Boolean, html: String, locateInMenu: String, location: String, menuItemTemplate: {}, name: String, options: Object, showText: String, template: {}, text: String, visible: Boolean, widget: String } }; prepareConfigurationComponentConfig(DxToolbarItemConfig); const DxToolbarItem = defineComponent(DxToolbarItemConfig); DxToolbarItem.$_optionName = "items"; DxToolbarItem.$_isCollectionItem = true; DxToolbarItem.$_expectedChildren = { options: { isCollectionItem: false, optionName: "options" } }; const DxViewConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:agendaDuration": null, "update:allDayPanelMode": null, "update:appointmentCollectorTemplate": null, "update:appointmentTemplate": null, "update:appointmentTooltipTemplate": null, "update:cellDuration": null, "update:dataCellTemplate": null, "update:dateCellTemplate": null, "update:dropDownAppointmentTemplate": null, "update:endDayHour": null, "update:firstDayOfWeek": null, "update:groupByDate": null, "update:groupOrientation": null, "update:groups": null, "update:intervalCount": null, "update:maxAppointmentsPerCell": null, "update:name": null, "update:offset": null, "update:resourceCellTemplate": null, "update:scrolling": null, "update:startDate": null, "update:startDayHour": null, "update:timeCellTemplate": null, "update:type": null, }, props: { agendaDuration: Number, allDayPanelMode: String, appointmentCollectorTemplate: {}, appointmentTemplate: {}, appointmentTooltipTemplate: {}, cellDuration: Number, dataCellTemplate: {}, dateCellTemplate: {}, dropDownAppointmentTemplate: {}, endDayHour: Number, firstDayOfWeek: Number, groupByDate: Boolean, groupOrientation: String, groups: Array, intervalCount: Number, maxAppointmentsPerCell: [String, Number], name: String, offset: Number, resourceCellTemplate: {}, scrolling: Object, startDate: [Date, Number, String], startDayHour: Number, timeCellTemplate: {}, type: String } }; prepareConfigurationComponentConfig(DxViewConfig); const DxView = defineComponent(DxViewConfig); DxView.$_optionName = "views"; DxView.$_isCollectionItem = true; DxView.$_expectedChildren = { scrolling: { isCollectionItem: false, optionName: "scrolling" } }; export default DxScheduler; export { DxScheduler, DxAppointmentDragging, DxEditing, DxItem, DxOptions, DxOptionsItem, DxResource, DxScrolling, DxToolbar, DxToolbarItem, DxView };