import type { AttributeType } from "../data/elements"; import type { EnumerationMember } from "../data/types"; import type { DurationUnit, Placement } from "../enums"; import type { NamedElement } from "./base"; import type { VisualElement } from "./layout"; /** * Input value constraints (min/max values). * Maps to: ui:InputValueConstraint */ export interface InputValueConstraint { /** Resolved reference to min value AttributeType */ minValueBy?: AttributeType; /** Resolved reference to max value AttributeType */ maxValueBy?: AttributeType; } /** * Base input element - abstract. * Maps to: ui:Input * * EMF Defaults: * - required: false */ export interface Input extends VisualElement { /** Resolved reference to AttributeType */ attributeType: AttributeType; /** Whether input is required. @default false */ required?: boolean; tooltipText?: string; } /** * Text input field. * Maps to: ui:TextInput * * EMF Defaults: * - isTypeAheadField: false */ export interface TextInput extends Input { "@type": "TextInput"; mask?: string; regexp?: string; maxLength?: number; /** Whether this is a type-ahead field. @default false */ isTypeAheadField?: boolean; } /** * Multi-line text area. * Maps to: ui:TextArea * * EMF Defaults: * - lines: 1 */ export interface TextArea extends Input { "@type": "TextArea"; maxLength?: number; /** Number of visible lines. @default 1 */ lines?: number; countCharacters?: boolean; } /** * Numeric input field. * Maps to: ui:NumericInput * * EMF Defaults: * - formatValue: true */ export interface NumericInput extends Input, InputValueConstraint { "@type": "NumericInput"; scale?: number; precision?: number; /** Whether to format the numeric value. @default true */ formatValue?: boolean; } /** * Date input field. * Maps to: ui:DateInput */ export interface DateInput extends Input, InputValueConstraint { "@type": "DateInput"; } /** * Date and time input field. * Maps to: ui:DateTimeInput * * EMF Defaults: * - baseUnit: SECOND */ export interface DateTimeInput extends Input, InputValueConstraint { "@type": "DateTimeInput"; /** Base time unit for the input. @default SECOND */ baseUnit?: DurationUnit; } /** * Time input field. * Maps to: ui:TimeInput * * EMF Defaults: * - baseUnit: SECOND */ export interface TimeInput extends Input, InputValueConstraint { "@type": "TimeInput"; /** Base time unit for the input. @default SECOND */ baseUnit?: DurationUnit; } /** * Checkbox input. * Maps to: ui:Checkbox * * EMF Defaults: * - checked: false * - valueLabelPlacement: DEFAULT */ export interface Checkbox extends Input { "@type": "Checkbox"; /** Initial checked state. @default false */ checked?: boolean; /** Label placement relative to checkbox. @default DEFAULT */ valueLabelPlacement?: Placement; } /** * Toggle switch input. * Maps to: ui:Switch * * EMF Defaults: * - valueLabelPlacement: DEFAULT */ export interface Switch extends Input { "@type": "Switch"; switched?: boolean; /** Label placement relative to switch. @default DEFAULT */ valueLabelPlacement?: Placement; } /** * Enumeration option (for radio/combo/toggle). * Maps to: ui:Option * * EMF Defaults: * - selected: false */ export interface Option extends NamedElement { /** Whether this option is selected. @default false */ selected?: boolean; /** Resolved reference to EnumerationMember */ enumerationMember: EnumerationMember; label?: string; } /** * Enumeration dropdown. * Maps to: ui:EnumerationCombo */ export interface EnumerationCombo extends Input { "@type": "EnumerationCombo"; options: Option[]; } /** * Enumeration radio buttons. * Maps to: ui:EnumerationRadio */ export interface EnumerationRadio extends Input { "@type": "EnumerationRadio"; options: Option[]; } /** * Enumeration toggle button bar. * Maps to: ui:EnumerationToggleButtonbar */ export interface EnumerationToggleButtonbar extends Input { "@type": "EnumerationToggleButtonbar"; options: Option[]; } /** * Trinary logic combo (true/false/null). * Maps to: ui:TrinaryLogicCombo */ export interface TrinaryLogicCombo extends Input { "@type": "TrinaryLogicCombo"; } /** * Binary/file input. * Maps to: ui:BinaryTypeInput */ export interface BinaryTypeInput extends Input { "@type": "BinaryTypeInput"; } /** * Password input. * Maps to: ui:PasswordInput */ export interface PasswordInput extends Input { "@type": "PasswordInput"; maxLength?: number; } /** * Union type for all input types. */ export type InputElement = TextInput | TextArea | NumericInput | DateInput | DateTimeInput | TimeInput | Checkbox | Switch | EnumerationCombo | EnumerationRadio | EnumerationToggleButtonbar | TrinaryLogicCombo | BinaryTypeInput | PasswordInput; //# sourceMappingURL=inputs.d.ts.map