Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { jsx } from '@emotion/core';
import formatMessage from 'format-message';
import { FieldProps } from '@bfcomposer/react-jsonschema-form';

import { TextWidget, SelectWidget, CheckboxWidget } from '../../widgets';
import { TextWidget, CheckboxWidget } from '../../widgets';

import { field, settingsFields, settingsFieldHalf, settingsFieldFull, settingsFieldInline } from './styles';
import { PromptFieldChangeHandler, GetSchema } from './types';
Expand All @@ -16,11 +16,6 @@ interface PromptSettingsrops extends FieldProps<MicrosoftInputDialog> {
export const PromptSettings: React.FC<PromptSettingsrops> = props => {
const { formData, idSchema, getSchema, onChange, errorSchema } = props;

const interruptionOptions = (getSchema('allowInterruptions').enum || []).map(o => ({
label: o as string,
value: o as string,
}));

return (
<div css={settingsFields}>
<div css={[field, settingsFieldHalf]}>
Expand All @@ -46,15 +41,14 @@ export const PromptSettings: React.FC<PromptSettingsrops> = props => {
/>
</div>
<div css={[field, settingsFieldFull]}>
<SelectWidget
<TextWidget
onChange={onChange('allowInterruptions')}
schema={getSchema('allowInterruptions')}
id={idSchema.allowInterruptions.__id}
value={formData.allowInterruptions}
label={formatMessage('Allow interruptions')}
formContext={props.formContext}
rawErrors={errorSchema.allowInterruptions && errorSchema.allowInterruptions.__errors}
options={{ enumOptions: interruptionOptions }}
/>
</div>
<div css={[field, settingsFieldFull, settingsFieldInline]}>
Expand Down
6 changes: 6 additions & 0 deletions Composer/packages/lib/shared/src/appschema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export const appschema: OBISchema = {
examples: [false],
},
allowInterruptions: {
$role: 'expression',
type: 'string',
title: 'Allow Interruptions',
description:
Expand Down Expand Up @@ -361,6 +362,7 @@ export const appschema: OBISchema = {
examples: [false],
},
allowInterruptions: {
$role: 'expression',
type: 'string',
title: 'Allow Interruptions',
description:
Expand Down Expand Up @@ -576,6 +578,7 @@ export const appschema: OBISchema = {
examples: [false],
},
allowInterruptions: {
$role: 'expression',
type: 'string',
title: 'Allow Interruptions',
description:
Expand Down Expand Up @@ -764,6 +767,7 @@ export const appschema: OBISchema = {
examples: [false],
},
allowInterruptions: {
$role: 'expression',
type: 'string',
title: 'Allow Interruptions',
description:
Expand Down Expand Up @@ -1814,6 +1818,7 @@ export const appschema: OBISchema = {
examples: [false],
},
allowInterruptions: {
$role: 'expression',
type: 'string',
title: 'Allow Interruptions',
description:
Expand Down Expand Up @@ -2805,6 +2810,7 @@ export const appschema: OBISchema = {
examples: [false],
},
allowInterruptions: {
$role: 'expression',
type: 'string',
title: 'Allow Interruptions',
description:
Expand Down