File

src/lib/inbox-layout/data-items-list/data-items-list.component.ts

Description

One of the main part of the application. Responsible for ensuring that the transmitted data is properly structured to the user.

Example :
<talenra-data-items-list
  [dataItemsChange]="filteredDataItems"
  [scrollToIndex]="keyboardService.scrollToIndex"
  [furtherActionsMenu]="furtherActionsMenu"
  (dataItemsInteractions)="onDataItemsInteractions($event)"
  (clickedDataItems)="selectedDataItem($event)"
  (scrollChange)="onScrollChange($event)"
></talenra-data-items-list>

Implements

OnInit OnDestroy AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs

Inputs

dataItems
Type : any[]
Default value : []

Input attribute for the data items list to be displayed in the UI.

lockedDataItems
Type : IDataItemId[] | undefined
Default value : undefined

The locked data items for the data item list.

mainCheckboxState
Type : CheckboxState
Default value : CheckboxState.Outline

Checkbox state of the toolbar checkbox. The state changes all the checkboxes in the data items list. Outline: No checkbox is checked. Indeterminate: Does not change the state of the checkboxes. Checked: All checkboxes are checked.

pairingAttributes
Type : IPairingAttributes[]
Required :  true

pairing of attributes to be displayed in the UI.

scrollToIndex
Type : number
Default value : 0

Input attribute to scroll to specific index

selectedDataItem
Type : any
Default value : undefined

Input attribute for the selected data item to be displayed in the UI.

selectedMainAttributes
Type : string[]
Default value : []

Attribute identifier for the selected main attributes to be displayed in attributes settings and data items list.

useProgressiveLoader
Default value : false, { transform: booleanAttribute }

If true, the progressive loader feature is enabled. This input is mutually exclusive with usePagination. If both are true, neither feature will be active.

Example :
<talenra-inbox [attributes]="attributes" useProgressiveLoader></talenra-inbox>

Outputs

clickedDataItem
Type : any

Transfer the clicked data item from the data item list to the data item sidebar information.

dataItemsInteractions
Type : IInteractedDataItems

EventEmitter to send data items interactions.

mainCheckboxStateChange
Type : CheckboxState

Emitter for the change in the checkbox state of the toolbar checkbox.

numberMarkedDataItemsChange
Type : number

EventEmitter to send change number of marked data items.

virtualScrollChange
Type : number

EventEmitter to send change in Scroll Position.

Methods

checkIfDataItemMarked
checkIfDataItemMarked(inboxId: string)

Auxiliary method to check if the data item is marked.

Parameters :
Name Type Optional Description
inboxId string No

Data item id of the chosen data item.

Returns : boolean
Public getFormGroupDataItemByID
getFormGroupDataItemByID(item: string)

Method to get data item by name.

Parameters :
Name Type Optional Description
item string No

Item name from the data item.

Returns : FormGroup | null
getLockedDataItem
getLockedDataItem(itemInboxId: string)

Gets the locked data item info for the given item element.

Parameters :
Name Type Optional Description
itemInboxId string No

The inbox id of the item.

The locked data item info if the item is locked, undefined otherwise.

Public handleMarkedDataItems
handleMarkedDataItems(item: any)

Handler to mark data items, used by the emitter of a single data item.

Parameters :
Name Type Optional Description
item any No

Clicked data item.

Returns : void
onCheckboxInteraction
onCheckboxInteraction(event: literal type)

Handles the interaction of one checkbox in the data items list.

Parameters :
Name Type Optional
event literal type No
Returns : void
onDataItemsInteractions
onDataItemsInteractions(event: IInteractedDataItems)

Depending on the clicked data items button the corresponding event actions will be shown.

Parameters :
Name Type Optional Description
event IInteractedDataItems No

The InterDataItemsModel with the clicked data item and information about the clicked button.

Returns : void
Public onScroll
onScroll()

Method to handle scroll change.

Returns : void
Public onSelectClick
onSelectClick(item: any)

Method to handle selected / clicked data items.

Parameters :
Name Type Optional Description
item any No

Clicked data items.

Returns : void
Public onShiftDataItemClick
onShiftDataItemClick(item: any)

Method to handle selected / clicked data items.

Parameters :
Name Type Optional Description
item any No

Clicked data item.

Returns : void
setToolbarCheckboxState
setToolbarCheckboxState()

Method to set the state of the toolbar checkbox.

Returns : void

Properties

Public dataItemsClass
Type : DataItemsClass
Default value : new DataItemsClass()

Class to interact with data-items-list-data.

Public dataItemsService
Type : unknown
Default value : inject(DataItemsService)

The data items service.

Public lockedDataItemsInboxId
Type : unknown
Default value : computed(() => { return Array.from(this.lockedDataItemsMap().keys()); })

Computed signal that derives locked data items inbox IDs from lockedDataItemsMap. Used for checkbox state logic and internal boolean checks.

Public lockedDataItemsMap
Type : unknown
Default value : computed(() => { const lockedDataItems = this.lockedDataItems(); if (!lockedDataItems) return new Map<string, IDataItemId>(); const currentDataItems = this.dataItems(); const result = new Map<string, IDataItemId>(); lockedDataItems.forEach((lockedItem) => { const index = currentDataItems.findIndex( (value) => this.dataItemsClass.getElemFromDataItemDisplayed(value, lockedItem.identifier) === lockedItem.value ); if (index !== -1) { result.set(currentDataItems[index]['inboxId'], lockedItem); } }); return result; })

Computed signal that maps inbox IDs to their corresponding locked data item info. Automatically recomputes when either lockedDataItems or dataItems changes.

Public markedDataItems
Type : string[]
Default value : []

List of all marked data items names

Public markedDataItemsFormGroupCheckboxes
Type : IMarkedItemFormGroup[]
Default value : []

List of all data items names which have been marked through click on the checkbox

results matching ""

    No results matching ""