File

src/lib/inbox/services/main-facade-setter.service.ts

Index

Properties
Methods

Methods

clickedDataItemFunction
clickedDataItemFunction(dataItem: any, clickedDataItemEmitter: any)

Handler for the clicked data item.

Parameters :
Name Type Optional Description
dataItem any No

The clicked data item.

clickedDataItemEmitter any No

The clicked data item emitter.

Returns : void
compareFilterSort
compareFilterSort(a: IFilterSortSearch, b: IFilterSortSearch)

Compares the filter and sort values between two values.

Parameters :
Name Type Optional Description
a IFilterSortSearch No

First element to compare.

b IFilterSortSearch No

Second element to compare.

Returns : boolean
compareFilterSortSearchEmittedObject
compareFilterSortSearchEmittedObject(a: IFilterSortSearch, b: IFilterSortSearch)

CompareElem is used to compare two elements of the IFilterSortSearch interface.

Parameters :
Name Type Optional Description
a IFilterSortSearch No

First element to compare.

b IFilterSortSearch No

Second element to compare.

Returns : boolean
createPossibleRule
createPossibleRule(attribute: IAttributeItemInput)

Auxiliary method to create a possible rule for the query builder.

Parameters :
Name Type Optional Description
attribute IAttributeItemInput No

The attribute item input.

Returns : IQueryBuilderPossibleRule | undefined
determineOrderOfPickedAttributes
determineOrderOfPickedAttributes(mainAttributesData: IAttributeItem[], detailsAttributesData: IAttributeItem[])

Determines the order of the picked data-item-list attributes.

Parameters :
Name Type Optional Description
mainAttributesData IAttributeItem[] No

Main attributes.

detailsAttributesData IAttributeItem[] No

Detail attributes.

Returns : void
getOptionForElement
getOptionForElement(key: string, attributeItem: IAttributeItem)

Get the option for the element.

Parameters :
Name Type Optional Description
key string No

The key of the element.

attributeItem IAttributeItem No

The attribute item.

Returns : ISelectionFilterValue | undefined
initializeDataItemsList
initializeDataItemsList(dataItems: any[])

Initializes the data items list.

Parameters :
Name Type Optional Description
dataItems any[] No

The data items.

Returns : void
initializeFilterSortStateFromPreset
initializeFilterSortStateFromPreset()

Initializes the filter and sort state from the preset.

Returns : void
onSearchFieldChange
onSearchFieldChange(search: string)

Function to handle the search field input.

Parameters :
Name Type Optional Description
search string No

The search value.

Returns : void
publishFilterSortSearch
publishFilterSortSearch(value: IFilterSortSearch, fromPresetChange?: boolean)

Emit the filter, sort and search values to the consuming application. Sets buffer element to the current value.

Parameters :
Name Type Optional Description
value IFilterSortSearch No

The filter, sort and search values.

fromPresetChange boolean Yes

If the action is from preset change.

Returns : void
resetDetailViewTabs
resetDetailViewTabs(detailViewTabsChanges: IInboxTabBarItem[])

Sets the detail view tabs after view init of the consuming app.

Parameters :
Name Type Optional Description
detailViewTabsChanges IInboxTabBarItem[] No

Changes of the detail view tabs.

Returns : IInboxTabBarItem[]
setAllAttributes
setAllAttributes(attributeList: IAttributeItem[])

Sets the attribute list.

Parameters :
Name Type Optional Description
attributeList IAttributeItem[] No

The attribute list.

Returns : void
setAllUntransformedAttributes
setAllUntransformedAttributes(dataItemAttributes: IAttributeItemInput[])

Sets the untransformed attribute list.

Parameters :
Name Type Optional Description
dataItemAttributes IAttributeItemInput[] No

The untransformed attribute list.

Returns : void
setDefaultStateOfInboxLayout
setDefaultStateOfInboxLayout(dataItems: any, clickedDataItemEmitter: any, resetDetailViewState: boolean)

Sets the default value of expanded detailView, selectedDataItem and selectedItem of detailView.

Parameters :
Name Type Optional
dataItems any No
clickedDataItemEmitter any No
resetDetailViewState boolean No
Returns : void
setEmitter
setEmitter(filterSortSearchEmitter: EventEmitter<IFilterSortSearch>, selectedMainAttributesEmitter: EventEmitter, selectedDetailAttributesEmitter: EventEmitter, selectedAllAttributesEmitter: EventEmitter)

