60e2149072
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date) - Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class - Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting - Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states - Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions - Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares) - Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline - Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements - Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations - Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary - Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds All tests follow AAA pattern and use data-testid selectors matching Angular version. Total: 245 tests across 10 feature suites.
162 lines
4.6 KiB
TypeScript
162 lines
4.6 KiB
TypeScript
/**
|
|
*
|
|
* InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone.
|
|
*
|
|
* [Live Demo](https://www.primereact.org/inputmask/)
|
|
*
|
|
* @module inputmask
|
|
*
|
|
*/
|
|
import * as React from 'react';
|
|
import { InputText, InputTextPassThroughOptions, InputTextProps } from '../inputtext';
|
|
import { PassThroughOptions } from '../passthrough';
|
|
import { TooltipOptions } from '../tooltip/tooltipoptions';
|
|
import { FormEvent } from '../ts-helpers';
|
|
|
|
/**
|
|
* Custom complete event
|
|
* @see {@link InputMaskProps.onComplete}
|
|
* @event
|
|
*/
|
|
interface InputMaskCompleteEvent {
|
|
/**
|
|
* Browser event
|
|
*/
|
|
originalEvent: React.SyntheticEvent;
|
|
/**
|
|
* New value of the component
|
|
*/
|
|
value: string | undefined | null;
|
|
}
|
|
|
|
/**
|
|
* Custom change event.
|
|
* @see {@link InputMaskProps.onChange}
|
|
* @extends {FormEvent}
|
|
* @event
|
|
*/
|
|
interface InputMaskChangeEvent extends FormEvent<string> {}
|
|
|
|
/**
|
|
* Defines valid properties in InputMask component. In addition to these, all properties of {@link inputtext} can be used in this component.
|
|
* @group Properties
|
|
*/
|
|
export interface InputMaskProps extends Omit<InputTextProps, 'onChange' | 'pt'> {
|
|
/**
|
|
* Mask pattern.
|
|
*/
|
|
mask?: string | undefined;
|
|
/**
|
|
* Placeholder character in mask.
|
|
* @defaultValue _
|
|
*/
|
|
slotChar?: string | undefined;
|
|
/**
|
|
* Clears the incomplete value on blur.
|
|
* @defaultValue true
|
|
*/
|
|
autoClear?: boolean | undefined;
|
|
/**
|
|
* Defines if model sets the raw unmasked value to bound value or the formatted mask value.
|
|
* @defaultValue false
|
|
*/
|
|
unmask?: boolean | undefined;
|
|
/**
|
|
* When present, it specifies that the element value cannot be altered.
|
|
* @defaultValue false
|
|
*/
|
|
disabled?: boolean | undefined;
|
|
/**
|
|
* When present, it specifies that the component should have invalid state style.
|
|
* @defaultValue false
|
|
*/
|
|
invalid?: boolean | undefined;
|
|
/**
|
|
* Specifies the input variant of the component.
|
|
* @defaultValue outlined
|
|
*/
|
|
variant?: 'outlined' | 'filled' | undefined;
|
|
/**
|
|
* When present, it specifies that an input field is read-only.
|
|
* @defaultValue false
|
|
*/
|
|
readOnly?: boolean | undefined;
|
|
/**
|
|
* When present, it specifies that the element must be filled out before submitting the form.
|
|
* @defaultValue false
|
|
*/
|
|
required?: boolean | undefined;
|
|
/**
|
|
* Content of the tooltip.
|
|
*/
|
|
tooltip?: string | undefined;
|
|
/**
|
|
* Configuration of the tooltip, refer to the tooltip documentation for more information.
|
|
* @type {TooltipOptions}
|
|
*/
|
|
tooltipOptions?: TooltipOptions | undefined;
|
|
/**
|
|
* Callback to invoke on when user completes the mask pattern.
|
|
* @param {InputMaskCompleteEvent} event - Custom complete event
|
|
*/
|
|
onComplete?(event: InputMaskCompleteEvent): void;
|
|
/**
|
|
* Callback to invoke on value change.
|
|
* @param {InputMaskChangeEvent} event - Custom change event
|
|
*/
|
|
onChange?(event: InputMaskChangeEvent): void;
|
|
/**
|
|
* Callback to invoke when input receives focus.
|
|
* @param {React.FocusEvent<HTMLInputElement>} event - Browser event
|
|
*/
|
|
onFocus?(event: React.FocusEvent<HTMLInputElement>): void;
|
|
/**
|
|
* Callback to invoke when input loses focus.
|
|
* @param {React.FocusEvent<HTMLInputElement>} event - Browser event
|
|
*/
|
|
onBlur?(event: React.FocusEvent<HTMLInputElement>): void;
|
|
/**
|
|
* Used to get the child elements of the component.
|
|
* @readonly
|
|
*/
|
|
children?: React.ReactNode | undefined;
|
|
/**
|
|
* Uses to pass attributes to DOM elements inside the component.
|
|
* @type {InputTextPassThroughOptions}
|
|
*/
|
|
pt?: InputTextPassThroughOptions;
|
|
/**
|
|
* Used to configure passthrough(pt) options of the component.
|
|
* @type {PassThroughOptions}
|
|
*/
|
|
ptOptions?: PassThroughOptions;
|
|
/**
|
|
* When enabled, it removes component related styles in the core.
|
|
* @defaultValue false
|
|
*/
|
|
unstyled?: boolean;
|
|
}
|
|
|
|
/**
|
|
* **PrimeReact - InputMask**
|
|
*
|
|
* _InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone._
|
|
*
|
|
* [Live Demo](https://www.primereact.org/inputmask/)
|
|
* --- ---
|
|
* 
|
|
*
|
|
* @group Component
|
|
*/
|
|
export declare class InputMask extends React.Component<InputMaskProps, any> {
|
|
/**
|
|
* Used to focus the component.
|
|
*/
|
|
public focus(): void;
|
|
/**
|
|
* Used to get container element.
|
|
* @return {InputText | null} Container element
|
|
*/
|
|
public getElement(): typeof InputText | null;
|
|
}
|