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 @@ -10,7 +10,6 @@ import { MicrosoftInputDialog } from '@bfc/shared';

import { WidgetLabel } from '../../widgets/WidgetLabel';
import { LgEditorWidget } from '../../widgets/LgEditorWidget';
import { TextWidget } from '../../widgets';

import { Validations } from './Validations';
import { field } from './styles';
Expand All @@ -22,7 +21,7 @@ interface OtherProps extends FieldProps<MicrosoftInputDialog> {
}

export const Other: React.FC<OtherProps> = props => {
const { onChange, getSchema, idSchema, formData, errorSchema } = props;
const { onChange, getSchema, idSchema, formData } = props;

return (
<React.Fragment>
Expand Down Expand Up @@ -56,17 +55,6 @@ export const Other: React.FC<OtherProps> = props => {
height={125}
/>
</div>
<div css={field}>
<TextWidget
onChange={onChange('value')}
schema={getSchema('value')}
id={idSchema.value.__id}
value={formData.value}
label={formatMessage('Value')}
formContext={props.formContext}
rawErrors={errorSchema.value && errorSchema.value.__errors}
/>
</div>
<div css={field}>
<WidgetLabel
label={formatMessage('Default value response')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ export const UserInput: React.FC<UserInputProps> = props => {

return (
<Fragment>
{usesLuisRecognizer(formContext.currentDialog) && (
<div css={field}>
<LuEditorWidget name={intentName} formContext={formContext} />
</div>
)}
<div css={field}>
<TextWidget
onChange={onChange('property')}
Expand All @@ -72,6 +67,22 @@ export const UserInput: React.FC<UserInputProps> = props => {
/>
</div>
)}
<div css={field}>
<TextWidget
onChange={onChange('value')}
schema={getSchema('value')}
id={idSchema.value.__id}
value={formData.value}
label={formatMessage('Value')}
formContext={props.formContext}
rawErrors={errorSchema.value && errorSchema.value.__errors}
/>
</div>
{usesLuisRecognizer(formContext.currentDialog) && type !== SDKTypes.AttachmentInput && (
<div css={field}>
<LuEditorWidget name={intentName} formContext={formContext} prompt />
</div>
)}
{getSchema('defaultLocale') && (
<div css={field}>
<TextWidget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface LuEditorWidgetProps {
name: string;
height?: number | string;
onChange?: (template?: string) => void;
prompt?: boolean;
}

export class LuEditorWidget extends React.Component<LuEditorWidgetProps> {
Expand Down Expand Up @@ -83,7 +84,9 @@ export class LuEditorWidget extends React.Component<LuEditorWidgetProps> {
? diagnostic.message.split('error message: ')[diagnostic.message.split('error message: ').length - 1]
: '';

const label = formatMessage('Trigger phrases (intent: #{name})', { name });
const label = prompt
? formatMessage('Expected responses (intent: {name})', { name })
: formatMessage('Trigger phrases (intent: {name})', { name });

return (
<>
Expand Down