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.
196 lines
6.3 KiB
TypeScript
196 lines
6.3 KiB
TypeScript
/**
|
|
*
|
|
* OverlayPanel, also known as Popover, is a container component that can overlay other components on page.
|
|
*
|
|
* [Live Demo](https://www.primereact.org/overlaypanel)
|
|
*
|
|
* @module overlaypanel
|
|
*
|
|
*/
|
|
import * as React from 'react';
|
|
import { CSSTransitionProps as ReactCSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
import { ComponentHooks } from '../componentbase/componentbase';
|
|
import { CSSTransitionProps } from '../csstransition';
|
|
import { PassThroughOptions } from '../passthrough';
|
|
import { IconType, PassThroughType } from '../utils/utils';
|
|
|
|
export declare type OverlayPanelPassThroughType<T> = PassThroughType<T, OverlayPanelPassThroughMethodOptions>;
|
|
export declare type OverlayPanelPassThroughTransitionType = ReactCSSTransitionProps | ((options: OverlayPanelPassThroughMethodOptions) => ReactCSSTransitionProps) | undefined;
|
|
|
|
/**
|
|
* Custom passthrough(pt) option method.
|
|
*/
|
|
export interface OverlayPanelPassThroughMethodOptions {
|
|
props: OverlayPanelProps;
|
|
state: OverlayPanelState;
|
|
}
|
|
|
|
/**
|
|
* Custom passthrough(pt) options.
|
|
* @see {@link OverlayPanelProps.pt}
|
|
*/
|
|
export interface OverlayPanelPassThroughOptions {
|
|
/**
|
|
* Uses to pass attributes to the root's DOM element.
|
|
*/
|
|
root?: OverlayPanelPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
/**
|
|
* Uses to pass attributes to the content's DOM element.
|
|
*/
|
|
content?: OverlayPanelPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
/**
|
|
* Uses to pass attributes to the close button's DOM element.
|
|
*/
|
|
closeButton?: OverlayPanelPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
/**
|
|
* Uses to pass attributes to the close icon's DOM element.
|
|
*/
|
|
closeIcon?: OverlayPanelPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
/**
|
|
* Used to manage all lifecycle hooks
|
|
* @see {@link ComponentHooks}
|
|
*/
|
|
hooks?: ComponentHooks;
|
|
/**
|
|
* Used to control React Transition API.
|
|
*/
|
|
transition?: OverlayPanelPassThroughTransitionType;
|
|
}
|
|
|
|
/**
|
|
* Defines current inline state in OverlayPanel component.
|
|
*/
|
|
export interface OverlayPanelState {
|
|
/**
|
|
* Current visible state as a boolean.
|
|
* @defaultValue false
|
|
*/
|
|
visible: boolean;
|
|
}
|
|
|
|
/**
|
|
* Custom overlay panel breakpoints
|
|
*/
|
|
interface OverlayPanelBreakpoints {
|
|
/**
|
|
* A key-value pair representing a breakpoint and its associated value.
|
|
*/
|
|
[key: string]: string;
|
|
}
|
|
|
|
/**
|
|
* Defines valid properties in OverlayPanel component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
* @group Properties
|
|
*/
|
|
export interface OverlayPanelProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
/**
|
|
* Enables to hide the overlay when outside is clicked.
|
|
* @defaultValue true
|
|
*/
|
|
dismissable?: boolean | undefined;
|
|
/**
|
|
* When enabled, displays a close icon at top right corner.
|
|
* @defaultValue false
|
|
*/
|
|
showCloseIcon?: boolean | undefined;
|
|
/**
|
|
* Icon to display as close icon.
|
|
*/
|
|
closeIcon?: IconType<OverlayPanelProps> | undefined;
|
|
/**
|
|
* Specifies if pressing escape key should hide the preview.
|
|
* @defaultValue true
|
|
*/
|
|
closeOnEscape?: boolean | undefined;
|
|
/**
|
|
* DOM element instance where the overlay panel should be mounted. Valid values are any DOM Element and 'self'. The self value is used to render a component where it is located.
|
|
* @defaultValue document.body
|
|
*/
|
|
appendTo?: 'self' | HTMLElement | undefined | null | (() => HTMLElement);
|
|
/**
|
|
* Aria label of the close icon.
|
|
* @defaultValue close
|
|
*/
|
|
ariaCloseLabel?: string | undefined;
|
|
/**
|
|
* Object literal to define widths per screen size.
|
|
*/
|
|
breakpoints?: OverlayPanelBreakpoints | undefined;
|
|
/**
|
|
* The properties of CSSTransition can be customized, except for "nodeRef" and "in" properties.
|
|
*/
|
|
transitionOptions?: CSSTransitionProps | undefined;
|
|
/**
|
|
* Callback to invoke when overlay becomes visible.
|
|
*/
|
|
onShow?(): void;
|
|
/**
|
|
* Callback to invoke when overlay becomes hidden.
|
|
*/
|
|
onHide?(): 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 {OverlayPanelPassThroughOptions}
|
|
*/
|
|
pt?: OverlayPanelPassThroughOptions;
|
|
/**
|
|
* 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 - OverlayPanel**
|
|
*
|
|
* _OverlayPanel, also known as Popover, is a container component that can overlay other components on page._
|
|
*
|
|
* [Live Demo](https://www.primereact.org/overlaypanel/)
|
|
* --- ---
|
|
* 
|
|
*
|
|
* @group Component
|
|
*/
|
|
export declare class OverlayPanel extends React.Component<OverlayPanelProps, any> {
|
|
/**
|
|
* Toggles the visiblity of the overlay.
|
|
* @param {React.SyntheticEvent | undefined | null} event - Browser event.
|
|
* @param {HTMLElement | EventTarget | undefined | null} target - Browser event.
|
|
*/
|
|
public toggle(event: React.SyntheticEvent | undefined | null, target?: HTMLElement | EventTarget | undefined | null): void;
|
|
/**
|
|
* Shows the overlay.
|
|
* @param {React.SyntheticEvent | undefined | null} event - Browser event.
|
|
* @param {HTMLElement | EventTarget | undefined | null} target - Browser event.
|
|
*/
|
|
public show(event: React.SyntheticEvent | undefined | null, target: HTMLElement | EventTarget | undefined | null): void;
|
|
/**
|
|
* Hides the overlay.
|
|
*/
|
|
public hide(): void;
|
|
/**
|
|
* Align the overlay panel to its surroundings.
|
|
*/
|
|
public align(): void;
|
|
/**
|
|
* Checks whether the overlay is currently visible.
|
|
* @returns {boolean} A boolean value indicating whether the overlay is visible.
|
|
*/
|
|
public isVisible(): boolean;
|
|
/**
|
|
* Used to get container element.
|
|
* @return {HTMLDivElement | null} Container element
|
|
*/
|
|
public getElement(): HTMLDivElement | null;
|
|
}
|