Class

ListItemComponent

ListItemComponent(linesopt, item, icon, iconSlotopt, buttonopt, titleopt, descriptionopt, infoopt, subinfoopt)

Constructor

# new ListItemComponent(linesopt, item, icon, iconSlotopt, buttonopt, titleopt, descriptionopt, infoopt, subinfoopt)

The ListItemComponent is an Angular component that extends NgxBaseComponent. It provides a flexible and customizable list item interface with support for icons, buttons, and various text elements. The component also handles actions and navigation based on user interactions.

A component for displaying a list item with various customization options.

sequenceDiagram participant C as Component participant V as View participant U as User C->>V: Initialize component V->>U: Display list item U->>V: Click on item or action V->>C: Trigger handleAction() C->>C: Process action C->>V: Update view or navigate
Parameters:
Name Type Attributes Default Description
lines string <optional>
'none'

Determines the line style of the item. Can be 'inset', 'inseet', or 'none'.

item Record.<string, any>

The data item to be displayed in the list item.

icon string

The name of the icon to be displayed.

iconSlot 'start' | 'end' <optional>
'start'

The position of the icon within the item.

button StringOrBoolean <optional>
true

Determines if the item should behave as a button.

title string <optional>

The main title of the list item.

description string <optional>

A description for the list item.

info string <optional>

Additional information for the list item.

subinfo string <optional>

Sub-information for the list item.

View Source lib/components/list-item/list-item.component.ts, line 57

Example
<ngx-decaf-list-item
  [item]="dataItem"
  icon="star"
  title="Item Title"
  description="Item Description"
  (clickEvent)="handleItemClick($event)">
</ngx-decaf-list-item>

Extends

Classes

ListItemComponent

The ListItemComponent is an Angular component that extends NgxBaseComponent. It provides a flexible and customizable list item interface with support for icons, buttons, and various text elements. The component also handles actions and navigation based on user interactions.

ListItemComponent

Initializes a new ListItemComponent by calling the parent class constructor with the component name for logging and identification purposes. Also registers all available Ionic icons to ensure they can be displayed in the component.

NgxBaseComponent

Initializes a new instance of the base component with the provided instance token. This constructor sets up the fundamental properties required by all Decaf components, including the component name, locale settings, and logging capabilities. The instance token is used for component identification and locale derivation.

The constructor performs the following initialization steps:

  1. Sets the componentName from the provided instance token
  2. Derives the componentLocale from the class name using utility functions
  3. Initializes the logger instance for the component

Members

DecafRepository.<Model>

# protected _repository

Provides a connection to the data layer for retrieving and manipulating data. This is an instance of the DecafRepository class from the @decaf-ts/core package, which is initialized in the repository getter method.

The repository is used to perform CRUD (Create, Read, Update, Delete) operations on the data model, such as fetching data, creating new items, updating existing items, and deleting items. It also provides methods for querying and filtering data based on specific criteria.

The repository for interacting with the data model.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 779

HTMLIonPopoverElement

# actionMenuComponent

ViewChild reference that provides access to the HTMLIonPopoverElement used for displaying action menus. This reference is used to programmatically control the popover, such as dismissing it when necessary.

Reference to the action menu popover component.

View Source lib/components/list-item/list-item.component.ts, line 524

boolean

# actionMenuOpen

Tracks the state of the action menu to prevent multiple instances from being opened simultaneously and to ensure proper cleanup when actions are performed. Used for managing the popover lifecycle.

Flag indicating whether the action menu popover is currently open.

Default Value:
  • false

View Source lib/components/list-item/list-item.component.ts, line 672

StringOrBoolean

# button

When set to true, the list item will have button-like behavior including hover effects, click handling, and appropriate accessibility attributes. When false, the item is displayed as static content without interactive behavior.

Controls whether the list item behaves as a clickable button.

Default Value:
  • true

View Source lib/components/list-item/list-item.component.ts, line 582

string

# className

Allows custom CSS classes to be added to the component's root element. These classes are appended to any automatically generated classes based on other component properties. Multiple classes can be provided as a space-separated string. This provides a way to customize the component's appearance beyond the built-in styling options.

Additional CSS class names to apply to the component.

Overrides:
Default Value:
  • ""

View Source lib/engine/NgxBaseComponent.ts, line 897

EventEmitter.<ListItemCustomEvent>

# clickEvent

Emits custom events when the list item is clicked or when actions are performed on it. The emitted event contains information about the action, the item data, and other relevant context for parent components to handle.

