Skip to content

Commit

Permalink
feat: update interface
Browse files Browse the repository at this point in the history
update interface
  • Loading branch information
815are committed Oct 9, 2024
1 parent 5580e99 commit e9bed3e
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions packages/ui-prompting/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
GuiOptions as BaseGuiOptions
} from '@sap-ux/inquirer-common';
import type { I18nBundle, TranslationEntry } from '@sap-ux/ui-components';
import type { SapTextType } from '@sap-ux/i18n';

export { Answers };

Expand Down Expand Up @@ -60,16 +61,29 @@ export interface ListPromptQuestionCreationProps {
placeholder?: string;
}

/**
* Translation properties for translatable entry.
*/
export interface TranslationProperties {
/**
* Text types for translatable entry.
*/
type: SapTextType;

/**
* Description of the annotation for a new entry in the translation file.
*/
annotation?: string;
}

/**
* Extended GUI interface for list question.
*/
export interface InputGuiOptions extends GuiOptions {
/**
* Renders the input field as translatable, allowing the creation of i18n entries with i18n binding.
*
* @default false
* Translation properties for translatable input. If this is defined, the input is considered translatable.
*/
translatable?: boolean;
translationProperties?: TranslationProperties;
}

/**
Expand Down

0 comments on commit e9bed3e

Please sign in to comment.