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.
148 lines
4.3 KiB
TypeScript
148 lines
4.3 KiB
TypeScript
/**
|
|
*
|
|
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
|
|
*
|
|
* [Live Demo](https://www.primereact.org/scrolltop/)
|
|
*
|
|
* @module scrolltop
|
|
*
|
|
*/
|
|
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';
|
|
|
|
export declare type ScrollTopPassThroughType<T> = PassThroughType<T, ScrollTopPassThroughMethodOptions>;
|
|
export declare type ScrollTopPassThroughTransitionType = ReactCSSTransitionProps | ((options: ScrollTopPassThroughMethodOptions) => ReactCSSTransitionProps) | undefined;
|
|
|
|
/**
|
|
* Custom passthrough(pt) option method.
|
|
*/
|
|
export interface ScrollTopPassThroughMethodOptions {
|
|
props: ScrollTopProps;
|
|
state: ScrollTopState;
|
|
}
|
|
|
|
/**
|
|
* Custom passthrough(pt) options.
|
|
* @see {@link ScrollTopProps.pt}
|
|
*/
|
|
export interface ScrollTopPassThroughOptions {
|
|
/**
|
|
* Uses to pass attributes to the root's DOM element.
|
|
*/
|
|
root?: ScrollTopPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
/**
|
|
* Uses to pass attributes to the icon's DOM element.
|
|
*/
|
|
icon?: ScrollTopPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
/**
|
|
* Used to manage all lifecycle hooks
|
|
* @see {@link ComponentHooks}
|
|
*/
|
|
hooks?: ComponentHooks;
|
|
/**
|
|
* Used to control React Transition API.
|
|
*/
|
|
transition?: ScrollTopPassThroughTransitionType;
|
|
}
|
|
|
|
/**
|
|
* Defines current inline state in ScrollTop component.
|
|
*/
|
|
export interface ScrollTopState {
|
|
/**
|
|
* Current visible state as a boolean.
|
|
* @defaultValue false
|
|
*/
|
|
visible: boolean;
|
|
}
|
|
|
|
/**
|
|
* Defines valid properties in ScrollTop component.
|
|
* @group Properties
|
|
*/
|
|
export interface ScrollTopProps {
|
|
/**
|
|
* Target of the ScrollTop, valid values are "window" and "parent".
|
|
* @defaultValue window
|
|
*/
|
|
target?: 'window' | 'parent' | undefined;
|
|
/**
|
|
* Defines the threshold value of the vertical scroll position of the target to toggle the visibility.
|
|
* @defaultValue 400
|
|
*/
|
|
threshold?: number;
|
|
/**
|
|
* Name of the icon or JSX.Element for icon.
|
|
*/
|
|
icon?: IconType<ScrollTopProps>;
|
|
/**
|
|
* Defines the scrolling behavior, "smooth" adds an animation and "auto" scrolls with a jump.
|
|
* @defaultValue smooth
|
|
*/
|
|
behavior?: 'auto' | 'smooth' | undefined;
|
|
/**
|
|
* Style class of the component.
|
|
*/
|
|
className?: string | undefined;
|
|
/**
|
|
* Inline style of the component.
|
|
*/
|
|
style?: React.CSSProperties | undefined;
|
|
/**
|
|
* The properties of CSSTransition can be customized, except for "nodeRef" and "in" properties.
|
|
* @type {CSSTransitionProps}
|
|
*/
|
|
transitionOptions?: CSSTransitionProps | undefined;
|
|
/**
|
|
* Callback to invoke when overlay panel 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 {ScrollTopPassThroughOptions}
|
|
*/
|
|
pt?: ScrollTopPassThroughOptions;
|
|
/**
|
|
* 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 - ScrollTop**
|
|
*
|
|
* _ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly._
|
|
*
|
|
* [Live Demo](https://www.primereact.org/scrolltop/)
|
|
* --- ---
|
|
* 
|
|
*
|
|
* @group Component
|
|
*/
|
|
export declare class ScrollTop extends React.Component<ScrollTopProps, any> {
|
|
/**
|
|
* Used to get container element.
|
|
* @return {HTMLButtonElement | null} Container element
|
|
*/
|
|
public getElement(): HTMLButtonElement | null;
|
|
}
|