Event emitter for list item click interactions.

View Source lib/components/list-item/list-item.component.ts, line 637

ElementRef

# component

Provides direct access to the native DOM element of the component through Angular's ViewChild decorator. This reference can be used to manipulate the DOM element directly, apply custom styles, or access native element properties and methods. The element is identified by the 'component' template reference variable.

Reference to the component's element.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 721

string

# componentLocale

Stores the automatically derived locale based on the component's class name. This is determined during component initialization and serves as a fallback when no explicit locale is provided via the locale input property. The derivation is handled by the getLocaleFromClassName utility function, which extracts a locale identifier from the component's class name.

The locale derived from the component's class name.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 924

string

# protected componentName

Stores the name of the component, which is typically derived from the class name. This property is used internally for various purposes such as logging, deriving the default locale, and potentially for component identification in debugging or error reporting.

The componentName is set during the component's initialization process and should not be modified externally. It's marked as protected to allow access in derived classes while preventing direct access from outside the component hierarchy.

The name of the component.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 741

Example
// Inside a derived component class
console.log(this.componentName); // Outputs: "MyCustomComponent"
string

# description

Provides additional context or details about the item. This text is typically displayed below the title with less visual emphasis. Useful for providing context without cluttering the main title.

Secondary descriptive text for the list item.

View Source lib/components/list-item/list-item.component.ts, line 604

string

# icon

Specifies which icon to display using Ionic's icon system. The icon name should correspond to an available Ionic icon or a custom icon that has been registered with the icon registry.

The name of the icon to display in the list item.

View Source lib/components/list-item/list-item.component.ts, line 558

'start' | 'end'

# iconSlot

Determines whether the icon appears at the start (left in LTR languages) or end (right in LTR languages) of the list item. This affects the overall layout and visual hierarchy of the item content.

Position of the icon within the list item.

Default Value:
  • 'start'

View Source lib/components/list-item/list-item.component.ts, line 570

string

# info

Displays supplementary information that provides extra context about the item. This could include metadata, status information, or other relevant details that don't fit in the title or description.

Additional information text for the list item.

View Source lib/components/list-item/list-item.component.ts, line 615

boolean

# initialized

Tracks whether the component has completed its initialization process. This flag is used to prevent duplicate initialization and to determine if certain operations that require initialization can be performed.

Flag indicating if the component has been initialized

Overrides:
Default Value:
  • false

View Source lib/engine/NgxBaseComponent.ts, line 303

Record.<string, unknown>

# item

Contains the raw data that this list item represents. This object is used to extract display information and for passing to event handlers when the item is interacted with. It overrides the base item property.

The data object associated with this list item.

Overrides:

View Source lib/components/list-item/list-item.component.ts, line 547

'inset' | 'full' | 'none'

# lines

Determines how lines are displayed around the list item borders. 'inset' shows lines with padding, 'full' shows full-width lines, and 'none' removes all lines. This affects the visual separation between list items.

Controls the display of lines around the list item.

Default Value:
  • 'inset'

View Source lib/components/list-item/list-item.component.ts, line 536

EventEmitter.<RendererCustomEvent>

# listenEvent

Emits custom events that occur within child components or the layout itself. This allows parent components to listen for and respond to user interactions or state changes within the grid layout. Events are passed up the component hierarchy to enable coordinated behavior across the application.

Event emitter for custom renderer events.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 960

string

# locale

Specifies the locale identifier to use when translating component text. This can be set explicitly via input property to override the automatically derived locale from the component name. The locale is typically a language code (e.g., 'en', 'fr') or a language-region code (e.g., 'en-US', 'fr-CA') that determines which translation set to use for the component's text content.

The locale to be used for translations.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 871

Record.<string, string>

# mapper

Defines how fields from the data model should be mapped to properties used by the component. This allows for flexible data binding between the model and the component's display logic.

Field mapping configuration.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 858

"ios" | "md" | undefined

# mode

Controls the visual appearance of the component based on platform design guidelines. The 'ios' mode follows iOS design patterns, while 'md' (Material Design) follows Android/Google design patterns. This property affects various visual aspects such as animations, form elements, and icons. Setting this property allows components to maintain platform-specific styling for a more native look and feel.

Component platform style.

Overrides:
Default Value:
  • "md"

View Source lib/engine/NgxBaseComponent.ts, line 911

Model | undefined

# model

The data model repository that this component will use for CRUD operations. This provides a connection to the data layer for retrieving and manipulating data.

