UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

267 lines (265 loc) • 8.77 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 FilterBuilder from "devextreme/ui/filter_builder"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { accessKey: String, activeStateEnabled: Boolean, allowHierarchicalFields: Boolean, customOperations: Array, disabled: Boolean, elementAttr: Object, fields: Array, filterOperationDescriptions: Object, focusStateEnabled: Boolean, groupOperationDescriptions: Object, groupOperations: Array, height: [Number, String], hint: String, hoverStateEnabled: Boolean, maxGroupLevel: Number, onContentReady: Function, onDisposing: Function, onEditorPrepared: Function, onEditorPreparing: Function, onInitialized: Function, onOptionChanged: Function, onValueChanged: Function, rtlEnabled: Boolean, tabIndex: Number, value: [Array, Function, String], visible: Boolean, width: [Number, String] }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:accessKey": null, "update:activeStateEnabled": null, "update:allowHierarchicalFields": null, "update:customOperations": null, "update:disabled": null, "update:elementAttr": null, "update:fields": null, "update:filterOperationDescriptions": null, "update:focusStateEnabled": null, "update:groupOperationDescriptions": null, "update:groupOperations": null, "update:height": null, "update:hint": null, "update:hoverStateEnabled": null, "update:maxGroupLevel": null, "update:onContentReady": null, "update:onDisposing": null, "update:onEditorPrepared": null, "update:onEditorPreparing": null, "update:onInitialized": null, "update:onOptionChanged": null, "update:onValueChanged": null, "update:rtlEnabled": null, "update:tabIndex": null, "update:value": null, "update:visible": null, "update:width": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = FilterBuilder; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { customOperation: { isCollectionItem: true, optionName: "customOperations" }, field: { isCollectionItem: true, optionName: "fields" }, filterOperationDescriptions: { isCollectionItem: false, optionName: "filterOperationDescriptions" }, groupOperationDescriptions: { isCollectionItem: false, optionName: "groupOperationDescriptions" } }; } }; prepareComponentConfig(componentConfig); const DxFilterBuilder = defineComponent(componentConfig); const DxCustomOperationConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:calculateFilterExpression": null, "update:caption": null, "update:customizeText": null, "update:dataTypes": null, "update:editorTemplate": null, "update:hasValue": null, "update:icon": null, "update:name": null, }, props: { calculateFilterExpression: Function, caption: String, customizeText: Function, dataTypes: Array, editorTemplate: {}, hasValue: Boolean, icon: String, name: String } }; prepareConfigurationComponentConfig(DxCustomOperationConfig); const DxCustomOperation = defineComponent(DxCustomOperationConfig); DxCustomOperation.$_optionName = "customOperations"; DxCustomOperation.$_isCollectionItem = true; const DxFieldConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:calculateFilterExpression": null, "update:caption": null, "update:customizeText": null, "update:dataField": null, "update:dataType": null, "update:editorOptions": null, "update:editorTemplate": null, "update:falseText": null, "update:filterOperations": null, "update:format": null, "update:lookup": null, "update:name": null, "update:trueText": null, }, props: { calculateFilterExpression: Function, caption: String, customizeText: Function, dataField: String, dataType: String, editorOptions: {}, editorTemplate: {}, falseText: String, filterOperations: Array, format: [Object, String, Function], lookup: Object, name: String, trueText: String } }; prepareConfigurationComponentConfig(DxFieldConfig); const DxField = defineComponent(DxFieldConfig); DxField.$_optionName = "fields"; DxField.$_isCollectionItem = true; DxField.$_expectedChildren = { format: { isCollectionItem: false, optionName: "format" }, lookup: { isCollectionItem: false, optionName: "lookup" } }; const DxFilterOperationDescriptionsConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:between": null, "update:contains": null, "update:endsWith": null, "update:equal": null, "update:greaterThan": null, "update:greaterThanOrEqual": null, "update:isBlank": null, "update:isNotBlank": null, "update:lessThan": null, "update:lessThanOrEqual": null, "update:notContains": null, "update:notEqual": null, "update:startsWith": null, }, props: { between: String, contains: String, endsWith: String, equal: String, greaterThan: String, greaterThanOrEqual: String, isBlank: String, isNotBlank: String, lessThan: String, lessThanOrEqual: String, notContains: String, notEqual: String, startsWith: String } }; prepareConfigurationComponentConfig(DxFilterOperationDescriptionsConfig); const DxFilterOperationDescriptions = defineComponent(DxFilterOperationDescriptionsConfig); DxFilterOperationDescriptions.$_optionName = "filterOperationDescriptions"; const DxFormatConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:currency": null, "update:formatter": null, "update:parser": null, "update:precision": null, "update:type": null, "update:useCurrencyAccountingStyle": null, }, props: { currency: String, formatter: Function, parser: Function, precision: Number, type: String, useCurrencyAccountingStyle: Boolean } }; prepareConfigurationComponentConfig(DxFormatConfig); const DxFormat = defineComponent(DxFormatConfig); DxFormat.$_optionName = "format"; const DxGroupOperationDescriptionsConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:and": null, "update:notAnd": null, "update:notOr": null, "update:or": null, }, props: { and: String, notAnd: String, notOr: String, or: String } }; prepareConfigurationComponentConfig(DxGroupOperationDescriptionsConfig); const DxGroupOperationDescriptions = defineComponent(DxGroupOperationDescriptionsConfig); DxGroupOperationDescriptions.$_optionName = "groupOperationDescriptions"; const DxLookupConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:allowClearing": null, "update:dataSource": null, "update:displayExpr": null, "update:valueExpr": null, }, props: { allowClearing: Boolean, dataSource: [Array, Object], displayExpr: [Function, String], valueExpr: [Function, String] } }; prepareConfigurationComponentConfig(DxLookupConfig); const DxLookup = defineComponent(DxLookupConfig); DxLookup.$_optionName = "lookup"; export default DxFilterBuilder; export { DxFilterBuilder, DxCustomOperation, DxField, DxFilterOperationDescriptions, DxFormat, DxGroupOperationDescriptions, DxLookup };