Set the filter, sort and search emitter.

Parameters :
Name Type Optional Description
filterSortSearchEmitter EventEmitter<IFilterSortSearch> No

The filter, sort and search emitter.

selectedMainAttributesEmitter EventEmitter<string[]> No

The selected main attributes emitter.

selectedDetailAttributesEmitter EventEmitter<string[]> No

The selected detail attributes emitter.

selectedAllAttributesEmitter EventEmitter<string[]> No

The selected all attributes emitter.

Returns : void
setFilterAndSearchSubscriptions
setFilterAndSearchSubscriptions(clickedDataItemEmitter: any)

All changes through the filter-toolbar are subscribed. The displayed data-item-list adept to the filter changes.

Parameters :
Name Type Optional
clickedDataItemEmitter any No
Returns : void
setIconSelection
setIconSelection(iconAttribute: IIconInput[])

Sets the icon selection.

Parameters :
Name Type Optional Description
iconAttribute IIconInput[] No

The icon selection.

Returns : void
setKeyboardServiceConfiguration
setKeyboardServiceConfiguration(iconBtnFunction: (btn: string) => void, dataItemsInteractions: EventEmitter<IInteractedDataItems>, dataItemsAvailable: boolean, dataItemSelectedFunction: (dataItem: any) => void, clickedDataItemEmitter: EventEmitter, lockedDataItems: IDataItemId[])

Sets the necessary properties in the keyboard-service. Allows the keyboard-service to access the properties of the inbox-component.

Parameters :
Name Type Optional
iconBtnFunction function No
dataItemsInteractions EventEmitter<IInteractedDataItems> No
dataItemsAvailable boolean No
dataItemSelectedFunction function No
clickedDataItemEmitter EventEmitter<any> No
lockedDataItems IDataItemId[] No
Returns : void
setNumberMainAttributesChosenByUser
setNumberMainAttributesChosenByUser(numberMainAttributesChosenByUser: number)

Sets the number of main attributes chosen by the user.

Parameters :
Name Type Optional Description
numberMainAttributesChosenByUser number No

The number of main attributes chosen by the user.

Returns : void
setPickedAttributes
setPickedAttributes()

Sets the picked attributes for the attributes-settings. Used to initialize the attributeList, if attributes are defined by consuming app.

Returns : void
setPossibleRules
setPossibleRules(possibleRules: IQueryBuilderPossibleRule[])

Sets the possible rules for the expert filter.

Parameters :
Name Type Optional Description
possibleRules IQueryBuilderPossibleRule[] No

The possible rules for the expert filter.

Returns : void
setSelectedAttributeListInsideAttributesSettingsService
setSelectedAttributeListInsideAttributesSettingsService()

Sets the selected dataItemListAttributes in the attributes-settings-service (SELECTED = CHECKED). The attributes-settings-service is used to communicate with the attributes-settings (main and detail attributes).

Returns : void
setVirtualScrollerPosition
setVirtualScrollerPosition(virtualScrollerPosition: number)

Sets the virtual scroller position.

Parameters :
Name Type Optional Description
virtualScrollerPosition number No

The virtual scroller position.

Returns : void
transformFilterAttributeIntoQueryInterface
transformFilterAttributeIntoQueryInterface(toTransform: IFilterAttribute[], attributes: IAttributeItem[])

Transforms the simple filter interface to the query interface.

Parameters :
Name Type Optional Description
toTransform IFilterAttribute[] No

The active filter.

attributes IAttributeItem[] No

All available attributes, used to get the label.

Returns : IQueryBuilderQuery
transformQueryInterfaceIntoFilterAttribute
transformQueryInterfaceIntoFilterAttribute(toTransform: IQueryBuilderQuery)

Transforms the query interface into the filter attribute interface. Checks if transformation is possible, if not returns undefined.

Parameters :
Name Type Optional Description
toTransform IQueryBuilderQuery No

The query to transform.

Returns : [] | undefined

Properties

allAttributes$
Type : unknown
Default value : new BehaviorSubject<IAttributeItem[]>([])