Repository model for data operations.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 762

Array

# operations

Defines which CRUD operations (Create, Read, Update, Delete) are available for this component. This affects which operations can be performed on the data.

Available CRUD operations for this component.

Overrides:
Default Value:
  • [OperationKeys.READ]

View Source lib/engine/NgxBaseComponent.ts, line 838

string

# pk

Specifies which field in the model should be used as the primary key. This is typically used for identifying unique records in operations like update and delete.

Primary key field name for the model.

Overrides:
Default Value:
  • 'id'

View Source lib/engine/NgxBaseComponent.ts, line 818

Record.<string, unknown>

# props

Contains key-value pairs of dynamic properties that can be applied to the component at runtime. This flexible configuration object allows for dynamic property assignment without requiring explicit input bindings for every possible configuration option. Properties from this object are parsed and applied to the component instance through the parseProps method, enabling customizable component behavior based on external configuration.

Dynamic properties configuration object.

Overrides:
Default Value:
  • {}

View Source lib/engine/NgxBaseComponent.ts, line 793

string | StringOrBoolean

# renderChild

Determines if child components should be rendered by the component. This can be set to a boolean value or a string that can be converted to a boolean. When true, child components defined in the model will be rendered. When false, child components will be skipped. This provides control over the rendering depth.

Controls whether child components should be rendered

Overrides:
Default Value:
  • true

View Source lib/engine/NgxBaseComponent.ts, line 937

string

# rendererId

A unique identifier used to reference the component's renderer instance. This can be used for targeting specific renderer instances when multiple components are present on the same page.

Unique identifier for the renderer.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 752

NgxRenderingEngine

# renderingEngine

Provides access to the NgxRenderingEngine singleton instance, which handles the rendering of components based on model definitions. This engine is used to extract decorator metadata and render child components.

Reference to the rendering engine instance

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 323

string

# route

Defines the base route path used for navigation actions related to this component. This is often used as a prefix for constructing navigation URLs.

Base route for navigation related to this component.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 828

boolean

# showSlideItems

Controls the visibility of slide actions based on screen size and available operations. When true, users can swipe on the item to reveal action buttons for operations like edit and delete.

Flag indicating whether slide items are currently enabled.

Default Value:
  • false

View Source lib/components/list-item/list-item.component.ts, line 649

string

# subinfo

Provides tertiary level information that complements the info field. This is typically used for additional metadata or contextual details that are useful but not critical for understanding the item.

Sub-information text displayed in the list item.

View Source lib/components/list-item/list-item.component.ts, line 626

string

# title

Sets the primary text content that appears prominently in the list item. This is typically the most important information about the item and is displayed with emphasis in the component's visual hierarchy.

The main title text displayed in the list item.

View Source lib/components/list-item/list-item.component.ts, line 593

StringOrBoolean

# translatable

Controls whether the component's text content should be processed for translation. When true, the component will attempt to translate text using the specified locale. When false, text is displayed as-is without translation. This property accepts either a boolean value or a string that can be converted to a boolean (e.g., 'true', 'false', '1', '0').

Determines if the component should be translated.

Overrides:
Default Value:
  • false

View Source lib/engine/NgxBaseComponent.ts, line 884

string | number

# uid

A unique identifier for the current record being displayed or manipulated. This is typically used in conjunction with the primary key for operations on specific records.

Unique identifier for the current record.

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 848

number

# windowWidth

Stores the current browser window width which is used to determine responsive behavior, such as when to show or hide slide items based on screen size. Updated automatically on window resize events.

Current window width in pixels.

View Source lib/components/list-item/list-item.component.ts, line 660

HTMLIonPopoverElement

# static actionMenuComponent

ViewChild reference that provides access to the HTMLIonPopoverElement used for displaying action menus. This reference is used to programmatically control the popover, such as dismissing it when necessary.

Reference to the action menu popover component.

View Source lib/components/list-item/list-item.component.ts, line 67

boolean

# static actionMenuOpen

Tracks the state of the action menu to prevent multiple instances from being opened simultaneously and to ensure proper cleanup when actions are performed. Used for managing the popover lifecycle.

Flag indicating whether the action menu popover is currently open.

Default Value:
  • false

View Source lib/components/list-item/list-item.component.ts, line 202

StringOrBoolean

# static button

When set to true, the list item will have button-like behavior including hover effects, click handling, and appropriate accessibility attributes. When false, the item is displayed as static content without interactive behavior.

