devextreme-vue
Version:
DevExtreme UI and Visualization Components for Vue
137 lines (135 loc) • 4.6 kB
JavaScript
/*!
* devextreme-vue
* Version: 25.2.7
* Build date: Tue May 05 2026
*
* Copyright (c) 2012 - 2026 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
*/
import { defineComponent } from "vue";
import { prepareComponentConfig } from "./core/index";
import SpeechToText from "devextreme/ui/speech_to_text";
import { prepareConfigurationComponentConfig } from "./core/index";
const componentConfig = {
props: {
accessKey: String,
activeStateEnabled: Boolean,
customSpeechRecognizer: Object,
disabled: Boolean,
elementAttr: Object,
focusStateEnabled: Boolean,
height: [Number, String],
hint: String,
hoverStateEnabled: Boolean,
onContentReady: Function,
onDisposing: Function,
onEnd: Function,
onError: Function,
onInitialized: Function,
onOptionChanged: Function,
onResult: Function,
onStartClick: Function,
onStopClick: Function,
rtlEnabled: Boolean,
speechRecognitionConfig: Object,
startIcon: String,
startText: String,
stopIcon: String,
stopText: String,
stylingMode: String,
tabIndex: Number,
type: String,
visible: Boolean,
width: [Number, String]
},
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:accessKey": null,
"update:activeStateEnabled": null,
"update:customSpeechRecognizer": null,
"update:disabled": null,
"update:elementAttr": null,
"update:focusStateEnabled": null,
"update:height": null,
"update:hint": null,
"update:hoverStateEnabled": null,
"update:onContentReady": null,
"update:onDisposing": null,
"update:onEnd": null,
"update:onError": null,
"update:onInitialized": null,
"update:onOptionChanged": null,
"update:onResult": null,
"update:onStartClick": null,
"update:onStopClick": null,
"update:rtlEnabled": null,
"update:speechRecognitionConfig": null,
"update:startIcon": null,
"update:startText": null,
"update:stopIcon": null,
"update:stopText": null,
"update:stylingMode": null,
"update:tabIndex": null,
"update:type": null,
"update:visible": null,
"update:width": null,
},
computed: {
instance() {
return this.$_instance;
}
},
beforeCreate() {
this.$_WidgetClass = SpeechToText;
this.$_hasAsyncTemplate = true;
this.$_expectedChildren = {
customSpeechRecognizer: { isCollectionItem: false, optionName: "customSpeechRecognizer" },
speechRecognitionConfig: { isCollectionItem: false, optionName: "speechRecognitionConfig" }
};
}
};
prepareComponentConfig(componentConfig);
const DxSpeechToText = defineComponent(componentConfig);
const DxCustomSpeechRecognizerConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:enabled": null,
"update:isListening": null,
},
props: {
enabled: Boolean,
isListening: Boolean
}
};
prepareConfigurationComponentConfig(DxCustomSpeechRecognizerConfig);
const DxCustomSpeechRecognizer = defineComponent(DxCustomSpeechRecognizerConfig);
DxCustomSpeechRecognizer.$_optionName = "customSpeechRecognizer";
const DxSpeechRecognitionConfigConfig = {
emits: {
"update:isActive": null,
"update:hoveredElement": null,
"update:continuous": null,
"update:grammars": null,
"update:interimResults": null,
"update:lang": null,
"update:maxAlternatives": null,
},
props: {
continuous: Boolean,
grammars: Array,
interimResults: Boolean,
lang: String,
maxAlternatives: Number
}
};
prepareConfigurationComponentConfig(DxSpeechRecognitionConfigConfig);
const DxSpeechRecognitionConfig = defineComponent(DxSpeechRecognitionConfigConfig);
DxSpeechRecognitionConfig.$_optionName = "speechRecognitionConfig";
export default DxSpeechToText;
export { DxSpeechToText, DxCustomSpeechRecognizer, DxSpeechRecognitionConfig };