The list of all attributes generated by the attributes input supplied by the consuming app or generated by the data items if the attributes are not supplied by the consuming application.

allUntransformedAttributes$
Type : unknown
Default value : new BehaviorSubject<IAttributeItemInput[]>([])

The list of all attributes supplied by the consuming app.

clickedDataItemEmitter
Type : EventEmitter<any>
Default value : new EventEmitter<any>()

The emitter for the clicked data item.

dataItemsService
Type : unknown
Default value : inject(DataItemsService)

The service of the data items.

filterSelection
Type : IQueryBuilderQuery
Default value : { identifier: 'head', rules: [], condition: QueryBuilderCondition.And, hierarchyLevel: 1, }

The filter selection get from the presets.

filterSortSearchEmitter
Type : EventEmitter<IFilterSortSearch>
Default value : new EventEmitter<IFilterSortSearch>()

EventEmitter to emit the filter, sort and search values to the consuming application.

filterSortSearchEmitterBuffer
Type : IFilterSortSearch
Default value : { selectedMainAttributes: [], selectedDetailAttributes: [], filterAttributes: { identifier: 'head', rules: [], condition: QueryBuilderCondition.And, hierarchyLevel: 1, }, iconAttributes: [], searchText: '', sortAttributes: [], numberMainAttributesChosenByUser: 12, }

Filter, Sort and Search emitter buffer element. Saves the previous state of the filter, sort and search. Used to recognize changes in the filter, sort and search and not emit the same state again.

filterState
Type : unknown
Default value : inject(FilterStateService)

The state of the inbox.

filterToolbarService
Type : unknown
Default value : inject(FilterToolbarService)

The service of the filter toolbar.

iconSelection
Type : IIconInput[]
Default value : []

The selection of icons that are to be used to filter and flag the data items.

inboxDetailViewService
Type : unknown
Default value : inject(InboxDetailViewService)

The service of the inbox detail view.

inboxState
Type : unknown
Default value : inject(InboxState)

The state of the inbox.

keyboardService
Type : unknown
Default value : inject(KeyboardService)

The service of the keyboard.

maxAttributesDetail
Type : number
Default value : 100

The maximum Attributes, which are to be shown in the detail-view. Default value is 100, like chosen in the requirements.

maxMainAttributes
Type : number
Default value : 12

The maximum Attributes, which are to be shown in the data-items-list. Further they are divided in the ui. Marks the border for which values are saved to attributes and attributes-detail in attributes-settings. Default value is 12, like chosen in the requirements.

numberMainAttributesChosenByUser$
Type : unknown
Default value : new BehaviorSubject<number>(12)

The number of main attributes chosen by the user. Default value is 12, like chosen in the requirements. Will be overwritten by the consuming app through the view or inbox configuration.

numberMainAttributesGivenByTheAttributesInput
Type : number
Default value : 12

The number of main attributes given by the attributes input supplied by the consuming app.

possibleQueryOptionsFromData
Type : IQueryBuilderValueOptions[]
Default value : []

The possible query options from the data.

possibleRules
Type : IQueryBuilderPossibleRule[]
Default value : []

The possible rules that can be selected in the expert filter via the query-builder. Is generated via the attributes input supplied by the consuming app.

reOpenDetailViewAfterRefresh
Type : boolean | undefined
Default value : undefined

Flag to check if the detail view is expanded or not and should be opened after data items refresh.

searchField
Type : FormGroup
Default value : new FormGroup({ searchField: new FormControl(''), })

The form-group defines the search field, gets passed into the component.

selectedAllAttributesEmitter
Type : EventEmitter<string[]>
Default value : new EventEmitter<string[]>()

EventEmitter to emit all attributes to the consuming application.

selectedDetailAttributesEmitter
Type : EventEmitter<string[]>
Default value : new EventEmitter<string[]>()

EventEmitter to emit detail attributes to the consuming application.

selectedMainAttributesEmitter
Type : EventEmitter<string[]>
Default value : new EventEmitter<string[]>()

EventEmitter to emit main attributes to the consuming application.

sortSelection
Type : ISortAttributesInput[]
Default value : []

The sort selection get from the presets.

virtualScrollerPosition$
Type : unknown
Default value : new BehaviorSubject<number>(0)

The position of the virtual scroller.

results matching ""

    No results matching ""