Controls whether the list item behaves as a clickable button.

Default Value:
  • true

View Source lib/components/list-item/list-item.component.ts, line 120

EventEmitter.<ListItemCustomEvent>

# static clickEvent

Emits custom events when the list item is clicked or when actions are performed on it. The emitted event contains information about the action, the item data, and other relevant context for parent components to handle.

Event emitter for list item click interactions.

View Source lib/components/list-item/list-item.component.ts, line 170

string

# static description

Provides additional context or details about the item. This text is typically displayed below the title with less visual emphasis. Useful for providing context without cluttering the main title.

Secondary descriptive text for the list item.

View Source lib/components/list-item/list-item.component.ts, line 140

string

# static icon

Specifies which icon to display using Ionic's icon system. The icon name should correspond to an available Ionic icon or a custom icon that has been registered with the icon registry.

The name of the icon to display in the list item.

View Source lib/components/list-item/list-item.component.ts, line 98

'start' | 'end'

# static iconSlot

Determines whether the icon appears at the start (left in LTR languages) or end (right in LTR languages) of the list item. This affects the overall layout and visual hierarchy of the item content.

Position of the icon within the list item.

Default Value:
  • 'start'

View Source lib/components/list-item/list-item.component.ts, line 109

string

# static info

Displays supplementary information that provides extra context about the item. This could include metadata, status information, or other relevant details that don't fit in the title or description.

Additional information text for the list item.

View Source lib/components/list-item/list-item.component.ts, line 150

Record.<string, unknown>

# static item

Contains the raw data that this list item represents. This object is used to extract display information and for passing to event handlers when the item is interacted with. It overrides the base item property.

The data object associated with this list item.

View Source lib/components/list-item/list-item.component.ts, line 88

'inset' | 'full' | 'none'

# static lines

Determines how lines are displayed around the list item borders. 'inset' shows lines with padding, 'full' shows full-width lines, and 'none' removes all lines. This affects the visual separation between list items.

Controls the display of lines around the list item.

Default Value:
  • 'inset'

View Source lib/components/list-item/list-item.component.ts, line 78

boolean

# static showSlideItems

Controls the visibility of slide actions based on screen size and available operations. When true, users can swipe on the item to reveal action buttons for operations like edit and delete.

Flag indicating whether slide items are currently enabled.

Default Value:
  • false

View Source lib/components/list-item/list-item.component.ts, line 181

string

# static subinfo

Provides tertiary level information that complements the info field. This is typically used for additional metadata or contextual details that are useful but not critical for understanding the item.

Sub-information text displayed in the list item.

View Source lib/components/list-item/list-item.component.ts, line 160

string

# static title

Sets the primary text content that appears prominently in the list item. This is typically the most important information about the item and is displayed with emphasis in the component's visual hierarchy.

The main title text displayed in the list item.

View Source lib/components/list-item/list-item.component.ts, line 130

number

# static windowWidth

Stores the current browser window width which is used to determine responsive behavior, such as when to show or hide slide items based on screen size. Updated automatically on window resize events.

Current window width in pixels.

View Source lib/components/list-item/list-item.component.ts, line 191

Methods

# enableSlideItems() → {boolean}

This method is automatically called when the window is resized and also during component initialization. It determines whether slide actions should be available based on the current window width and the presence of UPDATE or DELETE operations. Slide items are typically hidden on larger screens where there's space for dedicated action buttons.

Responsive handler that enables or disables slide items based on screen size and operations.

sequenceDiagram participant W as Window participant L as ListItemComponent participant U as UI W->>L: resize event L->>W: getWindowWidth() W-->>L: Return current width L->>L: Store windowWidth alt No operations OR width > 768px L->>U: showSlideItems = false else Operations include UPDATE/DELETE L->>U: showSlideItems = true end L-->>U: Return showSlideItems value

View Source lib/components/list-item/list-item.component.ts, line 795

True if slide items should be shown, false otherwise

boolean

# getLocale(translatable) → {string}

Determines which locale string to use for translation based on the translatable flag and available locale settings. This method first converts the translatable parameter to a boolean using the stringToBoolean utility function. If translatable is false, it returns an empty string, indicating no translation should be performed. If translatable is true, it checks for an explicitly provided locale via the locale property. If no explicit locale is available, it falls back to the componentLocale derived from the component's class name.

Gets the appropriate locale string based on the translatable flag and available locales.

