diff --git a/src/app/components/api/blockableui.ts b/src/app/components/api/blockableui.ts index 9c2005bdb53..28264dde9e2 100755 --- a/src/app/components/api/blockableui.ts +++ b/src/app/components/api/blockableui.ts @@ -1,3 +1,10 @@ +/** + * Represents a blockable user interface element. + */ export interface BlockableUI { + /** + * Retrieves the blockable element associated with the UI. + * @returns The HTML element that can be blocked. + */ getBlockableElement(): HTMLElement; } diff --git a/src/app/components/api/confirmation.ts b/src/app/components/api/confirmation.ts index 575c275b97b..44fdd41d386 100755 --- a/src/app/components/api/confirmation.ts +++ b/src/app/components/api/confirmation.ts @@ -1,25 +1,111 @@ import { EventEmitter } from '@angular/core'; +/** + * Represents a confirmation dialog configuration. + */ export interface Confirmation { + /** + * The message to be displayed in the confirmation dialog. + */ message?: string; + + /** + * A unique key to identify the confirmation dialog. + */ key?: string; + + /** + * The name of the icon to be displayed in the confirmation dialog. + */ icon?: string; + + /** + * The header text of the confirmation dialog. + */ header?: string; + + /** + * The callback function to be executed when the accept button is clicked. + */ accept?: Function; + + /** + * The callback function to be executed when the reject button is clicked. + */ reject?: Function; + + /** + * The label text for the accept button. + */ acceptLabel?: string; + + /** + * The label text for the reject button. + */ rejectLabel?: string; + + /** + * The name of the icon to be displayed on the accept button. + */ acceptIcon?: string; + + /** + * The name of the icon to be displayed on the reject button. + */ rejectIcon?: string; + + /** + * Specifies whether the accept button should be visible. + */ acceptVisible?: boolean; + + /** + * Specifies whether the reject button should be visible. + */ rejectVisible?: boolean; + + /** + * Specifies whether to block scrolling on the page when the confirmation dialog is displayed. + */ blockScroll?: boolean; + + /** + * Specifies whether the confirmation dialog should be closed when the escape key is pressed. + */ closeOnEscape?: boolean; + + /** + * Specifies whether clicking outside the confirmation dialog should dismiss it. + */ dismissableMask?: boolean; + + /** + * The ID or class name of the element to receive focus by default when the confirmation dialog is opened. + */ defaultFocus?: string; + + /** + * The CSS class name to be applied to the accept button. + */ acceptButtonStyleClass?: string; + + /** + * The CSS class name to be applied to the reject button. + */ rejectButtonStyleClass?: string; + + /** + * The target event where the confirmation dialog is triggered from. + */ target?: EventTarget; + + /** + * An event emitter for the accept event. + */ acceptEvent?: EventEmitter; + + /** + * An event emitter for the reject event. + */ rejectEvent?: EventEmitter; } diff --git a/src/app/components/api/filtermetadata.ts b/src/app/components/api/filtermetadata.ts index aa186047abb..f689833d0e5 100755 --- a/src/app/components/api/filtermetadata.ts +++ b/src/app/components/api/filtermetadata.ts @@ -1,5 +1,19 @@ +/** + * Represents metadata for filtering a data set. + */ export interface FilterMetadata { + /** + * The value used for filtering. + */ value?: any; + + /** + * The match mode for filtering. + */ matchMode?: string; + + /** + * The operator for filtering. + */ operator?: string; } diff --git a/src/app/components/api/lazyloadevent.ts b/src/app/components/api/lazyloadevent.ts index e00d5881f41..c4765191e21 100755 --- a/src/app/components/api/lazyloadevent.ts +++ b/src/app/components/api/lazyloadevent.ts @@ -1,14 +1,45 @@ -import { SortMeta } from './sortmeta'; import { FilterMetadata } from './filtermetadata'; +import { SortMeta } from './sortmeta'; +/** + * Represents an event object for lazy loading data. + */ export interface LazyLoadEvent { + /** + * The index of the first record to be loaded. + */ first?: number; + /** + * The index of the last record to be loaded. + */ last?: number; + /** + * The number of rows to load. + */ rows?: number; + /** + * The field to be used for sorting. + */ sortField?: string; + /** + * The sort order for the field. + */ sortOrder?: number; + /** + * An array of sort metadata objects for multiple column sorting. + */ multiSortMeta?: SortMeta[]; + /** + * An object containing filter metadata for filtering the data. + * The keys represent the field names, and the values represent the corresponding filter metadata. + */ filters?: { [s: string]: FilterMetadata }; + /** + * The global filter value for filtering across all columns. + */ globalFilter?: any; + /** + * A function that can be called to force an update in the lazy loaded data. + */ forceUpdate?: () => void; } diff --git a/src/app/components/api/megamenuitem.ts b/src/app/components/api/megamenuitem.ts index 81505e56fb3..73fae1a51e1 100644 --- a/src/app/components/api/megamenuitem.ts +++ b/src/app/components/api/megamenuitem.ts @@ -1,34 +1,123 @@ import { QueryParamsHandling } from '@angular/router'; import { MenuItem } from './menuitem'; +/** + * MegaMenuItem API provides the following properties. + */ export interface MegaMenuItem { + /** + * Text of the item. + */ label?: string; + /** + * Icon of the item. + */ icon?: string; + /** + * Callback to execute when item is clicked. + */ command?: (event?: any) => void; + /** + * External link to navigate when item is clicked. + */ url?: string; + /** + * An array of children menuitems. + */ items?: MenuItem[][]; + /** + * Specifies whether the mega menu item is expanded. + */ expanded?: boolean; + /** + * When set as true, disables the menuitem. + */ disabled?: boolean; + /** + * Whether the dom element of menuitem is created or not. + */ visible?: boolean; + /** + * Specifies where to open the linked document. + */ target?: string; + /** + * Configuration for active router link. + */ routerLinkActiveOptions?: any; + /** + * Defines the item as a separator. + */ separator?: boolean; + /** + * Value of the badge. + */ badge?: string; + /** + * Style class of the badge. + */ badgeStyleClass?: string; + /** + * Inline style of the menuitem. + */ style?: any; + /** + * Style class of the menuitem. + */ styleClass?: string; + /** + * Inline style of the item's icon. + */ iconStyle?: any; + /** + * Tooltip text of the item. + */ title?: string; + /** + * Identifier of the element. + */ id?: string; + /** + * Value of HTML data-* attribute. + */ automationId?: any; + /** + * Specifies tab order of the item. + */ tabindex?: string; + /** + * RouterLink definition for internal navigation. + */ routerLink?: any; + /** + * Query parameters for internal navigation via routerLink. + */ queryParams?: { [k: string]: any }; + /** + * Sets the hash fragment for the URL. + */ fragment?: string; + /** + * How to handle query parameters in the router link for the next navigation. One of: + merge : Merge new with current parameters. + preserve : Preserve current parameters.k. + */ queryParamsHandling?: QueryParamsHandling; + /** + * When true, preserves the URL fragment for the next navigation. + */ preserveFragment?: boolean; + /** + * When true, navigates without pushing a new state into history. + */ skipLocationChange?: boolean; + /** + * When true, navigates while replacing the current state in history. + */ replaceUrl?: boolean; + /** + * Developer-defined state that can be passed to any navigation. + */ state?: { [k: string]: any; }; diff --git a/src/app/components/api/overlayoptions.ts b/src/app/components/api/overlayoptions.ts index 55291a15e0c..cca650d0161 100644 --- a/src/app/components/api/overlayoptions.ts +++ b/src/app/components/api/overlayoptions.ts @@ -1,56 +1,179 @@ import { AnimationEvent } from '@angular/animations'; +/** + * Represents the type of overlay mode, which can be 'modal', 'overlay', or undefined. + */ export type OverlayModeType = 'modal' | 'overlay' | undefined; +/** + * Represents the type of direction for a responsive overlay, which can be one of the specified values or undefined. + */ export type ResponsiveOverlayDirectionType = 'center' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | undefined; +/** + * Represents the options for an overlay listener. + */ export interface OverlayListenerOptions { + /** + * The type of listener, which can be 'scroll', 'outside', 'resize', or undefined. + */ type?: 'scroll' | 'outside' | 'resize' | undefined; + /** + * The mode of the overlay listener. + */ mode?: OverlayModeType; + /** + * Indicates whether the overlay listener is valid. + */ valid?: boolean; } +/** + * Represents the options for a responsive overlay. + */ export interface ResponsiveOverlayOptions { + /** + * The inline style for the responsive overlay. + */ style?: any; + /** + * The CSS class for the responsive overlay. + */ styleClass?: string; + /** + * The inline style for the content of the responsive overlay. + */ contentStyle?: any; + /** + * The CSS class for the content of the responsive overlay. + */ contentStyleClass?: string; + /** + * The breakpoint for the responsive overlay. + */ breakpoint?: string; + /** + * The media query for the responsive overlay. + */ media?: string; + /** + * The direction for the responsive overlay. + */ direction?: ResponsiveOverlayDirectionType; } +/** + * Represents an event that occurs when an overlay is shown. + */ export interface OverlayOnShowEvent { + /** + * The overlay element. + */ overlay?: HTMLElement | undefined; + /** + * The target element. + */ target?: HTMLElement | undefined; + /** + * The mode of the overlay. + */ mode?: OverlayModeType; } +/** + * Represents an event that occurs before an overlay is shown. + */ export interface OverlayOnBeforeShowEvent extends OverlayOnShowEvent {} - +/** + * Represents an event that occurs before an overlay is hidden. + */ export interface OverlayOnBeforeHideEvent extends OverlayOnBeforeShowEvent {} - +/** + * Represents an event that occurs when an overlay is hidden. + */ export interface OverlayOnHideEvent extends OverlayOnShowEvent {} - +/** + * Represents the options for an overlay. + */ export interface OverlayOptions { + /** + * The mode of the overlay. + */ mode?: OverlayModeType; + /** + * The inline style for the overlay. + */ style?: any; + /** + * The CSS class for the overlay. + */ styleClass?: string; + /** + * The inline style for the content of the overlay. + */ contentStyle?: any; + /** + * The CSS class for the content of the overlay. + */ contentStyleClass?: string; + /** + * The target element. + */ target?: any; + /** + * The element or location where the overlay should be appended. + */ appendTo?: 'body' | HTMLElement | undefined; + /** + * Indicates whether the overlay should have an auto-generated z-index. + */ autoZIndex?: boolean; + /** + * The base z-index value for the overlay. + */ baseZIndex?: number; + /** + * The transition options for showing the overlay. + */ showTransitionOptions?: string; + /** + * The transition options for hiding the overlay. + */ hideTransitionOptions?: string; + /** + * Indicates whether the overlay should be hidden when the escape key is pressed. + */ hideOnEscape?: boolean; + /** + * A listener function for handling events related to the overlay. + */ listener?: (event: Event, options?: OverlayListenerOptions) => boolean | void; + /** + * The options for a responsive overlay. + */ responsive?: ResponsiveOverlayOptions | undefined; + /** + * A callback function that is invoked before the overlay is shown. + */ onBeforeShow?: (event?: OverlayOnBeforeShowEvent) => void; + /** + * A callback function that is invoked when the overlay is shown. + */ onShow?: (event?: OverlayOnShowEvent) => void; + /** + * A callback function that is invoked before the overlay is hidden. + */ onBeforeHide?: (event?: OverlayOnBeforeHideEvent) => void; + /** + * A callback function that is invoked when the overlay is hidden. + */ onHide?: (event?: OverlayOnHideEvent) => void; + /** + * A callback function that is invoked when the overlay's animation starts. + */ onAnimationStart?: (event?: AnimationEvent) => void; + /** + * A callback function that is invoked when the overlay's animation is done. + */ onAnimationDone?: (event?: AnimationEvent) => void; } diff --git a/src/app/components/api/selectitem.ts b/src/app/components/api/selectitem.ts index ad615c36e9d..bfe00ebeeef 100755 --- a/src/app/components/api/selectitem.ts +++ b/src/app/components/api/selectitem.ts @@ -1,3 +1,6 @@ +/** + * Represents an option item. + */ export interface SelectItem { label?: string; value: T; diff --git a/src/app/components/api/selectitemgroup.ts b/src/app/components/api/selectitemgroup.ts index 697df7bfe4f..6913a328bec 100755 --- a/src/app/components/api/selectitemgroup.ts +++ b/src/app/components/api/selectitemgroup.ts @@ -1,5 +1,7 @@ import { SelectItem } from './selectitem'; - +/** + * Represents a group of select items. + */ export interface SelectItemGroup { label: string; value?: any; diff --git a/src/app/components/api/sortevent.ts b/src/app/components/api/sortevent.ts index ab06f9969a5..8638e24b756 100755 --- a/src/app/components/api/sortevent.ts +++ b/src/app/components/api/sortevent.ts @@ -1,5 +1,7 @@ import { SortMeta } from './sortmeta'; - +/** + * Represents an event triggered when sorting is applied. + */ export interface SortEvent { data?: any[]; mode?: string; diff --git a/src/app/components/api/sortmeta.ts b/src/app/components/api/sortmeta.ts index 73842b26223..4b7f48c1daa 100755 --- a/src/app/components/api/sortmeta.ts +++ b/src/app/components/api/sortmeta.ts @@ -1,3 +1,6 @@ +/** + * Represents metadata for sorting. + */ export interface SortMeta { field: string; order: number; diff --git a/src/app/components/api/tablestate.ts b/src/app/components/api/tablestate.ts index cf3a13d52a1..aed0da0625c 100755 --- a/src/app/components/api/tablestate.ts +++ b/src/app/components/api/tablestate.ts @@ -1,17 +1,56 @@ -import { SortMeta } from './sortmeta'; import { FilterMetadata } from './filtermetadata'; +import { SortMeta } from './sortmeta'; +/** + * Represents the state of a table component. + */ export interface TableState { + /** + * The index of the first row to be displayed. + */ first?: number; + /** + * The number of rows to be displayed per page. + */ rows?: number; + /** + * The field used for sorting. + */ sortField?: string; + /** + * The sort order. + */ sortOrder?: number; + /** + * An array of sort metadata when multiple sorting is applied. + */ multiSortMeta?: SortMeta[]; + /** + * The filters to be applied to the table. + */ filters?: { [s: string]: FilterMetadata | FilterMetadata[] }; + /** + * The column widths for the table. + */ columnWidths?: string; + /** + * The width of the table. + */ tableWidth?: string; + /** + * The width of the wrapper element containing the table. + */ wrapperWidth?: string; + /** + * The selected item(s) in the table. + */ selection?: any; + /** + * The order of the columns in the table. + */ columnOrder?: string[]; + /** + * The keys of the expanded rows in the table. + */ expandedRowKeys?: { [s: string]: boolean }; } diff --git a/src/app/components/api/translation.ts b/src/app/components/api/translation.ts index 98b187fa700..c0bc41dcaeb 100644 --- a/src/app/components/api/translation.ts +++ b/src/app/components/api/translation.ts @@ -1,3 +1,6 @@ +/** + * Represents a set of translated strings used in a component or application. + */ export interface Translation { startsWith?: string; contains?: string; diff --git a/src/app/components/api/treenode.ts b/src/app/components/api/treenode.ts index 73170c38ae4..0261f6c20ad 100755 --- a/src/app/components/api/treenode.ts +++ b/src/app/components/api/treenode.ts @@ -1,3 +1,6 @@ +/** + * Represents a node in a tree data structure. + */ export interface TreeNode { label?: string; data?: T; diff --git a/src/app/components/api/treenodedragevent.ts b/src/app/components/api/treenodedragevent.ts index 91972de8623..8fd2df186c7 100755 --- a/src/app/components/api/treenodedragevent.ts +++ b/src/app/components/api/treenodedragevent.ts @@ -1,5 +1,8 @@ import { TreeNode } from './treenode'; +/** + * Represents the event data for a tree node drag operation. + */ export interface TreeNodeDragEvent { tree?: any; node?: TreeNode;