sequenceDiagram participant C as Component participant N as NgxBaseComponent participant S as StringUtils C->>N: getLocale(translatable) N->>S: stringToBoolean(translatable) S-->>N: Return boolean value N->>N: Store in this.translatable alt translatable is false N-->>C: Return empty string else translatable is true alt this.locale is defined N-->>C: Return this.locale else this.locale is not defined N-->>C: Return this.componentLocale end end
Parameters:
Name Type Description
translatable StringOrBoolean

Whether the component should be translated

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 518

The locale string to use for translation, or empty string if not translatable

string

# getModel(model) → {void}

Processes the provided model parameter, which can be either a Model instance or a string identifier. If a string is provided, it attempts to resolve the actual model from the injectables registry. After resolving the model, it calls setModelDefinitions to configure the component based on the model's metadata.

Resolves and sets the component's model

Parameters:
Name Type Description
model string | Model

The model instance or identifier string

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 550

void

# getRoute() → {string}

Retrieves the route path for the component, generating one based on the model if no route is explicitly set. This method checks if a route is already defined, and if not, it creates a default route based on the model's constructor name. The generated route follows the pattern '/model/{ModelName}'. This is useful for automatic routing in CRUD operations.

Gets the route for the component

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 535

The route path for the component, or empty string if no route is available

string

# async handleAction(action, event, targetopt) → {Promise.<(boolean|void)>}

This method is the central action handler for list item interactions. It manages event propagation, dismisses open action menus, removes focus traps, and either emits events for parent components to handle or performs navigation based on the component's route configuration. This method supports both event-driven and navigation-driven architectures.

Handles user interactions and actions performed on the list item.

sequenceDiagram participant U as User participant L as ListItemComponent participant P as Parent Component participant N as NavController participant E as Event System U->>L: Perform action (click/swipe) L->>L: stopImmediatePropagation() alt actionMenuOpen L->>L: Dismiss action menu end L->>L: removeFocusTrap() alt No route configured L->>E: windowEventEmitter() L->>P: clickEvent.emit() else Route configured L->>N: redirect(action, uid) N-->>L: Return navigation result end
Parameters:
Name Type Attributes Description
action CrudOperations

The type of CRUD operation being performed

event Event

The browser event that triggered the action

target HTMLElement <optional>

Optional target element for the event

View Source lib/components/list-item/list-item.component.ts, line 765

A promise that resolves to navigation success or void for events

Promise.<(boolean|void)>

# handleEvent(event) → {void}

Receives events from child renderer components and forwards them to parent components through the listenEvent output. This creates an event propagation chain that allows events to bubble up through the component hierarchy, enabling coordinated responses to user interactions across the layout structure.

Handles custom events from child components.

sequenceDiagram participant C as Child Component participant L as NgxBaseComponent participant P as Parent Component C->>L: Emit RendererCustomEvent L->>L: handleEvent(event) L->>P: listenEvent.emit(event) Note over P: Handle event in parent
Parameters:
Name Type Description
event RendererCustomEvent

The custom event from a child component

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 617

void

# initialize()

Performs one-time initialization of the component. This method checks if the component has already been initialized to prevent duplicate initialization. When called for the first time, it sets the initialized flag to true and logs an initialization message with the component name. This method is typically called during the component's lifecycle setup.

Initializes the component

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 591

# ngOnChanges(changes) → {void}

This Angular lifecycle hook is called when input properties change. It responds to changes in the model, locale, or translatable properties by updating the component's internal state accordingly. When the model changes, it calls getModel to process the new model and getLocale to update the locale. When locale or translatable properties change, it calls getLocale to update the translation settings.

Handles changes to component inputs

Parameters:
Name Type Description
changes SimpleChanges

Object containing changed properties

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 474

void

# async ngOnInit() → {Promise.<void>}

Sets up the component by determining slide item visibility, processing boolean inputs, building CSS class names based on properties, and capturing the current window width. This method prepares the component for user interaction by ensuring all properties are properly initialized and responsive behavior is configured.

Initializes the component after Angular first displays the data-bound properties.

sequenceDiagram participant A as Angular Lifecycle participant L as ListItemComponent participant W as Window A->>L: ngOnInit() L->>L: enableSlideItems() L->>L: Process button boolean L->>L: Build className with flex classes alt operations exist L->>L: Add 'action' class end L->>W: getWindowWidth() W-->>L: Return current width L->>L: Store windowWidth

View Source lib/components/list-item/list-item.component.ts, line 726

Promise.<void>

# protected parseProps(instance) → {void}

This method iterates through the properties of the provided instance object and applies any matching properties from the component's props configuration to the component instance. This allows for dynamic property assignment based on configuration stored in the props object, enabling flexible component customization without requiring explicit property binding for every possible configuration option.

The method performs a safe property assignment by checking if each key from the instance exists in the props object before applying it. This prevents accidental property overwriting and ensures only intended properties are modified.

Parses and applies properties from the props object to the component instance.

sequenceDiagram participant C as Component participant B as NgxBaseComponent participant P as Props Object C->>B: parseProps(instance) B->>B: Get Object.keys(instance) loop For each key in instance B->>P: Check if key exists in this.props alt Key exists in props B->>B: Set this[key] = this.props[key] else Key not in props Note over B: Skip this key end end
Parameters:
Name Type Description
instance KeyValue

The component instance object to process

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 456

void

# presentActionsMenu(event) → {void}

This method handles the display of a contextual action menu when triggered by user interaction (typically a long press or right-click). It stops event propagation to prevent unwanted side effects, removes any existing focus traps for accessibility, configures the popover with the triggering event, and opens the action menu. The menu typically contains available CRUD operations for the item.

Presents the actions menu popover for the list item.

sequenceDiagram participant U as User participant L as ListItemComponent participant P as Popover participant A as Accessibility U->>L: Trigger action menu (long press/right-click) L->>L: stopImmediatePropagation() L->>A: removeFocusTrap() L->>P: Set event reference L->>L: actionMenuOpen = true L->>P: Display popover with actions
Parameters:
Name Type Description
event Event

The event that triggered the action menu request

View Source lib/components/list-item/list-item.component.ts, line 882

void

# async redirect(action, idopt) → {Promise.<boolean>}

This method constructs a navigation URL using the component's route configuration, the specified action, and an item identifier. It uses Ionic's NavController to perform forward navigation with appropriate animations. This method is typically used for CRUD operations where each action (create, read, update, delete) has its own route.

Navigates to a new route based on the specified action and item ID.

sequenceDiagram participant L as ListItemComponent participant N as NavController participant R as Router L->>L: redirect(action, id) L->>L: Construct URL: /{route}/{action}/{id} L->>N: navigateForward(url) N->>R: Navigate to constructed URL R-->>N: Return navigation result N-->>L: Return boolean success
Parameters:
Name Type Attributes Description
action string

The action to be performed (e.g., 'edit', 'view', 'delete')

id string <optional>

The unique identifier of the item to be acted upon

View Source lib/components/list-item/list-item.component.ts, line 853

A promise that resolves to true if navigation was successful

Promise.<boolean>

# removeElement(element) → {void}

This method applies CSS animation classes to create a smooth fade-out effect before removing the element from the DOM. The animation enhances user experience by providing visual feedback when items are deleted or removed from lists. The timing is coordinated with the CSS animation duration to ensure the element is removed after the animation completes.

Animates and removes an element from the DOM.

sequenceDiagram participant L as ListItemComponent participant E as HTMLElement participant D as DOM L->>E: Add animation classes Note over E: uk-animation-fade, uk-animation-medium, uk-animation-reverse E->>E: Start fade animation L->>L: setTimeout(600ms) Note over L: Wait for animation to complete L->>D: element.remove() D->>D: Remove element from DOM
Parameters:
Name Type Description
element HTMLElement

The DOM element to animate and remove

View Source lib/components/list-item/list-item.component.ts, line 824

void

# setModelDefinitions(model) → {void}

Extracts and applies configuration from the model's decorators to set up the component. This method uses the rendering engine to retrieve decorator metadata from the model, then configures the component's mapper and item properties accordingly. It ensures the route is properly set and merges various properties from the model's metadata into the component's configuration.

Configures component properties based on model metadata

Parameters:
Name Type Description
model Model

The model to extract configuration from

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 566

void

# trackItemFn(index, item) → {string|number}

Provides a tracking function for Angular's *ngFor directive to optimize rendering performance. This method generates unique identifiers for list items based on their index and content, allowing Angular to efficiently track changes and minimize DOM manipulations during list updates. The tracking function is essential for maintaining component state and preventing unnecessary re-rendering of unchanged items.

Tracks items in ngFor loops for optimal change detection.

Parameters:
Name Type Description
index number

The index of the item in the list

item KeyValue | string | number

The item data to track

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 633

A unique identifier for the item

string | number